huangyinfeng
4 天以前 db42d08c39ae6129e2b95cd24c0d57c6769282e5
src/views/email/Utils/mailboxManagement.vue
@@ -20,6 +20,7 @@
      :filter-config="{ showIcon: false }"
      :row-config="{ isHover: true }"
      :column-config="{ resizable: true }"
      :edit-config="{ trigger: 'click', mode: 'cell' }"
    >
      <vxe-column width="60">
        <template #default>
@@ -34,15 +35,29 @@
          <span style="margin-left: 10px; color: #3081fe; font-weight: 500">{{ row.email }}</span>
        </template>
      </vxe-column>
      <vxe-column show-overflow field="companyName" title="显示名称" min-width="250">
      <vxe-column
        show-overflow
        field="aliasEmail"
        title="显示名称"
        min-width="250"
        :edit-render="{}"
      >
        <template #default="{ row }">
          <span style="color: #999">{{ row.companyName }}</span>
          <span style="color: #999">{{ row.aliasEmail }}</span>
        </template>
        <template #edit="{ row }">
          <vxe-input
            ref="inputRef"
            v-model="row.aliasEmail"
            type="text"
            @blur="fnInputHandle(row)"
          ></vxe-input>
        </template>
      </vxe-column>
      <vxe-column show-overflow field="status" title="邮箱状态" min-width="250">
        <template #default="{ row }">
          <div v-if="!isCheckAll">
            <a-tag color="orange" v-if="row.status === '正常'">正常</a-tag>
            <a-tag color="success" v-if="row.mailStatus === '正常'">正常</a-tag>
            <a-tag color="red" v-else>异常</a-tag>
          </div>
          <div v-else>
@@ -98,7 +113,8 @@
            </template>
            <a-input :disabled="typeAccount === 2" v-model:value="formData.email" />
          </a-form-item>
          <a-form-item v-if="isCustom == 'custom'" name="password" label="邮箱密码">
          <!-- v-if="isCustom == 'custom'"   -->
          <a-form-item name="password" label="邮箱密码">
            <a-input-password
              type="password"
              v-model:value="formData.password"
@@ -397,6 +413,7 @@
    deleteAccountApi,
    getAccountListApi,
    isEmailValidApi,
    addLiasEmailApi,
  } from '@/api/email/userList';
  const loading = ref(false);
  import Sortable from 'sortablejs';
@@ -454,11 +471,11 @@
    aliasEmail: '',
    biSyncFlag: false,
    proxyFlag: true,
    receiveProtocol: 'imap',
    receiveProtocol: 'imaps',
    receiveSSL: false,
    receivePort: '',
    receiveHost: '',
    smtpSSL: false,
    smtpSSL: true,
    smtpPort: '',
    smtpHost: '',
    invalid: '',
@@ -510,7 +527,12 @@
  const open = ref(false);
  const fnHandleOk = () => {
    formRef.value.validate().then(() => {
      const data = formData.value;
      const data = !isShow
        ? formData.value
        : {
            email: formData.value.email,
            password: formData.value.password,
          };
      if (isShow.value == true) {
        data.mailType = isCustom.value === 'onCustom' ? 1 : 2;
      }
@@ -523,11 +545,12 @@
          }
          loading.value = false;
          fnMailList();
          open.value = false;
        })
        .catch((err) => {
          loading.value = false;
          open.value = false;
        });
      open.value = false;
    });
  };
@@ -586,7 +609,7 @@
  }
  function fnHandleDetailOk() {
    openDrawerDetail.value = false;
    deleteAccountApi({ accountId: accountId.value })
    deleteAccountApi(accountId.value )
      .then((res) => {
        if (res.code === 0) {
          createMessage.success(res.msg);
@@ -626,7 +649,7 @@
    isEmailValidApi(email).then((res) => {
      if (res.code == 0) {
        isCheck.value = true;
        checkStatus.value = res.data.status;
        checkStatus.value = res.data.code == 0 ? true : false;
      }
    });
  }
@@ -664,6 +687,10 @@
      isCheckAll.value = false;
    }, 3000);
  }
  function fnInputHandle(row) {
    addLiasEmailApi({ aliasEmail: row.aliasEmail, accountId: row.accountId }).then((res) => {});
  }
</script>
<style scoped lang="less">
  .bullet {