页面列表的字段回显

This commit is contained in:
shen_yan_pu
2021-07-20 16:37:28 +08:00
parent 317294fdc0
commit 6b2edd514e
7 changed files with 257 additions and 55 deletions
@@ -86,6 +86,12 @@
prop="countryArea"
label="国家/地区"
align="center">
<template slot-scope="scope">
<span v-if="scope.row.countryArea.indexOf(',') >= 0">
<span>{{ scope.row.countryArea }}</span>
</span>
<span v-else>{{ countryAreaMap[scope.row.countryArea] }}</span>
</template>
</el-table-column>
<el-table-column
prop="detailedListName"
@@ -170,6 +176,7 @@ export default {
name: "listOfCountries",
data() {
return {
countryAreaMap: {},
searching: false,
total: 0,
page: 1,
@@ -349,6 +356,12 @@ export default {
fileIds: item.fileIds
}
});
},
// 将文本状态的id与name对应
setMap(data){
data.forEach(item => {
this.$set(this.countryAreaMap, item.value, item.label)
})
}
},
mounted() {
@@ -359,6 +372,7 @@ export default {
_this: this
}, res => {
this.countryOptions = res.data.COUNTRY;
this.setMap(this.countryOptions)
}, e => {
});
}
@@ -352,7 +352,8 @@ export default {
this.$router.push({
name: "OtherAddEit",
query: {
id: item.id
id: item.id,
fileIds: item.fileIds
}
});
}
@@ -355,7 +355,8 @@ export default {
this.$router.push({
name: "ProjectAddEit",
query: {
id: item.id
id: item.id,
fileIds: item.fileIds
}
});
}
@@ -242,6 +242,9 @@
prop="textStatus"
width="120px"
label="文本状态">
<template slot-scope="scope">
<span>{{ textStatusMap[scope.row.textStatus] }}</span>
</template>
</el-table-column>
</el-table>
<el-table
@@ -336,25 +339,31 @@
>
</el-table-column>
<el-table-column
prop="issueTime"
prop="standEnName"
align="center"
width="180px"
label="英文名称">
</el-table-column>
<el-table-column
prop="issueTime"
prop="typeApplicable"
align="center"
width="180px"
label="适用车型">
<template slot-scope="scope">
<span>{{ typeApplicableMap[scope.row.typeApplicable] }}</span>
</template>
</el-table-column>
<el-table-column
prop="issueTime"
prop="nylx"
align="center"
width="180px"
label="能源类型">
<template slot-scope="scope">
<span>{{ nylxMap[scope.row.nylx] }}</span>
</template>
</el-table-column>
<el-table-column
prop="issueTime"
prop="putTime"
sortable
align="center"
width="210px"
@@ -362,14 +371,14 @@
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="zccssrq"
prop="zccssrqgj"
sortable
width="210px"
align="center"
label="在产车实施日期">
</el-table-column>
<el-table-column
prop="XCXSSRQ"
prop="xcxssrqgj"
sortable
align="center"
width="210px"
@@ -377,40 +386,53 @@
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="zccssrq"
prop="zrbm"
width="210px"
align="center"
label="责任部门">
<template slot-scope="scope">
<span>{{ zrbmMap[scope.row.zrbm] }}</span>
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="textStatus"
prop="sycpx"
width="180px"
align="center"
label="适用产品线">
<template slot-scope="scope">
<span>{{ sycpxMap[scope.row.sycpx] }}</span>
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="textStatus"
prop="cycvppsbm"
width="210px"
align="center"
label="乘用车VPPS编码">
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="cycvppscn"
width="210px"
align="center"
label="乘用车VPPS中文名称">
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="textStatus"
prop="kccvppsbm"
align="center"
width="210px"
label="卡车VPPS编码">
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="textStatus"
prop="kccvppscn"
align="center"
width="210px"
label="卡车VPPS中文名称">
</el-table-column>
<el-table-column>
<el-table-column width="150">
<template slot-scope="scope">
<el-button
class="common-button-default"
@@ -527,6 +549,11 @@ export default {
// }
// }
return {
textStatusMap: {},
typeApplicableMap: {},
nylxMap: {},
zrbmMap: {},
sycpxMap: {},
selectSearch : [],
// 新增、编辑 基础信息字段
sarAccessEO: {
@@ -1689,6 +1716,16 @@ export default {
this.sarAccessInfoList = res.data
}, e => {
})
},
// 将文本状态的id与name对应
setMap(data){
data.forEach(item => {
this.$set(this.textStatusMap, item.value, item.label)
this.$set(this.typeApplicableMap, item.value, item.label)
this.$set(this.nylxMap, item.value, item.label)
this.$set(this.zrbmMap, item.value, item.label)
this.$set(this.sycpxMap, item.value, item.label)
})
}
},
watch: {
@@ -1725,6 +1762,15 @@ export default {
this.ROLELIST = res.data.ROLELIST
this.GXHBQOptions = res.data.GXHBQXX
this.askNatureOptions = res.data.ACCESSTYPE
this.zrbmOptions = res.data.ZRBMCLASS // 责任部门
this.categoryOptions = res.data.NYLXCLASS // 能源类型
this.textStatusOptions = res.data.WBZTCLASS
this.sycpxOptions = res.data.SYCPXCLASS // 适用产品线
this.setMap(this.textStatusOptions)
this.setMap(this.zrbmOptions)
this.setMap(this.categoryOptions)
this.setMap(this.sycpxOptions)
this.setMap(this.energyKindOptions)
this.getGzzOption()
}, e => {
})
@@ -11,7 +11,10 @@
<div v-show="heightShow" class="transition-box">
<p class="transition-box-p">
<label class="transition-box-label">国家/地区</label>
<span class="transition-box-span">{{ sarAccessEO.countryArea }}</span>
<span class="transition-box-span" v-if="sarAccessEO.countryArea.indexOf(',') >= 0">
<span>{{ sarAccessEO.countryArea }}</span>
</span>
<span class="transition-box-span" v-else>{{ countryAreaMap[sarAccessEO.countryArea] }}</span>
</p>
<p class="transition-box-p">
<label class="transition-box-label">清单说明</label>
@@ -124,31 +127,35 @@
<el-table-column
prop="standName"
label="中文名称"
align="center"
fixed="left"
width="180px"
>
</el-table-column>
<el-table-column
prop="issueTime"
prop="standEnName"
align="center"
width="180px"
label="英文名称">
</el-table-column>
<el-table-column
prop="issueTime"
prop="typeApplicable"
align="center"
width="180px"
label="适用车型">
<template slot-scope="scope">
<span>{{ typeApplicableMap[scope.row.typeApplicable] }}</span>
</template>
</el-table-column>
<el-table-column
prop="issueTime"
prop="nylx"
align="center"
width="180px"
label="能源类型">
<template slot-scope="scope">
<span>{{ nylxMap[scope.row.nylx] }}</span>
</template>
</el-table-column>
<el-table-column
prop="issueTime"
prop="putTime"
sortable
align="center"
width="210px"
@@ -156,14 +163,14 @@
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="zccssrq"
prop="zccssrqgj"
sortable
width="210px"
align="center"
label="在产车实施日期">
</el-table-column>
<el-table-column
prop="xcxssrq"
prop="xcxssrqgj"
sortable
align="center"
width="210px"
@@ -171,35 +178,48 @@
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="zccssrq"
prop="zrbm"
width="210px"
align="center"
label="责任部门">
<template slot-scope="scope">
<span>{{ zrbmMap[scope.row.zrbm] }}</span>
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="textStatus"
prop="sycpx"
width="180px"
align="center"
label="适用产品线">
<template slot-scope="scope">
<span>{{ sycpxMap[scope.row.sycpx] }}</span>
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="textStatus"
prop="cycvppsbm"
width="210px"
align="center"
label="乘用车VPPS编码">
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="cycvppscn"
width="210px"
align="center"
label="乘用车VPPS中文名称">
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="textStatus"
prop="kccvppsbm"
align="center"
width="210px"
label="卡车VPPS编码">
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="textStatus"
prop="kccvppscn"
align="center"
width="210px"
label="卡车VPPS中文名称">
@@ -251,12 +271,17 @@
<script>
import { interfaceUrl } from "@/sysConfig";
import { exportFile } from '@/api/unqualProcess'
export default {
name: "AccessStandardDetails",
data() {
return {
textStatusMap: {},
typeApplicableMap: {},
nylxMap: {},
zrbmMap: {},
sycpxMap: {},
countryAreaMap: {},
standinfoList: [],
standardFormTotal: 0,
relateDialog: false,
@@ -560,6 +585,17 @@ export default {
doLayout() {
this.$refs.adminTable && this.$refs.adminTable.doLayout();
this.$refs.skillTable && this.$refs.skillTable.doLayout();
},
// 将文本状态的id与name对应
setMap(data){
data.forEach(item => {
this.$set(this.textStatusMap, item.value, item.label)
this.$set(this.typeApplicableMap, item.value, item.label)
this.$set(this.nylxMap, item.value, item.label)
this.$set(this.zrbmMap, item.value, item.label)
this.$set(this.sycpxMap, item.value, item.label)
this.$set(this.countryAreaMap, item.value, item.label)
})
}
},
mounted() {
@@ -589,6 +625,16 @@ export default {
this.ROLELIST = res.data.ROLELIST;
this.GXHBQOptions = res.data.GXHBQXX;
this.askNatureOptions = res.data.ACCESSTYPE;
this.zrbmOptions = res.data.ZRBMCLASS // 责任部门
this.categoryOptions = res.data.NYLXCLASS // 能源类型
this.textStatusOptions = res.data.WBZTCLASS
this.sycpxOptions = res.data.SYCPXCLASS // 适用产品线
this.setMap(this.textStatusOptions)
this.setMap(this.zrbmOptions)
this.setMap(this.categoryOptions)
this.setMap(this.sycpxOptions)
this.setMap(this.energyKindOptions)
this.setMap(this.drawerCountryOptions)
this.getGzzOption();
}, e => {
});
@@ -227,6 +227,9 @@
prop="textStatus"
width="120px"
label="文本状态">
<template slot-scope="scope">
<span>{{ textStatusMap[scope.row.textStatus] }}</span>
</template>
</el-table-column>
</el-table>
<el-table
@@ -321,25 +324,31 @@
>
</el-table-column>
<el-table-column
prop="issueTime"
prop="standEnName"
align="center"
width="180px"
label="英文名称">
</el-table-column>
<el-table-column
prop="issueTime"
prop="typeApplicable"
align="center"
width="180px"
label="适用车型">
<template slot-scope="scope">
<span>{{ typeApplicableMap[scope.row.typeApplicable] }}</span>
</template>
</el-table-column>
<el-table-column
prop="issueTime"
prop="nylx"
align="center"
width="180px"
label="能源类型">
<template slot-scope="scope">
<span>{{ nylxMap[scope.row.nylx] }}</span>
</template>
</el-table-column>
<el-table-column
prop="issueTime"
prop="putTime"
sortable
align="center"
width="210px"
@@ -347,14 +356,14 @@
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="zccssrq"
prop="zccssrqgj"
sortable
width="210px"
align="center"
label="在产车实施日期">
</el-table-column>
<el-table-column
prop="XCXSSRQ"
prop="xcxssrqgj"
sortable
align="center"
width="210px"
@@ -362,35 +371,48 @@
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="zccssrq"
prop="zrbm"
width="210px"
align="center"
label="责任部门">
<template slot-scope="scope">
<span>{{ zrbmMap[scope.row.zrbm] }}</span>
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="textStatus"
prop="sycpx"
width="180px"
align="center"
label="适用产品线">
<template slot-scope="scope">
<span>{{ sycpxMap[scope.row.sycpx] }}</span>
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="textStatus"
prop="cycvppsbm"
width="210px"
align="center"
label="乘用车VPPS编码">
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="cycvppscn"
width="210px"
align="center"
label="乘用车VPPS中文名称">
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="textStatus"
prop="kccvppsbm"
align="center"
width="210px"
label="卡车VPPS编码">
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="textStatus"
prop="kccvppscn"
align="center"
width="210px"
label="卡车VPPS中文名称">
@@ -511,11 +533,17 @@ export default {
// }
// }
return {
textStatusMap: {},
typeApplicableMap: {},
nylxMap: {},
zrbmMap: {},
sycpxMap: {},
selectSearch : [],
// 新增、编辑 基础信息字段
sarAccessEO: {
id: '',
sortKey: 4,
fileIds: '',
detailedList: '',
detailedListName: '',
energyKind: '',
@@ -1167,7 +1195,7 @@ export default {
this.fileInfoList.map(item => {
relateFile.push(item.id)
})
sarAccessEO.relateFile = relateFile.join(',')
sarAccessEO.fileIds = relateFile.join(',')
}
if (!sarAccessEO.id) {
// 新增
@@ -1584,7 +1612,7 @@ export default {
// 请求上传的文件信息
getFileInfo () {
this.$http.get('att/attFile/getMultiFileInfos', {
fileIds: this.sarAccessEO.relateFile
fileIds: this.$route.query.fileIds
}, {
_this: this
}, res => {
@@ -1678,6 +1706,16 @@ export default {
}, e => {
})
},
// 将文本状态的id与name对应
setMap(data){
data.forEach(item => {
this.$set(this.textStatusMap, item.value, item.label)
this.$set(this.typeApplicableMap, item.value, item.label)
this.$set(this.nylxMap, item.value, item.label)
this.$set(this.zrbmMap, item.value, item.label)
this.$set(this.sycpxMap, item.value, item.label)
})
}
},
watch: {
@@ -1714,6 +1752,15 @@ export default {
this.ROLELIST = res.data.ROLELIST
this.GXHBQOptions = res.data.GXHBQXX
this.askNatureOptions = res.data.ACCESSTYPE
this.zrbmOptions = res.data.ZRBMCLASS // 责任部门
this.categoryOptions = res.data.NYLXCLASS // 能源类型
this.textStatusOptions = res.data.WBZTCLASS
this.sycpxOptions = res.data.SYCPXCLASS // 适用产品线
this.setMap(this.textStatusOptions)
this.setMap(this.zrbmOptions)
this.setMap(this.categoryOptions)
this.setMap(this.sycpxOptions)
this.setMap(this.energyKindOptions)
this.getGzzOption()
}, e => {
})
@@ -227,6 +227,9 @@
prop="textStatus"
width="120px"
label="文本状态">
<template slot-scope="scope">
<span>{{ textStatusMap[scope.row.textStatus] }}</span>
</template>
</el-table-column>
</el-table>
<el-table
@@ -321,25 +324,31 @@
>
</el-table-column>
<el-table-column
prop="issueTime"
prop="standEnName"
align="center"
width="180px"
label="英文名称">
</el-table-column>
<el-table-column
prop="issueTime"
prop="typeApplicable"
align="center"
width="180px"
label="适用车型">
<template slot-scope="scope">
<span>{{ typeApplicableMap[scope.row.typeApplicable] }}</span>
</template>
</el-table-column>
<el-table-column
prop="issueTime"
prop="nylx"
align="center"
width="180px"
label="能源类型">
<template slot-scope="scope">
<span>{{ nylxMap[scope.row.nylx] }}</span>
</template>
</el-table-column>
<el-table-column
prop="issueTime"
prop="putTime"
sortable
align="center"
width="210px"
@@ -347,14 +356,14 @@
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="zccssrq"
prop="zccssrqgj"
sortable
width="210px"
align="center"
label="在产车实施日期">
</el-table-column>
<el-table-column
prop="XCXSSRQ"
prop="xcxssrqgj"
sortable
align="center"
width="210px"
@@ -362,35 +371,48 @@
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="zccssrq"
prop="zrbm"
width="210px"
align="center"
label="责任部门">
<template slot-scope="scope">
<span>{{ zrbmMap[scope.row.zrbm] }}</span>
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="textStatus"
prop="sycpx"
width="180px"
align="center"
label="适用产品线">
<template slot-scope="scope">
<span>{{ sycpxMap[scope.row.sycpx] }}</span>
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="textStatus"
prop="cycvppsbm"
width="210px"
align="center"
label="乘用车VPPS编码">
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="cycvppscn"
width="210px"
align="center"
label="乘用车VPPS中文名称">
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="textStatus"
prop="kccvppsbm"
align="center"
width="210px"
label="卡车VPPS编码">
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="textStatus"
prop="kccvppscn"
align="center"
width="210px"
label="卡车VPPS中文名称">
@@ -511,11 +533,17 @@ export default {
// }
// }
return {
textStatusMap: {},
typeApplicableMap: {},
nylxMap: {},
zrbmMap: {},
sycpxMap: {},
selectSearch : [],
// 新增、编辑 基础信息字段
sarAccessEO: {
id: '',
sortKey: 2,
fileIds: '',
projectName: '',
detailedListName: '',
energyKind: '',
@@ -1168,7 +1196,7 @@ export default {
this.fileInfoList.map(item => {
relateFile.push(item.id)
})
sarAccessEO.relateFile = relateFile.join(',')
sarAccessEO.fileIds = relateFile.join(',')
}
if (!sarAccessEO.id) {
// 新增
@@ -1585,7 +1613,7 @@ export default {
// 请求上传的文件信息
getFileInfo () {
this.$http.get('att/attFile/getMultiFileInfos', {
fileIds: this.sarAccessEO.relateFile
fileIds: this.$route.query.fileIds
}, {
_this: this
}, res => {
@@ -1679,6 +1707,16 @@ export default {
}, e => {
})
},
// 将文本状态的id与name对应
setMap(data){
data.forEach(item => {
this.$set(this.textStatusMap, item.value, item.label)
this.$set(this.typeApplicableMap, item.value, item.label)
this.$set(this.nylxMap, item.value, item.label)
this.$set(this.zrbmMap, item.value, item.label)
this.$set(this.sycpxMap, item.value, item.label)
})
}
},
watch: {
@@ -1715,6 +1753,15 @@ export default {
this.ROLELIST = res.data.ROLELIST
this.GXHBQOptions = res.data.GXHBQXX
this.askNatureOptions = res.data.ACCESSTYPE
this.zrbmOptions = res.data.ZRBMCLASS // 责任部门
this.categoryOptions = res.data.NYLXCLASS // 能源类型
this.textStatusOptions = res.data.WBZTCLASS
this.sycpxOptions = res.data.SYCPXCLASS // 适用产品线
this.setMap(this.textStatusOptions)
this.setMap(this.zrbmOptions)
this.setMap(this.categoryOptions)
this.setMap(this.sycpxOptions)
this.setMap(this.energyKindOptions)
this.getGzzOption()
}, e => {
})