zqq:更改路由配置
This commit is contained in:
parent
3f92797912
commit
de315fd34e
|
@ -39,7 +39,7 @@ export const dynamicRoutes = [
|
||||||
isKeepAlive: true,
|
isKeepAlive: true,
|
||||||
isAffix: true,
|
isAffix: true,
|
||||||
isIframe: false,
|
isIframe: false,
|
||||||
roles: ['admin', 'common'],
|
roles: ['admin', 'chief'],
|
||||||
icon: 'iconfont icon-shouye',
|
icon: 'iconfont icon-shouye',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -100,201 +100,216 @@ export const dynamicRoutes = [
|
||||||
isKeepAlive: true,
|
isKeepAlive: true,
|
||||||
isAffix: false,
|
isAffix: false,
|
||||||
isIframe: false,
|
isIframe: false,
|
||||||
roles: ['admin'],
|
roles: ['admin', 'chief'],
|
||||||
icon: 'iconfont icon-icon-',
|
icon: 'iconfont icon-icon-',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/dataAcquisitionService',
|
path: '/dataService',
|
||||||
name: 'dataAcquisitionService',
|
name: 'dataService',
|
||||||
component: () => import('/@/views/dataAcquisitionService/multimediaData/index.vue'),
|
component: () => import('/@/views/dataService/multimediaData/index.vue'),
|
||||||
redirect: '/dataAcquisitionService/multimediaData',
|
redirect: '/dataService/multimediaData',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'Data acquisition service',
|
title: 'Data service',
|
||||||
isLink: '',
|
isLink: '',
|
||||||
isHide: false,
|
isHide: false,
|
||||||
isKeepAlive: true,
|
isKeepAlive: true,
|
||||||
isAffix: false,
|
isAffix: false,
|
||||||
isIframe: false,
|
isIframe: false,
|
||||||
roles: ['admin'],
|
roles: ['admin', 'chief'],
|
||||||
icon: 'iconfont icon-xitongshezhi',
|
icon: 'iconfont icon-xitongshezhi',
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: '/dataAcquisitionService/multimediaData',
|
path: '/dataService/multimediaData',
|
||||||
name: 'multimediaData',
|
name: 'multimediaData',
|
||||||
component: () => import('/@/views/dataAcquisitionService/multimediaData/index.vue'),
|
component: () => import('/@/views/dataService/multimediaData/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: 'Multimedia data acquisition service',
|
title: 'Multimedia data service',
|
||||||
isLink: '',
|
isLink: '',
|
||||||
isHide: false,
|
isHide: false,
|
||||||
isKeepAlive: true,
|
isKeepAlive: true,
|
||||||
isAffix: false,
|
isAffix: false,
|
||||||
isIframe: false,
|
isIframe: false,
|
||||||
roles: ['admin'],
|
roles: ['admin', 'chief'],
|
||||||
icon: 'iconfont icon-caidan',
|
icon: 'iconfont icon-caidan',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/dataAcquisitionService/remoteSensingData',
|
path: '/dataService/remoteSensingData',
|
||||||
name: 'remoteSensingData',
|
name: 'remoteSensingData',
|
||||||
component: () => import('/@/views/dataAcquisitionService/remoteSensingData/index.vue'),
|
component: () => import('/@/views/dataService/remoteSensingData/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: 'Remote sensing data acquisition service',
|
title: 'Remote sensing data service',
|
||||||
isLink: '',
|
isLink: '',
|
||||||
isHide: false,
|
isHide: false,
|
||||||
isKeepAlive: true,
|
isKeepAlive: true,
|
||||||
isAffix: false,
|
isAffix: false,
|
||||||
isIframe: false,
|
isIframe: false,
|
||||||
roles: ['admin'],
|
roles: ['admin', 'chief'],
|
||||||
|
icon: 'ele-ColdDrink',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/dataService/otherData',
|
||||||
|
name: 'otherData',
|
||||||
|
component: () => import('/@/views/dataService/otherData/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: 'other data service',
|
||||||
|
isLink: '',
|
||||||
|
isHide: false,
|
||||||
|
isKeepAlive: true,
|
||||||
|
isAffix: false,
|
||||||
|
isIframe: false,
|
||||||
|
roles: ['admin', 'chief'],
|
||||||
icon: 'ele-ColdDrink',
|
icon: 'ele-ColdDrink',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
path: '/dataUploadAndRetrieval',
|
// path: '/dataUploadAndRetrieval',
|
||||||
name: 'dataUploadAndRetrieval',
|
// name: 'dataUploadAndRetrieval',
|
||||||
component: () => import('/@/views/dataUploadAndRetrieval/dataUpload/index.vue'),
|
// component: () => import('/@/views/dataUploadAndRetrieval/dataUpload/index.vue'),
|
||||||
redirect: '/dataUploadAndRetrieval/data-upload',
|
// redirect: '/dataUploadAndRetrieval/data-upload',
|
||||||
meta: {
|
// meta: {
|
||||||
title: 'Data upload and retrieval',
|
// title: 'Data upload and retrieval',
|
||||||
isLink: '',
|
// isLink: '',
|
||||||
isHide: false,
|
// isHide: false,
|
||||||
isKeepAlive: true,
|
// isKeepAlive: true,
|
||||||
isAffix: false,
|
// isAffix: false,
|
||||||
isIframe: false,
|
// isIframe: false,
|
||||||
roles: ['admin'],
|
// roles: ['admin'],
|
||||||
icon: 'iconfont icon-xitongshezhi',
|
// icon: 'iconfont icon-xitongshezhi',
|
||||||
},
|
// },
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
path: '/dataUploadAndRetrieval/dataUpload',
|
// path: '/dataUploadAndRetrieval/dataUpload',
|
||||||
name: 'dataUpload',
|
// name: 'dataUpload',
|
||||||
component: () => import('/@/views/dataUploadAndRetrieval/dataUpload/index.vue'),
|
// component: () => import('/@/views/dataUploadAndRetrieval/dataUpload/index.vue'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: 'Data upload',
|
// title: 'Data upload',
|
||||||
isLink: '',
|
// isLink: '',
|
||||||
isHide: false,
|
// isHide: false,
|
||||||
isKeepAlive: true,
|
// isKeepAlive: true,
|
||||||
isAffix: false,
|
// isAffix: false,
|
||||||
isIframe: false,
|
// isIframe: false,
|
||||||
roles: ['admin'],
|
// roles: ['admin'],
|
||||||
icon: 'iconfont icon-caidan',
|
// icon: 'iconfont icon-caidan',
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/dataUploadAndRetrieval/dataRetrieval',
|
// path: '/dataUploadAndRetrieval/dataRetrieval',
|
||||||
name: 'dataRetrieval',
|
// name: 'dataRetrieval',
|
||||||
component: () => import('/@/views/dataUploadAndRetrieval/dataRetrieval/index.vue'),
|
// component: () => import('/@/views/dataUploadAndRetrieval/dataRetrieval/index.vue'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: 'Data retrieval',
|
// title: 'Data retrieval',
|
||||||
isLink: '',
|
// isLink: '',
|
||||||
isHide: false,
|
// isHide: false,
|
||||||
isKeepAlive: true,
|
// isKeepAlive: true,
|
||||||
isAffix: false,
|
// isAffix: false,
|
||||||
isIframe: false,
|
// isIframe: false,
|
||||||
roles: ['admin'],
|
// roles: ['admin'],
|
||||||
icon: 'ele-ColdDrink',
|
// icon: 'ele-ColdDrink',
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/system',
|
// path: '/system',
|
||||||
name: 'system',
|
// name: 'system',
|
||||||
component: () => import('/@/layout/routerView/parent.vue'),
|
// component: () => import('/@/layout/routerView/parent.vue'),
|
||||||
redirect: '/system/menu',
|
// redirect: '/system/menu',
|
||||||
meta: {
|
// meta: {
|
||||||
title: '系统设置',
|
// title: '系统设置',
|
||||||
isLink: '',
|
// isLink: '',
|
||||||
isHide: false,
|
// isHide: false,
|
||||||
isKeepAlive: true,
|
// isKeepAlive: true,
|
||||||
isAffix: false,
|
// isAffix: false,
|
||||||
isIframe: false,
|
// isIframe: false,
|
||||||
roles: ['admin'],
|
// roles: ['admin'],
|
||||||
icon: 'iconfont icon-xitongshezhi',
|
// icon: 'iconfont icon-xitongshezhi',
|
||||||
},
|
// },
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
path: '/system/menu',
|
// path: '/system/menu',
|
||||||
name: 'systemMenu',
|
// name: 'systemMenu',
|
||||||
component: () => import('/@/views/system/menu/index.vue'),
|
// component: () => import('/@/views/system/menu/index.vue'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: '菜单管理',
|
// title: '菜单管理',
|
||||||
isLink: '',
|
// isLink: '',
|
||||||
isHide: false,
|
// isHide: false,
|
||||||
isKeepAlive: true,
|
// isKeepAlive: true,
|
||||||
isAffix: false,
|
// isAffix: false,
|
||||||
isIframe: false,
|
// isIframe: false,
|
||||||
roles: ['admin'],
|
// roles: ['admin'],
|
||||||
icon: 'iconfont icon-caidan',
|
// icon: 'iconfont icon-caidan',
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/system/role',
|
// path: '/system/role',
|
||||||
name: 'systemRole',
|
// name: 'systemRole',
|
||||||
component: () => import('/@/views/system/role/index.vue'),
|
// component: () => import('/@/views/system/role/index.vue'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: '角色管理',
|
// title: '角色管理',
|
||||||
isLink: '',
|
// isLink: '',
|
||||||
isHide: false,
|
// isHide: false,
|
||||||
isKeepAlive: true,
|
// isKeepAlive: true,
|
||||||
isAffix: false,
|
// isAffix: false,
|
||||||
isIframe: false,
|
// isIframe: false,
|
||||||
roles: ['admin'],
|
// roles: ['admin'],
|
||||||
icon: 'ele-ColdDrink',
|
// icon: 'ele-ColdDrink',
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/system/user',
|
// path: '/system/user',
|
||||||
name: 'systemUser',
|
// name: 'systemUser',
|
||||||
component: () => import('/@/views/system/user/index.vue'),
|
// component: () => import('/@/views/system/user/index.vue'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: '用户管理',
|
// title: '用户管理',
|
||||||
isLink: '',
|
// isLink: '',
|
||||||
isHide: false,
|
// isHide: false,
|
||||||
isKeepAlive: true,
|
// isKeepAlive: true,
|
||||||
isAffix: false,
|
// isAffix: false,
|
||||||
isIframe: false,
|
// isIframe: false,
|
||||||
roles: ['admin'],
|
// roles: ['admin'],
|
||||||
icon: 'iconfont icon-icon-',
|
// icon: 'iconfont icon-icon-',
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/system/dept',
|
// path: '/system/dept',
|
||||||
name: 'systemDept',
|
// name: 'systemDept',
|
||||||
component: () => import('/@/views/system/dept/index.vue'),
|
// component: () => import('/@/views/system/dept/index.vue'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: '部门管理',
|
// title: '部门管理',
|
||||||
isLink: '',
|
// isLink: '',
|
||||||
isHide: false,
|
// isHide: false,
|
||||||
isKeepAlive: true,
|
// isKeepAlive: true,
|
||||||
isAffix: false,
|
// isAffix: false,
|
||||||
isIframe: false,
|
// isIframe: false,
|
||||||
roles: ['admin'],
|
// roles: ['admin'],
|
||||||
icon: 'ele-OfficeBuilding',
|
// icon: 'ele-OfficeBuilding',
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/system/dic',
|
// path: '/system/dic',
|
||||||
name: 'systemDic',
|
// name: 'systemDic',
|
||||||
component: () => import('/@/views/system/dic/index.vue'),
|
// component: () => import('/@/views/system/dic/index.vue'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: '字典管理',
|
// title: '字典管理',
|
||||||
isLink: '',
|
// isLink: '',
|
||||||
isHide: false,
|
// isHide: false,
|
||||||
isKeepAlive: true,
|
// isKeepAlive: true,
|
||||||
isAffix: false,
|
// isAffix: false,
|
||||||
isIframe: false,
|
// isIframe: false,
|
||||||
roles: ['admin'],
|
// roles: ['admin'],
|
||||||
icon: 'ele-SetUp',
|
// icon: 'ele-SetUp',
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
},
|
// },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
@ -0,0 +1,266 @@
|
||||||
|
<template>
|
||||||
|
<div class="system-role-container layout-padding">
|
||||||
|
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||||
|
<div class="system-user-search mb15">
|
||||||
|
<!-- 选择灾害类型下拉框 -->
|
||||||
|
<el-select v-model="value_disastertype"
|
||||||
|
size="default"
|
||||||
|
placeholder="Select disaster type">
|
||||||
|
<el-option v-for="item in options_disastertype"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
<!-- 选择灾害时间下拉框 -->
|
||||||
|
<el-date-picker v-model="value_disastertime"
|
||||||
|
type="date"
|
||||||
|
placeholder="Select disaster time"
|
||||||
|
class="ml10"
|
||||||
|
size="default" />
|
||||||
|
<!-- 选择灾害事件下拉框 -->
|
||||||
|
<el-select v-model="value_disasterevent"
|
||||||
|
size="default"
|
||||||
|
placeholder="Select disaster event"
|
||||||
|
class="ml10">
|
||||||
|
<el-option v-for="item in options_disasterevent"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
|
||||||
|
<!-- 选择数据类型下拉框 -->
|
||||||
|
<el-select v-model="value_datatype"
|
||||||
|
size="default"
|
||||||
|
placeholder="Select data type"
|
||||||
|
class="ml10">
|
||||||
|
<el-option v-for="item in options_datatype"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
<!-- 选择是否可视化下拉框 -->
|
||||||
|
<!-- <el-select v-model="value_visualization" size="default" placeholder="Visualization" class="ml10">
|
||||||
|
<el-option v-for="item in options_visualization" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
|
</el-select> -->
|
||||||
|
|
||||||
|
<!-- <el-input v-model="state.tableData.param.search" size="default" placeholder="请输入角色名称" style="max-width: 180px"> </el-input> -->
|
||||||
|
|
||||||
|
<el-button size="default"
|
||||||
|
type="primary"
|
||||||
|
class="ml10">
|
||||||
|
<el-icon>
|
||||||
|
<ele-Search />
|
||||||
|
</el-icon>
|
||||||
|
Search
|
||||||
|
</el-button>
|
||||||
|
|
||||||
|
<el-button size="default"
|
||||||
|
type="success"
|
||||||
|
class="ml10">
|
||||||
|
<el-icon>
|
||||||
|
<ele-Search />
|
||||||
|
</el-icon>
|
||||||
|
Upload
|
||||||
|
</el-button>
|
||||||
|
|
||||||
|
<!-- <el-button size="default" type="success" class="ml10" @click="onOpenAddRole('add')">
|
||||||
|
<el-icon>
|
||||||
|
<ele-FolderAdd />
|
||||||
|
</el-icon>
|
||||||
|
新增角色
|
||||||
|
</el-button> -->
|
||||||
|
</div>
|
||||||
|
<!-- <el-table :data="state.tableData.data" v-loading="state.tableData.loading" style="width: 100%">
|
||||||
|
<el-table-column type="vordmId" label="VoRDM ID" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="disasterKeyword" label="Disaster keyword" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column prop="crawlertype" label="Crawler type" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column prop="crawlerStatus" label="Crawler status" show-overflow-tooltip></el-table-column> -->
|
||||||
|
|
||||||
|
<!-- 需修改弹出框页面 -->
|
||||||
|
<!-- <el-table-column label="Crawler operation" width="100">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button size="small" text type="primary" @click="onOpenEditRole('edit', scope.row)">Start</el-button>
|
||||||
|
<el-button size="small" text type="primary" @click="onRowDel(scope.row)">Stop</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table> -->
|
||||||
|
|
||||||
|
<!-- <el-pagination
|
||||||
|
@size-change="onHandleSizeChange"
|
||||||
|
@current-change="onHandleCurrentChange"
|
||||||
|
class="mt15"
|
||||||
|
:pager-count="5"
|
||||||
|
:page-sizes="[10, 20, 30]"
|
||||||
|
v-model:current-page="state.tableData.param.pageNum"
|
||||||
|
background
|
||||||
|
v-model:page-size="state.tableData.param.pageSize"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
:total="state.tableData.total"
|
||||||
|
>
|
||||||
|
</el-pagination> -->
|
||||||
|
</div>
|
||||||
|
<RoleDialog ref="roleDialogRef"
|
||||||
|
@refresh="getTableData()" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="systemRole">
|
||||||
|
import { defineAsyncComponent, reactive, onMounted, ref } from 'vue';
|
||||||
|
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||||
|
|
||||||
|
// 引入组件
|
||||||
|
const RoleDialog = defineAsyncComponent(() => import('/@/views/system/role/dialog.vue'));
|
||||||
|
const value_disastertype = ref('');
|
||||||
|
const value_disastertime = ref('');
|
||||||
|
const value_datatype = ref('');
|
||||||
|
const value_crawlerstatus = ref('');
|
||||||
|
|
||||||
|
//选择灾害类型下拉框
|
||||||
|
const options_disastertype = [
|
||||||
|
{
|
||||||
|
value: 'Earthquake',
|
||||||
|
label: 'Earthquake',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'Hurricane',
|
||||||
|
label: 'Hurricane',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'Flood',
|
||||||
|
label: 'Flood',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'Volcano',
|
||||||
|
label: 'Volcano',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'Drought',
|
||||||
|
label: 'Drought',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'Landslide',
|
||||||
|
label: 'Landslide',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
//选择数据类型下拉框
|
||||||
|
const options_datatype = [
|
||||||
|
{
|
||||||
|
value: 'Basic data',
|
||||||
|
label: 'Basic data',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'News picture',
|
||||||
|
label: 'News picture',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'Disaster report',
|
||||||
|
label: 'Disaster report',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'Disaster mapping',
|
||||||
|
label: 'Disaster mapping',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'Word cloud',
|
||||||
|
label: 'Word cloud',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'Hotspot area',
|
||||||
|
label: 'Hotspot area',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
//选择是否可视化下拉框
|
||||||
|
const options_visualization = [
|
||||||
|
{
|
||||||
|
value: 'Yes',
|
||||||
|
label: 'Yes',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'No',
|
||||||
|
label: 'No',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
// 定义变量内容
|
||||||
|
const roleDialogRef = ref();
|
||||||
|
const state = reactive({
|
||||||
|
tableData: {
|
||||||
|
data: [],
|
||||||
|
total: 0,
|
||||||
|
loading: false,
|
||||||
|
param: {
|
||||||
|
search: '',
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
// 初始化表格数据
|
||||||
|
const getTableData = () => {
|
||||||
|
state.tableData.loading = true;
|
||||||
|
const data = [];
|
||||||
|
for (let i = 0; i < 20; i++) {
|
||||||
|
data.push({
|
||||||
|
roleName: i === 0 ? '超级管理员' : '普通用户',
|
||||||
|
roleSign: i === 0 ? 'admin' : 'common',
|
||||||
|
describe: `测试角色${i + 1}`,
|
||||||
|
sort: i,
|
||||||
|
status: true,
|
||||||
|
createTime: new Date().toLocaleString(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
state.tableData.data = data;
|
||||||
|
state.tableData.total = state.tableData.data.length;
|
||||||
|
setTimeout(() => {
|
||||||
|
state.tableData.loading = false;
|
||||||
|
}, 500);
|
||||||
|
};
|
||||||
|
// 打开新增角色弹窗
|
||||||
|
const onOpenAddRole = (type) => {
|
||||||
|
roleDialogRef.value.openDialog(type);
|
||||||
|
};
|
||||||
|
// 打开修改角色弹窗
|
||||||
|
const onOpenEditRole = (type, row) => {
|
||||||
|
roleDialogRef.value.openDialog(type, row);
|
||||||
|
};
|
||||||
|
// 删除角色
|
||||||
|
const onRowDel = (row) => {
|
||||||
|
ElMessageBox.confirm(`此操作将永久删除角色名称:“${row.roleName}”,是否继续?`, '提示', {
|
||||||
|
confirmButtonText: '确认',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
getTableData();
|
||||||
|
ElMessage.success('删除成功');
|
||||||
|
})
|
||||||
|
.catch(() => { });
|
||||||
|
};
|
||||||
|
// 分页改变
|
||||||
|
const onHandleSizeChange = (val) => {
|
||||||
|
state.tableData.param.pageSize = val;
|
||||||
|
getTableData();
|
||||||
|
};
|
||||||
|
// 分页改变
|
||||||
|
const onHandleCurrentChange = (val) => {
|
||||||
|
state.tableData.param.pageNum = val;
|
||||||
|
getTableData();
|
||||||
|
};
|
||||||
|
// 页面加载时
|
||||||
|
onMounted(() => {
|
||||||
|
getTableData();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.system-role-container {
|
||||||
|
.system-role-padding {
|
||||||
|
padding: 15px;
|
||||||
|
.el-table {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in New Issue