Browse Source

fix: 添加字典映射

sy-water-data-board-ui
panyuyi 1 month ago
parent
commit
881abc16ec
  1. 7
      src/views/dike/safeOperation/components/BaseInfo.vue
  2. 2
      src/views/dike/safeOperation/components/DataStatistics.vue
  3. 20
      src/views/reservoir/safeOperation/components/BaseInfo.vue
  4. 2
      src/views/reservoir/safeOperation/components/DataStatistics.vue
  5. 6
      src/views/sluice/safeOperation/components/BaseInfo.vue
  6. 2
      src/views/sluice/safeOperation/components/DataStatistics.vue

7
src/views/dike/safeOperation/components/BaseInfo.vue

@ -405,6 +405,7 @@ export default {
dikeTypeOptions: [], dikeTypeOptions: [],
engGradOptions: [], engGradOptions: [],
mainBuildGradOptions: [], mainBuildGradOptions: [],
departmentOptions: [],
}; };
}, },
watch: { watch: {
@ -440,6 +441,9 @@ export default {
this.getDicts("building_level").then((response) => { this.getDicts("building_level").then((response) => {
this.mainBuildGradOptions = response.data; this.mainBuildGradOptions = response.data;
}); });
this.getDicts("centralized_management_department").then((response) => {
this.departmentOptions = response.data;
});
}, },
// //
dikePattFormat(row, column) { dikePattFormat(row, column) {
@ -463,6 +467,9 @@ export default {
engGradFormat(row, column) { engGradFormat(row, column) {
return this.selectDictLabel(this.engGradOptions, row.dikeGrad); return this.selectDictLabel(this.engGradOptions, row.dikeGrad);
}, },
departmentFormat(row, column) {
return this.selectDictLabel(this.departmentOptions, row.admDep);
},
initBaseInfo() { initBaseInfo() {
getJbxx(this.resCode).then((res) => { getJbxx(this.resCode).then((res) => {
if (res?.data) { if (res?.data) {

2
src/views/dike/safeOperation/components/DataStatistics.vue

@ -107,7 +107,7 @@ export default {
data() { data() {
return { return {
cascaderOptions: [], cascaderOptions: [],
showType: "1", showType: "2",
cascaderArr: [], cascaderArr: [],
dateArr: "", dateArr: "",
cascaderProps: { cascaderProps: {

20
src/views/reservoir/safeOperation/components/BaseInfo.vue

@ -60,7 +60,7 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 归口管理部门 </template> <template slot="label"> 归口管理部门 </template>
{{ this.form.admDep }} {{ departmentFormat(this.form) }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 水库主管部门 </template> <template slot="label"> 水库主管部门 </template>
@ -116,7 +116,7 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 工程建设情况 </template> <template slot="label"> 工程建设情况 </template>
{{ this.form.engStat }} {{ situationFormat(this.form) }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 有效年份 </template> <template slot="label"> 有效年份 </template>
@ -586,6 +586,8 @@ export default {
projTypeOptions: [], projTypeOptions: [],
projectScaleOptions: [], projectScaleOptions: [],
engineerLevelOptions: [], engineerLevelOptions: [],
departmentList: [],
constructSituationOptions: [],
}; };
}, },
watch: { watch: {
@ -618,6 +620,12 @@ export default {
this.getDicts("engineering_grade").then((response) => { this.getDicts("engineering_grade").then((response) => {
this.engineerLevelOptions = response.data; this.engineerLevelOptions = response.data;
}); });
this.getDicts("centralized_management_department").then((response) => {
this.departmentList = response.data;
});
this.getDicts("res_engineering_construct_situation").then((response) => {
this.constructSituationOptions = response.data;
});
}, },
// //
projTypeFormat(row, column) { projTypeFormat(row, column) {
@ -631,6 +639,14 @@ export default {
engineerLevelFormat(row, column) { engineerLevelFormat(row, column) {
return this.selectDictLabel(this.engineerLevelOptions, row.engGrad); return this.selectDictLabel(this.engineerLevelOptions, row.engGrad);
}, },
//
departmentFormat(row, column) {
return this.selectDictLabel(this.departmentList, row.admDep);
},
//
situationFormat(row, column) {
return this.selectDictLabel(this.constructSituationOptions, row.engStat);
},
initBaseInfo() { initBaseInfo() {
getReservoirBaseDetailData(this.resCode).then((res) => { getReservoirBaseDetailData(this.resCode).then((res) => {
if (res?.data) { if (res?.data) {

2
src/views/reservoir/safeOperation/components/DataStatistics.vue

@ -111,7 +111,7 @@ export default {
data() { data() {
return { return {
cascaderOptions: [], cascaderOptions: [],
showType: "1", showType: "2",
cascaderArr: [], cascaderArr: [],
dateArr: "", dateArr: "",
cascaderProps: { cascaderProps: {

6
src/views/sluice/safeOperation/components/BaseInfo.vue

@ -289,12 +289,12 @@ export default {
this.getDicts("building_level").then((response) => { this.getDicts("building_level").then((response) => {
this.majorStructureLevelOptions = response.data; this.majorStructureLevelOptions = response.data;
}); });
this.getDicts("centralized_management_department").then((response) => {
this.departmentOptions = response.data;
});
this.getDicts("design_seismic_intensity").then((response) => { this.getDicts("design_seismic_intensity").then((response) => {
this.intensityOptions = response.data; this.intensityOptions = response.data;
}); });
this.getDicts("centralized_management_department").then((response) => {
this.departmentOptions = response.data;
});
}, },
// //
sluiceTypeFormat(row, column) { sluiceTypeFormat(row, column) {

2
src/views/sluice/safeOperation/components/DataStatistics.vue

@ -107,7 +107,7 @@ export default {
data() { data() {
return { return {
cascaderOptions: [], cascaderOptions: [],
showType: "1", showType: "2",
cascaderArr: [], cascaderArr: [],
dateArr: "", dateArr: "",
cascaderProps: { cascaderProps: {

Loading…
Cancel
Save