|
@@ -196,10 +196,21 @@ export default {
|
|
|
//获取表格数据
|
|
|
getHeader(headers, buildFloorSelectd) {
|
|
|
this.headers = headers
|
|
|
+ this.codeToDataSource = {}
|
|
|
this.headers.forEach(item => {
|
|
|
if (item.path) {
|
|
|
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.buildFloorSelectd = buildFloorSelectd
|
|
|
this.page.pageNumber = 1
|
|
@@ -666,8 +677,12 @@ export default {
|
|
|
if (item.id == child.objectId) {
|
|
|
if (child.data || child.data == 0) {
|
|
|
this.headers.map(head => {
|
|
|
- if (head.InfoPointCode == child.infoCode) {
|
|
|
- tools.setDataForKey(item, head.path, child.data);
|
|
|
+ if (head.code == child.infoCode) {
|
|
|
+ let contentVal = child.data
|
|
|
+ if (this.codeToDataSource[child.infoCode]) {
|
|
|
+ contentVal = this.codeToDataSource[child.infoCode][child.data]
|
|
|
+ }
|
|
|
+ tools.setDataForKey(item, head.path, contentVal);
|
|
|
}
|
|
|
});
|
|
|
} else {
|