From 4041ef323765aeaad7fa100557e9a84b4be97521 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Fri, 29 Aug 2025 16:31:25 +0800
Subject: [PATCH] feat:参数修改

---
 src/views/resource/patchTypeManagement.vue |   43 +++++++++++++++++++++++--------------------
 1 files changed, 23 insertions(+), 20 deletions(-)

diff --git a/src/views/resource/patchTypeManagement.vue b/src/views/resource/patchTypeManagement.vue
index 221278f..252ce0f 100644
--- a/src/views/resource/patchTypeManagement.vue
+++ b/src/views/resource/patchTypeManagement.vue
@@ -21,20 +21,19 @@
 </template>
 
 <script setup>
-
-import {listOfSpotTypesApi,spotTypesCreateApi,editSpotTypeApi,deleteSpotTypeApi} from '@/api/patchManagement/index'
+import {searchManagementApi,listOfSpotTypesApi,spotTypesCreateApi,editSpotTypeApi,deleteSpotTypeApi} from '@/api/patchManagement/index'
 import { ref, computed, watch } from 'vue'
-import { getListPage, getDetail, add, remove, enable, disable } from '@/api/resource/oss'
+import { enable, disable } from '@/api/resource/oss'
 import { useStore } from 'vuex'
 import func from '@/utils/func'
 import { useRouter } from 'vue-router'
 import { ElMessage, ElMessageBox, ElLoading } from 'element-plus';
 const store = useStore()
 const router = useRouter()
-
 // ---------------- data ----------------
 const form = ref({})
 const query = ref({})
+const creatorOption = ref([]);
 const loading = ref(true)
 const page = ref({
   pageSize: 20,
@@ -43,7 +42,6 @@
   lotValue:"",
   userName:''
 })
-
 const selectionList = ref([])
 const option = ref({
   addBtn: true,
@@ -52,7 +50,7 @@
   searchShow: true,
   searchMenuSpan: 16,
   searchMenuPosition: 'right',
-  border: true,
+  border: true,    
   index: true,
   selection: true,
   grid: false,
@@ -92,6 +90,12 @@
        addDisplay: false, 
        editDisplay: false,
       searchSpan: 4,
+       type: 'select',
+      dicData: creatorOption,
+      props: {
+        label: 'label',
+        value: 'value',
+      },
       rules: [
         { required: true, message: '请输入创建人', trigger: 'blur' },
       ],
@@ -100,7 +104,16 @@
 })
 
 const data = ref([])
-
+// 获取搜索数据
+const getsearchManagementApi = () => {
+  searchManagementApi().then(res => {
+   creatorOption.value = res.data.data.user_names.map(item => ({
+      label: item,
+      value: item,
+    }));
+   
+  });
+};
 
 
 // ---------------- watch ----------------
@@ -186,8 +199,6 @@
 }
 
 const searchChange = (params, done) => {
-console.log('params',params);
-
   page.value.currentPage = 1
   page.value.lotValue = params.patches_type
   page.value.userName = params.user_name
@@ -265,8 +276,6 @@
   loading.value = true
   listOfSpotTypesApi(searchparams).then(res => {
     const resData = res.data.data
-    console.log('列表',resData.records);
-    
     page.value.total = resData.total
     data.value = resData.records
     loading.value = false
@@ -279,20 +288,14 @@
   router.push({ path: '/resource/patchManagement' })
 }
 
-const addPatchType = () => {
-  // TODO: 新增图斑类型逻辑
-}
-
 // ---------------- utils ----------------
 function validData (value) {
   return value !== undefined && value !== null && value !== false
 }
 
-function findObject (list, prop) {
-  return list.find(item => item.prop === prop)
-}
-
-const crudRef = ref(null)
+onMounted(() => {
+  getsearchManagementApi();
+});
 </script>
 
 <style scoped lang="scss"></style>
\ No newline at end of file

--
Gitblit v1.9.3