dedsudiyu 1 napja
szülő
commit
e840c196cb

+ 2 - 1
src/api/config.js

@@ -1,6 +1,7 @@
 // export const REQUEST_URL = 'http://192.168.1.43/wq';
 //接口地址
-export const REQUEST_URL = 'http://192.168.1.88:8083';
+// export const REQUEST_URL = 'http://192.168.1.88:8083';
+export const REQUEST_URL = 'http://192.168.1.55:8083';
 //地图地址
 export const webMap_URL = 'http://109.244.159.250:19127';
 //模型地址

+ 7 - 0
src/api/userApi.js

@@ -723,3 +723,10 @@ export const controlInfoList = (params) => {
 export const controlInfoDel = (params) => {
   return request('deleteheaders', '/business/controlInfo', params)
 };
+//视频监控-新增
+export const businessControlInfo = (params) => {
+  return request('postheaders', '/business/controlInfo', params)
+};
+export const businessControlInfoPut = (params) => {
+  return request('putheaders', '/business/controlInfo', params)
+};

+ 96 - 17
src/components/combatReadinessFacilityStatusMonitoring/videoMonitoring.vue

@@ -134,7 +134,7 @@
 </template>
 
 <script>
-  import { deptListOrg,controlInfoList,controlInfoDel } from '@/api/userApi'
+  import { deptListOrg,controlInfoList,controlInfoDel,businessControlInfo,businessControlInfoPut } from '@/api/userApi'
   export default {
     name: "videoMonitoring",//视频监控
     components:{
@@ -297,12 +297,16 @@
       },
       //新建组件状态切换
       clickPageType(){
+        let self = this;
+        let list = JSON.parse(JSON.stringify(self.downList[0].list));
+        list.splice(0,1);
         let newData = {
           title:"新增摄像头",
           list:[
             {
               name:"仓库名称",
               value:"",
+              list:list,
             },
             {
               name:"摄像头数量",
@@ -315,7 +319,7 @@
               list:["大华","海康"],
             },
             {
-              name:"摄像头信息",
+              name:"摄像头Id",
               value:"",
             },
             {
@@ -366,30 +370,35 @@
       },
       //编辑
       handleEdit(index, row) {
+        let self = this;
+        let list = JSON.parse(JSON.stringify(self.downList[0].list));
+        list.splice(0,1);
         let newData = {
           title:"编辑",
+          id:row.id,
           list:[
             {
               name:"仓库名称",
-              value:row.name,
+              value:row.repertoryName,
+              list:list,
             },
             {
               name:"摄像头数量",
-              value:row.warehouse,
+              value:row.cameraNum,
               elNumber:true,
             },
             {
               name:"摄像头厂家",
-              value:"大华",
+              value:row.cameraCompany,
               list:["大华","海康"],
             },
             {
-              name:"摄像头信息",
-              value:row.vehicle,
+              name:"摄像头Id",
+              value:row.cameraInfo,
             },
             {
               name:"备注",
-              value:row.consumables,
+              value:row.remark,
               textArea:true,
             },
           ]
@@ -434,16 +443,86 @@
       },
       //新增-修改组件内左侧按钮事件
       newModifyRightClick(data){
-        this.newModifyPageType = 1;
-        console.log("右键传值",data);
-        this.windowData = {
-          type:"2",
-          title:"提示",
-          text:"操作成功",
-          leftButton:"取消",
-          rightButton:"确定",
+        if(data.id){
+          this.businessControlInfoPut(data);
+        }else {
+          this.businessControlInfo(data);
+        }
+      },
+      //新增
+      async businessControlInfo (obj) {
+        let self = this;
+        console.log("右键传值",obj);
+        let newObj = {};
+        for(let i=0;i<obj.list.length;i++){
+          if(obj.list[i].name == '仓库名称'){
+            for(let o=0;o<self.downList[0].list.length;o++){
+              if(self.downList[0].list[o] == obj.list[i].value){
+                newObj.repertoryName = self.downList[0].list[o];
+                newObj.repertoryId = self.downList[0].idType[o];
+              }
+            }
+          }else if(obj.list[i].name == '摄像头数量'){
+            newObj.cameraNum = obj.list[i].value;
+          }else if(obj.list[i].name == '摄像头厂家'){
+            newObj.cameraCompany = obj.list[i].value;
+          }else if(obj.list[i].name == '摄像头Id'){
+            newObj.cameraInfo = obj.list[i].value;
+          }else if(obj.list[i].name == '备注'){
+            newObj.remark = obj.list[i].value;
+          }
+        }
+        const { data } = await businessControlInfo(newObj);
+        if(data.code==200){
+          this.newModifyPageType = 1;
+          this.windowData = {
+            type:"2",
+            title:"提示",
+            text:"操作成功",
+            leftButton:"取消",
+            rightButton:"确定",
+          };
+          this.windowType = !this.windowType;
+          this.getListData();
+        }
+      },
+      //编辑
+      async businessControlInfoPut (obj) {
+        let self = this;
+        let newObj = {
+          id:obj.id
         };
-        this.windowType = !this.windowType;
+        for(let i=0;i<obj.list.length;i++){
+          if(obj.list[i].name == '仓库名称'){
+            for(let o=0;o<self.downList[0].list.length;o++){
+              if(self.downList[0].list[o] == obj.list[i].value){
+                newObj.repertoryName = self.downList[0].list[o];
+                newObj.repertoryId = self.downList[0].idType[o];
+              }
+            }
+          }else if(obj.list[i].name == '摄像头数量'){
+            newObj.cameraNum = obj.list[i].value;
+          }else if(obj.list[i].name == '摄像头厂家'){
+            newObj.cameraCompany = obj.list[i].value;
+          }else if(obj.list[i].name == '摄像头Id'){
+            newObj.cameraInfo = obj.list[i].value;
+          }else if(obj.list[i].name == '备注'){
+            newObj.remark = obj.list[i].value;
+          }
+        }
+        const { data } = await businessControlInfoPut(newObj);
+        if(data.code==200){
+          this.newModifyPageType = 1;
+          this.windowData = {
+            type:"2",
+            title:"提示",
+            text:"操作成功",
+            leftButton:"取消",
+            rightButton:"确定",
+          };
+          this.windowType = !this.windowType;
+          this.getListData();
+        }
       },
     }
   }

+ 1 - 1
src/components/newModify.vue

@@ -109,7 +109,7 @@
                    @mouseenter="intoOutMou(item.name)" @mouseleave="intoOutMou('2')">
                 <div class="newModify-drop-down-title"
                      :class="{'mou-border-A':mouType==item.name,'mou-border-B':mouType!=item.name,}">
-                  <p>{{item.value}}</p>
+                  <p :style="item.value?'':'color:#9badbe;'">{{item.value?item.value:'请选择'}}</p>
                   <img src="~@/assets/images/icon_28.png">
                 </div>
                 <div class="newModify-drop-down-list TabStrip" v-if="mouType==item.name">