修改导出的按钮权限
This commit is contained in:
parent
34955cb417
commit
c58386c1e4
@ -9,7 +9,8 @@
|
|||||||
:visible="show"
|
:visible="show"
|
||||||
>
|
>
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button :size="size" v-auths="['organizationExport']" icon="sc-icon-Download" @click="exportClick">下载</el-button>
|
<slot></slot>
|
||||||
|
<!-- <el-button :size="size" v-auths="['organizationExport','userExport']" icon="sc-icon-Download" @click="exportClick">下载</el-button>-->
|
||||||
</template>
|
</template>
|
||||||
<template #default>
|
<template #default>
|
||||||
<div v-for="item in list" :key="item">
|
<div v-for="item in list" :key="item">
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-button v-auths="['organizationImport']" type="primary" :size="size" plain @click="importFile">批量导入</el-button>
|
<el-button v-auths="['organizationImport','userImport']" type="primary" :size="size" plain @click="importFile">批量导入</el-button>
|
||||||
|
|
||||||
<el-dialog v-bind="$attrs" :title="title" v-model="visible" :width="560" destroy-on-close draggable @closed="visible=false">
|
<el-dialog v-bind="$attrs" :title="title" v-model="visible" :width="560" destroy-on-close draggable @closed="visible=false">
|
||||||
<div class="importBody">
|
<div class="importBody">
|
||||||
|
|||||||
@ -8,7 +8,9 @@
|
|||||||
</scImport>
|
</scImport>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<scExport :size="size" @exportData="exportData" @updateShow="exportChangeShow" :show="exportShow" type="11"></scExport>
|
<scExport :size="size" @exportData="exportData" @updateShow="exportChangeShow" :show="exportShow" type="11">
|
||||||
|
<el-button :size="size" icon="sc-icon-Download" @click="exportData">下载</el-button>
|
||||||
|
</scExport>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
|
|||||||
@ -8,7 +8,9 @@
|
|||||||
</scImport>
|
</scImport>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<scExport :size="size" @exportData="exportData" @updateShow="exportChangeShow" :show="exportShow" type="11"></scExport>
|
<scExport :size="size" @exportData="exportData" @updateShow="exportChangeShow" :show="exportShow" type="11">
|
||||||
|
<el-button :size="size" icon="sc-icon-Download" @click="exportData">下载</el-button>
|
||||||
|
</scExport>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
|
|||||||
@ -8,7 +8,9 @@
|
|||||||
</scImport>
|
</scImport>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<scExport :size="size" @exportData="exportData" @updateShow="exportChangeShow" :show="exportShow" type="11"></scExport>
|
<scExport :size="size" @exportData="exportData" @updateShow="exportChangeShow" :show="exportShow" type="11">
|
||||||
|
<el-button :size="size" icon="sc-icon-Download" @click="exportData">下载</el-button>
|
||||||
|
</scExport>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
|
|||||||
@ -8,7 +8,9 @@
|
|||||||
</scImport>
|
</scImport>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<scExport :size="size" @exportData="exportData" @updateShow="exportChangeShow" :show="exportShow" type="6"></scExport>
|
<scExport :size="size" @exportData="exportData" @updateShow="exportChangeShow" :show="exportShow" type="6">
|
||||||
|
<el-button :size="size" v-auth="'organizationExport'" icon="sc-icon-Download" @click="exportData">下载</el-button>
|
||||||
|
</scExport>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
<el-container class="mainBox mainBoxHeaderNoBorder">
|
<el-container class="mainBox mainBoxHeaderNoBorder">
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<el-button type="primary" :size="size" icon="el-icon-plus" @click="add">新增部门</el-button>
|
<el-button type="primary" v-auth="'addDept'" :size="size" icon="el-icon-plus" @click="add">新增部门</el-button>
|
||||||
<el-button type="danger" :size="size" plain icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button>
|
<el-button type="danger" v-auth="'delDept'" :size="size" plain icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
|
|
||||||
@ -15,7 +15,7 @@
|
|||||||
<sc-table-column label="序号" align="center" type="index"></sc-table-column>
|
<sc-table-column label="序号" align="center" type="index"></sc-table-column>
|
||||||
<el-table-column label="状态" fixed="right" align="center" width="80" prop="active_status">
|
<el-table-column label="状态" fixed="right" align="center" width="80" prop="active_status">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-switch :size="size" v-model="scope.row.active_status" @change="changeSwitch($event, scope.row)" :loading="scope.row.$switch_status" :active-value="true" :inactive-value="false"></el-switch>
|
<el-switch :size="size" v-auth="'updateDeptStatus'" v-model="scope.row.active_status" @change="changeSwitch($event, scope.row)" :loading="scope.row.$switch_status" :active-value="true" :inactive-value="false"></el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" align="center" width="150">
|
<el-table-column label="操作" fixed="right" align="center" width="150">
|
||||||
@ -24,10 +24,12 @@
|
|||||||
<el-button class="noBorderBtn" icon="el-icon-more" :size="size"></el-button>
|
<el-button class="noBorderBtn" icon="el-icon-more" :size="size"></el-button>
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<!-- <el-dropdown-item @click="handlerCommand(scope.row, 'review')" icon="sc-icon-Review">审核</el-dropdown-item>-->
|
<div v-auth="'updateDept'">
|
||||||
<!-- <el-dropdown-item @click="handlerCommand(scope.row, 'cancel')" icon="sc-icon-Revoke">撤回</el-dropdown-item>-->
|
<el-dropdown-item @click="table_edit(scope.row, 'edit')" icon="sc-icon-Edit">修改</el-dropdown-item>
|
||||||
<el-dropdown-item @click="table_edit(scope.row, 'edit')" icon="sc-icon-Edit">修改</el-dropdown-item>
|
</div>
|
||||||
<el-dropdown-item @click="table_del(scope.row, 'delete')" icon="sc-icon-Delete" divided>删除</el-dropdown-item>
|
<div v-auth="'delDept'">
|
||||||
|
<el-dropdown-item @click="table_del(scope.row, 'delete')" icon="sc-icon-Delete" divided>删除</el-dropdown-item>
|
||||||
|
</div>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
|
|||||||
@ -7,7 +7,9 @@
|
|||||||
<div class="searchItem searchBtn">
|
<div class="searchItem searchBtn">
|
||||||
<el-button :size="size" type="primary" icon="el-icon-search" @click="upSearch">查询</el-button>
|
<el-button :size="size" type="primary" icon="el-icon-search" @click="upSearch">查询</el-button>
|
||||||
<el-button :size="size" type="info" icon="el-icon-RefreshRight" @click="reset">重置</el-button>
|
<el-button :size="size" type="info" icon="el-icon-RefreshRight" @click="reset">重置</el-button>
|
||||||
<scExport :size="size" @exportData="exportData" @updateShow="exportChangeShow" :show="exportShow" type="8"></scExport>
|
<scExport :size="size" @exportData="exportData" @updateShow="exportChangeShow" :show="exportShow" type="8">
|
||||||
|
<el-button :size="size" icon="sc-icon-Download" @click="exportData">下载</el-button>
|
||||||
|
</scExport>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<scTable ref="table" :apiObj="list.apiObj" :column="list.column" stripe :size="size" highlightCurrentRow @row-click="rowClick">
|
<scTable ref="table" :apiObj="list.apiObj" :column="list.column" stripe :size="size" highlightCurrentRow @row-click="rowClick">
|
||||||
|
|||||||
@ -13,17 +13,19 @@
|
|||||||
<el-container class="mainHeaderNoBorderPadding">
|
<el-container class="mainHeaderNoBorderPadding">
|
||||||
<el-header style="padding-left: 10px;">
|
<el-header style="padding-left: 10px;">
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<el-button type="primary" :size="size" icon="el-icon-plus" @click="add">新增用户</el-button>
|
<el-button type="primary" v-auth="'userCreate'" :size="size" icon="el-icon-plus" @click="add">新增用户</el-button>
|
||||||
<el-button type="danger" plain :size="size" icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button>
|
<el-button type="danger" v-auth="'delUser'" plain :size="size" icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button>
|
||||||
<el-button type="primary" plain :size="size" :disabled="selection.length==0" @click="role">分配角色</el-button>
|
<el-button type="primary" v-auth="'addUserRoles'" plain :size="size" :disabled="selection.length==0" @click="role">分配角色</el-button>
|
||||||
<el-button type="primary" plain :size="size" :disabled="selection.length==0" @click="rePwd">密码重置</el-button>
|
<el-button type="primary" plain :size="size" :disabled="selection.length==0" @click="rePwd">密码重置</el-button>
|
||||||
<scImport :size="size" title="批量导入用户" @parentParams="importUpload" @importSuccess="importSuccess">
|
<scImport :size="size" title="批量导入用户" @parentParams="importUpload" @importSuccess="importSuccess">
|
||||||
<div @click="importTemplate">下载导入模版</div>
|
<div v-auth="'userImportTemplate'" @click="importTemplate">下载导入模版</div>
|
||||||
</scImport>
|
</scImport>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<div class="right-panel-search">
|
<div class="right-panel-search">
|
||||||
<scExport :size="size" @exportData="exportData" @updateShow="exportChangeShow" :show="exportShow" type="7"></scExport>
|
<scExport :size="size" @exportData="exportData" @updateShow="exportChangeShow" :show="exportShow" type="7">
|
||||||
|
<el-button :size="size" v-auths="'userExport'" icon="sc-icon-Download" @click="exportData">下载</el-button>
|
||||||
|
</scExport>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
@ -66,9 +68,15 @@
|
|||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item @click="table_show(scope.row, 'show')" icon="sc-icon-See">用户详情</el-dropdown-item>
|
<el-dropdown-item @click="table_show(scope.row, 'show')" icon="sc-icon-See">用户详情</el-dropdown-item>
|
||||||
<el-dropdown-item @click="table_edit(scope.row, 'edit')" icon="sc-icon-Edit">编辑用户</el-dropdown-item>
|
<div v-auth="'updateMe'">
|
||||||
<el-dropdown-item @click="table_empower(scope.row)" icon="sc-icon-AbilityAuthorization" divided>查看权限</el-dropdown-item>
|
<el-dropdown-item @click="table_edit(scope.row, 'edit')" icon="sc-icon-Edit">编辑用户</el-dropdown-item>
|
||||||
<el-dropdown-item @click="table_del(scope.row, 'delete')" icon="sc-icon-Delete">删除用户</el-dropdown-item>
|
</div>
|
||||||
|
<div v-auth="'viewUserPermissions'">
|
||||||
|
<el-dropdown-item @click="table_empower(scope.row)" icon="sc-icon-AbilityAuthorization" divided>查看权限</el-dropdown-item>
|
||||||
|
</div>
|
||||||
|
<div v-auth="'delUser'">
|
||||||
|
<el-dropdown-item @click="table_del(scope.row, 'delete')" icon="sc-icon-Delete">删除用户</el-dropdown-item>
|
||||||
|
</div>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user