有限空间作业
parent
01f85f4b98
commit
db38017541
11
api/index.js
11
api/index.js
|
@ -1,4 +1,5 @@
|
|||
import {post, upload, uploads} from "../utils/request";
|
||||
import {setSecurityMeasures} from "@/utils/submitHomeworkProcess";
|
||||
|
||||
export const submitLogin = (params) => post("/app/admin/check", params) // 登录
|
||||
export const getIDCardDeduplication = (params) => post("/app/user/hasCardIdForApp", params) // 身份证去重
|
||||
|
@ -36,10 +37,10 @@ export const getEMPLOYMENTAPPLYMANAGEMENTID = (params) => post("/app/user/getEMP
|
|||
|
||||
// 以下接口八项作业流程使用
|
||||
export const getCorpInfoList = (params) => post("/app/util/getCorp", params) //获取公司列表
|
||||
export const getConfinedSpaceSelectList = (params) => post("/app/eightWork/getSpace", {
|
||||
loading: false,
|
||||
...params
|
||||
}) //获取受限空间名称选择列表
|
||||
export const getConfinedSpaceSelectList = (params) => post("/app/eightWork/getSpace", params) //获取受限空间名称选择列表
|
||||
export const getConfinedSpaceGasInfo = (params) => post("/app/eightWork/getGasInfo",params) //获取受限空间气体检测详情
|
||||
export const setConfinedSpaceGasInfoSave = (params) => post("/app/eightWork/initGas", params) //受限空间气体检测详情保存
|
||||
export const setConfinedSpaceGasDelete = (params) => post("/app/eightWork/deleteGas", params) //保存受限空间气体检测删除
|
||||
export const getOtherAssignmentsSelectList = (params) => post("/app/Task/getAllUnEndList", params) //关联的其他特殊作业及安全作业票编号选择列表
|
||||
export const getRiskIdentificationResultsSelectList = (params) => post("/app/eightWork/getInfo", params) //风险辨识结果选择列表
|
||||
export const setTaskSave = (params) => post("/app/Task/init", params) //八项作业、隐患整改、安全环保检查任务保存更新接口
|
||||
|
@ -51,4 +52,6 @@ export const getTaskTechnologicalProcess = (params) => post("/app/Task/getAgency
|
|||
export const getTaskInfo = (params) => post("/app/Task/getInfo", params) //查看信息
|
||||
export const setTaskFile = (params) => upload("/app/util/uploadFile", params) //上传文件
|
||||
export const setTaskSign = (params) => post("/app/Task/sign", params) //审批意见签字提交
|
||||
export const setSecurityMeasuresSave = (params) => post("/app/Task/setQues", params) //安全措施提交
|
||||
export const setOtherSecurityMeasuresSave = (params) => post("/app/Task/setOtherQues", params) //其它安全措施提交
|
||||
// 结束
|
||||
|
|
58
pages.json
58
pages.json
|
@ -180,6 +180,58 @@
|
|||
"navigationBarTitleText": "受限空间安全作业申请"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/eight_assignments/confined_space/gas/name",
|
||||
"style": {
|
||||
"navigationBarTitleText": "受限空间安全作业气体分析"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/eight_assignments/confined_space/gas/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "受限空间安全作业气体分析",
|
||||
"app-plus": {
|
||||
"titleNView": {
|
||||
"buttons": [{
|
||||
"text": "新建",
|
||||
"fontSize": "15",
|
||||
"float": "right",
|
||||
"width": "40px"
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/eight_assignments/confined_space/gas/add",
|
||||
"style": {
|
||||
"navigationBarTitleText": "受限空间安全作业气体分析"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/eight_assignments/blind_board/apply",
|
||||
"style": {
|
||||
"navigationBarTitleText": "盲板抽堵作业申请"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/eight_assignments/break_ground/apply",
|
||||
"style": {
|
||||
"navigationBarTitleText": "动土作业申请"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/eight_assignments/high_work/apply",
|
||||
"style": {
|
||||
"navigationBarTitleText": "高处作业申请"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/eight_assignments/hoisting/apply",
|
||||
"style": {
|
||||
"navigationBarTitleText": "吊装作业申请"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/map/index",
|
||||
"style": {
|
||||
|
@ -216,6 +268,12 @@
|
|||
"navigationBarTitleText": "安全措施"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/eight_assignments/other_security_measures",
|
||||
"style": {
|
||||
"navigationBarTitleText": "其它安全措施"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/eight_assignments/technological_process",
|
||||
"style": {
|
||||
|
|
|
@ -0,0 +1,368 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="card">
|
||||
<u-form labelPosition="left" :model="form" :rules="rules" ref="formRef" labelWidth="140px">
|
||||
<u-form-item label="申请单位" prop="APPLY_DEPARTMENT_NAME" borderBottom required>
|
||||
<u-input v-model="form.APPLY_DEPARTMENT_NAME" border="none" readonly/>
|
||||
</u-form-item>
|
||||
<u-form-item label="申请人" prop="APPLY_USER_NAME" borderBottom required>
|
||||
<u-input v-model="form.APPLY_USER_NAME" border="none" readonly/>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业分公司" prop="CORP_NAME" borderBottom required>
|
||||
<u-input v-model="form.CORP_NAME" border="none" readonly/>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业类别" prop="WORK_TYPE_NAME" borderBottom required
|
||||
@click="fnSingleChoiceClick('WORK_TYPE_NAME')">
|
||||
<u-input v-model="form.WORK_TYPE_NAME" border="none" readonly/>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="设备管道名称" prop="NAME" borderBottom required>
|
||||
<u-input v-model="form.NAME" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="实际作业开始时间" prop="BOARD_INSTALL_TIME" borderBottom required
|
||||
@click="fnDateTimePickerClick('BOARD_INSTALL_TIME')">
|
||||
<u-input v-model="form.BOARD_INSTALL_TIME" border="none" readonly/>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业结束时间" prop="WORK_END_DATE" borderBottom required
|
||||
@click="fnDateTimePickerClick('WORK_END_DATE')">
|
||||
<u-input v-model="form.WORK_END_DATE" border="none" readonly/>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业人" prop="WORK_USER" borderBottom required>
|
||||
<u-input v-model="form.WORK_USER" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="地点坐标" borderBottom required>
|
||||
<u-button type="primary" size="small" text="定位" :customStyle="{width:'100upx',margin:0}"
|
||||
@click="fnLocation"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="经度" prop="WORK_LONGITUDE" borderBottom required>
|
||||
<u-input v-model="form.WORK_LONGITUDE" border="none" readonly/>
|
||||
</u-form-item>
|
||||
<u-form-item label="纬度" prop="WORK_LATITUDE" borderBottom required>
|
||||
<u-input v-model="form.WORK_LATITUDE" border="none" readonly/>
|
||||
</u-form-item>
|
||||
<u-divider text="管道参数" textPosition="left" textColor="#3c9cff" lineColor="#3c9cff"/>
|
||||
<u-form-item label="介质" prop="MEDIUM" borderBottom required>
|
||||
<u-input v-model="form.MEDIUM" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="温度" prop="TEMPERATURE" borderBottom required>
|
||||
<u-input v-model="form.TEMPERATURE" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="压力" prop="PRESSURE" borderBottom required>
|
||||
<u-input v-model="form.PRESSURE" border="none"/>
|
||||
</u-form-item>
|
||||
<u-divider text="盲板抽堵参数" textPosition="left" textColor="#3c9cff" lineColor="#3c9cff"/>
|
||||
<view v-for="(item, index) in form.boardList" :key="item.ID" class="mt-10 p-10"
|
||||
style="background-color: #f9f9f9;border-radius: 4px">
|
||||
<view style="display: flex;justify-content: end">
|
||||
<u-button v-if="index === 0" type="primary" size="small" text="新增"
|
||||
:customStyle="{width:'100upx',margin:0}" @click="fnAddBoardList"/>
|
||||
<u-button v-if="index !== 0" type="error" size="small" text="删除"
|
||||
:customStyle="{width:'100upx',margin:0}" @click="fnDeleteBoardList(index)"/>
|
||||
</view>
|
||||
<u-form-item label="材质" prop="BOARD_MATERIAL" borderBottom required>
|
||||
<u-input v-model="item.BOARD_MATERIAL" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="规格" prop="BOARD_SPECIFICATION" borderBottom required>
|
||||
<u-input v-model="item.BOARD_SPECIFICATION" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="编号" prop="BOARD_NO" borderBottom required>
|
||||
<u-input v-model="item.BOARD_NO" border="none"/>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<u-divider text="盲板抽堵位置及安全措施" textPosition="left" textColor="#3c9cff" lineColor="#3c9cff"/>
|
||||
<u-form-item label="盲板抽堵位置图" prop="boardFileList" borderBottom required labelPosition="top">
|
||||
<u-upload
|
||||
class="mt-10"
|
||||
:fileList="form.BOARD_PATH"
|
||||
@afterRead="fnAfterRead($event,'BOARD_PATH')"
|
||||
@delete="fnDeletePic($event,'BOARD_PATH')"
|
||||
multiple
|
||||
:maxCount="1"
|
||||
></u-upload>
|
||||
</u-form-item>
|
||||
<u-form-item label="关联的其他特殊作业及安全作业票编号" prop="SPECIAL_WORK" borderBottom required
|
||||
labelPosition="top" labelWidth="auto">
|
||||
<u-button type="primary" size="mini" text="选择其它"
|
||||
:customStyle="{position: 'absolute',top: '-46upx',right: '20upx',width: '150upx'}"
|
||||
@click="otherAssignmentsShow = true"/>
|
||||
<u-textarea v-model="form.SPECIAL_WORK" border="none" autoHeight maxlength="-1"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="风险辨识结果" prop="RISK_IDENTIFICATION" borderBottom required labelPosition="top"
|
||||
labelWidth="auto">
|
||||
<u-button type="primary" size="mini" text="选择其它"
|
||||
:customStyle="{position: 'absolute',top: '-46upx',right: '20upx',width: '150upx'}"
|
||||
@click="otherIdentificationShow = true"/>
|
||||
<u-textarea v-model="form.RISK_IDENTIFICATION" border="none" autoHeight maxlength="-1"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="申请单位负责人签字" prop="SIGN" borderBottom required labelPosition="top">
|
||||
<view style="flex: 1">
|
||||
<view>
|
||||
<u-button type="primary" size="mini" text="签字"
|
||||
:customStyle="{position: 'absolute',top: '-46upx',right: '20upx',width: '100upx'}"
|
||||
@click="signVisible = true"/>
|
||||
</view>
|
||||
<view v-if="form.SIGN">
|
||||
<u-image width="400rpx" height="200rpx" :src="form.SIGN"/>
|
||||
</view>
|
||||
</view>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="mt-10">
|
||||
<u-button type="primary" text="下一步" @click="$u.debounce(fnSubmit, 1000,true)"/>
|
||||
</view>
|
||||
</view>
|
||||
<u-picker :show="picker.show" :columns="picker.columns" :keyName="picker.key" :key="picker.type"
|
||||
@confirm="fnSingleChoiceConfirm" @cancel="fnSingleChoiceCancel"/>
|
||||
<u-datetime-picker :show="dateTimePicker.show" v-model="dateTimePicker.value" :mode="dateTimePicker.mode"
|
||||
:minDate="dateTimePicker.min" :key="dateTimePicker.type" @confirm="fnDateTimePickerConfirm"
|
||||
@cancel="fnDateTimePickerCancel"/>
|
||||
<other-select :visible.sync="otherAssignmentsShow" v-model="form.SPECIAL_WORK" type="assignments"/>
|
||||
<other-select :visible.sync="otherIdentificationShow" v-model="form.RISK_IDENTIFICATION" type="identification"/>
|
||||
<sign :signShow.sync="signVisible" @confirm="fnSign"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OtherSelect from '@/components/other-select/index.vue';
|
||||
import Sign from '@/components/sign/sign.vue'
|
||||
import {setSubmitForm} from "@/utils/submitHomeworkProcess";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
OtherSelect,
|
||||
Sign
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
type: '',
|
||||
formItems: [
|
||||
{name: '申请单位', key_name: 'APPLY_DEPARTMENT_NAME', key_id: 'APPLY_DEPARTMENT_ID', type: 0},
|
||||
{name: '申请人', key_name: 'APPLY_USER_NAME', key_id: 'APPLY_USER_ID', type: 0},
|
||||
{name: '作业分公司', key_name: 'CORP_NAME', key_id: 'CORP_ID', type: 0},
|
||||
{name: '作业类别', key_name: 'WORK_TYPE_NAME', key_id: 'WORK_TYPE', type: 0},
|
||||
{name: '设备管道名称', key_name: 'NAME', type: 0},
|
||||
{name: '实际作业开始时间', key_name: 'BOARD_INSTALL_TIME', type: 0},
|
||||
{name: '作业结束时间', key_name: 'WORK_END_DATE', type: 0},
|
||||
{name: '作业人', key_name: 'WORK_USER', type: 0},
|
||||
{name: '经度', key_name: 'WORK_LONGITUDE', type: 0},
|
||||
{name: '纬度', key_name: 'WORK_LATITUDE', type: 0},
|
||||
{name: '管道参数', type: 3},
|
||||
{name: '介质', key_name: 'MEDIUM', type: 0},
|
||||
{name: '温度', key_name: 'TEMPERATURE', type: 0},
|
||||
{name: '压力', key_name: 'PRESSURE', type: 0},
|
||||
{name: '盲板抽堵参数', type: 3},
|
||||
{
|
||||
key_name: 'boardList',
|
||||
type: 4,
|
||||
listStructure: [
|
||||
{name: '材质', key_name: 'BOARD_MATERIAL', type: 0},
|
||||
{name: '规格', key_name: 'BOARD_SPECIFICATION', type: 0},
|
||||
{name: '编号', key_name: 'BOARD_NO', type: 0},
|
||||
]
|
||||
},
|
||||
{name: '盲板抽堵位置及安全措施', type: 3},
|
||||
{name: '盲板抽堵位置图', key_name: 'BOARD_PATH', type: 1},
|
||||
{name: '关联的其他特殊作业及安全作业票编号', key_name: 'SPECIAL_WORK', type: 0},
|
||||
{name: '风险辨识结果', key_name: 'RISK_IDENTIFICATION', type: 0},
|
||||
{name: '申请单位负责人签字', key_name: 'SIGN', type: 5},
|
||||
],
|
||||
form: {
|
||||
APPLY_DEPARTMENT_ID: this.$store.getters.getUserInfo.DEPARTMENT_ID,
|
||||
APPLY_DEPARTMENT_NAME: this.$store.getters.getUserInfo.DEPARTMENT_NAME,
|
||||
APPLY_USER_ID: this.$store.getters.getUserInfo.USER_ID,
|
||||
APPLY_USER_NAME: this.$store.getters.getUserInfo.NAME,
|
||||
CORP_ID: '',
|
||||
CORP_NAME: '',
|
||||
WORK_TYPE: '',
|
||||
WORK_TYPE_NAME: '',
|
||||
NAME: '',
|
||||
BOARD_INSTALL_TIME: '',
|
||||
WORK_END_DATE: '',
|
||||
WORK_USER: '',
|
||||
WORK_LONGITUDE: '1',
|
||||
WORK_LATITUDE: '2',
|
||||
MEDIUM: '',
|
||||
TEMPERATURE: '',
|
||||
PRESSURE: '',
|
||||
boardList: [],
|
||||
BOARD_PATH: [],
|
||||
SPECIAL_WORK: '',
|
||||
RISK_IDENTIFICATION: '',
|
||||
SIGN: '',
|
||||
},
|
||||
rules: {
|
||||
APPLY_DEPARTMENT_ID: [{type: 'string', required: true, message: '请选择申请单位', trigger: ['blur', 'change']}],
|
||||
APPLY_USER_NAME: [{type: 'string', required: true, message: '请选择申请人', trigger: ['blur', 'change']}],
|
||||
CORP_NAME: [{type: 'string', required: true, message: '请选择作业分公司', trigger: ['blur', 'change']}],
|
||||
WORK_TYPE_NAME: [{type: 'string', required: true, message: '请选择作业类别', trigger: ['blur', 'change']}],
|
||||
NAME: [{type: 'string', required: true, message: '请输入设备管道名称', trigger: ['blur', 'change']}],
|
||||
BOARD_INSTALL_TIME: [{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请选择实际作业开始时间',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
WORK_END_DATE: [{type: 'string', required: true, message: '请选择作业结束时间', trigger: ['blur', 'change']}],
|
||||
WORK_USER: [{type: 'string', required: true, message: '请输入作业人', trigger: ['blur', 'change']}],
|
||||
WORK_LONGITUDE: [{type: 'string', required: true, message: '请输入经度', trigger: ['blur', 'change']}],
|
||||
WORK_LATITUDE: [{type: 'string', required: true, message: '请输入纬度', trigger: ['blur', 'change']}],
|
||||
MEDIUM: [{type: 'string', required: true, message: '请输入介质', trigger: ['blur', 'change']}],
|
||||
TEMPERATURE: [{type: 'string', required: true, message: '请输入温度', trigger: ['blur', 'change']}],
|
||||
PRESSURE: [{type: 'string', required: true, message: '请输入压力', trigger: ['blur', 'change']}],
|
||||
BOARD_PATH: [{
|
||||
type: 'array',
|
||||
required: true,
|
||||
message: '请上传盲板抽堵位置图',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
SPECIAL_WORK: [{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请输入关联的其他特殊作业及安全作业票编号',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
RISK_IDENTIFICATION: [{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请输入风险辨识结果',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
SIGN: [{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请签字',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
},
|
||||
picker: {
|
||||
show: false,
|
||||
columns: [],
|
||||
key: 'NAME',
|
||||
type: 'picker'
|
||||
},
|
||||
dateTimePicker: {
|
||||
show: false,
|
||||
value: Number(new Date()),
|
||||
min: new Date().getTime(),
|
||||
mode: 'datetime',
|
||||
type: 'datetime-picker'
|
||||
},
|
||||
otherAssignmentsShow: false,
|
||||
otherIdentificationShow: false,
|
||||
signVisible: false,
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.form.CORP_ID = options.CORPINFO_ID
|
||||
this.form.CORP_NAME = options.CORP_NAME
|
||||
this.type = options.type
|
||||
this.fnAddBoardList()
|
||||
},
|
||||
methods: {
|
||||
fnSingleChoiceClick(event) {
|
||||
this.picker.type = event
|
||||
if (event === 'WORK_TYPE_NAME') this.picker.columns = [[{NAME: "堵盲板", ID: '1'}, {NAME: "抽盲板", ID: '2'}]]
|
||||
this.picker.show = true
|
||||
},
|
||||
fnSingleChoiceConfirm(event) {
|
||||
if (this.picker.type === 'WORK_TYPE_NAME') {
|
||||
this.form.WORK_TYPE = event.value[0].ID
|
||||
this.form.WORK_TYPE_NAME = event.value[0].NAME
|
||||
}
|
||||
this.fnSingleChoiceCancel()
|
||||
},
|
||||
fnSingleChoiceCancel() {
|
||||
this.picker.show = false
|
||||
},
|
||||
fnDateTimePickerClick(event) {
|
||||
this.dateTimePicker.type = event
|
||||
this.dateTimePicker.value = Number(new Date(this.form[event])) || Number(new Date())
|
||||
this.dateTimePicker.show = true
|
||||
},
|
||||
fnDateTimePickerConfirm(event) {
|
||||
this.form[this.dateTimePicker.type] = uni.$u.timeFormat(event.value, 'yyyy-mm-dd hh:MM')
|
||||
this.fnDateTimePickerCancel()
|
||||
},
|
||||
fnDateTimePickerCancel() {
|
||||
this.dateTimePicker.show = false
|
||||
},
|
||||
fnLocation() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/map/index',
|
||||
events: {
|
||||
acceptLocationData: (event) => {
|
||||
this.form.WORK_LONGITUDE = event.data.longitue;
|
||||
this.form.WORK_LATITUDE = event.data.latitude;
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
fnAddBoardList() {
|
||||
this.form.boardList.push({BOARD_MATERIAL: '', BOARD_SPECIFICATION: '', BOARD_NO: '', ID: uni.$u.guid()})
|
||||
},
|
||||
fnDeleteBoardList(index) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定删除该条信息吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.form.boardList.splice(index, 1)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
fnAfterRead(event, key) {
|
||||
this.form[key].push(...event.file)
|
||||
},
|
||||
fnDeletePic(event, key) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定删除该图片吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.form[key].splice(event.index, 1)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
fnSign(event) {
|
||||
this.form.SIGN = event.filePath
|
||||
},
|
||||
async fnSubmit() {
|
||||
try {
|
||||
await this.$refs.formRef.validate()
|
||||
for (let i = 0; i < this.form.boardList.length; i++) {
|
||||
if (!this.form.boardList[i].BOARD_MATERIAL) {
|
||||
uni.$u.toast(`盲板抽堵参数第${i + 1}项中,请输入管道材质`)
|
||||
return
|
||||
}
|
||||
if (!this.form.boardList[i].BOARD_SPECIFICATION) {
|
||||
uni.$u.toast(`盲板抽堵参数第${i + 1}项中,请输入管道规格`)
|
||||
return
|
||||
}
|
||||
if (!this.form.boardList[i].BOARD_NO) {
|
||||
uni.$u.toast(`盲板抽堵参数第${i + 1}项中,请输入管道编号`)
|
||||
return
|
||||
}
|
||||
}
|
||||
try {
|
||||
await setSubmitForm({
|
||||
form: this.form,
|
||||
formItems: this.formItems,
|
||||
TYPE: this.type,
|
||||
CORP_ID: this.form.CORP_ID
|
||||
})
|
||||
} catch {
|
||||
}
|
||||
} catch {
|
||||
uni.$u.toast('请补全必填项')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
|
@ -0,0 +1,256 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="card">
|
||||
<u-form labelPosition="left" :model="form" :rules="rules" ref="formRef" labelWidth="140px">
|
||||
<u-form-item label="申请单位" prop="APPLY_DEPARTMENT_NAME" borderBottom required>
|
||||
<u-input v-model="form.APPLY_DEPARTMENT_NAME" border="none" readonly/>
|
||||
</u-form-item>
|
||||
<u-form-item label="申请人" prop="APPLY_USER_NAME" borderBottom required>
|
||||
<u-input v-model="form.APPLY_USER_NAME" border="none" readonly/>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业分公司" prop="CORP_NAME" borderBottom required>
|
||||
<u-input v-model="form.CORP_NAME" border="none" readonly/>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业开始时间" prop="WORK_START_DATE" borderBottom required
|
||||
@click="fnDateTimePickerClick('WORK_START_DATE')">
|
||||
<u-input v-model="form.WORK_START_DATE" border="none" readonly/>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业结束时间" prop="WORK_END_DATE" borderBottom required
|
||||
@click="fnDateTimePickerClick('WORK_END_DATE')">
|
||||
<u-input v-model="form.WORK_END_DATE" border="none" readonly/>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="地点坐标" borderBottom required>
|
||||
<u-button type="primary" size="small" text="定位" :customStyle="{width:'100upx',margin:0}"
|
||||
@click="fnLocation"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="经度" prop="WORK_LONGITUDE" borderBottom required>
|
||||
<u-input v-model="form.WORK_LONGITUDE" border="none" readonly/>
|
||||
</u-form-item>
|
||||
<u-form-item label="纬度" prop="WORK_LATITUDE" borderBottom required>
|
||||
<u-input v-model="form.WORK_LATITUDE" border="none" readonly/>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业地点" prop="WORK_PLACE" borderBottom required>
|
||||
<u-input v-model="form.WORK_PLACE" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业内容" prop="JOB_CONTENT" borderBottom required labelPosition="top">
|
||||
<u-textarea v-model="form.JOB_CONTENT" border="none" autoHeight/>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业内容、范围、方式" prop="WORK_CONTENT" borderBottom required labelPosition="top" labelWidth="auto">
|
||||
<u-textarea v-model="form.WORK_CONTENT" border="none" autoHeight/>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业内容、范围、方式简图" prop="boardFileList" borderBottom required labelPosition="top" labelWidth="auto">
|
||||
<u-upload
|
||||
class="mt-10"
|
||||
:fileList="form.CONTENT_IMG_PATH"
|
||||
@afterRead="fnAfterRead($event,'CONTENT_IMG_PATH')"
|
||||
@delete="fnDeletePic($event,'CONTENT_IMG_PATH')"
|
||||
multiple
|
||||
:maxCount="1"
|
||||
></u-upload>
|
||||
</u-form-item>
|
||||
<u-form-item label="关联的其他特殊作业及安全作业票编号" prop="SPECIAL_WORK" borderBottom required
|
||||
labelPosition="top" labelWidth="auto">
|
||||
<u-button type="primary" size="mini" text="选择其它"
|
||||
:customStyle="{position: 'absolute',top: '-46upx',right: '20upx',width: '150upx'}"
|
||||
@click="otherAssignmentsShow = true"/>
|
||||
<u-textarea v-model="form.SPECIAL_WORK" border="none" autoHeight maxlength="-1"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="风险辨识结果" prop="RISK_IDENTIFICATION" borderBottom required labelPosition="top"
|
||||
labelWidth="auto">
|
||||
<u-button type="primary" size="mini" text="选择其它"
|
||||
:customStyle="{position: 'absolute',top: '-46upx',right: '20upx',width: '150upx'}"
|
||||
@click="otherIdentificationShow = true"/>
|
||||
<u-textarea v-model="form.RISK_IDENTIFICATION" border="none" autoHeight maxlength="-1"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="申请人签字" prop="SIGN" borderBottom required labelPosition="top">
|
||||
<view style="flex: 1">
|
||||
<view>
|
||||
<u-button type="primary" size="mini" text="签字"
|
||||
:customStyle="{position: 'absolute',top: '-46upx',right: '20upx',width: '100upx'}"
|
||||
@click="signVisible = true"/>
|
||||
</view>
|
||||
<view v-if="form.SIGN">
|
||||
<u-image width="400rpx" height="200rpx" :src="form.SIGN"/>
|
||||
</view>
|
||||
</view>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="mt-10">
|
||||
<u-button type="primary" text="下一步" @click="$u.debounce(fnSubmit, 1000,true)"/>
|
||||
</view>
|
||||
</view>
|
||||
<u-datetime-picker :show="dateTimePicker.show" v-model="dateTimePicker.value" :mode="dateTimePicker.mode"
|
||||
:minDate="dateTimePicker.min" :key="dateTimePicker.type" @confirm="fnDateTimePickerConfirm"
|
||||
@cancel="fnDateTimePickerCancel"/>
|
||||
<other-select :visible.sync="otherAssignmentsShow" v-model="form.SPECIAL_WORK" type="assignments"/>
|
||||
<other-select :visible.sync="otherIdentificationShow" v-model="form.RISK_IDENTIFICATION" type="identification"/>
|
||||
<sign :signShow.sync="signVisible" @confirm="fnSign"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OtherSelect from '@/components/other-select/index.vue';
|
||||
import Sign from '@/components/sign/sign.vue'
|
||||
import {setSubmitForm} from "@/utils/submitHomeworkProcess";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
OtherSelect,
|
||||
Sign
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
type: '',
|
||||
formItems: [
|
||||
{name: '申请单位', key_name: 'APPLY_DEPARTMENT_NAME', key_id: 'APPLY_DEPARTMENT_ID', type: 0},
|
||||
{name: '申请人', key_name: 'APPLY_USER_NAME', key_id: 'APPLY_USER_ID', type: 0},
|
||||
{name: '作业分公司', key_name: 'CORP_NAME', key_id: 'CORP_ID', type: 0},
|
||||
{name: '作业开始时间', key_name: 'WORK_START_DATE', type: 0},
|
||||
{name: '作业结束时间', key_name: 'WORK_END_DATE', type: 0},
|
||||
{name: '经度', key_name: 'WORK_LONGITUDE', type: 0},
|
||||
{name: '纬度', key_name: 'WORK_LATITUDE', type: 0},
|
||||
{name: '作业地点', key_name: 'WORK_PLACE', type: 0},
|
||||
{name: '作业内容', key_name: 'JOB_CONTENT', type: 0},
|
||||
{name: '作业内容、范围、方式', key_name: 'WORK_CONTENT', type: 0},
|
||||
{name: '作业内容、范围、方式简图', key_name: 'CONTENT_IMG_PATH', type: 1},
|
||||
{name: '关联的其他特殊作业及安全作业票编号', key_name: 'SPECIAL_WORK', type: 0},
|
||||
{name: '风险辨识结果', key_name: 'RISK_IDENTIFICATION', type: 0},
|
||||
{name: '申请人签字', key_name: 'SIGN', type: 5},
|
||||
],
|
||||
form: {
|
||||
APPLY_DEPARTMENT_ID: this.$store.getters.getUserInfo.DEPARTMENT_ID,
|
||||
APPLY_DEPARTMENT_NAME: this.$store.getters.getUserInfo.DEPARTMENT_NAME,
|
||||
APPLY_USER_ID: this.$store.getters.getUserInfo.USER_ID,
|
||||
APPLY_USER_NAME: this.$store.getters.getUserInfo.NAME,
|
||||
CORP_ID: '',
|
||||
CORP_NAME: '',
|
||||
WORK_START_DATE: '',
|
||||
WORK_END_DATE: '',
|
||||
WORK_LONGITUDE: '1',
|
||||
WORK_LATITUDE: '2',
|
||||
WORK_PLACE: '',
|
||||
JOB_CONTENT: '',
|
||||
WORK_CONTENT: '',
|
||||
CONTENT_IMG_PATH: [],
|
||||
SPECIAL_WORK: '',
|
||||
RISK_IDENTIFICATION: '',
|
||||
SIGN: '',
|
||||
},
|
||||
rules: {
|
||||
APPLY_DEPARTMENT_ID: [{type: 'string', required: true, message: '请选择申请单位', trigger: ['blur', 'change']}],
|
||||
APPLY_USER_NAME: [{type: 'string', required: true, message: '请选择申请人', trigger: ['blur', 'change']}],
|
||||
CORP_NAME: [{type: 'string', required: true, message: '请选择作业分公司', trigger: ['blur', 'change']}],
|
||||
WORK_START_DATE: [{type: 'string', required: true, message: '请选择作业开始时间', trigger: ['blur', 'change']}],
|
||||
WORK_END_DATE: [{type: 'string', required: true, message: '请选择作业结束时间', trigger: ['blur', 'change']}],
|
||||
WORK_LONGITUDE: [{type: 'string', required: true, message: '请输入经度', trigger: ['blur', 'change']}],
|
||||
WORK_LATITUDE: [{type: 'string', required: true, message: '请输入纬度', trigger: ['blur', 'change']}],
|
||||
WORK_PLACE: [{type: 'string', required: true, message: '请输入作业地点', trigger: ['blur', 'change']}],
|
||||
JOB_CONTENT: [{type: 'string', required: true, message: '请输入作业内容', trigger: ['blur', 'change']}],
|
||||
WORK_CONTENT: [{type: 'string', required: true, message: '请输入作业内容、范围、方式', trigger: ['blur', 'change']}],
|
||||
CONTENT_IMG_PATH: [{
|
||||
type: 'array',
|
||||
required: true,
|
||||
message: '请上传作业内容、范围、方式简图',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
SPECIAL_WORK: [{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请输入关联的其他特殊作业及安全作业票编号',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
RISK_IDENTIFICATION: [{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请输入风险辨识结果',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
SIGN: [{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请签字',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
},
|
||||
dateTimePicker: {
|
||||
show: false,
|
||||
value: Number(new Date()),
|
||||
min: new Date().getTime(),
|
||||
mode: 'datetime',
|
||||
type: 'datetime-picker'
|
||||
},
|
||||
otherAssignmentsShow: false,
|
||||
otherIdentificationShow: false,
|
||||
signVisible: false,
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.form.CORP_ID = options.CORPINFO_ID
|
||||
this.form.CORP_NAME = options.CORP_NAME
|
||||
this.type = options.type
|
||||
},
|
||||
methods: {
|
||||
fnDateTimePickerClick(event) {
|
||||
this.dateTimePicker.type = event
|
||||
this.dateTimePicker.value = Number(new Date(this.form[event])) || Number(new Date())
|
||||
this.dateTimePicker.show = true
|
||||
},
|
||||
fnDateTimePickerConfirm(event) {
|
||||
this.form[this.dateTimePicker.type] = uni.$u.timeFormat(event.value, 'yyyy-mm-dd hh:MM')
|
||||
this.fnDateTimePickerCancel()
|
||||
},
|
||||
fnDateTimePickerCancel() {
|
||||
this.dateTimePicker.show = false
|
||||
},
|
||||
fnLocation() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/map/index',
|
||||
events: {
|
||||
acceptLocationData: (event) => {
|
||||
this.form.WORK_LONGITUDE = event.data.longitue;
|
||||
this.form.WORK_LATITUDE = event.data.latitude;
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
fnAfterRead(event, key) {
|
||||
this.form[key].push(...event.file)
|
||||
},
|
||||
fnDeletePic(event, key) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定删除该图片吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.form[key].splice(event.index, 1)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
fnSign(event) {
|
||||
this.form.SIGN = event.filePath
|
||||
},
|
||||
async fnSubmit() {
|
||||
try {
|
||||
await this.$refs.formRef.validate()
|
||||
try {
|
||||
await setSubmitForm({
|
||||
form: this.form,
|
||||
formItems: this.formItems,
|
||||
TYPE: this.type,
|
||||
CORP_ID: this.form.CORP_ID
|
||||
})
|
||||
} catch {
|
||||
}
|
||||
} catch {
|
||||
uni.$u.toast('请补全必填项')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
|
@ -127,7 +127,6 @@ export default {
|
|||
},
|
||||
rules: {
|
||||
APPLY_DEPARTMENT_ID: [{type: 'string', required: true, message: '请选择申请单位', trigger: ['blur', 'change']}],
|
||||
APPLY_DEPARTMENT_NAME: [{type: 'string', required: true, message: '请选择申请人', trigger: ['blur', 'change']}],
|
||||
APPLY_USER_NAME: [{type: 'string', required: true, message: '请选择申请人', trigger: ['blur', 'change']}],
|
||||
CORP_NAME: [{type: 'string', required: true, message: '请选择作业分公司', trigger: ['blur', 'change']}],
|
||||
BELONG_CORP: [{type: 'string', required: true, message: '请输入受限空间所属单位', trigger: ['blur', 'change']}],
|
||||
|
|
|
@ -0,0 +1,136 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="card">
|
||||
<u-form labelPosition="left" :model="form" :rules="rules" ref="formRef" labelWidth="140px">
|
||||
<block v-if="GAS_NAME1">
|
||||
<u-form-item :label="GAS_NAME1" prop="GAS_NAME1" borderBottom>
|
||||
<u-input v-model="form.DATA1" border="none"/>
|
||||
</u-form-item>
|
||||
</block>
|
||||
<block v-if="GAS_NAME2">
|
||||
<u-form-item :label="GAS_NAME2" prop="GAS_NAME1" borderBottom>
|
||||
<u-input v-model="form.DATA2" border="none"/>
|
||||
</u-form-item>
|
||||
</block>
|
||||
<block v-if="GAS_NAME3">
|
||||
<u-form-item :label="GAS_NAME3" prop="GAS_NAME1" borderBottom>
|
||||
<u-input v-model="form.DATA3" border="none"/>
|
||||
</u-form-item>
|
||||
</block>
|
||||
<block v-if="GAS_NAME4">
|
||||
<u-form-item :label="GAS_NAME4" prop="GAS_NAME1" borderBottom>
|
||||
<u-input v-model="form.DATA4" border="none"/>
|
||||
</u-form-item>
|
||||
</block>
|
||||
<u-form-item label="取样分析时间" prop="ANALYZE_TIME" borderBottom required
|
||||
@click="fnDateTimePickerClick('ANALYZE_TIME')">
|
||||
<u-input v-model="form.ANALYZE_TIME" border="none" readonly/>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="分析部位" prop="ANALYZE_PLACE" borderBottom required>
|
||||
<u-input v-model="form.ANALYZE_PLACE" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="氧气含量" prop="OXYGEN_CONTENT" borderBottom required>
|
||||
<u-input v-model="form.OXYGEN_CONTENT" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="分析人" prop="ANALYZE_USER" borderBottom>
|
||||
<u-input v-model="form.ANALYZE_USER" border="none" readonly/>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="mt-10">
|
||||
<u-button type="primary" text="保存" @click="$u.debounce(fnSubmit, 1000,true)"/>
|
||||
</view>
|
||||
</view>
|
||||
<u-datetime-picker :show="dateTimePicker.show" v-model="dateTimePicker.value" :mode="dateTimePicker.mode"
|
||||
:maxDate="dateTimePicker.max" :key="dateTimePicker.type" @confirm="fnDateTimePickerConfirm"
|
||||
@cancel="fnDateTimePickerCancel"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {setConfinedSpaceGasInfoSave} from "@/api";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
DATA1: '',
|
||||
DATA2: '',
|
||||
DATA3: '',
|
||||
DATA4: '',
|
||||
ANALYZE_TIME: '',
|
||||
ANALYZE_PLACE: '',
|
||||
OXYGEN_CONTENT: '',
|
||||
ANALYZE_USER: this.$store.getters.getUserInfo.NAME,
|
||||
},
|
||||
rules: {
|
||||
ANALYZE_TIME: [{type: 'string', required: true, message: '请选择分析时间', trigger: ['blur', 'change']}],
|
||||
ANALYZE_PLACE: [{type: 'string', required: true, message: '请输入分析部位', trigger: ['blur', 'change']}],
|
||||
OXYGEN_CONTENT: [{type: 'string', required: true, message: '请输入氧气含量', trigger: ['blur', 'change']}],
|
||||
},
|
||||
GAS_NAME1: '',
|
||||
GAS_NAME2: '',
|
||||
GAS_NAME3: '',
|
||||
GAS_NAME4: '',
|
||||
EW_RU_TASK_ID: '',
|
||||
EW_RU_JOB_ID: '',
|
||||
dateTimePicker: {
|
||||
show: false,
|
||||
value: Number(new Date()),
|
||||
max: new Date().getTime(),
|
||||
mode: 'datetime',
|
||||
type: 'datetime-picker'
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad(query) {
|
||||
this.GAS_NAME1 = query.GAS_NAME1
|
||||
this.GAS_NAME2 = query.GAS_NAME2
|
||||
this.GAS_NAME3 = query.GAS_NAME3
|
||||
this.GAS_NAME4 = query.GAS_NAME4
|
||||
this.EW_RU_TASK_ID = query.EW_RU_TASK_ID;
|
||||
this.EW_RU_JOB_ID = query.EW_RU_JOB_ID;
|
||||
},
|
||||
methods: {
|
||||
fnDateTimePickerClick(event) {
|
||||
this.dateTimePicker.type = event
|
||||
this.dateTimePicker.value = Number(new Date(this.form[event])) || Number(new Date())
|
||||
this.dateTimePicker.show = true
|
||||
},
|
||||
fnDateTimePickerConfirm(event) {
|
||||
this.form[this.dateTimePicker.type] = uni.$u.timeFormat(event.value, 'yyyy-mm-dd hh:MM')
|
||||
this.fnDateTimePickerCancel()
|
||||
},
|
||||
fnDateTimePickerCancel() {
|
||||
this.dateTimePicker.show = false
|
||||
},
|
||||
async fnSubmit() {
|
||||
try {
|
||||
await this.$refs.formRef.validate()
|
||||
try {
|
||||
for (let i = 0; i < 4; i++) {
|
||||
if (this[`GAS_NAME${i + 1}`] && !this.form[`DATA${i + 1}`]) this.form[`DATA${i + 1}`] = 0
|
||||
}
|
||||
await setConfinedSpaceGasInfoSave({
|
||||
data: {...this.form},
|
||||
EW_RU_TASK_ID: this.EW_RU_TASK_ID,
|
||||
EW_RU_JOB_ID: this.EW_RU_JOB_ID,
|
||||
postMethod: 'application/json',
|
||||
})
|
||||
uni.$u.toast('保存成功')
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 2000)
|
||||
} catch {
|
||||
}
|
||||
} catch (e) {
|
||||
uni.$u.toast('请补全必填项')
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
|
@ -0,0 +1,120 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<u-list v-if="list.length > 0">
|
||||
<u-list-item v-for="(item, index) in list" :key="index">
|
||||
<view class="flex-between main-title">
|
||||
<text>分析时间:{{ item.ANALYZE_TIME }}</text>
|
||||
</view>
|
||||
<view class="flex-between main-title">
|
||||
<text>分析地点:{{ item.ANALYZE_PLACE }}</text>
|
||||
</view>
|
||||
<view class="flex-between main-title" v-if="GAS_NAME1 && item.DATA1">
|
||||
<text>{{ GAS_NAME1 }}:{{ item.DATA1 }}</text>
|
||||
</view>
|
||||
<view class="flex-between main-title" v-if="GAS_NAME2 && item.DATA2">
|
||||
<text>{{ GAS_NAME2 }}:{{ item.DATA2 }}</text>
|
||||
</view>
|
||||
<view class="flex-between main-title" v-if="GAS_NAME3 && item.DATA3">
|
||||
<text>{{ GAS_NAME3 }}:{{ item.DATA3 }}</text>
|
||||
</view>
|
||||
<view class="flex-between main-title" v-if="GAS_NAME4 && item.DATA4">
|
||||
<text>{{ GAS_NAME4 }}:{{ item.DATA4 }}</text>
|
||||
</view>
|
||||
<view class="flex-between main-title">
|
||||
<text>含氧量:{{ item.OXYGEN_CONTENT }}</text>
|
||||
</view>
|
||||
<view class="flex-between main-title">
|
||||
<text>分析人:{{ item.ANALYZE_USER_NAME }}</text>
|
||||
</view>
|
||||
<view class="flex-between mt-10 subtitle">
|
||||
<view></view>
|
||||
<view class="flex-between">
|
||||
<u-button type="error" text="删除" size="mini" class="bth-mini"
|
||||
@click="fnDelete(item)"/>
|
||||
</view>
|
||||
</view>
|
||||
</u-list-item>
|
||||
</u-list>
|
||||
<empty v-else></empty>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getConfinedSpaceGasInfo, setConfinedSpaceGasDelete} from "@/api";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
GAS_NAME1: '',
|
||||
GAS_NAME2: '',
|
||||
GAS_NAME3: '',
|
||||
GAS_NAME4: '',
|
||||
EW_RU_TASK_ID: '',
|
||||
EW_RU_JOB_ID: '',
|
||||
list: []
|
||||
}
|
||||
},
|
||||
onLoad(query) {
|
||||
this.GAS_NAME1 = query.GAS_NAME1;
|
||||
this.GAS_NAME2 = query.GAS_NAME2;
|
||||
this.GAS_NAME3 = query.GAS_NAME3;
|
||||
this.GAS_NAME4 = query.GAS_NAME4;
|
||||
this.EW_RU_TASK_ID = query.EW_RU_TASK_ID;
|
||||
this.EW_RU_JOB_ID = query.EW_RU_JOB_ID;
|
||||
},
|
||||
onNavigationBarButtonTap(e) {
|
||||
if (e.index === 0) {
|
||||
uni.$u.route({
|
||||
url: '/pages/eight_assignments/confined_space/gas/add',
|
||||
params: {
|
||||
GAS_NAME1: this.GAS_NAME1,
|
||||
GAS_NAME2: this.GAS_NAME2,
|
||||
GAS_NAME3: this.GAS_NAME3,
|
||||
GAS_NAME4: this.GAS_NAME4,
|
||||
EW_RU_TASK_ID: this.EW_RU_TASK_ID,
|
||||
EW_RU_JOB_ID: this.EW_RU_JOB_ID,
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.resetList()
|
||||
},
|
||||
methods: {
|
||||
async getData() {
|
||||
let resData = await getConfinedSpaceGasInfo({
|
||||
EW_RU_JOB_ID: this.EW_RU_JOB_ID,
|
||||
EW_RU_TASK_ID: this.EW_RU_TASK_ID,
|
||||
postMethod: 'application/json',
|
||||
});
|
||||
this.list = [...this.list, ...resData.data.main];
|
||||
},
|
||||
resetList() {
|
||||
this.list = []
|
||||
this.getData()
|
||||
},
|
||||
fnDelete(item) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定要删除这条记录?',
|
||||
success: async res => {
|
||||
if (res.confirm) {
|
||||
await setConfinedSpaceGasDelete({
|
||||
data: item,
|
||||
EW_RU_JOB_ID: this.EW_RU_JOB_ID,
|
||||
EW_RU_TASK_ID: this.EW_RU_TASK_ID,
|
||||
postMethod: 'application/json',
|
||||
})
|
||||
uni.$u.toast('删除成功')
|
||||
this.resetList()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
|
@ -0,0 +1,116 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="card">
|
||||
<u-form labelPosition="left" :model="form" :rules="rules" ref="formRef" labelWidth="140px">
|
||||
<u-form-item label="有毒有害气体名称1" prop="GAS_NAME1" borderBottom>
|
||||
<u-input v-model="form.GAS_NAME1" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="合格标准" prop="GAS_STANDARD1" borderBottom>
|
||||
<u-input v-model="form.GAS_STANDARD1" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="有毒有害气体名称2" prop="GAS_NAME2" borderBottom>
|
||||
<u-input v-model="form.GAS_NAME2" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="合格标准" prop="GAS_STANDARD2" borderBottom>
|
||||
<u-input v-model="form.GAS_STANDARD2" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="可燃气体名称1" prop="GAS_NAME3" borderBottom>
|
||||
<u-input v-model="form.GAS_NAME3" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="合格标准" prop="GAS_STANDARD3" borderBottom>
|
||||
<u-input v-model="form.GAS_STANDARD3" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="可燃气体名称2" prop="GAS_NAME4" borderBottom>
|
||||
<u-input v-model="form.GAS_NAME4" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="合格标准" prop="GAS_STANDARD4" borderBottom>
|
||||
<u-input v-model="form.GAS_STANDARD4" border="none"/>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="mt-10">
|
||||
<u-button type="primary" text="气体分析" @click="$u.debounce(fnSubmit, 1000,true)"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getConfinedSpaceGasInfo,
|
||||
setConfinedSpaceGasInfoSave,
|
||||
} from "@/api";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
EW_RU_JOB_ID: '',
|
||||
EW_RU_TASK_ID: '',
|
||||
form: {
|
||||
GAS_NAME1: '',
|
||||
GAS_STANDARD1: '',
|
||||
GAS_NAME2: '',
|
||||
GAS_STANDARD2: '',
|
||||
GAS_NAME3: '',
|
||||
GAS_STANDARD3: '',
|
||||
GAS_NAME4: '',
|
||||
GAS_STANDARD4: '',
|
||||
},
|
||||
rules: {},
|
||||
}
|
||||
},
|
||||
onLoad(query) {
|
||||
this.EW_RU_TASK_ID = query.taskId
|
||||
this.EW_RU_JOB_ID = query.EW_RU_JOB_ID
|
||||
},
|
||||
onShow() {
|
||||
this.fnGetData()
|
||||
},
|
||||
methods: {
|
||||
async fnGetData() {
|
||||
let resData = await getConfinedSpaceGasInfo({
|
||||
EW_RU_TASK_ID: this.EW_RU_TASK_ID,
|
||||
EW_RU_JOB_ID: this.EW_RU_JOB_ID,
|
||||
postMethod: 'application/json',
|
||||
})
|
||||
this.form = resData.data.aux[0] || {}
|
||||
},
|
||||
async fnSubmit() {
|
||||
if (!this.form.GAS_NAME1 && !this.form.GAS_NAME2 && !this.form.GAS_NAME3 && !this.form.GAS_NAME4) {
|
||||
uni.$u.toast('最少填写一项气体名称')
|
||||
return
|
||||
}
|
||||
for (let i = 0; i < 4; i++) {
|
||||
if (this.form['GAS_NAME' + (i + 1)] && !this.form['GAS_STANDARD' + (i + 1)]) {
|
||||
uni.$u.toast('请填写气体名称(' + this.form['GAS_NAME' + (i + 1)] + ')的合格标准')
|
||||
return
|
||||
}
|
||||
if (this.form['GAS_STANDARD' + (i + 1)] && !this.form['GAS_NAME' + (i + 1)]) {
|
||||
uni.$u.toast('请填写合格标准(' + this.form['GAS_STANDARD' + (i + 1)] + ')的气体名称')
|
||||
return
|
||||
}
|
||||
}
|
||||
await setConfinedSpaceGasInfoSave({
|
||||
wh: {...this.form},
|
||||
EW_RU_TASK_ID: this.EW_RU_TASK_ID,
|
||||
EW_RU_JOB_ID: this.EW_RU_JOB_ID,
|
||||
postMethod: 'application/json',
|
||||
})
|
||||
uni.$u.route({
|
||||
url: '/pages/eight_assignments/confined_space/gas/list',
|
||||
params: {
|
||||
GAS_NAME1: this.form.GAS_NAME1,
|
||||
GAS_NAME2: this.form.GAS_NAME2,
|
||||
GAS_NAME3: this.form.GAS_NAME3,
|
||||
GAS_NAME4: this.form.GAS_NAME4,
|
||||
EW_RU_TASK_ID: this.EW_RU_TASK_ID,
|
||||
EW_RU_JOB_ID: this.EW_RU_JOB_ID,
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
|
@ -0,0 +1,256 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="card">
|
||||
<u-form labelPosition="left" :model="form" :rules="rules" ref="formRef" labelWidth="140px">
|
||||
<u-form-item label="申请单位" prop="APPLY_DEPARTMENT_NAME" borderBottom required>
|
||||
<u-input v-model="form.APPLY_DEPARTMENT_NAME" border="none" readonly/>
|
||||
</u-form-item>
|
||||
<u-form-item label="申请人" prop="APPLY_USER_NAME" borderBottom required>
|
||||
<u-input v-model="form.APPLY_USER_NAME" border="none" readonly/>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业分公司" prop="CORP_NAME" borderBottom required>
|
||||
<u-input v-model="form.CORP_NAME" border="none" readonly/>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业地点" prop="WORK_PLACE" borderBottom required>
|
||||
<u-input v-model="form.WORK_PLACE" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业人" prop="PROJECT_MANAGER" borderBottom required>
|
||||
<u-input v-model="form.PROJECT_MANAGER" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业高度(米)" prop="WORK_HIGH" borderBottom required>
|
||||
<u-input v-model="form.WORK_HIGH" border="none" type="number"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="高处作业级别" prop="WORK_LEVEL_NAME" borderBottom required
|
||||
@click="fnSingleChoiceClick('WORK_LEVEL_NAME')">
|
||||
<u-input v-model="form.WORK_LEVEL_NAME" border="none" readonly/>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业内容" prop="WORK_CONTENT" borderBottom required labelPosition="top">
|
||||
<u-textarea v-model="form.WORK_USER" border="none" autoHeight maxlength="-1"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业实施开始时间" prop="WORK_START_DATE" borderBottom required
|
||||
@click="fnDateTimePickerClick('WORK_START_DATE')">
|
||||
<u-input v-model="form.WORK_START_DATE" border="none" readonly/>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业实施结束时间" prop="WORK_END_DATE" borderBottom required
|
||||
@click="fnDateTimePickerClick('WORK_END_DATE')">
|
||||
<u-input v-model="form.WORK_END_DATE" border="none" readonly/>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="地点坐标" borderBottom required>
|
||||
<u-button type="primary" size="small" text="定位" :customStyle="{width:'100upx',margin:0}"
|
||||
@click="fnLocation"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="经度" prop="WORK_LONGITUDE" borderBottom required>
|
||||
<u-input v-model="form.WORK_LONGITUDE" border="none" readonly/>
|
||||
</u-form-item>
|
||||
<u-form-item label="纬度" prop="WORK_LATITUDE" borderBottom required>
|
||||
<u-input v-model="form.WORK_LATITUDE" border="none" readonly/>
|
||||
</u-form-item>
|
||||
<u-form-item label="关联的其他特殊作业及安全作业票编号" prop="SPECIAL_WORK" borderBottom required
|
||||
labelPosition="top" labelWidth="auto">
|
||||
<u-button type="primary" size="mini" text="选择其它"
|
||||
:customStyle="{position: 'absolute',top: '-46upx',right: '20upx',width: '150upx'}"
|
||||
@click="otherAssignmentsShow = true"/>
|
||||
<u-textarea v-model="form.SPECIAL_WORK" border="none" autoHeight maxlength="-1"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="风险辨识结果" prop="RISK_IDENTIFICATION" borderBottom required labelPosition="top"
|
||||
labelWidth="auto">
|
||||
<u-button type="primary" size="mini" text="选择其它"
|
||||
:customStyle="{position: 'absolute',top: '-46upx',right: '20upx',width: '150upx'}"
|
||||
@click="otherIdentificationShow = true"/>
|
||||
<u-textarea v-model="form.RISK_IDENTIFICATION" border="none" autoHeight maxlength="-1"/>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="mt-10">
|
||||
<u-button type="primary" text="下一步" @click="$u.debounce(fnSubmit, 1000,true)"/>
|
||||
</view>
|
||||
</view>
|
||||
<u-picker :show="picker.show" :columns="picker.columns" :keyName="picker.key" :key="picker.type"
|
||||
@confirm="fnSingleChoiceConfirm" @cancel="fnSingleChoiceCancel"/>
|
||||
<u-datetime-picker :show="dateTimePicker.show" v-model="dateTimePicker.value" :mode="dateTimePicker.mode"
|
||||
:minDate="dateTimePicker.min" :key="dateTimePicker.type" @confirm="fnDateTimePickerConfirm"
|
||||
@cancel="fnDateTimePickerCancel"/>
|
||||
<other-select :visible.sync="otherAssignmentsShow" v-model="form.SPECIAL_WORK" type="assignments"/>
|
||||
<other-select :visible.sync="otherIdentificationShow" v-model="form.RISK_IDENTIFICATION" type="identification"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OtherSelect from '@/components/other-select/index.vue';
|
||||
import Sign from '@/components/sign/sign.vue'
|
||||
import {setSubmitForm} from "@/utils/submitHomeworkProcess";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
OtherSelect,
|
||||
Sign
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
type: '',
|
||||
formItems: [
|
||||
{name: '申请单位', key_name: 'APPLY_DEPARTMENT_NAME', key_id: 'APPLY_DEPARTMENT_ID', type: 0},
|
||||
{name: '申请人', key_name: 'APPLY_USER_NAME', key_id: 'APPLY_USER_ID', type: 0},
|
||||
{name: '作业分公司', key_name: 'CORP_NAME', key_id: 'CORP_ID', type: 0},
|
||||
{name: '作业地点', key_name: 'WORK_PLACE', type: 0},
|
||||
{name: '作业人', key_name: 'PROJECT_MANAGER', type: 0},
|
||||
{name: '作业高度(米)', key_name: 'WORK_HIGH', type: 0},
|
||||
{name: '高处作业级别', key_name: 'WORK_LEVEL_NAME', key_id: 'WORK_LEVEL', type: 0},
|
||||
{name: '作业内容', key_name: 'WORK_CONTENT', type: 0},
|
||||
{name: '作业实施开始时间', key_name: 'WORK_START_DATE', type: 0},
|
||||
{name: '作业实施结束时间', key_name: 'WORK_END_DATE', type: 0},
|
||||
{name: '经度', key_name: 'WORK_LONGITUDE', type: 0},
|
||||
{name: '纬度', key_name: 'WORK_LATITUDE', type: 0},
|
||||
{name: '关联的其他特殊作业及安全作业票编号', key_name: 'SPECIAL_WORK', type: 0},
|
||||
{name: '风险辨识结果', key_name: 'RISK_IDENTIFICATION', type: 0},
|
||||
],
|
||||
form: {
|
||||
APPLY_DEPARTMENT_ID: this.$store.getters.getUserInfo.DEPARTMENT_ID,
|
||||
APPLY_DEPARTMENT_NAME: this.$store.getters.getUserInfo.DEPARTMENT_NAME,
|
||||
APPLY_USER_ID: this.$store.getters.getUserInfo.USER_ID,
|
||||
APPLY_USER_NAME: this.$store.getters.getUserInfo.NAME,
|
||||
CORP_ID: '',
|
||||
CORP_NAME: '',
|
||||
WORK_PLACE: '',
|
||||
PROJECT_MANAGER: '',
|
||||
WORK_HIGH: '',
|
||||
WORK_LEVEL_NAME: '',
|
||||
WORK_LEVEL: '',
|
||||
WORK_CONTENT: '',
|
||||
WORK_START_DATE: '',
|
||||
WORK_END_DATE: '',
|
||||
WORK_LONGITUDE: '1',
|
||||
WORK_LATITUDE: '2',
|
||||
SPECIAL_WORK: '',
|
||||
RISK_IDENTIFICATION: '',
|
||||
},
|
||||
rules: {
|
||||
APPLY_DEPARTMENT_ID: [{type: 'string', required: true, message: '请选择申请单位', trigger: ['blur', 'change']}],
|
||||
APPLY_USER_NAME: [{type: 'string', required: true, message: '请选择申请人', trigger: ['blur', 'change']}],
|
||||
CORP_NAME: [{type: 'string', required: true, message: '请选择作业分公司', trigger: ['blur', 'change']}],
|
||||
WORK_PLACE: [{type: 'string', required: true, message: '请输入作业地点', trigger: ['blur', 'change']}],
|
||||
PROJECT_MANAGER: [{type: 'string', required: true, message: '请输入作业人', trigger: ['blur', 'change']}],
|
||||
WORK_HIGH: [{type: 'string', required: true, message: '请输入作业高度(米)', trigger: ['blur', 'change']}],
|
||||
WORK_LEVEL_NAME: [{type: 'string', required: true, message: '请选择高处作业级别', trigger: ['blur', 'change']}],
|
||||
WORK_CONTENT: [{type: 'string', required: true, message: '请输入作业内容', trigger: ['blur', 'change']}],
|
||||
WORK_START_DATE: [{type: 'string', required: true, message: '请选择作业实施开始时间', trigger: ['blur', 'change']}],
|
||||
WORK_END_DATE: [{type: 'string', required: true, message: '请选择作业实施结束时间', trigger: ['blur', 'change']}],
|
||||
WORK_LONGITUDE: [{type: 'string', required: true, message: '请输入经度', trigger: ['blur', 'change']}],
|
||||
WORK_LATITUDE: [{type: 'string', required: true, message: '请输入纬度', trigger: ['blur', 'change']}],
|
||||
SPECIAL_WORK: [{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请输入关联的其他特殊作业及安全作业票编号',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
RISK_IDENTIFICATION: [{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请输入风险辨识结果',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
},
|
||||
picker: {
|
||||
show: false,
|
||||
columns: [],
|
||||
key: 'NAME',
|
||||
type: 'picker'
|
||||
},
|
||||
dateTimePicker: {
|
||||
show: false,
|
||||
value: Number(new Date()),
|
||||
min: new Date().getTime(),
|
||||
mode: 'datetime',
|
||||
type: 'datetime-picker'
|
||||
},
|
||||
otherAssignmentsShow: false,
|
||||
otherIdentificationShow: false,
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.form.CORP_ID = options.CORPINFO_ID
|
||||
this.form.CORP_NAME = options.CORP_NAME
|
||||
this.type = options.type
|
||||
},
|
||||
methods: {
|
||||
fnSingleChoiceClick(event) {
|
||||
this.picker.type = event
|
||||
if (event === 'WORK_LEVEL_NAME') this.picker.columns = [[
|
||||
{NAME: 'I级高处作业', ID: '1'},
|
||||
{NAME: 'II级高处作业', ID: '2'},
|
||||
{NAME: 'III级高处作业', ID: '3'},
|
||||
{NAME: 'IV级高处作业', ID: '4'},
|
||||
]]
|
||||
this.picker.show = true
|
||||
},
|
||||
fnSingleChoiceConfirm(event) {
|
||||
if (this.picker.type === 'WORK_LEVEL_NAME') {
|
||||
this.form.WORK_LEVEL = event.value[0].ID
|
||||
this.form.WORK_LEVEL_NAME = event.value[0].NAME
|
||||
}
|
||||
this.fnSingleChoiceCancel()
|
||||
},
|
||||
fnSingleChoiceCancel() {
|
||||
this.picker.show = false
|
||||
},
|
||||
fnDateTimePickerClick(event) {
|
||||
this.dateTimePicker.type = event
|
||||
this.dateTimePicker.value = Number(new Date(this.form[event])) || Number(new Date())
|
||||
this.dateTimePicker.show = true
|
||||
},
|
||||
fnDateTimePickerConfirm(event) {
|
||||
this.form[this.dateTimePicker.type] = uni.$u.timeFormat(event.value, 'yyyy-mm-dd hh:MM')
|
||||
this.fnDateTimePickerCancel()
|
||||
},
|
||||
fnDateTimePickerCancel() {
|
||||
this.dateTimePicker.show = false
|
||||
},
|
||||
fnLocation() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/map/index',
|
||||
events: {
|
||||
acceptLocationData: (event) => {
|
||||
this.form.WORK_LONGITUDE = event.data.longitue;
|
||||
this.form.WORK_LATITUDE = event.data.latitude;
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
async fnSubmit() {
|
||||
try {
|
||||
await this.$refs.formRef.validate()
|
||||
for (let i = 0; i < this.form.boardList.length; i++) {
|
||||
if (!this.form.boardList[i].BOARD_MATERIAL) {
|
||||
uni.$u.toast(`盲板抽堵参数第${i + 1}项中,请输入管道材质`)
|
||||
return
|
||||
}
|
||||
if (!this.form.boardList[i].BOARD_SPECIFICATION) {
|
||||
uni.$u.toast(`盲板抽堵参数第${i + 1}项中,请输入管道规格`)
|
||||
return
|
||||
}
|
||||
if (!this.form.boardList[i].BOARD_NO) {
|
||||
uni.$u.toast(`盲板抽堵参数第${i + 1}项中,请输入管道编号`)
|
||||
return
|
||||
}
|
||||
}
|
||||
try {
|
||||
await setSubmitForm({
|
||||
form: this.form,
|
||||
formItems: this.formItems,
|
||||
TYPE: this.type,
|
||||
CORP_ID: this.form.CORP_ID
|
||||
})
|
||||
} catch {
|
||||
}
|
||||
} catch {
|
||||
uni.$u.toast('请补全必填项')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
|
@ -0,0 +1,274 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="card">
|
||||
<u-form labelPosition="left" :model="form" :rules="rules" ref="formRef" labelWidth="140px">
|
||||
<u-form-item label="申请单位" prop="APPLY_DEPARTMENT_NAME" borderBottom required>
|
||||
<u-input v-model="form.APPLY_DEPARTMENT_NAME" border="none" readonly/>
|
||||
</u-form-item>
|
||||
<u-form-item label="申请人" prop="APPLY_USER_NAME" borderBottom required>
|
||||
<u-input v-model="form.APPLY_USER_NAME" border="none" readonly/>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业分公司" prop="CORP_NAME" borderBottom required>
|
||||
<u-input v-model="form.CORP_NAME" border="none" readonly/>
|
||||
</u-form-item>
|
||||
<u-form-item label="吊装地点" prop="WORK_PLACE" borderBottom required>
|
||||
<u-input v-model="form.WORK_PLACE" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="吊具名称" prop="TOOL_NAME" borderBottom required>
|
||||
<u-input v-model="form.TOOL_NAME" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="吊装作业人" prop="WORK_USER" borderBottom required>
|
||||
<u-input v-model="form.WORK_USER" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="司索人" prop="SISUO_USER" borderBottom required>
|
||||
<u-input v-model="form.SISUO_USER" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="指挥人员" prop="PROJECT_MANAGER" borderBottom required>
|
||||
<u-input v-model="form.PROJECT_MANAGER" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="吊物质量(吨)" prop="PART_WEIGHT" borderBottom required>
|
||||
<u-input v-model="form.PART_WEIGHT" border="none" type="number"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业级别" prop="WORK_LEVEL_NAME" borderBottom required
|
||||
@click="fnSingleChoiceClick('WORK_LEVEL_NAME')">
|
||||
<u-input v-model="form.WORK_LEVEL_NAME" border="none" readonly/>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="吊物内容" prop="WORK_CONTENT" borderBottom required labelPosition="top">
|
||||
<u-textarea v-model="form.WORK_USER" border="none" autoHeight maxlength="-1"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业开始时间" prop="WORK_START_DATE" borderBottom required
|
||||
@click="fnDateTimePickerClick('WORK_START_DATE')">
|
||||
<u-input v-model="form.WORK_START_DATE" border="none" readonly/>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业结束时间" prop="WORK_END_DATE" borderBottom required
|
||||
@click="fnDateTimePickerClick('WORK_END_DATE')">
|
||||
<u-input v-model="form.WORK_END_DATE" border="none" readonly/>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="地点坐标" borderBottom required>
|
||||
<u-button type="primary" size="small" text="定位" :customStyle="{width:'100upx',margin:0}"
|
||||
@click="fnLocation"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="经度" prop="WORK_LONGITUDE" borderBottom required>
|
||||
<u-input v-model="form.WORK_LONGITUDE" border="none" readonly/>
|
||||
</u-form-item>
|
||||
<u-form-item label="纬度" prop="WORK_LATITUDE" borderBottom required>
|
||||
<u-input v-model="form.WORK_LATITUDE" border="none" readonly/>
|
||||
</u-form-item>
|
||||
<u-form-item label="关联的其他特殊作业及安全作业票编号" prop="SPECIAL_WORK" borderBottom required
|
||||
labelPosition="top" labelWidth="auto">
|
||||
<u-button type="primary" size="mini" text="选择其它"
|
||||
:customStyle="{position: 'absolute',top: '-46upx',right: '20upx',width: '150upx'}"
|
||||
@click="otherAssignmentsShow = true"/>
|
||||
<u-textarea v-model="form.SPECIAL_WORK" border="none" autoHeight maxlength="-1"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="风险辨识结果" prop="RISK_IDENTIFICATION" borderBottom required labelPosition="top"
|
||||
labelWidth="auto">
|
||||
<u-button type="primary" size="mini" text="选择其它"
|
||||
:customStyle="{position: 'absolute',top: '-46upx',right: '20upx',width: '150upx'}"
|
||||
@click="otherIdentificationShow = true"/>
|
||||
<u-textarea v-model="form.RISK_IDENTIFICATION" border="none" autoHeight maxlength="-1"/>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="mt-10">
|
||||
<u-button type="primary" text="下一步" @click="$u.debounce(fnSubmit, 1000,true)"/>
|
||||
</view>
|
||||
</view>
|
||||
<u-picker :show="picker.show" :columns="picker.columns" :keyName="picker.key" :key="picker.type"
|
||||
@confirm="fnSingleChoiceConfirm" @cancel="fnSingleChoiceCancel"/>
|
||||
<u-datetime-picker :show="dateTimePicker.show" v-model="dateTimePicker.value" :mode="dateTimePicker.mode"
|
||||
:minDate="dateTimePicker.min" :key="dateTimePicker.type" @confirm="fnDateTimePickerConfirm"
|
||||
@cancel="fnDateTimePickerCancel"/>
|
||||
<other-select :visible.sync="otherAssignmentsShow" v-model="form.SPECIAL_WORK" type="assignments"/>
|
||||
<other-select :visible.sync="otherIdentificationShow" v-model="form.RISK_IDENTIFICATION" type="identification"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OtherSelect from '@/components/other-select/index.vue';
|
||||
import Sign from '@/components/sign/sign.vue'
|
||||
import {setSubmitForm} from "@/utils/submitHomeworkProcess";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
OtherSelect,
|
||||
Sign
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
type: '',
|
||||
formItems: [
|
||||
{name: '申请单位', key_name: 'APPLY_DEPARTMENT_NAME', key_id: 'APPLY_DEPARTMENT_ID', type: 0},
|
||||
{name: '申请人', key_name: 'APPLY_USER_NAME', key_id: 'APPLY_USER_ID', type: 0},
|
||||
{name: '作业分公司', key_name: 'CORP_NAME', key_id: 'CORP_ID', type: 0},
|
||||
{name: '吊装地点', key_name: 'WORK_PLACE', type: 0},
|
||||
{name: '吊具名称', key_name: 'TOOL_NAME', type: 0},
|
||||
{name: '吊装作业人', key_name: 'WORK_USER', type: 0},
|
||||
{name: '司索人', key_name: 'SISUO_USER', type: 0},
|
||||
{name: '指挥人员', key_name: 'PROJECT_MANAGER', type: 0},
|
||||
{name: '吊物质量(吨)', key_name: 'PART_WEIGHT', type: 0},
|
||||
{name: '作业级别', key_name: 'WORK_LEVEL_NAME', key_id: 'WORK_LEVEL', type: 0},
|
||||
{name: '吊物内容', key_name: 'WORK_CONTENT', type: 0},
|
||||
{name: '作业开始时间', key_name: 'WORK_START_DATE', type: 0},
|
||||
{name: '作业结束时间', key_name: 'WORK_END_DATE', type: 0},
|
||||
{name: '经度', key_name: 'WORK_LONGITUDE', type: 0},
|
||||
{name: '纬度', key_name: 'WORK_LATITUDE', type: 0},
|
||||
{name: '关联的其他特殊作业及安全作业票编号', key_name: 'SPECIAL_WORK', type: 0},
|
||||
{name: '风险辨识结果', key_name: 'RISK_IDENTIFICATION', type: 0},
|
||||
],
|
||||
form: {
|
||||
APPLY_DEPARTMENT_ID: this.$store.getters.getUserInfo.DEPARTMENT_ID,
|
||||
APPLY_DEPARTMENT_NAME: this.$store.getters.getUserInfo.DEPARTMENT_NAME,
|
||||
APPLY_USER_ID: this.$store.getters.getUserInfo.USER_ID,
|
||||
APPLY_USER_NAME: this.$store.getters.getUserInfo.NAME,
|
||||
CORP_ID: '',
|
||||
CORP_NAME: '',
|
||||
WORK_PLACE: '',
|
||||
TOOL_NAME: '',
|
||||
WORK_USER: '',
|
||||
SISUO_USER: '',
|
||||
PROJECT_MANAGER: '',
|
||||
PART_WEIGHT: '',
|
||||
WORK_LEVEL_NAME: '',
|
||||
WORK_LEVEL: '',
|
||||
WORK_CONTENT: '',
|
||||
WORK_START_DATE: '',
|
||||
WORK_END_DATE: '',
|
||||
WORK_LONGITUDE: '1',
|
||||
WORK_LATITUDE: '2',
|
||||
SPECIAL_WORK: '',
|
||||
RISK_IDENTIFICATION: '',
|
||||
},
|
||||
rules: {
|
||||
APPLY_DEPARTMENT_ID: [{type: 'string', required: true, message: '请选择申请单位', trigger: ['blur', 'change']}],
|
||||
APPLY_USER_NAME: [{type: 'string', required: true, message: '请选择申请人', trigger: ['blur', 'change']}],
|
||||
CORP_NAME: [{type: 'string', required: true, message: '请选择作业分公司', trigger: ['blur', 'change']}],
|
||||
WORK_PLACE: [{type: 'string', required: true, message: '请输入吊装地点', trigger: ['blur', 'change']}],
|
||||
TOOL_NAME: [{type: 'string', required: true, message: '请输入吊具名称', trigger: ['blur', 'change']}],
|
||||
WORK_USER: [{type: 'string', required: true, message: '请输入吊装作业人', trigger: ['blur', 'change']}],
|
||||
SISUO_USER: [{type: 'string', required: true, message: '请输入司索人', trigger: ['blur', 'change']}],
|
||||
PROJECT_MANAGER: [{type: 'string', required: true, message: '请输入指挥人员', trigger: ['blur', 'change']}],
|
||||
PART_WEIGHT: [{type: 'string', required: true, message: '请输入吊物质量(吨)', trigger: ['blur', 'change']}],
|
||||
WORK_LEVEL_NAME: [{type: 'string', required: true, message: '请选择作业级别', trigger: ['blur', 'change']}],
|
||||
WORK_CONTENT: [{type: 'string', required: true, message: '请输入吊物内容', trigger: ['blur', 'change']}],
|
||||
WORK_START_DATE: [{type: 'string', required: true, message: '请选择作业开始时间', trigger: ['blur', 'change']}],
|
||||
WORK_END_DATE: [{type: 'string', required: true, message: '请选择作业结束时间', trigger: ['blur', 'change']}],
|
||||
WORK_LONGITUDE: [{type: 'string', required: true, message: '请输入经度', trigger: ['blur', 'change']}],
|
||||
WORK_LATITUDE: [{type: 'string', required: true, message: '请输入纬度', trigger: ['blur', 'change']}],
|
||||
SPECIAL_WORK: [{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请输入关联的其他特殊作业及安全作业票编号',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
RISK_IDENTIFICATION: [{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请输入风险辨识结果',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
},
|
||||
picker: {
|
||||
show: false,
|
||||
columns: [],
|
||||
key: 'NAME',
|
||||
type: 'picker'
|
||||
},
|
||||
dateTimePicker: {
|
||||
show: false,
|
||||
value: Number(new Date()),
|
||||
min: new Date().getTime(),
|
||||
mode: 'datetime',
|
||||
type: 'datetime-picker'
|
||||
},
|
||||
otherAssignmentsShow: false,
|
||||
otherIdentificationShow: false,
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.form.CORP_ID = options.CORPINFO_ID
|
||||
this.form.CORP_NAME = options.CORP_NAME
|
||||
this.type = options.type
|
||||
},
|
||||
methods: {
|
||||
fnSingleChoiceClick(event) {
|
||||
this.picker.type = event
|
||||
if (event === 'WORK_LEVEL_NAME') this.picker.columns = [[
|
||||
{NAME: 'I级高处作业', ID: '1'},
|
||||
{NAME: 'II级高处作业', ID: '2'},
|
||||
{NAME: 'III级高处作业', ID: '3'},
|
||||
{NAME: 'IV级高处作业', ID: '4'},
|
||||
]]
|
||||
this.picker.show = true
|
||||
},
|
||||
fnSingleChoiceConfirm(event) {
|
||||
if (this.picker.type === 'WORK_LEVEL_NAME') {
|
||||
this.form.WORK_LEVEL = event.value[0].ID
|
||||
this.form.WORK_LEVEL_NAME = event.value[0].NAME
|
||||
}
|
||||
this.fnSingleChoiceCancel()
|
||||
},
|
||||
fnSingleChoiceCancel() {
|
||||
this.picker.show = false
|
||||
},
|
||||
fnDateTimePickerClick(event) {
|
||||
this.dateTimePicker.type = event
|
||||
this.dateTimePicker.value = Number(new Date(this.form[event])) || Number(new Date())
|
||||
this.dateTimePicker.show = true
|
||||
},
|
||||
fnDateTimePickerConfirm(event) {
|
||||
this.form[this.dateTimePicker.type] = uni.$u.timeFormat(event.value, 'yyyy-mm-dd hh:MM')
|
||||
this.fnDateTimePickerCancel()
|
||||
},
|
||||
fnDateTimePickerCancel() {
|
||||
this.dateTimePicker.show = false
|
||||
},
|
||||
fnLocation() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/map/index',
|
||||
events: {
|
||||
acceptLocationData: (event) => {
|
||||
this.form.WORK_LONGITUDE = event.data.longitue;
|
||||
this.form.WORK_LATITUDE = event.data.latitude;
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
async fnSubmit() {
|
||||
try {
|
||||
await this.$refs.formRef.validate()
|
||||
for (let i = 0; i < this.form.boardList.length; i++) {
|
||||
if (!this.form.boardList[i].BOARD_MATERIAL) {
|
||||
uni.$u.toast(`盲板抽堵参数第${i + 1}项中,请输入管道材质`)
|
||||
return
|
||||
}
|
||||
if (!this.form.boardList[i].BOARD_SPECIFICATION) {
|
||||
uni.$u.toast(`盲板抽堵参数第${i + 1}项中,请输入管道规格`)
|
||||
return
|
||||
}
|
||||
if (!this.form.boardList[i].BOARD_NO) {
|
||||
uni.$u.toast(`盲板抽堵参数第${i + 1}项中,请输入管道编号`)
|
||||
return
|
||||
}
|
||||
}
|
||||
try {
|
||||
await setSubmitForm({
|
||||
form: this.form,
|
||||
formItems: this.formItems,
|
||||
TYPE: this.type,
|
||||
CORP_ID: this.form.CORP_ID
|
||||
})
|
||||
} catch {
|
||||
}
|
||||
} catch {
|
||||
uni.$u.toast('请补全必填项')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
|
@ -0,0 +1,73 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="card">
|
||||
<u-form labelPosition="top" :model="form" :rules="rules" ref="formRef" labelWidth="auto">
|
||||
<u-form-item label="其它安全措施" borderBottom required v-for="(item,index) in form.value" :key="item.id">
|
||||
<u-button v-if="index === 0" type="primary" size="mini" text="新增"
|
||||
:customStyle="{position: 'absolute',top: '-46upx',right: '20upx',width:'100upx',margin:0}"
|
||||
@click="fnAddValue"/>
|
||||
<u-button v-if="index !== 0" type="error" size="mini" text="删除"
|
||||
:customStyle="{position: 'absolute',top: '-46upx',right: '20upx',width:'100upx',margin:0}"
|
||||
@click="fnDeleteValue(index)"/>
|
||||
<u-textarea v-model="item.value" border="none" autoHeight maxlength="-1"/>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="mt-10">
|
||||
<u-button type="primary" text="下一步" @click="$u.debounce(fnSubmit, 1000,true)"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {setOtherSecurityMeasures} from "@/utils/submitHomeworkProcess";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
EW_RU_JOB_ID: '',
|
||||
taskId: '',
|
||||
TYPE: '',
|
||||
CORP_ID: '',
|
||||
form: {
|
||||
value: []
|
||||
},
|
||||
rules: {},
|
||||
}
|
||||
},
|
||||
onLoad(query) {
|
||||
this.EW_RU_JOB_ID = query.EW_RU_JOB_ID
|
||||
this.taskId = query.taskId
|
||||
this.TYPE = query.TYPE
|
||||
this.CORP_ID = query.CORP_ID
|
||||
this.fnAddValue()
|
||||
},
|
||||
methods: {
|
||||
fnAddValue() {
|
||||
this.form.value.push({value: '', id: uni.$u.guid()})
|
||||
},
|
||||
fnDeleteValue(index) {
|
||||
this.form.value.splice(index, 1)
|
||||
},
|
||||
async fnSubmit() {
|
||||
for (let i = 0; i < this.form.value.length; i++) {
|
||||
if (!this.form.value[i].value) {
|
||||
uni.$u.toast(`第${i + 1}项中,请输入内容`)
|
||||
return
|
||||
}
|
||||
}
|
||||
await setOtherSecurityMeasures({
|
||||
value: this.form.value,
|
||||
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">
|
||||
|
||||
</style>
|
|
@ -45,6 +45,22 @@ export default {
|
|||
'confinedSpace': {
|
||||
'035958e685cf4850bc40151c5e0617a6': '',
|
||||
'default': '/pages/eight_assignments/confined_space/apply'
|
||||
},
|
||||
'blindBoard': {
|
||||
'035958e685cf4850bc40151c5e0617a6': '',
|
||||
'default': '/pages/eight_assignments/blind_board/apply'
|
||||
},
|
||||
'breakGround': {
|
||||
'035958e685cf4850bc40151c5e0617a6': '',
|
||||
'default': '/pages/eight_assignments/break_ground/apply'
|
||||
},
|
||||
'highWork': {
|
||||
'035958e685cf4850bc40151c5e0617a6': '',
|
||||
'default': '/pages/eight_assignments/high_work/apply'
|
||||
},
|
||||
'hoisting': {
|
||||
'035958e685cf4850bc40151c5e0617a6': '',
|
||||
'default': '/pages/eight_assignments/hoisting/apply'
|
||||
}
|
||||
}
|
||||
const url = urlByTypeMap[this.type][this.select_corp] ?? urlByTypeMap[this.type].default
|
||||
|
|
|
@ -130,6 +130,11 @@ export default {
|
|||
return value.substring(0, value.indexOf('&&')) + `&&${guid}`
|
||||
},
|
||||
fnDelete(index, index1) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '是否删除该条数据?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
const departmentKeyId = this.list[index].list[index1].key_id
|
||||
const departmentKeyName = this.list[index].list[index1].key_name
|
||||
const userKeyId = this.list[index].list[index1 + 1].key_id
|
||||
|
@ -144,6 +149,9 @@ export default {
|
|||
delete this.form[userKeyName]
|
||||
delete this.rules[departmentKeyName]
|
||||
delete this.rules[userKeyName]
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
fnSelect({multiple}, {key_name, key_id, type, value}) {
|
||||
const key_value = multiple === '1' ? key_id.substring(key_id.indexOf('&&') + 2) : value
|
||||
|
|
|
@ -1,24 +1,29 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="card">
|
||||
<u-divider text="基本信息" textPosition="left"></u-divider>
|
||||
<u-cell-group>
|
||||
<block v-for="(item,index) in form">
|
||||
<u-cell v-if="item.TYPE === 0" :key="index" :title="item.ITEM" :value="item.ITEM_VALUE"></u-cell>
|
||||
</block>
|
||||
</u-cell-group>
|
||||
<u-divider text="审批人员" textPosition="left"></u-divider>
|
||||
<u-divider text="安全措施" textPosition="left" textColor="#3c9cff" lineColor="#3c9cff"/>
|
||||
<u-cell-group>
|
||||
<u-cell v-for="(item,index) in questionnaires" :key="index" :title="item.QUESTION">
|
||||
<template #value></template>
|
||||
</u-cell>
|
||||
</u-cell-group>
|
||||
<u-divider text="审批人员" textPosition="left" textColor="#3c9cff" lineColor="#3c9cff"/>
|
||||
<u-cell-group>
|
||||
<block v-for="(item,index) in jobs">
|
||||
<u-cell :key="index" :title="item.TYPE_DESCRIBE">
|
||||
<template #label>
|
||||
<view class="mt-10">
|
||||
<view>部门:{{item.DEPARTMENT_NAME}}</view>
|
||||
<view>人员:{{item.USER_NAME}}</view>
|
||||
<view>部门:{{ item.DEPARTMENT_NAME }}</view>
|
||||
<view>人员:{{ item.USER_NAME }}</view>
|
||||
<view v-if="item.SIGN_PICTURE">
|
||||
<u-image width="400rpx" height="200rpx" :src="$filePath + '/' +item.SIGN_PICTURE" mode="widthFix"/>
|
||||
<view>审批意见:{{item.APPROVAL_OPINIONS}}</view>
|
||||
<view>审批意见:{{item.APPROVAL_TIME}}</view>
|
||||
<view>审批意见:{{ item.APPROVAL_OPINIONS }}</view>
|
||||
<view>审批意见:{{ item.APPROVAL_TIME }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
@ -43,7 +48,8 @@ export default {
|
|||
type: '',
|
||||
jobId: '',
|
||||
form: [],
|
||||
jobs: []
|
||||
jobs: [],
|
||||
questionnaires: [],
|
||||
}
|
||||
},
|
||||
onLoad(query) {
|
||||
|
@ -60,11 +66,12 @@ export default {
|
|||
let resData = await getTaskInfo({EW_RU_TASK_ID: taskId})
|
||||
this.form = resData.list.form
|
||||
this.jobs = resData.list.jobs
|
||||
this.questionnaires = resData.list.questionnaires[0]
|
||||
},
|
||||
async fnSubmit() {
|
||||
let CORP_ID = ''
|
||||
for (let i = 0; i < this.form.length; i++) {
|
||||
if(this.form[i].FK_NAME === 'CORP_ID'){
|
||||
if (this.form[i].FK_NAME === 'CORP_ID') {
|
||||
CORP_ID = this.form[i].FK_VALUE
|
||||
break
|
||||
}
|
||||
|
|
|
@ -1,26 +1,67 @@
|
|||
import {getCurrentNextOperation, setTaskSave} from "@/api";
|
||||
import {
|
||||
getCurrentNextOperation,
|
||||
setOtherSecurityMeasuresSave,
|
||||
setSecurityMeasuresSave,
|
||||
setTaskFile,
|
||||
setTaskSave
|
||||
} from "@/api";
|
||||
|
||||
// 处理表单数据
|
||||
const processFormData = (formData, formItems) => {
|
||||
// TYPE 0 纯文本 1 图片 2 视频 3 divider标签 4 动态添加 5 签字
|
||||
const processFormData = async (formData, formItems) => {
|
||||
const form = []
|
||||
for (let i = 0; i < formItems.length; i++) {
|
||||
const formItem = formItems[i]
|
||||
form.push({
|
||||
ITEM: formItem.name,
|
||||
ITEM_NAME: formItem.key_name,
|
||||
ITEM_VALUE: formData[formItem.key_name],
|
||||
const obj = {
|
||||
ITEM: formItem.name || '',
|
||||
ITEM_NAME: formItem.key_name || '',
|
||||
ITEM_VALUE: formData[formItem.key_name] || '',
|
||||
FK_NAME: formItem.key_id || '',
|
||||
FK_VALUE: formData[formItem.key_id] || '',
|
||||
TYPE: formItem.type,
|
||||
SORT: i + 1
|
||||
})
|
||||
}
|
||||
if (formItem.type === 1 || formItem.type === 2) {
|
||||
if (typeof formData[formItem.key_name] === 'object') {
|
||||
const currentItem = uni.$u.deepClone(formData[formItem.key_name])
|
||||
const codeList = []
|
||||
for (let j = 0; j < currentItem.length; j++) {
|
||||
const {CODE} = await setTaskFile({formData: {type: 0}, name: 'files', filePath: currentItem[j].url})
|
||||
codeList.push(CODE)
|
||||
}
|
||||
obj.ITEM_VALUE = codeList
|
||||
} else {
|
||||
throw Error('图片和视频只支持数组')
|
||||
}
|
||||
}
|
||||
if (formItem.type === 4) {
|
||||
if (typeof formData[formItem.key_name] === 'object') {
|
||||
const currentItem = uni.$u.deepClone(formData[formItem.key_name])
|
||||
const itemList = []
|
||||
for (let j = 0; j < currentItem.length; j++) {
|
||||
itemList.push(await processFormData(currentItem[j], formItem.listStructure))
|
||||
}
|
||||
obj.ITEM_VALUE = JSON.stringify(itemList)
|
||||
} else {
|
||||
throw Error('动态表单只支持数组')
|
||||
}
|
||||
}
|
||||
if (formItem.type === 5) {
|
||||
if (typeof formData[formItem.key_name] === 'string') {
|
||||
const {CODE} = await setTaskFile({formData: {type: 0}, name: 'files', filePath: formData[formItem.key_name]})
|
||||
obj.ITEM_VALUE = CODE
|
||||
} else {
|
||||
throw Error('签字只支持字符串')
|
||||
}
|
||||
}
|
||||
form.push(obj)
|
||||
}
|
||||
return form
|
||||
}
|
||||
// 提交表单基础信息
|
||||
export const setSubmitForm = async ({form, formItems, TYPE, CORP_ID}) => {
|
||||
const {taskIds} = await setTaskSave({
|
||||
data: [{form: processFormData(form, formItems)}],
|
||||
data: [{form: await processFormData(form, formItems)}],
|
||||
TYPE,
|
||||
postMethod: 'application/json',
|
||||
})
|
||||
|
@ -66,12 +107,26 @@ export const setPersonnelForm = async ({form, list, taskId, CORP_ID, TYPE}) => {
|
|||
}
|
||||
// 提交安全措施
|
||||
export const setSecurityMeasures = async ({questionnaires, questionnaireInfo, taskId, EW_RU_JOB_ID, CORP_ID, TYPE}) => {
|
||||
await setTaskSave({
|
||||
data: [{
|
||||
await setSecurityMeasuresSave({
|
||||
questionnaires: [{items: questionnaires, questionnaire: questionnaireInfo}],
|
||||
task: {EW_RU_TASK_ID: taskId}
|
||||
}],
|
||||
JOB_ID: EW_RU_JOB_ID,
|
||||
EW_RU_JOB_ID,
|
||||
EW_RU_TASK_ID: taskId,
|
||||
postMethod: 'application/json',
|
||||
})
|
||||
await resolveNextOperation({
|
||||
EW_RU_TASK_ID: taskId,
|
||||
CORP_ID,
|
||||
TYPE,
|
||||
EW_RU_JOB_ID
|
||||
})
|
||||
}
|
||||
// 提交其它安全措施
|
||||
export const setOtherSecurityMeasures = async ({value, taskId, EW_RU_JOB_ID, CORP_ID, TYPE}) => {
|
||||
const ADDITIONAL_COMMENT = value.map(item => item.value)
|
||||
await setOtherSecurityMeasuresSave({
|
||||
ADDITIONAL_COMMENT,
|
||||
EW_RU_JOB_ID,
|
||||
EW_RU_TASK_ID: taskId,
|
||||
postMethod: 'application/json',
|
||||
})
|
||||
await resolveNextOperation({
|
||||
|
@ -94,7 +149,16 @@ const endCurrentPersonnelTechnologicalProcess = async ({EW_RU_TASK_ID}) => {
|
|||
// CORP_ID选择的企业id
|
||||
// TYPE作业类型
|
||||
// EW_RU_JOB_ID当前操作节点的人员id
|
||||
export const resolveNextOperation = async ({EW_RU_TASK_ID, CORP_ID, TYPE, EW_RU_JOB_ID}, isLastStep = true) => {
|
||||
// isLastStep是否还有下一步,纯前端确定,不去后台获取
|
||||
export const resolveNextOperation = async (
|
||||
{
|
||||
EW_RU_TASK_ID = '',
|
||||
CORP_ID = '',
|
||||
TYPE = '',
|
||||
EW_RU_JOB_ID = '',
|
||||
},
|
||||
isLastStep = true
|
||||
) => {
|
||||
if (isLastStep) {
|
||||
const {info} = await getCurrentNextOperation({EW_RU_TASK_ID, EW_RU_JOB_ID})
|
||||
// 选人
|
||||
|
@ -130,6 +194,10 @@ export const resolveNextOperation = async ({EW_RU_TASK_ID, CORP_ID, TYPE, EW_RU_
|
|||
}
|
||||
// 填写其它安全措施
|
||||
if (info.canAddFlag === '1') {
|
||||
uni.$u.route({
|
||||
url: '/pages/eight_assignments/other_security_measures',
|
||||
params: {taskId: EW_RU_TASK_ID, EW_RU_JOB_ID, TYPE, CORP_ID}
|
||||
})
|
||||
return
|
||||
}
|
||||
// 签字
|
||||
|
@ -140,6 +208,14 @@ export const resolveNextOperation = async ({EW_RU_TASK_ID, CORP_ID, TYPE, EW_RU_
|
|||
})
|
||||
return
|
||||
}
|
||||
// 有限空间作业气体分析
|
||||
if (info.otherFlag.DeYxQfFlag === '1') {
|
||||
uni.$u.route({
|
||||
url: '/pages/eight_assignments/confined_space/gas/name',
|
||||
params: {taskId: EW_RU_TASK_ID, EW_RU_JOB_ID, TYPE}
|
||||
})
|
||||
return
|
||||
}
|
||||
// 没有下一步,结束流程,因为无法确定之前有多少步骤,跳转了多少页面,所以直接跳转到首页
|
||||
await endCurrentPersonnelTechnologicalProcess({EW_RU_TASK_ID})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue