Merge branch 'zqq'

This commit is contained in:
qqGroup0 2023-04-23 16:45:12 +08:00
commit ce15e1a8c3
8 changed files with 1770 additions and 349 deletions

1205
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -13,6 +13,7 @@
"@element-plus/icons-vue": "^2.1.0", "@element-plus/icons-vue": "^2.1.0",
"@geoman-io/leaflet-geoman-free": "^2.14.2", "@geoman-io/leaflet-geoman-free": "^2.14.2",
"@mapbox/leaflet-omnivore": "^0.3.4", "@mapbox/leaflet-omnivore": "^0.3.4",
"@turf/turf": "^6.5.0",
"@vueup/vue-quill": "^1.0.0-alpha.40", "@vueup/vue-quill": "^1.0.0-alpha.40",
"axios": "^1.3.4", "axios": "^1.3.4",
"echarts": "^5.4.2", "echarts": "^5.4.2",

View File

@ -1,68 +1,68 @@
import request, {crawlModule ,moduleName } from '/@/utils/request'; import request, { crawlModule, moduleName } from '/@/utils/request';
export const geoserve = (vordm_id, link, disaster_id, name) => {
return request({
url: '/api/' + crawlModule + '/geoserve/pushing',
method: 'post',
data: {
vordm_id,
link,
disaster_id,
name,
},
});
};
export const news = (disaster_id, keywords, page, isBaidu, id) => {
return request({
url: '/api/' + crawlModule + '/news/' + (isBaidu ? 'baidu' : 'bing'),
method: 'post',
data: {
disaster_id,
keywords,
page,
id,
},
});
};
export const rs = (stime, etime, disaster_id, ranges, type = 1) => {
let method = 'sentinel';
if (type == 1) {
method = 'sentinel';
} else if (type == 2) {
method = 'landsat';
} else {
method = 'searchone';
}
return request({
export const geoserve = (vordm_id , link , disaster_id, name) =>{ url: '/api/' + crawlModule + '/rs/' + method,
return request({ method: 'post',
url: '/api/' + crawlModule + '/geoserve/pushing', data: {
method: 'post', stime,
data: { etime,
vordm_id, disaster_id,
link, ranges,
disaster_id, },
name });
} };
});
}
export const news = (disaster_id, keywords, page,isBaidu,id) =>{
return request({
url: '/api/' + crawlModule + '/news/'+(isBaidu?"baidu":"bing"),
method: 'post',
data: {
disaster_id,
keywords,
page,
id
}
});
}
export const rs = (stime, etime, disaster_id,ranges ,type =1) =>{
let method = 'sentinel';
if(type == 1){
method = 'sentinel';
}else if(type == 2){
method = 'landsat';
}else {
method = 'searchone';
}
return request({
url: '/api/' + crawlModule + '/news/'+method,
method: 'post',
data: {
stime, etime, disaster_id,ranges
}
});
}
export const submit = (row) => { export const submit = (row) => {
return request({ return request({
url: '/api/'+moduleName+'/ui/crawlInfo/submit', url: '/api/' + moduleName + '/ui/crawlInfo/submit',
method: 'post', method: 'post',
data: row data: row,
}) });
} };
export const getList = (current, size, param) => { export const getList = (current, size, param) => {
let params = { let params = {
current, current,
size, size,
}; };
if(param){ if (param) {
params = Object.assign(params, param); params = Object.assign(params, param);
} }
return request({ return request({
url: '/api/'+moduleName+'/ui/crawlInfo/list', url: '/api/' + moduleName + '/ui/crawlInfo/list',
method: 'get', method: 'get',
params: params params: params,
}); });
};
}

View File

