w-web-perm 1.0.25 → 1.0.26
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/dist/css/{app.f22995d1.css → app.d0e43dcc.css} +1 -1
- package/dist/index.tmp +9 -1
- package/dist/js/app-legacy.b0850281.js +2 -0
- package/dist/js/app-legacy.b0850281.js.map +1 -0
- package/dist/js/app.db01fef5.js +2 -0
- package/dist/js/app.db01fef5.js.map +1 -0
- package/dist/js/chunk-vendors-legacy.0432e7bc.js +13 -0
- package/dist/js/chunk-vendors-legacy.0432e7bc.js.map +1 -0
- package/dist/js/chunk-vendors.0432e7bc.js +13 -0
- package/dist/js/chunk-vendors.0432e7bc.js.map +1 -0
- package/dist/w-web-perm.umd.js +2 -2
- package/dist/w-web-perm.umd.js.map +1 -1
- package/docs/WWebPerm.html +1 -1
- package/docs/WWebPerm.mjs.html +30 -2
- package/docs/index.html +1 -1
- package/package.json +5 -5
- package/public/index.html +8 -0
- package/server/WWebPerm.mjs +29 -1
- package/src/App.vue +6 -1
- package/src/components/Layout.vue +0 -11
- package/src/components/LayoutContent.vue +22 -22
- package/src/components/LayoutContentGrups.vue +245 -65
- package/src/components/LayoutContentPemis.vue +245 -68
- package/src/components/LayoutContentTargets.vue +225 -55
- package/src/components/LayoutContentUsers.vue +250 -68
- package/src/components/VeCgrups.vue +27 -34
- package/src/components/VeCpemis.vue +27 -34
- package/src/components/VeCrules.vue +25 -31
- package/src/components/VeGrupBlngUsers.vue +30 -18
- package/src/components/VePemiBlngGrups.vue +30 -18
- package/src/schema/tables/pemis.mjs +1 -1
- package/src/store/mutations.mjs +64 -9
- package/srv.mjs +9 -1
- package/tableTags-web-perm.json +1 -1
- package/dist/js/app-legacy.67f2c0dc.js +0 -2
- package/dist/js/app-legacy.67f2c0dc.js.map +0 -1
- package/dist/js/app.67f2c0dc.js +0 -2
- package/dist/js/app.67f2c0dc.js.map +0 -1
- package/dist/js/chunk-vendors-legacy.d89048a8.js +0 -13
- package/dist/js/chunk-vendors-legacy.d89048a8.js.map +0 -1
- package/dist/js/chunk-vendors.d89048a8.js +0 -13
- package/dist/js/chunk-vendors.d89048a8.js.map +0 -1
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
style="height:100%;"
|
|
4
4
|
v-domresize
|
|
5
5
|
@domresize="resizePanel"
|
|
6
|
-
:
|
|
6
|
+
:changeParams="changeParams"
|
|
7
7
|
>
|
|
8
8
|
|
|
9
9
|
<div
|
|
10
|
-
style="
|
|
10
|
+
style="_border-bottom:1px solid #ddd; background:#fff;"
|
|
11
11
|
v-domresize
|
|
12
12
|
@domresize="resizeHead"
|
|
13
13
|
>
|
|
@@ -19,20 +19,96 @@
|
|
|
19
19
|
<WIcon
|
|
20
20
|
:icon="mdiGamepadCircle"
|
|
21
21
|
:color="'#000'"
|
|
22
|
-
:size="
|
|
22
|
+
:size="32"
|
|
23
23
|
></WIcon>
|
|
24
24
|
|
|
25
|
-
<div style="padding-left:
|
|
26
|
-
|
|
25
|
+
<div style="padding-left:12px;">
|
|
26
|
+
|
|
27
|
+
<div style="font-size:1.4rem; color:#000;">
|
|
28
|
+
{{$t('managementTargets')}}
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<div style="padding-top:2px; font-size:0.8rem; color:#666;">
|
|
32
|
+
{{$t('managementTargetsMsg')}}
|
|
33
|
+
</div>
|
|
34
|
+
|
|
27
35
|
</div>
|
|
28
36
|
|
|
29
37
|
</div>
|
|
30
38
|
</div>
|
|
31
39
|
|
|
32
40
|
<!-- 功能區 -->
|
|
33
|
-
<div
|
|
41
|
+
<div
|
|
42
|
+
style="padding:5px; border-top:1px solid #ddd; display:flex; align-items:center;"
|
|
43
|
+
_v-if="showIsEditable || isEditable"
|
|
44
|
+
>
|
|
45
|
+
|
|
46
|
+
<template v-if="showIsEditable">
|
|
47
|
+
|
|
48
|
+
<div style="padding:6px 0px 4px 4px;">
|
|
49
|
+
<WSwitch
|
|
50
|
+
v-model="isEditable"
|
|
51
|
+
:text="$t('modeEdit')"
|
|
52
|
+
></WSwitch>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<div style="padding-left:10px;"></div>
|
|
56
|
+
|
|
57
|
+
</template>
|
|
34
58
|
|
|
35
|
-
<template>
|
|
59
|
+
<template v-if="true">
|
|
60
|
+
|
|
61
|
+
<WPopup
|
|
62
|
+
:isolated="true"
|
|
63
|
+
_show=""
|
|
64
|
+
_hide=""
|
|
65
|
+
>
|
|
66
|
+
<template v-slot:trigger>
|
|
67
|
+
<WButtonCircle
|
|
68
|
+
:paddingStyle="{v:6,h:6}"
|
|
69
|
+
:tooltip="$t('showTabCols')"
|
|
70
|
+
:icon="mdiTableHeadersEye"
|
|
71
|
+
:backgroundColor="'#fff'"
|
|
72
|
+
:backgroundColorHover="'#f2f2f2'"
|
|
73
|
+
_textColor="'#eee'"
|
|
74
|
+
_textColorHover="'#fff'"
|
|
75
|
+
:iconColor="'#444'"
|
|
76
|
+
:iconColorHover="'#222'"
|
|
77
|
+
:shadow="false"
|
|
78
|
+
_click=""
|
|
79
|
+
></WButtonCircle>
|
|
80
|
+
</template>
|
|
81
|
+
|
|
82
|
+
<template v-slot:content>
|
|
83
|
+
<div style="padding:10px 0px 10px 0px;">
|
|
84
|
+
|
|
85
|
+
<div style="padding:7px 10px; font-size:0.85rem; color:#222; background:#f2f2f2;">
|
|
86
|
+
{{$t('showTabCols')}}
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
<div style="padding:7px 9px 0px 7px;">
|
|
90
|
+
<WInputCheckbox
|
|
91
|
+
:items="tabKeysPick"
|
|
92
|
+
v-model="tabKeysShow"
|
|
93
|
+
@input="toggleTabKeys"
|
|
94
|
+
>
|
|
95
|
+
<template v-slot="props">
|
|
96
|
+
<div style="padding-left:3px; display:flex; align-items:center; font-size:0.85rem; height:24px; cursor:pointer;">
|
|
97
|
+
{{getHead(props.item.data)}}
|
|
98
|
+
</div>
|
|
99
|
+
</template>
|
|
100
|
+
</WInputCheckbox>
|
|
101
|
+
</div>
|
|
102
|
+
|
|
103
|
+
</div>
|
|
104
|
+
</template>
|
|
105
|
+
</WPopup>
|
|
106
|
+
|
|
107
|
+
<div style="padding-left:4px;"></div>
|
|
108
|
+
|
|
109
|
+
</template>
|
|
110
|
+
|
|
111
|
+
<template v-if="isEditable">
|
|
36
112
|
|
|
37
113
|
<WButtonCircle
|
|
38
114
|
:paddingStyle="{v:6,h:6}"
|
|
@@ -48,11 +124,11 @@
|
|
|
48
124
|
@click="addItem"
|
|
49
125
|
></WButtonCircle>
|
|
50
126
|
|
|
51
|
-
<div style="padding-left:
|
|
127
|
+
<div style="padding-left:4px;"></div>
|
|
52
128
|
|
|
53
129
|
</template>
|
|
54
130
|
|
|
55
|
-
<template v-if="hasItemCheckOne">
|
|
131
|
+
<template v-if="isEditable && hasItemCheckOne">
|
|
56
132
|
|
|
57
133
|
<WButtonCircle
|
|
58
134
|
:paddingStyle="{v:6,h:6}"
|
|
@@ -68,11 +144,11 @@
|
|
|
68
144
|
@click="copyItem"
|
|
69
145
|
></WButtonCircle>
|
|
70
146
|
|
|
71
|
-
<div style="padding-left:
|
|
147
|
+
<div style="padding-left:4px;"></div>
|
|
72
148
|
|
|
73
149
|
</template>
|
|
74
150
|
|
|
75
|
-
<template v-if="hasItemsCheck">
|
|
151
|
+
<template v-if="isEditable && hasItemsCheck">
|
|
76
152
|
|
|
77
153
|
<WButtonCircle
|
|
78
154
|
:paddingStyle="{v:6,h:6}"
|
|
@@ -88,11 +164,11 @@
|
|
|
88
164
|
@click="deleteItemsCheck"
|
|
89
165
|
></WButtonCircle>
|
|
90
166
|
|
|
91
|
-
<div style="padding-left:
|
|
167
|
+
<div style="padding-left:4px;"></div>
|
|
92
168
|
|
|
93
169
|
</template>
|
|
94
170
|
|
|
95
|
-
<template v-if="isModified">
|
|
171
|
+
<template v-if="isEditable && isModified">
|
|
96
172
|
|
|
97
173
|
<WButtonCircle
|
|
98
174
|
:paddingStyle="{v:6,h:6}"
|
|
@@ -108,7 +184,7 @@
|
|
|
108
184
|
@click="saveTargets"
|
|
109
185
|
></WButtonCircle>
|
|
110
186
|
|
|
111
|
-
<div style="padding-left:
|
|
187
|
+
<div style="padding-left:4px;"></div>
|
|
112
188
|
|
|
113
189
|
</template>
|
|
114
190
|
|
|
@@ -140,7 +216,7 @@
|
|
|
140
216
|
</template>
|
|
141
217
|
|
|
142
218
|
<script>
|
|
143
|
-
import { mdiGamepadCircle, mdiStackOverflow, mdiAccountGroupOutline, mdiBallotRecountOutline, mdiCloudUploadOutline, mdiTrashCanOutline, mdiPlus, mdiPencilOutline, mdiContentCopy } from '@mdi/js/mdi.js'
|
|
219
|
+
import { mdiGamepadCircle, mdiStackOverflow, mdiAccountGroupOutline, mdiBallotRecountOutline, mdiCloudUploadOutline, mdiTrashCanOutline, mdiTableHeadersEye, mdiPlus, mdiPencilOutline, mdiContentCopy } from '@mdi/js/mdi.js'
|
|
144
220
|
import get from 'lodash-es/get.js'
|
|
145
221
|
import each from 'lodash-es/each.js'
|
|
146
222
|
import size from 'lodash-es/size.js'
|
|
@@ -151,15 +227,22 @@ import haskey from 'wsemi/src/haskey.mjs'
|
|
|
151
227
|
import isestr from 'wsemi/src/isestr.mjs'
|
|
152
228
|
import iseobj from 'wsemi/src/iseobj.mjs'
|
|
153
229
|
import cstr from 'wsemi/src/cstr.mjs'
|
|
230
|
+
import arrPull from 'wsemi/src/arrPull.mjs'
|
|
154
231
|
import WIcon from 'w-component-vue/src/components/WIcon.vue'
|
|
232
|
+
import WSwitch from 'w-component-vue/src/components/WSwitch.vue'
|
|
155
233
|
import WButtonCircle from 'w-component-vue/src/components/WButtonCircle.vue'
|
|
234
|
+
import WPopup from 'w-component-vue/src/components/WPopup.vue'
|
|
235
|
+
import WInputCheckbox from 'w-component-vue/src/components/WInputCheckbox.vue'
|
|
156
236
|
import WAggridVueDyn from 'w-component-vue/src/components/WAggridVueDyn.vue'
|
|
157
237
|
|
|
158
238
|
|
|
159
239
|
export default {
|
|
160
240
|
components: {
|
|
161
241
|
WIcon,
|
|
242
|
+
WSwitch,
|
|
162
243
|
WButtonCircle,
|
|
244
|
+
WPopup,
|
|
245
|
+
WInputCheckbox,
|
|
163
246
|
WAggridVueDyn,
|
|
164
247
|
},
|
|
165
248
|
props: {
|
|
@@ -176,6 +259,7 @@ export default {
|
|
|
176
259
|
mdiBallotRecountOutline,
|
|
177
260
|
mdiCloudUploadOutline,
|
|
178
261
|
mdiTrashCanOutline,
|
|
262
|
+
mdiTableHeadersEye,
|
|
179
263
|
mdiPlus,
|
|
180
264
|
mdiPencilOutline,
|
|
181
265
|
mdiContentCopy,
|
|
@@ -185,8 +269,39 @@ export default {
|
|
|
185
269
|
headHeight: 100,
|
|
186
270
|
|
|
187
271
|
firstLoading: true,
|
|
272
|
+
firstSetting: true,
|
|
273
|
+
showIsEditable: false,
|
|
274
|
+
isEditable: false,
|
|
188
275
|
isModified: false,
|
|
189
276
|
|
|
277
|
+
tabKeys: [
|
|
278
|
+
'id',
|
|
279
|
+
'description',
|
|
280
|
+
'from',
|
|
281
|
+
'userId',
|
|
282
|
+
'timeCreate',
|
|
283
|
+
'userIdUpdate',
|
|
284
|
+
'timeUpdate',
|
|
285
|
+
],
|
|
286
|
+
tabKeysPick: [
|
|
287
|
+
'id',
|
|
288
|
+
'description',
|
|
289
|
+
'from',
|
|
290
|
+
'userId',
|
|
291
|
+
'timeCreate',
|
|
292
|
+
'userIdUpdate',
|
|
293
|
+
'timeUpdate',
|
|
294
|
+
],
|
|
295
|
+
tabKeysShow: [
|
|
296
|
+
'id',
|
|
297
|
+
'description',
|
|
298
|
+
// 'from',
|
|
299
|
+
// 'userId',
|
|
300
|
+
// 'timeCreate',
|
|
301
|
+
// 'userIdUpdate',
|
|
302
|
+
// 'timeUpdate',
|
|
303
|
+
],
|
|
304
|
+
|
|
190
305
|
items: [],
|
|
191
306
|
itemsCheck: [],
|
|
192
307
|
opt: null,
|
|
@@ -196,11 +311,26 @@ export default {
|
|
|
196
311
|
mounted: function() {
|
|
197
312
|
// console.log('mounted')
|
|
198
313
|
|
|
199
|
-
|
|
314
|
+
let vo = this
|
|
315
|
+
|
|
316
|
+
//firstSetting
|
|
317
|
+
if (vo.firstSetting) {
|
|
318
|
+
// console.log('webInfor', vo.webInfor)
|
|
319
|
+
let showModeEditTargets = get(vo, 'webInfor.showModeEditTargets', '')
|
|
320
|
+
vo.showIsEditable = showModeEditTargets === 'y'
|
|
321
|
+
let modeEditTargets = get(vo, 'webInfor.modeEditTargets', '')
|
|
322
|
+
vo.isEditable = modeEditTargets === 'y'
|
|
323
|
+
vo.firstSetting = false
|
|
324
|
+
}
|
|
200
325
|
|
|
201
326
|
},
|
|
202
327
|
computed: {
|
|
203
328
|
|
|
329
|
+
webInfor: function() {
|
|
330
|
+
let wi = get(this, `$store.state.webInfor`)
|
|
331
|
+
return wi
|
|
332
|
+
},
|
|
333
|
+
|
|
204
334
|
targets: function() {
|
|
205
335
|
let rs = get(this, `$store.state.targets`)
|
|
206
336
|
rs = sortBy(rs, 'order')
|
|
@@ -225,24 +355,22 @@ export default {
|
|
|
225
355
|
return rs
|
|
226
356
|
},
|
|
227
357
|
|
|
228
|
-
|
|
229
|
-
// console.log('computed
|
|
358
|
+
changeParams: function() {
|
|
359
|
+
// console.log('computed changeParams')
|
|
230
360
|
|
|
231
361
|
let vo = this
|
|
232
362
|
|
|
233
|
-
//
|
|
234
|
-
|
|
235
|
-
return ''
|
|
236
|
-
}
|
|
363
|
+
//trigger
|
|
364
|
+
let isEditable = vo.isEditable
|
|
237
365
|
|
|
238
|
-
//
|
|
366
|
+
//items
|
|
239
367
|
let items = cloneDeep(vo.targets)
|
|
240
368
|
|
|
241
369
|
//save
|
|
242
370
|
vo.items = items
|
|
243
371
|
|
|
244
372
|
//genOpt
|
|
245
|
-
vo.genOpt()
|
|
373
|
+
vo.genOpt({ isEditable })
|
|
246
374
|
|
|
247
375
|
//firstLoading
|
|
248
376
|
vo.firstLoading = false
|
|
@@ -331,6 +459,22 @@ export default {
|
|
|
331
459
|
return c
|
|
332
460
|
},
|
|
333
461
|
|
|
462
|
+
kpHead: function() {
|
|
463
|
+
let vo = this
|
|
464
|
+
|
|
465
|
+
let kp = {
|
|
466
|
+
'id': vo.$t('targetId'),
|
|
467
|
+
'description': vo.$t('description'),
|
|
468
|
+
'from': vo.$t('from'),
|
|
469
|
+
'userId': vo.$t('userId'),
|
|
470
|
+
'timeCreate': vo.$t('timeCreate'),
|
|
471
|
+
'userIdUpdate': vo.$t('userIdUpdate'),
|
|
472
|
+
'timeUpdate': vo.$t('timeUpdate'),
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
return kp
|
|
476
|
+
},
|
|
477
|
+
|
|
334
478
|
},
|
|
335
479
|
methods: {
|
|
336
480
|
|
|
@@ -355,6 +499,16 @@ export default {
|
|
|
355
499
|
|
|
356
500
|
},
|
|
357
501
|
|
|
502
|
+
getHead: function(key) {
|
|
503
|
+
// console.log('methods getHead', key)
|
|
504
|
+
|
|
505
|
+
let vo = this
|
|
506
|
+
|
|
507
|
+
let head = get(vo, `kpHead.${key}`, '')
|
|
508
|
+
|
|
509
|
+
return head
|
|
510
|
+
},
|
|
511
|
+
|
|
358
512
|
genOpt: function() {
|
|
359
513
|
// console.log('methods genOpt')
|
|
360
514
|
|
|
@@ -368,26 +522,37 @@ export default {
|
|
|
368
522
|
if (size(vo.items) > 0) {
|
|
369
523
|
|
|
370
524
|
//ks
|
|
371
|
-
let ks =
|
|
372
|
-
'id',
|
|
373
|
-
'description',
|
|
374
|
-
'from',
|
|
375
|
-
'userId',
|
|
376
|
-
'timeCreate',
|
|
377
|
-
'userIdUpdate',
|
|
378
|
-
'timeUpdate',
|
|
379
|
-
]
|
|
525
|
+
let ks = vo.tabKeys
|
|
380
526
|
// console.log('ks', ks)
|
|
381
527
|
|
|
382
528
|
//kpHead
|
|
383
|
-
let kpHead =
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
529
|
+
let kpHead = vo.kpHead
|
|
530
|
+
|
|
531
|
+
//kpCellEditable, kpRowDrag, kpHeadCheckBox
|
|
532
|
+
let kpCellEditable = {}
|
|
533
|
+
let kpRowDrag = {}
|
|
534
|
+
let kpHeadCheckBox = {}
|
|
535
|
+
if (vo.isEditable) {
|
|
536
|
+
kpCellEditable = {
|
|
537
|
+
'id': true,
|
|
538
|
+
'description': true,
|
|
539
|
+
'from': true,
|
|
540
|
+
}
|
|
541
|
+
kpRowDrag = {
|
|
542
|
+
'id': true,
|
|
543
|
+
}
|
|
544
|
+
kpHeadCheckBox = {
|
|
545
|
+
'id': true,
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
//kpHeadHide
|
|
550
|
+
let kpHeadHide = {}
|
|
551
|
+
if (true) {
|
|
552
|
+
let tabKeysHide = arrPull(vo.tabKeysPick, vo.tabKeysShow)
|
|
553
|
+
each(tabKeysHide, (k) => {
|
|
554
|
+
kpHeadHide[k] = true
|
|
555
|
+
})
|
|
391
556
|
}
|
|
392
557
|
|
|
393
558
|
//opt
|
|
@@ -397,17 +562,17 @@ export default {
|
|
|
397
562
|
keys: ks,
|
|
398
563
|
kpHead,
|
|
399
564
|
// autoFitColumn: true,
|
|
565
|
+
defCellEditable: vo.isEditable,
|
|
400
566
|
defHeadFilter: true,
|
|
401
567
|
defCellAlignH: 'left',
|
|
402
|
-
|
|
403
|
-
// 'id': true,
|
|
404
|
-
// },
|
|
568
|
+
kpHeadHide,
|
|
405
569
|
kpHeadFixLeft: {
|
|
406
570
|
'id': true,
|
|
407
571
|
},
|
|
408
572
|
defHeadMinWidth: 150,
|
|
409
573
|
kpHeadWidth: {
|
|
410
574
|
'id': 300,
|
|
575
|
+
'description': 300,
|
|
411
576
|
'timeCreate': 220,
|
|
412
577
|
'timeUpdate': 220,
|
|
413
578
|
},
|
|
@@ -420,17 +585,9 @@ export default {
|
|
|
420
585
|
'userIdUpdate': 'text',
|
|
421
586
|
'timeUpdate': 'text',
|
|
422
587
|
},
|
|
423
|
-
kpCellEditable
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
'from': true,
|
|
427
|
-
},
|
|
428
|
-
kpRowDrag: {
|
|
429
|
-
'id': true,
|
|
430
|
-
},
|
|
431
|
-
kpHeadCheckBox: {
|
|
432
|
-
'id': true,
|
|
433
|
-
},
|
|
588
|
+
kpCellEditable,
|
|
589
|
+
kpRowDrag,
|
|
590
|
+
kpHeadCheckBox,
|
|
434
591
|
kpCellRender: {
|
|
435
592
|
'id': (v) => {
|
|
436
593
|
// console.log('kpCellRender', v)
|
|
@@ -507,6 +664,19 @@ export default {
|
|
|
507
664
|
|
|
508
665
|
},
|
|
509
666
|
|
|
667
|
+
toggleTabKeys: function() {
|
|
668
|
+
let vo = this
|
|
669
|
+
|
|
670
|
+
//cmp
|
|
671
|
+
let cmp = get(vo, '$refs.rftable.$refs.$self')
|
|
672
|
+
// console.log('cmp', cmp)
|
|
673
|
+
|
|
674
|
+
//showKeys
|
|
675
|
+
cmp.showKeys(vo.tabKeysShow)
|
|
676
|
+
// console.log('tabKeysShow', vo.tabKeysShow)
|
|
677
|
+
|
|
678
|
+
},
|
|
679
|
+
|
|
510
680
|
addItem: function() {
|
|
511
681
|
// console.log('method addItem')
|
|
512
682
|
|