|
|
@@ -26,17 +26,94 @@
|
|
|
:title="title"
|
|
|
@ok="handleOk"
|
|
|
layout="inline"
|
|
|
- width="50%"
|
|
|
+ width="70%"
|
|
|
:confirm-loading="confirmLoading"
|
|
|
>
|
|
|
- <a-tabs default-active-key="1" :tab-position="'top'">
|
|
|
- <a-tab-pane key="1" tab="代理人">
|
|
|
- <tree :checkable="checkable" @checkTree="checkTree" ref="tree"></tree>
|
|
|
- </a-tab-pane>
|
|
|
- <a-tab-pane key="2" tab="渠道">
|
|
|
- <tree :checkable="checkable" @checkTree="checkTree" ref="tree"></tree>
|
|
|
- </a-tab-pane>
|
|
|
- </a-tabs>
|
|
|
+ <div style="display: flex">
|
|
|
+ <div style="width: 28%">
|
|
|
+ <tree
|
|
|
+ :checkable="checkable"
|
|
|
+ @checkTree="checkTree"
|
|
|
+ ref="tree"
|
|
|
+ @getList="getMessageList"
|
|
|
+ ></tree>
|
|
|
+ </div>
|
|
|
+ <div style="flex: 1">
|
|
|
+ <a-form layout="inline" :model="formState" class="users">
|
|
|
+ <a-form-item label="姓名" :labelCol="{ span: 5 }" :colon="false">
|
|
|
+ <a-input
|
|
|
+ placeholder="请输入姓名"
|
|
|
+ v-model="formState.userName"
|
|
|
+ allowClear
|
|
|
+ ></a-input>
|
|
|
+ </a-form-item>
|
|
|
+ <a-form-item label="工号" :labelCol="{ span: 5 }" :colon="false">
|
|
|
+ <a-input
|
|
|
+ placeholder="请输入工号"
|
|
|
+ v-model="formState.userId"
|
|
|
+ allowClear
|
|
|
+ ></a-input>
|
|
|
+ </a-form-item>
|
|
|
+
|
|
|
+ <a-form-item label="管理员" :labelCol="{ span: 5 }" :colon="false">
|
|
|
+ <a-select
|
|
|
+ style="width: 200px"
|
|
|
+ placeholder="请选择"
|
|
|
+ v-model="formState.leaderId"
|
|
|
+ allowClear
|
|
|
+ show-search
|
|
|
+ :filter-option="filterOption"
|
|
|
+ >
|
|
|
+ <a-select-option
|
|
|
+ v-for="item in manageList"
|
|
|
+ :key="item.id"
|
|
|
+ :value="item.id"
|
|
|
+ >
|
|
|
+ {{ item.name }}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ <a-form-item
|
|
|
+ label=" "
|
|
|
+ :labelCol="{ span: 5 }"
|
|
|
+ :colon="false"
|
|
|
+ class="form-item-search"
|
|
|
+ >
|
|
|
+ <a-button type="primary" @click="searchChannel()">查询</a-button>
|
|
|
+ </a-form-item>
|
|
|
+ </a-form>
|
|
|
+ <a-tabs
|
|
|
+ default-active-key="1"
|
|
|
+ :tab-position="'top'"
|
|
|
+ style="margin-left: 15px; flex: 1"
|
|
|
+ @change="tabChange"
|
|
|
+ >
|
|
|
+ <a-tab-pane key="1" tab="代理人">
|
|
|
+ <standard-table
|
|
|
+ bordered
|
|
|
+ :columns="columns1"
|
|
|
+ :dataSource="perTable"
|
|
|
+ :pagination="perPagination"
|
|
|
+ @change="onChangePer"
|
|
|
+ :loading="perLoading"
|
|
|
+ >
|
|
|
+ </standard-table>
|
|
|
+ </a-tab-pane>
|
|
|
+ <a-tab-pane key="2" tab="渠道">
|
|
|
+ <standard-table
|
|
|
+ bordered
|
|
|
+ :columns="columns1"
|
|
|
+ :dataSource="perTable"
|
|
|
+ :pagination="perPagination"
|
|
|
+ @change="onChangePer"
|
|
|
+ :loading="perLoading"
|
|
|
+ >
|
|
|
+ </standard-table>
|
|
|
+ </a-tab-pane>
|
|
|
+ </a-tabs>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
<!-- <a-form :layout="formLayout"> -->
|
|
|
<!-- <tree :checkable="checkable" @checkTree="checkTree" ref="tree"></tree> -->
|
|
|
<!-- </a-form> -->
|
|
|
@@ -73,14 +150,40 @@ const columns = [
|
|
|
scopedSlots: { customRender: "operation" },
|
|
|
},
|
|
|
];
|
|
|
+const columns1 = [
|
|
|
+ {
|
|
|
+ title: "员工工号",
|
|
|
+ dataIndex: "id",
|
|
|
+ //
|
|
|
+ },
|
|
|
|
|
|
+ {
|
|
|
+ title: "姓名",
|
|
|
+ dataIndex: "name",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "管理人",
|
|
|
+ dataIndex: "leaderName",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "业务来源",
|
|
|
+ dataIndex: "managementSource",
|
|
|
+ },
|
|
|
+];
|
|
|
+import manageminxin from "../../minins/manageMixin";
|
|
|
export default {
|
|
|
components: {
|
|
|
StandardTable,
|
|
|
tree,
|
|
|
},
|
|
|
+ mixins: [manageminxin],
|
|
|
data() {
|
|
|
return {
|
|
|
+ formState: {
|
|
|
+ userId: undefined,
|
|
|
+ userName: undefined,
|
|
|
+ leaderId: undefined,
|
|
|
+ },
|
|
|
visible: false,
|
|
|
confirmLoading: false,
|
|
|
title: "",
|
|
|
@@ -111,7 +214,21 @@ export default {
|
|
|
hideOnSinglePage: false,
|
|
|
showQuickJumper: true, //
|
|
|
showSizeChanger: true, //是否可以改变pagesize
|
|
|
+ showTotal: (total) => `共 ${total} 条数据`,
|
|
|
+ },
|
|
|
+ columns1,
|
|
|
+ perPagination: {
|
|
|
+ current: 1,
|
|
|
+ defaultPageSize: 10,
|
|
|
+ total: 0,
|
|
|
+ pagesize0ptions: ["10", "20", "30", "50", "100"],
|
|
|
+ hideOnSinglePage: false,
|
|
|
+ showQuickJumper: true, //
|
|
|
+ showSizeChanger: true, //是否可以改变pagesize
|
|
|
+ showTotal: (total) => `共 ${total} 条数据`,
|
|
|
},
|
|
|
+ perTable: [],
|
|
|
+ perLoading: false,
|
|
|
formItemLayout: {
|
|
|
labelCol: {
|
|
|
xs: { span: 5 },
|
|
|
@@ -140,6 +257,8 @@ export default {
|
|
|
checkList: [],
|
|
|
defaultCheckList: [],
|
|
|
searchName: "",
|
|
|
+ tabs: 1,
|
|
|
+ deptId: "",
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
@@ -149,11 +268,56 @@ export default {
|
|
|
},
|
|
|
mounted() {},
|
|
|
methods: {
|
|
|
+ filterOption(input, option) {
|
|
|
+ return (
|
|
|
+ option.componentOptions.children[0].text
|
|
|
+ .toLowerCase()
|
|
|
+ .indexOf(input.toLowerCase()) >= 0
|
|
|
+ );
|
|
|
+ },
|
|
|
searchList() {
|
|
|
this.pagination.current = 1;
|
|
|
this.pagination.defaultPageSize = 10;
|
|
|
+
|
|
|
this.getList();
|
|
|
},
|
|
|
+ tabChange(key) {
|
|
|
+ // console.log(key);
|
|
|
+ this.tabs = key;
|
|
|
+ this.perPagination.current = 1;
|
|
|
+ this.perPagination.defaultPageSize = 10;
|
|
|
+ this.getChannelList(this.deptId);
|
|
|
+ },
|
|
|
+ searchChannel() {
|
|
|
+ this.perPagination.current = 1;
|
|
|
+ this.perPagination.defaultPageSize = 10;
|
|
|
+ this.getChannelList(this.deptId);
|
|
|
+ },
|
|
|
+ getMessageList(id) {
|
|
|
+ this.deptId = id;
|
|
|
+ this.perPagination.current = 1;
|
|
|
+ this.perPagination.defaultPageSize = 10;
|
|
|
+ this.getChannelList(id);
|
|
|
+ },
|
|
|
+ getChannelList(id) {
|
|
|
+ this.perLoading = true;
|
|
|
+ this.$API.sysManage
|
|
|
+ .getAgentOrChannel({
|
|
|
+ deptId: id,
|
|
|
+ type: this.tabs,
|
|
|
+ pageNum: this.perPagination.current,
|
|
|
+ pageSize: this.perPagination.defaultPageSize,
|
|
|
+ ...this.formState,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ console.log(res);
|
|
|
+ if (res.data.code === 200) {
|
|
|
+ this.perLoading = false;
|
|
|
+ this.perTable = [...res.data.data.content];
|
|
|
+ this.perPagination.total = res.data.data.totalSize;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
checkTree(list) {
|
|
|
this.checkList = [...list];
|
|
|
// console.log(list);
|
|
|
@@ -171,11 +335,21 @@ export default {
|
|
|
this.title = "数据权限配置";
|
|
|
this.visible = true;
|
|
|
this.dataForm = { ...item.record };
|
|
|
- console.log(item.record);
|
|
|
+
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.tree.setExpandKys(item.record);
|
|
|
// this.defaultCheckList = [""];
|
|
|
});
|
|
|
+ this.perTable = [];
|
|
|
+ this.perPagination.current = 1;
|
|
|
+ this.perPagination.defaultPageSize = 10;
|
|
|
+ this.deptId = "";
|
|
|
+ this.formState = {
|
|
|
+ userId: undefined,
|
|
|
+ userName: undefined,
|
|
|
+ leaderId: undefined,
|
|
|
+ };
|
|
|
+
|
|
|
// this.setExpandKys(item.record);
|
|
|
},
|
|
|
setExpandKys() {},
|
|
|
@@ -189,6 +363,14 @@ export default {
|
|
|
};
|
|
|
this.getList();
|
|
|
},
|
|
|
+ onChangePer(pagination) {
|
|
|
+ this.perPagination = {
|
|
|
+ current: pagination.current,
|
|
|
+ defaultPageSize: pagination.pageSize,
|
|
|
+ total: pagination.total,
|
|
|
+ };
|
|
|
+ this.getMessageList(this.deptId);
|
|
|
+ },
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
this.$API.sysManage
|
|
|
@@ -237,6 +419,9 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
<style lang='less' scoped>
|
|
|
+.ant-tabs-tabpane {
|
|
|
+ display: flex;
|
|
|
+}
|
|
|
.menu {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|