|
@@ -351,8 +351,8 @@ export default {
|
|
|
nodeId = 1;
|
|
|
}
|
|
|
|
|
|
- const currentYear = dayjs().format('YYYY');
|
|
|
- this.searchFrom.year = currentYear;
|
|
|
+ const lastYear = dayjs().subtract(1, 'year').format('YYYY');
|
|
|
+ this.searchFrom.year = lastYear;
|
|
|
this.nodeId = nodeId;
|
|
|
this.searchFrom.nodeId = nodeId;
|
|
|
this.getList();
|
|
@@ -442,6 +442,15 @@ export default {
|
|
|
show: true
|
|
|
};
|
|
|
item.reviewInfo = reviewInfo;
|
|
|
+ item?.info?.configs?.forEach((iten) => {
|
|
|
+ iten.taskFiledType = iten.taskFiledType.trim();
|
|
|
+ if (iten.taskFiledType == 'img') {
|
|
|
+ console.log('item.info.taskContent', item.info.taskContent);
|
|
|
+ console.log('item.info.iten', iten);
|
|
|
+
|
|
|
+ this.getImgList(item.info.taskContent[iten.taskFiledKey], iten);
|
|
|
+ }
|
|
|
+ });
|
|
|
});
|
|
|
this.list.push(...list);
|
|
|
this.$forceUpdate();
|
|
@@ -541,6 +550,56 @@ export default {
|
|
|
let curr = this.taskTypeAvailArr.find((item) => item.id == taskType);
|
|
|
return curr.name;
|
|
|
},
|
|
|
+
|
|
|
+ getPreviewList(imgList, index) {
|
|
|
+ // 解决el-image大图预览定位图片不准确的问题
|
|
|
+ return imgList.slice(index).concat(imgList.slice(0, index));
|
|
|
+ },
|
|
|
+ getImgList(urlStr, item) {
|
|
|
+ console.log('urlStr', urlStr);
|
|
|
+ console.log('item', item);
|
|
|
+
|
|
|
+ // 如果类型不匹配或者 urlStr 为空,直接返回
|
|
|
+ if (item.taskFiledType !== 'img' || !urlStr) return '';
|
|
|
+
|
|
|
+ // 缓存环境变量中的基础 URL
|
|
|
+ const { VUE_APP_URL } = process.env;
|
|
|
+
|
|
|
+ // 以逗号分割,并过滤掉空字符串
|
|
|
+ const imgArray = urlStr.split(',').filter(Boolean);
|
|
|
+ if (!imgArray.length) return '';
|
|
|
+
|
|
|
+ // 生成包含 type 和 url 的数组
|
|
|
+ const imgList = imgArray.map((originalUrl) => {
|
|
|
+ let type = '无';
|
|
|
+ let url = originalUrl;
|
|
|
+
|
|
|
+ if (url.includes(';1')) {
|
|
|
+ type = '拍照';
|
|
|
+ url = url.replace(';1', '');
|
|
|
+ } else if (url.includes(';2')) {
|
|
|
+ type = '相册';
|
|
|
+ url = url.replace(';2', '');
|
|
|
+ }
|
|
|
+
|
|
|
+ return {
|
|
|
+ type,
|
|
|
+ url: VUE_APP_URL + url
|
|
|
+ };
|
|
|
+ });
|
|
|
+
|
|
|
+ // 提取预览图片的 URL 列表
|
|
|
+ const previewList = imgList.map((item) => item.url);
|
|
|
+
|
|
|
+ // 将处理结果赋值给对应字段
|
|
|
+ item.imgList = imgList;
|
|
|
+
|
|
|
+ item.previewList = previewList;
|
|
|
+
|
|
|
+ // 函数约定返回空字符串
|
|
|
+ return '';
|
|
|
+ },
|
|
|
+
|
|
|
getDesc(curr, item) {
|
|
|
// 拜访类任务
|
|
|
const arr = ['51', '52', '53'];
|
|
@@ -664,11 +723,13 @@ export default {
|
|
|
const res = await taskV2CheckBatchApi(obj);
|
|
|
if (res.data.code === 0 && res.data.data) {
|
|
|
this.$message.success('审核成功!');
|
|
|
+
|
|
|
this.handleClose();
|
|
|
this.list.forEach((item) => {
|
|
|
if (item.reviewInfo.checked) {
|
|
|
- console.log('item', item);
|
|
|
-
|
|
|
+ this.checkAllLength = 0;
|
|
|
+ this.checkAllTaskScore;
|
|
|
+ item.reviewInfo.checked = false;
|
|
|
item.reviewInfo.show = false;
|
|
|
}
|
|
|
});
|