安全检查通知
This commit is contained in:
parent
0077e48d53
commit
f8b7372fd2
@ -61,7 +61,7 @@
|
||||
|
||||
<view style="font-size: 15px; font-weight: bold;color: #3d4b70;margin-bottom: 10px;margin-top: 20px;">检查内容</view>
|
||||
<uni-collapse :border="false" accordion>
|
||||
<view v-for="(item, index) in model.Nav_CheckNoticeDetails" :key="index">
|
||||
<view v-for="(item, index) in model.Nav_CheckNoticeDetails.filter(i => !i.IS_DELETED)" :key="index">
|
||||
<uni-collapse-item title-border="none" :border="false">
|
||||
<template v-slot:title>
|
||||
<view class="uni-collapse-item__title-box">
|
||||
@ -72,12 +72,12 @@
|
||||
</span>
|
||||
</view>
|
||||
<view @click.stop>
|
||||
<u-icon @click="handleDelRowBefore(index)" name="trash" color="#ff4d4f" size="21" style="margin-right: 10px;"></u-icon>
|
||||
<u-icon @click="handleDelRowBefore(item)" name="trash" color="#ff4d4f" size="21" style="margin-right: 10px;"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<view class="content">
|
||||
<u-form-item label="检查区域:" prop="CHECK_TIME" @click="handleShowSheetForArea(item,{title: '检查区域', name: 'Nav_RiskArea'})">
|
||||
<u-form-item label="检查区域:" prop="CHECK_TIME" @click="handleShowSheet({title: '检查区域', name: 'Nav_RiskArea',itemData:item})">
|
||||
<u--input disabled v-model="(item.Nav_RiskArea||{}).NAME" disabledColor="#ffffff" placeholder="请选择检查区域" border="none" inputAlign="right" fontSize="14px">
|
||||
|
||||
</u--input>
|
||||
@ -90,7 +90,7 @@
|
||||
<view class="tag-view" v-if="item.Nav_CheckNoticeDetailUsers">
|
||||
<uni-tag class="tag" v-for="(i, k) in item.Nav_CheckNoticeDetailUsers.filter(i => !i.IS_DELETED)" :key="k" :inverted="true" :text="i.Nav_User.NAME" type="primary" />
|
||||
</view>
|
||||
<u-form-item label="检查内容:" prop="CHECK_TIME" @click="handleShowSheetForArea(item,{title: '检查内容', name: 'Nav_Contents'})">
|
||||
<u-form-item label="检查内容:" prop="CHECK_TIME" @click="handleShowSheet({title: '检查内容', name: 'Nav_Contents',itemData:item})">
|
||||
<u-icon style="margin-left: 4px;" slot="right" name="arrow-down" size="12">
|
||||
</u-icon>
|
||||
</u-form-item>
|
||||
@ -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: '请选择检查人员',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user