forked from github/dataease
Merge pull request #2770 from dataease/pr@dev@fix_email_task
fix(系统管理-定时报告): 视图附件名称乱码
This commit is contained in:
commit
982e8b44ed
@ -132,15 +132,16 @@ public class EmailService {
|
||||
}
|
||||
|
||||
private MimeMultipart addFiles(MimeMultipart multipart, List<File> files) throws Exception{
|
||||
|
||||
for (int i = 0; i < files.size(); i++) {
|
||||
File file = files.get(i);
|
||||
MimeBodyPart attach = new MimeBodyPart();
|
||||
FileDataSource fileDataSource = new FileDataSource(file);
|
||||
attach.setDataHandler(new DataHandler(fileDataSource));
|
||||
attach.setFileName(MimeUtility.encodeText(file.getName()));
|
||||
attach.setFileName(MimeUtility.encodeText(file.getName(), "gb2312", null));
|
||||
multipart.addBodyPart(attach);
|
||||
}
|
||||
System.getProperties().setProperty("mail.mime.splitlongparameters", "false");
|
||||
|
||||
multipart.setSubType("related");
|
||||
return multipart;
|
||||
}
|
||||
@ -170,6 +171,7 @@ public class EmailService {
|
||||
}
|
||||
|
||||
public MailInfo mailInfo() {
|
||||
System.getProperties().setProperty("mail.mime.splitlongparameters", "false");
|
||||
String type = ParamConstants.Classify.MAIL.getValue();
|
||||
List<SystemParameter> paramList = getParamList(type);
|
||||
MailInfo mailInfo = new MailInfo();
|
||||
|
@ -19,16 +19,13 @@
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
|
||||
|
||||
|
||||
<el-dialog
|
||||
:visible="dialogShow"
|
||||
:show-close="false"
|
||||
class="dialog-css"
|
||||
:fullscreen="true"
|
||||
>
|
||||
<div ref="contaninerDiv" :style="{'height': panelHeight + 'px'}" v-if="dialogShow && viewLoaded">
|
||||
<div v-if="dialogShow && viewLoaded" ref="contaninerDiv" :style="{'height': panelHeight + 'px'}">
|
||||
<Preview
|
||||
:component-data="componentData"
|
||||
:canvas-style-data="canvasStyleData"
|
||||
@ -42,7 +39,7 @@
|
||||
选择视图
|
||||
</span>
|
||||
<span style="float: right;">
|
||||
<el-button type="primary" size="mini" @click="closeDialog()">{{ $t('commons.confirm') }}</el-button>
|
||||
<el-button type="primary" size="mini" @click="sureDialog()">{{ $t('commons.confirm') }}</el-button>
|
||||
<el-button size="mini" @click="cancelDialog()">{{ $t('commons.cancel') }}</el-button>
|
||||
</span>
|
||||
</div>
|
||||
@ -124,11 +121,9 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this._updateH()
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
this._selectClearFun()
|
||||
|
||||
},
|
||||
created() {
|
||||
this.loadView()
|
||||
@ -168,11 +163,10 @@ export default {
|
||||
},
|
||||
_updateH() {
|
||||
this.$nextTick(() => {
|
||||
if(this.$refs.contaninerDiv) {
|
||||
if (this.$refs.contaninerDiv) {
|
||||
this.width = this.$refs.contaninerDiv.clientWidth
|
||||
this.panelHeight = this.width * 9 / 16
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
_popoverShowFun(val) {
|
||||
@ -181,9 +175,8 @@ export default {
|
||||
this.$emit('onFoucs')
|
||||
},
|
||||
|
||||
|
||||
_selectRemoveTag(viewId) {
|
||||
this.selectedViews.forEach(item => {
|
||||
this.$store.getters.panelViews[this.panelId].forEach(item => {
|
||||
if (item === viewId) {
|
||||
this.$store.dispatch('task/delView', { 'panelId': this.panelId, 'viewId': item })
|
||||
}
|
||||
@ -200,13 +193,17 @@ export default {
|
||||
},
|
||||
openDialog() {
|
||||
if (this.value && this.value.length) {
|
||||
this.idsBeforeOpen = JSON.parse(JSON.stringify(this.value))
|
||||
this.idsBeforeOpen = JSON.parse(JSON.stringify(this.value))
|
||||
}
|
||||
this.dialogShow = true
|
||||
},
|
||||
closeDialog() {
|
||||
this.dialogShow = false
|
||||
},
|
||||
sureDialog() {
|
||||
this.innerValues = JSON.parse(JSON.stringify(this.$store.getters.panelViews[this.panelId]))
|
||||
this.closeDialog()
|
||||
},
|
||||
cancelDialog() {
|
||||
this.innerValues = JSON.parse(JSON.stringify(this.idsBeforeOpen))
|
||||
const viewIds = JSON.parse(JSON.stringify(this.innerValues))
|
||||
|
Loading…
Reference in New Issue
Block a user