1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
| <template>
| <div class="high-view-scope">
| <el-dialog
| title="查询范围-高级"
| :visible.sync="editConfig.visible"
| :width="dialogWidth"
| :before-close="handleClose"
| >
| <div class="view-sel-bg">
| <div class="title">查询选择</div>
| <el-input v-model="searchInput" size="mini" placeholder="请输入要查找的成员"></el-input>
| <el-checkbox v-model="resignMember">显示离职成员</el-checkbox>
| <el-checkbox v-model="defaultCollapse">子部门默认收起</el-checkbox>
| </div>
| <div class="view-tree">
| <el-tree
| :data="data"
| show-checkbox
| default-expand-all
| node-key="id"
| ref="tree"
| highlight-current
| :props="defaultProps"
| >
| </el-tree>
| </div>
| <div slot="footer" class="dialog-footer">
| <el-button type="primary" size="small" @click="editConfig.visible = false">确认</el-button>
| <el-button size="small" @click="editConfig.visible = false">取消</el-button>
| </div>
| </el-dialog>
| </div>
| </template>
|
| <script>
| export default {
| name: "HighViewScopeDialog",
| props: {
| editCommonConfig: {
| type: Object,
| default: () => {
| return {
| visible: false,
| infomation: {}
| }
| }
| }
| },
| components: {},
| computed: {},
| data() {
| return {
| dialogWidth: "35%",
| editConfig: this.editCommonConfig,
| data: [
| {
| id: 1,
| label: "上海灵当信息科技有限公司",
| children: [
| {
| id: 1 - 1,
| label: "销售部",
| children: [
| {
| id: 1 - 1 - 1,
| label: "Mia"
| },
| {
| id: 1 - 1 - 2,
| label: "系统管理员"
| },
| {
| id: 1 - 1 - 3,
| label: "销售"
| },
| {
| id: 1 - 1 - 4,
| label: "销售总监"
| },
| {
| id: 1 - 1 - 5,
| label: "销售一部",
| children: []
| },
| {
| id: 1 - 1 - 6,
| label: "销售二部",
| children: []
| }
| ]
| },
| {
| id: 2 - 1,
| label: "管理层",
| children: [
| {
| id: 2 - 1 - 1,
| label: "BOSS"
| },
| {
| id: 2 - 1 - 2,
| label: "系统管理员"
| }
| ]
| },
| {
| id: 3 - 1,
| label: "财务部",
| children: []
| },
| {
| id: 4 - 1,
| label: "市场部",
| children: []
| }
| ]
| }
| ],
| defaultProps: {
| children: "children",
| label: "label"
| },
| searchInput: "",
| resignMember: false,
| defaultCollapse: false
| }
| },
| created() {},
| methods: {
| handleClose() {
| this.editConfig.visible = false
| }
| }
| }
| </script>
|
| <!-- Add "scoped" attribute to limit CSS to this component only -->
| <style lang="scss" scoped>
| .high-view-scope {
| .view-sel-bg {
| display: flex;
| align-items: center;
| margin: 20px 20px 0;
| .el-input {
| width: 240px;
| margin-left: 5px;
| }
| .el-checkbox {
| margin-left: 5px;
| margin-right: 0;
| }
| }
| .view-tree {
| margin: 10px 20px 20px;
| }
| .dialog-footer {
| background-color: #f5f5f5;
| height: 55px;
| line-height: 55px;
| }
| }
| </style>
|
|