Browse Source

设置自动获取数据

duy 6 months ago
parent
commit
dbd0a8ccef
1 changed files with 10 additions and 3 deletions
  1. 10 3
      src/views/data-fill/collapse-form/index.vue

+ 10 - 3
src/views/data-fill/collapse-form/index.vue

@@ -604,9 +604,9 @@
                 <el-select v-model="autoModal.type" block>
                     <el-option
                         v-for="item in dataType"
-                        :key="item.value"
-                        :label="item.label"
-                        :value="item.value"
+                        :key="item.dictKey"
+                        :label="item.dictValue"
+                        :value="item.dictKey"
                     />
                 </el-select>
             </el-form-item>
@@ -637,6 +637,7 @@ import HcFormula from './formula.vue'
 import HcCopy from './test-copy.vue'
 import NoDataSvg from '~src/assets/view/no-data.svg'
 import HcWater from './water.vue'
+import { getDictionary } from '~api/other'
 import {
     arrIndex,
     deepClone,
@@ -1038,6 +1039,7 @@ const handleMenuSelect = async ({ key }) => {
     } else if (key === 'auto') {
         console.log('自动获取数据')
         autoModalDialog.value = true
+        getMajorDataTypeOptions()
     }
 }
 
@@ -2054,6 +2056,11 @@ const autoModal = ref({
     type:'',
 })
 const dataType = ref([])
+const getMajorDataTypeOptions = async () => {
+    const { data } = await getDictionary({ code:'auto_retrieve' })
+    dataType.value = data
+   
+}
 const autoSaveClick = ()=>{
     
 }