有限空间作业

八项作业
1261008090@qq.com 2024-06-25 18:01:18 +08:00
parent 58ce329781
commit 310d9e45f2
7 changed files with 415 additions and 1 deletions

View File

@ -31,4 +31,10 @@ export const setCertificateInformationAdd = (params) => upload("/app/specialUser
export const setCertificateInformationEdit = (params) => upload("/app/specialUser/edit", params) //证书信息修改 export const setCertificateInformationEdit = (params) => upload("/app/specialUser/edit", params) //证书信息修改
export const setCertificateInformationEditPost = (params) => post("/app/specialUser/edit", params) //证书信息修改 export const setCertificateInformationEditPost = (params) => post("/app/specialUser/edit", params) //证书信息修改
export const getDeptTree = (params) => post("/api/department/listzTree", params) //用户信息 export const getDeptTree = (params) => post("/api/department/listzTree", params) //用户信息
export const getEMPLOYMENTAPPLYMANAGEMENTID = (params) => post("/app/user/getEMPLOYMENTAPPLYMANAGEMENTID",params)//获取EMPLOYMENTAPPLYMANAGEMENTID export const getEMPLOYMENTAPPLYMANAGEMENTID = (params) => post("/app/user/getEMPLOYMENTAPPLYMANAGEMENTID",
params) //获取EMPLOYMENTAPPLYMANAGEMENTID
export const getCorpInfoList = (params) => post("/department/getPreventCrop", params) //获取公司列表
export const getConfinedSpaceSelectList = (params) => post("/app/gfLimitSpace/listAllSpace", {
loading: false,
...params
}) //获取受限空间名称选择列表

View File

