ZaiZai 1 rok temu
rodzic
commit
4cba567748
1 zmienionych plików z 17 dodań i 2 usunięć
  1. 17 2
      src/views/exctab/element/web-temp.vue

+ 17 - 2
src/views/exctab/element/web-temp.vue

@@ -5,7 +5,7 @@
                 <hc-card scrollbar>
                     <template #header>
                         <div class="w-full">
-                            <el-select v-model="formModelName" filterable block placeholder="请选择清表模板">
+                            <el-select v-model="formModelName" filterable block placeholder="请选择清表模板" @change="formNameChange">
                                 <el-option v-for="item in excelData" :key="item.id" :label="item.wbsName" :value="item.id" />
                             </el-select>
                         </div>
@@ -79,7 +79,7 @@
 <script setup>
 import { ref, watch } from 'vue'
 import { getDictionaryData } from '~uti/tools'
-import { formValidate, getArrValue, getObjValue, isNullES } from 'js-fast-way'
+import { deepClone, formValidate, getArrValue, getObjValue, isNullES } from 'js-fast-way'
 import mainApi from '~api/exctab/exceltab'
 
 const props = defineProps({
@@ -140,6 +140,21 @@ const getWbsTypeList = async () => {
     excelData.value = getArrValue(data)
 }
 
+//清表模板被改变
+const formNameChange = () => {
+    isTreeMode.value = 5
+    filterText.value = ''
+    nodeTableData.value = []
+    formModel.value = {}
+    tabsKey.value = '1'
+    nodeInfo.value = {}
+    treeNodeIds.value = []
+    treeData.value = []
+    setTimeout(() => {
+        isTreeMode.value = 1
+    }, 200)
+}
+
 //树配置
 const treeRef1 = ref(null)
 const treeRef2 = ref(null)