Browse Source

退回按钮功能实现

songxy 9 tháng trước cách đây
mục cha
commit
69860beaca

+ 2 - 2
client_h5/.env.dev

@@ -1,5 +1,5 @@
-VITE_BASE_URL='https://oa.zjugis.com:28080'
-# VITE_BASE_URL='http://10.10.10.7:18080'
+# VITE_BASE_URL='https://oa.zjugis.com:28080'
+VITE_BASE_URL='http://10.10.10.7:18080'
 # VITE_BASE_URL='http://localhost:6090/'
 
 

+ 7 - 1
client_h5/src/components/flowForm.vue

@@ -99,7 +99,7 @@ import { getSimpleUserMap } from '@/service/user'
 import PubsubService from "@/utils/PubsubService";
 import { formatDate, jsonToFormData } from "@/utils/common";
 import { FlowDTO, getNextActivity } from "@/service/flow";
-import { getTemplateOpinionListByFlowInstanceId, getOpinionListByFlowInstanceId } from '@/service/flow';
+import { getTemplateOpinionListByFlowInstanceId, getOpinionListByFlowInstanceId, getBtnHtml } from '@/service/flow';
 import calBack from "@/pages/handleCenter/calBack.vue";
 
 defineOptions({
@@ -136,6 +136,12 @@ if (_o && _o == 'v') {
 }
 if (_isCalBack && _isCalBack === '1') {
   isCallbackActivity.value = true
+} else {
+  getBtnHtml(flowInstanceId, activityInstanceId, userInfo.id).then(result => {
+    if (result && result.indexOf('退回') !== -1) {
+      isCallbackActivity.value = true
+    }
+  })
 }
 const currentOpinion = ref({
   id: '',

+ 0 - 2
client_h5/src/router/index.ts

@@ -14,8 +14,6 @@ const router = createRouter({
 })
 // 路由加载前
 router.beforeEach((to, from, next) => {
-  next();
-  return;
   getUserInfoPromise(true).then((isLogin) => {
     next(); 
     if (!isLogin) {

+ 5 - 0
client_h5/src/service/flow.ts

@@ -69,6 +69,11 @@ export const createProcessByModalId = async (createData: FlowCreateDTO) => {
   });
 }
 
+/** 获取流程意见操作按钮 */
+export const getBtnHtml = async (flowInstanceId: String, activityInstanceId: string, uId: string) => {
+  return await request.get(`/workflow/Transfer/getBtnHtml?flowInstanceId=${flowInstanceId}&activityInstanceId=${activityInstanceId}&uId=${uId}`);
+}
+
 /** 获取流程意见 */
 export const getOpinionListByFlowInstanceId = async (flowInstanceId: String) => {
   return await request.get(`/workflow/IFlowOpinion/getOpinionListByFlowInstanceId?flowInstanceId=${flowInstanceId}`);