黑龙江民政考核评分基本完成

This commit is contained in:
aixianling
2022-10-24 18:03:11 +08:00
parent 9ef85056d8
commit e17b089c44
7 changed files with 278 additions and 37 deletions

View File

@@ -0,0 +1,91 @@
<template>
<section class="AppAssessmentScoreTask">
<AiGroup>
<div v-for="item in list" :key="item.id" class="listItem pad-r32" flex @click="handleDetail(item.id)">
<div class="fill mar-r20">
<h3 class="mar-b8" v-text="item.templateName"/>
<div class="sub" v-text="item.taskTitle"/>
</div>
<div class="status" :class="{finish:item.unfinishedCount==0}">{{ item.unfinishedCount == 0 ? '已完成' : '尚未完成' }}</div>
</div>
</AiGroup>
<AiEmpty class="pad-t96" v-if="!list.length"/>
</section>
</template>
<script>
export default {
name: "AppAssessmentScoreTask",
appName: "考核评分",
data() {
return {
current: 1,
total: 0,
list: []
}
},
methods: {
getList() {
const {current, total, list} = this
if (current == 1 || list.length < total) {
this.getTasks()
}
},
getTasks() {
const {current} = this
this.$http.post("/app/appassessmentscortask/myTaskList", null, {
params: {size: 999, current}
}).then(res => {
if (res?.data) {
this.list = [this.list, res.data.records].flat().filter(Boolean)
this.total = res.data.total
}
})
},
handleDetail(id) {
uni.navigateTo({url: "./astDetail?id=" + id})
}
},
onShow() {
this.getList()
},
onReachBottom() {
this.current++
this.getList()
}
}
</script>
<style lang="scss" scoped>
.AppAssessmentScoreTask {
background: #f5f5f5;
.listItem {
height: 160px;
justify-content: space-between;
.sub {
font-size: 26px;
color: #3975C6;
line-height: 36px;
}
& > h3 {
font-size: 32px;
color: #333;
line-height: 44px;
}
.status {
font-size: 18px;
color: #FFA938;
&.finish {
color: #1CCEB0;
}
}
}
}
</style>

View File

@@ -0,0 +1,97 @@
<template>
<section class="astDetail">
<AiGroup left="48" class="header mar-b16">
<h3 flex class="mar-b8">{{ detail.templateName }}</h3>
<div class="color-999">开始日期{{ $dateFormat(detail.beginTime, "YYYY-MM-DD HH:mm") }}</div>
<div class="color-999">截止日期{{ $dateFormat(detail.endTime, "YYYY-MM-DD HH:mm") }}</div>
</AiGroup>
<AiGroup title="参评人员" description class="pad-t32">
<div flex class="pad-r32 pad-t16 pad-b16" v-for="item in list" :key="item.id" @click="handleScore(item.id)">
<div flex class="fill">
<ai-image class="mar-r32" :src="item.evaluatorsAvatar"/>
<div>
<h4>{{ item.evaluatorsName }}</h4>
<div class="color-999">{{ item.evaluatorsDepartments }}</div>
</div>
</div>
<div class="result" :class="{finish:item.status==1}">{{ item.status == 1 ? `${item.totalScore || 0}` : "去填报" }}</div>
</div>
<AiEmpty class="pad-b32" v-if="!list.length"/>
</AiGroup>
</section>
</template>
<script>
export default {
name: "astDetail",
appName: "评分任务",
data() {
return {
detail: {},
current: 1,
total: 0,
list: []
}
},
methods: {
getDetail() {
const {id} = this.$route.query
this.$http.post("/app/appassessmentscortask/taskTemplateDetail", null, {
params: {id}
}).then(res => {
if (res?.data) {
this.detail = res.data
}
})
},
getList() {
const {id} = this.$route.query,
{current, list, total} = this
if (current == 1 || list.length < total) {
this.$http.post("/app/appassessmentscortask/myScoreList", null, {
params: {id, size: 999, current}
}).then(res => {
if (res?.data) {
this.list = [this.list, res.data.records].flat().filter(Boolean)
this.total = res.data.total
}
})
}
},
handleScore(id) {
uni.navigateTo({url: `/apps/AppAskForm/AppForm?id=${id}&action=${appassessmentscortask}`})
}
},
onShow() {
this.getDetail()
this.getList()
},
onReachBottom() {
this.current++
this.getList()
}
}
</script>
<style lang="scss" scoped>
.astDetail {
background: #f5f5f5;
.header {
padding: 32px 0;
}
h3 {
font-size: 40px;
min-height: 56px;
}
.result {
color: #FFA938;
.finish {
color: #2C51CE;
}
}
}
</style>