refs #7355 fix accounts, vnTable
This commit is contained in:
parent
2134b9f8c2
commit
9899d73566
|
@ -107,7 +107,7 @@ const orders = ref(parseOrder(routeQuery.filter?.order));
|
|||
const CrudModelRef = ref({});
|
||||
const showForm = ref(false);
|
||||
const splittedColumns = ref({ columns: [] });
|
||||
const columnsVisibilitySkiped = ref();
|
||||
const columnsVisibilitySkipped = ref();
|
||||
const createForm = ref();
|
||||
|
||||
const tableModes = [
|
||||
|
@ -116,12 +116,14 @@ const tableModes = [
|
|||
title: t('table view'),
|
||||
value: TABLE_MODE,
|
||||
disable: $props.disableOption?.table,
|
||||
visible: $props.disableOption?.table,
|
||||
},
|
||||
{
|
||||
icon: 'grid_view',
|
||||
title: t('grid view'),
|
||||
value: CARD_MODE,
|
||||
disable: $props.disableOption?.card,
|
||||
visible: $props.disableOption?.card,
|
||||
},
|
||||
];
|
||||
onBeforeMount(() => {
|
||||
|
@ -135,7 +137,7 @@ onMounted(() => {
|
|||
? CARD_MODE
|
||||
: $props.defaultMode;
|
||||
stateStore.rightDrawer = true;
|
||||
columnsVisibilitySkiped.value = [
|
||||
columnsVisibilitySkipped.value = [
|
||||
...splittedColumns.value.columns
|
||||
.filter((c) => c.visible == false)
|
||||
.map((c) => c.name),
|
||||
|
@ -380,14 +382,14 @@ defineExpose({
|
|||
v-if="isTableMode"
|
||||
v-model="splittedColumns.columns"
|
||||
:table-code="tableCode ?? route.name"
|
||||
:skip="columnsVisibilitySkiped"
|
||||
:skip="columnsVisibilitySkipped"
|
||||
/>
|
||||
<QBtnToggle
|
||||
v-model="mode"
|
||||
toggle-color="primary"
|
||||
class="bg-vn-section-color"
|
||||
dense
|
||||
:options="tableModes"
|
||||
:options="tableModes.filter((mode) => !mode.visible)"
|
||||
/>
|
||||
<QBtn
|
||||
v-if="$props.rightSearch"
|
||||
|
|
|
@ -141,6 +141,7 @@ const deleteAcl = async ({ id }) => {
|
|||
formInitialData: {},
|
||||
}"
|
||||
order="id DESC"
|
||||
:disable-option="{ card: true }"
|
||||
:columns="columns"
|
||||
default-mode="table"
|
||||
:right-search="true"
|
||||
|
|
|
@ -21,24 +21,21 @@ const columns = computed(() => [
|
|||
{
|
||||
align: 'left',
|
||||
name: 'id',
|
||||
label: t('id'),
|
||||
label: t('Id'),
|
||||
isId: true,
|
||||
field: 'id',
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'alias',
|
||||
label: t('alias'),
|
||||
field: 'alias',
|
||||
label: t('Alias'),
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'description',
|
||||
label: t('description'),
|
||||
field: 'description',
|
||||
label: t('Description'),
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
},
|
||||
|
@ -69,9 +66,17 @@ const columns = computed(() => [
|
|||
}"
|
||||
order="id DESC"
|
||||
:columns="columns"
|
||||
:disable-option="{ card: true }"
|
||||
default-mode="table"
|
||||
redirect="account/alias"
|
||||
:is-editable="true"
|
||||
:use-model="true"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
es:
|
||||
Id: Id
|
||||
Alias: Alias
|
||||
Description: Descripción
|
||||
</i18n>
|
||||
|
|
|
@ -14,15 +14,23 @@ const columns = computed(() => [
|
|||
{
|
||||
align: 'left',
|
||||
name: 'id',
|
||||
label: t('id'),
|
||||
label: t('Id'),
|
||||
isId: true,
|
||||
field: 'id',
|
||||
cardVisible: true,
|
||||
columnFilter: {
|
||||
component: 'select',
|
||||
name: 'search',
|
||||
attrs: {
|
||||
url: 'VnUsers/preview',
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'username',
|
||||
label: t('nickname'),
|
||||
label: t('Nickname'),
|
||||
isTitle: true,
|
||||
component: 'input',
|
||||
columnField: {
|
||||
|
@ -37,7 +45,7 @@ const columns = computed(() => [
|
|||
{
|
||||
align: 'left',
|
||||
name: 'name',
|
||||
label: t('name'),
|
||||
label: t('Name'),
|
||||
component: 'input',
|
||||
columnField: {
|
||||
component: null,
|
||||
|
@ -65,6 +73,7 @@ const columns = computed(() => [
|
|||
title: t('View Summary'),
|
||||
icon: 'preview',
|
||||
action: (row) => viewSummary(row.id, AccountSummary),
|
||||
isPrimary: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -108,3 +117,10 @@ const exprBuilder = (param, value) => {
|
|||
:use-model="true"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
es:
|
||||
Id: Id
|
||||
Nickname: Nickname
|
||||
Name: Nombre
|
||||
</i18n>
|
||||
|
|
|
@ -15,7 +15,6 @@ const { t } = useI18n();
|
|||
url: 'VnUsers/preview',
|
||||
label: t('account.search'),
|
||||
info: t('account.searchInfo'),
|
||||
searchUrl: 'table',
|
||||
}"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
@ -21,7 +21,7 @@ const columns = computed(() => [
|
|||
{
|
||||
align: 'left',
|
||||
name: 'id',
|
||||
label: t('id'),
|
||||
label: t('Id'),
|
||||
isId: true,
|
||||
columnFilter: {
|
||||
inWhere: true,
|
||||
|
@ -31,14 +31,14 @@ const columns = computed(() => [
|
|||
{
|
||||
align: 'left',
|
||||
name: 'name',
|
||||
label: t('name'),
|
||||
label: t('Name'),
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'description',
|
||||
label: t('description'),
|
||||
label: t('Description'),
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
},
|
||||
|
@ -51,6 +51,7 @@ const columns = computed(() => [
|
|||
title: t('View Summary'),
|
||||
icon: 'preview',
|
||||
action: (row) => viewSummary(row.id, RoleSummary),
|
||||
isPrimary: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -93,8 +94,16 @@ const exprBuilder = (param, value) => {
|
|||
},
|
||||
}"
|
||||
order="id ASC"
|
||||
:disable-option="{ card: true }"
|
||||
:columns="columns"
|
||||
default-mode="table"
|
||||
redirect="account/role"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
es:
|
||||
Id: Id
|
||||
Description: Descripción
|
||||
Name: Nombre
|
||||
</i18n>
|
||||
|
|
Loading…
Reference in New Issue