八项作业人员定位功能支持
parent
dc1faeef29
commit
c12b226720
|
@ -20,11 +20,20 @@
|
||||||
<view class="flex-between mt-10 subtitle">
|
<view class="flex-between mt-10 subtitle">
|
||||||
<view></view>
|
<view></view>
|
||||||
<view class="flex-between">
|
<view class="flex-between">
|
||||||
<u-button type="primary" text="流程" size="mini" class="bth-mini"
|
<view class="flex-between">
|
||||||
@click="$u.route({
|
<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({
|
||||||
url: '/pages/eight_assignments/technological_process',
|
url: '/pages/eight_assignments/technological_process',
|
||||||
params: {taskId:item.taskId,type,title}
|
params: {taskId:item.taskId,type,title}
|
||||||
})"/>
|
})"/>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-list-item>
|
</u-list-item>
|
||||||
|
|
|
@ -119,8 +119,8 @@ export default {
|
||||||
WORK_CONTENT: '',
|
WORK_CONTENT: '',
|
||||||
WORK_START_DATE: '',
|
WORK_START_DATE: '',
|
||||||
WORK_END_DATE: '',
|
WORK_END_DATE: '',
|
||||||
WORK_LONGITUDE: '',
|
WORK_LONGITUDE: '1',
|
||||||
WORK_LATITUDE: '',
|
WORK_LATITUDE: '2',
|
||||||
WORK_USER: '',
|
WORK_USER: '',
|
||||||
SPECIAL_WORK: '',
|
SPECIAL_WORK: '',
|
||||||
RISK_IDENTIFICATION: '',
|
RISK_IDENTIFICATION: '',
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
<u-input v-model="form.SUPERVISOR_OF_HOT_WORK_UNIT" border="none" placeholder="请输入动火监火人" />
|
<u-input v-model="form.SUPERVISOR_OF_HOT_WORK_UNIT" border="none" placeholder="请输入动火监火人" />
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="是否安全总监审批" prop="IS_SAFETY_DIRECTOR" borderBottom required>
|
<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 label="是" name="1" />
|
||||||
<u-radio :customStyle="{ marginLeft: '8px' }" label="否" name="0" />
|
<u-radio :customStyle="{ marginLeft: '8px' }" label="否" name="0" />
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
|
@ -141,6 +141,7 @@ export default {
|
||||||
HOT_WORK_POSITION: '',
|
HOT_WORK_POSITION: '',
|
||||||
// 动火方法
|
// 动火方法
|
||||||
HOT_WORK_METHOD_ID: '',
|
HOT_WORK_METHOD_ID: '',
|
||||||
|
HOT_WORK_METHOD_NAME: '',
|
||||||
// 动火等级
|
// 动火等级
|
||||||
HOT_WORK_LEVEL_ID: '',
|
HOT_WORK_LEVEL_ID: '',
|
||||||
HOT_WORK_LEVEL_INDEX: '',
|
HOT_WORK_LEVEL_INDEX: '',
|
||||||
|
@ -258,6 +259,7 @@ export default {
|
||||||
*/
|
*/
|
||||||
async fnSubmit() {
|
async fnSubmit() {
|
||||||
await this.$refs.formRef.validate()
|
await this.$refs.formRef.validate()
|
||||||
|
this.form.HOT_WORK_METHOD_NAME = this.form.HOT_WORK_METHOD_ID
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/eight_assignments/hot_work/select_operator",
|
url: "/pages/eight_assignments/hot_work/select_operator",
|
||||||
success: ({ eventChannel }) => {
|
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,
|
form: this.form,
|
||||||
list: this.list,
|
list: this.list,
|
||||||
taskId: this.taskId,
|
taskId: this.taskId,
|
||||||
|
EW_RU_JOB_ID: this.EW_RU_JOB_ID,
|
||||||
CORP_ID: this.CORP_ID,
|
CORP_ID: this.CORP_ID,
|
||||||
TYPE: this.TYPE,
|
TYPE: this.TYPE,
|
||||||
vernier: this.vernier
|
vernier: this.vernier
|
||||||
|
|
|
@ -81,7 +81,8 @@
|
||||||
</block>
|
</block>
|
||||||
</u-cell-group>
|
</u-cell-group>
|
||||||
<view class="mt-10">
|
<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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -100,12 +101,16 @@ export default {
|
||||||
form: [],
|
form: [],
|
||||||
jobs: [],
|
jobs: [],
|
||||||
questionnaires: [],
|
questionnaires: [],
|
||||||
|
isView: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(query) {
|
onLoad(query) {
|
||||||
this.taskId = query.taskId
|
this.taskId = query.taskId
|
||||||
this.type = query.type
|
this.type = query.type
|
||||||
this.jobId = query.jobId
|
this.jobId = query.jobId
|
||||||
|
if ('1' === query.isView){
|
||||||
|
this.isView = '1'
|
||||||
|
}
|
||||||
this.fnGetData(query.taskId)
|
this.fnGetData(query.taskId)
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title: query.title + '查看'
|
title: query.title + '查看'
|
||||||
|
@ -133,6 +138,9 @@ export default {
|
||||||
EW_RU_JOB_ID: this.jobId,
|
EW_RU_JOB_ID: this.jobId,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
goBack(){
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -97,7 +97,7 @@ const processSelectedPersonnelData = (formData, list) => {
|
||||||
return form
|
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({
|
await addFormInfo({
|
||||||
job: processSelectedPersonnelData(form,list),
|
job: processSelectedPersonnelData(form,list),
|
||||||
EW_RU_TASK_ID: taskId,
|
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,
|
EW_RU_TASK_ID: taskId,
|
||||||
CORP_ID,
|
CORP_ID,
|
||||||
TYPE,
|
TYPE,
|
||||||
|
EW_RU_JOB_ID,
|
||||||
vernier
|
vernier
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -154,7 +155,7 @@ const endCurrentPersonnelTechnologicalProcess = async ({EW_RU_TASK_ID}) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 在审批过程中指定下一节点人
|
// 在审批过程中指定下一节点人
|
||||||
export const addFlowInfo = async ({form,list, taskId,EW_RU_JOB_ID, TYPE,CORP_ID, vernier}) => {
|
export const addFlowInfo = async ({form, list, taskId, EW_RU_JOB_ID, TYPE,CORP_ID, vernier}) => {
|
||||||
// 在审批过程中添加节点信息
|
// 在审批过程中添加节点信息
|
||||||
await addFormInfo({
|
await addFormInfo({
|
||||||
job: processSelectedPersonnelData(form,list),
|
job: processSelectedPersonnelData(form,list),
|
||||||
|
@ -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) => {
|
export const resolveNextOperation = async ({EW_RU_TASK_ID = '', CORP_ID = '', TYPE = '', EW_RU_JOB_ID = '',vernier = ''}, isLastStep = true) => {
|
||||||
let stepNum = 0
|
let stepNum = 0
|
||||||
if (isLastStep) {
|
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') {
|
if (info.chooseNextFlag === '1') {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -193,7 +194,7 @@ export const resolveNextOperation = async ({EW_RU_TASK_ID = '', CORP_ID = '', TY
|
||||||
taskId: EW_RU_TASK_ID,
|
taskId: EW_RU_TASK_ID,
|
||||||
EW_RU_JOB_ID: EW_RU_JOB_ID,
|
EW_RU_JOB_ID: EW_RU_JOB_ID,
|
||||||
CORP_ID,
|
CORP_ID,
|
||||||
TYPE
|
TYPE,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -233,6 +234,7 @@ export const resolveNextOperation = async ({EW_RU_TASK_ID = '', CORP_ID = '', TY
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 流程特殊权限校验
|
// 流程特殊权限校验
|
||||||
|
console.log('info', info)
|
||||||
if (info.otherFlag !== null && info.otherFlag.redirectFlag === '1') {
|
if (info.otherFlag !== null && info.otherFlag.redirectFlag === '1') {
|
||||||
uni.$u.route({
|
uni.$u.route({
|
||||||
url: info.otherFlag.url,
|
url: info.otherFlag.url,
|
||||||
|
@ -285,3 +287,23 @@ export const getData = async (taskId) => {
|
||||||
return form;
|
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