|
@@ -509,10 +509,21 @@ export default {
|
|
};
|
|
};
|
|
getDataDictionary(params, res => {
|
|
getDataDictionary(params, res => {
|
|
this.tableHeader = res.content;
|
|
this.tableHeader = res.content;
|
|
|
|
+ this.codeToDataSource = {}
|
|
this.tableHeader.forEach(item => {
|
|
this.tableHeader.forEach(item => {
|
|
if (item.path) {
|
|
if (item.path) {
|
|
this.inputMap[item.path] = item;
|
|
this.inputMap[item.path] = item;
|
|
}
|
|
}
|
|
|
|
+ if (item.dataSource) {
|
|
|
|
+ try {
|
|
|
|
+ this.codeToDataSource[item.code] = {}
|
|
|
|
+ item.dataSource.forEach(dic => {
|
|
|
|
+ this.codeToDataSource[item.code][dic.code] = dic.name;
|
|
|
|
+ })
|
|
|
|
+ } catch (e) {
|
|
|
|
+ console.log(e);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
});
|
|
});
|
|
this.getTableData();
|
|
this.getTableData();
|
|
this.getAllData();
|
|
this.getAllData();
|
|
@@ -676,7 +687,11 @@ export default {
|
|
if (!!child.data || child.data == 0) {
|
|
if (!!child.data || child.data == 0) {
|
|
this.tableHeader.map(head => {
|
|
this.tableHeader.map(head => {
|
|
if (head.code == child.infoCode) {
|
|
if (head.code == child.infoCode) {
|
|
- tools.setDataForKey(item, head.path, child.data);
|
|
|
|
|
|
+ let contentVal = child.data
|
|
|
|
+ if (this.codeToDataSource[child.infoCode]) {
|
|
|
|
+ contentVal = this.codeToDataSource[child.infoCode][child.data]
|
|
|
|
+ }
|
|
|
|
+ tools.setDataForKey(item, head.path, contentVal);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|