From f4691010c2651a337c47c2fa8cf1d527b12f9737 Mon Sep 17 00:00:00 2001
From: hdy <1105738590@qq.com>
Date: 星期五, 22 十一月 2024 10:08:05 +0800
Subject: [PATCH] 参数采集配置界面优化

---
 billion-ui/src/views/main/sc/opcConf/index.vue             |    1 
 billion-ui/src/views/main/sc/collectionParamConf/index.vue |  187 +++++++++++++++++++---------------------------
 2 files changed, 78 insertions(+), 110 deletions(-)

diff --git a/billion-ui/src/views/main/sc/collectionParamConf/index.vue b/billion-ui/src/views/main/sc/collectionParamConf/index.vue
index 58d0cbe..e7b8724 100644
--- a/billion-ui/src/views/main/sc/collectionParamConf/index.vue
+++ b/billion-ui/src/views/main/sc/collectionParamConf/index.vue
@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="浜у搧缂栫爜" prop="productCode">
+      <el-form-item label-width="75px" label="浜у搧缂栫爜" prop="productCode">
         <el-input
           v-model="queryParams.productCode"
           placeholder="璇疯緭鍏ヤ骇鍝佺紪鐮�"
@@ -9,7 +9,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="宸ヤ綅缂栫爜" prop="locationCode">
+      <el-form-item  label="宸ヤ綅缂栫爜" prop="locationCode">
         <el-input
           v-model="queryParams.locationCode"
           placeholder="璇疯緭鍏ュ伐浣嶇紪鐮�"
@@ -17,39 +17,8 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="鍙傛暟缂栫爜" prop="paramCode">
-        <el-input
-          v-model="queryParams.paramCode"
-          placeholder="璇疯緭鍏ュ弬鏁扮紪鐮�"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="鍙傛暟鍚嶇О" prop="paramName">
-        <el-input
-          v-model="queryParams.paramName"
-          placeholder="璇疯緭鍏ュ弬鏁板悕绉�"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="鍙傛暟闆嗙紪鐮�" prop="paramSetCode">
-        <el-input
-          v-model="queryParams.paramSetCode"
-          placeholder="璇疯緭鍏ュ弬鏁伴泦缂栫爜"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="鍙傛暟闆嗗悕绉�" prop="paramSetName">
-        <el-input
-          v-model="queryParams.paramSetName"
-          placeholder="璇疯緭鍏ュ弬鏁伴泦鍚嶇О"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="閲囬泦鍦板潃" prop="node">
+
+      <el-form-item  label="閲囬泦鍦板潃" prop="node">
         <el-input
           v-model="queryParams.node"
           placeholder="璇疯緭鍏ラ噰闆嗗湴鍧�"
@@ -57,58 +26,47 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="鍗曚綅" prop="unit">
-        <el-input
-          v-model="queryParams.unit"
-          placeholder="璇疯緭鍏ュ崟浣�"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="涓婇檺鍊�" prop="paramUpper">
-        <el-input
-          v-model="queryParams.paramUpper"
-          placeholder="璇疯緭鍏ヤ笂闄愬��"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="涓嬮檺鍊�" prop="paramLower">
-        <el-input
-          v-model="queryParams.paramLower"
-          placeholder="璇疯緭鍏ヤ笅闄愬��"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="涓績鍊�" prop="paramCentral">
-        <el-input
-          v-model="queryParams.paramCentral"
-          placeholder="璇疯緭鍏ヤ腑蹇冨��"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="鏄剧ず椤哄簭" prop="orderNum">
-        <el-input
-          v-model="queryParams.orderNum"
-          placeholder="璇疯緭鍏ユ樉绀洪『搴�"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="鏄惁璁㈤槄" prop="subscribe">
-        <el-input
-          v-model="queryParams.subscribe"
-          placeholder="璇疯緭鍏ユ槸鍚﹁闃�"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item>
+      <el-form-item style="float: right">
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button>
+         <el-button icon="el-icon-setting" size="mini" @click="toggleAdvancedSearch">楂樼骇鏌ヨ</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button>
       </el-form-item>