@ -167,6 +167,30 @@
"style": { "style": {
"navigationBarTitleText": "隐私协议" "navigationBarTitleText": "隐私协议"
} }
},
{
"path": "pages/eight_assignments/index",
"style": {
"navigationBarTitleText": "高危作业"
}
},
{
"path": "pages/selete_corp_info/index",
"style": {
"navigationBarTitleText": "选择分公司"
}
},
{
"path": "pages/eight_assignments/confined_space/index",
"style": {
"navigationBarTitleText": "受限空间安全作业"
}
},
{
"path": "pages/eight_assignments/confined_space/apply",
"style": {
"navigationBarTitleText": "受限空间安全作业申请"
}
} }
], ],
"globalStyle": { "globalStyle": {

View File

@ -0,0 +1,122 @@
<template>
<view class="content">
<view class="card">
<u--form labelPosition="left" :model="form" :rules="rules" ref="formRef" labelWidth="140px">
<u-form-item label="申请单位" prop="APPLY_DEPARTMENT_NAME" borderBottom required>
<u--input v-model="form.APPLY_DEPARTMENT_NAME" border="none" readonly />
</u-form-item>
<u-form-item label="申请人" prop="APPLY_USER_NAME" borderBottom required>
<u--input v-model="form.APPLY_USER_NAME" border="none" readonly />
</u-form-item>
<u-form-item label="作业分公司" prop="CORP_NAME" borderBottom required>
<u--input v-model="form.CORP_NAME" border="none" readonly />
</u-form-item>
<u-form-item label="受限空间所属单位" prop="BELONG_CORP" borderBottom required>
<u--input v-model="form.BELONG_CORP" border="none" />
</u-form-item>
<u-form-item label="受限空间名称" prop="LIMITSPACE_NAME" borderBottom required
@click="fnSingleChoiceClick('LIMITSPACE_NAME')">
<u--input v-model="form.LIMITSPACE_NAME" border="none" readonly />
</u-form-item>
<u-form-item label="受限空间内原有介质名称" prop="MEDIUM_NAME" borderBottom required>
<u--input v-model="form.MEDIUM_NAME" border="none" />
</u-form-item>
<u-form-item label="作业内容" prop="WORK_CONTENT" borderBottom required>
<u--textarea v-model="form.WORK_CONTENT" border="none" autoHeight />
</u-form-item>
<u-form-item label="作业开始时间" prop="WORK_START_DATE" borderBottom required
@click="fnDateTimePickerClick('WORK_START_DATE')">
<u--input v-model="form.WORK_START_DATE" border="none" readonly />
</u-form-item>
<u-form-item label="作业结束时间" prop="WORK_END_DATE" borderBottom required
@click="fnDateTimePickerClick('WORK_END_DATE')">
<u--input v-model="form.WORK_END_DATE" border="none" readonly />
</u-form-item>
</u--form>
</view>
<u-picker :show="picker.show" :columns="picker.columns" :keyName="picker.key" :key="picker.type" @confirm="fnSingleChoiceConfirm"
@cancel="fnSingleChoiceCancel" />
<u-datetime-picker :show="datetimePicker.show" v-model="datetimePicker.value" :mode="datetimePicker.mode"
:minDate="datetimePicker.min" :key="datetimePicker.type" @confirm="fnDateTimePickerConfirm" @cancel="fnDateTimePickerCancel" />
</view>
</template>
<script>
import {
getConfinedSpaceSelectList
} from '../../../api/index'
export default {
data() {
return {
form: {
APPLY_DEPARTMENT_ID: this.$store.getters.getUserInfo.DEPARTMENT_ID,
APPLY_DEPARTMENT_NAME: this.$store.getters.getUserInfo.DEPARTMENT_NAME,
APPLY_USER_ID: this.$store.getters.getUserInfo.USER_ID,
APPLY_USER_NAME: this.$store.getters.getUserInfo.NAME,
BELONG_CORP: '',
LIMITSPACE_NAME: '',
LIMITSPACE_ID: '',
MEDIUM_NAME: '',
WORK_CONTENT: '',
WORK_START_DATE:'',
WORK_END_DATE:'',
},
rules: {},
picker: {
show: false,
columns: [],
key: 'NAME',
type: ''
},
datetimePicker: {
show: false,
value: Number(new Date()),
min: new Date().getTime(),
mode: 'datetime',
type: ''
}
}
},
onLoad(options) {
this.form.CORP_ID = options.CORPINFO_ID
this.form.CORP_NAME = options.CORP_NAME
},
methods: {
async fnGetConfinedSpaceSelectList() {
const resData = await getConfinedSpaceSelectList()
this.picker.columns = [resData.varList]
},
fnSingleChoiceClick(event) {
this.picker.type = event
if (event === 'LIMITSPACE_NAME') this.fnGetConfinedSpaceSelectList()
this.picker.show = true
},
fnSingleChoiceConfirm(event) {
if (this.picker.type === 'LIMITSPACE_NAME') {
this.form.LIMITSPACE_ID = event.value[0].LIMITSPACE_ID
this.form.LIMITSPACE_NAME = event.value[0].NAME
}
this.fnSingleChoiceCancel()
},
fnSingleChoiceCancel() {
this.picker.show = false
},
fnDateTimePickerClick(event) {
this.datetimePicker.type = event
this.datetimePicker.value = Number(new Date(this.form[event])) || Number(new Date())
this.datetimePicker.show = true
},
fnDateTimePickerConfirm(event) {
this.form[this.datetimePicker.type] = uni.$u.timeFormat(event.value, 'yyyy-mm-dd hh:MM')
this.fnDateTimePickerCancel()
},
fnDateTimePickerCancel() {
this.datetimePicker.show = false
},
}
}
</script>
<style>
</style>

View File

@ -0,0 +1,77 @@
<template>
<view class="content">
<view class="card">
<view class="items">
<view class="item" v-for="(item,index) in baseList" :key="index" @click="fnNavigator(index)">
<image :src="item.img" mode=""></image>
<view class="text">
<text>{{ item.title }}</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
baseList: [
{
img: require('../../../static/icon-apps/app_icons.png'),
title: '申请',
url: '/pages/selete_corp_info/index',
params: {
type: 'confined_space'
}
},
{
img: require('../../../static/icon-apps/app_icons.png'),
title: '待办',
url: '/pages/eight_assignments/confined_space/index'
},
{
img: require('../../../static/icon-apps/app_icons.png'),
title: '已办',
url: '/pages/eight_assignments/confined_space/index'
},
]
};
},
methods: {
fnNavigator(e) {
uni.$u.route({
url: this.baseList[e].url,
params: this.baseList[e].params
})
},
}
}
</script>
<style lang="scss" scoped>
.items {
background-color: #fff;
display: flex;
flex-wrap: wrap;
margin-top: -20upx;
.item {
flex-basis: calc(100% / 3);
text-align: center;
margin-top: 20upx;
image {
width: 136upx;
height: 136upx;
}
.text {
width: 130upx;
font-size: 28upx;
margin: auto;
}
}
}
</style>

