feat: 优化审批详情页流程状态svg图标命名
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
|
@ -5,7 +5,7 @@
|
||||||
<img
|
<img
|
||||||
class="position-absolute right-20px"
|
class="position-absolute right-20px"
|
||||||
width="150"
|
width="150"
|
||||||
:src="auditIcons[processInstance.status]"
|
:src="auditIconsMap[processInstance.status]"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
<div class="text-#878c93 h-15px">编号:{{ id }}</div>
|
<div class="text-#878c93 h-15px">编号:{{ id }}</div>
|
||||||
|
@ -137,11 +137,11 @@ import ProcessInstanceTaskList from './ProcessInstanceTaskList.vue'
|
||||||
import ProcessInstanceOperationButton from './ProcessInstanceOperationButton.vue'
|
import ProcessInstanceOperationButton from './ProcessInstanceOperationButton.vue'
|
||||||
import ProcessInstanceTimeline from './ProcessInstanceTimeline.vue'
|
import ProcessInstanceTimeline from './ProcessInstanceTimeline.vue'
|
||||||
import { FieldPermissionType } from '@/components/SimpleProcessDesignerV2/src/consts'
|
import { FieldPermissionType } from '@/components/SimpleProcessDesignerV2/src/consts'
|
||||||
// TODO 代码优化,换个明确的 icon 名字
|
import { TaskStatusEnum } from '@/api/bpm/task'
|
||||||
import audit1 from '@/assets/svgs/bpm/audit1.svg'
|
import runningSvg from '@/assets/svgs/bpm/running.svg'
|
||||||
import audit2 from '@/assets/svgs/bpm/audit2.svg'
|
import approveSvg from '@/assets/svgs/bpm/approve.svg'
|
||||||
import audit3 from '@/assets/svgs/bpm/audit3.svg'
|
import rejectSvg from '@/assets/svgs/bpm/reject.svg'
|
||||||
import audit4 from '@/assets/svgs/bpm/audit4.svg'
|
import cancelSvg from '@/assets/svgs/bpm/cancel.svg'
|
||||||
|
|
||||||
defineOptions({ name: 'BpmProcessInstanceDetail' })
|
defineOptions({ name: 'BpmProcessInstanceDetail' })
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
@ -155,11 +155,11 @@ const processInstance = ref<any>({}) // 流程实例
|
||||||
const processDefinition = ref<any>({}) // 流程定义
|
const processDefinition = ref<any>({}) // 流程定义
|
||||||
const processModelView = ref<any>({}) // 流程模型视图
|
const processModelView = ref<any>({}) // 流程模型视图
|
||||||
const operationButtonRef = ref() // 操作按钮组件 ref
|
const operationButtonRef = ref() // 操作按钮组件 ref
|
||||||
const auditIcons = {
|
const auditIconsMap = {
|
||||||
1: audit1,
|
[TaskStatusEnum.RUNNING]: runningSvg,
|
||||||
2: audit2,
|
[TaskStatusEnum.APPROVE]: approveSvg,
|
||||||
3: audit3,
|
[TaskStatusEnum.REJECT]: rejectSvg,
|
||||||
4: audit4
|
[TaskStatusEnum.CANCEL]: cancelSvg
|
||||||
}
|
}
|
||||||
|
|
||||||
// ========== 申请信息 ==========
|
// ========== 申请信息 ==========
|
||||||
|
@ -242,7 +242,6 @@ const getApprovalDetail = async () => {
|
||||||
|
|
||||||
/** 获取流程模型视图*/
|
/** 获取流程模型视图*/
|
||||||
const getProcessModelView = async () => {
|
const getProcessModelView = async () => {
|
||||||
|
|
||||||
if (BpmModelType.BPMN === processDefinition.value?.modelType) {
|
if (BpmModelType.BPMN === processDefinition.value?.modelType) {
|
||||||
// 重置,解决 BPMN 流程图刷新不会重新渲染问题
|
// 重置,解决 BPMN 流程图刷新不会重新渲染问题
|
||||||
processModelView.value = {
|
processModelView.value = {
|
||||||
|
|