|
@@ -1,87 +1,75 @@
|
|
|
<template>
|
|
|
- <div style="width: 950px; margin-left: 90px">
|
|
|
- <el-form
|
|
|
- ref="ruleFormRef"
|
|
|
- :model="ruleForm"
|
|
|
- :rules="rules"
|
|
|
- label-width="120px"
|
|
|
- class="demo-ruleForm"
|
|
|
- :size="formSize"
|
|
|
- status-icon
|
|
|
- >
|
|
|
- <el-form-item label="发送到:" prop="name">
|
|
|
- <el-input
|
|
|
- style="width: 750px; margin-right: 10px"
|
|
|
- placeholder="请选择收件人"
|
|
|
- v-model="ruleForm.name"
|
|
|
- />
|
|
|
- <el-button style="display: inline-block" type="primary">选择</el-button>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="邮箱标题:" prop="name">
|
|
|
- <el-input
|
|
|
- style="width: 820px; margin-right: 10px"
|
|
|
- placeholder="请输入邮箱标题"
|
|
|
- v-model="ruleForm.name"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="邮件内容:">
|
|
|
- <editor height="380" :min-height="380" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="附件:">
|
|
|
- <el-upload
|
|
|
- ref="uploadRef"
|
|
|
- class="upload-demo"
|
|
|
- action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15"
|
|
|
- :auto-upload="false"
|
|
|
- >
|
|
|
- <template #trigger>
|
|
|
- <el-button>
|
|
|
- 上传<el-icon><Upload /></el-icon>
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- </el-upload>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="紧急:">
|
|
|
- <el-checkbox v-model="checked1" label="Option 1" size="large" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="需要回执:">
|
|
|
- <el-checkbox v-model="checked2" label="Option 2" size="large" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item style="float: right">
|
|
|
- <el-button type="primary" @click=""
|
|
|
- ><el-icon><Promotion /></el-icon>发送</el-button
|
|
|
- >
|
|
|
- <el-button type="primary"
|
|
|
- ><el-icon><Promotion /></el-icon>发送继续</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- ><el-icon><Checked /></el-icon>存为草稿</el-button
|
|
|
- >
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- </div>
|
|
|
+ <div style="width: 950px; margin-left: 90px;padding-top: 40px;">
|
|
|
+ <el-form ref="form" :model="form1" :rules="rules" label-width="120px">
|
|
|
+ <el-form-item label="发送到:" prop="mailUserIds">
|
|
|
+ <el-input style="width: 750px; margin-right: 10px" placeholder="请选择收件人" v-model="form1.mailUserIds"/>
|
|
|
+ <el-button style="display: inline-block" type="primary">选择</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="邮箱标题:" prop="mainTitle">
|
|
|
+ <el-input style="width: 820px; margin-right: 10px" placeholder="请输入邮箱标题" v-model="form1.mainTitle" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="邮件内容:" prop="maincontent">
|
|
|
+ <editor height="380" :min-height="380" v-model="form1.maincontent" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="附件:">
|
|
|
+ <el-upload ref="uploadRef" class="upload-demo" v-model="form1.yMailFileList"
|
|
|
+ action="" :auto-upload="false">
|
|
|
+ <template #trigger>
|
|
|
+ <el-button>
|
|
|
+ 上传<el-icon>
|
|
|
+ <Upload />
|
|
|
+ </el-icon>
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="邮件状况:">
|
|
|
+ <el-select
|
|
|
+ v-model="form1.mailState"
|
|
|
+ placeholder="请选择邮件状况"
|
|
|
+ clearable
|
|
|
+ style="width: 240px"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="dict in mail_state"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="dict.label"
|
|
|
+ :value="dict.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item style="float: right">
|
|
|
+ <el-button type="primary"><el-icon>
|
|
|
+ <Promotion />
|
|
|
+ </el-icon>发送</el-button>
|
|
|
+ <el-button><el-icon>
|
|
|
+ <Checked />
|
|
|
+ </el-icon>存为草稿</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
-<!-- <script src="../../../../node_modules/wangeditor/dist/wangEditor"></script> -->
|
|
|
-<script lang="ts" setup>
|
|
|
-import { reactive, ref } from "vue";
|
|
|
-import type { FormInstance, FormRules } from "element-plus";
|
|
|
|
|
|
-interface RuleForm {
|
|
|
- name: string;
|
|
|
-}
|
|
|
-const checked1 = ref(false);
|
|
|
-const checked2 = ref(false);
|
|
|
-const formSize = ref("default");
|
|
|
-const ruleFormRef = ref<FormInstance>();
|
|
|
-const ruleForm = reactive<RuleForm>({
|
|
|
- name: "",
|
|
|
-});
|
|
|
+<script setup>
|
|
|
+ const { proxy } = getCurrentInstance();
|
|
|
+ const { mail_state, mail_type } = proxy.useDict("mail_state", "mail_type");
|
|
|
+ const form1 = ref({
|
|
|
+ mainTitle:null,
|
|
|
+ mailContent:null,
|
|
|
+ mailState:null,
|
|
|
+ mailType:null,
|
|
|
+ yMailFileList:null,
|
|
|
+ mailUserIds:null
|
|
|
+ });
|
|
|
|
|
|
-const rules = reactive<FormRules>({
|
|
|
- name: [
|
|
|
- { required: true, message: "Please input Activity name", trigger: "blur" },
|
|
|
- { min: 3, max: 5, message: "Length should be 3 to 5", trigger: "blur" },
|
|
|
- ],
|
|
|
-});
|
|
|
+ const rules = {
|
|
|
+ mainTitle: [
|
|
|
+ { required: true, message: "Please input Activity name", trigger: "blur" },
|
|
|
+ ],
|
|
|
+ };
|
|
|
+ function submit(){
|
|
|
+ console.log(content)
|
|
|
+ }
|
|
|
</script>
|
|
|
-<style lang="scss" scoped></style>
|
|
|
+
|
|
|
+<style lang="scss" scoped></style>
|