duy 8 місяців тому
батько
коміт
72a946a7e9
1 змінених файлів з 17 додано та 16 видалено
  1. 17 16
      src/views/desk/wbs/drawer-wbs.vue

+ 17 - 16
src/views/desk/wbs/drawer-wbs.vue

@@ -349,7 +349,20 @@ watch(
 const isShow = defineModel('modelValue', {
     default: false,
 })
-
+//获取表单类型
+const tableTypelist = ref([])
+const getTableTypelist = async (type) => {
+    //计量管理,征拆划分,实验划分,WBS树管理,日志树管理
+    const types = [
+        'table_type',
+        'trial_table_type',
+        'table_type',
+        'table_type',
+        'table_type',
+    ]
+    const data = await getDictionaryData(types[type])
+    tableTypelist.value = getArrValue(data)
+}
 //监听数据
 const dataInfo = ref(props.data)
 
@@ -359,6 +372,7 @@ watch(
     (data) => {
         dataInfo.value = data
         wbsType.value = data.wbsType
+        getTableTypelist(Number(wbsType.value - 1))
     },
     { immediate: true, deep: true },
 )
@@ -369,7 +383,7 @@ watch(isShow, (val) => {
     getMajorList()
 
     getOwnerTypelist()
-    getTableTypelist(Number(wbsType.value - 1))
+ 
 })
 //渲染完成
 onMounted(() => {
@@ -601,20 +615,7 @@ const getTableData = async () => {
 
     tableData.value = res
 }
-//获取表单类型
-const tableTypelist = ref([])
-const getTableTypelist = async (type) => {
-    //计量管理,征拆划分,实验划分,WBS树管理,日志树管理
-    const types = [
-        'table_type',
-        'trial_table_type',
-        'table_type',
-        'table_type',
-        'table_type',
-    ]
-    const data = await getDictionaryData(types[type])
-    tableTypelist.value = getArrValue(data)
-}
+
 const ownerTypeList = ref([])
 const getOwnerTypelist = async () => {
     const data = await getDictionaryData('owner_type')