diff --git a/api/index.js b/api/index.js
index e296e6d..fe2b077 100644
--- a/api/index.js
+++ b/api/index.js
@@ -1,4 +1,5 @@
import {post, upload, uploads} from "../utils/request";
+import {setSecurityMeasures} from "@/utils/submitHomeworkProcess";
export const submitLogin = (params) => post("/app/admin/check", params) // 登录
export const getIDCardDeduplication = (params) => post("/app/user/hasCardIdForApp", params) // 身份证去重
@@ -36,10 +37,10 @@ export const getEMPLOYMENTAPPLYMANAGEMENTID = (params) => post("/app/user/getEMP
// 以下接口八项作业流程使用
export const getCorpInfoList = (params) => post("/app/util/getCorp", params) //获取公司列表
-export const getConfinedSpaceSelectList = (params) => post("/app/eightWork/getSpace", {
- loading: false,
- ...params
-}) //获取受限空间名称选择列表
+export const getConfinedSpaceSelectList = (params) => post("/app/eightWork/getSpace", params) //获取受限空间名称选择列表
+export const getConfinedSpaceGasInfo = (params) => post("/app/eightWork/getGasInfo",params) //获取受限空间气体检测详情
+export const setConfinedSpaceGasInfoSave = (params) => post("/app/eightWork/initGas", params) //受限空间气体检测详情保存
+export const setConfinedSpaceGasDelete = (params) => post("/app/eightWork/deleteGas", params) //保存受限空间气体检测删除
export const getOtherAssignmentsSelectList = (params) => post("/app/Task/getAllUnEndList", params) //关联的其他特殊作业及安全作业票编号选择列表
export const getRiskIdentificationResultsSelectList = (params) => post("/app/eightWork/getInfo", params) //风险辨识结果选择列表
export const setTaskSave = (params) => post("/app/Task/init", params) //八项作业、隐患整改、安全环保检查任务保存更新接口
@@ -51,4 +52,6 @@ export const getTaskTechnologicalProcess = (params) => post("/app/Task/getAgency
export const getTaskInfo = (params) => post("/app/Task/getInfo", params) //查看信息
export const setTaskFile = (params) => upload("/app/util/uploadFile", params) //上传文件
export const setTaskSign = (params) => post("/app/Task/sign", params) //审批意见签字提交
+export const setSecurityMeasuresSave = (params) => post("/app/Task/setQues", params) //安全措施提交
+export const setOtherSecurityMeasuresSave = (params) => post("/app/Task/setOtherQues", params) //其它安全措施提交
// 结束
diff --git a/pages.json b/pages.json
index 8d05103..7513ae2 100644
--- a/pages.json
+++ b/pages.json
@@ -180,6 +180,58 @@
"navigationBarTitleText": "受限空间安全作业申请"
}
},
+ {
+ "path": "pages/eight_assignments/confined_space/gas/name",
+ "style": {
+ "navigationBarTitleText": "受限空间安全作业气体分析"
+ }
+ },
+ {
+ "path": "pages/eight_assignments/confined_space/gas/list",
+ "style": {
+ "navigationBarTitleText": "受限空间安全作业气体分析",
+ "app-plus": {
+ "titleNView": {
+ "buttons": [{
+ "text": "新建",
+ "fontSize": "15",
+ "float": "right",
+ "width": "40px"
+ }]
+ }
+ }
+ }
+ },
+ {
+ "path": "pages/eight_assignments/confined_space/gas/add",
+ "style": {
+ "navigationBarTitleText": "受限空间安全作业气体分析"
+ }
+ },
+ {
+ "path": "pages/eight_assignments/blind_board/apply",
+ "style": {
+ "navigationBarTitleText": "盲板抽堵作业申请"
+ }
+ },
+ {
+ "path": "pages/eight_assignments/break_ground/apply",
+ "style": {
+ "navigationBarTitleText": "动土作业申请"
+ }
+ },
+ {
+ "path": "pages/eight_assignments/high_work/apply",
+ "style": {
+ "navigationBarTitleText": "高处作业申请"
+ }
+ },
+ {
+ "path": "pages/eight_assignments/hoisting/apply",
+ "style": {
+ "navigationBarTitleText": "吊装作业申请"
+ }
+ },
{
"path": "pages/map/index",
"style": {
@@ -216,6 +268,12 @@
"navigationBarTitleText": "安全措施"
}
},
+ {
+ "path": "pages/eight_assignments/other_security_measures",
+ "style": {
+ "navigationBarTitleText": "其它安全措施"
+ }
+ },
{
"path": "pages/eight_assignments/technological_process",
"style": {
diff --git a/pages/eight_assignments/blind_board/apply.vue b/pages/eight_assignments/blind_board/apply.vue
new file mode 100644
index 0000000..08b907f
--- /dev/null
+++ b/pages/eight_assignments/blind_board/apply.vue
@@ -0,0 +1,368 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/eight_assignments/break_ground/apply.vue b/pages/eight_assignments/break_ground/apply.vue
new file mode 100644
index 0000000..bf95b66
--- /dev/null
+++ b/pages/eight_assignments/break_ground/apply.vue
@@ -0,0 +1,256 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/eight_assignments/confined_space/apply.vue b/pages/eight_assignments/confined_space/apply.vue
index e099b9c..8f4c3d1 100644
--- a/pages/eight_assignments/confined_space/apply.vue
+++ b/pages/eight_assignments/confined_space/apply.vue
@@ -127,7 +127,6 @@ export default {
},
rules: {
APPLY_DEPARTMENT_ID: [{type: 'string', required: true, message: '请选择申请单位', trigger: ['blur', 'change']}],
- APPLY_DEPARTMENT_NAME: [{type: 'string', required: true, message: '请选择申请人', trigger: ['blur', 'change']}],
APPLY_USER_NAME: [{type: 'string', required: true, message: '请选择申请人', trigger: ['blur', 'change']}],
CORP_NAME: [{type: 'string', required: true, message: '请选择作业分公司', trigger: ['blur', 'change']}],
BELONG_CORP: [{type: 'string', required: true, message: '请输入受限空间所属单位', trigger: ['blur', 'change']}],
diff --git a/pages/eight_assignments/confined_space/gas/add.vue b/pages/eight_assignments/confined_space/gas/add.vue
new file mode 100644
index 0000000..f1a8959
--- /dev/null
+++ b/pages/eight_assignments/confined_space/gas/add.vue
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/eight_assignments/confined_space/gas/list.vue b/pages/eight_assignments/confined_space/gas/list.vue
new file mode 100644
index 0000000..0a711de
--- /dev/null
+++ b/pages/eight_assignments/confined_space/gas/list.vue
@@ -0,0 +1,120 @@
+
+
+
+
+
+ 分析时间:{{ item.ANALYZE_TIME }}
+
+
+ 分析地点:{{ item.ANALYZE_PLACE }}
+
+
+ {{ GAS_NAME1 }}:{{ item.DATA1 }}
+
+
+ {{ GAS_NAME2 }}:{{ item.DATA2 }}
+
+
+ {{ GAS_NAME3 }}:{{ item.DATA3 }}
+
+
+ {{ GAS_NAME4 }}:{{ item.DATA4 }}
+
+
+ 含氧量:{{ item.OXYGEN_CONTENT }}
+
+
+ 分析人:{{ item.ANALYZE_USER_NAME }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/eight_assignments/confined_space/gas/name.vue b/pages/eight_assignments/confined_space/gas/name.vue
new file mode 100644
index 0000000..0a4df94
--- /dev/null
+++ b/pages/eight_assignments/confined_space/gas/name.vue
@@ -0,0 +1,116 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/eight_assignments/high_work/apply.vue b/pages/eight_assignments/high_work/apply.vue
new file mode 100644
index 0000000..db22945
--- /dev/null
+++ b/pages/eight_assignments/high_work/apply.vue
@@ -0,0 +1,256 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/eight_assignments/hoisting/apply.vue b/pages/eight_assignments/hoisting/apply.vue
new file mode 100644
index 0000000..f98f950
--- /dev/null
+++ b/pages/eight_assignments/hoisting/apply.vue
@@ -0,0 +1,274 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/eight_assignments/other_security_measures.vue b/pages/eight_assignments/other_security_measures.vue
new file mode 100644
index 0000000..cfd6567
--- /dev/null
+++ b/pages/eight_assignments/other_security_measures.vue
@@ -0,0 +1,73 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/eight_assignments/select_corp_info.vue b/pages/eight_assignments/select_corp_info.vue
index ce187f1..3831820 100644
--- a/pages/eight_assignments/select_corp_info.vue
+++ b/pages/eight_assignments/select_corp_info.vue
@@ -45,6 +45,22 @@ export default {
'confinedSpace': {
'035958e685cf4850bc40151c5e0617a6': '',
'default': '/pages/eight_assignments/confined_space/apply'
+ },
+ 'blindBoard': {
+ '035958e685cf4850bc40151c5e0617a6': '',
+ 'default': '/pages/eight_assignments/blind_board/apply'
+ },
+ 'breakGround': {
+ '035958e685cf4850bc40151c5e0617a6': '',
+ 'default': '/pages/eight_assignments/break_ground/apply'
+ },
+ 'highWork': {
+ '035958e685cf4850bc40151c5e0617a6': '',
+ 'default': '/pages/eight_assignments/high_work/apply'
+ },
+ 'hoisting': {
+ '035958e685cf4850bc40151c5e0617a6': '',
+ 'default': '/pages/eight_assignments/hoisting/apply'
}
}
const url = urlByTypeMap[this.type][this.select_corp] ?? urlByTypeMap[this.type].default
diff --git a/pages/eight_assignments/select_review_personnel.vue b/pages/eight_assignments/select_review_personnel.vue
index d0d563e..d6cc95a 100644
--- a/pages/eight_assignments/select_review_personnel.vue
+++ b/pages/eight_assignments/select_review_personnel.vue
@@ -130,20 +130,28 @@ export default {
return value.substring(0, value.indexOf('&&')) + `&&${guid}`
},
fnDelete(index, index1) {
- const departmentKeyId = this.list[index].list[index1].key_id
- const departmentKeyName = this.list[index].list[index1].key_name
- const userKeyId = this.list[index].list[index1 + 1].key_id
- const userKeyName = this.list[index].list[index1 + 1].key_name
- // 需要删除两遍,第一遍是部门,第二遍是人员
- this.list[index].list.splice(index1, 1)
- this.list[index].list.splice(index1, 1)
- // 在form和rules中删除
- delete this.form[departmentKeyId]
- delete this.form[departmentKeyName]
- delete this.form[userKeyId]
- delete this.form[userKeyName]
- delete this.rules[departmentKeyName]
- delete this.rules[userKeyName]
+ uni.showModal({
+ title: '提示',
+ content: '是否删除该条数据?',
+ success: (res) => {
+ if (res.confirm) {
+ const departmentKeyId = this.list[index].list[index1].key_id
+ const departmentKeyName = this.list[index].list[index1].key_name
+ const userKeyId = this.list[index].list[index1 + 1].key_id
+ const userKeyName = this.list[index].list[index1 + 1].key_name
+ // 需要删除两遍,第一遍是部门,第二遍是人员
+ this.list[index].list.splice(index1, 1)
+ this.list[index].list.splice(index1, 1)
+ // 在form和rules中删除
+ delete this.form[departmentKeyId]
+ delete this.form[departmentKeyName]
+ delete this.form[userKeyId]
+ delete this.form[userKeyName]
+ delete this.rules[departmentKeyName]
+ delete this.rules[userKeyName]
+ }
+ }
+ })
},
fnSelect({multiple}, {key_name, key_id, type, value}) {
const key_value = multiple === '1' ? key_id.substring(key_id.indexOf('&&') + 2) : value
diff --git a/pages/eight_assignments/view_info.vue b/pages/eight_assignments/view_info.vue
index b30f1bd..27dfef5 100644
--- a/pages/eight_assignments/view_info.vue
+++ b/pages/eight_assignments/view_info.vue
@@ -1,24 +1,29 @@
-
-
+
+
+
+
+
+
+
- 部门:{{item.DEPARTMENT_NAME}}
- 人员:{{item.USER_NAME}}
+ 部门:{{ item.DEPARTMENT_NAME }}
+ 人员:{{ item.USER_NAME }}
- 审批意见:{{item.APPROVAL_OPINIONS}}
- 审批意见:{{item.APPROVAL_TIME}}
+ 审批意见:{{ item.APPROVAL_OPINIONS }}
+ 审批意见:{{ item.APPROVAL_TIME }}
@@ -43,7 +48,8 @@ export default {
type: '',
jobId: '',
form: [],
- jobs: []
+ jobs: [],
+ questionnaires: [],
}
},
onLoad(query) {
@@ -60,11 +66,12 @@ export default {
let resData = await getTaskInfo({EW_RU_TASK_ID: taskId})
this.form = resData.list.form
this.jobs = resData.list.jobs
+ this.questionnaires = resData.list.questionnaires[0]
},
async fnSubmit() {
let CORP_ID = ''
for (let i = 0; i < this.form.length; i++) {
- if(this.form[i].FK_NAME === 'CORP_ID'){
+ if (this.form[i].FK_NAME === 'CORP_ID') {
CORP_ID = this.form[i].FK_VALUE
break
}
diff --git a/utils/submitHomeworkProcess.js b/utils/submitHomeworkProcess.js
index a6cce70..a190960 100644
--- a/utils/submitHomeworkProcess.js
+++ b/utils/submitHomeworkProcess.js
@@ -1,26 +1,67 @@
-import {getCurrentNextOperation, setTaskSave} from "@/api";
+import {
+ getCurrentNextOperation,
+ setOtherSecurityMeasuresSave,
+ setSecurityMeasuresSave,
+ setTaskFile,
+ setTaskSave
+} from "@/api";
// 处理表单数据
-const processFormData = (formData, formItems) => {
+// TYPE 0 纯文本 1 图片 2 视频 3 divider标签 4 动态添加 5 签字
+const processFormData = async (formData, formItems) => {
const form = []
for (let i = 0; i < formItems.length; i++) {
const formItem = formItems[i]
- form.push({
- ITEM: formItem.name,
- ITEM_NAME: formItem.key_name,
- ITEM_VALUE: formData[formItem.key_name],
+ const obj = {
+ ITEM: formItem.name || '',
+ ITEM_NAME: formItem.key_name || '',
+ ITEM_VALUE: formData[formItem.key_name] || '',
FK_NAME: formItem.key_id || '',
FK_VALUE: formData[formItem.key_id] || '',
TYPE: formItem.type,
SORT: i + 1
- })
+ }
+ if (formItem.type === 1 || formItem.type === 2) {
+ if (typeof formData[formItem.key_name] === 'object') {
+ const currentItem = uni.$u.deepClone(formData[formItem.key_name])
+ const codeList = []
+ for (let j = 0; j < currentItem.length; j++) {
+ const {CODE} = await setTaskFile({formData: {type: 0}, name: 'files', filePath: currentItem[j].url})
+ codeList.push(CODE)
+ }
+ obj.ITEM_VALUE = codeList
+ } else {
+ throw Error('图片和视频只支持数组')
+ }
+ }
+ if (formItem.type === 4) {
+ if (typeof formData[formItem.key_name] === 'object') {
+ const currentItem = uni.$u.deepClone(formData[formItem.key_name])
+ const itemList = []
+ for (let j = 0; j < currentItem.length; j++) {
+ itemList.push(await processFormData(currentItem[j], formItem.listStructure))
+ }
+ obj.ITEM_VALUE = JSON.stringify(itemList)
+ } else {
+ throw Error('动态表单只支持数组')
+ }
+ }
+ if (formItem.type === 5) {
+ if (typeof formData[formItem.key_name] === 'string') {
+ const {CODE} = await setTaskFile({formData: {type: 0}, name: 'files', filePath: formData[formItem.key_name]})
+ obj.ITEM_VALUE = CODE
+ } else {
+ throw Error('签字只支持字符串')
+ }
+ }
+ form.push(obj)
}
return form
}
// 提交表单基础信息
export const setSubmitForm = async ({form, formItems, TYPE, CORP_ID}) => {
const {taskIds} = await setTaskSave({
- data: [{form: processFormData(form, formItems)}],
+ data: [{form: await processFormData(form, formItems)}],
TYPE,
postMethod: 'application/json',
})
@@ -66,12 +107,26 @@ export const setPersonnelForm = async ({form, list, taskId, CORP_ID, TYPE}) => {
}
// 提交安全措施
export const setSecurityMeasures = async ({questionnaires, questionnaireInfo, taskId, EW_RU_JOB_ID, CORP_ID, TYPE}) => {
- await setTaskSave({
- data: [{
- questionnaires: [{items: questionnaires, questionnaire: questionnaireInfo}],
- task: {EW_RU_TASK_ID: taskId}
- }],
- JOB_ID: EW_RU_JOB_ID,
+ await setSecurityMeasuresSave({
+ questionnaires: [{items: questionnaires, questionnaire: questionnaireInfo}],
+ EW_RU_JOB_ID,
+ EW_RU_TASK_ID: taskId,
+ postMethod: 'application/json',
+ })
+ await resolveNextOperation({
+ EW_RU_TASK_ID: taskId,
+ CORP_ID,
+ TYPE,
+ EW_RU_JOB_ID
+ })
+}
+// 提交其它安全措施
+export const setOtherSecurityMeasures = async ({value, taskId, EW_RU_JOB_ID, CORP_ID, TYPE}) => {
+ const ADDITIONAL_COMMENT = value.map(item => item.value)
+ await setOtherSecurityMeasuresSave({
+ ADDITIONAL_COMMENT,
+ EW_RU_JOB_ID,
+ EW_RU_TASK_ID: taskId,
postMethod: 'application/json',
})
await resolveNextOperation({
@@ -94,7 +149,16 @@ const endCurrentPersonnelTechnologicalProcess = async ({EW_RU_TASK_ID}) => {
// CORP_ID选择的企业id
// TYPE作业类型
// EW_RU_JOB_ID当前操作节点的人员id
-export const resolveNextOperation = async ({EW_RU_TASK_ID, CORP_ID, TYPE, EW_RU_JOB_ID}, isLastStep = true) => {
+// isLastStep是否还有下一步,纯前端确定,不去后台获取
+export const resolveNextOperation = async (
+ {
+ EW_RU_TASK_ID = '',
+ CORP_ID = '',
+ TYPE = '',
+ EW_RU_JOB_ID = '',
+ },
+ isLastStep = true
+) => {
if (isLastStep) {
const {info} = await getCurrentNextOperation({EW_RU_TASK_ID, EW_RU_JOB_ID})
// 选人
@@ -130,6 +194,10 @@ export const resolveNextOperation = async ({EW_RU_TASK_ID, CORP_ID, TYPE, EW_RU_
}
// 填写其它安全措施
if (info.canAddFlag === '1') {
+ uni.$u.route({
+ url: '/pages/eight_assignments/other_security_measures',
+ params: {taskId: EW_RU_TASK_ID, EW_RU_JOB_ID, TYPE, CORP_ID}
+ })
return
}
// 签字
@@ -140,6 +208,14 @@ export const resolveNextOperation = async ({EW_RU_TASK_ID, CORP_ID, TYPE, EW_RU_
})
return
}
+ // 有限空间作业气体分析
+ if (info.otherFlag.DeYxQfFlag === '1') {
+ uni.$u.route({
+ url: '/pages/eight_assignments/confined_space/gas/name',
+ params: {taskId: EW_RU_TASK_ID, EW_RU_JOB_ID, TYPE}
+ })
+ return
+ }
// 没有下一步,结束流程,因为无法确定之前有多少步骤,跳转了多少页面,所以直接跳转到首页
await endCurrentPersonnelTechnologicalProcess({EW_RU_TASK_ID})
}