Browse Source

fix: 修复无法加载问题详情的问题

feature/tsjb-1.0
wxc 7 days ago
parent
commit
da30aad3ac
  1. 29
      src/components/negative/dialog.vue

29
src/components/negative/dialog.vue

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
:show-close="false" :show-close="false"
:visible.sync="visible" v-model="visible"
width="84vw" width="84vw"
top="2vh" top="2vh"
class="dialog-header-nopadding" class="dialog-header-nopadding"
@ -436,7 +436,7 @@ const dict = useCatchStore().getDicts([
]); ]);
const props = defineProps({ const props = defineProps({
visible: Boolean, modelValue: Boolean,
id: { id: {
type: String, type: String,
required: true, required: true,
@ -447,7 +447,7 @@ const props = defineProps({
}, },
}); });
const emit = defineEmits(["close", "change"]); const emit = defineEmits(["close", "change", "update:modelValue"]);
const work = inject("work", null); const work = inject("work", null);
@ -507,11 +507,15 @@ const displayFlowActions = computed(() => {
return flowActions.value; return flowActions.value;
}); });
const visible = computed({
get: () => props.modelValue,
set: (val) => emit('update:modelValue', val)
});
watch( watch(
() => props.id, () => props.id,
() => { () => {
console.log('props.visible', props.visible) if (visible) {
if (props.visible) {
getDetails(); getDetails();
verifyEditFlag.value = false; verifyEditFlag.value = false;
formData.value = {}; formData.value = {};
@ -816,19 +820,14 @@ watch(
watch(loading, (val) => { watch(loading, (val) => {
if (!val) { if (!val) {
nextTick(() => { nextTick(() => {
if (actionHistoryRef.value) {
actionHistoryRef.value.style.height = `${ actionHistoryRef.value.style.height = `${
leftContainerRef.value.offsetHeight -
(countdownContainerRef.value?.offsetHeight || 0) -
leftRowRef.value.offsetHeight
}px`;
console.log(
`${
leftContainerRef.value.offsetHeight - leftContainerRef.value.offsetHeight -
(countdownContainerRef.value?.offsetHeight || 0) - (countdownContainerRef.value?.offsetHeight || 0) -
leftRowRef.value.offsetHeight leftRowRef.value.offsetHeight
}px` }px`;
); }
}); });
} }
}); });

Loading…
Cancel
Save