diff --git a/src/api/bpm/category/index.ts b/src/api/bpm/category/index.ts new file mode 100644 index 00000000..d1e109cb --- /dev/null +++ b/src/api/bpm/category/index.ts @@ -0,0 +1,43 @@ +import request from '@/config/axios' + +// BPM 流程分类 VO +export interface CategoryVO { + id: number // 分类编号 + name: string // 分类名 + code: string // 分类标志 + status: number // 分类状态 + sort: number // 分类排序 +} + +// BPM 流程分类 API +export const CategoryApi = { + // 查询流程分类分页 + getCategoryPage: async (params: any) => { + return await request.get({ url: `/bpm/category/page`, params }) + }, + + // 查询流程分类列表 + getCategorySimpleList: async () => { + return await request.get({ url: `/bpm/category/simple-list` }) + }, + + // 查询流程分类详情 + getCategory: async (id: number) => { + return await request.get({ url: `/bpm/category/get?id=` + id }) + }, + + // 新增流程分类 + createCategory: async (data: CategoryVO) => { + return await request.post({ url: `/bpm/category/create`, data }) + }, + + // 修改流程分类 + updateCategory: async (data: CategoryVO) => { + return await request.put({ url: `/bpm/category/update`, data }) + }, + + // 删除流程分类 + deleteCategory: async (id: number) => { + return await request.delete({ url: `/bpm/category/delete?id=` + id }) + } +} diff --git a/src/api/bpm/definition/index.ts b/src/api/bpm/definition/index.ts index c0e51fab..cb6d4271 100644 --- a/src/api/bpm/definition/index.ts +++ b/src/api/bpm/definition/index.ts @@ -1,8 +1,9 @@ import request from '@/config/axios' -export const getProcessDefinitionBpmnXML = async (id: number) => { +export const getProcessDefinition = async (id: number, key: string) => { return await request.get({ - url: '/bpm/process-definition/get-bpmn-xml?id=' + id + url: '/bpm/process-definition/get', + params: { id, key } }) } diff --git a/src/api/bpm/form/index.ts b/src/api/bpm/form/index.ts index 142ed24c..7fce11fc 100644 --- a/src/api/bpm/form/index.ts +++ b/src/api/bpm/form/index.ts @@ -49,8 +49,8 @@ export const getFormPage = async (params) => { } // 获得动态表单的精简列表 -export const getSimpleFormList = async () => { +export const getFormSimpleList = async () => { return await request.get({ - url: '/bpm/form/list-all-simple' + url: '/bpm/form/simple-list' }) } diff --git a/src/api/bpm/leave/index.ts b/src/api/bpm/leave/index.ts index d4fe8d58..4f374b2f 100644 --- a/src/api/bpm/leave/index.ts +++ b/src/api/bpm/leave/index.ts @@ -2,7 +2,7 @@ import request from '@/config/axios' export type LeaveVO = { id: number - result: number + status: number type: number reason: string processInstanceId: string diff --git a/src/api/bpm/processExpression/index.ts b/src/api/bpm/processExpression/index.ts new file mode 100644 index 00000000..af6a7372 --- /dev/null +++ b/src/api/bpm/processExpression/index.ts @@ -0,0 +1,42 @@ +import request from '@/config/axios' + +// BPM 流程表达式 VO +export interface ProcessExpressionVO { + id: number // 编号 + name: string // 表达式名字 + status: number // 表达式状态 + expression: string // 表达式 +} + +// BPM 流程表达式 API +export const ProcessExpressionApi = { + // 查询BPM 流程表达式分页 + getProcessExpressionPage: async (params: any) => { + return await request.get({ url: `/bpm/process-expression/page`, params }) + }, + + // 查询BPM 流程表达式详情 + getProcessExpression: async (id: number) => { + return await request.get({ url: `/bpm/process-expression/get?id=` + id }) + }, + + // 新增BPM 流程表达式 + createProcessExpression: async (data: ProcessExpressionVO) => { + return await request.post({ url: `/bpm/process-expression/create`, data }) + }, + + // 修改BPM 流程表达式 + updateProcessExpression: async (data: ProcessExpressionVO) => { + return await request.put({ url: `/bpm/process-expression/update`, data }) + }, + + // 删除BPM 流程表达式 + deleteProcessExpression: async (id: number) => { + return await request.delete({ url: `/bpm/process-expression/delete?id=` + id }) + }, + + // 导出BPM 流程表达式 Excel + exportProcessExpression: async (params) => { + return await request.download({ url: `/bpm/process-expression/export-excel`, params }) + } +} \ No newline at end of file diff --git a/src/api/bpm/processInstance/index.ts b/src/api/bpm/processInstance/index.ts index a937eae2..81640625 100644 --- a/src/api/bpm/processInstance/index.ts +++ b/src/api/bpm/processInstance/index.ts @@ -20,51 +20,49 @@ export type ProcessInstanceVO = { endTime: string } -export type ProcessInstanceCCVO = { - type: number, - taskName: string, - taskKey: string, - processInstanceName: string, - processInstanceKey: string, - startUserId: string, - options:string [], +export type ProcessInstanceCopyVO = { + type: number + taskName: string + taskKey: string + processInstanceName: string + processInstanceKey: string + startUserId: string + options: string[] reason: string } -export const getMyProcessInstancePage = async (params) => { +export const getProcessInstanceMyPage = async (params: any) => { return await request.get({ url: '/bpm/process-instance/my-page', params }) } +export const getProcessInstanceManagerPage = async (params: any) => { + return await request.get({ url: '/bpm/process-instance/manager-page', params }) +} + export const createProcessInstance = async (data) => { return await request.post({ url: '/bpm/process-instance/create', data: data }) } -export const cancelProcessInstance = async (id: number, reason: string) => { +export const cancelProcessInstanceByStartUser = async (id: number, reason: string) => { const data = { id: id, reason: reason } - return await request.delete({ url: '/bpm/process-instance/cancel', data: data }) + return await request.delete({ url: '/bpm/process-instance/cancel-by-start-user', data: data }) } -export const getProcessInstance = async (id: number) => { +export const cancelProcessInstanceByAdmin = async (id: number, reason: string) => { + const data = { + id: id, + reason: reason + } + return await request.delete({ url: '/bpm/process-instance/cancel-by-admin', data: data }) +} + +export const getProcessInstance = async (id: string) => { return await request.get({ url: '/bpm/process-instance/get?id=' + id }) } -/** - * 抄送 - * @param data 抄送数据 - * @returns 是否抄送成功 - */ -export const createProcessInstanceCC = async (data) => { - return await request.post({ url: '/bpm/process-instance/cc/create', data: data }) +export const getProcessInstanceCopyPage = async (params: any) => { + return await request.get({ url: '/bpm/process-instance/copy/page', params }) } - -/** - * 抄送列表 - * @param params - * @returns - */ -export const getProcessInstanceCCPage = async (params) => { - return await request.get({ url: '/bpm/process-instance/cc/my-page', params }) -} \ No newline at end of file diff --git a/src/api/bpm/processListener/index.ts b/src/api/bpm/processListener/index.ts new file mode 100644 index 00000000..dabaa476 --- /dev/null +++ b/src/api/bpm/processListener/index.ts @@ -0,0 +1,40 @@ +import request from '@/config/axios' + +// BPM 流程监听器 VO +export interface ProcessListenerVO { + id: number // 编号 + name: string // 监听器名字 + type: string // 监听器类型 + status: number // 监听器状态 + event: string // 监听事件 + valueType: string // 监听器值类型 + value: string // 监听器值 +} + +// BPM 流程监听器 API +export const ProcessListenerApi = { + // 查询流程监听器分页 + getProcessListenerPage: async (params: any) => { + return await request.get({ url: `/bpm/process-listener/page`, params }) + }, + + // 查询流程监听器详情 + getProcessListener: async (id: number) => { + return await request.get({ url: `/bpm/process-listener/get?id=` + id }) + }, + + // 新增流程监听器 + createProcessListener: async (data: ProcessListenerVO) => { + return await request.post({ url: `/bpm/process-listener/create`, data }) + }, + + // 修改流程监听器 + updateProcessListener: async (data: ProcessListenerVO) => { + return await request.put({ url: `/bpm/process-listener/update`, data }) + }, + + // 删除流程监听器 + deleteProcessListener: async (id: number) => { + return await request.delete({ url: `/bpm/process-listener/delete?id=` + id }) + } +} diff --git a/src/api/bpm/task/index.ts b/src/api/bpm/task/index.ts index df6d8160..f3cda9f7 100644 --- a/src/api/bpm/task/index.ts +++ b/src/api/bpm/task/index.ts @@ -4,78 +4,63 @@ export type TaskVO = { id: number } -export const getTodoTaskPage = async (params) => { +export const getTaskTodoPage = async (params: any) => { return await request.get({ url: '/bpm/task/todo-page', params }) } -export const getDoneTaskPage = async (params) => { +export const getTaskDonePage = async (params: any) => { return await request.get({ url: '/bpm/task/done-page', params }) } -export const completeTask = async (data) => { - return await request.put({ url: '/bpm/task/complete', data }) +export const getTaskManagerPage = async (params: any) => { + return await request.get({ url: '/bpm/task/manager-page', params }) } -export const approveTask = async (data) => { +export const approveTask = async (data: any) => { return await request.put({ url: '/bpm/task/approve', data }) } -export const rejectTask = async (data) => { +export const rejectTask = async (data: any) => { return await request.put({ url: '/bpm/task/reject', data }) } -export const backTask = async (data) => { - return await request.put({ url: '/bpm/task/back', data }) -} -export const updateTaskAssignee = async (data) => { - return await request.put({ url: '/bpm/task/update-assignee', data }) -} - -export const getTaskListByProcessInstanceId = async (processInstanceId) => { +export const getTaskListByProcessInstanceId = async (processInstanceId: string) => { return await request.get({ url: '/bpm/task/list-by-process-instance-id?processInstanceId=' + processInstanceId }) } -// 导出任务 -export const exportTask = async (params) => { - return await request.download({ url: '/bpm/task/export', params }) -} - // 获取所有可回退的节点 -export const getReturnList = async (params) => { - return await request.get({ url: '/bpm/task/return-list', params }) +export const getTaskListByReturn = async (id: string) => { + return await request.get({ url: '/bpm/task/list-by-return', params: { id } }) } // 回退 -export const returnTask = async (data) => { +export const returnTask = async (data: any) => { return await request.put({ url: '/bpm/task/return', data }) } -/** - * 委派 - */ -export const delegateTask = async (data) => { +// 委派 +export const delegateTask = async (data: any) => { return await request.put({ url: '/bpm/task/delegate', data }) } -/** - * 加签 - */ -export const taskAddSign = async (data) => { +// 转派 +export const transferTask = async (data: any) => { + return await request.put({ url: '/bpm/task/transfer', data }) +} + +// 加签 +export const signCreateTask = async (data: any) => { return await request.put({ url: '/bpm/task/create-sign', data }) } -/** - * 获取减签任务列表 - */ -export const getChildrenTaskList = async (id: string) => { - return await request.get({ url: '/bpm/task/children-list?taskId=' + id }) -} - -/** - * 减签 - */ -export const taskSubSign = async (data) => { +// 减签 +export const signDeleteTask = async (data: any) => { return await request.delete({ url: '/bpm/task/delete-sign', data }) } + +// 获取减签任务列表 +export const getChildrenTaskList = async (id: string) => { + return await request.get({ url: '/bpm/task/list-by-parent-task-id?parentTaskId=' + id }) +} diff --git a/src/api/bpm/taskAssignRule/index.ts b/src/api/bpm/taskAssignRule/index.ts deleted file mode 100644 index 5fbe342d..00000000 --- a/src/api/bpm/taskAssignRule/index.ts +++ /dev/null @@ -1,29 +0,0 @@ -import request from '@/config/axios' - -export type TaskAssignVO = { - id: number - modelId: string - processDefinitionId: string - taskDefinitionKey: string - taskDefinitionName: string - options: string[] - type: number -} - -export const getTaskAssignRuleList = async (params) => { - return await request.get({ url: '/bpm/task-assign-rule/list', params }) -} - -export const createTaskAssignRule = async (data: TaskAssignVO) => { - return await request.post({ - url: '/bpm/task-assign-rule/create', - data: data - }) -} - -export const updateTaskAssignRule = async (data: TaskAssignVO) => { - return await request.put({ - url: '/bpm/task-assign-rule/update', - data: data - }) -} diff --git a/src/api/bpm/userGroup/index.ts b/src/api/bpm/userGroup/index.ts index 035762bf..7d12755e 100644 --- a/src/api/bpm/userGroup/index.ts +++ b/src/api/bpm/userGroup/index.ts @@ -4,7 +4,7 @@ export type UserGroupVO = { id: number name: string description: string - memberUserIds: number[] + userIds: number[] status: number remark: string createTime: string @@ -42,6 +42,6 @@ export const getUserGroupPage = async (params) => { } // 获取用户组精简信息列表 -export const getSimpleUserGroupList = async (): Promise => { - return await request.get({ url: '/bpm/user-group/list-all-simple' }) +export const getUserGroupSimpleList = async (): Promise => { + return await request.get({ url: '/bpm/user-group/simple-list' }) } diff --git a/src/api/crm/business/index.ts b/src/api/crm/business/index.ts index b6661765..24204255 100644 --- a/src/api/crm/business/index.ts +++ b/src/api/crm/business/index.ts @@ -1,5 +1,5 @@ import request from '@/config/axios' -import { TransferReqVO } from '@/api/crm/customer' +import { TransferReqVO } from '@/api/crm/permission' export interface BusinessVO { id: number diff --git a/src/api/crm/clue/index.ts b/src/api/crm/clue/index.ts index 170f244d..9736514d 100644 --- a/src/api/crm/clue/index.ts +++ b/src/api/crm/clue/index.ts @@ -1,5 +1,5 @@ import request from '@/config/axios' -import { TransferReqVO } from '@/api/crm/customer' +import { TransferReqVO } from '@/api/crm/permission' export interface ClueVO { id: number // 编号 diff --git a/src/api/crm/contact/index.ts b/src/api/crm/contact/index.ts index 67036194..7c24dfa9 100644 --- a/src/api/crm/contact/index.ts +++ b/src/api/crm/contact/index.ts @@ -1,5 +1,5 @@ import request from '@/config/axios' -import { TransferReqVO } from '@/api/crm/customer' +import { TransferReqVO } from '@/api/crm/permission' export interface ContactVO { id: number // 编号 diff --git a/src/api/crm/contract/index.ts b/src/api/crm/contract/index.ts index faee9495..7028b774 100644 --- a/src/api/crm/contract/index.ts +++ b/src/api/crm/contract/index.ts @@ -1,5 +1,5 @@ import request from '@/config/axios' -import { TransferReqVO } from '@/api/crm/customer' +import { TransferReqVO } from '@/api/crm/permission' export interface ContractVO { id: number diff --git a/src/api/crm/customer/index.ts b/src/api/crm/customer/index.ts index c684e98d..d149d4e7 100644 --- a/src/api/crm/customer/index.ts +++ b/src/api/crm/customer/index.ts @@ -1,4 +1,5 @@ import request from '@/config/axios' +import { TransferReqVO } from '@/api/crm/permission' export interface CustomerVO { id: number // 编号 @@ -102,12 +103,6 @@ export const getCustomerSimpleList = async () => { // ======================= 业务操作 ======================= -export interface TransferReqVO { - id: number | undefined // 客户编号 - newOwnerUserId: number | undefined // 新负责人的用户编号 - oldOwnerPermissionLevel: number | undefined // 老负责人加入团队后的权限级别 -} - // 客户转移 export const transferCustomer = async (data: TransferReqVO) => { return await request.put({ url: '/crm/customer/transfer', data }) diff --git a/src/api/crm/permission/index.ts b/src/api/crm/permission/index.ts index 31f9e18d..e1f31747 100644 --- a/src/api/crm/permission/index.ts +++ b/src/api/crm/permission/index.ts @@ -6,6 +6,7 @@ export interface PermissionVO { bizType: number // Crm 类型 bizId: number // Crm 类型数据编号 level: number // 权限级别 + toBizTypes?: number[] // 同时添加至 deptName?: string // 部门名称 nickname?: string // 用户昵称 postNames?: string[] // 岗位名称数组 @@ -13,6 +14,13 @@ export interface PermissionVO { ids?: number[] } +export interface TransferReqVO { + bizId: number // 模块编号 + newOwnerUserId: number // 新负责人的用户编号 + oldOwnerPermissionLevel: number // 老负责人加入团队后的权限级别 + toBizTypes?: number[] // 转移客户时,需要额外有【联系人】【商机】【合同】的 checkbox 选择 +} + /** * CRM 业务类型枚举 * diff --git a/src/api/crm/receivable/index.ts b/src/api/crm/receivable/index.ts index 069d6c4a..32ecd25a 100644 --- a/src/api/crm/receivable/index.ts +++ b/src/api/crm/receivable/index.ts @@ -3,18 +3,20 @@ import request from '@/config/axios' export interface ReceivableVO { id: number no: string - planId: number - customerId: number + planId?: number + customerId?: number customerName?: string - contractId: number + contractId?: number contract?: { + id?: number + name?: string no: string totalPrice: number } auditStatus: number processInstanceId: number returnTime: Date - returnType: string + returnType: number price: number ownerUserId: number ownerUserName?: string diff --git a/src/api/crm/receivable/plan/index.ts b/src/api/crm/receivable/plan/index.ts index 6e0cab4a..770b3477 100644 --- a/src/api/crm/receivable/plan/index.ts +++ b/src/api/crm/receivable/plan/index.ts @@ -11,7 +11,7 @@ export interface ReceivablePlanVO { remindTime: Date customerId: number customerName?: string - contractId: number + contractId?: number contractNo?: string ownerUserId: number ownerUserName?: string diff --git a/src/api/crm/statistics/customer.ts b/src/api/crm/statistics/customer.ts new file mode 100644 index 00000000..4358db77 --- /dev/null +++ b/src/api/crm/statistics/customer.ts @@ -0,0 +1,116 @@ +import request from '@/config/axios' + +export interface CrmStatisticsCustomerSummaryByDateRespVO { + time: string + customerCreateCount: number + customerDealCount: number +} + +export interface CrmStatisticsCustomerSummaryByUserRespVO { + ownerUserName: string + customerCreateCount: number + customerDealCount: number + contractPrice: number + receivablePrice: number +} + +export interface CrmStatisticsFollowupSummaryByDateRespVO { + time: string + followupRecordCount: number + followupCustomerCount: number +} + +export interface CrmStatisticsFollowupSummaryByUserRespVO { + ownerUserName: string + followupRecordCount: number + followupCustomerCount: number +} + +export interface CrmStatisticsFollowupSummaryByTypeRespVO { + followupType: string + followupRecordCount: number +} + +export interface CrmStatisticsCustomerContractSummaryRespVO { + customerName: string + contractName: string + totalPrice: number + receivablePrice: number + customerType: string + customerSource: string + ownerUserName: string + creatorUserName: string + createTime: Date + orderDate: Date +} + +export interface CrmStatisticsCustomerDealCycleByDateRespVO { + time: string + customerDealCycle: number +} + +export interface CrmStatisticsCustomerDealCycleByUserRespVO { + ownerUserName: string + customerDealCycle: number + customerDealCount: number +} + +// 客户分析 API +export const StatisticsCustomerApi = { + // 1.1 客户总量分析(按日期) + getCustomerSummaryByDate: (params: any) => { + return request.get({ + url: '/crm/statistics-customer/get-customer-summary-by-date', + params + }) + }, + // 1.2 客户总量分析(按用户) + getCustomerSummaryByUser: (params: any) => { + return request.get({ + url: '/crm/statistics-customer/get-customer-summary-by-user', + params + }) + }, + // 2.1 客户跟进次数分析(按日期) + getFollowupSummaryByDate: (params: any) => { + return request.get({ + url: '/crm/statistics-customer/get-followup-summary-by-date', + params + }) + }, + // 2.2 客户跟进次数分析(按用户) + getFollowupSummaryByUser: (params: any) => { + return request.get({ + url: '/crm/statistics-customer/get-followup-summary-by-user', + params + }) + }, + // 3.1 获取客户跟进方式统计数 + getFollowupSummaryByType: (params: any) => { + return request.get({ + url: '/crm/statistics-customer/get-followup-summary-by-type', + params + }) + }, + // 4.1 合同摘要信息(客户转化率页面) + getContractSummary: (params: any) => { + return request.get({ + url: '/crm/statistics-customer/get-contract-summary', + params + }) + }, + // 5.1 获取客户成交周期(按日期) + getCustomerDealCycleByDate: (params: any) => { + return request.get({ + url: '/crm/statistics-customer/get-customer-deal-cycle-by-date', + params + }) + }, + // 5.2 获取客户成交周期(按用户) + getCustomerDealCycleByUser: (params: any) => { + return request.get({ + url: '/crm/statistics-customer/get-customer-deal-cycle-by-user', + params + }) + } +} diff --git a/src/components/SimpleProcessDesigner/src/addNode.vue b/src/components/SimpleProcessDesigner/src/addNode.vue new file mode 100644 index 00000000..6d09ae8a --- /dev/null +++ b/src/components/SimpleProcessDesigner/src/addNode.vue @@ -0,0 +1,237 @@ +/* stylelint-disable order/properties-order */ + + + diff --git a/src/components/SimpleProcessDesigner/src/nodeWrap.vue b/src/components/SimpleProcessDesigner/src/nodeWrap.vue new file mode 100644 index 00000000..3c9d5eb1 --- /dev/null +++ b/src/components/SimpleProcessDesigner/src/nodeWrap.vue @@ -0,0 +1,297 @@ + + + + diff --git a/src/components/SimpleProcessDesigner/src/util.ts b/src/components/SimpleProcessDesigner/src/util.ts new file mode 100644 index 00000000..f4acd76c --- /dev/null +++ b/src/components/SimpleProcessDesigner/src/util.ts @@ -0,0 +1,165 @@ +/** + * todo + */ +export const arrToStr = (arr?: [{ name: string }]) => { + if (arr) { + return arr + .map((item) => { + return item.name + }) + .toString() + } +} + +export const setApproverStr = (nodeConfig: any) => { + if (nodeConfig.settype == 1) { + if (nodeConfig.nodeUserList.length == 1) { + return nodeConfig.nodeUserList[0].name + } else if (nodeConfig.nodeUserList.length > 1) { + if (nodeConfig.examineMode == 1) { + return arrToStr(nodeConfig.nodeUserList) + } else if (nodeConfig.examineMode == 2) { + return nodeConfig.nodeUserList.length + '人会签' + } + } + } else if (nodeConfig.settype == 2) { + const level = + nodeConfig.directorLevel == 1 ? '直接主管' : '第' + nodeConfig.directorLevel + '级主管' + if (nodeConfig.examineMode == 1) { + return level + } else if (nodeConfig.examineMode == 2) { + return level + '会签' + } + } else if (nodeConfig.settype == 4) { + if (nodeConfig.selectRange == 1) { + return '发起人自选' + } else { + if (nodeConfig.nodeUserList.length > 0) { + if (nodeConfig.selectRange == 2) { + return '发起人自选' + } else { + return '发起人从' + nodeConfig.nodeUserList[0].name + '中自选' + } + } else { + return '' + } + } + } else if (nodeConfig.settype == 5) { + return '发起人自己' + } else if (nodeConfig.settype == 7) { + return '从直接主管到通讯录中级别最高的第' + nodeConfig.examineEndDirectorLevel + '个层级主管' + } +} + +export const copyerStr = (nodeConfig: any) => { + if (nodeConfig.nodeUserList.length != 0) { + return arrToStr(nodeConfig.nodeUserList) + } else { + if (nodeConfig.ccSelfSelectFlag == 1) { + return '发起人自选' + } + } +} +export const conditionStr = (nodeConfig, index) => { + const { conditionList, nodeUserList } = nodeConfig.conditionNodes[index] + if (conditionList.length == 0) { + return index == nodeConfig.conditionNodes.length - 1 && + nodeConfig.conditionNodes[0].conditionList.length != 0 + ? '其他条件进入此流程' + : '请设置条件' + } else { + let str = '' + for (let i = 0; i < conditionList.length; i++) { + const { + columnId, + columnType, + showType, + showName, + optType, + zdy1, + opt1, + zdy2, + opt2, + fixedDownBoxValue + } = conditionList[i] + if (columnId == 0) { + if (nodeUserList.length != 0) { + str += '发起人属于:' + str += + nodeUserList + .map((item) => { + return item.name + }) + .join('或') + ' 并且 ' + } + } + if (columnType == 'String' && showType == '3') { + if (zdy1) { + str += showName + '属于:' + dealStr(zdy1, JSON.parse(fixedDownBoxValue)) + ' 并且 ' + } + } + if (columnType == 'Double') { + if (optType != 6 && zdy1) { + const optTypeStr = ['', '<', '>', '≤', '=', '≥'][optType] + str += `${showName} ${optTypeStr} ${zdy1} 并且 ` + } else if (optType == 6 && zdy1 && zdy2) { + str += `${zdy1} ${opt1} ${showName} ${opt2} ${zdy2} 并且 ` + } + } + } + return str ? str.substring(0, str.length - 4) : '请设置条件' + } +} + +export const dealStr = (str: string, obj) => { + const arr = [] + const list = str.split(',') + for (const elem in obj) { + list.map((item) => { + if (item == elem) { + arr.push(obj[elem].value) + } + }) + } + return arr.join('或') +} + +export const removeEle = (arr, elem, key = 'id') => { + let includesIndex + arr.map((item, index) => { + if (item[key] == elem[key]) { + includesIndex = index + } + }) + arr.splice(includesIndex, 1) +} + +export const bgColors = ['87, 106, 149', '255, 148, 62', '50, 150, 250'] +export const placeholderList = ['发起人', '审核人', '抄送人'] +export const setTypes = [ + { value: 1, label: '指定成员' }, + { value: 2, label: '主管' }, + { value: 4, label: '发起人自选' }, + { value: 5, label: '发起人自己' }, + { value: 7, label: '连续多级主管' } +] + +export const selectModes = [ + { value: 1, label: '选一个人' }, + { value: 2, label: '选多个人' } +] + +export const selectRanges = [ + { value: 1, label: '全公司' }, + { value: 2, label: '指定成员' }, + { value: 3, label: '指定角色' } +] + +export const optTypes = [ + { value: '1', label: '小于' }, + { value: '2', label: '大于' }, + { value: '3', label: '小于等于' }, + { value: '4', label: '等于' }, + { value: '5', label: '大于等于' }, + { value: '6', label: '介于两个数之间' } +] diff --git a/src/components/SimpleProcessDesigner/theme/workflow.css b/src/components/SimpleProcessDesigner/theme/workflow.css new file mode 100644 index 00000000..888b1a82 --- /dev/null +++ b/src/components/SimpleProcessDesigner/theme/workflow.css @@ -0,0 +1,1292 @@ + +.clearfix { + zoom: 1 +} + +.clearfix:after, +.clearfix:before { + content: ""; + display: table +} + +.clearfix:after { + clear: both +} + +@font-face { + font-family: anticon; + font-display: fallback; + src: url("https://at.alicdn.com/t/font_148784_v4ggb6wrjmkotj4i.eot"); + src: url("https://at.alicdn.com/t/font_148784_v4ggb6wrjmkotj4i.woff") format("woff"), url("https://at.alicdn.com/t/font_148784_v4ggb6wrjmkotj4i.ttf") format("truetype"), url("https://at.alicdn.com/t/font_148784_v4ggb6wrjmkotj4i.svg#iconfont") format("svg") +} + +.anticon { + display: inline-block; + font-style: normal; + vertical-align: baseline; + text-align: center; + text-transform: none; + line-height: 1; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale +} + +.anticon:before { + display: block; + font-family: anticon!important +} +.anticon-close:before { + content: "\E633" +} +.anticon-right:before { + content: "\E61F" +} +.anticon-exclamation-circle{ + color: rgb(242, 86, 67) +} +.anticon-exclamation-circle:before { + content: "\E62C" +} + +.anticon-left:before { + content: "\E620" +} + +.anticon-close-circle:before { + content: "\E62E" +} + +.ant-btn { + line-height: 1.5; + display: inline-block; + font-weight: 400; + text-align: center; + touch-action: manipulation; + cursor: pointer; + background-image: none; + border: 1px solid transparent; + white-space: nowrap; + padding: 0 15px; + font-size: 14px; + border-radius: 4px; + height: 32px; + user-select: none; + transition: all .3s cubic-bezier(.645, .045, .355, 1); + position: relative; + color: rgba(0, 0, 0, .65); + background-color: #fff; + border-color: #d9d9d9 +} + +.ant-btn>.anticon { + line-height: 1 +} + +.ant-btn, +.ant-btn:active, +.ant-btn:focus { + outline: 0 +} + +.ant-btn>a:only-child { + color: currentColor +} + +.ant-btn>a:only-child:after { + content: ""; + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + background: transparent +} + +.ant-btn:focus, +.ant-btn:hover { + color: #40a9ff; + background-color: #fff; + border-color: #40a9ff +} + +.ant-btn:focus>a:only-child, +.ant-btn:hover>a:only-child { + color: currentColor +} + +.ant-btn:focus>a:only-child:after, +.ant-btn:hover>a:only-child:after { + content: ""; + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + background: transparent +} + +.ant-btn.active, +.ant-btn:active { + color: #096dd9; + background-color: #fff; + border-color: #096dd9 +} + +.ant-btn.active>a:only-child, +.ant-btn:active>a:only-child { + color: currentColor +} + +.ant-btn.active>a:only-child:after, +.ant-btn:active>a:only-child:after { + content: ""; + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + background: transparent +} + +.ant-btn.active, +.ant-btn:active, +.ant-btn:focus, +.ant-btn:hover { + background: #fff; + text-decoration: none +} + +.ant-btn>i, +.ant-btn>span { + pointer-events: none +} + +.ant-btn:before { + position: absolute; + top: -1px; + left: -1px; + bottom: -1px; + right: -1px; + background: #fff; + opacity: .35; + content: ""; + border-radius: inherit; + z-index: 1; + transition: opacity .2s; + pointer-events: none; + display: none +} + +.ant-btn .anticon { + transition: margin-left .3s cubic-bezier(.645, .045, .355, 1) +} + +.ant-btn:active>span, +.ant-btn:focus>span { + position: relative +} + +.ant-btn>.anticon+span, +.ant-btn>span+.anticon { + margin-left: 8px +} + +.ant-input { + font-family: Chinese Quote, -apple-system, BlinkMacSystemFont, Segoe UI, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Helvetica Neue, Helvetica, Arial, sans-serif; + font-variant: tabular-nums; + box-sizing: border-box; + margin: 0; + padding: 0; + list-style: none; + position: relative; + display: inline-block; + padding: 4px 11px; + width: 100%; + height: 32px; + font-size: 14px; + line-height: 1.5; + color: rgba(0, 0, 0, .65); + background-color: #fff; + background-image: none; + border: 1px solid #d9d9d9; + border-radius: 4px; + transition: all .3s +} + +.ant-input::-moz-placeholder { + color: #bfbfbf; + opacity: 1 +} + +.ant-input:-ms-input-placeholder { + color: #bfbfbf +} + +.ant-input::-webkit-input-placeholder { + color: #bfbfbf +} + +.ant-input:focus, +.ant-input:hover { + border-color: #40a9ff; + border-right-width: 1px!important +} + +.ant-input:focus { + outline: 0; + box-shadow: 0 0 0 2px rgba(24, 144, 255, .2) +} + +textarea.ant-input { + max-width: 100%; + height: auto; + vertical-align: bottom; + transition: all .3s, height 0s; + min-height: 32px +} + +a, +abbr, +acronym, +address, +applet, +article, +aside, +audio, +b, +big, +blockquote, +body, +canvas, +caption, +center, +cite, +code, +dd, +del, +details, +dfn, +div, +dl, +dt, +em, +fieldset, +figcaption, +figure, +footer, +form, +h1, +h2, +h3, +h4, +h5, +h6, +header, +hgroup, +html, +i, +iframe, +img, +ins, +kbd, +label, +legend, +li, +mark, +menu, +nav, +object, +ol, +p, +pre, +q, +s, +samp, +section, +small, +span, +strike, +strong, +sub, +summary, +sup, +table, +tbody, +td, +tfoot, +th, +thead, +time, +tr, +tt, +u, +ul, +var, +video { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline +} + +*, +:after, +:before { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box +} + +html { + font-family: sans-serif; + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100% +} + +body, +html { + font-size: 14px +} + +body { + font-family: Microsoft Yahei, Lucida Grande, Lucida Sans Unicode, Helvetica, Arial, Verdana, sans-serif; + line-height: 1.6; + background-color: #fff; + position: static!important; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0) +} + +ol, +ul { + list-style-type: none +} + +b, +strong { + font-weight: 700 +} + +img { + border: 0 +} + +button, +input, +select, +textarea { + font-family: inherit; + font-size: 100%; + margin: 0 +} + +textarea { + overflow: auto; + vertical-align: top; + -webkit-appearance: none +} + +button, +input { + line-height: normal +} + +button, +select { + text-transform: none +} + +button, +html input[type=button], +input[type=reset], +input[type=submit] { + -webkit-appearance: button; + cursor: pointer +} + +input[type=search] { + -webkit-appearance: textfield; + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + box-sizing: content-box +} + +input[type=search]::-webkit-search-cancel-button, +input[type=search]::-webkit-search-decoration { + -webkit-appearance: none +} + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0 +} + +table { + width: 100%; + border-spacing: 0; + border-collapse: collapse +} + +table, +td, +th { + border: 0 +} + +td, +th { + padding: 0; + vertical-align: top +} + +th { + font-weight: 700; + text-align: left +} + +thead th { + white-space: nowrap +} + +a { + text-decoration: none; + cursor: pointer; + color: #3296fa +} + +a:active, +a:hover { + outline: 0; + color: #3296fa +} + +small { + font-size: 80% +} + +body, +html { + font-size: 12px!important; + color: #191f25!important; + background: #f6f6f6!important +} + +.wrap { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + height: 100% +} + +@font-face { + font-family: IconFont; + src: url("//at.alicdn.com/t/font_135284_ph2thxxbzgf.eot"); + src: url("//at.alicdn.com/t/font_135284_ph2thxxbzgf.eot?#iefix") format("embedded-opentype"), url("//at.alicdn.com/t/font_135284_ph2thxxbzgf.woff") format("woff"), url("//at.alicdn.com/t/font_135284_ph2thxxbzgf.ttf") format("truetype"), url("//at.alicdn.com/t/font_135284_ph2thxxbzgf.svg#IconFont") format("svg") +} + +.iconfont { + font-family: IconFont!important; + font-size: 16px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -webkit-text-stroke-width: .2px; + -moz-osx-font-smoothing: grayscale +} + +.fd-nav { + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 997; + width: 100%; + height: 60px; + font-size: 14px; + color: #fff; + background: #3296fa; + display: flex; + align-items: center +} + +.fd-nav>* { + flex: 1; + width: 100% +} + +.fd-nav .fd-nav-left { + display: -webkit-box; + display: flex; + align-items: center +} + +.fd-nav .fd-nav-center { + flex: none; + width: 600px; + text-align: center +} + +.fd-nav .fd-nav-right { + display: flex; + align-items: center; + justify-content: flex-end; + text-align: right +} + +.fd-nav .fd-nav-back { + display: inline-block; + width: 60px; + height: 60px; + font-size: 22px; + border-right: 1px solid #1583f2; + text-align: center; + cursor: pointer +} + +.fd-nav .fd-nav-back:hover { + background: #5af +} + +.fd-nav .fd-nav-back:active { + background: #1583f2 +} + +.fd-nav .fd-nav-back .anticon { + line-height: 60px +} + +.fd-nav .fd-nav-title { + width: 0; + flex: 1; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + padding: 0 15px +} + +.fd-nav a { + color: #fff; + margin-left: 12px +} + +.fd-nav .button-publish { + min-width: 80px; + margin-left: 4px; + margin-right: 15px; + color: #3296fa; + border-color: #fff +} + +.fd-nav .button-publish.ant-btn:focus, +.fd-nav .button-publish.ant-btn:hover { + color: #3296fa; + border-color: #fff; + box-shadow: 0 10px 20px 0 rgba(0, 0, 0, .3) +} + +.fd-nav .button-publish.ant-btn:active { + color: #3296fa; + background: #d6eaff; + box-shadow: none +} + +.fd-nav .button-preview { + min-width: 80px; + margin-left: 16px; + margin-right: 4px; + color: #fff; + border-color: #fff; + background: transparent +} + +.fd-nav .button-preview.ant-btn:focus, +.fd-nav .button-preview.ant-btn:hover { + color: #fff; + border-color: #fff; + background: #59acfc +} + +.fd-nav .button-preview.ant-btn:active { + color: #fff; + border-color: #fff; + background: #2186ef +} + +.fd-nav-content { + position: fixed; + top: 60px; + left: 0; + right: 0; + bottom: 0; + z-index: 1; + overflow-x: hidden; + overflow-y: auto; + padding-bottom: 30px +} + +.error-modal-desc { + font-size: 13px; + color: rgba(25, 31, 37, .56); + line-height: 22px; + margin-bottom: 14px +} + +.error-modal-list { + height: 200px; + overflow-y: auto; + margin-right: -25px; + padding-right: 25px +} + +.error-modal-item { + padding: 10px 20px; + line-height: 21px; + background: #f6f6f6; + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 8px; + border-radius: 4px +} + +.error-modal-item-label { + flex: none; + font-size: 15px; + color: rgba(25, 31, 37, .56); + padding-right: 10px +} + +.error-modal-item-content { + text-align: right; + flex: 1; + font-size: 13px; + color: #191f25 +} + +#body.blur { + -webkit-filter: blur(3px); + filter: blur(3px) +} + +.zoom { + display: flex; + position: fixed; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; + height: 40px; + width: 125px; + right: 40px; + margin-top: 30px; + z-index: 10 +} + +.zoom .zoom-in, +.zoom .zoom-out { + width: 30px; + height: 30px; + background: #fff; + color: #c1c1cd; + cursor: pointer; + background-size: 100%; + background-repeat: no-repeat +} + +.zoom .zoom-out { + background-image: url(https://gw.alicdn.com/tfs/TB1s0qhBHGYBuNjy0FoXXciBFXa-90-90.png) +} + +.zoom .zoom-out.disabled { + opacity: .5 +} + +.zoom .zoom-in { + background-image: url(https://gw.alicdn.com/tfs/TB1UIgJBTtYBeNjy1XdXXXXyVXa-90-90.png) +} + +.zoom .zoom-in.disabled { + opacity: .5 +} + +.auto-judge:hover .editable-title, +.node-wrap-box:hover .editable-title { + border-bottom: 1px dashed #fff +} + +.auto-judge:hover .editable-title.editing, +.node-wrap-box:hover .editable-title.editing { + text-decoration: none; + border: 1px solid #d9d9d9 +} + +.auto-judge:hover .editable-title { + border-color: #15bc83 +} + +.editable-title { + line-height: 15px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + border-bottom: 1px dashed transparent +} + +.editable-title:before { + content: ""; + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 40px +} + +.editable-title:hover { + border-bottom: 1px dashed #fff +} + +.editable-title-input { + flex: none; + height: 18px; + padding-left: 4px; + text-indent: 0; + font-size: 12px; + line-height: 18px; + z-index: 1 +} + +.editable-title-input:hover { + text-decoration: none +} + +.ant-btn { + position: relative +} + +.node-wrap-box { + display: -webkit-inline-box; + display: -ms-inline-flexbox; + display: inline-flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + position: relative; + width: 220px; + min-height: 72px; + -ms-flex-negative: 0; + flex-shrink: 0; + background: #fff; + border-radius: 4px; + cursor: pointer +} + +.node-wrap-box:after { + pointer-events: none; + content: ""; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: 2; + border-radius: 4px; + border: 1px solid transparent; + transition: all .1s cubic-bezier(.645, .045, .355, 1); + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .1) +} + +.node-wrap-box.active:after, +.node-wrap-box:active:after, +.node-wrap-box:hover:after { + border: 1px solid #3296fa; + box-shadow: 0 0 6px 0 rgba(50, 150, 250, .3) +} + +.node-wrap-box.active .close, +.node-wrap-box:active .close, +.node-wrap-box:hover .close { + display: block +} + +.node-wrap-box.error:after { + border: 1px solid #f25643; + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .1) +} + +.node-wrap-box .title { + position: relative; + display: flex; + align-items: center; + padding-left: 16px; + padding-right: 30px; + width: 100%; + height: 24px; + line-height: 24px; + font-size: 12px; + color: #fff; + text-align: left; + background: #576a95; + border-radius: 4px 4px 0 0 +} + +.node-wrap-box .title .iconfont { + font-size: 12px; + margin-right: 5px +} + +.node-wrap-box .placeholder { + color: #bfbfbf +} + +.node-wrap-box .close { + display: none; + position: absolute; + right: 10px; + top: 50%; + transform: translateY(-50%); + width: 20px; + height: 20px; + font-size: 14px; + color: #fff; + border-radius: 50%; + text-align: center; + line-height: 20px +} + +.node-wrap-box .content { + position: relative; + font-size: 14px; + padding: 16px; + padding-right: 30px +} + +.node-wrap-box .content .text { + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical +} + +.node-wrap-box .content .arrow { + position: absolute; + right: 10px; + top: 50%; + transform: translateY(-50%); + width: 20px; + height: 14px; + font-size: 14px; + color: #979797 +} + +.start-node.node-wrap-box .content .text { + display: block; + white-space: nowrap +} + +.node-wrap-box:before { + content: ""; + position: absolute; + top: -12px; + left: 50%; + -webkit-transform: translateX(-50%); + transform: translateX(-50%); + width: 0; + height: 4px; + border-style: solid; + border-width: 8px 6px 4px; + border-color: #cacaca transparent transparent; + background: #f5f5f7 +} + +.node-wrap-box.start-node:before { + content: none +} + +.top-left-cover-line { + left: -1px +} + +.top-left-cover-line, +.top-right-cover-line { + position: absolute; + height: 8px; + width: 50%; + background-color: #f5f5f7; + top: -4px +} + +.top-right-cover-line { + right: -1px +} + +.bottom-left-cover-line { + left: -1px +} + +.bottom-left-cover-line, +.bottom-right-cover-line { + position: absolute; + height: 8px; + width: 50%; + background-color: #f5f5f7; + bottom: -4px +} + +.bottom-right-cover-line { + right: -1px +} + +.dingflow-design { + width: 100%; + background-color: #f5f5f7; + overflow: auto; + position: absolute; + bottom: 0; + left: 0; + right: 0; + top: 0 +} + +.dingflow-design .box-scale { + transform: scale(1); + display: inline-block; + position: relative; + width: 100%; + padding: 54.5px 0; + -webkit-box-align: start; + -ms-flex-align: start; + align-items: flex-start; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + min-width: -webkit-min-content; + min-width: -moz-min-content; + min-width: min-content; + background-color: #f5f5f7; + transform-origin: 50% 0px 0px; +} + +.dingflow-design .node-wrap { + flex-direction: column; + -webkit-box-pack: start; + -ms-flex-pack: start; + justify-content: flex-start; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -webkit-box-flex: 1; + -ms-flex-positive: 1; + padding: 0 50px; + position: relative +} + +.dingflow-design .branch-wrap, +.dingflow-design .node-wrap { + display: inline-flex; + width: 100% +} + +.dingflow-design .branch-box-wrap { + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + min-height: 270px; + width: 100%; + -ms-flex-negative: 0; + flex-shrink: 0 +} + +.dingflow-design .branch-box { + display: flex; + overflow: visible; + min-height: 180px; + height: auto; + border-bottom: 2px solid #ccc; + border-top: 2px solid #ccc; + position: relative; + margin-top: 15px +} + +.dingflow-design .branch-box .col-box { + background: #f5f5f7 +} + +.dingflow-design .branch-box .col-box:before { + content: ""; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 0; + margin: auto; + width: 2px; + height: 100%; + background-color: #cacaca +} + +.dingflow-design .add-branch { + border: none; + outline: none; + user-select: none; + justify-content: center; + font-size: 12px; + padding: 0 10px; + height: 30px; + line-height: 30px; + border-radius: 15px; + color: #3296fa; + background: #fff; + box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .1); + position: absolute; + top: -16px; + left: 50%; + transform: translateX(-50%); + transform-origin: center center; + cursor: pointer; + z-index: 1; + display: inline-flex; + align-items: center; + -webkit-transition: all .3s cubic-bezier(.645, .045, .355, 1); + transition: all .3s cubic-bezier(.645, .045, .355, 1) +} + +.dingflow-design .add-branch:hover { + transform: translateX(-50%) scale(1.1); + box-shadow: 0 8px 16px 0 rgba(0, 0, 0, .1) +} + +.dingflow-design .add-branch:active { + transform: translateX(-50%); + box-shadow: none +} + +.dingflow-design .col-box { + display: inline-flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + flex-direction: column; + -webkit-box-align: center; + align-items: center; + position: relative +} + +.dingflow-design .condition-node { + min-height: 220px +} + +.dingflow-design .condition-node, +.dingflow-design .condition-node-box { + display: inline-flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + flex-direction: column; + -webkit-box-flex: 1 +} + +.dingflow-design .condition-node-box { + padding-top: 30px; + padding-right: 50px; + padding-left: 50px; + -webkit-box-pack: center; + justify-content: center; + -webkit-box-align: center; + align-items: center; + flex-grow: 1; + position: relative +} + +.dingflow-design .condition-node-box:before { + content: ""; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + margin: auto; + width: 2px; + height: 100%; + background-color: #cacaca +} + +.dingflow-design .auto-judge { + position: relative; + width: 220px; + min-height: 72px; + background: #fff; + border-radius: 4px; + padding: 14px 19px; + cursor: pointer +} + +.dingflow-design .auto-judge:after { + pointer-events: none; + content: ""; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: 2; + border-radius: 4px; + border: 1px solid transparent; + transition: all .1s cubic-bezier(.645, .045, .355, 1); + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .1) +} + +.dingflow-design .auto-judge.active:after, +.dingflow-design .auto-judge:active:after, +.dingflow-design .auto-judge:hover:after { + border: 1px solid #3296fa; + box-shadow: 0 0 6px 0 rgba(50, 150, 250, .3) +} + +.dingflow-design .auto-judge.active .close, +.dingflow-design .auto-judge:active .close, +.dingflow-design .auto-judge:hover .close { + display: block +} + +.dingflow-design .auto-judge.error:after { + border: 1px solid #f25643; + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .1) +} + +.dingflow-design .auto-judge .title-wrapper { + position: relative; + font-size: 12px; + color: #15bc83; + text-align: left; + line-height: 16px +} + +.dingflow-design .auto-judge .title-wrapper .editable-title { + display: inline-block; + max-width: 120px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis +} + +.dingflow-design .auto-judge .title-wrapper .priority-title { + display: inline-block; + float: right; + margin-right: 10px; + color: rgba(25, 31, 37, .56) +} + +.dingflow-design .auto-judge .placeholder { + color: #bfbfbf +} + +.dingflow-design .auto-judge .close { + display: none; + position: absolute; + right: -10px; + top: -10px; + width: 20px; + height: 20px; + font-size: 14px; + color: rgba(0, 0, 0, .25); + border-radius: 50%; + text-align: center; + line-height: 20px; + z-index: 2 +} + +.dingflow-design .auto-judge .content { + font-size: 14px; + color: #191f25; + text-align: left; + margin-top: 6px; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical +} + +.dingflow-design .auto-judge .sort-left, +.dingflow-design .auto-judge .sort-right { + position: absolute; + top: 0; + bottom: 0; + display: none; + z-index: 1 +} + +.dingflow-design .auto-judge .sort-left { + left: 0; + border-right: 1px solid #f6f6f6 +} + +.dingflow-design .auto-judge .sort-right { + right: 0; + border-left: 1px solid #f6f6f6 +} + +.dingflow-design .auto-judge:hover .sort-left, +.dingflow-design .auto-judge:hover .sort-right { + display: flex; + align-items: center +} + +.dingflow-design .auto-judge .sort-left:hover, +.dingflow-design .auto-judge .sort-right:hover { + background: #efefef +} + +.dingflow-design .end-node { + border-radius: 50%; + font-size: 14px; + color: rgba(25, 31, 37, .4); + text-align: left +} + +.dingflow-design .end-node .end-node-circle { + width: 10px; + height: 10px; + margin: auto; + border-radius: 50%; + background: #dbdcdc +} + +.dingflow-design .end-node .end-node-text { + margin-top: 5px; + text-align: center +} + +.approval-setting { + border-radius: 2px; + margin: 20px 0; + position: relative; + background: #fff +} + +.ant-btn { + position: relative +} + + diff --git a/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue b/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue index 3fe21944..6cbe11fa 100644 --- a/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue +++ b/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue @@ -436,7 +436,7 @@ const initBpmnModeler = () => { // bpmnModeler.createDiagram() - console.log(bpmnModeler, 'bpmnModeler111111') + // console.log(bpmnModeler, 'bpmnModeler111111') emit('init-finished', bpmnModeler) initModelListeners() } @@ -666,10 +666,10 @@ const previewProcessJson = () => { } /* ------------------------------------------------ 芋道源码 methods ------------------------------------------------------ */ const processSave = async () => { - console.log(bpmnModeler, 'bpmnModelerbpmnModelerbpmnModelerbpmnModeler') + // console.log(bpmnModeler, 'bpmnModelerbpmnModelerbpmnModelerbpmnModeler') const { err, xml } = await bpmnModeler.saveXML() - console.log(err, 'errerrerrerrerr') - console.log(xml, 'xmlxmlxmlxmlxml') + // console.log(err, 'errerrerrerrerr') + // console.log(xml, 'xmlxmlxmlxmlxml') // 读取异常时抛出异常 if (err) { // this.$modal.msgError('保存模型失败,请重试!') diff --git a/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue b/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue index a7958adb..485b9795 100644 --- a/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue +++ b/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue @@ -115,19 +115,19 @@ const highlightDiagram = async () => { if (!task) { return } - //进行中的任务已经高亮过了,则不高亮后面的任务了 + // 进行中的任务已经高亮过了,则不高亮后面的任务了 if (findProcessTask) { removeTaskDefinitionKeyList.push(n.id) return } // 高亮任务 - canvas.addMarker(n.id, getResultCss(task.result)) + canvas.addMarker(n.id, getResultCss(task.status)) //标记是否高亮了进行中任务 - if (task.result === 1) { + if (task.status === 1) { findProcessTask = true } // 如果非通过,就不走后面的线条了 - if (task.result !== 2) { + if (task.status !== 2) { return } // 处理 outgoing 出线 @@ -194,6 +194,7 @@ const highlightDiagram = async () => { }) } else if (n.$type === 'bpmn:StartEvent') { // 开始节点 + canvas.addMarker(n.id, 'highlight') n.outgoing?.forEach((nn) => { // outgoing 例如说【bpmn:SequenceFlow】连线 // 获得连线是否有指向目标。如果有,则进行高亮 @@ -205,10 +206,10 @@ const highlightDiagram = async () => { }) } else if (n.$type === 'bpmn:EndEvent') { // 结束节点 - if (!processInstance.value || processInstance.value.result === 1) { + if (!processInstance.value || processInstance.value.status === 1) { return } - canvas.addMarker(n.id, getResultCss(processInstance.value.result)) + canvas.addMarker(n.id, getResultCss(processInstance.value.status)) } else if (n.$type === 'bpmn:ServiceTask') { //服务任务 if (activity.startTime > 0 && activity.endTime === 0) { @@ -223,39 +224,49 @@ const highlightDiagram = async () => { canvas.addMarker(out.id, getResultCss(2)) }) } + } else if (n.$type === 'bpmn:SequenceFlow') { + let targetActivity = activityList.find((m: any) => m.key === n.targetRef.id) + if (targetActivity) { + canvas.addMarker(n.id, getActivityHighlightCss(targetActivity)) + } } }) if (!isEmpty(removeTaskDefinitionKeyList)) { taskList.value = taskList.value.filter( - (item) => !removeTaskDefinitionKeyList.includes(item.definitionKey) + (item) => !removeTaskDefinitionKeyList.includes(item.taskDefinitionKey) ) } } + const getActivityHighlightCss = (activity) => { return activity.endTime ? 'highlight' : 'highlight-todo' } -const getResultCss = (result) => { - if (result === 1) { + +const getResultCss = (status) => { + if (status === 1) { // 审批中 return 'highlight-todo' - } else if (result === 2) { + } else if (status === 2) { // 已通过 return 'highlight' - } else if (result === 3) { + } else if (status === 3) { // 不通过 return 'highlight-reject' - } else if (result === 4) { + } else if (status === 4) { // 已取消 return 'highlight-cancel' - } else if (result === 5) { + } else if (status === 5) { // 退回 return 'highlight-return' - } else if (result === 6) { + } else if (status === 6) { // 委派 - return 'highlight-return' - } else if (result === 7 || result === 8 || result === 9) { - // 待后加签任务完成/待前加签任务完成/待前置任务完成 - return 'highlight-return' + return 'highlight-todo' + } else if (status === 7) { + // 审批通过中 + return 'highlight-todo' + } else if (status === 0) { + // 待审批 + return 'highlight-todo' } return '' } @@ -296,10 +307,10 @@ const elementHover = (element) => { !elementOverlayIds.value && (elementOverlayIds.value = {}) !overlays.value && (overlays.value = bpmnModeler.get('overlays')) // 展示信息 - console.log(activityLists.value, 'activityLists.value') - console.log(element.value, 'element.value') + // console.log(activityLists.value, 'activityLists.value') + // console.log(element.value, 'element.value') const activity = activityLists.value.find((m) => m.key === element.value.id) - console.log(activity, 'activityactivityactivityactivity') + // console.log(activity, 'activityactivityactivityactivity') if (!activity) { return } @@ -313,15 +324,14 @@ const elementHover = (element) => {

