Ver código fonte

Merge branch 'dev' of https://gitee.com/JavaLionLi/plus-ui into dev

dap 1 ano atrás
pai
commit
ed66231d19

+ 4 - 2
src/api/login.ts

@@ -20,7 +20,8 @@ export function login(data: LoginData): AxiosPromise<LoginResult> {
     url: '/auth/login',
     headers: {
       isToken: false,
-      isEncrypt: true
+      isEncrypt: true,
+      repeatSubmit: false
     },
     method: 'post',
     data: params
@@ -38,7 +39,8 @@ export function register(data: any) {
     url: '/auth/register',
     headers: {
       isToken: false,
-      isEncrypt: true
+      isEncrypt: true,
+      repeatSubmit: false
     },
     method: 'post',
     data: params

+ 2 - 1
src/api/system/tenant/index.ts

@@ -25,7 +25,8 @@ export function addTenant(data: TenantForm) {
     url: '/system/tenant',
     method: 'post',
     headers: {
-      isEncrypt: true
+      isEncrypt: true,
+      repeatSubmit: false
     },
     data: data
   });

+ 4 - 2
src/api/system/user/index.ts

@@ -86,7 +86,8 @@ export const resetUserPwd = (userId: string | number, password: string) => {
     url: '/system/user/resetPwd',
     method: 'put',
     headers: {
-      isEncrypt: true
+      isEncrypt: true,
+      repeatSubmit: false
     },
     data: data
   });
@@ -145,7 +146,8 @@ export const updateUserPwd = (oldPassword: string, newPassword: string) => {
     url: '/system/user/profile/updatePwd',
     method: 'put',
     headers: {
-      isEncrypt: true
+      isEncrypt: true,
+      repeatSubmit: false
     },
     data: data
   });

+ 24 - 0
src/api/workflow/task/index.ts

@@ -238,3 +238,27 @@ export const delegateTask = (data: any) => {
     data: data
   });
 };
+
+/**
+ * 查询工作流任务用户选择加签人员
+ * @param taskId
+ * @returns {*}
+ */
+export const getTaskUserIdsByAddMultiInstance = (taskId: string) => {
+  return request({
+    url: '/workflow/task/getTaskUserIdsByAddMultiInstance/' + taskId,
+    method: 'get'
+  });
+};
+
+/**
+ * 查询工作流选择减签人员
+ * @param taskId
+ * @returns {*}
+ */
+export const getListByDeleteMultiInstance = (taskId: string) => {
+  return request({
+    url: '/workflow/task/getListByDeleteMultiInstance/' + taskId,
+    method: 'get'
+  });
+};

+ 0 - 53
src/api/workflow/workflowUser/index.ts

@@ -1,53 +0,0 @@
-import request from '@/utils/request';
-import { AxiosPromise } from 'axios';
-import { UserVO } from '@/api/system/user/types';
-
-/**
- * 分页查询工作流选择加签人员
- * @param query
- * @returns {*}
- */
-export const getPageByAddMultiInstance = (query: object) => {
-  return request({
-    url: '/workflow/user/getPageByAddMultiInstance',
-    method: 'get',
-    params: query
-  });
-};
-
-/**
- * 查询工作流选择减签人员
- * @param query
- * @returns {*}
- */
-export const getListByDeleteMultiInstance = (taskId: string) => {
-  return request({
-    url: '/workflow/user/getListByDeleteMultiInstance/' + taskId,
-    method: 'get'
-  });
-};
-
-/**
- * 按照用户id查询用户
- * @param userIdList
- * @returns {*}
- */
-export const getUserListByIds = (userIdList: any[]): AxiosPromise<UserVO[]> => {
-  return request({
-    url: '/workflow/user/getUserListByIds/' + userIdList,
-    method: 'get'
-  });
-};
-
-/**
- * 分页查询用户
- * @param query
- * @returns {*}
- */
-export const getPageByUserList = (query: object) => {
-  return request({
-    url: '/workflow/user/getPageByUserList',
-    method: 'get',
-    params: query
-  });
-};

