Merge branch 'main' of http://47.92.168.204:3000/VoRDM/vordm-admin
This commit is contained in:
commit
f6e4452c80
File diff suppressed because it is too large
Load Diff
|
@ -24,7 +24,7 @@ export const news = (disaster_id, keywords, page, isBaidu, id) => {
|
|||
},
|
||||
});
|
||||
};
|
||||
export const rs = (stime, etime, disaster_id, ranges, type = 1) => {
|
||||
export const rs = (stime, etime, disaster_id, ranges, type = 1,id) => {
|
||||
let method = 'sentinel';
|
||||
if (type == 1) {
|
||||
method = 'sentinel';
|
||||
|
@ -33,16 +33,21 @@ export const rs = (stime, etime, disaster_id, ranges, type = 1) => {
|
|||
} else {
|
||||
method = 'searchone';
|
||||
}
|
||||
|
||||
return request({
|
||||
url: '/api/' + crawlModule + '/rs/' + method,
|
||||
method: 'post',
|
||||
data: {
|
||||
let data = {
|
||||
stime,
|
||||
etime,
|
||||
disaster_id,
|
||||
ranges,
|
||||
},
|
||||
id,
|
||||
}
|
||||
if(type != 1 && type != 2){
|
||||
data['geo'] = ranges
|
||||
}else{
|
||||
data['ranges']=ranges
|
||||
}
|
||||
return request({
|
||||
url: '/api/' + crawlModule + '/rs/' + method,
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
};
|
||||
export const submit = (row) => {
|
||||
|
|
|
@ -82,3 +82,16 @@ export const deleteData = (id) => {
|
|||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改实体数据
|
||||
* @param data
|
||||
* @returns {Promise<AxiosResponse<any>>}
|
||||
*/
|
||||
export const updateEntityData = (data) => {
|
||||
return request({
|
||||
url: '/api/' + moduleName + '/ui/EntityData/updateEntityData',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
|
|
@ -21,6 +21,8 @@ const map = ref()
|
|||
let homeMap = null
|
||||
let featureLayerG_area = null
|
||||
let featureLayerG_point = null
|
||||
let layerRectangle = null
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
homeMap = L.map(map.value, {
|
||||
|
@ -57,6 +59,10 @@ onMounted(() => {
|
|||
const mapOperations = {
|
||||
wktParseToMap: (res) => {
|
||||
let layer = omnivore.wkt.parse(res)
|
||||
if(featureLayerG_area.getLayers().length != 0||featureLayerG_point.getLayers().length != 0){
|
||||
|
||||
return;
|
||||
}
|
||||
layer.addTo(featureLayerG_point)
|
||||
|
||||
let attr = Object.values(layer._layers)
|
||||
|
@ -64,9 +70,12 @@ const mapOperations = {
|
|||
// 判断审核的数据类型,如果是点则直接flyTo
|
||||
if (attr[0].feature.geometry.type.indexOf('Polygon') == -1) {
|
||||
homeMap.flyTo([attr[0].feature.geometry.coordinates[1], attr[0].feature.geometry.coordinates[0]], 3)
|
||||
variableStore.layerGroupPoint=res;
|
||||
return {'layer':layer,'location':[attr[0].feature.geometry.coordinates[1],attr[0].feature.geometry.coordinates[0]]}
|
||||
}
|
||||
// 判断审核的数据类型,如果是面则计算中心点 然后再fly
|
||||
else {
|
||||
variableStore.layerGroupPoly=res;
|
||||
let polygons = [];
|
||||
for (let i = 0; i < attr[0].feature.geometry.coordinates.length; i++) {
|
||||
console.log(attr[0].feature.geometry.coordinates[i])
|
||||
|
@ -81,8 +90,9 @@ const mapOperations = {
|
|||
let final_center = turf.center(turf.featureCollection(features))
|
||||
// console.log(final_center)
|
||||
homeMap.flyTo([final_center.geometry.coordinates[1], final_center.geometry.coordinates[0]], 3)
|
||||
return {'layer':layer,'location':null}
|
||||
}
|
||||
return layer
|
||||
// return layer
|
||||
|
||||
},
|
||||
/** 添加点标注
|
||||
|
@ -311,6 +321,11 @@ const mapOperations = {
|
|||
})
|
||||
e.layer.addTo(featureLayerG_area)
|
||||
polygon = e.layer
|
||||
let features = featureLayerG_area.toGeoJSON().features
|
||||
variableStore.layerGroupPoly = features.map(function (feature) {
|
||||
return WKT.convert(feature.geometry)
|
||||
})
|
||||
variableStore.layerGroupPoly = variableStore.layerGroupPoly.join('\n')
|
||||
})
|
||||
// featureLayerG_area.clearLayers()
|
||||
// variableStore.layerGroupPoly=null;
|
||||
|
@ -374,9 +389,24 @@ const mapOperations = {
|
|||
else {
|
||||
console.log('error')
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
drawRectangle: () => {
|
||||
if (layerRectangle != null) {
|
||||
homeMap.removeLayer(layerRectangle)
|
||||
layerRectangle = null
|
||||
}
|
||||
homeMap.pm.enableDraw('Rectangle', {
|
||||
snappable: true,
|
||||
snapDistance: 20,
|
||||
});
|
||||
homeMap.on('pm:create', (e) => {
|
||||
L.PM.reInitLayer(e.layer);
|
||||
layerRectangle = e.layer
|
||||
});
|
||||
},
|
||||
deleteRectangle: () => {
|
||||
homeMap.removeLayer(layerRectangle)
|
||||
}
|
||||
}
|
||||
//omnivore.wkt.parse('POINT(-80 0)').addTo(homeMap);
|
||||
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "index"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,120 @@
|
|||
<!--灾害列表table组件-->
|
||||
<template>
|
||||
<div class="search">
|
||||
<el-select class="form-select" size="default" clearable
|
||||
placeholder="Disaster Type" v-model="state.search.disasterType">
|
||||
<el-option v-for="(item,index) in state.dictList" :value="item.dictKey" :key="index" :label="item.dictValue"/>
|
||||
</el-select>
|
||||
<el-input type="text"
|
||||
class="form-control" size="default" clearable
|
||||
placeholder="Disaster Country" v-model="state.search.disasterCountry"/>
|
||||
<el-button size="default" type="primary" class="ml10" @click="getDisasterTable">
|
||||
<el-icon>
|
||||
<ele-Search />
|
||||
</el-icon>
|
||||
Search
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
||||
highlight-current-row @row-click="tableClick">
|
||||
<el-table-column type="index" label="ID" width="50" />
|
||||
<el-table-column prop="dictValue" label="Disaster type" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="disasterCountry" label="Disaster country" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip sortable></el-table-column>
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
|
||||
class="mt15" :pager-count="3" :page-sizes="[10, 20, 30]"
|
||||
v-model:current-page="state.disasterData.param.pageNum" background
|
||||
v-model:page-size="state.disasterData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||
:total="state.disasterData.total">
|
||||
</el-pagination>
|
||||
</template>
|
||||
|
||||
<script setup name="disasterTable">
|
||||
|
||||
import {onMounted, reactive, computed, defineProps, defineEmits} from "vue";
|
||||
import {getList} from "/@/api/system/dictbiz.js";
|
||||
import {getPage} from "/@/api/disasterInfo/index.js";
|
||||
//定义表格点击后的回调
|
||||
const emit = defineEmits(["click"]);
|
||||
//定义组件接收的参数
|
||||
const props = defineProps({
|
||||
//响应状态
|
||||
status: {
|
||||
type: Number
|
||||
},
|
||||
})
|
||||
const state = reactive({
|
||||
//查询参数
|
||||
search:{
|
||||
respondStatus:props.status
|
||||
},
|
||||
//灾害类型字典项
|
||||
dictList:[],
|
||||
//表格数据
|
||||
disasterData: {
|
||||
data: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
param: {
|
||||
search: '',
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
},
|
||||
})
|
||||
//灾害表格点击事件
|
||||
const tableClick = (row, column, event) => {
|
||||
emit("click", row.disasterId);
|
||||
}
|
||||
//获取字典数据
|
||||
const getDictBizData = () => {
|
||||
getList({code:'disaster'}).then(res =>{
|
||||
state.dictList = res[0].children
|
||||
})
|
||||
}
|
||||
//获取灾害列表
|
||||
const getDisasterTable = () => {
|
||||
getPage(state.disasterData.param.pageNum, state.disasterData.param.pageSize, state.search).then(res => {
|
||||
state.disasterData.data = res.records;
|
||||
state.disasterData.total = res.total;
|
||||
})
|
||||
}
|
||||
// 分页改变
|
||||
const onHandleDisasterSizeChange = (val) => {
|
||||
state.disasterData.param.pageSize = val;
|
||||
getDisasterTable();
|
||||
};
|
||||
// 分页改变
|
||||
const onHandleDisasterCurrentChange = (val) => {
|
||||
state.disasterData.param.pageNum = val;
|
||||
getDisasterTable();
|
||||
};
|
||||
//页面加载
|
||||
onMounted(()=>{
|
||||
//获取灾害类型
|
||||
getDictBizData();
|
||||
//获取灾害列表
|
||||
getDisasterTable();
|
||||
})
|
||||
//组件对外暴露方法
|
||||
defineExpose({
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.mt15 {
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
}
|
||||
.search{
|
||||
display: flex;
|
||||
margin-left: 10px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.form-control{
|
||||
margin-left: 10px;
|
||||
width: 200px;
|
||||
}
|
||||
</style>
|
|
@ -5,7 +5,7 @@ import { Session } from '/@/utils/storage';
|
|||
|
||||
// export const moduleName = 'zqq-biz-vordm';
|
||||
export const moduleName = 'biz-vordm';
|
||||
export const crawlModule = 'vordm-crawl';
|
||||
export const crawlModule = "vordm-crawl";
|
||||
// 配置新建一个 axios 实例
|
||||
const service = axios.create({
|
||||
//baseURL: import.meta.env.VITE_API_URL,
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
||||
highlight-current-row @row-click="tableClick">
|
||||
<el-table-column type="index" label="ID" width="50" />
|
||||
<el-table-column prop="vordmId" label="ID" width="118" />
|
||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip>
|
||||
<!-- 在disasterType中获取dictKey 对应的dictValue -->
|
||||
<template #default="scope">
|
||||
|
@ -15,7 +15,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column prop="disasterKeyword" label="Disaster keywords" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="Operate" label="Operate" show-overflow-tooltip>
|
||||
<el-table-column prop="Operate" label="Operate" width="85" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-button size="small" text type="primary" @click="startBot(scope.row)">start</el-button>
|
||||
<!-- <el-tag type="info" v-if="scope.row.respondStatus == 3">complete</el-tag> -->
|
||||
|
@ -272,6 +272,10 @@ const getDisasterData = () => {
|
|||
}
|
||||
getList(param).then(res => {
|
||||
state.disasterData.data = res.records;
|
||||
state.disasterData.data.forEach(item=>{
|
||||
let date = item.disasterTime.slice(0,10);
|
||||
item.disasterTime = date;
|
||||
})
|
||||
state.disasterData.total = res.total;
|
||||
state.disasterData.loading = false;
|
||||
})
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<el-dialog title="upload" v-model="state.isShowDialog" width="700px">
|
||||
<el-form :model="state.ruleForm" size="default" label-width="120px" :rules="rules" ref="adminAddFormRef">
|
||||
<el-dialog title="upload" v-model="state.isShowDialog" width="500px">
|
||||
<el-form :model="state.ruleForm" size="default" label-width="120px" :rules="rules" ref="adminAddFormRef" style="margin-left: 6%;">
|
||||
<el-form-item label="upload picture" prop="img">
|
||||
<el-upload ref="upFileRef" class="upload-demo" drag accept="image/*" action="#" multiple :http-request="uploadPic"
|
||||
:on-remove="removePic" :before-upload="beforeUpload">
|
||||
|
@ -15,6 +15,10 @@
|
|||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item prop="title" label="data title">
|
||||
<el-input v-model="state.ruleForm.title" class="m-2" placeholder="please enter data title" :rows="3"
|
||||
type="text" style="width:220px;" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="type" label="data type">
|
||||
<el-select v-model="state.ruleForm.type" class="m-2" placeholder="please select data type">
|
||||
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
|
||||
|
@ -149,6 +153,7 @@ const onSubmit = () => {
|
|||
state.dataForm.append('remark', state.ruleForm.remark);
|
||||
state.dataForm.append('disasterId', state.disasterId);
|
||||
state.dataForm.append('visualFlag', state.ruleForm.visualFlag);
|
||||
state.dataForm.append('title', state.ruleForm.title);
|
||||
for (let [a, b] of state.dataForm.entries()) {
|
||||
console.log(a, b, '--------------');
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
||||
highlight-current-row @row-click="tableClick">
|
||||
<el-table-column type="index" label="ID" width="50" />
|
||||
<el-table-column prop="vordmId" label="VoRDM ID" width="118" />
|
||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterCountry" label="Disaster country" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip></el-table-column>
|
||||
|
@ -50,8 +50,14 @@
|
|||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading"
|
||||
@selection-change="handleSelectionChange" style="width: 100%">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="uploaderName" label="Uploader name" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="uploaderName" label="Uploader name" width="100" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="sourceOrganization" label="Organization" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="isPublish" label="isPublish" width="100" show-overflow-tooltip>
|
||||
<template #default=" scope ">
|
||||
<el-tag type="warning" v-if=" scope.row.isPublish == 0 ">NO</el-tag>
|
||||
<el-tag type="success" v-if=" scope.row.isPublish == 1 ">YES</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="title" label="Professional title" show-overflow-tooltip
|
||||
width="150"></el-table-column>
|
||||
<el-table-column prop="size" label="Data size" show-overflow-tooltip>
|
||||
|
@ -63,6 +69,7 @@
|
|||
<el-table-column prop="Operate" label="Operate" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-button size="small" text type="primary" @click="del(scope.row)">Delete</el-button>
|
||||
<el-button v-if="scope.row.visualFlag == 1" size="small" text type="primary" @click="pub(scope.row)">Publish</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -84,7 +91,7 @@
|
|||
import en from 'element-plus/dist/locale/en.mjs'
|
||||
import type { TabsPaneContext } from 'element-plus';
|
||||
import Upload from './component/upload.vue';
|
||||
import { getOtherDataPage, getDisasterPage, deleteData } from '/@/api/data/otherData.js'
|
||||
import { getOtherDataPage, getDisasterPage, deleteData, updateEntityData } from '/@/api/data/otherData.js'
|
||||
const activeName = ref('first');
|
||||
|
||||
//复制内容
|
||||
|
@ -166,6 +173,10 @@ const getDisasterData = () => {
|
|||
state.disasterData.loading = true;
|
||||
getDisasterPage(state.disasterData.param.pageNum, state.disasterData.param.pageSize, {}).then(res => {
|
||||
state.disasterData.data = res.records;
|
||||
state.disasterData.data.forEach(item => {
|
||||
let date = item.disasterTime.slice(0, 10);
|
||||
item.disasterTime = date;
|
||||
})
|
||||
state.disasterData.total = res.total;
|
||||
state.disasterData.loading = false;
|
||||
})
|
||||
|
@ -233,6 +244,17 @@ const del = (row) => {
|
|||
})
|
||||
.catch(() => { });
|
||||
};
|
||||
|
||||
|
||||
|
||||
// 删除其他数据
|
||||
const pub = (row) => {
|
||||
console.log(row, "发布信息");
|
||||
updateEntityData().then(da => {
|
||||
|
||||
})
|
||||
};
|
||||
|
||||
// 分页改变
|
||||
const onHandleDisasterSizeChange = (val) => {
|
||||
state.disasterData.param.pageSize = val;
|
||||
|
@ -276,6 +298,7 @@ onMounted(() => {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mt15 {
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
|
|
|
@ -2,17 +2,8 @@
|
|||
<el-dialog title="upload" v-model="state.isShowDialog" width="700px">
|
||||
<el-form :model="state.ruleForm" size="default" label-width="150px" :rules="rules" ref="adminAddFormRef">
|
||||
<el-form-item label="upload picture" prop="img">
|
||||
<el-upload
|
||||
ref="upFileRef"
|
||||
class="upload-demo"
|
||||
drag
|
||||
accept="image/*"
|
||||
action="#"
|
||||
multiple
|
||||
:http-request="uploadPic"
|
||||
:on-remove="removePic"
|
||||
:before-upload="beforeUpload"
|
||||
>
|
||||
<el-upload ref="upFileRef" class="upload-demo" drag accept="image/*" action="#" multiple :http-request="uploadPic"
|
||||
:on-remove="removePic" :before-upload="beforeUpload">
|
||||
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
||||
<div class="el-upload__text">
|
||||
Drop file here or <em>click to upload</em>
|
||||
|
@ -24,16 +15,14 @@
|
|||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item prop="title" label="data title">
|
||||
<el-input v-model="state.ruleForm.title" class="m-2" placeholder="please enter data title" :rows="3" type="text"
|
||||
style="width:220px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Home page show" prop="isMain">
|
||||
<el-select v-model="state.ruleForm.isMain" class="m-2" placeholder="please select home show">
|
||||
<el-option
|
||||
label="show"
|
||||
value="1"
|
||||
></el-option>
|
||||
<el-option
|
||||
label="not show"
|
||||
value="0"
|
||||
></el-option>
|
||||
<el-option label="show" value="1"></el-option>
|
||||
<el-option label="not show" value="0"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
@ -139,6 +128,7 @@ const onSubmit = () => {
|
|||
})
|
||||
state.dataForm.append('disasterId', state.disasterId);
|
||||
state.dataForm.append('isMain', state.ruleForm.isMain);
|
||||
state.dataForm.append('title', state.ruleForm.title);
|
||||
for (let [a, b] of state.dataForm.entries()) {
|
||||
console.log(a, b, '--------------');
|
||||
}
|
||||
|
@ -160,6 +150,4 @@ defineExpose({
|
|||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
<style scoped></style>
|
|
@ -6,7 +6,7 @@
|
|||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
||||
highlight-current-row @row-click="tableClick">
|
||||
<el-table-column type="index" label="ID" width="50" />
|
||||
<el-table-column prop="vordmId" label="ID" width="118" />
|
||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterCountry" label="Disaster country" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip></el-table-column>
|
||||
|
@ -65,16 +65,6 @@
|
|||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="size"
|
||||
label="size"
|
||||
show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{formatSizeUnits(scope.row.size)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="type"
|
||||
label="type"
|
||||
show-overflow-tooltip></el-table-column>-->
|
||||
<el-table-column prop="Operate" label="Operate" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-button size="small" text type="primary" @click="editData(scope.row)">Edit</el-button>
|
||||
|
@ -146,9 +136,7 @@ const handleSelectionChange = (val) => {
|
|||
};
|
||||
//格式化图片名称
|
||||
const formatName = (name) => {
|
||||
if (name) {
|
||||
return name.substr(0, name.indexOf('.'));
|
||||
}
|
||||
|
||||
return name;
|
||||
};
|
||||
const auditData = (row) => {
|
||||
|
@ -198,6 +186,10 @@ const getDisasterData = () => {
|
|||
state.disasterData.loading = true;
|
||||
getDisasterPage(state.disasterData.param.pageNum, state.disasterData.param.pageSize, {}).then((res) => {
|
||||
state.disasterData.data = res.records;
|
||||
state.disasterData.data.forEach(item=>{
|
||||
let date = item.disasterTime.slice(0,10);
|
||||
item.disasterTime = date;
|
||||
})
|
||||
state.disasterData.total = res.total;
|
||||
state.disasterData.loading = false;
|
||||
});
|
||||
|
|
|
@ -4,41 +4,29 @@
|
|||
<el-col :span="10">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<span style="margin:2%;font-weight: 600;font-size: 18px;">Disaster Info</span>
|
||||
<el-table :data="state.disasterData.data"
|
||||
v-loading="state.disasterData.loading"
|
||||
style="width: 100%"
|
||||
highlight-current-row
|
||||
@row-click="tableClick">
|
||||
<el-table-column type="index"
|
||||
label="ID"
|
||||
width="50" />
|
||||
<el-table-column prop="disasterType"
|
||||
label="Disaster type"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterCountry"
|
||||
label="Disaster country"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterTime"
|
||||
label="Disaster time"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
||||
highlight-current-row @row-click="tableClick">
|
||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterCountry" label="Disaster country" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="Operate" label="Operate" width="85" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-button size="small" text type="primary" @click="startBot(scope.row)">start</el-button>
|
||||
<!-- <el-tag type="info" v-if="scope.row.respondStatus == 3">complete</el-tag> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleDisasterSizeChange"
|
||||
@current-change="onHandleDisasterCurrentChange"
|
||||
class="mt15"
|
||||
:pager-count="3"
|
||||
:page-sizes="[10, 20, 30]"
|
||||
v-model:current-page="state.disasterData.param.pageNum"
|
||||
background
|
||||
v-model:page-size="state.disasterData.param.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
<el-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
|
||||
class="mt15" :pager-count="3" :page-sizes="[10, 20, 30]"
|
||||
v-model:current-page="state.disasterData.param.pageNum" background
|
||||
v-model:page-size="state.disasterData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||
:total="state.disasterData.total">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<div class="system-user-search mb15"
|
||||
style="display: flex;margin-left: 10px;margin-top: 10px;">
|
||||
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
||||
<!-- 选择灾害类型 -->
|
||||
<!-- <el-select v-model="state.value_disasterType"
|
||||
size="default"
|
||||
|
@ -74,33 +62,17 @@
|
|||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-tree-select v-model="state.value_satelliteType"
|
||||
:data="state.options_satelliteType"
|
||||
multiple
|
||||
collapse-tags
|
||||
collapse-tags-tooltip
|
||||
:render-after-expand="false"
|
||||
show-checkbox
|
||||
clearable
|
||||
<el-tree-select v-model="state.value_satelliteType" :data="state.options_satelliteType" multiple
|
||||
collapse-tags collapse-tags-tooltip :render-after-expand="false" show-checkbox clearable
|
||||
placeholder="Select satellite type" />
|
||||
</el-col>
|
||||
<el-col :span="8"
|
||||
style="padding-left:1%;">
|
||||
<el-tree-select v-model="state.value_resolution"
|
||||
:data="state.options_resolution"
|
||||
multiple
|
||||
collapse-tags
|
||||
collapse-tags-tooltip
|
||||
:render-after-expand="false"
|
||||
show-checkbox
|
||||
clearable
|
||||
<el-col :span="8" style="padding-left:1%;">
|
||||
<el-tree-select v-model="state.value_resolution" :data="state.options_resolution" multiple collapse-tags
|
||||
collapse-tags-tooltip :render-after-expand="false" show-checkbox clearable
|
||||
placeholder="Select resolution" />
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-button size="default"
|
||||
type="primary"
|
||||
class="ml10"
|
||||
@click="searchRemoteSensingSourceData">
|
||||
<el-button size="default" type="primary" class="ml10" @click="searchRemoteSensingSourceData">
|
||||
<el-icon>
|
||||
<ele-Search />
|
||||
</el-icon>
|
||||
|
@ -111,40 +83,22 @@
|
|||
|
||||
</div>
|
||||
<!-- id,卫星类型,生产日期,产品谱段,产品分辨率,云覆盖量,景中心经纬度,元数据下载链接,缩略图 支撑单位 -->
|
||||
<el-table :data="state.requestData"
|
||||
style="width: 100%">
|
||||
<el-table-column type="index"
|
||||
label="Index"
|
||||
align="center"
|
||||
width="80"></el-table-column>
|
||||
<el-table-column prop="satelliteCode"
|
||||
label="Satellite code"
|
||||
align="center"
|
||||
<el-table :data="state.requestData" style="width: 100%">
|
||||
<el-table-column type="index" label="Index" align="center" width="80"></el-table-column>
|
||||
<el-table-column prop="satelliteCode" label="Satellite code" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="productTime"
|
||||
label="Product time"
|
||||
align="center"
|
||||
<el-table-column prop="productTime" label="Product time" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="productBandsNum"
|
||||
label="Product bands num"
|
||||
align="center"
|
||||
<el-table-column prop="productBandsNum" label="Product bands num" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="productResolution"
|
||||
label="Product resolution(m)"
|
||||
align="center"
|
||||
<el-table-column prop="productResolution" label="Product resolution(m)" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="cloudCover"
|
||||
label="Cloud cover(%)"
|
||||
align="center"
|
||||
<el-table-column prop="cloudCover" label="Cloud cover(%)" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="sourceOrganization"
|
||||
label="Source organization"
|
||||
align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="downloadUrl"
|
||||
label="Download url"
|
||||
align="center"
|
||||
<el-table-column prop="sourceOrganization" label="Source organization" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="downloadUrl" label="Download url" align="center" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="Operate"
|
||||
label="Operate"
|
||||
show-overflow-tooltip></el-table-column> -->
|
||||
|
@ -185,15 +139,9 @@
|
|||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleSizeChange"
|
||||
@current-change="onHandleCurrentChange"
|
||||
class="mt15"
|
||||
:pager-count="3"
|
||||
:page-sizes="[10, 20, 30]"
|
||||
background
|
||||
v-model:current-page="state.tableData.param.pageNum"
|
||||
v-model:page-size="state.tableData.param.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
|
||||
:pager-count="3" :page-sizes="[10, 20, 30]" background v-model:current-page="state.tableData.param.pageNum"
|
||||
v-model:page-size="state.tableData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||
:total="state.tableData.total">
|
||||
</el-pagination>
|
||||
</div>
|
||||
|
@ -206,7 +154,7 @@
|
|||
import { ref, reactive, onMounted } from 'vue';
|
||||
import { getRemoteSensingSourceData, getRemoteSensingSourceDataByCondition, getPagesRemoteSensingSourceData } from "/@/api/remoteSensingSourceData/remoteSensingSourceData.js";
|
||||
import { getDisasterPage } from '/@/api/data/otherData.js'
|
||||
|
||||
// import { getList as getDisasterPage } from '/@/api/disasterInfo/index';
|
||||
|
||||
const state = reactive({
|
||||
disasterData: {
|
||||
|
@ -276,7 +224,10 @@ const state = reactive({
|
|||
requestResolution: [],
|
||||
requestSatellite: []
|
||||
})
|
||||
|
||||
const emit = defineEmits(['response']);
|
||||
const startBot=(row)=>{
|
||||
emit('response', row);
|
||||
}
|
||||
// 初始化灾害表格数据
|
||||
const getDisasterData = () => {
|
||||
state.disasterData.loading = true;
|
||||
|
@ -637,9 +588,11 @@ const searchDisasterDate = () => {
|
|||
.system-role-padding {
|
||||
padding-bottom: 2%;
|
||||
}
|
||||
|
||||
.el-pagination {
|
||||
padding-left: 1%;
|
||||
}
|
||||
|
||||
.mt15 {
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
|
|
|
@ -11,12 +11,9 @@
|
|||
<span class="demonstration">Start time</span>
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
<el-date-picker style="width: 90%;"
|
||||
v-model="state.startTime"
|
||||
type="datetime"
|
||||
placeholder="Select start time"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
:shortcuts="state.shortcuts" />
|
||||
<el-date-picker style="width: 90%;" v-model="state.startTime" type="datetime"
|
||||
placeholder="Select start time" value-format="YYYY-MM-DD HH:mm:ss" :shortcuts="state.shortcuts"
|
||||
:disabled-date="disabledDate" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="block">
|
||||
|
@ -24,41 +21,31 @@
|
|||
<span class="demonstration">End time</span>
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
<el-date-picker style="width: 90%;"
|
||||
v-model="state.endTime"
|
||||
type="datetime"
|
||||
placeholder="Select end time"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
:shortcuts="state.shortcuts" />
|
||||
<el-date-picker style="width: 90%;" v-model="state.endTime" type="datetime" placeholder="Select end time"
|
||||
value-format="YYYY-MM-DD HH:mm:ss" :shortcuts="state.shortcuts" :disabled-date="disabledDate" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<el-card class="box-card"
|
||||
style="margin-top: 3%;">
|
||||
<el-card class="box-card" style="margin-top: 3%;">
|
||||
<span>Select a region</span>
|
||||
<el-scrollbar wrap-class="list"
|
||||
view-class="view-box"
|
||||
:native="false">
|
||||
<el-scrollbar wrap-class="list" view-class="view-box" :native="false">
|
||||
<div v-for="(coordinate, i) in state.coordinateList ">
|
||||
<el-row class="coordinateContainer">
|
||||
<el-col :span="1"></el-col>
|
||||
<el-col :span="19">
|
||||
<span style="font-size:14px;width: 100%;">{{
|
||||
'Lat: ' + parseFloat(coordinate.Lat).toFixed(4) + ',  Lng: ' + parseFloat(coordinate.Lng).toFixed(4)
|
||||
'Lat: ' + parseFloat(coordinate.Lat).toFixed(4) + ',  Lng: ' +
|
||||
parseFloat(coordinate.Lng).toFixed(4)
|
||||
}}</span>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-button class="el-icon"
|
||||
@click="editCoordinate"
|
||||
size="small">
|
||||
<el-button class="el-icon" @click="editCoordinate" size="small">
|
||||
<ele-Edit />
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-button class="el-icon"
|
||||
@click="state.coordinateList.splice(i, 1);"
|
||||
size="small">
|
||||
<el-button class="el-icon" @click="state.coordinateList.splice(i, 1);" size="small">
|
||||
<ele-Delete />
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
@ -68,32 +55,23 @@
|
|||
<el-row>
|
||||
<el-col :span=" 1 "></el-col>
|
||||
<el-col :span=" 7 ">
|
||||
<el-button class="coordinateBtn"
|
||||
@click="addCoordinate">Add coordinates</el-button>
|
||||
<el-button class="coordinateBtn" @click=" addCoordinate ">Add coordinates</el-button>
|
||||
</el-col>
|
||||
<el-col :span=" 7 ">
|
||||
<el-button class="coordinateBtn"
|
||||
@click="clearCoordinate">Clear coordinates</el-button>
|
||||
<el-button class="coordinateBtn" @click=" clearCoordinate ">Clear coordinates</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card class="box-card"
|
||||
style="margin-top: 3%;">
|
||||
<el-card class="box-card" style="margin-top: 3%;">
|
||||
<span>Select satellite type</span>
|
||||
<el-tree-select class="satelliteSelect"
|
||||
v-model="state.satelliteSelected"
|
||||
:data="state.sensor"
|
||||
multiple
|
||||
collapse-tags
|
||||
collapse-tags-tooltip
|
||||
:render-after-expand="false"
|
||||
show-checkbox
|
||||
<el-tree-select class="satelliteSelect" v-model=" state.satelliteSelected " :data=" state.sensor " multiple
|
||||
collapse-tags collapse-tags-tooltip :render-after-expand=" false " show-checkbox
|
||||
placeholder="Select satellite type" />
|
||||
</el-card>
|
||||
|
||||
<el-card class="box-card"
|
||||
<!-- <el-card class="box-card"
|
||||
style="margin-top: 3%;">
|
||||
<span>Select VoRDM ID</span>
|
||||
<el-select class="idSelect"
|
||||
|
@ -105,23 +83,20 @@
|
|||
:label="item.label"
|
||||
:value="item.value" />
|
||||
</el-select>
|
||||
</el-card>
|
||||
</el-card> -->
|
||||
<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">Cancel</el-button>
|
||||
<el-button class="lowerBtn" @click=" ClearCondition ">Go Back</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span=" 16 ">
|
||||
<Map id="map"
|
||||
ref="map">
|
||||
<Map id="map" ref="map">
|
||||
</Map>
|
||||
</el-col>
|
||||
|
||||
|
@ -131,11 +106,15 @@
|
|||
|
||||
<script setup>
|
||||
import Map from "/@/components/Map.vue";
|
||||
import { ref, reactive, watch } from 'vue';
|
||||
import { ref, reactive, watch, defineExpose } from 'vue';
|
||||
import { rs, submit } from '/@/api/crawl/index';
|
||||
import { useUserInfo } from '/@/stores/userInfo';
|
||||
import { ElMessage,ElMessageBox} from "element-plus";
|
||||
const userInfo = useUserInfo();
|
||||
|
||||
const emit = defineEmits(['response']);
|
||||
const disabledDate = (time) => {
|
||||
return time.getTime() > Date.now()
|
||||
}
|
||||
// 初始化数据
|
||||
const map = ref()
|
||||
const state = reactive({
|
||||
|
@ -184,82 +163,82 @@ const state = reactive({
|
|||
// }
|
||||
// ]
|
||||
},
|
||||
{
|
||||
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',
|
||||
},
|
||||
],
|
||||
}
|
||||
// {
|
||||
// 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',
|
||||
// },
|
||||
// ],
|
||||
// }
|
||||
],
|
||||
shortcuts: [
|
||||
{
|
||||
|
@ -312,6 +291,7 @@ const state = reactive({
|
|||
lon: '',
|
||||
disLat: '',
|
||||
disLon: '',
|
||||
data: {}
|
||||
})
|
||||
|
||||
const onMapClick = (e) => {
|
||||
|
@ -399,6 +379,20 @@ const editCoordinate = () => {
|
|||
|
||||
// 开始爬虫
|
||||
const startCrawl = () => {
|
||||
if (!state.startTime) {
|
||||
ElMessage.error("Please select the search start time")
|
||||
return;
|
||||
}
|
||||
if (!state.endTime) {
|
||||
ElMessage.error("Please select the search end time")
|
||||
return;
|
||||
}
|
||||
if (state.coordinateList.length == 0 || !state.coordinateList[0].Lat || !state.coordinateList[0].Lng || !state.coordinateList[1].Lat || !state.coordinateList[1].Lng) {
|
||||
ElMessage.error("Please draw the area on the map")
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
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') {
|
||||
|
@ -413,34 +407,58 @@ const startCrawl = () => {
|
|||
var param = {
|
||||
"stime": state.startTime,
|
||||
"etime": state.endTime,
|
||||
"disaster_id": state.selectID * 1,
|
||||
"disaster_id": state.data.disasterId,
|
||||
"ranges": ranges,
|
||||
"id": id
|
||||
}
|
||||
|
||||
console.log(param);
|
||||
submit(
|
||||
{
|
||||
type: type,
|
||||
startDate: state.startTime,
|
||||
endDate: state.endTime,
|
||||
manageId: userInfo.userInfos.id,
|
||||
status: 0,
|
||||
disasterId: state.selectID,
|
||||
disasterId: state.data.disasterId,
|
||||
id: (id ? id : null)
|
||||
}
|
||||
).then(ret => {
|
||||
if (ret == 1042) {
|
||||
ElMessage.error("error")
|
||||
} else {
|
||||
|
||||
rs(param).then(res => {
|
||||
console.log(res);
|
||||
state.satelliteSelected.forEach(data => {
|
||||
if (data == 'Sentinel') {
|
||||
rs(state.startTime, state.endTime, state.data.disasterId, ranges, type = 1, ret.id).then(res => {
|
||||
// getData();
|
||||
ElMessage({
|
||||
message: 'Success, Start crawling.',
|
||||
message: 'Success, Start crawling. sentinel',
|
||||
type: 'success',
|
||||
})
|
||||
})
|
||||
|
||||
} else if ("landsat" == data) {
|
||||
rs(state.startTime, state.endTime, state.data.disasterId, ranges, type = 1, 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(() => {
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -453,6 +471,7 @@ const ClearCondition = () => {
|
|||
state.satelliteSelected = []
|
||||
state.coordinateList = []
|
||||
state.selectID = ''
|
||||
emit('response')
|
||||
}
|
||||
|
||||
// 监听
|
||||
|
@ -464,17 +483,32 @@ watch(
|
|||
}
|
||||
},
|
||||
{ immediate: true })
|
||||
const setData = (row) => {
|
||||
state.data = row;
|
||||
state.selectID = row.disasterId
|
||||
map.value.mapOperations.wktParseToMap(row.geometry)
|
||||
console.log(row)
|
||||
}
|
||||
defineExpose({
|
||||
setData
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.rsSelect {
|
||||
border: 1px solid #040728;
|
||||
height: 52rem;
|
||||
|
||||
span {
|
||||
display: block;
|
||||
margin-bottom: 3%;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.satelliteSelect,
|
||||
.idSelect {
|
||||
width: 90%;
|
||||
|
@ -484,16 +518,19 @@ watch(
|
|||
.block {
|
||||
margin-top: 2%;
|
||||
}
|
||||
|
||||
.demonstration {
|
||||
font-size: 14px;
|
||||
float: left;
|
||||
height: 20px;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.coordinateContainer {
|
||||
margin: 3%;
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
.coordinateBtn {
|
||||
width: 90%;
|
||||
word-break: keep-all;
|
||||
|
@ -501,11 +538,13 @@ watch(
|
|||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.lowerBtn {
|
||||
width: 90%;
|
||||
margin: 3% 0;
|
||||
}
|
||||
}
|
||||
|
||||
#map {
|
||||
height: 52rem;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="container">
|
||||
<el-tabs v-model="state.activeName">
|
||||
<!-- <el-tabs v-model="state.activeName">
|
||||
<el-tab-pane label="Search condition"
|
||||
name="first">
|
||||
<search-condition></search-condition>
|
||||
|
@ -10,20 +10,33 @@
|
|||
name="second">
|
||||
<retrieval-condition></retrieval-condition>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-tabs> -->
|
||||
|
||||
<search-condition v-if ="state.isEdit" ref="edit" @response="responseFn"></search-condition>
|
||||
<retrieval-condition v-if ="!state.isEdit" @response="responseFn"></retrieval-condition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive } from 'vue';
|
||||
import { reactive,ref,nextTick } from 'vue';
|
||||
import retrievalCondition from './components/retrievalCondition.vue'
|
||||
import searchCondition from './components/searchCondition.vue'
|
||||
|
||||
|
||||
const edit = ref();
|
||||
const state = reactive({
|
||||
activeName: 'first'
|
||||
activeName: 'first',
|
||||
isEdit:false,
|
||||
data:{},
|
||||
})
|
||||
const responseFn = (res)=>{
|
||||
state.data = res;
|
||||
state.isEdit = !state.isEdit;
|
||||
nextTick(()=>{
|
||||
if(res){
|
||||
edit.value.setData(state.data);
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
||||
highlight-current-row @row-click="tableClick">
|
||||
<el-table-column type="index" label="ID" width="50" />
|
||||
<el-table-column prop="vordmId" label="ID" width="118" />
|
||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterCountry" label="Disaster country" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip></el-table-column>
|
||||
|
@ -212,6 +212,10 @@ const getDisasterData = () => {
|
|||
state.disasterData.loading = true;
|
||||
getDisasterPage(state.disasterData.param.pageNum, state.disasterData.param.pageSize, {}).then(res => {
|
||||
state.disasterData.data = res.records;
|
||||
state.disasterData.data.forEach(item=>{
|
||||
let date = item.disasterTime.slice(0,10);
|
||||
item.disasterTime = date;
|
||||
})
|
||||
state.disasterData.total = res.total;
|
||||
state.disasterData.loading = false;
|
||||
})
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
||||
highlight-current-row @row-click="tableClick">
|
||||
<el-table-column type="index" label="ID" width="50" />
|
||||
<el-table-column prop="vordmId" label="ID" width="118" />
|
||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterCountry" label="Disaster country" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip></el-table-column>
|
||||
|
@ -159,6 +159,10 @@ const getDisasterData = () => {
|
|||
state.disasterData.loading = true;
|
||||
getDisasterPage(state.disasterData.param.pageNum, state.disasterData.param.pageSize, {}).then(res => {
|
||||
state.disasterData.data = res.records;
|
||||
state.disasterData.data.forEach(item=>{
|
||||
let date = item.disasterTime.slice(0,10);
|
||||
item.disasterTime = date;
|
||||
})
|
||||
state.disasterData.total = res.total;
|
||||
state.disasterData.loading = false;
|
||||
})
|
||||
|
|
|
@ -96,7 +96,6 @@
|
|||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="Operate" label="Operate" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-button size="small" text type="primary" @click="onAllocation(scope.row)">Allocate</el-button>
|
||||
|
@ -111,7 +110,7 @@
|
|||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
<el-dialog v-model="state.dialogVisible" title="Review" width="30%">
|
||||
<el-dialog v-model="state.dialogVisible" title="Approval" width="30%">
|
||||
<el-container style="margin-top: -2%;margin-bottom: 2%;">
|
||||
<el-radio v-model="state.radio" label='1' @click="mapEvents('1')">Point</el-radio>
|
||||
<el-radio v-model="state.radio" label='2' @click="mapEvents('2')">Area</el-radio>
|
||||
|
@ -238,7 +237,10 @@ const onOpenEditRole = (type, row) => {
|
|||
if(state.wktPoint_Poly){
|
||||
mapRef.value.mapOperations.removeLayer(state.wktPoint_Poly)
|
||||
}
|
||||
state.wktPoint_Poly= mapRef.value.mapOperations.wktParseToMap(row.geometry)
|
||||
let wkt=mapRef.value.mapOperations.wktParseToMap(row.geometry)
|
||||
state.wktPoint_Poly= wkt.layer
|
||||
console.log(wkt.location)
|
||||
changelatlon(wkt.location[0],wkt.location[1]);
|
||||
// mapRef.value.mapOperations.on("click", (res)=>{
|
||||
// mapRef.value.mapOperations.clearPolygon()
|
||||
// mapRef.value.mapOperations.removeLayer( state.wktPoint_Poly)
|
||||
|
@ -251,7 +253,7 @@ const mapEvents = (ev)=>{
|
|||
if(ev == '1'){
|
||||
// mapRef.value.mapOperations.clearPolygon()
|
||||
mapRef.value.mapOperations.on("click", mapClick)
|
||||
mapRef.value.mapOperations.on("mousemove", changelatlon)
|
||||
// mapRef.value.mapOperations.on("mousemove", changelatlon)
|
||||
mapRef.value.mapOperations.clearPolygon()
|
||||
|
||||
}else if(ev == '2'){
|
||||
|
@ -275,8 +277,8 @@ const ClearSubmit = () => {
|
|||
}
|
||||
const mapClick=(res)=>{
|
||||
mapRef.value.mapOperations.removeLayer( state.wktPoint_Poly )
|
||||
changelatlon(res);
|
||||
state.wktPoint_Poly=mapRef.value.mapOperations.addInteractMarker(res.latlng.lat.toFixed(3),res.latlng.lng.toFixed(3))
|
||||
changelatlon(res.latlng.lat.toFixed(3),res.latlng.lng.toFixed(3));
|
||||
mapRef.value.mapOperations.addInteractMarker(res.latlng.lat.toFixed(3),res.latlng.lng.toFixed(3))
|
||||
// console.log(state.wktPoint_Poly)
|
||||
}
|
||||
const reviews = (index) => {
|
||||
|
@ -307,10 +309,12 @@ const onHandleCurrentChange = (val) => {
|
|||
state.tableData.param.pageNum = val;
|
||||
getTableData();
|
||||
};
|
||||
const changelatlon = (e) => {
|
||||
const changelatlon = (lat,lon) => {
|
||||
//深拷贝e
|
||||
state.dislat = e.latlng.lat.toFixed(3);
|
||||
state.dislon= e.latlng.lng.toFixed(3);
|
||||
// state.dislat = e.latlng.lat.toFixed(3);
|
||||
// state.dislon= e.latlng.lng.toFixed(3);
|
||||
state.dislat = lat;
|
||||
state.dislon= lon;
|
||||
// if (state.lon < 0) {
|
||||
// state.lon = state.lon + 360;
|
||||
// }
|
||||
|
|
|
@ -25,17 +25,15 @@
|
|||
</div>
|
||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading"
|
||||
@selection-change="handleSelectionChange" style="width: 100%">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column type="index" label="ID" width="50" />
|
||||
<el-table-column prop="disasterType" label="DisasterType" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterCountry" label="DisasterCountry" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterKeyword" label="DisasterKeyword" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="managerName" label="ManagerName" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="sponsorOrganization" label="SponsorOrganization" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="researchField" label="ResearchField" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="occupation" label="occupation" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="applyTime" label="applyTime" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column v-if="state.status == '1'" prop="reviewTime" label="reviewTime" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterType" label="DisasterType" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="disasterCountry" label="DisasterCountry" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="disasterTime" label="disasterTime" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="managerName" label="ManagerName" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="sponsorOrganization" label="SponsorOrganization" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="researchField" label="ResearchField" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="occupation" label="occupation" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="applyTime" label="applyTime" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column v-if="state.status == '1'" prop="reviewTime" label="reviewTime" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column v-if="state.status == '0'" prop="Operate" label="Operate" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<!-- <el-button link type="primary" size="small" @click="handleClick">Detail</el-button>-->
|
||||
|
@ -113,6 +111,10 @@ const getTableData = () => {
|
|||
state.tableData.loading = true;
|
||||
getAdminManagerPage(state.tableData.param.pageNum, state.tableData.param.pageSize, { "managerName": state.searchName,"status": state.status}).then(res => {
|
||||
state.tableData.data = res.records;
|
||||
state.tableData.data.forEach(item => {
|
||||
let date = item.disasterTime.slice(0, 10);
|
||||
item.disasterTime = date;
|
||||
})
|
||||
state.tableData.total = res.total;
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue