|
|
@@ -1,10 +1,9 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <NavBar :go="{ type: 'push', path: '/monitoringCall' }" />
|
|
|
+ <NavBar />
|
|
|
<div class="bigBox">
|
|
|
<van-collapse v-model="activeNames" @open="addActiveNames">
|
|
|
<div class="titleBox">
|
|
|
-
|
|
|
<div class="textTitle">{{ taskData.taskName }}</div>
|
|
|
<div class="text">调阅开始时间:{{ taskData.taskStartTime }}</div>
|
|
|
<div class="text" v-if="taskData.taskStatus == 2">调阅结束时间:{{ taskData.taskEndTime }}</div>
|
|
|
@@ -106,7 +105,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- getHostHandlerA(){
|
|
|
+ getHostHandlerA() {
|
|
|
this.getHostHandler()
|
|
|
this.init()
|
|
|
},
|
|
|
@@ -134,26 +133,61 @@ export default {
|
|
|
//没有记录的时候不能结束调阅
|
|
|
let falg = this.taskData.coreMonitoringTaskRegistrationMonitorVOList
|
|
|
if (falg && falg.length > 0) {
|
|
|
- this.$refs.scandialog.visible = true
|
|
|
- this.globalLoading=true
|
|
|
+ let startDate = JSON.parse(JSON.stringify(this.taskData.taskStartTime))
|
|
|
+
|
|
|
+ startDate = Date.parse(new Date(startDate))
|
|
|
+ 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
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
} else {
|
|
|
Dialog({ message: '调阅项目登记不能为全空!' })
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- // let startDate = JSON.parse(JSON.stringify(this.taskData.taskStartTime))
|
|
|
-
|
|
|
- // startDate = Date.parse(new Date(startDate))
|
|
|
- // let endDate = Date.parse(new Date())
|
|
|
- // if (endDate - startDate <= 3600000) {
|
|
|
- // Dialog({ message: '该调阅未满一个小时请确认' })
|
|
|
- // // 未满一小时不能结束调阅
|
|
|
- // } else {
|
|
|
+ // else {
|
|
|
// this.$refs.scandialog.visible = true
|
|
|
|
|
|
// startDate = new Date(startDate)
|
|
|
// }
|
|
|
},
|
|
|
+ dateTime(msd) {
|
|
|
+ //将毫秒秒转化为xx小时xx分钟xx秒
|
|
|
+
|
|
|
+ let time = parseFloat(msd) / 1000 //先将毫秒转化成秒
|
|
|
+ if (null != time && '' != time) {
|
|
|
+ if (time > 60 && time < 60 * 60) {
|
|
|
+ time =
|
|
|
+ parseInt(time / 60.0) + '分钟' + parseInt((parseFloat(time / 60.0) - parseInt(time / 60.0)) * 60) + '秒'
|
|
|
+ } else if (time >= 60 * 60 && time < 60 * 60 * 24) {
|
|
|
+ time =
|
|
|
+ parseInt(time / 3600.0) +
|
|
|
+ '小时' +
|
|
|
+ parseInt((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60) +
|
|
|
+ '分钟' +
|
|
|
+ parseInt(
|
|
|
+ (parseFloat((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60) -
|
|
|
+ parseInt((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60)) *
|
|
|
+ 60
|
|
|
+ ) +
|
|
|
+ '秒'
|
|
|
+ } else {
|
|
|
+ time = parseInt(time) + '秒'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return time
|
|
|
+ },
|
|
|
//文件上传
|
|
|
resultImg(img) {
|
|
|
this.photoHandler(img[0].url)
|
|
|
@@ -184,7 +218,8 @@ export default {
|
|
|
id: this.taskData.id,
|
|
|
taskId: this.$route.params.id.split('_')[0]
|
|
|
}).then(res => {
|
|
|
- this.$router.push('/monitoringCall')
|
|
|
+ this.$router.go(-1)
|
|
|
+
|
|
|
})
|
|
|
},
|
|
|
addActiveNames() {}
|
|
|
@@ -213,7 +248,6 @@ export default {
|
|
|
font-size: 30px;
|
|
|
font-weight: bold;
|
|
|
padding: 20px;
|
|
|
-
|
|
|
}
|
|
|
.text {
|
|
|
padding: 20px;
|