@ -2,8 +2,8 @@
<div ref="map" <div ref="map"
class="container"></div> class="container"></div>
</template> </template>
<script setup> <script setup>
import { ref, onMounted } from 'vue' import { ref, onMounted } from 'vue'
import WKT from 'terraformer-wkt-parser' import WKT from 'terraformer-wkt-parser'
@ -11,8 +11,8 @@ import L from 'leaflet'
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'
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-ImageOverlay-Rotated' import 'Leaflet-ImageOverlay-Rotated'
import { useVariableStore } from '/@/stores/index.ts' import { useVariableStore } from '/@/stores/index.ts'
import * as omnivore from '@mapbox/leaflet-omnivore' import * as omnivore from '@mapbox/leaflet-omnivore'
@ -22,6 +22,7 @@ let homeMap = null
let text = null let text = null
let featureLayerG_area = null let featureLayerG_area = null
let featureLayerG_point = null let featureLayerG_point = null
let layerRectangle = null
onMounted(() => { onMounted(() => {
homeMap = L.map(map.value, { homeMap = L.map(map.value, {
@ -143,12 +144,12 @@ const mapOperations = {
wktParseToMap: (res) => { wktParseToMap: (res) => {
return omnivore.wkt.parse(res).addTo(featureLayerG_point) return omnivore.wkt.parse(res).addTo(featureLayerG_point)
// if(omnivore.wkt.parse(res) instanceof L.Marker){ // if(omnivore.wkt.parse(res) instanceof L.Marker){
// } // }
// else{ // else{
// return omnivore.wkt.parse(res).addTo(featureLayerG_area ) // return omnivore.wkt.parse(res).addTo(featureLayerG_area )
// } // }
}, },
/** /**
* Object param 参数集合 * Object param 参数集合
@ -419,10 +420,29 @@ const mapOperations = {
text.enable() text.enable()
}) })
}, },
drawRectangle: () => {
if (layerRectangle != null) {
homeMap.removeLayer(layerRectangle)
layerRectangle = null
}
homeMap.pm.enableDraw('Rectangle', {
snappable: true,
snapDistance: 20,
});
homeMap.on('pm:create', (e) => {
L.PM.reInitLayer(e.layer);
layerRectangle = e.layer
});
},
deleteRectangle: () => {
homeMap.removeLayer(layerRectangle)
}
} }
//omnivore.wkt.parse('POINT(-80 0)').addTo(homeMap); //omnivore.wkt.parse('POINT(-80 0)').addTo(homeMap);
defineExpose({ defineExpose({
mapOperations, mapOperations,
}) })
</script> </script>

View File

@ -3,9 +3,9 @@ import { ElMessage, ElMessageBox } from 'element-plus';
import qs from 'qs'; import qs from 'qs';
import { Session } from '/@/utils/storage'; 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"; export const crawlModule = 'vordm-crawl';
// 配置新建一个 axios 实例 // 配置新建一个 axios 实例
const service = axios.create({ const service = axios.create({
//baseURL: import.meta.env.VITE_API_URL, //baseURL: import.meta.env.VITE_API_URL,
@ -53,7 +53,6 @@ service.interceptors.response.use(
return Promise.reject(service.interceptors.response); return Promise.reject(service.interceptors.response);
} else { } else {
return res.data || res; return res.data || res;
} }
}, },
(error) => { (error) => {

View File

@ -7,7 +7,7 @@
<el-card class="box-card"> <el-card class="box-card">
<span>Select time range</span> <span>Select time range</span>
<el-row class="block"> <el-row class="block">
<el-col :span="3"> <el-col :span="5">
<span class="demonstration">Start time</span> <span class="demonstration">Start time</span>
</el-col> </el-col>
<el-col :span="19"> <el-col :span="19">
@ -15,11 +15,12 @@
v-model="state.startTime" v-model="state.startTime"
type="datetime" type="datetime"
placeholder="Select start time" placeholder="Select start time"
:shortcuts="shortcuts" /> 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">
<el-col :span="3"> <el-col :span="5">
<span class="demonstration">End time</span> <span class="demonstration">End time</span>
</el-col> </el-col>
<el-col :span="19"> <el-col :span="19">
@ -27,7 +28,8 @@
v-model="state.endTime" v-model="state.endTime"
type="datetime" type="datetime"
placeholder="Select end time" placeholder="Select end time"
:shortcuts="shortcuts" /> value-format="YYYY-MM-DD HH:mm:ss"
:shortcuts="state.shortcuts" />
</el-col> </el-col>
</el-row> </el-row>
</el-card> </el-card>
@ -43,8 +45,8 @@
<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:&emsp;' + parseFloat(coordinate.Lat).toFixed(4) + ',&emsp;&emsp;Lng:&emsp;' + parseFloat(coordinate.Lng).toFixed(4) 'Lat:&emsp;' + parseFloat(coordinate.Lat).toFixed(4) + ',&emsp;&emsp;Lng:&emsp;' + parseFloat(coordinate.Lng).toFixed(4)
}}</span> }}</span>
</el-col> </el-col>
<el-col :span="2"> <el-col :span="2">
<el-button class="el-icon" <el-button class="el-icon"
@ -82,7 +84,7 @@
<span>Select satellite type</span> <span>Select satellite type</span>
<el-tree-select class="satelliteSelect" <el-tree-select class="satelliteSelect"
v-model="state.satelliteSelected" v-model="state.satelliteSelected"
:data="sensor" :data="state.sensor"
multiple multiple
collapse-tags collapse-tags
collapse-tags-tooltip collapse-tags-tooltip
@ -98,7 +100,7 @@
v-model="state.selectID" v-model="state.selectID"
clearable clearable
placeholder="Select VoRDM ID"> placeholder="Select VoRDM ID">
<el-option v-for="item in idOptions" <el-option v-for="item in state.idOptions"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" /> :value="item.value" />
@ -118,160 +120,24 @@
</div> </div>
</el-col> </el-col>
<el-col :span="16"> <el-col :span="16">
<Map id="map"></Map> <Map id="map"
ref="map">
</Map>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
</template> </template>
<script setup> <script setup>
import Map from "/@/components/Map.vue"; import Map from "/@/components/Map.vue";
import { ref, reactive } from 'vue'; import { ref, reactive, watch } from 'vue';
import { rs, submit } from '/@/api/crawl/index';
// import { useUserInfo } from '/@/stores/userInfo';
const sensor = ref([ const userInfo = useUserInfo();
{
value: 'landsat',
label: 'landsat',
// children: [{
// value: 1 - 1,
// label: 'LANDSAT_8_C1'
// },
// {
// value: 1 - 2,
// label: 'LANDSAT_ETM_C1'
// },
// {
// value: 1 - 3,
// label: 'LANDSAT_TM_C1'
// }
// ]
},
{
value: 'Sentinel',
label: 'Sentinel',
// children: [{
// value: 2 - 1,
// label: 'Sentinel - 2',
// children: [{
// value: 2 - 1 - 1,
// label: 'S2MSI2A'
// }]
// },
// {
// value: 2 - 2,
// label: 'Sentinel - 1',
// children: [{
// value: 2 - 2 - 1,
// label: 'SLC'
// }]
// }
// ]
},
{
value: '国产系列卫星',
label: '国产系列卫星',
children: [
{
value: 'GF - 1',
label: 'GF - 1',
},
{
value: 'GF - 2',
label: 'GF - 2',
},
{
value: 'GF - 3',
label: 'GF - 3',
},
{
value: 'GF - 4',
label: 'GF - 4',
},
{
value: 'GF - 6',
label: 'GF - 6',
},
{
value: 'ZY - 3',
label: 'ZY - 3',
},
{
value: 'ZY - 302',
label: 'ZY - 302',
},
{
value: 'ZY - 02C',
label: 'ZY - 02C',
},
],
},
{
value: '欧比特珠海一号系列卫星',
label: '欧比特珠海一号系列卫星',
children: [
{
value: 'OVS - 2A',
label: 'OVS - 2A',
},
{
value: 'OVS - 3A',
label: 'OVS - 3A',
},
{
value: 'OVS - 1A',
label: 'OVS - 1A',
},
{
value: 'OVS - 1B',
label: 'OVS - 1B',
},
{
value: 'OHS - 2A',
label: 'OHS - 2A',
},
{
value: 'OHS - 2B',
label: 'OHS - 2B',
},
{
value: 'OHS - 2C',
label: 'OHS - 2C',
},
{
value: 'OHS - 2D',
label: 'OHS - 2D',
},
],
}
])
// VoRDM ID
const idOptions = [
{
value: '2023001001',
label: '2023001001',
},
{
value: '2023001002',
label: '2023001002',
},
{
value: '2023001003',
label: '2023001003',
},
{
value: '2023001004',
label: '2023001004',
},
{
value: '2023001005',
label: '2023001005',
},
]
// //
const map = ref()
const state = reactive({ const state = reactive({
startTime: '', startTime: '',
endTime: '', endTime: '',
@ -279,68 +145,304 @@ const state = reactive({
satelliteSelected: [], satelliteSelected: [],
coordinateList: [], coordinateList: [],
selectID: '', selectID: '',
sensor: [
{
value: 'landsat',
label: 'landsat',
// children: [{
// value: 1 - 1,
// label: 'LANDSAT_8_C1'
// },
// {
// value: 1 - 2,
// label: 'LANDSAT_ETM_C1'
// },
// {
// value: 1 - 3,
// label: 'LANDSAT_TM_C1'
// }
// ]
},
{
value: 'Sentinel',
label: 'Sentinel',
// children: [{
// value: 2 - 1,
// label: 'Sentinel - 2',
// children: [{
// value: 2 - 1 - 1,
// label: 'S2MSI2A'
// }]
// },
// {
// value: 2 - 2,
// label: 'Sentinel - 1',
// children: [{
// value: 2 - 2 - 1,
// label: 'SLC'
// }]
// }
// ]
},
{
value: '国产系列卫星',
label: '国产系列卫星',
children: [
{
value: 'GF - 1',
label: 'GF - 1',
},
{
value: 'GF - 2',
label: 'GF - 2',
},
{
value: 'GF - 3',
label: 'GF - 3',
},
{
value: 'GF - 4',
label: 'GF - 4',
},
{
value: 'GF - 6',
label: 'GF - 6',
},
{
value: 'ZY - 3',
label: 'ZY - 3',
},
{
value: 'ZY - 302',
label: 'ZY - 302',
},
{
value: 'ZY - 02C',
label: 'ZY - 02C',
},
],
},
{
value: '欧比特珠海一号系列卫星',
label: '欧比特珠海一号系列卫星',
children: [
{
value: 'OVS - 2A',
label: 'OVS - 2A',
},
{
value: 'OVS - 3A',
label: 'OVS - 3A',
},
{
value: 'OVS - 1A',
label: 'OVS - 1A',
},
{
value: 'OVS - 1B',
label: 'OVS - 1B',
},
{
value: 'OHS - 2A',
label: 'OHS - 2A',
},
{
value: 'OHS - 2B',
label: 'OHS - 2B',
},
{
value: 'OHS - 2C',
label: 'OHS - 2C',
},
{
value: 'OHS - 2D',
label: 'OHS - 2D',
},
],
}
],
shortcuts: [
{
text: '1 month ago',
value: () => {
const date = new Date()
date.setTime(date.getTime() - 3600 * 1000 * 24 * 30)
return date
},
},
{
text: '3 months ago',
value: () => {
const date = new Date()
date.setTime(date.getTime() - 3600 * 1000 * 24 * 90)
return date
},
},
{
text: '6 months ago',
value: () => {
const date = new Date()
date.setTime(date.getTime() - 3600 * 1000 * 24 * 180)
return date
},
},
],
idOptions: [{
value: '1',
label: '1',
},
{
value: '2',
label: '2',
},
{
value: '3',
label: '3',
},
{
value: '4',
label: '4',
},
{
value: '5',
label: '5',
}],
layerInfo: null,
lat: '',
lon: '',
disLat: '',
disLon: '',
}) })
const shortcuts = [ const onMapClick = (e) => {
{ state.lat = e.latlng.lat.toFixed(3);
text: '1 month ago', state.lon = e.latlng.lng.toFixed(3);
value: () => { state.coordinateList.push({
const date = new Date() Lat: state.lat,
date.setTime(date.getTime() - 3600 * 1000 * 24 * 30) Lng: state.lon
return date })
}, // changeLatLon(e)
}, }
{
text: '3 months ago', const changeLatLon = (e) => {
value: () => { state.disLat = e.latlng.lat.toFixed(3);
const date = new Date() state.disLon = e.latlng.lng.toFixed(3);
date.setTime(date.getTime() - 3600 * 1000 * 24 * 90) // state.lon = state.lon % 360;
return date // if (state.lon < 0) {
}, // state.lon = state.lon + 360;
}, // }
{ // state.lon = state.lon.toFixed(3);
text: '6 months ago', if (state.disLat < 0) {
value: () => { state.disLat = String(Math.abs(state.disLat)) + "°S"
const date = new Date() }
date.setTime(date.getTime() - 3600 * 1000 * 24 * 180) else {
return date 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) {
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) {
let n = Math.floor(state.disLon / 360)
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"
}
}
}
// //
const addCoordinate = () => { const addCoordinate = () => {
state.addCoord = !state.addCoord; state.addCoord = !state.addCoord;
state.coordinateList = [ if (state.addCoord && state.coordinateList.length <= 2) {
{ map.value.mapOperations.drawRectangle()
Lat: '43.538' map.value.mapOperations.on("click", onMapClick)
, document.getElementsByClassName('coordinateBtn')[0].innerText = 'Stop';
Lng: '111.530' }
}, else {
{ map.value.mapOperations.off("click", onMapClick)
Lat: '36.195' document.getElementsByClassName('coordinateBtn')[0].innerText = 'Add coordinates';
, }
Lng: '120.761'
}
]
} }
// //
const clearCoordinate = () => { const clearCoordinate = () => {
state.coordinateList = []; state.coordinateList = [];
state.startTime = ''; state.startTime = '';
state.endTime = ''; state.endTime = '';
state.addCoord = false
map.value.mapOperations.deleteRectangle()
map.value.mapOperations.off("click", onMapClick)
document.getElementsByClassName('coordinateBtn')[0].innerText = 'Add coordinates';
} }
// //
const editCoordinate = () => { const editCoordinate = () => {
} }
// //
const startCrawl = () => { const startCrawl = () => {
console.log("start time:", state.startTime) var ranges = state.coordinateList[0].Lat + ' ' + state.coordinateList[0].Lng + ',' + state.coordinateList[1].Lat + ' ' + state.coordinateList[1].Lng
console.log("end time:", state.endTime) var type = null
console.log("addCoord:", state.addCoord) if (state.satelliteSelected[0] == 'landsat') {
console.log("satelliteSelected:", state.satelliteSelected) type = '5'
} else if (state.satelliteSelected[0] == 'Sentinel') {
type = '6'
} else if (state.satelliteSelected[0] == '') {
type = '7'
}
var id = 2
var param = {
"stime": state.startTime,
"etime": state.endTime,
"disaster_id": state.selectID * 1,
"ranges": ranges,
"id": id
}
console.log(param);
submit(
{
type: type,
manageId: userInfo.userInfos.id,
status: 0,
disasterId: state.selectID,
id: (id ? id : null)
}
).then(ret => {
if (ret == 1042) {
ElMessage.error("error")
} else {
rs(param).then(res => {
console.log(res);
// getData();
ElMessage({
message: 'Success, Start crawling.',
type: 'success',
})
})
}
})
} }
// //
@ -352,9 +454,19 @@ const ClearCondition = () => {
state.coordinateList = [] state.coordinateList = []
state.selectID = '' state.selectID = ''
} }
</script>
<style scoped lang="scss"> //
watch(
() => state.coordinateList.length,
(newValue, oldValue) => {
if (newValue > 1) {
map.value.mapOperations.off("click", onMapClick)
}
},
{ immediate: true })
</script>
<style scoped lang="scss">
.rsSelect { .rsSelect {
border: 1px solid #040728; border: 1px solid #040728;
height: 52rem; height: 52rem;

View File

@ -1,7 +1,6 @@
<template> <template>
<div class="container"> <div class="container">
<el-tabs v-model="state.activeName" <el-tabs v-model="state.activeName">
@tab-click="handleClick">
<el-tab-pane label="Search condition" <el-tab-pane label="Search condition"
name="first"> name="first">
<search-condition></search-condition> <search-condition></search-condition>

View File

@ -2,39 +2,65 @@
<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"
<el-tab-pane label="unchecked" name="first"> class="demo-tabs"
<el-table :data="state.tableData.data" v-loading="state.tableData.loading" style="width: 100%"> @tab-click="handleClick"
<el-table-column type="index" label="ID" width="50" /> style="margin-left: 20px">
<el-table-column prop="username" label="User name" show-overflow-tooltip></el-table-column> <el-tab-pane label="unchecked"
<el-table-column prop="organization" label="Organization" show-overflow-tooltip></el-table-column> name="first">
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip> <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>
<!-- 在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="affectedCountry" label="Affected country" 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="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">Not reviewed</el-tag> <el-tag type="info"
<el-tag type="info" v-if="scope.row.respondStatus === 1">Failed</el-tag> v-if="scope.row.respondStatus === 0">Not reviewed</el-tag>
<el-tag type="info"
v-if="scope.row.respondStatus === 1">Failed</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"
@click="onOpenEditRole('edit', scope.row)">Review</el-button> text
type="primary"
@click="onOpenEditRole('edit', scope.row)">Review</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -57,30 +83,53 @@
</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"
:pager-count="3" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.current" background @current-change="onHandleCurrentChange"
v-model:page-size="state.tableData.param.size" layout="total, sizes, prev, pager, next" class="mt15"
:total="state.tableData.total"> :pager-count="3"
: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"
:total="state.tableData.total">
</el-pagination> </el-pagination>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="checked" name="second"> <el-tab-pane label="checked"
<el-table :data="state.tableData.data" v-loading="state.tableData.loading" style="width: 100%"> name="second">
<el-table-column type="index" label="ID" width="50" /> <el-table :data="state.tableData.data"
<el-table-column prop="username" label="User name" show-overflow-tooltip></el-table-column> 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="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"
<el-table-column prop="email" label="Email" show-overflow-tooltip></el-table-column> label="Organization"
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip> 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>
<!-- 在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">
<!-- 格式化去除时分秒 --> <!-- 格式化去除时分秒 -->
{{ dateFormat(scope.row.disasterTime) }} {{ dateFormat(scope.row.disasterTime) }}
@ -88,54 +137,89 @@
</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="Operate" label="Operate" 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> <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 === 2">Reviewed</el-tag> <el-tag type="info"
<el-tag type="info" v-if="scope.row.respondStatus === 1">Failed</el-tag> v-if="scope.row.respondStatus === 2">Reviewed</el-tag>
<el-tag type="info"
v-if="scope.row.respondStatus === 1">Failed</el-tag>
</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"
:pager-count="3" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.current" background @current-change="onHandleCurrentChange"
v-model:page-size="state.tableData.param.size" layout="total, sizes, prev, pager, next" class="mt15"
:total="state.tableData.total"> :pager-count="3"
: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"
:total="state.tableData.total">
</el-pagination> </el-pagination>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
<el-dialog v-model="state.dialogVisible" title="Review" width="30%" :before-close="handleClose"> <el-dialog v-model="state.dialogVisible"
title="Review"
width="30%"
:before-close="handleClose">
<el-container style="margin-top: -2%;margin-bottom: 2%;"> <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"
<el-radio v-model="state.radio" label='2' @click="mapEvents('2')">Area</el-radio> label='1'
<el-button type="primary" style="margin-left: 5%;" @click="ClearSubmit">Clear</el-button> @click="mapEvents('1')">Point</el-radio>
<el-radio v-model="state.radio"
label='2'
@click="mapEvents('2')">Area</el-radio>
<el-button type="primary"
style="margin-left: 5%;"
@click="ClearSubmit">Clear</el-button>
</el-container> </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> <span style="line-height: 35px;"> Latitude</span>
<el-input placeholder="请输入内容" style="height:35px;margin-right: 1%;" v-model="state.dislat"></el-input> <el-input placeholder="请输入内容"
style="height:35px;margin-right: 1%;"
v-model="state.dislat"></el-input>
<span style="line-height: 35px;">Longitude</span> <span style="line-height: 35px;">Longitude</span>
<el-input placeholder="请输入内容" style="height:35px;"></el-input> <el-input placeholder="请输入内容"
style="height:35px;"></el-input>
</el-container> </el-container>
<MapPage style="height:350px ; width:100% ;margin-bottom: 10px;" ref="mapRef"></MapPage> <<<<<<< HEAD
<MapPage
style="height:350px ; width:100% ;margin-bottom: 10px;"
ref="mapRef">
</MapPage>
=======
<MapPage style="height:350px ; width:100% ;margin-bottom: 10px;"
ref="mapRef"></MapPage>
>>>>>>> zqq
<el-form-item label="Disaster Time"> <el-form-item label="Disaster Time">
<el-date-picker v-model="state.edit.disasterTime" type="date" value-format="YYYY-MM-DD" <el-date-picker v-model="state.edit.disasterTime"
placeholder="Select date and time" /> type="date"
</el-form-item> value-format="YYYY-MM-DD"
placeholder="Select date and time" />
</el-form-item>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="dialogVisible = false">Cancel</el-button> <el-button @click="dialogVisible = false">Cancel</el-button>
<el-button type="danger" @click="reviews(1)"> <el-button type="danger"
Not Review @click="reviews(1)">
</el-button> Not Review
<el-button type="primary" @click="reviews(2)"> </el-button>
Review <el-button type="primary"
</el-button> @click="reviews(2)">
</span> Review
</template> </el-button>
</span>
</template>
</el-dialog> </el-dialog>
</el-config-provider> </el-config-provider>
</div> </div>
@ -148,7 +232,6 @@ import { ElMessageBox, ElMessage } from 'element-plus';
import { getList, review } from '/@/api/disasterInfo/index'; import { getList, review } from '/@/api/disasterInfo/index';
import { getDictionary } from '/@/api/system/dictbiz'; import { getDictionary } from '/@/api/system/dictbiz';
// //
import Map from '/@/components/Map.vue';
import { useDateFormat } from '@vueuse/shared'; import { useDateFormat } from '@vueuse/shared';
import L from "leaflet"; import L from "leaflet";
import '@geoman-io/leaflet-geoman-free'; import '@geoman-io/leaflet-geoman-free';
@ -366,25 +449,27 @@ const getValue = (key) => {
return state.disasterTypeList.find((item) => item.dictKey === key)?.dictValue; return state.disasterTypeList.find((item) => item.dictKey === key)?.dictValue;
}; };
</script> </script>
<style> <style lang="scss">
.demo-tabs>.el-tabs__content { .demo-tabs > .el-tabs__content {
padding: 0px; padding: 0px;
color: #6b778c; color: #6b778c;
font-size: 32px; font-size: 32px;
font-weight: 600; font-weight: 600;
} }
.system-role-container { .system-role-container {
.system-role-padding { .system-role-padding {
padding: 15px; padding: 15px;
.el-table { .el-table {
flex: 1; flex: 1;
} }
} }
} }
.mt15 { .mt15 {
display: flex; display: flex;
justify-content: end; justify-content: end;
float: right;
margin-bottom: 15px;
} }
</style> </style>