部门:${processInstance.value.startUser.deptName}

创建时间:${formatDate(processInstance.value.createTime)}` } else if (element.value.type === 'bpmn:UserTask') { - // debugger let task = taskList.value.find((m) => m.id === activity.taskId) // 找到活动对应的 taskId if (!task) { return } - let optionData = getIntDictOptions(DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT) + let optionData = getIntDictOptions(DICT_TYPE.BPM_TASK_STATUS) let dataResult = '' optionData.forEach((element) => { - if (element.value == task.result) { + if (element.value == task.status) { dataResult = element.label } }) @@ -333,7 +343,7 @@ const elementHover = (element) => { //

部门:${task.assigneeUser.deptName}

//

结果:${getIntDictOptions( // DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT, - // task.result + // task.status // )}

//

创建时间:${formatDate(task.createTime)}

` if (task.endTime) { @@ -351,29 +361,30 @@ const elementHover = (element) => { } console.log(html) } else if (element.value.type === 'bpmn:EndEvent' && processInstance.value) { - let optionData = getIntDictOptions(DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT) + let optionData = getIntDictOptions(DICT_TYPE.BPM_TASK_STATUS) let dataResult = '' optionData.forEach((element) => { - if (element.value == processInstance.value.result) { + if (element.value == processInstance.value.status) { dataResult = element.label } }) html = `

结果:${dataResult}

` // html = `

结果:${getIntDictOptions( // DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT, - // processInstance.value.result + // processInstance.value.status // )}

` if (processInstance.value.endTime) { html += `

结束时间:${formatDate(processInstance.value.endTime)}

` } } - console.log(html, 'html111111111111111') + // console.log(html, 'html111111111111111') elementOverlayIds.value[element.value.id] = toRaw(overlays.value)?.add(element.value, { position: { left: 0, bottom: 0 }, html: `
${html}
` }) } } + // 流程图的元素被 out const elementOut = (element) => { toRaw(overlays.value).remove({ element }) @@ -389,6 +400,7 @@ onMounted(() => { // 初始模型的监听器 initModelListeners() }) + onBeforeUnmount(() => { // this.$once('hook:beforeDestroy', () => { // }) @@ -427,7 +439,7 @@ watch( ) - \ No newline at end of file diff --git a/src/views/bpm/task/cc/index.vue b/src/views/bpm/task/copy/index.vue similarity index 74% rename from src/views/bpm/task/cc/index.vue rename to src/views/bpm/task/copy/index.vue index 50ddf889..dd41b2e1 100644 --- a/src/views/bpm/task/cc/index.vue +++ b/src/views/bpm/task/copy/index.vue @@ -11,14 +11,6 @@ placeholder="请输入流程名称" /> - - - - - - - - - + + + + + - + @@ -78,14 +75,14 @@ import { dateFormatter } from '@/utils/formatTime' import * as ProcessInstanceApi from '@/api/bpm/processInstance' -defineOptions({ name: 'BpmCCProcessInstance' }) +defineOptions({ name: 'BpmProcessInstanceCopy' }) const { push } = useRouter() // 路由 const loading = ref(false) // 列表的加载中 const total = ref(0) // 列表的总页数 const list = ref([]) // 列表的数据 -const queryParams = ref({ +const queryParams = reactive({ pageNo: 1, pageSize: 10, processInstanceId: '', @@ -98,7 +95,7 @@ const queryFormRef = ref() // 搜索的表单 const getList = async () => { loading.value = true try { - const data = await ProcessInstanceApi.getProcessInstanceCCPage(queryParams) + const data = await ProcessInstanceApi.getProcessInstanceCopyPage(queryParams) list.value = data.list total.value = data.total } finally { @@ -118,7 +115,7 @@ const handleAudit = (row: any) => { /** 搜索按钮操作 */ const handleQuery = () => { - queryParams.value.pageNo = 1 + queryParams.pageNo = 1 getList() } diff --git a/src/views/bpm/task/done/TaskDetail.vue b/src/views/bpm/task/done/TaskDetail.vue deleted file mode 100644 index 5bc06f19..00000000 --- a/src/views/bpm/task/done/TaskDetail.vue +++ /dev/null @@ -1,51 +0,0 @@ - - diff --git a/src/views/bpm/task/done/index.vue b/src/views/bpm/task/done/index.vue index ee1e1d14..f73b47c3 100644 --- a/src/views/bpm/task/done/index.vue +++ b/src/views/bpm/task/done/index.vue @@ -46,27 +46,51 @@ - - - - - - - - + + - + + + + + + + + + + + + + @@ -78,15 +102,11 @@ @pagination="getList" /> - - - diff --git a/src/views/bpm/task/todo/index.vue b/src/views/bpm/task/todo/index.vue index 29ba73dd..fc506815 100644 --- a/src/views/bpm/task/todo/index.vue +++ b/src/views/bpm/task/todo/index.vue @@ -46,27 +46,33 @@ - - - - + + - + + + + + - - - @@ -77,16 +83,14 @@ :total="total" @pagination="getList" /> - diff --git a/src/views/bpm/taskAssignRule/index.vue b/src/views/bpm/taskAssignRule/index.vue deleted file mode 100644 index 0fe9bde6..00000000 --- a/src/views/bpm/taskAssignRule/index.vue +++ /dev/null @@ -1,136 +0,0 @@ - - diff --git a/src/views/crm/business/detail/index.vue b/src/views/crm/business/detail/index.vue index 6b86a41e..0c280734 100644 --- a/src/views/crm/business/detail/index.vue +++ b/src/views/crm/business/detail/index.vue @@ -4,8 +4,8 @@ 编辑 @@ -53,13 +53,12 @@ - - - + + + diff --git a/src/views/crm/clue/detail/index.vue b/src/views/crm/clue/detail/index.vue index f9074c14..8f005e1c 100644 --- a/src/views/crm/clue/detail/index.vue +++ b/src/views/crm/clue/detail/index.vue @@ -18,7 +18,7 @@ > 转化为客户 - 已转化客户 + 已转化客户 @@ -45,7 +45,7 @@ - + diff --git a/src/views/crm/contract/detail/index.vue b/src/views/crm/contract/detail/index.vue index bd30489a..f3b038ed 100644 --- a/src/views/crm/contract/detail/index.vue +++ b/src/views/crm/contract/detail/index.vue @@ -48,7 +48,7 @@ - + diff --git a/src/views/crm/statistics/customer/components/CustomerDealCycle.vue b/src/views/crm/statistics/customer/components/CustomerDealCycle.vue new file mode 100644 index 00000000..9243e6a3 --- /dev/null +++ b/src/views/crm/statistics/customer/components/CustomerDealCycle.vue @@ -0,0 +1,127 @@ + + + diff --git a/src/views/crm/statistics/customer/components/CustomerFollowupSummary.vue b/src/views/crm/statistics/customer/components/CustomerFollowupSummary.vue new file mode 100644 index 00000000..cfb025f5 --- /dev/null +++ b/src/views/crm/statistics/customer/components/CustomerFollowupSummary.vue @@ -0,0 +1,124 @@ + + + diff --git a/src/views/crm/statistics/customer/components/CustomerFollowupType.vue b/src/views/crm/statistics/customer/components/CustomerFollowupType.vue new file mode 100644 index 00000000..87510054 --- /dev/null +++ b/src/views/crm/statistics/customer/components/CustomerFollowupType.vue @@ -0,0 +1,105 @@ + + + diff --git a/src/views/crm/statistics/customer/components/CustomerSummary.vue b/src/views/crm/statistics/customer/components/CustomerSummary.vue new file mode 100644 index 00000000..14f0b9b8 --- /dev/null +++ b/src/views/crm/statistics/customer/components/CustomerSummary.vue @@ -0,0 +1,151 @@ + + + diff --git a/src/views/crm/statistics/customer/index.vue b/src/views/crm/statistics/customer/index.vue new file mode 100644 index 00000000..9d804e31 --- /dev/null +++ b/src/views/crm/statistics/customer/index.vue @@ -0,0 +1,166 @@ + + + + diff --git a/src/views/infra/demo/demo03/erp/components/Demo03CourseList.vue b/src/views/infra/demo/demo03/erp/components/Demo03CourseList.vue index 9d5e2705..3dce77e9 100644 --- a/src/views/infra/demo/demo03/erp/components/Demo03CourseList.vue +++ b/src/views/infra/demo/demo03/erp/components/Demo03CourseList.vue @@ -2,39 +2,40 @@ - 新增 + + 新增 - - - - + + + + - + -