安全检查通知
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>
|
<view style="font-size: 15px; font-weight: bold;color: #3d4b70;margin-bottom: 10px;margin-top: 20px;">检查内容</view>
|
||||||
<uni-collapse :border="false" accordion>
|
<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">
|
<uni-collapse-item title-border="none" :border="false">
|
||||||
<template v-slot:title>
|
<template v-slot:title>
|
||||||
<view class="uni-collapse-item__title-box">
|
<view class="uni-collapse-item__title-box">
|
||||||
@ -72,12 +72,12 @@
|
|||||||
</span>
|
</span>
|
||||||
</view>
|
</view>
|
||||||
<view @click.stop>
|
<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>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<view class="content">
|
<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 disabled v-model="(item.Nav_RiskArea||{}).NAME" disabledColor="#ffffff" placeholder="请选择检查区域" border="none" inputAlign="right" fontSize="14px">
|
||||||
|
|
||||||
</u--input>
|
</u--input>
|
||||||
@ -90,7 +90,7 @@
|
|||||||
<view class="tag-view" v-if="item.Nav_CheckNoticeDetailUsers">
|
<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" />
|
<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>
|
</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 style="margin-left: 4px;" slot="right" name="arrow-down" size="12">
|
||||||
</u-icon>
|
</u-icon>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
@ -349,7 +349,7 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
onConfirmPicker(e) {
|
onConfirmPicker(e) {
|
||||||
console.log(e,'1111')
|
console.log(e, '1111')
|
||||||
if (this.comPickerInfo.name == 'SKProductionUnit') {
|
if (this.comPickerInfo.name == 'SKProductionUnit') {
|
||||||
this.model.Nav_ProductionUnit = e.value[0]
|
this.model.Nav_ProductionUnit = e.value[0]
|
||||||
this.model.PRODUCTION_UNIT_ID = e.value[0].ID
|
this.model.PRODUCTION_UNIT_ID = e.value[0].ID
|
||||||
@ -426,9 +426,9 @@
|
|||||||
Nav_CheckNoticeDetailUsers: [],
|
Nav_CheckNoticeDetailUsers: [],
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleDelRowBefore(index) {
|
handleDelRowBefore(item) {
|
||||||
this.nowIndex = index
|
item.IS_DELETED = true
|
||||||
this.showDelModalIndex = index
|
this.$forceUpdate()
|
||||||
|
|
||||||
},
|
},
|
||||||
confirmDel() {
|
confirmDel() {
|
||||||
@ -485,16 +485,6 @@
|
|||||||
|
|
||||||
this.$forceUpdate();
|
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) {
|
async handleShowSheet(p) {
|
||||||
const orgId = uni.getStorageSync('orgId')
|
const orgId = uni.getStorageSync('orgId')
|
||||||
const json = initFilter(orgId, "", "", 0, p.pageIndex ?? 1)
|
const json = initFilter(orgId, "", "", 0, p.pageIndex ?? 1)
|
||||||
@ -502,11 +492,6 @@
|
|||||||
let dataSelect = []
|
let dataSelect = []
|
||||||
var defaultChecked = []
|
var defaultChecked = []
|
||||||
this.selectorInfo.isMultiple = false
|
this.selectorInfo.isMultiple = false
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
json.Limit = 20
|
json.Limit = 20
|
||||||
if (p.pageIndex) {
|
if (p.pageIndex) {
|
||||||
json.Start = (p.pageIndex - 1) * json.Limit;
|
json.Start = (p.pageIndex - 1) * json.Limit;
|
||||||
@ -530,6 +515,7 @@
|
|||||||
return res.Data
|
return res.Data
|
||||||
})
|
})
|
||||||
} else if (p.name == 'Nav_Contents') {
|
} else if (p.name == 'Nav_Contents') {
|
||||||
|
json.Sort = 'CHECKCONTENT'
|
||||||
if (p.val) {
|
if (p.val) {
|
||||||
extendRule(json, 'CHECKCONTENT', 9, p.val);
|
extendRule(json, 'CHECKCONTENT', 9, p.val);
|
||||||
}
|
}
|
||||||
@ -587,22 +573,20 @@
|
|||||||
title: this.selectorInfo.title,
|
title: this.selectorInfo.title,
|
||||||
val: val,
|
val: val,
|
||||||
pageIndex: pageIndex,
|
pageIndex: pageIndex,
|
||||||
index: this.selectorInfo.index
|
index: this.selectorInfo.index,
|
||||||
|
itemData: this.selectorInfo.itemData
|
||||||
}
|
}
|
||||||
this.handleShowSheet(p)
|
this.handleShowSheet(p)
|
||||||
},
|
},
|
||||||
|
|
||||||
handleSelected(e) {
|
handleSelected(e) {
|
||||||
this.selectorInfo.showPopup = false
|
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') {
|
if (this.selectorInfo.name == 'Nav_RiskArea') {
|
||||||
this.model.Nav_CheckNoticeDetails[realIndex].Nav_RiskArea = e;
|
this.selectorInfo.itemData.Nav_RiskArea = e;
|
||||||
this.model.Nav_CheckNoticeDetails[realIndex].RISK_AREA_ID = e.ID;
|
this.selectorInfo.itemData.RISK_AREA_ID = e.ID;
|
||||||
} else if (this.selectorInfo.name == 'Nav_Contents') {
|
} else if (this.selectorInfo.name == 'Nav_Contents') {
|
||||||
this.model.Nav_CheckNoticeDetails[realIndex].Nav_Contents = e;
|
this.selectorInfo.itemData.Nav_Contents = e;
|
||||||
this.model.Nav_CheckNoticeDetails[realIndex].CHECK_CONTENTS_ID = e.ID;
|
this.selectorInfo.itemData.CHECK_CONTENTS_ID = e.ID;
|
||||||
} else if (this.selectorInfo.name == 'Nav_CheckType') {
|
} else if (this.selectorInfo.name == 'Nav_CheckType') {
|
||||||
this.model.Nav_CheckType = e;
|
this.model.Nav_CheckType = e;
|
||||||
this.model.CHECK_TYPE_ID = e.ID;
|
this.model.CHECK_TYPE_ID = e.ID;
|
||||||
@ -612,7 +596,7 @@
|
|||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
console.log(this.model)
|
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) {
|
if (item.Nav_CheckNoticeDetailUsers.length == 0) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请选择检查人员',
|
title: '请选择检查人员',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user