提交一部分民政评分新版
This commit is contained in:
@@ -5,12 +5,12 @@
|
||||
</div>
|
||||
<AiTabPanes :tabs="tabs" v-model="search.type" white @change="handChangeTab"/>
|
||||
<AiGroup>
|
||||
<div v-for="item in list" :key="item.id" class="listItem pad-r32" flex @click="handleDetail(item.id)">
|
||||
<div v-for="item in list" :key="item.id" class="listItem pad-r32" flex @click="handleDetail(item)">
|
||||
<div class="fill mar-r20">
|
||||
<h3 class="mar-b8" v-text="item.templateName"/>
|
||||
<div class="sub" v-text="item.taskTitle"/>
|
||||
<h3 class="mar-b8" v-text="item.taskTitle"/>
|
||||
<div class="sub" v-text="`截止时间:${item.endTime}`"/>
|
||||
</div>
|
||||
<div class="status" :class="{finish:item.unfinishedCount==0}">{{ item.unfinishedCount == 0 ? '已完成' : '尚未完成' }}</div>
|
||||
<item-status :item="item"/>
|
||||
</div>
|
||||
</AiGroup>
|
||||
<AiEmpty class="pad-t96" v-if="!list.length"/>
|
||||
@@ -21,6 +21,20 @@
|
||||
export default {
|
||||
name: "AppRecoScore",
|
||||
appName: "考核系统",
|
||||
components: {
|
||||
itemStatus: {
|
||||
props: {
|
||||
item: {default: () => ({})}
|
||||
},
|
||||
render(h) {
|
||||
const {commitTime, examineStatus} = this.item,
|
||||
color = this.$dict.getColor("integralDeclareStatus", examineStatus)
|
||||
return h("div",
|
||||
{class: "status", style: {color, backgroundColor: `rgba(${color},.1)`}},
|
||||
!!commitTime ? this.$dict.getLabel("integralDeclareStatus", examineStatus) : "待填写")
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
current: 1,
|
||||
@@ -53,10 +67,14 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
handleDetail(id) {
|
||||
uni.navigateTo({url: "./astDetail?id=" + id})
|
||||
handleDetail(item) {
|
||||
const {taskId, taskDetailId} = item
|
||||
uni.navigateTo({url: this.$qs.stringifyUrl({url: "./rsDetail", query: {taskId, taskDetailId}})})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$dict.load("integralDeclareStatus")
|
||||
},
|
||||
onShow() {
|
||||
this.current = 1
|
||||
this.getList()
|
||||
@@ -93,7 +111,7 @@ export default {
|
||||
|
||||
.sub {
|
||||
font-size: 26px;
|
||||
color: #3975C6;
|
||||
color: #FF883C;
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
@@ -105,7 +123,9 @@ export default {
|
||||
|
||||
.status {
|
||||
font-size: 28px;
|
||||
color: #FFA938;
|
||||
color: #FF883C;
|
||||
background-color: rgba(#FF883C, .1);
|
||||
padding: 4px 16px;
|
||||
|
||||
&.finish {
|
||||
color: #1CCEB0;
|
||||
|
||||
@@ -1,108 +0,0 @@
|
||||
<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)">
|
||||
<div flex class="fill">
|
||||
<AiImage class="mar-r32 circle avatar" :src="item.evaluatorsAvatar"/>
|
||||
<div>
|
||||
<h4>{{ item.evaluatorsName }}</h4>
|
||||
<div class="color-999">{{ item.evaluatorsDepartments }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="result" :class="{finish:!item.fillable}" v-text="item.resultLabel"/>
|
||||
</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
|
||||
return 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) {
|
||||
current == 1 && (this.list = [])
|
||||
this.$http.post("/app/appassessmentscortask/myScoreList", null, {
|
||||
params: {id, size: 999, current}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
res.data.records.map(e => {
|
||||
e.fillable = !e.commitTime && this.detail.status == 1
|
||||
e.resultLabel = !!e.commitTime ? `${e.totalScore || 0}分` : e.fillable ? "去填报" : "未填报"
|
||||
})
|
||||
this.list = [this.list, res.data.records].flat().filter(Boolean)
|
||||
this.total = res.data.total
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
handleScore(item) {
|
||||
if (this.detail.status == 1) {
|
||||
const {id, templateId: tid} = item
|
||||
uni.navigateTo({url: `/apps/AppAskForm/AppForm?id=${id}&tid=${tid}&from=AppAssessmentScoreTask` + (!item.fillable ? '&result=1' : '')})
|
||||
} else {
|
||||
this.$u.toast("任务未开始或已结束,无法填报!")
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
document.title = this.$options.appName
|
||||
this.current = 1
|
||||
this.getDetail().then(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>
|
||||
38
src/project/hljmz/AppRecoScore/lib/dynaComponent.vue
Normal file
38
src/project/hljmz/AppRecoScore/lib/dynaComponent.vue
Normal file
@@ -0,0 +1,38 @@
|
||||
<template>
|
||||
<section class="dynaComponent">
|
||||
<AiDate v-if="item.fieldType=='date'" v-model="value"/>
|
||||
<textarea v-else-if="item.fieldType=='textarea'" v-model="value" placeholder="请输入"/>
|
||||
<AiDrawer v-else-if="item.fieldType=='sign'" v-model="value" placeholder="开始签名"/>
|
||||
<input v-else v-model="value" placeholder="请输入"/>
|
||||
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AiDate from "../../../../components/AiDate";
|
||||
import AiDrawer from "../../../../components/AiDrawer";
|
||||
|
||||
export default {
|
||||
name: "dynaComponent",
|
||||
components: {AiDrawer, AiDate},
|
||||
props: {
|
||||
item: {default: () => ({})}
|
||||
},
|
||||
watch: {
|
||||
value(v) {
|
||||
this.$emit("update:item", {...this.item, fieldValue: v})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
value: ""
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.dynaComponent {
|
||||
}
|
||||
</style>
|
||||
147
src/project/hljmz/AppRecoScore/rsDetail.vue
Normal file
147
src/project/hljmz/AppRecoScore/rsDetail.vue
Normal file
@@ -0,0 +1,147 @@
|
||||
<template>
|
||||
<section class="rsDetail">
|
||||
<AiGroup class="header" bottomBorder>
|
||||
<h3 flex class="mar-b8">{{ task.title }}</h3>
|
||||
<div class="color-999">截止日期:{{ $dateFormat(task.endTime, "YYYY-MM-DD HH:mm") }}</div>
|
||||
</AiGroup>
|
||||
<AiGroup description bottomBorder v-for="(next,label) in form" :key="label" :title="label" class="pad-t32">
|
||||
<template v-for="(item,key) in next">
|
||||
<template v-if="!/\d/.test(key)">
|
||||
<div class="subLabel" v-text="key"/>
|
||||
<AiItem v-for="row in item" :key="row.id" :label="row.fieldName" topLabel>
|
||||
<div class="mar-t8" slot="sub" v-if="row.explain" v-text="row.explain"/>
|
||||
<dyna-component :item.sync="row"/>
|
||||
</AiItem>
|
||||
</template>
|
||||
<AiItem v-else :label="item.fieldName" topLabel>
|
||||
<div class="mar-t8" slot="sub" v-if="item.explain" v-text="item.explain"/>
|
||||
<dyna-component :item.sync="item"/>
|
||||
</AiItem>
|
||||
</template>
|
||||
</AiGroup>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AiItem from "../../../components/AiItem";
|
||||
import AiGroup from "../../../components/AiGroup";
|
||||
import DynaComponent from "./lib/dynaComponent";
|
||||
|
||||
export default {
|
||||
name: "rsDetail",
|
||||
components: {DynaComponent, AiGroup, AiItem},
|
||||
appName: "考核评分",
|
||||
data() {
|
||||
return {
|
||||
task: {},
|
||||
detail: [],//动态表单
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
form() {
|
||||
let form = {}
|
||||
this.detail.map(e => {
|
||||
if (e.inputType == "0") {
|
||||
if (!form[e.groupLevel1Name]) {
|
||||
form[e.groupLevel1Name] = {}
|
||||
}
|
||||
if (!!e.groupLevel2Name) {
|
||||
form[e.groupLevel1Name][e.groupLevel2Name] = {...form[e.groupLevel1Name][e.groupLevel2Name], [e.id]: e}
|
||||
} else {
|
||||
form[e.groupLevel1Name] = {...form[e.groupLevel1Name], [e.id]: e}
|
||||
}
|
||||
}
|
||||
})
|
||||
return form
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getTask() {
|
||||
const {taskId: id} = this.$route.query
|
||||
return this.$http.post("/app/appassessmentscorev2task/queryDetailById", null, {
|
||||
params: {id}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.task = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getDetail() {
|
||||
const {taskDetailId} = this.$route.query
|
||||
return this.$http.post("/app/appassessmentscorev2task/queryDataInfoById2", null, {
|
||||
params: {taskDetailId}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.detail = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getItem(id) {
|
||||
return this.detail.find(e => e.id == id) || {}
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
document.title = this.$options.appName
|
||||
this.getDetail()
|
||||
this.getTask()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.rsDetail {
|
||||
background: #f5f5f5;
|
||||
font-family: PingFang-SC;
|
||||
|
||||
.header {
|
||||
padding: 32px 0;
|
||||
}
|
||||
|
||||
.subLabel {
|
||||
font-weight: bold;
|
||||
font-size: 28px;
|
||||
color: #687DA6;
|
||||
padding-top: 16px;
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 40px;
|
||||
min-height: 56px;
|
||||
}
|
||||
|
||||
.result {
|
||||
color: #FFA938;
|
||||
|
||||
&.finish {
|
||||
color: #2C51CE;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .groupHeader {
|
||||
position: relative;
|
||||
|
||||
&:before {
|
||||
position: absolute;
|
||||
display: block;
|
||||
content: " ";
|
||||
width: 4px;
|
||||
height: 24px;
|
||||
background: #3975C6;
|
||||
left: -8px;
|
||||
top: 50%;
|
||||
transform: translate(-100%, -50%);
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .AiItem {
|
||||
.labelPane {
|
||||
flex-wrap: wrap;
|
||||
|
||||
.label {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user