From e43bd51f04b2a538833180ed27cc40abb1050bd5 Mon Sep 17 00:00:00 2001 From: x_z Date: Mon, 19 Dec 2022 15:56:49 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=B8=8B=E8=BD=BD=E4=BB=BB=E5=8A=A1=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=B7=BB=E5=8A=A0=E7=AB=8B=E5=8D=B3=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/thrsys/spsSyncDownload.js | 8 ++++++++ src/views/thrsys/SysUdimsDownloadData.vue | 23 +++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/src/api/thrsys/spsSyncDownload.js b/src/api/thrsys/spsSyncDownload.js index d0dfd1a..e78d379 100644 --- a/src/api/thrsys/spsSyncDownload.js +++ b/src/api/thrsys/spsSyncDownload.js @@ -24,3 +24,11 @@ export function findConfig(query) { params: query }); } + +export function downloadNow(params) { + return axios({ + url: "", + method: "get", + params: params + }); +} diff --git a/src/views/thrsys/SysUdimsDownloadData.vue b/src/views/thrsys/SysUdimsDownloadData.vue index 0fe8673..8ae7de2 100644 --- a/src/views/thrsys/SysUdimsDownloadData.vue +++ b/src/views/thrsys/SysUdimsDownloadData.vue @@ -23,6 +23,15 @@ 查询 + + + + 立即下载基础信息 + 立即下载单据类型 + 立即下载扫码单据 + 立即下载国家库信息 + + @@ -128,6 +137,7 @@ import {filterLog, deleteLog, findConfig, updateConfig} from "../../api/thrsys/spsSyncDownload"; import store from "@/store"; import ShowText from "../other/showText"; + import {downloadNow} from "../../api/thrsys/spsSyncDownload"; export default { data() { @@ -339,6 +349,19 @@ this.syncInfo = item.remark; } }) + }, + downloadNow(type) { + //立即下载数据 + let params = {type: type}; + downloadNow(params).then((res) => { + if (res.code === 20000) { + this.$message.success("同步任务创建成功,稍后请刷新查看下载日志!"); + } else { + this.$message.error(res.message); + } + }).catch((error) => { + this.$message.error(error.message); + }) } },