master
e 3 years ago
parent 5657790252
commit 5ef05323ee
  1. 73
      src/views/Home.vue

@ -16,8 +16,9 @@
<div class="flex footer_h">
<!-- <i class="el-icon-collection-tag"></i> -->
<div class="black"></div>
<p>判分点列表</p>
<p style="float: left">判分点列表</p>
<el-button class="button" @click="HomepageJump()">新增</el-button>
<el-button class="button" @click="deletes()">批量删除</el-button>
</div>
<div>
<el-row>
@ -29,7 +30,12 @@
:header-cell-style="headClass"
:stripe="true"
header-align="center"
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column type="index" label="序号" align="center">
<template slot-scope="scope">{{ scope.$index + (pageNum - 1) * pageSize + 1 }}</template>
</el-table-column>
@ -93,6 +99,7 @@ export default {
currentPage: 1,
systemId: this.$route.query.systemId,
systemName: this.$route.query.systemName,
multipleSelection:[],
};
},
components: {quill},
@ -152,6 +159,56 @@ export default {
console.log(err);
});
},
//
handleSelectionChange(val){
console.log(val)
this.multipleSelection = val;
},
//
deletes(){
let bcIdList = [];
let nameList =[];
let lcIdList = [];
for(var i=0;i<this.multipleSelection.length;i++){
bcIdList.push(this.multipleSelection[i].bcId)
lcIdList.push(this.multipleSelection[i].lcId)
nameList.push(this.multipleSelection[i].name)
}
this.$confirm(`此操作将永久删除【${nameList}】判分点, 是否继续?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
center: true
}).then(() => {
if (this.systemId == 11) {
//
this.$post(`${this.api.deleteJudgmentPoint}?ids=${lcIdList}`).then(res => {
if (res.status === 200) {
this.$message.success("删除成功");
this.initData();
} else {
this.$message.error(res.message);
}
}).catch(err => {
console.log(err);
});
} else {
//
this.$post(`${this.api.bcDeleteJudgmentPoint}?ids=${bcIdList}`).then(res => {
if (res.status === 200) {
this.$message.success("删除成功");
this.initData();
} else {
this.$message.error(res.message);
}
}).catch(err => {
console.log(err);
});
}
}).catch(() => {
this.$message.info("已取消删除");
});
},
getProgrammingClassData(params) { //
this.$post(this.api.getBcJudgmentPoint, params).then(res => {
this.tableData = res.message.records;
@ -381,14 +438,15 @@ export default {
.button {
height: 30px;
width: 80px;
margin-top: 7px;
//width: 80px;
margin: 7px;
border: none;
background-color: #9278ff;
color: #ffffff;
border-radius: 20px;
position: absolute;
right: 30px;
float: right;
//position: absolute;
//right: 30px;
}
.button:focus {
@ -402,6 +460,7 @@ export default {
}
.header {
display: flex;
background-color: #ffffff;
height: 50px;
font-size: 12px;
@ -422,12 +481,12 @@ export default {
}
.flex {
display: flex;
//display: flex;
justify-content: flex-start;
}
.flex-end {
display: flex;
//display: flex;
justify-content: flex-end;
}

Loading…
Cancel
Save