diff --git a/pages/apply/subPages/SK/checkContentEdit.vue b/pages/apply/subPages/SK/checkContentEdit.vue index 86d0633..92012bd 100644 --- a/pages/apply/subPages/SK/checkContentEdit.vue +++ b/pages/apply/subPages/SK/checkContentEdit.vue @@ -21,11 +21,6 @@ - - - 下一步 - - @@ -77,12 +72,10 @@ - - - 上一步 - 提交 + + 提交 @@ -177,7 +170,7 @@ SECURITY_INSPECTION_RECORD_ID: null, CHECK_TIME: uni.$u.timeFormat(new Date(), 'yyyy-mm-dd hh:MM:ss'), Nav_ListCheckQuestion: [], - CHECK_CONTENTS_ID:'' + CHECK_CONTENTS_ID: '' }, selectorInfo: { name: 'user', @@ -227,13 +220,11 @@ } }, onLoad(option) { - this.model.CHECK_CONTENTS_ID = option.CHECK_CONTENTS_ID?option.CHECK_CONTENTS_ID:'' + this.model.CHECK_CONTENTS_ID = option.CHECK_CONTENTS_ID ? option.CHECK_CONTENTS_ID : '' this.TaskID = option.taskID ? option.taskID : ''; this.ID = option.ID ? option.ID : ''; this.fetchEnums(['SKProductionUnit', 'SKHiddenLevel']); - if(option.CHECK_CONTENTS_ID){ - this.getNotNew() - } + }, methods: { async fetchEnums(enumNames) { @@ -268,6 +259,7 @@ }); // 所有枚举获取完成后,执行loadData this.loadData(); + } catch (error) { console.error('枚举请求失败:', error); uni.showToast({ @@ -276,7 +268,7 @@ }); } }, - getNotNew(){ + getNotNew() { const orgId = uni.getStorageSync('orgId') const json = initFilter(orgId, "", "") extendRule(json, 'ID', 1, this.model.CHECK_CONTENTS_ID) @@ -286,22 +278,27 @@ extendInclude(json, 'Nav_ListCheckQuestion'); extendIgnoreDataRule(json) GetCheckContentsNew(json).then(res => { - this.model = res - this.model.Product_Unit = res.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item => item.code === res.MineType).name : ''; - if(this.model.Nav_ListCheckQuestion&&this.model.Nav_ListCheckQuestion.length>0){ - this.model.Nav_ListCheckQuestion.map(item=>{ - item.QUESTION_LEVELName= item.QUESTION_LEVEL !== undefined ? this.enumsData['SKHiddenLevel'].find(item1 => item1.code === item.QUESTION_LEVEL).name : ''; - }) - } - + this.model = res + this.model.Product_Unit = res.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item => item.code === res.MineType).name : ''; + if (this.model.Nav_ListCheckQuestion && this.model.Nav_ListCheckQuestion.length > 0) { + this.model.Nav_ListCheckQuestion.map(item => { + item.QUESTION_LEVELName = item.QUESTION_LEVEL !== undefined ? this.enumsData['SKHiddenLevel'].find(item1 => item1.code === item.QUESTION_LEVEL).name : ''; + }) + } + }) }, loadData() { - this.model.ID = guid() - this.isLoadOK = false - this.stepLoad = false - this.$forceUpdate() + if (this.model.CHECK_CONTENTS_ID) { + this.getNotNew() + } else { + this.model.ID = guid() + this.isLoadOK = false + this.stepLoad = false + this.$forceUpdate() + } + }, stepAdd() {