feature/v2.8.2 (#267)
This commit is contained in:
1 parent
eebe4dcaaa
commit
898579bdc8
7 files changed
+992
-865
No files matched your search
@@ -5,7 +5,11 @@ import { createPinia } from 'pinia'
|
||||
import App from './App.vue'
|
||||
import {router} from './router'
|
||||
|
||||
import ElementPlus from 'element-plus'
|
||||
import 'element-plus/dist/index.css'
|
||||
|
||||
const app = createApp(App)
|
||||
app.use(router)
|
||||
app.use(createPinia())
|
||||
app.use(ElementPlus)
|
||||
app.mount('#app')
|
||||
+63
-46
@@ -19,35 +19,35 @@
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item @click="move(group.id)" v-for="group in groupList" :key="group.id">{{
|
||||
group.name
|
||||
}}
|
||||
group.name
|
||||
}}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
<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">
|
||||
<template #default="scope">
|
||||
<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">
|
||||
<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 !== ''">
|
||||
<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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -63,8 +63,8 @@
|
||||
|
||||
<el-table-column prop="title" :label="lang.to" width="150">
|
||||
<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-tooltip>
|
||||
</template>
|
||||
@@ -88,7 +88,7 @@
|
||||
</el-table>
|
||||
</div>
|
||||
<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>
|
||||
</template>
|
||||
@@ -96,13 +96,13 @@
|
||||
|
||||
<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 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();
|
||||
@@ -122,7 +122,7 @@ watch(groupStore, async (newV) => {
|
||||
tag = '{"type":0,"status":-1}'
|
||||
}
|
||||
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
|
||||
totalPage.value = res.data.total_page
|
||||
})
|
||||
@@ -133,7 +133,7 @@ const data = ref([])
|
||||
const totalPage = ref(0)
|
||||
|
||||
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
|
||||
totalPage.value = res.data.total_page
|
||||
})
|
||||
@@ -158,17 +158,22 @@ const markRead = function () {
|
||||
rows.forEach(element => {
|
||||
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)
|
||||
});
|
||||
|
||||
ElMessageBox.confirm(
|
||||
|
||||
if (ids.length == 0) {
|
||||
ElMessageBox.alert('Unselected content', 'Notice', {
|
||||
confirmButtonText: 'OK',
|
||||
})
|
||||
} else {
|
||||
ElMessageBox.confirm(
|
||||
lang.move_email_confirm,
|
||||
'Warning',
|
||||
{
|
||||
@@ -187,9 +198,9 @@ const move = function (group_id) {
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
)
|
||||
.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) {
|
||||
updateList()
|
||||
ElMessage({
|
||||
@@ -206,6 +217,7 @@ const move = function (group_id) {
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -217,9 +229,13 @@ const del = function () {
|
||||
});
|
||||
|
||||
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,
|
||||
'Warning',
|
||||
{
|
||||
@@ -227,9 +243,9 @@ const del = function () {
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
)
|
||||
.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) {
|
||||
updateList()
|
||||
ElMessage({
|
||||
@@ -246,15 +262,16 @@ const del = function () {
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const rowStyle = function () {
|
||||
return {'cursor': 'pointer'}
|
||||
return { 'cursor': 'pointer' }
|
||||
}
|
||||
|
||||
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
|
||||
})
|
||||
}
|
||||
|
||||
+904
-804
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user