Merge branch 'main' of http://47.92.168.204:3000/VoRDM/vordm-admin
This commit is contained in:
commit
b0911036df
|
@ -24,6 +24,7 @@
|
||||||
"leaflet-control-geocoder": "^2.4.0",
|
"leaflet-control-geocoder": "^2.4.0",
|
||||||
"leaflet-draw": "^1.0.4",
|
"leaflet-draw": "^1.0.4",
|
||||||
"leaflet-imageoverlay-rotated": "^0.2.1",
|
"leaflet-imageoverlay-rotated": "^0.2.1",
|
||||||
|
"leaflet-search": "^2.9.6",
|
||||||
"mitt": "^3.0.0",
|
"mitt": "^3.0.0",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"pinia": "^2.0.33",
|
"pinia": "^2.0.33",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import request, { crawlModule, moduleName } from '/@/utils/request';
|
import request, { crawlModule, moduleName,twitterModule } from '/@/utils/request';
|
||||||
|
|
||||||
export const geoserve = (vordm_id, link, disaster_id, name) => {
|
export const geoserve = (vordm_id, link, disaster_id, name) => {
|
||||||
return request({
|
return request({
|
||||||
|
@ -24,6 +24,15 @@ export const news = (disaster_id, keywords, page, isBaidu, id) => {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
export const twitter = (disaster_id, keys,stime,etime) => {
|
||||||
|
return request({
|
||||||
|
url: '/api/' + twitterModule + 'socialmedia/twitter',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
disaster_id, keys,stime,etime
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
export const rs = (stime, etime, disaster_id, ranges, type = 1,id) => {
|
export const rs = (stime, etime, disaster_id, ranges, type = 1,id) => {
|
||||||
let method = 'sentinel';
|
let method = 'sentinel';
|
||||||
if (type == 1) {
|
if (type == 1) {
|
||||||
|
@ -50,6 +59,22 @@ export const rs = (stime, etime, disaster_id, ranges, type = 1,id) => {
|
||||||
data: data,
|
data: data,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
export const rs2 = (disaster_id ,arr,stime,etime) => {
|
||||||
|
let data = {
|
||||||
|
stime,
|
||||||
|
etime,
|
||||||
|
disaster_id,
|
||||||
|
arr
|
||||||
|
}
|
||||||
|
return request({
|
||||||
|
url: '/api1/' + crawlModule + '/RS',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export const submit = (row) => {
|
export const submit = (row) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/' + moduleName + '/ui/crawlInfo/submit',
|
url: '/api/' + moduleName + '/ui/crawlInfo/submit',
|
||||||
|
|
|
@ -49,13 +49,13 @@ onMounted(() => {
|
||||||
|
|
||||||
featureLayerG_area = L.layerGroup().addTo(homeMap)
|
featureLayerG_area = L.layerGroup().addTo(homeMap)
|
||||||
featureLayerG_point = L.layerGroup().addTo(homeMap)
|
featureLayerG_point = L.layerGroup().addTo(homeMap)
|
||||||
// 'http://t0.tianditu.com/img_c/wmts?layer=img&style=default&tilematrixset=c&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}&tk='
|
'http://t0.tianditu.com/img_c/wmts?layer=img&style=default&tilematrixset=c&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}&tk='
|
||||||
// const CIA_C = "http://t0.tianditu.com/cia_c/wmts?layer=cia&style=default&tilematrixset=c&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}&tk=";
|
const CIA_C = "http://t0.tianditu.com/cia_c/wmts?layer=cia&style=default&tilematrixset=c&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}&tk=";
|
||||||
// const nameLayer = L.tileLayer(CIA_C + TK_KEY, {
|
const nameLayer = L.tileLayer(CIA_C + TK_KEY, {
|
||||||
// maxZoom: 20,
|
maxZoom: 20,
|
||||||
// tileSize: 256,
|
tileSize: 256,
|
||||||
// zoomOffset: 1
|
zoomOffset: 1
|
||||||
// }).addTo(homeMap);
|
}).addTo(homeMap);
|
||||||
|
|
||||||
// 创建Geocoding控件
|
// 创建Geocoding控件
|
||||||
const geocoder = L.Control.geocoder({
|
const geocoder = L.Control.geocoder({
|
||||||
|
|
|
@ -5,6 +5,7 @@ import { Session } from '/@/utils/storage';
|
||||||
|
|
||||||
export const moduleName = 'biz-vordm';
|
export const moduleName = 'biz-vordm';
|
||||||
export const crawlModule = 'vordm-crawl';
|
export const crawlModule = 'vordm-crawl';
|
||||||
|
export const twitterModule = "vordm-twitter";
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
//baseURL: import.meta.env.VITE_API_URL,
|
//baseURL: import.meta.env.VITE_API_URL,
|
||||||
timeout: 50000,
|
timeout: 50000,
|
||||||
|
|
|
@ -43,8 +43,7 @@
|
||||||
</svg>
|
</svg>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
|
|
||||||
<span v-if="!state.baiduOption.buttonIs" style="height: 40; line-height: 40px;">{{
|
<span v-if="!state.baiduOption.buttonIs" style="height: 40; line-height: 40px;">{{state.baiduOption.runTitle }}</span>
|
||||||
state.baiduOption.runTitle }}</span>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
|
@ -73,7 +72,7 @@
|
||||||
</svg>
|
</svg>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<el-icon :size="40" style="cursor:pointer ;" title="Data collection in progress, please wait……"
|
<el-icon :size="40" style="cursor:pointer ;" title="Data collection in progress, please wait……"
|
||||||
color="#131313" v-if="state.buttonIs && state.bing.status == 1">
|
color="#131313" v-if="state.bingOption.buttonIs && state.bing.status == 1">
|
||||||
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-ea893728="">
|
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-ea893728="">
|
||||||
<path fill="currentColor"
|
<path fill="currentColor"
|
||||||
d="M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32zm0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32zm448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32zm-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32zM195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0zm-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z">
|
d="M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32zm0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32zm448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32zm-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32zM195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0zm-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z">
|
||||||
|
@ -89,10 +88,68 @@
|
||||||
</svg>
|
</svg>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
|
|
||||||
<span v-if="!state.bingOption.buttonIs" style="height: 40; line-height: 40px;">{{ state.bingOption.runTitle
|
<span v-if="!state.bingOption.buttonIs" style="height: 40; line-height: 40px;">{{ state.bingOption.runTitle}}</span>
|
||||||
}}</span>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="3" style="text-align:center ;">
|
||||||
|
<el-image style="height:40px ; width:100px!" src="/bing.webp"></el-image>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="Confirm keywords" style="text-align:center ;">
|
||||||
|
<el-input v-model="state.twitter.keywords"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="9">
|
||||||
|
<el-form-item label="time" style="text-align:center; margin-left: 10px;">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="state.twitter.date"
|
||||||
|
type="daterange"
|
||||||
|
unlink-panels
|
||||||
|
range-separator="To"
|
||||||
|
start-placeholder="Start date"
|
||||||
|
end-placeholder="End date"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3" style="text-align:center ;">
|
||||||
|
<el-icon :size="40" style="cursor:pointer ;" :title="state.twitter.status == 0 ? 'Waiting in queue……' : 'start'"
|
||||||
|
:color="state.twitter.status == 0 ? '#4f4' : 'blue'"
|
||||||
|
@click="state.twitter.status == 0 ? confirmBox('twitter') : start('twitter')"
|
||||||
|
v-if="state.twitterOption.buttonIs && (state.twitter.status == 0 || !state.twitter.status)">
|
||||||
|
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-ea893728="">
|
||||||
|
<path fill="currentColor"
|
||||||
|
d="m249.6 417.088 319.744 43.072 39.168 310.272L845.12 178.88 249.6 417.088zm-129.024 47.168a32 32 0 0 1-7.68-61.44l777.792-311.04a32 32 0 0 1 41.6 41.6l-310.336 775.68a32 32 0 0 1-61.44-7.808L512 516.992l-391.424-52.736z">
|
||||||
|
</path>
|
||||||
|
</svg>
|
||||||
|
</el-icon>
|
||||||
|
<el-icon :size="40" style="cursor:pointer ;" title="Data collection in progress, please wait……"
|
||||||
|
color="#131313" v-if="state.twitterOption.buttonIs && state.twitter.status == 1">
|
||||||
|
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-ea893728="">
|
||||||
|
<path fill="currentColor"
|
||||||
|
d="M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32zm0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32zm448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32zm-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32zM195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0zm-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z">
|
||||||
|
</path>
|
||||||
|
</svg>
|
||||||
|
</el-icon>
|
||||||
|
<el-icon :size="40" style="cursor:pointer ;" title="once more start" color="#4f4" @click="start('bing')"
|
||||||
|
v-if="state.twitter.buttonIs && state.twitter.status == 2">
|
||||||
|
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-ea893728="">
|
||||||
|
<path fill="currentColor"
|
||||||
|
d="M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z">
|
||||||
|
</path>
|
||||||
|
</svg>
|
||||||
|
</el-icon>
|
||||||
|
|
||||||
|
<span v-if="!state.twitterOption.buttonIs" style="height: 40; line-height: 40px;">{{ state.twitterOption.runTitle}}</span>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button @click="state.isShowDialog = false" size="default">close</el-button>
|
<el-button @click="state.isShowDialog = false" size="default">close</el-button>
|
||||||
|
@ -120,6 +177,11 @@ const state = reactive({
|
||||||
page: 10,
|
page: 10,
|
||||||
disaster_id: undefined
|
disaster_id: undefined
|
||||||
},
|
},
|
||||||
|
twitter:{
|
||||||
|
keywords: "",
|
||||||
|
page: 10,
|
||||||
|
disaster_id: undefined
|
||||||
|
},
|
||||||
baiduOption: {
|
baiduOption: {
|
||||||
buttonIs: true,
|
buttonIs: true,
|
||||||
runTitle: ""
|
runTitle: ""
|
||||||
|
@ -127,7 +189,12 @@ const state = reactive({
|
||||||
bingOption: {
|
bingOption: {
|
||||||
buttonIs: true,
|
buttonIs: true,
|
||||||
runTitle: ""
|
runTitle: ""
|
||||||
}
|
},
|
||||||
|
twitterOption: {
|
||||||
|
buttonIs: true,
|
||||||
|
runTitle: ""
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
const confirmBox = (text) => {
|
const confirmBox = (text) => {
|
||||||
|
@ -157,11 +224,14 @@ const confirmBox = (text) => {
|
||||||
const openDialog = (row) => {
|
const openDialog = (row) => {
|
||||||
state.baidu = {};
|
state.baidu = {};
|
||||||
state.bing = {};
|
state.bing = {};
|
||||||
|
state.twitter={};
|
||||||
state.data = row;
|
state.data = row;
|
||||||
state.baidu.keywords = row.disasterKeyword;
|
state.baidu.keywords = row.disasterKeyword;
|
||||||
state.baidu.disaster_id = row.disasterId
|
state.baidu.disaster_id = row.disasterId
|
||||||
state.bing.keywords = row.disasterKeyword;
|
state.bing.keywords = row.disasterKeyword;
|
||||||
state.bing.disaster_id = row.disasterId
|
state.bing.disaster_id = row.disasterId
|
||||||
|
state.twitter.keywords = row.disasterKeyword;
|
||||||
|
state.twitter.disaster_id = row.disasterId
|
||||||
getDate();
|
getDate();
|
||||||
state.isShowDialog = true;
|
state.isShowDialog = true;
|
||||||
}
|
}
|
||||||
|
@ -176,54 +246,79 @@ const getDate = () => {
|
||||||
if (element.type == 1) {
|
if (element.type == 1) {
|
||||||
state.bing = element;
|
state.bing = element;
|
||||||
}
|
}
|
||||||
|
if(element.type == 3){
|
||||||
|
state.twitter = element
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
state.baidu.page = 10;
|
state.baidu.page = 10;
|
||||||
state.bing.page = 10;
|
state.bing.page = 10;
|
||||||
|
state.twitter.page = 10;
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
const start = (text) => {
|
const start = (text) => {
|
||||||
|
if(text == 'twitter'){
|
||||||
|
if(!state.twitter.date|| state.twitter.date.length<2){
|
||||||
|
ElMessage.error("Please select a data crawling time range!")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
state.baiduOption.runTitle = "start(5s)";
|
state.baiduOption.runTitle = "start(5s)";
|
||||||
let count = 4;
|
let count = 4;
|
||||||
const countdown = setInterval(function () {
|
const countdown = setInterval(function () {
|
||||||
if (text == 'baidu') {
|
if (text == 'baidu') {
|
||||||
state.baiduOption.runTitle = "start(" + count + "s)";
|
state.baiduOption.runTitle = "start(" + count + "s)";
|
||||||
} else {
|
} else if(text == 'bing') {
|
||||||
state.bingOption.runTitle = "start(" + count + "s)";
|
state.bingOption.runTitle = "start(" + count + "s)";
|
||||||
|
} else if(text == 'twitter'){
|
||||||
|
state.twitterOption.runTitle = "start(" + count + "s)";
|
||||||
}
|
}
|
||||||
|
|
||||||
count -= 1;
|
count -= 1;
|
||||||
if (count < 0) {
|
if (count < 0) {
|
||||||
if (text == 'baidu') {
|
if (text == 'baidu') {
|
||||||
state.baiduOption.buttonIs = true;
|
state.baiduOption.buttonIs = true;
|
||||||
} else {
|
} else if(text == 'bing') {
|
||||||
state.bingOption.buttonIs = true;
|
state.bingOption.buttonIs = true;
|
||||||
|
} if(text == 'twitter'){
|
||||||
|
state.twitterOption.buttonIs = true;
|
||||||
}
|
}
|
||||||
clearInterval(countdown);
|
clearInterval(countdown);
|
||||||
console.log('倒计时结束');
|
console.log('倒计时结束');
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
let keywords = (text == 'baidu' ? state.baidu.keywords : state.bing.keywords);
|
let keywords = (text == 'baidu' ? state.baidu.keywords :text == 'bing' ?state.bing.keywords:state.twitter.keywords);
|
||||||
let page = (text == 'baidu' ? state.baidu.page : state.bing.page);
|
let page = (text == 'baidu' ? state.baidu.page : text == 'bing' ?state.bing.page:state.twitter.page);
|
||||||
let id = (text == 'baidu' ? state.baidu.id : state.bing.id);
|
let id = (text == 'baidu' ? state.baidu.id : text == 'bing' ?state.bing.id:state.twitter.id);
|
||||||
submit(
|
submit(
|
||||||
{
|
{
|
||||||
type: text == 'baidu' ? 2 : 1,
|
type: text == 'baidu' ? 2 :text == 'bing'?1:3 ,
|
||||||
manageId: userInfo.userInfos.id,
|
manageId: userInfo.userInfos.id,
|
||||||
status: 0,
|
status: 0,
|
||||||
disasterId: state.data.disasterId,
|
disasterId: state.data.disasterId,
|
||||||
keywords: keywords,
|
keywords: keywords,
|
||||||
id: (id ? id : null)
|
id: (id ? id : null),
|
||||||
|
startDate:(text=='twitter'?state.twitter.date[0]:null),
|
||||||
|
endDate:(text=='twitter'?state.twitter.date[1]:null),
|
||||||
}
|
}
|
||||||
).then(ret => {
|
).then(ret => {
|
||||||
if (ret == 1042) {
|
if (ret == 1042) {
|
||||||
ElMessage.error("error")
|
ElMessage.error("error")
|
||||||
} else {
|
} else {
|
||||||
|
if(text =='baidu' || text == 'bing'){
|
||||||
news(ret.disasterId, keywords, page, (text == "baidu"), ret.id).then(res => {
|
news(ret.disasterId, keywords, page, (text == "baidu"), ret.id).then(res => {
|
||||||
|
ElMessage.success("Data is being acquired!")
|
||||||
getData();
|
getData();
|
||||||
})
|
})
|
||||||
ElMessage.success("Data is being acquired!")
|
}else if(text == 'twitter'){
|
||||||
|
console.log(state.twitter.date)
|
||||||
|
twitter(disasterId,keywords,state.twitter.date[0],state.twitter.date[1]).then(res=>{
|
||||||
|
ElMessage.success("Data is being acquired!")
|
||||||
|
getData();
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,15 @@
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
|
|
||||||
<div class="rsSelect">
|
<div class="rsSelect">
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
|
<span>{{ state.data.disasterKeyword }}</span>
|
||||||
|
<p style="color: #878787; ">VoRDM ID:{{ state.data.vordmId }}</p>
|
||||||
|
<p style="color: #aa4434;">Disaster time: {{ state.data.disasterTime }}</p>
|
||||||
|
<p style="color: #878787; ">Disaster Country: {{ state.data.disasterCountry }}</p>
|
||||||
|
</el-card>
|
||||||
|
<el-card class="box-card" style="margin-top: 3%;">
|
||||||
<span>Select time range</span>
|
<span>Select time range</span>
|
||||||
<el-row class="block">
|
<el-row class="block">
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
|
@ -84,15 +91,14 @@
|
||||||
:value="item.value" />
|
:value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-card> -->
|
</el-card> -->
|
||||||
|
<el-card style="margin-top:3%;">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span=" 1 "></el-col>
|
|
||||||
<el-col :span=" 6 ">
|
|
||||||
<el-button class="lowerBtn" @click=" startCrawl ">Start Crawl</el-button>
|
<el-button class="lowerBtn" @click=" startCrawl ">Start Crawl</el-button>
|
||||||
</el-col>
|
|
||||||
<el-col :span=" 6 ">
|
|
||||||
<el-button class="lowerBtn" @click=" ClearCondition ">Go Back</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-button class="lowerBtn" @click=" ClearCondition ">Go Back</el-button>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span=" 16 ">
|
<el-col :span=" 16 ">
|
||||||
|
@ -106,10 +112,11 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import Map from "/@/components/Map.vue";
|
import Map from "/@/components/Map.vue";
|
||||||
import { ref, reactive, watch, defineExpose } from 'vue';
|
import { ref, reactive, watch, defineExpose, onMounted,defineEmits } from 'vue';
|
||||||
import { rs, submit } from '/@/api/crawl/index';
|
import { rs, submit ,rs2 } from '/@/api/crawl/index';
|
||||||
import { useUserInfo } from '/@/stores/userInfo';
|
import { useUserInfo } from '/@/stores/userInfo';
|
||||||
import { ElMessage,ElMessageBox} from "element-plus";
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
|
import { getList as BizDict } from "/@/api/system/dictbiz.js";
|
||||||
const userInfo = useUserInfo();
|
const userInfo = useUserInfo();
|
||||||
const emit = defineEmits(['response']);
|
const emit = defineEmits(['response']);
|
||||||
const disabledDate = (time) => {
|
const disabledDate = (time) => {
|
||||||
|
@ -128,118 +135,13 @@ const state = reactive({
|
||||||
{
|
{
|
||||||
value: 'landsat',
|
value: 'landsat',
|
||||||
label: 'landsat',
|
label: 'landsat',
|
||||||
// children: [{
|
|
||||||
// value: 1 - 1,
|
|
||||||
// label: 'LANDSAT_8_C1'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// value: 1 - 2,
|
|
||||||
// label: 'LANDSAT_ETM_C1'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// value: 1 - 3,
|
|
||||||
// label: 'LANDSAT_TM_C1'
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'Sentinel',
|
value: 'Sentinel',
|
||||||
label: 'Sentinel',
|
label: 'Sentinel',
|
||||||
// children: [{
|
|
||||||
// value: 2 - 1,
|
|
||||||
// label: 'Sentinel - 2',
|
|
||||||
// children: [{
|
|
||||||
// value: 2 - 1 - 1,
|
|
||||||
// label: 'S2MSI2A'
|
|
||||||
// }]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// value: 2 - 2,
|
|
||||||
// label: 'Sentinel - 1',
|
|
||||||
// children: [{
|
|
||||||
// value: 2 - 2 - 1,
|
|
||||||
// label: 'SLC'
|
|
||||||
// }]
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// value: '国产系列卫星',
|
|
||||||
// label: '国产系列卫星',
|
|
||||||
// children: [
|
|
||||||
// {
|
|
||||||
// value: 'GF - 1',
|
|
||||||
// label: 'GF - 1',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// value: 'GF - 2',
|
|
||||||
// label: 'GF - 2',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// value: 'GF - 3',
|
|
||||||
// label: 'GF - 3',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// value: 'GF - 4',
|
|
||||||
// label: 'GF - 4',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// value: 'GF - 6',
|
|
||||||
// label: 'GF - 6',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// value: 'ZY - 3',
|
|
||||||
// label: 'ZY - 3',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// value: 'ZY - 302',
|
|
||||||
// label: 'ZY - 302',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// value: 'ZY - 02C',
|
|
||||||
// label: 'ZY - 02C',
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// value: '欧比特珠海一号系列卫星',
|
|
||||||
// label: '欧比特珠海一号系列卫星',
|
|
||||||
// children: [
|
|
||||||
// {
|
|
||||||
// value: 'OVS - 2A',
|
|
||||||
// label: 'OVS - 2A',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// value: 'OVS - 3A',
|
|
||||||
// label: 'OVS - 3A',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// value: 'OVS - 1A',
|
|
||||||
// label: 'OVS - 1A',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// value: 'OVS - 1B',
|
|
||||||
// label: 'OVS - 1B',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// value: 'OHS - 2A',
|
|
||||||
// label: 'OHS - 2A',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// value: 'OHS - 2B',
|
|
||||||
// label: 'OHS - 2B',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// value: 'OHS - 2C',
|
|
||||||
// label: 'OHS - 2C',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// value: 'OHS - 2D',
|
|
||||||
// label: 'OHS - 2D',
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
// }
|
|
||||||
],
|
],
|
||||||
|
dictData:[],
|
||||||
shortcuts: [
|
shortcuts: [
|
||||||
{
|
{
|
||||||
text: '1 month ago',
|
text: '1 month ago',
|
||||||
|
@ -293,6 +195,16 @@ const state = reactive({
|
||||||
disLon: '',
|
disLon: '',
|
||||||
data: {}
|
data: {}
|
||||||
})
|
})
|
||||||
|
//获取所有卫星类型
|
||||||
|
onMounted(() => {
|
||||||
|
BizDict({ code: 'satelliteType' }).then(res => {
|
||||||
|
let data = res.map(item=>{
|
||||||
|
return {value:item.dictValue,label:item.dictValue}
|
||||||
|
})
|
||||||
|
state.sensor = data;
|
||||||
|
state.dictData = res;
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
const onMapClick = (e) => {
|
const onMapClick = (e) => {
|
||||||
state.lat = e.latlng.lat.toFixed(3);
|
state.lat = e.latlng.lat.toFixed(3);
|
||||||
|
@ -394,72 +306,45 @@ const startCrawl = () => {
|
||||||
|
|
||||||
|
|
||||||
var ranges = state.coordinateList[0].Lat + ' ' + state.coordinateList[0].Lng + ',' + state.coordinateList[1].Lat + ' ' + state.coordinateList[1].Lng
|
var ranges = state.coordinateList[0].Lat + ' ' + state.coordinateList[0].Lng + ',' + state.coordinateList[1].Lat + ' ' + state.coordinateList[1].Lng
|
||||||
var type = null
|
var param = []
|
||||||
if (state.satelliteSelected[0] == 'landsat') {
|
|
||||||
type = '5'
|
|
||||||
} else if (state.satelliteSelected[0] == 'Sentinel') {
|
|
||||||
type = '6'
|
|
||||||
} else if (state.satelliteSelected[0] == '') {
|
|
||||||
type = '7'
|
|
||||||
}
|
|
||||||
var id = 2
|
|
||||||
|
|
||||||
var param = {
|
state.satelliteSelected.forEach(data=>{
|
||||||
"stime": state.startTime,
|
|
||||||
"etime": state.endTime,
|
|
||||||
"disaster_id": state.data.disasterId,
|
|
||||||
"ranges": ranges,
|
|
||||||
"id": id
|
|
||||||
}
|
|
||||||
|
|
||||||
submit(
|
// state.dictData.ma
|
||||||
{
|
var obj = state.dictData.find(function(item) {
|
||||||
type: type,
|
return item.dictValue === data;
|
||||||
|
});
|
||||||
|
param.push( {
|
||||||
|
type: obj.dictKey,
|
||||||
startDate: state.startTime,
|
startDate: state.startTime,
|
||||||
endDate: state.endTime,
|
endDate: state.endTime,
|
||||||
manageId: userInfo.userInfos.id,
|
manageId: userInfo.userInfos.id,
|
||||||
|
range:ranges,
|
||||||
status: 0,
|
status: 0,
|
||||||
disasterId: state.data.disasterId,
|
disasterId: state.data.disasterId,
|
||||||
id: (id ? id : null)
|
})
|
||||||
}
|
})
|
||||||
).then(ret => {
|
//提交后台数据
|
||||||
if (ret == 1042) {
|
submit( param ).then(ret => {
|
||||||
ElMessage.error("error")
|
let arrParams=[];
|
||||||
} else {
|
ret.forEach(res=>{
|
||||||
state.satelliteSelected.forEach(data => {
|
var obj1 = state.dictData.find(function(item) {
|
||||||
if (data == 'Sentinel') {
|
return item.dictKey == res.type;
|
||||||
rs(state.startTime, state.endTime, state.data.disasterId, ranges, type = 1, ret.id).then(res => {
|
});
|
||||||
|
arrParams.push({
|
||||||
|
type:obj1.dictValue,
|
||||||
|
range:res.range,
|
||||||
|
id:res.id
|
||||||
|
})
|
||||||
|
})
|
||||||
|
//调用爬虫服务
|
||||||
|
rs2(state.data.disasterId,arrParams,state.startTime,state.endTime).then(res => {
|
||||||
// getData();
|
// getData();
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: 'Success, Start crawling. sentinel',
|
message: 'Success, Start crawling. sentinel',
|
||||||
type: 'success',
|
type: 'success',
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else if ("landsat" == data) {
|
|
||||||
rs(state.startTime, state.endTime, state.data.disasterId, ranges, type = 2, ret.id).then(res => {
|
|
||||||
// getData();
|
|
||||||
ElMessage({
|
|
||||||
message: 'Success, Start crawling. landsat',
|
|
||||||
type: 'success',
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
ElMessageBox.confirm(
|
|
||||||
'The operation has been submitted, would you like to return to the list page?',
|
|
||||||
'tips',
|
|
||||||
{
|
|
||||||
confirmButtonText: 'OK',
|
|
||||||
cancelButtonText: 'Cancel',
|
|
||||||
type: 'warning',
|
|
||||||
}
|
|
||||||
)
|
|
||||||
.then(() => {
|
|
||||||
emit('response')
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -482,13 +367,12 @@ watch(
|
||||||
map.value.mapOperations.off("click", onMapClick)
|
map.value.mapOperations.off("click", onMapClick)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ immediate: true })
|
{ immediate: true }
|
||||||
|
)
|
||||||
const setData = (row) => {
|
const setData = (row) => {
|
||||||
state.data = row;
|
state.data = row;
|
||||||
state.selectID = row.disasterId
|
state.selectID = row.disasterId
|
||||||
console.log(row);
|
|
||||||
map.value.mapOperations.wktParseToMap(row.geometry)
|
map.value.mapOperations.wktParseToMap(row.geometry)
|
||||||
console.log(row)
|
|
||||||
}
|
}
|
||||||
defineExpose({
|
defineExpose({
|
||||||
setData
|
setData
|
||||||
|
@ -542,13 +426,14 @@ defineExpose({
|
||||||
}
|
}
|
||||||
|
|
||||||
.lowerBtn {
|
.lowerBtn {
|
||||||
width: 90%;
|
width: 100%;
|
||||||
margin: 3% 0;
|
text-align: center;
|
||||||
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#map {
|
#map {
|
||||||
height: 52rem;
|
height: 58rem;
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -35,6 +35,12 @@ const viteConfig = defineConfig((mode) => {
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/api/, ''),
|
rewrite: (path) => path.replace(/^\/api/, ''),
|
||||||
},
|
},
|
||||||
|
'/api1': {
|
||||||
|
target: 'http://39.98.35.99:6300',
|
||||||
|
ws: true,
|
||||||
|
changeOrigin: true,
|
||||||
|
rewrite: (path) => path.replace(/^\/api/, ''),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
|
|
Loading…
Reference in New Issue