浏览代码

1、数据组添加扫描点位字段

lhy 11 月之前
父节点
当前提交
4d60e893e1

+ 9 - 9
industry-admin/src/views/source/itemGroup/itemChooseTree copy.vue

@@ -373,15 +373,15 @@ export default {
             }
             for (let i = 0; i < this.leavesChooseList.length; i++) {
                 let temp = {
-                    nodeIdentifier: null,
-                    dataType: this.leavesChooseList[i].dataType,
-                    label: this.leavesChooseList[i].fullPath,
-                    nodeIndex: this.leavesChooseList[i].nodeIndex,
-                    itemName: this.leavesChooseList[i].fullPath,
-                    // itemName: this.leavesChooseList[i].itemName,
-                    itemReadName: this.leavesChooseList[i].itemReadName,
-                    value: this.leavesChooseList[i].itemReadName,
-                    checked: false,
+                  identifier: null,
+                  dataType: this.leavesChooseList[i].dataType,
+                  label: this.leavesChooseList[i].fullPath,
+                  nodeIndex: this.leavesChooseList[i].nodeIndex,
+                  itemName: this.leavesChooseList[i].fullPath,
+                  // itemName: this.leavesChooseList[i].itemName,
+                  itemReadName: this.leavesChooseList[i].itemReadName,
+                  value: this.leavesChooseList[i].itemReadName,
+                  checked: false,
                 };
                 chooseChannelNameList.push(temp);
             }

+ 3 - 2
industry-admin/src/views/source/itemGroup/itemChooseTree.vue

@@ -229,7 +229,7 @@ export default {
         //将原来的点位加载到,右侧作为已选择的
         for (let i = 0; i < this.itemList.length; i++) {
           let temp = {
-            nodeIdentifier: null,
+            identifier: this.itemList[i].identifier,
             dataType: null,
             label: this.itemList[i].itemName,
             nodeIndex: this.itemList[i].nodeIndex,
@@ -320,6 +320,7 @@ export default {
             dataList.push({
               dataSourceId: dataSourceId,
               label: t.itemName,
+              identifier: t.identifier,
               leaf: false,
               children: [],
             });
@@ -485,7 +486,7 @@ export default {
       }
       for (let i = 0; i < this.leavesChooseList.length; i++) {
         let temp = {
-          nodeIdentifier: null,
+          identifier: this.leavesChooseList[i].identifier,
           dataType: this.leavesChooseList[i].dataType,
           label: this.leavesChooseList[i].fullPath,
           nodeIndex: this.leavesChooseList[i].nodeIndex,

+ 5 - 3
industry-system/industry-da/src/main/resources/mapper/ItemGroupDao.xml

@@ -10,7 +10,7 @@
     <sql id="item">
         ti.id
         , ti.item_group_id, ti.item_name, ti.item_read_name, ti.item_type, ti.node_index , ti.data_type, ti.upper_limit, ti.lower_limit
-        , ti.`describe`, ti.unit,ti.scale ,ti.data_model_id, ti.modbus_config
+        , ti.`describe`, ti.unit,ti.scale ,ti.data_model_id, ti.modbus_config,ti.identifier
     </sql>
 
     <insert id="addItemGroup" parameterType="com.example.opc_common.entity.ItemGroup" useGeneratedKeys="true"
@@ -21,12 +21,12 @@
 
     <insert id="addItem">
         insert into t_item (item_group_id, item_name,
-        item_read_name, item_type, node_index ,data_type,`describe`, unit,data_model_id, modbus_config)
+        item_read_name, item_type, node_index ,data_type,`describe`, unit,data_model_id, modbus_config,identifier)
         VALUES
         <foreach collection="itemList" item="item" index="index" separator=",">
             (#{itemGroupId},#{item.itemName},#{item.itemReadName},if(#{item.itemType} is null, 1,
             #{item.itemType}),#{item.nodeIndex},#{item.dataType},
-            #{item.describe},#{item.unit},#{item.dataModelId}, #{item.modbusConfig})
+            #{item.describe},#{item.unit},#{item.dataModelId}, #{item.modbusConfig},#{item.identifier})
         </foreach>
     </insert>
 
@@ -235,6 +235,7 @@
         ti.unit,
         ti.data_model_id,
         ti.modbus_config,
+        ti.identifier,
         tig.data_source_id,
         tdm.operation_rule,
         tdm.remark as operation_rule_name,
@@ -459,6 +460,7 @@
         ti.unit,
         ti.data_model_id,
         ti.modbus_config,
+        ti.identifier,
         tig.data_source_id,
         tdm.operation_rule,
         tdm.remark as operation_rule_name,