Commit f005a467 by dqjdda

角色菜单改造完成,去除权限管理,采用按钮方式显示在菜单管理中

parent b27f7e16
{
"name": "eladmin",
"name": "eladmin-web",
"version": "2.2.0",
"license": "Apache-2.0",
"description": "eladmin 前端代码",
......
import request from '@/utils/request'
// 获取所有的权限树
export function getPermissionTree() {
return request({
url: 'api/permissions/tree',
method: 'get'
})
}
export function add(data) {
return request({
url: 'api/permissions',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/permissions/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/permissions',
method: 'put',
data
})
}
......@@ -49,4 +49,3 @@ export function updateEmail(code, data) {
data
})
}
......@@ -8,7 +8,7 @@ export default class Dict {
async init(names, completeCallback) {
if (names === undefined || name === null) {
throw new Error('need dict names')
throw new Error('need Dict names')
}
const ps = []
names.forEach(n => {
......
......@@ -10,8 +10,8 @@ import '@/styles/index.scss' // global css
import App from './App'
import router from './router/routers'
import permission from './components/permission'
import dict from './components/dict'
import permission from './components/Permission'
import dict from './components/Dict'
import store from './store'
import '@/icons' // icon
......
......@@ -155,7 +155,7 @@ export default {
.login-form {
border-radius: 6px;
background: #ffffff;
width: 400px;
width: 385px;
padding: 25px 25px 5px 25px;
.el-input {
height: 38px;
......
......@@ -19,7 +19,7 @@
<el-table-column prop="createTime" label="操作" width="100px">
<template slot-scope="scope">
<el-popover
v-permission="['ADMIN']"
v-permission="['admin']"
:ref="scope.$index"
placement="top"
width="180">
......
......@@ -7,7 +7,7 @@
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toQuery">搜索</el-button>
<div style="display: inline-block;">
<!-- 清空缓存 -->
<el-button v-permission="['ADMIN','REDIS_ALL','REDIS_DELETE']" :loading="deleteAllLoading" type="warning" size="mini" class="filter-item" icon="el-icon-delete" @click="deleteAll">清空缓存</el-button>
<el-button v-permission="['admin','redis:del']" :loading="deleteAllLoading" type="warning" size="mini" class="filter-item" icon="el-icon-delete" @click="deleteAll">清空缓存</el-button>
</div>
</div>
<!--表格渲染-->
......@@ -25,10 +25,10 @@
</div>
</template>
</el-table-column>
<el-table-column v-if="checkPermission(['ADMIN','REDIS_ALL','REDIS_EDIT','REDIS_DELETE'])" label="操作" width="130px" align="center" fixed="right">
<el-table-column v-if="checkPermission(['admin','redis:del'])" label="操作" width="130px" align="center" fixed="right">
<template slot-scope="scope">
<el-popover
v-permission="['ADMIN','REDIS_ALL','REDIS_DELETE']"
v-permission="['admin','redis:del']"
:ref="scope.$index"
placement="top"
width="180">
......
......@@ -3,7 +3,7 @@
</template>
<script>
import { mapGetters } from 'vuex'
import elFrame from '@/components/iframe/index'
import elFrame from '@/components/Iframe/index'
export default {
name: 'Sql',
components: { elFrame },
......
......@@ -9,7 +9,7 @@
</el-select>
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toQuery">搜索</el-button>
<!-- 新增 -->
<div v-permission="['ADMIN','DEPT_ALL','DEPT_CREATE']" style="display: inline-block;margin: 0px 2px;">
<div v-permission="['admin','dept:add']" style="display: inline-block;margin: 0px 2px;">
<el-button
class="filter-item"
size="mini"
......@@ -17,20 +17,20 @@
icon="el-icon-plus"
@click="add">新增</el-button>
</div>
<div style="display: inline-block;">
<eForm ref="form" :is-add="true" :dicts="dicts"/>
</div>
</div>
<!--表单组件-->
<eForm ref="form" :is-add="isAdd" :dicts="dicts"/>
<eForm ref="form" :is-add="isAdd" :dicts="dict.dept_status"/>
<!--表格渲染-->
<el-table v-loading="loading" :tree-props="{children: 'children', hasChildren: 'hasChildren'}" :default-expand-all="expand" :data="data" row-key="id" size="small">
<el-table-column label="名称" prop="name"/>
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<div v-for="item in dicts" :key="item.id">
<el-tag v-if="scope.row.enabled.toString() === item.value" :type="scope.row.enabled ? '' : 'info'">{{ item.label }}</el-tag>
</div>
<el-switch
v-model="scope.row.enabled"
:disabled="scope.row.id == 1"
active-color="#409EFF"
inactive-color="#F56C6C"
@change="changeEnabled(scope.row, scope.row.enabled,)"/>
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建日期">
......@@ -38,11 +38,11 @@
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column v-if="checkPermission(['ADMIN','DEPT_ALL','DEPT_EDIT','DEPT_DELETE'])" label="操作" width="130px" align="center" fixed="right">
<el-table-column v-if="checkPermission(['admin','dept:edit','dept:del'])" label="操作" width="130px" align="center" fixed="right">
<template slot-scope="scope">
<el-button v-permission="['ADMIN','DEPT_ALL','DEPT_EDIT']" size="mini" type="primary" icon="el-icon-edit" @click="edit(scope.row)"/>
<el-button v-permission="['admin','dept:edit']" size="mini" type="primary" icon="el-icon-edit" @click="edit(scope.row)"/>
<el-popover
v-permission="['ADMIN','DEPT_ALL','DEPT_DELETE']"
v-permission="['admin','dept:del']"
:ref="scope.row.id"
placement="top"
width="180">
......@@ -62,14 +62,15 @@
<script>
import checkPermission from '@/utils/permission'
import initData from '@/mixins/initData'
import initDict from '@/mixins/initDict'
import { del } from '@/api/dept'
import { del, edit } from '@/api/dept'
import { parseTime } from '@/utils/index'
import eForm from './form'
export default {
name: 'Dept',
components: { eForm },
mixins: [initData, initDict],
mixins: [initData],
// 设置数据字典
dicts: ['dept_status'],
data() {
return {
enabledTypeOptions: [
......@@ -82,8 +83,6 @@ export default {
created() {
this.$nextTick(() => {
this.init()
// 加载数据字典
this.getDict('dept_status')
})
},
methods: {
......@@ -138,6 +137,26 @@ export default {
enabled: data.enabled.toString()
}
_this.dialog = true
},
// 改变状态
changeEnabled(data, val) {
this.$confirm('此操作将 "' + this.dict.label.dept_status[val] + '" ' + data.name + '部门, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
edit(data).then(res => {
this.$notify({
title: this.dict.label.dept_status[val] + '成功',
type: 'success',
duration: 2500
})
}).catch(err => {
console.log(err.response.data.message)
})
}).catch(() => {
data.enabled = !data.enabled
})
}
}
}
......
......@@ -8,7 +8,7 @@
<div slot="header" class="clearfix">
<span>字典列表</span>
<el-button
v-permission="['ADMIN','DICT_ALL','DICT_CREATE']"
v-permission="['admin','dict:add']"
class="filter-item"
size="mini"
style="float: right;padding: 4px 10px"
......@@ -26,11 +26,11 @@
<el-table v-loading="loading" :data="data" size="small" highlight-current-row style="width: 100%;" @current-change="handleCurrentChange">
<el-table-column :show-overflow-tooltip="true" prop="name" label="名称"/>
<el-table-column :show-overflow-tooltip="true" prop="remark" label="描述"/>
<el-table-column v-if="checkPermission(['ADMIN','DICT_ALL','DICT_EDIT','DICT_DELETE'])" label="操作" width="130px" align="center" fixed="right">
<el-table-column v-if="checkPermission(['admin','dict:edit','dict:del'])" label="操作" width="130px" align="center" fixed="right">
<template slot-scope="scope">
<el-button v-permission="['ADMIN','DICT_ALL','DICT_EDIT']" size="mini" type="primary" icon="el-icon-edit" @click="edit(scope.row)"/>
<el-button v-permission="['admin','dict:edit']" size="mini" type="primary" icon="el-icon-edit" @click="edit(scope.row)"/>
<el-popover
v-permission="['ADMIN','DICT_ALL','DICT_DELETE']"
v-permission="['admin','dict:del']"
:ref="scope.row.id"
placement="top"
width="180">
......@@ -59,7 +59,7 @@
<div slot="header" class="clearfix">
<span>字典详情</span>
<el-button
v-if="checkPermission(['ADMIN','DICT_ALL','DICT_CREATE']) && this.$refs.dictDetail && this.$refs.dictDetail.dictName"
v-if="checkPermission(['admin','dict:add']) && this.$refs.dictDetail && this.$refs.dictDetail.dictName"
class="filter-item"
size="mini"
style="float: right;padding: 4px 10px"
......
......@@ -22,11 +22,11 @@
<el-table-column prop="label" label="字典标签"/>
<el-table-column prop="value" label="字典值"/>
<el-table-column prop="sort" label="排序"/>
<el-table-column v-if="checkPermission(['ADMIN','DICT_ALL','DICT_EDIT','DICT_DELETE'])" label="操作" width="130px" align="center" fixed="right">
<el-table-column v-if="checkPermission(['admin','dict:edit','dict:del'])" label="操作" width="130px" align="center" fixed="right">
<template slot-scope="scope">
<el-button v-permission="['ADMIN','DICT_ALL','DICT_EDIT']" size="mini" type="primary" icon="el-icon-edit" @click="edit(scope.row)"/>
<el-button v-permission="['admin','dict:edit']" size="mini" type="primary" icon="el-icon-edit" @click="edit(scope.row)"/>
<el-popover
v-permission="['ADMIN','DICT_ALL','DICT_DELETE']"
v-permission="['admin','dict:del']"
:ref="scope.row.id"
placement="top"
width="180">
......
......@@ -9,7 +9,7 @@
</el-select>
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toQuery">搜索</el-button>
<!-- 新增 -->
<div v-permission="['ADMIN','USERJOB_ALL','USERJOB_CREATE']" style="display: inline-block;margin: 0px 2px;">
<div v-permission="['admin','job:add']" style="display: inline-block;margin: 0px 2px;">
<el-button
class="filter-item"
size="mini"
......@@ -19,7 +19,7 @@
</div>
</div>
<!--表单组件-->
<eForm ref="form" :is-add="isAdd" :dicts="dicts"/>
<eForm ref="form" :is-add="isAdd" :dicts="dict.job_status"/>
<!--表格渲染-->
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
<el-table-column prop="name" label="名称"/>
......@@ -35,9 +35,11 @@
</el-table-column>
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<div v-for="item in dicts" :key="item.id">
<el-tag v-if="scope.row.enabled.toString() === item.value" :type="scope.row.enabled ? '' : 'info'">{{ item.label }}</el-tag>
</div>
<el-switch
v-model="scope.row.enabled"
active-color="#409EFF"
inactive-color="#F56C6C"
@change="changeEnabled(scope.row, scope.row.enabled,)"/>
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建日期">
......@@ -45,11 +47,11 @@
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column v-if="checkPermission(['ADMIN','USERJOB_ALL','USERJOB_EDIT','USERJOB_DELETE'])" label="操作" width="130px" align="center" fixed="right">
<el-table-column v-if="checkPermission(['admin','job:edit','job:del'])" label="操作" width="130px" align="center" fixed="right">
<template slot-scope="scope">
<el-button v-permission="['ADMIN','USERJOB_ALL','USERJOB_EDIT']" size="mini" type="primary" icon="el-icon-edit" @click="edit(scope.row)"/>
<el-button v-permission="['admin','job:edit']" size="mini" type="primary" icon="el-icon-edit" @click="edit(scope.row)"/>
<el-popover
v-permission="['ADMIN','USERJOB_ALL','USERJOB_DELETE']"
v-permission="['admin','job:del']"
:ref="scope.row.id"
placement="top"
width="180">
......@@ -77,14 +79,15 @@
<script>
import checkPermission from '@/utils/permission'
import initData from '@/mixins/initData'
import initDict from '@/mixins/initDict'
import { del } from '@/api/job'
import { del, edit } from '@/api/job'
import { parseTime } from '@/utils/index'
import eForm from './form'
export default {
name: 'Job',
components: { eForm },
mixins: [initData, initDict],
mixins: [initData],
// 设置数据字典
dicts: ['job_status'],
data() {
return {
delLoading: false,
......@@ -97,8 +100,6 @@ export default {
created() {
this.$nextTick(() => {
this.init()
// 加载数据字典
this.getDict('job_status')
})
},
methods: {
......@@ -152,6 +153,26 @@ export default {
}
_this.deptId = data.dept.id
_this.dialog = true
},
// 改变状态
changeEnabled(data, val) {
this.$confirm('此操作将 "' + this.dict.label.job_status[val] + '" ' + data.name + '岗位, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
edit(data).then(res => {
this.$notify({
title: this.dict.label.job_status[val] + '成功',
type: 'success',
duration: 2500
})
}).catch(err => {
console.log(err.response.data.message)
})
}).catch(() => {
data.enabled = !data.enabled
})
}
}
}
......
<template>
<el-dialog :visible.sync="dialog" :close-on-click-modal="false" :before-close="cancel" :title="isAdd ? '新增菜单' : '编辑菜单'" append-to-body width="585px">
<el-dialog :visible.sync="dialog" :close-on-click-modal="false" :before-close="cancel" :title="isAdd ? '新增菜单' : '编辑菜单'" append-to-body width="580px">
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="small" label-width="80px">
<el-form-item label="菜单图标">
<el-form-item label="菜单类型">
<el-radio-group v-model="form.type" size="mini" style="width: 178px">
<el-radio-button label="0">目录</el-radio-button>
<el-radio-button label="1">菜单</el-radio-button>
<el-radio-button label="2">按钮</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item v-show="form.type.toString() !== '2'" label="菜单图标">
<el-popover
placement="bottom-start"
width="450"
......@@ -14,38 +21,44 @@
</el-input>
</el-popover>
</el-form-item>
<el-form-item label="菜单标题" prop="name">
<el-input v-model="form.name" placeholder="名称" style="width: 450px;"/>
</el-form-item>
<el-form-item label="内部菜单">
<el-form-item v-show="form.type.toString() === '1'" label="外链菜单">
<el-radio-group v-model="form.iframe" size="mini">
<el-radio-button label="false"></el-radio-button>
<el-radio-button label="true"></el-radio-button>
<el-radio-button label="true"></el-radio-button>
<el-radio-button label="false"></el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item label="是否缓存">
<el-form-item v-show="form.type.toString() === '1'" label="菜单缓存">
<el-radio-group v-model="form.cache" size="mini">
<el-radio-button label="true"></el-radio-button>
<el-radio-button label="false"></el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item label="是否隐藏">
<el-form-item v-show="form.type.toString() === '1'" label="菜单可见">
<el-radio-group v-model="form.hidden" size="mini">
<el-radio-button label="true"></el-radio-button>
<el-radio-button label="false"></el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item label="菜单排序" prop="sort">
<el-input-number v-model.number="form.sort" :min="0" :max="999" controls-position="right" style="width: 177px;"/>
<el-form-item v-show="form.type.toString() !== '2'" label="菜单标题" prop="name">
<el-input v-model="form.name" :style=" form.type.toString() === '0' ? 'width: 450px' : 'width: 178px'" placeholder="菜单标题"/>
</el-form-item>
<el-form-item label="链接地址" prop="path">
<el-input v-model="form.path" placeholder="链接地址" style="width: 177px;"/>
<el-form-item v-show="form.type.toString() === '2'" label="按钮名称">
<el-input v-model="form.name" placeholder="按钮名称" style="width: 178px;"/>
</el-form-item>
<el-form-item v-if="form.iframe === 'false'" label="组件路径">
<el-input v-model="form.component" placeholder="菜单路径"/>
<el-form-item v-show="form.type.toString() !== '0'" label="权限标识">
<el-input :disabled="form.iframe === 'true'" v-model="form.permission" placeholder="权限标识" style="width: 178px;"/>
</el-form-item>
<el-form-item v-if="form.iframe === 'false'" label="组件名称">
<el-input v-model="form.componentName" placeholder="匹配组件内Name字段"/>
<el-form-item v-if="form.type.toString() !== '2'" label="路由地址" prop="path">
<el-input v-model="form.path" placeholder="路由地址" style="width: 178px;"/>
</el-form-item>
<el-form-item label="菜单排序">
<el-input-number v-model.number="form.sort" :min="0" :max="999" controls-position="right" style="width: 178px;"/>
</el-form-item>
<el-form-item v-show="form.iframe === 'false' && form.type.toString() === '1'" label="组件名称">
<el-input v-model="form.componentName" style="width: 178px;" placeholder="匹配组件内Name字段"/>
</el-form-item>
<el-form-item v-show="form.iframe === 'false' && form.type.toString() === '1'" label="组件路径">
<el-input v-model="form.component" style="width: 178px;" placeholder="组件路径"/>
</el-form-item>
<el-form-item label="上级类目">
<treeselect v-model="form.pid" :options="menus" style="width: 450px;" placeholder="选择上级类目" />
......@@ -74,14 +87,11 @@ export default {
data() {
return {
loading: false, dialog: false, menus: [],
form: { name: '', sort: 999, path: '', component: '', componentName: '', iframe: 'false', roles: [], pid: 0, icon: '', cache: false, hidden: false },
form: { name: '', sort: 999, path: '', component: '', componentName: '', iframe: 'false', roles: [], pid: 0, icon: '', cache: false, hidden: false, type: 0, permission: '' },
rules: {
name: [
{ required: true, message: '请输入名称', trigger: 'blur' }
],
sort: [
{ required: true, message: '请输入序号', trigger: 'blur', type: 'number' }
],
path: [
{ required: true, message: '请输入地址', trigger: 'blur' }
]
......@@ -114,9 +124,8 @@ export default {
})
this.loading = false
this.$parent.init()
}).catch(err => {
}).catch(() => {
this.loading = false
console.log(err.response.data.message)
})
},
doEdit() {
......@@ -129,15 +138,14 @@ export default {
})
this.loading = false
this.$parent.init()
}).catch(err => {
}).catch(() => {
this.loading = false
console.log(err.response.data.message)
})
},
resetForm() {
this.dialog = false
this.$refs['form'].resetFields()
this.form = { name: '', sort: 999, path: '', component: '', componentName: '', iframe: 'false', roles: [], pid: 0, icon: '', cache: false, hidden: false }
this.form = { name: '', sort: 999, path: '', component: '', componentName: '', iframe: 'false', roles: [], pid: 0, icon: '', cache: false, hidden: false, type: 0, permission: '' }
},
selected(name) {
this.form.icon = name
......
......@@ -6,7 +6,7 @@
<el-input v-model="query.value" clearable placeholder="模糊搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toQuery">搜索</el-button>
<!-- 新增 -->
<div v-permission="['ADMIN','MENU_ALL','MENU_CREATE']" style="display: inline-block;margin: 0px 2px;">
<div v-permission="['admin','menu:add']" style="display: inline-block;margin: 0px 2px;">
<el-button
class="filter-item"
size="mini"
......@@ -14,15 +14,12 @@
icon="el-icon-plus"
@click="add">新增</el-button>
</div>
<div style="display: inline-block;">
<eForm ref="form" :is-add="true"/>
</div>
</div>
<!--表单组件-->
<eForm ref="form" :is-add="isAdd"/>
<!--表格渲染-->
<el-table v-loading="loading" :data="data" :tree-props="{children: 'children', hasChildren: 'hasChildren'}" :default-expand-all="expand" row-key="id" size="small">
<el-table-column :show-overflow-tooltip="true" label="标题" width="125px" prop="name"/>
<el-table-column :show-overflow-tooltip="true" label="菜单名称" width="125px" prop="name"/>
<el-table-column prop="icon" label="图标" align="center" width="60px">
<template slot-scope="scope">
<svg-icon :icon-class="scope.row.icon" />
......@@ -30,28 +27,29 @@
</el-table-column>
<el-table-column prop="sort" align="center" label="排序">
<template slot-scope="scope">
<el-tag>{{ scope.row.sort }}</el-tag>
{{ scope.row.sort }}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" prop="path" label="链接地址"/>
<el-table-column :show-overflow-tooltip="true" prop="componentName" label="组件名称"/>
<el-table-column :show-overflow-tooltip="true" prop="component" label="组件路径" width="130px"/>
<el-table-column prop="iframe" label="内部菜单">
<el-table-column :show-overflow-tooltip="true" prop="path" label="路由地址"/>
<el-table-column :show-overflow-tooltip="true" prop="permission" label="权限标识"/>
<!--<el-table-column :show-overflow-tooltip="true" prop="componentName" label="组件名称"/>-->
<el-table-column :show-overflow-tooltip="true" prop="component" label="组件路径"/>
<el-table-column prop="iframe" label="外链" width="75px">
<template slot-scope="scope">
<span v-if="!scope.row.iframe"></span>
<span v-if="scope.row.iframe"></span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column prop="iframe" label="是否缓存">
<el-table-column prop="iframe" label="缓存" width="75px">
<template slot-scope="scope">
<span v-if="scope.row.cache"></span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column prop="iframe" label="是否隐藏">
<el-table-column prop="iframe" label="可见" width="75px">
<template slot-scope="scope">
<span v-if="scope.row.hidden"></span>
<span v-else></span>
<span v-if="scope.row.hidden"></span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建日期" width="135px">
......@@ -59,11 +57,11 @@
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column v-if="checkPermission(['ADMIN','MENU_ALL','MENU_EDIT','MENU_DELETE'])" label="操作" width="130px" align="center" fixed="right">
<el-table-column v-if="checkPermission(['admin','menu:edit','menu:del'])" label="操作" width="130px" align="center" fixed="right">
<template slot-scope="scope">
<el-button v-permission="['ADMIN','MENU_ALL','MENU_EDIT']" size="mini" type="primary" icon="el-icon-edit" @click="edit(scope.row)"/>
<el-button v-permission="['admin','menu:edit']" size="mini" type="primary" icon="el-icon-edit" @click="edit(scope.row)"/>
<el-popover
v-permission="['ADMIN','MENU_ALL','MENU_DELETE']"
v-permission="['admin','menu:del']"
:ref="scope.row.id"
placement="top"
width="200">
......@@ -138,7 +136,7 @@ export default {
this.isAdd = false
const _this = this.$refs.form
_this.getMenus()
_this.form = { id: data.id, component: data.component, componentName: data.componentName, name: data.name, sort: data.sort, pid: data.pid, path: data.path, iframe: data.iframe.toString(), roles: [], icon: data.icon, cache: data.cache, hidden: data.hidden }
_this.form = { id: data.id, component: data.component, componentName: data.componentName, name: data.name, sort: data.sort, pid: data.pid, path: data.path, iframe: data.iframe.toString(), roles: [], icon: data.icon, cache: data.cache, hidden: data.hidden, type: data.type, permission: data.permission }
_this.dialog = true
},
changExpand() {
......
<template>
<el-dialog :visible.sync="dialog" :close-on-click-modal="false" :before-close="cancel" :title="isAdd ? '新增权限' : '编辑权限'" append-to-body width="500px">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
<el-form-item label="名称" prop="name">
<el-input v-model="form.name" style="width: 360px;"/>
</el-form-item>
<el-form-item label="别名" prop="alias">
<el-input v-model="form.alias" style="width: 360px;"/>
</el-form-item>
<el-form-item style="margin-bottom: 0px;" label="上级类目">
<treeselect v-model="form.pid" :options="permissions" style="width: 360px;" placeholder="选择上级类目" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="cancel">取消</el-button>
<el-button :loading="loading" type="primary" @click="doSubmit">确认</el-button>
</div>
</el-dialog>
</template>
<script>
import { add, edit, getPermissionTree } from '@/api/permission'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
export default {
components: { Treeselect },
props: {
isAdd: {
type: Boolean,
required: true
}
},
data() {
return {
loading: false, dialog: false, permissions: [],
form: { name: '', alias: '', pid: 0 },
rules: {
name: [
{ required: true, message: '请输入名称', trigger: 'blur' }
],
alias: [
{ required: true, message: '请输入别名', trigger: 'blur' }
]
}
}
},
methods: {
cancel() {
this.resetForm()
},
doSubmit() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.loading = true
if (this.isAdd) {
this.doAdd()
} else this.doEdit()
} else {
return false
}
})
},
doAdd() {
add(this.form).then(res => {
this.resetForm()
this.$notify({
title: '添加成功',
type: 'success',
duration: 2500
})
this.loading = false
this.$parent.init()
}).catch(err => {
this.loading = false
console.log(err.response.data.message)
})
},
doEdit() {
edit(this.form).then(res => {
this.resetForm()
this.$notify({
title: '修改成功',
type: 'success',
duration: 2500
})
this.loading = false
this.$parent.init()
}).catch(err => {
this.loading = false
console.log(err.response.data.message)
})
},
resetForm() {
this.dialog = false
this.$refs['form'].resetFields()
this.form = { name: '', alias: '', pid: 0 }
},
getPermissions() {
getPermissionTree().then(res => {
this.permissions = []
const permission = { id: 0, label: '顶级类目', children: [] }
permission.children = res
this.permissions.push(permission)
})
}
}
}
</script>
<style scoped>
</style>
<template>
<div class="app-container">
<!--工具栏-->
<div class="head-container">
<!-- 搜索 -->
<el-input v-model="query.value" clearable placeholder="输入名称或者别名搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toQuery">搜索</el-button>
<!-- 新增 -->
<div v-permission="['ADMIN','PERMISSION_ALL','PERMISSION_CREATE']" style="display: inline-block;margin: 0px 2px 0px">
<el-button
class="filter-item"
size="mini"
type="primary"
icon="el-icon-plus"
@click="add">新增</el-button>
</div>
<div style="display: inline-block;">
<eForm ref="form" :is-add="true"/>
</div>
</div>
<!--表单组件-->
<eForm ref="form" :is-add="isAdd"/>
<!--表格渲染-->
<el-table v-loading="loading" :data="data" :tree-props="{children: 'children', hasChildren: 'hasChildren'}" :default-expand-all="expand" row-key="id" size="small">
<el-table-column label="名称" prop="name"/>
<el-table-column label="别名" prop="alias"/>
<el-table-column prop="createTime" label="创建日期">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column v-if="checkPermission(['ADMIN','PERMISSION_ALL','PERMISSION_EDIT','PERMISSION_DELETE'])" label="操作" width="130px" align="center" fixed="right">
<template slot-scope="scope">
<el-button v-permission="['ADMIN','PERMISSION_ALL','PERMISSION_EDIT']" size="mini" type="primary" icon="el-icon-edit" @click="edit(scope.row)"/>
<el-popover
v-permission="['ADMIN','PERMISSION_ALL','PERMISSION_DELETE']"
:ref="scope.row.id"
placement="top"
width="200">
<p>确定删除吗,如果存在下级节点则一并删除,此操作不能撤销!</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="$refs[scope.row.id].doClose()">取消</el-button>
<el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.row.id)">确定</el-button>
</div>
<el-button slot="reference" type="danger" icon="el-icon-delete" size="mini"/>
</el-popover>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import checkPermission from '@/utils/permission' // 权限判断函数
import initData from '@/mixins/initData'
import { del } from '@/api/permission'
import { parseTime } from '@/utils/index'
import eForm from './form'
export default {
name: 'Permission',
components: { eForm },
mixins: [initData],
data() {
return {
delLoading: false, expand: false
}
},
created() {
this.$nextTick(() => {
this.init()
})
},
methods: {
parseTime,
checkPermission,
beforeInit() {
this.url = 'api/permissions'
const query = this.query
const value = query.value
this.params = { page: this.page, size: this.size }
if (value) { this.params['blurry'] = value }
return true
},
subDelete(id) {
this.delLoading = true
del(id).then(res => {
this.delLoading = false
this.$refs[id].doClose()
this.init()
this.$notify({
title: '删除成功',
type: 'success',
duration: 2500
})
}).catch(err => {
this.delLoading = false
this.$refs[id].doClose()
console.log(err.response.data.message)
})
},
add() {
this.isAdd = true
this.$refs.form.getPermissions()
this.$refs.form.dialog = true
},
edit(data) {
this.isAdd = false
const _this = this.$refs.form
_this.getPermissions()
_this.form = { id: data.id, name: data.name, alias: data.alias, pid: data.pid }
_this.dialog = true
},
changeExpand() {
this.expand = !this.expand
this.init()
}
}
}
</script>
<style scoped>
</style>
......@@ -4,6 +4,9 @@
<el-form-item label="角色名称" prop="name">
<el-input v-model="form.name" style="width: 370px;"/>
</el-form-item>
<el-form-item label="角色权限">
<el-input v-model="form.permission" style="width: 370px;"/>
</el-form-item>
<el-form-item label="角色级别" prop="sort">
<el-input-number v-model.number="form.level" :min="1" controls-position="right" style="width: 370px;"/>
</el-form-item>
......@@ -47,7 +50,7 @@ export default {
return {
dateScopes: ['全部', '本级', '自定义'],
loading: false, dialog: false, depts: [], deptIds: [],
form: { name: '', depts: [], remark: '', dataScope: '本级', level: 3 },
form: { name: '', depts: [], remark: '', dataScope: '本级', level: 3, permission: '' },
rules: {
name: [
{ required: true, message: '请输入名称', trigger: 'blur' }
......@@ -119,7 +122,7 @@ export default {
resetForm() {
this.dialog = false
this.$refs['form'].resetFields()
this.form = { name: '', depts: [], remark: '', dataScope: '本级', level: 3 }
this.form = { name: '', depts: [], remark: '', dataScope: '本级', level: 3, permission: '' }
},
getDepts() {
getDepts({ enabled: true }).then(res => {
......
......@@ -8,7 +8,7 @@
<el-input v-model="query.value" clearable placeholder="输入名称或者描述搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toQuery">搜索</el-button>
<!-- 新增 -->
<div v-permission="['ADMIN','ROLES_ALL','ROLES_CREATE']" style="display: inline-block;margin: 0px 2px;">
<div v-permission="['admin','roles:add']" style="display: inline-block;margin: 0px 2px;">
<el-button
class="filter-item"
size="mini"
......@@ -23,28 +23,23 @@
<el-card class="box-card" shadow="never">
<div slot="header" class="clearfix">
<span class="role-span">角色列表</span>
<div id="opt" style="float: right">
<el-radio-group v-model="opt" size="mini">
<el-radio-button label="菜单分配"/>
<el-radio-button label="权限分配"/>
</el-radio-group>
</div>
</div>
<el-table v-loading="loading" :data="data" highlight-current-row size="small" style="width: 100%;" @current-change="handleCurrentChange">
<el-table-column prop="name" label="名称"/>
<el-table-column prop="dataScope" label="数据权限"/>
<el-table-column prop="permission" label="角色权限"/>
<el-table-column prop="level" label="角色级别"/>
<el-table-column :show-overflow-tooltip="true" prop="remark" label="描述"/>
<el-table-column :show-overflow-tooltip="true" prop="createTime" label="创建日期">
<el-table-column :show-overflow-tooltip="true" width="130px" prop="createTime" label="创建日期">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column v-if="checkPermission(['ADMIN','ROLES_ALL','ROLES_EDIT','ROLES_DELETE'])" label="操作" width="130px" align="center" fixed="right">
<el-table-column v-if="checkPermission(['admin','roles:edit','roles:del'])" label="操作" width="130px" align="center" fixed="right">
<template slot-scope="scope">
<el-button v-permission="['ADMIN','ROLES_ALL','ROLES_EDIT']" size="mini" type="primary" icon="el-icon-edit" @click="edit(scope.row)"/>
<el-button v-permission="['admin','roles:edit']" size="mini" type="primary" icon="el-icon-edit" @click="edit(scope.row)"/>
<el-popover
v-permission="['ADMIN','ROLES_ALL','ROLES_DELETE']"
v-permission="['admin','roles:del']"
:ref="scope.row.id"
placement="top"
width="180">
......@@ -70,13 +65,13 @@
</el-col>
<!-- 授权 -->
<el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="7">
<el-card v-show="opt === '菜单分配'" class="box-card" shadow="never">
<el-card class="box-card" shadow="never">
<div slot="header" class="clearfix">
<el-tooltip class="item" effect="dark" content="选择指定角色分配菜单" placement="top">
<span class="role-span">菜单分配</span>
</el-tooltip>
<el-button
v-permission="['ADMIN','ROLES_ALL','ROLES_EDIT']"
v-permission="['admin','roles:edit']"
:disabled="!showButton"
:loading="menuLoading"
icon="el-icon-check"
......@@ -90,34 +85,11 @@
:data="menus"
:default-checked-keys="menuIds"
:props="defaultProps"
check-strictly
accordion
show-checkbox
node-key="id"/>
</el-card>
<el-card v-show="opt === '权限分配'" class="box-card" shadow="never">
<div slot="header" class="clearfix">
<el-tooltip class="item" effect="dark" content="选择指定角色分配权限" placement="top">
<span class="role-span">权限分配</span>
</el-tooltip>
<el-button
v-permission="['ADMIN','ROLES_ALL','ROLES_EDIT']"
:disabled="!showButton"
:loading="permissionLoading"
icon="el-icon-check"
size="mini"
style="float: right; padding: 6px 9px"
type="primary"
@click="savePermission">保存</el-button>
</div>
<el-tree
ref="permission"
:data="permissions"
:default-checked-keys="permissionIds"
:props="defaultProps"
show-checkbox
accordion
node-key="id"/>
</el-card>
</el-col>
</el-row>
</div>
......@@ -127,11 +99,10 @@
import checkPermission from '@/utils/permission'
import initData from '@/mixins/initData'
import { del } from '@/api/role'
import { getPermissionTree } from '@/api/permission'
import { getMenusTree } from '@/api/menu'
import { parseTime } from '@/utils/index'
import eForm from './form'
import { editPermission, editMenu, get } from '@/api/role'
import { editMenu, get } from '@/api/role'
export default {
name: 'Role',
components: { eForm },
......@@ -142,12 +113,11 @@ export default {
children: 'children',
label: 'label'
},
currentId: 0, permissionLoading: false, menuLoading: false, showButton: false, opt: '菜单分配',
delLoading: false, permissions: [], permissionIds: [], menus: [], menuIds: []
currentId: 0, menuLoading: false, showButton: false,
delLoading: false, menus: [], menuIds: []
}
},
created() {
this.getPermissions()
this.getMenus()
this.$nextTick(() => {
this.init()
......@@ -164,8 +134,7 @@ export default {
const value = query.value
this.params = { page: this.page, size: this.size, sort: sort }
if (value) { this.params['blurry'] = value }
// 清空权限与菜单的选中
this.$refs.permission.setCheckedKeys([])
// 清空菜单的选中
this.$refs.menu.setCheckedKeys([])
return true
},
......@@ -187,11 +156,6 @@ export default {
console.log(err.response.data.message)
})
},
getPermissions() {
getPermissionTree().then(res => {
this.permissions = res
})
},
getMenus() {
getMenusTree().then(res => {
this.menus = res
......@@ -200,8 +164,7 @@ export default {
handleCurrentChange(val) {
if (val) {
const _this = this
// 清空权限与菜单的选中
this.$refs.permission.setCheckedKeys([])
// 清空菜单的选中
this.$refs.menu.setCheckedKeys([])
// 保存当前的角色id
this.currentId = val.id
......@@ -209,58 +172,24 @@ export default {
this.showButton = true
// 初始化
this.menuIds = []
this.permissionIds = []
// 菜单数据需要特殊处理
val.menus.forEach(function(data, index) {
let add = true
for (let i = 0; i < val.menus.length; i++) {
if (data.id === val.menus[i].pid) {
add = false
break
}
}
if (add) {
_this.menuIds.push(data.id)
}
})
// 处理权限数据
val.permissions.forEach(function(data, index) {
_this.permissionIds.push(data.id)
_this.menuIds.push(data.id)
})
}
},
savePermission() {
this.permissionLoading = true
const role = { id: this.currentId, permissions: [] }
this.$refs.permission.getCheckedKeys().forEach(function(data, index) {
const permission = { id: data }
role.permissions.push(permission)
})
editPermission(role).then(res => {
this.$notify({
title: '保存成功',
type: 'success',
duration: 2500
})
this.permissionLoading = false
this.update()
}).catch(err => {
this.permissionLoading = false
console.log(err.response.data.message)
})
},
saveMenu() {
this.menuLoading = true
const role = { id: this.currentId, menus: [] }
// 得到半选的父节点数据,保存起来
this.$refs.menu.getHalfCheckedNodes().forEach(function(data, index) {
const permission = { id: data.id }
role.menus.push(permission)
const menu = { id: data.id }
role.menus.push(menu)
})
// 得到已选中的 key 值
this.$refs.menu.getCheckedKeys().forEach(function(data, index) {
const permission = { id: data }
role.menus.push(permission)
const menu = { id: data }
role.menus.push(menu)
})
editMenu(role).then(res => {
this.$notify({
......@@ -294,7 +223,7 @@ export default {
this.isAdd = false
const _this = this.$refs.form
_this.deptIds = []
_this.form = { id: data.id, name: data.name, remark: data.remark, depts: data.depts, dataScope: data.dataScope, level: data.level }
_this.form = { id: data.id, name: data.name, remark: data.remark, depts: data.depts, dataScope: data.dataScope, level: data.level, permission: data.permission }
if (_this.form.dataScope === '自定义') {
_this.getDepts()
}
......
......@@ -6,7 +6,7 @@
<el-input v-model="query.value" clearable placeholder="输入任务名称搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toQuery">搜索</el-button>
<!-- 新增 -->
<div v-permission="['ADMIN','JOB_ALL','JOB_CREATE']" style="display: inline-block;margin: 0px 2px;">
<div v-permission="['admin','timing:add']" style="display: inline-block;margin: 0px 2px;">
<el-button
class="filter-item"
size="mini"
......@@ -15,7 +15,7 @@
@click="dialog = true;isAdd = true">新增</el-button>
</div>
<!-- 任务日志 -->
<div v-permission="['ADMIN','JOB_ALL','JOB_SELECT']" style="display: inline-block;">
<div style="display: inline-block;">
<el-button
class="filter-item"
size="mini"
......@@ -74,15 +74,15 @@
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column v-if="checkPermission(['ADMIN','JOB_ALL','JOB_EDIT','JOB_DELETE'])" label="操作" width="180px" align="center" fixed="right">
<el-table-column v-if="checkPermission(['admin','timing:edit','timing:del'])" label="操作" width="180px" align="center" fixed="right">
<template slot-scope="scope">
<el-button v-permission="['ADMIN','JOB_ALL','JOB_EDIT']" size="mini" style="margin-right: 3px;" type="text" @click="edit(scope.row)">编辑</el-button>
<el-button v-permission="['ADMIN','JOB_ALL','JOB_EDIT']" style="margin-left: -2px" type="text" size="mini" @click="execute(scope.row.id)">执行</el-button>
<el-button v-permission="['ADMIN','JOB_ALL','JOB_EDIT']" style="margin-left: 3px" type="text" size="mini" @click="updateStatus(scope.row.id,scope.row.isPause ? '恢复' : '暂停')">
<el-button v-permission="['admin','timing:edit']" size="mini" style="margin-right: 3px;" type="text" @click="edit(scope.row)">编辑</el-button>
<el-button v-permission="['admin','timing:edit']" style="margin-left: -2px" type="text" size="mini" @click="execute(scope.row.id)">执行</el-button>
<el-button v-permission="['admin',,'timing:edit']" style="margin-left: 3px" type="text" size="mini" @click="updateStatus(scope.row.id,scope.row.isPause ? '恢复' : '暂停')">
{{ scope.row.isPause ? '恢复' : '暂停' }}
</el-button>
<el-popover
v-permission="['ADMIN','JOB_ALL','JOB_DELETE']"
v-permission="['admin','timing:del']"
:ref="scope.row.id"
placement="top"
width="200">
......
......@@ -21,7 +21,7 @@
</el-select>
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toQuery">搜索</el-button>
<!-- 新增 -->
<div v-permission="['ADMIN','USER_ALL','USER_CREATE']" style="display: inline-block;margin: 0px 2px;">
<div v-permission="['admin','user:add']" style="display: inline-block;margin: 0px 2px;">
<el-button
class="filter-item"
size="mini"
......@@ -32,7 +32,7 @@
<!-- 导出 -->
<div style="display: inline-block;">
<el-button
v-permission="['ADMIN','USER_ALL','USER_SELECT']"
v-permission="['admin','user:list']"
:loading="downloadLoading"
size="mini"
class="filter-item"
......@@ -53,7 +53,11 @@
</el-table-column>
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<el-tag>{{ dict.label.user_status[scope.row.enabled] }}</el-tag>
<el-switch
v-model="scope.row.enabled"
active-color="#409EFF"
inactive-color="#F56C6C"
@change="changeEnabled(scope.row, scope.row.enabled,)"/>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" prop="createTime" label="创建日期">
......@@ -61,11 +65,11 @@
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column v-if="checkPermission(['ADMIN','USER_ALL','USER_EDIT','USER_DELETE'])" label="操作" width="125" align="center" fixed="right">
<el-table-column v-if="checkPermission(['admin','user:edit','user:del'])" label="操作" width="125" align="center" fixed="right">
<template slot-scope="scope">
<el-button v-permission="['ADMIN','USER_ALL','USER_EDIT']" size="mini" type="primary" icon="el-icon-edit" @click="edit(scope.row)"/>
<el-button v-permission="['admin','user:edit']" size="mini" type="primary" icon="el-icon-edit" @click="edit(scope.row)"/>
<el-popover
v-permission="['ADMIN','USER_ALL','USER_DELETE']"
v-permission="['admin','user:del']"
:ref="scope.row.id"
placement="top"
width="180">
......@@ -95,7 +99,7 @@
<script>
import checkPermission from '@/utils/permission'
import initData from '@/mixins/initData'
import { del, downloadUser } from '@/api/user'
import { del, downloadUser, edit } from '@/api/user'
import { getDepts } from '@/api/dept'
import { parseTime, downloadFile } from '@/utils/index'
import eForm from './form'
......@@ -224,6 +228,26 @@ export default {
_this.jobId = data.job.id
_this.getJobs(_this.deptId)
_this.dialog = true
},
// 改变状态
changeEnabled(data, val) {
this.$confirm('此操作将 "' + this.dict.label.user_status[val] + '" ' + data.username + ', 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
edit(data).then(res => {
this.$notify({
title: this.dict.label.user_status[val] + '成功',
type: 'success',
duration: 2500
})
}).catch(err => {
console.log(err.response.data.message)
})
}).catch(() => {
data.enabled = !data.enabled
})
}
}
}
......
......@@ -8,14 +8,14 @@
<!-- 上传 -->
<div style="display: inline-block;margin: 0px 2px;">
<el-button
v-permission="['ADMIN','PICTURE_ALL','PICTURE_UPLOAD']"
v-permission="['admin','pictures:add']"
class="filter-item"
size="mini"
type="primary"
icon="el-icon-upload"
@click="dialog = true">上传图片</el-button>
</div>
<div v-permission="['ADMIN','PICTURE_ALL','PICTURE_DELETE']" style="display: inline-block;">
<div v-permission="['admin','pictures:del']" style="display: inline-block;">
<el-button
:loading="delAllLoading"
:disabled="data.length === 0 || $refs.table.selection.length === 0"
......@@ -64,7 +64,7 @@
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column v-if="checkPermission(['ADMIN','PICTURE_ALL','PICTURE_DELETE'])" label="操作" width="100px" align="center" fixed="right">
<el-table-column v-if="checkPermission(['admin','pictures:del'])" label="操作" width="100px" align="center" fixed="right">
<template slot-scope="scope">
<el-popover
:ref="scope.row.id"
......
......@@ -8,7 +8,7 @@
<!-- 新增 -->
<div style="display: inline-block;margin: 0px 2px;">
<el-button
v-permission="['ADMIN','LOCALSTORAGE_ALL','LOCALSTORAGE_CREATE']"
v-permission="['admin','storage:add']"
class="filter-item"
size="mini"
type="primary"
......@@ -18,6 +18,7 @@
<!-- 多选删除 -->
<div style="display: inline-block;margin: 0px 2px;">
<el-button
v-permission="['admin','storage:del']"
:loading="delAllLoading"
:disabled="data.length === 0 || $refs.table.selection.length === 0"
class="filter-item"
......@@ -51,11 +52,11 @@
<span>{{ parseTime(scope.row.updateTime) }}</span>
</template>
</el-table-column>
<el-table-column v-if="checkPermission(['ADMIN','LOCALSTORAGE_ALL','LOCALSTORAGE_EDIT','LOCALSTORAGE_DELETE'])" label="操作" width="150px" align="center">
<el-table-column v-if="checkPermission(['admin','storage:edit','storage:del'])" label="操作" width="150px" align="center">
<template slot-scope="scope">
<el-button v-permission="['ADMIN','LOCALSTORAGE_ALL','LOCALSTORAGE_EDIT']" size="mini" type="primary" icon="el-icon-edit" @click="edit(scope.row)"/>
<el-button v-permission="['admin','storage:edit']" size="mini" type="primary" icon="el-icon-edit" @click="edit(scope.row)"/>
<el-popover
v-permission="['ADMIN','LOCALSTORAGE_ALL','LOCALSTORAGE_DELETE']"
v-permission="['admin','storage:del']"
:ref="scope.row.id"
placement="top"
width="180">
......
......@@ -3,7 +3,7 @@
</template>
<script>
import { mapGetters } from 'vuex'
import elFrame from '@/components/iframe/index'
import elFrame from '@/components/Iframe/index'
export default {
name: 'Swagger',
components: { elFrame },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment