Merge branch 'main' of http://47.92.168.204:3000/VoRDM/vordm-admin into zqq
This commit is contained in:
commit
61f7bc62b4
|
@ -41,7 +41,7 @@ export const approval = (data) => {
|
||||||
export const importTemplate = (data) => {
|
export const importTemplate = (data) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/' + moduleName + '/ui/remoteSensing/importTemplate',
|
url: '/api/' + moduleName + '/ui/remoteSensing/importTemplate',
|
||||||
headers:{'Content-Type': 'multipart/form-data'},
|
headers: { 'Content-Type': 'multipart/form-data' },
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
|
@ -49,15 +49,17 @@ export const importTemplate = (data) => {
|
||||||
export const removeList = (ids) => {
|
export const removeList = (ids) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/' + moduleName + '/ui/remoteSensing/remove',
|
url: '/api/' + moduleName + '/ui/remoteSensing/remove',
|
||||||
method: 'delte',
|
method: 'get',
|
||||||
data: ids,
|
params:{
|
||||||
|
ids
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export const importTemplateImgList = (data) => {
|
export const importTemplateImgList = (data) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/' + moduleName + '/ui/remoteSensing/importTemplateImgList',
|
url: '/api/' + moduleName + '/ui/remoteSensing/importTemplateImgList',
|
||||||
headers:{'Content-Type': 'multipart/form-data'},
|
headers: { 'Content-Type': 'multipart/form-data' },
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
|
|
|
@ -57,16 +57,15 @@ export const Session = {
|
||||||
window.sessionStorage.setItem(Local.setKey(key), JSON.stringify({data:val,time:curTime}));
|
window.sessionStorage.setItem(Local.setKey(key), JSON.stringify({data:val,time:curTime}));
|
||||||
},
|
},
|
||||||
//如果缓存过期则返回null
|
//如果缓存过期则返回null
|
||||||
getEx(key,time = 6*60*1000) {
|
getEx(key,time = false) {
|
||||||
let data = window.sessionStorage.getItem(Local.setKey(key));
|
let data = window.sessionStorage.getItem(Local.setKey(key));
|
||||||
let dataObj = JSON.parse(data);
|
let dataObj = JSON.parse(data);
|
||||||
//如果dataObj为null,表示该数据从未设置过期时间
|
//如果dataObj为null,表示该数据从未设置过期时间
|
||||||
if (dataObj == null) {
|
if (dataObj == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (new Date().getTime() - dataObj.time > time) {
|
if (time) {
|
||||||
window.sessionStorage.removeItem(Local.setKey(key));
|
return dataObj;
|
||||||
return null;
|
|
||||||
} else {
|
} else {
|
||||||
return dataObj.data;
|
return dataObj.data;
|
||||||
}
|
}
|
||||||
|
|
|
@ -151,7 +151,7 @@ const removeThis = ()=>{
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
//删除数据
|
//删除数据
|
||||||
removeList(ids,(state.searchName=='1'?"News":null)).then((res) => {
|
removeList(ids.join(','),(state.searchName=='1'?"News":null)).then((res) => {
|
||||||
ElMessage.success("Delete successfully");
|
ElMessage.success("Delete successfully");
|
||||||
getTableData();
|
getTableData();
|
||||||
});
|
});
|
||||||
|
@ -397,6 +397,7 @@ const searchRemoteSensingSourceData = () => {
|
||||||
|
|
||||||
// 根据检索条件检索遥感元数据
|
// 根据检索条件检索遥感元数据
|
||||||
const getDataByCondition = (current, size, dataNew) => {
|
const getDataByCondition = (current, size, dataNew) => {
|
||||||
|
dataNew.beforeOrAfter = 3;
|
||||||
getRemoteSensingSourceDataByCondition(current, size, JSON.stringify(dataNew)).then(
|
getRemoteSensingSourceDataByCondition(current, size, JSON.stringify(dataNew)).then(
|
||||||
(res) => {
|
(res) => {
|
||||||
state.requestData = res.records;
|
state.requestData = res.records;
|
||||||
|
@ -496,8 +497,8 @@ const onHandleDisasterCurrentChange = (val) => {
|
||||||
|
|
||||||
// 遥感元数据表size改变
|
// 遥感元数据表size改变
|
||||||
const onHandleSizeChange = (val) => {
|
const onHandleSizeChange = (val) => {
|
||||||
state.tableData.param.pageSize = val;
|
state.tableData.param.pageNum = val;
|
||||||
state.tableData.param.pageNum = state.tableData.param.pageNum;
|
state.tableData.param.pageSize = state.tableData.param.pageSize;
|
||||||
let dataNew = {};
|
let dataNew = {};
|
||||||
if (state.satelliteCodeList.length != 0) {
|
if (state.satelliteCodeList.length != 0) {
|
||||||
dataNew = {
|
dataNew = {
|
||||||
|
@ -527,7 +528,6 @@ const onHandleSizeChange = (val) => {
|
||||||
|
|
||||||
// 遥感元数据表current改变
|
// 遥感元数据表current改变
|
||||||
const onHandleCurrentChange = (val) => {
|
const onHandleCurrentChange = (val) => {
|
||||||
state.tableData.param.pageSize = state.tableData.param.pageSize;
|
|
||||||
state.tableData.param.pageNum = val;
|
state.tableData.param.pageNum = val;
|
||||||
let dataNew = {};
|
let dataNew = {};
|
||||||
if (state.satelliteCodeList.length != 0) {
|
if (state.satelliteCodeList.length != 0) {
|
||||||
|
|
|
@ -201,7 +201,9 @@ const state = reactive({
|
||||||
lon: '',
|
lon: '',
|
||||||
disLat: '',
|
disLat: '',
|
||||||
disLon: '',
|
disLon: '',
|
||||||
data: {}
|
data: {},
|
||||||
|
data2:[],
|
||||||
|
geometry: null,
|
||||||
})
|
})
|
||||||
//获取所有卫星类型
|
//获取所有卫星类型
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
@ -209,7 +211,17 @@ onMounted(() => {
|
||||||
let data = res.map(item=>{
|
let data = res.map(item=>{
|
||||||
return {value:item.dictValue,label:item.dictValue}
|
return {value:item.dictValue,label:item.dictValue}
|
||||||
})
|
})
|
||||||
state.sensor = data;
|
state.data2=data;
|
||||||
|
//初始化加载根据state.switch判断,当时true的时候加载 landsat、Sentinel。否者加载出这两个以外所有内容
|
||||||
|
if(state.switch){
|
||||||
|
state.sensor=state.data2.filter(item=>{
|
||||||
|
return item.value=='landsat'||item.value=='sentinel'
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
state.sensor=state.data2.filter(item=>{
|
||||||
|
return item.value!='landsat'&&item.value!='sentinel'
|
||||||
|
})
|
||||||
|
}
|
||||||
state.dictData = res;
|
state.dictData = res;
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -282,9 +294,12 @@ const addCoordinate = () => {
|
||||||
document.getElementsByClassName('coordinateBtn')[0].innerText = 'Add coordinates';
|
document.getElementsByClassName('coordinateBtn')[0].innerText = 'Add coordinates';
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
map.value.mapOperations.drawCreated()
|
||||||
|
|
||||||
map.value.mapOperations.off("click", onMapClick)
|
map.value.mapOperations.off("click", onMapClick)
|
||||||
map.value.mapOperations.drawPolygon()
|
map.value.mapOperations.drawPolygon()
|
||||||
map.value.mapOperations.drawCreated()
|
map.value.mapOperations.wktParseToMap(state.geometry)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -298,8 +313,8 @@ const clearCoordinate = () => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
state.coordinateList = [];
|
state.coordinateList = [];
|
||||||
state.startTime = '';
|
// state.startTime = '';
|
||||||
state.endTime = '';
|
// state.endTime = '';
|
||||||
state.addCoord = false
|
state.addCoord = false
|
||||||
map.value.mapOperations.deleteRectangle()
|
map.value.mapOperations.deleteRectangle()
|
||||||
map.value.mapOperations.off("click", onMapClick)
|
map.value.mapOperations.off("click", onMapClick)
|
||||||
|
@ -308,7 +323,6 @@ const clearCoordinate = () => {
|
||||||
// 编辑坐标点
|
// 编辑坐标点
|
||||||
const editCoordinate = () => {
|
const editCoordinate = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 开始爬虫
|
// 开始爬虫
|
||||||
const startCrawl = () => {
|
const startCrawl = () => {
|
||||||
if (!state.startTime) {
|
if (!state.startTime) {
|
||||||
|
@ -371,10 +385,16 @@ const startCrawl = () => {
|
||||||
var typeStr=typeArr.join('、')
|
var typeStr=typeArr.join('、')
|
||||||
|
|
||||||
// getData();
|
// getData();
|
||||||
ElMessage({
|
//使用英语询问是否停留在当前页,还是返回到列表页
|
||||||
message: 'Successfully launched '+typeStr+' crawler',
|
ElMessageBox.confirm('The '+typeStr+' data has been crawled, do you want to stay on this page?', 'Prompt', {
|
||||||
type: 'success',
|
confirmButtonText: 'Stay',
|
||||||
})
|
cancelButtonText: 'Return to the list',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
}).catch(() => {
|
||||||
|
emit('response')
|
||||||
|
});
|
||||||
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -400,10 +420,27 @@ watch(
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
)
|
)
|
||||||
|
//监听state.switch
|
||||||
|
watch(
|
||||||
|
() => state.switch,
|
||||||
|
(newValue, oldValue) => {
|
||||||
|
if(newValue){
|
||||||
|
state.sensor=state.data2.filter(item=>{
|
||||||
|
return item.value=='landsat'||item.value=='sentinel'
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
state.sensor=state.data2.filter(item=>{
|
||||||
|
return item.value!='landsat'&&item.value!='sentinel'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ immediate: true }
|
||||||
|
)
|
||||||
const setData = (row) => {
|
const setData = (row) => {
|
||||||
state.data = row;
|
state.data = row;
|
||||||
state.selectID = row.disasterId
|
state.selectID = row.disasterId
|
||||||
map.value.mapOperations.wktParseToMap(row.geometry)
|
map.value.mapOperations.wktParseToMap(row.geometry)
|
||||||
|
state.geometry = row.geometry;
|
||||||
}
|
}
|
||||||
defineExpose({
|
defineExpose({
|
||||||
setData
|
setData
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="system-role-container layout-padding">
|
<div class="system-role-container layout-padding">
|
||||||
<el-config-provider :locale="en">
|
|
||||||
<el-row :gutter="22">
|
<el-row :gutter="22">
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 85vh;">
|
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 85vh;">
|
||||||
|
@ -81,7 +80,6 @@
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-config-provider>
|
|
||||||
<RoleDialog ref="roleDialogRef" @refresh="getTableData()" />
|
<RoleDialog ref="roleDialogRef" @refresh="getTableData()" />
|
||||||
<HotspotForm ref="hotspotRef" @callback="getTableData" />
|
<HotspotForm ref="hotspotRef" @callback="getTableData" />
|
||||||
<WordClouds ref="wordCloudsRef" @callback="getTableData" />
|
<WordClouds ref="wordCloudsRef" @callback="getTableData" />
|
||||||
|
@ -91,13 +89,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="systemRole">
|
<script lang="ts" setup name="systemRole">
|
||||||
import type { TabsPaneContext } from 'element-plus';
|
|
||||||
import HotspotForm from './component/hotspotForm.vue';
|
import HotspotForm from './component/hotspotForm.vue';
|
||||||
import WordClouds from './component/wordCloudForm.vue';
|
import WordClouds from './component/wordCloudForm.vue';
|
||||||
import EditHotspotForm from './component/editHotspotForm.vue';
|
import EditHotspotForm from './component/editHotspotForm.vue';
|
||||||
import EditWordCloudsForm from './component/editWordCloudForm.vue';
|
import EditWordCloudsForm from './component/editWordCloudForm.vue';
|
||||||
import { getWordClouds, getHotspot, getDisasterPage, delData } from '/@/api/data/visualData.js';
|
import { getWordClouds, getHotspot, getDisasterPage, delData } from '/@/api/data/visualData.js';
|
||||||
import en from 'element-plus/dist/locale/en.mjs'
|
|
||||||
const activeName = ref('first');
|
const activeName = ref('first');
|
||||||
const hotspotRef = ref();
|
const hotspotRef = ref();
|
||||||
const wordCloudsRef = ref();
|
const wordCloudsRef = ref();
|
||||||
|
@ -108,7 +104,6 @@ const editWordCloudsRef = ref();
|
||||||
import { defineAsyncComponent, reactive, onMounted, ref } from 'vue';
|
import { defineAsyncComponent, reactive, onMounted, ref } from 'vue';
|
||||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||||
import disasterTable from "/@/components/table/DisasterTable.vue";
|
import disasterTable from "/@/components/table/DisasterTable.vue";
|
||||||
import { ta } from 'element-plus/es/locale';
|
|
||||||
import { landsat, submit } from '/@/api/crawl/index.js'
|
import { landsat, submit } from '/@/api/crawl/index.js'
|
||||||
import { useUserInfo } from '/@/stores/userInfo';
|
import { useUserInfo } from '/@/stores/userInfo';
|
||||||
|
|
||||||
|
|
12
yarn.lock
12
yarn.lock
|
@ -2629,6 +2629,18 @@ leaflet-imageoverlay-rotated@^0.2.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
leaflet "^1.0.0"
|
leaflet "^1.0.0"
|
||||||
|
|
||||||
|
leaflet-search@^2.9.6:
|
||||||
|
version "2.9.11"
|
||||||
|
resolved "https://registry.npmmirror.com/leaflet-search/-/leaflet-search-2.9.11.tgz#9ceff372efdabbdfb71f1f3ac7c1f8e7d2fdc267"
|
||||||
|
integrity sha512-Tsp2rbd4SyBTaSJ2hGk/hdSzTLWlaehVDx0nQta4Ih9MjajxAWoizGB9RTMSFNnXYvqSRwWL8udLZXc83j5ivA==
|
||||||
|
dependencies:
|
||||||
|
leaflet "*"
|
||||||
|
|
||||||
|
leaflet@*:
|
||||||
|
version "1.9.4"
|
||||||
|
resolved "https://registry.npmmirror.com/leaflet/-/leaflet-1.9.4.tgz#23fae724e282fa25745aff82ca4d394748db7d8d"
|
||||||
|
integrity sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==
|
||||||
|
|
||||||
leaflet@^1.0.0, leaflet@^1.9.3:
|
leaflet@^1.0.0, leaflet@^1.9.3:
|
||||||
version "1.9.3"
|
version "1.9.3"
|
||||||
resolved "https://registry.npmmirror.com/leaflet/-/leaflet-1.9.3.tgz"
|
resolved "https://registry.npmmirror.com/leaflet/-/leaflet-1.9.3.tgz"
|
||||||
|
|
Loading…
Reference in New Issue