dedsudiyu 1 vuosi sitten
vanhempi
commit
42f3899675

+ 4 - 4
.env.production

@@ -12,13 +12,13 @@ VUE_APP_VERSION_DIFFERENCE_FIELD = 'kuangYeDaXue_nanHu'
 
 
 # ####################外网接口配置####################
 # ####################外网接口配置####################
 
 
-VUE_APP_BASE_API = 'lab.zjznai.com/labAppTest'
-# VUE_APP_BASE_API = '192.168.1.24'
+# VUE_APP_BASE_API = 'lab.zjznai.com/labAppTest'
+VUE_APP_BASE_API = '192.168.1.24'
 
 
 
 
 
 
 # ####################内网接口配置####################
 # ####################内网接口配置####################
 
 
-VUE_APP_BASE_LOCAL_API = '192.168.1.43/labSystem'
-# VUE_APP_BASE_LOCAL_API = '192.168.1.24'
+# VUE_APP_BASE_LOCAL_API = '192.168.1.43/labSystem'
+VUE_APP_BASE_LOCAL_API = '192.168.1.24'
 
 

+ 12 - 97
src/views/medicUniversity-3_1/chemicalManagement/deviceManagement/smartLocker/index.vue

@@ -89,9 +89,7 @@
           <!--<template slot-scope="scope">{{scope.row.status == 3||scope.row.status == 4?'在线':'离线'}}</template>-->
           <!--<template slot-scope="scope">{{scope.row.status == 3||scope.row.status == 4?'在线':'离线'}}</template>-->
         <!--</el-table-column>-->
         <!--</el-table-column>-->
         <el-table-column label="关联化学品柜" align="center" prop="cabinetName" width="160"/>
         <el-table-column label="关联化学品柜" align="center" prop="cabinetName" width="160"/>
-        <el-table-column label="锁柜ID/mac地址" align="center" prop="lockId" width="140">
-          <template slot-scope="scope">{{scope.row.lockType==1?scope.row.lockId:scope.row.lockMac}}</template>
-        </el-table-column>
+        <el-table-column label="锁柜ID" align="center" prop="lockId" width="100"/>
         <el-table-column label="摄像头IP" align="center" prop="ipAddress" width="200"/>
         <el-table-column label="摄像头IP" align="center" prop="ipAddress" width="200"/>
         <el-table-column label="采集器编号" align="center" prop="relayCode" width="200"/>
         <el-table-column label="采集器编号" align="center" prop="relayCode" width="200"/>
         <!--<el-table-column label="操作最大时长" align="center" prop="operateTime" width="120">-->
         <!--<el-table-column label="操作最大时长" align="center" prop="operateTime" width="120">-->
@@ -197,29 +195,15 @@
             </el-option>
             </el-option>
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
+        <el-form-item label="锁柜ID:" prop="lockId">
+          <el-input v-model="form.lockId" placeholder="0-253" maxlength="3" style="width:360px;" onkeyup="value=value.replace(/[^\d]/g,'')"/>
+        </el-form-item>
         <el-form-item label="摄像头IP:" prop="ipAddress">
         <el-form-item label="摄像头IP:" prop="ipAddress">
           <el-input v-model="form.ipAddress" placeholder="请输入摄像头IP" maxlength="20" style="width:360px;"/>
           <el-input v-model="form.ipAddress" placeholder="请输入摄像头IP" maxlength="20" style="width:360px;"/>
         </el-form-item>
         </el-form-item>
-        <el-form-item label="柜锁类型" prop="lockType">
-          <el-select v-model="form.lockType" placeholder="请选择柜锁类型" style="width:360px;">
-            <el-option label="485" :value="1"></el-option>
-            <el-option label="蓝牙" :value="2"></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="锁柜ID:" prop="lockId" v-if="form.lockType == 1">
-          <el-input v-model="form.lockId" placeholder="0-253" maxlength="3" style="width:360px;" onkeyup="value=value.replace(/[^\d]/g,'')"/>
-        </el-form-item>
-        <el-form-item label="采集器编号:" prop="relayCode" v-if="form.lockType == 1">
+        <el-form-item label="采集器编号:" prop="relayCode">
           <el-input v-model="form.relayCode" placeholder="请输入采集器编号" maxlength="20" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')" style="width:360px;"/>
           <el-input v-model="form.relayCode" placeholder="请输入采集器编号" maxlength="20" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')" style="width:360px;"/>
         </el-form-item>
         </el-form-item>
