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

perf: 优化加入大厅事项

parent 2cfdf9b7
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
<div class="titel">站点事项列表</div> <div class="titel">站点事项列表</div>
<div class="header-bottom flex aic jcb pdr6"> <div class="header-bottom flex aic jcb pdr6">
<div class="left-btn"> <div class="left-btn">
<a-space> <a-space>
<a-button type="primary" @click="changeHallCheckInAll" <a-button type="primary" @click="changeHallCheckInAll"
>批量设置入驻事项</a-button >批量设置入驻事项</a-button
> >
<a-button type="primary" @click="setBatchAgent" <a-button type="primary" @click="setBatchAgent"
>批量设置帮办代办</a-button >批量设置帮办代办</a-button
> >
</a-space> </a-space>
</div> </div>
<div> <div>
<a-space> <a-space>
...@@ -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,12 +365,12 @@ export default { ...@@ -360,12 +365,12 @@ 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);
} }
this.getMatterSiteData(); this.getMatterSiteData();
}, },
// 设置帮办代办 // 设置帮办代办
......
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