|
|
@@ -275,26 +275,29 @@
|
|
|
</div>
|
|
|
<!-- 识别结果 -->
|
|
|
<div class="identifyResult" v-if="taskPhotoRecognitionResult" style="padding: 0 10px">
|
|
|
- <div style="font-weight: bold; padding: 10px; font-size: 16px">识别结果:</div>
|
|
|
+ <div style="font-weight: bold; padding: 10px; font-size: 16px">
|
|
|
+ <span>识别结果:</span>
|
|
|
+ <!-- <span>{{ taskPhotoConditionPassed }}</span> -->
|
|
|
+ </div>
|
|
|
<div class="resultContent">
|
|
|
<el-table
|
|
|
:data="taskPhotoRecognitionResult"
|
|
|
+ :span-method="taskObjectSpanMethod"
|
|
|
border
|
|
|
class="table-headermd1"
|
|
|
style="width: 100%">
|
|
|
<el-table-column label="" type="index" width="50px" align="center" />
|
|
|
<el-table-column label="产品" prop="skuProductName" align="center" />
|
|
|
- <el-table-column label="要求" prop="conditionIdentifyNum" align="center" width="60px">
|
|
|
- </el-table-column>
|
|
|
<el-table-column
|
|
|
label="识别排面数"
|
|
|
prop="identifyTheNumberOfCards"
|
|
|
width="70px"
|
|
|
- align="center"
|
|
|
- >meetTheStandard
|
|
|
+ align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="要求" prop="conditionIdentifyNum" align="center" width="60px">
|
|
|
<template slot-scope="scope">
|
|
|
<span :style="{ color: scope.row.meetTheStandard == 1 ? '#07c160' : 'red' }">
|
|
|
- {{ scope.row.identifyTheNumberOfCards }}
|
|
|
+ {{ scope.row.conditionIdentifyNum }}
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -361,6 +364,8 @@ export default {
|
|
|
yfNumFlage: false,
|
|
|
wuliaoPhotoImg: [], //任务包含的图片信息(只针对于物料任务)
|
|
|
activatedSfaTask: null,
|
|
|
+ spanArr: [],
|
|
|
+ pos: 0,
|
|
|
};
|
|
|
},
|
|
|
activated() {
|
|
|
@@ -401,6 +406,17 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ taskObjectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
+ const cellValue = row[column.property];
|
|
|
+ if (cellValue && ['conditionIdentifyNum'].includes(column.property)) {
|
|
|
+ const _row = this.spanArr[rowIndex]; // 合并行数
|
|
|
+ const _col = this.spanArr[rowIndex] > 0 ? 1 : 0; // 合并的列数
|
|
|
+ return {
|
|
|
+ rowspan: _row,
|
|
|
+ colspan: _col,
|
|
|
+ };
|
|
|
+ }
|
|
|
+ },
|
|
|
// 历史回显
|
|
|
getCollectionShowHistory(id) {
|
|
|
getCollectionShowHistory({
|
|
|
@@ -427,6 +443,25 @@ export default {
|
|
|
}
|
|
|
return arrc.join(',');
|
|
|
},
|
|
|
+ getSpanArr(data) {
|
|
|
+ this.spanArr = []; // tip: 后台获取完成数据后,一定要重置spanArr=[],避免出现合并混乱!!!!!
|
|
|
+ for (let i = 0; i < data.length; i++) {
|
|
|
+ // 当为第一行时
|
|
|
+ if (i === 0) {
|
|
|
+ this.spanArr.push(1);
|
|
|
+ this.pos = 0;
|
|
|
+ } else {
|
|
|
+ // 判断当前值是否与上一行的【名称】相等,相等则进行合并
|
|
|
+ if (data[i].conditionIdentifyNum === data[i - 1].conditionIdentifyNum) {
|
|
|
+ this.spanArr[this.pos] += 1; // 合并单元格:合并的行数 +1
|
|
|
+ this.spanArr.push(0); // 0代表单元格是不需要显示, 已经被合并的单元格
|
|
|
+ } else {
|
|
|
+ this.spanArr.push(1); // 1代表当前这行的数据需要被显示
|
|
|
+ this.pos = i;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
info() {
|
|
|
this.toastLoading(0, '加载中...', true);
|
|
|
getVisitsDetail({ visitsId: this.visitId }).then((res) => {
|
|
|
@@ -436,6 +471,7 @@ export default {
|
|
|
this.activatedSfaTask = filterSfaTask.length ? filterSfaTask[0] : null;
|
|
|
if (!this.activatedSfaTask) return false;
|
|
|
this.taskPhotoRecognitionResult = this.activatedSfaTask.taskPhotoRecognitionResult;
|
|
|
+ this.getSpanArr(this.taskPhotoRecognitionResult);
|
|
|
var collectionItemLists = this.activatedSfaTask.collectionItemList;
|
|
|
if (this.activatedSfaTask.checkUnManage == 'Y') {
|
|
|
this.checkShow = true;
|