w-web-perm 1.0.46 → 1.0.48
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/db/wperm/grups/lock.mdb +0 -0
- package/db/wperm/pemis/lock.mdb +0 -0
- package/db/wperm/targets/lock.mdb +0 -0
- package/db/wperm/users/data.mdb +0 -0
- package/db/wperm/users/lock.mdb +0 -0
- package/dist/index.tmp +1 -1
- package/dist/js/app-legacy.3324392e.js +1 -0
- package/dist/js/app.3324392e.js +1 -0
- package/dist/w-web-perm.umd.js +1 -1
- package/docs/WWebPerm.html +1 -1
- package/docs/WWebPerm.mjs.html +1 -1
- package/docs/index.html +1 -1
- package/package.json +1 -1
- package/src/components/LayoutContentGrups.vue +16 -1
- package/src/components/LayoutContentPemis.vue +16 -1
- package/src/components/LayoutContentTargets.vue +16 -1
- package/src/components/LayoutContentUsers.vue +16 -1
- package/src/components/VeCgrups.vue +50 -17
- package/src/components/VeCpemis.vue +50 -17
- package/src/components/VeCrules.vue +46 -13
- package/src/components/VeGrupBlngUsers.vue +59 -26
- package/src/components/VePemiBlngGrups.vue +59 -26
- package/src/plugins/mUI.mjs +34 -7
- package/src/store/mutations.mjs +1 -1
- package/tableTags.json +1 -1
- package/dist/js/app-legacy.7a0dda14.js +0 -1
- package/dist/js/app.7a0dda14.js +0 -1
|
@@ -346,12 +346,22 @@ export default {
|
|
|
346
346
|
vo.widthTargetId = get(vo, 'webInfor.widthTargetId', '')
|
|
347
347
|
vo.widthTargetDescription = get(vo, 'webInfor.widthTargetDescription', '')
|
|
348
348
|
|
|
349
|
-
|
|
349
|
+
//會觸發數據變更再導致opt變更導致觸發rowsChange等事件, 故得要延遲, 供組件偵測初始設定數據初始化之用
|
|
350
|
+
setTimeout(() => {
|
|
351
|
+
vo.firstSetting = false
|
|
352
|
+
// console.log('firstSetting', vo.firstSetting)
|
|
353
|
+
}, 1)
|
|
354
|
+
|
|
350
355
|
}
|
|
351
356
|
|
|
352
357
|
},
|
|
353
358
|
computed: {
|
|
354
359
|
|
|
360
|
+
syncState: function() {
|
|
361
|
+
let vo = this
|
|
362
|
+
return get(vo, '$store.state.syncState')
|
|
363
|
+
},
|
|
364
|
+
|
|
355
365
|
webInfor: function() {
|
|
356
366
|
let wi = get(this, `$store.state.webInfor`)
|
|
357
367
|
return wi
|
|
@@ -618,6 +628,11 @@ export default {
|
|
|
618
628
|
// console.log('rowsChange', rs)
|
|
619
629
|
// console.log('rowsChange cloneDeep(vo.opt.rows)', cloneDeep(vo.opt.rows))
|
|
620
630
|
|
|
631
|
+
//check
|
|
632
|
+
if (!vo.syncState || vo.firstLoading || vo.firstSetting) {
|
|
633
|
+
return
|
|
634
|
+
}
|
|
635
|
+
|
|
621
636
|
//isModified
|
|
622
637
|
vo.isModified = true
|
|
623
638
|
|
|
@@ -382,12 +382,22 @@ export default {
|
|
|
382
382
|
vo.widthUsersEmail = get(vo, 'webInfor.widthUsersEmail', '')
|
|
383
383
|
vo.widthUsersDescription = get(vo, 'webInfor.widthUsersDescription', '')
|
|
384
384
|
|
|
385
|
-
|
|
385
|
+
//會觸發數據變更再導致opt變更導致觸發rowsChange等事件, 故得要延遲, 供組件偵測初始設定數據初始化之用
|
|
386
|
+
setTimeout(() => {
|
|
387
|
+
vo.firstSetting = false
|
|
388
|
+
// console.log('firstSetting', vo.firstSetting)
|
|
389
|
+
}, 1)
|
|
390
|
+
|
|
386
391
|
}
|
|
387
392
|
|
|
388
393
|
},
|
|
389
394
|
computed: {
|
|
390
395
|
|
|
396
|
+
syncState: function() {
|
|
397
|
+
let vo = this
|
|
398
|
+
return get(vo, '$store.state.syncState')
|
|
399
|
+
},
|
|
400
|
+
|
|
391
401
|
webInfor: function() {
|
|
392
402
|
let wi = get(this, `$store.state.webInfor`)
|
|
393
403
|
return wi
|
|
@@ -735,6 +745,11 @@ export default {
|
|
|
735
745
|
// console.log('rowsChange', rs)
|
|
736
746
|
// console.log('rowsChange cloneDeep(vo.opt.rows)', cloneDeep(vo.opt.rows))
|
|
737
747
|
|
|
748
|
+
//check
|
|
749
|
+
if (!vo.syncState || vo.firstLoading || vo.firstSetting) {
|
|
750
|
+
return
|
|
751
|
+
}
|
|
752
|
+
|
|
738
753
|
//isModified
|
|
739
754
|
vo.isModified = true
|
|
740
755
|
|
|
@@ -115,23 +115,29 @@
|
|
|
115
115
|
|
|
116
116
|
</div>
|
|
117
117
|
|
|
118
|
-
<template
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
118
|
+
<template
|
|
119
|
+
v-if="!firstLoading"
|
|
120
|
+
>
|
|
121
|
+
|
|
122
|
+
<template v-if="items">
|
|
123
|
+
<WAggridVue
|
|
124
|
+
ref="rftable"
|
|
125
|
+
:style="`width:100%;`"
|
|
126
|
+
:height="contentHeight"
|
|
127
|
+
:opt="opt"
|
|
128
|
+
>
|
|
129
|
+
<template v-slot:cell-render="props">
|
|
130
|
+
<span v-if="props.key==='name'">{{ props.value }}</span>
|
|
131
|
+
<select v-else-if="props.key==='mode'" @change="showVeCgrupsToggleItemModeByName(props.row.name, $event.target.value)" :disabled="!isEditable">
|
|
132
|
+
<option value="OR" :selected="props.row.mode === 'OR'">OR</option>
|
|
133
|
+
<option value="AND" :selected="props.row.mode === 'AND'">AND</option>
|
|
134
|
+
</select>
|
|
135
|
+
<input v-else-if="props.key==='enable'" type="checkbox" :checked="props.value === 'y'" @click="showVeCgrupsToggleItemEnableByName(props.row.name)" :disabled="!isEditable" />
|
|
136
|
+
<span v-else>{{ props.value }}</span>
|
|
137
|
+
</template>
|
|
138
|
+
</WAggridVue>
|
|
139
|
+
</template>
|
|
140
|
+
|
|
135
141
|
</template>
|
|
136
142
|
|
|
137
143
|
<div
|
|
@@ -196,6 +202,8 @@ export default {
|
|
|
196
202
|
panelHeight: 100,
|
|
197
203
|
headHeight: 100,
|
|
198
204
|
|
|
205
|
+
firstLoading: true,
|
|
206
|
+
firstSetting: true,
|
|
199
207
|
isEditable: false,
|
|
200
208
|
isModified: false,
|
|
201
209
|
|
|
@@ -217,9 +225,26 @@ export default {
|
|
|
217
225
|
Vue.prototype.$dg.showVeCgrupsToggleItemModeByName = vo.showVeCgrupsToggleItemModeByName
|
|
218
226
|
Vue.prototype.$dg.showVeCgrupsToggleItemEnableByName = vo.showVeCgrupsToggleItemEnableByName
|
|
219
227
|
|
|
228
|
+
//firstSetting
|
|
229
|
+
if (vo.firstSetting) {
|
|
230
|
+
// console.log('webInfor', vo.webInfor)
|
|
231
|
+
|
|
232
|
+
//會觸發數據變更再導致opt變更導致觸發rowsChange等事件, 故得要延遲, 供組件偵測初始設定數據初始化之用
|
|
233
|
+
setTimeout(() => {
|
|
234
|
+
vo.firstSetting = false
|
|
235
|
+
// console.log('firstSetting', vo.firstSetting)
|
|
236
|
+
}, 1)
|
|
237
|
+
|
|
238
|
+
}
|
|
239
|
+
|
|
220
240
|
},
|
|
221
241
|
computed: {
|
|
222
242
|
|
|
243
|
+
syncState: function() {
|
|
244
|
+
let vo = this
|
|
245
|
+
return get(vo, '$store.state.syncState')
|
|
246
|
+
},
|
|
247
|
+
|
|
223
248
|
targets: function() {
|
|
224
249
|
let rs = get(this, `$store.state.targets`)
|
|
225
250
|
rs = sortBy(rs, 'order')
|
|
@@ -393,6 +418,11 @@ export default {
|
|
|
393
418
|
// console.log('rowsChange', rs)
|
|
394
419
|
// console.log('rowsChange cloneDeep(vo.opt.rows)', cloneDeep(vo.opt.rows))
|
|
395
420
|
|
|
421
|
+
//check
|
|
422
|
+
if (!vo.syncState || vo.firstLoading || vo.firstSetting) {
|
|
423
|
+
return
|
|
424
|
+
}
|
|
425
|
+
|
|
396
426
|
//isModified
|
|
397
427
|
vo.isModified = true
|
|
398
428
|
|
|
@@ -877,6 +907,9 @@ export default {
|
|
|
877
907
|
//genOpt
|
|
878
908
|
vo.genOpt()
|
|
879
909
|
|
|
910
|
+
//firstLoading
|
|
911
|
+
vo.firstLoading = false
|
|
912
|
+
|
|
880
913
|
//bShow
|
|
881
914
|
vo.bShow = true
|
|
882
915
|
|
|
@@ -115,23 +115,29 @@
|
|
|
115
115
|
|
|
116
116
|
</div>
|
|
117
117
|
|
|
118
|
-
<template
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
118
|
+
<template
|
|
119
|
+
v-if="!firstLoading"
|
|
120
|
+
>
|
|
121
|
+
|
|
122
|
+
<template v-if="items">
|
|
123
|
+
<WAggridVue
|
|
124
|
+
ref="rftable"
|
|
125
|
+
:style="`width:100%;`"
|
|
126
|
+
:height="contentHeight"
|
|
127
|
+
:opt="opt"
|
|
128
|
+
>
|
|
129
|
+
<template v-slot:cell-render="props">
|
|
130
|
+
<span v-if="props.key==='name'">{{ props.value }}</span>
|
|
131
|
+
<select v-else-if="props.key==='mode'" @change="showVeCpemisToggleItemModeByName(props.row.name, $event.target.value)" :disabled="!isEditable">
|
|
132
|
+
<option value="OR" :selected="props.row.mode === 'OR'">OR</option>
|
|
133
|
+
<option value="AND" :selected="props.row.mode === 'AND'">AND</option>
|
|
134
|
+
</select>
|
|
135
|
+
<input v-else-if="props.key==='enable'" type="checkbox" :checked="props.value === 'y'" @click="showVeCpemisToggleItemEnableByName(props.row.name)" :disabled="!isEditable" />
|
|
136
|
+
<span v-else>{{ props.value }}</span>
|
|
137
|
+
</template>
|
|
138
|
+
</WAggridVue>
|
|
139
|
+
</template>
|
|
140
|
+
|
|
135
141
|
</template>
|
|
136
142
|
|
|
137
143
|
<div
|
|
@@ -196,6 +202,8 @@ export default {
|
|
|
196
202
|
panelHeight: 100,
|
|
197
203
|
headHeight: 100,
|
|
198
204
|
|
|
205
|
+
firstLoading: true,
|
|
206
|
+
firstSetting: true,
|
|
199
207
|
isEditable: false,
|
|
200
208
|
isModified: false,
|
|
201
209
|
|
|
@@ -217,9 +225,26 @@ export default {
|
|
|
217
225
|
Vue.prototype.$dg.showVeCpemisToggleItemModeByName = vo.showVeCpemisToggleItemModeByName
|
|
218
226
|
Vue.prototype.$dg.showVeCpemisToggleItemEnableByName = vo.showVeCpemisToggleItemEnableByName
|
|
219
227
|
|
|
228
|
+
//firstSetting
|
|
229
|
+
if (vo.firstSetting) {
|
|
230
|
+
// console.log('webInfor', vo.webInfor)
|
|
231
|
+
|
|
232
|
+
//會觸發數據變更再導致opt變更導致觸發rowsChange等事件, 故得要延遲, 供組件偵測初始設定數據初始化之用
|
|
233
|
+
setTimeout(() => {
|
|
234
|
+
vo.firstSetting = false
|
|
235
|
+
// console.log('firstSetting', vo.firstSetting)
|
|
236
|
+
}, 1)
|
|
237
|
+
|
|
238
|
+
}
|
|
239
|
+
|
|
220
240
|
},
|
|
221
241
|
computed: {
|
|
222
242
|
|
|
243
|
+
syncState: function() {
|
|
244
|
+
let vo = this
|
|
245
|
+
return get(vo, '$store.state.syncState')
|
|
246
|
+
},
|
|
247
|
+
|
|
223
248
|
targets: function() {
|
|
224
249
|
let rs = get(this, `$store.state.targets`)
|
|
225
250
|
rs = sortBy(rs, 'order')
|
|
@@ -393,6 +418,11 @@ export default {
|
|
|
393
418
|
// console.log('rowsChange', rs)
|
|
394
419
|
// console.log('rowsChange cloneDeep(vo.opt.rows)', cloneDeep(vo.opt.rows))
|
|
395
420
|
|
|
421
|
+
//check
|
|
422
|
+
if (!vo.syncState || vo.firstLoading || vo.firstSetting) {
|
|
423
|
+
return
|
|
424
|
+
}
|
|
425
|
+
|
|
396
426
|
//isModified
|
|
397
427
|
vo.isModified = true
|
|
398
428
|
|
|
@@ -877,6 +907,9 @@ export default {
|
|
|
877
907
|
//genOpt
|
|
878
908
|
vo.genOpt()
|
|
879
909
|
|
|
910
|
+
//firstLoading
|
|
911
|
+
vo.firstLoading = false
|
|
912
|
+
|
|
880
913
|
//bShow
|
|
881
914
|
vo.bShow = true
|
|
882
915
|
|
|
@@ -115,19 +115,25 @@
|
|
|
115
115
|
|
|
116
116
|
</div>
|
|
117
117
|
|
|
118
|
-
<template
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
118
|
+
<template
|
|
119
|
+
v-if="!firstLoading"
|
|
120
|
+
>
|
|
121
|
+
|
|
122
|
+
<template v-if="items">
|
|
123
|
+
<WAggridVue
|
|
124
|
+
ref="rftable"
|
|
125
|
+
:style="`width:100%;`"
|
|
126
|
+
:height="contentHeight"
|
|
127
|
+
:opt="opt"
|
|
128
|
+
>
|
|
129
|
+
<template v-slot:cell-render="props">
|
|
130
|
+
<span v-if="props.key==='id'">{{ props.value }}</span>
|
|
131
|
+
<input v-else-if="props.key==='enable'" type="checkbox" :checked="props.value === 'y'" @click="toggleItemEnableById(props.row.id)" :disabled="!isEditable" />
|
|
132
|
+
<span v-else>{{ props.value }}</span>
|
|
133
|
+
</template>
|
|
134
|
+
</WAggridVue>
|
|
135
|
+
</template>
|
|
136
|
+
|
|
131
137
|
</template>
|
|
132
138
|
|
|
133
139
|
<div
|
|
@@ -192,6 +198,8 @@ export default {
|
|
|
192
198
|
panelHeight: 100,
|
|
193
199
|
headHeight: 100,
|
|
194
200
|
|
|
201
|
+
firstLoading: true,
|
|
202
|
+
firstSetting: true,
|
|
195
203
|
isEditable: false,
|
|
196
204
|
isModified: false,
|
|
197
205
|
|
|
@@ -212,9 +220,26 @@ export default {
|
|
|
212
220
|
Vue.prototype.$dg.showVeCrules = vo.show
|
|
213
221
|
Vue.prototype.$dg.toggleItemEnableById = vo.toggleItemEnableById
|
|
214
222
|
|
|
223
|
+
//firstSetting
|
|
224
|
+
if (vo.firstSetting) {
|
|
225
|
+
// console.log('webInfor', vo.webInfor)
|
|
226
|
+
|
|
227
|
+
//會觸發數據變更再導致opt變更導致觸發rowsChange等事件, 故得要延遲, 供組件偵測初始設定數據初始化之用
|
|
228
|
+
setTimeout(() => {
|
|
229
|
+
vo.firstSetting = false
|
|
230
|
+
// console.log('firstSetting', vo.firstSetting)
|
|
231
|
+
}, 1)
|
|
232
|
+
|
|
233
|
+
}
|
|
234
|
+
|
|
215
235
|
},
|
|
216
236
|
computed: {
|
|
217
237
|
|
|
238
|
+
syncState: function() {
|
|
239
|
+
let vo = this
|
|
240
|
+
return get(vo, '$store.state.syncState')
|
|
241
|
+
},
|
|
242
|
+
|
|
218
243
|
targets: function() {
|
|
219
244
|
let rs = get(this, `$store.state.targets`)
|
|
220
245
|
rs = sortBy(rs, 'order')
|
|
@@ -383,6 +408,11 @@ export default {
|
|
|
383
408
|
// console.log('rowsChange', rs)
|
|
384
409
|
// console.log('rowsChange cloneDeep(vo.opt.rows)', cloneDeep(vo.opt.rows))
|
|
385
410
|
|
|
411
|
+
//check
|
|
412
|
+
if (!vo.syncState || vo.firstLoading || vo.firstSetting) {
|
|
413
|
+
return
|
|
414
|
+
}
|
|
415
|
+
|
|
386
416
|
//isModified
|
|
387
417
|
vo.isModified = true
|
|
388
418
|
|
|
@@ -788,6 +818,9 @@ export default {
|
|
|
788
818
|
//genOpt
|
|
789
819
|
vo.genOpt()
|
|
790
820
|
|
|
821
|
+
//firstLoading
|
|
822
|
+
vo.firstLoading = false
|
|
823
|
+
|
|
791
824
|
//bShow
|
|
792
825
|
vo.bShow = true
|
|
793
826
|
|
|
@@ -128,34 +128,40 @@
|
|
|
128
128
|
|
|
129
129
|
</div>
|
|
130
130
|
|
|
131
|
-
<template
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
<div
|
|
146
|
-
|
|
131
|
+
<template
|
|
132
|
+
v-if="!firstLoading"
|
|
133
|
+
>
|
|
134
|
+
|
|
135
|
+
<template v-if="items">
|
|
136
|
+
<WAggridVue
|
|
137
|
+
ref="rftable"
|
|
138
|
+
:style="`width:100%;`"
|
|
139
|
+
:height="contentHeight"
|
|
140
|
+
:opt="opt"
|
|
141
|
+
>
|
|
142
|
+
<template v-slot:cell-render="props">
|
|
143
|
+
<template v-if="props.key==='grupsNames'">
|
|
144
|
+
<span v-for="(item, idx) in props.row.grups" :key="idx" style="display:inline-block; line-height:20px; height:20px;">
|
|
145
|
+
<div style="display:flex;">
|
|
146
|
+
<div :style="'padding:0px 5px; border-top-left-radius:4px; border-bottom-left-radius:4px; ' + (item.enable === 'y' ? 'border-left:1px solid #ac2451; border-right:1px solid #9e2149; border-top:1px solid #ac2451; border-bottom:1px solid #ac2451; background:#be295a; color:#fff;' : 'border-left:1px solid #aaaaaa; border-right:1px solid #aaaaaa; border-top:1px solid #aaaaaa; border-bottom:1px solid #aaaaaa; background:#ffffff; color:#555;')">
|
|
147
|
+
{{ item.mode }}
|
|
148
|
+
</div>
|
|
149
|
+
<div :style="'padding:0px 5px; border-top-right-radius:4px; border-bottom-right-radius:4px; ' + (item.enable === 'y' ? '_border-left:1px solid #ac2451; border-right:1px solid #ac2451; border-top:1px solid #ac2451; border-bottom:1px solid #ac2451; background:#d22f64; color:#fff;' : '_border-left:1px solid #aaaaaa; border-right:1px solid #aaaaaa; border-top:1px solid #aaaaaa; border-bottom:1px solid #aaaaaa; background:#eeeeee; color:#555;')">
|
|
150
|
+
{{ item.name }}
|
|
151
|
+
</div>
|
|
147
152
|
</div>
|
|
148
|
-
</
|
|
149
|
-
</
|
|
153
|
+
</span>
|
|
154
|
+
</template>
|
|
155
|
+
<select v-else-if="props.key==='mode'" @change="showVeGrupBlngUsersToggleItemModeByName(props.row.name, $event.target.value)" :disabled="!isEditable">
|
|
156
|
+
<option value="OR" :selected="props.row.mode === 'OR'">OR</option>
|
|
157
|
+
<option value="AND" :selected="props.row.mode === 'AND'">AND</option>
|
|
158
|
+
</select>
|
|
159
|
+
<input v-else-if="props.key==='enable'" type="checkbox" :checked="props.value === 'y'" @click="showVeGrupBlngUsersToggleItemEnableByName(props.row.name)" :disabled="!isEditable" />
|
|
160
|
+
<span v-else>{{ props.value }}</span>
|
|
150
161
|
</template>
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
</select>
|
|
155
|
-
<input v-else-if="props.key==='enable'" type="checkbox" :checked="props.value === 'y'" @click="showVeGrupBlngUsersToggleItemEnableByName(props.row.name)" :disabled="!isEditable" />
|
|
156
|
-
<span v-else>{{ props.value }}</span>
|
|
157
|
-
</template>
|
|
158
|
-
</WAggridVue>
|
|
162
|
+
</WAggridVue>
|
|
163
|
+
</template>
|
|
164
|
+
|
|
159
165
|
</template>
|
|
160
166
|
|
|
161
167
|
<div
|
|
@@ -223,6 +229,8 @@ export default {
|
|
|
223
229
|
panelHeight: 100,
|
|
224
230
|
headHeight: 100,
|
|
225
231
|
|
|
232
|
+
firstLoading: true,
|
|
233
|
+
firstSetting: true,
|
|
226
234
|
isEditable: false,
|
|
227
235
|
isModified: false,
|
|
228
236
|
|
|
@@ -244,9 +252,26 @@ export default {
|
|
|
244
252
|
Vue.prototype.$dg.showVeGrupBlngUsersToggleItemModeByName = vo.showVeGrupBlngUsersToggleItemModeByName
|
|
245
253
|
Vue.prototype.$dg.showVeGrupBlngUsersToggleItemEnableByName = vo.showVeGrupBlngUsersToggleItemEnableByName
|
|
246
254
|
|
|
255
|
+
//firstSetting
|
|
256
|
+
if (vo.firstSetting) {
|
|
257
|
+
// console.log('webInfor', vo.webInfor)
|
|
258
|
+
|
|
259
|
+
//會觸發數據變更再導致opt變更導致觸發rowsChange等事件, 故得要延遲, 供組件偵測初始設定數據初始化之用
|
|
260
|
+
setTimeout(() => {
|
|
261
|
+
vo.firstSetting = false
|
|
262
|
+
// console.log('firstSetting', vo.firstSetting)
|
|
263
|
+
}, 1)
|
|
264
|
+
|
|
265
|
+
}
|
|
266
|
+
|
|
247
267
|
},
|
|
248
268
|
computed: {
|
|
249
269
|
|
|
270
|
+
syncState: function() {
|
|
271
|
+
let vo = this
|
|
272
|
+
return get(vo, '$store.state.syncState')
|
|
273
|
+
},
|
|
274
|
+
|
|
250
275
|
targets: function() {
|
|
251
276
|
let rs = get(this, `$store.state.targets`)
|
|
252
277
|
rs = sortBy(rs, 'order')
|
|
@@ -434,6 +459,11 @@ export default {
|
|
|
434
459
|
// console.log('rowsChange', rs)
|
|
435
460
|
// console.log('rowsChange cloneDeep(vo.opt.rows)', cloneDeep(vo.opt.rows))
|
|
436
461
|
|
|
462
|
+
//check
|
|
463
|
+
if (!vo.syncState || vo.firstLoading || vo.firstSetting) {
|
|
464
|
+
return
|
|
465
|
+
}
|
|
466
|
+
|
|
437
467
|
//isModified
|
|
438
468
|
vo.isModified = true
|
|
439
469
|
|
|
@@ -1112,6 +1142,9 @@ export default {
|
|
|
1112
1142
|
//genOpt
|
|
1113
1143
|
vo.genOpt()
|
|
1114
1144
|
|
|
1145
|
+
//firstLoading
|
|
1146
|
+
vo.firstLoading = false
|
|
1147
|
+
|
|
1115
1148
|
//bShow
|
|
1116
1149
|
vo.bShow = true
|
|
1117
1150
|
|
|
@@ -128,34 +128,40 @@
|
|
|
128
128
|
|
|
129
129
|
</div>
|
|
130
130
|
|
|
131
|
-
<template
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
<div
|
|
146
|
-
|
|
131
|
+
<template
|
|
132
|
+
v-if="!firstLoading"
|
|
133
|
+
>
|
|
134
|
+
|
|
135
|
+
<template v-if="items">
|
|
136
|
+
<WAggridVue
|
|
137
|
+
ref="rftable"
|
|
138
|
+
:style="`width:100%;`"
|
|
139
|
+
:height="contentHeight"
|
|
140
|
+
:opt="opt"
|
|
141
|
+
>
|
|
142
|
+
<template v-slot:cell-render="props">
|
|
143
|
+
<template v-if="props.key==='pemisNames'">
|
|
144
|
+
<span v-for="(item, idx) in props.row.pemis" :key="idx" style="display:inline-block; line-height:20px; height:20px;">
|
|
145
|
+
<div style="display:flex;">
|
|
146
|
+
<div :style="'padding:0px 5px; border-top-left-radius:4px; border-bottom-left-radius:4px; ' + (item.enable === 'y' ? 'border-left:1px solid #ac2451; border-right:1px solid #9e2149; border-top:1px solid #ac2451; border-bottom:1px solid #ac2451; background:#be295a; color:#fff;' : 'border-left:1px solid #aaaaaa; border-right:1px solid #aaaaaa; border-top:1px solid #aaaaaa; border-bottom:1px solid #aaaaaa; background:#ffffff; color:#555;')">
|
|
147
|
+
{{ item.mode }}
|
|
148
|
+
</div>
|
|
149
|
+
<div :style="'padding:0px 5px; border-top-right-radius:4px; border-bottom-right-radius:4px; ' + (item.enable === 'y' ? '_border-left:1px solid #ac2451; border-right:1px solid #ac2451; border-top:1px solid #ac2451; border-bottom:1px solid #ac2451; background:#d22f64; color:#fff;' : '_border-left:1px solid #aaaaaa; border-right:1px solid #aaaaaa; border-top:1px solid #aaaaaa; border-bottom:1px solid #aaaaaa; background:#eeeeee; color:#555;')">
|
|
150
|
+
{{ item.name }}
|
|
151
|
+
</div>
|
|
147
152
|
</div>
|
|
148
|
-
</
|
|
149
|
-
</
|
|
153
|
+
</span>
|
|
154
|
+
</template>
|
|
155
|
+
<select v-else-if="props.key==='mode'" @change="showVePemiBlngGrupsToggleItemModeByName(props.row.name, $event.target.value)" :disabled="!isEditable">
|
|
156
|
+
<option value="OR" :selected="props.row.mode === 'OR'">OR</option>
|
|
157
|
+
<option value="AND" :selected="props.row.mode === 'AND'">AND</option>
|
|
158
|
+
</select>
|
|
159
|
+
<input v-else-if="props.key==='enable'" type="checkbox" :checked="props.value === 'y'" @click="showVePemiBlngGrupsToggleItemEnableByName(props.row.name)" :disabled="!isEditable" />
|
|
160
|
+
<span v-else>{{ props.value }}</span>
|
|
150
161
|
</template>
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
</select>
|
|
155
|
-
<input v-else-if="props.key==='enable'" type="checkbox" :checked="props.value === 'y'" @click="showVePemiBlngGrupsToggleItemEnableByName(props.row.name)" :disabled="!isEditable" />
|
|
156
|
-
<span v-else>{{ props.value }}</span>
|
|
157
|
-
</template>
|
|
158
|
-
</WAggridVue>
|
|
162
|
+
</WAggridVue>
|
|
163
|
+
</template>
|
|
164
|
+
|
|
159
165
|
</template>
|
|
160
166
|
|
|
161
167
|
<div
|
|
@@ -223,6 +229,8 @@ export default {
|
|
|
223
229
|
panelHeight: 100,
|
|
224
230
|
headHeight: 100,
|
|
225
231
|
|
|
232
|
+
firstLoading: true,
|
|
233
|
+
firstSetting: true,
|
|
226
234
|
isEditable: false,
|
|
227
235
|
isModified: false,
|
|
228
236
|
|
|
@@ -244,9 +252,26 @@ export default {
|
|
|
244
252
|
Vue.prototype.$dg.showVePemiBlngGrupsToggleItemModeByName = vo.showVePemiBlngGrupsToggleItemModeByName
|
|
245
253
|
Vue.prototype.$dg.showVePemiBlngGrupsToggleItemEnableByName = vo.showVePemiBlngGrupsToggleItemEnableByName
|
|
246
254
|
|
|
255
|
+
//firstSetting
|
|
256
|
+
if (vo.firstSetting) {
|
|
257
|
+
// console.log('webInfor', vo.webInfor)
|
|
258
|
+
|
|
259
|
+
//會觸發數據變更再導致opt變更導致觸發rowsChange等事件, 故得要延遲, 供組件偵測初始設定數據初始化之用
|
|
260
|
+
setTimeout(() => {
|
|
261
|
+
vo.firstSetting = false
|
|
262
|
+
// console.log('firstSetting', vo.firstSetting)
|
|
263
|
+
}, 1)
|
|
264
|
+
|
|
265
|
+
}
|
|
266
|
+
|
|
247
267
|
},
|
|
248
268
|
computed: {
|
|
249
269
|
|
|
270
|
+
syncState: function() {
|
|
271
|
+
let vo = this
|
|
272
|
+
return get(vo, '$store.state.syncState')
|
|
273
|
+
},
|
|
274
|
+
|
|
250
275
|
targets: function() {
|
|
251
276
|
let rs = get(this, `$store.state.targets`)
|
|
252
277
|
rs = sortBy(rs, 'order')
|
|
@@ -434,6 +459,11 @@ export default {
|
|
|
434
459
|
// console.log('rowsChange', rs)
|
|
435
460
|
// console.log('rowsChange cloneDeep(vo.opt.rows)', cloneDeep(vo.opt.rows))
|
|
436
461
|
|
|
462
|
+
//check
|
|
463
|
+
if (!vo.syncState || vo.firstLoading || vo.firstSetting) {
|
|
464
|
+
return
|
|
465
|
+
}
|
|
466
|
+
|
|
437
467
|
//isModified
|
|
438
468
|
vo.isModified = true
|
|
439
469
|
|
|
@@ -1112,6 +1142,9 @@ export default {
|
|
|
1112
1142
|
//genOpt
|
|
1113
1143
|
vo.genOpt()
|
|
1114
1144
|
|
|
1145
|
+
//firstLoading
|
|
1146
|
+
vo.firstLoading = false
|
|
1147
|
+
|
|
1115
1148
|
//bShow
|
|
1116
1149
|
vo.bShow = true
|
|
1117
1150
|
|