Commit 30c6c712 by lixiaomin

修改页面权限

parent 58438599
......@@ -18,6 +18,13 @@ export default {
return all_permission === permission || permissionFlag.includes(permission)
})
//自定义权限按钮处理
if(vnode.elm.attributes["myattr"] ){
if (!hasPermissions) {
vnode.elm.innerHTML = vnode.elm.inner
return ;
}
}
if (!hasPermissions) {
el.parentNode && el.parentNode.removeChild(el)
}
......
......@@ -20,15 +20,17 @@
</el-select>
</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-form-item>
</el-form>
<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">
<a @click="getDetial(scope.row)" style="color: blue">{{ scope.row.userName }}</a>
<a myattr="mcv" v-hasPermi="['system:customer:view']">
<span @click="getDetial(scope.row)" style="color: blue"> {{ scope.row.userName }}</span>
</a>
</template>
</el-table-column>
<el-table-column label="手机号" align="center" prop="phoneNumber"/>
......
......@@ -32,7 +32,7 @@
</el-select>
</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-form-item>
</el-form>
......@@ -66,7 +66,7 @@
<el-table-column width="200" label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<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>
</el-table-column>
</el-table>
......
......@@ -32,7 +32,7 @@
</el-select>
</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-form-item>
</el-form>
......
......@@ -42,7 +42,7 @@
</el-form-item>
</el-form>
<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>
</div>
</div>
......
......@@ -29,7 +29,7 @@
<el-input v-model="queryParams.machineCode" placeholder="请输入店铺地址" clearable @keyup.enter.native="handleQuery" />
</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-form-item>
</el-form>
......@@ -87,13 +87,13 @@
<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>
<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 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)"
@click="setShopState(scope.row, 1, 'setState')">恢复营业</el-button>
<el-button v-show="scope.row.isDefault=='0'" size="mini" type="text" @click="setShopState(scope.row)">设为默认</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)" v-hasPermi="['system:shop:default']">设为默认</el-button>
</template>
</el-table-column>
</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