|
@@ -264,9 +264,9 @@
|
|
|
{{ selectedNetwork.length ?? "-" }} m /
|
|
{{ selectedNetwork.length ?? "-" }} m /
|
|
|
{{ selectedNetwork.diameter ?? "-" }} mm
|
|
{{ selectedNetwork.diameter ?? "-" }} mm
|
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
|
- <el-descriptions-item label="材质">{{
|
|
|
|
|
- selectedNetwork.material || "-"
|
|
|
|
|
- }}</el-descriptions-item>
|
|
|
|
|
|
|
+ <el-descriptions-item label="材质">
|
|
|
|
|
+ {{ getDictLabel(network_material, selectedNetwork.material) }}
|
|
|
|
|
+ </el-descriptions-item>
|
|
|
<el-descriptions-item label="建设日期">{{
|
|
<el-descriptions-item label="建设日期">{{
|
|
|
selectedNetwork.buildDate || "-"
|
|
selectedNetwork.buildDate || "-"
|
|
|
}}</el-descriptions-item>
|
|
}}</el-descriptions-item>
|
|
@@ -403,7 +403,21 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item label="材质" prop="material">
|
|
<el-form-item label="材质" prop="material">
|
|
|
- <el-input v-model="form.material" placeholder="请输入材质" />
|
|
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="form.material"
|
|
|
|
|
+ placeholder="请选择材质"
|
|
|
|
|
+ filterable
|
|
|
|
|
+ allow-create
|
|
|
|
|
+ default-first-option
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="dict in network_material"
|
|
|
|
|
+ :key="dict.value"
|
|
|
|
|
+ :label="dict.label"
|
|
|
|
|
+ :value="dict.value"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
@@ -459,6 +473,7 @@ import {
|
|
|
} from "@/api/pipeNetwork/pdeviceInform";
|
|
} from "@/api/pipeNetwork/pdeviceInform";
|
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
|
+const { network_material } = proxy.useDict("network_material");
|
|
|
|
|
|
|
|
const networkList = ref([]);
|
|
const networkList = ref([]);
|
|
|
const loading = ref(false);
|
|
const loading = ref(false);
|
|
@@ -487,6 +502,12 @@ function getNetworkTypeText(val) {
|
|
|
function getStatusText(val) {
|
|
function getStatusText(val) {
|
|
|
return statusMap[val] || val || "-";
|
|
return statusMap[val] || val || "-";
|
|
|
}
|
|
}
|
|
|
|
|
+// 字典值转名称(兼容历史自由文本材质)
|
|
|
|
|
+function getDictLabel(dictData, val) {
|
|
|
|
|
+ if (val == null || val === "") return "-";
|
|
|
|
|
+ const item = (dictData || []).find((d) => String(d.value) === String(val));
|
|
|
|
|
+ return item ? item.label : val;
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
const summary = reactive({
|
|
const summary = reactive({
|
|
|
totalNetworks: 0,
|
|
totalNetworks: 0,
|