冲突解决-glj
This commit is contained in:
commit
f54b4108b2
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) => {
|
||||
|
|
|
@ -5,8 +5,6 @@ import { Session } from '/@/utils/storage';
|
|||
|
||||
// export const moduleName = 'zqq-biz-vordm';
|
||||
export const moduleName = 'biz-vordm';
|
||||
export const crawlModule = 'vordm-crawl';
|
||||
// 配置新建一个 axios 实例
|
||||
const service = axios.create({
|
||||
//baseURL: import.meta.env.VITE_API_URL,
|
||||
timeout: 50000,
|
||||
|
|
|
@ -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"
|
||||
<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="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">
|
||||
<div v-for="(coordinate,i) in state.coordinateList">
|
||||
<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>
|
||||
|
@ -66,34 +53,25 @@
|
|||
</div>
|
||||
</el-scrollbar>
|
||||
<el-row>
|
||||
<el-col :span="1"></el-col>
|
||||
<el-col :span="7">
|
||||
<el-button class="coordinateBtn"
|
||||
@click="addCoordinate">Add coordinates</el-button>
|
||||
<el-col :span=" 1 "></el-col>
|
||||
<el-col :span=" 7 ">
|
||||
<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-col :span=" 7 ">
|
||||
<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-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">Cancel</el-button>
|
||||
<el-col :span=" 6 ">
|
||||
<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">
|
||||
<el-col :span=" 16 ">
|
||||
<Map id="map" ref="map">
|
||||
</Map>
|
||||
</el-col>
|
||||
|
||||
|
@ -129,13 +104,17 @@
|
|||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
<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 })
|
||||
</script>
|
||||
const setData = (row) => {
|
||||
state.data = row;
|
||||
state.selectID = row.disasterId
|
||||
map.value.mapOperations.wktParseToMap(row.geometry)
|
||||
console.log(row)
|
||||
}
|
||||
defineExpose({
|
||||
setData
|
||||
})
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
|
||||
|
||||
</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">
|
||||
|
|
|
@ -277,12 +277,12 @@ const initLineChart = (xData,data1, data2) => {
|
|||
symbol: 'circle',
|
||||
smooth: true,
|
||||
data: data2,
|
||||
lineStyle: { color: '#44c05b' },
|
||||
itemStyle: { color: '#44c05b', borderColor: '#44c05b' },
|
||||
lineStyle: { color: 'rgba(145,204,117,1)' },
|
||||
itemStyle: { color: 'rgba(145,204,117,1)', borderColor: 'rgba(145,204,117,1)' },
|
||||
areaStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: '#44c05b' },
|
||||
{ offset: 1, color: '#44c05b' },
|
||||
{ offset: 0, color: 'rgba(145,204,117,1)' },
|
||||
{ offset: 1, color: 'rgba(145,204,117,0)' },
|
||||
]),
|
||||
},
|
||||
}
|
||||
|
@ -328,12 +328,12 @@ const initLineVandDChart = (xData,data1, data2) => {
|
|||
symbol: 'circle',
|
||||
smooth: true,
|
||||
data: data2,
|
||||
lineStyle: { color: '#3d91e7' },
|
||||
itemStyle: { color: '#3d91e7', borderColor: '#3d91e7' },
|
||||
lineStyle: { color: 'rgba(84,112,198,1)' },
|
||||
itemStyle: { color: 'rgba(84,112,198,1)', borderColor: 'rgba(84,112,198,1)' },
|
||||
areaStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: '#3d91e7' },
|
||||
{ offset: 1, color: '#3d91e7' },
|
||||
{ offset: 0, color: 'rgba(84,112,198,1)' },
|
||||
{ offset: 1, color: 'rgba(84,112,198,0)' },
|
||||
]),
|
||||
},
|
||||
},{
|
||||
|
@ -343,12 +343,12 @@ const initLineVandDChart = (xData,data1, data2) => {
|
|||
symbol: 'circle',
|
||||
smooth: true,
|
||||
data: data1,
|
||||
lineStyle: { color: '#e78d3d' },
|
||||
itemStyle: { color: '#e78d3d', borderColor: '#e78d3d' },
|
||||
lineStyle: { color: 'rgba(250,200,88,1)' },
|
||||
itemStyle: { color: 'rgba(250,200,88,1)', borderColor: 'rgba(250,200,88,1)' },
|
||||
areaStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: '#e78d3d' },
|
||||
{ offset: 1, color: '#e78d3d' },
|
||||
{ offset: 0, color: 'rgba(250,200,88,1)' },
|
||||
{ offset: 1, color: 'rgba(250,200,88,0)' },
|
||||
]),
|
||||
},
|
||||
}
|
||||
|
@ -398,8 +398,8 @@ const initChiefChart = (xData,yData) => {
|
|||
barWidth: 30,
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: '#fe9a8bb3' },
|
||||
{ offset: 1, color: '#fe9a8b03' },
|
||||
{ offset: 0, color: 'rgba(238,102,102,1)' },
|
||||
{ offset: 1, color: 'rgba(238,102,102,0)' },
|
||||
]),
|
||||
//柱状图圆角
|
||||
borderRadius: [30, 30, 0, 0],
|
||||
|
@ -451,8 +451,8 @@ const initAdministratorsChart = (xData,yData) => {
|
|||
yAxisIndex: 0,
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: 'rgba(108,80,243,0.3)' },
|
||||
{ offset: 1, color: 'rgba(108,80,243,0)' },
|
||||
{ offset: 0, color: 'rgba(115,192,222,1)' },
|
||||
{ offset: 1, color: 'rgba(115,192,222,0)' },
|
||||
]),
|
||||
//柱状图圆角
|
||||
borderRadius: [30, 30, 0, 0],
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" style="margin-left: 20px">
|
||||
<el-tab-pane label="Unapproved" name="first">
|
||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading" style="width: 100%">
|
||||
<el-table-column type="index" label="ID" width="50" />
|
||||
<el-table-column prop="username" label="User name" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="organization" label="Organization" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip>
|
||||
|
@ -32,8 +33,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column prop="Operate" label="Operate" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-button size="small" text type="primary"
|
||||
@click="onOpenEditRole('edit', scope.row)">Approve</el-button>
|
||||
<el-button size="small" text type="primary" @click="onOpenEditRole('edit', scope.row)">Approve</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
@ -64,7 +64,7 @@
|
|||
</el-tab-pane>
|
||||
<el-tab-pane label="Approved | Rejected" name="second">
|
||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading" style="width: 100%">
|
||||
|
||||
<el-table-column type="index" label="ID" width="50" />
|
||||
<el-table-column prop="username" label="User name" show-overflow-tooltip></el-table-column>
|
||||
<!-- <el-table-column prop="Administrator" label="Administrator" show-overflow-tooltip></el-table-column> -->
|
||||
<el-table-column prop="organization" label="Organization" show-overflow-tooltip></el-table-column>
|
||||
|
@ -86,25 +86,19 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="chiefName" label="Answer" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="reviewTime" label="reviewTime" show-overflow-tooltip />
|
||||
|
||||
|
||||
<!-- <el-table-column prop="responseTime" label="Response time" show-overflow-tooltip></el-table-column> -->
|
||||
<!-- <el-table-column prop="Operate" label="Operate" show-overflow-tooltip></el-table-column> -->
|
||||
<el-table-column width="170" prop="respondStatus" label="Response status" show-overflow-tooltip>
|
||||
|
||||
<el-table-column prop="respondStatus" label="Response status" show-overflow-tooltip>
|
||||
|
||||
<template #default="scope">
|
||||
<el-tag type="info" v-if="scope.row.respondStatus === 2">Approved</el-tag>
|
||||
<el-tag type="info" v-if="scope.row.respondStatus === 1">Rejected</el-tag>
|
||||
<el-tag type="success" v-if="scope.row.respondStatus === 3">Complete response</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column width="200" prop="Operate" label="Operate" 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="onAllocation(scope.row)">Allocation</el-button>
|
||||
<el-button size="small" text type="danger" @click="responseEnded(scope.row)">Response ended</el-button>
|
||||
<el-button size="small" text type="primary" @click="onAllocation(scope.row)">Allocate</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -123,10 +117,9 @@
|
|||
<el-radio v-model="state.radio" label='3' @click="mapEvents('3')">Edit</el-radio>
|
||||
<el-button type="primary" style="margin-left: 5%;" @click="ClearSubmit">Clear</el-button>
|
||||
</el-container>
|
||||
<el-container style="margin-top: 2%;margin-bottom: 2%;" v-if="state.radio === '1' ? true : false">
|
||||
<el-container style="margin-top: 2%;margin-bottom: 2%;" v-if="state.radio==='1'?true:false">
|
||||
<span style="line-height: 35px;"> Latitude:</span>
|
||||
<el-input placeholder="wait……" style="height:35px;margin-right: 1%;" v-model="state.dislat" readonly="readonly">
|
||||
</el-input>
|
||||
<el-input placeholder="wait……" style="height:35px;margin-right: 1%;" v-model="state.dislat" readonly="readonly"> </el-input>
|
||||
<span style="line-height: 35px;">Longitude:</span>
|
||||
<el-input placeholder="wait……" style="height:35px;" v-model="state.dislon" readonly="readonly"></el-input>
|
||||
</el-container>
|
||||
|
@ -148,16 +141,16 @@
|
|||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<selectUser ref="select" @callback="getTableData"></selectUser>
|
||||
<selectUser ref ="select" @callback="getTableData"></selectUser>
|
||||
</el-config-provider>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="userResponse">
|
||||
import en from 'element-plus/dist/locale/en.mjs'
|
||||
import { reactive, onMounted, ref, nextTick, watchEffect, defineAsyncComponent } from 'vue';
|
||||
import { reactive, onMounted, ref, nextTick,watchEffect,defineAsyncComponent } from 'vue';
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import { getList, review, responseEndedDisasterInfo } from '/@/api/disasterInfo/index';
|
||||
import { getList, review } from '/@/api/disasterInfo/index';
|
||||
import { getDictionary } from '/@/api/system/dictbiz';
|
||||
import { useVariableStore } from '/@/stores/index.ts'
|
||||
//引入地图
|
||||
|
@ -181,30 +174,12 @@ const handleClick = (tab, event) => {
|
|||
getTableData();
|
||||
};
|
||||
const MapPage = defineAsyncComponent({
|
||||
loader: () => import('/@/components/Map.vue'),
|
||||
loader:() =>import('/@/components/Map.vue'),
|
||||
delay: 200,
|
||||
})
|
||||
const onAllocation = (row) => {
|
||||
select.value.openDialog(row)
|
||||
};
|
||||
|
||||
|
||||
const responseEnded = (row) => {
|
||||
ElMessageBox.confirm(`Confirm completion of response?`, 'Prompt', {
|
||||
confirmButtonText: 'Yes',
|
||||
cancelButtonText: 'No',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
responseEndedDisasterInfo(row.id).then((da) => {
|
||||
getTableData();
|
||||
ElMessage.success('Operation successful');
|
||||
})
|
||||
})
|
||||
.catch(() => { });
|
||||
};
|
||||
|
||||
|
||||
const dateFormat = (date) => {
|
||||
return useDateFormat(date, 'YYYY-MM-DD').value;
|
||||
}
|
||||
|
@ -226,10 +201,10 @@ const state = reactive({
|
|||
disasterTypeList: [],
|
||||
selectName: 'first',
|
||||
edit: {},
|
||||
radio: null,
|
||||
dislat: '',
|
||||
dislon: '',
|
||||
wktPoint_Poly: undefined
|
||||
radio:null,
|
||||
dislat:'',
|
||||
dislon:'',
|
||||
wktPoint_Poly:undefined
|
||||
});
|
||||
// 初始化表格数据
|
||||
const getTableData = () => {
|
||||
|
@ -238,7 +213,7 @@ const getTableData = () => {
|
|||
if (state.selectName === 'first') {
|
||||
state.tableData.param.respondStatus = 0;
|
||||
} else {
|
||||
state.tableData.param.respondStatus = 3;
|
||||
state.tableData.param.respondStatus = 2;
|
||||
}
|
||||
getList(state.tableData.param).then((res) => {
|
||||
state.tableData.data = res.records;
|
||||
|
@ -273,23 +248,22 @@ const onOpenEditRole = (type, row) => {
|
|||
// })
|
||||
mapEvents('1')
|
||||
},100);
|
||||
|
||||
};
|
||||
const mapEvents = (ev) => {
|
||||
if (ev == '1') {
|
||||
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.clearPolygon()
|
||||
|
||||
} else if (ev == '2') {
|
||||
mapRef.value.mapOperations.off("click", mapClick);
|
||||
}else if(ev == '2'){
|
||||
mapRef.value.mapOperations.off("click",mapClick);
|
||||
mapRef.value.mapOperations.drawPolygon()
|
||||
// mapRef.value.mapOperations.drawPolygon()
|
||||
// mapRef.value.mapOperations.drawCreated()
|
||||
|
||||
}
|
||||
else {
|
||||
else{
|
||||
mapRef.value.mapOperations.Edit()
|
||||
}
|
||||
};
|
||||
|
@ -297,11 +271,10 @@ const ClearSubmit = () => {
|
|||
setTimeout(() => {
|
||||
mapRef.value.mapOperations.removeAll()
|
||||
variableStore.wktdata = null
|
||||
variableStore.layerGroupPoint = null;
|
||||
layerGroupPoly = null;
|
||||
variableStore.layerGroupPoint=null;
|
||||
layerGroupPoly=null;
|
||||
}, 100)
|
||||
}
|
||||
|
||||
const mapClick=(res)=>{
|
||||
mapRef.value.mapOperations.removeLayer( state.wktPoint_Poly )
|
||||
changelatlon(res.latlng.lat.toFixed(3),res.latlng.lng.toFixed(3));
|
||||
|
@ -320,7 +293,7 @@ const reviews = (index) => {
|
|||
if (index === 1) {
|
||||
state.edit.respondStatus = 1;
|
||||
} else {
|
||||
state.edit.respondStatus = 3;
|
||||
state.edit.respondStatus = 2;
|
||||
}
|
||||
state.edit.geometry = variableStore.layerGroupPoint === null ? variableStore.layerGroupPoly : variableStore.layerGroupPoint;
|
||||
//时间格式化
|
||||
|
@ -353,13 +326,13 @@ else {
|
|||
state.dislat = String(state.dislat) + "°N"
|
||||
}
|
||||
|
||||
if (state.dislon <= 180 && state.dislon >= 0) {
|
||||
if (state.dislon <= 180 && state.dislon >= 0) {
|
||||
state.dislon = String(Math.abs(state.dislon)) + "°E"
|
||||
}
|
||||
else if (state.dislon > 180 && state.dislon <= 360) {
|
||||
}
|
||||
else if (state.dislon > 180 && state.dislon <= 360) {
|
||||
state.dislon = String((360 - state.dislon).toFixed(3)) + "°W"
|
||||
}
|
||||
else if (state.dislon < 0) {
|
||||
}
|
||||
else if (state.dislon < 0) {
|
||||
let n = Math.floor(state.dislon / 360)
|
||||
state.dislon = (state.dislon - n * 360).toFixed(3)
|
||||
if (state.dislon <= 180 && state.dislon >= 0) {
|
||||
|
@ -368,8 +341,8 @@ else {
|
|||
else if (state.dislon > 180 && state.dislon <= 360) {
|
||||
state.dislon = String((360 - state.dislon).toFixed(3)) + "°W"
|
||||
}
|
||||
}
|
||||
else if (state.dislon > 360) {
|
||||
}
|
||||
else if (state.dislon > 360) {
|
||||
let n = Math.floor(state.dislon / 360)
|
||||
state.dislon = (state.dislon - n * 360).toFixed(3)
|
||||
if (state.dislon <= 180 && state.dislon >= 0) {
|
||||
|
@ -378,7 +351,7 @@ else {
|
|||
else if (state.dislon > 180 && state.dislon <= 360) {
|
||||
state.dislon = String((360 - state.dislon).toFixed(3)) + "°W"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// 页面加载时
|
||||
|
@ -394,7 +367,7 @@ const getValue = (key) => {
|
|||
return state.disasterTypeList.find((item) => item.dictKey === key)?.dictValue;
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
<style>
|
||||
.demo-tabs>.el-tabs__content {
|
||||
padding: 0px;
|
||||
color: #6b778c;
|
||||
|
@ -411,11 +384,4 @@ const getValue = (key) => {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mt15 {
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
float: right;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue