From 28cd73a27061f684feda88d2d3e5f26794bbd591 Mon Sep 17 00:00:00 2001
From: yyt <306727702@qq.com>
Date: 星期二, 23 一月 2024 10:28:14 +0800
Subject: [PATCH] 更新OPCUA

---
 jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/init/OpcusConfigInit.java                  |    2 
 jcdm-ui/src/views/main/da/opcuaconfig/index.vue                                                 |  117 ++++++++++++++---------------
 jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/client/ClientHandler.java                  |    2 
 jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/controller/DaOpcuaConfigController.java    |    2 
 jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/service/impl/DaOpcuaConfigServiceImpl.java |    2 
 jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/mapper/DaOpcuaConfigMapper.java            |    2 
 jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/domain/DaOpcuaConfig.java                  |   55 ++++++-------
 jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/service/IDaOpcuaConfigService.java         |    2 
 jcdm-main/src/main/resources/mapper/da/opcuaconfig/DaOpcuaConfigMapper.xml                      |   31 +++----
 9 files changed, 102 insertions(+), 113 deletions(-)

diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/client/ClientHandler.java b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/client/ClientHandler.java
index 4a207b8..6267237 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/client/ClientHandler.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/client/ClientHandler.java
@@ -157,7 +157,7 @@
 	public void handle(NodeId id, Variant value){
 		if (b == null || 0 > b.size()) {
 			DaOpcuaConfig opcuaConfParam=new DaOpcuaConfig();
-		    opcuaConfParam.setSubscribe(1L);
+		    opcuaConfParam.setSubscribe("Y");
 		    b=daOpcuaConfigService.selectDaOpcuaConfigList(opcuaConfParam);
 		}
 		//浣跨敤Stream API鍦↙ist<T>涓煡鎵惧厓绱�
diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/controller/DaOpcuaConfigController.java b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/controller/DaOpcuaConfigController.java
index f6e8baf..98a9bce 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/controller/DaOpcuaConfigController.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/controller/DaOpcuaConfigController.java
@@ -26,7 +26,7 @@
  * 浜や簰淇″彿閰嶇疆Controller
  * 
  * @author yyt
- * @date 2024-01-22
+ * @date 2024-01-23
  */
 @RestController
 @RequestMapping("/da/opcuaconfig")
diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/domain/DaOpcuaConfig.java b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/domain/DaOpcuaConfig.java
index 353a1bf..c36d43d 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/domain/DaOpcuaConfig.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/domain/DaOpcuaConfig.java
@@ -9,7 +9,7 @@
  * 浜や簰淇″彿閰嶇疆瀵硅薄 da_opcua_config
  * 
  * @author yyt
- * @date 2024-01-22
+ * @date 2024-01-23
  */
 public class DaOpcuaConfig extends BaseEntity
 {
@@ -18,26 +18,17 @@
     /** ID */
     private Long id;
 
-    /** $column.columnComment */
-
     /** 鑺傜偣 */
     @Excel(name = "鑺傜偣")
     private String node;
-
-    /** $column.columnComment */
-    private Long length;
 
     /** 鏁版嵁绫诲瀷 */
     @Excel(name = "鏁版嵁绫诲瀷")
     private String sysTypes;
 
-    /** $column.columnComment */
-    private String functionality;
-
     /** 鏄惁璁㈤槄 */
     @Excel(name = "鏄惁璁㈤槄")
-    private Long subscribe;
-
+    private String subscribe;
 
     /** 璁㈤槄绫诲瀷 */
     @Excel(name = "璁㈤槄绫诲瀷")
@@ -47,13 +38,13 @@
     @Excel(name = "澶囨敞")
     private String remarks;
 
-    /** 宸ュ簭缂栫爜 */
-    @Excel(name = "宸ュ簭缂栫爜")
-    private String process;
-
     /** 宸ュ簭鍚嶇О */
     @Excel(name = "宸ュ簭鍚嶇О")
     private String processName;
+
+    /** 宸ュ簭缂栫爜 */
+    @Excel(name = "宸ュ簭缂栫爜")
+    private String process;
 
     /** 鐘舵�� */
     @Excel(name = "鐘舵��")
@@ -68,7 +59,6 @@
     {
         return id;
     }
-
     public void setNode(String node) 
     {
         this.node = node;
@@ -78,20 +68,27 @@
     {
         return node;
     }
+    public void setSysTypes(String sysTypes) 
+    {
+        this.sysTypes = sysTypes;
+    }
 
     public String getSysTypes() 
     {
         return sysTypes;
     }
-
-    public void setSubscribe(Long subscribe) 
+    public void setSubscribe(String subscribe) 
     {
         this.subscribe = subscribe;
     }
 
-    public Long getSubscribe() 
+    public String getSubscribe() 
     {
         return subscribe;
+    }
+    public void setrFunction(String rFunction) 
+    {
+        this.rFunction = rFunction;
     }
 
     public String getrFunction() 
@@ -107,15 +104,6 @@
     {
         return remarks;
     }
-    public void setProcess(String process) 
-    {
-        this.process = process;
-    }
-
-    public String getProcess() 
-    {
-        return process;
-    }
     public void setProcessName(String processName) 
     {
         this.processName = processName;
@@ -124,6 +112,15 @@
     public String getProcessName() 
     {
         return processName;
+    }
+    public void setProcess(String process) 
+    {
+        this.process = process;
+    }
+
+    public String getProcess() 
+    {
+        return process;
     }
     public void setState(Long state) 
     {
@@ -144,8 +141,8 @@
             .append("subscribe", getSubscribe())
             .append("rFunction", getrFunction())
             .append("remarks", getRemarks())
-            .append("process", getProcess())
             .append("processName", getProcessName())
+            .append("process", getProcess())
             .append("state", getState())
             .toString();
     }
diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/init/OpcusConfigInit.java b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/init/OpcusConfigInit.java
index 66b271e..4bfa496 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/init/OpcusConfigInit.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/init/OpcusConfigInit.java
@@ -29,7 +29,7 @@
     public void run(String... args) throws Exception {
         try {
             DaOpcuaConfig daOpcuaConfig=new DaOpcuaConfig();
-            daOpcuaConfig.setSubscribe(1L); //璁剧疆鏌ヨ鏉′欢锛屾槸鍚﹁闃呯姸鎬佷负1鐨勬墍鏈夋暟鎹�.
+            daOpcuaConfig.setSubscribe("Y"); //璁剧疆鏌ヨ鏉′欢锛屾槸鍚﹁闃呯姸鎬佷负Y鐨勬墍鏈夋暟鎹�.
             List<DaOpcuaConfig> nodeslist=daOpcuaConfigService.selectDaOpcuaConfigList(daOpcuaConfig);
             clientHandler.connect();
             if (nodeslist != null && nodeslist.size() > 0) {
diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/mapper/DaOpcuaConfigMapper.java b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/mapper/DaOpcuaConfigMapper.java
index ac3897e..7feb41d 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/mapper/DaOpcuaConfigMapper.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/mapper/DaOpcuaConfigMapper.java
@@ -8,7 +8,7 @@
  * 浜や簰淇″彿閰嶇疆Mapper鎺ュ彛
  * 
  * @author yyt
- * @date 2024-01-22
+ * @date 2024-01-23
  */
 public interface DaOpcuaConfigMapper 
 {
diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/service/IDaOpcuaConfigService.java b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/service/IDaOpcuaConfigService.java
index aa715ee..13fbdfa 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/service/IDaOpcuaConfigService.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/service/IDaOpcuaConfigService.java
@@ -8,7 +8,7 @@
  * 浜や簰淇″彿閰嶇疆Service鎺ュ彛
  * 
  * @author yyt
- * @date 2024-01-22
+ * @date 2024-01-23
  */
 public interface IDaOpcuaConfigService 
 {
diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/service/impl/DaOpcuaConfigServiceImpl.java b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/service/impl/DaOpcuaConfigServiceImpl.java
index 2beed5b..c1145af 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/service/impl/DaOpcuaConfigServiceImpl.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/service/impl/DaOpcuaConfigServiceImpl.java
@@ -12,7 +12,7 @@
  * 浜や簰淇″彿閰嶇疆Service涓氬姟灞傚鐞�
  * 
  * @author yyt
- * @date 2024-01-22
+ * @date 2024-01-23
  */
 @Service
 public class DaOpcuaConfigServiceImpl implements IDaOpcuaConfigService
diff --git a/jcdm-main/src/main/resources/mapper/da/opcuaconfig/DaOpcuaConfigMapper.xml b/jcdm-main/src/main/resources/mapper/da/opcuaconfig/DaOpcuaConfigMapper.xml
index 46dedc2..9832bf4 100644
--- a/jcdm-main/src/main/resources/mapper/da/opcuaconfig/DaOpcuaConfigMapper.xml
+++ b/jcdm-main/src/main/resources/mapper/da/opcuaconfig/DaOpcuaConfigMapper.xml
@@ -3,7 +3,6 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.jcdm.main.da.opcuaconfig.mapper.DaOpcuaConfigMapper">
-    
     <resultMap type="DaOpcuaConfig" id="DaOpcuaConfigResult">
         <result property="id"    column="id"    />
         <result property="node"    column="node"    />
@@ -11,23 +10,21 @@
         <result property="subscribe"    column="subscribe"    />
         <result property="rFunction"    column="r_function"    />
         <result property="remarks"    column="remarks"    />
-        <result property="process"    column="process"    />
         <result property="processName"    column="process_name"    />
+        <result property="process"    column="process"    />
         <result property="state"    column="state"    />
     </resultMap>
 
     <sql id="selectDaOpcuaConfigVo">
-        select id, node,sys_types, subscribe, r_function, remarks, process, process_name, state from da_opcua_config
+        select id, node, sys_types, subscribe, r_function, remarks, process_name, process, state from da_opcua_config
     </sql>
 
     <select id="selectDaOpcuaConfigList" parameterType="DaOpcuaConfig" resultMap="DaOpcuaConfigResult">
         <include refid="selectDaOpcuaConfigVo"/>
         <where>  
             <if test="node != null  and node != ''"> and node = #{node}</if>
-            <if test="sysTypes != null  and sysTypes != ''"> and sys_types = #{sysTypes}</if>
             <if test="rFunction != null  and rFunction != ''"> and r_function = #{rFunction}</if>
             <if test="process != null  and process != ''"> and process = #{process}</if>
-            <if test="processName != null  and processName != ''"> and process_name like concat('%', #{processName}, '%')</if>
             <if test="state != null "> and state = #{state}</if>
         </where>
     </select>
@@ -40,23 +37,23 @@
     <insert id="insertDaOpcuaConfig" parameterType="DaOpcuaConfig" useGeneratedKeys="true" keyProperty="id">
         insert into da_opcua_config
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="node != null and node != ''">node,</if>
-            <if test="sysTypes != null and sysTypes != ''">sys_types,</if>
+            <if test="node != null">node,</if>
+            <if test="sysTypes != null">sys_types,</if>
             <if test="subscribe != null">subscribe,</if>
-            <if test="rFunction != null and rFunction != ''">r_function,</if>
+            <if test="rFunction != null">r_function,</if>
             <if test="remarks != null">remarks,</if>
-            <if test="process != null">process,</if>
             <if test="processName != null">process_name,</if>
+            <if test="process != null">process,</if>
             <if test="state != null">state,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="node != null and node != ''">#{node},</if>
-            <if test="sysTypes != null and sysTypes != ''">#{sysTypes},</if>
+            <if test="node != null">#{node},</if>
+            <if test="sysTypes != null">#{sysTypes},</if>
             <if test="subscribe != null">#{subscribe},</if>
-            <if test="rFunction != null and rFunction != ''">#{rFunction},</if>
+            <if test="rFunction != null">#{rFunction},</if>
             <if test="remarks != null">#{remarks},</if>
-            <if test="process != null">#{process},</if>
             <if test="processName != null">#{processName},</if>
+            <if test="process != null">#{process},</if>
             <if test="state != null">#{state},</if>
          </trim>
     </insert>
@@ -64,13 +61,13 @@
     <update id="updateDaOpcuaConfig" parameterType="DaOpcuaConfig">
         update da_opcua_config
         <trim prefix="SET" suffixOverrides=",">
-            <if test="node != null and node != ''">node = #{node},</if>
-            <if test="sysTypes != null and sysTypes != ''">sys_types = #{sysTypes},</if>
+            <if test="node != null">node = #{node},</if>
+            <if test="sysTypes != null">sys_types = #{sysTypes},</if>
             <if test="subscribe != null">subscribe = #{subscribe},</if>
-            <if test="rFunction != null and rFunction != ''">r_function = #{rFunction},</if>
+            <if test="rFunction != null">r_function = #{rFunction},</if>
             <if test="remarks != null">remarks = #{remarks},</if>
-            <if test="process != null">process = #{process},</if>
             <if test="processName != null">process_name = #{processName},</if>
+            <if test="process != null">process = #{process},</if>
             <if test="state != null">state = #{state},</if>
         </trim>
         where id = #{id}
diff --git a/jcdm-ui/src/views/main/da/opcuaconfig/index.vue b/jcdm-ui/src/views/main/da/opcuaconfig/index.vue
index 228e2ed..0b4e9e7 100644
--- a/jcdm-ui/src/views/main/da/opcuaconfig/index.vue
+++ b/jcdm-ui/src/views/main/da/opcuaconfig/index.vue
@@ -21,25 +21,15 @@
             </el-select>
           </el-form-item>
           <el-form-item label="宸ュ簭缂栫爜" prop="process">
-            <el-select v-model="queryParams.process" 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="processName">
             <el-input
-              v-model="queryParams.processName"
-              placeholder="璇疯緭鍏ュ伐搴忓悕绉�"
+              v-model="queryParams.process"
+              placeholder="璇疯緭鍏ュ伐搴忕紪鐮�"
               clearable
               @keyup.enter.native="handleQuery"
             />
           </el-form-item>
           <el-form-item label="鐘舵��" prop="state">
-            <el-select v-model="queryParams.state"  placeholder="璇烽�夋嫨鐘舵��" clearable>
+            <el-select v-model="queryParams.state" placeholder="璇烽�夋嫨鐘舵��" clearable>
               <el-option
                 v-for="dict in dict.type.sys_normal_disable"
                 :key="dict.value"
@@ -64,7 +54,7 @@
               icon="el-icon-plus"
               size="mini"
               @click="handleAdd"
-              v-hasPermi="['main:opcuaconfig:add']"
+              v-hasPermi="['da:opcuaconfig:add']"
             >鏂板</el-button>
           </el-col>
           <el-col :span="1.5">
@@ -75,7 +65,7 @@
               size="mini"
               :disabled="single"
               @click="handleUpdate"
-              v-hasPermi="['main:opcuaconfig:edit']"
+              v-hasPermi="['da:opcuaconfig:edit']"
             >淇敼</el-button>
           </el-col>
           <el-col :span="1.5">
@@ -86,7 +76,7 @@
               size="mini"
               :disabled="multiple"
               @click="handleDelete"
-              v-hasPermi="['main:opcuaconfig:remove']"
+              v-hasPermi="['da:opcuaconfig:remove']"
             >鍒犻櫎</el-button>
           </el-col>
           <el-col :span="1.5">
@@ -105,17 +95,17 @@
         <el-table border v-loading="loading" :data="opcuaconfigList" @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="process">
-            <!--            <template slot-scope="scope">-->
-            <!--              <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.process"/>-->
-            <!--            </template>-->
-          </el-table-column>
           <el-table-column label="宸ュ簭鍚嶇О" align="center" prop="processName">
             <!--            <template slot-scope="scope">-->
             <!--              <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.processName"/>-->
             <!--            </template>-->
           </el-table-column>
-          <el-table-column label="鑺傜偣" align="center" prop="node">
+          <el-table-column label="宸ュ簭缂栫爜" align="center" prop="process">
+            <!--            <template slot-scope="scope">-->
+            <!--              <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.process"/>-->
+            <!--            </template>-->
+          </el-table-column>
+          <el-table-column label="浜や簰鑺傜偣" align="center" prop="node">
 <!--            <template slot-scope="scope">-->
 <!--              <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.node"/>-->
 <!--            </template>-->
@@ -135,15 +125,15 @@
               <dict-tag :options="dict.type.subscription_type" :value="scope.row.rFunction"/>
             </template>
           </el-table-column>
-          <el-table-column label="澶囨敞" align="center" prop="remarks">
-<!--            <template slot-scope="scope">-->
-<!--              <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.remarks"/>-->
-<!--            </template>-->
-          </el-table-column>
           <el-table-column label="鐘舵��" align="center" prop="state">
             <template slot-scope="scope">
               <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.state"/>
             </template>
+          </el-table-column>
+          <el-table-column label="澶囨敞" align="center" prop="remarks">
+            <!--            <template slot-scope="scope">-->
+            <!--              <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.remarks"/>-->
+            <!--            </template>-->
           </el-table-column>
           <el-table-column fixed="right" width="200" label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
             <template slot-scope="scope">
@@ -154,7 +144,7 @@
                 style="width: 72px"
                 icon="el-icon-edit"
                 @click="handleUpdate(scope.row)"
-                v-hasPermi="['da:opcuaconfig:edit']"
+                v-hasPermi="['main:opcuaconfig:edit']"
               >淇敼</el-button>
               <el-button
                 size="mini"
@@ -185,7 +175,7 @@
         {{titleName}}
       </span>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="鑺傜偣" prop="node">
+        <el-form-item label="浜や簰鑺傜偣" prop="node">
           <el-input v-model="form.node" placeholder="璇疯緭鍏ヨ妭鐐�" />
         </el-form-item>
         <el-form-item label="鏁版嵁绫诲瀷" prop="sysTypes">
@@ -204,7 +194,7 @@
               v-for="dict in dict.type.sys_yes_no"
               :key="dict.value"
               :label="dict.label"
-              :value="parseInt(dict.value)"
+              :value="dict.value"
             ></el-option>
           </el-select>
         </el-form-item>
@@ -218,20 +208,24 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="澶囨敞" prop="remarks">
-          <el-input v-model="form.remarks" placeholder="璇疯緭鍏ュ娉�" />
-        </el-form-item>
+<!--        <el-form-item label="宸ュ簭鍚嶇О" prop="processName">-->
+<!--          <el-input v-model="form.processName" placeholder="璇疯緭鍏ュ伐搴忓悕绉�" />-->
+<!--        </el-form-item>-->
+<!--        <el-form-item label="宸ュ簭缂栫爜" prop="process">-->
+<!--          <el-input v-model="form.process" placeholder="璇疯緭鍏ュ伐搴忕紪鐮�" />-->
+<!--        </el-form-item>-->
         <el-form-item label="宸ュ簭缂栫爜" prop="process">
-          <el-radio-group v-model="form.process">
-<!--            <el-radio-->
-<!--              v-for="dict in dict.type.${dictType}"-->
-<!--              :key="dict.value"-->
-<!--              :label="dict.value"-->
-<!--            >{{dict.label}}</el-radio>-->
-          </el-radio-group>
+          <el-select style="width: 100%" @change="handleSelectChange(form.process)" v-model="form.process" 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="processName">
-          <el-input v-model="form.processName" placeholder="璇疯緭鍏ュ伐搴忓悕绉�" />
+          <el-input disabled v-model="form.processName" placeholder="璇疯緭鍏ュ伐搴忓悕绉�" />
         </el-form-item>
         <el-form-item label="鐘舵��" prop="state">
           <el-select v-model="form.state" placeholder="璇烽�夋嫨鐘舵��">
@@ -242,6 +236,9 @@
               :value="parseInt(dict.value)"
             ></el-option>
           </el-select>
+        </el-form-item>
+        <el-form-item label="澶囨敞" prop="remarks">
+          <el-input v-model="form.remarks" placeholder="璇疯緭鍏ュ娉�" />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -254,12 +251,14 @@
 
 <script>
 import { listOpcuaconfig, getOpcuaconfig, delOpcuaconfig, addOpcuaconfig, updateOpcuaconfig } from "@/api/main/da/opcuaconfig/opcuaconfig";
+import {listProcesses} from "@/api/main/bs/processes/processes";
 
 export default {
   name: "Opcuaconfig",
-  dicts: ['subscription_type', 'sys_yes_no', 'sys_normal_disable', 'data_type'],
+  dicts: ['subscription_type', 'sys_yes_no', 'data_type','sys_normal_disable'],
   data() {
     return {
+      options: [],
       // 閬僵灞�
       loading: true,
       titleName: "",
@@ -284,11 +283,17 @@
         pageNum: 1,
         pageSize: 10,
         node: null,
-        sysTypes: null,
         rFunction: null,
         process: null,
-        processName: null,
         state: null
+      },
+      ProcessesqueryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        process: null,
+        processName: null,
+        keyProcessesFlag: null,
+        routeCode: undefined,
       },
       // 琛ㄥ崟鍙傛暟
       form: {},
@@ -297,18 +302,6 @@
         id: [
           { required: true, message: "ID涓嶈兘涓虹┖", trigger: "blur" }
         ],
-        node: [
-          { required: true, message: "鑺傜偣涓嶈兘涓虹┖", trigger: "blur" }
-        ],
-        sysTypes: [
-          { required: true, message: "鏁版嵁绫诲瀷涓嶈兘涓虹┖", trigger: "change" }
-        ],
-        subscribe: [
-          { required: true, message: "鏄惁璁㈤槄涓嶈兘涓虹┖", trigger: "change" }
-        ],
-        rFunction: [
-          { required: true, message: "璁㈤槄绫诲瀷涓嶈兘涓虹┖", trigger: "change" }
-        ],
       }
     };
   },
@@ -316,6 +309,12 @@
     this.getList();
   },
   methods: {
+    handleSelectChange(selectedOption) {
+      this.ProcessesqueryParams.process = selectedOption;
+      listProcesses(this.ProcessesqueryParams).then(response => {
+        this.form.processName = response.rows[0].processesName;
+      });
+    },
     /** 鏌ヨ浜や簰淇″彿閰嶇疆鍒楄〃 */
     getList() {
       this.loading = true;
@@ -334,17 +333,13 @@
     reset() {
       this.form = {
         id: null,
-        module: null,
         node: null,
-        length: null,
         sysTypes: null,
-        functionality: null,
         subscribe: null,
-        rModule: null,
         rFunction: null,
         remarks: null,
-        process: null,
         processName: null,
+        process: null,
         state: null
       };
       this.resetForm("form");

--
Gitblit v1.9.3