From eb94a0cc8f1b8ec584a8a6dafd456a3536c41617 Mon Sep 17 00:00:00 2001 From: yunkexin <760754045@qq.com> Date: Fri, 30 Jan 2026 16:16:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=B9=E8=AE=AD=E9=9C=80=E6=B1=82=E8=B0=83?= =?UTF-8?q?=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/apply/subPages/SE/12trainSurveyEdit.vue | 2 +- pages/apply/subPages/SE/12trainSurveyShow.vue | 106 ++++++++++++++---- 2 files changed, 88 insertions(+), 20 deletions(-) diff --git a/pages/apply/subPages/SE/12trainSurveyEdit.vue b/pages/apply/subPages/SE/12trainSurveyEdit.vue index 89cd4c4..0bdc468 100644 --- a/pages/apply/subPages/SE/12trainSurveyEdit.vue +++ b/pages/apply/subPages/SE/12trainSurveyEdit.vue @@ -241,7 +241,7 @@ json.Sort = "ID" - extendRule(json, 'TYPE', 1, '1') + extendRule(json, 'TYPE', 1, '2') dataSelect = await getRequestOrderPage(json, "/SE/TestEnumPoint/OrderPaged").then(res => { this.selectorInfo.totalCount = res.TotalCount diff --git a/pages/apply/subPages/SE/12trainSurveyShow.vue b/pages/apply/subPages/SE/12trainSurveyShow.vue index 9d24568..7d14c7d 100644 --- a/pages/apply/subPages/SE/12trainSurveyShow.vue +++ b/pages/apply/subPages/SE/12trainSurveyShow.vue @@ -4,11 +4,7 @@ - - - - + @@ -30,30 +26,52 @@ --> - + + + + + + + + + + - + + + + - - - - - + + + + + +
- 答案正确率(百分比) - 序号培训需求需求部门需求人数
{{rowIndex + 1}}{{row.NAME}}{{row.department.join('、')}}{{row.report}}
+
+ + + + + + + + + + + + + +
序号培训其他需求需求人员需求人数
{{rowIndex + 1}}{{row.NAME}}{{row.department.join('、')}}{{row.report}}
@@ -69,7 +87,8 @@ import { initFilter, extendRule, - extendInclude + extendInclude, + extendSelectField } from '../../../../utils/common' import { getRequest, @@ -96,6 +115,10 @@ Lists: [], type: '部门', ROWS: [], + ROWS1: [], + total:0, + reportCount:0, + rate:0, comPickerInfo: { showSheet: false, columns: [], @@ -136,9 +159,54 @@ getRequest(json, "/SE/TrainSurvey/Get").then(res => { this.model = res + this.reportCount = this.model && this.model.Nav_Demands ? this.model.Nav_Demands.filter(i => i.OK).length : 0; + this.total = this.model && this.model.Nav_Demands ? this.model.Nav_Demands.length : 0; + this.rate = this.total === 0 ? 0 : Math.round(this.reportCount * 100 / this.total)+'%'; + this.updataData() this.isLoadOK = true; }) }, + updataData() { + let r = {}; + this.model.Nav_Demands.forEach(it => { + it.Nav_Items.forEach(d => { + let idx = r[d.DEMAND_ID]; + if (idx === undefined) { + idx = this.ROWS.length + r[d.DEMAND_ID] = idx; + this.ROWS.push({ + ID: d.DEMAND_ID, + NAME: d.Nav_DEMAND?.NAME, + department: [], + total: 0, + report: 0, + }) + } + + let name = it.Nav_User?.Nav_Department.NAME; + if (name == '宁化行洛坑钨矿有限公司') { + name = '公司领导'; + } + if (this.ROWS[idx].department.indexOf(name) == -1) { + this.ROWS[idx].department.push(name); + } + this.ROWS[idx].total++; + if (it.OK) { + this.ROWS[idx].report++; + } + }) + }); + this.model.Nav_Demands.forEach(it => { + if (it.OTHER != undefined && it.OTHER != "") { + this.ROWS1.push({ + NAME: it.OTHER, + department: [it.Nav_User?.NAME], + total: 1, + report: 1, + }) + } + }); + }, //下拉数据加载 async handleShowSheet(p) { const orgId = uni.getStorageSync('orgId')