|
|
@@ -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();
|
|
|
+ }
|
|
|
},
|
|
|
}
|
|
|
}
|