w-web-perm 1.0.4 → 1.0.6

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 (58) hide show
  1. package/README.md +9 -4
  2. package/dist/css/app.dad1d596.css +1 -0
  3. package/dist/index.tmp +1 -1
  4. package/dist/js/app-legacy.4e39a313.js +2 -0
  5. package/dist/js/app-legacy.4e39a313.js.map +1 -0
  6. package/dist/js/app.4e39a313.js +2 -0
  7. package/dist/js/app.4e39a313.js.map +1 -0
  8. package/dist/js/chunk-vendors-legacy.827f1c54.js +13 -0
  9. package/dist/js/chunk-vendors-legacy.827f1c54.js.map +1 -0
  10. package/dist/js/chunk-vendors.827f1c54.js +13 -0
  11. package/dist/js/chunk-vendors.827f1c54.js.map +1 -0
  12. package/dist/w-web-perm.umd.js +2 -2
  13. package/dist/w-web-perm.umd.js.map +1 -1
  14. package/docs/WWebPerm.html +41 -5
  15. package/docs/WWebPerm.mjs.html +341 -25
  16. package/docs/index.html +1 -1
  17. package/{g.mDb.mjs → g.backupDb.mjs} +1 -1
  18. package/g.initialData.mjs +111 -0
  19. package/{g.mInitialTestData.mjs → g.initialTestData.mjs} +1 -1
  20. package/g.provideRuleGroups.mjs +56 -0
  21. package/g.provideTargets.mjs +57 -0
  22. package/g.provideUsers.mjs +45 -0
  23. package/package.json +2 -7
  24. package/public/index.html +1 -1
  25. package/server/WWebPerm.mjs +340 -24
  26. package/server/provideRuleGroups.mjs +65 -0
  27. package/server/provideTargets.mjs +59 -0
  28. package/server/provideUsers.mjs +68 -0
  29. package/src/App.vue +2 -10
  30. package/src/components/Common/CheckYes.vue +2 -2
  31. package/src/components/Common/CheckYesNo.vue +3 -3
  32. package/src/components/Common/LoadingWinBar.vue +1 -1
  33. package/src/components/LayoutContent.vue +37 -68
  34. package/src/components/LayoutContentGroups.vue +68 -62
  35. package/src/components/LayoutContentTargets.vue +56 -54
  36. package/src/components/LayoutContentUsers.vue +66 -61
  37. package/src/components/VeUser.vue +18 -26
  38. package/src/components/ruleGroup.vue +11 -11
  39. package/src/main.js +0 -2
  40. package/src/schema/tables/ruleGroups.mjs +11 -11
  41. package/src/schema/tables/targets.mjs +6 -9
  42. package/src/schema/tables/users.mjs +5 -5
  43. package/src/store/mutations.mjs +324 -69
  44. package/srv.mjs +10 -11
  45. package/tableTags-web-perm.json +1 -1
  46. package/vue.config.js +1 -1
  47. package/dist/css/app.79b4b59b.css +0 -1
  48. package/dist/css/chunk-vendors.99633b53.css +0 -5
  49. package/dist/js/app-legacy.48e6e535.js +0 -2
  50. package/dist/js/app-legacy.48e6e535.js.map +0 -1
  51. package/dist/js/app.7f6428ac.js +0 -2
  52. package/dist/js/app.7f6428ac.js.map +0 -1
  53. package/dist/js/chunk-vendors-legacy.7cb6c366.js +0 -13
  54. package/dist/js/chunk-vendors-legacy.7cb6c366.js.map +0 -1
  55. package/dist/js/chunk-vendors.7cb6c366.js +0 -13
  56. package/dist/js/chunk-vendors.7cb6c366.js.map +0 -1
  57. package/g.mInitialData.mjs +0 -147
  58. package/src/plugins/mVuetify.mjs +0 -12
@@ -7,37 +7,35 @@
7
7
  >