View File

@ -0,0 +1,98 @@
<template>
<view class="content">
<view class="card">
<view class="items">
<view class="item" v-for="(item,index) in baseList" :key="index" @click="fnNavigator(index)">
<image :src="item.img" mode=""></image>
<view class="text">
<text>{{ item.title }}</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
baseList: [
{
img: require('../../static/icon-apps/app_icons.png'),
title: '受限空间安全作业',
url: '/pages/eight_assignments/confined_space/index'
},
{
img: require('../../static/icon-apps/app_icons.png'),
title: '盲板抽堵作业',
url: '/pages/electronic_work_card/index'
},
{
img: require('../../static/icon-apps/app_icons.png'),
title: '动土作业',
url: '/pages/electronic_work_card/index'
},
{
img: require('../../static/icon-apps/app_icons.png'),
title: '高处作业',
url: '/pages/electronic_work_card/index'
},
{
img: require('../../static/icon-apps/app_icons.png'),
title: '吊装作业',
url: '/pages/electronic_work_card/index'
},
{
img: require('../../static/icon-apps/app_icons.png'),
title: '临时用电作业',
url: '/pages/electronic_work_card/index'
},
{
img: require('../../static/icon-apps/app_icons.png'),
title: '动火作业',
url: '/pages/electronic_work_card/index'
},
{
img: require('../../static/icon-apps/app_icons.png'),
title: '断路作业',
url: '/pages/electronic_work_card/index'
},
]
};
},
methods: {
fnNavigator(e) {
uni.$u.route({
url: this.baseList[e].url
})
},
}
}
</script>
<style lang="scss" scoped>
.items {
background-color: #fff;
display: flex;
flex-wrap: wrap;
margin-top: -20upx;
.item {
flex-basis: 25%;
text-align: center;
margin-top: 20upx;
image {
width: 136upx;
height: 136upx;
}
.text {
width: 130upx;
font-size: 28upx;
margin: auto;
}
}
}
</style>

View File

@ -69,6 +69,11 @@ export default {
title: '就职单位', title: '就职单位',
url: '/pages/employed_by/index' url: '/pages/employed_by/index'
}, },
{
img: require('../../static/icon-apps/app_icons5.png'),
title: '高危作业',
url: '/pages/eight_assignments/index'
},
], ],
} }
}, },

View File

@ -0,0 +1,82 @@
<template>
<view class="content">
<view class="card">
<u-radio-group v-model="selete_corp" placement="column">
<u-radio :customStyle="{marginBottom: '20upx'}" v-for="(item, index) in list" :key="item.CORPINFO_ID"
:label="item.CORP_NAME" :name="item.CORPINFO_ID">
</u-radio>
</u-radio-group>
<view class="button_placeholder"></view>
<view class="button">
<u-button type="primary" text="确定" @click="fnConfirm"></u-button>
</view>
</view>
</view>
</template>
<script>
import {
getCorpInfoList
} from '../../api/index'
export default {
data() {
return {
type: '',
list: [],
selete_corp: ''
}
},
onLoad(options) {
this.type = options.type
this.fnGetData()
},
methods: {
async fnGetData() {
const resData = await getCorpInfoList()
this.list = resData.data
},
fnConfirm() {
if (!this.selete_corp) {
uni.$u.toast('请选择作业分公司')
return;
}
const urlByTypeMap = {
'confined_space': {
'035958e685cf4850bc40151c5e0617a6': '',
'default': '/pages/eight_assignments/confined_space/apply'
}
}
const url = urlByTypeMap[this.type][this.selete_corp] ?? urlByTypeMap[this.type].default
let params = {}
for (let i = 0; i < this.list.length; i++) {
if (this.list[i].CORPINFO_ID === this.selete_corp) {
params = {
CORPINFO_ID: this.list[i].CORPINFO_ID,
CORP_NAME: this.list[i].CORP_NAME,
}
break
}
}
uni.$u.route({
url,
type: 'redirect',
params
})
}
}
}
</script>
<style scoped lang="scss">
.button_placeholder {
height: 100upx;
}
.button {
position: fixed;
bottom: 0;
left: 0;
right: 0;
}
</style>