Explorar el Código

日志填报获取任务流程接口更改

duy hace 1 año
padre
commit
15d3fbf49d
Se han modificado 2 ficheros con 38 adiciones y 4 borrados
  1. 6 0
      src/api/modules/other.js
  2. 32 4
      src/global/components/hc-report-modal/index.vue

+ 6 - 0
src/api/modules/other.js

@@ -111,6 +111,12 @@ export const queryFixedFlow1 = (form, msg = true) => httpApi({
     method: 'post',
     data: form,
 }, msg)
+//日志填报获取任务流程
+export const queryFixedFlow3 = (form, msg = true) => httpApi({
+    url: '/api/blade-business/eVisaTaskCheck/queryFixedFlow3',
+    method: 'post',
+    data: form,
+}, msg)
 //检查所选的流程环节处理人是否具有审批权限(三大填报页、日志列表的批量上报、首件列表的批量上报)
 export const checkCustomFlowUserIsEVisaPermissions = (form, msg = true) => httpApi({
     url: '/api/blade-business/eVisaTaskCheck/checkCustomFlowUserIsEVisaPermissions',

+ 32 - 4
src/global/components/hc-report-modal/index.vue

@@ -58,7 +58,7 @@
 <script setup>
 import { onMounted, ref, watch } from 'vue'
 //import tasksFlowApi from '~api/tasks/flow'
-import { ApprovalApi, queryFixedFlow, queryFixedFlow1 } from '~api/other'
+import { ApprovalApi, queryFixedFlow, queryFixedFlow1, queryFixedFlow3 } from '~api/other'
 import { arrIndex, arrToId, formValidate, getArrValue } from 'js-fast-way'
 
 const props = defineProps({
@@ -233,15 +233,17 @@ const processDefaultData = [{ id: 0, fixedFlowName: '自定义流程', disabled:
 const getProcessDatasApi = () => {
     if (isShow.value) {
         const type = isTypes.value
-        if (type === 'first' || type === 'log' || type === 'wbs') {
+        if (type === 'first' || type === 'wbs') {
             queryFixedFlowApi(type, typeDatas.value)
         } else if (type === 'query') {
             getProcessData(type, typeDatas.value)
+        } else if (type === 'log') {
+            queryFixedFlowApi3(type, typeDatas.value)
         }
     }
 }
 
-//获取流程数据
+//获取资料查询获取流程数据
 const infoIds = ref('')
 const linkUserJoinString = ref('')
 const getProcessData = async (type, datas) => {
@@ -301,7 +303,33 @@ const queryFixedFlowApi = async (type, datas) => {
         processData.value = processDefaultData
     }
 }
-
+//日志填报获取流程数据
+const queryFixedFlowApi3 = async (type, datas) => {
+    let flowJson = {}
+    if (type === 'first') {
+        flowJson['firstId'] = datas
+    } else if (type === 'log') {
+        flowJson['theLogPrimaryKeyId'] = datas
+    } else if (type === 'wbs') {
+        flowJson['privatePKeyId'] = datas
+    }
+    //请求数据
+    linkUserJoinString.value = ''
+    const { error, code, data } = await queryFixedFlow3({
+        projectId: projectId.value,
+        contractId: contractId.value,
+        ...flowJson,
+        nodeId:formModel.value.ids,
+        classifyType:classifyType.value,
+        tableOwner:tableOwner.value,
+    })
+    if (!error && code === 200) {
+        const arr = getArrValue(data['records'])
+        processData.value = [...processDefaultData, ...arr]
+    } else {
+        processData.value = processDefaultData
+    }
+}
 //流程数据切换
 const diyProcessUser = ref(false)
 const handleProcessValue = (val) => {