修改数据字典
This commit is contained in:
@@ -14,7 +14,7 @@ var storage = {
|
||||
}
|
||||
|
||||
const dict = {
|
||||
flag: false,
|
||||
flags: [],
|
||||
formatter: function(row, column, cellValue, index) {
|
||||
if (cellValue == null || cellValue === '') {
|
||||
return ''
|
||||
@@ -24,7 +24,7 @@ const dict = {
|
||||
name = column.property
|
||||
}
|
||||
let data = storage.get(name)
|
||||
console.log('data1:' + data)
|
||||
// console.log('data1:' + name + '=' + data)
|
||||
|
||||
if (!data) {
|
||||
dict.getHlpData(name)
|
||||
@@ -34,7 +34,7 @@ const dict = {
|
||||
if (!data.hasOwnProperty(cellValue)) {
|
||||
return cellValue
|
||||
}
|
||||
console.log('data2:' + data[cellValue])
|
||||
// console.log('data2:' + name + '=' + data[cellValue])
|
||||
|
||||
return data[cellValue]
|
||||
},
|
||||
@@ -45,15 +45,15 @@ const dict = {
|
||||
}
|
||||
let data2 = []
|
||||
for (var key in data) {
|
||||
data2.push({value: key, label: data[key]})
|
||||
data2.push({ value: key, label: data[key] })
|
||||
}
|
||||
return data2
|
||||
},
|
||||
getHlpData: function(name) {
|
||||
if (dict.flag) {
|
||||
if (dict.flags[name]) {
|
||||
return
|
||||
}
|
||||
dict.flag = true
|
||||
dict.flags[name] = true
|
||||
|
||||
if (storage.get(name)) {
|
||||
return
|
||||
@@ -63,10 +63,10 @@ const dict = {
|
||||
url: httpRequest.adornUrl('/buipubbpc1/buiHlpQueryByName.do'),
|
||||
method: 'get',
|
||||
params: httpRequest.adornParams({
|
||||
'name': name
|
||||
name: name
|
||||
})
|
||||
}).then(({data}) => {
|
||||
dict.flag = false
|
||||
}).then(({ data }) => {
|
||||
dict.flags[name] = false
|
||||
if (isGDASucc(data)) {
|
||||
if (data.data) {
|
||||
let data1 = {}
|
||||
@@ -88,7 +88,6 @@ const dict = {
|
||||
remove: function(name) {
|
||||
storage.remove(name)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default dict
|
||||
export default dict
|
||||
|
||||
Reference in New Issue
Block a user