+ 7 - 8
src/bpmn/panel/TaskPanel.vue

@@ -50,7 +50,7 @@
             <el-tabs tab-position="left" class="demo-tabs">
               <el-tab-pane label="身份存储">
                 <el-form-item label="分配人员">
-                  <el-input v-model="formData.assignee">
+                  <el-input v-model="formData.assignee" @blur="blurAssignee(formData.assignee)">
                     <template #append>
                       <el-button icon="Search" type="primary" @click="openSingleUserSelect" />
                     </template>
@@ -283,24 +283,23 @@ const dueDateRef = ref<InstanceType<typeof DueDate>>();
 
 const isMultiple = ref(true);
 const openUserSelect = () => {
-  if (!formData.value.candidateUsers) {
-    formData.value.candidateUsers = '-1';
-  }
   userSelectRef.value.open();
 };
 const openSingleUserSelect = () => {
+  if (formData.value.assignee.includes('$')) {
+    formData.value.assignee = '';
+  }
   singleUserSelectRef.value.open();
 };
 const openRoleSelect = () => {
-  if (!formData.value.candidateGroups) {
-    formData.value.candidateGroups = '-1';
-  }
   roleSelectRef.value.open();
 };
 const openDueDate = (e) => {
   dueDateRef.value.openDialog();
 };
