冲突解决-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';
|
let method = 'sentinel';
|
||||||
if (type == 1) {
|
if (type == 1) {
|
||||||
method = 'sentinel';
|
method = 'sentinel';
|
||||||
|
@ -33,16 +33,21 @@ export const rs = (stime, etime, disaster_id, ranges, type = 1) => {
|
||||||
} else {
|
} else {
|
||||||
method = 'searchone';
|
method = 'searchone';
|
||||||
}
|
}
|
||||||
|
let data = {
|
||||||
|
stime,
|
||||||
|
etime,
|
||||||
|
disaster_id,
|
||||||
|
id,
|
||||||
|
}
|
||||||
|
if(type != 1 && type != 2){
|
||||||
|
data['geo'] = ranges
|
||||||
|
}else{
|
||||||
|
data['ranges']=ranges
|
||||||
|
}
|
||||||
return request({
|
return request({
|
||||||
url: '/api/' + crawlModule + '/rs/' + method,
|
url: '/api/' + crawlModule + '/rs/' + method,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: data,
|
||||||
stime,
|
|
||||||
etime,
|
|
||||||
disaster_id,
|
|
||||||
ranges,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
export const submit = (row) => {
|
export const submit = (row) => {
|
||||||
|
|
|
@ -5,8 +5,6 @@ import { Session } from '/@/utils/storage';
|
||||||
|
|
||||||
// export const moduleName = 'zqq-biz-vordm';
|
// export const moduleName = 'zqq-biz-vordm';
|
||||||
export const moduleName = 'biz-vordm';
|
export const moduleName = 'biz-vordm';
|
||||||
export const crawlModule = 'vordm-crawl';
|
|
||||||
// 配置新建一个 axios 实例
|
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
//baseURL: import.meta.env.VITE_API_URL,
|
//baseURL: import.meta.env.VITE_API_URL,
|
||||||
timeout: 50000,
|
timeout: 50000,
|
||||||
|
|
|
@ -4,41 +4,29 @@
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||||
<span style="margin:2%;font-weight: 600;font-size: 18px;">Disaster Info</span>
|
<span style="margin:2%;font-weight: 600;font-size: 18px;">Disaster Info</span>
|
||||||
<el-table :data="state.disasterData.data"
|
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
||||||
v-loading="state.disasterData.loading"
|
highlight-current-row @row-click="tableClick">
|
||||||
style="width: 100%"
|
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip></el-table-column>
|
||||||
highlight-current-row
|
<el-table-column prop="disasterCountry" label="Disaster country" show-overflow-tooltip></el-table-column>
|
||||||
@row-click="tableClick">
|
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column type="index"
|
<el-table-column prop="Operate" label="Operate" width="85" show-overflow-tooltip>
|
||||||
label="ID"
|
<template #default="scope">
|
||||||
width="50" />
|
<el-button size="small" text type="primary" @click="startBot(scope.row)">start</el-button>
|
||||||
<el-table-column prop="disasterType"
|
<!-- <el-tag type="info" v-if="scope.row.respondStatus == 3">complete</el-tag> -->
|
||||||
label="Disaster type"
|
</template>
|
||||||
show-overflow-tooltip></el-table-column>
|
</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>
|
</el-table>
|
||||||
<el-pagination @size-change="onHandleDisasterSizeChange"
|
<el-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
|
||||||
@current-change="onHandleDisasterCurrentChange"
|
class="mt15" :pager-count="3" :page-sizes="[10, 20, 30]"
|
||||||
class="mt15"
|
v-model:current-page="state.disasterData.param.pageNum" background
|
||||||
:pager-count="3"
|
v-model:page-size="state.disasterData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||||
:page-sizes="[10, 20, 30]"
|
:total="state.disasterData.total">
|
||||||
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>
|
</el-pagination>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="14">
|
<el-col :span="14">
|
||||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||||
<div class="system-user-search mb15"
|
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
||||||
style="display: flex;margin-left: 10px;margin-top: 10px;">
|
|
||||||
<!-- 选择灾害类型 -->
|
<!-- 选择灾害类型 -->
|
||||||
<!-- <el-select v-model="state.value_disasterType"
|
<!-- <el-select v-model="state.value_disasterType"
|
||||||
size="default"
|
size="default"
|
||||||
|
@ -74,33 +62,17 @@
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-tree-select v-model="state.value_satelliteType"
|
<el-tree-select v-model="state.value_satelliteType" :data="state.options_satelliteType" multiple
|
||||||
:data="state.options_satelliteType"
|
collapse-tags collapse-tags-tooltip :render-after-expand="false" show-checkbox clearable
|
||||||
multiple
|
placeholder="Select satellite type" />
|
||||||
collapse-tags
|
|
||||||
collapse-tags-tooltip
|
|
||||||
:render-after-expand="false"
|
|
||||||
show-checkbox
|
|
||||||
clearable
|
|
||||||
placeholder="Select satellite type" />
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8"
|
<el-col :span="8" style="padding-left:1%;">
|
||||||
style="padding-left:1%;">
|
<el-tree-select v-model="state.value_resolution" :data="state.options_resolution" multiple collapse-tags
|
||||||
<el-tree-select v-model="state.value_resolution"
|
collapse-tags-tooltip :render-after-expand="false" show-checkbox clearable
|
||||||
:data="state.options_resolution"
|
placeholder="Select resolution" />
|
||||||
multiple
|
|
||||||
collapse-tags
|
|
||||||
collapse-tags-tooltip
|
|
||||||
:render-after-expand="false"
|
|
||||||
show-checkbox
|
|
||||||
clearable
|
|
||||||
placeholder="Select resolution" />
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3">
|
<el-col :span="3">
|
||||||
<el-button size="default"
|
<el-button size="default" type="primary" class="ml10" @click="searchRemoteSensingSourceData">
|
||||||
type="primary"
|
|
||||||
class="ml10"
|
|
||||||
@click="searchRemoteSensingSourceData">
|
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<ele-Search />
|
<ele-Search />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
|
@ -111,40 +83,22 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- id,卫星类型,生产日期,产品谱段,产品分辨率,云覆盖量,景中心经纬度,元数据下载链接,缩略图 支撑单位 -->
|
<!-- id,卫星类型,生产日期,产品谱段,产品分辨率,云覆盖量,景中心经纬度,元数据下载链接,缩略图 支撑单位 -->
|
||||||
<el-table :data="state.requestData"
|
<el-table :data="state.requestData" style="width: 100%">
|
||||||
style="width: 100%">
|
<el-table-column type="index" label="Index" align="center" width="80"></el-table-column>
|
||||||
<el-table-column type="index"
|
<el-table-column prop="satelliteCode" label="Satellite code" align="center"
|
||||||
label="Index"
|
show-overflow-tooltip></el-table-column>
|
||||||
align="center"
|
<el-table-column prop="productTime" label="Product time" align="center"
|
||||||
width="80"></el-table-column>
|
show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="satelliteCode"
|
<el-table-column prop="productBandsNum" label="Product bands num" align="center"
|
||||||
label="Satellite code"
|
show-overflow-tooltip></el-table-column>
|
||||||
align="center"
|
<el-table-column prop="productResolution" label="Product resolution(m)" align="center"
|
||||||
show-overflow-tooltip></el-table-column>
|
show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="productTime"
|
<el-table-column prop="cloudCover" label="Cloud cover(%)" align="center"
|
||||||
label="Product time"
|
show-overflow-tooltip></el-table-column>
|
||||||
align="center"
|
<el-table-column prop="sourceOrganization" label="Source organization" align="center"
|
||||||
show-overflow-tooltip></el-table-column>
|
show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="productBandsNum"
|
<el-table-column prop="downloadUrl" label="Download url" align="center" show-overflow-tooltip>
|
||||||
label="Product bands num"
|
</el-table-column>
|
||||||
align="center"
|
|
||||||
show-overflow-tooltip></el-table-column>
|
|
||||||
<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"
|
|
||||||
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"
|
|
||||||
show-overflow-tooltip> </el-table-column>
|
|
||||||
<!-- <el-table-column prop="Operate"
|
<!-- <el-table-column prop="Operate"
|
||||||
label="Operate"
|
label="Operate"
|
||||||
show-overflow-tooltip></el-table-column> -->
|
show-overflow-tooltip></el-table-column> -->
|
||||||
|
@ -185,16 +139,10 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-pagination @size-change="onHandleSizeChange"
|
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
|
||||||
@current-change="onHandleCurrentChange"
|
:pager-count="3" :page-sizes="[10, 20, 30]" background v-model:current-page="state.tableData.param.pageNum"
|
||||||
class="mt15"
|
v-model:page-size="state.tableData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||||
:pager-count="3"
|
:total="state.tableData.total">
|
||||||
: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>
|
</el-pagination>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -206,7 +154,7 @@
|
||||||
import { ref, reactive, onMounted } from 'vue';
|
import { ref, reactive, onMounted } from 'vue';
|
||||||
import { getRemoteSensingSourceData, getRemoteSensingSourceDataByCondition, getPagesRemoteSensingSourceData } from "/@/api/remoteSensingSourceData/remoteSensingSourceData.js";
|
import { getRemoteSensingSourceData, getRemoteSensingSourceDataByCondition, getPagesRemoteSensingSourceData } from "/@/api/remoteSensingSourceData/remoteSensingSourceData.js";
|
||||||
import { getDisasterPage } from '/@/api/data/otherData.js'
|
import { getDisasterPage } from '/@/api/data/otherData.js'
|
||||||
|
// import { getList as getDisasterPage } from '/@/api/disasterInfo/index';
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
disasterData: {
|
disasterData: {
|
||||||
|
@ -276,7 +224,10 @@ const state = reactive({
|
||||||
requestResolution: [],
|
requestResolution: [],
|
||||||
requestSatellite: []
|
requestSatellite: []
|
||||||
})
|
})
|
||||||
|
const emit = defineEmits(['response']);
|
||||||
|
const startBot=(row)=>{
|
||||||
|
emit('response', row);
|
||||||
|
}
|
||||||
// 初始化灾害表格数据
|
// 初始化灾害表格数据
|
||||||
const getDisasterData = () => {
|
const getDisasterData = () => {
|
||||||
state.disasterData.loading = true;
|
state.disasterData.loading = true;
|
||||||
|
@ -635,11 +586,13 @@ const searchDisasterDate = () => {
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.system-role-padding {
|
.system-role-padding {
|
||||||
padding-bottom: 2%;
|
padding-bottom: 2%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-pagination {
|
.el-pagination {
|
||||||
padding-left: 1%;
|
padding-left: 1%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mt15 {
|
.mt15 {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: end;
|
justify-content: end;
|
||||||
|
|
|
@ -11,12 +11,9 @@
|
||||||
<span class="demonstration">Start time</span>
|
<span class="demonstration">Start time</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="19">
|
<el-col :span="19">
|
||||||
<el-date-picker style="width: 90%;"
|
<el-date-picker style="width: 90%;" v-model="state.startTime" type="datetime"
|
||||||
v-model="state.startTime"
|
placeholder="Select start time" value-format="YYYY-MM-DD HH:mm:ss" :shortcuts="state.shortcuts"
|
||||||
type="datetime"
|
:disabled-date="disabledDate" />
|
||||||
placeholder="Select start time"
|
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
|
||||||
:shortcuts="state.shortcuts" />
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row class="block">
|
<el-row class="block">
|
||||||
|
@ -24,41 +21,31 @@
|
||||||
<span class="demonstration">End time</span>
|
<span class="demonstration">End time</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="19">
|
<el-col :span="19">
|
||||||
<el-date-picker style="width: 90%;"
|
<el-date-picker style="width: 90%;" v-model="state.endTime" type="datetime" placeholder="Select end time"
|
||||||
v-model="state.endTime"
|
value-format="YYYY-MM-DD HH:mm:ss" :shortcuts="state.shortcuts" :disabled-date="disabledDate" />
|
||||||
type="datetime"
|
|
||||||
placeholder="Select end time"
|
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
|
||||||
:shortcuts="state.shortcuts" />
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card class="box-card"
|
<el-card class="box-card" style="margin-top: 3%;">
|
||||||
style="margin-top: 3%;">
|
|
||||||
<span>Select a region</span>
|
<span>Select a region</span>
|
||||||
<el-scrollbar wrap-class="list"
|
<el-scrollbar wrap-class="list" view-class="view-box" :native="false">
|
||||||
view-class="view-box"
|
<div v-for="(coordinate, i) in state.coordinateList ">
|
||||||
:native="false">
|
|
||||||
<div v-for="(coordinate,i) in state.coordinateList">
|
|
||||||
<el-row class="coordinateContainer">
|
<el-row class="coordinateContainer">
|
||||||
<el-col :span="1"></el-col>
|
<el-col :span="1"></el-col>
|
||||||
<el-col :span="19">
|
<el-col :span="19">
|
||||||
<span style="font-size:14px;width: 100%;">{{
|
<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: ' +
|
||||||
}}</span>
|
parseFloat(coordinate.Lng).toFixed(4)
|
||||||
|
}}</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2">
|
<el-col :span="2">
|
||||||
<el-button class="el-icon"
|
<el-button class="el-icon" @click="editCoordinate" size="small">
|
||||||
@click="editCoordinate"
|
|
||||||
size="small">
|
|
||||||
<ele-Edit />
|
<ele-Edit />
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2">
|
<el-col :span="2">
|
||||||
<el-button class="el-icon"
|
<el-button class="el-icon" @click="state.coordinateList.splice(i, 1);" size="small">
|
||||||
@click="state.coordinateList.splice(i, 1);"
|
|
||||||
size="small">
|
|
||||||
<ele-Delete />
|
<ele-Delete />
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -66,34 +53,25 @@
|
||||||
</div>
|
</div>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="1"></el-col>
|
<el-col :span=" 1 "></el-col>
|
||||||
<el-col :span="7">
|
<el-col :span=" 7 ">
|
||||||
<el-button class="coordinateBtn"
|
<el-button class="coordinateBtn" @click=" addCoordinate ">Add coordinates</el-button>
|
||||||
@click="addCoordinate">Add coordinates</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="7">
|
<el-col :span=" 7 ">
|
||||||
<el-button class="coordinateBtn"
|
<el-button class="coordinateBtn" @click=" clearCoordinate ">Clear coordinates</el-button>
|
||||||
@click="clearCoordinate">Clear coordinates</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card class="box-card"
|
<el-card class="box-card" style="margin-top: 3%;">
|
||||||
style="margin-top: 3%;">
|
|
||||||
<span>Select satellite type</span>
|
<span>Select satellite type</span>
|
||||||
<el-tree-select class="satelliteSelect"
|
<el-tree-select class="satelliteSelect" v-model=" state.satelliteSelected " :data=" state.sensor " multiple
|
||||||
v-model="state.satelliteSelected"
|
collapse-tags collapse-tags-tooltip :render-after-expand=" false " show-checkbox
|
||||||
:data="state.sensor"
|
placeholder="Select satellite type" />
|
||||||
multiple
|
|
||||||
collapse-tags
|
|
||||||
collapse-tags-tooltip
|
|
||||||
:render-after-expand="false"
|
|
||||||
show-checkbox
|
|
||||||
placeholder="Select satellite type" />
|
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card class="box-card"
|
<!-- <el-card class="box-card"
|
||||||
style="margin-top: 3%;">
|
style="margin-top: 3%;">
|
||||||
<span>Select VoRDM ID</span>
|
<span>Select VoRDM ID</span>
|
||||||
<el-select class="idSelect"
|
<el-select class="idSelect"
|
||||||
|
@ -105,23 +83,20 @@
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value" />
|
:value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-card>
|
</el-card> -->
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="1"></el-col>
|
<el-col :span=" 1 "></el-col>
|
||||||
<el-col :span="6">
|
<el-col :span=" 6 ">
|
||||||
<el-button class="lowerBtn"
|
<el-button class="lowerBtn" @click=" startCrawl ">Start Crawl</el-button>
|
||||||
@click="startCrawl">Start Crawl</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span=" 6 ">
|
||||||
<el-button class="lowerBtn"
|
<el-button class="lowerBtn" @click=" ClearCondition ">Go Back</el-button>
|
||||||
@click="ClearCondition">Cancel</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="16">
|
<el-col :span=" 16 ">
|
||||||
<Map id="map"
|
<Map id="map" ref="map">
|
||||||
ref="map">
|
|
||||||
</Map>
|
</Map>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
@ -129,13 +104,17 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import Map from "/@/components/Map.vue";
|
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 { rs, submit } from '/@/api/crawl/index';
|
||||||
import { useUserInfo } from '/@/stores/userInfo';
|
import { useUserInfo } from '/@/stores/userInfo';
|
||||||
|
import { ElMessage,ElMessageBox} from "element-plus";
|
||||||
const userInfo = useUserInfo();
|
const userInfo = useUserInfo();
|
||||||
|
const emit = defineEmits(['response']);
|
||||||
|
const disabledDate = (time) => {
|
||||||
|
return time.getTime() > Date.now()
|
||||||
|
}
|
||||||
// 初始化数据
|
// 初始化数据
|
||||||
const map = ref()
|
const map = ref()
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
|
@ -184,82 +163,82 @@ const state = reactive({
|
||||||
// }
|
// }
|
||||||
// ]
|
// ]
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
value: '国产系列卫星',
|
// value: '国产系列卫星',
|
||||||
label: '国产系列卫星',
|
// label: '国产系列卫星',
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
value: 'GF - 1',
|
// value: 'GF - 1',
|
||||||
label: 'GF - 1',
|
// label: 'GF - 1',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
value: 'GF - 2',
|
// value: 'GF - 2',
|
||||||
label: 'GF - 2',
|
// label: 'GF - 2',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
value: 'GF - 3',
|
// value: 'GF - 3',
|
||||||
label: 'GF - 3',
|
// label: 'GF - 3',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
value: 'GF - 4',
|
// value: 'GF - 4',
|
||||||
label: 'GF - 4',
|
// label: 'GF - 4',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
value: 'GF - 6',
|
// value: 'GF - 6',
|
||||||
label: 'GF - 6',
|
// label: 'GF - 6',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
value: 'ZY - 3',
|
// value: 'ZY - 3',
|
||||||
label: 'ZY - 3',
|
// label: 'ZY - 3',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
value: 'ZY - 302',
|
// value: 'ZY - 302',
|
||||||
label: 'ZY - 302',
|
// label: 'ZY - 302',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
value: 'ZY - 02C',
|
// value: 'ZY - 02C',
|
||||||
label: 'ZY - 02C',
|
// label: 'ZY - 02C',
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
value: '欧比特珠海一号系列卫星',
|
// value: '欧比特珠海一号系列卫星',
|
||||||
label: '欧比特珠海一号系列卫星',
|
// label: '欧比特珠海一号系列卫星',
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
value: 'OVS - 2A',
|
// value: 'OVS - 2A',
|
||||||
label: 'OVS - 2A',
|
// label: 'OVS - 2A',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
value: 'OVS - 3A',
|
// value: 'OVS - 3A',
|
||||||
label: 'OVS - 3A',
|
// label: 'OVS - 3A',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
value: 'OVS - 1A',
|
// value: 'OVS - 1A',
|
||||||
label: 'OVS - 1A',
|
// label: 'OVS - 1A',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
value: 'OVS - 1B',
|
// value: 'OVS - 1B',
|
||||||
label: 'OVS - 1B',
|
// label: 'OVS - 1B',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
value: 'OHS - 2A',
|
// value: 'OHS - 2A',
|
||||||
label: 'OHS - 2A',
|
// label: 'OHS - 2A',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
value: 'OHS - 2B',
|
// value: 'OHS - 2B',
|
||||||
label: 'OHS - 2B',
|
// label: 'OHS - 2B',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
value: 'OHS - 2C',
|
// value: 'OHS - 2C',
|
||||||
label: 'OHS - 2C',
|
// label: 'OHS - 2C',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
value: 'OHS - 2D',
|
// value: 'OHS - 2D',
|
||||||
label: 'OHS - 2D',
|
// label: 'OHS - 2D',
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
}
|
// }
|
||||||
],
|
],
|
||||||
shortcuts: [
|
shortcuts: [
|
||||||
{
|
{
|
||||||
|
@ -312,6 +291,7 @@ const state = reactive({
|
||||||
lon: '',
|
lon: '',
|
||||||
disLat: '',
|
disLat: '',
|
||||||
disLon: '',
|
disLon: '',
|
||||||
|
data: {}
|
||||||
})
|
})
|
||||||
|
|
||||||
const onMapClick = (e) => {
|
const onMapClick = (e) => {
|
||||||
|
@ -399,6 +379,20 @@ const editCoordinate = () => {
|
||||||
|
|
||||||
// 开始爬虫
|
// 开始爬虫
|
||||||
const startCrawl = () => {
|
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 ranges = state.coordinateList[0].Lat + ' ' + state.coordinateList[0].Lng + ',' + state.coordinateList[1].Lat + ' ' + state.coordinateList[1].Lng
|
||||||
var type = null
|
var type = null
|
||||||
if (state.satelliteSelected[0] == 'landsat') {
|
if (state.satelliteSelected[0] == 'landsat') {
|
||||||
|
@ -413,34 +407,58 @@ const startCrawl = () => {
|
||||||
var param = {
|
var param = {
|
||||||
"stime": state.startTime,
|
"stime": state.startTime,
|
||||||
"etime": state.endTime,
|
"etime": state.endTime,
|
||||||
"disaster_id": state.selectID * 1,
|
"disaster_id": state.data.disasterId,
|
||||||
"ranges": ranges,
|
"ranges": ranges,
|
||||||
"id": id
|
"id": id
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(param);
|
|
||||||
submit(
|
submit(
|
||||||
{
|
{
|
||||||
type: type,
|
type: type,
|
||||||
|
startDate: state.startTime,
|
||||||
|
endDate: state.endTime,
|
||||||
manageId: userInfo.userInfos.id,
|
manageId: userInfo.userInfos.id,
|
||||||
status: 0,
|
status: 0,
|
||||||
disasterId: state.selectID,
|
disasterId: state.data.disasterId,
|
||||||
id: (id ? id : null)
|
id: (id ? id : null)
|
||||||
}
|
}
|
||||||
).then(ret => {
|
).then(ret => {
|
||||||
if (ret == 1042) {
|
if (ret == 1042) {
|
||||||
ElMessage.error("error")
|
ElMessage.error("error")
|
||||||
} else {
|
} else {
|
||||||
|
state.satelliteSelected.forEach(data => {
|
||||||
rs(param).then(res => {
|
if (data == 'Sentinel') {
|
||||||
console.log(res);
|
rs(state.startTime, state.endTime, state.data.disasterId, ranges, type = 1, ret.id).then(res => {
|
||||||
// getData();
|
// getData();
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: 'Success, Start crawling.',
|
message: 'Success, Start crawling. sentinel',
|
||||||
type: 'success',
|
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.satelliteSelected = []
|
||||||
state.coordinateList = []
|
state.coordinateList = []
|
||||||
state.selectID = ''
|
state.selectID = ''
|
||||||
|
emit('response')
|
||||||
}
|
}
|
||||||
|
|
||||||
// 监听
|
// 监听
|
||||||
|
@ -464,49 +483,69 @@ watch(
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ immediate: true })
|
{ immediate: true })
|
||||||
</script>
|
const setData = (row) => {
|
||||||
|
state.data = row;
|
||||||
<style scoped lang="scss">
|
state.selectID = row.disasterId
|
||||||
.rsSelect {
|
map.value.mapOperations.wktParseToMap(row.geometry)
|
||||||
border: 1px solid #040728;
|
console.log(row)
|
||||||
height: 52rem;
|
|
||||||
span {
|
|
||||||
display: block;
|
|
||||||
margin-bottom: 3%;
|
|
||||||
font-size: 18px;
|
|
||||||
}
|
|
||||||
.satelliteSelect,
|
|
||||||
.idSelect {
|
|
||||||
width: 90%;
|
|
||||||
margin: 2% 3% 0 3%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.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;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
.lowerBtn {
|
|
||||||
width: 90%;
|
|
||||||
margin: 3% 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
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%;
|
||||||
|
margin: 2% 3% 0 3%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.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;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lowerBtn {
|
||||||
|
width: 90%;
|
||||||
|
margin: 3% 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#map {
|
#map {
|
||||||
height: 52rem;
|
height: 52rem;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<el-tabs v-model="state.activeName">
|
<!-- <el-tabs v-model="state.activeName">
|
||||||
<el-tab-pane label="Search condition"
|
<el-tab-pane label="Search condition"
|
||||||
name="first">
|
name="first">
|
||||||
<search-condition></search-condition>
|
<search-condition></search-condition>
|
||||||
|
@ -10,20 +10,33 @@
|
||||||
name="second">
|
name="second">
|
||||||
<retrieval-condition></retrieval-condition>
|
<retrieval-condition></retrieval-condition>
|
||||||
</el-tab-pane>
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive } from 'vue';
|
import { reactive,ref,nextTick } from 'vue';
|
||||||
import retrievalCondition from './components/retrievalCondition.vue'
|
import retrievalCondition from './components/retrievalCondition.vue'
|
||||||
import searchCondition from './components/searchCondition.vue'
|
import searchCondition from './components/searchCondition.vue'
|
||||||
|
const edit = ref();
|
||||||
|
|
||||||
const state = reactive({
|
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>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
|
@ -277,12 +277,12 @@ const initLineChart = (xData,data1, data2) => {
|
||||||
symbol: 'circle',
|
symbol: 'circle',
|
||||||
smooth: true,
|
smooth: true,
|
||||||
data: data2,
|
data: data2,
|
||||||
lineStyle: { color: '#44c05b' },
|
lineStyle: { color: 'rgba(145,204,117,1)' },
|
||||||
itemStyle: { color: '#44c05b', borderColor: '#44c05b' },
|
itemStyle: { color: 'rgba(145,204,117,1)', borderColor: 'rgba(145,204,117,1)' },
|
||||||
areaStyle: {
|
areaStyle: {
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
{ offset: 0, color: '#44c05b' },
|
{ offset: 0, color: 'rgba(145,204,117,1)' },
|
||||||
{ offset: 1, color: '#44c05b' },
|
{ offset: 1, color: 'rgba(145,204,117,0)' },
|
||||||
]),
|
]),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -328,12 +328,12 @@ const initLineVandDChart = (xData,data1, data2) => {
|
||||||
symbol: 'circle',
|
symbol: 'circle',
|
||||||
smooth: true,
|
smooth: true,
|
||||||
data: data2,
|
data: data2,
|
||||||
lineStyle: { color: '#3d91e7' },
|
lineStyle: { color: 'rgba(84,112,198,1)' },
|
||||||
itemStyle: { color: '#3d91e7', borderColor: '#3d91e7' },
|
itemStyle: { color: 'rgba(84,112,198,1)', borderColor: 'rgba(84,112,198,1)' },
|
||||||
areaStyle: {
|
areaStyle: {
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
{ offset: 0, color: '#3d91e7' },
|
{ offset: 0, color: 'rgba(84,112,198,1)' },
|
||||||
{ offset: 1, color: '#3d91e7' },
|
{ offset: 1, color: 'rgba(84,112,198,0)' },
|
||||||
]),
|
]),
|
||||||
},
|
},
|
||||||
},{
|
},{
|
||||||
|
@ -343,12 +343,12 @@ const initLineVandDChart = (xData,data1, data2) => {
|
||||||
symbol: 'circle',
|
symbol: 'circle',
|
||||||
smooth: true,
|
smooth: true,
|
||||||
data: data1,
|
data: data1,
|
||||||
lineStyle: { color: '#e78d3d' },
|
lineStyle: { color: 'rgba(250,200,88,1)' },
|
||||||
itemStyle: { color: '#e78d3d', borderColor: '#e78d3d' },
|
itemStyle: { color: 'rgba(250,200,88,1)', borderColor: 'rgba(250,200,88,1)' },
|
||||||
areaStyle: {
|
areaStyle: {
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
{ offset: 0, color: '#e78d3d' },
|
{ offset: 0, color: 'rgba(250,200,88,1)' },
|
||||||
{ offset: 1, color: '#e78d3d' },
|
{ offset: 1, color: 'rgba(250,200,88,0)' },
|
||||||
]),
|
]),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -398,8 +398,8 @@ const initChiefChart = (xData,yData) => {
|
||||||
barWidth: 30,
|
barWidth: 30,
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
{ offset: 0, color: '#fe9a8bb3' },
|
{ offset: 0, color: 'rgba(238,102,102,1)' },
|
||||||
{ offset: 1, color: '#fe9a8b03' },
|
{ offset: 1, color: 'rgba(238,102,102,0)' },
|
||||||
]),
|
]),
|
||||||
//柱状图圆角
|
//柱状图圆角
|
||||||
borderRadius: [30, 30, 0, 0],
|
borderRadius: [30, 30, 0, 0],
|
||||||
|
@ -451,8 +451,8 @@ const initAdministratorsChart = (xData,yData) => {
|
||||||
yAxisIndex: 0,
|
yAxisIndex: 0,
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
{ offset: 0, color: 'rgba(108,80,243,0.3)' },
|
{ offset: 0, color: 'rgba(115,192,222,1)' },
|
||||||
{ offset: 1, color: 'rgba(108,80,243,0)' },
|
{ offset: 1, color: 'rgba(115,192,222,0)' },
|
||||||
]),
|
]),
|
||||||
//柱状图圆角
|
//柱状图圆角
|
||||||
borderRadius: [30, 30, 0, 0],
|
borderRadius: [30, 30, 0, 0],
|
||||||
|
|
|
@ -1,45 +1,45 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="system-role-container layout-padding">
|
<div class="system-role-container layout-padding">
|
||||||
<el-config-provider :locale="en">
|
<el-config-provider :locale="en">
|
||||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" style="margin-left: 20px">
|
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" style="margin-left: 20px">
|
||||||
<el-tab-pane label="Unapproved" name="first">
|
<el-tab-pane label="Unapproved" name="first">
|
||||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading" style="width: 100%">
|
<el-table :data="state.tableData.data" v-loading="state.tableData.loading" style="width: 100%">
|
||||||
<el-table-column prop="username" label="User name" show-overflow-tooltip></el-table-column>
|
<el-table-column type="index" label="ID" width="50" />
|
||||||
<el-table-column prop="organization" label="Organization" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="username" label="User name" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip>
|
<el-table-column prop="organization" label="Organization" show-overflow-tooltip></el-table-column>
|
||||||
<!-- 在disasterType中获取dictKey 对应的dictValue -->
|
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<!-- 在disasterType中获取dictKey 对应的dictValue -->
|
||||||
<el-tag type="info">{{ getValue(scope.row.disasterType) }}</el-tag>
|
<template #default="scope">
|
||||||
</template>
|
<el-tag type="info">{{ getValue(scope.row.disasterType) }}</el-tag>
|
||||||
</el-table-column>
|
</template>
|
||||||
<el-table-column prop="disasterKeyword" label="Disaster keyword" show-overflow-tooltip></el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column prop="affectedCountry" label="Affected country" show-overflow-tooltip></el-table-column> -->
|
<el-table-column prop="disasterKeyword" label="Disaster keyword" show-overflow-tooltip></el-table-column>
|
||||||
<!-- <el-table-column prop="Longitude" label="Longitude" show-overflow-tooltip></el-table-column>
|
<!-- <el-table-column prop="affectedCountry" label="Affected country" show-overflow-tooltip></el-table-column> -->
|
||||||
|
<!-- <el-table-column prop="Longitude" label="Longitude" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="Latitude" label="Latitude" show-overflow-tooltip></el-table-column> -->
|
<el-table-column prop="Latitude" label="Latitude" show-overflow-tooltip></el-table-column> -->
|
||||||
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip>
|
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<!-- 格式化去除时分秒 -->
|
<!-- 格式化去除时分秒 -->
|
||||||
{{ dateFormat(scope.row.disasterTime) }}
|
{{ dateFormat(scope.row.disasterTime) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column prop="responseTime" label="Response time" show-overflow-tooltip></el-table-column> -->
|
<!-- <el-table-column prop="responseTime" label="Response time" show-overflow-tooltip></el-table-column> -->
|
||||||
<el-table-column prop="respondStatus" label="Response status" show-overflow-tooltip>
|
<el-table-column prop="respondStatus" label="Response status" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag type="info" v-if="scope.row.respondStatus === 0">Awaiting approval</el-tag>
|
<el-tag type="info" v-if="scope.row.respondStatus === 0">Awaiting approval</el-tag>
|
||||||
<el-tag type="info" v-if="scope.row.respondStatus === 1">Rejected</el-tag>
|
<el-tag type="info" v-if="scope.row.respondStatus === 1">Rejected</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="Operate" label="Operate" show-overflow-tooltip>
|
<el-table-column prop="Operate" label="Operate" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button size="small" text type="primary"
|
<el-button size="small" text type="primary" @click="onOpenEditRole('edit', scope.row)">Approve</el-button>
|
||||||
@click="onOpenEditRole('edit', scope.row)">Approve</el-button>
|
</template>
|
||||||
</template>
|
</el-table-column>
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<!-- <el-table-column prop="describe" label="角色描述" show-overflow-tooltip></el-table-column>
|
<!-- <el-table-column prop="describe" label="角色描述" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="createTime" label="创建时间" show-overflow-tooltip></el-table-column> -->
|
<el-table-column prop="createTime" label="创建时间" show-overflow-tooltip></el-table-column> -->
|
||||||
<!-- <el-table-column prop="status" label="角色状态" show-overflow-tooltip>
|
<!-- <el-table-column prop="status" label="角色状态" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag type="success" v-if="scope.row.status">启用</el-tag>
|
<el-tag type="success" v-if="scope.row.status">启用</el-tag>
|
||||||
<el-tag type="info" v-else>禁用</el-tag>
|
<el-tag type="info" v-else>禁用</el-tag>
|
||||||
|
@ -55,29 +55,29 @@
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
|
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
|
||||||
:pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.current" background
|
:pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.current" background
|
||||||
v-model:page-size="state.tableData.param.size" layout="total, sizes, prev, pager, next, jumper"
|
v-model:page-size="state.tableData.param.size" layout="total, sizes, prev, pager, next, jumper"
|
||||||
:total="state.tableData.total">
|
:total="state.tableData.total">
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="Approved | Rejected" name="second">
|
<el-tab-pane label="Approved | Rejected" name="second">
|
||||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading" style="width: 100%">
|
<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="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="Administrator" label="Administrator" show-overflow-tooltip></el-table-column> -->
|
||||||
<el-table-column prop="organization" label="Organization" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="organization" label="Organization" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="email" label="Email" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="email" label="Email" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip>
|
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip>
|
||||||
<!-- 在disasterType中获取dictKey 对应的dictValue -->
|
<!-- 在disasterType中获取dictKey 对应的dictValue -->
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag type="info">{{ getValue(scope.row.disasterType) }}</el-tag>
|
<el-tag type="info">{{ getValue(scope.row.disasterType) }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="disasterKeyword" label="Disaster keyword" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="disasterKeyword" label="Disaster keyword" show-overflow-tooltip></el-table-column>
|
||||||
<!-- <el-table-column prop="Affected country" label="Affected country" show-overflow-tooltip></el-table-column> -->
|
<!-- <el-table-column prop="Affected country" label="Affected country" show-overflow-tooltip></el-table-column> -->
|
||||||
<!-- <el-table-column prop="Longitude" label="Longitude" show-overflow-tooltip></el-table-column>
|
<!-- <el-table-column prop="Longitude" label="Longitude" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="Latitude" label="Latitude" show-overflow-tooltip></el-table-column> -->
|
<el-table-column prop="Latitude" label="Latitude" show-overflow-tooltip></el-table-column> -->
|
||||||
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip>
|
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
@ -86,78 +86,71 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="chiefName" label="Answer" show-overflow-tooltip></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 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>
|
||||||
|
</template>
|
||||||
|
|
||||||
<!-- <el-table-column prop="responseTime" label="Response time" show-overflow-tooltip></el-table-column> -->
|
</el-table-column>
|
||||||
<!-- <el-table-column prop="Operate" label="Operate" show-overflow-tooltip></el-table-column> -->
|
<el-table-column prop="Operate" label="Operate" show-overflow-tooltip>
|
||||||
<el-table-column width="170" prop="respondStatus" label="Response status" show-overflow-tooltip>
|
<template #default="scope">
|
||||||
|
<el-button size="small" text type="primary" @click="onAllocation(scope.row)">Allocate</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
|
||||||
|
:pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.current" background
|
||||||
|
v-model:page-size="state.tableData.param.size" layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
:total="state.tableData.total">
|
||||||
|
</el-pagination>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
<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>
|
||||||
|
<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">
|
||||||
|
<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>
|
||||||
|
<span style="line-height: 35px;">Longitude:</span>
|
||||||
|
<el-input placeholder="wait……" style="height:35px;" v-model="state.dislon" readonly="readonly"></el-input>
|
||||||
|
</el-container>
|
||||||
|
<MapPage style="height:350px ; width:100% ;margin-bottom: 10px;" ref="mapRef"></MapPage>
|
||||||
|
<el-form-item label="Disaster Time">
|
||||||
|
<el-date-picker v-model="state.edit.disasterTime" type="date" value-format="YYYY-MM-DD"
|
||||||
|
placeholder="Select date and time" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
<template #default="scope">
|
<span class="dialog-footer">
|
||||||
<el-tag type="info" v-if="scope.row.respondStatus === 2">Approved</el-tag>
|
<el-button @click="dialogVisible = false">Cancel</el-button>
|
||||||
<el-tag type="info" v-if="scope.row.respondStatus === 1">Rejected</el-tag>
|
<el-button type="danger" @click="reviews(1)">
|
||||||
<el-tag type="success" v-if="scope.row.respondStatus === 3">Complete response</el-tag>
|
Reject
|
||||||
</template>
|
</el-button>
|
||||||
</el-table-column>
|
<el-button type="primary" @click="reviews(2)">
|
||||||
|
Approve
|
||||||
<el-table-column width="200" prop="Operate" label="Operate" show-overflow-tooltip>
|
</el-button>
|
||||||
<template #default="scope">
|
</span>
|
||||||
<el-button size="small" text type="primary" @click="onAllocation(scope.row)">Allocation</el-button>
|
</template>
|
||||||
<el-button size="small" text type="danger" @click="responseEnded(scope.row)">Response ended</el-button>
|
</el-dialog>
|
||||||
</template>
|
<selectUser ref ="select" @callback="getTableData"></selectUser>
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
|
|
||||||
:pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.current" background
|
|
||||||
v-model:page-size="state.tableData.param.size" layout="total, sizes, prev, pager, next, jumper"
|
|
||||||
:total="state.tableData.total">
|
|
||||||
</el-pagination>
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
</div>
|
|
||||||
<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>
|
|
||||||
<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">
|
|
||||||
<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>
|
|
||||||
<span style="line-height: 35px;">Longitude:</span>
|
|
||||||
<el-input placeholder="wait……" style="height:35px;" v-model="state.dislon" readonly="readonly"></el-input>
|
|
||||||
</el-container>
|
|
||||||
<MapPage style="height:350px ; width:100% ;margin-bottom: 10px;" ref="mapRef"></MapPage>
|
|
||||||
<el-form-item label="Disaster Time">
|
|
||||||
<el-date-picker v-model="state.edit.disasterTime" type="date" value-format="YYYY-MM-DD"
|
|
||||||
placeholder="Select date and time" />
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<template #footer>
|
|
||||||
<span class="dialog-footer">
|
|
||||||
<el-button @click="dialogVisible = false">Cancel</el-button>
|
|
||||||
<el-button type="danger" @click="reviews(1)">
|
|
||||||
Reject
|
|
||||||
</el-button>
|
|
||||||
<el-button type="primary" @click="reviews(2)">
|
|
||||||
Approve
|
|
||||||
</el-button>
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
<selectUser ref="select" @callback="getTableData"></selectUser>
|
|
||||||
</el-config-provider>
|
</el-config-provider>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="userResponse">
|
<script setup name="userResponse">
|
||||||
import en from 'element-plus/dist/locale/en.mjs'
|
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 { 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 { getDictionary } from '/@/api/system/dictbiz';
|
||||||
import { useVariableStore } from '/@/stores/index.ts'
|
import { useVariableStore } from '/@/stores/index.ts'
|
||||||
//引入地图
|
//引入地图
|
||||||
|
@ -165,8 +158,8 @@ import Map from '/@/components/Map.vue';
|
||||||
import { useDateFormat } from '@vueuse/shared';
|
import { useDateFormat } from '@vueuse/shared';
|
||||||
import selectUser from './component/selectUser.vue';
|
import selectUser from './component/selectUser.vue';
|
||||||
import L from "leaflet";
|
import L from "leaflet";
|
||||||
import '@geoman-io/leaflet-geoman-free';
|
import '@geoman-io/leaflet-geoman-free';
|
||||||
import '@geoman-io/leaflet-geoman-free/dist/leaflet-geoman.css';
|
import '@geoman-io/leaflet-geoman-free/dist/leaflet-geoman.css';
|
||||||
import "leaflet/dist/leaflet.css";
|
import "leaflet/dist/leaflet.css";
|
||||||
import 'leaflet-draw/dist/leaflet.draw'
|
import 'leaflet-draw/dist/leaflet.draw'
|
||||||
import 'leaflet-draw/dist/leaflet.draw.css'
|
import 'leaflet-draw/dist/leaflet.draw.css'
|
||||||
|
@ -181,30 +174,12 @@ const handleClick = (tab, event) => {
|
||||||
getTableData();
|
getTableData();
|
||||||
};
|
};
|
||||||
const MapPage = defineAsyncComponent({
|
const MapPage = defineAsyncComponent({
|
||||||
loader: () => import('/@/components/Map.vue'),
|
loader:() =>import('/@/components/Map.vue'),
|
||||||
delay: 200,
|
delay: 200,
|
||||||
})
|
})
|
||||||
const onAllocation = (row) => {
|
const onAllocation = (row) => {
|
||||||
select.value.openDialog(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) => {
|
const dateFormat = (date) => {
|
||||||
return useDateFormat(date, 'YYYY-MM-DD').value;
|
return useDateFormat(date, 'YYYY-MM-DD').value;
|
||||||
}
|
}
|
||||||
|
@ -226,10 +201,10 @@ const state = reactive({
|
||||||
disasterTypeList: [],
|
disasterTypeList: [],
|
||||||
selectName: 'first',
|
selectName: 'first',
|
||||||
edit: {},
|
edit: {},
|
||||||
radio: null,
|
radio:null,
|
||||||
dislat: '',
|
dislat:'',
|
||||||
dislon: '',
|
dislon:'',
|
||||||
wktPoint_Poly: undefined
|
wktPoint_Poly:undefined
|
||||||
});
|
});
|
||||||
// 初始化表格数据
|
// 初始化表格数据
|
||||||
const getTableData = () => {
|
const getTableData = () => {
|
||||||
|
@ -238,7 +213,7 @@ const getTableData = () => {
|
||||||
if (state.selectName === 'first') {
|
if (state.selectName === 'first') {
|
||||||
state.tableData.param.respondStatus = 0;
|
state.tableData.param.respondStatus = 0;
|
||||||
} else {
|
} else {
|
||||||
state.tableData.param.respondStatus = 3;
|
state.tableData.param.respondStatus = 2;
|
||||||
}
|
}
|
||||||
getList(state.tableData.param).then((res) => {
|
getList(state.tableData.param).then((res) => {
|
||||||
state.tableData.data = res.records;
|
state.tableData.data = res.records;
|
||||||
|
@ -251,7 +226,7 @@ const onHandleSizeChange = (val) => {
|
||||||
getTableData();
|
getTableData();
|
||||||
};
|
};
|
||||||
const onOpenEditRole = (type, row) => {
|
const onOpenEditRole = (type, row) => {
|
||||||
|
|
||||||
//深拷贝
|
//深拷贝
|
||||||
state.edit = JSON.parse(JSON.stringify(row));
|
state.edit = JSON.parse(JSON.stringify(row));
|
||||||
state.dialogVisible = true;
|
state.dialogVisible = true;
|
||||||
|
@ -273,23 +248,22 @@ const onOpenEditRole = (type, row) => {
|
||||||
// })
|
// })
|
||||||
mapEvents('1')
|
mapEvents('1')
|
||||||
},100);
|
},100);
|
||||||
|
|
||||||
};
|
};
|
||||||
const mapEvents = (ev) => {
|
const mapEvents = (ev)=>{
|
||||||
if (ev == '1') {
|
if(ev == '1'){
|
||||||
// mapRef.value.mapOperations.clearPolygon()
|
// mapRef.value.mapOperations.clearPolygon()
|
||||||
mapRef.value.mapOperations.on("click", mapClick)
|
mapRef.value.mapOperations.on("click", mapClick)
|
||||||
// mapRef.value.mapOperations.on("mousemove", changelatlon)
|
// mapRef.value.mapOperations.on("mousemove", changelatlon)
|
||||||
mapRef.value.mapOperations.clearPolygon()
|
mapRef.value.mapOperations.clearPolygon()
|
||||||
|
|
||||||
} else if (ev == '2') {
|
}else if(ev == '2'){
|
||||||
mapRef.value.mapOperations.off("click", mapClick);
|
mapRef.value.mapOperations.off("click",mapClick);
|
||||||
mapRef.value.mapOperations.drawPolygon()
|
mapRef.value.mapOperations.drawPolygon()
|
||||||
// mapRef.value.mapOperations.drawPolygon()
|
// mapRef.value.mapOperations.drawPolygon()
|
||||||
// mapRef.value.mapOperations.drawCreated()
|
// mapRef.value.mapOperations.drawCreated()
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else{
|
||||||
mapRef.value.mapOperations.Edit()
|
mapRef.value.mapOperations.Edit()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -297,11 +271,10 @@ const ClearSubmit = () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
mapRef.value.mapOperations.removeAll()
|
mapRef.value.mapOperations.removeAll()
|
||||||
variableStore.wktdata = null
|
variableStore.wktdata = null
|
||||||
variableStore.layerGroupPoint = null;
|
variableStore.layerGroupPoint=null;
|
||||||
layerGroupPoly = null;
|
layerGroupPoly=null;
|
||||||
}, 100)
|
}, 100)
|
||||||
}
|
}
|
||||||
|
|
||||||
const mapClick=(res)=>{
|
const mapClick=(res)=>{
|
||||||
mapRef.value.mapOperations.removeLayer( state.wktPoint_Poly )
|
mapRef.value.mapOperations.removeLayer( state.wktPoint_Poly )
|
||||||
changelatlon(res.latlng.lat.toFixed(3),res.latlng.lng.toFixed(3));
|
changelatlon(res.latlng.lat.toFixed(3),res.latlng.lng.toFixed(3));
|
||||||
|
@ -320,7 +293,7 @@ const reviews = (index) => {
|
||||||
if (index === 1) {
|
if (index === 1) {
|
||||||
state.edit.respondStatus = 1;
|
state.edit.respondStatus = 1;
|
||||||
} else {
|
} else {
|
||||||
state.edit.respondStatus = 3;
|
state.edit.respondStatus = 2;
|
||||||
}
|
}
|
||||||
state.edit.geometry = variableStore.layerGroupPoint === null ? variableStore.layerGroupPoly : variableStore.layerGroupPoint;
|
state.edit.geometry = variableStore.layerGroupPoint === null ? variableStore.layerGroupPoly : variableStore.layerGroupPoint;
|
||||||
//时间格式化
|
//时间格式化
|
||||||
|
@ -353,32 +326,32 @@ else {
|
||||||
state.dislat = String(state.dislat) + "°N"
|
state.dislat = String(state.dislat) + "°N"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (state.dislon <= 180 && state.dislon >= 0) {
|
||||||
|
state.dislon = String(Math.abs(state.dislon)) + "°E"
|
||||||
|
}
|
||||||
|
else if (state.dislon > 180 && state.dislon <= 360) {
|
||||||
|
state.dislon = String((360 - state.dislon).toFixed(3)) + "°W"
|
||||||
|
}
|
||||||
|
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) {
|
if (state.dislon <= 180 && state.dislon >= 0) {
|
||||||
state.dislon = String(Math.abs(state.dislon)) + "°E"
|
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"
|
state.dislon = String((360 - state.dislon).toFixed(3)) + "°W"
|
||||||
}
|
}
|
||||||
else if (state.dislon < 0) {
|
}
|
||||||
let n = Math.floor(state.dislon / 360)
|
else if (state.dislon > 360) {
|
||||||
state.dislon = (state.dislon - n * 360).toFixed(3)
|
let n = Math.floor(state.dislon / 360)
|
||||||
if (state.dislon <= 180 && state.dislon >= 0) {
|
state.dislon = (state.dislon - n * 360).toFixed(3)
|
||||||
state.dislon = String(Math.abs(state.dislon)) + "°E"
|
if (state.dislon <= 180 && state.dislon >= 0) {
|
||||||
}
|
state.dislon = String(Math.abs(state.dislon)) + "°E"
|
||||||
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 > 180 && state.dislon <= 360) {
|
||||||
let n = Math.floor(state.dislon / 360)
|
state.dislon = String((360 - state.dislon).toFixed(3)) + "°W"
|
||||||
state.dislon = (state.dislon - n * 360).toFixed(3)
|
|
||||||
if (state.dislon <= 180 && state.dislon >= 0) {
|
|
||||||
state.dislon = String(Math.abs(state.dislon)) + "°E"
|
|
||||||
}
|
|
||||||
else if (state.dislon > 180 && state.dislon <= 360) {
|
|
||||||
state.dislon = String((360 - state.dislon).toFixed(3)) + "°W"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// 页面加载时
|
// 页面加载时
|
||||||
|
@ -387,14 +360,14 @@ onMounted(() => {
|
||||||
getDictionary({ code: 'disaster' }).then((res) => {
|
getDictionary({ code: 'disaster' }).then((res) => {
|
||||||
state.disasterTypeList = res;
|
state.disasterTypeList = res;
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
const getValue = (key) => {
|
const getValue = (key) => {
|
||||||
//返回state.disasterTypeLis 对应的value
|
//返回state.disasterTypeLis 对应的value
|
||||||
return state.disasterTypeList.find((item) => item.dictKey === key)?.dictValue;
|
return state.disasterTypeList.find((item) => item.dictKey === key)?.dictValue;
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style>
|
||||||
.demo-tabs>.el-tabs__content {
|
.demo-tabs>.el-tabs__content {
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
color: #6b778c;
|
color: #6b778c;
|
||||||
|
@ -411,11 +384,4 @@ const getValue = (key) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mt15 {
|
|
||||||
display: flex;
|
|
||||||
justify-content: end;
|
|
||||||
float: right;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue