mooho-base-admin-plus 0.4.68 → 0.4.70

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 (49) hide show
  1. package/package/mooho-base-admin-plus.min.esm.js +461 -325
  2. package/package/mooho-base-admin-plus.min.js +13 -13
  3. package/package.json +1 -1
  4. package/public/web.config +16 -0
  5. package/src/api/mailTemplate.js +23 -0
  6. package/src/components/upload/upload-attachment.vue +22 -15
  7. package/src/components/view/view-form.vue +3 -0
  8. package/src/pages/system/mailTemplate.vue +34 -2
  9. package/src/pages/system/setting.vue +26 -0
  10. package/src/setting.js +1 -1
  11. package/test/setting.env.js +1 -1
  12. package/dist/fa-brands-400.8ea87917.woff2 +0 -0
  13. package/dist/fa-brands-400.a3b98177.svg +0 -3717
  14. package/dist/fa-brands-400.cda59d6e.ttf +0 -0
  15. package/dist/fa-brands-400.e4299464.eot +0 -0
  16. package/dist/fa-brands-400.f9217f66.woff +0 -0
  17. package/dist/fa-regular-400.79d08806.eot +0 -0
  18. package/dist/fa-regular-400.be0a0849.svg +0 -801
  19. package/dist/fa-regular-400.cb9e9e69.woff +0 -0
  20. package/dist/fa-regular-400.e42a8844.woff2 +0 -0
  21. package/dist/fa-regular-400.e8711bbb.ttf +0 -0
  22. package/dist/fa-solid-900.373c04fd.eot +0 -0
  23. package/dist/fa-solid-900.3f6d3488.woff +0 -0
  24. package/dist/fa-solid-900.9674eb1b.svg +0 -5034
  25. package/dist/fa-solid-900.9834b82a.woff2 +0 -0
  26. package/dist/fa-solid-900.af639750.ttf +0 -0
  27. package/dist/favicon.ico +0 -0
  28. package/dist/header-theme-dark.932bb39b.svg +0 -40
  29. package/dist/header-theme-primary.10194387.svg +0 -40
  30. package/dist/index.a0dbf414.css +0 -4
  31. package/dist/index.eaecbd5c.js +0 -562
  32. package/dist/index.html +0 -19
  33. package/dist/ionicons.503dc6b7.woff2 +0 -0
  34. package/dist/nav-theme-dark.d93c9dff.svg +0 -40
  35. package/dist/nav-theme-light.f039dce7.svg +0 -40
  36. package/dist/setting.js +0 -45
  37. package/dist/static/images/app-barcode.png +0 -0
  38. package/dist/static/images/login/bg.png +0 -0
  39. package/dist/static/images/login/logo.png +0 -0
  40. package/dist/static/images/login/password-active.png +0 -0
  41. package/dist/static/images/login/password-default.png +0 -0
  42. package/dist/static/images/login/signIn-img.png +0 -0
  43. package/dist/static/images/login/user-active.png +0 -0
  44. package/dist/static/images/login/user-default.png +0 -0
  45. package/dist/static/images/logo-dark.png +0 -0
  46. package/dist/static/images/logo-small.png +0 -0
  47. package/dist/static/images/logo.png +0 -0
  48. package/dist/static/images/logo.svg +0 -510
  49. package/dist/static/images/no-image.png +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mooho-base-admin-plus",
3
3
  "description": "MOOHO basic framework for admin by Vue3",
4
- "version": "0.4.68",
4
+ "version": "0.4.70",
5
5
  "author": "jinyifan <jinyifan@mooho.com.cn>",
6
6
  "dotnetVersion": "1.4.0",
7
7
  "license": "MIT",
