|
|
@@ -17,7 +17,7 @@
|
|
|
:title="v.planName"
|
|
|
:label="formatTime(v.planStartTime,v.planEndTime,'HH:mm')"
|
|
|
is-link
|
|
|
- :to="{path:path,query:{id:v.id,enable:1,taskDate:date}}"
|
|
|
+ @click="onClick(path,v.id,date,v.planStartTime)"
|
|
|
:value-class="`title-orange`">
|
|
|
<template #right-icon>
|
|
|
<span :style="{ color: getState(getDictLabel(v.status, 'resumption_status')) }">
|
|
|
@@ -77,7 +77,7 @@
|
|
|
:title="v.planName"
|
|
|
:label="formatTime(v.planStartTime,v.planEndTime,'YYYY-MM-DD')"
|
|
|
is-link
|
|
|
- :to="{path:path,query:{id:v.id,enable:1,taskDate:date}}"
|
|
|
+ @click="onClick(path,v.id,date,v.planStartTime)"
|
|
|
:value-class="`title-orange`">
|
|
|
<template #right-icon>
|
|
|
<span :style="{ color: getState(getDictLabel(v.status, 'resumption_status')) }">
|
|
|
@@ -190,6 +190,18 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
methods:{
|
|
|
+ onClick(path,id,date,planStartTime){
|
|
|
+ let now = new Date();
|
|
|
+ let start = new Date(planStartTime);
|
|
|
+ if(now > start){
|
|
|
+ this.$router.push({path:path,query:{id:id,enable:1,taskDate:date}})
|
|
|
+ }else{
|
|
|
+ this.$toast.fail({
|
|
|
+ message: '任务未到开始时间!',
|
|
|
+ position: 'top'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
getState(state) {
|
|
|
switch (state) {
|
|
|
case '待履职':
|