8
8
 
9
9
  <div
10
- style="border-bottom:1px solid #ddd;"
10
+ style="border-bottom:1px solid #ddd; background:#fff;"
11
11
  v-domresize
12
12
  @domresize="resizeHead"
13
13
  >
14
14
 
15
15
  <!-- 標題區 -->
16
- <div style="padding:30px 25px 0px 20px; background:#fff;">
17
- <div style="padding:5px 15px 5px 5px; display:inline-block; border-bottom:3px solid #FF9100;">
18
- <div style="display:flex; align-items:center;">
16
+ <div style="display:inline-block; vertical-align:top; padding:10px 0px 5px 20px;">
17
+ <div style="display:flex; align-items:center; padding:5px 15px 5px 5px; border-bottom:3px solid #FF9100;">
19
18
 
20
- <WIcon
21
- :icon="mdiGamepadCircle"
22
- :color="'#FF9800'"
23
- ></WIcon>
24
-
25
- <div style="padding-left:10px; font-size:1.3rem; color:#d3912c;">
26
- 管理區塊
27
- </div>
19
+ <WIcon
20
+ :icon="mdiGamepadCircle"
21
+ :color="'#FF9800'"
22
+ ></WIcon>
28
23
 
24
+ <div style="padding-left:10px; font-size:1.3rem; color:#d3912c;">
25
+ {{$t('managementTargets')}}
29
26
  </div>
27
+
30
28
  </div>
31
29
  </div>
32
30
 
33
31
  <!-- 編輯設定區 -->
34
- <div style="background:#fff;">
32
+ <div style="display:inline-block; vertical-align:top;">
35
33
 
36
- <div style="padding:20px 20px 15px 20px; background:#fff;">
34
+ <div style="padding:15px 20px 15px 20px; background:#fff;">
37
35
 
38
36
  <div style="display:flex;">
39
37
  <WSwitch
40
- :text="'是否編輯'"
38
+ :text="$t('isEditabled')"
41
39
  :checkedSwitchCircleColor="'#D81B60'"
42
40
  :checkedSwitchCircleColorHover="'#f26'"
43
41
  :checkedSwitchBarColor="'#F8BBD0'"
@@ -50,40 +48,44 @@
50
48
 
51
49
  <div style="padding-top:5px; font-size:0.8rem; _color:#f26;" v-if="isOperatable">
52
50
  <div style="padding:3px 0px;">
53
- 1. 請於各區塊右側點擊按鈕即可進行操作,例如變更名稱、插入或刪除區塊。
51
+ 1. {{$t('targetMsg1')}}
54
52
  </div>
55
53
  <div style="padding:3px 0px;">
56
- 2. 編輯區塊時禁止顯隱子區塊功能。
54
+ 2. {{$t('targetMsg2')}}
57
55
  </div>
58
56
  </div>
59
57
 
60
58
  </div>
61
59
 
62
- <div
63
- style="padding:10px 10px 12px 10px; border-top:1px solid #F48FB1; border-bottom:1px solid #F48FB1; background:#FCE4EC; display:flex; align-items:center; justify-content:flex-end;"
64
- v-if="isModified"
65
- >
66
-
67
- <WButtonChip
68
- :paddingStyle="{v:0,h:11}"
69
- :text="'儲存變更'"
70
- :icon="mdiCloudUploadOutline"
71
- :backgroundColor="'rgba(255,0,50,0.7)'"
72
- :backgroundColorHover="'rgba(255,0,50,0.8)'"
73
- :textColor="'#eee'"
74
- :textColorHover="'#fff'"
75
- :iconColor="'#eee'"
76
- :iconColorHover="'#fff'"
77
- @click="saveRuleGroupsAndTargets"
78
- ></WButtonChip>
60
+ </div>
79
61
 
