Explorar o código

Merge branch 'deploy' of http://git.chelingzhu.com/chelingzhu-web/storeCheck-app into deploy

lilei %!s(int64=4) %!d(string=hai) anos
pai
achega
bb436d875d
Modificáronse 1 ficheiros con 18 adicións e 48 borrados
  1. 18 48
      pages/spotCheckDetails/spotCheckDetails.vue

+ 18 - 48
pages/spotCheckDetails/spotCheckDetails.vue

@@ -5,65 +5,29 @@
 				<view class="header-l">
 				<view class="header-l">
 					<text class="item-sub">{{index + 1}}、</text>
 					<text class="item-sub">{{index + 1}}、</text>
 					<view class="item-c">
 					<view class="item-c">
-						<text class="item-c-tit">{{item.name}}:</text>
-						<text class="item-c-txt">{{item.content}}</text>
+						{{item.assessTargetName}}
 					</view>
 					</view>
 				</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>
 			<view class="comment-con">
 			<view class="comment-con">
 				<u-row gutter="16" class="pic-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-col>
 				</u-row>
 				</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>
 		</view>
 	</view>
 	</view>
 </template>
 </template>
 
 
 <script>
 <script>
+	import { getTaskTargetById } from '@/api/taskTarget.js'
 	export default{
 	export default{
 		data(){
 		data(){
 			return{
 			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
 				taskId: ''  //  任务id
 			}
 			}
 		},
 		},
@@ -77,13 +41,22 @@
 				// 预览图片
 				// 预览图片
 				uni.previewImage({
 				uni.previewImage({
 					current: ind,
 					current: ind,
-					urls: this.list[index].picList
+					urls: this.list[index].photoList
 				})
 				})
 			},
 			},
 			//  获取详情
 			//  获取详情
 			getDetails(){
 			getDetails(){
-				getTaskItem({ id: this.taskId }).then(res => {
+				getTaskTargetById({ taskId: this.taskId }).then(res => {
 					if(res.status == 200){
 					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
 						this.list = res.data
 					}
 					}
 				})
 				})
@@ -121,9 +94,6 @@
 						.item-c-tit{
 						.item-c-tit{
 							font-weight: bold;
 							font-weight: bold;
 						}
 						}
-						.item-c-txt{
-							
-						}
 					}
 					}
 				}
 				}
 				.header-r{
 				.header-r{