vue3:review 部门管理、岗位管理、字典管理
parent
ae8795df8e
commit
f168699821
|
@ -14,7 +14,7 @@ export const dictDataRules = reactive({
|
||||||
// crudSchemas
|
// crudSchemas
|
||||||
export const crudSchemas = reactive<VxeCrudSchema>({
|
export const crudSchemas = reactive<VxeCrudSchema>({
|
||||||
primaryKey: 'id',
|
primaryKey: 'id',
|
||||||
primaryType: 'seq',
|
primaryType: null,
|
||||||
action: true,
|
action: true,
|
||||||
actionWidth: '140px',
|
actionWidth: '140px',
|
||||||
columns: [
|
columns: [
|
||||||
|
|
|
@ -13,7 +13,7 @@ export const dictTypeRules = reactive({
|
||||||
// 新增 + 修改
|
// 新增 + 修改
|
||||||
const crudSchemas = reactive<VxeCrudSchema>({
|
const crudSchemas = reactive<VxeCrudSchema>({
|
||||||
primaryKey: 'id',
|
primaryKey: 'id',
|
||||||
primaryType: 'seq',
|
primaryType: null,
|
||||||
action: true,
|
action: true,
|
||||||
actionWidth: '140px',
|
actionWidth: '140px',
|
||||||
columns: [
|
columns: [
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
|
<!-- ====== 字典分类 ====== -->
|
||||||
|
<!-- TODO 星语:筛选框很小 -->
|
||||||
<el-card class="w-1/2 dict" :gutter="12" shadow="always">
|
<el-card class="w-1/2 dict" :gutter="12" shadow="always">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
|
@ -12,6 +14,7 @@
|
||||||
@cell-click="cellClickEvent"
|
@cell-click="cellClickEvent"
|
||||||
class="xtable-scrollbar"
|
class="xtable-scrollbar"
|
||||||
>
|
>
|
||||||
|
<!-- 操作:新增类型 -->
|
||||||
<template #toolbar_buttons>
|
<template #toolbar_buttons>
|
||||||
<XButton
|
<XButton
|
||||||
type="primary"
|
type="primary"
|
||||||
|
@ -22,12 +25,14 @@
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #actionbtns_default="{ row }">
|
<template #actionbtns_default="{ row }">
|
||||||
|
<!-- 操作:编辑类型 -->
|
||||||
<XTextButton
|
<XTextButton
|
||||||
preIcon="ep:edit"
|
preIcon="ep:edit"
|
||||||
:title="t('action.edit')"
|
:title="t('action.edit')"
|
||||||
v-hasPermi="['system:dict:update']"
|
v-hasPermi="['system:dict:update']"
|
||||||
@click="handleTypeUpdate(row.id)"
|
@click="handleTypeUpdate(row.id)"
|
||||||
/>
|
/>
|
||||||
|
<!-- 操作:删除类型 -->
|
||||||
<XTextButton
|
<XTextButton
|
||||||
preIcon="ep:delete"
|
preIcon="ep:delete"
|
||||||
:title="t('action.del')"
|
:title="t('action.del')"
|
||||||
|
@ -36,7 +41,9 @@
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</vxe-grid>
|
</vxe-grid>
|
||||||
|
<!-- @星语:分页和列表重叠在一起了 -->
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<!-- ====== 字典数据 ====== -->
|
||||||
<el-card class="w-1/2 dict" style="margin-left: 10px" :gutter="12" shadow="hover">
|
<el-card class="w-1/2 dict" style="margin-left: 10px" :gutter="12" shadow="hover">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
|
@ -50,6 +57,7 @@
|
||||||
<div v-if="tableTypeSelect">
|
<div v-if="tableTypeSelect">
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<vxe-grid ref="xDataGrid" v-bind="dataGridOptions" class="xtable-scrollbar">
|
<vxe-grid ref="xDataGrid" v-bind="dataGridOptions" class="xtable-scrollbar">
|
||||||
|
<!-- 操作:新增数据 -->
|
||||||
<template #toolbar_buttons>
|
<template #toolbar_buttons>
|
||||||
<XButton
|
<XButton
|
||||||
type="primary"
|
type="primary"
|
||||||
|
@ -60,12 +68,14 @@
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #actionbtns_default="{ row }">
|
<template #actionbtns_default="{ row }">
|
||||||
|
<!-- 操作:修改数据 -->
|
||||||
<XTextButton
|
<XTextButton
|
||||||
v-hasPermi="['system:dict:update']"
|
v-hasPermi="['system:dict:update']"
|
||||||
preIcon="ep:edit"
|
preIcon="ep:edit"
|
||||||
:title="t('action.edit')"
|
:title="t('action.edit')"
|
||||||
@click="handleDataUpdate(row.id)"
|
@click="handleDataUpdate(row.id)"
|
||||||
/>
|
/>
|
||||||
|
<!-- 操作:删除数据 -->
|
||||||
<XTextButton
|
<XTextButton
|
||||||
v-hasPermi="['system:dict:delete']"
|
v-hasPermi="['system:dict:delete']"
|
||||||
preIcon="ep:delete"
|
preIcon="ep:delete"
|
||||||
|
|
|
@ -16,6 +16,7 @@ export const rules = reactive({
|
||||||
const crudSchemas = reactive<VxeCrudSchema>({
|
const crudSchemas = reactive<VxeCrudSchema>({
|
||||||
primaryKey: 'id',
|
primaryKey: 'id',
|
||||||
primaryType: 'seq',
|
primaryType: 'seq',
|
||||||
|
primaryTitle: '岗位编号',
|
||||||
action: true,
|
action: true,
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,30 +13,35 @@
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #actionbtns_default="{ row }">
|
<template #actionbtns_default="{ row }">
|
||||||
|
<!-- 操作:编辑 -->
|
||||||
<XTextButton
|
<XTextButton
|
||||||
preIcon="ep:edit"
|
preIcon="ep:edit"
|
||||||
:title="t('action.edit')"
|
:title="t('action.edit')"
|
||||||
v-hasPermi="['system:role:update']"
|
v-hasPermi="['system:role:update']"
|
||||||
@click="handleUpdate(row.id)"
|
@click="handleUpdate(row.id)"
|
||||||
/>
|
/>
|
||||||
|
<!-- 操作:详情 -->
|
||||||
<XTextButton
|
<XTextButton
|
||||||
preIcon="ep:view"
|
preIcon="ep:view"
|
||||||
:title="t('action.detail')"
|
:title="t('action.detail')"
|
||||||
v-hasPermi="['system:role:query']"
|
v-hasPermi="['system:role:query']"
|
||||||
@click="handleDetail(row.id)"
|
@click="handleDetail(row.id)"
|
||||||
/>
|
/>
|
||||||
|
<!-- 操作:菜单权限 -->
|
||||||
<XTextButton
|
<XTextButton
|
||||||
preIcon="ep:basketball"
|
preIcon="ep:basketball"
|
||||||
title="菜单权限"
|
title="菜单权限"
|
||||||
v-hasPermi="['system:permission:assign-role-menu']"
|
v-hasPermi="['system:permission:assign-role-menu']"
|
||||||
@click="handleScope('menu', row)"
|
@click="handleScope('menu', row)"
|
||||||
/>
|
/>
|
||||||
|
<!-- 操作:数据权限 -->
|
||||||
<XTextButton
|
<XTextButton
|
||||||
preIcon="ep:coin"
|
preIcon="ep:coin"
|
||||||
title="数据权限"
|
title="数据权限"
|
||||||
v-hasPermi="['system:permission:assign-role-data-scope']"
|
v-hasPermi="['system:permission:assign-role-data-scope']"
|
||||||
@click="handleScope('data', row)"
|
@click="handleScope('data', row)"
|
||||||
/>
|
/>
|
||||||
|
<!-- 操作:删除 -->
|
||||||
<XTextButton
|
<XTextButton
|
||||||
preIcon="ep:delete"
|
preIcon="ep:delete"
|
||||||
:title="t('action.del')"
|
:title="t('action.del')"
|
||||||
|
@ -73,6 +78,7 @@
|
||||||
<XButton :loading="actionLoading" :title="t('dialog.close')" @click="dialogVisible = false" />
|
<XButton :loading="actionLoading" :title="t('dialog.close')" @click="dialogVisible = false" />
|
||||||
</template>
|
</template>
|
||||||
</XModal>
|
</XModal>
|
||||||
|
|
||||||
<XModal v-model="dialogScopeVisible" :title="dialogScopeTitle">
|
<XModal v-model="dialogScopeVisible" :title="dialogScopeTitle">
|
||||||
<el-form :model="dataScopeForm" label-width="140px" :inline="true">
|
<el-form :model="dataScopeForm" label-width="140px" :inline="true">
|
||||||
<el-form-item label="角色名称">
|
<el-form-item label="角色名称">
|
||||||
|
|
|
@ -14,6 +14,7 @@ export const rules = reactive({
|
||||||
// CrudSchema
|
// CrudSchema
|
||||||
const crudSchemas = reactive<VxeCrudSchema>({
|
const crudSchemas = reactive<VxeCrudSchema>({
|
||||||
primaryKey: 'id',
|
primaryKey: 'id',
|
||||||
|
primaryTitle: '角色编号',
|
||||||
primaryType: 'seq',
|
primaryType: 'seq',
|
||||||
action: true,
|
action: true,
|
||||||
actionWidth: '400px',
|
actionWidth: '400px',
|
||||||
|
|
Loading…
Reference in New Issue