From 658191f0e22968c4a00c3ac03514d35225b05fb0 Mon Sep 17 00:00:00 2001
From: yunkexin <760754045@qq.com>
Date: Tue, 28 Oct 2025 11:17:06 +0800
Subject: [PATCH] 1
---
pages/apply/jobList.vue | 53 ++++++++++++++-------------
pages/apply/jobRiskShow.vue | 71 ++++++++++++++++++++++++++++++++++---
2 files changed, 93 insertions(+), 31 deletions(-)
diff --git a/pages/apply/jobList.vue b/pages/apply/jobList.vue
index d348bb4..f05eaaf 100644
--- a/pages/apply/jobList.vue
+++ b/pages/apply/jobList.vue
@@ -20,7 +20,7 @@
-
+
*
@@ -36,7 +36,7 @@
-
+
@@ -46,7 +46,7 @@
-
+
@@ -58,7 +58,7 @@
-
+
生产岗位告知卡
0) {
item.Nav_Librarys.map(item1 => {
item1.EVALUATE_LEVELName = item1.EVALUATE_LEVEL !== undefined ? this.enumsData['SKEvaluateLevelEnum'].find(item => item.code === item1.EVALUATE_LEVEL).name : '';
+ if(!item1.MINE_NAME){
+ item1.MINE_NAME = item1.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item => item.code === item1.MineType).name : '';
+ }
+
})
}
})
@@ -269,15 +273,6 @@
if (e.length === allIds.length && allIds.length > 0) {
this.checkedItems.unshift('all');
}
- // const diff = this.checkedItems.filter(item => !e.includes(item));
-
- // // 取消其他选项
- // this.checkedItems = e.filter(item => item !== 'all');
-
- // // 检查是否所有选项都被选中,如果是则自动勾选全选
- // if (this.checkedItems.length === allIds.length && allIds.length > 0) {
- // this.checkedItems.unshift('all');
- // }
}
}
}
@@ -286,16 +281,10 @@
this.allData.map(item => {
if (item.DEPARTMENT_ID == this.model.DEPARTMENT_ID && item.POST_NAME == this.model.Nav_Post.NAME) {
this.filterDatas = item
- console.log(this.filterDatas, 'this.filterData')
}
})
},
- checkChange(e) {
- console.log(e, '888')
- },
submit() {
- console.log(this.checkedItems, '9999')
- console.log(this.filterDatas, '9999')
let arr = []
this.filterDatas.Nav_Librarys.map(item => {
this.checkedItems.map(item1 => {
@@ -304,7 +293,6 @@
}
})
})
- console.log(arr, 'arr')
//MEASURES_NAME处理
const groupedData = arr.reduce((acc, item) => {
const riskName = item.RISK_NAME;
@@ -325,7 +313,22 @@
//
// 1. 按 RISK_NAME 分组,收集所有对应的 RISK_DESCRIPTION
+ const allPhotos = [];
+ const photoNames = new Set(); // 用于记录已添加的图片name,实现去重
+ arr.forEach(item => {
+ // 确保当前对象存在 Nav_Photo 且是数组,避免报错
+ if (Array.isArray(item.Nav_Photo)) {
+ item.Nav_Photo.forEach(photo => {
+ // 判断图片name是否已存在,不存在则添加
+ if (!photoNames.has(photo.name)) {
+ allPhotos.push(photo);
+ photoNames.add(photo.name);
+ }
+ });
+ }
+ });
+ // 此时 allPhotos 已包含所有 Nav_Photo 中的图片对象
let newarr = {
departName: this.filterDatas.Nav_Department ? this.filterDatas.Nav_Department.NAME : '',
userName: this.filterDatas.USER_NAME,
@@ -357,13 +360,9 @@
})
.join(''),
RISK_DESCRIPTION: this.handleData(arr,'RISK_DESCRIPTION'),
- EMERGENCY: this.handleData(arr,'EMERGENCY')
+ EMERGENCY: this.handleData(arr,'EMERGENCY'),
+ Nav_Photo:allPhotos
}
-
- console.log(newarr, 'nnnnnnnnnnnnn')
-
-
-
uni.setStorageSync('detailData', newarr);
uni.navigateTo({
url: '/pages/apply/jobRiskShow'
diff --git a/pages/apply/jobRiskShow.vue b/pages/apply/jobRiskShow.vue
index 9194939..dcd209a 100644
--- a/pages/apply/jobRiskShow.vue
+++ b/pages/apply/jobRiskShow.vue
@@ -1,5 +1,5 @@
-
+
@@ -21,8 +21,27 @@
-
+
+
+
+
+
+
+
+
+ {{ photo.NAME }}
+
+
+
+ 暂无安全标志图片
+
+
@@ -65,12 +84,12 @@
data() {
return {
detailData: {},
- model: {}
+ model: {},
+ hosturl:config.uni_app_web_source_url
}
},
onLoad(option) {
this.detailData = uni.getStorageSync('detailData');
- console.log(this.detailData, 'this.detailData')
},
onUnload() {
// 可选:用完删除,避免占用存储
@@ -86,4 +105,48 @@
\ No newline at end of file