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

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

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

Loading…
Cancel
Save