|
@@ -27,7 +27,7 @@
|
|
|
<el-dropdown-item :command="filterCondition('stop')">显示停用</el-dropdown-item>
|
|
|
<el-dropdown-item :command="filterCondition('allot')">显示已分配</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
- </el-dropdown> -->
|
|
|
+ </el-dropdown> -->
|
|
|
|
|
|
<!-- <el-button size="small" @click="handleQuery">查询</el-button> -->
|
|
|
<el-button size="small" @click="handleRefresh">刷新</el-button>
|
|
@@ -239,7 +239,12 @@ export default {
|
|
|
if (this.checkedList.length) {
|
|
|
let ids = this.checkedList.map(i => i.id);
|
|
|
materialApi.delMaterial(ids).then(res => {
|
|
|
- if (res.code == 200) this.handleRefresh();
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.handleRefresh();
|
|
|
+ // 清空选中数据
|
|
|
+ this.checkedList = [];
|
|
|
+ this.$refs.materialTable.clearSelection();
|
|
|
+ }
|
|
|
})
|
|
|
} else {
|
|
|
this.$message({
|
|
@@ -294,7 +299,12 @@ export default {
|
|
|
console.log(param, '启用/停用param');
|
|
|
materialApi.updateEnableMaterial(param).then(res => {
|
|
|
console.log(res, '启用/停用');
|
|
|
- if (res.code == 200) this.handleRefresh();
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.handleRefresh();
|
|
|
+ // 清空选中数据
|
|
|
+ this.checkedList = [];
|
|
|
+ this.$refs.materialTable.clearSelection();
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
},
|