diff --git a/ruoyi-ui/src/views/measurement/operation/outinpound/index.vue b/ruoyi-ui/src/views/measurement/operation/outinpound/index.vue
index 6fbed17..bf189b0 100644
--- a/ruoyi-ui/src/views/measurement/operation/outinpound/index.vue
+++ b/ruoyi-ui/src/views/measurement/operation/outinpound/index.vue
@@ -76,6 +76,8 @@
称毛重
称皮重
+ 同步
+
@@ -497,6 +499,7 @@ import {mulToString,mulToArray} from "@/api/tool/util.js"
import { getSearchSelectData } from "@/api/tool/gen.js";
//引入searchData组件
import {selectConfigs} from "@/components/SearchSelect/searchdata.js";
+import { listJob, runJob} from "@/api/monitor/job";
export default {
name: "Outinpound",
components: {SearchSelect},
@@ -545,6 +548,15 @@ export default {
weightTimer: null, // 存储定时器ID
// 表单参数
form: {},
+ //定时任务参数
+ TaskQueryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ jobName: null,
+ invokeTarget: 'apiTask.getOAData()',
+ jobGroup: undefined,
+ status: undefined
+ },
tabs: [
{ name: 'weighingRequest', label: '过磅申请' },
{ name: 'tareRequest', label: '过皮申请' },
@@ -1096,20 +1108,31 @@ export default {
getOptionsByKey(key) {
const cfg = this.searchData.selectConfigs.find(c => c.key === key);
return this.searchData.optionsMap[this.buildCacheKey(cfg)] || [];
+ },
+ //同步定时任务
+ synchronizeData(){
+ this.loading = true;
+ listJob(this.TaskQueryParams).then(response => {
+ let row = response.rows[0];
+ runJob(row.jobId, row.jobGroup).then(response =>{
+ this.$modal.msgSuccess("执行成功,同步详情可在定时任务日志查看");
+ this.loading = false;
+ })
+ });
+ },
+ },
+ mounted() {
+ // 组件挂载后启动定时器,每秒执行一次
+ // this.weightTimer = setInterval(() => {
+ // this.handleGetweight();
+ // }, 1000);
+ },
+ beforeDestroy() {
+ // 组件销毁前清除定时器
+ if (this.weightTimer) {
+ clearInterval(this.weightTimer);
+ this.weightTimer = null;
}
},
-mounted() {
- // 组件挂载后启动定时器,每秒执行一次
- // this.weightTimer = setInterval(() => {
- // this.handleGetweight();
- // }, 1000);
-},
-beforeDestroy() {
- // 组件销毁前清除定时器
- if (this.weightTimer) {
- clearInterval(this.weightTimer);
- this.weightTimer = null;
- }
-}
}