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(() => {}); } },