|
@@ -28,7 +28,7 @@
|
|
<div class="highlight-main">{{scope.row.stateText}}</div>
|
|
<div class="highlight-main">{{scope.row.stateText}}</div>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="功能" min-width="140" align="center">
|
|
|
|
|
|
+ <el-table-column label="功能" width="200" align="center">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<el-tooltip content="列表页采集" placement="top">
|
|
<el-tooltip content="列表页采集" placement="top">
|
|
<el-button size="small" :class="{ active: scope.row._action_clicked_list_collect }" @click="tableEvents.handleListCollect(scope.$index, scope.row)">
|
|
<el-button size="small" :class="{ active: scope.row._action_clicked_list_collect }" @click="tableEvents.handleListCollect(scope.$index, scope.row)">
|
|
@@ -52,13 +52,25 @@
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="操作" align="center">
|
|
|
|
|
|
+ <el-table-column label="操作" width="150" align="center">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<el-tooltip content="清除记录" placement="top">
|
|
<el-tooltip content="清除记录" placement="top">
|
|
<el-button size="small" :class="{ active: scope.row._action_clicked_remove_history }" @click="tableEvents.handleRemoveHistory(scope.$index, scope.row)">
|
|
<el-button size="small" :class="{ active: scope.row._action_clicked_remove_history }" @click="tableEvents.handleRemoveHistory(scope.$index, scope.row)">
|
|
<el-icon><DArrowLeft /></el-icon>
|
|
<el-icon><DArrowLeft /></el-icon>
|
|
</el-button>
|
|
</el-button>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
|
+
|
|
|
|
+ <el-dropdown>
|
|
|
|
+ <el-button size="small">结果导出</el-button>
|
|
|
|
+ <template #dropdown>
|
|
|
|
+ <el-dropdown-menu>
|
|
|
|
+ <el-dropdown-item @click="handleExportEpub">导出EPUB格式文件</el-dropdown-item>
|
|
|
|
+ <el-dropdown-item @click="handleExportJson">导出JSON格式文件</el-dropdown-item>
|
|
|
|
+ <el-dropdown-item @click="handleExportExcel">导出Excel格式文件</el-dropdown-item>
|
|
|
|
+ <!-- <el-dropdown-item>补录/上推至平台</el-dropdown-item> -->
|
|
|
|
+ </el-dropdown-menu>
|
|
|
|
+ </template>
|
|
|
|
+ </el-dropdown>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -107,6 +119,8 @@ import { ref, computed, reactive, watch } from 'vue'
|
|
import { useStore } from 'vuex';
|
|
import { useStore } from 'vuex';
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
import { ServerActionQlmAddRecord, QlmListDataDownload, QlmDetailDataDownload, ServerActionQlmRemoveRepeat, ServerActionQlmPushData, ServerActionQlmClearData } from "../../wailsjs/go/main/App"
|
|
import { ServerActionQlmAddRecord, QlmListDataDownload, QlmDetailDataDownload, ServerActionQlmRemoveRepeat, ServerActionQlmPushData, ServerActionQlmClearData } from "../../wailsjs/go/main/App"
|
|
|
|
+import { SelectSaveFilePath, ExportJsonFile, ExportEpubFile, ExportExcelFile } from "../../wailsjs/go/main/App"
|
|
|
|
+
|
|
import Breadcrumb from "../components/Breadcrumb.vue"
|
|
import Breadcrumb from "../components/Breadcrumb.vue"
|
|
import { USER_ROLE_ADMIN, USER_ROLE_DEVELOPER, USER_ROLE_REVIEWER } from '../data/user'
|
|
import { USER_ROLE_ADMIN, USER_ROLE_DEVELOPER, USER_ROLE_REVIEWER } from '../data/user'
|
|
import { Refresh, DocumentAdd, Search, Box } from '@element-plus/icons-vue'
|
|
import { Refresh, DocumentAdd, Search, Box } from '@element-plus/icons-vue'
|
|
@@ -230,9 +244,9 @@ async function getTableList() {
|
|
const sList = data.list.map(t => {
|
|
const sList = data.list.map(t => {
|
|
return {
|
|
return {
|
|
...t,
|
|
...t,
|
|
- proxyText: t.proxy ? '使用' : '不使用',
|
|
|
|
- headlessText: t.headless ? '无头' : '显示',
|
|
|
|
- imageText: t.image ? '显示' : '不显示',
|
|
|
|
|
|
+ // proxyText: t.proxy ? '使用' : '不使用',
|
|
|
|
+ // headlessText: t.headless ? '无头' : '显示',
|
|
|
|
+ // imageText: t.image ? '显示' : '不显示',
|
|
stateText: calcStateText(t.state),
|
|
stateText: calcStateText(t.state),
|
|
comeintimeText: t.comeintime ? dateFormatter(t.comeintime * 1000, 'yyyy-MM-dd') : '',
|
|
comeintimeText: t.comeintime ? dateFormatter(t.comeintime * 1000, 'yyyy-MM-dd') : '',
|
|
// 操作按钮是否点击过
|
|
// 操作按钮是否点击过
|
|
@@ -249,6 +263,7 @@ async function getTableList() {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
|
+ console.log(error)
|
|
listState.loaded = true
|
|
listState.loaded = true
|
|
} finally {
|
|
} finally {
|
|
listState.loading = false
|
|
listState.loading = false
|
|
@@ -563,6 +578,95 @@ const tableActionDisabled = {
|
|
return !canSubmit
|
|
return !canSubmit
|
|
},
|
|
},
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+//handleExportEpub导出文件
|
|
|
|
+const handleExportEpub = () => {
|
|
|
|
+ ElMessageBox.prompt('请输入文件名称', '文件名', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ }).then(({ value }) => {
|
|
|
|
+ SelectSaveFilePath("", value,"epub").then(save2file => {
|
|
|
|
+ if (save2file == "") {
|
|
|
|
+ console.log("无效的文件存储路径", save2file)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ ExportEpubFile(value, save2file, formData.value.code).then(d => {
|
|
|
|
+ if (d.err === 1) {
|
|
|
|
+ ElMessage({
|
|
|
|
+ message: d.msg || `导出epub文件${save2file}完成!`,
|
|
|
|
+ type: 'success',
|
|
|
|
+ duration: 3000,
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ ElMessage({
|
|
|
|
+ message: d.msg || `导出epub文件${save2file}失败!`,
|
|
|
|
+ type: 'error',
|
|
|
|
+ duration: 3000,
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const handleExportJson = () => {
|
|
|
|
+ ElMessageBox.prompt('请输入文件名称', '文件名', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ }).then(({ value }) => {
|
|
|
|
+ SelectSaveFilePath("", value,"json").then(save2file => {
|
|
|
|
+ if (save2file == "") {
|
|
|
|
+ console.log("无效的文件存储路径", save2file)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ ExportJsonFile(save2file, formData.value.code).then(d => {
|
|
|
|
+ if (d.err === 1) {
|
|
|
|
+ ElMessage({
|
|
|
|
+ message: d.msg || `导出excel文件${save2file}完成!`,
|
|
|
|
+ type: 'success',
|
|
|
|
+ duration: 3000,
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ ElMessage({
|
|
|
|
+ message: d.msg || `导出excel文件${save2file}失败!`,
|
|
|
|
+ type: 'error',
|
|
|
|
+ duration: 3000,
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const handleExportExcel = () => {
|
|
|
|
+ ElMessageBox.prompt('请输入文件名称', '文件名', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ }).then(({ value }) => {
|
|
|
|
+ SelectSaveFilePath("", value,"xlsx").then(save2file => {
|
|
|
|
+ if (save2file == "") {
|
|
|
|
+ console.log("无效的文件存储路径", save2file)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ ExportExcelFile(save2file, formData.value.code).then(d => {
|
|
|
|
+ if (d.err === 1) {
|
|
|
|
+ ElMessage({
|
|
|
|
+ message: d.msg || `导出excel文件${save2file}完成!`,
|
|
|
|
+ type: 'success',
|
|
|
|
+ duration: 3000,
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ ElMessage({
|
|
|
|
+ message: d.msg || `导出excel文件${save2file}失败!`,
|
|
|
|
+ type: 'error',
|
|
|
|
+ duration: 3000,
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
@@ -574,6 +678,10 @@ const tableActionDisabled = {
|
|
color: var(--el-button-hover-text-color);
|
|
color: var(--el-button-hover-text-color);
|
|
outline: none;
|
|
outline: none;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ & + .el-dropdown {
|
|
|
|
+ margin-left: 12px;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|