flx:优化新增安全检查切换排查记录没有默认

This commit is contained in:
Rain_ 2025-09-03 13:51:10 +08:00
parent fbff1bbab1
commit a111355d8c
3 changed files with 10 additions and 9 deletions

View File

@ -720,7 +720,7 @@
securityDangerListFn(obj, recordType) { securityDangerListFn(obj, recordType) {
this.securityDangerFieldList.forEach((item) => { this.securityDangerFieldList.forEach((item) => {
if (!item.defaultDataType) return; if (!item.defaultDataType) return;
if (item.originalFieldName == "责任区域") { if (item.originalFieldName == "责任区域" || item.originalFieldName == "检查部位") {
this.$nextTick(() => { this.$nextTick(() => {
const resultList = this.getAllIds(this.checkPointList); const resultList = this.getAllIds(this.checkPointList);
obj[item.fieldName] = resultList.map(item => item.id); obj[item.fieldName] = resultList.map(item => item.id);
@ -1731,7 +1731,9 @@
this.pointList[i].y this.pointList[i].y
pointArr.push(obj) pointArr.push(obj)
} }
data.measurePoints = pointArr.join(',') data.measurePoints = pointArr.join(',')
data.notifyPerson = pointArr.join(',')
console.log('data.measurePoints=============', data.measurePoints); console.log('data.measurePoints=============', data.measurePoints);
if (this.typeCheck == "type1") { if (this.typeCheck == "type1") {
console.log(data); console.log(data);

View File

@ -814,7 +814,7 @@
securityDangerListFn(obj, recordType) { securityDangerListFn(obj, recordType) {
this.securityDangerList.forEach((item) => { this.securityDangerList.forEach((item) => {
if (!item.defaultDataType) return; if (!item.defaultDataType) return;
if (item.originalFieldName == "责任区域") { if (item.originalFieldName == "责任区域" || item.originalFieldName == "检查部位") {
this.$nextTick(() => { this.$nextTick(() => {
const resultList = this.getAllIds(this.checkPointList); const resultList = this.getAllIds(this.checkPointList);
obj[item.fieldName] = resultList.map(item => item.id); obj[item.fieldName] = resultList.map(item => item.id);

View File

@ -54,7 +54,6 @@
</view> </view>
<view class="type flex" v-if="title == '整改'"> <view class="type flex" v-if="title == '整改'">
<view class="name"> <view class="name">
<text class="star">*</text>
违章人员: 违章人员:
</view> </view>
<!-- <picker mode="selector" :range="personList" range-key="workerName" @change="handleChangeRegion" <!-- <picker mode="selector" :range="personList" range-key="workerName" @change="handleChangeRegion"
@ -80,7 +79,7 @@
input-align="left" @confirm="handleChangeCharger"></g-picker> --> input-align="left" @confirm="handleChangeCharger"></g-picker> -->
</view> </view>
<view class="type flex3"> <view class="type flex3">
<view class="name"><text class="star">*</text>补充说明</view> <view class="name"><text v-if="type != 3" class="star">*</text>补充说明</view>
<textarea class="textarea" maxlength="-1" placeholder-class="cl" name="inspectContent" <textarea class="textarea" maxlength="-1" placeholder-class="cl" name="inspectContent"
@input='changeTextarea' :value="content" placeholder="请输入"></textarea> @input='changeTextarea' :value="content" placeholder="请输入"></textarea>
</view> </view>
@ -393,7 +392,7 @@
}, },
// //
formSubmit() { formSubmit() {
if (this.content == '') { if (this.content == '' && this.type != 3) {
uni.showToast({ uni.showToast({
title: "请输入回复内容", title: "请输入回复内容",
icon: "none" icon: "none"
@ -416,10 +415,10 @@
return return
} }
if (this.violatorId.length == 0 && this.type == 1) { // if (this.violatorId.length == 0 && this.type == 1) {
this.$message.error("请选择违章人员"); // this.$message.error("");
return; // return;
} // }
let time = this.getNewDate() let time = this.getNewDate()
let data = { let data = {