|
@@ -25,8 +25,8 @@
|
|
|
]"
|
|
|
@get-list="getList"
|
|
|
>
|
|
|
- <template #slotName="{ item }">
|
|
|
- {{ item.createTime }}
|
|
|
+ <template #mialAddress="{ item }">
|
|
|
+ {{ item.mailUserPrefix }}@{{ item.domainName }}
|
|
|
</template>
|
|
|
</byTable>
|
|
|
</div>
|
|
@@ -47,18 +47,25 @@
|
|
|
<el-row style="width: 100%">
|
|
|
<el-col :span="11">
|
|
|
<el-input
|
|
|
- v-model="formData.data.contactPerson"
|
|
|
+ v-model="formData.data.mailUserPrefix"
|
|
|
placeholder="请输入"
|
|
|
>
|
|
|
</el-input>
|
|
|
</el-col>
|
|
|
<el-col :span="2" style="text-align: center"> @ </el-col>
|
|
|
<el-col :span="11">
|
|
|
- <el-input
|
|
|
- v-model="formData.data.contactPerson"
|
|
|
- placeholder="请输入"
|
|
|
+ <el-select
|
|
|
+ v-model="formData.data.domainId"
|
|
|
+ placeholder="请选择"
|
|
|
+ style="width: 100%"
|
|
|
>
|
|
|
- </el-input>
|
|
|
+ <el-option
|
|
|
+ v-for="item in sourceListOne.data"
|
|
|
+ :label="item.domainName"
|
|
|
+ :value="item.id"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</template>
|
|
@@ -155,6 +162,8 @@ import { ElMessage, ElMessageBox } from "element-plus";
|
|
|
import byTable from "@/components/byTable/index";
|
|
|
import byForm from "@/components/byForm/index";
|
|
|
import { computed, defineComponent, ref } from "vue";
|
|
|
+import useUserStore from "@/store/modules/user";
|
|
|
+
|
|
|
const loading = ref(false);
|
|
|
const submitLoading = ref(false);
|
|
|
const sourceList = ref({
|
|
@@ -174,19 +183,24 @@ let modalType = ref("add");
|
|
|
let submitType = ref("");
|
|
|
let titleText = ref("");
|
|
|
let rules = ref({
|
|
|
- name: [{ required: true, message: "请输入平台名称", trigger: "blur" }],
|
|
|
- endPoint: [{ required: true, message: "请输入EndPoint", trigger: "blur" }],
|
|
|
- accessKey: [{ required: true, message: "请输入access_key", trigger: "blur" }],
|
|
|
- accessCode: [
|
|
|
- { required: true, message: "请输入access_code", trigger: "blur" },
|
|
|
+ mailUserPrefix: [{ required: true, message: "请输入地址", trigger: "blur" }],
|
|
|
+ domainName: [{ required: true, message: "请输入邮箱域名", trigger: "blur" }],
|
|
|
+ type: [{ required: true, message: "请选择邮箱类型", trigger: "change" }],
|
|
|
+ mailPassword: [{ required: true, message: "请输入授权码", trigger: "blur" }],
|
|
|
+ receiveHost: [
|
|
|
+ { required: true, message: "请输入收件服务器地址", trigger: "blur" },
|
|
|
],
|
|
|
- accessKeyId: [
|
|
|
- { required: true, message: "请输入Access Key Id", trigger: "blur" },
|
|
|
+ receivePort: [{ required: true, message: "请输入收件端口", trigger: "blur" }],
|
|
|
+ receiveProtocol: [
|
|
|
+ { required: true, message: "请输入收件协议", trigger: "blur" },
|
|
|
],
|
|
|
- secretAccessKey: [
|
|
|
- { required: true, message: "请输入Secret Access Key", trigger: "blur" },
|
|
|
+ sendHost: [
|
|
|
+ { required: true, message: "请输入发件服务器地址", trigger: "blur" },
|
|
|
+ ],
|
|
|
+ sendPort: [{ required: true, message: "请输入发件端口", trigger: "blur" }],
|
|
|
+ sendProtocol: [
|
|
|
+ { required: true, message: "请输入发件协议", trigger: "blur" },
|
|
|
],
|
|
|
- productId: [{ required: true, message: "请输入项目 ID", trigger: "blur" }],
|
|
|
});
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const selectConfig = [];
|
|
@@ -194,8 +208,9 @@ const config = computed(() => {
|
|
|
return [
|
|
|
{
|
|
|
attrs: {
|
|
|
+ type: "slot",
|
|
|
+ slot: "mialAddress",
|
|
|
label: "邮箱地址",
|
|
|
- prop: "domainName",
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -207,7 +222,7 @@ const config = computed(() => {
|
|
|
{
|
|
|
attrs: {
|
|
|
label: "绑定用户",
|
|
|
- prop: "userId",
|
|
|
+ prop: "userName",
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -238,7 +253,7 @@ const config = computed(() => {
|
|
|
{
|
|
|
attrs: {
|
|
|
label: "操作",
|
|
|
- width: "200",
|
|
|
+ width: "130",
|
|
|
align: "right",
|
|
|
},
|
|
|
// 渲染 el-button,一般用在最后一列。
|
|
@@ -297,8 +312,8 @@ const configOne = computed(() => {
|
|
|
return [
|
|
|
{
|
|
|
attrs: {
|
|
|
- label: "邮箱地址",
|
|
|
- prop: "mailUser",
|
|
|
+ label: "邮箱域名",
|
|
|
+ prop: "domainName",
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -338,7 +353,7 @@ const configOne = computed(() => {
|
|
|
{
|
|
|
attrs: {
|
|
|
label: "操作",
|
|
|
- width: "200",
|
|
|
+ width: "130",
|
|
|
align: "right",
|
|
|
},
|
|
|
// 渲染 el-button,一般用在最后一列。
|
|
@@ -383,7 +398,7 @@ const configOne = computed(() => {
|
|
|
message: "删除成功",
|
|
|
type: "success",
|
|
|
});
|
|
|
- getList();
|
|
|
+ getListOne();
|
|
|
});
|
|
|
});
|
|
|
},
|
|
@@ -409,25 +424,35 @@ const configData = [
|
|
|
{
|
|
|
type: "slot",
|
|
|
slotName: "mailAddress",
|
|
|
+ prop: "mailUserPrefix",
|
|
|
label: "邮箱地址",
|
|
|
required: true,
|
|
|
},
|
|
|
{
|
|
|
type: "input",
|
|
|
- prop: "type",
|
|
|
+ prop: "mailPassword",
|
|
|
label: "授权码",
|
|
|
required: true,
|
|
|
},
|
|
|
{
|
|
|
type: "select",
|
|
|
- prop: "name",
|
|
|
+ prop: "userId",
|
|
|
label: "绑定用户",
|
|
|
+ isLoad: {
|
|
|
+ url: `/tenantUser/list?pageNum=1&pageSize=9999&tenantId=${
|
|
|
+ useUserStore().user.tenantId
|
|
|
+ }`,
|
|
|
+ labelKey: "nickName",
|
|
|
+ labelVal: "userId",
|
|
|
+ method: "get",
|
|
|
+ resUrl: "rows",
|
|
|
+ },
|
|
|
},
|
|
|
],
|
|
|
[
|
|
|
{
|
|
|
type: "input",
|
|
|
- prop: "mailUser",
|
|
|
+ prop: "domainName",
|
|
|
label: "邮箱域名",
|
|
|
required: true,
|
|
|
},
|
|
@@ -490,7 +515,7 @@ const getList = async (req) => {
|
|
|
const getListOne = async () => {
|
|
|
loading.value = true;
|
|
|
proxy
|
|
|
- .post("/enterpriseDomain/page", sourceList.value.pagination)
|
|
|
+ .post("/enterpriseDomain/page", { pageNum: 1, pageSize: 9999 })
|
|
|
.then((message) => {
|
|
|
sourceListOne.value.data = message.rows;
|
|
|
setTimeout(() => {
|
|
@@ -510,17 +535,20 @@ const openModal = (type) => {
|
|
|
} else if (type === "20") {
|
|
|
titleText.value = "添加域名";
|
|
|
formConfig.value = configData[1];
|
|
|
+ formData.data = {
|
|
|
+ type: "1",
|
|
|
+ receiveProtocol: "IMAP",
|
|
|
+ sendProtocol: "SMTP",
|
|
|
+ };
|
|
|
}
|
|
|
};
|
|
|
|
|
|
const openModalOne = () => {
|
|
|
dialogVisibleOne.value = true;
|
|
|
modalType.value = "add";
|
|
|
- formData.data = {};
|
|
|
};
|
|
|
|
|
|
const submitForm = () => {
|
|
|
- console.log(byform.value);
|
|
|
byform.value.handleSubmit((valid) => {
|
|
|
submitLoading.value = true;
|
|
|
if (submitType.value === "10") {
|
|
@@ -543,6 +571,7 @@ const submitForm = () => {
|
|
|
message: modalType.value == "add" ? "添加成功" : "编辑成功",
|
|
|
type: "success",
|
|
|
});
|
|
|
+ dialogVisible.value = false;
|
|
|
submitLoading.value = false;
|
|
|
getListOne();
|
|
|
},
|
|
@@ -554,15 +583,17 @@ const submitForm = () => {
|
|
|
|
|
|
const getDtl = (row, type) => {
|
|
|
modalType.value = "edit";
|
|
|
+ submitType.value = type;
|
|
|
if (type === "10") {
|
|
|
proxy.post("/enterpriseMailbox/detail", { id: row.id }).then((res) => {
|
|
|
+ formConfig.value = configData[0];
|
|
|
formData.data = res;
|
|
|
- console.log(res);
|
|
|
});
|
|
|
} else if (type === "20") {
|
|
|
proxy.post("/enterpriseDomain/detail", { id: row.id }).then((res) => {
|
|
|
+ formConfig.value = configData[1];
|
|
|
+ res.type = res.type + "";
|
|
|
formData.data = res;
|
|
|
- console.log(res);
|
|
|
});
|
|
|
}
|
|
|
dialogVisible.value = true;
|