diff --git a/pages/apply/subPages/SK/safeCheckEditNew.vue b/pages/apply/subPages/SK/safeCheckEditNew.vue index eb8fcba..b4074cc 100644 --- a/pages/apply/subPages/SK/safeCheckEditNew.vue +++ b/pages/apply/subPages/SK/safeCheckEditNew.vue @@ -61,7 +61,7 @@ 检查内容 - + - + @@ -90,7 +90,7 @@ - + @@ -337,7 +337,7 @@ name: name } }) - + } else { this.comPickerInfo = { @@ -349,7 +349,7 @@ }, onConfirmPicker(e) { - console.log(e,'1111') + console.log(e, '1111') if (this.comPickerInfo.name == 'SKProductionUnit') { this.model.Nav_ProductionUnit = e.value[0] this.model.PRODUCTION_UNIT_ID = e.value[0].ID @@ -426,9 +426,9 @@ Nav_CheckNoticeDetailUsers: [], }) }, - handleDelRowBefore(index) { - this.nowIndex = index - this.showDelModalIndex = index + handleDelRowBefore(item) { + item.IS_DELETED = true + this.$forceUpdate() }, confirmDel() { @@ -485,16 +485,6 @@ this.$forceUpdate(); }, - - handleShowSheetForArea(item, todo) { - const validDetails = this.model.Nav_CheckNoticeDetails.filter(i => !i.IS_DELETED); - const index = validDetails.indexOf(item); - this.handleShowSheet({ - title: todo.title, - name: todo.name, - index: index - }); - }, async handleShowSheet(p) { const orgId = uni.getStorageSync('orgId') const json = initFilter(orgId, "", "", 0, p.pageIndex ?? 1) @@ -502,11 +492,6 @@ let dataSelect = [] var defaultChecked = [] this.selectorInfo.isMultiple = false - - - - - json.Limit = 20 if (p.pageIndex) { json.Start = (p.pageIndex - 1) * json.Limit; @@ -530,6 +515,7 @@ return res.Data }) } else if (p.name == 'Nav_Contents') { + json.Sort = 'CHECKCONTENT' if (p.val) { extendRule(json, 'CHECKCONTENT', 9, p.val); } @@ -587,22 +573,20 @@ title: this.selectorInfo.title, val: val, pageIndex: pageIndex, - index: this.selectorInfo.index + index: this.selectorInfo.index, + itemData: this.selectorInfo.itemData } this.handleShowSheet(p) }, handleSelected(e) { this.selectorInfo.showPopup = false - const validDetails = this.model.Nav_CheckNoticeDetails.filter(i => !i.IS_DELETED); - const index = this.selectorInfo.index; - const realIndex = this.model.Nav_CheckNoticeDetails.findIndex(item => item === validDetails[index]); if (this.selectorInfo.name == 'Nav_RiskArea') { - this.model.Nav_CheckNoticeDetails[realIndex].Nav_RiskArea = e; - this.model.Nav_CheckNoticeDetails[realIndex].RISK_AREA_ID = e.ID; + this.selectorInfo.itemData.Nav_RiskArea = e; + this.selectorInfo.itemData.RISK_AREA_ID = e.ID; } else if (this.selectorInfo.name == 'Nav_Contents') { - this.model.Nav_CheckNoticeDetails[realIndex].Nav_Contents = e; - this.model.Nav_CheckNoticeDetails[realIndex].CHECK_CONTENTS_ID = e.ID; + this.selectorInfo.itemData.Nav_Contents = e; + this.selectorInfo.itemData.CHECK_CONTENTS_ID = e.ID; } else if (this.selectorInfo.name == 'Nav_CheckType') { this.model.Nav_CheckType = e; this.model.CHECK_TYPE_ID = e.ID; @@ -612,7 +596,7 @@ }, submit() { console.log(this.model) - for (let item of this.model.Nav_CheckNoticeDetails) { + for (let item of this.model.Nav_CheckNoticeDetails.filter(i => !i.IS_DELETED)) { if (item.Nav_CheckNoticeDetailUsers.length == 0) { uni.showToast({ title: '请选择检查人员',