Commit 017d38f1 authored by “yiyousong”'s avatar “yiyousong”

perf: 优化加入大厅事项

parent 2cfdf9b7
......@@ -107,7 +107,7 @@
<template slot="hallCheckIn" slot-scope="text">
<y-switch
v-model="text.hallCheckIn"
@onChange="changeHallCheckIn( text)"
@onChange="changeHallCheckIn(text)"
></y-switch>
</template>
<!-- 帮办代办 -->
......@@ -150,7 +150,11 @@
</template>
<script>
import { getSiteMatterList, addSitematter ,batchSaveSitematter} from "@/services/matter";
import {
getSiteMatterList,
addSitematter,
batchSaveSitematter,
} from "@/services/matter";
import { pageSizeOptions } from "@/config/pageConfig.js";
import { getDeptList } from "@/services/dept";
import YSwitch from "@/components/yswitch/YSwitch.vue";
......@@ -343,15 +347,16 @@ export default {
},
// 批量设置大厅入驻事项
async changeHallCheckInAll(){
async changeHallCheckInAll() {
if (!this.selectedRows.length) {
this.$message.warning("请先勾选数据");
return;
}
this.loading = true;
this.selectedRows.forEach((v) => {
v.hallCheckIn = 1;
});
let res = await batchSaveSitematter(this.selectedRows)
let res = await batchSaveSitematter(this.selectedRows);
let { code } = res.data;
if (code == 1) {
this.$message.success("加入成功");
......@@ -360,7 +365,7 @@ export default {
},
// 加入大厅入驻事项
async changeHallCheckIn(row){
async changeHallCheckIn(row) {
let res = await addSitematter(row);
if (res.data.code == 1) {
this.$message.success(res.data.msg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment