隐患上报及整改通知

This commit is contained in:
yunkexin 2026-07-02 10:57:37 +08:00
parent beb85eb57e
commit 7f12f8df25

View File

@ -62,7 +62,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_ReportDetails" :key="index"> <view v-for="(item, index) in model.Nav_ReportDetails.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">
@ -73,24 +73,24 @@
</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" style="padding-left:10px;"> <view class="content" style="padding-left:10px;">
<u-form-item required label="检查区域:" prop="CHECK_TIME" @click="handleShowSheetForArea(item,{title: '检查区域', name: 'Nav_RiskArea'})"> <u-form-item required label="检查区域:" prop="CHECK_TIME" @click="handleShowSheet({title: '检查区域', name: 'Nav_RiskArea',itemData:item})">
<u--input disabled v-if="item.Nav_RiskArea" v-model="item.Nav_RiskArea.NAME" disabledColor="#ffffff" placeholder="请选择检查区域" border="none" inputAlign="right" fontSize="14px"> <u--input disabled v-if="item.Nav_RiskArea" v-model="item.Nav_RiskArea.NAME" disabledColor="#ffffff" placeholder="请选择检查区域" border="none" inputAlign="right" fontSize="14px">
</u--input> </u--input>
<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>
<u-form-item required label="检查内容:" prop="CHECK_TIME" @click="handleShowSheetForArea(item,{title: '检查内容', name: 'Nav_Contents'})"> <u-form-item required 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>
<u-textarea v-model="(item.Nav_Contents||{}).CHECKCONTENT" disabled placeholder="请选择检查内容"></u-textarea> <u-textarea v-model="(item.Nav_Contents||{}).CHECKCONTENT" disabled placeholder="请选择检查内容"></u-textarea>
<u-form-item required label="隐患描述:" prop="CHECK_TIME" @click="handleShowSheetForArea(item,{title: '隐患描述', name: 'Nav_Question'})"> <u-form-item required label="隐患描述:" prop="CHECK_TIME" @click="handleShowSheet({title: '隐患描述', name: 'Nav_Question',itemData:item})">
<view @click.stop> <view @click.stop>
<u-button text="新增隐患描述" type="primary" @click="handleNewRisk(item)" size="mini" style="margin: 0px 10px;width: 100px;"></u-button> <u-button text="新增隐患描述" type="primary" @click="handleNewRisk(item)" size="mini" style="margin: 0px 10px;width: 100px;"></u-button>
</view> </view>
@ -110,7 +110,7 @@
<u--input v-model="item.HIDDEN_PLACE" placeholder="请填写隐患地点" disabledColor="#ffffff" inputAlign="right" fontSize="14px" border="none"> <u--input v-model="item.HIDDEN_PLACE" placeholder="请填写隐患地点" disabledColor="#ffffff" inputAlign="right" fontSize="14px" border="none">
</u--input> </u--input>
</u-form-item> </u-form-item>
<u-form-item required label="整改责任人" prop="HIDDEN_PLACE" @click="handleShowSheetForArea(item,{title: '整改责任人', name: 'Nav_RecitifyUser'})"> <u-form-item required label="整改责任人" prop="HIDDEN_PLACE" @click="handleShowSheet({title: '整改责任人', name: 'Nav_RecitifyUser',itemData:item})">
<u--input v-model="(item.Nav_RecitifyUser||{}).NAME" placeholder="请选择整改责任人" suffixIcon="arrow-down" suffixIconStyle="font-size: 12px" disabled disabledColor="#ffffff" <u--input v-model="(item.Nav_RecitifyUser||{}).NAME" placeholder="请选择整改责任人" suffixIcon="arrow-down" suffixIconStyle="font-size: 12px" disabled disabledColor="#ffffff"
inputAlign="right" fontSize="14px" border="none"> inputAlign="right" fontSize="14px" border="none">
</u--input> </u--input>
@ -413,15 +413,6 @@
stepReduce() { stepReduce() {
this.stepsPageList = this.stepsPageList - 1 this.stepsPageList = this.stepsPageList - 1
}, },
handleShowSheetForArea(item, todo) {
const validDetails = this.model.Nav_ReportDetails.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)
@ -475,10 +466,8 @@
if (p.val) { if (p.val) {
extendRule(json, 'DESCREPTION', 9, p.val); extendRule(json, 'DESCREPTION', 9, p.val);
} }
if (p.itemData.CHECK_CONTENTS_ID && p.itemData.CHECK_CONTENTS_ID !== '') {
let data = this.model.Nav_ReportDetails[p.index] extendRule(json, 'CHECK_CONTENTS_ID', 1, p.itemData.CHECK_CONTENTS_ID);
if (data.CHECK_CONTENTS_ID && data.CHECK_CONTENTS_ID !== '') {
extendRule(json, 'CHECK_CONTENTS_ID', 1, data.CHECK_CONTENTS_ID);
} }
json.Sort = 'DESCREPTION' json.Sort = 'DESCREPTION'
dataSelect = await GetHiddenScripList(json).then(res => { dataSelect = await GetHiddenScripList(json).then(res => {
@ -540,23 +529,20 @@
handleSelected(e) { handleSelected(e) {
this.selectorInfo.showPopup = false this.selectorInfo.showPopup = false
const validDetails = this.model.Nav_ReportDetails.filter(i => !i.IS_DELETED);
const index = this.selectorInfo.index;
const realIndex = this.model.Nav_ReportDetails.findIndex(item => item === validDetails[index]);
if (this.selectorInfo.name == 'Nav_RiskArea') { if (this.selectorInfo.name == 'Nav_RiskArea') {
this.model.Nav_ReportDetails[realIndex].Nav_RiskArea = e; this.selectorInfo.itemData.Nav_RiskArea = e;
this.model.Nav_ReportDetails[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_ReportDetails[realIndex].Nav_Contents = e; this.selectorInfo.itemData.Nav_Contents = e;
this.model.Nav_ReportDetails[realIndex].CHECK_CONTENTS_ID = e.ID; this.selectorInfo.itemData.CHECK_CONTENTS_ID = e.ID;
} else if (this.selectorInfo.name == 'Nav_Question') { } else if (this.selectorInfo.name == 'Nav_Question') {
this.model.Nav_ReportDetails[realIndex].Nav_Question = e; this.selectorInfo.itemData.Nav_Question = e;
this.model.Nav_ReportDetails[realIndex].CHECK_QUESTION_ID = e.ID; this.selectorInfo.itemData.CHECK_QUESTION_ID = e.ID;
this.model.Nav_CheckRecordDetails[realIndex].HIDDEN_LEVEL = e.QUESTION_LEVEL this.selectorInfo.itemData.HIDDEN_LEVEL = e.QUESTION_LEVEL
this.model.Nav_CheckRecordDetails[realIndex].HIDDEN_LEVELName = this.enumsData['SKHiddenLevel'].find(item1 => item1.code === e.QUESTION_LEVEL).name; this.selectorInfo.itemData.HIDDEN_LEVELName = this.enumsData['SKHiddenLevel'].find(item1 => item1.code === e.QUESTION_LEVEL).name;
} else if (this.selectorInfo.name == 'Nav_RecitifyUser') { } else if (this.selectorInfo.name == 'Nav_RecitifyUser') {
this.model.Nav_ReportDetails[realIndex].Nav_RecitifyUser = e; this.selectorInfo.itemData.Nav_RecitifyUser = e;
this.model.Nav_ReportDetails[realIndex].RECITIFY_USER_ID = e.ID; this.selectorInfo.itemData.RECITIFY_USER_ID = e.ID;
} }
@ -601,8 +587,7 @@
this.model.CHECK_TIME = uni.$u.timeFormat(e.value, this.model.CHECK_TIME = uni.$u.timeFormat(e.value,
'yyyy-mm-dd hh:MM:ss') 'yyyy-mm-dd hh:MM:ss')
} else if (this.dateTimePickerInfo.dataIndex == 2) { } else if (this.dateTimePickerInfo.dataIndex == 2) {
const realIndex = getRealIndex(this.dateTimePickerInfo.item, this.model.Nav_ReportDetails) this.dateTimePickerInfo.item.RECITIFY_TIME = uni.$u.timeFormat(e.value,
this.model.Nav_ReportDetails[realIndex].RECITIFY_TIME = uni.$u.timeFormat(e.value,
'yyyy-mm-dd') 'yyyy-mm-dd')
} }
this.dateTimePickerInfo.showCheckDate = false this.dateTimePickerInfo.showCheckDate = false
@ -638,8 +623,9 @@
}) })
this.model.Nav_ReportDetails = [...this.model.Nav_ReportDetails] this.model.Nav_ReportDetails = [...this.model.Nav_ReportDetails]
}, },
handleDelRowBefore(index) { handleDelRowBefore(item) {
this.showDelModalIndex = index item.IS_DELETED = true
this.$forceUpdate()
}, },