检查汇总
This commit is contained in:
parent
4146d71b39
commit
beb85eb57e
@ -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_CheckRecordDetails" :key="index">
|
<view v-for="(item, index) in model.Nav_CheckRecordDetails.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-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>
|
||||||
@ -90,7 +90,7 @@
|
|||||||
<view class="tag-view" v-if="item.Nav_CheckRecordDetailUsers">
|
<view class="tag-view" v-if="item.Nav_CheckRecordDetailUsers">
|
||||||
<uni-tag class="tag" v-for="(i, k) in item.Nav_CheckRecordDetailUsers.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_CheckRecordDetailUsers.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>
|
||||||
@ -101,20 +101,20 @@
|
|||||||
<u-icon style="margin-left: 4px;" name="arrow-down" size="12">
|
<u-icon style="margin-left: 4px;" name="arrow-down" size="12">
|
||||||
</u-icon>
|
</u-icon>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="隐患描述:" prop="CHECK_TIME" @click="handleShowSheetForArea(item,{title: '隐患描述', name: 'Nav_Question'})">
|
<u-form-item label="隐患描述:" prop="CHECK_TIME" @click="handleShowSheet({title: '隐患描述', name: 'Nav_Question',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>
|
||||||
<view v-if="item.Nav_Question" style="display: flex;flex-direction: row;justify-content: center;align-items: center;">
|
<view v-if="item.Nav_Question" style="display: flex;flex-direction: row;justify-content: center;align-items: center;">
|
||||||
<u-textarea v-model="item.Nav_Question.DESCREPTION" disabled placeholder="请选择隐患描述">
|
<u-textarea v-model="item.Nav_Question.DESCREPTION" disabled placeholder="请选择隐患描述">
|
||||||
</u-textarea>
|
</u-textarea>
|
||||||
<u-icon style="margin-left: 10px;" name="trash" color="#ff4d4f" size="20" @click="handleDelQuestion(index)">
|
<u-icon style="margin-left: 10px;" name="trash" color="#ff4d4f" size="20" @click="handleDelQuestion(item)">
|
||||||
</u-icon>
|
</u-icon>
|
||||||
</view>
|
</view>
|
||||||
<view v-else style="display: flex;flex-direction: row;justify-content: center;align-items: center;">
|
<view v-else style="display: flex;flex-direction: row;justify-content: center;align-items: center;">
|
||||||
<u-textarea disabled placeholder="请选择隐患描述">
|
<u-textarea disabled placeholder="请选择隐患描述">
|
||||||
</u-textarea>
|
</u-textarea>
|
||||||
<u-icon style="margin-left: 10px;" name="trash" color="#ff4d4f" size="20" @click="handleDelQuestion(index)">
|
<u-icon style="margin-left: 10px;" name="trash" color="#ff4d4f" size="20" @click="handleDelQuestion(item)">
|
||||||
</u-icon>
|
</u-icon>
|
||||||
</view>
|
</view>
|
||||||
<!-- <u--textarea v-model="item.Nav_Question.DESCREPTION" disabled placeholder="请选择隐患描述" maxlength="-1"></u--textarea> -->
|
<!-- <u--textarea v-model="item.Nav_Question.DESCREPTION" disabled placeholder="请选择隐患描述" maxlength="-1"></u--textarea> -->
|
||||||
@ -132,7 +132,7 @@
|
|||||||
<full-upload v-model="item.Nav_CheckRecordDetailFiles" :isShowBtn='true' :listProp='listPropUpload' :listPropVal='listPropValUpload'></full-upload>
|
<full-upload v-model="item.Nav_CheckRecordDetailFiles" :isShowBtn='true' :listProp='listPropUpload' :listPropVal='listPropValUpload'></full-upload>
|
||||||
<u-form-item label="备注" prop="HIDDEN_PLACE" border-bottom>
|
<u-form-item label="备注" prop="HIDDEN_PLACE" border-bottom>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-textarea v-model="item.REMARK" placeholder="请填写备注">
|
<u-textarea v-model="item.REMARK" placeholder="请填写备注">
|
||||||
</u-textarea>
|
</u-textarea>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -412,6 +412,11 @@
|
|||||||
cancelDate() {
|
cancelDate() {
|
||||||
this.showPopupDate = false
|
this.showPopupDate = false
|
||||||
},
|
},
|
||||||
|
handleDelQuestion(item) {
|
||||||
|
item.Nav_Question = {}
|
||||||
|
item.CHECK_QUESTION_ID = ''
|
||||||
|
this.$forceUpdate()
|
||||||
|
},
|
||||||
handleSelectorPeople(e) {
|
handleSelectorPeople(e) {
|
||||||
const {
|
const {
|
||||||
index: key
|
index: key
|
||||||
@ -487,16 +492,6 @@
|
|||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
handleShowSheetForArea(item, todo) {
|
|
||||||
const validDetails = this.model.Nav_CheckRecordDetails.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)
|
||||||
@ -549,9 +544,9 @@
|
|||||||
if (p.val) {
|
if (p.val) {
|
||||||
extendRule(json, 'DESCREPTION', 9, p.val);
|
extendRule(json, 'DESCREPTION', 9, p.val);
|
||||||
}
|
}
|
||||||
let data = this.model.Nav_CheckRecordDetails[p.index]
|
|
||||||
if (data.CHECK_CONTENTS_ID && data.CHECK_CONTENTS_ID !== '') {
|
if (p.itemData.CHECK_CONTENTS_ID && p.itemData.CHECK_CONTENTS_ID !== '') {
|
||||||
extendRule(json, 'CHECK_CONTENTS_ID', 1, data.CHECK_CONTENTS_ID);
|
extendRule(json, 'CHECK_CONTENTS_ID', 1, p.itemData.CHECK_CONTENTS_ID);
|
||||||
}
|
}
|
||||||
json.Sort = 'DESCREPTION'
|
json.Sort = 'DESCREPTION'
|
||||||
dataSelect = await GetHiddenScripList(json).then(res => {
|
dataSelect = await GetHiddenScripList(json).then(res => {
|
||||||
@ -598,20 +593,17 @@
|
|||||||
|
|
||||||
handleSelected(e) {
|
handleSelected(e) {
|
||||||
this.selectorInfo.showPopup = false
|
this.selectorInfo.showPopup = false
|
||||||
const validDetails = this.model.Nav_CheckRecordDetails.filter(i => !i.IS_DELETED);
|
|
||||||
const index = this.selectorInfo.index;
|
|
||||||
const realIndex = this.model.Nav_CheckRecordDetails.findIndex(item => item === validDetails[index]);
|
|
||||||
if (this.selectorInfo.name == 'Nav_RiskArea') {
|
if (this.selectorInfo.name == 'Nav_RiskArea') {
|
||||||
this.model.Nav_CheckRecordDetails[realIndex].Nav_RiskArea = e;
|
this.selectorInfo.itemData.Nav_RiskArea = e;
|
||||||
this.model.Nav_CheckRecordDetails[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_CheckRecordDetails[realIndex].Nav_Contents = e;
|
this.selectorInfo.itemData.Nav_Contents = e;
|
||||||
this.model.Nav_CheckRecordDetails[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_CheckRecordDetails[realIndex].Nav_Question = e;
|
this.selectorInfo.itemData.Nav_Question = e;
|
||||||
this.model.Nav_CheckRecordDetails[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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -642,9 +634,9 @@
|
|||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleDelRowBefore(index) {
|
handleDelRowBefore(item) {
|
||||||
this.nowIndex = index
|
item.IS_DELETED = true
|
||||||
this.showDelModalIndex = index
|
this.$forceUpdate()
|
||||||
|
|
||||||
},
|
},
|
||||||
confirmDel() {
|
confirmDel() {
|
||||||
@ -655,7 +647,7 @@
|
|||||||
this.showDelModalIndex = undefined
|
this.showDelModalIndex = undefined
|
||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
for (let item of this.model.Nav_CheckRecordDetails) {
|
for (let item of this.model.Nav_CheckRecordDetails.filter(i => !i.IS_DELETED)) {
|
||||||
if (!item.Nav_CheckRecordDetailUsers || item.Nav_CheckRecordDetailUsers.length == 0) {
|
if (!item.Nav_CheckRecordDetailUsers || item.Nav_CheckRecordDetailUsers.length == 0) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请选择检查人员',
|
title: '请选择检查人员',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user