-        <el-form-item label="mac地址:" prop="lockMac" v-if="form.lockType == 2">
-          <el-input v-model="form.lockMac" placeholder="请输入mac地址" maxlength="20" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')" style="width:360px;"/>
-        </el-form-item>
-        <el-form-item label="蓝牙网关" prop="gatewayId" v-if="form.lockType == 2">
-          <el-select v-model="form.gatewayId" placeholder="请选择蓝牙网关" style="width:360px;">
-            <el-option v-for="(item,index) in optionsLockGateway" :key="index" :label="item.gatewayName" :value="item.id"></el-option>
-          </el-select>
-        </el-form-item>
       </el-form>
       </el-form>
       <div slot="footer" class="dialog-footer">
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -253,7 +237,7 @@
 
 
 <script>
 <script>
   import { hxpSmartTerminal,filterDept,getSubList,addHxpSmartTerminal,putHxpSmartTerminal,getHxpSmartTerminal,delHxpSmartTerminal } from "@/api/medicUniversity-3_1/index";
   import { hxpSmartTerminal,filterDept,getSubList,addHxpSmartTerminal,putHxpSmartTerminal,getHxpSmartTerminal,delHxpSmartTerminal } from "@/api/medicUniversity-3_1/index";
-  import { listHardware, delHardware, addHardware, updateHardware,setLock,getCabinetLockList,laboratoryLockGatewayGetList } from "@/api/medicUniversity-3_1/index";
+  import { listHardware, delHardware, addHardware, updateHardware,setLock,getCabinetLockList } from "@/api/medicUniversity-3_1/index";
   import { listDepartments } from "@/api/system/dept";
   import { listDepartments } from "@/api/system/dept";
   import { getToken } from "@/utils/auth";
   import { getToken } from "@/utils/auth";
   import associatedCabinetLock from "./associatedCabinetLock.vue"
   import associatedCabinetLock from "./associatedCabinetLock.vue"
@@ -343,12 +327,6 @@
           subjectId: [
           subjectId: [
             { required: true, trigger: "blur", message: "搜索选择实验室" },
             { required: true, trigger: "blur", message: "搜索选择实验室" },
           ],
           ],
-          lockType: [
-            { required: true, trigger: "blur", message: "请选择柜锁类型" },
-          ],
-          gatewayId: [
-            { required: true, trigger: "blur", message: "请选择蓝牙网关" },
-          ],
           operateTime: [
           operateTime: [
             { required: true, trigger: "blur", message: "请输入操作时长" },
             { required: true, trigger: "blur", message: "请输入操作时长" },
             { required: true, message: "请输入操作时长", validator: this.spaceJudgment, trigger: "blur" },
             { required: true, message: "请输入操作时长", validator: this.spaceJudgment, trigger: "blur" },
@@ -363,10 +341,6 @@
             { required: true, trigger: "blur", message: "请输入摄像头ip" },
             { required: true, trigger: "blur", message: "请输入摄像头ip" },
             { required: true, message: "请输入摄像头ip", validator: this.spaceJudgment, trigger: "blur" }
             { required: true, message: "请输入摄像头ip", validator: this.spaceJudgment, trigger: "blur" }
           ],
           ],