-
+const blurAssignee = (assignee) => {
+  updateProperties({ 'flowable:assignee': assignee ? assignee : undefined });
+};
 const singleUserSelectCallBack = (data: UserVO[]) => {
   const user: UserVO = data.length !== 0 ? data[0] : undefined;
   updateProperties({ 'flowable:assignee': user?.userId });

+ 4 - 4
src/components/Process/approvalRecord.vue

@@ -5,14 +5,14 @@
         <el-tab-pane label="流程图" name="bpmn">
           <BpmnView ref="bpmnViewRef"></BpmnView>
         </el-tab-pane>
-        <el-tab-pane label="审批信息" name="info" v-loading="loading">
+        <el-tab-pane v-loading="loading" label="审批信息" name="info">
           <div>
             <el-table :data="historyList" style="width: 100%" border fit>
               <el-table-column type="index" label="序号" align="center" width="60"></el-table-column>
               <el-table-column prop="name" label="任务名称" sortable align="center"></el-table-column>
-              <el-table-column prop="nickName" label="办理人" sortable align="center">
+              <el-table-column prop="nickName" :show-overflow-tooltip="true" label="办理人" sortable align="center">
                 <template #default="scope">
-                  <el-tag type="success">{{ scope.row.nickName||'无' }}</el-tag>
+                  <el-tag type="success">{{ scope.row.nickName || '无' }}</el-tag>
                 </template>
               </el-table-column>
               <el-table-column label="状态" sortable align="center">
@@ -71,7 +71,7 @@ const bpmnViewRef = ref<BpmnView>();
 const init = async (instanceId: string) => {
   visible.value = true;
   loading.value = true;
-  tabActiveName.value = 'bpmn'
+  tabActiveName.value = 'bpmn';
   historyList.value = [];
   processApi.getHistoryRecord(instanceId).then((resp) => {
     historyList.value = resp.data.historyRecordList;

+ 15 - 7
src/components/Process/multiInstanceUser.vue

@@ -81,9 +81,13 @@
 </template>
 
 <script setup name="User" lang="ts">
-import { deptTreeSelect } from '@/api/system/user';
-import { getPageByAddMultiInstance, getListByDeleteMultiInstance, getUserListByIds } from '@/api/workflow/workflowUser';
-import { addMultiInstanceExecution, deleteMultiInstanceExecution } from '@/api/workflow/task';
+import { deptTreeSelect, listUser, optionSelect } from '@/api/system/user';
+import {
+  addMultiInstanceExecution,
+  deleteMultiInstanceExecution,
+  getTaskUserIdsByAddMultiInstance,
+  getListByDeleteMultiInstance
+} from '@/api/workflow/task';
 import { UserVO } from '@/api/system/user/types';
 import { DeptVO } from '@/api/system/dept/types';
 import { ComponentInternalInstance } from 'vue';
@@ -149,12 +153,14 @@ const getAddMultiInstanceList = async (taskId: string, userIdList: Array<number
   visible.value = true;
   queryParams.value.taskId = taskId;
   loading.value = true;
-  const res = await getPageByAddMultiInstance(queryParams.value);
+  const res1 = await getTaskUserIdsByAddMultiInstance(taskId);
+  queryParams.value.excludeUserIds = res1.data;
+  const res = await listUser(queryParams.value);
   loading.value = false;
   userList.value = res.rows;
   total.value = res.total;
   if (userList.value && userIds.value.length > 0) {
-    const data = await getUserListByIds(userIds.value);
+    const data = await optionSelect(userIds.value);
     if (data.data && data.data.length > 0) {
       chooseUserList.value = data.data;
       data.data.forEach((user: UserVO) => {
@@ -171,12 +177,14 @@ const getAddMultiInstanceList = async (taskId: string, userIdList: Array<number
 
 const getList = async () => {
   loading.value = true;
-  const res = await getPageByAddMultiInstance(queryParams.value);
+  const res1 = await getTaskUserIdsByAddMultiInstance(queryParams.value.taskId);
+  queryParams.value.excludeUserIds = res1.data;
+  const res = await listUser(queryParams.value);
   loading.value = false;
   userList.value = res.rows;
   total.value = res.total;
   if (userList.value && userIds.value.length > 0) {
-    const data = await getUserListByIds(userIds.value);
+    const data = await optionSelect(userIds.value);
     if (data.data && data.data.length > 0) {
       chooseUserList.value = data.data;
       data.data.forEach((user: UserVO) => {

+ 6 - 3
src/layout/components/AppMain.vue

@@ -2,9 +2,12 @@
   <section class="app-main">
     <router-view v-slot="{ Component, route }">
       <transition :enter-active-class="animante" mode="out-in">
-        <keep-alive :include="tagsViewStore.cachedViews">
-          <component :is="Component" v-if="!route.meta.link" :key="route.path" />
-        </keep-alive>
+        <div>
+          <keep-alive :include="tagsViewStore.cachedViews" v-if="!route.meta.noCache">
+            <component v-if="!route.meta.link" :is="Component" :key="route.path" />
+          </keep-alive>
+          <component v-if="!route.meta.link && route.meta.noCache" :is="Component" :key="route.path" />
+        </div>
       </transition>
     </router-view>
     <iframe-toggle />

+ 1 - 1
src/views/system/user/profile/onlineDevice.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-table :data="devices" style="width: 100%; height: 100%; font-size: 10px">
+    <el-table :data="devices" style="width: 100%; height: 100%; font-size: 14px">
       <el-table-column label="设备类型" align="center">
         <template #default="scope">
           <dict-tag :options="sys_device_type" :value="scope.row.deviceType" />

+ 2 - 2
src/views/system/user/profile/thirdParty.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
-    <el-table :data="auths" style="width: 100%; height: 100%; font-size: 10px">
-      <el-table-column label="序号" width="50" type="index"></el-table-column>
+    <el-table :data="auths" style="width: 100%; height: 100%; font-size: 14px">
+      <el-table-column label="序号" width="50" type="index" />
       <el-table-column label="绑定账号平台" width="140" align="center" prop="source" show-overflow-tooltip />
       <el-table-column label="头像" width="120" align="center" prop="avatar">
         <template #default="scope">

+ 2 - 2
src/views/workflow/leave/leaveEdit.vue

@@ -228,8 +228,8 @@ const handleStartWorkFlow = async (data: LeaveVO) => {
     taskVariables.value = {
       entity: data,
       leaveDays: data.leaveDays,
-      userList: [1, 2],
-      userList2: [1, 2]
+      userList: [1, 3],
+      userList2: [1, 3]
     };
     submitFormData.value.variables = taskVariables.value;
     const resp = await startWorkFlow(submitFormData.value);