|
@@ -16,13 +16,13 @@
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="节点类型:">
|
|
|
<el-select v-model="formModel.nodeType" placeholder="节点类型" block>
|
|
|
- <el-option label="单位工程" :value="1" />
|
|
|
+ <el-option v-for="item in nodeOptions" :key="item.id" :label="item.dictValue" :value="item.dictKey" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="工程类型:">
|
|
|
- <el-select v-model="formModel.engineeringType" placeholder="工程类型" disabled block>
|
|
|
+ <el-select v-model="formModel.engineeringTypeName" placeholder="工程类型" disabled block>
|
|
|
<el-option label="总则" :value="1" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -114,6 +114,8 @@ import { ref, watch } from 'vue'
|
|
|
import AddCheckList from './addCheckList.vue'
|
|
|
import unitApi from '~api/project/debit/contract/unit.js'
|
|
|
import { useAppStore } from '~src/store'
|
|
|
+import { getDictionary } from '~api/other'
|
|
|
+import { getArrValue } from 'js-fast-way'
|
|
|
|
|
|
const props = defineProps({
|
|
|
ids: {
|
|
@@ -152,6 +154,17 @@ const tableRowStyle = ({ row, rowIndex }) => {
|
|
|
return '--el-fill-color-lighter: #fe0000; --el-table-row-hover-bg-color: #fe0000; color: white;'
|
|
|
}
|
|
|
}
|
|
|
+//获节点类型
|
|
|
+const nodeOptions = ref([])
|
|
|
+const getNodeType = async () => {
|
|
|
+ const { data } = await getDictionary({
|
|
|
+ code: 'meter_node_type',
|
|
|
+ })
|
|
|
+ nodeOptions.value = getArrValue(data)
|
|
|
+ nodeOptions.value.forEach((ele)=>{
|
|
|
+ ele.dictKey = Number(ele.dictKey)
|
|
|
+ })
|
|
|
+}
|
|
|
//监听
|
|
|
watch(() => [
|
|
|
props.ids,
|
|
@@ -169,6 +182,7 @@ watch(() => [
|
|
|
watch(isShow, (val) => {
|
|
|
if (val) {
|
|
|
console.log('isShow', val)
|
|
|
+ getNodeType()
|
|
|
}
|
|
|
})
|
|
|
|