1
This commit is contained in:
parent
af67c253b1
commit
f6576d85bb
@ -21,11 +21,6 @@
|
|||||||
<u-textarea v-model="model.CHECKCONTENT" placeholder="请输入检查内容">
|
<u-textarea v-model="model.CHECKCONTENT" placeholder="请输入检查内容">
|
||||||
</u-textarea>
|
</u-textarea>
|
||||||
</u--form>
|
</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">
|
<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> -->
|
<!-- <u-button type="primary" @click="handleNewCheckList" color="#3d4b70" style="margin-left: 5px;">检查清单</u-button> -->
|
||||||
</view>
|
</view>
|
||||||
</u--form>
|
</u--form>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="padding: 10px 16px;display: flex;flex-direction: row;" v-if="stepsPageList === 1" class="bottom-button">
|
<view style="padding: 10px 16px;display: flex;flex-direction: row;" 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">提交</u-button>
|
||||||
<u-button type="primary" @click="submit" color="#3d4b70" style="margin-left: 5px;">提交</u-button>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<u-modal :show="showDelModalIndex >= 0" @confirm="confirmDel" @cancel="cacelDel" :showCancelButton="true" title="确认删除?"></u-modal>
|
<u-modal :show="showDelModalIndex >= 0" @confirm="confirmDel" @cancel="cacelDel" :showCancelButton="true" title="确认删除?"></u-modal>
|
||||||
@ -177,7 +170,7 @@
|
|||||||
SECURITY_INSPECTION_RECORD_ID: null,
|
SECURITY_INSPECTION_RECORD_ID: null,
|
||||||
CHECK_TIME: uni.$u.timeFormat(new Date(), 'yyyy-mm-dd hh:MM:ss'),
|
CHECK_TIME: uni.$u.timeFormat(new Date(), 'yyyy-mm-dd hh:MM:ss'),
|
||||||
Nav_ListCheckQuestion: [],
|
Nav_ListCheckQuestion: [],
|
||||||
CHECK_CONTENTS_ID:''
|
CHECK_CONTENTS_ID: ''
|
||||||
},
|
},
|
||||||
selectorInfo: {
|
selectorInfo: {
|
||||||
name: 'user',
|
name: 'user',
|
||||||
@ -227,13 +220,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
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.TaskID = option.taskID ? option.taskID : '';
|
||||||
this.ID = option.ID ? option.ID : '';
|
this.ID = option.ID ? option.ID : '';
|
||||||
this.fetchEnums(['SKProductionUnit', 'SKHiddenLevel']);
|
this.fetchEnums(['SKProductionUnit', 'SKHiddenLevel']);
|
||||||
if(option.CHECK_CONTENTS_ID){
|
|
||||||
this.getNotNew()
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async fetchEnums(enumNames) {
|
async fetchEnums(enumNames) {
|
||||||
@ -268,6 +259,7 @@
|
|||||||
});
|
});
|
||||||
// 所有枚举获取完成后,执行loadData
|
// 所有枚举获取完成后,执行loadData
|
||||||
this.loadData();
|
this.loadData();
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('枚举请求失败:', error);
|
console.error('枚举请求失败:', error);
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@ -276,7 +268,7 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getNotNew(){
|
getNotNew() {
|
||||||
const orgId = uni.getStorageSync('orgId')
|
const orgId = uni.getStorageSync('orgId')
|
||||||
const json = initFilter(orgId, "", "")
|
const json = initFilter(orgId, "", "")
|
||||||
extendRule(json, 'ID', 1, this.model.CHECK_CONTENTS_ID)
|
extendRule(json, 'ID', 1, this.model.CHECK_CONTENTS_ID)
|
||||||
@ -288,9 +280,9 @@
|
|||||||
GetCheckContentsNew(json).then(res => {
|
GetCheckContentsNew(json).then(res => {
|
||||||
this.model = res
|
this.model = res
|
||||||
this.model.Product_Unit = res.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item => item.code === res.MineType).name : '';
|
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){
|
if (this.model.Nav_ListCheckQuestion && this.model.Nav_ListCheckQuestion.length > 0) {
|
||||||
this.model.Nav_ListCheckQuestion.map(item=>{
|
this.model.Nav_ListCheckQuestion.map(item => {
|
||||||
item.QUESTION_LEVELName= item.QUESTION_LEVEL !== undefined ? this.enumsData['SKHiddenLevel'].find(item1 => item1.code === item.QUESTION_LEVEL).name : '';
|
item.QUESTION_LEVELName = item.QUESTION_LEVEL !== undefined ? this.enumsData['SKHiddenLevel'].find(item1 => item1.code === item.QUESTION_LEVEL).name : '';
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -298,10 +290,15 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
loadData() {
|
loadData() {
|
||||||
|
if (this.model.CHECK_CONTENTS_ID) {
|
||||||
|
this.getNotNew()
|
||||||
|
} else {
|
||||||
this.model.ID = guid()
|
this.model.ID = guid()
|
||||||
this.isLoadOK = false
|
this.isLoadOK = false
|
||||||
this.stepLoad = false
|
this.stepLoad = false
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
stepAdd() {
|
stepAdd() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user