|
|
@@ -1,91 +1,101 @@
|
|
|
<template>
|
|
|
- <div class="lvzhi" ref="container">
|
|
|
+ <div class="lvzhi" >
|
|
|
<nav-bar></nav-bar>
|
|
|
- <div class="lz-container" >
|
|
|
- <van-sticky :container="container" style="padding: 0 20px;">
|
|
|
- <DatePicker></DatePicker>
|
|
|
+ <div class="lz-container" ref="container">
|
|
|
+ <van-sticky :container="container">
|
|
|
+ <DatePicker @change="changeDate"></DatePicker>
|
|
|
</van-sticky>
|
|
|
<div class="lz-list">
|
|
|
<div class="list-item">
|
|
|
<p>今日履职</p>
|
|
|
<van-tabs >
|
|
|
<van-tab title="待完成">
|
|
|
- <template #title>待完成 {{1}} </template>
|
|
|
+ <template #title>待完成 {{dayList.unfinished.length}} </template>
|
|
|
<van-cell-group>
|
|
|
- <van-cell title="单元格" is-link to="lz-edit" value="内容" :value-class="`title-orange`"/>
|
|
|
- <van-cell title="单元格" is-link to="index" value="内容" :value-class="`title-orange`"/>
|
|
|
- <van-cell title="单元格" is-link to="index" value="内容" :value-class="`title-orange`"/>
|
|
|
+ <van-cell
|
|
|
+ v-for="v in dayList.unfinished"
|
|
|
+ :key="v.id"
|
|
|
+ :title="v.planName"
|
|
|
+ :label="formatTime(v.planStartTime,v.planEndTime)"
|
|
|
+ is-link
|
|
|
+ to="lz-edit"
|
|
|
+ :value="getState(v.status,'resumption_status')"
|
|
|
+ :value-class="`title-orange`"/>
|
|
|
</van-cell-group>
|
|
|
</van-tab>
|
|
|
<van-tab title="未完成">
|
|
|
- <template #title>未完成 {{1}} </template>
|
|
|
+ <template #title>未完成 {{dayList.proceed.length}} </template>
|
|
|
<van-cell-group>
|
|
|
- <van-cell title="单元格" value="内容" />
|
|
|
- <van-cell title="单元格" value="内容" label="描述信息" :value-class="`title-red`" />
|
|
|
+ <van-cell
|
|
|
+ v-for="v in dayList.proceed"
|
|
|
+ :key="v.id"
|
|
|
+ :title="v.planName"
|
|
|
+ :label="formatTime(v.planStartTime,v.planEndTime)"
|
|
|
+ is-link
|
|
|
+ to="lz-edit"
|
|
|
+ :value="getState(v.status,'resumption_status')"
|
|
|
+ :value-class="`title-orange`"/>
|
|
|
</van-cell-group>
|
|
|
</van-tab>
|
|
|
<van-tab title="已完成">
|
|
|
- <template #title>已完成 {{1}} </template>
|
|
|
+ <template #title>已完成 {{dayList.finished.length}} </template>
|
|
|
<van-cell-group>
|
|
|
- <van-cell title="单元格" value="内容" />
|
|
|
- <van-cell title="单元格" value="内容" label="描述信息" :value-class="`title-green`"/>
|
|
|
+ <van-cell
|
|
|
+ v-for="v in dayList.finished"
|
|
|
+ :key="v.id"
|
|
|
+ :title="v.planName"
|
|
|
+ :label="formatTime(v.planStartTime,v.planEndTime)"
|
|
|
+ is-link
|
|
|
+ to="lz-edit"
|
|
|
+ :value="getState(v.status,'resumption_status')"
|
|
|
+ :value-class="`title-orange`"/>
|
|
|
</van-cell-group>
|
|
|
</van-tab>
|
|
|
</van-tabs>
|
|
|
</div>
|
|
|
<div class="list-item">
|
|
|
- <p>今日履职</p>
|
|
|
- <van-tabs >
|
|
|
- <van-tab title="待完成">
|
|
|
- <template #title>待完成 {{1}} </template>
|
|
|
- <van-cell-group>
|
|
|
- <van-cell title="单元格" is-link to="index" value="内容" :value-class="`title-orange`"/>
|
|
|
- <van-cell title="单元格" is-link to="index" value="内容" :value-class="`title-orange`"/>
|
|
|
- <van-cell title="单元格" is-link to="index" value="内容" :value-class="`title-orange`"/>
|
|
|
- <van-cell title="单元格" is-link to="index" value="内容" :value-class="`title-orange`"/>
|
|
|
- <van-cell title="单元格" is-link to="index" value="内容" :value-class="`title-orange`"/>
|
|
|
- </van-cell-group>
|
|
|
- </van-tab>
|
|
|
- <van-tab title="未完成">
|
|
|
- <template #title>未完成 {{1}} </template>
|
|
|
- <van-cell-group>
|
|
|
- <van-cell title="单元格" value="内容" />
|
|
|
- <van-cell title="单元格" value="内容" label="描述信息" :value-class="`title-red`" />
|
|
|
- </van-cell-group>
|
|
|
- </van-tab>
|
|
|
- <van-tab title="已完成">
|
|
|
- <template #title>已完成 {{1}} </template>
|
|
|
- <van-cell-group>
|
|
|
- <van-cell title="单元格" value="内容" />
|
|
|
- <van-cell title="单元格" value="内容" label="描述信息" :value-class="`title-green`"/>
|
|
|
- </van-cell-group>
|
|
|
- </van-tab>
|
|
|
- </van-tabs>
|
|
|
- </div>
|
|
|
- <div class="list-item">
|
|
|
- <p>今日履职</p>
|
|
|
+ <p>周期履职</p>
|
|
|
<van-tabs >
|
|
|
<van-tab title="待完成">
|
|
|
- <template #title>待完成 {{1}} </template>
|
|
|
+ <template #title>待完成 {{otherList.finished.length}} </template>
|
|
|
<van-cell-group>
|
|
|
- <van-cell title="单元格" is-link to="index" value="内容" :value-class="`title-orange`"/>
|
|
|
- <van-cell title="单元格" is-link to="index" value="内容" :value-class="`title-orange`"/>
|
|
|
- <van-cell title="单元格" is-link to="index" value="内容" :value-class="`title-orange`"/>
|
|
|
- <van-cell title="单元格" is-link to="index" value="内容" :value-class="`title-orange`"/>
|
|
|
+ <van-cell
|
|
|
+ v-for="v in otherList.unfinished"
|
|
|
+ :key="v.id"
|
|
|
+ :title="v.planName"
|
|
|
+ :label="formatTime(v.planStartTime,v.planEndTime)"
|
|
|
+ is-link
|
|
|
+ to="lz-edit"
|
|
|
+ :value="getState(v.status,'resumption_status')"
|
|
|
+ :value-class="`title-orange`"/>
|
|
|
</van-cell-group>
|
|
|
</van-tab>
|
|
|
<van-tab title="未完成">
|
|
|
- <template #title>未完成 {{1}} </template>
|
|
|
+ <template #title>未完成 {{otherList.finished.length}} </template>
|
|
|
<van-cell-group>
|
|
|
- <van-cell title="单元格" value="内容" />
|
|
|
- <van-cell title="单元格" value="内容" label="描述信息" :value-class="`title-red`" />
|
|
|
+ <van-cell
|
|
|
+ v-for="v in otherList.proceed"
|
|
|
+ :key="v.id"
|
|
|
+ :title="v.planName"
|
|
|
+ :label="formatTime(v.planStartTime,v.planEndTime)"
|
|
|
+ is-link
|
|
|
+ to="lz-edit"
|
|
|
+ :value="getState(v.status,'resumption_status')"
|
|
|
+ :value-class="`title-orange`"/>
|
|
|
</van-cell-group>
|
|
|
</van-tab>
|
|
|
<van-tab title="已完成">
|
|
|
- <template #title>已完成 {{1}} </template>
|
|
|
+ <template #title>已完成 {{otherList.finished.length}} </template>
|
|
|
<van-cell-group>
|
|
|
- <van-cell title="单元格" value="内容" />
|
|
|
- <van-cell title="单元格" value="内容" label="描述信息" :value-class="`title-green`"/>
|
|
|
+ <van-cell
|
|
|
+ v-for="v in otherList.finished"
|
|
|
+ :key="v.id"
|
|
|
+ :title="v.planName"
|
|
|
+ :label="formatTime(v.planStartTime,v.planEndTime)"
|
|
|
+ is-link
|
|
|
+ to="lz-edit"
|
|
|
+ :value="getState(v.status,'resumption_status')"
|
|
|
+ :value-class="`title-orange`"/>
|
|
|
</van-cell-group>
|
|
|
</van-tab>
|
|
|
</van-tabs>
|
|
|
@@ -99,40 +109,72 @@
|
|
|
import NavBar from '@/components/NavBar';
|
|
|
import DatePicker from '@/components/DatePicker';
|
|
|
import {mapGetters} from "vuex";
|
|
|
-import {dataList} from "./api"
|
|
|
+import {dataList} from "./api";
|
|
|
+import dayjs from "dayjs";
|
|
|
+
|
|
|
export default {
|
|
|
components:{NavBar,DatePicker},
|
|
|
data(){
|
|
|
return{
|
|
|
date:new Date(),
|
|
|
container: null,
|
|
|
- typeCode:['day','mouth','year'],
|
|
|
+ dayList: {
|
|
|
+ unfinished:[],
|
|
|
+ proceed:[],
|
|
|
+ finished:[],
|
|
|
+ },
|
|
|
+ otherList:{
|
|
|
+ unfinished:[],
|
|
|
+ proceed:[],
|
|
|
+ finished:[],
|
|
|
+ },
|
|
|
+ dicts: ['resumption_status'],
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
this.container = this.$refs.container;
|
|
|
- this.getDatalist();
|
|
|
+ this.initDatalist();
|
|
|
},
|
|
|
computed:{
|
|
|
...mapGetters(['orgName','orgId']),
|
|
|
},
|
|
|
methods:{
|
|
|
- getDatalist(){
|
|
|
+ formatTime(start,end){
|
|
|
+ return `${dayjs(start).format('HH:mm')}-${dayjs(end).format('HH:mm')}`
|
|
|
+ },
|
|
|
+ initDatalist(){
|
|
|
let data = {
|
|
|
- dateTime: this.date,
|
|
|
+ dateTime: dayjs(new Date()).format('YYYY-MM-DD'),
|
|
|
orgId: this.orgId,
|
|
|
roleId:this.roleId,
|
|
|
- typeCode:null,
|
|
|
}
|
|
|
dataList(data).then(res=>{
|
|
|
console.log(res,'ressss')
|
|
|
})
|
|
|
},
|
|
|
+ getDatalist(){
|
|
|
+ let data = {
|
|
|
+ // dateTime: this.date,
|
|
|
+ orgid: 4358025846341633,
|
|
|
+ roleId:2,
|
|
|
+ }
|
|
|
+ dataList(data).then(res=>{
|
|
|
+ //今日
|
|
|
+ this.dayList.unfinished = res.data.day['1'];
|
|
|
+ this.dayList.proceed = res.data.day['3']
|
|
|
+ this.dayList.finished = res.data.day['2'];
|
|
|
+ //周期
|
|
|
+ this.otherList.unfinished = res.data.noDay['1'];
|
|
|
+ this.otherList.proceed = res.data.noDay['3']
|
|
|
+ this.otherList.finished = res.data.noDay['2'];
|
|
|
+ })
|
|
|
+ },
|
|
|
queryMoth(){
|
|
|
|
|
|
},
|
|
|
- onDayClick(){
|
|
|
-
|
|
|
+ changeDate(val){
|
|
|
+ console.log(val,'val')
|
|
|
+ this.getDatalist();
|
|
|
},
|
|
|
}
|
|
|
}
|
|
|
@@ -144,7 +186,6 @@ export default {
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.lz-container{
|
|
|
- height: calc(100vh - 90px);
|
|
|
overflow: auto;
|
|
|
}
|
|
|
.top-date-box{
|
|
|
@@ -152,7 +193,6 @@ export default {
|
|
|
}
|
|
|
.lz-list{
|
|
|
box-sizing: border-box;
|
|
|
- background-color: #f1f1f1;
|
|
|
overflow: auto;
|
|
|
}
|
|
|
.list-item{
|