1638357539757
diff --git a/04.系统编码/Frontend/src/components/MicrowaveRadiation.vue b/04.系统编码/Frontend/src/components/MicrowaveRadiation.vue
index b3bf72d..b358b8d 100644
--- a/04.系统编码/Frontend/src/components/MicrowaveRadiation.vue
+++ b/04.系统编码/Frontend/src/components/MicrowaveRadiation.vue
@@ -69,6 +69,7 @@
@@ -106,6 +107,7 @@
import { onMounted, reactive, toRefs } from 'vue';
import moment from "moment";
import { MicrowaveRadiationConfig } from '../uilts/Config';
+import { post } from '../uilts/axios';
export default {
name: 'MicrowaveRadiation',
@@ -127,7 +129,8 @@
srcList: [],
isPlay: false,
title: null,
- index: 0
+ index: 0,
+ downloadSrc: null
})
onMounted(() => {
@@ -200,14 +203,49 @@
}
const onDownloadClick = () => {
- let params = {
+ post("/image/createGif", prepareParams(), 'application/json').then((response: any) => {
+ if (response.error != 0){
+ console.log(response.message);
+ return;
+ }
+
+ fetch(response.data).then(res => {
+ return res.blob();
+ }).then(blob => {
+ let reader = new FileReader();
+ reader.onloadend = function(){
+ options.downloadSrc = reader.result;
+ setTimeout(() => {
+ document.getElementById("weboDownload").click();
+ options.downloadSrc = null;
+ }, 500);
+ };
+ reader.readAsDataURL(blob);
+ }).catch(console.error);
+ })
+ }
+
+ const prepareParams = () => {
+ return {
model: 'weibo',
station: options.currentRegion,
- element: options.currentElement,
+ elementCode: options.currentElement,
type: options.currentTab,
- time: [options.times[0].date, options.times[options.times.length - 1].date],
- urls: []
+ time: moment(options.times[0].date).format("YYYYMMDDHHmmss") + '-' + moment(options.times[options.times.length - 1].date).format("YYYYMMDDHHmmss"),
+ urls: prepareUrls()
+ }
+ }
+
+ const prepareUrls = () => {
+ let urls = [];
+ for(let index = 0, len = options.hours.length; index < len; index++){
+ let date = moment(options.times[options.index].date);
+ let time = moment(options.date).hour(date.hour()).minute(date.minute());
+ let type = (options.currentTab === 'T-logP' || options.currentTab === 'BPFY') ? options.currentTab : (options.currentTab + '_' + options.currentType);
+ urls.push(MicrowaveRadiationConfig.getUrl(options.currentRegion, type, time));
}
+
+ return urls;
}
const converToBase64 = (path) => {
diff --git a/04.系统编码/Frontend/src/uilts/Config.ts b/04.系统编码/Frontend/src/uilts/Config.ts
index 7b1c10d..5bdd79a 100644
--- a/04.系统编码/Frontend/src/uilts/Config.ts
+++ b/04.系统编码/Frontend/src/uilts/Config.ts
@@ -2,8 +2,8 @@ import { Moment } from "moment";
import { format } from "./String";
export class Config {
- // public static parentUrl: string = "http://112.124.40.88:8002/product/picture";
- public static parentUrl: string = "http://10.124.102.10:8002/product/picture";
+ public static parentUrl: string = "http://112.124.40.88:8002/product/picture";
+ // public static parentUrl: string = "http://10.124.102.10:8002/product/picture";
}
export class MicrowaveRadiationConfig {
diff --git a/04.系统编码/Frontend/src/uilts/axios.ts b/04.系统编码/Frontend/src/uilts/axios.ts
index dcbef21..47d73f7 100644
--- a/04.系统编码/Frontend/src/uilts/axios.ts
+++ b/04.系统编码/Frontend/src/uilts/axios.ts
@@ -5,8 +5,8 @@ import { ElLoading } from 'element-plus'
let loading = null;
const service = axios.create({
- baseURL:"http://112.124.40.88:8002",
- // baseURL:"",
+ // baseURL:"http://112.124.40.88:8002",
+ baseURL:"",
timeout: 500000
})