|  | @@ -1,78 +1,41 @@
 | 
											
												
													
														|  |  <template>
 |  |  <template>
 | 
											
												
													
														|  | -    <el-dialog
 |  | 
 | 
											
												
													
														|  | -        title="发送邮件"
 |  | 
 | 
											
												
													
														|  | -        :visible.sync="dialogVisible"
 |  | 
 | 
											
												
													
														|  | -        append-to-body
 |  | 
 | 
											
												
													
														|  | -        width="50%"
 |  | 
 | 
											
												
													
														|  | -        :close-on-click-modal="false"
 |  | 
 | 
											
												
													
														|  | -        custom-class="email-dialog"
 |  | 
 | 
											
												
													
														|  | -    >
 |  | 
 | 
											
												
													
														|  | -        <el-form
 |  | 
 | 
											
												
													
														|  | -            ref="emailForm"
 |  | 
 | 
											
												
													
														|  | -            :model="formData"
 |  | 
 | 
											
												
													
														|  | -            :rules="formRules"
 |  | 
 | 
											
												
													
														|  | -            label-width="80px"
 |  | 
 | 
											
												
													
														|  | -            label-position="right"
 |  | 
 | 
											
												
													
														|  | -        >
 |  | 
 | 
											
												
													
														|  | 
 |  | +    <el-dialog title="发送邮件" :visible.sync="dialogVisible" append-to-body width="50%" :close-on-click-modal="false"
 | 
											
												
													
														|  | 
 |  | +        custom-class="email-dialog">
 | 
											
												
													
														|  | 
 |  | +        <el-form ref="emailForm" :model="formData" :rules="formRules" label-width="80px" label-position="right">
 | 
											
												
													
														|  |              <el-form-item label="收件人" prop="to">
 |  |              <el-form-item label="收件人" prop="to">
 | 
											
												
													
														|  | -                <el-input
 |  | 
 | 
											
												
													
														|  | -                    v-model="formData.to"
 |  | 
 | 
											
												
													
														|  | -                    placeholder="多个收件人用分号(;)分隔"
 |  | 
 | 
											
												
													
														|  | -                    clearable
 |  | 
 | 
											
												
													
														|  | -                ></el-input>
 |  | 
 | 
											
												
													
														|  | 
 |  | +                <el-input v-model="formData.to" placeholder="多个收件人用分号(;)分隔" clearable></el-input>
 | 
											
												
													
														|  |              </el-form-item>
 |  |              </el-form-item>
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |              <el-form-item label="抄送" prop="cc">
 |  |              <el-form-item label="抄送" prop="cc">
 | 
											
												
													
														|  | -                <el-input
 |  | 
 | 
											
												
													
														|  | -                    v-model="formData.cc"
 |  | 
 | 
											
												
													
														|  | -                    placeholder="多个抄送人用分号(;)分隔"
 |  | 
 | 
											
												
													
														|  | -                    clearable
 |  | 
 | 
											
												
													
														|  | -                ></el-input>
 |  | 
 | 
											
												
													
														|  | 
 |  | +                <el-input v-model="formData.cc" placeholder="多个抄送人用分号(;)分隔" clearable></el-input>
 | 
											
												
													
														|  |              </el-form-item>
 |  |              </el-form-item>
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |              <el-form-item label="密送" prop="bcc">
 |  |              <el-form-item label="密送" prop="bcc">
 | 
											
												
													
														|  | -                <el-input
 |  | 
 | 
											
												
													
														|  | -                    v-model="formData.bcc"
 |  | 
 | 
											
												
													
														|  | -                    placeholder="多个密送人用分号(;)分隔"
 |  | 
 | 
											
												
													
														|  | -                    clearable
 |  | 
 | 
											
												
													
														|  | -                ></el-input>
 |  | 
 | 
											
												
													
														|  | 
 |  | +                <el-input v-model="formData.bcc" placeholder="多个密送人用分号(;)分隔" clearable></el-input>
 | 
											
												
													
														|  |              </el-form-item>
 |  |              </el-form-item>
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |              <el-form-item label="主题" prop="subject">
 |  |              <el-form-item label="主题" prop="subject">
 | 
											
												
													
														|  | -                <el-input
 |  | 
 | 
											
												
													
														|  | -                    v-model="formData.subject"
 |  | 
 | 
											
												
													
														|  | -                    placeholder="请输入邮件主题"
 |  | 
 | 
											
												
													
														|  | -                    clearable
 |  | 
 | 
											
												
													
														|  | -                ></el-input>
 |  | 
 | 
											
												
													
														|  | 
 |  | +                <el-input v-model="formData.subject" placeholder="请输入邮件主题" clearable></el-input>
 | 
											
												
													
														|  |              </el-form-item>
 |  |              </el-form-item>
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |              <el-form-item label="正文" prop="content">
 |  |              <el-form-item label="正文" prop="content">
 | 
											
												
													
														|  | -                <avue-ueditor v-model="formData.content" v-bind="options"></avue-ueditor>
 |  | 
 | 
											
												
													
														|  | 
 |  | +                <avue-ueditor v-model="formData.content" :options="options"></avue-ueditor>
 | 
											
												
													
														|  |              </el-form-item>
 |  |              </el-form-item>
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |              <el-form-item label="附件">
 |  |              <el-form-item label="附件">
 | 
											
												
													
														|  | -                <el-input
 |  | 
 | 
											
												
													
														|  | -                    v-model="formData.attachments"
 |  | 
 | 
											
												
													
														|  | -                    placeholder="请输入文件名"
 |  | 
 | 
											
												
													
														|  | -                    clearable
 |  | 
 | 
											
												
													
														|  | -                ></el-input>
 |  | 
 | 
											
												
													
														|  | 
 |  | +                <el-input v-model="formData.attachments" placeholder="请输入文件名" clearable></el-input>
 | 
											
												
													
														|  |              </el-form-item>
 |  |              </el-form-item>
 | 
											
												
													
														|  |          </el-form>
 |  |          </el-form>
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          <span slot="footer" class="dialog-footer">
 |  |          <span slot="footer" class="dialog-footer">
 | 
											
												
													
														|  | -      <el-button @click="dialogVisible = false" size="medium">取 消</el-button>
 |  | 
 | 
											
												
													
														|  | -      <el-button
 |  | 
 | 
											
												
													
														|  | -          type="primary"
 |  | 
 | 
											
												
													
														|  | -          @click="submitForm"
 |  | 
 | 
											
												
													
														|  | -          size="medium"
 |  | 
 | 
											
												
													
														|  | -          :loading="sending"
 |  | 
 | 
											
												
													
														|  | -      >发 送</el-button>
 |  | 
 | 
											
												
													
														|  | -    </span>
 |  | 
 | 
											
												
													
														|  | 
 |  | +            <el-button @click="dialogVisible = false" size="medium">取 消</el-button>
 | 
											
												
													
														|  | 
 |  | +            <el-button type="primary" @click="submitForm" size="medium" :loading="sending">发 送</el-button>
 | 
											
												
													
														|  | 
 |  | +        </span>
 | 
											
												
													
														|  |      </el-dialog>
 |  |      </el-dialog>
 | 
											
												
													
														|  |  </template>
 |  |  </template>
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  <script>
 |  |  <script>
 | 
											
												
													
														|  | -import {getToken} from "@/util/auth";
 |  | 
 | 
											
												
													
														|  | 
 |  | +import { getToken } from "@/util/auth";
 | 
											
												
													
														|  |  import { generateMailFile } from "@/api/iosBasicData/reports";
 |  |  import { generateMailFile } from "@/api/iosBasicData/reports";
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -91,14 +54,10 @@ export default {
 | 
											
												
													
														|  |              options: {
 |  |              options: {
 | 
											
												
													
														|  |                  //普通上传地址
 |  |                  //普通上传地址
 | 
											
												
													
														|  |                  action: "/api/blade-resource/oss/endpoint/put-file",
 |  |                  action: "/api/blade-resource/oss/endpoint/put-file",
 | 
											
												
													
														|  | -                customConfig: {},
 |  | 
 | 
											
												
													
														|  | -                oss: '',
 |  | 
 | 
											
												
													
														|  | -                headers: {"Blade-Auth": "Bearer " + getToken()},
 |  | 
 | 
											
												
													
														|  | -                data: {},
 |  | 
 | 
											
												
													
														|  | -                propsHttp: {
 |  | 
 | 
											
												
													
														|  | -                    home: '',
 |  | 
 | 
											
												
													
														|  | -                    url: 'url',
 |  | 
 | 
											
												
													
														|  | -                    res: 'data'
 |  | 
 | 
											
												
													
														|  | 
 |  | +                headers: { "Blade-Auth": "Bearer " + getToken() },
 | 
											
												
													
														|  | 
 |  | +                props: {
 | 
											
												
													
														|  | 
 |  | +                    res: "data",
 | 
											
												
													
														|  | 
 |  | +                    url: 'link'
 | 
											
												
													
														|  |                  }
 |  |                  }
 | 
											
												
													
														|  |              },
 |  |              },
 | 
											
												
													
														|  |              formData: {
 |  |              formData: {
 | 
											
										
											
												
													
														|  | @@ -113,7 +72,7 @@ export default {
 | 
											
												
													
														|  |              },
 |  |              },
 | 
											
												
													
														|  |              formRules: {
 |  |              formRules: {
 | 
											
												
													
														|  |                  to: [
 |  |                  to: [
 | 
											
												
													
														|  | -                    {required: true, message: '请输入收件人邮箱', trigger: 'blur'},
 |  | 
 | 
											
												
													
														|  | 
 |  | +                    { required: true, message: '请输入收件人邮箱', trigger: 'blur' },
 | 
											
												
													
														|  |                      {
 |  |                      {
 | 
											
												
													
														|  |                          validator: this.validateEmails,
 |  |                          validator: this.validateEmails,
 | 
											
												
													
														|  |                          message: '邮箱格式不正确',
 |  |                          message: '邮箱格式不正确',
 | 
											
										
											
												
													
														|  | @@ -121,14 +80,14 @@ export default {
 | 
											
												
													
														|  |                      }
 |  |                      }
 | 
											
												
													
														|  |                  ],
 |  |                  ],
 | 
											
												
													
														|  |                  subject: [
 |  |                  subject: [
 | 
											
												
													
														|  | -                    {required: true, message: '请输入邮件主题', trigger: 'blur'},
 |  | 
 | 
											
												
													
														|  | -                    {max: 100, message: '主题长度不能超过100个字符', trigger: 'blur'}
 |  | 
 | 
											
												
													
														|  | 
 |  | +                    { required: true, message: '请输入邮件主题', trigger: 'blur' },
 | 
											
												
													
														|  | 
 |  | +                    { max: 100, message: '主题长度不能超过100个字符', trigger: 'blur' }
 | 
											
												
													
														|  |                  ],
 |  |                  ],
 | 
											
												
													
														|  |                  content: [
 |  |                  content: [
 | 
											
												
													
														|  | -                    {required: true, message: '请输入邮件正文', trigger: 'blur'}
 |  | 
 | 
											
												
													
														|  | 
 |  | +                    { required: true, message: '请输入邮件正文', trigger: 'blur' }
 | 
											
												
													
														|  |                  ],
 |  |                  ],
 | 
											
												
													
														|  |                  attachments: [
 |  |                  attachments: [
 | 
											
												
													
														|  | -                    {required: true, message: '请输入附件名', trigger: 'blur'}
 |  | 
 | 
											
												
													
														|  | 
 |  | +                    { required: true, message: '请输入附件名', trigger: 'blur' }
 | 
											
												
													
														|  |                  ]
 |  |                  ]
 | 
											
												
													
														|  |              }
 |  |              }
 | 
											
												
													
														|  |          }
 |  |          }
 |