diff --git a/src/views/alarm/alarmPosition.vue b/src/views/alarm/alarmPosition.vue index 2be4412..46cb2a9 100644 --- a/src/views/alarm/alarmPosition.vue +++ b/src/views/alarm/alarmPosition.vue @@ -258,7 +258,7 @@ this.showDevDetail = true let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/alarm/alarmPosition.vue b/src/views/alarm/alarmPosition.vue index 2be4412..46cb2a9 100644 --- a/src/views/alarm/alarmPosition.vue +++ b/src/views/alarm/alarmPosition.vue @@ -258,7 +258,7 @@ this.showDevDetail = true let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/area/areaList.vue b/src/views/area/areaList.vue index d3ff751..d06cbdc 100644 --- a/src/views/area/areaList.vue +++ b/src/views/area/areaList.vue @@ -8,7 +8,7 @@ - + diff --git a/src/views/alarm/alarmPosition.vue b/src/views/alarm/alarmPosition.vue index 2be4412..46cb2a9 100644 --- a/src/views/alarm/alarmPosition.vue +++ b/src/views/alarm/alarmPosition.vue @@ -258,7 +258,7 @@ this.showDevDetail = true let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/area/areaList.vue b/src/views/area/areaList.vue index d3ff751..d06cbdc 100644 --- a/src/views/area/areaList.vue +++ b/src/views/area/areaList.vue @@ -8,7 +8,7 @@ - + diff --git a/src/views/area/defenceList.vue b/src/views/area/defenceList.vue index cb9c4b8..c0ba6d4 100644 --- a/src/views/area/defenceList.vue +++ b/src/views/area/defenceList.vue @@ -151,13 +151,23 @@ id: row.id, status: '1' } - updateDefence(params).then(response => { - if (response.code === 200) { - this.$message.success('布防操作已成功') - this.fetchData(true) - } else { - this.$message.error('布防操作失败') + this.$confirm( + '确定要布防 ' + row.name + ' 吗?', + '确认操作', + { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' } + ).then(() => { + updateDefence(params).then(response => { + if (response.code === 200) { + this.$message.success('布防操作已成功') + this.fetchData(true) + } else { + this.$message.error('布防操作失败') + } + }) }) }, disableDefence(row) { diff --git a/src/views/alarm/alarmPosition.vue b/src/views/alarm/alarmPosition.vue index 2be4412..46cb2a9 100644 --- a/src/views/alarm/alarmPosition.vue +++ b/src/views/alarm/alarmPosition.vue @@ -258,7 +258,7 @@ this.showDevDetail = true let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/area/areaList.vue b/src/views/area/areaList.vue index d3ff751..d06cbdc 100644 --- a/src/views/area/areaList.vue +++ b/src/views/area/areaList.vue @@ -8,7 +8,7 @@ - + diff --git a/src/views/area/defenceList.vue b/src/views/area/defenceList.vue index cb9c4b8..c0ba6d4 100644 --- a/src/views/area/defenceList.vue +++ b/src/views/area/defenceList.vue @@ -151,13 +151,23 @@ id: row.id, status: '1' } - updateDefence(params).then(response => { - if (response.code === 200) { - this.$message.success('布防操作已成功') - this.fetchData(true) - } else { - this.$message.error('布防操作失败') + this.$confirm( + '确定要布防 ' + row.name + ' 吗?', + '确认操作', + { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' } + ).then(() => { + updateDefence(params).then(response => { + if (response.code === 200) { + this.$message.success('布防操作已成功') + this.fetchData(true) + } else { + this.$message.error('布防操作失败') + } + }) }) }, disableDefence(row) { diff --git a/src/views/car/carAdd.vue b/src/views/car/carAdd.vue index 565a614..902c28b 100644 --- a/src/views/car/carAdd.vue +++ b/src/views/car/carAdd.vue @@ -11,7 +11,7 @@ - + {{ item.name }} @@ -109,7 +109,10 @@ phone2: [{ required: false, trigger: ['blur'], validator: phoneValidatorCanNull }], phone: [{ required: true, trigger: ['blur', 'change'], validator: phoneValidator }], plateNumber: [{ required: true, trigger: ['blur', 'change'], validator: plateValidator }], - ownerId: [{ required: true, trigger: ['blur', 'change'], message: '请选择车主' }] + ownerId: [{ required: true, trigger: ['blur', 'change'], message: '请选择车主' }], + deptid: [{ required: true, trigger: ['blur', 'change'], message: '请选择所属部门' }], + carCardType: [{ required: true, trigger: ['blur', 'change'], message: '请选择车证种类' }], + property: [{ required: true, trigger: ['blur', 'change'], message: '请选择车辆性质' }] }, // 前端校验规则 carProperties: [], // 车辆性质字典值 staffList: [], // 车主人员列表 @@ -265,6 +268,10 @@ createData: function() { this.$refs['dataForm'].validate((valid) => { if (valid) { + if(this.dataForm.property === '1'){ + this.dataForm.deptid = '' + this.dataForm.ownerId = '' + } addCar(this.dataForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { @@ -296,6 +303,10 @@ updateData: function() { this.$refs['dataForm'].validate((valid) => { if (valid) { + if(this.dataForm.property === '1'){ + this.dataForm.deptid = '' + this.dataForm.ownerId = '' + } editCar(this.dataForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') diff --git a/src/views/alarm/alarmPosition.vue b/src/views/alarm/alarmPosition.vue index 2be4412..46cb2a9 100644 --- a/src/views/alarm/alarmPosition.vue +++ b/src/views/alarm/alarmPosition.vue @@ -258,7 +258,7 @@ this.showDevDetail = true let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/area/areaList.vue b/src/views/area/areaList.vue index d3ff751..d06cbdc 100644 --- a/src/views/area/areaList.vue +++ b/src/views/area/areaList.vue @@ -8,7 +8,7 @@ - + diff --git a/src/views/area/defenceList.vue b/src/views/area/defenceList.vue index cb9c4b8..c0ba6d4 100644 --- a/src/views/area/defenceList.vue +++ b/src/views/area/defenceList.vue @@ -151,13 +151,23 @@ id: row.id, status: '1' } - updateDefence(params).then(response => { - if (response.code === 200) { - this.$message.success('布防操作已成功') - this.fetchData(true) - } else { - this.$message.error('布防操作失败') + this.$confirm( + '确定要布防 ' + row.name + ' 吗?', + '确认操作', + { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' } + ).then(() => { + updateDefence(params).then(response => { + if (response.code === 200) { + this.$message.success('布防操作已成功') + this.fetchData(true) + } else { + this.$message.error('布防操作失败') + } + }) }) }, disableDefence(row) { diff --git a/src/views/car/carAdd.vue b/src/views/car/carAdd.vue index 565a614..902c28b 100644 --- a/src/views/car/carAdd.vue +++ b/src/views/car/carAdd.vue @@ -11,7 +11,7 @@ - + {{ item.name }} @@ -109,7 +109,10 @@ phone2: [{ required: false, trigger: ['blur'], validator: phoneValidatorCanNull }], phone: [{ required: true, trigger: ['blur', 'change'], validator: phoneValidator }], plateNumber: [{ required: true, trigger: ['blur', 'change'], validator: plateValidator }], - ownerId: [{ required: true, trigger: ['blur', 'change'], message: '请选择车主' }] + ownerId: [{ required: true, trigger: ['blur', 'change'], message: '请选择车主' }], + deptid: [{ required: true, trigger: ['blur', 'change'], message: '请选择所属部门' }], + carCardType: [{ required: true, trigger: ['blur', 'change'], message: '请选择车证种类' }], + property: [{ required: true, trigger: ['blur', 'change'], message: '请选择车辆性质' }] }, // 前端校验规则 carProperties: [], // 车辆性质字典值 staffList: [], // 车主人员列表 @@ -265,6 +268,10 @@ createData: function() { this.$refs['dataForm'].validate((valid) => { if (valid) { + if(this.dataForm.property === '1'){ + this.dataForm.deptid = '' + this.dataForm.ownerId = '' + } addCar(this.dataForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { @@ -296,6 +303,10 @@ updateData: function() { this.$refs['dataForm'].validate((valid) => { if (valid) { + if(this.dataForm.property === '1'){ + this.dataForm.deptid = '' + this.dataForm.ownerId = '' + } editCar(this.dataForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') diff --git a/src/views/car/carList.vue b/src/views/car/carList.vue index 0371607..af4aebc 100644 --- a/src/views/car/carList.vue +++ b/src/views/car/carList.vue @@ -131,7 +131,7 @@ width: 140 }, { - text: '车主联系电话', + text: '联系电话', value: 'phone', align: 'center' }, diff --git a/src/views/alarm/alarmPosition.vue b/src/views/alarm/alarmPosition.vue index 2be4412..46cb2a9 100644 --- a/src/views/alarm/alarmPosition.vue +++ b/src/views/alarm/alarmPosition.vue @@ -258,7 +258,7 @@ this.showDevDetail = true let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/area/areaList.vue b/src/views/area/areaList.vue index d3ff751..d06cbdc 100644 --- a/src/views/area/areaList.vue +++ b/src/views/area/areaList.vue @@ -8,7 +8,7 @@ - + diff --git a/src/views/area/defenceList.vue b/src/views/area/defenceList.vue index cb9c4b8..c0ba6d4 100644 --- a/src/views/area/defenceList.vue +++ b/src/views/area/defenceList.vue @@ -151,13 +151,23 @@ id: row.id, status: '1' } - updateDefence(params).then(response => { - if (response.code === 200) { - this.$message.success('布防操作已成功') - this.fetchData(true) - } else { - this.$message.error('布防操作失败') + this.$confirm( + '确定要布防 ' + row.name + ' 吗?', + '确认操作', + { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' } + ).then(() => { + updateDefence(params).then(response => { + if (response.code === 200) { + this.$message.success('布防操作已成功') + this.fetchData(true) + } else { + this.$message.error('布防操作失败') + } + }) }) }, disableDefence(row) { diff --git a/src/views/car/carAdd.vue b/src/views/car/carAdd.vue index 565a614..902c28b 100644 --- a/src/views/car/carAdd.vue +++ b/src/views/car/carAdd.vue @@ -11,7 +11,7 @@ - + {{ item.name }} @@ -109,7 +109,10 @@ phone2: [{ required: false, trigger: ['blur'], validator: phoneValidatorCanNull }], phone: [{ required: true, trigger: ['blur', 'change'], validator: phoneValidator }], plateNumber: [{ required: true, trigger: ['blur', 'change'], validator: plateValidator }], - ownerId: [{ required: true, trigger: ['blur', 'change'], message: '请选择车主' }] + ownerId: [{ required: true, trigger: ['blur', 'change'], message: '请选择车主' }], + deptid: [{ required: true, trigger: ['blur', 'change'], message: '请选择所属部门' }], + carCardType: [{ required: true, trigger: ['blur', 'change'], message: '请选择车证种类' }], + property: [{ required: true, trigger: ['blur', 'change'], message: '请选择车辆性质' }] }, // 前端校验规则 carProperties: [], // 车辆性质字典值 staffList: [], // 车主人员列表 @@ -265,6 +268,10 @@ createData: function() { this.$refs['dataForm'].validate((valid) => { if (valid) { + if(this.dataForm.property === '1'){ + this.dataForm.deptid = '' + this.dataForm.ownerId = '' + } addCar(this.dataForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { @@ -296,6 +303,10 @@ updateData: function() { this.$refs['dataForm'].validate((valid) => { if (valid) { + if(this.dataForm.property === '1'){ + this.dataForm.deptid = '' + this.dataForm.ownerId = '' + } editCar(this.dataForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') diff --git a/src/views/car/carList.vue b/src/views/car/carList.vue index 0371607..af4aebc 100644 --- a/src/views/car/carList.vue +++ b/src/views/car/carList.vue @@ -131,7 +131,7 @@ width: 140 }, { - text: '车主联系电话', + text: '联系电话', value: 'phone', align: 'center' }, diff --git a/src/views/ctrl/overview.vue b/src/views/ctrl/overview.vue index e60f060..ae80c03 100644 --- a/src/views/ctrl/overview.vue +++ b/src/views/ctrl/overview.vue @@ -1121,15 +1121,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -1155,15 +1157,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/alarm/alarmPosition.vue b/src/views/alarm/alarmPosition.vue index 2be4412..46cb2a9 100644 --- a/src/views/alarm/alarmPosition.vue +++ b/src/views/alarm/alarmPosition.vue @@ -258,7 +258,7 @@ this.showDevDetail = true let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/area/areaList.vue b/src/views/area/areaList.vue index d3ff751..d06cbdc 100644 --- a/src/views/area/areaList.vue +++ b/src/views/area/areaList.vue @@ -8,7 +8,7 @@ - + diff --git a/src/views/area/defenceList.vue b/src/views/area/defenceList.vue index cb9c4b8..c0ba6d4 100644 --- a/src/views/area/defenceList.vue +++ b/src/views/area/defenceList.vue @@ -151,13 +151,23 @@ id: row.id, status: '1' } - updateDefence(params).then(response => { - if (response.code === 200) { - this.$message.success('布防操作已成功') - this.fetchData(true) - } else { - this.$message.error('布防操作失败') + this.$confirm( + '确定要布防 ' + row.name + ' 吗?', + '确认操作', + { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' } + ).then(() => { + updateDefence(params).then(response => { + if (response.code === 200) { + this.$message.success('布防操作已成功') + this.fetchData(true) + } else { + this.$message.error('布防操作失败') + } + }) }) }, disableDefence(row) { diff --git a/src/views/car/carAdd.vue b/src/views/car/carAdd.vue index 565a614..902c28b 100644 --- a/src/views/car/carAdd.vue +++ b/src/views/car/carAdd.vue @@ -11,7 +11,7 @@ - + {{ item.name }} @@ -109,7 +109,10 @@ phone2: [{ required: false, trigger: ['blur'], validator: phoneValidatorCanNull }], phone: [{ required: true, trigger: ['blur', 'change'], validator: phoneValidator }], plateNumber: [{ required: true, trigger: ['blur', 'change'], validator: plateValidator }], - ownerId: [{ required: true, trigger: ['blur', 'change'], message: '请选择车主' }] + ownerId: [{ required: true, trigger: ['blur', 'change'], message: '请选择车主' }], + deptid: [{ required: true, trigger: ['blur', 'change'], message: '请选择所属部门' }], + carCardType: [{ required: true, trigger: ['blur', 'change'], message: '请选择车证种类' }], + property: [{ required: true, trigger: ['blur', 'change'], message: '请选择车辆性质' }] }, // 前端校验规则 carProperties: [], // 车辆性质字典值 staffList: [], // 车主人员列表 @@ -265,6 +268,10 @@ createData: function() { this.$refs['dataForm'].validate((valid) => { if (valid) { + if(this.dataForm.property === '1'){ + this.dataForm.deptid = '' + this.dataForm.ownerId = '' + } addCar(this.dataForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { @@ -296,6 +303,10 @@ updateData: function() { this.$refs['dataForm'].validate((valid) => { if (valid) { + if(this.dataForm.property === '1'){ + this.dataForm.deptid = '' + this.dataForm.ownerId = '' + } editCar(this.dataForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') diff --git a/src/views/car/carList.vue b/src/views/car/carList.vue index 0371607..af4aebc 100644 --- a/src/views/car/carList.vue +++ b/src/views/car/carList.vue @@ -131,7 +131,7 @@ width: 140 }, { - text: '车主联系电话', + text: '联系电话', value: 'phone', align: 'center' }, diff --git a/src/views/ctrl/overview.vue b/src/views/ctrl/overview.vue index e60f060..ae80c03 100644 --- a/src/views/ctrl/overview.vue +++ b/src/views/ctrl/overview.vue @@ -1121,15 +1121,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -1155,15 +1157,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/doorIndex.vue b/src/views/overview/doorIndex.vue index 7cd40ff..dd29616 100644 --- a/src/views/overview/doorIndex.vue +++ b/src/views/overview/doorIndex.vue @@ -636,15 +636,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -670,15 +672,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/alarm/alarmPosition.vue b/src/views/alarm/alarmPosition.vue index 2be4412..46cb2a9 100644 --- a/src/views/alarm/alarmPosition.vue +++ b/src/views/alarm/alarmPosition.vue @@ -258,7 +258,7 @@ this.showDevDetail = true let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/area/areaList.vue b/src/views/area/areaList.vue index d3ff751..d06cbdc 100644 --- a/src/views/area/areaList.vue +++ b/src/views/area/areaList.vue @@ -8,7 +8,7 @@ - + diff --git a/src/views/area/defenceList.vue b/src/views/area/defenceList.vue index cb9c4b8..c0ba6d4 100644 --- a/src/views/area/defenceList.vue +++ b/src/views/area/defenceList.vue @@ -151,13 +151,23 @@ id: row.id, status: '1' } - updateDefence(params).then(response => { - if (response.code === 200) { - this.$message.success('布防操作已成功') - this.fetchData(true) - } else { - this.$message.error('布防操作失败') + this.$confirm( + '确定要布防 ' + row.name + ' 吗?', + '确认操作', + { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' } + ).then(() => { + updateDefence(params).then(response => { + if (response.code === 200) { + this.$message.success('布防操作已成功') + this.fetchData(true) + } else { + this.$message.error('布防操作失败') + } + }) }) }, disableDefence(row) { diff --git a/src/views/car/carAdd.vue b/src/views/car/carAdd.vue index 565a614..902c28b 100644 --- a/src/views/car/carAdd.vue +++ b/src/views/car/carAdd.vue @@ -11,7 +11,7 @@ - + {{ item.name }} @@ -109,7 +109,10 @@ phone2: [{ required: false, trigger: ['blur'], validator: phoneValidatorCanNull }], phone: [{ required: true, trigger: ['blur', 'change'], validator: phoneValidator }], plateNumber: [{ required: true, trigger: ['blur', 'change'], validator: plateValidator }], - ownerId: [{ required: true, trigger: ['blur', 'change'], message: '请选择车主' }] + ownerId: [{ required: true, trigger: ['blur', 'change'], message: '请选择车主' }], + deptid: [{ required: true, trigger: ['blur', 'change'], message: '请选择所属部门' }], + carCardType: [{ required: true, trigger: ['blur', 'change'], message: '请选择车证种类' }], + property: [{ required: true, trigger: ['blur', 'change'], message: '请选择车辆性质' }] }, // 前端校验规则 carProperties: [], // 车辆性质字典值 staffList: [], // 车主人员列表 @@ -265,6 +268,10 @@ createData: function() { this.$refs['dataForm'].validate((valid) => { if (valid) { + if(this.dataForm.property === '1'){ + this.dataForm.deptid = '' + this.dataForm.ownerId = '' + } addCar(this.dataForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { @@ -296,6 +303,10 @@ updateData: function() { this.$refs['dataForm'].validate((valid) => { if (valid) { + if(this.dataForm.property === '1'){ + this.dataForm.deptid = '' + this.dataForm.ownerId = '' + } editCar(this.dataForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') diff --git a/src/views/car/carList.vue b/src/views/car/carList.vue index 0371607..af4aebc 100644 --- a/src/views/car/carList.vue +++ b/src/views/car/carList.vue @@ -131,7 +131,7 @@ width: 140 }, { - text: '车主联系电话', + text: '联系电话', value: 'phone', align: 'center' }, diff --git a/src/views/ctrl/overview.vue b/src/views/ctrl/overview.vue index e60f060..ae80c03 100644 --- a/src/views/ctrl/overview.vue +++ b/src/views/ctrl/overview.vue @@ -1121,15 +1121,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -1155,15 +1157,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/doorIndex.vue b/src/views/overview/doorIndex.vue index 7cd40ff..dd29616 100644 --- a/src/views/overview/doorIndex.vue +++ b/src/views/overview/doorIndex.vue @@ -636,15 +636,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -670,15 +672,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/fenceIndex.vue b/src/views/overview/fenceIndex.vue index 28d6ea5..e49500d 100644 --- a/src/views/overview/fenceIndex.vue +++ b/src/views/overview/fenceIndex.vue @@ -647,15 +647,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -681,15 +683,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/alarm/alarmPosition.vue b/src/views/alarm/alarmPosition.vue index 2be4412..46cb2a9 100644 --- a/src/views/alarm/alarmPosition.vue +++ b/src/views/alarm/alarmPosition.vue @@ -258,7 +258,7 @@ this.showDevDetail = true let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/area/areaList.vue b/src/views/area/areaList.vue index d3ff751..d06cbdc 100644 --- a/src/views/area/areaList.vue +++ b/src/views/area/areaList.vue @@ -8,7 +8,7 @@ - + diff --git a/src/views/area/defenceList.vue b/src/views/area/defenceList.vue index cb9c4b8..c0ba6d4 100644 --- a/src/views/area/defenceList.vue +++ b/src/views/area/defenceList.vue @@ -151,13 +151,23 @@ id: row.id, status: '1' } - updateDefence(params).then(response => { - if (response.code === 200) { - this.$message.success('布防操作已成功') - this.fetchData(true) - } else { - this.$message.error('布防操作失败') + this.$confirm( + '确定要布防 ' + row.name + ' 吗?', + '确认操作', + { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' } + ).then(() => { + updateDefence(params).then(response => { + if (response.code === 200) { + this.$message.success('布防操作已成功') + this.fetchData(true) + } else { + this.$message.error('布防操作失败') + } + }) }) }, disableDefence(row) { diff --git a/src/views/car/carAdd.vue b/src/views/car/carAdd.vue index 565a614..902c28b 100644 --- a/src/views/car/carAdd.vue +++ b/src/views/car/carAdd.vue @@ -11,7 +11,7 @@ - + {{ item.name }} @@ -109,7 +109,10 @@ phone2: [{ required: false, trigger: ['blur'], validator: phoneValidatorCanNull }], phone: [{ required: true, trigger: ['blur', 'change'], validator: phoneValidator }], plateNumber: [{ required: true, trigger: ['blur', 'change'], validator: plateValidator }], - ownerId: [{ required: true, trigger: ['blur', 'change'], message: '请选择车主' }] + ownerId: [{ required: true, trigger: ['blur', 'change'], message: '请选择车主' }], + deptid: [{ required: true, trigger: ['blur', 'change'], message: '请选择所属部门' }], + carCardType: [{ required: true, trigger: ['blur', 'change'], message: '请选择车证种类' }], + property: [{ required: true, trigger: ['blur', 'change'], message: '请选择车辆性质' }] }, // 前端校验规则 carProperties: [], // 车辆性质字典值 staffList: [], // 车主人员列表 @@ -265,6 +268,10 @@ createData: function() { this.$refs['dataForm'].validate((valid) => { if (valid) { + if(this.dataForm.property === '1'){ + this.dataForm.deptid = '' + this.dataForm.ownerId = '' + } addCar(this.dataForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { @@ -296,6 +303,10 @@ updateData: function() { this.$refs['dataForm'].validate((valid) => { if (valid) { + if(this.dataForm.property === '1'){ + this.dataForm.deptid = '' + this.dataForm.ownerId = '' + } editCar(this.dataForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') diff --git a/src/views/car/carList.vue b/src/views/car/carList.vue index 0371607..af4aebc 100644 --- a/src/views/car/carList.vue +++ b/src/views/car/carList.vue @@ -131,7 +131,7 @@ width: 140 }, { - text: '车主联系电话', + text: '联系电话', value: 'phone', align: 'center' }, diff --git a/src/views/ctrl/overview.vue b/src/views/ctrl/overview.vue index e60f060..ae80c03 100644 --- a/src/views/ctrl/overview.vue +++ b/src/views/ctrl/overview.vue @@ -1121,15 +1121,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -1155,15 +1157,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/doorIndex.vue b/src/views/overview/doorIndex.vue index 7cd40ff..dd29616 100644 --- a/src/views/overview/doorIndex.vue +++ b/src/views/overview/doorIndex.vue @@ -636,15 +636,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -670,15 +672,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/fenceIndex.vue b/src/views/overview/fenceIndex.vue index 28d6ea5..e49500d 100644 --- a/src/views/overview/fenceIndex.vue +++ b/src/views/overview/fenceIndex.vue @@ -647,15 +647,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -681,15 +683,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/keyIndex.vue b/src/views/overview/keyIndex.vue index a461c94..d9dd4cc 100644 --- a/src/views/overview/keyIndex.vue +++ b/src/views/overview/keyIndex.vue @@ -687,7 +687,7 @@ // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -715,7 +715,7 @@ // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/alarm/alarmPosition.vue b/src/views/alarm/alarmPosition.vue index 2be4412..46cb2a9 100644 --- a/src/views/alarm/alarmPosition.vue +++ b/src/views/alarm/alarmPosition.vue @@ -258,7 +258,7 @@ this.showDevDetail = true let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/area/areaList.vue b/src/views/area/areaList.vue index d3ff751..d06cbdc 100644 --- a/src/views/area/areaList.vue +++ b/src/views/area/areaList.vue @@ -8,7 +8,7 @@ - + diff --git a/src/views/area/defenceList.vue b/src/views/area/defenceList.vue index cb9c4b8..c0ba6d4 100644 --- a/src/views/area/defenceList.vue +++ b/src/views/area/defenceList.vue @@ -151,13 +151,23 @@ id: row.id, status: '1' } - updateDefence(params).then(response => { - if (response.code === 200) { - this.$message.success('布防操作已成功') - this.fetchData(true) - } else { - this.$message.error('布防操作失败') + this.$confirm( + '确定要布防 ' + row.name + ' 吗?', + '确认操作', + { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' } + ).then(() => { + updateDefence(params).then(response => { + if (response.code === 200) { + this.$message.success('布防操作已成功') + this.fetchData(true) + } else { + this.$message.error('布防操作失败') + } + }) }) }, disableDefence(row) { diff --git a/src/views/car/carAdd.vue b/src/views/car/carAdd.vue index 565a614..902c28b 100644 --- a/src/views/car/carAdd.vue +++ b/src/views/car/carAdd.vue @@ -11,7 +11,7 @@ - + {{ item.name }} @@ -109,7 +109,10 @@ phone2: [{ required: false, trigger: ['blur'], validator: phoneValidatorCanNull }], phone: [{ required: true, trigger: ['blur', 'change'], validator: phoneValidator }], plateNumber: [{ required: true, trigger: ['blur', 'change'], validator: plateValidator }], - ownerId: [{ required: true, trigger: ['blur', 'change'], message: '请选择车主' }] + ownerId: [{ required: true, trigger: ['blur', 'change'], message: '请选择车主' }], + deptid: [{ required: true, trigger: ['blur', 'change'], message: '请选择所属部门' }], + carCardType: [{ required: true, trigger: ['blur', 'change'], message: '请选择车证种类' }], + property: [{ required: true, trigger: ['blur', 'change'], message: '请选择车辆性质' }] }, // 前端校验规则 carProperties: [], // 车辆性质字典值 staffList: [], // 车主人员列表 @@ -265,6 +268,10 @@ createData: function() { this.$refs['dataForm'].validate((valid) => { if (valid) { + if(this.dataForm.property === '1'){ + this.dataForm.deptid = '' + this.dataForm.ownerId = '' + } addCar(this.dataForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { @@ -296,6 +303,10 @@ updateData: function() { this.$refs['dataForm'].validate((valid) => { if (valid) { + if(this.dataForm.property === '1'){ + this.dataForm.deptid = '' + this.dataForm.ownerId = '' + } editCar(this.dataForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') diff --git a/src/views/car/carList.vue b/src/views/car/carList.vue index 0371607..af4aebc 100644 --- a/src/views/car/carList.vue +++ b/src/views/car/carList.vue @@ -131,7 +131,7 @@ width: 140 }, { - text: '车主联系电话', + text: '联系电话', value: 'phone', align: 'center' }, diff --git a/src/views/ctrl/overview.vue b/src/views/ctrl/overview.vue index e60f060..ae80c03 100644 --- a/src/views/ctrl/overview.vue +++ b/src/views/ctrl/overview.vue @@ -1121,15 +1121,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -1155,15 +1157,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/doorIndex.vue b/src/views/overview/doorIndex.vue index 7cd40ff..dd29616 100644 --- a/src/views/overview/doorIndex.vue +++ b/src/views/overview/doorIndex.vue @@ -636,15 +636,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -670,15 +672,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/fenceIndex.vue b/src/views/overview/fenceIndex.vue index 28d6ea5..e49500d 100644 --- a/src/views/overview/fenceIndex.vue +++ b/src/views/overview/fenceIndex.vue @@ -647,15 +647,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -681,15 +683,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/keyIndex.vue b/src/views/overview/keyIndex.vue index a461c94..d9dd4cc 100644 --- a/src/views/overview/keyIndex.vue +++ b/src/views/overview/keyIndex.vue @@ -687,7 +687,7 @@ // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -715,7 +715,7 @@ // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/regionIndex.vue b/src/views/overview/regionIndex.vue index d7f615e..4a3fcc5 100644 --- a/src/views/overview/regionIndex.vue +++ b/src/views/overview/regionIndex.vue @@ -657,15 +657,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -691,15 +693,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/alarm/alarmPosition.vue b/src/views/alarm/alarmPosition.vue index 2be4412..46cb2a9 100644 --- a/src/views/alarm/alarmPosition.vue +++ b/src/views/alarm/alarmPosition.vue @@ -258,7 +258,7 @@ this.showDevDetail = true let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/area/areaList.vue b/src/views/area/areaList.vue index d3ff751..d06cbdc 100644 --- a/src/views/area/areaList.vue +++ b/src/views/area/areaList.vue @@ -8,7 +8,7 @@ - + diff --git a/src/views/area/defenceList.vue b/src/views/area/defenceList.vue index cb9c4b8..c0ba6d4 100644 --- a/src/views/area/defenceList.vue +++ b/src/views/area/defenceList.vue @@ -151,13 +151,23 @@ id: row.id, status: '1' } - updateDefence(params).then(response => { - if (response.code === 200) { - this.$message.success('布防操作已成功') - this.fetchData(true) - } else { - this.$message.error('布防操作失败') + this.$confirm( + '确定要布防 ' + row.name + ' 吗?', + '确认操作', + { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' } + ).then(() => { + updateDefence(params).then(response => { + if (response.code === 200) { + this.$message.success('布防操作已成功') + this.fetchData(true) + } else { + this.$message.error('布防操作失败') + } + }) }) }, disableDefence(row) { diff --git a/src/views/car/carAdd.vue b/src/views/car/carAdd.vue index 565a614..902c28b 100644 --- a/src/views/car/carAdd.vue +++ b/src/views/car/carAdd.vue @@ -11,7 +11,7 @@ - + {{ item.name }} @@ -109,7 +109,10 @@ phone2: [{ required: false, trigger: ['blur'], validator: phoneValidatorCanNull }], phone: [{ required: true, trigger: ['blur', 'change'], validator: phoneValidator }], plateNumber: [{ required: true, trigger: ['blur', 'change'], validator: plateValidator }], - ownerId: [{ required: true, trigger: ['blur', 'change'], message: '请选择车主' }] + ownerId: [{ required: true, trigger: ['blur', 'change'], message: '请选择车主' }], + deptid: [{ required: true, trigger: ['blur', 'change'], message: '请选择所属部门' }], + carCardType: [{ required: true, trigger: ['blur', 'change'], message: '请选择车证种类' }], + property: [{ required: true, trigger: ['blur', 'change'], message: '请选择车辆性质' }] }, // 前端校验规则 carProperties: [], // 车辆性质字典值 staffList: [], // 车主人员列表 @@ -265,6 +268,10 @@ createData: function() { this.$refs['dataForm'].validate((valid) => { if (valid) { + if(this.dataForm.property === '1'){ + this.dataForm.deptid = '' + this.dataForm.ownerId = '' + } addCar(this.dataForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { @@ -296,6 +303,10 @@ updateData: function() { this.$refs['dataForm'].validate((valid) => { if (valid) { + if(this.dataForm.property === '1'){ + this.dataForm.deptid = '' + this.dataForm.ownerId = '' + } editCar(this.dataForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') diff --git a/src/views/car/carList.vue b/src/views/car/carList.vue index 0371607..af4aebc 100644 --- a/src/views/car/carList.vue +++ b/src/views/car/carList.vue @@ -131,7 +131,7 @@ width: 140 }, { - text: '车主联系电话', + text: '联系电话', value: 'phone', align: 'center' }, diff --git a/src/views/ctrl/overview.vue b/src/views/ctrl/overview.vue index e60f060..ae80c03 100644 --- a/src/views/ctrl/overview.vue +++ b/src/views/ctrl/overview.vue @@ -1121,15 +1121,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -1155,15 +1157,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/doorIndex.vue b/src/views/overview/doorIndex.vue index 7cd40ff..dd29616 100644 --- a/src/views/overview/doorIndex.vue +++ b/src/views/overview/doorIndex.vue @@ -636,15 +636,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -670,15 +672,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/fenceIndex.vue b/src/views/overview/fenceIndex.vue index 28d6ea5..e49500d 100644 --- a/src/views/overview/fenceIndex.vue +++ b/src/views/overview/fenceIndex.vue @@ -647,15 +647,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -681,15 +683,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/keyIndex.vue b/src/views/overview/keyIndex.vue index a461c94..d9dd4cc 100644 --- a/src/views/overview/keyIndex.vue +++ b/src/views/overview/keyIndex.vue @@ -687,7 +687,7 @@ // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -715,7 +715,7 @@ // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/regionIndex.vue b/src/views/overview/regionIndex.vue index d7f615e..4a3fcc5 100644 --- a/src/views/overview/regionIndex.vue +++ b/src/views/overview/regionIndex.vue @@ -657,15 +657,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -691,15 +693,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/staff/staffAdd.vue b/src/views/staff/staffAdd.vue index 902c565..8ebac8d 100644 --- a/src/views/staff/staffAdd.vue +++ b/src/views/staff/staffAdd.vue @@ -215,6 +215,7 @@ officePhone: [{ required: false, trigger: ['blur'], validator: phoneValidatorCanNull }], name: [{ required: true, message: '姓名必填', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '单位/部门必选', trigger: 'change' }], + staffType: [{ required: true, message: '人员类别必选', trigger: ['blur', 'change'] }], idCard: [{ required: true, trigger: ['blur', 'change'], validator: validateIDCard }] }, labelPosition: 'right', @@ -512,7 +513,7 @@ this.$message.error(response.message) } }).catch(() => { - this.$message.error('保存失败,服务器异常') + // this.$message.error('保存失败,服务器异常') }) } } diff --git a/src/views/alarm/alarmPosition.vue b/src/views/alarm/alarmPosition.vue index 2be4412..46cb2a9 100644 --- a/src/views/alarm/alarmPosition.vue +++ b/src/views/alarm/alarmPosition.vue @@ -258,7 +258,7 @@ this.showDevDetail = true let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/area/areaList.vue b/src/views/area/areaList.vue index d3ff751..d06cbdc 100644 --- a/src/views/area/areaList.vue +++ b/src/views/area/areaList.vue @@ -8,7 +8,7 @@ - + diff --git a/src/views/area/defenceList.vue b/src/views/area/defenceList.vue index cb9c4b8..c0ba6d4 100644 --- a/src/views/area/defenceList.vue +++ b/src/views/area/defenceList.vue @@ -151,13 +151,23 @@ id: row.id, status: '1' } - updateDefence(params).then(response => { - if (response.code === 200) { - this.$message.success('布防操作已成功') - this.fetchData(true) - } else { - this.$message.error('布防操作失败') + this.$confirm( + '确定要布防 ' + row.name + ' 吗?', + '确认操作', + { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' } + ).then(() => { + updateDefence(params).then(response => { + if (response.code === 200) { + this.$message.success('布防操作已成功') + this.fetchData(true) + } else { + this.$message.error('布防操作失败') + } + }) }) }, disableDefence(row) { diff --git a/src/views/car/carAdd.vue b/src/views/car/carAdd.vue index 565a614..902c28b 100644 --- a/src/views/car/carAdd.vue +++ b/src/views/car/carAdd.vue @@ -11,7 +11,7 @@ - + {{ item.name }} @@ -109,7 +109,10 @@ phone2: [{ required: false, trigger: ['blur'], validator: phoneValidatorCanNull }], phone: [{ required: true, trigger: ['blur', 'change'], validator: phoneValidator }], plateNumber: [{ required: true, trigger: ['blur', 'change'], validator: plateValidator }], - ownerId: [{ required: true, trigger: ['blur', 'change'], message: '请选择车主' }] + ownerId: [{ required: true, trigger: ['blur', 'change'], message: '请选择车主' }], + deptid: [{ required: true, trigger: ['blur', 'change'], message: '请选择所属部门' }], + carCardType: [{ required: true, trigger: ['blur', 'change'], message: '请选择车证种类' }], + property: [{ required: true, trigger: ['blur', 'change'], message: '请选择车辆性质' }] }, // 前端校验规则 carProperties: [], // 车辆性质字典值 staffList: [], // 车主人员列表 @@ -265,6 +268,10 @@ createData: function() { this.$refs['dataForm'].validate((valid) => { if (valid) { + if(this.dataForm.property === '1'){ + this.dataForm.deptid = '' + this.dataForm.ownerId = '' + } addCar(this.dataForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { @@ -296,6 +303,10 @@ updateData: function() { this.$refs['dataForm'].validate((valid) => { if (valid) { + if(this.dataForm.property === '1'){ + this.dataForm.deptid = '' + this.dataForm.ownerId = '' + } editCar(this.dataForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') diff --git a/src/views/car/carList.vue b/src/views/car/carList.vue index 0371607..af4aebc 100644 --- a/src/views/car/carList.vue +++ b/src/views/car/carList.vue @@ -131,7 +131,7 @@ width: 140 }, { - text: '车主联系电话', + text: '联系电话', value: 'phone', align: 'center' }, diff --git a/src/views/ctrl/overview.vue b/src/views/ctrl/overview.vue index e60f060..ae80c03 100644 --- a/src/views/ctrl/overview.vue +++ b/src/views/ctrl/overview.vue @@ -1121,15 +1121,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -1155,15 +1157,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/doorIndex.vue b/src/views/overview/doorIndex.vue index 7cd40ff..dd29616 100644 --- a/src/views/overview/doorIndex.vue +++ b/src/views/overview/doorIndex.vue @@ -636,15 +636,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -670,15 +672,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/fenceIndex.vue b/src/views/overview/fenceIndex.vue index 28d6ea5..e49500d 100644 --- a/src/views/overview/fenceIndex.vue +++ b/src/views/overview/fenceIndex.vue @@ -647,15 +647,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -681,15 +683,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/keyIndex.vue b/src/views/overview/keyIndex.vue index a461c94..d9dd4cc 100644 --- a/src/views/overview/keyIndex.vue +++ b/src/views/overview/keyIndex.vue @@ -687,7 +687,7 @@ // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -715,7 +715,7 @@ // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/regionIndex.vue b/src/views/overview/regionIndex.vue index d7f615e..4a3fcc5 100644 --- a/src/views/overview/regionIndex.vue +++ b/src/views/overview/regionIndex.vue @@ -657,15 +657,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -691,15 +693,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/staff/staffAdd.vue b/src/views/staff/staffAdd.vue index 902c565..8ebac8d 100644 --- a/src/views/staff/staffAdd.vue +++ b/src/views/staff/staffAdd.vue @@ -215,6 +215,7 @@ officePhone: [{ required: false, trigger: ['blur'], validator: phoneValidatorCanNull }], name: [{ required: true, message: '姓名必填', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '单位/部门必选', trigger: 'change' }], + staffType: [{ required: true, message: '人员类别必选', trigger: ['blur', 'change'] }], idCard: [{ required: true, trigger: ['blur', 'change'], validator: validateIDCard }] }, labelPosition: 'right', @@ -512,7 +513,7 @@ this.$message.error(response.message) } }).catch(() => { - this.$message.error('保存失败,服务器异常') + // this.$message.error('保存失败,服务器异常') }) } } diff --git a/src/views/staff/staffDetail.vue b/src/views/staff/staffDetail.vue index 2953355..68c165b 100644 --- a/src/views/staff/staffDetail.vue +++ b/src/views/staff/staffDetail.vue @@ -87,7 +87,7 @@ - {{ item.name }} + {{ item.name }} diff --git a/src/views/alarm/alarmPosition.vue b/src/views/alarm/alarmPosition.vue index 2be4412..46cb2a9 100644 --- a/src/views/alarm/alarmPosition.vue +++ b/src/views/alarm/alarmPosition.vue @@ -258,7 +258,7 @@ this.showDevDetail = true let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/area/areaList.vue b/src/views/area/areaList.vue index d3ff751..d06cbdc 100644 --- a/src/views/area/areaList.vue +++ b/src/views/area/areaList.vue @@ -8,7 +8,7 @@ - + diff --git a/src/views/area/defenceList.vue b/src/views/area/defenceList.vue index cb9c4b8..c0ba6d4 100644 --- a/src/views/area/defenceList.vue +++ b/src/views/area/defenceList.vue @@ -151,13 +151,23 @@ id: row.id, status: '1' } - updateDefence(params).then(response => { - if (response.code === 200) { - this.$message.success('布防操作已成功') - this.fetchData(true) - } else { - this.$message.error('布防操作失败') + this.$confirm( + '确定要布防 ' + row.name + ' 吗?', + '确认操作', + { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' } + ).then(() => { + updateDefence(params).then(response => { + if (response.code === 200) { + this.$message.success('布防操作已成功') + this.fetchData(true) + } else { + this.$message.error('布防操作失败') + } + }) }) }, disableDefence(row) { diff --git a/src/views/car/carAdd.vue b/src/views/car/carAdd.vue index 565a614..902c28b 100644 --- a/src/views/car/carAdd.vue +++ b/src/views/car/carAdd.vue @@ -11,7 +11,7 @@ - + {{ item.name }} @@ -109,7 +109,10 @@ phone2: [{ required: false, trigger: ['blur'], validator: phoneValidatorCanNull }], phone: [{ required: true, trigger: ['blur', 'change'], validator: phoneValidator }], plateNumber: [{ required: true, trigger: ['blur', 'change'], validator: plateValidator }], - ownerId: [{ required: true, trigger: ['blur', 'change'], message: '请选择车主' }] + ownerId: [{ required: true, trigger: ['blur', 'change'], message: '请选择车主' }], + deptid: [{ required: true, trigger: ['blur', 'change'], message: '请选择所属部门' }], + carCardType: [{ required: true, trigger: ['blur', 'change'], message: '请选择车证种类' }], + property: [{ required: true, trigger: ['blur', 'change'], message: '请选择车辆性质' }] }, // 前端校验规则 carProperties: [], // 车辆性质字典值 staffList: [], // 车主人员列表 @@ -265,6 +268,10 @@ createData: function() { this.$refs['dataForm'].validate((valid) => { if (valid) { + if(this.dataForm.property === '1'){ + this.dataForm.deptid = '' + this.dataForm.ownerId = '' + } addCar(this.dataForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { @@ -296,6 +303,10 @@ updateData: function() { this.$refs['dataForm'].validate((valid) => { if (valid) { + if(this.dataForm.property === '1'){ + this.dataForm.deptid = '' + this.dataForm.ownerId = '' + } editCar(this.dataForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') diff --git a/src/views/car/carList.vue b/src/views/car/carList.vue index 0371607..af4aebc 100644 --- a/src/views/car/carList.vue +++ b/src/views/car/carList.vue @@ -131,7 +131,7 @@ width: 140 }, { - text: '车主联系电话', + text: '联系电话', value: 'phone', align: 'center' }, diff --git a/src/views/ctrl/overview.vue b/src/views/ctrl/overview.vue index e60f060..ae80c03 100644 --- a/src/views/ctrl/overview.vue +++ b/src/views/ctrl/overview.vue @@ -1121,15 +1121,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -1155,15 +1157,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/doorIndex.vue b/src/views/overview/doorIndex.vue index 7cd40ff..dd29616 100644 --- a/src/views/overview/doorIndex.vue +++ b/src/views/overview/doorIndex.vue @@ -636,15 +636,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -670,15 +672,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/fenceIndex.vue b/src/views/overview/fenceIndex.vue index 28d6ea5..e49500d 100644 --- a/src/views/overview/fenceIndex.vue +++ b/src/views/overview/fenceIndex.vue @@ -647,15 +647,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -681,15 +683,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/keyIndex.vue b/src/views/overview/keyIndex.vue index a461c94..d9dd4cc 100644 --- a/src/views/overview/keyIndex.vue +++ b/src/views/overview/keyIndex.vue @@ -687,7 +687,7 @@ // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -715,7 +715,7 @@ // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/regionIndex.vue b/src/views/overview/regionIndex.vue index d7f615e..4a3fcc5 100644 --- a/src/views/overview/regionIndex.vue +++ b/src/views/overview/regionIndex.vue @@ -657,15 +657,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -691,15 +693,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/staff/staffAdd.vue b/src/views/staff/staffAdd.vue index 902c565..8ebac8d 100644 --- a/src/views/staff/staffAdd.vue +++ b/src/views/staff/staffAdd.vue @@ -215,6 +215,7 @@ officePhone: [{ required: false, trigger: ['blur'], validator: phoneValidatorCanNull }], name: [{ required: true, message: '姓名必填', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '单位/部门必选', trigger: 'change' }], + staffType: [{ required: true, message: '人员类别必选', trigger: ['blur', 'change'] }], idCard: [{ required: true, trigger: ['blur', 'change'], validator: validateIDCard }] }, labelPosition: 'right', @@ -512,7 +513,7 @@ this.$message.error(response.message) } }).catch(() => { - this.$message.error('保存失败,服务器异常') + // this.$message.error('保存失败,服务器异常') }) } } diff --git a/src/views/staff/staffDetail.vue b/src/views/staff/staffDetail.vue index 2953355..68c165b 100644 --- a/src/views/staff/staffDetail.vue +++ b/src/views/staff/staffDetail.vue @@ -87,7 +87,7 @@ - {{ item.name }} + {{ item.name }} diff --git a/src/views/staff/staffEdit.vue b/src/views/staff/staffEdit.vue index 76d3461..8abf5fa 100644 --- a/src/views/staff/staffEdit.vue +++ b/src/views/staff/staffEdit.vue @@ -224,6 +224,7 @@ officePhone: [{ required: false, trigger: ['blur'], validator: phoneValidatorCanNull }], name: [{ required: true, message: '姓名必填', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '单位/部门必选', trigger: 'change' }], + staffType: [{ required: true, message: '人员类别必选', trigger: ['blur', 'change'] }], idCard: [{ required: true, trigger: ['blur', 'change'], validator: validateIDCard }] }, labelPosition: 'right', diff --git a/src/views/alarm/alarmPosition.vue b/src/views/alarm/alarmPosition.vue index 2be4412..46cb2a9 100644 --- a/src/views/alarm/alarmPosition.vue +++ b/src/views/alarm/alarmPosition.vue @@ -258,7 +258,7 @@ this.showDevDetail = true let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/area/areaList.vue b/src/views/area/areaList.vue index d3ff751..d06cbdc 100644 --- a/src/views/area/areaList.vue +++ b/src/views/area/areaList.vue @@ -8,7 +8,7 @@ - + diff --git a/src/views/area/defenceList.vue b/src/views/area/defenceList.vue index cb9c4b8..c0ba6d4 100644 --- a/src/views/area/defenceList.vue +++ b/src/views/area/defenceList.vue @@ -151,13 +151,23 @@ id: row.id, status: '1' } - updateDefence(params).then(response => { - if (response.code === 200) { - this.$message.success('布防操作已成功') - this.fetchData(true) - } else { - this.$message.error('布防操作失败') + this.$confirm( + '确定要布防 ' + row.name + ' 吗?', + '确认操作', + { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' } + ).then(() => { + updateDefence(params).then(response => { + if (response.code === 200) { + this.$message.success('布防操作已成功') + this.fetchData(true) + } else { + this.$message.error('布防操作失败') + } + }) }) }, disableDefence(row) { diff --git a/src/views/car/carAdd.vue b/src/views/car/carAdd.vue index 565a614..902c28b 100644 --- a/src/views/car/carAdd.vue +++ b/src/views/car/carAdd.vue @@ -11,7 +11,7 @@ - + {{ item.name }} @@ -109,7 +109,10 @@ phone2: [{ required: false, trigger: ['blur'], validator: phoneValidatorCanNull }], phone: [{ required: true, trigger: ['blur', 'change'], validator: phoneValidator }], plateNumber: [{ required: true, trigger: ['blur', 'change'], validator: plateValidator }], - ownerId: [{ required: true, trigger: ['blur', 'change'], message: '请选择车主' }] + ownerId: [{ required: true, trigger: ['blur', 'change'], message: '请选择车主' }], + deptid: [{ required: true, trigger: ['blur', 'change'], message: '请选择所属部门' }], + carCardType: [{ required: true, trigger: ['blur', 'change'], message: '请选择车证种类' }], + property: [{ required: true, trigger: ['blur', 'change'], message: '请选择车辆性质' }] }, // 前端校验规则 carProperties: [], // 车辆性质字典值 staffList: [], // 车主人员列表 @@ -265,6 +268,10 @@ createData: function() { this.$refs['dataForm'].validate((valid) => { if (valid) { + if(this.dataForm.property === '1'){ + this.dataForm.deptid = '' + this.dataForm.ownerId = '' + } addCar(this.dataForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { @@ -296,6 +303,10 @@ updateData: function() { this.$refs['dataForm'].validate((valid) => { if (valid) { + if(this.dataForm.property === '1'){ + this.dataForm.deptid = '' + this.dataForm.ownerId = '' + } editCar(this.dataForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') diff --git a/src/views/car/carList.vue b/src/views/car/carList.vue index 0371607..af4aebc 100644 --- a/src/views/car/carList.vue +++ b/src/views/car/carList.vue @@ -131,7 +131,7 @@ width: 140 }, { - text: '车主联系电话', + text: '联系电话', value: 'phone', align: 'center' }, diff --git a/src/views/ctrl/overview.vue b/src/views/ctrl/overview.vue index e60f060..ae80c03 100644 --- a/src/views/ctrl/overview.vue +++ b/src/views/ctrl/overview.vue @@ -1121,15 +1121,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -1155,15 +1157,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/doorIndex.vue b/src/views/overview/doorIndex.vue index 7cd40ff..dd29616 100644 --- a/src/views/overview/doorIndex.vue +++ b/src/views/overview/doorIndex.vue @@ -636,15 +636,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -670,15 +672,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/fenceIndex.vue b/src/views/overview/fenceIndex.vue index 28d6ea5..e49500d 100644 --- a/src/views/overview/fenceIndex.vue +++ b/src/views/overview/fenceIndex.vue @@ -647,15 +647,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -681,15 +683,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/keyIndex.vue b/src/views/overview/keyIndex.vue index a461c94..d9dd4cc 100644 --- a/src/views/overview/keyIndex.vue +++ b/src/views/overview/keyIndex.vue @@ -687,7 +687,7 @@ // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -715,7 +715,7 @@ // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/regionIndex.vue b/src/views/overview/regionIndex.vue index d7f615e..4a3fcc5 100644 --- a/src/views/overview/regionIndex.vue +++ b/src/views/overview/regionIndex.vue @@ -657,15 +657,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -691,15 +693,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/staff/staffAdd.vue b/src/views/staff/staffAdd.vue index 902c565..8ebac8d 100644 --- a/src/views/staff/staffAdd.vue +++ b/src/views/staff/staffAdd.vue @@ -215,6 +215,7 @@ officePhone: [{ required: false, trigger: ['blur'], validator: phoneValidatorCanNull }], name: [{ required: true, message: '姓名必填', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '单位/部门必选', trigger: 'change' }], + staffType: [{ required: true, message: '人员类别必选', trigger: ['blur', 'change'] }], idCard: [{ required: true, trigger: ['blur', 'change'], validator: validateIDCard }] }, labelPosition: 'right', @@ -512,7 +513,7 @@ this.$message.error(response.message) } }).catch(() => { - this.$message.error('保存失败,服务器异常') + // this.$message.error('保存失败,服务器异常') }) } } diff --git a/src/views/staff/staffDetail.vue b/src/views/staff/staffDetail.vue index 2953355..68c165b 100644 --- a/src/views/staff/staffDetail.vue +++ b/src/views/staff/staffDetail.vue @@ -87,7 +87,7 @@ - {{ item.name }} + {{ item.name }} diff --git a/src/views/staff/staffEdit.vue b/src/views/staff/staffEdit.vue index 76d3461..8abf5fa 100644 --- a/src/views/staff/staffEdit.vue +++ b/src/views/staff/staffEdit.vue @@ -224,6 +224,7 @@ officePhone: [{ required: false, trigger: ['blur'], validator: phoneValidatorCanNull }], name: [{ required: true, message: '姓名必填', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '单位/部门必选', trigger: 'change' }], + staffType: [{ required: true, message: '人员类别必选', trigger: ['blur', 'change'] }], idCard: [{ required: true, trigger: ['blur', 'change'], validator: validateIDCard }] }, labelPosition: 'right', diff --git a/src/views/statistics/doorCount.vue b/src/views/statistics/doorCount.vue index 0bb9f3c..69ef264 100644 --- a/src/views/statistics/doorCount.vue +++ b/src/views/statistics/doorCount.vue @@ -28,7 +28,7 @@ - + @@ -57,7 +57,7 @@ - + @@ -154,11 +154,7 @@ start.setTime(start.getTime() - oneDayTime * 30) picker.$emit('pick', [start, end]) } - }], - disabledDate(time) { - const oneMonthLater = new Date(now.getTime() - (oneDayTime * 31)) - return time.getTime() < oneMonthLater - } + }] } } }, diff --git a/src/views/alarm/alarmPosition.vue b/src/views/alarm/alarmPosition.vue index 2be4412..46cb2a9 100644 --- a/src/views/alarm/alarmPosition.vue +++ b/src/views/alarm/alarmPosition.vue @@ -258,7 +258,7 @@ this.showDevDetail = true let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/area/areaList.vue b/src/views/area/areaList.vue index d3ff751..d06cbdc 100644 --- a/src/views/area/areaList.vue +++ b/src/views/area/areaList.vue @@ -8,7 +8,7 @@ - + diff --git a/src/views/area/defenceList.vue b/src/views/area/defenceList.vue index cb9c4b8..c0ba6d4 100644 --- a/src/views/area/defenceList.vue +++ b/src/views/area/defenceList.vue @@ -151,13 +151,23 @@ id: row.id, status: '1' } - updateDefence(params).then(response => { - if (response.code === 200) { - this.$message.success('布防操作已成功') - this.fetchData(true) - } else { - this.$message.error('布防操作失败') + this.$confirm( + '确定要布防 ' + row.name + ' 吗?', + '确认操作', + { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' } + ).then(() => { + updateDefence(params).then(response => { + if (response.code === 200) { + this.$message.success('布防操作已成功') + this.fetchData(true) + } else { + this.$message.error('布防操作失败') + } + }) }) }, disableDefence(row) { diff --git a/src/views/car/carAdd.vue b/src/views/car/carAdd.vue index 565a614..902c28b 100644 --- a/src/views/car/carAdd.vue +++ b/src/views/car/carAdd.vue @@ -11,7 +11,7 @@ - + {{ item.name }} @@ -109,7 +109,10 @@ phone2: [{ required: false, trigger: ['blur'], validator: phoneValidatorCanNull }], phone: [{ required: true, trigger: ['blur', 'change'], validator: phoneValidator }], plateNumber: [{ required: true, trigger: ['blur', 'change'], validator: plateValidator }], - ownerId: [{ required: true, trigger: ['blur', 'change'], message: '请选择车主' }] + ownerId: [{ required: true, trigger: ['blur', 'change'], message: '请选择车主' }], + deptid: [{ required: true, trigger: ['blur', 'change'], message: '请选择所属部门' }], + carCardType: [{ required: true, trigger: ['blur', 'change'], message: '请选择车证种类' }], + property: [{ required: true, trigger: ['blur', 'change'], message: '请选择车辆性质' }] }, // 前端校验规则 carProperties: [], // 车辆性质字典值 staffList: [], // 车主人员列表 @@ -265,6 +268,10 @@ createData: function() { this.$refs['dataForm'].validate((valid) => { if (valid) { + if(this.dataForm.property === '1'){ + this.dataForm.deptid = '' + this.dataForm.ownerId = '' + } addCar(this.dataForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { @@ -296,6 +303,10 @@ updateData: function() { this.$refs['dataForm'].validate((valid) => { if (valid) { + if(this.dataForm.property === '1'){ + this.dataForm.deptid = '' + this.dataForm.ownerId = '' + } editCar(this.dataForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') diff --git a/src/views/car/carList.vue b/src/views/car/carList.vue index 0371607..af4aebc 100644 --- a/src/views/car/carList.vue +++ b/src/views/car/carList.vue @@ -131,7 +131,7 @@ width: 140 }, { - text: '车主联系电话', + text: '联系电话', value: 'phone', align: 'center' }, diff --git a/src/views/ctrl/overview.vue b/src/views/ctrl/overview.vue index e60f060..ae80c03 100644 --- a/src/views/ctrl/overview.vue +++ b/src/views/ctrl/overview.vue @@ -1121,15 +1121,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -1155,15 +1157,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/doorIndex.vue b/src/views/overview/doorIndex.vue index 7cd40ff..dd29616 100644 --- a/src/views/overview/doorIndex.vue +++ b/src/views/overview/doorIndex.vue @@ -636,15 +636,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -670,15 +672,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/fenceIndex.vue b/src/views/overview/fenceIndex.vue index 28d6ea5..e49500d 100644 --- a/src/views/overview/fenceIndex.vue +++ b/src/views/overview/fenceIndex.vue @@ -647,15 +647,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -681,15 +683,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/keyIndex.vue b/src/views/overview/keyIndex.vue index a461c94..d9dd4cc 100644 --- a/src/views/overview/keyIndex.vue +++ b/src/views/overview/keyIndex.vue @@ -687,7 +687,7 @@ // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -715,7 +715,7 @@ // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/regionIndex.vue b/src/views/overview/regionIndex.vue index d7f615e..4a3fcc5 100644 --- a/src/views/overview/regionIndex.vue +++ b/src/views/overview/regionIndex.vue @@ -657,15 +657,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -691,15 +693,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/staff/staffAdd.vue b/src/views/staff/staffAdd.vue index 902c565..8ebac8d 100644 --- a/src/views/staff/staffAdd.vue +++ b/src/views/staff/staffAdd.vue @@ -215,6 +215,7 @@ officePhone: [{ required: false, trigger: ['blur'], validator: phoneValidatorCanNull }], name: [{ required: true, message: '姓名必填', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '单位/部门必选', trigger: 'change' }], + staffType: [{ required: true, message: '人员类别必选', trigger: ['blur', 'change'] }], idCard: [{ required: true, trigger: ['blur', 'change'], validator: validateIDCard }] }, labelPosition: 'right', @@ -512,7 +513,7 @@ this.$message.error(response.message) } }).catch(() => { - this.$message.error('保存失败,服务器异常') + // this.$message.error('保存失败,服务器异常') }) } } diff --git a/src/views/staff/staffDetail.vue b/src/views/staff/staffDetail.vue index 2953355..68c165b 100644 --- a/src/views/staff/staffDetail.vue +++ b/src/views/staff/staffDetail.vue @@ -87,7 +87,7 @@ - {{ item.name }} + {{ item.name }} diff --git a/src/views/staff/staffEdit.vue b/src/views/staff/staffEdit.vue index 76d3461..8abf5fa 100644 --- a/src/views/staff/staffEdit.vue +++ b/src/views/staff/staffEdit.vue @@ -224,6 +224,7 @@ officePhone: [{ required: false, trigger: ['blur'], validator: phoneValidatorCanNull }], name: [{ required: true, message: '姓名必填', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '单位/部门必选', trigger: 'change' }], + staffType: [{ required: true, message: '人员类别必选', trigger: ['blur', 'change'] }], idCard: [{ required: true, trigger: ['blur', 'change'], validator: validateIDCard }] }, labelPosition: 'right', diff --git a/src/views/statistics/doorCount.vue b/src/views/statistics/doorCount.vue index 0bb9f3c..69ef264 100644 --- a/src/views/statistics/doorCount.vue +++ b/src/views/statistics/doorCount.vue @@ -28,7 +28,7 @@ - + @@ -57,7 +57,7 @@ - + @@ -154,11 +154,7 @@ start.setTime(start.getTime() - oneDayTime * 30) picker.$emit('pick', [start, end]) } - }], - disabledDate(time) { - const oneMonthLater = new Date(now.getTime() - (oneDayTime * 31)) - return time.getTime() < oneMonthLater - } + }] } } }, diff --git a/src/views/visitor/visitorAdd.vue b/src/views/visitor/visitorAdd.vue index 2dc8ec4..1f90103 100644 --- a/src/views/visitor/visitorAdd.vue +++ b/src/views/visitor/visitorAdd.vue @@ -312,14 +312,14 @@ }) }).catch(() => { const code = this.$store.getters.currentSystem.code - this.$router.replace({ path: '/' + code + '/visitor/list' }) + this.$router.replace({ path: '/' + code + '/visitor/today' }) }) } else { this.$message.error(response.message) this.btnLoading = false } }).catch(() => { - this.$message.error('保存失败,服务器异常') + // this.$message.error('保存失败,服务器异常') }) } }) diff --git a/src/views/alarm/alarmPosition.vue b/src/views/alarm/alarmPosition.vue index 2be4412..46cb2a9 100644 --- a/src/views/alarm/alarmPosition.vue +++ b/src/views/alarm/alarmPosition.vue @@ -258,7 +258,7 @@ this.showDevDetail = true let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/area/areaList.vue b/src/views/area/areaList.vue index d3ff751..d06cbdc 100644 --- a/src/views/area/areaList.vue +++ b/src/views/area/areaList.vue @@ -8,7 +8,7 @@ - + diff --git a/src/views/area/defenceList.vue b/src/views/area/defenceList.vue index cb9c4b8..c0ba6d4 100644 --- a/src/views/area/defenceList.vue +++ b/src/views/area/defenceList.vue @@ -151,13 +151,23 @@ id: row.id, status: '1' } - updateDefence(params).then(response => { - if (response.code === 200) { - this.$message.success('布防操作已成功') - this.fetchData(true) - } else { - this.$message.error('布防操作失败') + this.$confirm( + '确定要布防 ' + row.name + ' 吗?', + '确认操作', + { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' } + ).then(() => { + updateDefence(params).then(response => { + if (response.code === 200) { + this.$message.success('布防操作已成功') + this.fetchData(true) + } else { + this.$message.error('布防操作失败') + } + }) }) }, disableDefence(row) { diff --git a/src/views/car/carAdd.vue b/src/views/car/carAdd.vue index 565a614..902c28b 100644 --- a/src/views/car/carAdd.vue +++ b/src/views/car/carAdd.vue @@ -11,7 +11,7 @@ - + {{ item.name }} @@ -109,7 +109,10 @@ phone2: [{ required: false, trigger: ['blur'], validator: phoneValidatorCanNull }], phone: [{ required: true, trigger: ['blur', 'change'], validator: phoneValidator }], plateNumber: [{ required: true, trigger: ['blur', 'change'], validator: plateValidator }], - ownerId: [{ required: true, trigger: ['blur', 'change'], message: '请选择车主' }] + ownerId: [{ required: true, trigger: ['blur', 'change'], message: '请选择车主' }], + deptid: [{ required: true, trigger: ['blur', 'change'], message: '请选择所属部门' }], + carCardType: [{ required: true, trigger: ['blur', 'change'], message: '请选择车证种类' }], + property: [{ required: true, trigger: ['blur', 'change'], message: '请选择车辆性质' }] }, // 前端校验规则 carProperties: [], // 车辆性质字典值 staffList: [], // 车主人员列表 @@ -265,6 +268,10 @@ createData: function() { this.$refs['dataForm'].validate((valid) => { if (valid) { + if(this.dataForm.property === '1'){ + this.dataForm.deptid = '' + this.dataForm.ownerId = '' + } addCar(this.dataForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { @@ -296,6 +303,10 @@ updateData: function() { this.$refs['dataForm'].validate((valid) => { if (valid) { + if(this.dataForm.property === '1'){ + this.dataForm.deptid = '' + this.dataForm.ownerId = '' + } editCar(this.dataForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') diff --git a/src/views/car/carList.vue b/src/views/car/carList.vue index 0371607..af4aebc 100644 --- a/src/views/car/carList.vue +++ b/src/views/car/carList.vue @@ -131,7 +131,7 @@ width: 140 }, { - text: '车主联系电话', + text: '联系电话', value: 'phone', align: 'center' }, diff --git a/src/views/ctrl/overview.vue b/src/views/ctrl/overview.vue index e60f060..ae80c03 100644 --- a/src/views/ctrl/overview.vue +++ b/src/views/ctrl/overview.vue @@ -1121,15 +1121,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -1155,15 +1157,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/doorIndex.vue b/src/views/overview/doorIndex.vue index 7cd40ff..dd29616 100644 --- a/src/views/overview/doorIndex.vue +++ b/src/views/overview/doorIndex.vue @@ -636,15 +636,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -670,15 +672,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/fenceIndex.vue b/src/views/overview/fenceIndex.vue index 28d6ea5..e49500d 100644 --- a/src/views/overview/fenceIndex.vue +++ b/src/views/overview/fenceIndex.vue @@ -647,15 +647,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -681,15 +683,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/keyIndex.vue b/src/views/overview/keyIndex.vue index a461c94..d9dd4cc 100644 --- a/src/views/overview/keyIndex.vue +++ b/src/views/overview/keyIndex.vue @@ -687,7 +687,7 @@ // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -715,7 +715,7 @@ // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/regionIndex.vue b/src/views/overview/regionIndex.vue index d7f615e..4a3fcc5 100644 --- a/src/views/overview/regionIndex.vue +++ b/src/views/overview/regionIndex.vue @@ -657,15 +657,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -691,15 +693,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/staff/staffAdd.vue b/src/views/staff/staffAdd.vue index 902c565..8ebac8d 100644 --- a/src/views/staff/staffAdd.vue +++ b/src/views/staff/staffAdd.vue @@ -215,6 +215,7 @@ officePhone: [{ required: false, trigger: ['blur'], validator: phoneValidatorCanNull }], name: [{ required: true, message: '姓名必填', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '单位/部门必选', trigger: 'change' }], + staffType: [{ required: true, message: '人员类别必选', trigger: ['blur', 'change'] }], idCard: [{ required: true, trigger: ['blur', 'change'], validator: validateIDCard }] }, labelPosition: 'right', @@ -512,7 +513,7 @@ this.$message.error(response.message) } }).catch(() => { - this.$message.error('保存失败,服务器异常') + // this.$message.error('保存失败,服务器异常') }) } } diff --git a/src/views/staff/staffDetail.vue b/src/views/staff/staffDetail.vue index 2953355..68c165b 100644 --- a/src/views/staff/staffDetail.vue +++ b/src/views/staff/staffDetail.vue @@ -87,7 +87,7 @@ - {{ item.name }} + {{ item.name }} diff --git a/src/views/staff/staffEdit.vue b/src/views/staff/staffEdit.vue index 76d3461..8abf5fa 100644 --- a/src/views/staff/staffEdit.vue +++ b/src/views/staff/staffEdit.vue @@ -224,6 +224,7 @@ officePhone: [{ required: false, trigger: ['blur'], validator: phoneValidatorCanNull }], name: [{ required: true, message: '姓名必填', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '单位/部门必选', trigger: 'change' }], + staffType: [{ required: true, message: '人员类别必选', trigger: ['blur', 'change'] }], idCard: [{ required: true, trigger: ['blur', 'change'], validator: validateIDCard }] }, labelPosition: 'right', diff --git a/src/views/statistics/doorCount.vue b/src/views/statistics/doorCount.vue index 0bb9f3c..69ef264 100644 --- a/src/views/statistics/doorCount.vue +++ b/src/views/statistics/doorCount.vue @@ -28,7 +28,7 @@ - + @@ -57,7 +57,7 @@ - + @@ -154,11 +154,7 @@ start.setTime(start.getTime() - oneDayTime * 30) picker.$emit('pick', [start, end]) } - }], - disabledDate(time) { - const oneMonthLater = new Date(now.getTime() - (oneDayTime * 31)) - return time.getTime() < oneMonthLater - } + }] } } }, diff --git a/src/views/visitor/visitorAdd.vue b/src/views/visitor/visitorAdd.vue index 2dc8ec4..1f90103 100644 --- a/src/views/visitor/visitorAdd.vue +++ b/src/views/visitor/visitorAdd.vue @@ -312,14 +312,14 @@ }) }).catch(() => { const code = this.$store.getters.currentSystem.code - this.$router.replace({ path: '/' + code + '/visitor/list' }) + this.$router.replace({ path: '/' + code + '/visitor/today' }) }) } else { this.$message.error(response.message) this.btnLoading = false } }).catch(() => { - this.$message.error('保存失败,服务器异常') + // this.$message.error('保存失败,服务器异常') }) } }) diff --git a/src/views/visitor/visitorAddCar.vue b/src/views/visitor/visitorAddCar.vue index e92416a..6b1bdf4 100644 --- a/src/views/visitor/visitorAddCar.vue +++ b/src/views/visitor/visitorAddCar.vue @@ -365,8 +365,10 @@ } if (this.dataForm.visitorBaseDTOList.length === 0) { this.$message.error('来访人员列表不能为空') + this.btnLoading = false } if (this.hasOneCar === false) { this.$message.error('来访车辆列表不能为空') + this.btnLoading = false } else if (valid) { this.dataForm.visitTime = formatToString(now, 'SECOND') addVisitorCarAndPerson(this.dataForm).then(response => { @@ -381,17 +383,22 @@ }).then(() => { this.$nextTick(() => { this.$refs['dataForm'].clearValidate() + leftCarport().then(response => { + this.carNum = response.data + }) + this.resetForm() + this.initDateRange() }) }).catch(() => { const code = this.$store.getters.currentSystem.code - this.$router.push({ path: '/' + code + '/visitor/list' }) + this.$router.push({ path: '/' + code + '/visitor/carToday' }) }) } else { this.$message.error(response.message) this.btnLoading = false } }).catch(() => { - this.$message.error('保存失败,服务器异常') + // this.$message.error('保存失败,服务器异常') this.btnLoading = false }) } diff --git a/src/views/alarm/alarmPosition.vue b/src/views/alarm/alarmPosition.vue index 2be4412..46cb2a9 100644 --- a/src/views/alarm/alarmPosition.vue +++ b/src/views/alarm/alarmPosition.vue @@ -258,7 +258,7 @@ this.showDevDetail = true let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/area/areaList.vue b/src/views/area/areaList.vue index d3ff751..d06cbdc 100644 --- a/src/views/area/areaList.vue +++ b/src/views/area/areaList.vue @@ -8,7 +8,7 @@ - + diff --git a/src/views/area/defenceList.vue b/src/views/area/defenceList.vue index cb9c4b8..c0ba6d4 100644 --- a/src/views/area/defenceList.vue +++ b/src/views/area/defenceList.vue @@ -151,13 +151,23 @@ id: row.id, status: '1' } - updateDefence(params).then(response => { - if (response.code === 200) { - this.$message.success('布防操作已成功') - this.fetchData(true) - } else { - this.$message.error('布防操作失败') + this.$confirm( + '确定要布防 ' + row.name + ' 吗?', + '确认操作', + { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' } + ).then(() => { + updateDefence(params).then(response => { + if (response.code === 200) { + this.$message.success('布防操作已成功') + this.fetchData(true) + } else { + this.$message.error('布防操作失败') + } + }) }) }, disableDefence(row) { diff --git a/src/views/car/carAdd.vue b/src/views/car/carAdd.vue index 565a614..902c28b 100644 --- a/src/views/car/carAdd.vue +++ b/src/views/car/carAdd.vue @@ -11,7 +11,7 @@ - + {{ item.name }} @@ -109,7 +109,10 @@ phone2: [{ required: false, trigger: ['blur'], validator: phoneValidatorCanNull }], phone: [{ required: true, trigger: ['blur', 'change'], validator: phoneValidator }], plateNumber: [{ required: true, trigger: ['blur', 'change'], validator: plateValidator }], - ownerId: [{ required: true, trigger: ['blur', 'change'], message: '请选择车主' }] + ownerId: [{ required: true, trigger: ['blur', 'change'], message: '请选择车主' }], + deptid: [{ required: true, trigger: ['blur', 'change'], message: '请选择所属部门' }], + carCardType: [{ required: true, trigger: ['blur', 'change'], message: '请选择车证种类' }], + property: [{ required: true, trigger: ['blur', 'change'], message: '请选择车辆性质' }] }, // 前端校验规则 carProperties: [], // 车辆性质字典值 staffList: [], // 车主人员列表 @@ -265,6 +268,10 @@ createData: function() { this.$refs['dataForm'].validate((valid) => { if (valid) { + if(this.dataForm.property === '1'){ + this.dataForm.deptid = '' + this.dataForm.ownerId = '' + } addCar(this.dataForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { @@ -296,6 +303,10 @@ updateData: function() { this.$refs['dataForm'].validate((valid) => { if (valid) { + if(this.dataForm.property === '1'){ + this.dataForm.deptid = '' + this.dataForm.ownerId = '' + } editCar(this.dataForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') diff --git a/src/views/car/carList.vue b/src/views/car/carList.vue index 0371607..af4aebc 100644 --- a/src/views/car/carList.vue +++ b/src/views/car/carList.vue @@ -131,7 +131,7 @@ width: 140 }, { - text: '车主联系电话', + text: '联系电话', value: 'phone', align: 'center' }, diff --git a/src/views/ctrl/overview.vue b/src/views/ctrl/overview.vue index e60f060..ae80c03 100644 --- a/src/views/ctrl/overview.vue +++ b/src/views/ctrl/overview.vue @@ -1121,15 +1121,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -1155,15 +1157,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/doorIndex.vue b/src/views/overview/doorIndex.vue index 7cd40ff..dd29616 100644 --- a/src/views/overview/doorIndex.vue +++ b/src/views/overview/doorIndex.vue @@ -636,15 +636,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -670,15 +672,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/fenceIndex.vue b/src/views/overview/fenceIndex.vue index 28d6ea5..e49500d 100644 --- a/src/views/overview/fenceIndex.vue +++ b/src/views/overview/fenceIndex.vue @@ -647,15 +647,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -681,15 +683,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/keyIndex.vue b/src/views/overview/keyIndex.vue index a461c94..d9dd4cc 100644 --- a/src/views/overview/keyIndex.vue +++ b/src/views/overview/keyIndex.vue @@ -687,7 +687,7 @@ // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -715,7 +715,7 @@ // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/overview/regionIndex.vue b/src/views/overview/regionIndex.vue index d7f615e..4a3fcc5 100644 --- a/src/views/overview/regionIndex.vue +++ b/src/views/overview/regionIndex.vue @@ -657,15 +657,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' - this.$refs['alarm-detail-block'].style.top = event.clientY + 'px' + this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['alarm-detail-block'].style.position = 'absolute' this.$refs['alarm-detail-block'].style.top = top + 'px' this.$refs['alarm-detail-block'].style.left = targetDev.style.left @@ -691,15 +693,17 @@ } }) if(event.target.id.startsWith('click')){ + let top = event.clientY + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' - this.$refs['dev-detail-block'].style.top = event.clientY + 'px' + this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = event.clientX + 'px' return } // 弹窗显示设备详情 const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) - //top = top + 100 + if(top>550) top-=100 this.$refs['dev-detail-block'].style.position = 'absolute' this.$refs['dev-detail-block'].style.top = top + 'px' this.$refs['dev-detail-block'].style.left = targetDev.style.left diff --git a/src/views/staff/staffAdd.vue b/src/views/staff/staffAdd.vue index 902c565..8ebac8d 100644 --- a/src/views/staff/staffAdd.vue +++ b/src/views/staff/staffAdd.vue @@ -215,6 +215,7 @@ officePhone: [{ required: false, trigger: ['blur'], validator: phoneValidatorCanNull }], name: [{ required: true, message: '姓名必填', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '单位/部门必选', trigger: 'change' }], + staffType: [{ required: true, message: '人员类别必选', trigger: ['blur', 'change'] }], idCard: [{ required: true, trigger: ['blur', 'change'], validator: validateIDCard }] }, labelPosition: 'right', @@ -512,7 +513,7 @@ this.$message.error(response.message) } }).catch(() => { - this.$message.error('保存失败,服务器异常') + // this.$message.error('保存失败,服务器异常') }) } } diff --git a/src/views/staff/staffDetail.vue b/src/views/staff/staffDetail.vue index 2953355..68c165b 100644 --- a/src/views/staff/staffDetail.vue +++ b/src/views/staff/staffDetail.vue @@ -87,7 +87,7 @@ - {{ item.name }} + {{ item.name }} diff --git a/src/views/staff/staffEdit.vue b/src/views/staff/staffEdit.vue index 76d3461..8abf5fa 100644 --- a/src/views/staff/staffEdit.vue +++ b/src/views/staff/staffEdit.vue @@ -224,6 +224,7 @@ officePhone: [{ required: false, trigger: ['blur'], validator: phoneValidatorCanNull }], name: [{ required: true, message: '姓名必填', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '单位/部门必选', trigger: 'change' }], + staffType: [{ required: true, message: '人员类别必选', trigger: ['blur', 'change'] }], idCard: [{ required: true, trigger: ['blur', 'change'], validator: validateIDCard }] }, labelPosition: 'right', diff --git a/src/views/statistics/doorCount.vue b/src/views/statistics/doorCount.vue index 0bb9f3c..69ef264 100644 --- a/src/views/statistics/doorCount.vue +++ b/src/views/statistics/doorCount.vue @@ -28,7 +28,7 @@ - + @@ -57,7 +57,7 @@ - + @@ -154,11 +154,7 @@ start.setTime(start.getTime() - oneDayTime * 30) picker.$emit('pick', [start, end]) } - }], - disabledDate(time) { - const oneMonthLater = new Date(now.getTime() - (oneDayTime * 31)) - return time.getTime() < oneMonthLater - } + }] } } }, diff --git a/src/views/visitor/visitorAdd.vue b/src/views/visitor/visitorAdd.vue index 2dc8ec4..1f90103 100644 --- a/src/views/visitor/visitorAdd.vue +++ b/src/views/visitor/visitorAdd.vue @@ -312,14 +312,14 @@ }) }).catch(() => { const code = this.$store.getters.currentSystem.code - this.$router.replace({ path: '/' + code + '/visitor/list' }) + this.$router.replace({ path: '/' + code + '/visitor/today' }) }) } else { this.$message.error(response.message) this.btnLoading = false } }).catch(() => { - this.$message.error('保存失败,服务器异常') + // this.$message.error('保存失败,服务器异常') }) } }) diff --git a/src/views/visitor/visitorAddCar.vue b/src/views/visitor/visitorAddCar.vue index e92416a..6b1bdf4 100644 --- a/src/views/visitor/visitorAddCar.vue +++ b/src/views/visitor/visitorAddCar.vue @@ -365,8 +365,10 @@ } if (this.dataForm.visitorBaseDTOList.length === 0) { this.$message.error('来访人员列表不能为空') + this.btnLoading = false } if (this.hasOneCar === false) { this.$message.error('来访车辆列表不能为空') + this.btnLoading = false } else if (valid) { this.dataForm.visitTime = formatToString(now, 'SECOND') addVisitorCarAndPerson(this.dataForm).then(response => { @@ -381,17 +383,22 @@ }).then(() => { this.$nextTick(() => { this.$refs['dataForm'].clearValidate() + leftCarport().then(response => { + this.carNum = response.data + }) + this.resetForm() + this.initDateRange() }) }).catch(() => { const code = this.$store.getters.currentSystem.code - this.$router.push({ path: '/' + code + '/visitor/list' }) + this.$router.push({ path: '/' + code + '/visitor/carToday' }) }) } else { this.$message.error(response.message) this.btnLoading = false } }).catch(() => { - this.$message.error('保存失败,服务器异常') + // this.$message.error('保存失败,服务器异常') this.btnLoading = false }) } diff --git a/src/views/visitor/visitorTrace.vue b/src/views/visitor/visitorTrace.vue index 0ce5b60..78fbc2c 100644 --- a/src/views/visitor/visitorTrace.vue +++ b/src/views/visitor/visitorTrace.vue @@ -24,7 +24,7 @@
- +
-
+
- - - -
+ @@ -61,6 +61,7 @@ dialogFormVisible: false, // 对话框是否显示 list:[], showVideo:false, + showPic:false, devListParams: { picture: '1', deviceTypes: '4,5,8,9,10,11,12,7' @@ -102,8 +103,12 @@ } }, methods: { + showLarge(){ + this.showPic = true + }, showDetail(dev, event) { this.showVideo = false + this.showPic = false const targetDev = event.currentTarget // 取到点击到的设备图标div let top = parseInt(targetDev.style.top.substring(0, targetDev.style.top.length - 2)) let left = parseInt(targetDev.style.left.substring(0, targetDev.style.left.length - 2)) @@ -141,6 +146,7 @@ this.type = dialogStatus this.dialogFormVisible = dialogFormVisible this.showVideo = false + this.showPic = false this.picList = [] // setTimeout(() => { // window.frames['playHK'].initPlugin('real',document.getElementById("tabDiv").getBoundingClientRect().left) @@ -157,6 +163,8 @@ this.search() }, play(){ + this.showPic = false; + // this.showVideo = false; this.step = 0 var that = this if(this.timer!==null){ @@ -173,6 +181,8 @@ }, search() { this.list = [] + this.showPic = false; + this.showVideo = false; var that = this if(this.timer!==null){ clearInterval(this.timer) @@ -186,7 +196,9 @@ if (dev.x !== '' && dev.y !== '') { dev.imgUrl = require("../../assets/overview_images/point-green.png") } - this.picList.push(dev.bkgPicture) + if(dev.bkgPicture!==''){ + this.picList.push(dev.bkgPicture) + } }) } else { this.$message.error(response.message)