liu
3 天以前 0127fd119fe2a349fbfee92b375a5680e10d3275
src/views/bpm/processInstance/detail/index.vue
@@ -4,6 +4,8 @@
import { nextTick, onMounted, ref, shallowRef, watch } from 'vue';
import { useRoute } from 'vue-router';
import { Page, useVbenModal } from '@vben/common-ui';
import {
  BpmFieldPermissionType,
@@ -41,11 +43,16 @@
defineOptions({ name: 'BpmProcessInstanceDetail' });
const route = useRoute();
const props = defineProps<{
  activityId?: string; // 流程活动编号,用于抄送查看
  id: string; // 流程实例的编号
  taskId?: string; // 任务编号
}>();
/** 只读查看模式:从业务模块(如销售订单审批进度)跳转时隐藏审批操作按钮,仅查看 */
const viewOnly = route.query.viewOnly === '1';
const processInstanceLoading = ref(false); // 流程实例的加载中
const processInstance = ref<BpmProcessInstanceApi.ProcessInstance>(); // 流程实例
@@ -362,7 +369,7 @@
      </div>
      <template #actions>
        <div class="px-4">
        <div v-if="!viewOnly" class="px-4">
          <ProcessInstanceOperationButton
            ref="operationButtonRef"
            :process-instance="processInstance"
@@ -374,6 +381,9 @@
            @success="refresh"
          />
        </div>
        <div v-else class="px-4 py-2 text-sm text-muted-foreground">
          <span>只读查看模式:审批操作请在「协同办公 → 待办任务」中处理</span>
        </div>
      </template>
    </Card>
    <!-- 打印对话框 -->