dictionary.js
747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-03 08:59:06
*/
import store from '@/store'
/**
* @description: getSjlx
* @param {*} level
* @author: renchao
*/
export function getSjlx (level) {
const resultMap = {
1: '系统数据',
2: '存量数据',
3: '补录数据',
}
return resultMap[level] || resultMap.default;
}
/**
* @description: getDictLeabel
* @param {*} level
* @param {*} code
* @author: renchao
*/
export function getDictLeabel (level, code) {
const resultMap = store.getters.dictData[code]
const desiredObject = resultMap.find(obj => obj.dcode === level);
if (desiredObject) {
const desiredName = desiredObject.dname;
return desiredName
} else {
return ''
}
}