ZhiYeJianKang_QiYe_APP/pages/comprehensive/comprehensive.vue

96 lines
2.2 KiB
Vue
Raw Permalink Normal View History

2025-02-20 15:38:43 +08:00
<template>
<view class="app">
<uni-table border stripe emptyText="暂无更多数据" class="tablelist">
<uni-tr>
<uni-th align="center" width='100'>自查项目</uni-th>
<uni-th align="center">自查内容</uni-th>
<uni-th align="center">分值</uni-th>
<uni-th align="center">判定依据</uni-th>
<uni-th align="center">判定</uni-th>
</uni-tr>
<uni-tr v-for="(item,index) in tablelist" :key='index' :style="item.xmName && item.zcContent && item.obj1.score && item.obj.zcContent && item.obj.xmName ? '' : 'background:#F5F5F5'">
<uni-td align="center">{{item.xmName}}</uni-td>
<uni-td align="center">{{item.zcContent}}</uni-td>
<uni-td align="center">{{item.obj1.score}}</uni-td>
<uni-td align="center">{{item.obj.zcContent}}</uni-td>
<uni-td align="center">{{item.obj.xmName}}</uni-td>
</uni-tr>
</uni-table>
</view>
</template>
<script>
import {
list
} from '@/api/Health/Health.js'
export default {
data() {
return {
tablelist: [],
parentId: '',
eid: '',
backgroundColorzc:'',
};
},
onLoad(options) {
this.parentId = options.parentId
},
onShow() {
this.listinfo();
},
methods: {
listinfo() {
list(this.eid, this.parentId).then(res => {
this.tablelist = res.body.list
res.body.list.forEach((e) => {
e.children.forEach((el) => {
res.body.checkedList.forEach((ele) => {
if (!el.zcJudgeType) {
el.zcJudgeType = ''
}
if (!ele.judgeType) {
ele.judgeType = ''
}
if (!el.parentId) {
el.parentId = ''
}
if (!ele.zrzcId) {
ele.zrzcId = ''
}
// debugger
if (el.zcJudgeType == ele.judgeType && el.parentId == ele
.zrzcId) {
e.obj1 = ele
e.obj = el
}
else if(!e.obj1 && !e.obj){
// this.backgroundColorzc='#EEA5A2'
e.obj1 = {
score: '',
// zcContent: '',
}
e.obj = {
// score: '',
zcContent: '',
xmName:'',
}
}
})
})
});
})
},
}
}
</script>
<style lang="scss">
.tablelist {
height: 95%;
padding-top: 10%;
// background-color: ;
}
</style>