-          lockMac: [
-            { required: true, trigger: "blur", message: "请输入mac地址" },
-            { required: true, message: "请输入mac地址", validator: this.spaceJudgment, trigger: "blur" }
-          ],
           relayCode: [
           relayCode: [
             { required: true, trigger: "blur", message: "请输入采集器编号" },
             { required: true, trigger: "blur", message: "请输入采集器编号" },
             { required: true, message: "请输入采集器编号", validator: this.spaceJudgment, trigger: "blur" }
             { required: true, message: "请输入采集器编号", validator: this.spaceJudgment, trigger: "blur" }
@@ -379,25 +353,17 @@
         operationRecordPropsData:{},
         operationRecordPropsData:{},
         //关联记录传参数据
         //关联记录传参数据
         associatedCabinetLockPropsData:{},
         associatedCabinetLockPropsData:{},
-        //柜锁MAC列表
-        optionsLockGateway:[],
       };
       };
     },
     },
     created() {
     created() {
 
 
     },
     },
     mounted(){
     mounted(){
-      this.laboratoryLockGatewayGetList();
       this.filterDept();
       this.filterDept();
       this.listDepartments();
       this.listDepartments();
       this.getList();
       this.getList();
     },
     },
     methods: {
     methods: {
-      laboratoryLockGatewayGetList(){
-        laboratoryLockGatewayGetList().then(response => {
-          this.$set(this,'optionsLockGateway',response.data);
-        });
-      },
       selectFocus(){
       selectFocus(){
         if(!this.selectList[0]){
         if(!this.selectList[0]){
           this.filterDept();
           this.filterDept();
@@ -427,15 +393,8 @@
           //新增
           //新增
           this.dialogTitle = '新增';
           this.dialogTitle = '新增';
           this.$set(this,'form',{
           this.$set(this,'form',{
-            subjectId:'',
-            name:'',
-            hardwareNum:'',
-            lockId:'',
-            ipAddress:'',
-            relayCode:'',
-            lockType:'',
-            gatewayId:'',
-            lockMac:'',
+            hardwareNum:"",
+            subjectId:""
           });
           });
           this.clearClick();
           this.clearClick();
           this.addDialogType = true;
           this.addDialogType = true;
@@ -450,9 +409,6 @@
             lockId:item.lockId,
             lockId:item.lockId,
             ipAddress:item.ipAddress,
             ipAddress:item.ipAddress,
             relayCode:item.relayCode,
             relayCode:item.relayCode,
-            lockType:item.lockType,
-            lockMac:item.lockMac,
-            gatewayId:item.gatewayId,
           };
           };
           this.$set(this,'form',obj);
           this.$set(this,'form',obj);
           this.clearClick();
           this.clearClick();
@@ -545,29 +501,8 @@
           if (valid) {
           if (valid) {
             if(this.form.id){
             if(this.form.id){
               //编辑
               //编辑
-              let obj = {
-                id:this.form.id,
-                type:'AI_CABINETLOCK',
-                subjectId:this.form.subjectId,
-                name:this.form.name,
-                hardwareNum:this.form.hardwareNum,
-                lockId:this.form.lockId,
-                ipAddress:this.form.ipAddress,
-                relayCode:this.form.relayCode,
-                lockType:this.form.lockType,
-              }
-              if(obj.lockType == 1){
-                obj.lockId=this.form.lockId;
-                obj.relayCode=this.form.relayCode;
-                obj.gatewayId='';
-                obj.lockMac='';
-              }else if(obj.lockType == 2){
-                obj.gatewayId=this.form.gatewayId;
-                obj.lockMac=this.form.lockMac;
-                obj.lockId='';
-                obj.relayCode='';
-              }
-              updateHardware(obj).then(response => {
+              this.form.type = "AI_CABINETLOCK";
+              updateHardware(this.form).then(response => {
                 if (response.code == 200){
                 if (response.code == 200){
                   this.addDialogType = false;
                   this.addDialogType = false;
                   this.msgSuccess(response.msg);
                   this.msgSuccess(response.msg);
@@ -576,28 +511,8 @@
               });
               });
             }else{
             }else{
               //新增
               //新增
-              let obj = {
-                type:'AI_CABINETLOCK',
-                subjectId:this.form.subjectId,
-                name:this.form.name,
-                hardwareNum:this.form.hardwareNum,
-                lockId:this.form.lockId,
-                ipAddress:this.form.ipAddress,
-                relayCode:this.form.relayCode,
-                lockType:this.form.lockType,
-              }
-              if(obj.lockType == 1){
-                obj.lockId=this.form.lockId;
-                obj.relayCode=this.form.relayCode;
-                obj.gatewayId='';
-                obj.lockMac='';
-              }else if(obj.lockType == 2){
-                obj.gatewayId=this.form.gatewayId;
-                obj.lockMac=this.form.lockMac;
-                obj.lockId='';
-                obj.relayCode='';
-              }
-              addHardware(obj).then(response => {
+              this.form.type = "AI_CABINETLOCK";
+              addHardware(this.form).then(response => {
                 if (response.code == 200){
                 if (response.code == 200){
                   this.addDialogType = false;
                   this.addDialogType = false;
                   this.msgSuccess(response.msg);
                   this.msgSuccess(response.msg);