From df9884913ca99bc34e719f7539899fb61d9c0e5c Mon Sep 17 00:00:00 2001 From: wj <1285151836@qq.com> Date: Thu, 4 May 2023 20:14:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/sync/spsSyncStatus.js | 9 ++++++++ src/views/sync/SysUdimsData.vue | 40 +++++++++++++++++++++++++-------- 2 files changed, 40 insertions(+), 9 deletions(-) diff --git a/src/api/sync/spsSyncStatus.js b/src/api/sync/spsSyncStatus.js index 091be2f..c9c75b9 100644 --- a/src/api/sync/spsSyncStatus.js +++ b/src/api/sync/spsSyncStatus.js @@ -50,5 +50,14 @@ export function infoByStatus(query) { data: query, responseType: 'blob' }); + } + + +export function syncData(query) { + return axios({ + url: "/spssync/udiinfo/syncData", + method: "post", + data: query + }); } diff --git a/src/views/sync/SysUdimsData.vue b/src/views/sync/SysUdimsData.vue index c46c6dd..82e5760 100644 --- a/src/views/sync/SysUdimsData.vue +++ b/src/views/sync/SysUdimsData.vue @@ -29,20 +29,20 @@ 查询 - 同步单据 + 同步单据 - - + 同步单据类型 - 同步基础信息 + 同步基础信息 - 同步国家库DI数据 + 同步其他数据 + @@ -110,7 +110,8 @@ import { createSchedule, findConfig, updateConfig, - infoByStatus + infoByStatus, + syncData } from "../../api/sync/spsSyncStatus"; import store from "@/store"; @@ -402,6 +403,27 @@ export default { this.getList(); }) .catch(() => {}); + }, + syncData(exportType){ + if(!this.syncTime){ + this.$message.error("请选择同步时间"); + return false + } + let param = { + exportType : exportType, + syncTime: this.syncTime + } + syncData(param).then((response) => { + if (response.code == 20000) { + this.filterQuery.page = 1 + this.$message.success("操作成功"); + } else { + this.$message.error(response.message); + } + this.syncTime=null + this.getList(); + }) + .catch(() => {}); } },