|
@@ -19,35 +19,35 @@
|
|
|
<template #dropdown>
|
|
<template #dropdown>
|
|
|
<el-dropdown-menu>
|
|
<el-dropdown-menu>
|
|
|
<el-dropdown-item @click="move(group.id)" v-for="group in groupList" :key="group.id">{{
|
|
<el-dropdown-item @click="move(group.id)" v-for="group in groupList" :key="group.id">{{
|
|
|
- group.name
|
|
|
|
|
- }}
|
|
|
|
|
|
|
+ group.name
|
|
|
|
|
+ }}
|
|
|
</el-dropdown-item>
|
|
</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
</el-dropdown-menu>
|
|
|
</template>
|
|
</template>
|
|
|
</el-dropdown>
|
|
</el-dropdown>
|
|
|
</div>
|
|
</div>
|
|
|
<div id="table">
|
|
<div id="table">
|
|
|
- <el-table ref="taskTableDataRef" :data="data" :show-header="true"
|
|
|
|
|
- :border="false" @row-click="rowClick" :row-style="rowStyle">
|
|
|
|
|
- <el-table-column type="selection" width="30"/>
|
|
|
|
|
|
|
+ <el-table ref="taskTableDataRef" :data="data" :show-header="true" :border="false" @row-click="rowClick"
|
|
|
|
|
+ :row-style="rowStyle">
|
|
|
|
|
+ <el-table-column type="selection" width="30" />
|
|
|
<el-table-column prop="is_read" label="" width="50">
|
|
<el-table-column prop="is_read" label="" width="50">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<div>
|
|
<div>
|
|
|
- <span v-if="!scope.row.is_read">
|
|
|
|
|
- {{ lang.new }}
|
|
|
|
|
- </span>
|
|
|
|
|
|
|
+ <span v-if="!scope.row.is_read">
|
|
|
|
|
+ {{ lang.new }}
|
|
|
|
|
+ </span>
|
|
|
<span style="font-weight: 900;color: #FF0000;" v-if="scope.row.dangerous">
|
|
<span style="font-weight: 900;color: #FF0000;" v-if="scope.row.dangerous">
|
|
|
- <el-tooltip effect="dark" :content="lang.dangerous" placement="top-start">
|
|
|
|
|
- !
|
|
|
|
|
- </el-tooltip>
|
|
|
|
|
|
|
+ <el-tooltip effect="dark" :content="lang.dangerous" placement="top-start">
|
|
|
|
|
+ !
|
|
|
|
|
+ </el-tooltip>
|
|
|
|
|
|
|
|
- </span>
|
|
|
|
|
|
|
+ </span>
|
|
|
<span style="font-weight: 900;color: #FF0000;" v-if="scope.row.error !== ''">
|
|
<span style="font-weight: 900;color: #FF0000;" v-if="scope.row.error !== ''">
|
|
|
- <el-tooltip effect="dark" :content="scope.row.error" placement="top-start">
|
|
|
|
|
- !
|
|
|
|
|
- </el-tooltip>
|
|
|
|
|
|
|
+ <el-tooltip effect="dark" :content="scope.row.error" placement="top-start">
|
|
|
|
|
+ !
|
|
|
|
|
+ </el-tooltip>
|
|
|
|
|
|
|
|
- </span>
|
|
|
|
|
|
|
+ </span>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -63,8 +63,8 @@
|
|
|
|
|
|
|
|
<el-table-column prop="title" :label="lang.to" width="150">
|
|
<el-table-column prop="title" :label="lang.to" width="150">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
- <el-tooltip v-for="toInfo in scope.row.to" :key="toInfo" class="box-item" effect="dark" :content="toInfo.EmailAddress"
|
|
|
|
|
- placement="top">
|
|
|
|
|
|
|
+ <el-tooltip v-for="toInfo in scope.row.to" :key="toInfo" class="box-item" effect="dark"
|
|
|
|
|
+ :content="toInfo.EmailAddress" placement="top">
|
|
|
<el-tag size="small" type="info">{{ toInfo.Name !== '' ? toInfo.Name : toInfo.EmailAddress }}</el-tag>
|
|
<el-tag size="small" type="info">{{ toInfo.Name !== '' ? toInfo.Name : toInfo.EmailAddress }}</el-tag>
|
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
</template>
|
|
</template>
|
|
@@ -88,7 +88,7 @@
|
|
|
</el-table>
|
|
</el-table>
|
|
|
</div>
|
|
</div>
|
|
|
<div id="pagination">
|
|
<div id="pagination">
|
|
|
- <el-pagination background layout="prev, pager, next" :page-count="totalPage" @current-change="pageChange"/>
|
|
|
|
|
|
|
+ <el-pagination background layout="prev, pager, next" :page-count="totalPage" @current-change="pageChange" />
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -96,13 +96,13 @@
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
|
|
|
|
|
-import {EpArrowDownBold} from "vue-icons-plus/ep";
|
|
|
|
|
-import {RouterLink, useRouter} from 'vue-router'
|
|
|
|
|
-import {ref, watch} from 'vue'
|
|
|
|
|
|
|
+import { EpArrowDownBold } from "vue-icons-plus/ep";
|
|
|
|
|
+import { RouterLink, useRouter } from 'vue-router'
|
|
|
|
|
+import { ref, watch } from 'vue'
|
|
|
import useGroupStore from '../stores/group'
|
|
import useGroupStore from '../stores/group'
|
|
|
import lang from '../i18n/i18n';
|
|
import lang from '../i18n/i18n';
|
|
|
-import {http} from "@/utils/axios";
|
|
|
|
|
-import {ElMessage, ElMessageBox} from "element-plus";
|
|
|
|
|
|
|
+import { http } from "@/utils/axios";
|
|
|
|
|
+import { ElMessage, ElMessageBox } from "element-plus";
|
|
|
|
|
|
|
|
|
|
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
@@ -122,7 +122,7 @@ watch(groupStore, async (newV) => {
|
|
|
tag = '{"type":0,"status":-1}'
|
|
tag = '{"type":0,"status":-1}'
|
|
|
}
|
|
}
|
|
|
data.value = []
|
|
data.value = []
|
|
|
- http.post("/api/email/list", {tag: tag, page_size: 10}).then(res => {
|
|
|
|
|
|
|
+ http.post("/api/email/list", { tag: tag, page_size: 10 }).then(res => {
|
|
|
data.value = res.data.list
|
|
data.value = res.data.list
|
|
|
totalPage.value = res.data.total_page
|
|
totalPage.value = res.data.total_page
|
|
|
})
|
|
})
|
|
@@ -133,7 +133,7 @@ const data = ref([])
|
|
|
const totalPage = ref(0)
|
|
const totalPage = ref(0)
|
|
|
|
|
|
|
|
const updateList = function () {
|
|
const updateList = function () {
|
|
|
- http.post("/api/email/list", {tag: tag, page_size: 10}).then(res => {
|
|
|
|
|
|
|
+ http.post("/api/email/list", { tag: tag, page_size: 10 }).then(res => {
|
|
|
data.value = res.data.list
|
|
data.value = res.data.list
|
|
|
totalPage.value = res.data.total_page
|
|
totalPage.value = res.data.total_page
|
|
|
})
|
|
})
|
|
@@ -158,17 +158,22 @@ const markRead = function () {
|
|
|
rows.forEach(element => {
|
|
rows.forEach(element => {
|
|
|
ids.push(element.id)
|
|
ids.push(element.id)
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
- http.post("/api/email/read", {"ids": ids}).then(res => {
|
|
|
|
|
- if (res.errorNo === 0) {
|
|
|
|
|
- updateList()
|
|
|
|
|
- } else {
|
|
|
|
|
- ElMessage({
|
|
|
|
|
- type: 'error',
|
|
|
|
|
- message: res.errorMsg,
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ if (ids.length == 0) {
|
|
|
|
|
+ ElMessageBox.alert('Unselected content', 'Notice', {
|
|
|
|
|
+ confirmButtonText: 'OK',
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ http.post("/api/email/read", { "ids": ids }).then(res => {
|
|
|
|
|
+ if (res.errorNo === 0) {
|
|
|
|
|
+ updateList()
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: 'error',
|
|
|
|
|
+ message: res.errorMsg,
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -179,7 +184,13 @@ const move = function (group_id) {
|
|
|
ids.push(element.id)
|
|
ids.push(element.id)
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- ElMessageBox.confirm(
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (ids.length == 0) {
|
|
|
|
|
+ ElMessageBox.alert('Unselected content', 'Notice', {
|
|
|
|
|
+ confirmButtonText: 'OK',
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ElMessageBox.confirm(
|
|
|
lang.move_email_confirm,
|
|
lang.move_email_confirm,
|
|
|
'Warning',
|
|
'Warning',
|
|
|
{
|
|
{
|
|
@@ -187,9 +198,9 @@ const move = function (group_id) {
|
|
|
cancelButtonText: 'Cancel',
|
|
cancelButtonText: 'Cancel',
|
|
|
type: 'warning',
|
|
type: 'warning',
|
|
|
}
|
|
}
|
|
|
- )
|
|
|
|
|
|
|
+ )
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
- http.post("/api/email/move", {"group_id": group_id, "ids": ids}).then(res => {
|
|
|
|
|
|
|
+ http.post("/api/email/move", { "group_id": group_id, "ids": ids }).then(res => {
|
|
|
if (res.errorNo === 0) {
|
|
if (res.errorNo === 0) {
|
|
|
updateList()
|
|
updateList()
|
|
|
ElMessage({
|
|
ElMessage({
|
|
@@ -206,6 +217,7 @@ const move = function (group_id) {
|
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
})
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -217,9 +229,13 @@ const del = function () {
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
let groupTag = JSON.parse(tag)
|
|
let groupTag = JSON.parse(tag)
|
|
|
|
|
+ if (ids.length == 0) {
|
|
|
|
|
+ ElMessageBox.alert('Unselected content', 'Notice', {
|
|
|
|
|
+ confirmButtonText: 'OK',
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- ElMessageBox.confirm(
|
|
|
|
|
|
|
+ ElMessageBox.confirm(
|
|
|
lang.del_email_confirm,
|
|
lang.del_email_confirm,
|
|
|
'Warning',
|
|
'Warning',
|
|
|
{
|
|
{
|
|
@@ -227,9 +243,9 @@ const del = function () {
|
|
|
cancelButtonText: 'Cancel',
|
|
cancelButtonText: 'Cancel',
|
|
|
type: 'warning',
|
|
type: 'warning',
|
|
|
}
|
|
}
|
|
|
- )
|
|
|
|
|
|
|
+ )
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
- http.post("/api/email/del", {"ids": ids, "forcedDel": groupTag.status === 3}).then(res => {
|
|
|
|
|
|
|
+ http.post("/api/email/del", { "ids": ids, "forcedDel": groupTag.status === 3 }).then(res => {
|
|
|
if (res.errorNo === 0) {
|
|
if (res.errorNo === 0) {
|
|
|
updateList()
|
|
updateList()
|
|
|
ElMessage({
|
|
ElMessage({
|
|
@@ -246,15 +262,16 @@ const del = function () {
|
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
})
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
const rowStyle = function () {
|
|
const rowStyle = function () {
|
|
|
- return {'cursor': 'pointer'}
|
|
|
|
|
|
|
+ return { 'cursor': 'pointer' }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const pageChange = function (p) {
|
|
const pageChange = function (p) {
|
|
|
- http.post("/api/email/list", {tag: tag, page_size: 10, current_page: p}).then(res => {
|
|
|
|
|
|
|
+ http.post("/api/email/list", { tag: tag, page_size: 10, current_page: p }).then(res => {
|
|
|
data.value = res.data.list
|
|
data.value = res.data.list
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|