+
@@ -14,7 +14,7 @@
{{ item.evaluatorsDepartments }}
-
{{ !!item.commitTime ? `${item.totalScore || 0}分` : "去填报" }}
+
@@ -36,7 +36,7 @@ export default {
methods: {
getDetail() {
const {id} = this.$route.query
- this.$http.post("/app/appassessmentscortask/taskTemplateDetail", null, {
+ return this.$http.post("/app/appassessmentscortask/taskTemplateDetail", null, {
params: {id}
}).then(res => {
if (res?.data) {
@@ -53,20 +53,26 @@ export default {
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(id, tid, readonly) {
- uni.navigateTo({url: `/apps/AppAskForm/AppForm?id=${id}&tid=${tid}&from=AppAssessmentScoreTask` + (readonly ? '&result=1' : '')})
+ handleScore(item) {
+ if (item?.fillable) {
+ const {id, templateId: tid} = item
+ uni.navigateTo({url: `/apps/AppAskForm/AppForm?id=${id}&tid=${tid}&from=AppAssessmentScoreTask` + (!item.fillable ? '&result=1' : '')})
+ }
}
},
onShow() {
- this.getDetail()
- this.getList()
document.title = this.$options.appName
+ this.getDetail().then(this.getList)
},
onReachBottom() {
this.current++