2
0

2 Commity ce214ff517 ... 93b6ac773b

Autor SHA1 Správa Dátum
  64060764@qq.com 93b6ac773b Merge remote-tracking branch 'origin/master' 1 rok pred
  64060764@qq.com cd86292322 1.1 修改 项目所属 经销商等风格 1 rok pred

+ 9 - 2
src/views/equip-lib/equip-manager/operate-model.vue

@@ -9,7 +9,7 @@
 				></el-input>
 			</div>
 		</div>
-		<div class="form-item">
+		<div class="form-item" v-if="checkNewTrendControl()">
 			<div class="label">耗材规格</div>
 			<div class="cotent">
 				<el-input
@@ -18,7 +18,7 @@
 				></el-input>
 			</div>
 		</div>
-		<div class="form-item">
+		<div class="form-item" v-if="checkNewTrendControl()">
 			<div class="label">消耗周期</div>
 			<div class="cotent">
 				<el-input
@@ -216,6 +216,7 @@
 
 <script>
 const EndControlType = 4;
+const NewTrendControlType = 2;
 import { createApparatusModel, editApparatusModel } from "@/api/box";
 export default {
 	props: {
@@ -280,6 +281,9 @@ export default {
 	watch: {
 		"operateForm.type_id": {
 			handler(n, o) {
+				// console.log("//////operateForm.type_id is", operateForm.type_id)
+				console.log('n is:',n)
+				console.log('o is:',o)
 				if (this._props.operateModelType === "edit") {
 					if (n !== EndControlType) {
 						this.opreateModelForm = {
@@ -352,6 +356,9 @@ export default {
 		checkEndControl() {
 			return this._props.operateForm.type_id === EndControlType;
 		},
+		checkNewTrendControl() {
+			return this._props.operateForm.type_id === NewTrendControlType;
+		},
 		async makeSureOperateButton() {
 			if (this._props.operateModelType === "create") {
 				const {

+ 64 - 13
src/views/equip-management/add-box/index.vue

@@ -3936,6 +3936,13 @@
             <el-input-number v-model="slaveForm.slaveid" :min="1" :max="255" :controls="false"></el-input-number>
           </div>
         </div>
+        <div class="form-item" v-if="slaveForm.type === 'modebusRtu'">
+          <div class="label">是否启用:</div>
+          <div class="content">
+            <el-checkbox v-model="slaveForm.rtuUse"></el-checkbox>
+            <!--            <el-input-number v-model="slaveForm.slaveid" :min="1" :max="255" :controls="false"></el-input-number>-->
+          </div>
+        </div>
         <div class="form-item" v-if="slaveForm.type === 'modebusTcp'">
           <div class="label">IP地址:</div>
           <div class="content">
@@ -3948,6 +3955,13 @@
             <el-input v-model="slaveForm.port"></el-input>
           </div>
         </div>
+        <div class="form-item" v-if="slaveForm.type === 'modebusTcp'">
+          <div class="label">是否启用:</div>
+          <div class="content">
+            <el-checkbox v-model="slaveForm.tcpUse"></el-checkbox>
+            <!--            <el-input-number v-model="slaveForm.slaveid" :min="1" :max="255" :controls="false"></el-input-number>-->
+          </div>
+        </div>
       </div>
       <div class="save-btn-container">
         <el-button type="danger" class="save-btn" @click="slaveFormButton">保 存</el-button>
@@ -4434,7 +4448,9 @@ export default {
         slaveid: 1,
         mainComChan: 4,
         ipAddress: "127.0.0.1",
-        port: 1502
+        port: 1502,
+        tcpUse:false,
+        rtuUse:false,
       },
       slaveResult: {},
 
@@ -6932,19 +6948,32 @@ export default {
       this.useAirProduct = isUseAirProducts;
       this.useSlave = isUseSlave;
 
-      if (slave && slave.modebusRtu && slave.modebusRtu.type === "modebusRtu") {
-        this.slaveForm.type = "modebusRtu";
+      // if (slave && slave.modebusRtu && slave.modebusRtu.type === "modebusRtu") {
+      //   this.slaveForm.type = "modebusRtu";
+      //   this.slaveForm.mainComChan = slave.modebusRtu.mainComChan;
+      //   this.slaveForm.baud = slave.modebusRtu.baud;
+      //   this.slaveForm.slaveid = slave.modebusRtu.slaveid;
+      // } else if (
+      //   slave &&
+      //   slave.modebusTcp &&
+      //   slave.modebusTcp.type === "modebusTcp"
+      // ) {
+      //   this.slaveForm.type = "modebusTcp";
+      //   this.slaveForm.ipAddress = slave.modebusTcp.ipAddress;
+      //   this.slaveForm.port = slave.modebusTcp.port;
+      // }
+      if (slave && slave.modebusRtu) {
         this.slaveForm.mainComChan = slave.modebusRtu.mainComChan;
         this.slaveForm.baud = slave.modebusRtu.baud;
         this.slaveForm.slaveid = slave.modebusRtu.slaveid;
-      } else if (
-        slave &&
-        slave.modebusTcp &&
-        slave.modebusTcp.type === "modebusTcp"
-      ) {
-        this.slaveForm.type = "modebusTcp";
+        this.slaveForm.rtuUse = slave.modebusRtu.rtuUse;
+      }
+
+      // this.slaveForm.type = "modebusTcp";
+      if (slave && slave.modebusTcp) {
         this.slaveForm.ipAddress = slave.modebusTcp.ipAddress;
         this.slaveForm.port = slave.modebusTcp.port;
+        this.slaveForm.tcpUse = slave.modebusTcp.tcpUse;
       }
       /*--------------------系统设置由上至下----------------- */
       //基础设置
@@ -9494,7 +9523,7 @@ export default {
       // console.log(maxId, maxOrder)
       this.regionalStructTopList[this.activeAddOperateAreaIndex].listRooms.push(
         {
-          
+
           id: maxId + 1,
           uuid: this.genUuid(),
           cbOrder: maxOrder + 1,
@@ -9888,7 +9917,8 @@ export default {
             baud: this.slaveForm.baud,
             parity: 78,
             dataBit: 8,
-            stopBit: 1
+            stopBit: 1,
+            rtuUse:this.slaveForm.rtuUse,
           },
           modebusTcp: {},
           custom: {}
@@ -9898,11 +9928,32 @@ export default {
           modebusTcp: {
             type: "modebusTcp",
             ipAddress: this.slaveForm.ipAddress,
-            port: parseInt(this.slaveForm.port)
+            port: parseInt(this.slaveForm.port),
+            tcpUse:this.slaveForm.tcpUse,
+          },
+          modebusRtu: {
+            type: "modebusRtu",
+            device: "/dev/ttyO",
+            slaveid: this.slaveForm.slaveid,
+            mainComChan: this.slaveForm.mainComChan,
+            baud: this.slaveForm.baud,
+            parity: 78,
+            dataBit: 8,
+            stopBit: 1,
+            rtuUse:this.slaveForm.rtuUse,
           },
-          modebusRtu: {},
           custom: {}
         };
+        // this.slaveResult = {
+        //   modebusTcp: {
+        //     type: "modebusTcp",
+        //     ipAddress: this.slaveForm.ipAddress,
+        //     port: parseInt(this.slaveForm.port),
+        //     tcpUse:this.slaveForm.tcpUse,
+        //   },
+        //   modebusRtu: {},
+        //   custom: {}
+        // };
       }
 
       const system = {

+ 38 - 2
src/views/equip-management/edit-box/index.vue

@@ -2384,12 +2384,46 @@
 <!--                    <div>{{this.activeOperateEnd.endDeviceOption.length}}</div>-->
 <!--                    <div>{{this.activeOperateEnd.endDeviceOption[0].cbAddrOffset}}</div>-->
 
-                    <el-col class="w-percent-20" v-if="Array.isArray(this.activeOperateEnd.endDeviceOption) && this.activeOperateEnd.endDeviceOption.length > 0 && this.activeOperateEnd.endDeviceOption[0].cbAddrOffset>0">对应插件偏移量非0才显示
+
+                  </el-row>
+                </div>
+                <div class="form-row bg-white">
+                  <el-row>
+                    <el-col class="w-percent-20" v-if="Array.isArray(this.activeOperateEnd.endDeviceOption) && this.activeOperateEnd.endDeviceOption.length > 0 && this.activeOperateEnd.endDeviceOption[0].cbAddrOffset>=0">
+
                       <el-form-item label="二级地址">
+                        <span style="color: red">{{this.activeOperateEnd.endDeviceOption[0].cbAddrOffset}}</span>
                         <custom-input-number class="form-input-s" :watchObj="activeOperateEnd.cbSecondAddr" v-model="activeOperateEnd.cbSecondAddr" :precision="0"></custom-input-number>
                       </el-form-item>
+
+
+
                     </el-col>
-<!--                    <div>{{this.activeOperateEnd.endDeviceOption[0].cbAddrOffset}}{{this.activeOperateEnd.endDeviceOption[0].cbAddrOffset>0}}</div>-->
+<!--                    <el-col>-->
+<!--                      <el-form-item label="制冷装置控制">-->
+<!--                        <custom-input-number class="form-input-s" :watchObj="activeOperateEnd.cbCoEquipCtrl" v-model="activeOperateEnd.cbCoEquipCtrl" :precision="0"></custom-input-number>-->
+<!--                      </el-form-item>-->
+
+<!--                      <el-form-item label="制热装置控制">-->
+<!--                        <custom-input-number class="form-input-s" :watchObj="activeOperateEnd.cbHeEquipCtrl" v-model="activeOperateEnd.cbHeEquipCtrl" :precision="0"></custom-input-number>-->
+<!--                      </el-form-item>-->
+<!--                    </el-col>-->
+
+
+
+
+<!--                    <el-col>-->
+<!--                      <el-form-item label="制冷装置控制">-->
+<!--                        <custom-input-number class="form-input-s" :watchObj="this.activeOperateEnd.endDeviceOption[0].cbCoEquipCtrl" v-model="this.activeOperateEnd.endDeviceOption[0].cbCoEquipCtrl" :precision="0"></custom-input-number>-->
+<!--                      </el-form-item>-->
+
+<!--                      <el-form-item label="制热装置控制">-->
+<!--                        <custom-input-number class="form-input-s" :watchObj="this.activeOperateEnd.endDeviceOption[0].cbHeEquipCtrl" v-model="this.activeOperateEnd.endDeviceOption[0].cbCoEquipCtrl" :precision="0"></custom-input-number>-->
+<!--                      </el-form-item>-->
+<!--                    </el-col>-->
+
+
+                    <!--                    <div>{{this.activeOperateEnd.endDeviceOption[0].cbAddrOffset}}{{this.activeOperateEnd.endDeviceOption[0].cbAddrOffset>0}}</div>-->
 
                   </el-row>
                 </div>
@@ -6105,6 +6139,8 @@ export default {
         cbMainComChan: -65534,
         cbMainComAdd: -65534,
         cbSecondAddr: -65534,
+        cbCoEquipCtrl:0,
+        cbHeEquipCtrl:0,
 
         cbOperDelay: 0,
         cbCoEquipTypeShow: 1,

+ 12 - 1
src/views/equip-management/online-box/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="box-management-container">
-		<div class="title">关联盒子</div>
+		<div class="title">关联盒子</div>
 		<div class="bottom">
 			<!-- 搜索start -->
 <!--			<div class="search-tab">-->
@@ -106,6 +106,7 @@
 						prop="box_id"
 						align="center"
 				></el-table-column>
+
 				<el-table-column
 						label="IP"
 						prop="ip"
@@ -122,6 +123,16 @@
 					align="center"
 					width="120"
 				></el-table-column>
+				<el-table-column
+						label="项目"
+						prop="project_name"
+						align="center"
+				></el-table-column>
+				<el-table-column
+						label="经销商"
+						prop="distributor_name"
+						align="center"
+				></el-table-column>
 <!--				<el-table-column-->
 <!--					label="是否允许访问"-->
 <!--					align="center"-->

+ 1 - 1
src/views/oa-management/consumble-watch/index.vue

@@ -571,7 +571,7 @@ export default {
 						row.box_id,
 						row.newtrend_order,
 						"newtrend",
-						[{ key: 'consumables', value: 13 }]
+						[{ key: 'consumables', value: row.utilization_rate }]
 				);
 				if (res.code === 200) {
 						this.$notify({