Compare commits

..

No commits in common. "360277ea5b203187bfba661eac5f7f64e22a3cf0" and "5d5b091ed8a28652f399973a61873b2bae984d0c" have entirely different histories.

2 changed files with 23 additions and 32 deletions

View File

@ -63,7 +63,7 @@
</el-dialog>
</template>
<script setup>
import { ref, defineProps, onMounted, watch } from "vue";
import { ref, defineProps, onMounted } from "vue";
import { actStateEnum, interveneTypeEnum } from "@/utils/enum.js";
import API from '@/api';
import TOOL from "@/utils/tool.js";
@ -79,15 +79,6 @@ const ticketDetail = ref({
});
const ticketLog = ref([]);
const ticketId = ref(null);
onMounted(() => {
//
if (props.ticket_ && Object.keys(props.ticket_).length > 0) {
ticketId.value = props.ticket_.id
getTicketDetail()
getTicketLog()
}
//
watch(
() => props.ticket_,
async (newVal) => {
@ -97,8 +88,9 @@ onMounted(() => {
getTicketLog()
}
},
{ deep: true }
{ immediate: false }
)
onMounted(() => {
});
const emit = defineEmits(['success']);
const refreshTicket = async () => {

View File

@ -35,22 +35,21 @@ const props = defineProps({
const workflow = ref(null);
const transitions = ref([]);
onMounted(async () => {
init();
init()
})
watch(
() => props.ticket_,
async (newVal) => {
if (newVal && Object.keys(newVal).length > 0) {
init();
await init()
}
},
{ deep: true }
{ immediate: false }
)
})
const ticketId = ref(null);
const actionShow = ref(false);
const init = async () => {
if (props.ticket_ && Object.keys(props.ticket_).length > 0) {
if (props.ticket_ != null && props.ticket_ != undefined) {
const isParticipant =
(props.ticket_.participant_type === 1 && props.ticket_.participant === currentUser.value) ||
(props.ticket_.participant_type === 2 && props.ticket_.participant.includes(currentUser.value))