+      <transition name="fade">
+        <div v-if="advancedSearchVisible" class="advanced-search">
+          <el-form-item label="鍙傛暟缂栫爜" prop="paramCode">
+            <el-input
+              v-model="queryParams.paramCode"
+              placeholder="璇疯緭鍏ュ弬鏁扮紪鐮�"
+              clearable
+              @keyup.enter.native="handleQuery"
+            />
+          </el-form-item>
+          <el-form-item label="鍙傛暟鍚嶇О" prop="paramName">
+            <el-input
+              v-model="queryParams.paramName"
+              placeholder="璇疯緭鍏ュ弬鏁板悕绉�"
+              clearable
+              @keyup.enter.native="handleQuery"
+            />
+          </el-form-item>
+          <el-form-item label-width="90px" label="鍙傛暟闆嗙紪鐮�" prop="paramSetCode">
+            <el-input
+              v-model="queryParams.paramSetCode"
+              placeholder="璇疯緭鍏ュ弬鏁伴泦缂栫爜"
+              clearable
+              @keyup.enter.native="handleQuery"
+            />
+          </el-form-item>
+          <el-form-item label-width="90px" label="鍙傛暟闆嗗悕绉�" prop="paramSetName">
+            <el-input
+              v-model="queryParams.paramSetName"
+              placeholder="璇疯緭鍏ュ弬鏁伴泦鍚嶇О"
+              clearable
+              @keyup.enter.native="handleQuery"
+            />
+          </el-form-item>
+        </div>
+      </transition>
     </el-form>
 
     <el-row :gutter="10" class="mb8">
@@ -157,9 +115,8 @@
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="collectionParamConfList" @selection-change="handleSelectionChange">
+    <el-table v-loading="loading" border :data="collectionParamConfList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="涓婚敭id" align="center" prop="id" />
       <el-table-column label="浜у搧缂栫爜" align="center" prop="productCode" />
       <el-table-column label="浜у搧鍨嬪彿" align="center" prop="productType" />
       <el-table-column label="宸ヤ綅缂栫爜" align="center" prop="locationCode" />
@@ -173,20 +130,27 @@
       <el-table-column label="涓婇檺鍊�" align="center" prop="paramUpper" />
       <el-table-column label="涓嬮檺鍊�" align="center" prop="paramLower" />
       <el-table-column label="涓績鍊�" align="center" prop="paramCentral" />
-      <el-table-column label="鏄剧ず椤哄簭" align="center" prop="orderNum" />
-      <el-table-column label="鏄惁璁㈤槄" align="center" prop="subscribe" />
-      <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
+      <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 width="200px" label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
             size="mini"
-            type="text"
+            style="width: 72px"
+            type="success"
+            plain
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['sc:collectionParamConf:edit']"
           >淇敼</el-button>
           <el-button
             size="mini"
-            type="text"
+            style="width: 72px"
+            type="danger"
+            plain
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['sc:collectionParamConf:remove']"
@@ -206,47 +170,47 @@
     <!-- 娣诲姞鎴栦慨鏀瑰弬鏁伴噰闆嗛厤缃璇濇 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="浜у搧缂栫爜" prop="productCode">
+        <el-form-item label-width="90px" label="浜у搧缂栫爜" prop="productCode">
           <el-input v-model="form.productCode" placeholder="璇疯緭鍏ヤ骇鍝佺紪鐮�" />
         </el-form-item>
-        <el-form-item label="宸ヤ綅缂栫爜" prop="locationCode">
+        <el-form-item label-width="90px" label="宸ヤ綅缂栫爜" prop="locationCode">
           <el-input v-model="form.locationCode" placeholder="璇疯緭鍏ュ伐浣嶇紪鐮�" />
         </el-form-item>
-        <el-form-item label="鍙傛暟缂栫爜" prop="paramCode">
+        <el-form-item label-width="90px" label="鍙傛暟缂栫爜" prop="paramCode">
           <el-input v-model="form.paramCode" placeholder="璇疯緭鍏ュ弬鏁扮紪鐮�" />
         </el-form-item>
-        <el-form-item label="鍙傛暟鍚嶇О" prop="paramName">
+        <el-form-item label-width="90px" label="鍙傛暟鍚嶇О" prop="paramName">
           <el-input v-model="form.paramName" placeholder="璇疯緭鍏ュ弬鏁板悕绉�" />
         </el-form-item>
-        <el-form-item label="鍙傛暟闆嗙紪鐮�" prop="paramSetCode">
+        <el-form-item label-width="90px" label="鍙傛暟闆嗙紪鐮�" prop="paramSetCode">
           <el-input v-model="form.paramSetCode" placeholder="璇疯緭鍏ュ弬鏁伴泦缂栫爜" />
         </el-form-item>
-        <el-form-item label="鍙傛暟闆嗗悕绉�" prop="paramSetName">
+        <el-form-item label-width="90px" label="鍙傛暟闆嗗悕绉�" prop="paramSetName">
           <el-input v-model="form.paramSetName" placeholder="璇疯緭鍏ュ弬鏁伴泦鍚嶇О" />
         </el-form-item>
-        <el-form-item label="閲囬泦鍦板潃" prop="node">
+        <el-form-item label-width="90px" label="閲囬泦鍦板潃" prop="node">
           <el-input v-model="form.node" placeholder="璇疯緭鍏ラ噰闆嗗湴鍧�" />
         </el-form-item>
-        <el-form-item label="鍗曚綅" prop="unit">
+        <el-form-item label-width="90px" label="鍗曚綅" prop="unit">
           <el-input v-model="form.unit" placeholder="璇疯緭鍏ュ崟浣�" />
         </el-form-item>
-        <el-form-item label="涓婇檺鍊�" prop="paramUpper">
+        <el-form-item label-width="90px" label="涓婇檺鍊�" prop="paramUpper">
           <el-input v-model="form.paramUpper" placeholder="璇疯緭鍏ヤ笂闄愬��" />
         </el-form-item>
-        <el-form-item label="涓嬮檺鍊�" prop="paramLower">
+        <el-form-item label-width="90px" label="涓嬮檺鍊�" prop="paramLower">
           <el-input v-model="form.paramLower" placeholder="璇疯緭鍏ヤ笅闄愬��" />
         </el-form-item>
-        <el-form-item label="涓績鍊�" prop="paramCentral">
+        <el-form-item label-width="90px" label="涓績鍊�" prop="paramCentral">
           <el-input v-model="form.paramCentral" placeholder="璇疯緭鍏ヤ腑蹇冨��" />
         </el-form-item>
-        <el-form-item label="鏄剧ず椤哄簭" prop="orderNum">
-          <el-input v-model="form.orderNum" placeholder="璇疯緭鍏ユ樉绀洪『搴�" />
-        </el-form-item>
         <el-form-item label="鏄惁璁㈤槄" prop="subscribe">
-          <el-input v-model="form.subscribe" placeholder="璇疯緭鍏ユ槸鍚﹁闃�" />
-        </el-form-item>
-        <el-form-item label="鍒犻櫎鏍囧織" prop="delFlag">
-          <el-input v-model="form.delFlag" placeholder="璇疯緭鍏ュ垹闄ゆ爣蹇�" />
+          <el-radio-group v-model="form.subscribe">
+            <el-radio
+              v-for="dict in dict.type.sys_yes_no"
+              :key="dict.value"
+              :label="dict.value"
+            >{{dict.label}}</el-radio>
+          </el-radio-group>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -262,8 +226,10 @@
 
 export default {
   name: "CollectionParamConf",
+  dicts: ['sys_yes_no'],
   data() {
     return {
+      advancedSearchVisible: false,
       // 閬僵灞�
       loading: true,
       // 閫変腑鏁扮粍
@@ -313,6 +279,9 @@
     this.getList();
   },
   methods: {
+    toggleAdvancedSearch() {
+      this.advancedSearchVisible = !this.advancedSearchVisible;
+    },
     /** 鏌ヨ鍙傛暟閲囬泦閰嶇疆鍒楄〃 */
     getList() {
       this.loading = true;
diff --git a/billion-ui/src/views/main/sc/opcConf/index.vue b/billion-ui/src/views/main/sc/opcConf/index.vue
index 24c30b2..81bc419 100644
--- a/billion-ui/src/views/main/sc/opcConf/index.vue
+++ b/billion-ui/src/views/main/sc/opcConf/index.vue
@@ -225,7 +225,6 @@
   methods: {
     toggleAdvancedSearch() {
       this.advancedSearchVisible = !this.advancedSearchVisible;
-
     },
     /** 鏌ヨOPC浜や簰閰嶇疆鍒楄〃 */
     getList() {

--
Gitblit v1.9.3