Commit 30c6c712 by lixiaomin

修改页面权限

parent 58438599
...@@ -18,6 +18,13 @@ export default { ...@@ -18,6 +18,13 @@ export default {
return all_permission === permission || permissionFlag.includes(permission) return all_permission === permission || permissionFlag.includes(permission)
}) })
//自定义权限按钮处理
if(vnode.elm.attributes["myattr"] ){
if (!hasPermissions) {
vnode.elm.innerHTML = vnode.elm.inner
return ;
}
}
if (!hasPermissions) { if (!hasPermissions) {
el.parentNode && el.parentNode.removeChild(el) el.parentNode && el.parentNode.removeChild(el)
} }
......
...@@ -20,16 +20,18 @@ ...@@ -20,16 +20,18 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" v-hasPermi="['system:customer:query']">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table v-loading="loading" :data="customerList"> <el-table v-loading="loading" :data="customerList">
<el-table-column label="用户" align="center" prop="userName"> <el-table-column label="用户" align="center" prop="userName" >
<template slot-scope="scope"> <template slot-scope="scope">
<a @click="getDetial(scope.row)" style="color: blue">{{ scope.row.userName }}</a> <a myattr="mcv" v-hasPermi="['system:customer:view']">
</template> <span @click="getDetial(scope.row)" style="color: blue"> {{ scope.row.userName }}</span>
</a>
</template>
</el-table-column> </el-table-column>
<el-table-column label="手机号" align="center" prop="phoneNumber"/> <el-table-column label="手机号" align="center" prop="phoneNumber"/>
<el-table-column label="订单量" align="center" prop="orderCount"/> <el-table-column label="订单量" align="center" prop="orderCount"/>
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" v-hasPermi="['system:order:query']">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<el-table-column width="200" label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column width="200" label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" v-if="authBtn(['3','4','5','6','13'], scope.row.state)" <el-button size="mini" type="text" v-if="authBtn(['3','4','5','6','13'], scope.row.state)"
@click="refundClick(scope.row)">退款</el-button> @click="refundClick(scope.row)" v-hasPermi="['system:order:refund']">退款</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" v-hasPermi="['system:refund:query']">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button> <el-button type="primary" @click="submitForm" v-hasPermi="['system:shop:edit']">确 定</el-button>
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
</div> </div>
</div> </div>
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<el-input v-model="queryParams.machineCode" placeholder="请输入店铺地址" clearable @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.machineCode" placeholder="请输入店铺地址" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" v-hasPermi="['system:shop:query']">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -87,13 +87,13 @@ ...@@ -87,13 +87,13 @@
<el-button v-show="scope.row.state !='3'" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" <el-button v-show="scope.row.state !='3'" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['system:shop:remove']">删除</el-button> v-hasPermi="['system:shop:remove']">删除</el-button>
<el-button size="mini" type="text" v-if="authBtn(['1'], scope.row.state)" <el-button size="mini" type="text" v-if="authBtn(['1'], scope.row.state)"
@click="setShopState(scope.row, 2, 'setState')"> @click="setShopState(scope.row, 2, 'setState')" v-hasPermi="['system:shop:suspended']">
暂停营业</el-button> 暂停营业</el-button>
<el-button size="mini" type="text" v-if="authBtn(['2'], scope.row.state)" <el-button size="mini" type="text" v-if="authBtn(['2'], scope.row.state)"
@click="setShopState(scope.row, 1, 'setState')">开始营业</el-button> @click="setShopState(scope.row, 1, 'setState')" v-hasPermi="['system:shop:start']">开始营业</el-button>
<el-button size="mini" type="text" v-if="authBtn(['3'], scope.row.state)" <el-button size="mini" type="text" v-if="authBtn(['3'], scope.row.state)"
@click="setShopState(scope.row, 1, 'setState')">恢复营业</el-button> @click="setShopState(scope.row, 1, 'setState')" v-hasPermi="['system:shop:restart']">恢复营业</el-button>
<el-button v-show="scope.row.isDefault=='0'" size="mini" type="text" @click="setShopState(scope.row)">设为默认</el-button> <el-button v-show="scope.row.isDefault=='0'" size="mini" type="text" @click="setShopState(scope.row)" v-hasPermi="['system:shop:default']">设为默认</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
......
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