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

feat:添加办事指南数据管理板块

parent e765ffb6
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
color:#1BBC9B; color:#1BBC9B;
} }
.edit{ .edit{
color:#03d76f; color:#03d76f !important;
} }
.clofff{ .clofff{
color:#fff; color:#fff;
......
<template> <template>
<div class="business flex flexc"> <div class="business flex flexc">
<a-tabs :activeKey="active" @change="changeRouter"> <a-tabs :activeKey="active" @change="changeRouter">
<a-tab-pane key="/business/businessmanage" tab="业务管理"> <a-tab-pane key="/business/businessmanage" tab="业务管理"> </a-tab-pane>
<!-- <BusinessTabs2 v-if="active === 1" ref="BusinessTabs2" /> -->
</a-tab-pane>
<a-tab-pane key="/business/mattermanage" tab="事项管理"> <a-tab-pane key="/business/mattermanage" tab="事项管理"> </a-tab-pane>
<!-- <BusinessTabs1 v-if="active === 2" ref="BusinessTabs1" /> -->
</a-tab-pane>
<a-tab-pane key="/business/businessinmanage" tab="业务事项关联"> <a-tab-pane key="/business/businessinmanage" tab="业务事项关联">
<!-- <BusinessTabs3 v-if="active === 3" ref="BusinessTabs3" /> --> </a-tab-pane>
<a-tab-pane key="/business/workguide" tab="办事指南数据管理">
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
<div class="business-out-box flex1"> <div class="business-out-box flex1">
...@@ -20,21 +17,12 @@ ...@@ -20,21 +17,12 @@
</template> </template>
<script> <script>
// import BusinessTabs1 from "./components/businessTabs1.vue";
// import BusinessTabs2 from "./components/businessTabs2.vue";
// import BusinessTabs3 from "./components/businessTabs3.vue";
export default { export default {
components: { components: {},
// BusinessTabs1,
// BusinessTabs2,
// BusinessTabs3,
},
data() { data() {
return { return {
siteId: "", // 站点id siteId: "", // 站点id
// active: 1,
}; };
}, },
computed: { computed: {
...@@ -60,15 +48,7 @@ export default { ...@@ -60,15 +48,7 @@ export default {
/deep/.ant-tabs-nav-container { /deep/.ant-tabs-nav-container {
border-bottom: 1px solid rgb(224, 224, 224) !important; border-bottom: 1px solid rgb(224, 224, 224) !important;
} }
&::after {
content: "";
width: 1px;
height: 82vh;
position: absolute;
background-color: #eeeeee;
top: 44px;
left: 50%;
}
.business-out-box { .business-out-box {
overflow-y: auto; overflow-y: auto;
} }
......
...@@ -354,17 +354,18 @@ export default { ...@@ -354,17 +354,18 @@ export default {
onSelectLeftRow(record, selected) { onSelectLeftRow(record, selected) {
if (selected && record.children && record.children.length) { if (selected && record.children && record.children.length) {
record.children.forEach((v) => { record.children.forEach((v) => {
this.selectedLeftRowKeys= [...new Set([...this.selectedLeftRowKeys,v.id])] this.selectedLeftRowKeys = [
this.deleteData=[...new Set([...this.deleteData,v])]; ...new Set([...this.selectedLeftRowKeys, v.id]),
];
this.deleteData = [...new Set([...this.deleteData, v])];
}); });
} else if (!selected) { } else if (!selected) {
this.selectedLeftRowKeys = this.selectedLeftRowKeys.filter( this.selectedLeftRowKeys = this.selectedLeftRowKeys.filter(
(v) => v != record.id (v) => v != record.id
); );
this.deleteData = this.deleteData.filter((v) => { this.deleteData = this.deleteData.filter((v) => {
return v.id !=record.id return v.id != record.id;
}); });
} }
}, },
// 批量删除 // 批量删除
...@@ -525,6 +526,15 @@ export default { ...@@ -525,6 +526,15 @@ export default {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex; display: flex;
&::after {
content: "";
width: 1px;
height: 82vh;
position: absolute;
background-color: #eeeeee;
top: 44px;
left: 50%;
}
.left, .left,
.right { .right {
width: 50%; width: 50%;
......
...@@ -586,6 +586,15 @@ export default { ...@@ -586,6 +586,15 @@ export default {
.basicset-tab2 { .basicset-tab2 {
width: 100%; width: 100%;
display: flex; display: flex;
&::after {
content: "";
width: 1px;
height: 82vh;
position: absolute;
background-color: #eeeeee;
top: 44px;
left: 50%;
}
.left, .left,
.right { .right {
width: 50%; width: 50%;
......
...@@ -666,6 +666,15 @@ export default { ...@@ -666,6 +666,15 @@ export default {
.basicset-tab3 { .basicset-tab3 {
width: 100%; width: 100%;
display: flex; display: flex;
&::after {
content: "";
width: 1px;
height: 82vh;
position: absolute;
background-color: #eeeeee;
top: 44px;
left: 50%;
}
.left, .left,
.right { .right {
width: 50%; width: 50%;
......
rrent" <template>
<div class="basicset-tab4">
<div class="left">
<div class="header">
<h3 class="titel">站点事项列表</h3>
<div class="header-bottom flex aic jcb">
<div class="left-btn"></div>
<div>
<a-space>
<a-select
style="min-width: 120px"
allowClear
v-model="dept"
class="select-department"
placeholder="部门搜索"
>
<a-select-option
v-for="v in deptList"
:key="v.id"
:value="v.deptNumber"
>
{{ v.name }}
</a-select-option>
</a-select>
<a-select
style="width: 120px"
allowClear
v-model="source"
class="select-department"
placeholder="事项来源"
>
<a-select-option :value="0"> 一体化添加 </a-select-option>
<a-select-option :value="1"> 手动添加 </a-select-option>
</a-select>
<a-input-search
v-model="searchVal"
placeholder="请输入事项名称搜索"
enter-button="搜索"
@search="onSearch"
allowClear
/>
</a-space>
</div>
</div>
</div>
<div class="table-content">
<!-- 表格 -->
<a-table
bordered
size="middle"
:loading="loading"
:pagination="{
showTotal: (total) => `共 ${total} 条`,
current: current,
total: total,
pageSize: size,
showSizeChanger: true,
showQuickJumper: true,
pageSizeOptions: pageSizeOptions,
onChange: changePage,
onShowSizeChange: showSizeChange,
}"
:scroll="{ y: 550 }"
:columns="columns"
:data-source="matterSiteData"
:rowKey="(record) => record.id"
>
<template slot="index" slot-scope="text, record, index">
<span>
{{ (current - 1) * size + index + 1 }}
</span>
</template>
<!-- 部门 -->
<template slot="deptName" slot-scope="text">
{{ text.deptName ? text.deptName : "--" }}
</template>
<!-- 事项名称 -->
<template slot="matterName" slot-scope="text">
<a-tooltip placement="topLeft">
<template slot="title">
{{ text.matterName }}
</template>
<div class="matter-name">{{ text.matterName }}</div>
</a-tooltip>
</template>
<!-- 事项来源 -->
<template slot="source" slot-scope="text">
<a-tag v-if="text.source == 0" color="green"> 一体化添加 </a-tag>
<a-tag v-else color="blue"> 手动添加 </a-tag>
</template>
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a-space size="middle">
<div
class="workguide_btn"
:style="{ color: text.hot == 1 ? '#03d76f' : '#1890FF' }"
@click="handleSiteEdit(text, 'hot')"
>
{{ text.hot == 1 ? "取消热门" : "设置热门" }}
</div>
<div
class="workguide_btn"
style="width: 60px"
@click="handleSiteEdit(text, 'display')"
>
{{ text.display == 1 ? "取消展示" : "展示" }}
</div>
</a-space>
</template>
</a-table>
</div>
</div>
</div>
</template>
<script>
import { getSiteMatterList, addSitematter } from "@/services/matter";
import { getDeptList } from "@/services/dept";
import local from "@/utils/local";
const columns = [
{
title: "序号",
width: "50px",
scopedSlots: { customRender: "index" },
},
{
title: "部门",
width: "20%",
scopedSlots: {
customRender: "deptName",
},
},
{
title: "事项名称",
// ellipsis: true,
align: "left",
scopedSlots: {
customRender: "matterName",
},
},
{
title: "事项来源",
scopedSlots: {
customRender: "source",
},
},
{
title: "操作",
width: "200px",
scopedSlots: {
customRender: "action",
},
},
];
export default {
components: {},
data() {
return {
columns,
loading: false,
source: undefined, // 左边来源
selectedRowKeys: [],
matterSiteData: [], // 站点事项
matterDataList: [], //事项列表数据
current: 1,
total: 0,
size: 10,
pageSizeOptions: ["10", "30", "50", "100"],
siteId: local.getLocal("siteId"), // 站点id
deptList: [], // 站点部门
searchVal: "", // 站点事项搜索
dept: undefined, // 部门搜索
};
},
created() {
this.getDeptListData();
this.getMatterSiteData();
},
methods: {
// 获取部门列表
async getDeptListData(obj = {}) {
this.deptLoading = true;
let res = await getDeptList({
siteId: this.siteId,
page: 1,
size: -1,
...obj,
});
this.deptLoading = false;
let { code, data } = res.data;
if (code === 1) {
this.deptList = data.data;
}
},
// 获取站点事项
async getMatterSiteData(search = {}) {
this.loading = true;
let res = await getSiteMatterList({
page: this.current,
size: this.size,
siteId: this.siteId,
source: this.source,
matterName: `%${this.searchVal}%`,
deptCode: this.dept,
...search,
});
let { pageInfo, data } = res.data.data;
this.total = pageInfo.totalResult;
this.matterSiteData = data;
this.loading = false;
},
// 搜索
onSearch() {
this.current = 1;
this.getMatterSiteData();
},
// 左翻页
changePage(num) {
this.current = num;
this.getMatterSiteData();
},
// 左边改变每页显示数量
showSizeChange(current, size) {
this.current = current;
this.size = size;
this.getMatterSiteData();
},
// 设置热门、展示
async handleSiteEdit(row, type) {
let hot;
let display;
if (type === "hot") {
if (row.hot == 1) {
hot = 0;
} else {
hot = 1;
}
} else {
if (row.display == 1) {
display = 0;
} else {
display = 1;
}
}
let obj = {
id: row.id,
};
if (hot != "undefined") obj.hot = hot;
if (display != "undefined") obj.display = display;
let res = await addSitematter(obj);
if (res.data.code == 1) {
this.$message.success("设置成功");
this.getMatterSiteData();
this.$forceUpdate();
}
},
},
};
</script>
<style lang="less" scoped>
/deep/.business {
&::after {
content: "";
width: 1px;
height: 82vh;
position: absolute;
background-color: red;
top: 44px;
left: 50%;
}
}
.basicset-tab4 {
width: 100%;
height: 100%;
padding: 0px 20px;
.header {
margin-bottom: 15px;
}
.workguide_btn {
cursor: pointer;
width: 60px;
color: #1890ff;
}
.matter-name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
</style>
...@@ -76,6 +76,7 @@ const options = { ...@@ -76,6 +76,7 @@ const options = {
"@/pages/basicset/business/components/businessTabs1" "@/pages/basicset/business/components/businessTabs1"
), ),
}, },
// 事项管理
{ {
path: "mattermanage", path: "mattermanage",
meta: { meta: {
...@@ -86,6 +87,7 @@ const options = { ...@@ -86,6 +87,7 @@ const options = {
"@/pages/basicset/business/components/businessTabs2" "@/pages/basicset/business/components/businessTabs2"
), ),
}, },
// 业务事项关联
{ {
path: "businessinmanage", path: "businessinmanage",
meta: { meta: {
...@@ -96,6 +98,17 @@ const options = { ...@@ -96,6 +98,17 @@ const options = {
"@/pages/basicset/business/components/businessTabs3" "@/pages/basicset/business/components/businessTabs3"
), ),
}, },
// 办事指南事项管理
{
path: "workguide",
meta: {
invisible: true,
},
component: () =>
import(
"@/pages/basicset/business/components/businessTabs4"
),
},
], ],
}, },
{ {
......
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