Commit f3dca634 authored by dragondean@qq.com's avatar dragondean@qq.com

优化订单列表页面的权限设置

parent eff22d53
...@@ -126,13 +126,13 @@ ...@@ -126,13 +126,13 @@
<el-col :span="1.5"> <el-col :span="1.5">
<!-- <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" <!-- <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
:loading="exportLoading" v-hasPermi="['ecw:order:export']">{{$t('导出')}}</el-button> --> :loading="exportLoading" v-hasPermi="['ecw:order:export']">{{$t('导出')}}</el-button> -->
<el-dropdown v-hasPermi="['ecw:order:export:other','ecw:order:export:checked','ecw:order:export:search' ]"> <el-dropdown v-hasPermi="isAll ? ['ecw:order:export','ecw:order:export:other']:[exportPermiString]">
<el-button type="primary" :loading="exportLoading" size="mini"> <el-button type="primary" :loading="exportLoading" size="mini">
导出 <i class="el-icon-arrow-down el-icon--right"></i> 导出 <i class="el-icon-arrow-down el-icon--right"></i>
</el-button> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item v-hasPermi="['ecw:order:export:checked']" @click.native="exportChecked">导出勾选</el-dropdown-item> <el-dropdown-item v-hasPermi="[exportPermiString]" @click.native="exportChecked">导出勾选</el-dropdown-item>
<el-dropdown-item v-hasPermi="['ecw:order:export:search']" @click.native="exportSearch">导出搜索</el-dropdown-item> <el-dropdown-item v-hasPermi="[exportPermiString]" @click.native="exportSearch">导出搜索</el-dropdown-item>
<template v-if="isAll" v-hasPermi="['ecw:order:export:other']"> <template v-if="isAll" v-hasPermi="['ecw:order:export:other']">
<el-dropdown-item @click.native="$message('// TODO')">异常单统计</el-dropdown-item> <el-dropdown-item @click.native="$message('// TODO')">异常单统计</el-dropdown-item>
<el-dropdown-item @click.native="$message('// TODO')">重货单统计</el-dropdown-item> <el-dropdown-item @click.native="$message('// TODO')">重货单统计</el-dropdown-item>
...@@ -542,6 +542,14 @@ export default { ...@@ -542,6 +542,14 @@ export default {
} }
}, },
computed: { computed: {
// 导出的权限字符串
exportPermiString(){
let arr = ['ecw:order:export']
if(this.mine)arr.push('my')
if(this.dept)arr.push('dept')
if(this.transportId)arr.push(this.transportId)
return arr.join(":")
},
// 是否全部订单 // 是否全部订单
isAll(){ isAll(){
return !(this.mine || this.dept || this.transportId) return !(this.mine || this.dept || this.transportId)
......
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