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
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<WDialog
|
|
3
3
|
:show.sync="bShow"
|
|
4
|
-
:title="
|
|
4
|
+
:title="isEditable?$t('userEditCgrups'):$t('userEditCgrupsForDisplay')"
|
|
5
5
|
:icon="mdiFormatListCheckbox"
|
|
6
6
|
:minWidth="800"
|
|
7
7
|
:maxWidth="800"
|
|
8
8
|
:fullscreen="fullscreen"
|
|
9
9
|
:contentBackgroundColor="'#fff'"
|
|
10
10
|
:headerBtns="useHeaderBtns"
|
|
11
|
-
:hasSaveBtn="isModified"
|
|
11
|
+
:hasSaveBtn="isEditable && isModified"
|
|
12
12
|
:save-btn-tooltip="$t('save')"
|
|
13
13
|
:close-btn-tooltip="$t('close')"
|
|
14
14
|
@click-btns="clickBtns"
|
|
@@ -20,13 +20,16 @@
|
|
|
20
20
|
<div>
|
|
21
21
|
|
|
22
22
|
<div
|
|
23
|
-
style="
|
|
23
|
+
style="_border-bottom:1px solid #ddd; background:#fff;"
|
|
24
24
|
v-domresize
|
|
25
25
|
@domresize="resizeHead"
|
|
26
26
|
>
|
|
27
27
|
|
|
28
28
|
<!-- 功能區 -->
|
|
29
|
-
<div
|
|
29
|
+
<div
|
|
30
|
+
style="padding:5px; background:#fff; display:flex; align-items:center;"
|
|
31
|
+
v-if="isEditable"
|
|
32
|
+
>
|
|
30
33
|
|
|
31
34
|
<template>
|
|
32
35
|
|
|
@@ -44,7 +47,7 @@
|
|
|
44
47
|
@click="showVeCgrupsToggleItemsEnableAllYes"
|
|
45
48
|
></WButtonCircle>
|
|
46
49
|
|
|
47
|
-
<div style="padding-left:
|
|
50
|
+
<div style="padding-left:4px;"></div>
|
|
48
51
|
|
|
49
52
|
</template>
|
|
50
53
|
|
|
@@ -64,7 +67,7 @@
|
|
|
64
67
|
@click="showVeCgrupsToggleItemsEnableAllNo"
|
|
65
68
|
></WButtonCircle>
|
|
66
69
|
|
|
67
|
-
<div style="padding-left:
|
|
70
|
+
<div style="padding-left:4px;"></div>
|
|
68
71
|
|
|
69
72
|
</template>
|
|
70
73
|
|
|
@@ -84,7 +87,7 @@
|
|
|
84
87
|
@click="showVeCgrupsToggleItemsEnableAllInv"
|
|
85
88
|
></WButtonCircle>
|
|
86
89
|
|
|
87
|
-
<div style="padding-left:
|
|
90
|
+
<div style="padding-left:4px;"></div>
|
|
88
91
|
|
|
89
92
|
</template>
|
|
90
93
|
|
|
@@ -104,7 +107,7 @@
|
|
|
104
107
|
@click="deleteItemsCheck"
|
|
105
108
|
></WButtonCircle>
|
|
106
109
|
|
|
107
|
-
<div style="padding-left:
|
|
110
|
+
<div style="padding-left:4px;"></div>
|
|
108
111
|
|
|
109
112
|
</template>
|
|
110
113
|
|
|
@@ -139,26 +142,15 @@ import get from 'lodash-es/get.js'
|
|
|
139
142
|
import set from 'lodash-es/set.js'
|
|
140
143
|
import each from 'lodash-es/each.js'
|
|
141
144
|
import map from 'lodash-es/map.js'
|
|
142
|
-
import trim from 'lodash-es/trim.js'
|
|
143
|
-
import uniq from 'lodash-es/uniq.js'
|
|
144
|
-
import find from 'lodash-es/find.js'
|
|
145
145
|
import size from 'lodash-es/size.js'
|
|
146
146
|
import filter from 'lodash-es/filter.js'
|
|
147
|
-
import join from 'lodash-es/join.js'
|
|
148
147
|
import sortBy from 'lodash-es/sortBy.js'
|
|
149
148
|
import cloneDeep from 'lodash-es/cloneDeep.js'
|
|
150
149
|
import genPm from 'wsemi/src/genPm.mjs'
|
|
151
|
-
import sep from 'wsemi/src/sep.mjs'
|
|
152
150
|
import delay from 'wsemi/src/delay.mjs'
|
|
153
151
|
import iseobj from 'wsemi/src/iseobj.mjs'
|
|
154
152
|
import isestr from 'wsemi/src/isestr.mjs'
|
|
155
153
|
import WDialog from 'w-component-vue/src/components/WDialog.vue'
|
|
156
|
-
import WText from 'w-component-vue/src/components/WText.vue'
|
|
157
|
-
import WTextSuggest from 'w-component-vue/src/components/WTextSuggest.vue'
|
|
158
|
-
import WSwitch from 'w-component-vue/src/components/WSwitch.vue'
|
|
159
|
-
import WCheckbox from 'w-component-vue/src/components/WCheckbox.vue'
|
|
160
|
-
import WIcon from 'w-component-vue/src/components/WIcon.vue'
|
|
161
|
-
import WButtonChip from 'w-component-vue/src/components/WButtonChip.vue'
|
|
162
154
|
import WButtonCircle from 'w-component-vue/src/components/WButtonCircle.vue'
|
|
163
155
|
import WAggridVueDyn from 'w-component-vue/src/components/WAggridVueDyn.vue'
|
|
164
156
|
|
|
@@ -166,12 +158,6 @@ import WAggridVueDyn from 'w-component-vue/src/components/WAggridVueDyn.vue'
|
|
|
166
158
|
export default {
|
|
167
159
|
components: {
|
|
168
160
|
WDialog,
|
|
169
|
-
WText,
|
|
170
|
-
WTextSuggest,
|
|
171
|
-
WSwitch,
|
|
172
|
-
WCheckbox,
|
|
173
|
-
WIcon,
|
|
174
|
-
WButtonChip,
|
|
175
161
|
WButtonCircle,
|
|
176
162
|
WAggridVueDyn,
|
|
177
163
|
},
|
|
@@ -198,6 +184,7 @@ export default {
|
|
|
198
184
|
panelHeight: 100,
|
|
199
185
|
headHeight: 100,
|
|
200
186
|
|
|
187
|
+
isEditable: false,
|
|
201
188
|
isModified: false,
|
|
202
189
|
|
|
203
190
|
user: null,
|
|
@@ -364,13 +351,14 @@ export default {
|
|
|
364
351
|
keys: ks,
|
|
365
352
|
kpHead,
|
|
366
353
|
autoFitColumn: true,
|
|
354
|
+
defCellEditable: false, //vo.isEditable,
|
|
367
355
|
defHeadFilter: true,
|
|
368
356
|
defCellAlignH: 'left',
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
357
|
+
kpCellEditable: {
|
|
358
|
+
'name': vo.isEditable,
|
|
359
|
+
'mode': false,
|
|
360
|
+
'enable': false,
|
|
361
|
+
},
|
|
374
362
|
kpHeadWidth: {
|
|
375
363
|
'mode': 100,
|
|
376
364
|
'enable': 100,
|
|
@@ -407,7 +395,7 @@ export default {
|
|
|
407
395
|
// console.log('mode', mode, k, r)
|
|
408
396
|
|
|
409
397
|
let t = `
|
|
410
|
-
<select onchange="$vo.$dg.showVeCgrupsToggleItemModeByName('${name}',this.value)">
|
|
398
|
+
<select onchange="$vo.$dg.showVeCgrupsToggleItemModeByName('${name}',this.value)" ${vo.isEditable ? '' : 'disabled'}>
|
|
411
399
|
<option value="OR" ${mode === 'OR' ? 'selected' : ''}>OR</option>
|
|
412
400
|
<option value="AND" ${mode === 'AND' ? 'selected' : ''}>AND</option>
|
|
413
401
|
</select>
|
|
@@ -423,7 +411,7 @@ export default {
|
|
|
423
411
|
// console.log('name', name, k, r)
|
|
424
412
|
|
|
425
413
|
let t = `
|
|
426
|
-
<input type="checkbox" ${v === 'y' ? 'checked' : ''} onclick="$vo.$dg.showVeCgrupsToggleItemEnableByName('${name}')" />
|
|
414
|
+
<input type="checkbox" ${v === 'y' ? 'checked' : ''} onclick="$vo.$dg.showVeCgrupsToggleItemEnableByName('${name}')" ${vo.isEditable ? '' : 'disabled'} />
|
|
427
415
|
`
|
|
428
416
|
|
|
429
417
|
return t
|
|
@@ -838,8 +826,8 @@ export default {
|
|
|
838
826
|
|
|
839
827
|
},
|
|
840
828
|
|
|
841
|
-
show: function (
|
|
842
|
-
// console.log('methods show',
|
|
829
|
+
show: function (msg) {
|
|
830
|
+
// console.log('methods show', msg)
|
|
843
831
|
|
|
844
832
|
let vo = this
|
|
845
833
|
|
|
@@ -849,6 +837,10 @@ export default {
|
|
|
849
837
|
//default
|
|
850
838
|
vo.isModified = false
|
|
851
839
|
|
|
840
|
+
//isEditable, user
|
|
841
|
+
let isEditable = get(msg, 'isEditable', false)
|
|
842
|
+
let user = get(msg, 'user', {})
|
|
843
|
+
|
|
852
844
|
//cloneDeep
|
|
853
845
|
user = cloneDeep(user)
|
|
854
846
|
|
|
@@ -906,6 +898,7 @@ export default {
|
|
|
906
898
|
// console.log('items', items)
|
|
907
899
|
|
|
908
900
|
//save
|
|
901
|
+
vo.isEditable = isEditable
|
|
909
902
|
vo.user = user
|
|
910
903
|
vo.items = items
|
|
911
904
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<WDialog
|
|
3
3
|
:show.sync="bShow"
|
|
4
|
-
:title="
|
|
4
|
+
:title="isEditable?$t('grupEditCpemis'):$t('grupEditCpemisForDisplay')"
|
|
5
5
|
:icon="mdiFormatListCheckbox"
|
|
6
6
|
:minWidth="800"
|
|
7
7
|
:maxWidth="800"
|
|
8
8
|
:fullscreen="fullscreen"
|
|
9
9
|
:contentBackgroundColor="'#fff'"
|
|
10
10
|
:headerBtns="useHeaderBtns"
|
|
11
|
-
:hasSaveBtn="isModified"
|
|
11
|
+
:hasSaveBtn="isEditable && isModified"
|
|
12
12
|
:save-btn-tooltip="$t('save')"
|
|
13
13
|
:close-btn-tooltip="$t('close')"
|
|
14
14
|
@click-btns="clickBtns"
|
|
@@ -20,13 +20,16 @@
|
|
|
20
20
|
<div>
|
|
21
21
|
|
|
22
22
|
<div
|
|
23
|
-
style="
|
|
23
|
+
style="_border-bottom:1px solid #ddd; background:#fff;"
|
|
24
24
|
v-domresize
|
|
25
25
|
@domresize="resizeHead"
|
|
26
26
|
>
|
|
27
27
|
|
|
28
28
|
<!-- 功能區 -->
|
|
29
|
-
<div
|
|
29
|
+
<div
|
|
30
|
+
style="padding:5px; background:#fff; display:flex; align-items:center;"
|
|
31
|
+
v-if="isEditable"
|
|
32
|
+
>
|
|
30
33
|
|
|
31
34
|
<template>
|
|
32
35
|
|
|
@@ -44,7 +47,7 @@
|
|
|
44
47
|
@click="showVeCpemisToggleItemsEnableAllYes"
|
|
45
48
|
></WButtonCircle>
|
|
46
49
|
|
|
47
|
-
<div style="padding-left:
|
|
50
|
+
<div style="padding-left:4px;"></div>
|
|
48
51
|
|
|
49
52
|
</template>
|
|
50
53
|
|
|
@@ -64,7 +67,7 @@
|
|
|
64
67
|
@click="showVeCpemisToggleItemsEnableAllNo"
|
|
65
68
|
></WButtonCircle>
|
|
66
69
|
|
|
67
|
-
<div style="padding-left:
|
|
70
|
+
<div style="padding-left:4px;"></div>
|
|
68
71
|
|
|
69
72
|
</template>
|
|
70
73
|
|
|
@@ -84,7 +87,7 @@
|
|
|
84
87
|
@click="showVeCpemisToggleItemsEnableAllInv"
|
|
85
88
|
></WButtonCircle>
|
|
86
89
|
|
|
87
|
-
<div style="padding-left:
|
|
90
|
+
<div style="padding-left:4px;"></div>
|
|
88
91
|
|
|
89
92
|
</template>
|
|
90
93
|
|
|
@@ -104,7 +107,7 @@
|
|
|
104
107
|
@click="deleteItemsCheck"
|
|
105
108
|
></WButtonCircle>
|
|
106
109
|
|
|
107
|
-
<div style="padding-left:
|
|
110
|
+
<div style="padding-left:4px;"></div>
|
|
108
111
|
|
|
109
112
|
</template>
|
|
110
113
|
|
|
@@ -139,26 +142,15 @@ import get from 'lodash-es/get.js'
|
|
|
139
142
|
import set from 'lodash-es/set.js'
|
|
140
143
|
import each from 'lodash-es/each.js'
|
|
141
144
|
import map from 'lodash-es/map.js'
|
|
142
|
-
import trim from 'lodash-es/trim.js'
|
|
143
|
-
import uniq from 'lodash-es/uniq.js'
|
|
144
|
-
import find from 'lodash-es/find.js'
|
|
145
145
|
import size from 'lodash-es/size.js'
|
|
146
146
|
import filter from 'lodash-es/filter.js'
|
|
147
|
-
import join from 'lodash-es/join.js'
|
|
148
147
|
import sortBy from 'lodash-es/sortBy.js'
|
|
149
148
|
import cloneDeep from 'lodash-es/cloneDeep.js'
|
|
150
149
|
import genPm from 'wsemi/src/genPm.mjs'
|
|
151
|
-
import sep from 'wsemi/src/sep.mjs'
|
|
152
150
|
import delay from 'wsemi/src/delay.mjs'
|
|
153
151
|
import iseobj from 'wsemi/src/iseobj.mjs'
|
|
154
152
|
import isestr from 'wsemi/src/isestr.mjs'
|
|
155
153
|
import WDialog from 'w-component-vue/src/components/WDialog.vue'
|
|
156
|
-
import WText from 'w-component-vue/src/components/WText.vue'
|
|
157
|
-
import WTextSuggest from 'w-component-vue/src/components/WTextSuggest.vue'
|
|
158
|
-
import WSwitch from 'w-component-vue/src/components/WSwitch.vue'
|
|
159
|
-
import WCheckbox from 'w-component-vue/src/components/WCheckbox.vue'
|
|
160
|
-
import WIcon from 'w-component-vue/src/components/WIcon.vue'
|
|
161
|
-
import WButtonChip from 'w-component-vue/src/components/WButtonChip.vue'
|
|
162
154
|
import WButtonCircle from 'w-component-vue/src/components/WButtonCircle.vue'
|
|
163
155
|
import WAggridVueDyn from 'w-component-vue/src/components/WAggridVueDyn.vue'
|
|
164
156
|
|
|
@@ -166,12 +158,6 @@ import WAggridVueDyn from 'w-component-vue/src/components/WAggridVueDyn.vue'
|
|
|
166
158
|
export default {
|
|
167
159
|
components: {
|
|
168
160
|
WDialog,
|
|
169
|
-
WText,
|
|
170
|
-
WTextSuggest,
|
|
171
|
-
WSwitch,
|
|
172
|
-
WCheckbox,
|
|
173
|
-
WIcon,
|
|
174
|
-
WButtonChip,
|
|
175
161
|
WButtonCircle,
|
|
176
162
|
WAggridVueDyn,
|
|
177
163
|
},
|
|
@@ -198,6 +184,7 @@ export default {
|
|
|
198
184
|
panelHeight: 100,
|
|
199
185
|
headHeight: 100,
|
|
200
186
|
|
|
187
|
+
isEditable: false,
|
|
201
188
|
isModified: false,
|
|
202
189
|
|
|
203
190
|
grup: null,
|
|
@@ -364,13 +351,14 @@ export default {
|
|
|
364
351
|
keys: ks,
|
|
365
352
|
kpHead,
|
|
366
353
|
autoFitColumn: true,
|
|
354
|
+
defCellEditable: false, //vo.isEditable,
|
|
367
355
|
defHeadFilter: true,
|
|
368
356
|
defCellAlignH: 'left',
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
357
|
+
kpCellEditable: {
|
|
358
|
+
'name': vo.isEditable,
|
|
359
|
+
'mode': false,
|
|
360
|
+
'enable': false,
|
|
361
|
+
},
|
|
374
362
|
kpHeadWidth: {
|
|
375
363
|
'mode': 100,
|
|
376
364
|
'enable': 100,
|
|
@@ -407,7 +395,7 @@ export default {
|
|
|
407
395
|
// console.log('mode', mode, k, r)
|
|
408
396
|
|
|
409
397
|
let t = `
|
|
410
|
-
<select onchange="$vo.$dg.showVeCpemisToggleItemModeByName('${name}',this.value)">
|
|
398
|
+
<select onchange="$vo.$dg.showVeCpemisToggleItemModeByName('${name}',this.value)" ${vo.isEditable ? '' : 'disabled'}>
|
|
411
399
|
<option value="OR" ${mode === 'OR' ? 'selected' : ''}>OR</option>
|
|
412
400
|
<option value="AND" ${mode === 'AND' ? 'selected' : ''}>AND</option>
|
|
413
401
|
</select>
|
|
@@ -423,7 +411,7 @@ export default {
|
|
|
423
411
|
// console.log('name', name, k, r)
|
|
424
412
|
|
|
425
413
|
let t = `
|
|
426
|
-
<input type="checkbox" ${v === 'y' ? 'checked' : ''} onclick="$vo.$dg.showVeCpemisToggleItemEnableByName('${name}')" />
|
|
414
|
+
<input type="checkbox" ${v === 'y' ? 'checked' : ''} onclick="$vo.$dg.showVeCpemisToggleItemEnableByName('${name}')" ${vo.isEditable ? '' : 'disabled'} />
|
|
427
415
|
`
|
|
428
416
|
|
|
429
417
|
return t
|
|
@@ -838,8 +826,8 @@ export default {
|
|
|
838
826
|
|
|
839
827
|
},
|
|
840
828
|
|
|
841
|
-
show: function (
|
|
842
|
-
// console.log('methods show',
|
|
829
|
+
show: function (msg) {
|
|
830
|
+
// console.log('methods show', msg)
|
|
843
831
|
|
|
844
832
|
let vo = this
|
|
845
833
|
|
|
@@ -849,6 +837,10 @@ export default {
|
|
|
849
837
|
//default
|
|
850
838
|
vo.isModified = false
|
|
851
839
|
|
|
840
|
+
//isEditable, grup
|
|
841
|
+
let isEditable = get(msg, 'isEditable', false)
|
|
842
|
+
let grup = get(msg, 'grup', {})
|
|
843
|
+
|
|
852
844
|
//cloneDeep
|
|
853
845
|
grup = cloneDeep(grup)
|
|
854
846
|
|
|
@@ -906,6 +898,7 @@ export default {
|
|
|
906
898
|
// console.log('items', items)
|
|
907
899
|
|
|
908
900
|
//save
|
|
901
|
+
vo.isEditable = isEditable
|
|
909
902
|
vo.grup = grup
|
|
910
903
|
vo.items = items
|
|
911
904
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<WDialog
|
|
3
3
|
:show.sync="bShow"
|
|
4
|
-
:title="
|
|
4
|
+
:title="isEditable?$t('pemiEditCrules'):$t('pemiEditCrulesForDisplay')"
|
|
5
5
|
:icon="mdiFormatListCheckbox"
|
|
6
6
|
:minWidth="800"
|
|
7
7
|
:maxWidth="800"
|
|
8
8
|
:fullscreen="fullscreen"
|
|
9
9
|
:contentBackgroundColor="'#fff'"
|
|
10
10
|
:headerBtns="useHeaderBtns"
|
|
11
|
-
:hasSaveBtn="isModified"
|
|
11
|
+
:hasSaveBtn="isEditable && isModified"
|
|
12
12
|
:save-btn-tooltip="$t('save')"
|
|
13
13
|
:close-btn-tooltip="$t('close')"
|
|
14
14
|
@click-btns="clickBtns"
|
|
@@ -20,13 +20,16 @@
|
|
|
20
20
|
<div>
|
|
21
21
|
|
|
22
22
|
<div
|
|
23
|
-
style="
|
|
23
|
+
style="_border-bottom:1px solid #ddd; background:#fff;"
|
|
24
24
|
v-domresize
|
|
25
25
|
@domresize="resizeHead"
|
|
26
26
|
>
|
|
27
27
|
|
|
28
28
|
<!-- 功能區 -->
|
|
29
|
-
<div
|
|
29
|
+
<div
|
|
30
|
+
style="padding:5px; background:#fff; display:flex; align-items:center;"
|
|
31
|
+
v-if="isEditable"
|
|
32
|
+
>
|
|
30
33
|
|
|
31
34
|
<template>
|
|
32
35
|
|
|
@@ -44,7 +47,7 @@
|
|
|
44
47
|
@click="toggleItemsEnableAllYes"
|
|
45
48
|
></WButtonCircle>
|
|
46
49
|
|
|
47
|
-
<div style="padding-left:
|
|
50
|
+
<div style="padding-left:4px;"></div>
|
|
48
51
|
|
|
49
52
|
</template>
|
|
50
53
|
|
|
@@ -64,7 +67,7 @@
|
|
|
64
67
|
@click="toggleItemsEnableAllNo"
|
|
65
68
|
></WButtonCircle>
|
|
66
69
|
|
|
67
|
-
<div style="padding-left:
|
|
70
|
+
<div style="padding-left:4px;"></div>
|
|
68
71
|
|
|
69
72
|
</template>
|
|
70
73
|
|
|
@@ -84,7 +87,7 @@
|
|
|
84
87
|
@click="toggleItemsEnableAllInv"
|
|
85
88
|
></WButtonCircle>
|
|
86
89
|
|
|
87
|
-
<div style="padding-left:
|
|
90
|
+
<div style="padding-left:4px;"></div>
|
|
88
91
|
|
|
89
92
|
</template>
|
|
90
93
|
|
|
@@ -104,7 +107,7 @@
|
|
|
104
107
|
@click="deleteItemsCheck"
|
|
105
108
|
></WButtonCircle>
|
|
106
109
|
|
|
107
|
-
<div style="padding-left:
|
|
110
|
+
<div style="padding-left:4px;"></div>
|
|
108
111
|
|
|
109
112
|
</template>
|
|
110
113
|
|
|
@@ -139,25 +142,15 @@ import get from 'lodash-es/get.js'
|
|
|
139
142
|
import set from 'lodash-es/set.js'
|
|
140
143
|
import each from 'lodash-es/each.js'
|
|
141
144
|
import map from 'lodash-es/map.js'
|
|
142
|
-
import trim from 'lodash-es/trim.js'
|
|
143
|
-
import uniq from 'lodash-es/uniq.js'
|
|
144
145
|
import size from 'lodash-es/size.js'
|
|
145
146
|
import filter from 'lodash-es/filter.js'
|
|
146
|
-
import join from 'lodash-es/join.js'
|
|
147
147
|
import sortBy from 'lodash-es/sortBy.js'
|
|
148
148
|
import cloneDeep from 'lodash-es/cloneDeep.js'
|
|
149
149
|
import genPm from 'wsemi/src/genPm.mjs'
|
|
150
|
-
import sep from 'wsemi/src/sep.mjs'
|
|
151
150
|
import delay from 'wsemi/src/delay.mjs'
|
|
152
151
|
import iseobj from 'wsemi/src/iseobj.mjs'
|
|
153
152
|
import isestr from 'wsemi/src/isestr.mjs'
|
|
154
153
|
import WDialog from 'w-component-vue/src/components/WDialog.vue'
|
|
155
|
-
import WText from 'w-component-vue/src/components/WText.vue'
|
|
156
|
-
import WTextSuggest from 'w-component-vue/src/components/WTextSuggest.vue'
|
|
157
|
-
import WSwitch from 'w-component-vue/src/components/WSwitch.vue'
|
|
158
|
-
import WCheckbox from 'w-component-vue/src/components/WCheckbox.vue'
|
|
159
|
-
import WIcon from 'w-component-vue/src/components/WIcon.vue'
|
|
160
|
-
import WButtonChip from 'w-component-vue/src/components/WButtonChip.vue'
|
|
161
154
|
import WButtonCircle from 'w-component-vue/src/components/WButtonCircle.vue'
|
|
162
155
|
import WAggridVueDyn from 'w-component-vue/src/components/WAggridVueDyn.vue'
|
|
163
156
|
|
|
@@ -165,12 +158,6 @@ import WAggridVueDyn from 'w-component-vue/src/components/WAggridVueDyn.vue'
|
|
|
165
158
|
export default {
|
|
166
159
|
components: {
|
|
167
160
|
WDialog,
|
|
168
|
-
WText,
|
|
169
|
-
WTextSuggest,
|
|
170
|
-
WSwitch,
|
|
171
|
-
WCheckbox,
|
|
172
|
-
WIcon,
|
|
173
|
-
WButtonChip,
|
|
174
161
|
WButtonCircle,
|
|
175
162
|
WAggridVueDyn,
|
|
176
163
|
},
|
|
@@ -197,6 +184,7 @@ export default {
|
|
|
197
184
|
panelHeight: 100,
|
|
198
185
|
headHeight: 100,
|
|
199
186
|
|
|
187
|
+
isEditable: false,
|
|
200
188
|
isModified: false,
|
|
201
189
|
|
|
202
190
|
pemi: null,
|
|
@@ -360,12 +348,13 @@ export default {
|
|
|
360
348
|
keys: ks,
|
|
361
349
|
kpHead,
|
|
362
350
|
autoFitColumn: true,
|
|
351
|
+
defCellEditable: false, //vo.isEditable,
|
|
363
352
|
defHeadFilter: true,
|
|
364
353
|
defCellAlignH: 'left',
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
354
|
+
kpCellEditable: {
|
|
355
|
+
'id': vo.isEditable,
|
|
356
|
+
'enable': false,
|
|
357
|
+
},
|
|
369
358
|
kpHeadWidth: {
|
|
370
359
|
'enable': 50,
|
|
371
360
|
},
|
|
@@ -396,7 +385,7 @@ export default {
|
|
|
396
385
|
// console.log('id', id, k, r)
|
|
397
386
|
|
|
398
387
|
let t = `
|
|
399
|
-
<input type="checkbox" ${v === 'y' ? 'checked' : ''} onclick="$vo.$dg.toggleItemEnableById('${id}')" />
|
|
388
|
+
<input type="checkbox" ${v === 'y' ? 'checked' : ''} onclick="$vo.$dg.toggleItemEnableById('${id}')" ${vo.isEditable ? '' : 'disabled'} />
|
|
400
389
|
`
|
|
401
390
|
|
|
402
391
|
return t
|
|
@@ -756,8 +745,8 @@ export default {
|
|
|
756
745
|
|
|
757
746
|
},
|
|
758
747
|
|
|
759
|
-
show: function (
|
|
760
|
-
// console.log('methods show',
|
|
748
|
+
show: function (msg) {
|
|
749
|
+
// console.log('methods show', msg)
|
|
761
750
|
|
|
762
751
|
let vo = this
|
|
763
752
|
|
|
@@ -767,6 +756,10 @@ export default {
|
|
|
767
756
|
//default
|
|
768
757
|
vo.isModified = false
|
|
769
758
|
|
|
759
|
+
//isEditable, pemi
|
|
760
|
+
let isEditable = get(msg, 'isEditable', false)
|
|
761
|
+
let pemi = get(msg, 'pemi', {})
|
|
762
|
+
|
|
770
763
|
//cloneDeep
|
|
771
764
|
pemi = cloneDeep(pemi)
|
|
772
765
|
|
|
@@ -800,6 +793,7 @@ export default {
|
|
|
800
793
|
// console.log('items', items)
|
|
801
794
|
|
|
802
795
|
//save
|
|
796
|
+
vo.isEditable = isEditable
|
|
803
797
|
vo.pemi = pemi
|
|
804
798
|
vo.items = items
|
|
805
799
|
|