八项作业新功能app端功能上线
parent
d30c328e6b
commit
a897ff8c11
|
@ -534,6 +534,12 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "安全承诺"
|
"navigationBarTitleText": "安全承诺"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/eight_assignments/hot_work/select_position",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "定位"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="content" style="margin-left: 10px">
|
<view class="content">
|
||||||
<view class="card">
|
<view class="card">
|
||||||
<u-form labelPosition="left" :model="form" :rules="rules" ref="formRef" labelWidth="140px">
|
<u-form labelPosition="left" :model="form" :rules="rules" ref="formRef" labelWidth="140px">
|
||||||
<u-form-item label="申请单位" prop="APPLY_DEPARTMENT_NAME" borderBottom required>
|
<u-form-item label="申请单位" prop="APPLY_DEPARTMENT_NAME" borderBottom required>
|
||||||
|
@ -247,6 +247,7 @@ export default {
|
||||||
otherAssignmentsShow: false,
|
otherAssignmentsShow: false,
|
||||||
otherIdentificationShow: false,
|
otherIdentificationShow: false,
|
||||||
signVisible: false,
|
signVisible: false,
|
||||||
|
taskId: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async onLoad(options) {
|
async onLoad(options) {
|
||||||
|
@ -256,6 +257,7 @@ export default {
|
||||||
this.fnAddBoardList()
|
this.fnAddBoardList()
|
||||||
if (options.taskId) {
|
if (options.taskId) {
|
||||||
this.form = await getData(options.taskId)
|
this.form = await getData(options.taskId)
|
||||||
|
this.taskId = options.taskId
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -352,7 +354,8 @@ export default {
|
||||||
form: this.form,
|
form: this.form,
|
||||||
formItems: this.formItems,
|
formItems: this.formItems,
|
||||||
TYPE: this.type,
|
TYPE: this.type,
|
||||||
CORP_ID: this.form.CORP_ID
|
CORP_ID: this.form.CORP_ID,
|
||||||
|
EW_RU_TASK_ID: this.taskId
|
||||||
})
|
})
|
||||||
} catch {
|
} catch {
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,7 +114,7 @@ export default {
|
||||||
{name: '作业地点', key_name: 'WORK_PLACE', type: 0},
|
{name: '作业地点', key_name: 'WORK_PLACE', type: 0},
|
||||||
{name: '作业内容', key_name: 'JOB_CONTENT', type: 0},
|
{name: '作业内容', key_name: 'JOB_CONTENT', type: 0},
|
||||||
{name: '作业内容、范围、方式', key_name: 'WORK_CONTENT', type: 0},
|
{name: '作业内容、范围、方式', key_name: 'WORK_CONTENT', type: 0},
|
||||||
{name: '作业内容、范围、方式简图', key_name: 'CONTENT_IMG_PATH', type: 1},
|
{name: '作业内容、范围、方式简图', key_name: 'CONTENT_IMG_PATH', type: 1, oldUrl: ''},
|
||||||
{name: '关联的其他特殊作业及安全作业票编号', key_name: 'SPECIAL_WORK', type: 0},
|
{name: '关联的其他特殊作业及安全作业票编号', key_name: 'SPECIAL_WORK', type: 0},
|
||||||
{name: '风险辨识结果', key_name: 'RISK_IDENTIFICATION', type: 0},
|
{name: '风险辨识结果', key_name: 'RISK_IDENTIFICATION', type: 0},
|
||||||
{name: '申请人签字', key_name: 'SIGN', type: 5},
|
{name: '申请人签字', key_name: 'SIGN', type: 5},
|
||||||
|
@ -184,6 +184,7 @@ export default {
|
||||||
otherAssignmentsShow: false,
|
otherAssignmentsShow: false,
|
||||||
otherIdentificationShow: false,
|
otherIdentificationShow: false,
|
||||||
signVisible: false,
|
signVisible: false,
|
||||||
|
taskId: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async onLoad(options) {
|
async onLoad(options) {
|
||||||
|
@ -192,6 +193,7 @@ export default {
|
||||||
this.type = options.type
|
this.type = options.type
|
||||||
if (options.taskId) {
|
if (options.taskId) {
|
||||||
this.form = await getData(options.taskId)
|
this.form = await getData(options.taskId)
|
||||||
|
this.taskId = options.taskId
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -243,7 +245,8 @@ export default {
|
||||||
form: this.form,
|
form: this.form,
|
||||||
formItems: this.formItems,
|
formItems: this.formItems,
|
||||||
TYPE: this.type,
|
TYPE: this.type,
|
||||||
CORP_ID: this.form.CORP_ID
|
CORP_ID: this.form.CORP_ID,
|
||||||
|
EW_RU_TASK_ID: this.taskId
|
||||||
})
|
})
|
||||||
} catch {
|
} catch {
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,14 @@
|
||||||
</view>
|
</view>
|
||||||
<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"
|
||||||
|
@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">
|
<view class="flex-between">
|
||||||
<u-button type="primary" text="流程" size="mini" class="bth-mini"
|
<u-button type="primary" text="流程" size="mini" class="bth-mini"
|
||||||
@click="$u.route({
|
@click="$u.route({
|
||||||
|
@ -27,6 +35,7 @@
|
||||||
})"/>
|
})"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
</u-list-item>
|
</u-list-item>
|
||||||
</u-list>
|
</u-list>
|
||||||
<empty v-else></empty>
|
<empty v-else></empty>
|
||||||
|
|
|
@ -171,6 +171,7 @@ export default {
|
||||||
},
|
},
|
||||||
otherAssignmentsShow: false,
|
otherAssignmentsShow: false,
|
||||||
otherIdentificationShow: false,
|
otherIdentificationShow: false,
|
||||||
|
taskId: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async onLoad(options) {
|
async onLoad(options) {
|
||||||
|
@ -179,6 +180,7 @@ export default {
|
||||||
this.type = options.type
|
this.type = options.type
|
||||||
if (options.taskId) {
|
if (options.taskId) {
|
||||||
this.form = await getData(options.taskId)
|
this.form = await getData(options.taskId)
|
||||||
|
this.taskId = options.taskId
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -232,7 +234,8 @@ export default {
|
||||||
form: this.form,
|
form: this.form,
|
||||||
formItems: this.formItems,
|
formItems: this.formItems,
|
||||||
TYPE: this.type,
|
TYPE: this.type,
|
||||||
CORP_ID: this.form.CORP_ID
|
CORP_ID: this.form.CORP_ID,
|
||||||
|
EW_RU_TASK_ID: this.taskId
|
||||||
})
|
})
|
||||||
} catch {
|
} catch {
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,8 +128,8 @@ export default {
|
||||||
CORP_NAME: '',
|
CORP_NAME: '',
|
||||||
WORK_START_DATE: '',
|
WORK_START_DATE: '',
|
||||||
WORK_END_DATE: '',
|
WORK_END_DATE: '',
|
||||||
WORK_LONGITUDE: '1',
|
WORK_LONGITUDE: '',
|
||||||
WORK_LATITUDE: '2',
|
WORK_LATITUDE: '',
|
||||||
OTHER_DEPT: '',
|
OTHER_DEPT: '',
|
||||||
WORK_REASON: '',
|
WORK_REASON: '',
|
||||||
WORK_CONTENT: '',
|
WORK_CONTENT: '',
|
||||||
|
@ -184,6 +184,7 @@ export default {
|
||||||
otherAssignmentsShow: false,
|
otherAssignmentsShow: false,
|
||||||
otherIdentificationShow: false,
|
otherIdentificationShow: false,
|
||||||
signVisible: false,
|
signVisible: false,
|
||||||
|
taskId: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async onLoad(options) {
|
async onLoad(options) {
|
||||||
|
@ -192,6 +193,7 @@ export default {
|
||||||
this.type = options.type
|
this.type = options.type
|
||||||
if (options.taskId) {
|
if (options.taskId) {
|
||||||
this.form = await getData(options.taskId)
|
this.form = await getData(options.taskId)
|
||||||
|
this.taskId = options.taskId
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -243,7 +245,8 @@ export default {
|
||||||
form: this.form,
|
form: this.form,
|
||||||
formItems: this.formItems,
|
formItems: this.formItems,
|
||||||
TYPE: this.type,
|
TYPE: this.type,
|
||||||
CORP_ID: this.form.CORP_ID
|
CORP_ID: this.form.CORP_ID,
|
||||||
|
EW_RU_TASK_ID: this.taskId
|
||||||
})
|
})
|
||||||
} catch {
|
} catch {
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,8 +132,8 @@ export default {
|
||||||
CORP_NAME: '',
|
CORP_NAME: '',
|
||||||
WORK_START_DATE: '',
|
WORK_START_DATE: '',
|
||||||
WORK_END_DATE: '',
|
WORK_END_DATE: '',
|
||||||
WORK_LONGITUDE: '1',
|
WORK_LONGITUDE: '',
|
||||||
WORK_LATITUDE: '2',
|
WORK_LATITUDE: '',
|
||||||
WORK_PLACE: '',
|
WORK_PLACE: '',
|
||||||
WORK_CONTENT: '',
|
WORK_CONTENT: '',
|
||||||
WORK_USER: '',
|
WORK_USER: '',
|
||||||
|
@ -208,6 +208,7 @@ export default {
|
||||||
},
|
},
|
||||||
otherAssignmentsShow: false,
|
otherAssignmentsShow: false,
|
||||||
otherIdentificationShow: false,
|
otherIdentificationShow: false,
|
||||||
|
taskId: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async onLoad(options) {
|
async onLoad(options) {
|
||||||
|
@ -216,6 +217,7 @@ export default {
|
||||||
this.type = options.type
|
this.type = options.type
|
||||||
if (options.taskId) {
|
if (options.taskId) {
|
||||||
this.form = await getData(options.taskId)
|
this.form = await getData(options.taskId)
|
||||||
|
this.taskId = options.taskId
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -257,7 +259,8 @@ export default {
|
||||||
form: this.form,
|
form: this.form,
|
||||||
formItems: this.formItems,
|
formItems: this.formItems,
|
||||||
TYPE: this.type,
|
TYPE: this.type,
|
||||||
CORP_ID: this.form.CORP_ID
|
CORP_ID: this.form.CORP_ID,
|
||||||
|
EW_RU_TASK_ID: this.taskId
|
||||||
})
|
})
|
||||||
} catch {
|
} catch {
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,8 +121,8 @@ export default {
|
||||||
WORK_CONTENT: '',
|
WORK_CONTENT: '',
|
||||||
WORK_START_DATE: '',
|
WORK_START_DATE: '',
|
||||||
WORK_END_DATE: '',
|
WORK_END_DATE: '',
|
||||||
WORK_LONGITUDE: '1',
|
WORK_LONGITUDE: '',
|
||||||
WORK_LATITUDE: '2',
|
WORK_LATITUDE: '',
|
||||||
SPECIAL_WORK: '',
|
SPECIAL_WORK: '',
|
||||||
RISK_IDENTIFICATION: '',
|
RISK_IDENTIFICATION: '',
|
||||||
},
|
},
|
||||||
|
@ -168,6 +168,7 @@ export default {
|
||||||
},
|
},
|
||||||
otherAssignmentsShow: false,
|
otherAssignmentsShow: false,
|
||||||
otherIdentificationShow: false,
|
otherIdentificationShow: false,
|
||||||
|
taskId: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async onLoad(options) {
|
async onLoad(options) {
|
||||||
|
@ -176,6 +177,7 @@ export default {
|
||||||
this.type = options.type
|
this.type = options.type
|
||||||
if (options.taskId) {
|
if (options.taskId) {
|
||||||
this.form = await getData(options.taskId)
|
this.form = await getData(options.taskId)
|
||||||
|
this.taskId = options.taskId
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -232,7 +234,8 @@ export default {
|
||||||
form: this.form,
|
form: this.form,
|
||||||
formItems: this.formItems,
|
formItems: this.formItems,
|
||||||
TYPE: this.type,
|
TYPE: this.type,
|
||||||
CORP_ID: this.form.CORP_ID
|
CORP_ID: this.form.CORP_ID,
|
||||||
|
EW_RU_TASK_ID: this.taskId
|
||||||
})
|
})
|
||||||
} catch {
|
} catch {
|
||||||
}
|
}
|
||||||
|
|
|
@ -136,8 +136,8 @@ export default {
|
||||||
WORK_CONTENT: '',
|
WORK_CONTENT: '',
|
||||||
WORK_START_DATE: '',
|
WORK_START_DATE: '',
|
||||||
WORK_END_DATE: '',
|
WORK_END_DATE: '',
|
||||||
WORK_LONGITUDE: '1',
|
WORK_LONGITUDE: '',
|
||||||
WORK_LATITUDE: '2',
|
WORK_LATITUDE: '',
|
||||||
SPECIAL_WORK: '',
|
SPECIAL_WORK: '',
|
||||||
RISK_IDENTIFICATION: '',
|
RISK_IDENTIFICATION: '',
|
||||||
},
|
},
|
||||||
|
@ -186,6 +186,7 @@ export default {
|
||||||
},
|
},
|
||||||
otherAssignmentsShow: false,
|
otherAssignmentsShow: false,
|
||||||
otherIdentificationShow: false,
|
otherIdentificationShow: false,
|
||||||
|
taskId: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async onLoad(options) {
|
async onLoad(options) {
|
||||||
|
@ -194,6 +195,7 @@ export default {
|
||||||
this.type = options.type
|
this.type = options.type
|
||||||
if (options.taskId) {
|
if (options.taskId) {
|
||||||
this.form = await getData(options.taskId)
|
this.form = await getData(options.taskId)
|
||||||
|
this.taskId = options.taskId
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -251,7 +253,8 @@ export default {
|
||||||
form: this.form,
|
form: this.form,
|
||||||
formItems: this.formItems,
|
formItems: this.formItems,
|
||||||
TYPE: this.type,
|
TYPE: this.type,
|
||||||
CORP_ID: this.form.CORP_ID
|
CORP_ID: this.form.CORP_ID,
|
||||||
|
EW_RU_TASK_ID: this.taskId
|
||||||
})
|
})
|
||||||
} catch {
|
} catch {
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 }) => {
|
||||||
|
|
|
@ -94,7 +94,7 @@ export default {
|
||||||
},
|
},
|
||||||
fnSelectDepartment(index) {
|
fnSelectDepartment(index) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/eight_assignments/select_department",
|
url: `/pages/eight_assignments/select_department?CORP_ID=${this.form.CORP_ID}`,
|
||||||
events: {
|
events: {
|
||||||
confirm: (event) => {
|
confirm: (event) => {
|
||||||
this.hotWorkOperatorList[index].DEPARTMENT_NAME = event.DEPARTMENT_NAME;
|
this.hotWorkOperatorList[index].DEPARTMENT_NAME = event.DEPARTMENT_NAME;
|
||||||
|
@ -140,6 +140,7 @@ export default {
|
||||||
form: {...this.form, hotWorkOperatorList: this.hotWorkOperatorList},
|
form: {...this.form, hotWorkOperatorList: this.hotWorkOperatorList},
|
||||||
formItems: this.formItems,
|
formItems: this.formItems,
|
||||||
TYPE: "hotWork",
|
TYPE: "hotWork",
|
||||||
|
CORP_ID: this.form.CORP_ID,
|
||||||
EW_RU_TASK_ID: this.taskId,
|
EW_RU_TASK_ID: this.taskId,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -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>
|
|
@ -15,7 +15,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {getCorpList} from '@/api'
|
import {
|
||||||
|
getCorpInfoList
|
||||||
|
} from '@/api'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
|
@ -31,7 +33,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async fnGetData() {
|
async fnGetData() {
|
||||||
const resData = await getCorpList()
|
const resData = await getCorpInfoList()
|
||||||
this.list = resData.list.corpInfoDos
|
this.list = resData.list.corpInfoDos
|
||||||
},
|
},
|
||||||
fnConfirm() {
|
fnConfirm() {
|
||||||
|
|
|
@ -65,7 +65,6 @@ export default {
|
||||||
let CORP_ID = ''
|
let CORP_ID = ''
|
||||||
if (this.type === '0') CORP_ID = this.CORP_ID
|
if (this.type === '0') CORP_ID = this.CORP_ID
|
||||||
if (this.type === '2') CORP_ID = this.$store.getters.getUserInfo.CORPINFO_ID
|
if (this.type === '2') CORP_ID = this.$store.getters.getUserInfo.CORPINFO_ID
|
||||||
if (this.type === '1') CORP_ID = '1'
|
|
||||||
let resData = await getDepartmentTree({TYPE: this.type, CORP_ID})
|
let resData = await getDepartmentTree({TYPE: this.type, CORP_ID})
|
||||||
this.treeData = resData.tree.tree
|
this.treeData = resData.tree.tree
|
||||||
},
|
},
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -6,6 +6,7 @@ import {
|
||||||
setTaskSave
|
setTaskSave
|
||||||
} from "@/api";
|
} from "@/api";
|
||||||
import {addFormInfo} from "../api";
|
import {addFormInfo} from "../api";
|
||||||
|
import {filePath} from '@/utils/tools.js'
|
||||||
|
|
||||||
// 处理表单数据
|
// 处理表单数据
|
||||||
// TYPE 0 纯文本 1 图片 2 视频 3 divider标签 4 动态添加 5 签字
|
// TYPE 0 纯文本 1 图片 2 视频 3 divider标签 4 动态添加 5 签字
|
||||||
|
@ -27,7 +28,7 @@ const processFormData = async (formData, formItems) => {
|
||||||
const currentItem = uni.$u.deepClone(formData[formItem.key_name])
|
const currentItem = uni.$u.deepClone(formData[formItem.key_name])
|
||||||
const codeList = []
|
const codeList = []
|
||||||
for (let j = 0; j < currentItem.length; j++) {
|
for (let j = 0; j < currentItem.length; j++) {
|
||||||
const {CODE} = await setTaskFile({formData: {type: 0}, name: 'files', filePath: currentItem[j].url})
|
const {CODE} = await setTaskFile({formData: {type: currentItem[j].oldUrl}, name: 'files', filePath: currentItem[j].url})
|
||||||
codeList.push(CODE)
|
codeList.push(CODE)
|
||||||
}
|
}
|
||||||
obj.ITEM_VALUE = ''
|
obj.ITEM_VALUE = ''
|
||||||
|
@ -51,7 +52,7 @@ const processFormData = async (formData, formItems) => {
|
||||||
}
|
}
|
||||||
if (formItem.type === 5) {
|
if (formItem.type === 5) {
|
||||||
if (typeof formData[formItem.key_name] === 'string') {
|
if (typeof formData[formItem.key_name] === 'string') {
|
||||||
const {CODE} = await setTaskFile({formData: {type: 0}, name: 'files', filePath: formData[formItem.key_name]})
|
const {CODE} = await setTaskFile({formData: {type: formData[formItem.key_name + 'oldUrl']}, name: 'files', filePath: formData[formItem.key_name]})
|
||||||
obj.ITEM_VALUE = CODE
|
obj.ITEM_VALUE = CODE
|
||||||
} else {
|
} else {
|
||||||
throw Error('签字只支持字符串')
|
throw Error('签字只支持字符串')
|
||||||
|
@ -97,7 +98,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 +110,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 +156,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),
|
||||||
|
@ -265,7 +267,8 @@ export const getData = async (taskId) => {
|
||||||
}
|
}
|
||||||
if (item.TYPE === 1) {
|
if (item.TYPE === 1) {
|
||||||
form[item.ITEM_NAME] = item.list.map((item) => ({
|
form[item.ITEM_NAME] = item.list.map((item) => ({
|
||||||
url: this.$filePath + item.ITEM_VALUE,
|
url: filePath + item.ITEM_VALUE,
|
||||||
|
oldUrl: item.ITEM_VALUE
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
if (item.TYPE === 4) {
|
if (item.TYPE === 4) {
|
||||||
|
@ -279,9 +282,30 @@ export const getData = async (taskId) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (item.TYPE === 5) {
|
if (item.TYPE === 5) {
|
||||||
form[item.ITEM_NAME] = this.$filePath + item.ITEM_VALUE;
|
form[item.ITEM_NAME] = filePath + item.ITEM_VALUE;
|
||||||
|
form[item.ITEM_NAME + 'oldUrl'] = item.ITEM_VALUE;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
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