From 2c65c31aceb16c1d06c692266e3fb555ecafdfb5 Mon Sep 17 00:00:00 2001
From: wujian <14790700720@163.com>
Date: 星期三, 23 十月 2024 09:10:47 +0800
Subject: [PATCH] change-4

---
 jcdm-ui/src/views/main/da/collectionParamConf/index.vue |  159 +++++++++++++++++++++++++++-------------------------
 1 files changed, 83 insertions(+), 76 deletions(-)

diff --git a/jcdm-ui/src/views/main/da/collectionParamConf/index.vue b/jcdm-ui/src/views/main/da/collectionParamConf/index.vue
index e927a1d..85f94aa 100644
--- a/jcdm-ui/src/views/main/da/collectionParamConf/index.vue
+++ b/jcdm-ui/src/views/main/da/collectionParamConf/index.vue
@@ -10,56 +10,6 @@
               @keyup.enter.native="handleQuery"
             />
           </el-form-item>
-<!--          <el-form-item label="鍙傛暟闆嗙紪鐮�" prop="parameterSetCode">-->
-<!--            <el-input-->
-<!--              v-model="queryParams.parameterSetCode"-->
-<!--              placeholder="璇疯緭鍏ュ弬鏁伴泦缂栫爜"-->
-<!--              clearable-->
-<!--              @keyup.enter.native="handleQuery"-->
-<!--            />-->
-<!--          </el-form-item>-->
-<!--          <el-form-item label="鍙傛暟闆嗗悕绉�" prop="parameterSetName">-->
-<!--            <el-input-->
-<!--              v-model="queryParams.parameterSetName"-->
-<!--              placeholder="璇疯緭鍏ュ弬鏁伴泦鍚嶇О"-->
-<!--              clearable-->
-<!--              @keyup.enter.native="handleQuery"-->
-<!--            />-->
-<!--          </el-form-item>-->
-<!--          <el-form-item label="閲囬泦鍙傛暟ID" prop="collectParameterId">-->
-<!--            <el-input-->
-<!--              v-model="queryParams.collectParameterId"-->
-<!--              placeholder="璇疯緭鍏ラ噰闆嗗弬鏁癐D"-->
-<!--              clearable-->
-<!--              @keyup.enter.native="handleQuery"-->
-<!--            />-->
-<!--          </el-form-item>-->
-<!--          <el-form-item label="閲囬泦鍙傛暟鍚嶇О" prop="collectParameterName">-->
-<!--            <el-input-->
-<!--              v-model="queryParams.collectParameterName"-->
-<!--              placeholder="璇疯緭鍏ラ噰闆嗗弬鏁板悕绉�"-->
-<!--              clearable-->
-<!--              @keyup.enter.native="handleQuery"-->
-<!--            />-->
-<!--          </el-form-item>-->
-<!--          <el-form-item label="鏄惁浣滀负瀵规瘮鍙傛暟" prop="contrastParameterFlag">-->
-<!--            <el-input-->
-<!--              v-model="queryParams.contrastParameterFlag"-->
-<!--              placeholder="璇疯緭鍏ユ槸鍚︿綔涓哄姣斿弬鏁�"-->
-<!--              clearable-->
-<!--              @keyup.enter.native="handleQuery"-->
-<!--            />-->
-<!--          </el-form-item>-->
-<!--          <el-form-item label="閲囬泦鍙傛暟绫诲瀷" prop="collectParameterType">-->
-<!--            <el-select v-model="queryParams.collectParameterType" placeholder="璇烽�夋嫨閲囬泦鍙傛暟绫诲瀷" clearable>-->
-<!--              <el-option-->
-<!--                v-for="dict in dict.type.${dictType}"-->
-<!--                :key="dict.value"-->
-<!--                :label="dict.label"-->
-<!--                :value="dict.value"-->
-<!--              />-->
-<!--            </el-select>-->
-<!--          </el-form-item>-->
           <el-form-item label="浜у搧缂栫爜" prop="productCode">
             <el-input
               v-model="queryParams.productCode"
@@ -137,8 +87,7 @@
           </el-table-column>
           <el-table-column label="鍙傛暟鍚嶇О" align="center" width="160" prop="collectParameterName">
           </el-table-column>
-<!--          <el-table-column label="鏄惁浣滀负瀵规瘮鍙傛暟" align="center" prop="contrastParameterFlag">-->
-<!--          </el-table-column>-->
+
 
           <el-table-column label="閲囬泦鍦板潃" align="center" width="180" prop="gatherAddress">
           </el-table-column>
@@ -149,8 +98,7 @@
           </el-table-column>
           <el-table-column label="鍗曚綅" align="center" width="80" prop="collectParameterUnit">
           </el-table-column>
-<!--          <el-table-column label="鏁版嵁鎻忚堪" align="center" width="160" prop="Descriptives">
-          </el-table-column>-->
+
           <el-table-column label="涓婇檺鍊�" align="center" prop="paramUpper">
           </el-table-column>
           <el-table-column label="涓嬮檺鍊�" align="center" prop="paramLower">
@@ -160,14 +108,12 @@
 
           <el-table-column label="澶囨敞" align="center" width="160" prop="remarks">
           </el-table-column>
-          <el-table-column label="鍒涘缓鐢ㄦ埛" align="center" prop="createUser">
+          <el-table-column label="鏄惁浣滀负閲囬泦鍙傛暟绫诲瀷" align="center" width="160" prop="contrastParameterFlag">
+            <template slot-scope="scope">
+              <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.contrastParameterFlag"/>
+            </template>
           </el-table-column>
-          <el-table-column label="鍒涘缓鏃堕棿" align="center" width="160" prop="createTime">
-          </el-table-column>
-          <el-table-column label="鏇存敼鐢ㄦ埛" align="center" prop="updateUser">
-          </el-table-column>
-          <el-table-column label="鏇存敼鏃堕棿" align="center" width="160" prop="updateTime">
-          </el-table-column>
+
           <el-table-column fixed="right" width="200" label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
             <template slot-scope="scope">
               <el-button
@@ -202,14 +148,21 @@
     />
 
     <!-- 娣诲姞鎴栦慨鏀归噰闆嗗弬鏁伴厤缃璇濇 -->
-    <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="700px" append-to-body>
+    <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="1000px" append-to-body>
       <span slot="title">
         <i class="el-icon-s-order"></i>
         {{titleName}}
       </span>
-      <el-form ref="form" inline :model="form" :rules="rules" label-width="120px">
+      <el-form ref="form" inline :model="form" :rules="rules"  label-width="200px" >
         <el-form-item label="宸ュ簭缂栧彿" prop="processesCode">
-          <el-input v-model="form.processesCode" placeholder="璇疯緭鍏ュ伐搴忕紪鍙�" />
+          <el-select style="width: 100%" @change="handleSelectChangeprocessesCode(form.processesCode)" v-model="form.processesCode" placeholder="璇烽�夋嫨宸ュ簭缂栧彿">
+            <el-option
+              v-for="item in options"
+              :key="item.processesCode"
+              :label="item.processesCode"
+              :value="item.processesCode">
+            </el-option>
+          </el-select>
         </el-form-item>
         <el-form-item label="鍙傛暟闆嗙紪鐮�" prop="parameterSetCode">
           <el-input v-model="form.parameterSetCode" placeholder="璇疯緭鍏ュ弬鏁伴泦缂栫爜" />
@@ -223,19 +176,16 @@
         <el-form-item label="閲囬泦鍙傛暟鍚嶇О" prop="collectParameterName">
           <el-input v-model="form.collectParameterName" placeholder="璇疯緭鍏ラ噰闆嗗弬鏁板悕绉�" />
         </el-form-item>
-        <el-form-item label="鏄惁浣滀负瀵规瘮鍙傛暟" label-width="140" prop="contrastParameterFlag">
-          <el-input v-model="form.contrastParameterFlag" placeholder="璇疯緭鍏ユ槸鍚︿綔涓哄姣斿弬鏁�" />
+        <el-form-item label="鏄惁浣滀负瀵规瘮鍙傛暟"  prop="contrastParameterFlag" >
+          <el-select v-model="form.contrastParameterFlag" placeholder="璇烽�夋嫨鏄惁浣滀负瀵规瘮鍙傛暟">
+            <el-option
+              v-for="dict in dict.type.sys_yes_no"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
         </el-form-item>
-<!--        <el-form-item label="閲囬泦鍙傛暟绫诲瀷" prop="collectParameterType">-->
-<!--          <el-select v-model="form.collectParameterType" placeholder="璇烽�夋嫨閲囬泦鍙傛暟绫诲瀷">-->
-<!--            <el-option-->
-<!--              v-for="dict in dict.type.${dictType}"-->
-<!--              :key="dict.value"-->
-<!--              :label="dict.label"-->
-<!--              :value="dict.value"-->
-<!--            ></el-option>-->
-<!--          </el-select>-->
-<!--        </el-form-item>-->
         <el-form-item label="閲囬泦鍙傛暟鍗曚綅" prop="collectParameterUnit">
           <el-input v-model="form.collectParameterUnit" placeholder="璇疯緭鍏ラ噰闆嗗弬鏁板崟浣�" />
         </el-form-item>
@@ -274,11 +224,14 @@
 
 <script>
 import { listCollectionParamConf, getCollectionParamConf, delCollectionParamConf, addCollectionParamConf, updateCollectionParamConf } from "@/api/main/da/collectionParamConf/collectionParamConf";
+import {listProcesses} from "@/api/main/bs/processes/processes";
 
 export default {
   name: "CollectionParamConf",
+  dicts: ['subscription_type', 'sys_yes_no', 'data_type','sys_normal_disable'],
   data() {
     return {
+      options: [],
       // 閬僵灞�
       loading: true,
       titleName: "",
@@ -311,6 +264,22 @@
         collectParameterType: null,
         productCode: null,
       },
+
+      processesCodeQueryParams:{
+        pageNum: 1,
+        pageSize: 10,
+        processesCode: null,
+        processesName: null,
+        processesType: null,
+        ipAddress: null,
+        spareField1: null,
+        spareField2: null,
+        spareField3: null,
+        spareField4: null,
+        createUser: null,
+        updateUser: null,
+        remarks: null
+      },
       // 琛ㄥ崟鍙傛暟
       form: {},
       // 琛ㄥ崟鏍¢獙
@@ -318,13 +287,51 @@
         id: [
           { required: true, message: "涓婚敭id涓嶈兘涓虹┖", trigger: "blur" }
         ],
+        processesCode: [
+          { required: true, message: "宸ュ簭缂栧彿涓嶈兘涓虹┖", trigger: "blur" }
+        ],
+        parameterSetCode: [
+          { required: true, message: "鍙傛暟闆嗙紪鐮佷笉鑳戒负绌�", trigger: "blur" }
+        ],
+        parameterSetName: [
+          { required: true, message: "鍙傛暟闆嗗悕绉颁笉鑳戒负绌�", trigger: "blur" }
+        ],
+        collectParameterId: [
+          { required: true, message: "閲囬泦鍙傛暟ID涓嶈兘涓虹┖", trigger: "blur" }
+        ],
+        collectParameterName: [
+          { required: true, message: "閲囬泦鍙傛暟鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }
+        ],
+        collectParameterUnit: [
+          { required: true, message: "閲囬泦鍙傛暟鍗曚綅涓嶈兘涓虹┖", trigger: "blur" }
+        ],
+        gatherAddress: [
+          { required: true, message: "閲囬泦鍦板潃涓嶈兘涓虹┖", trigger: "blur" }
+        ],
+        gatherSequence: [
+          { required: true, message: "閲囬泦椤哄簭涓嶈兘涓虹┖", trigger: "blur" }
+        ],
       }
     };
   },
   created() {
     this.getList();
+    this.initProcesses()
   },
   methods: {
+
+
+    handleSelectChangeprocessesCode(selectedOption) {
+      this.processesCodeQueryParams.processesCode = selectedOption;
+      listProcesses(this.processesCodeQueryParams).then(response => {
+        this.form.collectParameterName = response.rows[0].collectParameterName;
+      });
+    },
+    initProcesses(){
+      listProcesses(this.queryParams).then(response => {
+        this.options = response.rows;
+      });
+    },
     /** 鏌ヨ閲囬泦鍙傛暟閰嶇疆鍒楄〃 */
     getList() {
       this.loading = true;

--
Gitblit v1.9.3