|
|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <NavBar />
|
|
|
+ <NavBar/>
|
|
|
<van-row>
|
|
|
<van-col span="24">
|
|
|
<org-tree v-model="cascaderValue" @change="getDataList"></org-tree>
|
|
|
@@ -8,9 +8,9 @@
|
|
|
</van-row>
|
|
|
<van-row>
|
|
|
<van-col span="12"
|
|
|
- >
|
|
|
+ >
|
|
|
|
|
|
- <van-cell title="状态" @click="showStatus = true" is-link arrow-direction="down" :value="fieldValue" />
|
|
|
+ <van-cell title="状态" @click="showStatus = true" is-link arrow-direction="down" :value="fieldValue"/>
|
|
|
<van-popup v-model="showStatus" round position="bottom">
|
|
|
<van-picker
|
|
|
title="调阅状态"
|
|
|
@@ -21,11 +21,13 @@
|
|
|
@cancel="onCancel"
|
|
|
@change="onChange"
|
|
|
:close-on-click-overlay="false"
|
|
|
- /> </van-popup
|
|
|
- ></van-col>
|
|
|
+ />
|
|
|
+ </van-popup
|
|
|
+ >
|
|
|
+ </van-col>
|
|
|
<van-col span="12">
|
|
|
-
|
|
|
- <van-cell title="月份" @click="showDate = true" is-link arrow-direction="down" :value="currentDate" />
|
|
|
+
|
|
|
+ <van-cell title="月份" @click="showDate = true" is-link arrow-direction="down" :value="currentDate"/>
|
|
|
|
|
|
<van-popup v-model="showDate" round position="bottom">
|
|
|
<van-datetime-picker
|
|
|
@@ -61,14 +63,12 @@
|
|
|
>
|
|
|
<template #title>
|
|
|
<span class="custom-title">
|
|
|
- {{ item.taskName
|
|
|
- }}<van-tag class="resetDy" @click.stop="resetHandler(item.id)" v-if="item.status == 1" type="primary"
|
|
|
- >重新调阅</van-tag
|
|
|
- ></span
|
|
|
- >
|
|
|
-
|
|
|
-
|
|
|
- <span :class="monitor[item.status]">{{ item.status | statusFilter(this_) }}</span>
|
|
|
+ {{item.taskName}}
|
|
|
+<!-- <van-tag class="resetDy" @click.stop="resetHandler(item)" v-if="item.status == 1" type="primary">重新调阅</van-tag>-->
|
|
|
+ </span>
|
|
|
+
|
|
|
+
|
|
|
+ <span :class="monitor[item.status]">{{item.status | statusFilter(this_)}}</span>
|
|
|
</template>
|
|
|
</van-cell>
|
|
|
</van-cell-group>
|
|
|
@@ -81,14 +81,15 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import NavBar from '@/components/NavBar'
|
|
|
-import { Col, Row, Cascader, Dialog, DatetimePicker, Icon, Picker } from 'vant'
|
|
|
-import { deptTreeList, selectListApp, registration, resetTask } from '@/api/toConsult.js'
|
|
|
-import { Toast } from 'vant'
|
|
|
+import {Col, Row, Cascader, Dialog, DatetimePicker, Icon, Picker} from 'vant'
|
|
|
+import {deptTreeList, selectListApp, registration, resetTask, getMonitorStart} from '@/api/toConsult.js'
|
|
|
+import {Toast} from 'vant'
|
|
|
import OrgTree from '@/components/orgTree'
|
|
|
-import { newDateMonth } from '@/utils/date.js'
|
|
|
+import {newDateMonth} from '@/utils/date.js'
|
|
|
import scandialog from '@/components/nfcPopup/alone.vue'
|
|
|
-import { base64ToBlob } from '@/utils/base64TurnImg.js'
|
|
|
-import { upload } from '@/api/public'
|
|
|
+import {base64ToBlob} from '@/utils/base64TurnImg.js'
|
|
|
+import {upload} from '@/api/public'
|
|
|
+import dayjs from "dayjs";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -160,27 +161,30 @@ export default {
|
|
|
this.cascaderValue = JSON.parse(window.sessionStorage.getItem('SET_USER_ORGID')) + ''
|
|
|
},
|
|
|
methods: {
|
|
|
+ dayjs,
|
|
|
//单元格点击事件
|
|
|
linkHandler(status, id, item) {
|
|
|
- // if (item.isExist == 0 && status == 0) {
|
|
|
- // Dialog.alert({
|
|
|
- // message: '机构下没有主机摄像头,不能开启调阅任务!',
|
|
|
- // confirmButtonText: '关闭'
|
|
|
- // })
|
|
|
- // return
|
|
|
- // }
|
|
|
+ /*if (!this.checkIsCurrentOrgTask()){
|
|
|
+ return ;
|
|
|
+ }*/
|
|
|
if (status == 0) {
|
|
|
//判断当前时间是否小于开始时间 小于则不能进行操作
|
|
|
- let date = new Date().getTime()
|
|
|
- let startDate = Date.parse(new Date(item.planStartTime))
|
|
|
-
|
|
|
- if (date <= startDate) {
|
|
|
+ if (!this.checkDate(item.planStartTime)) {
|
|
|
Toast.success('当前调阅任务还未开始,不能进行调阅')
|
|
|
} else {
|
|
|
this.startMonitorHandler(id)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if (status == 1) {
|
|
|
+ if (!this.checkDate(item.planStartTime)) {
|
|
|
+ Toast.success('当前调阅任务还未开始,不能进行调阅');
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+ this.startMonitorHandler(id);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
if (status == 3) {
|
|
|
return Toast('当前监控调阅任务已逾期,无法操作!')
|
|
|
}
|
|
|
@@ -189,7 +193,15 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
//重新调阅
|
|
|
- resetHandler(id) {
|
|
|
+ resetHandler(item) {
|
|
|
+ let id = item.id;
|
|
|
+ if (!this.checkDate(item.planStartTime)) {
|
|
|
+ Toast.success('当前调阅任务还未开始,不能进行调阅');
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+ /*if (!this.checkIsCurrentOrgTask()){
|
|
|
+ return ;
|
|
|
+ }*/
|
|
|
Dialog.confirm({
|
|
|
title: '提示',
|
|
|
message: '确认要对该任务进行重新调阅吗?'
|
|
|
@@ -227,6 +239,14 @@ export default {
|
|
|
this.fieldValue = ''
|
|
|
this.selectListAppHandler()
|
|
|
},
|
|
|
+
|
|
|
+ checkDate(startTime){
|
|
|
+ //未到开始时间不能调阅
|
|
|
+ let currentDate = new Date().getTime();
|
|
|
+ let startDate = dayjs(startTime).valueOf();
|
|
|
+ return currentDate >= startDate;
|
|
|
+
|
|
|
+ },
|
|
|
//nfc拍照功能完成
|
|
|
change(img) {
|
|
|
console.log(img)
|
|
|
@@ -242,7 +262,8 @@ export default {
|
|
|
})
|
|
|
// this.selectListAppHandler()
|
|
|
},
|
|
|
- selectListAppHandler(type = 0, callBack = () => {}) {
|
|
|
+ selectListAppHandler(type = 0, callBack = () => {
|
|
|
+ }) {
|
|
|
if (!type) {
|
|
|
this.pageNum = 1
|
|
|
this.taskList = []
|
|
|
@@ -256,7 +277,7 @@ export default {
|
|
|
orgId: this.cascaderValue || JSON.parse(window.sessionStorage.getItem('SET_USER_ORGID')) + '' || '',
|
|
|
moth: this.currentDate || ''
|
|
|
}).then(res => {
|
|
|
- let { code, rows, total } = res
|
|
|
+ let {code, rows, total} = res
|
|
|
if (code == 200) {
|
|
|
if (type) {
|
|
|
this.taskList.push(...rows)
|
|
|
@@ -268,7 +289,7 @@ export default {
|
|
|
callBack()
|
|
|
}
|
|
|
} else {
|
|
|
-
|
|
|
+
|
|
|
this.taskList.push(...rows)
|
|
|
this.finished = false
|
|
|
this.loading = false
|
|
|
@@ -276,7 +297,7 @@ export default {
|
|
|
//已加载完全部数据
|
|
|
this.finished = true
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
// this.taskList = rows || []
|
|
|
}
|
|
|
@@ -295,13 +316,13 @@ export default {
|
|
|
taskId: this.taskId
|
|
|
}
|
|
|
registration(obj).then(res => {
|
|
|
-
|
|
|
- let { code, data, msg } = res
|
|
|
+
|
|
|
+ let {code, data, msg} = res
|
|
|
if (code == 200) {
|
|
|
Toast.success('扫描成功')
|
|
|
- this.$router.push('/consultInfo/' + this.taskId)
|
|
|
- }else{
|
|
|
- Toast.error({ message: msg, position: 'top' })
|
|
|
+ this.$router.push('/consultInfo/' + this.taskId )
|
|
|
+ } else {
|
|
|
+ Toast.error({message: msg, position: 'top'})
|
|
|
|
|
|
}
|
|
|
})
|
|
|
@@ -313,10 +334,11 @@ export default {
|
|
|
let obj = {
|
|
|
startPicture: img,
|
|
|
startNfc: nfc,
|
|
|
- taskId: this.taskId
|
|
|
+ taskId: this.taskId,
|
|
|
+ monitorFlag: 0
|
|
|
}
|
|
|
registration(obj).then(res => {
|
|
|
- let { code, data, msg } = res
|
|
|
+ let {code, data, msg} = res
|
|
|
if (code == 200) {
|
|
|
Toast.success('扫描成功')
|
|
|
this.$router.push('/consultInfo/' + this.taskId)
|
|
|
@@ -336,11 +358,43 @@ export default {
|
|
|
this.show = false
|
|
|
this.selectListAppHandler()
|
|
|
},
|
|
|
+ checkIsCurrentOrgTask() {
|
|
|
+ //判断是否当前用户所属机构的任务, 用户仅允许执行自己机构的任务
|
|
|
+ let orgId = JSON.parse(window.sessionStorage.getItem('SET_USER_ORGID'));
|
|
|
+ if (orgId == this.cascaderValue) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ console.log('非当前用户所属机构任务,无法执行;')
|
|
|
+ return false;
|
|
|
+ },
|
|
|
// 开始调阅事件
|
|
|
startMonitorHandler(taskId) {
|
|
|
- this.taskId = taskId
|
|
|
- this.$refs.scandialog.visible = true
|
|
|
- this.globalLoading=true
|
|
|
+ this.taskId = taskId;
|
|
|
+ let obj = {taskId: taskId}
|
|
|
+ getMonitorStart(obj).then(res => {
|
|
|
+ let {code, data, msg} = res
|
|
|
+ let dayNums = data.dayNums;
|
|
|
+ let noComplete = data.noComplete;
|
|
|
+ if (noComplete > 0) {
|
|
|
+ this.$router.push('/consultInfo/' + this.taskId)
|
|
|
+ } else {
|
|
|
+
|
|
|
+ if (dayNums >= 5) {
|
|
|
+ //提醒确认
|
|
|
+ Dialog.confirm({
|
|
|
+ title: '提示',
|
|
|
+ message: `当前调阅任务今日调阅已达到${dayNums}次,是否继续调阅?`,
|
|
|
+ }).then(() => {
|
|
|
+ this.$refs.scandialog.visible = true;
|
|
|
+ this.globalLoading = true;
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$refs.scandialog.visible = true;
|
|
|
+ this.globalLoading = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
|
|
|
//查看调阅详情
|
|
|
@@ -351,13 +405,14 @@ export default {
|
|
|
//级联选择当前任意层级触发
|
|
|
changeCascader(val) {
|
|
|
console.log(val)
|
|
|
- let { selectedOptions } = val
|
|
|
+ let {selectedOptions} = val
|
|
|
//级联值
|
|
|
this.cascaderValue = selectedOptions[selectedOptions.length - 1].id
|
|
|
//输入框值
|
|
|
this.value1 = selectedOptions[selectedOptions.length - 1].name
|
|
|
},
|
|
|
- onFinish() {},
|
|
|
+ onFinish() {
|
|
|
+ },
|
|
|
//搜索选择状态时触发
|
|
|
onConfirm(value, index) {
|
|
|
this.fieldValue = value
|
|
|
@@ -388,7 +443,8 @@ export default {
|
|
|
d = d < 10 ? '0' + d : d
|
|
|
return y + '-' + m
|
|
|
},
|
|
|
- onChange(picker, value, index) {},
|
|
|
+ onChange(picker, value, index) {
|
|
|
+ },
|
|
|
onCancel() {
|
|
|
this.show = false
|
|
|
this.showStatus = false
|
|
|
@@ -403,18 +459,22 @@ export default {
|
|
|
margin: 20px;
|
|
|
|
|
|
display: flex;
|
|
|
+
|
|
|
.sonLeftBox {
|
|
|
padding: 10px;
|
|
|
flex: 1;
|
|
|
background-color: #fff;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.custom-title {
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
+
|
|
|
.van-cell__label {
|
|
|
font-size: 25px;
|
|
|
}
|
|
|
+
|
|
|
.monitor {
|
|
|
color: #008cd6;
|
|
|
padding-left: 10px;
|
|
|
@@ -425,6 +485,7 @@ export default {
|
|
|
// border-radius: 10px;
|
|
|
// background-color: #8cb585;
|
|
|
}
|
|
|
+
|
|
|
.monitored {
|
|
|
color: #bc9f71;
|
|
|
|
|
|
@@ -436,6 +497,7 @@ export default {
|
|
|
// border-radius: 10px;
|
|
|
// background-color: #1989fa;
|
|
|
}
|
|
|
+
|
|
|
.monitoring {
|
|
|
color: #009240;
|
|
|
padding-left: 10px;
|
|
|
@@ -445,6 +507,7 @@ export default {
|
|
|
// border-radius: 10px;
|
|
|
// background-color: #25da0b;
|
|
|
}
|
|
|
+
|
|
|
.waringtoring {
|
|
|
color: #d7000f;
|
|
|
|
|
|
@@ -456,14 +519,17 @@ export default {
|
|
|
// border-radius: 10px;
|
|
|
// background-color: #e46962;
|
|
|
}
|
|
|
+
|
|
|
.title {
|
|
|
margin: 10px;
|
|
|
margin-left: 0px;
|
|
|
font-size: 40px;
|
|
|
}
|
|
|
+
|
|
|
.time {
|
|
|
font-size: 32px;
|
|
|
}
|
|
|
+
|
|
|
.startMonitor {
|
|
|
background-color: #f5f5f9;
|
|
|
color: #1989fa;
|
|
|
@@ -472,6 +538,7 @@ export default {
|
|
|
font-size: 36px;
|
|
|
text-align: center;
|
|
|
}
|
|
|
+
|
|
|
.endMonitor {
|
|
|
background-color: #f5f5f9;
|
|
|
color: #1989fa;
|
|
|
@@ -480,52 +547,64 @@ export default {
|
|
|
font-size: 36px;
|
|
|
text-align: center;
|
|
|
}
|
|
|
+
|
|
|
.img_box {
|
|
|
text-align: center;
|
|
|
+
|
|
|
.img {
|
|
|
width: 200px;
|
|
|
height: 200px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.text {
|
|
|
text-align: center;
|
|
|
font-size: 30px;
|
|
|
margin-top: 30px;
|
|
|
margin-bottom: 100px;
|
|
|
}
|
|
|
+
|
|
|
.btns {
|
|
|
margin-top: 40px;
|
|
|
margin-bottom: 40px;
|
|
|
display: flex;
|
|
|
justify-content: space-around;
|
|
|
+
|
|
|
.nfcPhoto {
|
|
|
color: #409bf2;
|
|
|
+
|
|
|
div {
|
|
|
width: 100%;
|
|
|
text-align: center;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.btnf_box {
|
|
|
background-color: #fff;
|
|
|
}
|
|
|
+
|
|
|
.van-dialog {
|
|
|
padding: 30px;
|
|
|
}
|
|
|
+
|
|
|
.spanimg {
|
|
|
display: flex;
|
|
|
justify-content: flex-end;
|
|
|
+
|
|
|
.close {
|
|
|
width: 50px;
|
|
|
height: 50px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.btn {
|
|
|
float: right;
|
|
|
margin-top: 24px;
|
|
|
margin-right: 20px;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
+
|
|
|
.bigbox {
|
|
|
height: calc(100vh - 400px);
|
|
|
overflow: scroll;
|
|
|
@@ -534,11 +613,13 @@ export default {
|
|
|
margin-right: 20px;
|
|
|
background-color: #fff;
|
|
|
}
|
|
|
+
|
|
|
.card {
|
|
|
margin: 20px;
|
|
|
margin-bottom: 0px;
|
|
|
box-shadow: 0 8px 12px #ebedf0;
|
|
|
}
|
|
|
+
|
|
|
.titleClass {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
@@ -553,19 +634,23 @@ export default {
|
|
|
line-height: 50px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.mainItem {
|
|
|
display: flex;
|
|
|
font-size: 28px;
|
|
|
padding: 20px;
|
|
|
justify-content: revert;
|
|
|
+
|
|
|
.date {
|
|
|
margin-left: 30px;
|
|
|
}
|
|
|
+
|
|
|
.condition {
|
|
|
color: #1989fa;
|
|
|
text-decoration: underline;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.bttons {
|
|
|
color: #1989fa;
|
|
|
border: none;
|
|
|
@@ -574,17 +659,21 @@ export default {
|
|
|
:deep.van-field--disabled {
|
|
|
color: #323233;
|
|
|
}
|
|
|
+
|
|
|
:deep.van-field--disabled .van-field__label {
|
|
|
color: #323233;
|
|
|
}
|
|
|
+
|
|
|
:deep .van-field__control[disabled] {
|
|
|
color: #323233;
|
|
|
-webkit-text-fill-color: #323233;
|
|
|
}
|
|
|
+
|
|
|
.resetDy {
|
|
|
margin-left: 20px;
|
|
|
}
|
|
|
-.van-cell__value{
|
|
|
+
|
|
|
+.van-cell__value {
|
|
|
color: black;
|
|
|
text-align: left;
|
|
|
}
|