@@ -0,0 +1,16 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <configuration>
3
+ <system.webServer>
4
+ <rewrite>
5
+ <rules>
6
+ <rule name="a" enabled="true" patternSyntax="Wildcard">
7
+ <match url="*" />
8
+ <conditions>
9
+ <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
10
+ </conditions>
11
+ <action type="Rewrite" url="/admin/" />
12
+ </rule>
13
+ </rules>
14
+ </rewrite>
15
+ </system.webServer>
16
+ </configuration>
@@ -0,0 +1,23 @@
1
+ import request from '../libs/request';
2
+ import dateFormat from 'date-fns/format';
3
+ import saveAs from 'file-saver';
4
+
5
+ const res = 'MailTemplate';
6
+
7
+ export default {
8
+ async exportFile(ids) {
9
+ const result = await request({
10
+ url: `api/${res}/exportFile`,
11
+ method: 'post',
12
+ responseType: 'blob',
13
+ data: {
14
+ ids
15
+ }
16
+ });
17
+
18
+ const blob = new Blob([result], {
19
+ type: 'application/octet-stream'
20
+ });
21
+ saveAs(blob, 'MailTemplate-' + dateFormat(new Date(), 'yyyyMMddHHmmss') + '.mt');
22
+ }
23
+ };
@@ -10,6 +10,7 @@
10
10
  :on-remove="onUploadRemove"
11
11
  :disabled="readonly"
12
12
  :accept="accept"
13
+ :multiple="true"
13
14
  >
14
15
  <Button v-if="!readonly" :size="size" icon="ios-cloud-upload-outline">{{ $t('Front_Btn_Upload') }}</Button>
15
16
  </Upload>
@@ -21,6 +22,12 @@
21
22
 
22
23
  export default {
23
24
  mixins: [mixinPage],
25
+ data() {
26
+ return {
27
+ fileList: [],
28
+ defaultList: []
29
+ };
30
+ },
24
31
  props: {
25
32
  // 值
26
33
  modelValue: {
@@ -59,29 +66,29 @@
59
66
  // 上传地址
60
67
  uploadAction() {
61
68
  return this.url == null ? this.uploadURL : this.url;
62
- },
63
- fileList() {
69
+ }
70
+ },
71
+ methods: {
72
+ // 设置初始值
73
+ setData(value) {
64
74
  let list = [];
65
- if (this.modelValue && this.modelValue !== '') {
75
+ if (value && value !== '') {
66
76
  try {
67
- list = JSON.parse(this.modelValue);
77
+ list = JSON.parse(value).map(item => {
78
+ return {
79
+ ...item,
80
+ url: this.getAttachmentUrl(item.file, item.name)
81
+ };
82
+ });
68
83
  } catch (e) {
69
84
  // console.log(e);
70
85
  }
71
86
  }
72
87
 
73
- return list;
88
+ //this.$emit('update:modelValue', value);
89
+ this.fileList = list;
90
+ this.defaultList = list;
74
91
  },
75
- defaultList() {
76
- return this.fileList.map(item => {
77
- return {
78
- ...item,
79
- url: this.getAttachmentUrl(item.file, item.name)
80
- };
81
- });
82
- }
83
- },
84
- methods: {
85
92
  // 上传之前
86
93
  beforeUpload() {
87
94
  if (this.maxCount != null) {
@@ -372,6 +372,7 @@
372
372
  <template v-else-if="column.controlType === 'Attachment'">
373
373
  <upload-attachment
374
374
  v-if="!readonly && !column.isReadonly"
375
+ :ref="'attachment_' + column.code"
375
376
  :model-value="parseData(data, column.code)"
376
377
  @update:model-value="$event => setData(data, column.code, $event)"
377
378
  :maxCount="column.maxLength"
@@ -554,6 +555,8 @@
554
555
  }
555
556
  }
556
557
  });
558
+ } else if (column.controlType == 'Attachment' && this.$refs['attachment_' + column.code]) {
559
+ this.$refs['attachment_' + column.code][0].setData(this.parseData(this.data, column.code));
557
560
  }
558
561
  });
559
562
  }
@@ -4,13 +4,23 @@
4
4
  <PageHeader :title="$route.meta.title" :content="$route.meta.description" hidden-breadcrumb />
5
5
  </div>
