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