|
@@ -5,65 +5,29 @@
|
|
|
<view class="header-l">
|
|
|
<text class="item-sub">{{index + 1}}、</text>
|
|
|
<view class="item-c">
|
|
|
- <text class="item-c-tit">{{item.name}}:</text>
|
|
|
- <text class="item-c-txt">{{item.content}}</text>
|
|
|
+ {{item.assessTargetName}}
|
|
|
</view>
|
|
|
</view>
|
|
|
- <text v-if="item.state == 0" class="header-r green">合格</text>
|
|
|
- <text v-if="item.state == 1" class="header-r red">不合格</text>
|
|
|
- <text v-if="item.state == 2" class="header-r yellow">不适用</text>
|
|
|
+ <text :class="['header-r', item.result == 'PASS' ? 'green' : item.result == 'NOT_PASS' ? 'red' : item.result == 'NOT_WORK' ? 'yellow' : '']">{{item.resultDictValue}}</text>
|
|
|
</view>
|
|
|
<view class="comment-con">
|
|
|
<u-row gutter="16" class="pic-con">
|
|
|
- <u-col span="3" v-for="(pic, ind) in item.picList" :key="ind">
|
|
|
- <u-image class="pic" width="100%" height="150upx" :src="pic" @click="clickPic(index, ind)"></u-image>
|
|
|
+ <u-col span="3" v-for="(pic, ind) in item.taskTargetPhotoList" :key="ind">
|
|
|
+ <u-image class="pic" width="100%" height="150upx" :src="pic.image" @click="clickPic(index, ind)"></u-image>
|
|
|
</u-col>
|
|
|
</u-row>
|
|
|
- <view class="comment-main">
|
|
|
- <text class="comment-tit">{{item.userName}}:</text>
|
|
|
- <text class="comment-txt">{{item.remarks}}</text>
|
|
|
- </view>
|
|
|
+ <view class="comment-main">{{item.comments}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import { getTaskTargetById } from '@/api/taskTarget.js'
|
|
|
export default{
|
|
|
data(){
|
|
|
return{
|
|
|
- list: [ // 列表数据
|
|
|
- {
|
|
|
- name: '着装标准',
|
|
|
- content: '服装干净、整洁、无污渍服装干净、整',
|
|
|
- picList: [
|
|
|
- '', '', ''
|
|
|
- ],
|
|
|
- userName: '测试账号',
|
|
|
- remarks: '未穿工服、办公桌面不整洁',
|
|
|
- state: 0
|
|
|
- },
|
|
|
- {
|
|
|
- name: '着装标准',
|
|
|
- content: '服装干净、整洁、无污渍服装干净、整洁、无污渍服装干净、整洁、无污渍服装干净、整洁、无污渍服装干净、整洁、无污渍服装干净、整洁、无污渍',
|
|
|
- picList: [
|
|
|
- '', '', ''
|
|
|
- ],
|
|
|
- userName: '测试账号',
|
|
|
- remarks: '未穿工服、办公桌面不整洁,未穿工服、办公桌面不整洁,未穿工服、办公桌面不整洁,未穿工服、办公桌面不整洁',
|
|
|
- state: 1
|
|
|
- },
|
|
|
- {
|
|
|
- name: '着装标准',
|
|
|
- content: '服装干净、整洁、无污渍服装干净、整',
|
|
|
- picList: [
|
|
|
- '', '', ''
|
|
|
- ],
|
|
|
- userName: '测试账号',
|
|
|
- remarks: '未穿工服、办公桌面不整洁',
|
|
|
- state: 2
|
|
|
- },
|
|
|
- ],
|
|
|
+ list: [], // 列表数据
|
|
|
taskId: '' // 任务id
|
|
|
}
|
|
|
},
|
|
@@ -77,13 +41,22 @@
|
|
|
// 预览图片
|
|
|
uni.previewImage({
|
|
|
current: ind,
|
|
|
- urls: this.list[index].picList
|
|
|
+ urls: this.list[index].photoList
|
|
|
})
|
|
|
},
|
|
|
// 获取详情
|
|
|
getDetails(){
|
|
|
- getTaskItem({ id: this.taskId }).then(res => {
|
|
|
+ getTaskTargetById({ taskId: this.taskId }).then(res => {
|
|
|
if(res.status == 200){
|
|
|
+ res.data.map(item => {
|
|
|
+ if(item.taskTargetPhotoList){
|
|
|
+ item.photoList = []
|
|
|
+ item.taskTargetPhotoList.map(subItem => {
|
|
|
+ subItem.image = subItem.photoBasePath + subItem.photoPath
|
|
|
+ item.photoList.push(subItem.image)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
this.list = res.data
|
|
|
}
|
|
|
})
|
|
@@ -121,9 +94,6 @@
|
|
|
.item-c-tit{
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
- .item-c-txt{
|
|
|
-
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
.header-r{
|