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

perf: 优化加入大厅事项

parent 2cfdf9b7
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
<template slot="hallCheckIn" slot-scope="text"> <template slot="hallCheckIn" slot-scope="text">
<y-switch <y-switch
v-model="text.hallCheckIn" v-model="text.hallCheckIn"
@onChange="changeHallCheckIn( text)" @onChange="changeHallCheckIn(text)"
></y-switch> ></y-switch>
</template> </template>
<!-- 帮办代办 --> <!-- 帮办代办 -->
...@@ -150,7 +150,11 @@ ...@@ -150,7 +150,11 @@
</template> </template>
<script> <script>
import { getSiteMatterList, addSitematter ,batchSaveSitematter} from "@/services/matter"; import {
getSiteMatterList,
addSitematter,
batchSaveSitematter,
} from "@/services/matter";
import { pageSizeOptions } from "@/config/pageConfig.js"; import { pageSizeOptions } from "@/config/pageConfig.js";
import { getDeptList } from "@/services/dept"; import { getDeptList } from "@/services/dept";
import YSwitch from "@/components/yswitch/YSwitch.vue"; import YSwitch from "@/components/yswitch/YSwitch.vue";
...@@ -343,15 +347,16 @@ export default { ...@@ -343,15 +347,16 @@ export default {
}, },
// 批量设置大厅入驻事项 // 批量设置大厅入驻事项
async changeHallCheckInAll(){ async changeHallCheckInAll() {
if (!this.selectedRows.length) { if (!this.selectedRows.length) {
this.$message.warning("请先勾选数据"); this.$message.warning("请先勾选数据");
return; return;
} }
this.loading = true;
this.selectedRows.forEach((v) => { this.selectedRows.forEach((v) => {
v.hallCheckIn = 1; v.hallCheckIn = 1;
}); });
let res = await batchSaveSitematter(this.selectedRows) let res = await batchSaveSitematter(this.selectedRows);
let { code } = res.data; let { code } = res.data;
if (code == 1) { if (code == 1) {
this.$message.success("加入成功"); this.$message.success("加入成功");
...@@ -360,7 +365,7 @@ export default { ...@@ -360,7 +365,7 @@ export default {
}, },
// 加入大厅入驻事项 // 加入大厅入驻事项
async changeHallCheckIn(row){ async changeHallCheckIn(row) {
let res = await addSitematter(row); let res = await addSitematter(row);
if (res.data.code == 1) { if (res.data.code == 1) {
this.$message.success(res.data.msg); 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