From f0d048fa2cba4f52066e14d1d31e4f7a2c7a9530 Mon Sep 17 00:00:00 2001
From: hdy <1105738590@qq.com>
Date: 星期三, 12 三月 2025 09:05:57 +0800
Subject: [PATCH] 新增导入功能

---
 billion-ui/src/views/main/sc/opcConf/index.vue |   68 +++++++++++++++++----------------
 1 files changed, 35 insertions(+), 33 deletions(-)

diff --git a/billion-ui/src/views/main/sc/opcConf/index.vue b/billion-ui/src/views/main/sc/opcConf/index.vue
index 81bc419..24edab3 100644
--- a/billion-ui/src/views/main/sc/opcConf/index.vue
+++ b/billion-ui/src/views/main/sc/opcConf/index.vue
@@ -26,12 +26,24 @@
         />
       </el-form-item>
       <el-form-item label="閲囬泦绫诲瀷" prop="type">
-        <el-input
-          v-model="queryParams.node"
-          placeholder="璇疯緭鍏ラ噰闆嗙被鍨�"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
+        <el-select v-model="queryParams.type" placeholder="璇烽�夋嫨璁㈤槄鐘舵��" clearable>
+          <el-option
+            v-for="dict in dict.type.collection_type"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="璁㈤槄" prop="subscribe">
+        <el-select v-model="queryParams.subscribe" placeholder="璇烽�夋嫨璁㈤槄鐘舵��" clearable>
+          <el-option
+            v-for="dict in dict.type.sys_yes_no"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
       </el-form-item>
 
       <el-form-item style="float: right" >
@@ -85,7 +97,6 @@
           v-hasPermi="['sc:opcConf:export']"
         >瀵煎嚭</el-button>
       </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" border :data="opcConfList" @selection-change="handleSelectionChange">
@@ -93,32 +104,14 @@
       <el-table-column label="宸ヤ綅缂栫爜" align="center" prop="locationCode" />
       <el-table-column label="宸ヤ綅鍚嶇О" align="center" prop="locationName" />
       <el-table-column label="鍦板潃" align="center" prop="node" />
-      <el-table-column label="閲囬泦绫诲瀷" align="center" prop="type" />
+      <el-table-column label="閲囬泦绫诲瀷" align="center" prop="type" >
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.collection_type" :value="scope.row.type"/>
+        </template>
+      </el-table-column>
       <el-table-column label="鏄惁璁㈤槄" align="center" prop="subscribe" >
         <template slot-scope="scope">
           <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.subscribe"/>
-        </template>
-      </el-table-column>
-      <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
-        <template slot-scope="scope">
-          <el-button
-            size="mini"
-            style="width: 72px"
-            type="success"
-            plain
-            icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['sc:opcConf:edit']"
-          >淇敼</el-button>
-          <el-button
-            size="mini"
-            style="width: 72px"
-            type="danger"
-            plain
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['sc:opcConf:remove']"
-          >鍒犻櫎</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -144,7 +137,14 @@
           <el-input v-model="form.node" placeholder="璇疯緭鍏ュ湴鍧�" />
         </el-form-item>
         <el-form-item label="閲囬泦绫诲瀷" prop="type">
-          <el-input v-model="form.type" placeholder="璇疯緭鍏ラ噰闆嗙被鍨�" />
+          <el-select v-model="form.type" placeholder="璇烽�夋嫨閲囬泦绫诲瀷" >
+            <el-option
+              v-for="dict in dict.type.collection_type"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            />
+          </el-select>
         </el-form-item>
         <el-form-item label="鏄惁璁㈤槄" prop="subscribe">
           <el-radio-group v-model="form.subscribe">
@@ -169,7 +169,7 @@
 
 export default {
   name: "OpcConf",
-  dicts: ['sys_yes_no'],
+  dicts: ['sys_yes_no','collection_type'],
   data() {
     return {
       advancedSearchVisible: false,
@@ -212,9 +212,11 @@
         locationName: [
           { required: true, message: "宸ヤ綅鍚嶇О涓嶈兘涓虹┖", trigger: "blur" },
         ],
+        subscribe: [
+          { required: true, message: "璁㈤槄涓嶈兘涓虹┖", trigger: "blur" },
+        ],
         node: [
           { required: true, message: "鍦板潃涓嶈兘涓虹┖", trigger: "blur" },
-          { pattern: /^[a-zA-Z0-9]*$/, message: "鍦板潃涓嶈兘鍖呭惈涓枃瀛楃", trigger: "blur" }
         ],
       }
     };

--
Gitblit v1.9.3