Commit 0ce85d1e authored by 王启林's avatar 王启林

perf: 修改站点事项

parent 5d052533
...@@ -5,9 +5,14 @@ ...@@ -5,9 +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-button type="primary" @click="changeHallCheckInAll"
>批量设置入驻事项</a-button
>
<a-button type="primary" @click="setBatchAgent" <a-button type="primary" @click="setBatchAgent"
>批量设置帮办代办</a-button >批量设置帮办代办</a-button
> >
</a-space>
</div> </div>
<div> <div>
<a-space> <a-space>
...@@ -98,6 +103,13 @@ ...@@ -98,6 +103,13 @@
<a-tag v-else color="blue"> 手动添加 </a-tag> <a-tag v-else color="blue"> 手动添加 </a-tag>
</template> </template>
<!-- 大厅入驻事项 -->
<template slot="hallCheckIn" slot-scope="text">
<y-switch
v-model="text.hallCheckIn"
@onChange="changeHallCheckIn( text)"
></y-switch>
</template>
<!-- 帮办代办 --> <!-- 帮办代办 -->
<template slot="agent" slot-scope="text"> <template slot="agent" slot-scope="text">
<y-switch <y-switch
...@@ -138,7 +150,7 @@ ...@@ -138,7 +150,7 @@
</template> </template>
<script> <script>
import { getSiteMatterList, addSitematter } 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";
...@@ -171,6 +183,12 @@ const columns = [ ...@@ -171,6 +183,12 @@ const columns = [
customRender: "source", customRender: "source",
}, },
}, },
{
title: "大厅入驻事项",
scopedSlots: {
customRender: "hallCheckIn",
},
},
{ {
title: "帮办代办", title: "帮办代办",
scopedSlots: { scopedSlots: {
...@@ -324,6 +342,32 @@ export default { ...@@ -324,6 +342,32 @@ export default {
this.addVisile = true; this.addVisile = true;
}, },
// 批量设置大厅入驻事项
async changeHallCheckInAll(){
if (!this.selectedRows.length) {
this.$message.warning("请先勾选数据");
return;
}
this.selectedRows.forEach((v) => {
v.hallCheckIn = 1;
});
let res = await batchSaveSitematter(this.selectedRows)
let { code } = res.data;
if (code == 1) {
this.$message.success("加入成功");
}
this.getMatterSiteData();
},
// 加入大厅入驻事项
async changeHallCheckIn(row){
let res = await addSitematter(row);
if (res.data.code == 1) {
this.$message.success(res.data.msg);
}
this.getMatterSiteData();
},
// 设置帮办代办 // 设置帮办代办
async changeAgent(val, row) { async changeAgent(val, row) {
if (val == 1) { if (val == 1) {
......
This diff is collapsed.
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