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.
- package/package/mooho-base-admin-plus.min.esm.js +461 -325
- package/package/mooho-base-admin-plus.min.js +13 -13
- package/package.json +1 -1
- package/public/web.config +16 -0
- package/src/api/mailTemplate.js +23 -0
- package/src/components/upload/upload-attachment.vue +22 -15
- package/src/components/view/view-form.vue +3 -0
- package/src/pages/system/mailTemplate.vue +34 -2
- package/src/pages/system/setting.vue +26 -0
- package/src/setting.js +1 -1
- package/test/setting.env.js +1 -1
- package/dist/fa-brands-400.8ea87917.woff2 +0 -0
- package/dist/fa-brands-400.a3b98177.svg +0 -3717
- package/dist/fa-brands-400.cda59d6e.ttf +0 -0
- package/dist/fa-brands-400.e4299464.eot +0 -0
- package/dist/fa-brands-400.f9217f66.woff +0 -0
- package/dist/fa-regular-400.79d08806.eot +0 -0
- package/dist/fa-regular-400.be0a0849.svg +0 -801
- package/dist/fa-regular-400.cb9e9e69.woff +0 -0
- package/dist/fa-regular-400.e42a8844.woff2 +0 -0
- package/dist/fa-regular-400.e8711bbb.ttf +0 -0
- package/dist/fa-solid-900.373c04fd.eot +0 -0
- package/dist/fa-solid-900.3f6d3488.woff +0 -0
- package/dist/fa-solid-900.9674eb1b.svg +0 -5034
- package/dist/fa-solid-900.9834b82a.woff2 +0 -0
- package/dist/fa-solid-900.af639750.ttf +0 -0
- package/dist/favicon.ico +0 -0
- package/dist/header-theme-dark.932bb39b.svg +0 -40
- package/dist/header-theme-primary.10194387.svg +0 -40
- package/dist/index.a0dbf414.css +0 -4
- package/dist/index.eaecbd5c.js +0 -562
- package/dist/index.html +0 -19
- package/dist/ionicons.503dc6b7.woff2 +0 -0
- package/dist/nav-theme-dark.d93c9dff.svg +0 -40
- package/dist/nav-theme-light.f039dce7.svg +0 -40
- package/dist/setting.js +0 -45
- package/dist/static/images/app-barcode.png +0 -0
- package/dist/static/images/login/bg.png +0 -0
- package/dist/static/images/login/logo.png +0 -0
- package/dist/static/images/login/password-active.png +0 -0
- package/dist/static/images/login/password-default.png +0 -0
- package/dist/static/images/login/signIn-img.png +0 -0
- package/dist/static/images/login/user-active.png +0 -0
- package/dist/static/images/login/user-default.png +0 -0
- package/dist/static/images/logo-dark.png +0 -0
- package/dist/static/images/logo-small.png +0 -0
- package/dist/static/images/logo.png +0 -0
- package/dist/static/images/logo.svg +0 -510
- package/dist/static/images/no-image.png +0 -0
package/package.json
CHANGED
|
@@ -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
|
-
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
methods: {
|
|
72
|
+
// 设置初始值
|
|
73
|
+
setData(value) {
|
|
64
74
|
let list = [];
|
|
65
|
-
if (
|
|
75
|
+
if (value && value !== '') {
|
|
66
76
|
try {
|
|
67
|
-
list = JSON.parse(
|
|
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
|
-
|
|
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)"
|
|
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
package/test/setting.env.js
CHANGED
|
Binary file
|