|
@@ -14,6 +14,9 @@
|
|
|
<el-button v-if="queryParams.status == 1 && checkRole(['operator', 'commander'])" type="primary" plain
|
|
|
icon="el-icon-bell" @click="batchNotification"
|
|
|
:disabled="multipleSelection && multipleSelection.length == 0">批量通知专家</el-button>
|
|
|
+ <el-button v-if="queryParams.status == 1 && checkRole(['operator', 'commander'])" type="danger" plain
|
|
|
+ icon="el-icon-delete" @click="handleDelete()"
|
|
|
+ :disabled="multipleSelection && multipleSelection.length == 0">批量删除</el-button>
|
|
|
|
|
|
<el-table v-if="checkRole(['operator', 'commander'])" v-loading="loading" :data="committeeList"
|
|
|
@selection-change="handleSelectionChange" style="margin-top: 12px">
|
|
@@ -204,33 +207,38 @@ export default {
|
|
|
},
|
|
|
handleSelectionChange (val) {
|
|
|
this.multipleSelection = val
|
|
|
+ },
|
|
|
+
|
|
|
+ batchNotification () {
|
|
|
this.expertPhoneList = []
|
|
|
|
|
|
this.multipleSelection.forEach(item => {
|
|
|
this.expertPhoneList.push(item.bsExpert.jPhone)
|
|
|
})
|
|
|
- },
|
|
|
|
|
|
- batchNotification () {
|
|
|
- sendCall({
|
|
|
- "sid": this.queryParams.sid,
|
|
|
- "startTime": this.queryParams.startTime,
|
|
|
- "position": this.queryParams.xArea,
|
|
|
- "phoneList": this.expertPhoneList
|
|
|
- })
|
|
|
- .then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: '通知成功!'
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$modal.msgError("通知失败,请联系管理员!!!");
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- this.$modal.msgError("通知失败,请联系管理员!!!");
|
|
|
+ if (this.expertPhoneList && this.expertPhoneList.length > 0) {
|
|
|
+ sendCall({
|
|
|
+ "sid": this.queryParams.sid,
|
|
|
+ "startTime": this.queryParams.startTime,
|
|
|
+ "position": this.queryParams.xArea,
|
|
|
+ "phoneList": this.expertPhoneList
|
|
|
})
|
|
|
+ .then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '通知成功!'
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$modal.msgError("通知失败,请联系管理员!!!");
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ this.$modal.msgError("通知失败,请联系管理员!!!");
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$modal.msgError("请选择专家后通知");
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
/** 查询评标委员会列表 */
|
|
@@ -246,14 +254,29 @@ export default {
|
|
|
},
|
|
|
|
|
|
/** 删除按钮操作 */
|
|
|
- handleDelete (row) {
|
|
|
- const pbIds = row.pbId || this.ids;
|
|
|
- this.$modal.confirm('是否确认删除评标委员会中姓名为"' + row.bsExpert.jName + '"的专家?').then(function () {
|
|
|
- return delCommittee(pbIds);
|
|
|
- }).then(() => {
|
|
|
- this.getExerptList(this.queryParams.sid);
|
|
|
- this.$modal.msgSuccess("删除成功");
|
|
|
- }).catch(() => { });
|
|
|
+ handleDelete(row) {
|
|
|
+ if (row) {
|
|
|
+ this.$modal.confirm('是否确认删除评标委员会中姓名为"' + row.bsExpert.jName + '"的专家?').then(function () {
|
|
|
+ return delCommittee(row.pbId);
|
|
|
+ }).then(() => {
|
|
|
+ this.getExerptList(this.queryParams.sid);
|
|
|
+ this.$modal.msgSuccess("删除成功");
|
|
|
+ }).catch(() => { });
|
|
|
+ } else {
|
|
|
+ const pbIds = []
|
|
|
+
|
|
|
+ this.multipleSelection.forEach(item => {
|
|
|
+ console.log(item);
|
|
|
+ pbIds.push(item.pbId)
|
|
|
+ })
|
|
|
+
|
|
|
+ this.$modal.confirm('是否确认批量删除?').then(function () {
|
|
|
+ return delCommittee(pbIds);
|
|
|
+ }).then(() => {
|
|
|
+ this.getExerptList(this.queryParams.sid);
|
|
|
+ this.$modal.msgSuccess("删除成功");
|
|
|
+ }).catch(() => { });
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
// 查询抽取申请列表
|