feat: base 优化ticketd
This commit is contained in:
parent
354f82bd36
commit
4d88ce0636
|
|
@ -79,12 +79,18 @@ const ticketDetail = ref({
|
||||||
});
|
});
|
||||||
const ticketLog = ref([]);
|
const ticketLog = ref([]);
|
||||||
const ticketId = ref(null);
|
const ticketId = ref(null);
|
||||||
|
watch(
|
||||||
|
() => props.ticket_,
|
||||||
|
async (newVal) => {
|
||||||
|
if (newVal && Object.keys(newVal).length > 0) {
|
||||||
|
ticketId.value = newVal.id
|
||||||
|
getTicketDetail()
|
||||||
|
getTicketLog()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ immediate: false }
|
||||||
|
)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (props.ticket_) {
|
|
||||||
ticketId.value = props.ticket_.id;
|
|
||||||
getTicketDetail();
|
|
||||||
getTicketLog();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
const emit = defineEmits(['success']);
|
const emit = defineEmits(['success']);
|
||||||
const refreshTicket = async () => {
|
const refreshTicket = async () => {
|
||||||
|
|
@ -103,7 +109,6 @@ const getTicketDetail = () => {
|
||||||
if (isCreator) {
|
if (isCreator) {
|
||||||
isOwn.value = true
|
isOwn.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue