w-web-perm 1.0.12 → 1.0.13

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.
Files changed (68) hide show
  1. package/.vscode/launch.json +0 -1
  2. package/README.md +0 -1
  3. package/dist/css/app.f22995d1.css +1 -0
  4. package/dist/index.tmp +1 -1
  5. package/dist/js/app-legacy.82274c39.js +2 -0
  6. package/dist/js/app-legacy.82274c39.js.map +1 -0
  7. package/dist/js/app.82274c39.js +2 -0
  8. package/dist/js/app.82274c39.js.map +1 -0
  9. package/dist/js/chunk-vendors-legacy.d89048a8.js +13 -0
  10. package/dist/js/chunk-vendors-legacy.d89048a8.js.map +1 -0
  11. package/dist/js/chunk-vendors.d89048a8.js +13 -0
  12. package/dist/js/chunk-vendors.d89048a8.js.map +1 -0
  13. package/dist/w-web-perm.umd.js +2 -2
  14. package/dist/w-web-perm.umd.js.map +1 -1
  15. package/docs/WWebPerm.html +2 -2
  16. package/docs/WWebPerm.mjs.html +212 -64
  17. package/docs/index.html +1 -1
  18. package/g.backupDb.mjs +1 -1
  19. package/g.initialData.mjs +211 -111
  20. package/g.initialTestData.mjs +2 -1
  21. package/g.mjs +0 -0
  22. package/g.provideGrups.mjs +87 -0
  23. package/g.providePemis.mjs +43 -0
  24. package/g.provideTargets.mjs +20 -13
  25. package/g.provideUsers.mjs +45 -13
  26. package/package.json +8 -8
  27. package/script.txt +5 -5
  28. package/server/WWebPerm.mjs +211 -63
  29. package/server/provideGrups.mjs +64 -0
  30. package/server/{provideRuleGroups.mjs → providePemis.mjs} +14 -15
  31. package/server/provideTargets.mjs +8 -5
  32. package/server/provideUsers.mjs +9 -9
  33. package/src/App.vue +16 -3
  34. package/src/components/Layout.vue +13 -5
  35. package/src/components/LayoutContent.vue +31 -16
  36. package/src/components/LayoutContentGrups.vue +793 -0
  37. package/src/components/LayoutContentPemis.vue +793 -0
  38. package/src/components/LayoutContentTargets.vue +481 -307
  39. package/src/components/LayoutContentUsers.vue +796 -291
  40. package/src/components/VeCgrups.vue +926 -0
  41. package/src/components/VeCpemis.vue +926 -0
  42. package/src/components/VeCrules.vue +820 -0
  43. package/src/main.js +2 -2
  44. package/src/perm.mjs +5 -5
  45. package/src/plugins/mShare.mjs +444 -153
  46. package/src/plugins/mUI.mjs +37 -19
  47. package/src/schema/gi.mjs +1 -1
  48. package/src/schema/index.mjs +4 -2
  49. package/src/schema/tables/grups.mjs +154 -0
  50. package/src/schema/tables/{ruleGroups.mjs → pemis.mjs} +27 -16
  51. package/src/schema/tables/targets.mjs +49 -16
  52. package/src/schema/tables/users.mjs +55 -27
  53. package/src/store/mutations.mjs +375 -150
  54. package/srv.mjs +2 -2
  55. package/tableTags-web-perm.json +1 -1
  56. package/dist/css/app.f6c50bec.css +0 -1
  57. package/dist/js/app-legacy.767522f1.js +0 -2
  58. package/dist/js/app-legacy.767522f1.js.map +0 -1
  59. package/dist/js/app.767522f1.js +0 -2
  60. package/dist/js/app.767522f1.js.map +0 -1
  61. package/dist/js/chunk-vendors-legacy.b0d63e17.js +0 -13
  62. package/dist/js/chunk-vendors-legacy.b0d63e17.js.map +0 -1
  63. package/dist/js/chunk-vendors.b0d63e17.js +0 -13
  64. package/dist/js/chunk-vendors.b0d63e17.js.map +0 -1
  65. package/g.provideRuleGroups.mjs +0 -56
  66. package/src/components/LayoutContentGroups.vue +0 -671
  67. package/src/components/VeUser.vue +0 -446
  68. package/src/components/ruleGroup.vue +0 -645
@@ -12,19 +12,19 @@ async function provideUsers(url, from, users) {
12
12
 
13
13
  //ks
14
14
  let ks = [
15
- 'id',
16
- 'order',
15
+ // 'id',
16
+ 'order', //order大部分由外部給予, 得要開啟
17
17
  'name',
18
18
  'email',
19
19
  'description',
20
20
  'from',
21
- 'ruleGroupsIds',
21
+ 'cgrups',
22
22
  'isAdmin',
23
- 'userId',
24
- 'timeCreate',
25
- 'userIdUpdate',
26
- 'timeUpdate',
27
23
  'isActive',
24
+ // 'userId',
25
+ // 'timeCreate',
26
+ // 'userIdUpdate',
27
+ // 'timeUpdate',
28
28
  ]
29
29
 
30
30
  //ltdtpick
@@ -47,7 +47,7 @@ async function provideUsers(url, from, users) {
47
47
  .then((res) => {
48
48
  // console.log(res)
49
49
  let r = {
50
- msg: '成功傳輸Users清單',
50
+ msg: '成功傳輸user清單',
51
51
  res,
52
52
  }
53
53
  pm.resolve(r)
@@ -55,7 +55,7 @@ async function provideUsers(url, from, users) {
55
55
  .catch((err) => {
56
56
  // console.log(err)
57
57
  let r = {
58
- msg: '無法傳輸Users清單',
58
+ msg: '無法傳輸user清單',
59
59
  res: err,
60
60
  }
61
61
  pm.reject(r)
package/src/App.vue CHANGED
@@ -14,7 +14,9 @@
14
14
  <CheckYesNo></CheckYesNo>
15
15
  <CheckYes></CheckYes>
16
16
 
17
- <VeUser></VeUser>
17
+ <VeCrules></VeCrules>
18
+ <VeCpemis></VeCpemis>
19
+ <VeCgrups></VeCgrups>
18
20
 
19
21
  </div>
20
22
  </template>
@@ -30,7 +32,9 @@ import CheckYesNo from './components/Common/CheckYesNo.vue'
30
32
  import CheckYes from './components/Common/CheckYes.vue'
31
33
  import LayoutState from './components/LayoutState.vue'
32
34
  import Layout from './components/Layout.vue'
33
- import VeUser from './components/VeUser.vue'
35
+ import VeCrules from './components/VeCrules.vue'
36
+ import VeCpemis from './components/VeCpemis.vue'
37
+ import VeCgrups from './components/VeCgrups.vue'
34
38
 
35
39
 
36
40
  export default {
@@ -40,7 +44,9 @@ export default {
40
44
  CheckYes,
41
45
  LayoutState,
42
46
  Layout,
43
- VeUser,
47
+ VeCrules,
48
+ VeCpemis,
49
+ VeCgrups,
44
50
  },
45
51
  data: function() {
46
52
  return {
@@ -96,6 +102,13 @@ export default {
96
102
  })
97
103
  vo.ll = ll
98
104
 
105
+ },
106
+ mounted: function() {
107
+ let vo = this
108
+
109
+ //set, 把目前vo儲存至window供外部非vue環境使用
110
+ window.$vo = vo
111
+
99
112
  },
100
113
  computed: {
101
114
 
@@ -51,8 +51,8 @@
51
51
 
52
52
  <script>
53
53
  import { mdiMenu } from '@mdi/js/mdi.js'
54
- import get from 'lodash-es/get.js'
55
- // import cloneDeep from 'lodash-es/cloneDeep.js'
54
+ import get from 'lodash-es/get.js'
55
+ // import cloneDeep from 'lodash-es/cloneDeep.js'
56
56
  import isestr from 'wsemi/src/isestr.mjs'
57
57
  import WTextSelect from 'w-component-vue/src/components/WTextSelect.vue'
58
58
  import WButtonCircle from 'w-component-vue/src/components/WButtonCircle.vue'
@@ -106,11 +106,15 @@ export default {
106
106
  computed: {
107
107
 
108
108
  viewState: function() {
109
- return get(this, `$store.state.viewState`)
109
+ return get(this, `$store.state.viewState`, '')
110
110
  },
111
111
 
112
112
  heightToolbar: function() {
113
- return get(this, `$store.state.heightToolbar`)
113
+ //console.log('computed heightToolbar')
114
+
115
+ let vo = this
116
+
117
+ return get(vo, `$store.state.heightToolbar`, 0)
114
118
  },
115
119
 
116
120
  webName: {
@@ -131,7 +135,11 @@ export default {
131
135
  },
132
136
 
133
137
  webLogo: function() {
134
- return get(this, `$store.state.webInfor.webLogo`)
138
+ //console.log('computed webLogo')
139
+
140
+ let vo = this
141
+
142
+ return get(vo, `$store.state.webInfor.webLogo`, '')
135
143
  },
136
144
 
137
145
  },
@@ -28,13 +28,13 @@
28
28
  :itemActive="menuActive"
29
29
  :item-text-color="'#222'"
30
30
  :item-text-color-hover="'#444'"
31
- :item-text-color-active="'#EF6C00'"
31
+ :item-text-color-active="'#fff'"
32
32
  :item-icon-color="'#222'"
33
33
  :item-icon-color-hover="'#444'"
34
- :item-icon-color-active="'#EF6C00'"
34
+ :item-icon-color-active="'#eee'"
35
35
  :item-background-color="'#fff'"
36
36
  :item-background-color-hover="'#f2f2f2'"
37
- :item-background-color-active="'#FFF3E0'"
37
+ :item-background-color-active="'#666'"
38
38
  :paddingStyle="{v:15,h:15}"
39
39
  @click="(menu)=>{menuKey=menu.key}"
40
40
  ></WListVertical>
@@ -68,14 +68,22 @@
68
68
  <template>
69
69
 
70
70
  <LayoutContentTargets
71
+ :drawer="drawer"
71
72
  v-if="menuKey==='targets'"
72
73
  ></LayoutContentTargets>
73
74
 
74
- <LayoutContentGroups
75
- v-if="menuKey==='groups'"
76
- ></LayoutContentGroups>
75
+ <LayoutContentPemis
76
+ :drawer="drawer"
77
+ v-if="menuKey==='pemis'"
78
+ ></LayoutContentPemis>
79
+
80
+ <LayoutContentGrups
81
+ :drawer="drawer"
82
+ v-if="menuKey==='grups'"
83
+ ></LayoutContentGrups>
77
84
 
78
85
  <LayoutContentUsers
86
+ :drawer="drawer"
79
87
  v-if="menuKey==='users'"
80
88
  ></LayoutContentUsers>
81
89
 
@@ -120,24 +128,26 @@
120
128
  </template>
121
129
 
122
130
  <script>
123
- import { mdiGamepadCircle, mdiStackOverflow, mdiAccountGroupOutline } from '@mdi/js/mdi.js'
124
- import get from 'lodash-es/get.js'
125
- import find from 'lodash-es/find.js'
131
+ import { mdiGamepadCircle, mdiStackOverflow, mdiSelectGroup, mdiAccountGroupOutline } from '@mdi/js/mdi.js'
132
+ import get from 'lodash-es/get.js'
133
+ import find from 'lodash-es/find.js'
126
134
  import WDrawer from 'w-component-vue/src/components/WDrawer.vue'
127
- import WButtonCircle from 'w-component-vue/src/components/WButtonCircle.vue'
128
135
  import WListVertical from 'w-component-vue/src/components/WListVertical.vue'
136
+ import WButtonCircle from 'w-component-vue/src/components/WButtonCircle.vue'
129
137
  import LayoutContentTargets from './LayoutContentTargets.vue'
130
- import LayoutContentGroups from './LayoutContentGroups.vue'
138
+ import LayoutContentPemis from './LayoutContentPemis.vue'
139
+ import LayoutContentGrups from './LayoutContentGrups.vue'
131
140
  import LayoutContentUsers from './LayoutContentUsers.vue'
132
141
 
133
142
 
134
143
  export default {
135
144
  components: {
136
145
  WDrawer,
137
- WButtonCircle,
138
146
  WListVertical,
147
+ WButtonCircle,
139
148
  LayoutContentTargets,
140
- LayoutContentGroups,
149
+ LayoutContentPemis,
150
+ LayoutContentGrups,
141
151
  LayoutContentUsers,
142
152
  },
143
153
  props: {
@@ -172,13 +182,18 @@ export default {
172
182
  icon: mdiGamepadCircle,
173
183
  },
174
184
  {
175
- key: 'groups',
176
- text: vo.$t('permissionGroups'),
185
+ key: 'pemis',
186
+ text: vo.$t('managementPemis'),
177
187
  icon: mdiStackOverflow,
178
188
  },
189
+ {
190
+ key: 'grups',
191
+ text: vo.$t('managementGrups'),
192
+ icon: mdiSelectGroup,
193
+ },
179
194
  {
180
195
  key: 'users',
181
- text: vo.$t('userPermissions'),
196
+ text: vo.$t('managementUsers'),
182
197
  icon: mdiAccountGroupOutline,
183
198
  },
184
199
  ]