|
|
@@ -21,7 +21,7 @@
|
|
|
</div>
|
|
|
|
|
|
<div v-else>
|
|
|
- <van-collapse-item :name="item.hostId" v-for="item in hostList" :key="item.hostId">
|
|
|
+ <!-- <van-collapse-item :name="item.hostId" v-for="item in hostList" :key="item.hostId">
|
|
|
<template #title>
|
|
|
<div class="textTitle">{{ item.hostName }}</div>
|
|
|
</template>
|
|
|
@@ -32,7 +32,18 @@
|
|
|
:hostId="item.hostId"
|
|
|
@resetList="getHostHandlerA"
|
|
|
></passage>
|
|
|
- </van-collapse-item>
|
|
|
+ </van-collapse-item> -->
|
|
|
+ <van-collapse-item>
|
|
|
+ <template #title>
|
|
|
+ <div class="textTitle">区域列表</div>
|
|
|
+ </template>
|
|
|
+ <areaPassage
|
|
|
+ ref="passage"
|
|
|
+ :list="retrievalAreaList"
|
|
|
+ :taskId="$route.params.id.split('_')[0]"
|
|
|
+ @resetList="getHostHandlerA"
|
|
|
+ ></areaPassage>
|
|
|
+ </van-collapse-item>
|
|
|
</div>
|
|
|
</van-collapse>
|
|
|
|
|
|
@@ -43,13 +54,16 @@
|
|
|
<van-button type="info" @click="addInfoHandler">添加调阅记录</van-button>
|
|
|
</van-col>
|
|
|
</van-row> -->
|
|
|
- <van-row v-if="hostList && hostList.length > 0">
|
|
|
+ <van-row v-if="retrievalAreaList && retrievalAreaList.length > 0">
|
|
|
<van-col span="24">
|
|
|
<van-button type="info" @click="endMontor">结束调阅</van-button>
|
|
|
</van-col>
|
|
|
</van-row>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <van-action-sheet v-model="showSign" :title="shwoSignTitle" class="sheet">
|
|
|
+ <writingPad ref="esign" @resultImg="resultSginImg"></writingPad>
|
|
|
+ </van-action-sheet>
|
|
|
<!-- 扫描弹框 -->
|
|
|
<scandialog ref="scandialog" @input="resultImg" @changeNFC="getNFC"></scandialog>
|
|
|
</div>
|
|
|
@@ -58,12 +72,15 @@
|
|
|
import NavBar from '@/components/NavBar'
|
|
|
//通道列表
|
|
|
import passage from './passage.vue'
|
|
|
+import areaPassage from './areaPassage.vue'
|
|
|
// 主机列表组件
|
|
|
import MonitoingList from './monitoringList.vue'
|
|
|
import { upload } from '@/api/public'
|
|
|
import { Col, Row, Dialog, Toast, Icon, Picker } from 'vant'
|
|
|
-import { registrationList, getEndInfo, login, getSysDeviceByTaskId, registration } from '@/api/toConsult.js'
|
|
|
+import { registrationList, finishRegistration, login, getSysDeviceByTaskId, registration } from '@/api/toConsult.js'
|
|
|
import scandialog from '@/components/nfcPopup/alone.vue'
|
|
|
+import writingPad from '@/components/writingPad/index.vue'
|
|
|
+import imgCom from '@/components/imgCom/index.vue'
|
|
|
import { base64ToBlob } from '@/utils/base64TurnImg.js'
|
|
|
export default {
|
|
|
data() {
|
|
|
@@ -71,12 +88,16 @@ export default {
|
|
|
endNum: false, //判断是否能结束调阅
|
|
|
taskData: {},
|
|
|
hostList: [], //主机列表
|
|
|
- activeNames: []
|
|
|
+ retrievalAreaList:[], // 监控调阅区域名称
|
|
|
+ activeNames: [],
|
|
|
+ showSign:false,
|
|
|
+ shwoSignTitle:"签署名字",
|
|
|
+ signImgUrl:"",
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
scandialog,
|
|
|
-
|
|
|
+ areaPassage,
|
|
|
passage,
|
|
|
NavBar,
|
|
|
Dialog,
|
|
|
@@ -84,7 +105,9 @@ export default {
|
|
|
Picker,
|
|
|
Col,
|
|
|
Row,
|
|
|
- MonitoingList
|
|
|
+ MonitoingList,
|
|
|
+ writingPad,
|
|
|
+ imgCom,
|
|
|
},
|
|
|
|
|
|
created() {
|
|
|
@@ -102,7 +125,7 @@ export default {
|
|
|
}
|
|
|
if(num === 1 && data.taskStatus !=2){
|
|
|
Dialog.alert({
|
|
|
- message: '当前为调阅通道选择界面,仅需选择实际调阅通道,无需全选。',
|
|
|
+ message: '当前为监控调阅区域选择界面,请根据实际调阅情况选择,无需全部填写。',
|
|
|
}).then(() => {
|
|
|
|
|
|
});
|
|
|
@@ -116,17 +139,56 @@ export default {
|
|
|
getHostHandler(num = 0) {
|
|
|
// num//判断是不是第一次初始化
|
|
|
console.log(num);
|
|
|
- getSysDeviceByTaskId({ taskId: this.$route.params.id.split('_')[0] }).then(res => {
|
|
|
- let { code, data, msg } = res
|
|
|
- if (code == 200) {
|
|
|
- this.hostList = data
|
|
|
- if (num == 1) {
|
|
|
- this.activeNames = [this.hostList[0].hostId]
|
|
|
- } else {
|
|
|
- console.log(this.activeNames, '////')
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
+ // getSysDeviceByTaskId({ taskId: this.$route.params.id.split('_')[0] }).then(res => {
|
|
|
+ // let { code, data, msg } = res
|
|
|
+ // if (code == 200) {
|
|
|
+ // this.hostList = data
|
|
|
+ // if (num == 1) {
|
|
|
+ // this.activeNames = [this.hostList[0].hostId]
|
|
|
+ // } else {
|
|
|
+ // console.log(this.activeNames, '////')
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+
|
|
|
+ //获取调阅字典
|
|
|
+ this.getDictHandler('video_retrieval_area', res => {
|
|
|
+ let areaList = JSON.parse(JSON.stringify(res));
|
|
|
+
|
|
|
+ if(this.taskData.coreMonitoringTaskRegistrationMonitorVOList){
|
|
|
+ areaList.forEach(area=>{
|
|
|
+ let tempList= this.taskData.coreMonitoringTaskRegistrationMonitorVOList.filter(item=>item.areaCode == area.dictValue);
|
|
|
+ if(tempList && tempList.length>0)
|
|
|
+ {
|
|
|
+ console.log("tempList",tempList);
|
|
|
+ console.log("tempList",tempList[0].coreMonitoringTaskMonitorInfoList.findIndex(x=>{
|
|
|
+ return x.situation=="1"})>-1);
|
|
|
+ if(tempList[0].coreMonitoringTaskMonitorInfoList && tempList[0].coreMonitoringTaskMonitorInfoList.findIndex(x=>{
|
|
|
+ return x.situation=="1";
|
|
|
+ })>-1)
|
|
|
+ {
|
|
|
+ this.$set(area, 'type', 2)
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ this.$set(area, 'type', 1)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ this.$set(area, 'type', 0)
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ console.log("areaList",areaList);
|
|
|
+ this.retrievalAreaList=areaList;
|
|
|
+ // this.dataList.forEach(item => {
|
|
|
+ // this.$set(item, 'situation', '') //异常情况初始化默认值
|
|
|
+ // this.$set(item, 'isChecked', false) //选中初始值
|
|
|
+ // this.$set(item, 'abnormalIllustrate', '') //情况说明初始化默认值
|
|
|
+ // })
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
addInfoHandler() {
|
|
|
this.$router.push('/addInfo/' + this.$route.params.id.split('_')[0] + '_' + this.taskData.id + '_add')
|
|
|
@@ -146,17 +208,20 @@ export default {
|
|
|
let endDate = Date.parse(new Date())
|
|
|
|
|
|
if (endDate - startDate) {
|
|
|
- Dialog.confirm({
|
|
|
- title: '提示',
|
|
|
- message: `当前调阅时长为${this.dateTime(endDate - startDate)},是否结束调阅?`
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- this.$refs.scandialog.visible = true
|
|
|
- this.globalLoading = true
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- // on cancel
|
|
|
- })
|
|
|
+ this.shwoSignTitle= `调阅时长为${this.dateTime(endDate - startDate)},是否结束调阅?`;
|
|
|
+ this.showSign=true;
|
|
|
+
|
|
|
+
|
|
|
+ // Dialog.confirm({
|
|
|
+ // title: '提示',
|
|
|
+ // message: `当前调阅时长为${this.dateTime(endDate - startDate)},是否结束调阅?`
|
|
|
+ // }).then(() => {
|
|
|
+ // this.$refs.scandialog.visible = true
|
|
|
+ // this.globalLoading = true
|
|
|
+ // })
|
|
|
+ // .catch(() => {
|
|
|
+ // // on cancel
|
|
|
+ // })
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
@@ -196,6 +261,27 @@ export default {
|
|
|
}
|
|
|
return time
|
|
|
},
|
|
|
+ //上传签名图到服务器
|
|
|
+ resultSginImg(img) {
|
|
|
+ let obj = base64ToBlob(img)
|
|
|
+ let formData = new FormData()
|
|
|
+
|
|
|
+ obj.name = '签名.jpg'
|
|
|
+ formData.append('file', base64ToBlob(img))
|
|
|
+
|
|
|
+ upload(formData, 'image')
|
|
|
+ .then(res => {
|
|
|
+ console.log(process.env.NODE_ENV)
|
|
|
+ /*上传成功*/
|
|
|
+ this.signImgUrl = process.env.NODE_ENV === 'development' ? res.data.url : res.data.url
|
|
|
+ this.showSign=false;
|
|
|
+ this.$refs.scandialog.visible = true
|
|
|
+ this.globalLoading = true
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ /*上传失败*/
|
|
|
+ })
|
|
|
+ },
|
|
|
//文件上传
|
|
|
resultImg(img) {
|
|
|
this.photoHandler(img[0].url)
|
|
|
@@ -210,7 +296,7 @@ export default {
|
|
|
//开始调阅上传
|
|
|
let obj = {
|
|
|
endPicture: img,
|
|
|
- endNfc: nfc,
|
|
|
+ endNfc: nfc,
|
|
|
taskId: this.$route.params.id.split('_')[0]
|
|
|
}
|
|
|
registration(obj).then(res => {
|
|
|
@@ -222,8 +308,9 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
endHandler() {
|
|
|
- getEndInfo({
|
|
|
- id: this.taskData.id,
|
|
|
+ finishRegistration({
|
|
|
+ id: this.taskData.id,
|
|
|
+ signImgUrl:this.signImgUrl,
|
|
|
taskId: this.$route.params.id.split('_')[0]
|
|
|
}).then(res => {
|
|
|
this.$router.go(-1)
|