80
- </div>
62
+ <!-- 儲存變更提示區 -->
63
+ <div
64
+ style="padding:10px 10px 12px 10px; border-top:1px solid #F48FB1; border-bottom:1px solid #F48FB1; background:#FCE4EC; display:flex; align-items:center; justify-content:flex-end;"
65
+ v-if="isModified"
66
+ >
67
+
68
+ <WButtonChip
69
+ :paddingStyle="{v:0,h:11}"
70
+ :text="$t('saveChanges')"
71
+ :icon="mdiCloudUploadOutline"
72
+ :backgroundColor="'rgba(255,0,50,0.7)'"
73
+ :backgroundColorHover="'rgba(255,0,50,0.8)'"
74
+ :textColor="'#eee'"
75
+ :textColorHover="'#fff'"
76
+ :iconColor="'#eee'"
77
+ :iconColorHover="'#fff'"
78
+ @click="saveRuleGroupsAndTargets"
79
+ ></WButtonChip>
81
80
 
82
81
  </div>
83
82
 
84
83
  </div>
85
84
 
86
- <div :style="`padding:${spacePading}px;`" v-if="!firstLoading">
85
+ <div
86
+ :style="`padding:${spacePading}px;`"
87
+ v-if="!firstLoading"
88
+ >
87
89
 
88
90
  <div style="background:#fff; box-shadow:0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);">
89
91
  <WTree
@@ -96,16 +98,16 @@
96
98
  :iconToggleBackgroundColor="'transparent'"
97
99
  :iconToggleBackgroundColorHover="'transparent'"
98
100
  :operatable="isOperatable"
99
- :operateBtnTooltip="'編輯'"
100
- :operateItemTextForRename="'變更名稱'"
101
- :operateItemTextForInsertBefore="'插入前區塊'"
102
- :operateItemTextForInsertChild="'插入子區塊'"
103
- :operateItemTextForInsertAfter="'插入後區塊'"
104
- :operateItemTextForDelete="'刪除區塊'"
105
- :editorRenameSaveBtnText="'儲存'"
101
+ :operateBtnTooltip="$t('edit')"
102
+ :operateItemTextForRename="$t('changeName')"
103
+ :operateItemTextForInsertBefore="$t('insertBefore')"
104
+ :operateItemTextForInsertChild="$t('insertChild')"
105
+ :operateItemTextForInsertAfter="$t('insertAfter')"
106
+ :operateItemTextForDelete="$t('deleteTarget')"
107
+ :editorRenameSaveBtnText="$t('save')"
106
108
  :editorRenameSaveBtnTextColor="'#444'"
107
109
  :editorRenameSaveBtnTextColorHover="'#222'"
108
- :editorRenameCancelBtnText="'取消'"
110
+ :editorRenameCancelBtnText="$t('cancel')"
109
111
  :editorRenameCancelBtnTextColor="'#444'"
110
112
  :editorRenameCancelBtnTextColorHover="'#222'"
111
113
  @click-operate-item="clickOperateItem"
@@ -115,7 +117,7 @@
115
117
  </div>
116
118
 
117
119
  <div style="padding:10px 15px; font-size:0.8rem;" v-else>
118
- 載入中...
120
+ {{$t('waitingData')}}
119
121
  </div>
120
122
 
121
123
  </div>
