1.下载任务页面添加立即下载功能

zhairh
x_z 2 years ago
parent 4eac7d5b29
commit e43bd51f04

@ -24,3 +24,11 @@ export function findConfig(query) {
params: query
});
}
export function downloadNow(params) {
return axios({
url: "",
method: "get",
params: params
});
}

@ -23,6 +23,15 @@
<el-button type="primary" icon="search" @click="getList"></el-button>
</el-button-group>
</el-form-item>
<el-form-item>
<el-button-group style="display:flex;">
<el-button type="primary" icon="search" @click="downloadNow(1)"></el-button>
<el-button type="primary" icon="search" @click="downloadNow(2)"></el-button>
<el-button type="primary" icon="search" @click="downloadNow(3)"></el-button>
<el-button type="primary" icon="search" @click="downloadNow(4)"></el-button>
</el-button-group>
</el-form-item>
</el-row>
</el-form>
@ -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);
})
}
},

Loading…
Cancel
Save