前端迁移
This commit is contained in:
@@ -46,6 +46,7 @@ security:
|
|||||||
# 排除路径
|
# 排除路径
|
||||||
excludes:
|
excludes:
|
||||||
# 认证
|
# 认证
|
||||||
|
- /login
|
||||||
- /auth/login
|
- /auth/login
|
||||||
- /auth/code
|
- /auth/code
|
||||||
- /auth/logout
|
- /auth/logout
|
||||||
@@ -94,3 +95,4 @@ sa-token:
|
|||||||
is-print: false
|
is-print: false
|
||||||
# token 前缀
|
# token 前缀
|
||||||
token-prefix: Bearer
|
token-prefix: Bearer
|
||||||
|
|
||||||
|
|||||||
@@ -13,9 +13,9 @@
|
|||||||
class="filter-item"
|
class="filter-item"
|
||||||
@keyup.enter.native="crud.toQuery"
|
@keyup.enter.native="crud.toQuery"
|
||||||
/>
|
/>
|
||||||
<rrOperation/>
|
<rrOperation />
|
||||||
</div>
|
</div>
|
||||||
<crudOperation :permission="permission"/>
|
<crudOperation :permission="permission" />
|
||||||
</div>
|
</div>
|
||||||
<!-- 表单渲染 -->
|
<!-- 表单渲染 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
@@ -28,10 +28,10 @@
|
|||||||
>
|
>
|
||||||
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="mini" label-width="80px">
|
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="mini" label-width="80px">
|
||||||
<el-form-item label="角色名称" prop="name">
|
<el-form-item label="角色名称" prop="name">
|
||||||
<el-input v-model="form.name" style="width: 380px;"/>
|
<el-input v-model="form.name" style="width: 380px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="description">
|
<el-form-item label="备注" prop="description">
|
||||||
<el-input v-model="form.description" style="width: 380px;" rows="2" type="textarea"/>
|
<el-input v-model="form.description" style="width: 380px;" rows="2" type="textarea" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
@@ -55,9 +55,9 @@
|
|||||||
@selection-change="crud.selectionChangeHandler"
|
@selection-change="crud.selectionChangeHandler"
|
||||||
@current-change="handleCurrentChange"
|
@current-change="handleCurrentChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55"/>
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column prop="name" label="名称" min-width="100" show-overflow-tooltip/>
|
<el-table-column prop="name" label="名称" min-width="100" show-overflow-tooltip />
|
||||||
<el-table-column show-overflow-tooltip prop="remark" label="描述"/>
|
<el-table-column show-overflow-tooltip prop="remark" label="描述" />
|
||||||
<el-table-column show-overflow-tooltip width="135px" prop="create_time" label="创建日期">
|
<el-table-column show-overflow-tooltip width="135px" prop="create_time" label="创建日期">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.create_time) }}</span>
|
<span>{{ parseTime(scope.row.create_time) }}</span>
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination/>
|
<pagination />
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- 菜单授权 -->
|
<!-- 菜单授权 -->
|
||||||
@@ -136,7 +136,7 @@ export default {
|
|||||||
name: 'Role',
|
name: 'Role',
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation, crudMenu },
|
components: { pagination, crudOperation, rrOperation, udOperation, crudMenu },
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({ idField: 'role_id', title: '角色', url: 'api/roles', crudMethod: { ...crudRoles } })
|
return CRUD({ idField: 'role_id', title: '角色', url: 'api/roles', crudMethod: { ...crudRoles }})
|
||||||
},
|
},
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
data() {
|
data() {
|
||||||
@@ -199,6 +199,8 @@ export default {
|
|||||||
// 触发单选
|
// 触发单选
|
||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
|
this.$refs.table.clearSelection()
|
||||||
|
this.$refs.table.toggleRowSelection(val, true)
|
||||||
const _this = this
|
const _this = this
|
||||||
// 清空菜单的选中
|
// 清空菜单的选中
|
||||||
this.$refs.menu.setCheckedKeys([])
|
this.$refs.menu.setCheckedKeys([])
|
||||||
@@ -246,7 +248,7 @@ export default {
|
|||||||
crudRoles.editMenu(role).then(() => {
|
crudRoles.editMenu(role).then(() => {
|
||||||
this.crud.notify('保存成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
this.crud.notify('保存成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
this.menuLoading = false
|
this.menuLoading = false
|
||||||
this.update()
|
// this.update()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.menuLoading = false
|
this.menuLoading = false
|
||||||
console.log(err.response.data.message)
|
console.log(err.response.data.message)
|
||||||
@@ -254,6 +256,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 改变数据
|
// 改变数据
|
||||||
update() {
|
update() {
|
||||||
|
debugger
|
||||||
// 无刷新更新 表格数据
|
// 无刷新更新 表格数据
|
||||||
crudRoles.get(this.currentId).then(res => {
|
crudRoles.get(this.currentId).then(res => {
|
||||||
for (let i = 0; i < this.crud.data.length; i++) {
|
for (let i = 0; i < this.crud.data.length; i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user