@@ -168,7 +170,7 @@ export default {
168
170
  headHeight: 100,
169
171
 
170
172
  firstLoading: true,
171
- isOperatable: false,
173
+ isOperatable: true,
172
174
  isModified: false,
173
175
 
174
176
  treeBlocks: null,
@@ -312,7 +314,7 @@ export default {
312
314
  // })
313
315
  .catch((err) => {
314
316
  console.log('catch', err)
315
- vo.$alert(`發生非預期錯誤,請洽管理員`, { type: 'error' })
317
+ vo.$alert(vo.$t('anUnexpectedErrorOccurred'), { type: 'error' })
316
318
  })
317
319
  .finally(() => {
318
320
 
@@ -333,7 +335,7 @@ export default {
333
335
  //fun, 僅處理並回傳新項目, 不處理其他項目
334
336
  let fun = async function() {
335
337
  let id = genID()
336
- let text = '新區塊'
338
+ let text = vo.$t('newTarget')
337
339
  let dataNew = {
338
340
  id,
339
341
  text,
@@ -359,7 +361,7 @@ export default {
359
361
  // })
360
362
  .catch((err) => {
361
363
  console.log('catch', err)
362
- vo.$alert(`發生非預期錯誤,請洽管理員`, { type: 'error' })
364
+ vo.$alert(vo.$t('anUnexpectedErrorOccurred'), { type: 'error' })
363
365
  })
364
366
 
365
367
  },
@@ -474,7 +476,7 @@ export default {
474
476
 
475
477
  //check
476
478
  if (errTemp !== null) {
477
- vo.$alert(`連動變更權限群組失敗: ${errTemp}`, { type: 'error' })
479
+ vo.$alert(`${vo.$t('failedToChangePermissionGroups')}: ${errTemp}`, { type: 'error' })
478
480
  return
479
481
  }
480
482
 
@@ -495,7 +497,7 @@ export default {
495
497
 
496
498
  //check
497
499
  if (errTemp !== null) {
498
- vo.$alert(`清除既有區塊數據失敗: ${errTemp}`, { type: 'error' })
500
+ vo.$alert(`${vo.$t('failedToClearTargets')}: ${errTemp}`, { type: 'error' })
499
501
  return
500
502
  }
501
503
 
@@ -507,7 +509,7 @@ export default {
507
509
 
508
510
  //check
509
511
  if (errTemp !== null) {
510
- vo.$alert(`儲存區塊數據失敗: ${errTemp}`, { type: 'error' })
512
+ vo.$alert(`${vo.$t('failedToSaveTargets')}: ${errTemp}`, { type: 'error' })
511
513
  return
512
514
  }
513
515
 
@@ -515,7 +517,7 @@ export default {
515
517
  vo.isModified = false
516
518
 
517
519
  //alert
518
- vo.$alert(`儲存區塊數據成功`)
520
+ vo.$alert(vo.$t('successfulToSaveTargets'))
519
521
 
520
522
  }
521
523
 
@@ -526,7 +528,7 @@ export default {
526
528
  // })
527
529
  .catch((err) => {
528
530
  console.log('catch', err)
529
- vo.$alert(`發生非預期錯誤,請洽管理員`, { type: 'error' })
531
+ vo.$alert(vo.$t('anUnexpectedErrorOccurred'), { type: 'error' })
530
532
  })
531
533
  .finally(() => {
532
534
 
@@ -7,37 +7,35 @@
7
7
  >
8
8
 
9
9
  <div
10
- style="border-bottom:1px solid #ddd;"
10
+ style="border-bottom:1px solid #ddd; background:#fff;"
11
11
  v-domresize
12
12
  @domresize="resizeHead"
13
13
  >
14
14
 
15
15
  <!-- 標題區 -->
16
- <div style="padding:30px 25px 0px 20px; background:#fff;">
17
- <div style="padding:5px 15px 5px 5px; display:inline-block; border-bottom:3px solid #FF9100;">
18
- <div style="display:flex; align-items:center;">
16
+ <div style="display:inline-block; vertical-align:top; padding:10px 0px 5px 20px;">
17
+ <div style="display:flex; align-items:center; padding:5px 15px 5px 5px; border-bottom:3px solid #FF9100;">
19
18
 
20
- <WIcon
21
- :icon="mdiAccountGroupOutline"
22
- :color="'#FF9800'"
23
- ></WIcon>
24
-
25
- <div style="padding-left:10px; font-size:1.3rem; color:#d3912c;">
26
- 使用者權限
27
- </div>
19
+ <WIcon
20
+ :icon="mdiAccountGroupOutline"
21
+ :color="'#FF9800'"
22
+ ></WIcon>
28
23
 
24
+ <div style="padding-left:10px; font-size:1.3rem; color:#d3912c;">
25
+ {{$t('userPermissions')}}
29
26
  </div>
27
+
30
28
  </div>
31
29
  </div>
32
30
 
33
31
  <!-- 編輯設定區 -->
34
- <div style="background:#fff;">
32
+ <div style="display:inline-block; vertical-align:top;">
35
33
 
36
- <div style="padding:20px 20px 15px 20px; background:#fff;">
34
+ <div style="padding:15px 20px 15px 20px; background:#fff;">
37
35
 
38
36
  <div style="display:flex;">
39
37
  <WSwitch
40
- :text="'是否編輯'"
38
+ :text="$t('isEditabled')"
41
39
  :checkedSwitchCircleColor="'#D81B60'"
42
40
  :checkedSwitchCircleColorHover="'#f26'"
43
41
  :checkedSwitchBarColor="'#F8BBD0'"
@@ -48,60 +46,65 @@
48
46
 
49
47
  <div style="padding-top:5px; font-size:0.8rem; _color:#f26;" v-if="isOperatable">
50
48
  <div style="padding:3px 0px;">
51
- 1. 請依照使用者身份給予適合之權限群組。
49
+ 1. {{$t('userMsg1')}}
52
50
  </div>
53
51
  <div style="padding:3px 0px;">
54
- 2. 請確認新增使用者為核可之使用者。
52
+ 2. {{$t('userMsg2')}}
55
53
  </div>
56
54
  </div>
57
55
 
58
56
  </div>
59
57
 
60
- <div
61
- style="padding:10px 10px 12px 10px; border-top:1px solid #F48FB1; border-bottom:1px solid #F48FB1; background:#FCE4EC; display:flex; align-items:center; justify-content:flex-end;"
62
- v-if="isModified"
63
- >
58
+ </div>
64
59
 
65
- <WButtonChip
66
- :paddingStyle="{v:0,h:11}"
67
- :text="'儲存變更'"
68
- :icon="mdiCloudUploadOutline"
69
- :backgroundColor="'rgba(255,0,50,0.7)'"
70
- :backgroundColorHover="'rgba(255,0,50,0.8)'"
71
- :textColor="'#eee'"
72
- :textColorHover="'#fff'"
73
- :iconColor="'#eee'"
74
- :iconColorHover="'#fff'"
75
- @click="saveGroups"
76
- ></WButtonChip>
77
-
78
- </div>
60
+ <!-- 儲存變更提示區 -->
61
+ <div
62
+ style="padding:10px 10px 12px 10px; border-top:1px solid #F48FB1; border-bottom:1px solid #F48FB1; background:#FCE4EC; display:flex; align-items:center; justify-content:flex-end;"
63
+ v-if="isModified"
64
+ >
65
+
66
+ <WButtonChip
67
+ :paddingStyle="{v:0,h:11}"
68
+ :text="$t('saveChanges')"
69
+ :icon="mdiCloudUploadOutline"
70
+ :backgroundColor="'rgba(255,0,50,0.7)'"
71
+ :backgroundColorHover="'rgba(255,0,50,0.8)'"
72
+ :textColor="'#eee'"
73
+ :textColorHover="'#fff'"
74
+ :iconColor="'#eee'"
75
+ :iconColorHover="'#fff'"
76
+ @click="saveGroups"
77
+ ></WButtonChip>
79
78
 
80
79
  </div>
81
80
 
82
81
  </div>
83
82
 
84
- <div :style="`padding:${spacePading}px;`" v-if="!firstLoading">
83
+ <div
84
+ :style="`padding:${spacePading}px;`"
85
+ v-if="!firstLoading"
86
+ >
85
87
 
86
88
  <div style="background:#fff; box-shadow:0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);">
87
89
 
88
90
  <div
89
- style="padding:20px; display:flex; align-items:center; border-bottom:3px solid #ddd;"
91
+ style="padding:20px 10px 10px 20px; border-bottom:3px solid #ddd;"
90
92
  v-domresize
91
93
  @domresize="resizeGroupInfor"
92
94
  >
93
95
 
94
- <div style="color:#666; font-size:1.1rem;">
95
- 使用者分類清單
96
+ <div style="padding:0px 10px 10px 0px; display:inline-block; vertical-align:middle; color:#666; font-size:1.1rem;">
97
+ {{$t('userList')}}
96
98
  </div>
97
99
 
98
- <template v-if="isOperatable">
99
-
100
- <div style="padding-left:10px;"></div>
100
+ <div
101
+ style="padding:0px 10px 10px 0px; display:inline-block; vertical-align:middle;"
102
+ v-if="isOperatable"
103
+ >
101
104
 
102
105
  <WButtonChip
103
106
  :paddingStyle="{v:0,h:11}"
104
- :text="'新增使用者'"
107
+ :text="$t('addUser')"
105
108
  :icon="mdiAccountPlusOutline"
106
109
  :backgroundColor="'rgba(255,0,50,0.7)'"
107
110
  :backgroundColorHover="'rgba(255,0,50,0.8)'"
@@ -112,7 +115,7 @@
112
115
  @click="clickAddUser"
113
116
  ></WButtonChip>
114
117
 
115
- </template>
118
+ </div>
116
119
 
117
120
  </div>
118
121
 
@@ -129,7 +132,7 @@
129
132
 
130
133
  <div style="padding-bottom:5px; display:flex; align-items:center; border-bottom:1px dashed #ddd;">
131
134
  <div style="padding-right:5px; color:#888; font-size:0.8rem;">
132
- 來源:
135
+ {{$t('from')}}:
133
136
  </div>
134
137
  <div style="color:#000; font-size:0.8rem;">
135
138
  {{getFrom(kus)}}
@@ -147,7 +150,7 @@
147
150
  <WButtonChip
148
151
  :text="u.name"
149
152
  :paddingStyle="{
150
- v: u.isVirtual!=='y' ? 2 : 4,
153
+ v: 2,
151
154
  h: 12,
152
155
  }"
153
156
  :icon="getIsAdmin(u)?mdiChessRook:''"
@@ -157,7 +160,7 @@
157
160
  :textColorHover="'#fff'"
158
161
  :iconColor="'#eee'"
159
162
  :iconColorHover="'#fff'"
160
- :close="isOperatable?(u.isVirtual!=='y'):false"
163
+ :close="isOperatable"
161
164
  @click="clickEditUser(u)"
162
165
  @click-close="clickRemoveUser(u)"
163
166
  ></WButtonChip>
@@ -176,7 +179,7 @@
176
179
  </div>
177
180
 
178
181
  <div style="padding:10px 15px; font-size:0.8rem;" v-else>
179
- 載入中...
182
+ {{$t('waitingData')}}
180
183
  </div>
181
184
 
182
185
  </div>
@@ -223,7 +226,7 @@ export default {
223
226
  groupInforHeight: 100,
224
227
 
225
228
  firstLoading: true,
226
- isOperatable: false,
229
+ isOperatable: true,
227
230
  isModified: false,
228
231
 
229
232
  pickGroupId: '',
@@ -321,8 +324,9 @@ export default {
321
324
 
322
325
  getFrom: function(kus) {
323
326
  // console.log('methods getFrom', kus)
327
+ let vo = this
324
328
  if (!isestr(kus)) {
325
- kus = '無'
329
+ kus = vo.$t('empty')
326
330
  }
327
331
  return kus
328
332
  },
@@ -349,9 +353,8 @@ export default {
349
353
  //u
350
354
  let u = {
351
355
  id: genID(),
352
- name: '新使用者',
356
+ name: vo.$t('newUser'),
353
357
  from: '',
354
- isVirtual: 'n', //新增使用者代表為權限使用者, 故非虛擬使用者
355
358
  isAdmin: 'n',
356
359
  isActive: 'y',
357
360
  }
@@ -364,7 +367,7 @@ export default {
364
367
 
365
368
  //check
366
369
  if (errTemp !== null) {
367
- vo.$alert(`新增權限群組失敗: ${errTemp}`, { type: 'error' })
370
+ vo.$alert(`${vo.$t('failedToAddUser')}: ${errTemp}`, { type: 'error' })
368
371
  }
369
372
 
370
373
  //un
@@ -380,7 +383,7 @@ export default {
380
383
  .catch(() => {})
381
384
 
382
385
  //alert
383
- vo.$alert(`新增使用者成功`)
386
+ vo.$alert(vo.$t('successfulToAddUser'))
384
387
 
385
388
  }
386
389
 
@@ -391,7 +394,7 @@ export default {
391
394
  // })
392
395
  .catch((err) => {
393
396
  console.log('catch', err)
394
- vo.$alert(`發生非預期錯誤,請洽管理員`, { type: 'error' })
397
+ vo.$alert(vo.$t('anUnexpectedErrorOccurred'), { type: 'error' })
395
398
  })
396
399
  .finally(() => {
397
400
 
@@ -412,7 +415,9 @@ export default {
412
415
 
413
416
  //showCheckYesNo
414
417
  let bExit = false
415
- await vo.$dg.showCheckYesNo(`確認是否刪除使用者「${u.name}」?`)
418
+ let t_confirmToDeleteUser = vo.$t('confirmToDeleteUser')
419
+ t_confirmToDeleteUser = t_confirmToDeleteUser.replace('{name}', u.name)
420
+ await vo.$dg.showCheckYesNo(t_confirmToDeleteUser)
416
421
  .catch(() => {
417
422
  bExit = true
418
423
  })
@@ -431,7 +436,7 @@ export default {
431
436
 
432
437
  //check
433
438
  if (errTemp !== null) {
434
- vo.$alert(`刪除使用者失敗: ${errTemp}`, { type: 'error' })
439
+ vo.$alert(`${vo.$t('failedToDeleteUser')}: ${errTemp}`, { type: 'error' })
435
440
  return
436
441
  }
437
442
 
@@ -439,14 +444,14 @@ export default {
439
444
  let un = null
440
445
  await waitFun(() => {
441
446
  un = find(vo.users, (v) => {
442
- return v.id === u.id && v.isVirtual !== 'y' //找到id, 且不能為虛擬使用者, 才能代表已刪除
447
+ return v.id === u.id
443
448
  })
444
449
  return !iseobj(un) //確認g.id已不存在
445
450
  })
446
451
  // console.log('un', un)
447
452
 
448
453
  //alert
449
- vo.$alert(`刪除使用者成功`)
454
+ vo.$alert(vo.$t('successfulToDeleteUser'))
450
455
 
451
456
  }
452
457
 
@@ -457,7 +462,7 @@ export default {
457
462
  // })
458
463
  .catch((err) => {
459
464
  console.log('catch', err)
460
- vo.$alert(`發生非預期錯誤,請洽管理員`, { type: 'error' })
465
+ vo.$alert(vo.$t('anUnexpectedErrorOccurred'), { type: 'error' })
461
466
  })
462
467
  .finally(() => {
463
468
 
@@ -475,7 +480,7 @@ export default {
475
480
 
476
481
  //check
477
482
  if (!vo.isOperatable) {
478
- vo.$alert(`非編輯模式無法查閱使用者詳細資訊`, { type: 'error' })
483
+ vo.$alert(vo.$t('cannotShowUserDetailsInViewMode'), { type: 'error' })
479
484
  return
480
485
  }
481
486