Commit f16869982125100a07be19a69ac29c6b78ee3154
1 parent
ae8795df
vue3:review 部门管理、岗位管理、字典管理
Showing
6 changed files
with
20 additions
and
2 deletions
yudao-ui-admin-vue3/src/views/system/dict/dict.data.ts
| @@ -14,7 +14,7 @@ export const dictDataRules = reactive({ | @@ -14,7 +14,7 @@ export const dictDataRules = reactive({ | ||
| 14 | // crudSchemas | 14 | // crudSchemas |
| 15 | export const crudSchemas = reactive<VxeCrudSchema>({ | 15 | export const crudSchemas = reactive<VxeCrudSchema>({ |
| 16 | primaryKey: 'id', | 16 | primaryKey: 'id', |
| 17 | - primaryType: 'seq', | 17 | + primaryType: null, |
| 18 | action: true, | 18 | action: true, |
| 19 | actionWidth: '140px', | 19 | actionWidth: '140px', |
| 20 | columns: [ | 20 | columns: [ |
yudao-ui-admin-vue3/src/views/system/dict/dict.type.ts
| @@ -13,7 +13,7 @@ export const dictTypeRules = reactive({ | @@ -13,7 +13,7 @@ export const dictTypeRules = reactive({ | ||
| 13 | // 新增 + 修改 | 13 | // 新增 + 修改 |
| 14 | const crudSchemas = reactive<VxeCrudSchema>({ | 14 | const crudSchemas = reactive<VxeCrudSchema>({ |
| 15 | primaryKey: 'id', | 15 | primaryKey: 'id', |
| 16 | - primaryType: 'seq', | 16 | + primaryType: null, |
| 17 | action: true, | 17 | action: true, |
| 18 | actionWidth: '140px', | 18 | actionWidth: '140px', |
| 19 | columns: [ | 19 | columns: [ |
yudao-ui-admin-vue3/src/views/system/dict/index.vue
| 1 | <template> | 1 | <template> |
| 2 | <div class="flex"> | 2 | <div class="flex"> |
| 3 | + <!-- ====== 字典分类 ====== --> | ||
| 4 | + <!-- TODO 星语:筛选框很小 --> | ||
| 3 | <el-card class="w-1/2 dict" :gutter="12" shadow="always"> | 5 | <el-card class="w-1/2 dict" :gutter="12" shadow="always"> |
| 4 | <template #header> | 6 | <template #header> |
| 5 | <div class="card-header"> | 7 | <div class="card-header"> |
| @@ -12,6 +14,7 @@ | @@ -12,6 +14,7 @@ | ||
| 12 | @cell-click="cellClickEvent" | 14 | @cell-click="cellClickEvent" |
| 13 | class="xtable-scrollbar" | 15 | class="xtable-scrollbar" |
| 14 | > | 16 | > |
| 17 | + <!-- 操作:新增类型 --> | ||
| 15 | <template #toolbar_buttons> | 18 | <template #toolbar_buttons> |
| 16 | <XButton | 19 | <XButton |
| 17 | type="primary" | 20 | type="primary" |
| @@ -22,12 +25,14 @@ | @@ -22,12 +25,14 @@ | ||
| 22 | /> | 25 | /> |
| 23 | </template> | 26 | </template> |
| 24 | <template #actionbtns_default="{ row }"> | 27 | <template #actionbtns_default="{ row }"> |
| 28 | + <!-- 操作:编辑类型 --> | ||
| 25 | <XTextButton | 29 | <XTextButton |
| 26 | preIcon="ep:edit" | 30 | preIcon="ep:edit" |
| 27 | :title="t('action.edit')" | 31 | :title="t('action.edit')" |
| 28 | v-hasPermi="['system:dict:update']" | 32 | v-hasPermi="['system:dict:update']" |
| 29 | @click="handleTypeUpdate(row.id)" | 33 | @click="handleTypeUpdate(row.id)" |
| 30 | /> | 34 | /> |
| 35 | + <!-- 操作:删除类型 --> | ||
| 31 | <XTextButton | 36 | <XTextButton |
| 32 | preIcon="ep:delete" | 37 | preIcon="ep:delete" |
| 33 | :title="t('action.del')" | 38 | :title="t('action.del')" |
| @@ -36,7 +41,9 @@ | @@ -36,7 +41,9 @@ | ||
| 36 | /> | 41 | /> |
| 37 | </template> | 42 | </template> |
| 38 | </vxe-grid> | 43 | </vxe-grid> |
| 44 | + <!-- @星语:分页和列表重叠在一起了 --> | ||
| 39 | </el-card> | 45 | </el-card> |
| 46 | + <!-- ====== 字典数据 ====== --> | ||
| 40 | <el-card class="w-1/2 dict" style="margin-left: 10px" :gutter="12" shadow="hover"> | 47 | <el-card class="w-1/2 dict" style="margin-left: 10px" :gutter="12" shadow="hover"> |
| 41 | <template #header> | 48 | <template #header> |
| 42 | <div class="card-header"> | 49 | <div class="card-header"> |
| @@ -50,6 +57,7 @@ | @@ -50,6 +57,7 @@ | ||
| 50 | <div v-if="tableTypeSelect"> | 57 | <div v-if="tableTypeSelect"> |
| 51 | <!-- 列表 --> | 58 | <!-- 列表 --> |
| 52 | <vxe-grid ref="xDataGrid" v-bind="dataGridOptions" class="xtable-scrollbar"> | 59 | <vxe-grid ref="xDataGrid" v-bind="dataGridOptions" class="xtable-scrollbar"> |
| 60 | + <!-- 操作:新增数据 --> | ||
| 53 | <template #toolbar_buttons> | 61 | <template #toolbar_buttons> |
| 54 | <XButton | 62 | <XButton |
| 55 | type="primary" | 63 | type="primary" |
| @@ -60,12 +68,14 @@ | @@ -60,12 +68,14 @@ | ||
| 60 | /> | 68 | /> |
| 61 | </template> | 69 | </template> |
| 62 | <template #actionbtns_default="{ row }"> | 70 | <template #actionbtns_default="{ row }"> |
| 71 | + <!-- 操作:修改数据 --> | ||
| 63 | <XTextButton | 72 | <XTextButton |
| 64 | v-hasPermi="['system:dict:update']" | 73 | v-hasPermi="['system:dict:update']" |
| 65 | preIcon="ep:edit" | 74 | preIcon="ep:edit" |
| 66 | :title="t('action.edit')" | 75 | :title="t('action.edit')" |
| 67 | @click="handleDataUpdate(row.id)" | 76 | @click="handleDataUpdate(row.id)" |
| 68 | /> | 77 | /> |
| 78 | + <!-- 操作:删除数据 --> | ||
| 69 | <XTextButton | 79 | <XTextButton |
| 70 | v-hasPermi="['system:dict:delete']" | 80 | v-hasPermi="['system:dict:delete']" |
| 71 | preIcon="ep:delete" | 81 | preIcon="ep:delete" |
yudao-ui-admin-vue3/src/views/system/post/post.data.ts
| @@ -16,6 +16,7 @@ export const rules = reactive({ | @@ -16,6 +16,7 @@ export const rules = reactive({ | ||
| 16 | const crudSchemas = reactive<VxeCrudSchema>({ | 16 | const crudSchemas = reactive<VxeCrudSchema>({ |
| 17 | primaryKey: 'id', | 17 | primaryKey: 'id', |
| 18 | primaryType: 'seq', | 18 | primaryType: 'seq', |
| 19 | + primaryTitle: '岗位编号', | ||
| 19 | action: true, | 20 | action: true, |
| 20 | columns: [ | 21 | columns: [ |
| 21 | { | 22 | { |
yudao-ui-admin-vue3/src/views/system/role/index.vue
| @@ -13,30 +13,35 @@ | @@ -13,30 +13,35 @@ | ||
| 13 | /> | 13 | /> |
| 14 | </template> | 14 | </template> |
| 15 | <template #actionbtns_default="{ row }"> | 15 | <template #actionbtns_default="{ row }"> |
| 16 | + <!-- 操作:编辑 --> | ||
| 16 | <XTextButton | 17 | <XTextButton |
| 17 | preIcon="ep:edit" | 18 | preIcon="ep:edit" |
| 18 | :title="t('action.edit')" | 19 | :title="t('action.edit')" |
| 19 | v-hasPermi="['system:role:update']" | 20 | v-hasPermi="['system:role:update']" |
| 20 | @click="handleUpdate(row.id)" | 21 | @click="handleUpdate(row.id)" |
| 21 | /> | 22 | /> |
| 23 | + <!-- 操作:详情 --> | ||
| 22 | <XTextButton | 24 | <XTextButton |
| 23 | preIcon="ep:view" | 25 | preIcon="ep:view" |
| 24 | :title="t('action.detail')" | 26 | :title="t('action.detail')" |
| 25 | v-hasPermi="['system:role:query']" | 27 | v-hasPermi="['system:role:query']" |
| 26 | @click="handleDetail(row.id)" | 28 | @click="handleDetail(row.id)" |
| 27 | /> | 29 | /> |
| 30 | + <!-- 操作:菜单权限 --> | ||
| 28 | <XTextButton | 31 | <XTextButton |
| 29 | preIcon="ep:basketball" | 32 | preIcon="ep:basketball" |
| 30 | title="菜单权限" | 33 | title="菜单权限" |
| 31 | v-hasPermi="['system:permission:assign-role-menu']" | 34 | v-hasPermi="['system:permission:assign-role-menu']" |
| 32 | @click="handleScope('menu', row)" | 35 | @click="handleScope('menu', row)" |
| 33 | /> | 36 | /> |
| 37 | + <!-- 操作:数据权限 --> | ||
| 34 | <XTextButton | 38 | <XTextButton |
| 35 | preIcon="ep:coin" | 39 | preIcon="ep:coin" |
| 36 | title="数据权限" | 40 | title="数据权限" |
| 37 | v-hasPermi="['system:permission:assign-role-data-scope']" | 41 | v-hasPermi="['system:permission:assign-role-data-scope']" |
| 38 | @click="handleScope('data', row)" | 42 | @click="handleScope('data', row)" |
| 39 | /> | 43 | /> |
| 44 | + <!-- 操作:删除 --> | ||
| 40 | <XTextButton | 45 | <XTextButton |
| 41 | preIcon="ep:delete" | 46 | preIcon="ep:delete" |
| 42 | :title="t('action.del')" | 47 | :title="t('action.del')" |
| @@ -73,6 +78,7 @@ | @@ -73,6 +78,7 @@ | ||
| 73 | <XButton :loading="actionLoading" :title="t('dialog.close')" @click="dialogVisible = false" /> | 78 | <XButton :loading="actionLoading" :title="t('dialog.close')" @click="dialogVisible = false" /> |
| 74 | </template> | 79 | </template> |
| 75 | </XModal> | 80 | </XModal> |
| 81 | + | ||
| 76 | <XModal v-model="dialogScopeVisible" :title="dialogScopeTitle"> | 82 | <XModal v-model="dialogScopeVisible" :title="dialogScopeTitle"> |
| 77 | <el-form :model="dataScopeForm" label-width="140px" :inline="true"> | 83 | <el-form :model="dataScopeForm" label-width="140px" :inline="true"> |
| 78 | <el-form-item label="角色名称"> | 84 | <el-form-item label="角色名称"> |
yudao-ui-admin-vue3/src/views/system/role/role.data.ts
| @@ -14,6 +14,7 @@ export const rules = reactive({ | @@ -14,6 +14,7 @@ export const rules = reactive({ | ||
| 14 | // CrudSchema | 14 | // CrudSchema |
| 15 | const crudSchemas = reactive<VxeCrudSchema>({ | 15 | const crudSchemas = reactive<VxeCrudSchema>({ |
| 16 | primaryKey: 'id', | 16 | primaryKey: 'id', |
| 17 | + primaryTitle: '角色编号', | ||
| 17 | primaryType: 'seq', | 18 | primaryType: 'seq', |
| 18 | action: true, | 19 | action: true, |
| 19 | actionWidth: '400px', | 20 | actionWidth: '400px', |