This commit is contained in:
qqGroup0 2023-05-22 16:28:58 +08:00
commit f1688ee882
12 changed files with 309 additions and 219 deletions

View File

@ -21,8 +21,10 @@
"js-cookie": "^3.0.1",
"js-md5": "^0.7.3",
"leaflet": "^1.9.3",
"leaflet-control-geocoder": "^2.4.0",
"leaflet-draw": "^1.0.4",
"leaflet-imageoverlay-rotated": "^0.2.1",
"leaflet-search": "^2.9.6",
"mitt": "^3.0.0",
"nprogress": "^0.2.0",
"pinia": "^2.0.33",

BIN
public/twitter.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -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) => {
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) => {
let method = 'sentinel';
if (type == 1) {
@ -50,6 +59,22 @@ export const rs = (stime, etime, disaster_id, ranges, type = 1,id) => {
data: data,
});
};
export const rs2 = (disaster_id ,arr,stime,etime) => {
let data = {
stime,
etime,
disaster_id,
arr
}
return request({
url: '/api/' + crawlModule + '/RS',
method: 'post',
data: data,
});
};
export const submit = (row) => {
return request({
url: '/api/' + moduleName + '/ui/crawlInfo/submit',

View File

@ -37,3 +37,12 @@ export const approval = (data) => {
data: data
});
};
export const importTemplate = (data) => {
return request({
url: '/api/' + moduleName + '/ui/remoteSensing/importTemplate',
headers:{'Content-Type': 'multipart/form-data'},
method: 'post',
data: data
});
};

View File

@ -1,6 +1,5 @@
<template>
<div ref="map"
class="container"></div>
<div ref="map" class="container"></div>
</template>
<script setup>
@ -14,6 +13,8 @@ import 'leaflet-draw/dist/leaflet.draw.css'
import '@geoman-io/leaflet-geoman-free';
import '@geoman-io/leaflet-geoman-free/dist/leaflet-geoman.css';
import 'Leaflet-ImageOverlay-Rotated'
import 'leaflet-control-geocoder/dist/Control.Geocoder.css';
import 'leaflet-control-geocoder';
import { useVariableStore } from '/@/stores/index.ts'
import * as omnivore from '@mapbox/leaflet-omnivore'
const variableStore = useVariableStore()
@ -48,7 +49,33 @@ onMounted(() => {
featureLayerG_area = 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='
// 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, {
// maxZoom: 20,
// tileSize: 256,
// zoomOffset: 1
// }).addTo(homeMap);
// Geocoding
const geocoder = L.Control.geocoder({
defaultMarkGeocode: false,
placeholder: 'Enter address...',
collapsed: true,
}).addTo(homeMap);
// Geocoding
geocoder.on('markgeocode', function (event) {
const result = event.geocode || {};
onGeocodeResult(result);
});
})
const onGeocodeResult = (result) => {
homeMap.setView(result.center, 5);
L.marker(result.center).addTo(homeMap);
}
/** WKT
* Object param 参数集合
* @param {

View File

@ -5,6 +5,7 @@ import { Session } from '/@/utils/storage';
export const moduleName = 'biz-vordm';
export const crawlModule = 'vordm-crawl';
export const twitterModule = "vordm-twitter";
const service = axios.create({
//baseURL: import.meta.env.VITE_API_URL,
timeout: 50000,

View File

@ -43,8 +43,7 @@
</svg>
</el-icon>
<span v-if="!state.baiduOption.buttonIs" style="height: 40; line-height: 40px;">{{
state.baiduOption.runTitle }}</span>
<span v-if="!state.baiduOption.buttonIs" style="height: 40; line-height: 40px;">{{state.baiduOption.runTitle }}</span>
</el-col>
</el-row>
<el-row>
@ -73,7 +72,7 @@
</svg>
</el-icon>
<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="">
<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">
@ -89,10 +88,68 @@
</svg>
</el-icon>
<span v-if="!state.bingOption.buttonIs" style="height: 40; line-height: 40px;">{{ state.bingOption.runTitle
}}</span>
<span v-if="!state.bingOption.buttonIs" style="height: 40; line-height: 40px;">{{ state.bingOption.runTitle}}</span>
</el-col>
</el-row>
<el-row>
<el-col :span="3" style="text-align:center ;">
<el-image style="height:40px ; width:100px!" src="/twitter.png"></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>
<span class="dialog-footer">
<el-button @click="state.isShowDialog = false" size="default">close</el-button>
@ -120,6 +177,11 @@ const state = reactive({
page: 10,
disaster_id: undefined
},
twitter:{
keywords: "",
page: 10,
disaster_id: undefined
},
baiduOption: {
buttonIs: true,
runTitle: ""
@ -127,7 +189,12 @@ const state = reactive({
bingOption: {
buttonIs: true,
runTitle: ""
}
},
twitterOption: {
buttonIs: true,
runTitle: ""
},
})
const confirmBox = (text) => {
@ -157,11 +224,14 @@ const confirmBox = (text) => {
const openDialog = (row) => {
state.baidu = {};
state.bing = {};
state.twitter={};
state.data = row;
state.baidu.keywords = row.disasterKeyword;
state.baidu.disaster_id = row.disasterId
state.bing.keywords = row.disasterKeyword;
state.bing.disaster_id = row.disasterId
state.twitter.keywords = row.disasterKeyword;
state.twitter.disaster_id = row.disasterId
getDate();
state.isShowDialog = true;
}
@ -176,54 +246,79 @@ const getDate = () => {
if (element.type == 1) {
state.bing = element;
}
if(element.type == 3){
state.twitter = element
}
}
state.baidu.page = 10;
state.bing.page = 10;
state.twitter.page = 10;
})
}
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)";
let count = 4;
const countdown = setInterval(function () {
if (text == 'baidu') {
state.baiduOption.runTitle = "start(" + count + "s)";
} else {
} else if(text == 'bing') {
state.bingOption.runTitle = "start(" + count + "s)";
} else if(text == 'twitter'){
state.twitterOption.runTitle = "start(" + count + "s)";
}
count -= 1;
if (count < 0) {
if (text == 'baidu') {
state.baiduOption.buttonIs = true;
} else {
} else if(text == 'bing') {
state.bingOption.buttonIs = true;
} if(text == 'twitter'){
state.twitterOption.buttonIs = true;
}
clearInterval(countdown);
console.log('倒计时结束');
}
}, 1000);
let keywords = (text == 'baidu' ? state.baidu.keywords : state.bing.keywords);
let page = (text == 'baidu' ? state.baidu.page : state.bing.page);
let id = (text == 'baidu' ? state.baidu.id : state.bing.id);
let keywords = (text == 'baidu' ? state.baidu.keywords :text == 'bing' ?state.bing.keywords:state.twitter.keywords);
let page = (text == 'baidu' ? state.baidu.page : text == 'bing' ?state.bing.page:state.twitter.page);
let id = (text == 'baidu' ? state.baidu.id : text == 'bing' ?state.bing.id:state.twitter.id);
submit(
{
type: text == 'baidu' ? 2 : 1,
[{
type: text == 'baidu' ? 2 :text == 'bing'?1:3 ,
manageId: userInfo.userInfos.id,
status: 0,
disasterId: state.data.disasterId,
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 => {
if (ret == 1042) {
ElMessage.error("error")
} else {
if(text =='baidu' || text == 'bing'){
news(ret.disasterId, keywords, page, (text == "baidu"), ret.id).then(res => {
ElMessage.success("Data is being acquired!")
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();
})
}
}
})
}

View File

@ -33,7 +33,7 @@
<el-select class="form-select" size="default" clearable placeholder="Select status"
v-model="state.status">
<el-option v-for="(item, index) in state.options_status" :value="item.value" :key="index"
:label="item.label" />
:label="item.label" style="height: 45px;" />
</el-select>
</el-col>
<el-col :span="3">
@ -44,6 +44,14 @@
Search
</el-button>
</el-col>
<el-col :span="3">
<el-upload ref="upFileRef" class="upload-demo" :accept="'.xls,.xlsx'" :auto-upload="false"
:on-change="addRemoteSensingData" :show-file-list="false" style="margin-top:15px">
<template #trigger>
<el-button type="success">Upload</el-button>
</template>
</el-upload>
</el-col>
</el-row>
</div>
@ -66,8 +74,10 @@
</el-table-column>
<el-table-column prop="Operate" label="Operate" align="center" width="200" show-overflow-tooltip>
<template #default="scope">
<el-button v-if="scope.row.status === 1" size="small" text type="primary" @click="approvalDataOpen(scope.row)">start</el-button>
<el-button v-if="scope.row.status === 2 || scope.row.status === 3" size="small" text type="primary" @click="addAddressOpen(scope.row)">add_address</el-button>
<el-button v-if="scope.row.status === 1" size="small" text type="primary"
@click="approvalDataOpen(scope.row)">start</el-button>
<el-button v-if="scope.row.status === 2 || scope.row.status === 3" size="small" text type="primary"
@click="addAddressOpen(scope.row)">add_address</el-button>
</template>
</el-table-column>
</el-table>
@ -86,15 +96,18 @@
<script setup>
import { ref, reactive, onMounted } from 'vue';
import { getRemoteSensingSourceDataByCondition, getPagesRemoteSensingSourceData } from "/@/api/remoteSensingSourceData/remoteSensingSourceData.js";
import { getRemoteSensingSourceDataByCondition, getPagesRemoteSensingSourceData, importTemplate } from "/@/api/remoteSensingSourceData/remoteSensingSourceData.js";
import { getDisasterPage } from '/@/api/data/otherData.js'
import disasterTable from "/@/components/table/DisasterTable.vue";
import approvalData from "./approvalData.vue";
import addAddress from "./addAddress.vue";
import { ElMessageBox, ElMessage } from 'element-plus';
// import { getList as getDisasterPage } from '/@/api/disasterInfo/index';
const approvalDataRef = ref();
const addAddressRef = ref();
const upFileRef = ref();
const state = reactive({
disasterData: {
data: [],
@ -228,6 +241,24 @@ const getData = () => {
})
}
const addRemoteSensingData = (data, fileList) => {
console.log(data, "data");
console.log(fileList, "fileListfileList");
if (state.disasterId == null) {
ElMessage.warning('Please select the disaster first');
return false;
}
const form = new FormData();
form.append("file", data.raw);
form.append("disasterId", state.disasterId);
importTemplate(form).then(da => {
ElMessage.success("success");
emit('callback');
searchRemoteSensingSourceData();
upFileRef.value.clearFiles();
})
}
//
const searchRemoteSensingSourceData = () => {
//
@ -311,7 +342,6 @@ const searchRemoteSensingSourceData = () => {
}
const reviseDownload = (row) => {
console.log(row, "rowrowrow");
}
@ -566,4 +596,8 @@ const searchDisasterDate = () => {
display: flex;
justify-content: end;
}
::v-deep .el-input__wrapper {
height: 40px;
}
</style>

View File

@ -3,8 +3,15 @@
<el-row>
<el-col :span="8">
<div class="rsSelect">
<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>
<el-row class="block">
<el-col :span="5">
@ -84,15 +91,14 @@
:value="item.value" />
</el-select>
</el-card> -->
<el-card style="margin-top:3%;">
<el-row>
<el-col :span=" 1 "></el-col>
<el-col :span=" 6 ">
<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-button class="lowerBtn" @click=" ClearCondition ">Go Back</el-button>
</el-row>
</el-card>
</div>
</el-col>
<el-col :span=" 16 ">
@ -106,10 +112,11 @@
<script setup>
import Map from "/@/components/Map.vue";
import { ref, reactive, watch, defineExpose } from 'vue';
import { rs, submit } from '/@/api/crawl/index';
import { ref, reactive, watch, defineExpose, onMounted,defineEmits } from 'vue';
import { rs, submit ,rs2 } from '/@/api/crawl/index';
import { useUserInfo } from '/@/stores/userInfo';
import { ElMessage, ElMessageBox } from "element-plus";
import { getList as BizDict } from "/@/api/system/dictbiz.js";
const userInfo = useUserInfo();
const emit = defineEmits(['response']);
const disabledDate = (time) => {
@ -128,118 +135,13 @@ const state = reactive({
{
value: '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',
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: [
{
text: '1 month ago',
@ -293,6 +195,16 @@ const state = reactive({
disLon: '',
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) => {
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 type = null
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 = []
var param = {
"stime": state.startTime,
"etime": state.endTime,
"disaster_id": state.data.disasterId,
"ranges": ranges,
"id": id
}
state.satelliteSelected.forEach(data=>{
submit(
{
type: type,
// state.dictData.ma
var obj = state.dictData.find(function(item) {
return item.dictValue === data;
});
param.push( {
type: obj.dictKey,
startDate: state.startTime,
endDate: state.endTime,
manageId: userInfo.userInfos.id,
range:ranges,
status: 0,
disasterId: state.data.disasterId,
id: (id ? id : null)
}
).then(ret => {
if (ret == 1042) {
ElMessage.error("error")
} else {
state.satelliteSelected.forEach(data => {
if (data == 'Sentinel') {
rs(state.startTime, state.endTime, state.data.disasterId, ranges, type = 1, ret.id).then(res => {
})
})
//
submit( param ).then(ret => {
let arrParams=[];
ret.forEach(res=>{
var obj1 = state.dictData.find(function(item) {
return item.dictKey == res.type;
});
arrParams.push({
type:obj1.dictValue,
range:res.range,
id:res.id
})
})
//
rs2(state.data.disasterId,arrParams,state.startTime,state.endTime).then(res => {
// getData();
ElMessage({
message: 'Success, Start crawling. sentinel',
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)
}
},
{ immediate: true })
{ immediate: true }
)
const setData = (row) => {
state.data = row;
state.selectID = row.disasterId
console.log(row);
map.value.mapOperations.wktParseToMap(row.geometry)
console.log(row)
}
defineExpose({
setData
@ -542,13 +426,14 @@ defineExpose({
}
.lowerBtn {
width: 90%;
margin: 3% 0;
width: 100%;
text-align: center;
margin-top: 5px;
}
}
#map {
height: 52rem;
height: 58rem;
margin-left: 5px;
}
</style>

View File

@ -85,9 +85,10 @@ const save = async () => {
id: state.rowData.disasterId,
chiefId: state.selectData[0].id,
chiefName: state.selectData[0].name,
allocation:"YES"
};
let res = await submit(params).then(da=>{
ElMessage.success('Save success');
ElMessage.success('success');
});
emit('callback');
closeDialog();

View File

@ -516,8 +516,7 @@ const onOpenEditRole = (type, row) => {
//
state.edit = JSON.parse(JSON.stringify(row));
state.dialogVisible = true;
if (row.geometry.substring(0, row.geometry.indexOf("(") - 1) == 'POINT') {
if (row.geometry.indexOf("POINT") != -1) {
setTimeout(() => {
state.radio = "1"
state.dislon = row.geometry.substring(row.geometry.indexOf("(") + 1, row.geometry.lastIndexOf(" "))
@ -532,7 +531,7 @@ const onOpenEditRole = (type, row) => {
mapEvents('1')
}, 100);
}
else if (row.geometry.substring(0, row.geometry.indexOf("((") - 1) == 'POLYGON') {
else if (row.geometry.indexOf("POLYGON") != -1) {
setTimeout(() => {
state.radio = "2"
// mapRef.value.mapOperations.removeAll()

View File

@ -2610,6 +2610,13 @@ jsonfile@^6.0.1:
optionalDependencies:
graceful-fs "^4.1.6"
leaflet-control-geocoder@^2.4.0:
version "2.4.0"
resolved "https://registry.npmmirror.com/leaflet-control-geocoder/-/leaflet-control-geocoder-2.4.0.tgz#f6c00ae00b53d2ac5908e874a9aefd414f615f22"
integrity sha512-b2QlxuFd40uIDbnoUI3U9fzfnB4yKUYlmsXjquJ2d2YjoJqnyVYcIJeErAVv3kPvX3nI0gzvBq1XHMgSVFrGkQ==
optionalDependencies:
open-location-code "^1.0.0"
leaflet-draw@^1.0.4:
version "1.0.4"
resolved "https://registry.npmjs.org/leaflet-draw/-/leaflet-draw-1.0.4.tgz"
@ -2812,6 +2819,11 @@ once@^1.3.0:
dependencies:
wrappy "1"
open-location-code@^1.0.0:
version "1.0.3"
resolved "https://registry.npmmirror.com/open-location-code/-/open-location-code-1.0.3.tgz#5ea1a34ee5221c6cafa04392e1bd906fd7488f7e"
integrity sha512-DBm14BSn40Ee241n80zIFXIT6+y8Tb0I+jTdosLJ8Sidvr2qONvymwqymVbHV2nS+1gkDZ5eTNpnOIVV0Kn2fw==
optimist@0.3:
version "0.3.7"
resolved "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz"