除了动火作业的所有作业
parent
db38017541
commit
3d0f6de34c
12
pages.json
12
pages.json
|
@ -232,6 +232,18 @@
|
|||
"navigationBarTitleText": "吊装作业申请"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/eight_assignments/electricity/apply",
|
||||
"style": {
|
||||
"navigationBarTitleText": "临时用电作业申请"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/eight_assignments/cut_road/apply",
|
||||
"style": {
|
||||
"navigationBarTitleText": "断路作业申请"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/map/index",
|
||||
"style": {
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
</u-form-item>
|
||||
</view>
|
||||
<u-divider text="盲板抽堵位置及安全措施" textPosition="left" textColor="#3c9cff" lineColor="#3c9cff"/>
|
||||
<u-form-item label="盲板抽堵位置图" prop="boardFileList" borderBottom required labelPosition="top">
|
||||
<u-form-item label="盲板抽堵位置图" prop="BOARD_PATH" borderBottom required labelPosition="top" labelWidth="auto">
|
||||
<u-upload
|
||||
class="mt-10"
|
||||
:fileList="form.BOARD_PATH"
|
||||
|
@ -96,7 +96,7 @@
|
|||
@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">
|
||||
<u-form-item label="申请单位负责人签字" prop="SIGN" borderBottom required labelPosition="top" labelWidth="auto">
|
||||
<view style="flex: 1">
|
||||
<view>
|
||||
<u-button type="primary" size="mini" text="签字"
|
||||
|
|
|
@ -34,13 +34,13 @@
|
|||
<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-form-item label="作业内容" prop="JOB_CONTENT" borderBottom required labelPosition="top" labelWidth="auto">
|
||||
<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-form-item label="作业内容、范围、方式简图" prop="CONTENT_IMG_PATH" borderBottom required labelPosition="top" labelWidth="auto">
|
||||
<u-upload
|
||||
class="mt-10"
|
||||
:fileList="form.CONTENT_IMG_PATH"
|
||||
|
@ -64,7 +64,7 @@
|
|||
@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">
|
||||
<u-form-item label="申请人签字" prop="SIGN" borderBottom required labelPosition="top" labelWidth="auto">
|
||||
<view style="flex: 1">
|
||||
<view>
|
||||
<u-button type="primary" size="mini" text="签字"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<u-form-item label="受限空间内原有介质名称" prop="MEDIUM_NAME" borderBottom required>
|
||||
<u-input v-model="form.MEDIUM_NAME" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业内容" prop="WORK_CONTENT" borderBottom required labelPosition="top">
|
||||
<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="WORK_START_DATE" borderBottom required
|
||||
|
|
|
@ -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="OTHER_DEPT" borderBottom required labelPosition="top" labelWidth="auto">
|
||||
<u-textarea v-model="form.OTHER_DEPT" border="none" autoHeight/>
|
||||
</u-form-item>
|
||||
<u-form-item label="断路原因" prop="WORK_REASON" borderBottom required labelPosition="top" labelWidth="auto">
|
||||
<u-textarea v-model="form.WORK_REASON" 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="CONTENT_IMG_PATH" 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" labelWidth="auto">
|
||||
<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: 'OTHER_DEPT', type: 0},
|
||||
{name: '断路原因', key_name: 'WORK_REASON', 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',
|
||||
OTHER_DEPT: '',
|
||||
WORK_REASON: '',
|
||||
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']}],
|
||||
OTHER_DEPT: [{type: 'string', required: true, message: '请输入涉及相关单位(部门)', trigger: ['blur', 'change']}],
|
||||
WORK_REASON: [{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>
|
|
@ -0,0 +1,262 @@
|
|||
<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="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="WORK_USER" borderBottom required>
|
||||
<u-input v-model="form.WORK_USER" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="电工证号" prop="CARD_NO" borderBottom required>
|
||||
<u-input v-model="form.CARD_NO" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="电源接入点及许可用电功率" prop="ALLOW_POWER" borderBottom required>
|
||||
<u-input v-model="form.ALLOW_POWER" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="用电设备名称及额定功率" prop="RATED_POWER" borderBottom required>
|
||||
<u-input v-model="form.RATED_POWER" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="工作电压" prop="WORK_VOLTAGE" borderBottom required>
|
||||
<u-input v-model="form.WORK_VOLTAGE" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="用电人" prop="ELECTRICITY_USER" borderBottom required>
|
||||
<u-input v-model="form.ELECTRICITY_USER" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="负责人电工号" prop="LEADER_CARD_NO" borderBottom required>
|
||||
<u-input v-model="form.LEADER_CARD_NO" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="是否进行气体分析" prop="ISANALYZE" borderBottom required>
|
||||
<u-radio-group v-model="form.ISANALYZE" :customStyle="{'justify-content': 'flex-end'}">
|
||||
<u-radio label="是" name="1"/>
|
||||
<u-radio :customStyle="{marginLeft: '8px'}" label="否" name="0"/>
|
||||
</u-radio-group>
|
||||
</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-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 {setSubmitForm} from "@/utils/submitHomeworkProcess";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
OtherSelect,
|
||||
},
|
||||
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: 'WORK_CONTENT', type: 0},
|
||||
{name: '作业人', key_name: 'WORK_USER', type: 0},
|
||||
{name: '电工证号', key_name: 'CARD_NO', type: 0},
|
||||
{name: '电源接入点及许可用电功率', key_name: 'ALLOW_POWER', type: 0},
|
||||
{name: '用电设备名称及额定功率', key_name: 'RATED_POWER', type: 0},
|
||||
{name: '工作电压', key_name: 'WORK_VOLTAGE', type: 0},
|
||||
{name: '用电人', key_name: 'ELECTRICITY_USER', type: 0},
|
||||
{name: '负责人电工号', key_name: 'LEADER_CARD_NO', type: 0},
|
||||
{name: '是否进行气体分析', key_name: 'ISANALYZE', 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_START_DATE: '',
|
||||
WORK_END_DATE: '',
|
||||
WORK_LONGITUDE: '1',
|
||||
WORK_LATITUDE: '2',
|
||||
WORK_PLACE: '',
|
||||
WORK_CONTENT: '',
|
||||
WORK_USER: '',
|
||||
CARD_NO: '',
|
||||
ALLOW_POWER: '',
|
||||
RATED_POWER: '',
|
||||
WORK_VOLTAGE: '',
|
||||
ELECTRICITY_USER: '',
|
||||
LEADER_CARD_NO: '',
|
||||
ISANALYZE: '',
|
||||
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_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']}],
|
||||
WORK_CONTENT: [{type: 'string', required: true, message: '请输入作业内容', trigger: ['blur', 'change']}],
|
||||
WORK_USER: [{type: 'string', required: true, message: '请输入作业人', trigger: ['blur', 'change']}],
|
||||
CARD_NO: [{type: 'string', required: true, message: '请输入电工证号', trigger: ['blur', 'change']}],
|
||||
ALLOW_POWER: [{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请输入电源接入点及许可用电功率',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
RATED_POWER: [{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请输入用电设备名称及额定功率',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
WORK_VOLTAGE: [{type: 'string', required: true, message: '请输入工作电压', trigger: ['blur', 'change']}],
|
||||
ELECTRICITY_USER: [{type: 'string', required: true, message: '请输入用电人', trigger: ['blur', 'change']}],
|
||||
LEADER_CARD_NO: [{type: 'string', required: true, message: '请输入负责人电工号', trigger: ['blur', 'change']}],
|
||||
ISANALYZE: [{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']
|
||||
}],
|
||||
},
|
||||
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: {
|
||||
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()
|
||||
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>
|
|
@ -25,7 +25,7 @@
|
|||
<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-form-item label="作业内容" prop="WORK_CONTENT" borderBottom required labelPosition="top" labelWidth="auto">
|
||||
<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
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
<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-form-item label="吊物内容" prop="WORK_CONTENT" borderBottom required labelPosition="top" labelWidth="auto">
|
||||
<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
|
||||
|
|
|
@ -61,7 +61,15 @@ export default {
|
|||
'hoisting': {
|
||||
'035958e685cf4850bc40151c5e0617a6': '',
|
||||
'default': '/pages/eight_assignments/hoisting/apply'
|
||||
}
|
||||
},
|
||||
'electricity': {
|
||||
'035958e685cf4850bc40151c5e0617a6': '',
|
||||
'default': '/pages/eight_assignments/electricity/apply'
|
||||
},
|
||||
'cutRoad': {
|
||||
'035958e685cf4850bc40151c5e0617a6': '',
|
||||
'default': '/pages/eight_assignments/cut_road/apply'
|
||||
},
|
||||
}
|
||||
const url = urlByTypeMap[this.type][this.select_corp] ?? urlByTypeMap[this.type].default
|
||||
let params = {}
|
||||
|
|
|
@ -9,7 +9,17 @@
|
|||
<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>
|
||||
<template #title>
|
||||
<view style="display: flex;justify-content: space-between">
|
||||
<view>{{ item.QUESTION }}</view>
|
||||
<view>{{ item.TEXT_INFO || item.ANSWER }}</view>
|
||||
</view>
|
||||
</template>
|
||||
<template #label>
|
||||
<block v-for="(item1,index1) in item.answers" :key="index1">
|
||||
<view>{{ item1.TEXT_INFO }}:{{ item1.ANSWER }}</view>
|
||||
</block>
|
||||
</template>
|
||||
</u-cell>
|
||||
</u-cell-group>
|
||||
<u-divider text="审批人员" textPosition="left" textColor="#3c9cff" lineColor="#3c9cff"/>
|
||||
|
@ -66,7 +76,7 @@ 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]
|
||||
this.questionnaires = resData.list.simpleQues[0]
|
||||
},
|
||||
async fnSubmit() {
|
||||
let CORP_ID = ''
|
||||
|
@ -82,7 +92,7 @@ export default {
|
|||
CORP_ID,
|
||||
EW_RU_JOB_ID: this.jobId,
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -29,7 +29,8 @@ const processFormData = async (formData, formItems) => {
|
|||
const {CODE} = await setTaskFile({formData: {type: 0}, name: 'files', filePath: currentItem[j].url})
|
||||
codeList.push(CODE)
|
||||
}
|
||||
obj.ITEM_VALUE = codeList
|
||||
obj.ITEM_VALUE = ''
|
||||
obj.picList = codeList
|
||||
} else {
|
||||
throw Error('图片和视频只支持数组')
|
||||
}
|
||||
|
@ -41,7 +42,8 @@ const processFormData = async (formData, formItems) => {
|
|||
for (let j = 0; j < currentItem.length; j++) {
|
||||
itemList.push(await processFormData(currentItem[j], formItem.listStructure))
|
||||
}
|
||||
obj.ITEM_VALUE = JSON.stringify(itemList)
|
||||
obj.ITEM_VALUE = ''
|
||||
obj.list = itemList
|
||||
} else {
|
||||
throw Error('动态表单只支持数组')
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue