From 77155f9ec707765e9af9d8457a0ad046b2775c76 Mon Sep 17 00:00:00 2001
From: Admin <978517621@qq.com>
Date: 星期五, 19 八月 2022 20:39:36 +0800
Subject: [PATCH] Default Changelist
---
/dev/null | 153 --
src/views/specialWorkSystem/workApplyManage/workApplyForm/components/broken.vue | 315 +++++
src/views/specialWorkSystem/workApplyManage/workApplyForm/components/height.vue | 363 ++++++
src/views/specialWorkSystem/workApplyManage/workApplyForm/components/power.vue | 271 ++++
src/views/specialWorkSystem/workApplyManage/workApplyForm/components/hoist.vue | 267 ++++
src/views/specialWorkSystem/workApplyManage/workApplyForm/components/plate.vue | 432 +++++++
src/views/specialWorkSystem/workApplyManage/workApplyForm/components/space.vue | 328 +++++
src/views/specialWorkSystem/workApplyManage/workTicket/index.vue | 2
src/api/specialWorkSystem/workApply/index.ts | 63 +
src/views/specialWorkSystem/workApplyManage/workApplyForm/index.vue | 620 ----------
src/views/specialWorkSystem/workApplyManage/workApplyForm/components/fire.vue | 317 +++++
src/views/specialWorkSystem/workApplyManage/workApplyForm/components/ground.vue | 329 +++++
12 files changed, 2,724 insertions(+), 736 deletions(-)
diff --git a/src/api/specialWorkSystem/workApply/index.ts b/src/api/specialWorkSystem/workApply/index.ts
index 002afba..4bc3282 100644
--- a/src/api/specialWorkSystem/workApply/index.ts
+++ b/src/api/specialWorkSystem/workApply/index.ts
@@ -20,6 +20,69 @@
});
},
+ // 受限空间申请
+ postSpaceApply: (data: object) => {
+ return request({
+ url: import.meta.env.VITE_API_URL + `/work/apply/confinedspace`,
+ method: 'post',
+ data: data
+ });
+ },
+
+ // 吊装申请
+ postHoistApply: (data: object) => {
+ return request({
+ url: import.meta.env.VITE_API_URL + `/work/apply/hoisting`,
+ method: 'post',
+ data: data
+ });
+ },
+
+ // 动土申请
+ postGroundApply: (data: object) => {
+ return request({
+ url: import.meta.env.VITE_API_URL + `/work/apply/groundBreaking`,
+ method: 'post',
+ data: data
+ });
+ },
+
+ // 断路申请
+ postBrokenApply: (data: object) => {
+ return request({
+ url: import.meta.env.VITE_API_URL + `/work/apply/brokenCircuit`,
+ method: 'post',
+ data: data
+ });
+ },
+
+ // 高处申请
+ postHeightApply: (data: object) => {
+ return request({
+ url: import.meta.env.VITE_API_URL + `/work/apply/height`,
+ method: 'post',
+ data: data
+ });
+ },
+
+ // 临时用电申请
+ postPowerApply: (data: object) => {
+ return request({
+ url: import.meta.env.VITE_API_URL + `/work/apply/temporaryPower`,
+ method: 'post',
+ data: data
+ });
+ },
+
+ // 盲板申请
+ postPlateApply: (data: object) => {
+ return request({
+ url: import.meta.env.VITE_API_URL + `/work/apply/blindPlatePlugging`,
+ method: 'post',
+ data: data
+ });
+ },
+
// 取消申请
cancelApply: (data: object) => {
return request({
diff --git a/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/blindPanelForm.vue b/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/blindPanelForm.vue
deleted file mode 100644
index bf26c37..0000000
--- a/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/blindPanelForm.vue
+++ /dev/null
@@ -1,354 +0,0 @@
-<template>
- <div class="comp-container">
- <el-form :model="bpForm" label-width="180px" :rules="bpFormRules" ref="bpRef">
- <div class="homeCard">
- <el-row>
- <el-col :span="8">
- <el-form-item label="申请部门" prop="bpDepartment">
- <el-select v-model="bpForm.bpDepartment" placeholder="请选择部门">
- <el-option label="机修班" value="机修班" />
- <el-option label="火工班" value="火工班" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="申请人" prop="bpApplyName">
- <el-input
- v-model="bpForm.bpApplyName"
- placeholder="请输入"
- class="input-with-select"
- >
- <template #append>
- <el-button :icon="Search" />
- </template>
- </el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="设备管道名称" prop="bpTubeName">
- <el-input
- v-model="bpForm.bpTubeName"
- placeholder="请输入"
- class="input-with-select"
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="主要介质" prop="bpMainMatter">
- <el-input
- v-model="bpForm.bpMainMatter"
- placeholder="请输入"
- class="input-with-select"
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="8">
- <el-form-item label="温度" prop="bpTemperature">
- <el-input
- v-model="bpForm.bpTemperature"
- placeholder="请输入"
- class="input-with-select"
- />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="压力" prop="bpPressure">
- <el-input
- v-model="bpForm.bpPressure"
- placeholder="请输入"
- class="input-with-select"
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="盲板材质" prop="bpMaterial">
- <el-input
- v-model="bpForm.bpMaterial"
- placeholder="请输入"
- class="input-with-select"
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="盲板规格" prop="bpFormat">
- <el-input
- v-model="bpForm.bpFormat"
- placeholder="请输入"
- class="input-with-select"
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="盲板编号" prop="bpNum">
- <el-input
- v-model="bpForm.bpNum"
- placeholder="请输入"
- class="input-with-select"
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="盲板位置" prop="bpLocation">
- <el-input
- v-model="bpForm.bpLocation"
- placeholder="请输入"
- class="input-with-select"
- type="textarea"
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="盲板位置图">
- <el-upload
- v-model:file-list="bpForm.picList"
- class="upload-demo"
- action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15"
- multiple
- :on-preview="handlePreview"
- :on-remove="handleRemove"
- :before-remove="beforeRemove"
- :limit="3"
- :on-exceed="handleExceed"
- >
- <el-button type="primary">上传附件</el-button>
- <template #tip>
- <div class="el-upload__tip">
- jpg/png 文件大小须在500k以内.
- </div>
- </template>
- </el-upload>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="装盲板负责人" prop="bpPrincipals">
- <el-select v-model="bpForm.bpPrincipals" placeholder="请选择" multiple>
- <el-option label="负责人一" value="负责人一" />
- <el-option label="负责人二" value="负责人二" />
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="装盲板时间" prop="bpInstallTime">
- <el-date-picker
- v-model="bpForm.bpInstallTime"
- type="datetime"
- placeholder="请选择"
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="拆盲板负责人" prop="bpDePrincipals">
- <el-select v-model="bpForm.bpDePrincipals" placeholder="请选择" multiple>
- <el-option label="负责人一" value="负责人一" />
- <el-option label="负责人二" value="负责人二" />
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="拆盲板时间" prop="bpUninstallTime">
- <el-date-picker
- v-model="bpForm.bpUninstallTime"
- type="datetime"
- placeholder="请选择"
- />
- </el-form-item>
- </el-col>
- </el-row>
- </div>
- </el-form>
- </div>
-</template>
-
-<script lang="ts">
- import { toRefs, reactive, defineComponent, ref } from 'vue';
- import { storeToRefs } from 'pinia';
- import { initBackEndControlRoutes } from '/@/router/backEnd';
- import {useUserInfo} from "/@/stores/userInfo";
- import { Session } from '/@/utils/storage';
- import { Search } from '@element-plus/icons-vue'
- import { ElMessage, ElMessageBox } from 'element-plus'
- import type { FormInstance, FormRules, UploadProps, UploadUserFile } from 'element-plus'
- let global: any = {
- homeChartOne: null,
- homeChartTwo: null,
- homeCharThree: null,
- dispose: [null, '', undefined],
- };
-
- interface stateType {
- homeOne: Array <type>
- }
- interface type {
-
- }
- export default defineComponent({
- name: 'blindPanelForm',
- props: {
- bpForm: Object,
- },
- setup(props) {
- const userInfo = useUserInfo()
- const { userInfos } = storeToRefs(userInfo);
- const state = reactive<stateType>({});
- const bpForm1 = reactive(props.bpForm)
- // const bpForm = reactive({
- // bpDepartment: '',
- // bpApplyName: '',
- // bpTubeName: '',
- // bpMainMatter: '',
- // bpTemperature: '',
- // bpPressure: '',
- // bpMaterial: '',
- // bpFormat: '',
- // bpNum: '',
- // bpLocation: '',
- // fileList: [],
- // bpPrincipals: [],
- // bpInstallTime: '',
- // bpDePrincipals: [],
- // bpUninstallTime: ''
- // })
- const bpRef = ref<FormInstance>()
- const bpFormRules = reactive<FormRules>({
- bpDepartment:[{required: true,message: '此处不可为空'}],
- bpApplyName:[{required: true,message: '此处不可为空'}],
- bpTubeName: [{required: true,message: '此处不可为空'}],
- bpMainMatter: [{required: true,message: '此处不可为空'}],
- bpTemperature: [{required: true,message: '此处不可为空'}],
- bpPressure: [{required: true,message: '此处不可为空'}],
- bpMaterial: [{required: true,message: '此处不可为空'}],
- bpFormat: [{required: true,message: '此处不可为空'}],
- bpNum: [{required: true,message: '此处不可为空'}],
- bpLocation: [{required: true,message: '此处不可为空'}],
- bpPrincipals: [{type: 'array',required: true,message: '此处不可为空',trigger:'blur'}],
- bpInstallTime: [{required: true,message: '此处不可为空'}],
- bpDePrincipals: [{type: 'array',required: true,message: '此处不可为空',trigger:'blur'}],
- bpUninstallTime: [{required: true,message: '此处不可为空'}]
- })
- const fileList = ref<UploadUserFile[]>([
- {
- name: 'element-plus-logo.svg',
- url: 'https://element-plus.org/images/element-plus-logo.svg',
- }
- ])
-
- const handleRemove: UploadProps['onRemove'] = (file, uploadFiles) => {
- console.log(file, uploadFiles)
- }
-
- const handlePreview: UploadProps['onPreview'] = (uploadFile) => {
- console.log(uploadFile)
- }
-
- const handleExceed: UploadProps['onExceed'] = (files, uploadFiles) => {
- ElMessage.warning(
- // `The limit is 3, you selected ${files.length} files this time, add up to ${
- // files.length + uploadFiles.length
- // } totally`
- '文件总数超出限制'
- )
- }
-
- const beforeRemove: UploadProps['beforeRemove'] = (uploadFile, uploadFiles) => {
- return ElMessageBox.confirm(
- `取消上传 ${uploadFile.name} ?`
- ).then(
- () => true,
- () => false
- )
- }
-
- const validateForm = async () => {
- let flag = null
- await bpRef.value.validate(valid=>{
- if(valid){
- flag = true
- }else{
- flag = false
- }
- })
- return flag
- }
- // 折线图
- const renderMenu = async (value: string) => {
- Session.set('projectId',value)
- userInfos.value.projectId = value
- await initBackEndControlRoutes();
- };
- return {
- renderMenu,
- bpForm1,
- bpFormRules,
- bpRef,
- fileList,
- Search,
- validateForm,
- handleRemove,
- handlePreview,
- handleExceed,
- beforeRemove,
- ...toRefs(state),
- };
- },
- });
-</script>
-
-<style scoped lang="scss">
- .home-container {
- height: 100%;
- overflow: hidden;
- .homeCard{
- width: 100%;
- padding: 20px;
- background: #fff;
- border-radius: 4px;
- margin-bottom: 20px;
- }
- .el-row{
- margin-bottom: 20px;
- }
- .el-row:last-child {
- margin-bottom: 0;
- }
- .el-input{
- width: 100% !important;
- }
- .el-date-editor::v-deep{
- width: 100%;
- }
- .el-select{
- width: 100%;
- }
- .el-cascader{
- width: 100% !important;
- }
- .submitBtn{
- display: flex;
- justify-content: center;
- }
- }
-</style>
diff --git a/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/broken.vue b/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/broken.vue
new file mode 100644
index 0000000..2e6ceb3
--- /dev/null
+++ b/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/broken.vue
@@ -0,0 +1,315 @@
+<template>
+ <div class="home-container">
+ <div style="height: 100%">
+ <el-form :model="form" label-width="150px" :rules="applyRules" ref="ruleFormRef">
+ <div class="homeCard">
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="作业人" prop="operatorUids">
+ <el-select v-model="form.operatorUids" multiple>
+ <el-option
+ v-for="item in workerList"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="作业时间" prop="workTimeLine">
+ <el-date-picker
+ v-model="form.workTimeLine"
+ format="YYYY-MM-DD HH:mm"
+ value-format="YYYY-MM-DD HH:mm:00"
+ type="datetimerange"
+ range-separator="至"
+ start-placeholder="开始时间"
+ end-placeholder="结束时间"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="作业内容" prop="workContent">
+ <el-input
+ v-model="form.workContent"
+ autosize
+ type="textarea"
+ placeholder="请输入作业内容"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="作业地址" prop="workLocation">
+ <el-input
+ v-model="form.workLocation"
+ autosize
+ type="textarea"
+ placeholder="请输入作业地址"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="作业单位" prop="workDetail.operationDepId">
+ <el-select v-model="form.workDetail.operationDepId">
+ <el-option
+ v-for="item in csDepList"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="断路原因" prop="workDetail.bcReason">
+ <el-input
+ v-model="form.workDetail.bcReason"
+ autosize
+ type="textarea"
+ placeholder="请输入"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="断路地段说明" prop="workDetail.bcExplain">
+ <el-input
+ v-model="form.workDetail.bcExplain"
+ autosize
+ type="textarea"
+ placeholder="请输入"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="涉及相关部门" prop="workDetail.involvedDepIds">
+ <el-select v-model="form.workDetail.involvedDepIds" multiple>
+ <el-option v-for="item in otherWorkList" :key="item.value" :label="item.label" :value="item.value" />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </div>
+ </el-form>
+ <div class="applyBtn">
+ <el-button type="primary" size="large" plain @click="submitForm(ruleFormRef)">发起申请</el-button>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script lang="ts">
+ import { toRefs, reactive, defineComponent, ref, defineAsyncComponent } from 'vue';
+ import { storeToRefs } from 'pinia';
+ import { initBackEndControlRoutes } from '/@/router/backEnd';
+ import {useUserInfo} from "/@/stores/userInfo";
+ import { Session } from '/@/utils/storage';
+ import { Search } from '@element-plus/icons-vue'
+ import { ElMessage } from 'element-plus'
+ import type { FormInstance, FormRules } from 'element-plus'
+ import { workApplyApi } from '/@/api/specialWorkSystem/workApply';
+
+
+ interface stateType {
+ form: Object,
+ workerList: Array<any>,
+ csDepList: Array<any>,
+ otherWorkList: Array<any>
+ }
+ export default defineComponent({
+ name: 'brokenForm',
+ components: {},
+ setup() {
+ const userInfo = useUserInfo()
+ const { userInfos } = storeToRefs(userInfo);
+ const state = reactive<stateType>({
+ form: {
+ operatorUids: [],
+ workType: 5,
+ workLevel: 0,
+ workContent: '',
+ workLocation: '',
+ workDetail:{
+ operationDepId: null,
+ bcReason: '',
+ bcExplain: '',
+ bcPath: '',
+ involvedDepIds: []
+ },
+ workTimeLine: [],
+ expStartTime: '',
+ expEndTime: ''
+ },
+ workerList:[
+ {
+ label: "张三",
+ value: 53
+ },
+ {
+ label: "李四",
+ value: 54
+ },
+ {
+ label: "测试一",
+ value: 55
+ },
+ {
+ label: "测试二",
+ value: 56
+ }
+ ],
+ csDepList: [
+ {
+ label: "单位一",
+ value: 1
+ },
+ {
+ label: "单位二",
+ value: 2
+ },
+ {
+ label: "单位三",
+ value: 3
+ },
+ {
+ label: "单位四",
+ value: 4
+ },
+ {
+ label: "单位五",
+ value: 5
+ },
+ {
+ label: "单位六",
+ value: 6
+ }
+ ],
+ otherWorkList: [
+ {
+ label: '部门一',
+ value: 1
+ },
+ {
+ label: '部门二',
+ value: 2
+ },
+ {
+ label: '部门三',
+ value: 3
+ },
+ {
+ label: '部门四',
+ value: 4
+ }
+ ]
+ });
+ const ruleFormRef = ref<FormInstance>()
+ const applyRules = reactive<FormRules>({
+ operatorUids: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workType: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workContent: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workLocation: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workTimeLine: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.operationDepId": [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.bcReason": [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.bcExplain": [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.otherSpecialWork": [{ required: true, message: '该内容不能为空', trigger: 'blur' }]
+ });
+ const submitForm = async (formEl: FormInstance | undefined) => {
+ if (!formEl) return
+ await formEl.validate(async (valid, fields) => {
+ if (valid) {
+ state.form.expStartTime = JSON.parse(JSON.stringify(state.form.workTimeLine))[0]
+ state.form.expEndTime = JSON.parse(JSON.stringify(state.form.workTimeLine))[1]
+ let { workTimeLine, ...data } = JSON.parse(JSON.stringify(state.form))
+ data.workDetail.involvedDepIds = data.workDetail.involvedDepIds.join(',')
+ console.log(data,'data')
+ const res = await workApplyApi().postBrokenApply(data)
+ if (res.data.code === '200') {
+ ElMessage({
+ type: 'success',
+ message: '提交成功!'
+ });
+ formEl.resetFields()
+ } else {
+ ElMessage({
+ type: 'warning',
+ message: res.data.msg
+ });
+ }
+ } else {
+ console.log('error submit!', fields)
+ }
+ })
+ }
+ // 折线图
+ const renderMenu = async (value: string) => {
+ Session.set('projectId',value)
+ userInfos.value.projectId = value
+ await initBackEndControlRoutes();
+ };
+ return {
+ renderMenu,
+ Search,
+ ruleFormRef,
+ applyRules,
+ submitForm,
+ ...toRefs(state),
+ };
+ },
+ });
+</script>
+
+<style scoped lang="scss">
+ .home-container {
+ height: 100%;
+ overflow: hidden;
+ position: relative;
+ .homeCard{
+ width: 100%;
+ padding: 20px;
+ box-sizing: border-box;
+ background: #fff;
+ border-radius: 4px;
+ margin-bottom: 20px;
+ }
+ .applyBtn{
+ width: 100%;
+ background: #fff;
+ height: 80px;
+ z-index: 5;
+ box-shadow: 0 -3px 8px rgba(150,150,150,.1);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+ .el-row{
+ margin-bottom: 20px;
+ }
+ .el-row:last-child {
+ margin-bottom: 0;
+ }
+ .el-input{
+ width: 100% !important;
+ }
+ .el-date-editor::v-deep{
+ width: 100%;
+ }
+ .el-select{
+ width: 100%;
+ }
+ .el-cascader{
+ width: 100% !important;
+ }
+ }
+</style>
diff --git a/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/cutLineForm.vue b/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/cutLineForm.vue
deleted file mode 100644
index 4a0a5be..0000000
--- a/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/cutLineForm.vue
+++ /dev/null
@@ -1,220 +0,0 @@
-<template>
- <div class="comp-container">
- <el-form :model="clForm" label-width="180px" :rules="clFormRules" ref="clRef">
- <div class="homeCard">
- <el-row>
- <el-col :span="8">
- <el-form-item label="申请部门" prop="clDepartment">
- <el-select v-model="clForm.clDepartment" placeholder="请选择部门">
- <el-option label="机修班" value="机修班" />
- <el-option label="火工班" value="火工班" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="申请人" prop="clApplyName">
- <el-input
- v-model="clForm.clApplyName"
- placeholder="请输入"
- class="input-with-select"
- >
- <template #append>
- <el-button :icon="Search" />
- </template>
- </el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="断路原因" prop="clReason">
- <el-input
- v-model="clForm.clReason"
- placeholder="请输入"
- class="input-with-select"
- type="textarea"
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="涉及相关单位(部门)" prop="clUnits">
- <el-select v-model="clForm.clUnits" placeholder="请选择" multiple>
- <el-option label="单位一" value="单位一" />
- <el-option label="单位二" value="单位二" />
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="断路地段示意图" prop="fileList">
- <el-upload
- v-model:file-list="fileList"
- class="upload-demo"
- action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15"
- multiple
- :on-preview="handlePreview"
- :on-remove="handleRemove"
- :before-remove="beforeRemove"
- :limit="3"
- :on-exceed="handleExceed"
- >
- <el-button type="primary">上传附件</el-button>
- <template #tip>
- <div class="el-upload__tip">
- jpg/png 文件大小须在500k以内.
- </div>
- </template>
- </el-upload>
- </el-form-item>
- </el-col>
- </el-row>
- </div>
- </el-form>
- </div>
-</template>
-
-<script lang="ts">
- import { toRefs, reactive, defineComponent, ref } from 'vue';
- import { storeToRefs } from 'pinia';
- import { initBackEndControlRoutes } from '/@/router/backEnd';
- import {useUserInfo} from "/@/stores/userInfo";
- import { Session } from '/@/utils/storage';
- import { Search } from '@element-plus/icons-vue'
- import { ElMessage, ElMessageBox } from 'element-plus'
- import type { FormInstance, FormRules, UploadProps, UploadUserFile } from 'element-plus'
- let global: any = {
- homeChartOne: null,
- homeChartTwo: null,
- homeCharThree: null,
- dispose: [null, '', undefined],
- };
-
- interface stateType {
- homeOne: Array <type>
- }
- interface type {
-
- }
- export default defineComponent({
- name: 'cutLineForm',
- props: {
- clForm: Object
- },
- setup(props) {
- const userInfo = useUserInfo()
- const { userInfos } = storeToRefs(userInfo);
- const state = reactive<stateType>({});
- const clForm1 = reactive(props.clForm)
- const clRef = ref<FormInstance>()
- const clFormRules = reactive<FormRules>({
- clDepartment:[{required: true,message: '此处不可为空',trigger: 'blur'}],
- clApplyName:[{required: true,message: '此处不可为空',trigger: 'blur'}],
- clReason: [{required: true,message: '此处不可为空',trigger: 'blur'}],
- clUnits: [{required: true,message: '此处不可为空',trigger: 'blur'}],
- fileList: [{type: 'array',required: true,message: '此处不可为空',trigger: 'change'}]
- })
- const fileList = ref<UploadUserFile[]>([
- {
- name: 'element-plus-logo.svg',
- url: 'https://element-plus.org/images/element-plus-logo.svg',
- }
- ])
-
- const handleRemove: UploadProps['onRemove'] = (file, uploadFiles) => {
- console.log(file, uploadFiles)
- }
-
- const handlePreview: UploadProps['onPreview'] = (uploadFile) => {
- console.log(uploadFile)
- }
-
- const handleExceed: UploadProps['onExceed'] = (files, uploadFiles) => {
- ElMessage.warning(
- // `The limit is 3, you selected ${files.length} files this time, add up to ${
- // files.length + uploadFiles.length
- // } totally`
- '文件总数超出限制'
- )
- }
-
- const beforeRemove: UploadProps['beforeRemove'] = (uploadFile, uploadFiles) => {
- return ElMessageBox.confirm(
- `取消上传 ${uploadFile.name} ?`
- ).then(
- () => true,
- () => false
- )
- }
- const validateForm = async () => {
- let flag = null
- await clRef.value.validate(valid=>{
- if(valid){
- flag = true
- }else{
- flag = false
- }
- })
- return flag
- }
- // 折线图
- const renderMenu = async (value: string) => {
- Session.set('projectId',value)
- userInfos.value.projectId = value
- await initBackEndControlRoutes();
- };
- return {
- renderMenu,
- clForm1,
- Search,
- clFormRules,
- clRef,
- fileList,
- validateForm,
- handleRemove,
- handlePreview,
- handleExceed,
- beforeRemove,
- ...toRefs(state),
- };
- },
- });
-</script>
-
-<style scoped lang="scss">
- .home-container {
- height: 100%;
- overflow: hidden;
- .homeCard{
- width: 100%;
- padding: 20px;
- background: #fff;
- border-radius: 4px;
- margin-bottom: 20px;
- }
- .el-row{
- margin-bottom: 20px;
- }
- .el-row:last-child {
- margin-bottom: 0;
- }
- .el-input{
- width: 100% !important;
- }
- .el-date-editor::v-deep{
- width: 100%;
- }
- .el-select{
- width: 100%;
- }
- .el-cascader{
- width: 100% !important;
- }
- .submitBtn{
- display: flex;
- justify-content: center;
- }
- }
-</style>
diff --git a/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/dirtWorkForm.vue b/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/dirtWorkForm.vue
deleted file mode 100644
index 4bb6e52..0000000
--- a/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/dirtWorkForm.vue
+++ /dev/null
@@ -1,221 +0,0 @@
-<template>
- <div class="comp-container">
- <el-form :model="dwForm" label-width="180px" :rules="dwFormRules" ref="dwRef">
- <div class="homeCard">
- <el-row>
- <el-col :span="8">
- <el-form-item label="申请部门" prop="dwDepartment">
- <el-select v-model="dwForm.dwDepartment" placeholder="请选择部门">
- <el-option label="机修班" value="机修班" />
- <el-option label="火工班" value="火工班" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="申请人" prop="dwApplyName">
- <el-input
- v-model="dwForm.dwApplyName"
- placeholder="请输入"
- class="input-with-select"
- >
- <template #append>
- <el-button :icon="Search" />
- </template>
- </el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="动土范围" prop="dwRange">
- <el-input
- v-model="dwForm.dwRange"
- placeholder="请输入"
- class="input-with-select"
- type="textarea"
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="动土方式" prop="dwWay">
- <el-input
- v-model="dwForm.dwWay"
- placeholder="请输入"
- class="input-with-select"
- type="textarea"
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="动土简图" prop="fileList">
- <el-upload
- v-model:file-list="fileList"
- class="upload-demo"
- action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15"
- multiple
- :on-preview="handlePreview"
- :on-remove="handleRemove"
- :before-remove="beforeRemove"
- :limit="3"
- :on-exceed="handleExceed"
- >
- <el-button type="primary">上传附件</el-button>
- <template #tip>
- <div class="el-upload__tip">
- jpg/png 文件大小须在500k以内.
- </div>
- </template>
- </el-upload>
- </el-form-item>
- </el-col>
- </el-row>
- </div>
- </el-form>
- </div>
-</template>
-
-<script lang="ts">
- import { toRefs, reactive, defineComponent, ref } from 'vue';
- import { storeToRefs } from 'pinia';
- import { initBackEndControlRoutes } from '/@/router/backEnd';
- import {useUserInfo} from "/@/stores/userInfo";
- import { Session } from '/@/utils/storage';
- import { Search } from '@element-plus/icons-vue'
- import { ElMessage, ElMessageBox } from 'element-plus'
- import type { FormInstance, FormRules, UploadProps, UploadUserFile } from 'element-plus'
- let global: any = {
- homeChartOne: null,
- homeChartTwo: null,
- homeCharThree: null,
- dispose: [null, '', undefined],
- };
-
- interface stateType {
- homeOne: Array <type>
- }
- interface type {
-
- }
- export default defineComponent({
- name: 'dirtWorkForm',
- props:{
- dwForm: Object
- },
- setup(props) {
- const userInfo = useUserInfo()
- const { userInfos } = storeToRefs(userInfo);
- const state = reactive<stateType>({});
- const dwForm1 = reactive(props.dwForm)
- const dwRef = ref<FormInstance>()
- const dwFormRules = reactive<FormRules>({
- dwDepartment:[{required: true,message: '此处不可为空',trigger: 'blur'}],
- dwApplyName:[{required: true,message: '此处不可为空',trigger: 'blur'}],
- dwRange: [{required: true,message: '此处不可为空',trigger: 'blur'}],
- dwWay: [{required: true,message: '此处不可为空',trigger: 'blur'}],
- fileList: [{type: 'array',required: true,message: '此处不可为空',trigger: 'change'}]
- })
- const fileList = ref<UploadUserFile[]>([
- {
- name: 'element-plus-logo.svg',
- url: 'https://element-plus.org/images/element-plus-logo.svg',
- }
- ])
-
- const handleRemove: UploadProps['onRemove'] = (file, uploadFiles) => {
- console.log(file, uploadFiles)
- }
-
- const handlePreview: UploadProps['onPreview'] = (uploadFile) => {
- console.log(uploadFile)
- }
-
- const handleExceed: UploadProps['onExceed'] = (files, uploadFiles) => {
- ElMessage.warning(
- // `The limit is 3, you selected ${files.length} files this time, add up to ${
- // files.length + uploadFiles.length
- // } totally`
- '文件总数超出限制'
- )
- }
-
- const beforeRemove: UploadProps['beforeRemove'] = (uploadFile, uploadFiles) => {
- return ElMessageBox.confirm(
- `取消上传 ${uploadFile.name} ?`
- ).then(
- () => true,
- () => false
- )
- }
- const validateForm = async () => {
- let flag = null
- await dwRef.value.validate(valid=>{
- if(valid){
- flag = true
- }else{
- flag = false
- }
- })
- return flag
- }
- // 折线图
- const renderMenu = async (value: string) => {
- Session.set('projectId',value)
- userInfos.value.projectId = value
- await initBackEndControlRoutes();
- };
- return {
- renderMenu,
- dwForm1,
- dwFormRules,
- dwRef,
- fileList,
- validateForm,
- handleRemove,
- handlePreview,
- handleExceed,
- beforeRemove,
- ...toRefs(state),
- };
- },
- });
-</script>
-
-<style scoped lang="scss">
- .home-container {
- height: 100%;
- overflow: hidden;
- .homeCard{
- width: 100%;
- padding: 20px;
- background: #fff;
- border-radius: 4px;
- margin-bottom: 20px;
- }
- .el-row{
- margin-bottom: 20px;
- }
- .el-row:last-child {
- margin-bottom: 0;
- }
- .el-input{
- width: 100% !important;
- }
- .el-date-editor::v-deep{
- width: 100%;
- }
- .el-select{
- width: 100%;
- }
- .el-cascader{
- width: 100% !important;
- }
- .submitBtn{
- display: flex;
- justify-content: center;
- }
- }
-</style>
diff --git a/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/fire.vue b/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/fire.vue
new file mode 100644
index 0000000..593a8d4
--- /dev/null
+++ b/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/fire.vue
@@ -0,0 +1,317 @@
+<template>
+ <div class="home-container">
+ <div style="height: 100%">
+ <el-form :model="form" label-width="150px" :rules="applyRules" ref="ruleFormRef">
+ <div class="homeCard">
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="作业人" prop="operatorUids">
+ <el-select v-model="form.operatorUids" multiple>
+ <el-option
+ v-for="item in workerList"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="作业等级" prop="workLevel">
+ <el-select v-model="form.workLevel">
+ <el-option
+ v-for="item in workLevelList"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="作业时间" prop="workTimeLine">
+ <el-date-picker
+ v-model="form.workTimeLine"
+ format="YYYY-MM-DD HH:mm"
+ value-format="YYYY-MM-DD HH:mm:00"
+ type="datetimerange"
+ range-separator="至"
+ start-placeholder="开始时间"
+ end-placeholder="结束时间"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="作业内容" prop="workContent">
+ <el-input
+ v-model="form.workContent"
+ autosize
+ type="textarea"
+ placeholder="请输入作业内容"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="作业地址" prop="workLocation">
+ <el-input
+ v-model="form.workLocation"
+ autosize
+ type="textarea"
+ placeholder="请输入作业地址"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="动火方式" prop="workDetail.hotMethod">
+ <el-input
+ v-model="form.workDetail.hotMethod"
+ autosize
+ type="textarea"
+ placeholder="请输入动火方式"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="关联作业" prop="workDetail.otherSpecialWork">
+ <el-select v-model="form.workDetail.otherSpecialWork" multiple>
+ <el-option
+ v-for="item in otherWorkList"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </div>
+ </el-form>
+ <div class="applyBtn">
+ <el-button type="primary" size="large" plain @click="submitForm(ruleFormRef)">发起申请</el-button>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script lang="ts">
+ import { toRefs, reactive, defineComponent, ref, defineAsyncComponent } from 'vue';
+ import { storeToRefs } from 'pinia';
+ import { initBackEndControlRoutes } from '/@/router/backEnd';
+ import {useUserInfo} from "/@/stores/userInfo";
+ import { Session } from '/@/utils/storage';
+ import { Search } from '@element-plus/icons-vue'
+ import { ElMessage } from 'element-plus'
+ import type { FormInstance, FormRules } from 'element-plus'
+ import { workApplyApi } from '/@/api/specialWorkSystem/workApply';
+
+
+ interface stateType {
+ form: Object,
+ workerList: Array<any>,
+ workTypeList: Array<any>,
+ workLevelList: Array<any>,
+ otherWorkList: Array<any>
+ }
+ export default defineComponent({
+ name: 'fireForm',
+ components: {},
+ setup() {
+ const userInfo = useUserInfo()
+ const { userInfos } = storeToRefs(userInfo);
+ const state = reactive<stateType>({
+ form: {
+ operatorUids: [],
+ workType: 1,
+ workLevel: null,
+ workContent: '',
+ workLocation: '',
+ workDetail:{
+ hotMethod: '',
+ otherSpecialWork: []
+ },
+ workTimeLine: [],
+ expStartTime: '',
+ expEndTime: ''
+ },
+ workerList:[
+ {
+ label: "张三",
+ value: 53
+ },
+ {
+ label: "李四",
+ value: 54
+ },
+ {
+ label: "测试一",
+ value: 55
+ },
+ {
+ label: "测试二",
+ value: 56
+ }
+ ],
+ workTypeList: [
+ {
+ label: "类型一",
+ value: 1
+ },
+ {
+ label: "类型二",
+ value: 2
+ }
+ ],
+ workLevelList: [
+ {
+ label: "一级动火作业",
+ value: 1
+ },
+ {
+ label: "二级动火作业",
+ value: 2
+ },
+ {
+ label: "特级动火作业",
+ value: 3
+ }
+ ],
+ otherWorkList: [
+ {
+ label: "动火作业",
+ value: 1
+ },
+ {
+ label: "受限空间作业",
+ value: 2
+ },
+ {
+ label: "吊装作业",
+ value: 3
+ },
+ {
+ label: "动土作业",
+ value: 4
+ },
+ {
+ label: "断路作业",
+ value: 5
+ },
+ {
+ label: "高处作业",
+ value: 6
+ },
+ {
+ label: "临时用电作业",
+ value: 7
+ },
+ {
+ label: "盲板抽堵作业",
+ value: 8
+ }
+ ]
+ });
+ const ruleFormRef = ref<FormInstance>()
+ const applyRules = reactive<FormRules>({
+ operatorUids: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workType: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workLevel: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workContent: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workLocation: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workTimeLine: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.hotMethod": [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.otherSpecialWork": [{ required: true, message: '该内容不能为空', trigger: 'blur' }]
+ });
+ const submitForm = async (formEl: FormInstance | undefined) => {
+ if (!formEl) return
+ await formEl.validate(async (valid, fields) => {
+ if (valid) {
+ state.form.expStartTime = JSON.parse(JSON.stringify(state.form.workTimeLine))[0]
+ state.form.expEndTime = JSON.parse(JSON.stringify(state.form.workTimeLine))[1]
+ let { workTimeLine, ...data } = JSON.parse(JSON.stringify(state.form))
+ data.workDetail.otherSpecialWork = data.workDetail.otherSpecialWork.join(',')
+ console.log(data,'data')
+ const res = await workApplyApi().postFireApply(data)
+ if (res.data.code === '200') {
+ ElMessage({
+ type: 'success',
+ message: '提交成功!'
+ });
+ formEl.resetFields()
+ } else {
+ ElMessage({
+ type: 'warning',
+ message: res.data.msg
+ });
+ }
+ } else {
+ console.log('error submit!', fields)
+ }
+ })
+ }
+ // 折线图
+ const renderMenu = async (value: string) => {
+ Session.set('projectId',value)
+ userInfos.value.projectId = value
+ await initBackEndControlRoutes();
+ };
+ return {
+ renderMenu,
+ Search,
+ ruleFormRef,
+ applyRules,
+ submitForm,
+ ...toRefs(state),
+ };
+ },
+ });
+</script>
+
+<style scoped lang="scss">
+ .home-container {
+ height: 100%;
+ overflow: hidden;
+ position: relative;
+ .homeCard{
+ width: 100%;
+ padding: 20px;
+ box-sizing: border-box;
+ background: #fff;
+ border-radius: 4px;
+ margin-bottom: 20px;
+ }
+ .applyBtn{
+ width: 100%;
+ background: #fff;
+ height: 80px;
+ z-index: 5;
+ box-shadow: 0 -3px 8px rgba(150,150,150,.1);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+ .el-row{
+ margin-bottom: 20px;
+ }
+ .el-row:last-child {
+ margin-bottom: 0;
+ }
+ .el-input{
+ width: 100% !important;
+ }
+ .el-date-editor::v-deep{
+ width: 100%;
+ }
+ .el-select{
+ width: 100%;
+ }
+ .el-cascader{
+ width: 100% !important;
+ }
+ }
+</style>
diff --git a/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/fireWorkForm.vue b/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/fireWorkForm.vue
deleted file mode 100644
index 084f86c..0000000
--- a/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/fireWorkForm.vue
+++ /dev/null
@@ -1,164 +0,0 @@
-<template>
- <div class="comp-container">
- <el-form :model="fwForm" label-width="150px" :rules="fwRules" ref="fwRef">
- <div class="homeCard">
- <el-row>
- <el-col :span="8">
- <el-form-item label="申请部门" prop="fwDepartment">
- <el-select v-model="fwForm.fwDepartment" placeholder="请选择部门">
- <el-option label="机修班" value="机修班" />
- <el-option label="火工班" value="火工班" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="申请人" prop="fwApplyName">
- <el-input
- v-model="fwForm.fwApplyName"
- placeholder="请输入"
- class="input-with-select"
- >
- <template #append>
- <el-button :icon="Search" />
- </template>
- </el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="8">
- <el-form-item label="作业等级" prop="fwLevel">
- <el-select v-model="fwForm.fwLevel" placeholder="请选择">
- <el-option label="一" value="一" />
- <el-option label="二" value="二" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="危害辨识" prop="fwRiskIdentify">
- <el-select v-model="fwForm.fwRiskIdentify" placeholder="请选择">
- <el-option label="辨识一" value="辨识一" />
- <el-option label="辨识二" value="辨识二" />
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="8">
- <el-form-item label="动火方式" prop="fwWorkWay">
- <el-select v-model="fwForm.fwWorkWay" placeholder="请选择">
- <el-option label="方式一" value="方式一" />
- <el-option label="方式二" value="方式二" />
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- </div>
- </el-form>
- </div>
-</template>
-
-<script lang="ts">
- import { toRefs, reactive, defineComponent, ref } from 'vue';
- import { storeToRefs } from 'pinia';
- import { initBackEndControlRoutes } from '/@/router/backEnd';
- import {useUserInfo} from "/@/stores/userInfo";
- import { Session } from '/@/utils/storage';
- import { Search } from '@element-plus/icons-vue'
- import type { FormInstance, FormRules } from 'element-plus'
- let global: any = {
- homeChartOne: null,
- homeChartTwo: null,
- homeCharThree: null,
- dispose: [null, '', undefined],
- };
-
- interface stateType {
- homeOne: Array <type>
- }
- interface type {
-
- }
- export default defineComponent({
- name: 'fireWorkForm',
- props: {
- fwForm: Object
- },
- setup(props) {
- const userInfo = useUserInfo()
- const { userInfos } = storeToRefs(userInfo);
- const state = reactive<stateType>({});
- const fwForm1 = reactive(props.fwForm)
- const fwRef = ref<FormInstance>()
- const fwRules = reactive<FormRules>({
- fwDepartment:[{required: true,message: '此处不可为空'}],
- fwApplyName:[{required: true,message: '此处不可为空'}],
- fwLevel: [{required: true,message: '此处不可为空'}],
- fwRiskIdentify: [{required: true,message: '此处不可为空'}],
- fwWorkWay: [{required: true,message: '此处不可为空'}]
- })
- const validateForm = async () => {
- let flag = null
- await fwRef.value.validate(valid=>{
- if(valid){
- flag = true
- }else{
- flag = false
- }
- })
- return flag
- }
- // 折线图
- const renderMenu = async (value: string) => {
- Session.set('projectId',value)
- userInfos.value.projectId = value
- await initBackEndControlRoutes();
- };
- return {
- renderMenu,
- Search,
- fwForm1,
- fwRules,
- fwRef,
- validateForm,
- ...toRefs(state),
- };
- },
- });
-</script>
-
-<style scoped lang="scss">
- .comp-container {
- height: 100%;
- overflow: hidden;
- .homeCard{
- width: 100%;
- padding: 20px;
- background: #fff;
- border-radius: 4px;
- margin-bottom: 20px;
- }
- .el-row{
- margin-bottom: 20px;
- }
- .el-row:last-child {
- margin-bottom: 0;
- }
- .el-input{
- width: 100% !important;
- }
- .el-date-editor::v-deep{
- width: 100%;
- }
- .el-select{
- width: 100%;
- }
- .el-cascader{
- width: 100% !important;
- }
- .submitBtn{
- display: flex;
- justify-content: center;
- }
- }
-</style>
diff --git a/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/ground.vue b/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/ground.vue
new file mode 100644
index 0000000..1334ae4
--- /dev/null
+++ b/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/ground.vue
@@ -0,0 +1,329 @@
+<template>
+ <div class="home-container">
+ <div style="height: 100%">
+ <el-form :model="form" label-width="150px" :rules="applyRules" ref="ruleFormRef">
+ <div class="homeCard">
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="作业人" prop="operatorUids">
+ <el-select v-model="form.operatorUids" multiple>
+ <el-option
+ v-for="item in workerList"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="作业时间" prop="workTimeLine">
+ <el-date-picker
+ v-model="form.workTimeLine"
+ format="YYYY-MM-DD HH:mm"
+ value-format="YYYY-MM-DD HH:mm:00"
+ type="datetimerange"
+ range-separator="至"
+ start-placeholder="开始时间"
+ end-placeholder="结束时间"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="作业内容" prop="workContent">
+ <el-input
+ v-model="form.workContent"
+ autosize
+ type="textarea"
+ placeholder="请输入作业内容"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="作业地址" prop="workLocation">
+ <el-input
+ v-model="form.workLocation"
+ autosize
+ type="textarea"
+ placeholder="请输入作业地址"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="作业单位" prop="workDetail.operationDepId">
+ <el-select v-model="form.workDetail.operationDepId">
+ <el-option
+ v-for="item in csDepList"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="范围" prop="workDetail.gbScope">
+ <el-input
+ v-model="form.workDetail.gbScope"
+ autosize
+ type="textarea"
+ placeholder="请输入"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="动土方式" prop="workDetail.gbMethod">
+ <el-input
+ v-model="form.workDetail.gbMethod"
+ autosize
+ type="textarea"
+ placeholder="请输入"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="关联作业" prop="workDetail.otherSpecialWork">
+ <el-select v-model="form.workDetail.otherSpecialWork" multiple>
+ <el-option v-for="item in otherWorkList" :key="item.value" :label="item.label" :value="item.value" />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </div>
+ </el-form>
+ <div class="applyBtn">
+ <el-button type="primary" size="large" plain @click="submitForm(ruleFormRef)">发起申请</el-button>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script lang="ts">
+ import { toRefs, reactive, defineComponent, ref, defineAsyncComponent } from 'vue';
+ import { storeToRefs } from 'pinia';
+ import { initBackEndControlRoutes } from '/@/router/backEnd';
+ import {useUserInfo} from "/@/stores/userInfo";
+ import { Session } from '/@/utils/storage';
+ import { Search } from '@element-plus/icons-vue'
+ import { ElMessage } from 'element-plus'
+ import type { FormInstance, FormRules } from 'element-plus'
+ import { workApplyApi } from '/@/api/specialWorkSystem/workApply';
+
+
+ interface stateType {
+ form: Object,
+ workerList: Array<any>,
+ csDepList: Array<any>,
+ otherWorkList: Array<any>
+ }
+ export default defineComponent({
+ name: 'groundForm',
+ components: {},
+ setup() {
+ const userInfo = useUserInfo()
+ const { userInfos } = storeToRefs(userInfo);
+ const state = reactive<stateType>({
+ form: {
+ operatorUids: [],
+ workType: 4,
+ workLevel: 0,
+ workContent: '',
+ workLocation: '',
+ workDetail:{
+ operationDepId: null,
+ gbScope: '',
+ gbMethod: '',
+ gbPath: '',
+ otherSpecialWork: []
+ },
+ workTimeLine: [],
+ expStartTime: '',
+ expEndTime: ''
+ },
+ workerList:[
+ {
+ label: "张三",
+ value: 53
+ },
+ {
+ label: "李四",
+ value: 54
+ },
+ {
+ label: "测试一",
+ value: 55
+ },
+ {
+ label: "测试二",
+ value: 56
+ }
+ ],
+ csDepList: [
+ {
+ label: "单位一",
+ value: 1
+ },
+ {
+ label: "单位二",
+ value: 2
+ },
+ {
+ label: "单位三",
+ value: 3
+ },
+ {
+ label: "单位四",
+ value: 4
+ },
+ {
+ label: "单位五",
+ value: 5
+ },
+ {
+ label: "单位六",
+ value: 6
+ }
+ ],
+ otherWorkList: [
+ {
+ label: '动火作业',
+ value: 1
+ },
+ {
+ label: '受限空间作业',
+ value: 2
+ },
+ {
+ label: '吊装作业',
+ value: 3
+ },
+ {
+ label: '动土作业',
+ value: 4
+ },
+ {
+ label: '断路作业',
+ value: 5
+ },
+ {
+ label: '高处作业',
+ value: 6
+ },
+ {
+ label: '临时用电作业',
+ value: 7
+ },
+ {
+ label: '盲板抽堵作业',
+ value: 8
+ }
+ ]
+ });
+ const ruleFormRef = ref<FormInstance>()
+ const applyRules = reactive<FormRules>({
+ operatorUids: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workType: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workContent: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workLocation: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workTimeLine: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.operationDepId": [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.gbScope": [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.gbMethod": [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.otherSpecialWork": [{ required: true, message: '该内容不能为空', trigger: 'blur' }]
+ });
+ const submitForm = async (formEl: FormInstance | undefined) => {
+ if (!formEl) return
+ await formEl.validate(async (valid, fields) => {
+ if (valid) {
+ state.form.expStartTime = JSON.parse(JSON.stringify(state.form.workTimeLine))[0]
+ state.form.expEndTime = JSON.parse(JSON.stringify(state.form.workTimeLine))[1]
+ let { workTimeLine, ...data } = JSON.parse(JSON.stringify(state.form))
+ data.workDetail.otherSpecialWork = data.workDetail.otherSpecialWork.join(',')
+ console.log(data,'data')
+ const res = await workApplyApi().postGroundApply(data)
+ if (res.data.code === '200') {
+ ElMessage({
+ type: 'success',
+ message: '提交成功!'
+ });
+ formEl.resetFields()
+ } else {
+ ElMessage({
+ type: 'warning',
+ message: res.data.msg
+ });
+ }
+ } else {
+ console.log('error submit!', fields)
+ }
+ })
+ }
+ // 折线图
+ const renderMenu = async (value: string) => {
+ Session.set('projectId',value)
+ userInfos.value.projectId = value
+ await initBackEndControlRoutes();
+ };
+ return {
+ renderMenu,
+ Search,
+ ruleFormRef,
+ applyRules,
+ submitForm,
+ ...toRefs(state),
+ };
+ },
+ });
+</script>
+
+<style scoped lang="scss">
+ .home-container {
+ height: 100%;
+ overflow: hidden;
+ position: relative;
+ .homeCard{
+ width: 100%;
+ padding: 20px;
+ box-sizing: border-box;
+ background: #fff;
+ border-radius: 4px;
+ margin-bottom: 20px;
+ }
+ .applyBtn{
+ width: 100%;
+ background: #fff;
+ height: 80px;
+ z-index: 5;
+ box-shadow: 0 -3px 8px rgba(150,150,150,.1);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+ .el-row{
+ margin-bottom: 20px;
+ }
+ .el-row:last-child {
+ margin-bottom: 0;
+ }
+ .el-input{
+ width: 100% !important;
+ }
+ .el-date-editor::v-deep{
+ width: 100%;
+ }
+ .el-select{
+ width: 100%;
+ }
+ .el-cascader{
+ width: 100% !important;
+ }
+ }
+</style>
diff --git a/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/hangLoadForm.vue b/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/hangLoadForm.vue
deleted file mode 100644
index 6b36361..0000000
--- a/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/hangLoadForm.vue
+++ /dev/null
@@ -1,169 +0,0 @@
-<template>
- <div class="comp-container">
- <el-form :model="hlForm" label-width="180px" :rules="hlFormRules" ref="hlRef">
- <div class="homeCard">
- <el-row>
- <el-col :span="8">
- <el-form-item label="申请部门" prop="hlDepartment">
- <el-select v-model="hlForm.hlDepartment" placeholder="请选择部门">
- <el-option label="机修班" value="机修班" />
- <el-option label="火工班" value="火工班" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="申请人" prop="hlApplyName">
- <el-input
- v-model="hlForm.hlApplyName"
- placeholder="请输入"
- class="input-with-select"
- >
- <template #append>
- <el-button :icon="Search" />
- </template>
- </el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="8">
- <el-form-item label="作业等级" prop="hlLevel">
- <el-select v-model="hlForm.hlLevel" placeholder="请选择等级">
- <el-option label="等级一" value="等级一" />
- <el-option label="等级二" value="等级二" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="起吊重物质量" prop="hlWeight">
- <el-input
- v-model="hlForm.hlWeight"
- placeholder="请输入"
- class="input-with-select"
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="吊装工具名称" prop="hlToolsName">
- <el-input
- v-model="hlForm.hlToolsName"
- placeholder="请输入"
- class="input-with-select"
- >
- <template #append>
- <el-button :icon="Search" />
- </template>
- </el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </div>
- </el-form>
- </div>
-</template>
-
-<script lang="ts">
- import { toRefs, reactive, defineComponent, ref } from 'vue';
- import { storeToRefs } from 'pinia';
- import { initBackEndControlRoutes } from '/@/router/backEnd';
- import {useUserInfo} from "/@/stores/userInfo";
- import { Session } from '/@/utils/storage';
- import { Search } from '@element-plus/icons-vue'
- import type { FormInstance, FormRules } from 'element-plus'
- let global: any = {
- homeChartOne: null,
- homeChartTwo: null,
- homeCharThree: null,
- dispose: [null, '', undefined],
- };
-
- interface stateType {
- homeOne: Array <type>
- }
- interface type {
-
- }
- export default defineComponent({
- name: 'hangLoadForm',
- props: {
- hlForm: Object
- },
- setup(props) {
- const userInfo = useUserInfo()
- const { userInfos } = storeToRefs(userInfo);
- const state = reactive<stateType>({});
- const hlForm1 = reactive(props.hlForm)
- const hlRef = ref<FormInstance>()
- const hlFormRules = reactive<FormRules>({
- hlDepartment:[{required: true,message: '此处不可为空',trigger: 'blur'}],
- hlApplyName:[{required: true,message: '此处不可为空',trigger: 'blur'}],
- hlLevel: [{required: true,message: '此处不可为空',trigger: 'blur'}],
- hlWeight: [{required: true,message: '此处不可为空',trigger: 'blur'}],
- hlToolsName: [{required: true,message: '此处不可为空',trigger: 'blur'}]
- })
- const validateForm = async () => {
- let flag = null
- await hlRef.value.validate(valid=>{
- if(valid){
- flag = true
- }else{
- flag = false
- }
- })
- return flag
- }
- // 折线图
- const renderMenu = async (value: string) => {
- Session.set('projectId',value)
- userInfos.value.projectId = value
- await initBackEndControlRoutes();
- };
- return {
- renderMenu,
- hlForm1,
- hlFormRules,
- hlRef,
- validateForm,
- ...toRefs(state),
- };
- },
- });
-</script>
-
-<style scoped lang="scss">
- .home-container {
- height: 100%;
- overflow: hidden;
- .homeCard{
- width: 100%;
- padding: 20px;
- background: #fff;
- border-radius: 4px;
- margin-bottom: 20px;
- }
- .el-row{
- margin-bottom: 20px;
- }
- .el-row:last-child {
- margin-bottom: 0;
- }
- .el-input{
- width: 100% !important;
- }
- .el-date-editor::v-deep{
- width: 100%;
- }
- .el-select{
- width: 100%;
- }
- .el-cascader{
- width: 100% !important;
- }
- .submitBtn{
- display: flex;
- justify-content: center;
- }
- }
-</style>
diff --git a/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/height.vue b/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/height.vue
new file mode 100644
index 0000000..0521a75
--- /dev/null
+++ b/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/height.vue
@@ -0,0 +1,363 @@
+<template>
+ <div class="home-container">
+ <div style="height: 100%">
+ <el-form :model="form" label-width="150px" :rules="applyRules" ref="ruleFormRef">
+ <div class="homeCard">
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="作业人" prop="operatorUids">
+ <el-select v-model="form.operatorUids" multiple>
+ <el-option
+ v-for="item in workerList"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="作业等级" prop="workLevel">
+ <el-select v-model="form.workLevel">
+ <el-option
+ v-for="item in workLevelList"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="作业时间" prop="workTimeLine">
+ <el-date-picker
+ v-model="form.workTimeLine"
+ format="YYYY-MM-DD HH:mm"
+ value-format="YYYY-MM-DD HH:mm:00"
+ type="datetimerange"
+ range-separator="至"
+ start-placeholder="开始时间"
+ end-placeholder="结束时间"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="作业内容" prop="workContent">
+ <el-input
+ v-model="form.workContent"
+ autosize
+ type="textarea"
+ placeholder="请输入作业内容"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="作业地址" prop="workLocation">
+ <el-input
+ v-model="form.workLocation"
+ autosize
+ type="textarea"
+ placeholder="请输入作业地址"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="作业单位" prop="workDetail.operationDepId">
+ <el-select v-model="form.workDetail.operationDepId">
+ <el-option
+ v-for="item in heDepList"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="作业高度" prop="workDetail.operationHeight">
+ <el-input
+ v-model="form.workDetail.operationHeight"
+ type="number"
+ placeholder="请输入"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="关联作业" prop="workDetail.otherSpecialWork">
+ <el-select v-model="form.workDetail.otherSpecialWork" multiple>
+ <el-option
+ v-for="item in otherWorkList"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </div>
+ </el-form>
+ <div class="applyBtn">
+ <el-button type="primary" size="large" plain @click="submitForm(ruleFormRef)">发起申请</el-button>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script lang="ts">
+ import { toRefs, reactive, defineComponent, ref, defineAsyncComponent } from 'vue';
+ import { storeToRefs } from 'pinia';
+ import { initBackEndControlRoutes } from '/@/router/backEnd';
+ import {useUserInfo} from "/@/stores/userInfo";
+ import { Session } from '/@/utils/storage';
+ import { Search } from '@element-plus/icons-vue'
+ import { ElMessage } from 'element-plus'
+ import type { FormInstance, FormRules } from 'element-plus'
+ import { workApplyApi } from '/@/api/specialWorkSystem/workApply';
+
+
+ interface stateType {
+ form: Object,
+ workerList: Array<any>,
+ workTypeList: Array<any>,
+ workLevelList: Array<any>,
+ heDepList: Array<any>,
+ otherWorkList: Array<any>
+ }
+ export default defineComponent({
+ name: 'heightForm',
+ components: {},
+ setup() {
+ const userInfo = useUserInfo()
+ const { userInfos } = storeToRefs(userInfo);
+ const state = reactive<stateType>({
+ form: {
+ operatorUids: [],
+ workType: 6,
+ workLevel: null,
+ workContent: '',
+ workLocation: '',
+ workDetail:{
+ operationDepId: '',
+ operationHeight: null,
+ otherSpecialWork: []
+ },
+ workTimeLine: [],
+ expStartTime: '',
+ expEndTime: ''
+ },
+ workerList:[
+ {
+ label: "张三",
+ value: 53
+ },
+ {
+ label: "李四",
+ value: 54
+ },
+ {
+ label: "测试一",
+ value: 55
+ },
+ {
+ label: "测试二",
+ value: 56
+ }
+ ],
+ heDepList: [
+ {
+ label: "单位一",
+ value: 1
+ },
+ {
+ label: "单位二",
+ value: 2
+ },
+ {
+ label: "单位三",
+ value: 3
+ },
+ {
+ label: "单位四",
+ value: 4
+ },
+ {
+ label: "单位五",
+ value: 5
+ },
+ {
+ label: "单位六",
+ value: 6
+ }
+ ],
+ workTypeList: [
+ {
+ label: "类型一",
+ value: 1
+ },
+ {
+ label: "类型二",
+ value: 2
+ }
+ ],
+ workLevelList: [
+ {
+ label: "一级高处作业",
+ value: 4
+ },
+ {
+ label: "二级高处作业",
+ value: 5
+ },
+ {
+ label: "三级高处作业",
+ value: 6
+ },
+ {
+ label: "特级高处作业",
+ value: 7
+ }
+ ],
+ otherWorkList: [
+ {
+ label: "动火作业",
+ value: 1
+ },
+ {
+ label: "受限空间作业",
+ value: 2
+ },
+ {
+ label: "吊装作业",
+ value: 3
+ },
+ {
+ label: "动土作业",
+ value: 4
+ },
+ {
+ label: "断路作业",
+ value: 5
+ },
+ {
+ label: "高处作业",
+ value: 6
+ },
+ {
+ label: "临时用电作业",
+ value: 7
+ },
+ {
+ label: "盲板抽堵作业",
+ value: 8
+ }
+ ]
+ });
+ const ruleFormRef = ref<FormInstance>()
+ const applyRules = reactive<FormRules>({
+ operatorUids: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workType: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workLevel: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workContent: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workLocation: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workTimeLine: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.operationDepId": [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.operationHeight": [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.otherSpecialWork": [{ required: true, message: '该内容不能为空', trigger: 'blur' }]
+ });
+ const submitForm = async (formEl: FormInstance | undefined) => {
+ if (!formEl) return
+ await formEl.validate(async (valid, fields) => {
+ if (valid) {
+ state.form.expStartTime = JSON.parse(JSON.stringify(state.form.workTimeLine))[0]
+ state.form.expEndTime = JSON.parse(JSON.stringify(state.form.workTimeLine))[1]
+ let { workTimeLine, ...data } = JSON.parse(JSON.stringify(state.form))
+ data.workDetail.otherSpecialWork = data.workDetail.otherSpecialWork.join(',')
+ console.log(data,'data')
+ const res = await workApplyApi().postHeightApply(data)
+ if (res.data.code === '200') {
+ ElMessage({
+ type: 'success',
+ message: '提交成功!'
+ });
+ formEl.resetFields()
+ } else {
+ ElMessage({
+ type: 'warning',
+ message: res.data.msg
+ });
+ }
+ } else {
+ console.log('error submit!', fields)
+ }
+ })
+ }
+ // 折线图
+ const renderMenu = async (value: string) => {
+ Session.set('projectId',value)
+ userInfos.value.projectId = value
+ await initBackEndControlRoutes();
+ };
+ return {
+ renderMenu,
+ Search,
+ ruleFormRef,
+ applyRules,
+ submitForm,
+ ...toRefs(state),
+ };
+ },
+ });
+</script>
+
+<style scoped lang="scss">
+ .home-container {
+ height: 100%;
+ overflow: hidden;
+ position: relative;
+ .homeCard{
+ width: 100%;
+ padding: 20px;
+ box-sizing: border-box;
+ background: #fff;
+ border-radius: 4px;
+ margin-bottom: 20px;
+ }
+ .applyBtn{
+ width: 100%;
+ background: #fff;
+ height: 80px;
+ z-index: 5;
+ box-shadow: 0 -3px 8px rgba(150,150,150,.1);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+ .el-row{
+ margin-bottom: 20px;
+ }
+ .el-row:last-child {
+ margin-bottom: 0;
+ }
+ .el-input{
+ width: 100% !important;
+ }
+ .el-date-editor::v-deep{
+ width: 100%;
+ }
+ .el-select{
+ width: 100%;
+ }
+ .el-cascader{
+ width: 100% !important;
+ }
+ }
+</style>
diff --git a/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/highWorkForm.vue b/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/highWorkForm.vue
deleted file mode 100644
index 1ae364a..0000000
--- a/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/highWorkForm.vue
+++ /dev/null
@@ -1,153 +0,0 @@
-<template>
- <div class="comp-container">
- <el-form :model="hwForm" label-width="150px" :rules="hwRules" ref="hwRef">
- <div class="homeCard">
- <el-row>
- <el-col :span="8">
- <el-form-item label="申请部门" prop="hwDepartment">
- <el-select v-model="hwForm.hwDepartment" placeholder="请选择部门">
- <el-option label="机修班" value="机修班" />
- <el-option label="火工班" value="火工班" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="申请人" prop="hwApplyName">
- <el-input
- v-model="hwForm.hwApplyName"
- placeholder="请输入"
- class="input-with-select"
- >
- <template #append>
- <el-button :icon="Search" />
- </template>
- </el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="8">
- <el-form-item label="作业等级" prop="hwLevel">
- <el-select v-model="hwForm.hwLevel" placeholder="请选择">
- <el-option label="一" value="一" />
- <el-option label="二" value="二" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="作业高度" prop="hwHeight">
- <el-input
- v-model="hwForm.hwHeight"
- placeholder="请输入"
- class="input-with-select"
- />
- </el-form-item>
- </el-col>
- </el-row>
- </div>
- </el-form>
- </div>
-</template>
-
-<script lang="ts">
- import { toRefs, reactive, defineComponent, ref } from 'vue';
- import { storeToRefs } from 'pinia';
- import { initBackEndControlRoutes } from '/@/router/backEnd';
- import {useUserInfo} from "/@/stores/userInfo";
- import { Session } from '/@/utils/storage';
- import { Search } from '@element-plus/icons-vue'
- import type { FormInstance, FormRules } from 'element-plus'
- let global: any = {
- homeChartOne: null,
- homeChartTwo: null,
- homeCharThree: null,
- dispose: [null, '', undefined],
- };
-
- interface stateType {
- homeOne: Array <type>
- }
- interface type {
-
- }
- export default defineComponent({
- name: 'highWorkForm',
- props:{
- hwForm: Object
- },
- setup(props) {
- const userInfo = useUserInfo()
- const { userInfos } = storeToRefs(userInfo);
- const state = reactive<stateType>({});
- const hwForm1 = reactive(props.hwForm)
- const hwRef = ref<FormInstance>()
- const hwRules = reactive<FormRules>({
- hwDepartment:[{required: true,message: '此处不可为空',trigger: 'blur'}],
- hwApplyName:[{required: true,message: '此处不可为空',trigger: 'blur'}],
- hwLevel: [{required: true,message: '此处不可为空',trigger: 'blur'}],
- hwHeight: [{required: true,message: '此处不可为空',trigger: 'blur'}]
- })
- const validateForm = async () => {
- let flag = null
- await hwRef.value.validate(valid=>{
- if(valid){
- flag = true
- }else{
- flag = false
- }
- })
- return flag
- }
- // 折线图
- const renderMenu = async (value: string) => {
- Session.set('projectId',value)
- userInfos.value.projectId = value
- await initBackEndControlRoutes();
- };
- return {
- renderMenu,
- hwForm1,
- hwRef,
- hwRules,
- validateForm,
- ...toRefs(state),
- };
- },
- });
-</script>
-
-<style scoped lang="scss">
- .comp-container {
- height: 100%;
- overflow: hidden;
- .homeCard{
- width: 100%;
- padding: 20px;
- background: #fff;
- border-radius: 4px;
- margin-bottom: 20px;
- }
- .el-row{
- margin-bottom: 20px;
- }
- .el-row:last-child {
- margin-bottom: 0;
- }
- .el-input{
- width: 100% !important;
- }
- .el-date-editor::v-deep{
- width: 100%;
- }
- .el-select{
- width: 100%;
- }
- .el-cascader{
- width: 100% !important;
- }
- .submitBtn{
- display: flex;
- justify-content: center;
- }
- }
-</style>
diff --git a/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/hoist.vue b/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/hoist.vue
new file mode 100644
index 0000000..f9617a3
--- /dev/null
+++ b/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/hoist.vue
@@ -0,0 +1,267 @@
+<template>
+ <div class="home-container">
+ <div style="height: 100%">
+ <el-form :model="form" label-width="150px" :rules="applyRules" ref="ruleFormRef">
+ <div class="homeCard">
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="作业人" prop="operatorUids">
+ <el-select v-model="form.operatorUids" multiple>
+ <el-option
+ v-for="item in workerList"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="作业等级" prop="workLevel">
+ <el-select v-model="form.workLevel">
+ <el-option
+ v-for="item in workLevelList"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="作业时间" prop="workTimeLine">
+ <el-date-picker
+ v-model="form.workTimeLine"
+ format="YYYY-MM-DD HH:mm"
+ value-format="YYYY-MM-DD HH:mm:00"
+ type="datetimerange"
+ range-separator="至"
+ start-placeholder="开始时间"
+ end-placeholder="结束时间"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="作业内容" prop="workContent">
+ <el-input
+ v-model="form.workContent"
+ autosize
+ type="textarea"
+ placeholder="请输入作业内容"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="作业地址" prop="workLocation">
+ <el-input
+ v-model="form.workLocation"
+ autosize
+ type="textarea"
+ placeholder="请输入作业地址"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="吊装工具名称" prop="workDetail.hoistingToolName">
+ <el-input
+ v-model="form.workDetail.hoistingToolName"
+ autosize
+ type="textarea"
+ placeholder="请输入"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="起吊物体质量" prop="workDetail.weightMass">
+ <el-input
+ v-model="form.workDetail.weightMass"
+ type="number"
+ placeholder="请输入"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </div>
+ </el-form>
+ <div class="applyBtn">
+ <el-button type="primary" size="large" plain @click="submitForm(ruleFormRef)">发起申请</el-button>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script lang="ts">
+ import { toRefs, reactive, defineComponent, ref, defineAsyncComponent } from 'vue';
+ import { storeToRefs } from 'pinia';
+ import { initBackEndControlRoutes } from '/@/router/backEnd';
+ import {useUserInfo} from "/@/stores/userInfo";
+ import { Session } from '/@/utils/storage';
+ import { Search } from '@element-plus/icons-vue'
+ import { ElMessage } from 'element-plus'
+ import type { FormInstance, FormRules } from 'element-plus'
+ import { workApplyApi } from '/@/api/specialWorkSystem/workApply';
+
+
+ interface stateType {
+ form: Object,
+ workerList: Array<any>,
+ workLevelList: Array<any>
+ }
+ export default defineComponent({
+ name: 'hoistForm',
+ components: {},
+ setup() {
+ const userInfo = useUserInfo()
+ const { userInfos } = storeToRefs(userInfo);
+ const state = reactive<stateType>({
+ form: {
+ operatorUids: [],
+ workType: 3,
+ workLevel: null,
+ workContent: '',
+ workLocation: '',
+ workDetail:{
+ hoistingToolName: '',
+ weightMass: null
+ },
+ workTimeLine: [],
+ expStartTime: '',
+ expEndTime: ''
+ },
+ workerList:[
+ {
+ label: "张三",
+ value: 53
+ },
+ {
+ label: "李四",
+ value: 54
+ },
+ {
+ label: "测试一",
+ value: 55
+ },
+ {
+ label: "测试二",
+ value: 56
+ }
+ ],
+ workLevelList: [
+ {
+ label: "一级吊装作业",
+ value: 8
+ },
+ {
+ label: "二级吊装作业",
+ value: 9
+ },
+ {
+ label: "三级吊装作业",
+ value: 10
+ }
+ ]
+ });
+ const ruleFormRef = ref<FormInstance>()
+ const applyRules = reactive<FormRules>({
+ operatorUids: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workType: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workLevel: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workContent: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workLocation: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workTimeLine: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.hoistingToolName": [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.weightMass": [{ required: true, message: '该内容不能为空', trigger: 'blur' }]
+ });
+ const submitForm = async (formEl: FormInstance | undefined) => {
+ if (!formEl) return
+ await formEl.validate(async (valid, fields) => {
+ if (valid) {
+ state.form.expStartTime = JSON.parse(JSON.stringify(state.form.workTimeLine))[0]
+ state.form.expEndTime = JSON.parse(JSON.stringify(state.form.workTimeLine))[1]
+ let { workTimeLine, ...data } = JSON.parse(JSON.stringify(state.form))
+ data.workDetail.weightMass = Number(data.workDetail.weightMass)
+ const res = await workApplyApi().postHoistApply(data)
+ if (res.data.code === '200') {
+ ElMessage({
+ type: 'success',
+ message: '提交成功!'
+ });
+ formEl.resetFields()
+ } else {
+ ElMessage({
+ type: 'warning',
+ message: res.data.msg
+ });
+ }
+ } else {
+ console.log('error submit!', fields)
+ }
+ })
+ }
+ // 折线图
+ const renderMenu = async (value: string) => {
+ Session.set('projectId',value)
+ userInfos.value.projectId = value
+ await initBackEndControlRoutes();
+ };
+ return {
+ renderMenu,
+ Search,
+ ruleFormRef,
+ applyRules,
+ submitForm,
+ ...toRefs(state),
+ };
+ },
+ });
+</script>
+
+<style scoped lang="scss">
+ .home-container {
+ height: 100%;
+ overflow: hidden;
+ position: relative;
+ .homeCard{
+ width: 100%;
+ padding: 20px;
+ box-sizing: border-box;
+ background: #fff;
+ border-radius: 4px;
+ margin-bottom: 20px;
+ }
+ .applyBtn{
+ width: 100%;
+ background: #fff;
+ height: 80px;
+ z-index: 5;
+ box-shadow: 0 -3px 8px rgba(150,150,150,.1);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+ .el-row{
+ margin-bottom: 20px;
+ }
+ .el-row:last-child {
+ margin-bottom: 0;
+ }
+ .el-input{
+ width: 100% !important;
+ }
+ .el-date-editor::v-deep{
+ width: 100%;
+ }
+ .el-select{
+ width: 100%;
+ }
+ .el-cascader{
+ width: 100% !important;
+ }
+ }
+</style>
diff --git a/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/limitedSpaceForm.vue b/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/limitedSpaceForm.vue
deleted file mode 100644
index bd92649..0000000
--- a/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/limitedSpaceForm.vue
+++ /dev/null
@@ -1,175 +0,0 @@
-<template>
- <div class="comp-container">
- <el-form :model="lsForm" label-width="180px" :rules="lsFormRules" ref="lsRef">
- <div class="homeCard">
- <el-row>
- <el-col :span="8">
- <el-form-item label="申请部门" prop="lsDepartment">
- <el-select v-model="lsForm.lsDepartment" placeholder="请选择部门">
- <el-option label="机修班" value="机修班" />
- <el-option label="火工班" value="火工班" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="申请人" prop="lsApplyName">
- <el-input
- v-model="lsForm.lsApplyName"
- placeholder="请输入"
- class="input-with-select"
- >
- <template #append>
- <el-button :icon="Search" />
- </template>
- </el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="受限空间名称" prop="lsUnitName">
- <el-input
- v-model="lsForm.lsUnitName"
- placeholder="请输入"
- class="input-with-select"
- >
- <template #append>
- <el-button :icon="Search" />
- </template>
- </el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="受限空间所属单位" prop="lsUnit">
- <el-select v-model="lsForm.lsUnit" placeholder="请选择">
- <el-option label="一" value="一" />
- <el-option label="二" value="二" />
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="受限空间内原有介质名称" prop="lsUnitName">
- <el-input
- v-model="lsForm.lsUnitMatterName"
- placeholder="请输入"
- class="input-with-select"
- >
- <template #append>
- <el-button :icon="Search" />
- </template>
- </el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </div>
- </el-form>
- </div>
-</template>
-
-<script lang="ts">
- import { toRefs, reactive, defineComponent, ref } from 'vue';
- import { storeToRefs } from 'pinia';
- import { initBackEndControlRoutes } from '/@/router/backEnd';
- import {useUserInfo} from "/@/stores/userInfo";
- import { Session } from '/@/utils/storage';
- import { Search } from '@element-plus/icons-vue'
- import type { FormInstance, FormRules } from 'element-plus'
- let global: any = {
- homeChartOne: null,
- homeChartTwo: null,
- homeCharThree: null,
- dispose: [null, '', undefined],
- };
-
- interface stateType {
- homeOne: Array <type>
- }
- interface type {
-
- }
- export default defineComponent({
- name: 'limitedSpaceForm',
- props: {
- lsForm: Object
- },
- setup(props) {
- const userInfo = useUserInfo()
- const { userInfos } = storeToRefs(userInfo);
- const state = reactive<stateType>({});
- const lsForm1 = reactive(props.lsForm)
- const lsRef = ref<FormInstance>()
- const lsFormRules = reactive<FormRules>({
- lsDepartment:[{required: true,message: '此处不可为空',trigger: 'blur'}],
- lsApplyName:[{required: true,message: '此处不可为空',trigger: 'blur'}],
- lsUnitName: [{required: true,message: '此处不可为空',trigger: 'blur'}],
- lsUnit: [{required: true,message: '此处不可为空',trigger: 'blur'}],
- lsUnitMatterName: [{required: true,message: '此处不可为空',trigger: 'blur'}]
- })
- const validateForm = async () => {
- let flag = null
- await lsRef.value.validate(valid=>{
- if(valid){
- flag = true
- }else{
- flag = false
- }
- })
- return flag
- }
- // 折线图
- const renderMenu = async (value: string) => {
- Session.set('projectId',value)
- userInfos.value.projectId = value
- await initBackEndControlRoutes();
- };
- return {
- renderMenu,
- lsForm1,
- lsFormRules,
- lsRef,
- validateForm,
- ...toRefs(state),
- };
- },
- });
-</script>
-
-<style scoped lang="scss">
- .home-container {
- height: 100%;
- overflow: hidden;
- .homeCard{
- width: 100%;
- padding: 20px;
- background: #fff;
- border-radius: 4px;
- margin-bottom: 20px;
- }
- .el-row{
- margin-bottom: 20px;
- }
- .el-row:last-child {
- margin-bottom: 0;
- }
- .el-input{
- width: 100% !important;
- }
- .el-date-editor::v-deep{
- width: 100%;
- }
- .el-select{
- width: 100%;
- }
- .el-cascader{
- width: 100% !important;
- }
- .submitBtn{
- display: flex;
- justify-content: center;
- }
- }
-</style>
diff --git a/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/plate.vue b/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/plate.vue
new file mode 100644
index 0000000..c5833fd
--- /dev/null
+++ b/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/plate.vue
@@ -0,0 +1,432 @@
+<template>
+ <div class="home-container">
+ <div style="height: 100%">
+ <el-form :model="form" label-width="150px" :rules="applyRules" ref="ruleFormRef">
+ <div class="homeCard">
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="作业人" prop="operatorUids">
+ <el-select v-model="form.operatorUids" multiple>
+ <el-option
+ v-for="item in workerList"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="作业等级" prop="workLevel">
+ <el-select v-model="form.workLevel">
+ <el-option
+ v-for="item in workLevelList"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="作业时间" prop="workTimeLine">
+ <el-date-picker
+ v-model="form.workTimeLine"
+ format="YYYY-MM-DD HH:mm"
+ value-format="YYYY-MM-DD HH:mm:00"
+ type="datetimerange"
+ range-separator="至"
+ start-placeholder="开始时间"
+ end-placeholder="结束时间"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="作业内容" prop="workContent">
+ <el-input
+ v-model="form.workContent"
+ autosize
+ type="textarea"
+ placeholder="请输入作业内容"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="作业地址" prop="workLocation">
+ <el-input
+ v-model="form.workLocation"
+ autosize
+ type="textarea"
+ placeholder="请输入作业地址"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="盲板编号" prop="workDetail.bpCode">
+ <el-input
+ v-model="form.workDetail.bpCode"
+ autosize
+ type="textarea"
+ placeholder="请输入"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="主要介质" prop="workDetail.mainMedia">
+ <el-input
+ v-model="form.workDetail.mainMedia"
+ autosize
+ type="textarea"
+ placeholder="请输入"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="温度" prop="workDetail.temperature">
+ <el-input
+ v-model="form.workDetail.temperature"
+ type="number"
+ placeholder="请输入"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="压力" prop="workDetail.pressure">
+ <el-input
+ v-model="form.workDetail.pressure"
+ type="number"
+ placeholder="请输入"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="盲板材质" prop="workDetail.bpMaterialQuality">
+ <el-input
+ v-model="form.workDetail.bpMaterialQuality"
+ autosize
+ type="textarea"
+ placeholder="请输入"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="盲板规格" prop="workDetail.bpSpecification">
+ <el-input
+ v-model="form.workDetail.bpSpecification"
+ autosize
+ type="textarea"
+ placeholder="请输入"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="盲板时间" prop="workDetail.installLine">
+ <el-date-picker
+ v-model="form.workDetail.installLine"
+ format="YYYY-MM-DD HH:mm"
+ value-format="YYYY-MM-DD HH:mm:00"
+ type="datetimerange"
+ range-separator="--"
+ start-placeholder="装盲板时间"
+ end-placeholder="拆盲板时间"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="盲板位置" prop="workDetail.bpLocation">
+ <el-input
+ v-model="form.workDetail.bpLocation"
+ autosize
+ type="textarea"
+ placeholder="请输入"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="关联作业" prop="workDetail.otherSpecialWork">
+ <el-select v-model="form.workDetail.otherSpecialWork" multiple>
+ <el-option
+ v-for="item in otherWorkList"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </div>
+ </el-form>
+ <div class="applyBtn">
+ <el-button type="primary" size="large" plain @click="submitForm(ruleFormRef)">发起申请</el-button>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script lang="ts">
+ import { toRefs, reactive, defineComponent, ref, defineAsyncComponent } from 'vue';
+ import { storeToRefs } from 'pinia';
+ import { initBackEndControlRoutes } from '/@/router/backEnd';
+ import {useUserInfo} from "/@/stores/userInfo";
+ import { Session } from '/@/utils/storage';
+ import { Search } from '@element-plus/icons-vue'
+ import { ElMessage } from 'element-plus'
+ import type { FormInstance, FormRules } from 'element-plus'
+ import { workApplyApi } from '/@/api/specialWorkSystem/workApply';
+
+
+ interface stateType {
+ form: Object,
+ workerList: Array<any>,
+ csDepList: Array<any>,
+ otherWorkList: Array<any>,
+ workLevelList: Array<any>
+ }
+ export default defineComponent({
+ name: 'brokenForm',
+ components: {},
+ setup() {
+ const userInfo = useUserInfo()
+ const { userInfos } = storeToRefs(userInfo);
+ const state = reactive<stateType>({
+ form: {
+ operatorUids: [],
+ workType: 8,
+ workLevel: null,
+ workContent: '',
+ workLocation: '',
+ workDetail:{
+ bpCode: '',
+ mainMedia: '',
+ temperature: null,
+ pressure: null,
+ bpMaterialQuality: '',
+ bpSpecification: '',
+ bpLocation: '',
+ bpLocationMapPath: '',
+ installLine: [],
+ installBpTime: '',
+ uninstallBpTime: '',
+ otherSpecialWork: []
+ },
+ workTimeLine: [],
+ expStartTime: '',
+ expEndTime: ''
+ },
+ workerList:[
+ {
+ label: "张三",
+ value: 53
+ },
+ {
+ label: "李四",
+ value: 54
+ },
+ {
+ label: "测试一",
+ value: 55
+ },
+ {
+ label: "测试二",
+ value: 56
+ }
+ ],
+ workLevelList: [
+ {
+ label: "抽盲板作业",
+ value: 11
+ },
+ {
+ label: "堵盲板作业",
+ value: 12
+ }
+ ],
+ csDepList: [
+ {
+ label: "单位一",
+ value: 1
+ },
+ {
+ label: "单位二",
+ value: 2
+ },
+ {
+ label: "单位三",
+ value: 3
+ },
+ {
+ label: "单位四",
+ value: 4
+ },
+ {
+ label: "单位五",
+ value: 5
+ },
+ {
+ label: "单位六",
+ value: 6
+ }
+ ],
+ otherWorkList: [
+ {
+ label: "动火作业",
+ value: 1
+ },
+ {
+ label: "受限空间作业",
+ value: 2
+ },
+ {
+ label: "吊装作业",
+ value: 3
+ },
+ {
+ label: "动土作业",
+ value: 4
+ },
+ {
+ label: "断路作业",
+ value: 5
+ },
+ {
+ label: "高处作业",
+ value: 6
+ },
+ {
+ label: "临时用电作业",
+ value: 7
+ },
+ {
+ label: "盲板抽堵作业",
+ value: 8
+ }
+ ]
+ });
+ const ruleFormRef = ref<FormInstance>()
+ const applyRules = reactive<FormRules>({
+ operatorUids: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workType: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workLevel: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workContent: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workLocation: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workTimeLine: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.bpCode": [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.mainMedia": [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.temperature": [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.pressure": [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.bpMaterialQuality": [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.bpSpecification": [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.installLine": [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.bpLocation": [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ });
+ const submitForm = async (formEl: FormInstance | undefined) => {
+ if (!formEl) return
+ await formEl.validate(async (valid, fields) => {
+ if (valid) {
+ state.form.expStartTime = JSON.parse(JSON.stringify(state.form.workTimeLine))[0]
+ state.form.expEndTime = JSON.parse(JSON.stringify(state.form.workTimeLine))[1]
+ state.form.workDetail.installBpTime = JSON.parse(JSON.stringify(state.form.workDetail.installLine))[0]
+ state.form.workDetail.uninstallBpTime = JSON.parse(JSON.stringify(state.form.workDetail.installLine))[1]
+ let { workTimeLine, ...data } = JSON.parse(JSON.stringify(state.form))
+ let { installLine, ...data2 } = JSON.parse(JSON.stringify(state.form.workDetail))
+ data.workDetail = data2
+ data.workDetail.otherSpecialWork = data.workDetail.otherSpecialWork.join(',')
+ data.workDetail.temperature = Number(data.workDetail.temperature)
+ data.workDetail.pressure = Number(data.workDetail.pressure)
+ console.log(data,'data')
+ const res = await workApplyApi().postPlateApply(data)
+ if (res.data.code === '200') {
+ ElMessage({
+ type: 'success',
+ message: '提交成功!'
+ });
+ formEl.resetFields()
+ } else {
+ ElMessage({
+ type: 'warning',
+ message: res.data.msg
+ });
+ }
+ } else {
+ console.log('error submit!', fields)
+ }
+ })
+ }
+ // 折线图
+ const renderMenu = async (value: string) => {
+ Session.set('projectId',value)
+ userInfos.value.projectId = value
+ await initBackEndControlRoutes();
+ };
+ return {
+ renderMenu,
+ Search,
+ ruleFormRef,
+ applyRules,
+ submitForm,
+ ...toRefs(state),
+ };
+ },
+ });
+</script>
+
+<style scoped lang="scss">
+ .home-container {
+ height: 100%;
+ overflow: hidden;
+ position: relative;
+ .homeCard{
+ width: 100%;
+ padding: 20px;
+ box-sizing: border-box;
+ background: #fff;
+ border-radius: 4px;
+ margin-bottom: 20px;
+ }
+ .applyBtn{
+ width: 100%;
+ background: #fff;
+ height: 80px;
+ z-index: 5;
+ box-shadow: 0 -3px 8px rgba(150,150,150,.1);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+ .el-row{
+ margin-bottom: 20px;
+ }
+ .el-row:last-child {
+ margin-bottom: 0;
+ }
+ .el-input{
+ width: 100% !important;
+ }
+ .el-date-editor::v-deep{
+ width: 100%;
+ }
+ .el-select{
+ width: 100%;
+ }
+ .el-cascader{
+ width: 100% !important;
+ }
+ }
+</style>
diff --git a/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/power.vue b/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/power.vue
new file mode 100644
index 0000000..633a0eb
--- /dev/null
+++ b/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/power.vue
@@ -0,0 +1,271 @@
+<template>
+ <div class="home-container">
+ <div style="height: 100%">
+ <el-form :model="form" label-width="150px" :rules="applyRules" ref="ruleFormRef">
+ <div class="homeCard">
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="作业人" prop="operatorUids">
+ <el-select v-model="form.operatorUids" multiple>
+ <el-option
+ v-for="item in workerList"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="作业时间" prop="workTimeLine">
+ <el-date-picker
+ v-model="form.workTimeLine"
+ format="YYYY-MM-DD HH:mm"
+ value-format="YYYY-MM-DD HH:mm:00"
+ type="datetimerange"
+ range-separator="至"
+ start-placeholder="开始时间"
+ end-placeholder="结束时间"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="作业内容" prop="workContent">
+ <el-input
+ v-model="form.workContent"
+ autosize
+ type="textarea"
+ placeholder="请输入作业内容"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="作业地址" prop="workLocation">
+ <el-input
+ v-model="form.workLocation"
+ autosize
+ type="textarea"
+ placeholder="请输入作业地址"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="电源接入点" prop="workDetail.powerAccessPoint">
+ <el-input
+ v-model="form.workDetail.powerAccessPoint"
+ autosize
+ type="textarea"
+ placeholder="请输入"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="工作电压" prop="workDetail.workingVoltage">
+ <el-input
+ v-model="form.workDetail.workingVoltage"
+ type="number"
+ placeholder="请输入"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="用电设备及功率" prop="workDetail.equipmentAndPower">
+ <el-input
+ v-model="form.workDetail.equipmentAndPower"
+ autosize
+ type="textarea"
+ placeholder="请输入"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </div>
+ </el-form>
+ <div class="applyBtn">
+ <el-button type="primary" size="large" plain @click="submitForm(ruleFormRef)">发起申请</el-button>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script lang="ts">
+ import { toRefs, reactive, defineComponent, ref, defineAsyncComponent } from 'vue';
+ import { storeToRefs } from 'pinia';
+ import { initBackEndControlRoutes } from '/@/router/backEnd';
+ import {useUserInfo} from "/@/stores/userInfo";
+ import { Session } from '/@/utils/storage';
+ import { Search } from '@element-plus/icons-vue'
+ import { ElMessage } from 'element-plus'
+ import type { FormInstance, FormRules } from 'element-plus'
+ import { workApplyApi } from '/@/api/specialWorkSystem/workApply';
+
+
+ interface stateType {
+ form: Object,
+ workerList: Array<any>,
+ workLevelList: Array<any>
+ }
+ export default defineComponent({
+ name: 'hoistForm',
+ components: {},
+ setup() {
+ const userInfo = useUserInfo()
+ const { userInfos } = storeToRefs(userInfo);
+ const state = reactive<stateType>({
+ form: {
+ operatorUids: [],
+ workType: 7,
+ workLevel: 0,
+ workContent: '',
+ workLocation: '',
+ workDetail:{
+ powerAccessPoint: '',
+ workingVoltage: null,
+ equipmentAndPower: ''
+ },
+ workTimeLine: [],
+ expStartTime: '',
+ expEndTime: ''
+ },
+ workerList:[
+ {
+ label: "张三",
+ value: 53
+ },
+ {
+ label: "李四",
+ value: 54
+ },
+ {
+ label: "测试一",
+ value: 55
+ },
+ {
+ label: "测试二",
+ value: 56
+ }
+ ],
+ workLevelList: [
+ {
+ label: "一级吊装作业",
+ value: 8
+ },
+ {
+ label: "二级吊装作业",
+ value: 9
+ },
+ {
+ label: "三级吊装作业",
+ value: 10
+ }
+ ]
+ });
+ const ruleFormRef = ref<FormInstance>()
+ const applyRules = reactive<FormRules>({
+ operatorUids: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workType: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workLevel: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workContent: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workLocation: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workTimeLine: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.powerAccessPoint": [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.workingVoltage": [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.equipmentAndPower": [{ required: true, message: '该内容不能为空', trigger: 'blur' }]
+ });
+ const submitForm = async (formEl: FormInstance | undefined) => {
+ if (!formEl) return
+ await formEl.validate(async (valid, fields) => {
+ if (valid) {
+ state.form.expStartTime = JSON.parse(JSON.stringify(state.form.workTimeLine))[0]
+ state.form.expEndTime = JSON.parse(JSON.stringify(state.form.workTimeLine))[1]
+ let { workTimeLine, ...data } = JSON.parse(JSON.stringify(state.form))
+ // data.workDetail.weightMass = Number(data.workDetail.weightMass)
+ const res = await workApplyApi().postPowerApply(data)
+ if (res.data.code === '200') {
+ ElMessage({
+ type: 'success',
+ message: '提交成功!'
+ });
+ formEl.resetFields()
+ } else {
+ ElMessage({
+ type: 'warning',
+ message: res.data.msg
+ });
+ }
+ } else {
+ console.log('error submit!', fields)
+ }
+ })
+ }
+ // 折线图
+ const renderMenu = async (value: string) => {
+ Session.set('projectId',value)
+ userInfos.value.projectId = value
+ await initBackEndControlRoutes();
+ };
+ return {
+ renderMenu,
+ Search,
+ ruleFormRef,
+ applyRules,
+ submitForm,
+ ...toRefs(state),
+ };
+ },
+ });
+</script>
+
+<style scoped lang="scss">
+ .home-container {
+ height: 100%;
+ overflow: hidden;
+ position: relative;
+ .homeCard{
+ width: 100%;
+ padding: 20px;
+ box-sizing: border-box;
+ background: #fff;
+ border-radius: 4px;
+ margin-bottom: 20px;
+ }
+ .applyBtn{
+ width: 100%;
+ background: #fff;
+ height: 80px;
+ z-index: 5;
+ box-shadow: 0 -3px 8px rgba(150,150,150,.1);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+ .el-row{
+ margin-bottom: 20px;
+ }
+ .el-row:last-child {
+ margin-bottom: 0;
+ }
+ .el-input{
+ width: 100% !important;
+ }
+ .el-date-editor::v-deep{
+ width: 100%;
+ }
+ .el-select{
+ width: 100%;
+ }
+ .el-cascader{
+ width: 100% !important;
+ }
+ }
+</style>
diff --git a/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/space.vue b/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/space.vue
new file mode 100644
index 0000000..8e578ef
--- /dev/null
+++ b/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/space.vue
@@ -0,0 +1,328 @@
+<template>
+ <div class="home-container">
+ <div style="height: 100%">
+ <el-form :model="form" label-width="150px" :rules="applyRules" ref="ruleFormRef">
+ <div class="homeCard">
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="作业人" prop="operatorUids">
+ <el-select v-model="form.operatorUids" multiple>
+ <el-option
+ v-for="item in workerList"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="作业时间" prop="workTimeLine">
+ <el-date-picker
+ v-model="form.workTimeLine"
+ format="YYYY-MM-DD HH:mm"
+ value-format="YYYY-MM-DD HH:mm:00"
+ type="datetimerange"
+ range-separator="至"
+ start-placeholder="开始时间"
+ end-placeholder="结束时间"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="作业内容" prop="workContent">
+ <el-input
+ v-model="form.workContent"
+ autosize
+ type="textarea"
+ placeholder="请输入作业内容"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="作业地址" prop="workLocation">
+ <el-input
+ v-model="form.workLocation"
+ autosize
+ type="textarea"
+ placeholder="请输入作业地址"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="受限空间所属单位" prop="workDetail.csDepId">
+ <el-select v-model="form.workDetail.csDepId">
+ <el-option
+ v-for="item in csDepList"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="受限空间名称" prop="workDetail.csName">
+ <el-input
+ v-model="form.workDetail.csName"
+ autosize
+ type="textarea"
+ placeholder="请输入"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="空间内原有介质" prop="workDetail.csOriginalName">
+ <el-input
+ v-model="form.workDetail.csOriginalName"
+ autosize
+ type="textarea"
+ placeholder="请输入"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="关联作业" prop="workDetail.otherSpecialWork">
+ <el-select v-model="form.workDetail.otherSpecialWork" multiple>
+ <el-option v-for="item in otherWorkList" :key="item.value" :label="item.label" :value="item.value" />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </div>
+ </el-form>
+ <div class="applyBtn">
+ <el-button type="primary" size="large" plain @click="submitForm(ruleFormRef)">发起申请</el-button>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script lang="ts">
+ import { toRefs, reactive, defineComponent, ref, defineAsyncComponent } from 'vue';
+ import { storeToRefs } from 'pinia';
+ import { initBackEndControlRoutes } from '/@/router/backEnd';
+ import {useUserInfo} from "/@/stores/userInfo";
+ import { Session } from '/@/utils/storage';
+ import { Search } from '@element-plus/icons-vue'
+ import { ElMessage } from 'element-plus'
+ import type { FormInstance, FormRules } from 'element-plus'
+ import { workApplyApi } from '/@/api/specialWorkSystem/workApply';
+
+
+ interface stateType {
+ form: Object,
+ workerList: Array<any>,
+ csDepList: Array<any>,
+ otherWorkList: Array<any>
+ }
+ export default defineComponent({
+ name: 'spaceForm',
+ components: {},
+ setup() {
+ const userInfo = useUserInfo()
+ const { userInfos } = storeToRefs(userInfo);
+ const state = reactive<stateType>({
+ form: {
+ operatorUids: [],
+ workType: 2,
+ workLevel: 0,
+ workContent: '',
+ workLocation: '',
+ workDetail:{
+ csDepId: null,
+ csName: '',
+ csOriginalName: '',
+ otherSpecialWork: []
+ },
+ workTimeLine: [],
+ expStartTime: '',
+ expEndTime: ''
+ },
+ workerList:[
+ {
+ label: "张三",
+ value: 53
+ },
+ {
+ label: "李四",
+ value: 54
+ },
+ {
+ label: "测试一",
+ value: 55
+ },
+ {
+ label: "测试二",
+ value: 56
+ }
+ ],
+ csDepList: [
+ {
+ label: "单位一",
+ value: 1
+ },
+ {
+ label: "单位二",
+ value: 2
+ },
+ {
+ label: "单位三",
+ value: 3
+ },
+ {
+ label: "单位四",
+ value: 4
+ },
+ {
+ label: "单位五",
+ value: 5
+ },
+ {
+ label: "单位六",
+ value: 6
+ }
+ ],
+ otherWorkList: [
+ {
+ label: '动火作业',
+ value: 1
+ },
+ {
+ label: '受限空间作业',
+ value: 2
+ },
+ {
+ label: '吊装作业',
+ value: 3
+ },
+ {
+ label: '动土作业',
+ value: 4
+ },
+ {
+ label: '断路作业',
+ value: 5
+ },
+ {
+ label: '高处作业',
+ value: 6
+ },
+ {
+ label: '临时用电作业',
+ value: 7
+ },
+ {
+ label: '盲板抽堵作业',
+ value: 8
+ }
+ ]
+ });
+ const ruleFormRef = ref<FormInstance>()
+ const applyRules = reactive<FormRules>({
+ operatorUids: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workType: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workContent: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workLocation: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ workTimeLine: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.csDepId": [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.csName": [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.csOriginalName": [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ "workDetail.otherSpecialWork": [{ required: true, message: '该内容不能为空', trigger: 'blur' }]
+ });
+ const submitForm = async (formEl: FormInstance | undefined) => {
+ if (!formEl) return
+ await formEl.validate(async (valid, fields) => {
+ if (valid) {
+ state.form.expStartTime = JSON.parse(JSON.stringify(state.form.workTimeLine))[0]
+ state.form.expEndTime = JSON.parse(JSON.stringify(state.form.workTimeLine))[1]
+ let { workTimeLine, ...data } = JSON.parse(JSON.stringify(state.form))
+ data.workDetail.otherSpecialWork = data.workDetail.otherSpecialWork.join(',')
+ console.log(data,'data')
+ const res = await workApplyApi().postSpaceApply(data)
+ if (res.data.code === '200') {
+ ElMessage({
+ type: 'success',
+ message: '提交成功!'
+ });
+ formEl.resetFields()
+ } else {
+ ElMessage({
+ type: 'warning',
+ message: res.data.msg
+ });
+ }
+ } else {
+ console.log('error submit!', fields)
+ }
+ })
+ }
+ // 折线图
+ const renderMenu = async (value: string) => {
+ Session.set('projectId',value)
+ userInfos.value.projectId = value
+ await initBackEndControlRoutes();
+ };
+ return {
+ renderMenu,
+ Search,
+ ruleFormRef,
+ applyRules,
+ submitForm,
+ ...toRefs(state),
+ };
+ },
+ });
+</script>
+
+<style scoped lang="scss">
+ .home-container {
+ height: 100%;
+ overflow: hidden;
+ position: relative;
+ .homeCard{
+ width: 100%;
+ padding: 20px;
+ box-sizing: border-box;
+ background: #fff;
+ border-radius: 4px;
+ margin-bottom: 20px;
+ }
+ .applyBtn{
+ width: 100%;
+ background: #fff;
+ height: 80px;
+ z-index: 5;
+ box-shadow: 0 -3px 8px rgba(150,150,150,.1);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+ .el-row{
+ margin-bottom: 20px;
+ }
+ .el-row:last-child {
+ margin-bottom: 0;
+ }
+ .el-input{
+ width: 100% !important;
+ }
+ .el-date-editor::v-deep{
+ width: 100%;
+ }
+ .el-select{
+ width: 100%;
+ }
+ .el-cascader{
+ width: 100% !important;
+ }
+ }
+</style>
diff --git a/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/tempElectForm.vue b/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/tempElectForm.vue
deleted file mode 100644
index cc21d11..0000000
--- a/src/views/specialWorkSystem/workApplyManage/workApplyForm/components/tempElectForm.vue
+++ /dev/null
@@ -1,153 +0,0 @@
-<template>
- <div class="comp-container">
- <el-form :model="teForm" label-width="150px" :rules="teRules" ref="teRef">
- <div class="homeCard">
- <el-row>
- <el-col :span="8">
- <el-form-item label="申请部门" prop="teDepartment">
- <el-select v-model="teForm.teDepartment" placeholder="请选择部门">
- <el-option label="机修班" value="机修班" />
- <el-option label="火工班" value="火工班" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="申请人" prop="teApplyName">
- <el-input
- v-model="teForm.teApplyName"
- placeholder="请输入"
- class="input-with-select"
- >
- <template #append>
- <el-button :icon="Search" />
- </template>
- </el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="8">
- <el-form-item label="作业等级" prop="teLevel">
- <el-select v-model="teForm.teLevel" placeholder="请选择等级">
- <el-option label="等级一" value="等级一" />
- <el-option label="等级二" value="等级二" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="作业高度" prop="teHeight">
- <el-input
- v-model="teForm.teHeight"
- placeholder="请输入"
- class="input-with-select"
- />
- </el-form-item>
- </el-col>
- </el-row>
- </div>
- </el-form>
- </div>
-</template>
-
-<script lang="ts">
- import { toRefs, reactive, defineComponent, ref } from 'vue';
- import { storeToRefs } from 'pinia';
- import { initBackEndControlRoutes } from '/@/router/backEnd';
- import {useUserInfo} from "/@/stores/userInfo";
- import { Session } from '/@/utils/storage';
- import { Search } from '@element-plus/icons-vue'
- import type { FormInstance, FormRules } from 'element-plus'
- let global: any = {
- homeChartOne: null,
- homeChartTwo: null,
- homeCharThree: null,
- dispose: [null, '', undefined],
- };
-
- interface stateType {
- homeOne: Array <type>
- }
- interface type {
-
- }
- export default defineComponent({
- name: 'tempElectForm',
- props: {
- teForm: Object
- },
- setup(props) {
- const userInfo = useUserInfo()
- const { userInfos } = storeToRefs(userInfo);
- const state = reactive<stateType>({});
- const teForm1 = reactive(props.teForm)
- const teRef = ref<FormInstance>()
- const teRules = reactive<FormRules>({
- teDepartment:[{required: true,message: '此处不可为空',trigger: 'blur'}],
- teApplyName:[{required: true,message: '此处不可为空',trigger: 'blur'}],
- teLevel: [{required: true,message: '此处不可为空',trigger: 'blur'}],
- teHeight: [{required: true,message: '此处不可为空',trigger: 'blur'}]
- })
- const validateForm = async () => {
- let flag = null
- await teRef.value.validate(valid=>{
- if(valid){
- flag = true
- }else{
- flag = false
- }
- })
- return flag
- }
- // 折线图
- const renderMenu = async (value: string) => {
- Session.set('projectId',value)
- userInfos.value.projectId = value
- await initBackEndControlRoutes();
- };
- return {
- renderMenu,
- teForm1,
- teRef,
- teRules,
- validateForm,
- ...toRefs(state),
- };
- },
- });
-</script>
-
-<style scoped lang="scss">
- .comp-container {
- height: 100%;
- overflow: hidden;
- .homeCard{
- width: 100%;
- padding: 20px;
- background: #fff;
- border-radius: 4px;
- margin-bottom: 20px;
- }
- .el-row{
- margin-bottom: 20px;
- }
- .el-row:last-child {
- margin-bottom: 0;
- }
- .el-input{
- width: 100% !important;
- }
- .el-date-editor::v-deep{
- width: 100%;
- }
- .el-select{
- width: 100%;
- }
- .el-cascader{
- width: 100% !important;
- }
- .submitBtn{
- display: flex;
- justify-content: center;
- }
- }
-</style>
diff --git a/src/views/specialWorkSystem/workApplyManage/workApplyForm/index.vue b/src/views/specialWorkSystem/workApplyManage/workApplyForm/index.vue
index f73f27d..aad84f8 100644
--- a/src/views/specialWorkSystem/workApplyManage/workApplyForm/index.vue
+++ b/src/views/specialWorkSystem/workApplyManage/workApplyForm/index.vue
@@ -1,343 +1,31 @@
<template>
<div class="home-container">
- <div style="height: 100%">
- <el-form :model="form" label-width="150px" :rules="applyRules" ref="ruleFormRef2">
-<!-- <blind-panel-form :bpForm="form.addForm" ref="additionalForm"></blind-panel-form>-->
-<!-- <cut-line-form :clForm="form.addForm" ref="additionalForm"></cut-line-form>-->
-<!-- <dirt-work-form :dwForm="form.addForm" ref="additionalForm"></dirt-work-form>-->
- <fire-work-form :fwForm="form.addForm" ref="additionalForm"></fire-work-form>
-<!-- <hang-load-form :hlForm="form.addForm" ref="additionalForm"></hang-load-form>-->
-<!-- <high-work-form :hwForm="form.addForm" ref="additionalForm"></high-work-form>-->
-<!-- <limited-space-form :lsForm="form.addForm" ref="additionalForm"></limited-space-form>-->
-<!-- <temp-elect-form :teForm="form.addForm" ref="additionalForm"></temp-elect-form>-->
- <div>
- <div class="homeCard">
- <el-row>
- <el-col :span="3"><el-button type="primary" size="default" @click="dialogAddWorker = true">添加作业人</el-button></el-col>
- <el-col :span="21">
- <el-table :data="form.workerList" style="width: 100%">
- <el-table-column type="index" label="序号" width="100"/>
- <el-table-column prop="worker" label="作业人"/>
- <el-table-column prop="role" label="作业人角色" width="180"/>
- <el-table-column prop="unit" label="所属单位" width="180" />
- <el-table-column prop="certificate" label="证书名称" width="180" />
- <el-table-column prop="certificateId" label="证书号" />
- <el-table-column fixed="right" label="操作" align="center" width="180">
- <template #default="scope">
- <el-button link type="danger" size="small" @click="deleteRow(scope.$index)">删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="作业地点" prop="workLocation">
- <el-input
- v-model="form.workLocation"
- placeholder="请输入"
- class="input-with-select"
- >
- <template #append>
- <el-button :icon="Search" />
- </template>
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="作业期限" prop="workTimeLine">
- <el-date-picker
- v-model="form.workTimeLine"
- type="daterange"
- unlink-panels
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- :shortcuts="shortcuts"
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="作业内容" prop="workContent">
- <el-input
- v-model="form.workContent"
- placeholder="请输入"
- class="input-with-select"
- >
- <template #append>
- <el-button :icon="Search" />
- </template>
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="作业单位" prop="workUnit">
- <el-input
- v-model="form.workUnit"
- placeholder="请输入"
- class="input-with-select"
- >
- <template #append>选择作业单位</template>
- </el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="8">
- <el-form-item label="作业负责人" prop="responsor">
- <el-input
- v-model="form.responsor"
- placeholder="请输入"
- class="input-with-select"
- >
- <template #append>
- <el-button :icon="Search" />
- </template>
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="监护人" prop="monitor">
- <el-input
- v-model="form.monitor"
- placeholder="请输入"
- class="input-with-select"
- >
- <template #append>
- <el-button :icon="Search" />
- </template>
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="监护人岗位" prop="monitorStation">
- <el-input
- v-model="form.monitorStation"
- placeholder="请输入"
- class="input-with-select"
- >
- <template #append>
- <el-button :icon="Search" />
- </template>
- </el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="生产车间负责人" prop="workhouseLeader">
- <el-input
- v-model="form.workhouseLeader"
- placeholder="请输入"
- class="input-with-select"
- >
- <template #append>
- <el-button :icon="Search" />
- </template>
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="申请日期" prop="applyDate">
- <el-date-picker
- size="large"
- v-model="form.applyDate"
- type="date"
- placeholder="请选择"
- style="width: 100%"
- ></el-date-picker>
- </el-form-item>
- </el-col>
- </el-row>
- </div>
- <div class="homeCard">
- <el-row>
- <el-col :span="24">
- <el-form-item label="涉及的其他特殊作业" prop="otherSpecialWorks">
- <el-checkbox-group v-model="form.otherSpecialWorks">
- <el-checkbox label="动火作业" />
- <el-checkbox label="受限空间" />
- <el-checkbox label="高处作业" />
- <el-checkbox label="吊装作业" />
- <el-checkbox label="临时用电" />
- <el-checkbox label="设备检修" />
- <el-checkbox label="盲板抽堵" />
- <el-checkbox label="断路作业" />
- <el-checkbox label="动土作业" />
- </el-checkbox-group>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col>
- <el-form-item label="防护用品" prop="protections">
- <el-cascader
- v-model="form.protections"
- :options="protectOption"
- :props="{expandTrigger: 'hover'}"
- @change="protectionsChange"
- placeholder="请选择"
- style="width: 100%"
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row style="justify-content: center">
- <el-button type="primary" size="default" @click="dialogAddFile = true">点击添加安全交底和风险告知书</el-button>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="实施安全教育人" prop="safetyMan">
- <el-input
- v-model="form.safetyMan"
- placeholder="请输入"
- class="input-with-select"
- >
- <template #append>
- <el-button :icon="Search"/>
- </template>
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="被教育人" prop="educated">
- <el-input
- v-model="form.educated"
- placeholder="请输入"
- class="input-with-select"
- >
- <template #append>
- <el-button :icon="Search" />
- </template>
- </el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </div>
- </div>
- </el-form>
- <div class="applyBtn">
- <el-button type="primary" size="large" plain @click="handleApply(ruleFormRef2)">发起申请</el-button>
- </div>
- <el-dialog v-model="dialogAddWorker" title="添加作业人">
- <el-form :model="addWorkerForm" label-width="120px" :rules="addWorkerRules" ref='ruleFormRef3'>
- <el-form-item label="作业人" prop="worker">
- <el-input
- v-model="addWorkerForm.worker"
- placeholder="请输入"
- class="input-with-select"
- >
- <template #append>
- <el-button :icon="Search" />
- </template>
- </el-input>
- </el-form-item>
- <el-form-item label="作业人角色" prop="role">
- <el-input
- v-model="addWorkerForm.role"
- placeholder="请输入"
- class="input-with-select"
- >
- <template #append>
- <el-button :icon="Search" />
- </template>
- </el-input>
- </el-form-item>
- <el-form-item label="作业人角色" prop="unit">
- <el-input
- v-model="addWorkerForm.unit"
- placeholder="请输入"
- class="input-with-select"
- >
- <template #append>
- <el-button :icon="Search" />
- </template>
- </el-input>
- </el-form-item>
- <el-form-item label="证书名称" prop="certificate">
- <el-input
- v-model="addWorkerForm.certificate"
- placeholder="请输入"
- class="input-with-select"
- >
- <template #append>
- <el-button :icon="Search" />
- </template>
- </el-input>
- </el-form-item>
- <el-form-item label="证书号" prop="certificateId">
- <el-input
- v-model="addWorkerForm.certificateId"
- placeholder="请输入"
- class="input-with-select"
- >
- <template #append>
- <el-button :icon="Search" />
- </template>
- </el-input>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="onSubmitAddForm(ruleFormRef3)" size="default">确认</el-button>
- <el-button size="default" @click="cancleAdd">取消</el-button>
- </el-form-item>
- </el-form>
- </el-dialog>
- <el-dialog v-model="dialogAddFile" title="安全交底和风险告知">
- <el-form :model="saftyFileForm" label-width="0" ref="ruleFormRef" :rules="saftyFileRules">
- <el-form-item label="" prop="surrounding">
- <div>1.作业许可范围及作业环境:</div>
- <el-input
- v-model="saftyFileForm.surrounding"
- :rows="2"
- type="textarea"
- placeholder="请输入"
- />
- </el-form-item>
- <el-form-item label="" prop="risk">
- <div>2.作业风险:</div>
- <el-input
- v-model="saftyFileForm.risk"
- :rows="2"
- type="textarea"
- placeholder="请输入"
- />
- </el-form-item>
- <el-form-item label="" prop="protection">
- <div>3.防范措施(工艺、设备、个体防护等):</div>
- <el-input
- v-model="saftyFileForm.protection"
- :rows="2"
- type="textarea"
- placeholder="请输入"
- />
- </el-form-item>
- <el-form-item label="" prop="emergency">
- <div>4.应急措施:</div>
- <el-input
- v-model="saftyFileForm.emergency"
- :rows="2"
- type="textarea"
- placeholder="请输入"
- />
- </el-form-item>
- <el-form-item label="" prop="otherStuff">
- <div>5.其他注意事项:</div>
- <el-input
- v-model="saftyFileForm.otherStuff"
- :rows="2"
- type="textarea"
- placeholder="请输入"
- />
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="onSubmitAddFile(ruleFormRef)" size="default">确认</el-button>
- <el-button size="default" @click="cancleAddFile">取消</el-button>
- </el-form-item>
- </el-form>
- </el-dialog>
- </div>
+ <el-tabs type="border-card">
+ <el-tab-pane label="动火作业">
+ <fire-form></fire-form>
+ </el-tab-pane>
+ <el-tab-pane label="受限空间作业">
+ <space-form></space-form>
+ </el-tab-pane>
+ <el-tab-pane label="吊装作业">
+ <hoist-form></hoist-form>
+ </el-tab-pane>
+ <el-tab-pane label="动土作业">
+ <ground-form></ground-form>
+ </el-tab-pane>
+ <el-tab-pane label="断路作业">
+ <broken-form></broken-form>
+ </el-tab-pane>
+ <el-tab-pane label="高处作业">
+ <height-form></height-form>
+ </el-tab-pane>
+ <el-tab-pane label="临时用电作业">
+ <power-form></power-form>
+ </el-tab-pane>
+ <el-tab-pane label="盲板抽堵作业">
+ <plate-form></plate-form>
+ </el-tab-pane>
+ </el-tabs>
</div>
</template>
@@ -350,264 +38,32 @@
import { Search } from '@element-plus/icons-vue'
import { ElMessage } from 'element-plus'
import type { FormInstance, FormRules } from 'element-plus'
- let global: any = {
- homeChartOne: null,
- homeChartTwo: null,
- homeCharThree: null,
- dispose: [null, '', undefined],
- };
+ import { workApplyApi } from '/@/api/specialWorkSystem/workApply';
+
interface stateType {
- homeOne: Array <type>
- }
- interface type {
}
export default defineComponent({
- name: 'workApplyForm',
+ name: 'workTicket',
components: {
- fireWorkForm: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workApplyManage/workApplyForm/components/fireWorkForm.vue')),
- limitedSpaceForm: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workApplyManage/workApplyForm/components/limitedSpaceForm.vue')),
- hangLoadForm: defineAsyncComponent(()=> import('/@/views/specialWorkSystem/workApplyManage/workApplyForm/components/hangLoadForm.vue')),
- dirtWorkForm: defineAsyncComponent(()=> import('/@/views/specialWorkSystem/workApplyManage/workApplyForm/components/dirtWorkForm.vue')),
- cutLineForm: defineAsyncComponent(()=> import('/@/views/specialWorkSystem/workApplyManage/workApplyForm/components/cutLineForm.vue')),
- highWorkForm: defineAsyncComponent(()=> import('/@/views/specialWorkSystem/workApplyManage/workApplyForm/components/highWorkForm.vue')),
- tempElectForm: defineAsyncComponent(()=> import('/@/views/specialWorkSystem/workApplyManage/workApplyForm/components/tempElectForm.vue')),
- blindPanelForm: defineAsyncComponent(()=> import('/@/views/specialWorkSystem/workApplyManage/workApplyForm/components/blindPanelForm.vue'))
+ fireForm: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workApplyManage/workApplyForm/components/fire.vue')),
+ spaceForm: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workApplyManage/workApplyForm/components/space.vue')),
+ hoistForm: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workApplyManage/workApplyForm/components/hoist.vue')),
+ groundForm: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workApplyManage/workApplyForm/components/ground.vue')),
+ brokenForm: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workApplyManage/workApplyForm/components/broken.vue')),
+ heightForm: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workApplyManage/workApplyForm/components/height.vue')),
+ powerForm: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workApplyManage/workApplyForm/components/power.vue')),
+ plateForm: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workApplyManage/workApplyForm/components/plate.vue'))
},
setup() {
const userInfo = useUserInfo()
const { userInfos } = storeToRefs(userInfo);
const state = reactive<stateType>({
- homeOne:[{id:1,name:'安全基础信息系统'},{id:2,name:'双重预防系统'},{id:3,name:'系统2'},{id:4,name:'系统3'},{id:5,name:'系统4'}],
+
});
- const form = reactive({
- addForm: {},
- workerList: [],
- workLocation: '',
- workTimeLine: '',
- workContent: '',
- workUnit: '',
- responsor: '',
- monitor: '',
- workMonitor: '',
- monitorStation: '',
- workhouseLeader: '',
- applyDate: '',
- otherSpecialWorks: [],
- protections: '',
- saftyFile: {},
- safetyMan: '',
- educated: ''
- })
- const dialogAddWorker = ref(false)
- const dialogAddFile = ref(false)
- const addWorkerForm = ref({
- worker: '',
- role: '',
- unit: '',
- certificate: '',
- certificateId: ''
- })
- const saftyFileForm = reactive({
- surrounding: '',
- risk: '',
- protection: '',
- emergency: '',
- otherStuff: ''
- })
- const shortcuts = [
- {
- text: 'Last week',
- value: () => {
- const end = new Date()
- const start = new Date()
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
- return [start, end]
- },
- },
- {
- text: 'Last month',
- value: () => {
- const end = new Date()
- const start = new Date()
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
- return [start, end]
- },
- },
- {
- text: 'Last 3 months',
- value: () => {
- const end = new Date()
- const start = new Date()
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
- return [start, end]
- },
- },
- ]
- const protectOption = [
- {
- value: 'guide',
- label: 'Guide',
- children: [
- {
- value: 'disciplines',
- label: 'Disciplines',
- children: [
- {
- value: 'consistency',
- label: 'Consistency',
- },
- {
- value: 'feedback',
- label: 'Feedback',
- }
- ],
- },
- {
- value: 'navigation',
- label: 'Navigation',
- children: [
- {
- value: 'side nav',
- label: 'Side Navigation',
- }
- ],
- },
- ],
- }
- ]
- const ruleFormRef = ref<FormInstance>()
- const ruleFormRef2 = ref<FormInstance>()
- const ruleFormRef3 = ref<FormInstance>()
- const applyRules = reactive<FormRules>({
- extraForm: [{type: 'object', required: true,message: '此处不能为空'}],
- workLocation: [{required: true,message: '此处不能为空'}],
- workTimeLine: [{required: true,message: '此处不能为空'}],
- workContent: [{required: true,message: '此处不能为空'}],
- workUnit: [{required: true,message: '此处不能为空'}],
- responsor: [{required: true,message: '此处不能为空'}],
- monitor: [{required: true,message: '此处不能为空'}],
- workMonitor: [{required: true,message: '此处不能为空'}],
- monitorStation: [{required: true,message: '此处不能为空'}],
- workhouseLeader: [{required: true,message: '此处不能为空'}],
- applyDate: [{required: true,message: '此处不能为空'}],
- otherSpecialWorks: [{type: 'array', required: true,message: '此处不能为空'}],
- protections: [{required: true,message: '此处不能为空'}],
- safetyMan: [{required: true,message: '此处不能为空'}],
- educated: [{required: true,message: '此处不能为空'}]
- })
- const addWorkerRules = reactive<FormRules>({
- worker: [{required: true,message: '此处不能为空'}],
- role: [{required: true,message: '此处不能为空'}],
- unit: [{required: true,message: '此处不能为空'}],
- certificate: [{required: true,message: '此处不能为空'}],
- certificateId: [{required: true,message: '此处不能为空'}]
- })
- const saftyFileRules = reactive<FormRules>({
- surrounding: [{required: true,message: '该选项不能为空'}],
- risk: [{required: true,message: '该选项不能为空'}],
- protection: [{required: true,message: '该选项不能为空'} ],
- emergency: [{required: true,message: '该选项不能为空'} ]
- })
- const protectionsChange = (value) => {
- console.log(value)
- }
- const onSubmitAddForm = async (formEl: FormInstance | undefined) => {
- if (!formEl) return
- await formEl.validate((valid, fields) => {
- if (valid) {
- form.workerList.unshift(addWorkerForm.value)
- addWorkerForm.value = {
- worker: '',
- role: '',
- unit: '',
- certificate: '',
- certificateId: ''
- }
- dialogAddWorker.value = false
- } else {
- console.log('error submit!', fields)
- }
- })
- }
- const onSubmitAddFile = () =>{
-
- }
- const cancleAdd = ()=> {
- addWorkerForm.value = {
- worker: '',
- role: '',
- unit: '',
- certificate: '',
- certificateId: ''
- }
- dialogAddWorker.value = false
- }
- const cancleAddFile = ()=>{
-
- }
- const deleteRow = (index) =>{
- form.workerList.splice( index,1)
- }
- const isValid = ref(false)
- const additionalForm = ref(null)
- const handleApply = async (formEl: FormInstance | undefined) =>{
- if (!formEl) return
- const flag = additionalForm.value.validateForm()
- await flag.then((res)=>{
- isValid.value = res
- })
- await formEl.validate((valid, fields) => {
- console.log(valid,'and',isValid.value)
- if (valid && isValid.value) {
- console.log('submit',form,fields)
- ElMessage({
- message: '提交成功!',
- type: 'success',
- })
- } else {
- // console.log('error submit!',form,fields)
- ElMessage({
- message: '表单未填写完整',
- type: 'error',
- })
- }
- })
-
- }
- // 折线图
- const renderMenu = async (value: string) => {
- Session.set('projectId',value)
- userInfos.value.projectId = value
- await initBackEndControlRoutes();
- };
return {
- renderMenu,
- form,
- Search,
- shortcuts,
- protectOption,
- dialogAddWorker,
- dialogAddFile,
- addWorkerForm,
- saftyFileForm,
- ruleFormRef,
- ruleFormRef2,
- ruleFormRef3,
- additionalForm,
- addWorkerRules,
- saftyFileRules,
- applyRules,
- isValid,
- handleApply,
- cancleAddFile,
- deleteRow,
- cancleAdd,
- onSubmitAddForm,
- onSubmitAddFile,
- protectionsChange,
...toRefs(state),
};
},
diff --git a/src/views/specialWorkSystem/workApplyManage/workTicket/index.vue b/src/views/specialWorkSystem/workApplyManage/workTicket/index.vue
index 88aab2a..c57548f 100644
--- a/src/views/specialWorkSystem/workApplyManage/workTicket/index.vue
+++ b/src/views/specialWorkSystem/workApplyManage/workTicket/index.vue
@@ -179,7 +179,7 @@
});
const ruleFormRef = ref<FormInstance>();
const applyRules = reactive<FormRules>({
- operatorUid: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
+ operatorUids: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
workType: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
workLevel: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
workContent: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],
--
Gitblit v1.9.2