This commit is contained in:
yunkexin 2025-11-07 14:37:14 +08:00
parent af67c253b1
commit f6576d85bb

View File

@ -21,11 +21,6 @@
<u-textarea v-model="model.CHECKCONTENT" placeholder="请输入检查内容">
</u-textarea>
</u--form>
</view>
<view style="padding: 10px 16px;" v-if="stepsPageList === 0" class="bottom-button">
<u-button type="primary" @click="stepAdd" color="#3d4b70" :loading="stepLoad">下一步</u-button>
</view>
<view class="card" v-if="stepsPageList === 1">
<u--form labelWidth="auto" :model="model" ref="wForm" class="sub-form">
@ -77,12 +72,10 @@
<!-- <u-button type="primary" @click="handleNewCheckList" color="#3d4b70" style="margin-left: 5px;">检查清单</u-button> -->
</view>
</u--form>
</view>
<view style="padding: 10px 16px;display: flex;flex-direction: row;" v-if="stepsPageList === 1" class="bottom-button">
<u-button type="primary" @click="stepReduce" color="#3d4b70" :plain="true" style="margin-right: 5px;">上一步</u-button>
<u-button type="primary" @click="submit" color="#3d4b70" style="margin-left: 5px;">提交</u-button>
<view style="padding: 10px 16px;display: flex;flex-direction: row;" class="bottom-button">
<u-button type="primary" @click="submit" color="#3d4b70">提交</u-button>
</view>
<u-modal :show="showDelModalIndex >= 0" @confirm="confirmDel" @cancel="cacelDel" :showCancelButton="true" title="确认删除?"></u-modal>
@ -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() {