6
6
  <Card :bordered="false" dis-hover class="ivu-mt">
7
- <view-table ref="table" view-code="MailTemplate" @create="$refs.form.open()" @edit="({ row, index }) => $refs.form.open(row)"></view-table>
7
+ <view-table ref="table" view-code="MailTemplate" :selectEnable="true" @create="$refs.form.open()" @edit="({ row, index }) => $refs.form.open(row)">
8
+ <template #filterCommand>
9
+ <Button size="small" type="info" custom-icon="fa fa-cloud-download-alt" @click="exportFile()">{{ $t('Front_Btn_Export') }}</Button>
10
+ <file-upload url="api/MailTemplate/importFile" accept=".mt" @on-success="importFileSuccess">
11
+ <template #>
12
+ <Button type="primary" custom-icon="fa fa-cloud-upload-alt" size="small">{{ $t('Front_Btn_Import') }}</Button>
13
+ </template>
14
+ </file-upload>
15
+ </template>
16
+ </view-table>
8
17
  </Card>
9
18
  <modal-form ref="form" view-code="MailTemplateEdit" @on-after-save="$refs.table.loadData()" />
10
19
  </div>
11
20
  </template>
12
21
  <script>
13
22
  import mixinPage from '../../mixins/page';
23
+ import mailTemplateApi from '../../api/mailTemplate';
14
24
 
15
25
  export default {
16
26
  name: 'system-mailTemplate',
@@ -21,6 +31,28 @@
21
31
  },
22
32
  computed: {},
23
33
  created() {},
24
- methods: {}
34
+ methods: {
35
+ // 导出文件
36
+ exportFile() {
37
+ let ids = this.$refs.table.getSelected().map(x => {
38
+ return x.id;
39
+ });
40
+ if (ids.length > 0) {
41
+ mailTemplateApi.exportFile(ids);
42
+ } else {
43
+ this.error('Front_Msg_Please_Select_Export_Item');
44
+ }
45
+ },
46
+ // 导入成功
47
+ importFileSuccess(res) {
48
+ if (res.code == 0) {
49
+ this.success('Front_Msg_Success', () => {
50
+ this.$refs.table.loadData();
51
+ });
52
+ } else {
53
+ this.error(res.message);
54
+ }
55
+ }
56
+ }
25
57
  };
26
58
  </script>
@@ -0,0 +1,26 @@
1
+ <template>
2
+ <div>
3
+ <div class="i-layout-page-header">
4
+ <PageHeader :title="$route.meta.title" :content="$route.meta.description" hidden-breadcrumb />
5
+ </div>
6
+ <Card :bordered="false" dis-hover class="ivu-mt">
7
+ <view-table ref="table" view-code="Setting" @create="$refs.form.open()" @edit="({ row, index }) => $refs.form.open(row)"></view-table>
8
+ </Card>
9
+ <modal-form ref="form" view-code="SettingEdit" @on-after-save="$refs.table.loadData()" />
10
+ </div>
11
+ </template>
12
+ <script>
13
+ import mixinPage from '../../mixins/page';
14
+
15
+ export default {
16
+ name: 'system-setting',
17
+ mixins: [mixinPage],
18
+ components: {},
19
+ data() {
20
+ return {};
21
+ },
22
+ computed: {},
23
+ created() {},
24
+ methods: {}
25
+ };
26
+ </script>
package/src/setting.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Admin Plus 业务配置
2
+ * 默认配置
3
3
  * */
4
4
 
5
5
  //const basePath = import.meta.env.VITE_APP_BASE_PATH;
@@ -16,7 +16,7 @@ const Setting = {
16
16
  // 生产环境构建文件的目录名
17
17
  outputDir: 'dist',
18
18
  // 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录。
19
- assetsDir: '',
19
+ assetsDir: 'assets',
20
20
  // 开发环境每次保存时 lint 代码,会将 lint 错误输出为编译警告
21
21
  // true || false || error
22
22
  lintOnSave: true
Binary file