|
|
@@ -18,8 +18,13 @@
|
|
|
:label="formatTime(v.planStartTime,v.planEndTime,'HH:mm')"
|
|
|
is-link
|
|
|
:to="{path:path,query:{id:v.id,enable:1,taskDate:date}}"
|
|
|
- :value="getDicts(v.status,'resumption_status')"
|
|
|
- :value-class="`title-orange`"/>
|
|
|
+ :value-class="`title-orange`">
|
|
|
+ <template #right-icon>
|
|
|
+ <span :style="{ color: getState(getDictLabel(v.status, 'resumption_status')) }">
|
|
|
+ {{ getDictLabel(v.status, 'resumption_status') }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </van-cell>
|
|
|
</div>
|
|
|
</van-tab>
|
|
|
<van-tab title="未完成">
|
|
|
@@ -31,8 +36,13 @@
|
|
|
:key="v.id"
|
|
|
:title="v.planName"
|
|
|
:label="formatTime(v.planStartTime,v.planEndTime,'HH:mm')"
|
|
|
- :value="getDicts(v.status,'resumption_status')"
|
|
|
- :value-class="`title-red`"/>
|
|
|
+ :value-class="`title-red`">
|
|
|
+ <template #right-icon>
|
|
|
+ <span :style="{ color: getState(getDictLabel(v.status, 'resumption_status')) }">
|
|
|
+ {{ getDictLabel(v.status, 'resumption_status') }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </van-cell>
|
|
|
</div>
|
|
|
</van-tab>
|
|
|
<van-tab title="已完成">
|
|
|
@@ -46,8 +56,13 @@
|
|
|
:label="formatTime(v.planStartTime,v.planEndTime,'HH:mm')"
|
|
|
is-link
|
|
|
:to="{path:path,query:{id:v.id,taskDate:date}}"
|
|
|
- :value="getDicts(v.status,'resumption_status')"
|
|
|
- :value-class="`title-green`"/>
|
|
|
+ :value-class="`title-green`">
|
|
|
+ <template #right-icon>
|
|
|
+ <span :style="{ color: getState(getDictLabel(v.status, 'resumption_status')) }">
|
|
|
+ {{ getDictLabel(v.status, 'resumption_status') }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </van-cell>
|
|
|
</div>
|
|
|
</van-tab>
|
|
|
</van-tabs>
|
|
|
@@ -66,8 +81,13 @@
|
|
|
:label="formatTime(v.planStartTime,v.planEndTime,'YYYY-MM-DD')"
|
|
|
is-link
|
|
|
:to="{path:path,query:{id:v.id,enable:1,taskDate:date}}"
|
|
|
- :value="getDicts(v.status,'resumption_status')"
|
|
|
- :value-class="`title-orange`"/>
|
|
|
+ :value-class="`title-orange`">
|
|
|
+ <template #right-icon>
|
|
|
+ <span :style="{ color: getState(getDictLabel(v.status, 'resumption_status')) }">
|
|
|
+ {{ getDictLabel(v.status, 'resumption_status') }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </van-cell>
|
|
|
</div>
|
|
|
</van-tab>
|
|
|
<van-tab title="未完成">
|
|
|
@@ -79,8 +99,13 @@
|
|
|
:key="v.id"
|
|
|
:title="v.planName"
|
|
|
:label="formatTime(v.planStartTime,v.planEndTime,'YYYY-MM-DD')"
|
|
|
- :value="getDicts(v.status,'resumption_status')"
|
|
|
- :value-class="`title-red`"/>
|
|
|
+ :value-class="`title-red`">
|
|
|
+ <template #right-icon>
|
|
|
+ <span :style="{ color: getState(getDictLabel(v.status, 'resumption_status')) }">
|
|
|
+ {{ getDictLabel(v.status, 'resumption_status') }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </van-cell>
|
|
|
</div>
|
|
|
</van-tab>
|
|
|
<van-tab title="已完成">
|
|
|
@@ -88,14 +113,19 @@
|
|
|
<Empty v-if="!otherList.finished.length"/>
|
|
|
<div class="list-container" v-else>
|
|
|
<van-cell
|
|
|
- v-for="v in otherList.finished"
|
|
|
- :key="v.id"
|
|
|
- :title="v.planName"
|
|
|
- :label="formatTime(v.planStartTime,v.planEndTime,'YYYY-MM-DD')"
|
|
|
- is-link
|
|
|
- :to="{path:path,query:{id:v.id,taskDate:date}}"
|
|
|
- :value="getDicts(v.status,'resumption_status')"
|
|
|
- :value-class="`title-green`"/>
|
|
|
+ v-for="v in otherList.finished"
|
|
|
+ :key="v.id"
|
|
|
+ :title="v.planName"
|
|
|
+ :label="formatTime(v.planStartTime,v.planEndTime,'YYYY-MM-DD')"
|
|
|
+ is-link
|
|
|
+ :to="{path:path,query:{id:v.id,taskDate:date}}"
|
|
|
+ :value-class="`title-green`">
|
|
|
+ <template #right-icon>
|
|
|
+ <span :style="{ color: getState(getDictLabel(v.status, 'resumption_status')) }">
|
|
|
+ {{ getDictLabel(v.status, 'resumption_status') }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </van-cell>
|
|
|
</div>
|
|
|
</van-tab>
|
|
|
</van-tabs>
|
|
|
@@ -137,22 +167,26 @@ export default {
|
|
|
},
|
|
|
//配置子页面路径
|
|
|
path:'/resumption_detail',
|
|
|
-
|
|
|
+ statusList:[],
|
|
|
+ dicts: ['resumption_status'],
|
|
|
}
|
|
|
},
|
|
|
- created() {
|
|
|
- getDict( 'resumption_status' ).then(res => {
|
|
|
- let { data } = res
|
|
|
- this.stateList = data;
|
|
|
- })
|
|
|
- },
|
|
|
+ // created() {
|
|
|
+ // getDict( 'resumption_status' ).then(res => {
|
|
|
+ // let { data } = res
|
|
|
+ // this.statusList = data;
|
|
|
+ // })
|
|
|
+ // },
|
|
|
mounted() {
|
|
|
this.container = this.$refs.container;
|
|
|
this.initDatalist();
|
|
|
document.getElementById('lz-container')
|
|
|
},
|
|
|
computed:{
|
|
|
- ...mapGetters(['orgName','orgId','roleList']),
|
|
|
+ ...mapGetters(['dictionary','orgName','orgId','roleList']),
|
|
|
+ // stateList(){
|
|
|
+ // return this.statusList
|
|
|
+ // },
|
|
|
},
|
|
|
beforeRouteEnter(to,from,next){
|
|
|
next(vm=>{
|
|
|
@@ -160,6 +194,18 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
methods:{
|
|
|
+ getState(state) {
|
|
|
+ switch (state) {
|
|
|
+ case '待履职':
|
|
|
+ return '#bbbbbb'
|
|
|
+ case '进行中':
|
|
|
+ return '#008cd6'
|
|
|
+ case '完成':
|
|
|
+ return '#009240'
|
|
|
+ case '已逾期':
|
|
|
+ return '#D7000F'
|
|
|
+ }
|
|
|
+ },
|
|
|
getDicts(s){
|
|
|
return this.stateList.find(v=> s == v.dictValue).dictLabel;
|
|
|
},
|