|
@@ -205,45 +205,66 @@ const handleRefersh = () => {
|
|
|
}
|
|
|
//handleExportEpub导出文件
|
|
|
const handleExportEpub = () => {
|
|
|
- ElMessageBox.prompt('请输入书名', '书名', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- }).then(({ value }) => {
|
|
|
- SelectSaveFilePath("", value).then(save2file => {
|
|
|
- if (save2file == "") {
|
|
|
- console.log("无效的文件存储路径", save2file)
|
|
|
- return
|
|
|
- }
|
|
|
- ExportEpubFile(value, save2file).then(d => {
|
|
|
- ElMessage({
|
|
|
- message: `导出epub文件${save2file}完成!`,
|
|
|
- showClose: true,
|
|
|
- duration: 3000,
|
|
|
- });
|
|
|
- })
|
|
|
- })
|
|
|
+ ElMessageBox.prompt('请输入文件名称', '文件名', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ }).then(({ value }) => {
|
|
|
+ SelectSaveFilePath("", value,"epub").then(save2file => {
|
|
|
+ if (save2file == "") {
|
|
|
+ console.log("无效的文件存储路径", save2file)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ ExportEpubFile(value, save2file).then(d => {
|
|
|
+ ElMessage({
|
|
|
+ message: `导出epub文件${save2file}完成!`,
|
|
|
+ showClose: true,
|
|
|
+ duration: 3000,
|
|
|
+ });
|
|
|
+ })
|
|
|
})
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+const handleExportJson = () => {
|
|
|
+ ElMessageBox.prompt('请输入文件名称', '文件名', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ }).then(({ value }) => {
|
|
|
+ SelectSaveFilePath("", value,"json").then(save2file => {
|
|
|
+ if (save2file == "") {
|
|
|
+ console.log("无效的文件存储路径", save2file)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ ExportEpubFile(value, save2file).then(d => {
|
|
|
+ ElMessage({
|
|
|
+ message: `导出json文件${save2file}完成!`,
|
|
|
+ showClose: true,
|
|
|
+ duration: 3000,
|
|
|
+ });
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
const handleExportExcel = () => {
|
|
|
- ElMessageBox.prompt('请输入数据集名称', '数据集名称', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- }).then(({ value }) => {
|
|
|
- SelectSaveFilePath("", value).then(save2file => {
|
|
|
- if (save2file == "") {
|
|
|
- console.log("无效的文件存储路径", save2file)
|
|
|
- return
|
|
|
- }
|
|
|
- ExportExcelFile(save2file).then(d => {
|
|
|
- ElMessage({
|
|
|
- message: `导出epub文件${save2file}完成!`,
|
|
|
- showClose: true,
|
|
|
- duration: 3000,
|
|
|
- });
|
|
|
- })
|
|
|
- })
|
|
|
+ ElMessageBox.prompt('请输入文件名称', '文件名', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ }).then(({ value }) => {
|
|
|
+ SelectSaveFilePath("", value,"xlsx").then(save2file => {
|
|
|
+ if (save2file == "") {
|
|
|
+ console.log("无效的文件存储路径", save2file)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ ExportExcelFile(save2file).then(d => {
|
|
|
+ ElMessage({
|
|
|
+ message: `导出excel文件${save2file}完成!`,
|
|
|
+ showClose: true,
|
|
|
+ duration: 3000,
|
|
|
+ });
|
|
|
+ })
|
|
|
})
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
const replaceAll = function (src, search, replacement) {
|