权限控制
This commit is contained in:
@@ -25,13 +25,10 @@
|
||||
</div>
|
||||
<!-- 操作按钮区域 -->
|
||||
<div class="table-operator" style="border-top: 5px">
|
||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||
<a-button v-if="btnEnableList.indexOf(1)>-1" @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
<a-menu slot="overlay">
|
||||
<a-menu-item key="1">
|
||||
<a-icon type="delete" @click="batchDel"/>
|
||||
删除
|
||||
</a-menu-item>
|
||||
<a-menu-item key="1" v-if="btnEnableList.indexOf(1)>-1" ><a-icon type="delete" @click="batchDel"/>删除</a-menu-item>
|
||||
</a-menu>
|
||||
<a-button style="margin-left: 8px">
|
||||
批量操作
|
||||
@@ -53,17 +50,17 @@
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
@change="handleTableChange">
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a v-if="depotFlag === '1'" @click="btnSetDepot(record)">分配仓库</a>
|
||||
<a-divider v-if="depotFlag === '1'" type="vertical" />
|
||||
<a v-if="customerFlag === '1'" @click="btnSetCustomer(record)">分配客户</a>
|
||||
<a-divider v-if="customerFlag === '1'" type="vertical" />
|
||||
<a v-if="btnEnableList.indexOf(1)>-1 && depotFlag === '1' " @click="btnSetDepot(record)">分配仓库</a>
|
||||
<a-divider v-if="btnEnableList.indexOf(1)>-1 && depotFlag === '1'" type="vertical" />
|
||||
<a v-if="btnEnableList.indexOf(1)>-1 && customerFlag === '1'" @click="btnSetCustomer(record)">分配客户</a>
|
||||
<a-divider v-if="btnEnableList.indexOf(1)>-1 && customerFlag === '1'" type="vertical" />
|
||||
<a @click="handleEdit(record)">编辑</a>
|
||||
<a-divider type="vertical"/>
|
||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
||||
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical"/>
|
||||
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
||||
<a>删除</a>
|
||||
</a-popconfirm>
|
||||
<a-divider type="vertical"/>
|
||||
<a-popconfirm title="确定重置密码为123456吗?" @confirm="() => handleReset(record.id)">
|
||||
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical"/>
|
||||
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定重置密码为123456吗?" @confirm="() => handleReset(record.id)">
|
||||
<a>重置密码</a>
|
||||
</a-popconfirm>
|
||||
</span>
|
||||
@@ -156,6 +153,14 @@
|
||||
this.loadData(1);
|
||||
this.getSystemConfig();
|
||||
},
|
||||
handleEdit: function (record) {
|
||||
this.$refs.modalForm.edit(record);
|
||||
this.$refs.modalForm.title = "编辑";
|
||||
this.$refs.modalForm.disableSubmit = false;
|
||||
if(this.btnEnableList.indexOf(1)===-1) {
|
||||
this.$refs.modalForm.isReadOnly = true
|
||||
}
|
||||
},
|
||||
handleReset(id) {
|
||||
let that = this;
|
||||
postAction(that.url.resetPwd, {id: id}).then((res) => {
|
||||
|
||||
Reference in New Issue
Block a user