|
|
@ -241,7 +241,7 @@ |
|
|
|
<script setup lang="ts"> |
|
|
|
import { ref, reactive, computed, onMounted, nextTick, toRaw, useAttrs, getCurrentInstance, provide, watchEffect, watch, onUpdated } from 'vue'; |
|
|
|
import { useI18n } from 'vue-i18n'; |
|
|
|
import { axios, Environment, NotifyManager, TreeBuilder, VueTools, Tools, eventBus } from '@/platform'; |
|
|
|
import { axios, Environment, NotifyManager, TreeBuilder, VueTools, Tools, eventBus, noErrorAxios } from '@/platform'; |
|
|
|
import { useQuasar, getCssVar, exportFile } from 'quasar'; |
|
|
|
import { IconEnum } from '@/platform/enums'; |
|
|
|
import { arrayToMap, OperatorTypeEnum, isEmpty, PageStatusEnum } from '@/platform/components/utils'; |
|
|
@ -735,7 +735,8 @@ const buttonObj = reactive({ |
|
|
|
$q.dialog({ |
|
|
|
title: t('confirm'), |
|
|
|
message: t('action.remove.tip'), |
|
|
|
cancel: true, |
|
|
|
cancel: { noCaps: true }, |
|
|
|
ok: { noCaps: true }, |
|
|
|
persistent: true, |
|
|
|
}).onOk(() => { |
|
|
|
remove(); |
|
|
@ -844,7 +845,8 @@ const buttonObj = reactive({ |
|
|
|
$q.dialog({ |
|
|
|
title: t('confirm'), |
|
|
|
message: t('action.resetDefaultValues.tip'), |
|
|
|
cancel: true, |
|
|
|
cancel: { noCaps: true }, |
|
|
|
ok: { noCaps: true }, |
|
|
|
persistent: true, |
|
|
|
}).onOk(() => { |
|
|
|
resetDefaultValues(); |
|
|
@ -1566,7 +1568,7 @@ const save = async () => { |
|
|
|
: (url.editDataUrl ? url.editDataUrl : url.dataUrl) + '/' + getSelectedRowsComputed.value[0][props.primaryKey], |
|
|
|
}; |
|
|
|
dialog.dialogButtons[0].loading = false; |
|
|
|
axios(requestParams) |
|
|
|
noErrorAxios(requestParams) |
|
|
|
.then((resp) => { |
|
|
|
dialog.dialogButtons[0].loading = false; |
|
|
|
emit('afterEditorDataSubmit', resp.data); |
|
|
@ -1575,7 +1577,22 @@ const save = async () => { |
|
|
|
onRequest({ pagination: state.pagination }); |
|
|
|
}) |
|
|
|
.catch((error) => { |
|
|
|
console.info('error====', error); |
|
|
|
const response = error?.response; |
|
|
|
const status = response?.status; |
|
|
|
const data = response?.data; |
|
|
|
if (data?.code === 1001) { |
|
|
|
// 验证错误 |
|
|
|
if (error.response.data.data) { |
|
|
|
dialogFormRef.value.setValidationErrors(error.response.data.data); |
|
|
|
} |
|
|
|
} else { |
|
|
|
//其他错误 |
|
|
|
if (status === 500) { |
|
|
|
NotifyManager.error(t(data?.errorMessageI18nKey)); |
|
|
|
} else { |
|
|
|
NotifyManager.error(t(status)); |
|
|
|
} |
|
|
|
} |
|
|
|
dialog.dialogButtons[0].loading = false; |
|
|
|
}); |
|
|
|
} else { |
|
|
@ -2477,7 +2494,7 @@ VueTools.expose2Instance(instance); |
|
|
|
border-bottom-width: 1px; |
|
|
|
} |
|
|
|
|
|
|
|
.sticky-header-column-table thead tr { |
|
|
|
.sticky-header-column-table thead tr:not(.noDataTr) { |
|
|
|
height: var(--tableColumnTitleHeight) !important; |
|
|
|
} |
|
|
|
|
|
|
|