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

@ -16,8 +16,9 @@
<div class="flex footer_h"> <div class="flex footer_h">
<!-- <i class="el-icon-collection-tag"></i> --> <!-- <i class="el-icon-collection-tag"></i> -->
<div class="black"></div> <div class="black"></div>
<p>判分点列表</p> <p style="float: left">判分点列表</p>
<el-button class="button" @click="HomepageJump()">新增</el-button> <el-button class="button" @click="HomepageJump()">新增</el-button>
<el-button class="button" @click="deletes()">批量删除</el-button>
</div> </div>
<div> <div>
<el-row> <el-row>
@ -29,7 +30,12 @@
:header-cell-style="headClass" :header-cell-style="headClass"
:stripe="true" :stripe="true"
header-align="center" header-align="center"
@selection-change="handleSelectionChange"
> >
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column type="index" label="序号" align="center"> <el-table-column type="index" label="序号" align="center">
<template slot-scope="scope">{{ scope.$index + (pageNum - 1) * pageSize + 1 }}</template> <template slot-scope="scope">{{ scope.$index + (pageNum - 1) * pageSize + 1 }}</template>
</el-table-column> </el-table-column>
@ -93,6 +99,7 @@ export default {
currentPage: 1, currentPage: 1,
systemId: this.$route.query.systemId, systemId: this.$route.query.systemId,
systemName: this.$route.query.systemName, systemName: this.$route.query.systemName,
multipleSelection:[],
}; };
}, },
components: {quill}, components: {quill},
@ -152,6 +159,56 @@ export default {
console.log(err); 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) { // getProgrammingClassData(params) { //
this.$post(this.api.getBcJudgmentPoint, params).then(res => { this.$post(this.api.getBcJudgmentPoint, params).then(res => {
this.tableData = res.message.records; this.tableData = res.message.records;
@ -381,14 +438,15 @@ export default {
.button { .button {
height: 30px; height: 30px;
width: 80px; //width: 80px;
margin-top: 7px; margin: 7px;
border: none; border: none;
background-color: #9278ff; background-color: #9278ff;
color: #ffffff; color: #ffffff;
border-radius: 20px; border-radius: 20px;
position: absolute; float: right;
right: 30px; //position: absolute;
//right: 30px;
} }
.button:focus { .button:focus {
@ -402,6 +460,7 @@ export default {
} }
.header { .header {
display: flex;
background-color: #ffffff; background-color: #ffffff;
height: 50px; height: 50px;
font-size: 12px; font-size: 12px;
@ -422,12 +481,12 @@ export default {
} }
.flex { .flex {
display: flex; //display: flex;
justify-content: flex-start; justify-content: flex-start;
} }
.flex-end { .flex-end {
display: flex; //display: flex;
justify-content: flex-end; justify-content: flex-end;
} }

Loading…
Cancel
Save