diff --git a/src/views/wf/ticketd.vue b/src/views/wf/ticketd.vue
index 50645f50..4e9e85f4 100644
--- a/src/views/wf/ticketd.vue
+++ b/src/views/wf/ticketd.vue
@@ -75,7 +75,7 @@ import TOOL from "@/utils/tool.js";
import { ElMessageBox } from 'element-plus'
const props = defineProps({
ticket_data: { type: Object, default: null },
- ticket_full_data: { type: Object, default: null, required: true },
+ ticket_: { type: Object, default: null, required: true },
});
const currentUser = ref(TOOL.data.get("USER_INFO").id)
const actionShow = ref(false);
@@ -90,8 +90,9 @@ const handleForm = ref({
})
const ticketId = ref(null);
onMounted(() => {
- if (props.ticket_full_data) {
- ticketId.value = props.ticket_full_data.id;
+ if (props.ticket_) {
+ ticketId.value = props.ticket_.id;
+ getTicketDetail();
getTicketLog();
}
});
@@ -111,21 +112,25 @@ const refreshTicket = async () => {
const getTicketDetail = () => {
API.wf.ticket.ticketItem.req(ticketId.value).then(res => {
ticketDetail.value = res;
- if (res.create_by === currentUser.value) {
- isOwn.value = true;
- actionShow.value = true;
- if (!activeNames.value.includes('2')) activeNames.value.push('2')
+ const isCreator = res.create_by === currentUser.value
+ const isParticipant =
+ (res.participant_type === 1 && res.participant === currentUser.value) ||
+ (res.participant_type === 2 && res.participant.includes(currentUser.value))
+
+ if (isCreator) {
+ isOwn.value = true
}
- if (res.participant_type == 1 && res.participant === currentUser.value) {
- actionShow.value = true;
- if (!activeNames.value.includes('2')) activeNames.value.push('2')
- getTransitions();
+
+ if (isCreator || isParticipant) {
+ actionShow.value = true
+ if (!activeNames.value.includes('2')) {
+ activeNames.value.push('2')
}
- if (res.participant_type == 2 && res.participant.includes(currentUser.value)) {
- actionShow.value = true;
- if (!activeNames.value.includes('2')) activeNames.value.push('2')
- getTransitions();
+ if (isParticipant) {
+ getTransitions()
}
+ }
+
});
};
diff --git a/src/views/wf/ticketd_b_start.vue b/src/views/wf/ticketd_b_start.vue
index 3d0eff57..7299c1f5 100644
--- a/src/views/wf/ticketd_b_start.vue
+++ b/src/views/wf/ticketd_b_start.vue
@@ -1,5 +1,5 @@
- {{ item.name }}
+ >{{ item.name }}