fix: i18n & work name before close
This commit is contained in:
parent
17289402fd
commit
185a713ad1
7 changed files with 64 additions and 31 deletions
|
|
@ -325,10 +325,10 @@ async function openDialog(
|
|||
dialog({
|
||||
color: 'warning',
|
||||
icon: 'mdi-alert',
|
||||
title: t('warning'),
|
||||
actionText: t('agree'),
|
||||
title: t('form.warning.title'),
|
||||
actionText: t('ok'),
|
||||
persistent: true,
|
||||
message: t('headquartersNotEstablished'),
|
||||
message: t('dialog.message.headquartersNotEstablished'),
|
||||
action: async () => {},
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1209,19 +1209,12 @@ function confirmDeleteWork(id: string) {
|
|||
}
|
||||
|
||||
function triggerConfirmCloseWork() {
|
||||
const isWorkNameEdit =
|
||||
workNameRef.value && workNameRef.value.isWorkNameEdit
|
||||
? workNameRef.value.isWorkNameEdit()
|
||||
: false;
|
||||
if (isWorkNameEdit) {
|
||||
dialogWarningClose(t, {
|
||||
action: () => {
|
||||
manageWorkNameDialog.value = false;
|
||||
},
|
||||
});
|
||||
} else {
|
||||
manageWorkNameDialog.value = false;
|
||||
}
|
||||
dialogWarningClose(t, {
|
||||
action: () => {
|
||||
manageWorkNameDialog.value = false;
|
||||
},
|
||||
cancel: () => {},
|
||||
});
|
||||
}
|
||||
|
||||
const tempValueProperties = ref<Attributes>({
|
||||
|
|
@ -4066,7 +4059,19 @@ watch([currentStatusList, productMode], () => {
|
|||
width="65%"
|
||||
v-model:modal="manageWorkNameDialog"
|
||||
:title="$t('general.manage')"
|
||||
:close="triggerConfirmCloseWork"
|
||||
:before-close="
|
||||
() => {
|
||||
const isWorkNameEdit =
|
||||
workNameRef && workNameRef.isWorkNameEdit
|
||||
? workNameRef.isWorkNameEdit()
|
||||
: false;
|
||||
if (isWorkNameEdit) {
|
||||
triggerConfirmCloseWork();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
"
|
||||
>
|
||||
<div class="q-pa-lg full-height">
|
||||
<WorkNameManagement
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue