Commit 99c9a740 authored by “yiyousong”'s avatar “yiyousong”

feat:事项管理添加部门搜索

parent d0c68fc0
......@@ -11,14 +11,34 @@
<a-space>
<a-select
style="width: 120px"
allowClear
v-model="leftSource"
class="select-department"
placeholder="事项来源"
>
<a-select-option value=""> 全部来源 </a-select-option>
<a-select-option :value="0"> 一体化添加 </a-select-option>
<a-select-option :value="1"> 手动添加 </a-select-option>
</a-select>
<a-select
showSearch
style="min-width: 120px"
v-model="leftDept"
class="select-department"
placeholder="部门搜索"
optionFilterProp="label"
>
<a-select-option value="" label="全部部门">
全部部门
</a-select-option>
<a-select-option
v-for="v in deptList"
:key="v.id"
:value="v.deptNumber"
:label="v.name"
>
{{ v.name }}
</a-select-option>
</a-select>
<a-input-search
v-model="searchLeftVal"
placeholder="请输入事项名称搜索"
......@@ -122,14 +142,34 @@
<a-space>
<a-select
style="width: 120px"
allowClear
v-model="rightSource"
class="select-department"
placeholder="事项来源"
>
<a-select-option value=""> 全部来源 </a-select-option>
<a-select-option :value="0"> 一体化事项 </a-select-option>
<a-select-option :value="1"> 自建事项 </a-select-option>
</a-select>
<a-select
showSearch
style="min-width: 120px"
v-model="rightDept"
class="select-department"
placeholder="部门搜索"
optionFilterProp="label"
>
<a-select-option value="" label="全部部门">
全部部门
</a-select-option>
<a-select-option
v-for="v in deptList"
:key="v.id"
:value="v.deptNumber"
:label="v.name"
>
{{ v.name }}
</a-select-option>
</a-select>
<a-input-search
v-model="searchRightVal"
placeholder="请输入事项名称搜索"
......@@ -229,9 +269,9 @@ import {
delMatter,
} from "@/services/matter";
import { getBusinessMatterList, delBusinessMatter } from "@/services/business";
import { getDeptList } from "@/services/dept";
import EditSiteMatter from "../group/EditSiteMatter.vue";
import { pageSizeOptions } from "@/config/pageConfig.js";
// import { getDeptList } from "@/services/dept";
import local from "@/utils/local";
import { mapMutations } from "vuex";
const leftColumns = [
......@@ -310,8 +350,10 @@ export default {
rightColumns,
leftLoading: false,
rightLoading: false,
leftSource: undefined, // 左边来源
rightSource: undefined, // 右边来源
leftSource: "", // 左边来源
leftDept: "", // 左边部门搜索
rightDept: "", // 右边部门搜索
rightSource: "", // 右边来源
selectedRowKeys: [],
matterSiteData: [], // 站点事项
matterDataList: [], //事项列表数据
......@@ -336,12 +378,28 @@ export default {
};
},
created() {
this.getDeptListData();
this.getMatterSiteData();
this.getMatterListData();
},
methods: {
...mapMutations("site", ["SET_matterDict"]),
// 获取部门列表
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.leftLoading = true;
......@@ -351,6 +409,7 @@ export default {
siteId: this.siteId,
source: this.leftSource,
matterName: `%${this.searchLeftVal}%`,
deptCode: this.leftDept,
...search,
});
let { pageInfo, data } = res.data.data;
......@@ -371,6 +430,7 @@ export default {
size: this.rightSize,
matterName: this.searchRightVal,
source: this.rightSource,
deptCode: this.rightDept,
...search,
});
if (res.data.code === 1) {
......
......@@ -49,11 +49,11 @@
<template slot="action" slot-scope="text">
<a-tooltip>
<template slot="title"> 解除查看 </template>
<soan
<span
href="javascript:;"
class="delete pointer"
@click="handleisUnbound(text)"
>解除</soan
>解除</span
>
</a-tooltip>
</template>
......@@ -69,13 +69,35 @@
<a-button type="primary" @click="handleAddAll"> 批量关联 </a-button>
</div>
<div>
<a-input-search
v-model="rightSearchVal"
placeholder="请输入事项名称搜索"
enter-button="搜索"
@search="onSearchRight"
allowClear
/>
<a-space>
<a-select
showSearch
style="min-width: 120px"
v-model="deptSearch"
class="select-department"
placeholder="部门搜索"
optionFilterProp="label"
>
<a-select-option value="" label="全部部门">
全部部门
</a-select-option>
<a-select-option
v-for="v in deptList"
:key="v.id"
:value="v.deptNumber"
:label="v.name"
>
{{ v.name }}
</a-select-option>
</a-select>
<a-input-search
v-model="rightSearchVal"
placeholder="请输入事项名称搜索"
enter-button="搜索"
@search="onSearchRight"
allowClear
/>
</a-space>
</div>
</div>
</div>
......@@ -159,7 +181,7 @@
<a-select
style="width: 85%"
show-search
:filter-option="filterOption"
optionFilterProp="label"
allowClear
placeholder="请选择业务"
:showArrow="false"
......@@ -170,6 +192,7 @@
v-for="v in SiteBusinessData"
:key="v.id"
:value="v.businessId"
:label="v.businessName"
>
{{ v.businessName }}
</a-select-option>
......@@ -257,6 +280,7 @@
<script>
import { getSiteMatterList } from "@/services/matter";
import { pageSizeOptions } from "@/config/pageConfig.js";
import { getDeptList } from "@/services/dept";
import {
getSiteBusinessList,
// addBusinessMatter,
......@@ -266,7 +290,6 @@ import {
addBatchSave,
// getMatterlistData,
} from "@/services/business";
// import { getDeptList } from "@/services/dept";
import local from "@/utils/local";
const leftColumns = [
{
......@@ -329,6 +352,7 @@ export default {
Leftloading: false,
rightloading: false,
leftSearchVal: "", // 左边搜索
deptSearch: "", // 右边
rightSearchVal: "", // 右边搜索
SiteBusinessData: [], // 站点业务
SiteMatterData: [], //站点事项
......@@ -347,7 +371,7 @@ export default {
pageSizeOptions,
siteId: local.getLocal("siteId"), // 站点id
matterIds: "", // 业务id
// deptList: [], // 站点部门
deptList: [], // 站点部门
rightSearch: "", // 事项搜索
businessMatterData: [], // 业务关联事项列表数据
unboundBusinessData: {}, // 解除-业务数据
......@@ -369,6 +393,7 @@ export default {
};
},
created() {
this.getDeptListData();
this.getBusinessMatterData();
this.getMatterlistData();
this.getSiteBusinessData();
......@@ -376,6 +401,21 @@ export default {
},
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 getBusinessMatterData(search = {}) {
this.Leftloading = true;
......@@ -438,6 +478,7 @@ export default {
size: this.rightSize,
matterName: `%${this.rightSearchVal}%`,
siteId: this.siteId,
deptCode: this.leftDept,
...search,
});
let { pageInfo, data } = res.data.data;
......@@ -659,8 +700,8 @@ export default {
},
// 关闭关联对话框
handleclose() {
this.selectedRowKeys = [];
this.allCorrelationData = [];
// this.selectedRowKeys = [];
// this.allCorrelationData = [];
this.$refs.formData.resetFields();
this.isCorrelation = false;
},
......
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