Commit f8e5ada0 authored by “yiyousong”'s avatar “yiyousong”

feat: 修改站点业务

parent a2735c0a
......@@ -52,6 +52,13 @@
}}
</span>
</template>
<!-- 是否展示数据 -->
<template slot="datashow" slot-scope="{ record }">
<y-switch
v-model="record.datashow"
@change="changeDatashow(record)"
></y-switch>
</template>
<template slot="action" slot-scope="{ record }">
<a-space size="middle">
......@@ -146,6 +153,7 @@ import addprofession from "../group/addprofession.vue";
import local from "@/utils/local";
import { uniqueObjArray } from "@/utils";
import YTable from "@/components/YTable.vue";
import YSwitch from "@/components/yswitch/YSwitch.vue";
import {
businessList,
delSiteBusiness,
......@@ -155,12 +163,14 @@ import {
businessInfo,
businessMatterList,
delBusinessMatter,
saveBusiness,
} from "@/services/business";
export default {
components: {
addprofession,
YTable,
YSwitch,
},
data() {
return {
......@@ -180,6 +190,14 @@ export default {
align: "left",
dataIndex: "businessName",
},
{
title: "是否数据展示",
dataIndex: "datashow",
width: "120px",
scopedSlots: {
customRender: "datashow",
},
},
{
title: "操作",
width: "110px",
......@@ -342,6 +360,20 @@ export default {
this.$refs.addprofession.onAdd();
this.visible = true;
},
async changeDatashow(row) {
let res = await businessInfo({ id: row.businessId });
if (res.data.code === 1) {
let { data } = res.data;
let result = await saveBusiness({
...data,
datashow: row.datashow,
});
if (result.data.code === 1) {
this.$message.success("修改成功");
}
this.getSiteBusinessData();
}
},
// 站点业务选中
onSelectSiteBusiness(key, rows) {
this.selectedLeftRowKeys = key;
......
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