bug修改

This commit is contained in:
hanchaobo
2024-05-30 18:00:30 +08:00
parent 1e85a8b4e8
commit 377c33c6b5
3 changed files with 90 additions and 29 deletions
+9
View File
@@ -17,4 +17,13 @@ export function smsList(data,params) {
data: data,
params:params
})
}
// 更新邮件发送记录
export function update(data) {
return request({
url: 'sendMailRecord/update',
method: 'post',
data: data,
})
}
@@ -1,27 +1,42 @@
<template>
<div>
<el-dialog title="邮件内容" :visible="emailVidable" @close="cancel" center
:distroy-on-close="true">
<el-dialog title="邮件内容" :visible="emailVidable" @close="cancel" center :distroy-on-close="true">
<div>
<el-form>
<el-col :span="24">
<el-form-item label="邮件主题:" label-width="100px">
<div>主题</div>
<div>{{ emailRow.mailSubject }}</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="12">
<el-form-item label="收件人:" label-width="100px">
<div>收件人</div>
<div>{{ emailRow.mailAddress }}</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="12">
<el-form-item label="发件人:" label-width="100px">
<div>发件人</div>
<div>{{ emailRow.mailFromAddress }}</div>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="邮件附件:" label-width="100px">
<div style="color: blue; cursor: pointer" @click="viewAttachments">附件</div>
<div style="color: blue; cursor: pointer" v-for="(item, index) in emailRow.caseAttachList"
:key="index" @click="viewAttachments(item.annexPath)">
{{ item.annexName }}
</div>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="附件上传:" label-width="100px">
<el-upload class="upload-demo" accept=".doc,.docx,.pdf" ref="upload" :action="UploadUrl()"
:headers="headers" :data="filedata" :on-preview="handlePreview"
:on-remove="handleRemove" :limit="1" :on-change="beforeUpload"
:on-success="handlSuccess" :file-list="fileList">
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<div slot="tip" class="el-upload__tip">
只能上传.doc,docx,pdf文件
</div>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="24">
@@ -30,7 +45,6 @@
</el-form-item>
</el-col>
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel" class="endbutton1" round><span>取 消</span></el-button>
@@ -42,45 +56,83 @@
<script>
import {
updateSendContent,update
updateSendContent,
update,
} from "@/api/deliveryRecord/deliveryRecord.js";
import { getToken } from "@/utils/auth";
export default {
props: ["emailVidable", "emailRow","queryParams"],
props: ["emailVidable", "emailRow", "queryParams"],
data() {
return {
sendData:'',
sendData: "",
fileURL: window.location.origin + "/API",
headers: {
Authorization: "Bearer " + getToken(),
},
filedata: {
annexType: 13,
},
fileList: [],
files: [],
};
},
watch: {
emailVidable(val){
if(val){
emailVidable(val) {
if (val) {
console.log(this.emailRow);
this.sendData = this.emailRow.mailContent;
}
}
},
},
methods: {
cancel() {
this.$emit("cancelEmail");
},
submitSend() {
console.log(this.emailRow.mailContent)
this.updateSendContentFn({
id:this.emailRow.id,
mailContent:this.sendData
})
console.log(this.emailRow.mailContent);
let caseAttachListParms = {};
if (this.files.annexId) {
caseAttachListParms = {
id: this.emailRow.id,
mailContent: this.sendData,
caseAttachList: [{ annexId: this.files.annexId }],
}
} else{
caseAttachListParms = {
id: this.emailRow.id,
mailContent: this.sendData,
caseAttachList: [],
}
}
this.updateSendContentFn(caseAttachListParms);
},
updateSendContentFn(data){
update(data).then(res=>{
this.$message.success('更新成功');
updateSendContentFn(data) {
update(data).then((res) => {
this.$message.success("更新成功");
this.$emit("cancelEmail");
this.$emit('getList',this.queryParams);
})
this.$emit("getList", this.queryParams);
this.$refs.upload.clearFiles(); // 清除文件列表
});
},
// 查看附件下载附件
viewAttachments(val){
viewAttachments(val) {
window.open(this.fileURL + val);
}
},
/**上传地址*/
UploadUrl() {
return window.location.origin + "/API/evidence/upload";
},
handlePreview(file) { },
handleRemove(file, fileList) { },
beforeUpload(flie, fileList) {
},
handlSuccess(res, file) {
const fileSuccess = [{ annexId: res.annexId, annexType: res.annexType, annexName: res.newFileName, annexPath: res.fileName, onlyOfficeFileId: res.onlyOfficeFileId }]
// this.emailRow.caseAttachList = fileSuccess
this.files = res
console.log(res)
},
},
};
</script>
+2 -2
View File
@@ -12,10 +12,10 @@ const name = process.env.VUE_APP_TITLE || '智慧仲裁管理系统' // 网页
const port = process.env.port || process.env.npm_config_port || 80 // 端口
// const API = 'http://121.40.189.20:9001' //生产
// const API = 'http://121.40.189.20:8001' //测试
const API = 'http://121.40.189.20:8001' //测试
// const API = 'http://172.16.1.26:8001' //Bs
// const API = 'http://192.168.3.77:9001' //Q
const API = 'http://172.16.0.241:8001' //W
// const API = 'http://172.16.0.241:8001' //W
// vue.config.js 配置说明
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions