mooho-base-admin-plus 0.1.51 → 0.1.54

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 (43) hide show
  1. package/.env +1 -1
  2. package/dist/fa-brands-400.8ea87917.woff2 +0 -0
  3. package/dist/fa-brands-400.a3b98177.svg +3717 -0
  4. package/dist/fa-brands-400.cda59d6e.ttf +0 -0
  5. package/dist/fa-brands-400.e4299464.eot +0 -0
  6. package/dist/fa-brands-400.f9217f66.woff +0 -0
  7. package/dist/fa-regular-400.79d08806.eot +0 -0
  8. package/dist/fa-regular-400.be0a0849.svg +801 -0
  9. package/dist/fa-regular-400.cb9e9e69.woff +0 -0
  10. package/dist/fa-regular-400.e42a8844.woff2 +0 -0
  11. package/dist/fa-regular-400.e8711bbb.ttf +0 -0
  12. package/dist/fa-solid-900.373c04fd.eot +0 -0
  13. package/dist/fa-solid-900.3f6d3488.woff +0 -0
  14. package/dist/fa-solid-900.9674eb1b.svg +5034 -0
  15. package/dist/fa-solid-900.9834b82a.woff2 +0 -0
  16. package/dist/fa-solid-900.af639750.ttf +0 -0
  17. package/dist/header-theme-dark.932bb39b.svg +40 -0
  18. package/dist/header-theme-primary.10194387.svg +40 -0
  19. package/dist/index.html +19 -0
  20. package/dist/ionicons.13d29fa1.ttf +0 -0
  21. package/dist/ionicons.503dc6b7.woff2 +0 -0
  22. package/dist/ionicons.fe9ddf45.woff +0 -0
  23. package/dist/mooho-base-admin-plus.min.js +55 -55
  24. package/dist/nav-theme-dark.d93c9dff.svg +40 -0
  25. package/dist/nav-theme-light.f039dce7.svg +40 -0
  26. package/dist/style.css +2 -2
  27. package/package.json +2 -2
  28. package/src/layouts/basic-layout/index.vue +1 -1
  29. package/src/pages/system/user.vue +34 -0
  30. package/src/styles/index.less +1 -1
  31. package/vite.config.js +7 -17
  32. package/dist/mooho-base-admin-plus.min.esm.js +0 -120225
  33. package/src/styles/font/demo.css +0 -539
  34. package/src/styles/font/demo_index.html +0 -372
  35. package/src/styles/font/icon-demo/demo.css +0 -539
  36. package/src/styles/font/icon-demo/demo_index.html +0 -423
  37. package/src/styles/font/icon-demo/iconfont.css +0 -61
  38. package/src/styles/font/icon-demo/iconfont.eot +0 -0
  39. package/src/styles/font/icon-demo/iconfont.js +0 -1
  40. package/src/styles/font/icon-demo/iconfont.svg +0 -59
  41. package/src/styles/font/icon-demo/iconfont.ttf +0 -0
  42. package/src/styles/font/icon-demo/iconfont.woff +0 -0
  43. package/src/styles/font/icon-demo/iconfont.woff2 +0 -0
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "mooho-base-admin-plus",
3
3
  "description": "MOOHO basic framework for admin by Vue3",
4
- "version": "0.1.51",
4
+ "version": "0.1.54",
5
5
  "author": "jinyifan <jinyifan@mooho.com.cn>",
6
6
  "dotnetVersion": "1.3.97",
7
7
  "license": "MIT",
8
8
  "private": false,
