From df90c0c5cfa4de114798015b92120ad8ba8b4826 Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期五, 22 十一月 2024 10:45:40 +0800
Subject: [PATCH] MEASURE_VALUE_TYPE

---
 src/views/data/plan/item/ItemForm.vue |   20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/src/views/data/plan/item/ItemForm.vue b/src/views/data/plan/item/ItemForm.vue
index 97257c2..559432d 100644
--- a/src/views/data/plan/item/ItemForm.vue
+++ b/src/views/data/plan/item/ItemForm.vue
@@ -48,7 +48,9 @@
       <el-row>
         <el-col :span="12">
           <el-form-item label="数据集" prop="dataSet">
-            <el-select v-model="formData.dataSet" clearable placeholder="请选择数据集" @change="handleDataSetChange($event)">
+            <el-select v-model="formData.dataSet" clearable placeholder="请选择数据集"
+                       filterable
+                       @change="handleDataSetChange($event)">
               <el-option
                 v-for="item in dataSetList"
                 :key="item.id"
@@ -73,15 +75,15 @@
 <script lang="ts" setup>
 import {DICT_TYPE, getIntDictOptions, getStrDictOptions} from '@/utils/dict'
 import * as ItemApi from '@/api/data/plan/item'
-import { CommonStatusEnum } from '@/utils/constants'
+import {CommonStatusEnum} from '@/utils/constants'
 import * as DataSetApi from "@/api/data/plan/data";
 import * as CategoryApi from "@/api/data/plan/category";
 import {defaultProps} from "@/api/data/plan/category";
 import {handleTree} from "@/utils/tree";
 
-defineOptions({ name: 'PlanItemForm' })
+defineOptions({name: 'PlanItemForm'})
 
-const { t } = useI18n() // 国际化
+const {t} = useI18n() // 国际化
 const message = useMessage() // 消息弹窗
 
 const dialogVisible = ref(false) // 弹窗的是否展示
@@ -99,9 +101,9 @@
   status: undefined,
 })
 const formRules = reactive({
-  itemName: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
-  itemCategory: [{ required: true, message: '分类不能为空', trigger: 'blur' }],
-  dataSet: [{ required: true, message: '数据集不能为空', trigger: 'change' }]
+  itemName: [{required: true, message: '名称不能为空', trigger: 'blur'}],
+  itemCategory: [{required: true, message: '分类不能为空', trigger: 'blur'}],
+  dataSet: [{required: true, message: '数据集不能为空', trigger: 'change'}]
 })
 const formRef = ref() // 表单 Ref
 const dataSetList = ref([] as DataSetApi.DataSetVO[])
@@ -110,7 +112,7 @@
 const getCategoryTree = async () => {
   categoryTree.value = []
   const res = await CategoryApi.getCategoryListAllSimple()
-  let category: Tree = { id: 0, label: '主类目', children: [] }
+  let category: Tree = {id: 0, label: '主类目', children: []}
   category.children = handleTree(res, 'id', 'pid')
   categoryTree.value.push(category)
 }
@@ -135,7 +137,7 @@
     }
   }
 }
-defineExpose({ open }) // 提供 open 方法,用于打开弹窗
+defineExpose({open}) // 提供 open 方法,用于打开弹窗
 
 /** 提交表单 */
 const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调

--
Gitblit v1.9.3