有限空间作业
parent
2b858df1f1
commit
01f85f4b98
|
@ -22,7 +22,7 @@
|
|||
import {
|
||||
getOtherAssignmentsSelectList,
|
||||
getRiskIdentificationResultsSelectList
|
||||
} from '../../api/index.js'
|
||||
} from '@/api'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
|
|
@ -210,6 +210,12 @@
|
|||
"navigationBarTitleText": "已办"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/eight_assignments/security_measures",
|
||||
"style": {
|
||||
"navigationBarTitleText": "安全措施"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/eight_assignments/technological_process",
|
||||
"style": {
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {getConfinedSpaceSelectList} from '../../../api/index'
|
||||
import {getConfinedSpaceSelectList} from '@/api'
|
||||
import OtherSelect from '@/components/other-select/index.vue';
|
||||
import {setSubmitForm} from "@/utils/submitHomeworkProcess";
|
||||
|
||||
|
@ -242,5 +242,5 @@ export default {
|
|||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
|
|
|
@ -0,0 +1,109 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="card">
|
||||
<view class="title">{{ questionnaireInfo.NAME }}</view>
|
||||
<uni-table border class="mt-10">
|
||||
<uni-tr>
|
||||
<uni-th>主要安全措施</uni-th>
|
||||
<uni-th width="200rpx">是否涉及</uni-th>
|
||||
</uni-tr>
|
||||
<uni-tr v-for="(item,index) in items" :key="item.itemInfo.EW_RE_QUES_ITEM_ID">
|
||||
<uni-td>
|
||||
<view>{{ item.itemInfo.TEXT_INFO }}</view>
|
||||
<view v-for="item1 in item.inputBoxes" :key="item1.EW_RE_QUES_ITEM_FILL_ID">
|
||||
<u-cell :title="item1.TEXT_INFO + ':'" :border="false">
|
||||
<template #value>
|
||||
<u-input v-model="item1.MARKERS" :customStyle="{marginTop: '8px'}" border="bottom"/>
|
||||
</template>
|
||||
</u-cell>
|
||||
</view>
|
||||
</uni-td>
|
||||
<uni-td>
|
||||
<u-radio-group placement="column" v-model="item.optionsValue" @change="fnRadioChange($event,index)">
|
||||
<u-radio :customStyle="{marginTop: '8px'}" v-for="item1 in item.options"
|
||||
:key="item1.EW_RE_QUES_ITEM_FILL_ID" :label="item1.TEXT_INFO" :name="item1.VALUE_INFO"/>
|
||||
</u-radio-group>
|
||||
</uni-td>
|
||||
</uni-tr>
|
||||
</uni-table>
|
||||
<view class="mt-10">
|
||||
<u-button type="primary" text="下一步" @click="$u.debounce(fnSubmit, 1000,true)"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {setSecurityMeasures} from "@/utils/submitHomeworkProcess";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
EW_RU_JOB_ID: '',
|
||||
taskId: '',
|
||||
TYPE: '',
|
||||
CORP_ID: '',
|
||||
questionnaireInfo: {},
|
||||
items: []
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
const eventChannel = this.getOpenerEventChannel();
|
||||
eventChannel.on('questionnaire', (data) => {
|
||||
this.EW_RU_JOB_ID = data.EW_RU_JOB_ID
|
||||
this.taskId = data.taskId
|
||||
this.TYPE = data.TYPE
|
||||
this.CORP_ID = data.CORP_ID
|
||||
this.questionnaireInfo = data.questionnaire.questionnaire
|
||||
this.items = data.questionnaire.items
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
fnRadioChange(event, index) {
|
||||
for (let i = 0; i < this.items[index].options.length; i++) {
|
||||
this.items[index].options[i].MARKERS = '0'
|
||||
if (this.items[index].options[i].VALUE_INFO === event) {
|
||||
this.items[index].options[i].MARKERS = '1'
|
||||
}
|
||||
}
|
||||
},
|
||||
async fnSubmit() {
|
||||
for (let i = 0; i < this.items.length; i++) {
|
||||
for (let j = 0; j < this.items[i].inputBoxes.length; j++) {
|
||||
if (!this.items[i].inputBoxes[j].MARKERS) {
|
||||
uni.$u.toast(`第${i + 1}行第${j + 1}项未填写`)
|
||||
return
|
||||
}
|
||||
}
|
||||
for (let j = 0; j < this.items[i].options.length; j++) {
|
||||
if (!this.items[i].options[j].MARKERS) {
|
||||
uni.$u.toast(`第${i + 1}行第${j + 1}项未选择`)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
await setSecurityMeasures({
|
||||
questionnaires: this.items,
|
||||
questionnaireInfo: this.questionnaireInfo,
|
||||
taskId: this.taskId,
|
||||
EW_RU_JOB_ID: this.EW_RU_JOB_ID,
|
||||
CORP_ID: this.CORP_ID,
|
||||
TYPE: this.TYPE
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.title {
|
||||
text-align: center;
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
::v-deep {
|
||||
.u-cell__body {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -17,7 +17,7 @@
|
|||
<script>
|
||||
import {
|
||||
getCorpInfoList
|
||||
} from '../../api'
|
||||
} from '@/api'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
|
|
@ -62,9 +62,17 @@ export default {
|
|||
this.jobs = resData.list.jobs
|
||||
},
|
||||
async fnSubmit() {
|
||||
let CORP_ID = ''
|
||||
for (let i = 0; i < this.form.length; i++) {
|
||||
if(this.form[i].FK_NAME === 'CORP_ID'){
|
||||
CORP_ID = this.form[i].FK_VALUE
|
||||
break
|
||||
}
|
||||
}
|
||||
await resolveNextOperation({
|
||||
EW_RU_TASK_ID: this.taskId,
|
||||
TYPE: this.type,
|
||||
CORP_ID,
|
||||
EW_RU_JOB_ID: this.jobId,
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {getCurrentNextOperation, setTaskSave} from "../api/index";
|
||||
import {getCurrentNextOperation, setTaskSave} from "@/api";
|
||||
|
||||
// 处理表单数据
|
||||
const processFormData = (formData, formItems) => {
|
||||
|
@ -24,7 +24,11 @@ export const setSubmitForm = async ({form, formItems, TYPE, CORP_ID}) => {
|
|||
TYPE,
|
||||
postMethod: 'application/json',
|
||||
})
|
||||
await resolveNextOperation({EW_RU_TASK_ID: taskIds[0], CORP_ID, TYPE})
|
||||
await resolveNextOperation({
|
||||
EW_RU_TASK_ID: taskIds[0],
|
||||
CORP_ID,
|
||||
TYPE
|
||||
})
|
||||
}
|
||||
// 处理选择人员数据
|
||||
const processSelectedPersonnelData = (formData, list) => {
|
||||
|
@ -54,8 +58,30 @@ export const setPersonnelForm = async ({form, list, taskId, CORP_ID, TYPE}) => {
|
|||
data: [{jobs: processSelectedPersonnelData(form, list), task: {EW_RU_TASK_ID: taskId}}],
|
||||
postMethod: 'application/json',
|
||||
})
|
||||
await resolveNextOperation({EW_RU_TASK_ID: taskId, CORP_ID, TYPE})
|
||||
await resolveNextOperation({
|
||||
EW_RU_TASK_ID: taskId,
|
||||
CORP_ID,
|
||||
TYPE
|
||||
})
|
||||
}
|
||||
// 提交安全措施
|
||||
export const setSecurityMeasures = async ({questionnaires, questionnaireInfo, taskId, EW_RU_JOB_ID, CORP_ID, TYPE}) => {
|
||||
await setTaskSave({
|
||||
data: [{
|
||||
questionnaires: [{items: questionnaires, questionnaire: questionnaireInfo}],
|
||||
task: {EW_RU_TASK_ID: taskId}
|
||||
}],
|
||||
JOB_ID: EW_RU_JOB_ID,
|
||||
postMethod: 'application/json',
|
||||
})
|
||||
await resolveNextOperation({
|
||||
EW_RU_TASK_ID: taskId,
|
||||
CORP_ID,
|
||||
TYPE,
|
||||
EW_RU_JOB_ID
|
||||
})
|
||||
}
|
||||
// 结束当前操作人流程提交
|
||||
const endCurrentPersonnelTechnologicalProcess = async ({EW_RU_TASK_ID}) => {
|
||||
await setTaskSave({
|
||||
COMPLETE_FLAG: '1',
|
||||
|
@ -76,13 +102,30 @@ export const resolveNextOperation = async ({EW_RU_TASK_ID, CORP_ID, TYPE, EW_RU_
|
|||
uni.navigateTo({
|
||||
url: '/pages/eight_assignments/select_review_personnel',
|
||||
success: ({eventChannel}) => {
|
||||
eventChannel.emit('nextNodes', {nextNodes: info.nextNodes, taskId: EW_RU_TASK_ID, CORP_ID, TYPE})
|
||||
eventChannel.emit('nextNodes', {
|
||||
nextNodes: info.nextNodes,
|
||||
taskId: EW_RU_TASK_ID,
|
||||
CORP_ID,
|
||||
TYPE
|
||||
})
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
// 填写安全措施
|
||||
if (info.completeFlag === '1') {
|
||||
uni.navigateTo({
|
||||
url: '/pages/eight_assignments/security_measures',
|
||||
success: ({eventChannel}) => {
|
||||
eventChannel.emit('questionnaire', {
|
||||
questionnaire: info.questionnaire[0],
|
||||
taskId: EW_RU_TASK_ID,
|
||||
EW_RU_JOB_ID,
|
||||
TYPE,
|
||||
CORP_ID
|
||||
})
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
// 填写其它安全措施
|
||||
|
|
Loading…
Reference in New Issue