zchl-ui 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/babel.config.json +25 -0
- package/dist/index-5a8c8faf.mjs +28241 -0
- package/dist/index-5a8c8faf.mjs.map +1 -0
- package/dist/index.es-72c53f43.mjs +9470 -0
- package/dist/index.es-72c53f43.mjs.map +1 -0
- package/dist/purify.es-11bf99de.mjs +989 -0
- package/dist/purify.es-11bf99de.mjs.map +1 -0
- package/dist/style.css +1 -0
- package/dist/zchl-ui.es.js +7 -0
- package/dist/zchl-ui.es.js.map +1 -0
- package/dist/zchl-ui.umd.js +2 -0
- package/dist/zchl-ui.umd.js.map +1 -0
- package/package.json +44 -0
- package/packages/SearchForm/index.js +7 -0
- package/packages/SearchForm/src/main.vue +391 -0
- package/packages/ViewForm/index.js +7 -0
- package/packages/ViewForm/src/main.vue +36 -0
- package/packages/assets/images/empty.svg +1 -0
- package/packages/assets/simhei-normal.js +2 -0
- package/packages/assets/style/element-reset.css +333 -0
- package/packages/index.js +232 -0
- package/packages/zTree/css/img/diy/1_close.png +0 -0
- package/packages/zTree/css/img/diy/1_open.png +0 -0
- package/packages/zTree/css/img/diy/2.png +0 -0
- package/packages/zTree/css/img/diy/3.png +0 -0
- package/packages/zTree/css/img/diy/4.png +0 -0
- package/packages/zTree/css/img/diy/5.png +0 -0
- package/packages/zTree/css/img/diy/6.png +0 -0
- package/packages/zTree/css/img/diy/7.png +0 -0
- package/packages/zTree/css/img/diy/8.png +0 -0
- package/packages/zTree/css/img/diy/9.png +0 -0
- package/packages/zTree/css/img/line_conn.gif +0 -0
- package/packages/zTree/css/img/loading.gif +0 -0
- package/packages/zTree/css/img/zTreeStandard.gif +0 -0
- package/packages/zTree/css/img/zTreeStandard.png +0 -0
- package/packages/zTree/css/zTreeStyle.css +349 -0
- package/packages/zTree/js/initTree.js +75 -0
- package/packages/zTree/js/jquery.ztree.core.js +1913 -0
- package/vite.config.js +104 -0
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
.ztree * {
|
|
2
|
+
padding: 0;
|
|
3
|
+
margin: 0;
|
|
4
|
+
font-size: 12px;
|
|
5
|
+
font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.ztree {
|
|
9
|
+
margin: 0;
|
|
10
|
+
padding: 5px;
|
|
11
|
+
color: #333
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ztree li {
|
|
15
|
+
padding: 0;
|
|
16
|
+
margin: 0;
|
|
17
|
+
list-style: none;
|
|
18
|
+
line-height: 14px;
|
|
19
|
+
text-align: left;
|
|
20
|
+
white-space: nowrap;
|
|
21
|
+
outline: 0
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ztree li ul {
|
|
25
|
+
margin: 0;
|
|
26
|
+
padding: 0 0 0 18px
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.ztree li ul.line {
|
|
30
|
+
background: url(./img/line_conn.gif) 0 0 repeat-y;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.ztree li a {
|
|
34
|
+
padding: 1px 3px 0 0;
|
|
35
|
+
margin: 0;
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
height: 17px;
|
|
38
|
+
color: #333;
|
|
39
|
+
background-color: transparent;
|
|
40
|
+
text-decoration: none;
|
|
41
|
+
vertical-align: top;
|
|
42
|
+
display: inline-block
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.ztree li a:hover {
|
|
46
|
+
text-decoration: underline
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.ztree li a.curSelectedNode {
|
|
50
|
+
padding-top: 0px;
|
|
51
|
+
background-color: #FFE6B0;
|
|
52
|
+
color: black;
|
|
53
|
+
height: 16px;
|
|
54
|
+
border: 1px #FFB951 solid;
|
|
55
|
+
opacity: 0.8;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.ztree li a.curSelectedNode_Edit {
|
|
59
|
+
padding-top: 0px;
|
|
60
|
+
background-color: #FFE6B0;
|
|
61
|
+
color: black;
|
|
62
|
+
height: 16px;
|
|
63
|
+
border: 1px #FFB951 solid;
|
|
64
|
+
opacity: 0.8;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.ztree li a.tmpTargetNode_inner {
|
|
68
|
+
padding-top: 0px;
|
|
69
|
+
background-color: #316AC5;
|
|
70
|
+
color: white;
|
|
71
|
+
height: 16px;
|
|
72
|
+
border: 1px #316AC5 solid;
|
|
73
|
+
opacity: 0.8;
|
|
74
|
+
filter: alpha(opacity=80)
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.ztree li a.tmpTargetNode_prev {}
|
|
78
|
+
|
|
79
|
+
.ztree li a.tmpTargetNode_next {}
|
|
80
|
+
|
|
81
|
+
.ztree li a input.rename {
|
|
82
|
+
height: 14px;
|
|
83
|
+
width: 80px;
|
|
84
|
+
padding: 0;
|
|
85
|
+
margin: 0;
|
|
86
|
+
font-size: 12px;
|
|
87
|
+
border: 1px #7EC4CC solid;
|
|
88
|
+
border: 0px
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.ztree li span {
|
|
92
|
+
line-height: 16px;
|
|
93
|
+
margin-right: 2px;
|
|
94
|
+
font-size: 14px
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.ztree li span.button {
|
|
98
|
+
line-height: 0;
|
|
99
|
+
margin: 0;
|
|
100
|
+
width: 16px;
|
|
101
|
+
height: 16px;
|
|
102
|
+
display: inline-block;
|
|
103
|
+
vertical-align: middle;
|
|
104
|
+
border: 0 none;
|
|
105
|
+
cursor: pointer;
|
|
106
|
+
outline: none;
|
|
107
|
+
background-color: transparent;
|
|
108
|
+
background-repeat: no-repeat;
|
|
109
|
+
background-attachment: scroll;
|
|
110
|
+
background-image: url("./img/zTreeStandard.png");
|
|
111
|
+
background-image: url("./img/zTreeStandard.gif")
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.ztree li span.button.chk {
|
|
115
|
+
width: 13px;
|
|
116
|
+
height: 13px;
|
|
117
|
+
margin: 0 3px 0 0;
|
|
118
|
+
cursor: auto
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.ztree li span.button.chk.checkbox_false_full {
|
|
122
|
+
background-position: 0 0
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.ztree li span.button.chk.checkbox_false_full_focus {
|
|
126
|
+
background-position: 0 -14px
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.ztree li span.button.chk.checkbox_false_part {
|
|
130
|
+
background-position: 0 -28px
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.ztree li span.button.chk.checkbox_false_part_focus {
|
|
134
|
+
background-position: 0 -42px
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.ztree li span.button.chk.checkbox_false_disable {
|
|
138
|
+
background-position: 0 -56px
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.ztree li span.button.chk.checkbox_true_full {
|
|
142
|
+
background-position: -14px 0
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.ztree li span.button.chk.checkbox_true_full_focus {
|
|
146
|
+
background-position: -14px -14px
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.ztree li span.button.chk.checkbox_true_part {
|
|
150
|
+
background-position: -14px -28px
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.ztree li span.button.chk.checkbox_true_part_focus {
|
|
154
|
+
background-position: -14px -42px
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.ztree li span.button.chk.checkbox_true_disable {
|
|
158
|
+
background-position: -14px -56px
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.ztree li span.button.chk.radio_false_full {
|
|
162
|
+
background-position: -28px 0
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.ztree li span.button.chk.radio_false_full_focus {
|
|
166
|
+
background-position: -28px -14px
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.ztree li span.button.chk.radio_false_part {
|
|
170
|
+
background-position: -28px -28px
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.ztree li span.button.chk.radio_false_part_focus {
|
|
174
|
+
background-position: -28px -42px
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.ztree li span.button.chk.radio_false_disable {
|
|
178
|
+
background-position: -28px -56px
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.ztree li span.button.chk.radio_true_full {
|
|
182
|
+
background-position: -42px 0
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.ztree li span.button.chk.radio_true_full_focus {
|
|
186
|
+
background-position: -42px -14px
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.ztree li span.button.chk.radio_true_part {
|
|
190
|
+
background-position: -42px -28px
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.ztree li span.button.chk.radio_true_part_focus {
|
|
194
|
+
background-position: -42px -42px
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.ztree li span.button.chk.radio_true_disable {
|
|
198
|
+
background-position: -42px -56px
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.ztree li span.button.switch {
|
|
202
|
+
width: 18px;
|
|
203
|
+
height: 18px
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.ztree li span.button.root_open {
|
|
207
|
+
background-position: -92px -54px
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.ztree li span.button.root_close {
|
|
211
|
+
background-position: -74px -54px
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.ztree li span.button.roots_open {
|
|
215
|
+
background-position: -92px 0
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.ztree li span.button.roots_close {
|
|
219
|
+
background-position: -74px 0
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.ztree li span.button.center_open {
|
|
223
|
+
background-position: -92px -18px
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.ztree li span.button.center_close {
|
|
227
|
+
background-position: -74px -18px
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.ztree li span.button.bottom_open {
|
|
231
|
+
background-position: -92px -36px
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.ztree li span.button.bottom_close {
|
|
235
|
+
background-position: -74px -36px
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.ztree li span.button.noline_open {
|
|
239
|
+
background-position: -92px -72px
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.ztree li span.button.noline_close {
|
|
243
|
+
background-position: -74px -72px
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.ztree li span.button.root_docu {
|
|
247
|
+
background: none;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.ztree li span.button.roots_docu {
|
|
251
|
+
background-position: -56px 0
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.ztree li span.button.center_docu {
|
|
255
|
+
background-position: -56px -18px
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.ztree li span.button.bottom_docu {
|
|
259
|
+
background-position: -56px -36px
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.ztree li span.button.noline_docu {
|
|
263
|
+
background: none;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.ztree li span.button.ico_open {
|
|
267
|
+
margin-right: 2px;
|
|
268
|
+
background-position: -110px -16px;
|
|
269
|
+
vertical-align: top;
|
|
270
|
+
vertical-align: middle
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.ztree li span.button.ico_close {
|
|
274
|
+
margin-right: 2px;
|
|
275
|
+
background-position: -110px 0;
|
|
276
|
+
vertical-align: top;
|
|
277
|
+
vertical-align: middle
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.ztree li span.button.ico_docu {
|
|
281
|
+
margin-right: 2px;
|
|
282
|
+
background-position: -110px -32px;
|
|
283
|
+
vertical-align: top;
|
|
284
|
+
vertical-align: middle
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.ztree li span.button.edit {
|
|
288
|
+
margin-right: 2px;
|
|
289
|
+
background-position: -110px -48px;
|
|
290
|
+
vertical-align: top;
|
|
291
|
+
vertical-align: middle
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.ztree li span.button.remove {
|
|
295
|
+
margin-right: 2px;
|
|
296
|
+
background-position: -110px -64px;
|
|
297
|
+
vertical-align: top;
|
|
298
|
+
vertical-align: middle
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.ztree li span.button.ico_loading {
|
|
302
|
+
margin-right: 2px;
|
|
303
|
+
background: url(./img/loading.gif) no-repeat scroll 0 0 transparent;
|
|
304
|
+
vertical-align: top;
|
|
305
|
+
vertical-align: middle
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
ul.tmpTargetzTree {
|
|
309
|
+
background-color: #FFE6B0;
|
|
310
|
+
opacity: 0.8;
|
|
311
|
+
filter: alpha(opacity=80)
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
span.tmpzTreeMove_arrow {
|
|
315
|
+
width: 16px;
|
|
316
|
+
height: 16px;
|
|
317
|
+
display: inline-block;
|
|
318
|
+
padding: 0;
|
|
319
|
+
margin: 2px 0 0 1px;
|
|
320
|
+
border: 0 none;
|
|
321
|
+
position: absolute;
|
|
322
|
+
background-color: transparent;
|
|
323
|
+
background-repeat: no-repeat;
|
|
324
|
+
background-attachment: scroll;
|
|
325
|
+
background-position: -110px -80px;
|
|
326
|
+
background-image: url("./img/zTreeStandard.png");
|
|
327
|
+
background-image: url("./img/zTreeStandard.gif")
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
ul.ztree.zTreeDragUL {
|
|
331
|
+
margin: 0;
|
|
332
|
+
padding: 0;
|
|
333
|
+
position: absolute;
|
|
334
|
+
width: auto;
|
|
335
|
+
height: auto;
|
|
336
|
+
overflow: hidden;
|
|
337
|
+
background-color: #cfcfcf;
|
|
338
|
+
border: 1px #00B83F dotted;
|
|
339
|
+
opacity: 0.8;
|
|
340
|
+
filter: alpha(opacity=80)
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.zTreeMask {
|
|
344
|
+
z-index: 10000;
|
|
345
|
+
background-color: #cfcfcf;
|
|
346
|
+
opacity: 0.0;
|
|
347
|
+
filter: alpha(opacity=0);
|
|
348
|
+
position: absolute
|
|
349
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
const $ = require('jquery')
|
|
2
|
+
const ztree = require("./jquery.ztree.core.js")
|
|
3
|
+
import "../css/zTreeStyle.css"
|
|
4
|
+
//import ztreeContent from './jquery.ztree.core.js?raw'
|
|
5
|
+
//const ztree = Function('module', 'exports', ztreeContent + '; return module.exports')()
|
|
6
|
+
import axios from 'axios';
|
|
7
|
+
export default function initZtree(domId, callback) {
|
|
8
|
+
// 初始化zTree工具
|
|
9
|
+
ztree($)
|
|
10
|
+
// 设置zTree配置对象
|
|
11
|
+
const setting = {
|
|
12
|
+
view: {
|
|
13
|
+
fontCss: { color: "#555", "font-size": "13px" },
|
|
14
|
+
showIcon: false,
|
|
15
|
+
},
|
|
16
|
+
data: {
|
|
17
|
+
key: {
|
|
18
|
+
id: 'code',
|
|
19
|
+
name: "text",
|
|
20
|
+
children: "nodes"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
callback: {
|
|
24
|
+
onClick: function (a, b, node) {
|
|
25
|
+
//window.treeNode = node
|
|
26
|
+
callback(node);
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
async function organizationTree() {
|
|
31
|
+
const res = await axios({
|
|
32
|
+
method: 'post',
|
|
33
|
+
url: `/qkljg/common/getOrgTree`,
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
if (res.status === 200) {
|
|
37
|
+
if (res.data) {
|
|
38
|
+
const tree = [res.data]
|
|
39
|
+
|
|
40
|
+
function filterTree(tree, targetCode) {
|
|
41
|
+
for (let i = 0; i < tree.length; i++) {
|
|
42
|
+
const node = tree[i];
|
|
43
|
+
|
|
44
|
+
// 找到目标节点
|
|
45
|
+
if (node.code === targetCode) {
|
|
46
|
+
return [node];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// 如果有子节点,递归查找
|
|
50
|
+
if (node.nodes && node.nodes.length > 0) {
|
|
51
|
+
const result = filterTree(node.nodes, targetCode);
|
|
52
|
+
if (result) {
|
|
53
|
+
return result;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
//console.log(filterTree(data))
|
|
61
|
+
//渲染树型
|
|
62
|
+
const treeObj = $.fn.zTree.init($("#" + domId), setting, filterTree(tree, currentOrgCode));
|
|
63
|
+
const nodes = treeObj.getNodes();
|
|
64
|
+
if (nodes.length > 0) {
|
|
65
|
+
treeObj.selectNode(nodes[0]);
|
|
66
|
+
callback(nodes[0])
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
} else {
|
|
70
|
+
//layer.msg(res.msg || "银行树数据获取响应失败");
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
organizationTree()
|
|
74
|
+
}
|
|
75
|
+
|