Files
dvcp_v2_wxcp_app/src/apps/AppWorkonline/AppWorkonline.vue

200 lines
5.0 KiB
Vue
Raw Normal View History

2021-12-15 15:22:23 +08:00
<template>
<div class="workonline">
<div class="search">
<u-search class="serach_content" placeholder="请输入标题" :show-action="false" v-model="keyword" @clear="clearSearch" @search="search"></u-search>
</div>
2021-12-15 18:37:15 +08:00
<u-tabs :list="list" :is-scroll="false" :current="currentType" @change="change"></u-tabs>
2021-12-23 18:52:56 +08:00
<template class="datass" v-if="datas.length > 0">
2021-12-15 18:37:15 +08:00
<u-card v-for="(item, index) in datas" :key="index" :foot-border-top="false" :head-border-bottom="false" :show-head="false" @click="goDetail(item, 1)">
2021-12-15 15:22:23 +08:00
<view class="body" slot="body">
<view class="u-body-item">
2021-12-15 18:37:15 +08:00
<div class="title">{{ item.processName }}</div>
2021-12-15 15:22:23 +08:00
</view>
<view class="u-body-item">
<div class="plan">
<span>审批进度</span>
2021-12-15 18:37:15 +08:00
2021-12-23 09:39:15 +08:00
<span class="business_status" :style="{ color: item.approvalStatus == 0 ? '#FF9B2B' : item.approvalStatus == 1 ? '#3078E1' : '#666666' }"> {{ $dict.getLabel('listApprovalStatusHb', item.approvalStatus) }}</span>
2021-12-15 15:22:23 +08:00
</div>
</view>
<view class="u-body-item">
<div class="modetpye">
<span>申请类型</span>
2021-12-15 18:37:15 +08:00
<span>{{ item.classificationName }}</span>
2021-12-15 15:22:23 +08:00
</div>
</view>
<view class="u-body-item">
<div class="applytime">
<span>申请日期</span>
2021-12-15 18:37:15 +08:00
<span class="timeContent">{{ item.createTime }}</span>
2021-12-15 15:22:23 +08:00
</div>
</view>
<view class="u-body-item">
<div class="overtime">
<span>完成日期</span>
2021-12-15 18:37:15 +08:00
<span class="timeContent">{{ item.overTime }}</span>
2021-12-15 15:22:23 +08:00
</div>
</view>
2021-12-15 18:37:15 +08:00
<span class="icon">
<!-- ing -->
2021-12-24 22:50:09 +08:00
<img src="./components/ing.png" alt="" v-if="item.approvalStatus == 0" />
2021-12-15 18:37:15 +08:00
<!-- end -->
2021-12-24 22:50:09 +08:00
<img src="./components/end.png" alt="" v-if="item.approvalStatus == 1" />
2021-12-15 18:37:15 +08:00
<!-- false -->
2021-12-24 22:50:09 +08:00
<img src="./components/reject.png" alt="" v-if="item.approvalStatus == 2" />
2021-12-15 18:37:15 +08:00
</span>
2021-12-15 15:22:23 +08:00
</view>
</u-card>
2021-12-16 16:04:21 +08:00
<u-loadmore :status="loadmore" color="#999" font-size="24" margin-top="32" margin-bottom="80" />
2021-12-15 15:22:23 +08:00
</template>
2021-12-23 18:52:56 +08:00
<AiEmpty description="没有数据" class="aiemptys" v-else> </AiEmpty>
2021-12-15 15:22:23 +08:00
</div>
</template>
<script>
export default {
2021-12-16 10:49:43 +08:00
name: 'AppWorkonline',
2021-12-16 11:04:33 +08:00
appName: '网上办事',
2021-12-15 15:22:23 +08:00
components: {},
props: {},
data() {
return {
2021-12-15 18:37:15 +08:00
list: [
{ name: '待我审批', type: 0 },
{ name: '我已审批', type: 1 },
{ name: '抄送我的', type: 3 },
{ name: '超时督办', type: 4 },
],
2021-12-16 10:49:43 +08:00
currentType: 0,
2021-12-15 15:22:23 +08:00
keyword: '',
2021-12-15 18:37:15 +08:00
datas: {},
listType: 0,
current: 1,
2021-12-16 16:04:21 +08:00
pages: 0,
2021-12-15 15:22:23 +08:00
}
},
2021-12-16 16:04:21 +08:00
computed: {
loadmore() {
return this.pages <= this.current ? 'loading ' : 'nomore'
},
},
2021-12-15 15:22:23 +08:00
watch: {},
2021-12-16 16:04:21 +08:00
onLoad() {
2021-12-15 18:37:15 +08:00
this.$dict.load('listApprovalStatusHb').then(() => {
2021-12-15 15:22:23 +08:00
this.getList()
})
},
2021-12-24 15:27:36 +08:00
onShow() {
document.title = '网上办事'
},
2021-12-15 15:22:23 +08:00
mounted() {},
methods: {
2021-12-15 18:37:15 +08:00
getList() {
this.$http.post(`/app/approv-alapply-info/list?listType=${this.listType}&current=${this.current}&param=${this.keyword}`).then((res) => {
if (res?.code == 0) {
this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records
2021-12-16 16:04:21 +08:00
this.pages = res.data.pages
2021-12-15 18:37:15 +08:00
}
})
},
2021-12-15 15:22:23 +08:00
2021-12-15 18:37:15 +08:00
goDetail(item) {
2021-12-23 19:53:16 +08:00
uni.navigateTo({ url: `./Detail?id=${item.id}&listType=${this.listType}` })
2021-12-15 15:22:23 +08:00
},
2021-12-15 18:37:15 +08:00
change(index) {
this.currentType = index
this.listType = this.list[index].type
this.getListInit()
},
getListInit() {
2021-12-15 15:22:23 +08:00
this.current = 1
this.getList()
},
2021-12-15 18:37:15 +08:00
search(e) {
this.keyword = e
this.getListInit()
},
2021-12-15 15:22:23 +08:00
clearSearch() {
this.keyword = ''
2021-12-15 18:37:15 +08:00
this.getListInit()
2021-12-15 15:22:23 +08:00
},
},
2021-12-16 16:04:21 +08:00
onReachBottom() {
this.current = this.current + 1
this.getList()
},
2021-12-15 15:22:23 +08:00
}
</script>
<style scoped lang="scss">
2021-12-23 18:52:56 +08:00
uni-page-body {
background: #f5f5f5;
}
2021-12-15 15:22:23 +08:00
.workonline {
2021-12-23 19:53:16 +08:00
background: #f5f5f5;
2021-12-15 15:22:23 +08:00
.search {
.serach_content {
2021-12-15 18:37:15 +08:00
background-color: #fff;
2021-12-15 15:22:23 +08:00
height: 104px;
line-height: 104px;
box-sizing: border-box;
padding: 0 32px;
}
}
.u-card {
2021-12-23 16:51:08 +08:00
::v-deep .u-card__head {
padding: 0 !important;
}
2021-12-15 15:22:23 +08:00
::v-deep .u-card__body {
.body {
position: relative;
.u-body-item {
.title {
font-size: 32px;
font-weight: 500;
margin-bottom: 16px;
2021-12-23 16:51:08 +08:00
width: 80%;
2021-12-15 15:22:23 +08:00
}
.plan,
.modetpye,
.applytime,
.overtime {
margin-top: 16px;
font-size: 30px;
color: #999999;
.timeContent {
color: #343d65;
}
}
}
img {
position: absolute;
right: 0;
top: 0;
width: 113px;
height: 113px;
}
}
}
}
2021-12-23 18:52:56 +08:00
.aiemptys {
background: #f5f5f5;
}
2021-12-15 15:22:23 +08:00
}
</style>