Merge branch 'master' of http://gitea.xxhhcty.xyz:8080/zcdsj/factory_web
This commit is contained in:
commit
f9694f0466
|
|
@ -63,7 +63,7 @@
|
|||
</el-dialog>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, defineProps, onMounted } from "vue";
|
||||
import { ref, defineProps, onMounted, watch } from "vue";
|
||||
import { actStateEnum, interveneTypeEnum } from "@/utils/enum.js";
|
||||
import API from '@/api';
|
||||
import TOOL from "@/utils/tool.js";
|
||||
|
|
@ -79,6 +79,15 @@ 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) => {
|
||||
|
|
@ -88,9 +97,8 @@ watch(
|
|||
getTicketLog()
|
||||
}
|
||||
},
|
||||
{ immediate: false }
|
||||
{ deep: true }
|
||||
)
|
||||
onMounted(() => {
|
||||
});
|
||||
const emit = defineEmits(['success']);
|
||||
const refreshTicket = async () => {
|
||||
|
|
|
|||
|
|
@ -35,21 +35,22 @@ 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) {
|
||||
await init()
|
||||
init();
|
||||
}
|
||||
},
|
||||
{ immediate: false }
|
||||
{ deep: true }
|
||||
)
|
||||
})
|
||||
|
||||
const ticketId = ref(null);
|
||||
const actionShow = ref(false);
|
||||
const init = async () => {
|
||||
if (props.ticket_ != null && props.ticket_ != undefined) {
|
||||
if (props.ticket_ && Object.keys(props.ticket_).length > 0) {
|
||||
const isParticipant =
|
||||
(props.ticket_.participant_type === 1 && props.ticket_.participant === currentUser.value) ||
|
||||
(props.ticket_.participant_type === 2 && props.ticket_.participant.includes(currentUser.value))
|
||||
|
|
|
|||
Loading…
Reference in New Issue