feat: refs #6919 sync account
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
02a1554b21
commit
dcd681b656
|
@ -49,11 +49,10 @@ onBeforeMount(async () => {
|
||||||
|
|
||||||
onBeforeRouteUpdate(async (to, from) => {
|
onBeforeRouteUpdate(async (to, from) => {
|
||||||
if (to.params.id !== from.params.id) {
|
if (to.params.id !== from.params.id) {
|
||||||
arrayData.store.url = !regex.test(props.url)
|
if (props.idInWhere) arrayData.store.filter.where = { id: to.params.id };
|
||||||
? `${props.url}/${to.params.id}`
|
else arrayData.store.url = `${props.url}/${to.params.id}`;
|
||||||
: props.url.replace(regex, `/${to.params.id}`);
|
|
||||||
|
|
||||||
await arrayData.fetch({ append: false, updateRouter: false });
|
await arrayData.fetch({ updateRouter: false });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -8,13 +8,12 @@ import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||||
import AccountFilter from './AccountFilter.vue';
|
import AccountFilter from './AccountFilter.vue';
|
||||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||||
import exprBuilder from './AccountExprBuilder.js';
|
import exprBuilder from './AccountExprBuilder.js';
|
||||||
|
import filter from './Card/AccountFilter.js';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { viewSummary } = useSummaryDialog();
|
const { viewSummary } = useSummaryDialog();
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
const filter = {
|
|
||||||
include: { relation: 'role', scope: { fields: ['id', 'name'] } },
|
|
||||||
};
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
|
|
@ -17,6 +17,9 @@ import filter from './AccountFilter.js';
|
||||||
label: $t('account.search'),
|
label: $t('account.search'),
|
||||||
info: $t('account.searchInfo'),
|
info: $t('account.searchInfo'),
|
||||||
exprBuilder,
|
exprBuilder,
|
||||||
|
filter: {
|
||||||
|
include: { relation: 'role', scope: { fields: ['id', 'name'] } },
|
||||||
|
},
|
||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -7,6 +7,7 @@ import CardSummary from 'components/ui/CardSummary.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
|
|
||||||
import { useArrayData } from 'src/composables/useArrayData';
|
import { useArrayData } from 'src/composables/useArrayData';
|
||||||
|
import filter from './AccountFilter.js';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -21,11 +22,6 @@ const { store } = useArrayData('Account');
|
||||||
const account = ref(store.data);
|
const account = ref(store.data);
|
||||||
|
|
||||||
const entityId = computed(() => $props.id || route.params.id);
|
const entityId = computed(() => $props.id || route.params.id);
|
||||||
const filter = {
|
|
||||||
where: { id: entityId },
|
|
||||||
fields: ['id', 'nickname', 'name', 'role'],
|
|
||||||
include: { relation: 'role', scope: { fields: ['id', 'name'] } },
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
Loading…
Reference in New Issue