Ver Fonte

自动获取数据改为多选

duy há 5 meses atrás
pai
commit
d98ea7e64e
1 ficheiros alterados com 5 adições e 9 exclusões
  1. 5 9
      src/views/data-fill/collapse-form/index.vue

+ 5 - 9
src/views/data-fill/collapse-form/index.vue

@@ -609,7 +609,7 @@
             label-position="left"
         >
             <el-form-item label="数据类型" prop="nodeType">
-                <el-select v-model="autoModal.type" block @change="autoChangeType">
+                <el-select v-model="autoModal.type" multiple block @change="autoChangeType">
                     <el-option
                         v-for="item in dataType"
                         :key="item.dictKey"
@@ -2087,12 +2087,8 @@ const getMajorDataTypeOptions = async () => {
 }
 const isShowNum = ref(false)
 const autoChangeType = (val)=>{
-  if (val === '8') {
-    isShowNum.value = true
 
-  } else {
-    isShowNum.value = false
-  }
+isShowNum.value = String(val).includes('8')
 }
 const autoSaveClick = async ()=>{
     const { KeyName, pkeyId } = tableFormItemNode.value
@@ -2101,11 +2097,11 @@ const autoSaveClick = async ()=>{
     let max
     let min
 
-     if (autoModal.value.type === '8' && !autoModal.value.customValue ) {
+     if (isShowNum.value && !autoModal.value.customValue ) {
         window.$message?.error('高程偏差/顶面偏差')
         return
     }
-    if (autoModal.value.type === '8' && autoModal.value?.customValue.length > 0) {
+    if (isShowNum.value && autoModal.value?.customValue.length > 0) {
 const values = autoModal.value.customValue.split('/')
 // 检查格式是否为 数字/数字
 if (values.length !== 2) {
@@ -2133,7 +2129,7 @@ max = values[1]
         {
             nodeId: treeId.value,
             pkeyId: pkeyId,
-            autoType:autoModal.value.type,
+            autoType:autoModal.value.type.join(','),
             max:max,
             min:min,
         },