八项作业人员定位功能支持
parent
dc1faeef29
commit
c12b226720
|
@ -19,6 +19,14 @@
|
|||
</view>
|
||||
<view class="flex-between mt-10 subtitle">
|
||||
<view></view>
|
||||
<view class="flex-between">
|
||||
<view class="flex-between">
|
||||
<u-button type="primary" text="详情" size="mini" class="bth-mini"
|
||||
@click="$u.route({
|
||||
url: '/pages/eight_assignments/view_info',
|
||||
params: {taskId:item.taskId,jobId:item.jobId,type,title,isView:'1'}
|
||||
})"/>
|
||||
</view>
|
||||
<view class="flex-between">
|
||||
<u-button type="primary" text="流程" size="mini" class="bth-mini"
|
||||
@click="$u.route({
|
||||
|
@ -27,6 +35,7 @@
|
|||
})"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-list-item>
|
||||
</u-list>
|
||||
<empty v-else></empty>
|
||||
|
|
|
@ -119,8 +119,8 @@ export default {
|
|||
WORK_CONTENT: '',
|
||||
WORK_START_DATE: '',
|
||||
WORK_END_DATE: '',
|
||||
WORK_LONGITUDE: '',
|
||||
WORK_LATITUDE: '',
|
||||
WORK_LONGITUDE: '1',
|
||||
WORK_LATITUDE: '2',
|
||||
WORK_USER: '',
|
||||
SPECIAL_WORK: '',
|
||||
RISK_IDENTIFICATION: '',
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
<u-input v-model="form.SUPERVISOR_OF_HOT_WORK_UNIT" border="none" placeholder="请输入动火监火人" />
|
||||
</u-form-item>
|
||||
<u-form-item label="是否安全总监审批" prop="IS_SAFETY_DIRECTOR" borderBottom required>
|
||||
<u-radio-group v-model="form.IS_SAFETY_DIRECTOR" :customStyle="{ 'justify-content': 'flex-end' }">
|
||||
<u-radio-group v-model="form.IS_SAFETY_DIRECTOR" :customStyle="{ 'justify-content': 'flex-end' }" @change="fnRadioChange($event, 'IS_SAFETY_DIRECTOR_NAME')">
|
||||
<u-radio label="是" name="1" />
|
||||
<u-radio :customStyle="{ marginLeft: '8px' }" label="否" name="0" />
|
||||
</u-radio-group>
|
||||
|
@ -141,6 +141,7 @@ export default {
|
|||
HOT_WORK_POSITION: '',
|
||||
// 动火方法
|
||||
HOT_WORK_METHOD_ID: '',
|
||||
HOT_WORK_METHOD_NAME: '',
|
||||
// 动火等级
|
||||
HOT_WORK_LEVEL_ID: '',
|
||||
HOT_WORK_LEVEL_INDEX: '',
|
||||
|
@ -258,6 +259,7 @@ export default {
|
|||
*/
|
||||
async fnSubmit() {
|
||||
await this.$refs.formRef.validate()
|
||||
this.form.HOT_WORK_METHOD_NAME = this.form.HOT_WORK_METHOD_ID
|
||||
uni.navigateTo({
|
||||
url: "/pages/eight_assignments/hot_work/select_operator",
|
||||
success: ({ eventChannel }) => {
|
||||
|
|
|
@ -0,0 +1,97 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="card">
|
||||
<u-form labelPosition="left" :model="form" :rules="rules" ref="formRef" labelWidth="140px">
|
||||
<u-form-item label="地点坐标" borderBottom required>
|
||||
<u-button type="primary" size="small" text="定位" :customStyle="{width:'100upx',margin:0}"
|
||||
@click="fnLocation"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="经度" prop="WORK_LONGITUDE" borderBottom required>
|
||||
<u-input v-model="form.WORK_LONGITUDE" border="none" readonly/>
|
||||
</u-form-item>
|
||||
<u-form-item label="纬度" prop="WORK_LATITUDE" borderBottom required>
|
||||
<u-input v-model="form.WORK_LATITUDE" border="none" readonly/>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="mt-10">
|
||||
<u-button type="primary" text="下一步" @click="$u.debounce(fnSubmit, 1000,true)"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OtherSelect from '@/components/other-select/index.vue';
|
||||
import Sign from '@/components/sign/sign.vue'
|
||||
import {getData, addReport} from "@/utils/submitHomeworkProcess";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
OtherSelect,
|
||||
Sign
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
type: '',
|
||||
taskId: '',
|
||||
EW_RU_JOB_ID: '',
|
||||
vernier: '',
|
||||
formItems: [
|
||||
{name: '经度', key_name: 'WORK_LONGITUDE', type: 0},
|
||||
{name: '纬度', key_name: 'WORK_LATITUDE', type: 0}
|
||||
],
|
||||
form: {
|
||||
WORK_LONGITUDE: '1',
|
||||
WORK_LATITUDE: '2'
|
||||
},
|
||||
rules: {
|
||||
WORK_LONGITUDE: [{type: 'string', required: true, message: '请输入经度', trigger: ['blur', 'change']}],
|
||||
WORK_LATITUDE: [{type: 'string', required: true, message: '请输入纬度', trigger: ['blur', 'change']}]
|
||||
}
|
||||
}
|
||||
},
|
||||
async onLoad(options) {
|
||||
this.taskId = options.taskId
|
||||
this.EW_RU_JOB_ID = options.EW_RU_JOB_ID
|
||||
this.vernier = options.vernier
|
||||
this.type = options.type
|
||||
this.form.CORP_ID = options.CORPINFO_ID
|
||||
this.form.CORP_NAME = options.CORP_NAME
|
||||
},
|
||||
methods: {
|
||||
fnLocation() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/map/index',
|
||||
events: {
|
||||
acceptLocationData: (event) => {
|
||||
this.form.WORK_LONGITUDE = event.data.longitue;
|
||||
this.form.WORK_LATITUDE = event.data.latitude;
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
async fnSubmit() {
|
||||
try {
|
||||
await this.$refs.formRef.validate()
|
||||
try {
|
||||
await addReport({
|
||||
form: this.form,
|
||||
formItems: this.formItems,
|
||||
TYPE: this.type,
|
||||
CORP_ID: this.form.CORP_ID,
|
||||
EW_RU_TASK_ID: this.taskId,
|
||||
EW_RU_JOB_ID: this.EW_RU_JOB_ID,
|
||||
vernier: this.vernier
|
||||
})
|
||||
} catch {
|
||||
}
|
||||
} catch {
|
||||
uni.$u.toast('请补全必填项')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
|
@ -220,6 +220,7 @@ export default {
|
|||
form: this.form,
|
||||
list: this.list,
|
||||
taskId: this.taskId,
|
||||
EW_RU_JOB_ID: this.EW_RU_JOB_ID,
|
||||
CORP_ID: this.CORP_ID,
|
||||
TYPE: this.TYPE,
|
||||
vernier: this.vernier
|
||||
|
|
|
@ -81,7 +81,8 @@
|
|||
</block>
|
||||
</u-cell-group>
|
||||
<view class="mt-10">
|
||||
<u-button type="primary" text="下一步" @click="$u.debounce(fnSubmit, 1000,true)"/>
|
||||
<u-button v-if="isView !== '1'" type="primary" text="下一步" @click="$u.debounce(fnSubmit, 1000,true)"/>
|
||||
<u-button v-if="isView === '1'" type="primary" text="返 回" @click="$u.debounce(goBack, 1000,true)"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -100,12 +101,16 @@ export default {
|
|||
form: [],
|
||||
jobs: [],
|
||||
questionnaires: [],
|
||||
isView: ''
|
||||
}
|
||||
},
|
||||
onLoad(query) {
|
||||
this.taskId = query.taskId
|
||||
this.type = query.type
|
||||
this.jobId = query.jobId
|
||||
if ('1' === query.isView){
|
||||
this.isView = '1'
|
||||
}
|
||||
this.fnGetData(query.taskId)
|
||||
uni.setNavigationBarTitle({
|
||||
title: query.title + '查看'
|
||||
|
@ -133,6 +138,9 @@ export default {
|
|||
EW_RU_JOB_ID: this.jobId,
|
||||
})
|
||||
},
|
||||
goBack(){
|
||||
uni.navigateBack()
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -97,7 +97,7 @@ const processSelectedPersonnelData = (formData, list) => {
|
|||
return form
|
||||
}
|
||||
// 提交人员信息
|
||||
export const setPersonnelForm = async ({form, list, taskId, CORP_ID, TYPE,vernier}) => {
|
||||
export const setPersonnelForm = async ({form, list, taskId, EW_RU_JOB_ID, CORP_ID, TYPE,vernier}) => {
|
||||
await addFormInfo({
|
||||
job: processSelectedPersonnelData(form,list),
|
||||
EW_RU_TASK_ID: taskId,
|
||||
|
@ -109,6 +109,7 @@ export const setPersonnelForm = async ({form, list, taskId, CORP_ID, TYPE,vernie
|
|||
EW_RU_TASK_ID: taskId,
|
||||
CORP_ID,
|
||||
TYPE,
|
||||
EW_RU_JOB_ID,
|
||||
vernier
|
||||
})
|
||||
}
|
||||
|
@ -181,7 +182,7 @@ export const addFlowInfo = async ({form,list, taskId,EW_RU_JOB_ID, TYPE,CORP_ID,
|
|||
export const resolveNextOperation = async ({EW_RU_TASK_ID = '', CORP_ID = '', TYPE = '', EW_RU_JOB_ID = '',vernier = ''}, isLastStep = true) => {
|
||||
let stepNum = 0
|
||||
if (isLastStep) {
|
||||
const {info} = await getCurrentNextOperation({EW_RU_TASK_ID, EW_RU_JOB_ID, VERNIER: vernier})
|
||||
const {info} = await getCurrentNextOperation({EW_RU_TASK_ID, EW_RU_JOB_ID, VERNIER: vernier, REQUEST_SOURCE: '2'})
|
||||
// 选人
|
||||
if (info.chooseNextFlag === '1') {
|
||||
uni.navigateTo({
|
||||
|
@ -193,7 +194,7 @@ export const resolveNextOperation = async ({EW_RU_TASK_ID = '', CORP_ID = '', TY
|
|||
taskId: EW_RU_TASK_ID,
|
||||
EW_RU_JOB_ID: EW_RU_JOB_ID,
|
||||
CORP_ID,
|
||||
TYPE
|
||||
TYPE,
|
||||
})
|
||||
}
|
||||
})
|
||||
|
@ -233,6 +234,7 @@ export const resolveNextOperation = async ({EW_RU_TASK_ID = '', CORP_ID = '', TY
|
|||
return
|
||||
}
|
||||
// 流程特殊权限校验
|
||||
console.log('info', info)
|
||||
if (info.otherFlag !== null && info.otherFlag.redirectFlag === '1') {
|
||||
uni.$u.route({
|
||||
url: info.otherFlag.url,
|
||||
|
@ -285,3 +287,23 @@ export const getData = async (taskId) => {
|
|||
return form;
|
||||
}
|
||||
};
|
||||
// 针对在某些节点要新增报表信息
|
||||
export const addReport = async ({form, formItems, TYPE, CORP_ID, EW_RU_TASK_ID, EW_RU_JOB_ID, vernier}) => {
|
||||
// 在审批过程中添加节点信息
|
||||
await addFormInfo({
|
||||
reports: await processFormData(form,formItems),
|
||||
EW_RU_TASK_ID: EW_RU_TASK_ID,
|
||||
EW_RU_JOB_ID: EW_RU_JOB_ID,
|
||||
TYPE,
|
||||
postMethod: 'application/json'
|
||||
}
|
||||
)
|
||||
// 结束后续流程
|
||||
await resolveNextOperation({
|
||||
EW_RU_TASK_ID: EW_RU_TASK_ID,
|
||||
CORP_ID,
|
||||
TYPE,
|
||||
EW_RU_JOB_ID,
|
||||
vernier
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue