|
|
|
|
@ -79,7 +79,8 @@
|
|
|
|
|
<el-row> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="信件标签"> |
|
|
|
|
<el-select v-model="query.mailLabels" placeholder="请选择标签" multiple clearable style="width: 280px"> |
|
|
|
|
<el-select v-model="query.mailLabels" placeholder="请选择标签" multiple clearable |
|
|
|
|
style="width: 280px"> |
|
|
|
|
<el-option v-for="item in optionsData.labels" :key="item.id" :label="item.labelName" |
|
|
|
|
:value="item.id" /> |
|
|
|
|
</el-select> |
|
|
|
|
@ -186,6 +187,8 @@ import { deptLists } from '@/api/org/department'
|
|
|
|
|
import { labelLists } from '@/api/org/label' |
|
|
|
|
import { ref, reactive, watch } from "vue"; |
|
|
|
|
import { ElTable } from "element-plus"; |
|
|
|
|
import request from '@/utils/request' |
|
|
|
|
import { getToken } from '@/utils/auth' |
|
|
|
|
|
|
|
|
|
const rowKey = "mailId"; |
|
|
|
|
|
|
|
|
|
@ -236,6 +239,26 @@ const refreshCheckAll = () => {
|
|
|
|
|
|
|
|
|
|
const outputSelectedMail = () => { |
|
|
|
|
console.log("outputSelectedMail", solveCheckBox.value) |
|
|
|
|
request.post({ |
|
|
|
|
url: '/work/export', |
|
|
|
|
headers: { |
|
|
|
|
'Content-Type': 'application/json', |
|
|
|
|
'Accept': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', |
|
|
|
|
"Admin": getToken() |
|
|
|
|
}, |
|
|
|
|
body: solveCheckBox.value |
|
|
|
|
}).then((res: any) => { |
|
|
|
|
const url = URL.createObjectURL(res) |
|
|
|
|
const link = document.createElement('a') |
|
|
|
|
link.href = url |
|
|
|
|
link.download = 'data.xlsx' // 你可以根据你的需求修改文件名 |
|
|
|
|
document.body.appendChild(link) |
|
|
|
|
link.click() |
|
|
|
|
document.body.removeChild(link) |
|
|
|
|
URL.revokeObjectURL(url) |
|
|
|
|
}).catch((err: any) => { |
|
|
|
|
console.log(err) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const form = ref([]); |
|
|
|
|
@ -269,9 +292,10 @@ function getList() {
|
|
|
|
|
query.value.mailTimeStart = query.value.mailTime[0]; |
|
|
|
|
query.value.mailTimeEnd = query.value.mailTime[1]; |
|
|
|
|
} |
|
|
|
|
let source = query.value.mailLabels |
|
|
|
|
let source = "" |
|
|
|
|
if (query.value.mailLabels) { |
|
|
|
|
let strLabels = "" |
|
|
|
|
source = query.value.mailLabels |
|
|
|
|
for (let i = 0; i < query.value.mailLabels.length; i++) { |
|
|
|
|
if (i === query.value.mailLabels.length - 1) |
|
|
|
|
strLabels += query.value.mailLabels[i] |
|
|
|
|
@ -280,7 +304,9 @@ function getList() {
|
|
|
|
|
} |
|
|
|
|
query.value.mailLabels = strLabels |
|
|
|
|
} |
|
|
|
|
console.log("query.value", query.value) |
|
|
|
|
getMails(query.value).then((data: any) => { |
|
|
|
|
console.log("data", data) |
|
|
|
|
form.value = data.records; |
|
|
|
|
totalSize.total = data.total; |
|
|
|
|
totalSize.pages = data.pages; |
|
|
|
|
|