|
@@ -194,7 +194,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="节点类型">
|
|
|
<el-select v-model="formEditNodeModel.type" block disabled>
|
|
|
- <el-option v-for="item in nodeTypeData" :key="item.value" :label="item.label" :value="item.value"/>
|
|
|
+ <el-option v-for="item in nodeTypeData" :label="item.label" :value="item.value"/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="划分编号">
|
|
@@ -358,6 +358,7 @@ watch(() => [
|
|
|
onMounted(()=> {
|
|
|
treeLoading.value = typeName === 'tree';
|
|
|
setContractType(contractInfo.value?.contractType)
|
|
|
+ getDictionaryApi()
|
|
|
})
|
|
|
|
|
|
//身份按钮切换数据
|
|
@@ -545,7 +546,6 @@ const setTreeMenuDataClick = ({key,node,data}) => {
|
|
|
if (key === 'mark' || key === 'cancel_mark') {
|
|
|
firstItemBox()
|
|
|
} else if (key === 'edit') {
|
|
|
- getDictionaryApi(data?.type)
|
|
|
if (tabKey === 'tree') {
|
|
|
const parent = deepClone(node?.parent?.data || {})
|
|
|
formEditNodeModel.value = {...deepClone(data), parent: parent}
|
|
@@ -594,13 +594,7 @@ const setTreeMenuDataClick = ({key,node,data}) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-//获取节点类型
|
|
|
-const getDictionaryApi = async (type) => {
|
|
|
- const { error, code, data } = await getDictionary({
|
|
|
- wbs_node_type: type,
|
|
|
- })
|
|
|
- console.log(data)
|
|
|
-}
|
|
|
+
|
|
|
|
|
|
//上传前
|
|
|
const loadingReactive = ref(null)
|
|
@@ -674,14 +668,25 @@ const firstItemHttp = async (info) => {
|
|
|
|
|
|
//编辑节点
|
|
|
const editNodeModal = ref(false)
|
|
|
-const nodeTypeData = ref([
|
|
|
- {label: "单位工程", value: 1},
|
|
|
- {label: "分项工程", value: 2},
|
|
|
- {label: "子分项工程", value: 3},
|
|
|
- {label: "分部工程", value: 4},
|
|
|
- {label: "子分部工程", value: 5},
|
|
|
- {label: "工序", value: 6},
|
|
|
-])
|
|
|
+
|
|
|
+//获取节点类型
|
|
|
+const nodeTypeData = ref([])
|
|
|
+const getDictionaryApi = async () => {
|
|
|
+ const { data } = await getDictionary({
|
|
|
+ code: 'wbs_node_type'
|
|
|
+ })
|
|
|
+ //处理数据
|
|
|
+ let newArr = []
|
|
|
+ const newData = getArrValue(data)
|
|
|
+ for (let i = 0; i < newData.length; i++) {
|
|
|
+ newArr.push({
|
|
|
+ label: newData[i]['dictValue'],
|
|
|
+ value: Number(newData[i]['dictKey']),
|
|
|
+ })
|
|
|
+ }
|
|
|
+ nodeTypeData.value = newArr
|
|
|
+}
|
|
|
+
|
|
|
const formEditNodeRef = ref(null)
|
|
|
const formEditNodeModel = ref({})
|
|
|
const formEditNodeRules = {
|