From c01ff5f6903db771e5fbd9fdfa0fa7dd92fc3e0d Mon Sep 17 00:00:00 2001
From: yunkexin <760754045@qq.com>
Date: Mon, 15 Jun 2026 16:24:26 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E5=85=A8=E9=A3=8E=E9=99=A9=E8=BE=A8?=
=?UTF-8?q?=E8=AF=86=E4=B8=8E=E8=AF=84=E4=BC=B0=E8=AE=A1=E5=88=92=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/apply/subPages/SK/riskSafeRecEdit.vue | 255 ++++++++++++++++----
1 file changed, 212 insertions(+), 43 deletions(-)
diff --git a/pages/apply/subPages/SK/riskSafeRecEdit.vue b/pages/apply/subPages/SK/riskSafeRecEdit.vue
index 14a89b1..6216639 100644
--- a/pages/apply/subPages/SK/riskSafeRecEdit.vue
+++ b/pages/apply/subPages/SK/riskSafeRecEdit.vue
@@ -37,6 +37,14 @@
-->
+
+
+
+
+
+
+
+
附件:
@@ -47,11 +55,7 @@
辨识与评估确认 -->
-
-
-
-
-
+
@@ -62,7 +66,7 @@
-
+
@@ -76,8 +80,9 @@
-
- 提交
+
+
+ 提交
@@ -85,7 +90,9 @@
-
+
+
@@ -116,6 +123,7 @@
} from '../../../../services/apply/subPages/SK/SKServices.js'
import {
getRequest,
+ getRequestOrderPage
} from '../../../../services/apply/FOServices/FOServices';
import stepTitle from '@/components/custom/step-title.vue'
import swipeActionItem from '../../../../uni_modules/uview-ui/libs/config/props/swipeActionItem';
@@ -135,6 +143,19 @@
showPopupStep: false,
stepLists: [],
curTotalStep: 0,
+ selectorInfo: {
+ name: 'user',
+ isMultiple: false,
+ showPopup: false,
+ totalCount: 0,
+ title: '考核结果选择',
+ dataItem: {},
+ index: 0,
+ columns: [],
+ dataLists: [],
+ defaultText: '',
+ defaultChecked: []
+ },
dataModel: {
YEAR: '',
START_DATE: '',
@@ -212,6 +233,10 @@
const orgId = uni.getStorageSync('orgId')
const json = initFilter(orgId, "", "")
extendRule(json, 'ID', 1, this.ID);
+ extendInclude(json, 'Nav_Requires');
+ extendInclude(json, 'Nav_Requires.Nav_Require');
+ extendInclude(json, 'Nav_Evaluations');
+ extendInclude(json, 'Nav_Evaluations.Nav_Evaluation');
extendInclude(json, 'Nav_Files.Nav_ImgFile');
extendInclude(json, 'Nav_Details');
extendInclude(json, 'Nav_Details.Nav_Department');
@@ -221,24 +246,45 @@
EvaluationPlanGet(json).then(res => {
this.dataModel = res;
this.stepsPage = res.STATUS == 0 ? 0 : res.STATUS == 20 ? 1 : 2
- this.dataModel.START_DATE = uni.$u.timeFormat(res.START_DATE, 'yyyy-mm-dd'),
- this.dataModel.END_DATE = uni.$u.timeFormat(res.END_DATE, 'yyyy-mm-dd'),
- this.dataModel.EVALUATION_END_DATE = uni.$u.timeFormat(res.EVALUATION_END_DATE, 'yyyy-mm-dd'),
- this.dataModel.Nav_Details.map((item, index) => {
- let arr = item.Nav_DetailUsers.map((item1, index1) => {
- if (!item1.Nav_User.IS_DELETED) {
- return ' ' + item1.Nav_User.NAME
- }
-
- })
- item['userlist'] = String(arr)
+ this.dataModel.START_DATE = uni.$u.timeFormat(res.START_DATE, 'yyyy-mm-dd')
+ this.dataModel.END_DATE = uni.$u.timeFormat(res.END_DATE, 'yyyy-mm-dd')
+ this.dataModel.EVALUATION_END_DATE = uni.$u.timeFormat(res.EVALUATION_END_DATE, 'yyyy-mm-dd')
+ let Nav_RequiresName = ''
+ if (this.dataModel.Nav_Requires && this.dataModel.Nav_Requires.length > 0) {
+ this.dataModel.Nav_Requires.map(item => {
+ if (item.Nav_Require.NAME !== null) {
+ Nav_RequiresName += item.Nav_Require.NAME + ' ';
+ }
})
+ }
+ this.dataModel.Nav_RequiresName = Nav_RequiresName
+ let Nav_EvaluationsName = ''
+ if (this.dataModel.Nav_Evaluations && this.dataModel.Nav_Evaluations.length > 0) {
+ this.dataModel.Nav_Evaluations.map(item => {
+ if (item.Nav_Evaluation.NAME !== null) {
+ Nav_EvaluationsName += item.Nav_Evaluation.NAME + ' ';
+ }
+ })
+ }
+ this.dataModel.Nav_EvaluationsName = Nav_EvaluationsName
+ this.dataModel.Nav_Details.map((item, index) => {
+ let arr = item.Nav_DetailUsers.map((item1, index1) => {
+ if (!item1.Nav_User.IS_DELETED) {
+ return ' ' + item1.Nav_User.NAME
+ }
+
+ })
+ item['userlist'] = String(arr)
+ })
})
}
},
handleNewCheckContent() {
this.dataModel.Nav_Details.unshift({
+ IS_DELETED: false,
+ ID:guid(),
+ IDENTIFY_EVALUATION_PLAN_ID:this.ID,
Nav_Department: {
NAME: ''
},
@@ -251,19 +297,9 @@
this.dataModel.Nav_Details = [...this.dataModel.Nav_Details]
},
- handleDelRowBefore(index) {
- this.showDelModalIndex = index
- this.nowIndex = index
-
-
- },
- confirmDel() {
- this.dataModel.Nav_Details.splice(this.nowIndex, 1)
- this.showDelModalIndex = undefined
-
- },
- cacelDel() {
- this.showDelModalIndex = undefined
+ handleDelRowBefore(item) {
+ item.IS_DELETED = true
+ this.$forceUpdate()
},
cancelRecitifyDate() {
this.showPopupRecitifyDate = false
@@ -371,6 +407,144 @@
})
}
},
+ async handleShowSheet(p) {
+ const orgId = uni.getStorageSync('orgId')
+ const json = initFilter(orgId, "", "", 0, p.pageIndex ?? 1)
+ let dataSelect = []
+ // this.selectorInfo.defaultChecked = []
+ var defaultChecked = []
+ this.selectorInfo.isMultiple = false
+ if (p.val) {
+ extendRule(json, 'NAME', 9, p.val);
+ }
+ json.Limit = 20
+ if (p.pageIndex) {
+ json.Start = (p.pageIndex - 1) * json.Limit;
+ }
+ json.Sort = "NAME"
+ json.SelectField = ["ID", "NAME", "NAME"]
+ if (p.name == "Nav_Requires") {
+ this.selectorInfo.isMultiple = true
+ dataSelect = await getRequestOrderPage(json, "/SK/Request/OrderPaged").then(res => {
+ this.selectorInfo.totalCount = res.TotalCount
+ if (res.Data != undefined && res.Data.length > 0) {
+ for (let i = 0; i < res.length; i++) {
+ res[i].name = res.Data[i].NAME
+ res[i].code = res.Data[i].CODE
+ }
+ }
+ return res.Data
+ })
+ if (this.dataModel.Nav_Requires && this.dataModel.Nav_Requires.length > 0) {
+ // this.selectorInfo.defaultChecked = []
+ this.dataModel.Nav_Requires.filter(i => !i.IS_DELETED).forEach(e => {
+ if (e.Nav_Require != null && e.Nav_Require.NAME != null)
+ defaultChecked.push(e.Nav_Require)
+ })
+ } else {
+ defaultChecked = null
+ }
+ } else if (p.name == "Nav_Evaluations") {
+ this.selectorInfo.isMultiple = true
+ dataSelect = await getRequestOrderPage(json, "/SK/Evaluation/OrderPaged").then(res => {
+ if (res.Data != undefined && res.Data.length > 0) {
+ for (let i = 0; i < res.length; i++) {
+ res[i].name = res.Data[i].NAME
+ res[i].code = res.Data[i].CODE
+ }
+ }
+ return res.Data
+ })
+ if (this.dataModel.Nav_Evaluations && this.dataModel.Nav_Evaluations.length > 0) {
+ // this.selectorInfo.defaultChecked = []
+ this.dataModel.Nav_Evaluations.filter(i => !i.IS_DELETED).forEach(e => {
+ if (e.Nav_Evaluation != null && e.Nav_Evaluation.NAME != null)
+ defaultChecked.push(e.Nav_Evaluation)
+ })
+ } else {
+ defaultChecked = null
+ }
+ }
+ if (defaultChecked == null)
+ defaultChecked = []
+ if (dataSelect.length) {
+ this.selectorInfo = {
+ itemData: p.itemData != undefined ? p.itemData : this.selectorInfo
+ .itemData, //itemData: p.itemData, 搜索的时候 p.itemData为空 赋值修改 为 她自己本身 this.selectorInfo.itemData
+ isMultiple: this.selectorInfo.isMultiple,
+ totalCount: this.selectorInfo.totalCount,
+ showPopup: true,
+ title: p.title,
+ name: p.name,
+ dataLists: dataSelect,
+ defaultChecked: defaultChecked
+ }
+ } else {
+ // 暂无数据
+ }
+ },
+ //数据加载
+ handleSearch(val, pageIndex) {
+ var p = {
+ name: this.selectorInfo.name,
+ title: this.selectorInfo.title,
+ val: val,
+ pageIndex: pageIndex,
+ index: this.selectorInfo.index
+ }
+ this.handleShowSheet(p)
+ },
+
+ handleSelected(e) {
+ this.selectorInfo.showPopup = false
+ if (this.selectorInfo.name == 'Nav_Requires') {
+ let listArea = []
+ let areaShow = ''
+ if (e.length > 0) {
+ e.forEach((item, i) => {
+ if (item.name != null || item.NAME != null) {
+ if (i > 0) {
+ areaShow += ' '
+ }
+ listArea.push({
+ ID: guid(),
+ IDENTIFY_EVALUATION_PLAN_ID: this.ID,
+ REQUIRE_ID: item.ID,
+ ORG_ID: item.ORG_ID,
+ Nav_Require: item
+ })
+ areaShow += item.NAME
+ }
+ })
+ }
+ this.dataModel.Nav_Requires = listArea
+ this.dataModel.Nav_RequiresName = areaShow
+ } else if (this.selectorInfo.name == 'Nav_Evaluations') {
+ let listArea = []
+ let areaShow = ''
+ if (e.length > 0) {
+ e.forEach((item, i) => {
+ if (item.name != null || item.NAME != null) {
+ if (i > 0) {
+ areaShow += ' '
+ }
+ listArea.push({
+ ID: guid(),
+ IDENTIFY_EVALUATION_PLAN_ID: this.ID,
+ EVALUATION_ID: item.ID,
+ ORG_ID: item.ORG_ID,
+ Nav_Evaluation: item
+ })
+ areaShow += item.NAME
+ }
+ })
+ }
+ this.dataModel.Nav_Evaluations = listArea
+ this.dataModel.Nav_EvaluationsName = areaShow
+ }
+
+
+ },
submit() {
if (!this.dataModel.CONTENTS) {
@@ -396,16 +570,11 @@
return
}
}
- let arr = ['DEPARTMENT_ID', 'ENTITY_ORG_TPYE', 'Nav_DetailUsers', 'ID', 'IDENTIFY_EVALUATION_PLAN_ID', 'ORG_ID']
- this.model = {
- YEAR: this.dataModel.YEAR,
- START_DATE: this.dataModel.START_DATE,
- END_DATE: this.dataModel.END_DATE,
- EVALUATION_END_DATE: this.dataModel.EVALUATION_END_DATE,
- CONTENTS: this.dataModel.CONTENTS,
- ORG_ID: this.ORG_ID,
- Nav_Files: this.dataModel.Nav_Files,
- Nav_Details: handleOriginalArray(this.dataModel.Nav_Details, arr)
+ this.model = this.dataModel
+ if(this.model.Nav_Details&&this.model.Nav_Details.length>0){
+ this.model.Nav_Details.map(item=>{
+ delete item.Nav_Department
+ })
}
this.model.ID = this.ID
this.model.TaskID = this.TaskID