Browse Source

fix: 增加字典

feature-v1.0.0
panyuyi 1 month ago
parent
commit
f1a2cd5979
  1. 9
      src/views/Main/Reservoir/components/BaseInfo.vue
  2. 5
      src/views/Main/Reservoir/index.vue

9
src/views/Main/Reservoir/components/BaseInfo.vue

@ -106,7 +106,7 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template #label> 工程建设情况 </template> <template #label> 工程建设情况 </template>
{{ form.engStat }} {{ engStateFormat(form.engStat) }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template #label> 有效年份 </template> <template #label> 有效年份 </template>
@ -566,6 +566,10 @@ const props = defineProps({
type: Array<{ dictLabel: string; dictValue: string }>, type: Array<{ dictLabel: string; dictValue: string }>,
default: [], default: [],
}, },
situationOptions: {
type: Array<{ dictLabel: string; dictValue: string }>,
default: [],
},
}); });
let myChart: any = null; let myChart: any = null;
let code: any = null; let code: any = null;
@ -747,6 +751,9 @@ function scaleFormat(key: string) {
function departmentFormat(key: string) { function departmentFormat(key: string) {
return getDictLabel(props.departmentOptions, key); return getDictLabel(props.departmentOptions, key);
} }
function engStateFormat(key: string) {
return getDictLabel(props.situationOptions, key);
}
watch( watch(
() => props.resCode, () => props.resCode,

5
src/views/Main/Reservoir/index.vue

@ -28,6 +28,7 @@
:projTypeOptions="projTypeOptions" :projTypeOptions="projTypeOptions"
:scaleOptions="scaleOptions" :scaleOptions="scaleOptions"
:departmentOptions="departmentOptions" :departmentOptions="departmentOptions"
:situationOptions="situationOptions"
@getResInfo="handleGetResInfo" @getResInfo="handleGetResInfo"
></BaseInfo> ></BaseInfo>
</el-tab-pane> </el-tab-pane>
@ -117,6 +118,7 @@ const gradeOptions = ref([]);
const projTypeOptions = ref([]); const projTypeOptions = ref([]);
const scaleOptions = ref([]); const scaleOptions = ref([]);
const departmentOptions = ref([]); const departmentOptions = ref([]);
const situationOptions = ref([]);
function initDict() { function initDict() {
getDicts("reservoir_type").then((res) => { getDicts("reservoir_type").then((res) => {
projTypeOptions.value = res || []; projTypeOptions.value = res || [];
@ -130,6 +132,9 @@ function initDict() {
getDicts("centralized_management_department").then((res) => { getDicts("centralized_management_department").then((res) => {
departmentOptions.value = res || []; departmentOptions.value = res || [];
}); });
getDicts("res_engineering_construct_situation").then((res) => {
situationOptions.value = res || [];
});
} }
function scaleFormat(key: string) { function scaleFormat(key: string) {

Loading…
Cancel
Save