9
- "main": "./dist/mooho-base-admin-plus.min.esm.js",
9
+ "main": "./dist/mooho-base-admin-plus.min.js",
10
10
  "scripts": {
11
11
  "dev": "vite --open",
12
12
  "build": "vite build",
@@ -33,7 +33,7 @@
33
33
  <div class="i-layout-content-main">
34
34
  <router-view #default="{ Component }">
35
35
  <keep-alive :include="keepAlive">
36
- <component :is="Component" v-if="loadRouter" />
36
+ <component :is="Component" :key="$route.name" v-if="loadRouter" />
37
37
  </keep-alive>
38
38
  </router-view>
39
39
  </div>
@@ -8,6 +8,7 @@
8
8
  <template #command="{ row }">
9
9
  <Button size="small" title="角色" type="info" custom-icon="fa fa-users" @click="$refs.userRoleTable.open({ userID: row.id })"></Button>
10
10
  <Button size="small" title="编辑" type="primary" custom-icon="fa fa-edit" @click="$refs.form.open(row)"></Button>
11
+ <Button size="small" title="数据权限" type="primary" custom-icon="fa fa-sitemap" @click="openDataPermission(row)"></Button>
11
12
  <Button size="small" title="删除" type="warning" custom-icon="fa fa-trash-alt" @click="$refs.table.remove(row)"></Button>
12
13
  </template>
13
14
  </view-table>
@@ -69,6 +70,11 @@
69
70
  <Button type="primary" custom-icon="fa fa-save" @click="userRoleSave">保存</Button>
70
71
  </template>
71
72
  </modal-form>
73
+ <modal-form ref="dataPermissionForm" view-code="DataPermission">
74
+ <template #footer>
75
+ <Button type="primary" custom-icon="fa fa-save" @click="saveDataPermission">保存</Button>
76
+ </template>
77
+ </modal-form>
72
78
  </div>
73
79
  </template>
74
80
  <script>
@@ -83,6 +89,7 @@
83
89
  components: {},
84
90
  data() {
85
91
  return {
92
+ user: null,
86
93
  userID: null,
87
94
  factories: []
88
95
  };
@@ -244,6 +251,33 @@
244
251
  await userApi.resetPassword(this.$refs.form.data.id);
245
252
  this.success('已重置为初始密码!');
246
253
  });
254
+ },
255
+ // 打开数据权限
256
+ openDataPermission(row) {
257
+ let data = {};
258
+ if (!!(row.dataPermission || '').trim()) {
259
+ data = JSON.parse(row.dataPermission);
260
+ }
261
+
262
+ this.user = row;
263
+ this.$refs.dataPermissionForm.open(data);
264
+ },
265
+ // 数据权限保存
266
+ saveDataPermission() {
267
+ let data = this.$refs.dataPermissionForm.data;
268
+ for (let key in data) {
269
+ if (typeof data[key] == 'object') {
270
+ delete data[key];
271
+ }
272
+ }
273
+
274
+ this.user.dataPermission = JSON.stringify(data);
275
+
276
+ this.confirm('确定要保存数据权限吗?', async () => {
277
+ await modelApi.update('User', this.user);
278
+ this.success('操作成功!');
279
+ this.$refs.dataPermissionForm.close();
280
+ });
247
281
  }
248
282
  }
249
283
  };
@@ -1,6 +1,6 @@
1
1
  @import "./default/index.less";
2
2
  @import "./font/iconfont.css";
3
- @import "./font/icon-demo/iconfont.css";
3
+ //@import "./font/icon-demo/iconfont.css";
4
4
  @import "./setting.less";
5
5
  @import "./common.less";
6
6
 
package/vite.config.js CHANGED
@@ -11,11 +11,13 @@ export default defineConfig({
11
11
  sourcemap: false, // 输出.map文件
12
12
  outDir: Setting.outputDir,
13
13
  assetsDir: Setting.assetsDir,
14
- // minify: 'terser', // 混淆器,terser构建后文件体积更小
15
- lib: {
16
- entry: resolve(__dirname, './src/index.js'),
17
- name: 'moohoBaseAdminPlus'
18
- },
14
+ cssCodeSplit: false,
15
+ // assetsInlineLimit: 4096,
16
+ // // minify: 'terser', // 混淆器,terser构建后文件体积更小
17
+ // lib: {
18
+ // entry: resolve(__dirname, './src/index.js'),
19
+ // name: 'moohoBaseAdminPlus'
20
+ // },
19
21
  rollupOptions: {
20
22
  context: 'globalThis',
21
23
  preserveEntrySignatures: 'strict',
@@ -32,18 +34,6 @@ export default defineConfig({
32
34
  inlineDynamicImports: false,
33
35
  manualChunks: undefined,
34
36
  globals: { vue: 'Vue', 'view-ui-plus': 'viewUiPlus' }
35
- },
36
- {
37
- format: 'es',
38
- exports: 'named',
39
- sourcemap: false,
40
- entryFileNames: 'mooho-base-admin-plus.min.esm.js',
41
- chunkFileNames: '[name].js',
42
- assetFileNames: '[name].[ext]',
43
- namespaceToStringTag: true,
44
- inlineDynamicImports: false,
45
- manualChunks: undefined,
46
- globals: { vue: 'Vue', 'view-ui-plus': 'viewUiPlus' }
47
37
  }
48
38
  ]
49
39
  }