Merge branch 'main' of http://47.92.168.204:3000/VoRDM/vordm-admin
# Conflicts: # package-lock.json # src/utils/request.js # src/views/responseManagement/userResponse/index.vue
This commit is contained in:
commit
cdc5784bb1
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
|
@ -47,9 +47,7 @@ export const rs = (stime, etime, disaster_id, ranges, type = 1,id) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/' + crawlModule + '/rs/' + method,
|
url: '/api/' + crawlModule + '/rs/' + method,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: data,
|
||||||
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
export const submit = (row) => {
|
export const submit = (row) => {
|
||||||
|
|
|
@ -50,15 +50,19 @@ export function review(data) {
|
||||||
/**
|
/**
|
||||||
* 首页 dashborad
|
* 首页 dashborad
|
||||||
*/
|
*/
|
||||||
export function statistics(){
|
|
||||||
|
export function statistics(param){
|
||||||
return request({
|
return request({
|
||||||
url: '/api/'+moduleName+'/ui/disasterInfo/statistics',
|
url: '/api/'+moduleName+'/ui/disasterInfo/statistics',
|
||||||
method: 'get'
|
method: 'get',
|
||||||
});
|
params:{
|
||||||
|
year:param
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
export const getUserList = (name, current, size) => {
|
export const getUserList = (name, current, size) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/yyhouc-system-manager/user/list',
|
url: '/api/system-manager/user/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
name,
|
name,
|
||||||
|
@ -67,7 +71,6 @@ export const getUserList = (name,current,size) => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function submit(data) {
|
export function submit(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/' + moduleName + '/ui/disasterInfo/submit',
|
url: '/api/' + moduleName + '/ui/disasterInfo/submit',
|
||||||
|
@ -75,3 +78,13 @@ export function submit(data) {
|
||||||
data,
|
data,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function responseEndedDisasterInfo(id) {
|
||||||
|
return request({
|
||||||
|
url: '/api/' + moduleName + '/ui/disasterInfo/responseEndedDisasterInfo',
|
||||||
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<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'
|
||||||
|
import * as turf from '@turf/turf'
|
||||||
import L from 'leaflet'
|
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'
|
||||||
|
@ -19,11 +19,11 @@ import * as omnivore from '@mapbox/leaflet-omnivore'
|
||||||
const variableStore = useVariableStore()
|
const variableStore = useVariableStore()
|
||||||
const map = ref()
|
const map = ref()
|
||||||
let homeMap = null
|
let homeMap = null
|
||||||
let text = null
|
|
||||||
let featureLayerG_area = null
|
let featureLayerG_area = null
|
||||||
let featureLayerG_point = null
|
let featureLayerG_point = null
|
||||||
let layerRectangle = null
|
let layerRectangle = null
|
||||||
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
homeMap = L.map(map.value, {
|
homeMap = L.map(map.value, {
|
||||||
preferCanvas: true,
|
preferCanvas: true,
|
||||||
|
@ -44,92 +44,8 @@ onMounted(() => {
|
||||||
tileSize: 256,
|
tileSize: 256,
|
||||||
zoomOffset: 1,
|
zoomOffset: 1,
|
||||||
}).addTo(homeMap)
|
}).addTo(homeMap)
|
||||||
text = new L.Draw.Polygon(homeMap)
|
|
||||||
L.drawLocal = {
|
|
||||||
draw: {
|
|
||||||
handlers: {
|
|
||||||
circle: {
|
|
||||||
tooltip: {
|
|
||||||
start: '单击并拖动可绘制圆',
|
|
||||||
},
|
|
||||||
radius: '半径',
|
|
||||||
},
|
|
||||||
circlemarker: {
|
|
||||||
tooltip: {
|
|
||||||
start: '点击地图放置圆形标记',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
marker: {
|
|
||||||
tooltip: {
|
|
||||||
start: '点击地图放置标记,Esc取消',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
polygon: {
|
|
||||||
tooltip: {
|
|
||||||
start: '点击开始绘制,Esc取消',
|
|
||||||
cont: '单击以继续绘制,Esc取消',
|
|
||||||
end: '单击第一个点完成绘制,Esc取消',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
polyline: {
|
|
||||||
error: '<strong>异常:</strong> 形状边缘不能交叉!',
|
|
||||||
tooltip: {
|
|
||||||
start: '点击开始绘制,Esc取消',
|
|
||||||
cont: '单击以继续绘制,Esc取消',
|
|
||||||
end: '双击完成绘制,Esc取消',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
rectangle: {
|
|
||||||
tooltip: {
|
|
||||||
start: '单击并拖动以绘制矩形',
|
|
||||||
end: '完成',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
simpleshape: {
|
|
||||||
tooltip: {
|
|
||||||
end: '释放鼠标完成绘图',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
edit: {
|
|
||||||
toolbar: {
|
|
||||||
actions: {
|
|
||||||
save: {
|
|
||||||
title: '保存改动',
|
|
||||||
text: '保存',
|
|
||||||
},
|
|
||||||
cancel: {
|
|
||||||
title: '取消编辑,丢弃所有更改',
|
|
||||||
text: '取消',
|
|
||||||
},
|
|
||||||
clearAll: {
|
|
||||||
title: '清除所有标记',
|
|
||||||
text: '清除所有',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
buttons: {
|
|
||||||
edit: '编辑图层',
|
|
||||||
editDisabled: '不需要编辑图层',
|
|
||||||
remove: '删除图层',
|
|
||||||
removeDisabled: '没有要删除的图层',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
handlers: {
|
|
||||||
edit: {
|
|
||||||
tooltip: {
|
|
||||||
text: '拖动节点或标记来编辑图形',
|
|
||||||
subtext: '单击“取消”撤消更改',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
remove: {
|
|
||||||
tooltip: {
|
|
||||||
text: '单击某个标记进行删除',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
featureLayerG_area = L.layerGroup().addTo(homeMap)
|
featureLayerG_area = L.layerGroup().addTo(homeMap)
|
||||||
featureLayerG_point = L.layerGroup().addTo(homeMap)
|
featureLayerG_point = L.layerGroup().addTo(homeMap)
|
||||||
})
|
})
|
||||||
|
@ -142,13 +58,41 @@ onMounted(() => {
|
||||||
*/
|
*/
|
||||||
const mapOperations = {
|
const mapOperations = {
|
||||||
wktParseToMap: (res) => {
|
wktParseToMap: (res) => {
|
||||||
return omnivore.wkt.parse(res).addTo(featureLayerG_point)
|
let layer = omnivore.wkt.parse(res)
|
||||||
// if(omnivore.wkt.parse(res) instanceof L.Marker){
|
if(featureLayerG_area.getLayers().length != 0||featureLayerG_point.getLayers().length != 0){
|
||||||
|
|
||||||
// }
|
return;
|
||||||
// else{
|
}
|
||||||
// return omnivore.wkt.parse(res).addTo(featureLayerG_area )
|
layer.addTo(featureLayerG_point)
|
||||||
// }
|
|
||||||
|
let attr = Object.values(layer._layers)
|
||||||
|
|
||||||
|
// 判断审核的数据类型,如果是点则直接flyTo
|
||||||
|
if (attr[0].feature.geometry.type.indexOf('Polygon') == -1) {
|
||||||
|
homeMap.flyTo([attr[0].feature.geometry.coordinates[1], attr[0].feature.geometry.coordinates[0]], 3)
|
||||||
|
variableStore.layerGroupPoint=res;
|
||||||
|
return {'layer':layer,'location':[attr[0].feature.geometry.coordinates[1],attr[0].feature.geometry.coordinates[0]]}
|
||||||
|
}
|
||||||
|
// 判断审核的数据类型,如果是面则计算中心点 然后再fly
|
||||||
|
else {
|
||||||
|
variableStore.layerGroupPoly=res;
|
||||||
|
let polygons = [];
|
||||||
|
for (let i = 0; i < attr[0].feature.geometry.coordinates.length; i++) {
|
||||||
|
console.log(attr[0].feature.geometry.coordinates[i])
|
||||||
|
polygons.push(turf.polygon([attr[0].feature.geometry.coordinates[i]]));
|
||||||
|
}
|
||||||
|
let centers = polygons.map(polygon => turf.centroid(polygon));
|
||||||
|
// console.log(centers)
|
||||||
|
let features = []
|
||||||
|
for (let i = 0; i < centers.length; i++) {
|
||||||
|
features.push(turf.point(centers[i].geometry.coordinates))
|
||||||
|
}
|
||||||
|
let final_center = turf.center(turf.featureCollection(features))
|
||||||
|
// console.log(final_center)
|
||||||
|
homeMap.flyTo([final_center.geometry.coordinates[1], final_center.geometry.coordinates[0]], 3)
|
||||||
|
return {'layer':layer,'location':null}
|
||||||
|
}
|
||||||
|
// return layer
|
||||||
|
|
||||||
},
|
},
|
||||||
/** 添加点标注
|
/** 添加点标注
|
||||||
|
@ -177,7 +121,7 @@ const mapOperations = {
|
||||||
addInteractMarker: (lat, lon) => {
|
addInteractMarker: (lat, lon) => {
|
||||||
featureLayerG_point.clearLayers()
|
featureLayerG_point.clearLayers()
|
||||||
variableStore.layerGroupPoint = null
|
variableStore.layerGroupPoint = null
|
||||||
var marker = L.marker([lat, lon], { draggable: true }).addTo(
|
var marker = L.marker([lat, lon]).addTo(
|
||||||
featureLayerG_point
|
featureLayerG_point
|
||||||
)
|
)
|
||||||
let features = featureLayerG_point.toGeoJSON().features
|
let features = featureLayerG_point.toGeoJSON().features
|
||||||
|
@ -189,6 +133,7 @@ const mapOperations = {
|
||||||
// marker.on('click',function(){
|
// marker.on('click',function(){
|
||||||
// featureLayerG_point.removeLayer(marker)
|
// featureLayerG_point.removeLayer(marker)
|
||||||
// })
|
// })
|
||||||
|
|
||||||
},
|
},
|
||||||
/** 添加多边形标注
|
/** 添加多边形标注
|
||||||
* Object param 参数集合
|
* Object param 参数集合
|
||||||
|
@ -344,10 +289,7 @@ const mapOperations = {
|
||||||
featureLayerG_point.clearLayers()
|
featureLayerG_point.clearLayers()
|
||||||
variableStore.layerGroupPoint = null
|
variableStore.layerGroupPoint = null
|
||||||
variableStore.layerGroupPoly = null
|
variableStore.layerGroupPoly = null
|
||||||
if (variableStore.polygoncontrol == 'option2') {
|
|
||||||
text = new L.Draw.Polygon(homeMap)
|
|
||||||
text.enable()
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 清楚wkt添加的所有
|
* 清楚wkt添加的所有
|
||||||
|
@ -369,56 +311,84 @@ const mapOperations = {
|
||||||
// console.log('2-2')
|
// console.log('2-2')
|
||||||
variableStore.layerGroupPoint = null
|
variableStore.layerGroupPoint = null
|
||||||
featureLayerG_point.clearLayers()
|
featureLayerG_point.clearLayers()
|
||||||
|
homeMap.pm.enableDraw('Polygon', { snappable: false });
|
||||||
|
let polygon = null;
|
||||||
|
homeMap.on("pm:create", (e) => {
|
||||||
|
featureLayerG_area.clearLayers()
|
||||||
|
e.layer.setStyle({
|
||||||
|
color: '#FF0080',
|
||||||
|
opacity: 1,
|
||||||
|
})
|
||||||
|
e.layer.addTo(featureLayerG_area)
|
||||||
|
polygon = e.layer
|
||||||
|
let features = featureLayerG_area.toGeoJSON().features
|
||||||
|
variableStore.layerGroupPoly = features.map(function (feature) {
|
||||||
|
return WKT.convert(feature.geometry)
|
||||||
|
})
|
||||||
|
variableStore.layerGroupPoly = variableStore.layerGroupPoly.join('\n')
|
||||||
|
})
|
||||||
// featureLayerG_area.clearLayers()
|
// featureLayerG_area.clearLayers()
|
||||||
// variableStore.layerGroupPoly=null;
|
// variableStore.layerGroupPoly=null;
|
||||||
text = new L.Draw.Polygon(homeMap)
|
return polygon
|
||||||
text.enable()
|
|
||||||
},
|
},
|
||||||
clearPolygon: () => {
|
clearPolygon: () => {
|
||||||
// console.log('1-2')
|
// console.log('1-2')
|
||||||
text.disable()
|
|
||||||
featureLayerG_area.clearLayers()
|
featureLayerG_area.clearLayers()
|
||||||
variableStore.layerGroupPoly = null
|
variableStore.layerGroupPoly = null
|
||||||
|
homeMap.pm.disableDraw();
|
||||||
// variableStore.layerGroupPoint=null
|
// variableStore.layerGroupPoint=null
|
||||||
// featureLayerG_point.clearLayers()
|
// featureLayerG_point.clearLayers()
|
||||||
},
|
},
|
||||||
drawCreated: () => {
|
drawCreated: () => {
|
||||||
// console.log("2-3")
|
|
||||||
homeMap.on('draw:created', function (elll) {
|
// homeMap.on('draw:created', function (elll) {
|
||||||
featureLayerG_area.clearLayers()
|
// featureLayerG_area.clearLayers()
|
||||||
variableStore.layerGroupPoly = null
|
// variableStore.layerGroupPoly = null
|
||||||
elll.layer.setStyle({
|
// elll.layer.setStyle({
|
||||||
color: '#FF0080',
|
// color: '#FF0080',
|
||||||
opacity: 1,
|
// opacity: 1,
|
||||||
})
|
// })
|
||||||
featureLayerG_area.addLayer(elll.layer)
|
// featureLayerG_area.addLayer(elll.layer)
|
||||||
let features = featureLayerG_area.toGeoJSON().features
|
// let features = featureLayerG_area.toGeoJSON().features
|
||||||
// console.log(features)
|
// // console.log(features)
|
||||||
variableStore.layerGroupPoly = features.map(function (feature) {
|
// variableStore.layerGroupPoly = features.map(function (feature) {
|
||||||
return WKT.convert(feature.geometry)
|
// return WKT.convert(feature.geometry)
|
||||||
})
|
// })
|
||||||
variableStore.layerGroupPoly =
|
// variableStore.layerGroupPoly =
|
||||||
variableStore.layerGroupPoly.join('\n')
|
// variableStore.layerGroupPoly.join('\n')
|
||||||
text.enable()
|
|
||||||
})
|
// })
|
||||||
},
|
},
|
||||||
drawDestroyed: () => {
|
Edit: () => {
|
||||||
homeMap.off('draw:created', function (elll) {
|
homeMap.pm.enableGlobalEditMode({
|
||||||
elll.layer.setStyle({
|
allowSelfIntersection: false,
|
||||||
color: '#FF0080',
|
|
||||||
opacity: 1,
|
|
||||||
})
|
})
|
||||||
featureLayerG_area.addLayer(elll.layer)
|
if (featureLayerG_area.getLayers().length == 1) {
|
||||||
|
featureLayerG_area.eachLayer(function (layer) {
|
||||||
|
layer.on('pm:edit', (e) => {
|
||||||
let features = featureLayerG_area.toGeoJSON().features
|
let features = featureLayerG_area.toGeoJSON().features
|
||||||
// console.log(features)
|
|
||||||
variableStore.layerGroupPoly = features.map(function (feature) {
|
variableStore.layerGroupPoly = features.map(function (feature) {
|
||||||
return WKT.convert(feature.geometry)
|
return WKT.convert(feature.geometry)
|
||||||
})
|
})
|
||||||
variableStore.layerGroupPoly =
|
variableStore.layerGroupPoly = variableStore.layerGroupPoly.join('\n')
|
||||||
variableStore.layerGroupPoly.join('\n')
|
});
|
||||||
text = new L.Draw.Polygon(homeMap)
|
});
|
||||||
text.enable()
|
}
|
||||||
|
else if (featureLayerG_point.getLayers().length == 1) {
|
||||||
|
featureLayerG_point.eachLayer(function (layer) {
|
||||||
|
layer.on('pm:edit', (e) => {
|
||||||
|
let features = featureLayerG_point.toGeoJSON().features
|
||||||
|
variableStore.layerGroupPoint = features.map(function (feature) {
|
||||||
|
return WKT.convert(feature.geometry)
|
||||||
})
|
})
|
||||||
|
variableStore.layerGroupPoint = variableStore.layerGroupPoint.join('\n')
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
console.log('error')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
drawRectangle: () => {
|
drawRectangle: () => {
|
||||||
if (layerRectangle != null) {
|
if (layerRectangle != null) {
|
||||||
|
@ -437,7 +407,6 @@ const mapOperations = {
|
||||||
deleteRectangle: () => {
|
deleteRectangle: () => {
|
||||||
homeMap.removeLayer(layerRectangle)
|
homeMap.removeLayer(layerRectangle)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
//omnivore.wkt.parse('POINT(-80 0)').addTo(homeMap);
|
//omnivore.wkt.parse('POINT(-80 0)').addTo(homeMap);
|
||||||
|
|
||||||
|
@ -445,4 +414,3 @@ defineExpose({
|
||||||
mapOperations,
|
mapOperations,
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
<template>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: "index"
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
|
@ -0,0 +1,120 @@
|
||||||
|
<!--灾害列表table组件-->
|
||||||
|
<template>
|
||||||
|
<div class="search">
|
||||||
|
<el-select class="form-select" size="default" clearable
|
||||||
|
placeholder="Disaster Type" v-model="state.search.disasterType">
|
||||||
|
<el-option v-for="(item,index) in state.dictList" :value="item.dictKey" :key="index" :label="item.dictValue"/>
|
||||||
|
</el-select>
|
||||||
|
<el-input type="text"
|
||||||
|
class="form-control" size="default" clearable
|
||||||
|
placeholder="Disaster Country" v-model="state.search.disasterCountry"/>
|
||||||
|
<el-button size="default" type="primary" class="ml10" @click="getDisasterTable">
|
||||||
|
<el-icon>
|
||||||
|
<ele-Search />
|
||||||
|
</el-icon>
|
||||||
|
Search
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
||||||
|
highlight-current-row @row-click="tableClick">
|
||||||
|
<el-table-column type="index" label="ID" width="50" />
|
||||||
|
<el-table-column prop="dictValue" label="Disaster type" show-overflow-tooltip sortable></el-table-column>
|
||||||
|
<el-table-column prop="disasterCountry" label="Disaster country" show-overflow-tooltip sortable></el-table-column>
|
||||||
|
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip sortable></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
|
||||||
|
class="mt15" :pager-count="3" :page-sizes="[10, 20, 30]"
|
||||||
|
v-model:current-page="state.disasterData.param.pageNum" background
|
||||||
|
v-model:page-size="state.disasterData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||||
|
:total="state.disasterData.total">
|
||||||
|
</el-pagination>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="disasterTable">
|
||||||
|
|
||||||
|
import {onMounted, reactive, computed, defineProps, defineEmits} from "vue";
|
||||||
|
import {getList} from "/@/api/system/dictbiz.js";
|
||||||
|
import {getPage} from "/@/api/disasterInfo/index.js";
|
||||||
|
//定义表格点击后的回调
|
||||||
|
const emit = defineEmits(["click"]);
|
||||||
|
//定义组件接收的参数
|
||||||
|
const props = defineProps({
|
||||||
|
//响应状态
|
||||||
|
status: {
|
||||||
|
type: Number
|
||||||
|
},
|
||||||
|
})
|
||||||
|
const state = reactive({
|
||||||
|
//查询参数
|
||||||
|
search:{
|
||||||
|
respondStatus:props.status
|
||||||
|
},
|
||||||
|
//灾害类型字典项
|
||||||
|
dictList:[],
|
||||||
|
//表格数据
|
||||||
|
disasterData: {
|
||||||
|
data: [],
|
||||||
|
total: 0,
|
||||||
|
loading: false,
|
||||||
|
param: {
|
||||||
|
search: '',
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
//灾害表格点击事件
|
||||||
|
const tableClick = (row, column, event) => {
|
||||||
|
emit("click", row.disasterId);
|
||||||
|
}
|
||||||
|
//获取字典数据
|
||||||
|
const getDictBizData = () => {
|
||||||
|
getList({code:'disaster'}).then(res =>{
|
||||||
|
state.dictList = res[0].children
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//获取灾害列表
|
||||||
|
const getDisasterTable = () => {
|
||||||
|
getPage(state.disasterData.param.pageNum, state.disasterData.param.pageSize, state.search).then(res => {
|
||||||
|
state.disasterData.data = res.records;
|
||||||
|
state.disasterData.total = res.total;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 分页改变
|
||||||
|
const onHandleDisasterSizeChange = (val) => {
|
||||||
|
state.disasterData.param.pageSize = val;
|
||||||
|
getDisasterTable();
|
||||||
|
};
|
||||||
|
// 分页改变
|
||||||
|
const onHandleDisasterCurrentChange = (val) => {
|
||||||
|
state.disasterData.param.pageNum = val;
|
||||||
|
getDisasterTable();
|
||||||
|
};
|
||||||
|
//页面加载
|
||||||
|
onMounted(()=>{
|
||||||
|
//获取灾害类型
|
||||||
|
getDictBizData();
|
||||||
|
//获取灾害列表
|
||||||
|
getDisasterTable();
|
||||||
|
})
|
||||||
|
//组件对外暴露方法
|
||||||
|
defineExpose({
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.mt15 {
|
||||||
|
display: flex;
|
||||||
|
justify-content: end;
|
||||||
|
}
|
||||||
|
.search{
|
||||||
|
display: flex;
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
.form-control{
|
||||||
|
margin-left: 10px;
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -53,19 +53,19 @@
|
||||||
:hide-timeout="50"
|
:hide-timeout="50"
|
||||||
trigger="click"
|
trigger="click"
|
||||||
@command="onLanguageChange">
|
@command="onLanguageChange">
|
||||||
<div class="layout-navbars-breadcrumb-user-icon">
|
<!-- <div class="layout-navbars-breadcrumb-user-icon">
|
||||||
<i class="iconfont"
|
<i class="iconfont"
|
||||||
:class="state.disabledI18n === 'en' ? 'icon-fuhao-zhongwen' : 'icon-fuhao-yingwen'"></i>
|
:class="state.disabledI18n === 'en' ? 'icon-fuhao-zhongwen' : 'icon-fuhao-yingwen'"></i>
|
||||||
</div>
|
</div> -->
|
||||||
<template #dropdown>
|
<!-- <template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item command="zh-cn"
|
<el-dropdown-item command="zh-cn"
|
||||||
:disabled="state.disabledI18n === 'zh-cn'">English</el-dropdown-item>
|
:disabled="state.disabledI18n === 'zh-cn'">English</el-dropdown-item>
|
||||||
<el-dropdown-item command="en"
|
<el-dropdown-item command="en"
|
||||||
:disabled="state.disabledI18n === 'en'">简体中文</el-dropdown-item>
|
:disabled="state.disabledI18n === 'en'">简体中文</el-dropdown-item>
|
||||||
<!-- <el-dropdown-item command="zh-cn" :disabled="state.disabledI18n === 'zh-cn'">简体中文</el-dropdown-item> -->
|
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template> -->
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
<div class="layout-navbars-breadcrumb-user-icon mr10"
|
<div class="layout-navbars-breadcrumb-user-icon mr10"
|
||||||
@click="onScreenfullClick">
|
@click="onScreenfullClick">
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<el-sub-menu :index="val.path" v-if="val.children && val.children.length > 0" :key="val.path">
|
<el-sub-menu :index="val.path" v-if="val.children && val.children.length > 0" :key="val.path">
|
||||||
<template #title>
|
<template #title>
|
||||||
<SvgIcon :name="val.meta.icon" />
|
<SvgIcon :name="val.meta.icon" />
|
||||||
<span v-text="useTranslateStore.translate_control===1?val.meta.title :val.meta.zh"></span>
|
<span v-text="val.meta.title"></span>
|
||||||
</template>
|
</template>
|
||||||
<SubItem :chil="val.children" />
|
<SubItem :chil="val.children" />
|
||||||
</el-sub-menu>
|
</el-sub-menu>
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
<el-menu-item :index="val.path" :key="val.path">
|
<el-menu-item :index="val.path" :key="val.path">
|
||||||
<SvgIcon :name="val.meta.icon" />
|
<SvgIcon :name="val.meta.icon" />
|
||||||
<template #title v-if="!val.meta.isLink || (val.meta.isLink && val.meta.isIframe)">
|
<template #title v-if="!val.meta.isLink || (val.meta.isLink && val.meta.isIframe)">
|
||||||
<span v-text="useTranslateStore.translate_control===1?val.meta.title :val.meta.zh"></span>
|
<span v-text="val.meta.title "></span>
|
||||||
</template>
|
</template>
|
||||||
<template #title v-else>
|
<template #title v-else>
|
||||||
<a class="w100" @click.prevent="onALinkClick(val)">{{ val.meta.title }}</a>
|
<a class="w100" @click.prevent="onALinkClick(val)">{{ val.meta.title }}</a>
|
||||||
|
|
|
@ -181,7 +181,7 @@ export const dynamicRoutes = [
|
||||||
name: 'otherData',
|
name: 'otherData',
|
||||||
component: () => import('/@/views/dataService/otherData/index.vue'),
|
component: () => import('/@/views/dataService/otherData/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: 'other data service',
|
title: 'Other data service',
|
||||||
isLink: '',
|
isLink: '',
|
||||||
isHide: false,
|
isHide: false,
|
||||||
isKeepAlive: true,
|
isKeepAlive: true,
|
||||||
|
@ -197,7 +197,7 @@ export const dynamicRoutes = [
|
||||||
name: 'visualData',
|
name: 'visualData',
|
||||||
component: () => import('/@/views/dataService/visualData/index.vue'),
|
component: () => import('/@/views/dataService/visualData/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: 'visual data service',
|
title: 'Visual data service',
|
||||||
isLink: '',
|
isLink: '',
|
||||||
isHide: false,
|
isHide: false,
|
||||||
isKeepAlive: true,
|
isKeepAlive: true,
|
||||||
|
@ -213,7 +213,7 @@ export const dynamicRoutes = [
|
||||||
name: 'pictureInfo',
|
name: 'pictureInfo',
|
||||||
component: () => import('/@/views/dataService/pictureInfo/index.vue'),
|
component: () => import('/@/views/dataService/pictureInfo/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: 'picture info service',
|
title: 'Picture info service',
|
||||||
isLink: '',
|
isLink: '',
|
||||||
isHide: false,
|
isHide: false,
|
||||||
isKeepAlive: true,
|
isKeepAlive: true,
|
||||||
|
@ -238,7 +238,7 @@ export const dynamicRoutes = [
|
||||||
isKeepAlive: true,
|
isKeepAlive: true,
|
||||||
isAffix: false,
|
isAffix: false,
|
||||||
isIframe: false,
|
isIframe: false,
|
||||||
roles: ['admin', 'chief'],
|
roles: ['admin'],
|
||||||
icon: 'iconfont icon-xitongshezhi',
|
icon: 'iconfont icon-xitongshezhi',
|
||||||
zh: '系统管理',
|
zh: '系统管理',
|
||||||
},
|
},
|
||||||
|
@ -254,7 +254,7 @@ export const dynamicRoutes = [
|
||||||
isKeepAlive: true,
|
isKeepAlive: true,
|
||||||
isAffix: false,
|
isAffix: false,
|
||||||
isIframe: false,
|
isIframe: false,
|
||||||
roles: ['admin', 'chief'],
|
roles: ['admin'],
|
||||||
icon: 'ele-ColdDrink',
|
icon: 'ele-ColdDrink',
|
||||||
zh: '管理员管理',
|
zh: '管理员管理',
|
||||||
},
|
},
|
||||||
|
@ -270,7 +270,7 @@ export const dynamicRoutes = [
|
||||||
isKeepAlive: true,
|
isKeepAlive: true,
|
||||||
isAffix: false,
|
isAffix: false,
|
||||||
isIframe: false,
|
isIframe: false,
|
||||||
roles: ['admin', 'chief'],
|
roles: ['admin'],
|
||||||
icon: 'iconfont icon-caidan',
|
icon: 'iconfont icon-caidan',
|
||||||
zh: '普通管理员管理',
|
zh: '普通管理员管理',
|
||||||
},
|
},
|
||||||
|
@ -280,13 +280,13 @@ export const dynamicRoutes = [
|
||||||
name: 'systemDic',
|
name: 'systemDic',
|
||||||
component: () => import('/@/views/system/dic/index.vue'),
|
component: () => import('/@/views/system/dic/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: '字典管理',
|
title: 'Dictionary management',
|
||||||
isLink: '',
|
isLink: '',
|
||||||
isHide: false,
|
isHide: false,
|
||||||
isKeepAlive: true,
|
isKeepAlive: true,
|
||||||
isAffix: false,
|
isAffix: false,
|
||||||
isIframe: false,
|
isIframe: false,
|
||||||
roles: ['admin', 'chief'],
|
roles: ['admin'],
|
||||||
icon: 'ele-SetUp',
|
icon: 'ele-SetUp',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -56,6 +56,7 @@ export const useVariableStore = defineStore(Names.TEST, {
|
||||||
// Data_upload_agency:""
|
// Data_upload_agency:""
|
||||||
// }
|
// }
|
||||||
],
|
],
|
||||||
|
// 存储wkt格式数据
|
||||||
layerGroupPoint:null,
|
layerGroupPoint:null,
|
||||||
layerGroupPoly:null,
|
layerGroupPoly:null,
|
||||||
polygoncontrol:null,
|
polygoncontrol:null,
|
||||||
|
|
|
@ -4,7 +4,7 @@ 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 = 'yyhouc-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({
|
||||||
|
|
|
@ -6,16 +6,16 @@
|
||||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
||||||
highlight-current-row @row-click="tableClick">
|
highlight-current-row @row-click="tableClick">
|
||||||
<el-table-column type="index" label="ID" width="50" />
|
<el-table-column prop="vordmId" label="ID" width="118" />
|
||||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip>
|
<el-table-column 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 keywords" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="disasterTime" label="disaster time" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="Operate" label="Operate" show-overflow-tooltip>
|
<el-table-column prop="Operate" label="Operate" width="85" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button size="small" text type="primary" @click="startBot(scope.row)">start</el-button>
|
<el-button size="small" text type="primary" @click="startBot(scope.row)">start</el-button>
|
||||||
<!-- <el-tag type="info" v-if="scope.row.respondStatus == 3">complete</el-tag> -->
|
<!-- <el-tag type="info" v-if="scope.row.respondStatus == 3">complete</el-tag> -->
|
||||||
|
@ -33,45 +33,45 @@
|
||||||
<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" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
||||||
<el-form-item label="type" label-width="100px">
|
<el-form-item label="Type" label-width="100px">
|
||||||
<el-select v-model="state.searchName" placeholder="Please select data type" style="max-width: 200px"
|
<el-select v-model="state.searchName" placeholder="Please select data type" style="max-width: 200px"
|
||||||
size="default" clearable @change="getTableData(); state.queryTitle = ''">
|
size="default" clearable @change="getTableData(); state.queryTitle = ''">
|
||||||
<el-option value="1" label="news"></el-option>
|
<el-option value="1" label="News"></el-option>
|
||||||
<el-option value="2" label="socialMedia"></el-option>
|
<el-option value="2" label="SocialMedia"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="stateus" label-width="100px">
|
<el-form-item label=" Review status" label-width="100px">
|
||||||
<el-select v-model=" state.srarchType " placeholder="Please select data type" style="max-width: 200px"
|
<el-select v-model=" state.srarchType " placeholder="Please select data type" style="max-width: 200px"
|
||||||
size="default" clearable>
|
size="default" clearable>
|
||||||
<el-option value="0" label="No review"></el-option>
|
<el-option value="0" label="Awaiting approval"></el-option>
|
||||||
<el-option value="1" label="reserve"></el-option>
|
<el-option value="1" label="Approved"></el-option>
|
||||||
<el-option value="2" label="not retain"></el-option>
|
<el-option value="2" label="Rejected"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="title" label-width="100px" v-if=" state.searchName == '1' ">
|
<el-form-item label="Title" label-width="100px" v-if=" state.searchName == '1' ">
|
||||||
<el-input v-model=" state.queryTitle " placeholder="Please enter a title"></el-input>
|
<el-input v-model=" state.queryTitle " placeholder="Please enter a title"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-button size="default" type="primary" class="ml10" @click=" getTableData ">
|
<el-button size="default" type="primary" class="ml10" @click=" getTableData ">
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<ele-Search />
|
<ele-Search />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
search
|
Search
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="default" type="success" class="ml10" @click=" openDialog ">
|
<el-button size="default" type="success" class="ml10" @click=" openDialog ">
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<ele-Upload />
|
<ele-Upload />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
review
|
Batch operation
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data=" state.tableData.data " v-loading=" state.tableData.loading "
|
<el-table :data=" state.tableData.data " v-loading=" state.tableData.loading "
|
||||||
@selection-change=" handleSelectionChange " style="width: 100%">
|
@selection-change=" handleSelectionChange " style="width: 100%">
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column type="index" label="ID" width="50" />
|
<el-table-column type="index" label="ID" width="50" />
|
||||||
<el-table-column v-if=" state.searchName == '1' " prop="title" label="title"
|
<el-table-column v-if=" state.searchName == '1' " prop="title" label="Title"
|
||||||
show-overflow-tooltip></el-table-column>
|
show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="content" label="content" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="content" label="Content" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="type" label="type" show-overflow-tooltip>
|
<el-table-column prop="type" label="Type" show-overflow-tooltip>
|
||||||
<template #default=" scope ">
|
<template #default=" scope ">
|
||||||
<el-tag type="info" v-if=" state.searchName == '1' && scope.row.type == 0 ">baidu(中文)</el-tag>
|
<el-tag type="info" v-if=" state.searchName == '1' && scope.row.type == 0 ">baidu(中文)</el-tag>
|
||||||
<el-tag type="info" v-if=" state.searchName == '1' && scope.row.type == 1 ">bing</el-tag>
|
<el-tag type="info" v-if=" state.searchName == '1' && scope.row.type == 1 ">bing</el-tag>
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
<el-tag type="info" v-if=" state.searchName == '2' && scope.row.type == 1 ">weibo</el-tag>
|
<el-tag type="info" v-if=" state.searchName == '2' && scope.row.type == 1 ">weibo</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="content" label="link" show-overflow-tooltip>
|
<el-table-column prop="content" label="Link" show-overflow-tooltip>
|
||||||
<template #default=" scope ">
|
<template #default=" scope ">
|
||||||
<a :href=" scope.row.link " target="_blank">goto link</a>
|
<a :href=" scope.row.link " target="_blank">goto link</a>
|
||||||
</template>
|
</template>
|
||||||
|
@ -96,11 +96,11 @@
|
||||||
<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="info" v-if=" scope.row.status == 0 "
|
<el-button size="small" text type="info" v-if=" scope.row.status == 0 "
|
||||||
@click=" openDialog(scope.row, true) ">review</el-button>
|
@click=" openDialog(scope.row, true) ">Awaiting approval</el-button>
|
||||||
<el-button size="small" text type="success" v-if=" scope.row.status == 1 "
|
<el-button size="small" text type="success" v-if=" scope.row.status == 1 "
|
||||||
@click=" openDialog(scope.row, false) ">review</el-button>
|
@click=" openDialog(scope.row, false) ">Approved</el-button>
|
||||||
<el-button size="small" text type="danger" v-if=" scope.row.status == 2 "
|
<el-button size="small" text type="danger" v-if=" scope.row.status == 2 "
|
||||||
@click=" openDialog(scope.row, false) ">review</el-button>
|
@click=" openDialog(scope.row, false) ">Rejected</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -272,6 +272,10 @@ const getDisasterData = () => {
|
||||||
}
|
}
|
||||||
getList(param).then(res => {
|
getList(param).then(res => {
|
||||||
state.disasterData.data = res.records;
|
state.disasterData.data = res.records;
|
||||||
|
state.disasterData.data.forEach(item=>{
|
||||||
|
let date = item.disasterTime.slice(0,10);
|
||||||
|
item.disasterTime = date;
|
||||||
|
})
|
||||||
state.disasterData.total = res.total;
|
state.disasterData.total = res.total;
|
||||||
state.disasterData.loading = false;
|
state.disasterData.loading = false;
|
||||||
})
|
})
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
||||||
highlight-current-row @row-click="tableClick">
|
highlight-current-row @row-click="tableClick">
|
||||||
<el-table-column type="index" label="ID" width="50" />
|
<el-table-column prop="vordmId" label="ID" width="118" />
|
||||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="disasterCountry" label="disaster country" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="disasterCountry" label="Disaster country" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="disasterTime" label="disaster time" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip></el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
|
<el-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
|
||||||
class="mt15" :pager-count="3" :page-sizes="[10, 20, 30]"
|
class="mt15" :pager-count="3" :page-sizes="[10, 20, 30]"
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
<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" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
||||||
<el-select v-model="state.searchName" placeholder="please select data type" style="max-width: 200px"
|
<el-select v-model="state.searchName" placeholder="Please select data type" style="max-width: 200px"
|
||||||
size="default" clearable>
|
size="default" clearable>
|
||||||
<el-option value="0" label="basic data"></el-option>
|
<el-option value="0" label="basic data"></el-option>
|
||||||
<el-option value="1" label="responded report"></el-option>
|
<el-option value="1" label="responded report"></el-option>
|
||||||
|
@ -32,26 +32,25 @@
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<ele-Search />
|
<ele-Search />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
search
|
Search
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="default" type="success" class="ml10" @click="uploadData">
|
<el-button size="default" type="success" class="ml10" @click="uploadData">
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<ele-Upload />
|
<ele-Upload />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
upload
|
Add
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="default" type="danger" class="ml10" @click="batchDel">
|
<el-button size="default" type="danger" class="ml10" @click="batchDel">
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<ele-Delete />
|
<ele-Delete />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
batch delete
|
Delete
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading"
|
<el-table :data="state.tableData.data" v-loading="state.tableData.loading"
|
||||||
@selection-change="handleSelectionChange" style="width: 100%">
|
@selection-change="handleSelectionChange" style="width: 100%">
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column type="index" label="ID" width="50" />
|
<el-table-column prop="uploaderName" label="Uploader name" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="uploaderName" label="uploader Name" show-overflow-tooltip></el-table-column>
|
|
||||||
<el-table-column prop="sourceOrganization" label="Organization" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="sourceOrganization" label="Organization" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="title" label="Professional title" show-overflow-tooltip
|
<el-table-column prop="title" label="Professional title" show-overflow-tooltip
|
||||||
width="150"></el-table-column>
|
width="150"></el-table-column>
|
||||||
|
@ -167,6 +166,10 @@ const getDisasterData = () => {
|
||||||
state.disasterData.loading = true;
|
state.disasterData.loading = true;
|
||||||
getDisasterPage(state.disasterData.param.pageNum, state.disasterData.param.pageSize, {}).then(res => {
|
getDisasterPage(state.disasterData.param.pageNum, state.disasterData.param.pageSize, {}).then(res => {
|
||||||
state.disasterData.data = res.records;
|
state.disasterData.data = res.records;
|
||||||
|
state.disasterData.data.forEach(item=>{
|
||||||
|
let date = item.disasterTime.slice(0,10);
|
||||||
|
item.disasterTime = date;
|
||||||
|
})
|
||||||
state.disasterData.total = res.total;
|
state.disasterData.total = res.total;
|
||||||
state.disasterData.loading = false;
|
state.disasterData.loading = false;
|
||||||
})
|
})
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
||||||
highlight-current-row @row-click="tableClick">
|
highlight-current-row @row-click="tableClick">
|
||||||
<el-table-column type="index" label="ID" width="50" />
|
<el-table-column prop="vordmId" label="ID" width="118" />
|
||||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="disasterCountry" label="disaster country" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="disasterCountry" label="Disaster country" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="disasterTime" label="disaster time" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip></el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
|
<el-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
|
||||||
class="mt15" :pager-count="3" :page-sizes="[10, 20, 30]"
|
class="mt15" :pager-count="3" :page-sizes="[10, 20, 30]"
|
||||||
|
@ -34,13 +34,13 @@
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<ele-Upload />
|
<ele-Upload />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
upload
|
Upload
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="default" type="danger" class="ml10" @click="batchDel">
|
<el-button size="default" type="danger" class="ml10" @click="batchDel">
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<ele-Delete />
|
<ele-Delete />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
batch delete
|
Batch delete
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -48,12 +48,12 @@
|
||||||
@selection-change="handleSelectionChange" style="width: 100%">
|
@selection-change="handleSelectionChange" style="width: 100%">
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column type="index" label="ID" width="50" />
|
<el-table-column type="index" label="ID" width="50" />
|
||||||
<el-table-column prop="name" label="name" show-overflow-tooltip>
|
<el-table-column prop="name" label="Name" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ formatName(scope.row.name) }}
|
{{ formatName(scope.row.name) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="link" label="image" show-overflow-tooltip>
|
<el-table-column prop="link" label="Image" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-popover trigger="hover" placement="right" popper-class="max-h-300px overflow-auto" :width="330">
|
<el-popover trigger="hover" placement="right" popper-class="max-h-300px overflow-auto" :width="330">
|
||||||
<!-- table中原本显示的图片 -->
|
<!-- table中原本显示的图片 -->
|
||||||
|
@ -198,6 +198,10 @@ const getDisasterData = () => {
|
||||||
state.disasterData.loading = true;
|
state.disasterData.loading = true;
|
||||||
getDisasterPage(state.disasterData.param.pageNum, state.disasterData.param.pageSize, {}).then((res) => {
|
getDisasterPage(state.disasterData.param.pageNum, state.disasterData.param.pageSize, {}).then((res) => {
|
||||||
state.disasterData.data = res.records;
|
state.disasterData.data = res.records;
|
||||||
|
state.disasterData.data.forEach(item=>{
|
||||||
|
let date = item.disasterTime.slice(0,10);
|
||||||
|
item.disasterTime = date;
|
||||||
|
})
|
||||||
state.disasterData.total = res.total;
|
state.disasterData.total = res.total;
|
||||||
state.disasterData.loading = false;
|
state.disasterData.loading = false;
|
||||||
});
|
});
|
||||||
|
|
|
@ -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]"
|
|
||||||
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">
|
: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
|
|
||||||
collapse-tags
|
|
||||||
collapse-tags-tooltip
|
|
||||||
:render-after-expand="false"
|
|
||||||
show-checkbox
|
|
||||||
clearable
|
|
||||||
placeholder="Select satellite type" />
|
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"
|
|
||||||
multiple
|
|
||||||
collapse-tags
|
|
||||||
collapse-tags-tooltip
|
|
||||||
:render-after-expand="false"
|
|
||||||
show-checkbox
|
|
||||||
clearable
|
|
||||||
placeholder="Select resolution" />
|
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"
|
|
||||||
align="center"
|
|
||||||
width="80"></el-table-column>
|
|
||||||
<el-table-column prop="satelliteCode"
|
|
||||||
label="Satellite code"
|
|
||||||
align="center"
|
|
||||||
show-overflow-tooltip></el-table-column>
|
show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="productTime"
|
<el-table-column prop="productTime" label="Product time" align="center"
|
||||||
label="Product time"
|
|
||||||
align="center"
|
|
||||||
show-overflow-tooltip></el-table-column>
|
show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="productBandsNum"
|
<el-table-column prop="productBandsNum" label="Product bands num" align="center"
|
||||||
label="Product bands num"
|
|
||||||
align="center"
|
|
||||||
show-overflow-tooltip></el-table-column>
|
show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="productResolution"
|
<el-table-column prop="productResolution" label="Product resolution(m)" align="center"
|
||||||
label="Product resolution(m)"
|
|
||||||
align="center"
|
|
||||||
show-overflow-tooltip></el-table-column>
|
show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="cloudCover"
|
<el-table-column prop="cloudCover" label="Cloud cover(%)" align="center"
|
||||||
label="Cloud cover(%)"
|
|
||||||
align="center"
|
|
||||||
show-overflow-tooltip></el-table-column>
|
show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="sourceOrganization"
|
<el-table-column prop="sourceOrganization" label="Source organization" align="center"
|
||||||
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>
|
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,15 +139,9 @@
|
||||||
</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"
|
|
||||||
: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">
|
:total="state.tableData.total">
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</div>
|
</div>
|
||||||
|
@ -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;
|
||||||
|
@ -637,9 +588,11 @@ const searchDisasterDate = () => {
|
||||||
.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"
|
|
||||||
:native="false">
|
|
||||||
<div v-for="(coordinate, i) in state.coordinateList ">
|
<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: ' +
|
||||||
|
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" @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>
|
||||||
|
@ -68,32 +55,23 @@
|
||||||
<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"
|
|
||||||
multiple
|
|
||||||
collapse-tags
|
|
||||||
collapse-tags-tooltip
|
|
||||||
:render-after-expand="false"
|
|
||||||
show-checkbox
|
|
||||||
placeholder="Select satellite type" />
|
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>
|
||||||
|
|
||||||
|
@ -131,12 +106,15 @@
|
||||||
|
|
||||||
<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 } from "element-plus";
|
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({
|
||||||
|
@ -313,6 +291,7 @@ const state = reactive({
|
||||||
lon: '',
|
lon: '',
|
||||||
disLat: '',
|
disLat: '',
|
||||||
disLon: '',
|
disLon: '',
|
||||||
|
data: {}
|
||||||
})
|
})
|
||||||
|
|
||||||
const onMapClick = (e) => {
|
const onMapClick = (e) => {
|
||||||
|
@ -428,38 +407,60 @@ const startCrawl = () => {
|
||||||
var param = {
|
var param = {
|
||||||
"stime": state.startTime,
|
"stime": state.startTime,
|
||||||
"etime": state.endTime,
|
"etime": state.endTime,
|
||||||
"disaster_id": state.selectID,
|
"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,
|
||||||
// startDate:state.startTime,
|
endDate: state.endTime,
|
||||||
// endDate:state.endTime,
|
manageId: userInfo.userInfos.id,
|
||||||
// manageId: userInfo.userInfos.id,
|
status: 0,
|
||||||
// status: 0,
|
disasterId: state.data.disasterId,
|
||||||
// disasterId: state.selectID,
|
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 => {
|
||||||
|
if (data == 'Sentinel') {
|
||||||
// rs(stime, etime, disaster_id, ranges, type = 1).then(res => {
|
rs(state.startTime, state.endTime, state.data.disasterId, ranges, type = 1, ret.id).then(res => {
|
||||||
// console.log(res);
|
// getData();
|
||||||
// // getData();
|
ElMessage({
|
||||||
// ElMessage({
|
message: 'Success, Start crawling. sentinel',
|
||||||
// message: 'Success, Start crawling.',
|
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(() => {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 清空搜索条件
|
// 清空搜索条件
|
||||||
|
@ -470,6 +471,7 @@ const ClearCondition = () => {
|
||||||
state.satelliteSelected = []
|
state.satelliteSelected = []
|
||||||
state.coordinateList = []
|
state.coordinateList = []
|
||||||
state.selectID = ''
|
state.selectID = ''
|
||||||
|
emit('response')
|
||||||
}
|
}
|
||||||
|
|
||||||
// 监听
|
// 监听
|
||||||
|
@ -481,17 +483,32 @@ watch(
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ immediate: true })
|
{ immediate: true })
|
||||||
|
const setData = (row) => {
|
||||||
|
state.data = row;
|
||||||
|
state.selectID = row.disasterId
|
||||||
|
map.value.mapOperations.wktParseToMap(row.geometry)
|
||||||
|
console.log(row)
|
||||||
|
}
|
||||||
|
defineExpose({
|
||||||
|
setData
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.rsSelect {
|
.rsSelect {
|
||||||
border: 1px solid #040728;
|
border: 1px solid #040728;
|
||||||
height: 52rem;
|
height: 52rem;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
display: block;
|
display: block;
|
||||||
margin-bottom: 3%;
|
margin-bottom: 3%;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.satelliteSelect,
|
.satelliteSelect,
|
||||||
.idSelect {
|
.idSelect {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
|
@ -501,16 +518,19 @@ watch(
|
||||||
.block {
|
.block {
|
||||||
margin-top: 2%;
|
margin-top: 2%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.demonstration {
|
.demonstration {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
float: left;
|
float: left;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.coordinateContainer {
|
.coordinateContainer {
|
||||||
margin: 3%;
|
margin: 3%;
|
||||||
height: 15px;
|
height: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.coordinateBtn {
|
.coordinateBtn {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
word-break: keep-all;
|
word-break: keep-all;
|
||||||
|
@ -518,11 +538,13 @@ watch(
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lowerBtn {
|
.lowerBtn {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
margin: 3% 0;
|
margin: 3% 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#map {
|
#map {
|
||||||
height: 52rem;
|
height: 52rem;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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">
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
||||||
highlight-current-row @row-click="tableClick">
|
highlight-current-row @row-click="tableClick">
|
||||||
<el-table-column type="index" label="ID" width="50" />
|
<el-table-column prop="vordmId" label="ID" width="118" />
|
||||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="disasterCountry" label="disaster country" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="disasterCountry" label="Disaster country" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="disasterTime" label="disaster time" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip></el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
|
<el-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
|
||||||
class="mt15" :pager-count="3" :page-sizes="[10, 20, 30]"
|
class="mt15" :pager-count="3" :page-sizes="[10, 20, 30]"
|
||||||
|
@ -34,24 +34,24 @@
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<ele-Upload />
|
<ele-Upload />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
upload
|
Upload
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="default" type="danger" class="ml10" @click="batchDel">
|
<el-button size="default" type="danger" class="ml10" @click="batchDel">
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<ele-Delete />
|
<ele-Delete />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
batch delete
|
Batch delete
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-change="handleClick" type="card">
|
<el-tabs v-model="activeName" class="demo-tabs" @tab-change="handleClick" type="card">
|
||||||
<el-tab-pane label="wordclouds" name="first">
|
<el-tab-pane label="Word cloud" name="first">
|
||||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading"
|
<el-table :data="state.tableData.data" v-loading="state.tableData.loading"
|
||||||
@selection-change="handleSelectionChange" style="width: 100%">
|
@selection-change="handleSelectionChange" style="width: 100%">
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column type="index" label="ID" width="50" />
|
<el-table-column type="index" label="ID" width="50" />
|
||||||
<el-table-column prop="date" label="date" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="date" label="Time" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="frequency" label="frequency" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="frequency" label="Frequency" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="word" label="word" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="word" label="Words" show-overflow-tooltip></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" @click="editWordCloud(scope.row)">Edit</el-button>
|
<el-button size="small" text type="primary" @click="editWordCloud(scope.row)">Edit</el-button>
|
||||||
|
@ -61,18 +61,18 @@
|
||||||
</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="3" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.pageNum"
|
:pager-count="3" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.pageNum"
|
||||||
background v-model:page-size="state.tableData.param.pageSize"
|
background v-model:page-size="state.tableData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||||
layout="total, sizes, prev, pager, next" :total="state.tableData.total">
|
:total="state.tableData.total">
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="hotspot" name="second">
|
<el-tab-pane label="Hotspot area" name="second">
|
||||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading"
|
<el-table :data="state.tableData.data" v-loading="state.tableData.loading"
|
||||||
@selection-change="handleSelectionHotspotChange" style="width: 100%">
|
@selection-change="handleSelectionHotspotChange" style="width: 100%">
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column type="index" label="ID" width="50" />
|
<el-table-column type="index" label="ID" width="50" />
|
||||||
<el-table-column prop="areaCn" label="area cn" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="areaCn" label="Area cn" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="areaEn" label="area en" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="areaEn" label="Area en" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="frequency" label="frequency" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="frequency" label="Frequency" show-overflow-tooltip></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" @click="editHotspot(scope.row)">Edit</el-button>
|
<el-button size="small" text type="primary" @click="editHotspot(scope.row)">Edit</el-button>
|
||||||
|
@ -82,8 +82,8 @@
|
||||||
</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="3" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.pageNum"
|
:pager-count="3" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.pageNum"
|
||||||
background v-model:page-size="state.tableData.param.pageSize"
|
background v-model:page-size="state.tableData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||||
layout="total, sizes, prev, pager, next" :total="state.tableData.total">
|
:total="state.tableData.total">
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
@ -212,6 +212,10 @@ const getDisasterData = () => {
|
||||||
state.disasterData.loading = true;
|
state.disasterData.loading = true;
|
||||||
getDisasterPage(state.disasterData.param.pageNum, state.disasterData.param.pageSize, {}).then(res => {
|
getDisasterPage(state.disasterData.param.pageNum, state.disasterData.param.pageSize, {}).then(res => {
|
||||||
state.disasterData.data = res.records;
|
state.disasterData.data = res.records;
|
||||||
|
state.disasterData.data.forEach(item=>{
|
||||||
|
let date = item.disasterTime.slice(0,10);
|
||||||
|
item.disasterTime = date;
|
||||||
|
})
|
||||||
state.disasterData.total = res.total;
|
state.disasterData.total = res.total;
|
||||||
state.disasterData.loading = false;
|
state.disasterData.loading = false;
|
||||||
})
|
})
|
||||||
|
@ -366,6 +370,7 @@ onMounted(() => {
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mt15 {
|
.mt15 {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: end;
|
justify-content: end;
|
||||||
|
|
|
@ -1,5 +1,15 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="home-container layout-pd">
|
<div class="home-container layout-pd">
|
||||||
|
<el-row :gutter="15"
|
||||||
|
class="home-card-one mb15" style="margin-left:0">
|
||||||
|
<el-date-picker style=""
|
||||||
|
v-model="state.year"
|
||||||
|
type="year"
|
||||||
|
placeholder="Select year"
|
||||||
|
/>
|
||||||
|
<el-button style="margin-left: 10px;"
|
||||||
|
@click="getDashBoradData">Search</el-button>
|
||||||
|
</el-row>
|
||||||
<!-- 第一行 -->
|
<!-- 第一行 -->
|
||||||
<el-row :gutter="15"
|
<el-row :gutter="15"
|
||||||
class="home-card-one mb15">
|
class="home-card-one mb15">
|
||||||
|
@ -24,7 +34,8 @@
|
||||||
:style="{ background: `var(${v.color2})` }">
|
:style="{ background: `var(${v.color2})` }">
|
||||||
<i class="flex-margin font32"
|
<i class="flex-margin font32"
|
||||||
:class="v.num4"
|
:class="v.num4"
|
||||||
:style="{ color: `var(${v.color3})` }"></i>
|
:style="{ color: `var(${v.color3})`,width:'44px',height:'44px',background:'url(\'/home/'+(k+1)+'.png\') no-repeat',
|
||||||
|
backgroundSize: '70% 70%', backgroundPosition:'center'}"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -33,77 +44,97 @@
|
||||||
<!-- 第二行 -->
|
<!-- 第二行 -->
|
||||||
<el-row :gutter="15"
|
<el-row :gutter="15"
|
||||||
class="home-card-two mb15">
|
class="home-card-two mb15">
|
||||||
<!-- 后台响应须知 -->
|
<!-- 响应和发起量统计 -->
|
||||||
<el-col :xs="24"
|
<el-col :xs="24"
|
||||||
:sm="10"
|
:sm="12"
|
||||||
:md="10"
|
:md="12"
|
||||||
:lg="8"
|
:lg="12"
|
||||||
:xl="8">
|
:xl="12">
|
||||||
<div class="home-card-item">
|
<div class="home-card-item">
|
||||||
<div class="home-card-item-title">Notes on Background Response</div>
|
<div style="height: 100%" ref="homeLineRef"></div>
|
||||||
<div class="home-monitor">
|
|
||||||
<div class="flex-warp">
|
|
||||||
更新日期:2023-03-31<br />
|
|
||||||
注意事项:<br />
|
|
||||||
~对用户申请进行严格审核<br />
|
|
||||||
~对用户提供灾害经纬度范围进行校正<br />
|
|
||||||
~如响应及时,社交媒体数据的Twitter数据直接实时获取即可<br />
|
|
||||||
~数据导出时需检查是否爬取完毕<br />
|
|
||||||
~如灾害发生期间没有遥感数据,在未来一段时间需及时查询更新<br />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- 全年用户申请量统计 -->
|
<!-- 全年用户访问量和下载量 -->
|
||||||
<el-col :xs="24"
|
<el-col :xs="24"
|
||||||
:sm="14"
|
:sm="12"
|
||||||
:md="14"
|
:md="12"
|
||||||
:lg="16"
|
:lg="12"
|
||||||
:xl="16">
|
:xl="12">
|
||||||
|
<div class="home-card-item">
|
||||||
|
<div style="height: 100%"
|
||||||
|
ref="homeVandDRef"></div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<!-- 第三行 -->
|
||||||
|
<el-row :gutter="15"
|
||||||
|
class="home-card-three mb15">
|
||||||
|
<!-- chief管理 -->
|
||||||
|
<el-col :xs="24"
|
||||||
|
:sm="24"
|
||||||
|
:md="24"
|
||||||
|
:lg="12"
|
||||||
|
:xl="12">
|
||||||
|
<div class="home-card-item">
|
||||||
|
<div style="height: 100%"
|
||||||
|
ref="homeUploadRef"></div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<!-- administrators管理 -->
|
||||||
|
<el-col :xs="24"
|
||||||
|
:sm="24"
|
||||||
|
:md="24"
|
||||||
|
:lg="12"
|
||||||
|
:xl="12">
|
||||||
<div class="home-card-item">
|
<div class="home-card-item">
|
||||||
<div style="height: 100%"
|
<div style="height: 100%"
|
||||||
ref="homeBarRef"></div>
|
ref="homeBarRef"></div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- 第三行 -->
|
<!-- 第四行 -->
|
||||||
<el-row :gutter="15"
|
<el-row :gutter="15"
|
||||||
class="home-card-three">
|
class="home-card-four mb15">
|
||||||
<!-- 灾害发生区域占比 饼图-->
|
<!-- 灾害发生区域占比 饼图-->
|
||||||
<el-col :xs="24"
|
<el-col :xs="24"
|
||||||
:sm="10"
|
:sm="24"
|
||||||
:md="10"
|
:md="24"
|
||||||
:lg="6"
|
:lg="24"
|
||||||
:xl="6">
|
:xl="24">
|
||||||
<div class="home-card-item">
|
<div class="home-card-item" style="display: flex;height: 460px;">
|
||||||
<div style="height: 100%"
|
<div style="height: 100%;width: 58%;"
|
||||||
ref="homePieRef"></div>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
<!-- 灾害响应月分布量变化 折线图 -->
|
|
||||||
<el-col :xs="24"
|
|
||||||
:sm="14"
|
|
||||||
:md="14"
|
|
||||||
:lg="12"
|
|
||||||
:xl="12"
|
|
||||||
class="home-media">
|
|
||||||
<div class="home-card-item">
|
|
||||||
<div style="height: 100%"
|
|
||||||
ref="homeLineRef"></div>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
<!-- 灾害类型占比 -->
|
|
||||||
<el-col :xs="24"
|
|
||||||
:sm="10"
|
|
||||||
:md="10"
|
|
||||||
:lg="6"
|
|
||||||
:xl="6">
|
|
||||||
<div class="home-card-item">
|
|
||||||
<div style="height: 100%"
|
|
||||||
ref="homePieRef2"></div>
|
ref="homePieRef2"></div>
|
||||||
|
<div style="height: 100%;width: 42%;overflow-y: auto;">
|
||||||
|
<el-table :data="state.typeTable" style="width: 100%">
|
||||||
|
<el-table-column type="index" label="TOP" width="100" align="center"/>
|
||||||
|
<el-table-column prop="name" label="Disaster type" show-overflow-tooltip align="center"></el-table-column>
|
||||||
|
<el-table-column prop="value" label="Number" show-overflow-tooltip align="center"></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<!-- 第五行 -->
|
||||||
|
<el-row :gutter="15"
|
||||||
|
class="home-card-five mb15">
|
||||||
|
<!-- 灾害发生区域占比 饼图-->
|
||||||
|
<el-col :xs="24"
|
||||||
|
:sm="24"
|
||||||
|
:md="24"
|
||||||
|
:lg="24"
|
||||||
|
:xl="24">
|
||||||
|
<div class="home-card-item" style="display: flex;height: 554px;">
|
||||||
|
<div style="height: 100%;width: 58%;"
|
||||||
|
ref="homePieRef"></div>
|
||||||
|
<div style="height: 100%;width: 42%;overflow-y: auto;">
|
||||||
|
<el-table :data="state.countryTable" style="width: 100%">
|
||||||
|
<el-table-column type="index" label="TOP" width="100" align="center"/>
|
||||||
|
<el-table-column prop="name" label="Country" show-overflow-tooltip align="center"></el-table-column>
|
||||||
|
<el-table-column prop="value" label="Number" show-overflow-tooltip align="center"></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -116,7 +147,13 @@ import { useThemeConfig } from '/@/stores/themeConfig';
|
||||||
import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';
|
import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';
|
||||||
import {statistics} from '/@/api/disasterInfo/index.js';
|
import {statistics} from '/@/api/disasterInfo/index.js';
|
||||||
// 定义变量内容
|
// 定义变量内容
|
||||||
|
//响应量 发起量
|
||||||
const homeLineRef = ref();
|
const homeLineRef = ref();
|
||||||
|
//访问量和下载量
|
||||||
|
const homeVandDRef = ref();
|
||||||
|
//上传次数统计
|
||||||
|
const homeUploadRef = ref();
|
||||||
|
|
||||||
const homePieRef = ref();
|
const homePieRef = ref();
|
||||||
const homePieRef2 = ref();
|
const homePieRef2 = ref();
|
||||||
const homeBarRef = ref();
|
const homeBarRef = ref();
|
||||||
|
@ -125,9 +162,14 @@ const storesThemeConfig = useThemeConfig();
|
||||||
const { themeConfig } = storeToRefs(storesThemeConfig);
|
const { themeConfig } = storeToRefs(storesThemeConfig);
|
||||||
const { isTagsViewCurrenFull } = storeToRefs(storesTagsViewRoutes);
|
const { isTagsViewCurrenFull } = storeToRefs(storesTagsViewRoutes);
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
|
param:{
|
||||||
|
year:''
|
||||||
|
},
|
||||||
|
year:new Date,
|
||||||
global: {
|
global: {
|
||||||
homeChartOne: null,
|
homeChartOne: null,
|
||||||
|
homeVandD:null,
|
||||||
|
homeUpload:null,
|
||||||
homeChartTwo: null,
|
homeChartTwo: null,
|
||||||
homeCharThree: null,
|
homeCharThree: null,
|
||||||
homeChartFour: null,
|
homeChartFour: null,
|
||||||
|
@ -138,7 +180,7 @@ const state = reactive({
|
||||||
num1: '',
|
num1: '',
|
||||||
num2: '',
|
num2: '',
|
||||||
num3: 'Number of Disaster Response Applications',
|
num3: 'Number of Disaster Response Applications',
|
||||||
num4: 'fa fa-meetup',
|
num4: 'iconfont',
|
||||||
color1: '#FF6462',
|
color1: '#FF6462',
|
||||||
color2: '--next-color-primary-lighter',
|
color2: '--next-color-primary-lighter',
|
||||||
color3: '--el-color-primary',
|
color3: '--el-color-primary',
|
||||||
|
@ -147,7 +189,7 @@ const state = reactive({
|
||||||
num1: '',
|
num1: '',
|
||||||
num2: '',
|
num2: '',
|
||||||
num3: 'Actual times of disaster response',
|
num3: 'Actual times of disaster response',
|
||||||
num4: 'iconfont icon-ditu',
|
num4: 'iconfont',
|
||||||
color1: '#6690F9',
|
color1: '#6690F9',
|
||||||
color2: '--next-color-success-lighter',
|
color2: '--next-color-success-lighter',
|
||||||
color3: '--el-color-success',
|
color3: '--el-color-success',
|
||||||
|
@ -156,7 +198,7 @@ const state = reactive({
|
||||||
num1: '',
|
num1: '',
|
||||||
num2: '',
|
num2: '',
|
||||||
num3: 'User Visits',
|
num3: 'User Visits',
|
||||||
num4: 'iconfont icon-zaosheng',
|
num4: 'iconfont',
|
||||||
color1: '#6690F9',
|
color1: '#6690F9',
|
||||||
color2: '--next-color-warning-lighter',
|
color2: '--next-color-warning-lighter',
|
||||||
color3: '--el-color-warning',
|
color3: '--el-color-warning',
|
||||||
|
@ -165,110 +207,61 @@ const state = reactive({
|
||||||
num1: '',
|
num1: '',
|
||||||
num2: '',
|
num2: '',
|
||||||
num3: 'Data downloads',
|
num3: 'Data downloads',
|
||||||
num4: 'fa fa-github-alt',
|
num4: 'iconfont',
|
||||||
color1: '#FF6462',
|
color1: '#FF6462',
|
||||||
color2: '--next-color-danger-lighter',
|
color2: '--next-color-danger-lighter',
|
||||||
color3: '--el-color-danger',
|
color3: '--el-color-danger',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
homeThree: [
|
homeThree: [],
|
||||||
{
|
|
||||||
icon: 'iconfont icon-yangan',
|
|
||||||
label: '浅粉红',
|
|
||||||
value: '2.1%OBS/M',
|
|
||||||
iconColor: '#F72B3F',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: 'iconfont icon-wendu',
|
|
||||||
label: '深红(猩红)',
|
|
||||||
value: '30℃',
|
|
||||||
iconColor: '#91BFF8',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: 'iconfont icon-shidu',
|
|
||||||
label: '淡紫红',
|
|
||||||
value: '57%RH',
|
|
||||||
iconColor: '#88D565',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: 'iconfont icon-shidu',
|
|
||||||
label: '弱紫罗兰红',
|
|
||||||
value: '107w',
|
|
||||||
iconColor: '#88D565',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: 'iconfont icon-zaosheng',
|
|
||||||
label: '中紫罗兰红',
|
|
||||||
value: '57DB',
|
|
||||||
iconColor: '#FBD4A0',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: 'iconfont icon-zaosheng',
|
|
||||||
label: '紫罗兰',
|
|
||||||
value: '57PV',
|
|
||||||
iconColor: '#FBD4A0',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: 'iconfont icon-zaosheng',
|
|
||||||
label: '暗紫罗兰',
|
|
||||||
value: '517Cpd',
|
|
||||||
iconColor: '#FBD4A0',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: 'iconfont icon-zaosheng',
|
|
||||||
label: '幽灵白',
|
|
||||||
value: '12kg',
|
|
||||||
iconColor: '#FBD4A0',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: 'iconfont icon-zaosheng',
|
|
||||||
label: '海军蓝',
|
|
||||||
value: '64fm',
|
|
||||||
iconColor: '#FBD4A0',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
myCharts: [],
|
myCharts: [],
|
||||||
charts: {
|
charts: {
|
||||||
theme: '',
|
theme: '',
|
||||||
bgColor: '',
|
bgColor: '',
|
||||||
color: '#303133',
|
color: '#303133',
|
||||||
},
|
},
|
||||||
|
countryTable:[],
|
||||||
|
typeTable:[]
|
||||||
});
|
});
|
||||||
|
|
||||||
// 折线图
|
|
||||||
const initLineChart = (xData,data) => {
|
// 响应量和发起量
|
||||||
console.log(xData)
|
const initLineChart = (xData,data1, data2) => {
|
||||||
console.log(data)
|
|
||||||
if (!state.global.dispose.some((b) => b === state.global.homeChartOne)) state.global.homeChartOne.dispose();
|
if (!state.global.dispose.some((b) => b === state.global.homeChartOne)) state.global.homeChartOne.dispose();
|
||||||
state.global.homeChartOne = markRaw(echarts.init(homeLineRef.value, state.charts.theme));
|
state.global.homeChartOne = markRaw(echarts.init(homeLineRef.value, state.charts.theme));
|
||||||
const option = {
|
const option = {
|
||||||
backgroundColor: state.charts.bgColor,
|
backgroundColor: state.charts.bgColor,
|
||||||
title: {
|
title: {
|
||||||
text: 'Annual user application statistics',
|
text: 'Annual user response application statistics',
|
||||||
x: 'left',
|
x: 'left',
|
||||||
textStyle: { fontSize: '15', color: state.charts.color },
|
textStyle: { fontSize: '15', color: state.charts.color },
|
||||||
},
|
},
|
||||||
grid: { top: 70, right: 20, bottom: 30, left: 30 },
|
grid: { top: 70, right: 20, bottom: 30, left: 30 },
|
||||||
tooltip: { trigger: 'axis' },
|
tooltip: { trigger: 'axis' },
|
||||||
legend: { data: ['响应量'], right: 0 },
|
legend: { data: ['response','initiate'], right: 0 },
|
||||||
xAxis: {
|
xAxis: {
|
||||||
data: xData,
|
data: xData
|
||||||
},
|
},
|
||||||
yAxis: [
|
yAxis: [
|
||||||
{
|
{
|
||||||
type: 'value',
|
type: 'value',
|
||||||
name: '响应量',
|
name: 'response',
|
||||||
splitLine: { show: true, lineStyle: { type: 'dashed', color: '#f5f5f5' } },
|
splitLine: { show: true, lineStyle: { type: 'dashed', color: '#f5f5f5' } },
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: 'value',
|
||||||
|
name: 'initiate',
|
||||||
|
splitLine: { show: true, lineStyle: { type: 'dashed', color: '#f5f5f5' } },
|
||||||
|
}
|
||||||
],
|
],
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: '响应量',
|
name: 'response',
|
||||||
type: 'line',
|
type: 'line',
|
||||||
symbolSize: 6,
|
symbolSize: 6,
|
||||||
symbol: 'circle',
|
symbol: 'circle',
|
||||||
smooth: true,
|
smooth: true,
|
||||||
data: data,
|
data: data1,
|
||||||
lineStyle: { color: '#fe9a8b' },
|
lineStyle: { color: '#fe9a8b' },
|
||||||
itemStyle: { color: '#fe9a8b', borderColor: '#fe9a8b' },
|
itemStyle: { color: '#fe9a8b', borderColor: '#fe9a8b' },
|
||||||
areaStyle: {
|
areaStyle: {
|
||||||
|
@ -277,12 +270,200 @@ const initLineChart = (xData,data) => {
|
||||||
{ offset: 1, color: '#fe9a8b03' },
|
{ offset: 1, color: '#fe9a8b03' },
|
||||||
]),
|
]),
|
||||||
},
|
},
|
||||||
|
},{
|
||||||
|
name: 'initiate',
|
||||||
|
type: 'line',
|
||||||
|
symbolSize: 6,
|
||||||
|
symbol: 'circle',
|
||||||
|
smooth: true,
|
||||||
|
data: data2,
|
||||||
|
lineStyle: { color: '#44c05b' },
|
||||||
|
itemStyle: { color: '#44c05b', borderColor: '#44c05b' },
|
||||||
|
areaStyle: {
|
||||||
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
|
{ offset: 0, color: '#44c05b' },
|
||||||
|
{ offset: 1, color: '#44c05b' },
|
||||||
|
]),
|
||||||
},
|
},
|
||||||
|
}
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
state.global.homeChartOne.setOption(option);
|
state.global.homeChartOne.setOption(option);
|
||||||
state.myCharts.push(state.global.homeChartOne);
|
state.myCharts.push(state.global.homeChartOne);
|
||||||
};
|
};
|
||||||
|
// 访问量 和下载次数
|
||||||
|
const initLineVandDChart = (xData,data1, data2) => {
|
||||||
|
if (!state.global.dispose.some((b) => b === state.global.homeVandD)) state.global.homeVandD.dispose();
|
||||||
|
state.global.homeVandD = markRaw(echarts.init(homeVandDRef.value, state.charts.theme));
|
||||||
|
const option = {
|
||||||
|
backgroundColor: state.charts.bgColor,
|
||||||
|
title: {
|
||||||
|
text: 'Annual disaster type visits and downloads statistics',
|
||||||
|
x: 'left',
|
||||||
|
textStyle: { fontSize: '15', color: state.charts.color },
|
||||||
|
},
|
||||||
|
grid: { top: 70, right: 20, bottom: 30, left: 30 },
|
||||||
|
tooltip: { trigger: 'axis' },
|
||||||
|
legend: { data: ['visit','download'], right: 0 },
|
||||||
|
xAxis: {
|
||||||
|
data: xData,
|
||||||
|
},
|
||||||
|
yAxis: [
|
||||||
|
{
|
||||||
|
type: 'value',
|
||||||
|
name: 'visit',
|
||||||
|
splitLine: { show: true, lineStyle: { type: 'dashed', color: '#f5f5f5' } },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'value',
|
||||||
|
name: 'download',
|
||||||
|
splitLine: { show: true, lineStyle: { type: 'dashed', color: '#f5f5f5' } },
|
||||||
|
}
|
||||||
|
],
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: 'visit',
|
||||||
|
type: 'line',
|
||||||
|
symbolSize: 6,
|
||||||
|
symbol: 'circle',
|
||||||
|
smooth: true,
|
||||||
|
data: data2,
|
||||||
|
lineStyle: { color: '#3d91e7' },
|
||||||
|
itemStyle: { color: '#3d91e7', borderColor: '#3d91e7' },
|
||||||
|
areaStyle: {
|
||||||
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
|
{ offset: 0, color: '#3d91e7' },
|
||||||
|
{ offset: 1, color: '#3d91e7' },
|
||||||
|
]),
|
||||||
|
},
|
||||||
|
},{
|
||||||
|
name: 'download',
|
||||||
|
type: 'line',
|
||||||
|
symbolSize: 6,
|
||||||
|
symbol: 'circle',
|
||||||
|
smooth: true,
|
||||||
|
data: data1,
|
||||||
|
lineStyle: { color: '#e78d3d' },
|
||||||
|
itemStyle: { color: '#e78d3d', borderColor: '#e78d3d' },
|
||||||
|
areaStyle: {
|
||||||
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
|
{ offset: 0, color: '#e78d3d' },
|
||||||
|
{ offset: 1, color: '#e78d3d' },
|
||||||
|
]),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
],
|
||||||
|
};
|
||||||
|
state.global.homeVandD.setOption(option);
|
||||||
|
state.myCharts.push(state.global.homeVandD);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Chief 管理
|
||||||
|
const initChiefChart = (xData,yData) => {
|
||||||
|
if (!state.global.dispose.some((b) => b === state.global.homeUpload)) state.global.homeUpload.dispose();
|
||||||
|
state.global.homeUpload = echarts.init(homeUploadRef.value, state.charts.theme);
|
||||||
|
const option = {
|
||||||
|
backgroundColor: state.charts.bgColor,
|
||||||
|
title: {
|
||||||
|
text: 'Annual Chief Management Statistics TOP10',
|
||||||
|
x: 'left',
|
||||||
|
textStyle: { fontSize: '15', color: state.charts.color },
|
||||||
|
},
|
||||||
|
//tooltip: { trigger: 'item', formatter: '{c}' },
|
||||||
|
tooltip: {
|
||||||
|
show:true
|
||||||
|
// trigger: 'axis',
|
||||||
|
// axisPointer: {
|
||||||
|
// type: 'shadow'
|
||||||
|
// },
|
||||||
|
// formatter: '{c}'
|
||||||
|
},
|
||||||
|
legend: { data: ['chief'], right: 0 },
|
||||||
|
grid: { top: 70, right: 80, bottom: 30, left: 80 },
|
||||||
|
xAxis: [
|
||||||
|
{
|
||||||
|
type: 'category',
|
||||||
|
data: xData
|
||||||
|
},
|
||||||
|
],
|
||||||
|
yAxis: [
|
||||||
|
{
|
||||||
|
type:'value'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: 'chief',
|
||||||
|
type: 'bar',
|
||||||
|
barWidth: 30,
|
||||||
|
itemStyle: {
|
||||||
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
|
{ offset: 0, color: '#fe9a8bb3' },
|
||||||
|
{ offset: 1, color: '#fe9a8b03' },
|
||||||
|
]),
|
||||||
|
//柱状图圆角
|
||||||
|
borderRadius: [30, 30, 0, 0],
|
||||||
|
},
|
||||||
|
data: yData
|
||||||
|
}
|
||||||
|
],
|
||||||
|
};
|
||||||
|
state.global.homeUpload.setOption(option);
|
||||||
|
state.myCharts.push(state.global.homeUpload);
|
||||||
|
};
|
||||||
|
// administrators 管理
|
||||||
|
const initAdministratorsChart = (xData,yData) => {
|
||||||
|
if (!state.global.dispose.some((b) => b === state.global.homeCharThree)) state.global.homeCharThree.dispose();
|
||||||
|
state.global.homeCharThree = echarts.init(homeBarRef.value, state.charts.theme);
|
||||||
|
const option = {
|
||||||
|
backgroundColor: state.charts.bgColor,
|
||||||
|
title: {
|
||||||
|
text: 'Annual Administrators Management Statistics TOP10',
|
||||||
|
x: 'left',
|
||||||
|
textStyle: { fontSize: '15', color: state.charts.color },
|
||||||
|
},
|
||||||
|
tooltip: { trigger: 'item', formatter: '{c}' },
|
||||||
|
legend: { data: ['administrators'], right: 0 },
|
||||||
|
grid: { top: 70, right: 80, bottom: 30, left: 80 },
|
||||||
|
xAxis: [
|
||||||
|
{
|
||||||
|
type: 'category',
|
||||||
|
data: xData,
|
||||||
|
boundaryGap: true,
|
||||||
|
axisTick: { show: false },
|
||||||
|
},
|
||||||
|
],
|
||||||
|
yAxis: [
|
||||||
|
{
|
||||||
|
nameLocation: 'middle',
|
||||||
|
nameTextStyle: { padding: [50, 4, 5, 6] },
|
||||||
|
splitLine: { show: false },
|
||||||
|
axisLine: { show: false },
|
||||||
|
axisTick: { show: false },
|
||||||
|
axisLabel: { color: state.charts.color, formatter: '{value} ' },
|
||||||
|
},
|
||||||
|
],
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: 'administrators',
|
||||||
|
type: 'bar',
|
||||||
|
barWidth: 30,
|
||||||
|
yAxisIndex: 0,
|
||||||
|
itemStyle: {
|
||||||
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
|
{ offset: 0, color: 'rgba(108,80,243,0.3)' },
|
||||||
|
{ offset: 1, color: 'rgba(108,80,243,0)' },
|
||||||
|
]),
|
||||||
|
//柱状图圆角
|
||||||
|
borderRadius: [30, 30, 0, 0],
|
||||||
|
},
|
||||||
|
data: yData,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
state.global.homeCharThree.setOption(option);
|
||||||
|
state.myCharts.push(state.global.homeCharThree);
|
||||||
|
};
|
||||||
//homePieRef 灾害发生区域占比 饼图
|
//homePieRef 灾害发生区域占比 饼图
|
||||||
const initPieChart = (data) => {
|
const initPieChart = (data) => {
|
||||||
if (!state.global.dispose.some((b) => b === state.global.homeChartTwo)) state.global.homeChartTwo.dispose();
|
if (!state.global.dispose.some((b) => b === state.global.homeChartTwo)) state.global.homeChartTwo.dispose();
|
||||||
|
@ -297,7 +478,7 @@ const initPieChart = (data) => {
|
||||||
const option = {
|
const option = {
|
||||||
backgroundColor: state.charts.bgColor,
|
backgroundColor: state.charts.bgColor,
|
||||||
title: {
|
title: {
|
||||||
text: 'Proportion of Disaster Occurred Areas',
|
text: 'Proportion of Disaster Occurred Areas TOP15',
|
||||||
x: 'left',
|
x: 'left',
|
||||||
textStyle: { fontSize: '15', color: state.charts.color },
|
textStyle: { fontSize: '15', color: state.charts.color },
|
||||||
},
|
},
|
||||||
|
@ -365,7 +546,6 @@ const initPieChart = (data) => {
|
||||||
};
|
};
|
||||||
//homePieRef2 灾害类型占比 饼图
|
//homePieRef2 灾害类型占比 饼图
|
||||||
const initPieChart2 = (data) => {
|
const initPieChart2 = (data) => {
|
||||||
console.log("pie2",data)
|
|
||||||
if (!state.global.dispose.some((b) => b === state.global.homeChartFour)) state.global.homeChartFour.dispose();
|
if (!state.global.dispose.some((b) => b === state.global.homeChartFour)) state.global.homeChartFour.dispose();
|
||||||
state.global.homeChartFour = markRaw(echarts.init(homePieRef2.value, state.charts.theme));
|
state.global.homeChartFour = markRaw(echarts.init(homePieRef2.value, state.charts.theme));
|
||||||
// var getname = ['房屋及结构物', '专用设备', '通用设备', '文物和陈列品', '图书、档案'];
|
// var getname = ['房屋及结构物', '专用设备', '通用设备', '文物和陈列品', '图书、档案'];
|
||||||
|
@ -400,36 +580,6 @@ const initPieChart2 = (data) => {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
// legend: {
|
|
||||||
// type: 'scroll',
|
|
||||||
// orient: 'vertical',
|
|
||||||
// right: '0%',
|
|
||||||
// left: '65%',
|
|
||||||
// top: 'center',
|
|
||||||
// itemWidth: 14,
|
|
||||||
// itemHeight: 14,
|
|
||||||
// data: getname,
|
|
||||||
// textStyle: {
|
|
||||||
// rich: {
|
|
||||||
// name: {
|
|
||||||
// fontSize: 14,
|
|
||||||
// fontWeight: 400,
|
|
||||||
// width: 200,
|
|
||||||
// height: 35,
|
|
||||||
// padding: [0, 0, 0, 60],
|
|
||||||
// color: state.charts.color,
|
|
||||||
// },
|
|
||||||
// rate: {
|
|
||||||
// fontSize: 15,
|
|
||||||
// fontWeight: 500,
|
|
||||||
// height: 35,
|
|
||||||
// width: 40,
|
|
||||||
// padding: [0, 0, 0, 30],
|
|
||||||
// color: state.charts.color,
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
|
@ -444,59 +594,6 @@ const initPieChart2 = (data) => {
|
||||||
state.global.homeChartFour.setOption(option);
|
state.global.homeChartFour.setOption(option);
|
||||||
state.myCharts.push(state.global.homeChartFour);
|
state.myCharts.push(state.global.homeChartFour);
|
||||||
};
|
};
|
||||||
// 柱状图
|
|
||||||
const initBarChart = (xData,yData) => {
|
|
||||||
if (!state.global.dispose.some((b) => b === state.global.homeCharThree)) state.global.homeCharThree.dispose();
|
|
||||||
state.global.homeCharThree = echarts.init(homeBarRef.value, state.charts.theme);
|
|
||||||
const option = {
|
|
||||||
backgroundColor: state.charts.bgColor,
|
|
||||||
title: {
|
|
||||||
text: 'Disaster response monthly distribution change',
|
|
||||||
x: 'left',
|
|
||||||
textStyle: { fontSize: '15', color: state.charts.color },
|
|
||||||
},
|
|
||||||
tooltip: { trigger: 'item', formatter: '{c}' },
|
|
||||||
legend: { data: ['申请量'], top: 0 },
|
|
||||||
grid: { top: 70, right: 80, bottom: 30, left: 80 },
|
|
||||||
xAxis: [
|
|
||||||
{
|
|
||||||
type: 'category',
|
|
||||||
data: xData,
|
|
||||||
boundaryGap: true,
|
|
||||||
axisTick: { show: false },
|
|
||||||
},
|
|
||||||
],
|
|
||||||
yAxis: [
|
|
||||||
{
|
|
||||||
nameLocation: 'middle',
|
|
||||||
nameTextStyle: { padding: [50, 4, 5, 6] },
|
|
||||||
splitLine: { show: false },
|
|
||||||
axisLine: { show: false },
|
|
||||||
axisTick: { show: false },
|
|
||||||
axisLabel: { color: state.charts.color, formatter: '{value} ' },
|
|
||||||
},
|
|
||||||
],
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: '申请量',
|
|
||||||
type: 'bar',
|
|
||||||
barWidth: 30,
|
|
||||||
yAxisIndex: 0,
|
|
||||||
itemStyle: {
|
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
||||||
{ offset: 0, color: 'rgba(108,80,243,0.3)' },
|
|
||||||
{ offset: 1, color: 'rgba(108,80,243,0)' },
|
|
||||||
]),
|
|
||||||
//柱状图圆角
|
|
||||||
borderRadius: [30, 30, 0, 0],
|
|
||||||
},
|
|
||||||
data: yData,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
state.global.homeCharThree.setOption(option);
|
|
||||||
state.myCharts.push(state.global.homeCharThree);
|
|
||||||
};
|
|
||||||
// 批量设置 echarts resize
|
// 批量设置 echarts resize
|
||||||
const initEchartsResizeFun = () => {
|
const initEchartsResizeFun = () => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
@ -518,68 +615,110 @@ const setHeadData = (data) => {
|
||||||
state.homeOne[3].num1 = data.downloadCount
|
state.homeOne[3].num1 = data.downloadCount
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 设置发生区域灾害占比
|
* 设置响应量和发起量
|
||||||
* @param data
|
* @param data
|
||||||
*/
|
*/
|
||||||
const setDisasterArea = (data) => {
|
const setLineChart = (data) => {
|
||||||
let arr = [];
|
let xData = [];
|
||||||
for(let [k , v] of Object.entries(data)){
|
//let yData = [];
|
||||||
arr.push({ name: k, value: v});
|
let data1 = [];//initiate
|
||||||
}
|
let data2 = [];//response
|
||||||
initPieChart(arr);
|
data.forEach(item=>{
|
||||||
|
xData.push(item.key)
|
||||||
|
data1.push(item.initiate)
|
||||||
|
data2.push(item.response)
|
||||||
|
})
|
||||||
|
// 响应量和发起量
|
||||||
|
initLineChart(xData,data1,data2);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 设置灾害响应月份分布量
|
* 设置访问量 和下载次数
|
||||||
* @param data
|
* @param data
|
||||||
*/
|
*/
|
||||||
const setResponseDisaster = (data) => {
|
const setLineVandDChart = (data) => {
|
||||||
|
let xData = [];
|
||||||
|
let data1 = [];
|
||||||
|
let data2 = [];
|
||||||
|
data.forEach(item=>{
|
||||||
|
xData.push(item.dict_value)
|
||||||
|
data1.push(item.download)
|
||||||
|
data2.push(item.visit)
|
||||||
|
})
|
||||||
|
//访问量 和下载次数
|
||||||
|
initLineVandDChart(xData,data1, data2)
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 管理员管理量
|
||||||
|
* @param data
|
||||||
|
*/
|
||||||
|
const setAdministratorsChart = (data) => {
|
||||||
let xData = [];
|
let xData = [];
|
||||||
let yData = [];
|
let yData = [];
|
||||||
data.forEach(item=>{
|
data.forEach(item=>{
|
||||||
for(let [k , v] of Object.entries(item)){
|
xData.push(item.name)
|
||||||
xData.push(k);
|
yData.push(item.val)
|
||||||
yData.push(v.value);
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
initLineChart(xData,yData);
|
initAdministratorsChart(xData,yData);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 设置灾害申请月份分布量
|
* 管理员管理量
|
||||||
* @param data
|
* @param data
|
||||||
*/
|
*/
|
||||||
const setApplyDisaster = (data) => {
|
const setChiefChart = (data) => {
|
||||||
let xData = [];
|
let xData = [];
|
||||||
let yData = [];
|
let yData = [];
|
||||||
data.forEach(item=>{
|
data.forEach(item=>{
|
||||||
for(let [k , v] of Object.entries(item)){
|
xData.push(item.name)
|
||||||
xData.push(k);
|
yData.push(item.val)
|
||||||
yData.push(v.value);
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
setTimeout(() => {
|
initChiefChart(xData,yData);
|
||||||
initBarChart(xData,yData);
|
|
||||||
}, 700);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 设置灾种数量占比
|
* 设置灾种数量占比
|
||||||
* @param data
|
* @param data
|
||||||
*/
|
*/
|
||||||
const setDisasterType = (data) => {
|
const setDisasterType = (data) => {
|
||||||
|
let arr = [];
|
||||||
|
data.forEach(item=>{
|
||||||
|
arr.push({ name: item.name, value: item.val});
|
||||||
|
})
|
||||||
|
// for(let [k , v] of Object.entries(data)){
|
||||||
|
// arr.push({ name: k, value: v});
|
||||||
|
|
||||||
|
// }
|
||||||
|
state.typeTable = arr
|
||||||
|
initPieChart2(arr)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置发生区域灾害占比 Proportion of Disaster Occurred Areas TOP15
|
||||||
|
* @param data
|
||||||
|
*/
|
||||||
|
const setDisasterArea = (data) => {
|
||||||
let arr = [];
|
let arr = [];
|
||||||
for(let [k , v] of Object.entries(data)){
|
for(let [k , v] of Object.entries(data)){
|
||||||
arr.push({ name: k, value: v});
|
arr.push({ name: k, value: v});
|
||||||
}
|
}
|
||||||
initPieChart2(arr)
|
state.countryTable = arr
|
||||||
|
initPieChart(arr);
|
||||||
}
|
}
|
||||||
//获取控制台数据
|
//获取控制台数据
|
||||||
const getDashBoradData = () => {
|
const getDashBoradData = () => {
|
||||||
statistics().then(res=>{
|
state.param.year = state.year.getFullYear()
|
||||||
|
statistics(state.param.year).then(res=>{
|
||||||
console.log(res);
|
console.log(res);
|
||||||
|
//第一栏
|
||||||
setHeadData(res.header);
|
setHeadData(res.header);
|
||||||
setDisasterArea(res.country);
|
//第二栏
|
||||||
setResponseDisaster(res.responseMonth);
|
setLineChart(res.line)
|
||||||
setApplyDisaster(res.applyMonth);
|
setLineVandDChart(res.vandd);
|
||||||
|
//第三栏
|
||||||
|
setAdministratorsChart(res.admin)
|
||||||
|
setChiefChart(res.chief)
|
||||||
|
//第四栏
|
||||||
setDisasterType(res.disasterNum);
|
setDisasterType(res.disasterNum);
|
||||||
|
//第5栏
|
||||||
|
setDisasterArea(res.country);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 批量设置 echarts resize
|
// 批量设置 echarts resize
|
||||||
|
@ -610,18 +749,18 @@ watch(
|
||||||
state.charts.theme = isIsDark ? 'dark' : '';
|
state.charts.theme = isIsDark ? 'dark' : '';
|
||||||
state.charts.bgColor = isIsDark ? 'transparent' : '';
|
state.charts.bgColor = isIsDark ? 'transparent' : '';
|
||||||
state.charts.color = isIsDark ? '#dadada' : '#303133';
|
state.charts.color = isIsDark ? '#dadada' : '#303133';
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
//initLineChart();
|
// //initLineChart();
|
||||||
}, 500);
|
// }, 500);
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
//initPieChart();
|
// //initPieChart();
|
||||||
}, 700);
|
// }, 700);
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
//initPieChart2();
|
// //initPieChart2();
|
||||||
}, 700);
|
// }, 700);
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
initBarChart();
|
// initBarChart();
|
||||||
}, 1000);
|
// }, 1000);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -637,7 +776,9 @@ $homeNavLengh: 8;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
.home-card-one,
|
.home-card-one,
|
||||||
.home-card-two,
|
.home-card-two,
|
||||||
.home-card-three {
|
.home-card-three ,
|
||||||
|
.home-card-four,
|
||||||
|
.home-card-five{
|
||||||
.home-card-item {
|
.home-card-item {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 130px;
|
height: 130px;
|
||||||
|
@ -680,7 +821,9 @@ $homeNavLengh: 8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.home-card-two,
|
.home-card-two,
|
||||||
.home-card-three {
|
.home-card-three ,
|
||||||
|
.home-card-four,
|
||||||
|
.home-card-five {
|
||||||
.home-card-item {
|
.home-card-item {
|
||||||
height: 400px;
|
height: 400px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -8,13 +8,12 @@
|
||||||
<el-form>
|
<el-form>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-form-item label="UserName"><el-input size="default" style="max-width: 180px"
|
<el-form-item label="User name"><el-input size="default" style="max-width: 180px"
|
||||||
v-model="state.query.userName" clearable
|
v-model="state.query.userName" clearable placeholder="Please enter the UserName">
|
||||||
placeholder="Please enter the UserName">
|
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<!-- <el-col :span="4">
|
||||||
<el-form-item label="checked" style="margin-left: 10px;">
|
<el-form-item label="checked" style="margin-left: 10px;">
|
||||||
<el-select size="default" v-model="state.query.status" clearable
|
<el-select size="default" v-model="state.query.status" clearable
|
||||||
style="max-width: 180px" placeholder="Replied">
|
style="max-width: 180px" placeholder="Replied">
|
||||||
|
@ -23,13 +22,13 @@
|
||||||
<el-option label="Observed" :value="2"></el-option>
|
<el-option label="Observed" :value="2"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-button size="default" type="primary" class="ml15" style="margin-top: 4px ;"
|
<el-button size="default" type="primary" class="ml15" style="margin-top: 4px ;"
|
||||||
@click="initTableData">
|
@click="initTableData">
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<ele-Search />
|
<ele-Search />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
search
|
Search
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -40,31 +39,27 @@
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="state.tableData.data" style="width: 100%" v-loading="state.tableData.loading"
|
<el-table :data="state.tableData.data" style="width: 100%" v-loading="state.tableData.loading"
|
||||||
@selection-change="handleSelectionChange">
|
@selection-change="handleSelectionChange">
|
||||||
<el-table-column prop="userName" label="userName"> </el-table-column>
|
<el-table-column prop="userName" label="User name"> </el-table-column>
|
||||||
<el-table-column prop="email" label="email"> </el-table-column>
|
<el-table-column prop="email" label="Email"> </el-table-column>
|
||||||
<el-table-column prop="organization" label="organization"> </el-table-column>
|
<el-table-column prop="organization" label="Organization"> </el-table-column>
|
||||||
<el-table-column prop="message" label="message"> </el-table-column>
|
<el-table-column prop="message" label="Message"> </el-table-column>
|
||||||
<el-table-column label="Operate" width="180">
|
<el-table-column label="Operate" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button :disabled="scope.row.userName === 'admin'" size="small"
|
<!-- <el-button :disabled="scope.row.userName === 'admin'" size="small" v-if="scope.row.status != 2 " text type="primary"
|
||||||
v-if="scope.row.status != 2" text type="primary"
|
@click="onObserved(scope.row)">Observed</el-button> -->
|
||||||
@click="onObserved(scope.row)">Observed</el-button>
|
<el-button :disabled="scope.row.userName === 'admin'" size="small" v-if="scope.row.status != 1 " text type="primary"
|
||||||
<el-button :disabled="scope.row.userName === 'admin'" size="small"
|
|
||||||
v-if="scope.row.status != 1" text type="primary"
|
|
||||||
@click="onOpenEdit(scope.row)">Reply e-mail</el-button>
|
@click="onOpenEdit(scope.row)">Reply e-mail</el-button>
|
||||||
<el-button :disabled="scope.row.userName === 'admin'" size="small"
|
<el-button :disabled="scope.row.userName === 'admin'" size="small" v-if="scope.row.status == 1 " text type="primary"
|
||||||
v-if="scope.row.status == 1" text type="primary"
|
|
||||||
@click="onOpenEdit(scope.row)">Reply Info</el-button>
|
@click="onOpenEdit(scope.row)">Reply Info</el-button>
|
||||||
<el-button :disabled="scope.row.userName === 'admin'" size="small" text type="primary"
|
<el-button :disabled="scope.row.userName === 'admin'" size="small" text type="primary"
|
||||||
@click="onRowDel(scope.row)">Delete</el-button>
|
@click="onRowDel(scope.row)">Delete</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange"
|
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
|
||||||
class="mt15" :pager-count="3" :page-sizes="[10, 20, 30]"
|
:pager-count="3" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.pageNum"
|
||||||
v-model:current-page="state.tableData.param.pageNum" background
|
background v-model:page-size="state.tableData.param.pageSize"
|
||||||
v-model:page-size="state.tableData.param.pageSize" layout="total, sizes, prev, pager, next"
|
layout="total, sizes, prev, pager, next" :total="state.tableData.total">
|
||||||
:total="state.tableData.total">
|
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -75,8 +70,14 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="Content:" > -->
|
<!-- <el-form-item label="Content:" > -->
|
||||||
|
|
||||||
<QuillEditor ref="myQuillEditor" theme="snow" v-model:content="state.email.text" :options="state.options"
|
<QuillEditor ref="myQuillEditor"
|
||||||
contentType="html" @update:content="setValue()" style="height:500px ;" />
|
theme="snow"
|
||||||
|
v-model:content="state.email.text"
|
||||||
|
:options="state.options"
|
||||||
|
contentType="html"
|
||||||
|
@update:content="setValue()"
|
||||||
|
style="height:500px ;"
|
||||||
|
/>
|
||||||
<!-- </el-form-item> -->
|
<!-- </el-form-item> -->
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
||||||
highlight-current-row @row-click="tableClick">
|
highlight-current-row @row-click="tableClick">
|
||||||
<el-table-column type="index" label="ID" width="50" />
|
<el-table-column prop="vordmId" label="ID" width="118" />
|
||||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="disasterCountry" label="disaster country" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="disasterCountry" label="Disaster country" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="disasterTime" label="disaster time" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip></el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
|
<el-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
|
||||||
class="mt15" :pager-count="3" :page-sizes="[10, 20, 30]"
|
class="mt15" :pager-count="3" :page-sizes="[10, 20, 30]"
|
||||||
|
@ -26,14 +26,14 @@
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<ele-EditPen />
|
<ele-EditPen />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
batch audit
|
Batch operation
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading"
|
<el-table :data="state.tableData.data" v-loading="state.tableData.loading"
|
||||||
@selection-change="handleSelectionChange" style="width: 100%">
|
@selection-change="handleSelectionChange" style="width: 100%">
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column type="index" label="ID" width="50" />
|
<el-table-column type="index" label="ID" width="50" />
|
||||||
<el-table-column prop="uploaderName" label="uploader Name" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="uploaderName" label="Uploader name" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="sourceOrganization" label="Organization" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="sourceOrganization" label="Organization" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="title" label="Professional title" show-overflow-tooltip
|
<el-table-column prop="title" label="Professional title" show-overflow-tooltip
|
||||||
width="150"></el-table-column>
|
width="150"></el-table-column>
|
||||||
|
@ -159,6 +159,10 @@ const getDisasterData = () => {
|
||||||
state.disasterData.loading = true;
|
state.disasterData.loading = true;
|
||||||
getDisasterPage(state.disasterData.param.pageNum, state.disasterData.param.pageSize, {}).then(res => {
|
getDisasterPage(state.disasterData.param.pageNum, state.disasterData.param.pageSize, {}).then(res => {
|
||||||
state.disasterData.data = res.records;
|
state.disasterData.data = res.records;
|
||||||
|
state.disasterData.data.forEach(item=>{
|
||||||
|
let date = item.disasterTime.slice(0,10);
|
||||||
|
item.disasterTime = date;
|
||||||
|
})
|
||||||
state.disasterData.total = res.total;
|
state.disasterData.total = res.total;
|
||||||
state.disasterData.loading = false;
|
state.disasterData.loading = false;
|
||||||
})
|
})
|
||||||
|
|
|
@ -13,11 +13,11 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-form-item label="checked" style="margin-left: 10px;">
|
<el-form-item label="review status" style="margin-left: 10px;">
|
||||||
<el-select size="default" v-model="state.query.checked" clearable
|
<el-select size="default" v-model="state.query.checked" clearable
|
||||||
placeholder="Please select">
|
placeholder="Please select">
|
||||||
<el-option label="checked" value="0"></el-option>
|
<el-option label="Approved" value="0"></el-option>
|
||||||
<el-option label="unchecked" value="1"></el-option>
|
<el-option label="Awaiting approval" value="1"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<ele-Search />
|
<ele-Search />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
search
|
Search
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -47,16 +47,16 @@
|
||||||
<a :href="scope.row.link" target="_blank">{{ scope.row.toolName }}</a>
|
<a :href="scope.row.link" target="_blank">{{ scope.row.toolName }}</a>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="label" label="label" width="140"> </el-table-column>
|
<el-table-column prop="label" label="Label" width="140"> </el-table-column>
|
||||||
<el-table-column prop="introduction" label="introduction"> </el-table-column>
|
<el-table-column prop="introduction" label="Introduction"> </el-table-column>
|
||||||
<el-table-column prop="showName" label="Show Name"></el-table-column>
|
<el-table-column prop="showName" label="Uploader name"></el-table-column>
|
||||||
<el-table-column prop="reviewTime" label="Review Time"></el-table-column>
|
<el-table-column prop="reviewTime" label="Review Time"></el-table-column>
|
||||||
<el-table-column label="Operate" width="140">
|
<el-table-column label="Operate" width="140">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button :style='scope.row.reviewTime ? "display:none;" : ""' size="small" text
|
<el-button :style='scope.row.reviewTime ? "display:none;" : ""' size="small" text
|
||||||
type="primary" @click="onOpenEdit(scope.row)">Review</el-button>
|
type="primary" @click="onOpenEdit(scope.row)">Approve</el-button>
|
||||||
<el-button :disabled="scope.row.userName === 'admin'" size="small" text type="primary"
|
<el-button :disabled="scope.row.userName === 'admin'" size="small" text type="primary"
|
||||||
@click="onRowDel(scope.row)">Delete</el-button>
|
@click="onRowDel(scope.row)">Reject</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
|
@ -2,65 +2,38 @@
|
||||||
<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"
|
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" style="margin-left: 20px">
|
||||||
class="demo-tabs"
|
<el-tab-pane label="Unapproved" name="first">
|
||||||
@tab-click="handleClick"
|
<el-table :data="state.tableData.data" v-loading="state.tableData.loading" style="width: 100%">
|
||||||
style="margin-left: 20px">
|
<el-table-column type="index" label="ID" width="50" />
|
||||||
<el-tab-pane label="unchecked"
|
<el-table-column prop="username" label="User name" show-overflow-tooltip></el-table-column>
|
||||||
name="first">
|
<el-table-column prop="organization" label="Organization" show-overflow-tooltip></el-table-column>
|
||||||
<el-table :data="state.tableData.data"
|
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip>
|
||||||
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"
|
<el-table-column prop="disasterKeyword" label="Disaster keyword" show-overflow-tooltip></el-table-column>
|
||||||
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"
|
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip>
|
||||||
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"
|
<el-table-column prop="respondStatus" label="Response status" show-overflow-tooltip>
|
||||||
label="Response status"
|
|
||||||
show-overflow-tooltip>
|
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag type="info"
|
<el-tag type="info" v-if="scope.row.respondStatus === 0">Awaiting approval</el-tag>
|
||||||
v-if="scope.row.respondStatus === 0">Not reviewed</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">Failed</el-tag>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="Operate"
|
<el-table-column prop="Operate" label="Operate" show-overflow-tooltip>
|
||||||
label="Operate"
|
|
||||||
show-overflow-tooltip>
|
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button size="small"
|
<el-button size="small" text type="primary" @click="onOpenEditRole('edit', scope.row)">Approve</el-button>
|
||||||
text
|
|
||||||
type="primary"
|
|
||||||
@click="onOpenEditRole('edit', scope.row)">Review</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
@ -83,136 +56,92 @@
|
||||||
</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="5" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.current" background
|
||||||
class="mt15"
|
v-model:page-size="state.tableData.param.size" layout="total, sizes, prev, pager, next, jumper"
|
||||||
: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">
|
:total="state.tableData.total">
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="checked"
|
<el-tab-pane label="Approved | Rejected" name="second">
|
||||||
name="second">
|
<el-table :data="state.tableData.data" v-loading="state.tableData.loading" style="width: 100%">
|
||||||
<el-table :data="state.tableData.data"
|
<el-table-column type="index" label="ID" width="50" />
|
||||||
v-loading="state.tableData.loading"
|
<el-table-column prop="username" label="User name" show-overflow-tooltip></el-table-column>
|
||||||
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"
|
<el-table-column prop="organization" label="Organization" show-overflow-tooltip></el-table-column>
|
||||||
label="Organization"
|
<el-table-column prop="email" label="Email" show-overflow-tooltip></el-table-column>
|
||||||
show-overflow-tooltip></el-table-column>
|
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip>
|
||||||
<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"
|
<el-table-column prop="disasterKeyword" label="Disaster keyword" show-overflow-tooltip></el-table-column>
|
||||||
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"
|
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip>
|
||||||
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="chiefName" label="Answer" show-overflow-tooltip></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"
|
<el-table-column prop="respondStatus" label="Response status" show-overflow-tooltip>
|
||||||
label="Response status"
|
|
||||||
show-overflow-tooltip>
|
|
||||||
|
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag type="info"
|
<el-tag type="info" v-if="scope.row.respondStatus === 2">Approved</el-tag>
|
||||||
v-if="scope.row.respondStatus === 2">Reviewed</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">Failed</el-tag>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="Operate" label="Operate" show-overflow-tooltip>
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button size="small" text type="primary" @click="onAllocation(scope.row)">Allocate</el-button>
|
||||||
|
</template>
|
||||||
|
</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="5" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.current" background
|
||||||
class="mt15"
|
v-model:page-size="state.tableData.param.size" layout="total, sizes, prev, pager, next, jumper"
|
||||||
: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">
|
: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"
|
<el-dialog v-model="state.dialogVisible" title="Approval" width="30%">
|
||||||
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"
|
<el-radio v-model="state.radio" label='1' @click="mapEvents('1')">Point</el-radio>
|
||||||
label='1'
|
<el-radio v-model="state.radio" label='2' @click="mapEvents('2')">Area</el-radio>
|
||||||
@click="mapEvents('1')">Point</el-radio>
|
<el-radio v-model="state.radio" label='3' @click="mapEvents('3')">Edit</el-radio>
|
||||||
<el-radio v-model="state.radio"
|
<el-button type="primary" style="margin-left: 5%;" @click="ClearSubmit">Clear</el-button>
|
||||||
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%;"
|
<el-container style="margin-top: 2%;margin-bottom: 2%;" v-if="state.radio==='1'?true:false">
|
||||||
v-if="state.radio === '1' ? true : false">
|
|
||||||
<span style="line-height: 35px;"> Latitude:</span>
|
<span style="line-height: 35px;"> Latitude:</span>
|
||||||
<el-input placeholder="请输入内容"
|
<el-input placeholder="wait……" style="height:35px;margin-right: 1%;" v-model="state.dislat" readonly="readonly"> </el-input>
|
||||||
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="请输入内容"
|
<el-input placeholder="wait……" style="height:35px;" v-model="state.dislon" readonly="readonly"></el-input>
|
||||||
style="height:35px;"></el-input>
|
|
||||||
</el-container>
|
</el-container>
|
||||||
|
|
||||||
<MapPage style="height:350px ; width:100% ;margin-bottom: 10px;" ref="mapRef"></MapPage>
|
<MapPage style="height:350px ; width:100% ;margin-bottom: 10px;" ref="mapRef"></MapPage>
|
||||||
|
|
||||||
<el-form-item label="Disaster Time">
|
<el-form-item label="Disaster Time">
|
||||||
<el-date-picker v-model="state.edit.disasterTime"
|
<el-date-picker v-model="state.edit.disasterTime" type="date" value-format="YYYY-MM-DD"
|
||||||
type="date"
|
|
||||||
value-format="YYYY-MM-DD"
|
|
||||||
placeholder="Select date and time" />
|
placeholder="Select date and time" />
|
||||||
</el-form-item>
|
</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"
|
<el-button type="danger" @click="reviews(1)">
|
||||||
@click="reviews(1)">
|
Reject
|
||||||
Not Review
|
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary"
|
<el-button type="primary" @click="reviews(2)">
|
||||||
@click="reviews(2)">
|
Approve
|
||||||
Review
|
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<selectUser ref ="select" @callback="getTableData"></selectUser>
|
||||||
</el-config-provider>
|
</el-config-provider>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -223,17 +152,23 @@ import { reactive, onMounted, ref, nextTick, watchEffect, defineAsyncComponent }
|
||||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
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 { useVariableStore } from '/@/stores/index.ts'
|
||||||
//引入地图
|
//引入地图
|
||||||
|
import Map from '/@/components/Map.vue';
|
||||||
import { useDateFormat } from '@vueuse/shared';
|
import { useDateFormat } from '@vueuse/shared';
|
||||||
|
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'
|
||||||
const map = ref();
|
import { map } from 'lodash';
|
||||||
|
import * as turf from '@turf/turf'
|
||||||
|
const variableStore = useVariableStore();
|
||||||
|
const mapRef = ref();
|
||||||
const activeName = ref('first');
|
const activeName = ref('first');
|
||||||
|
const select = ref();
|
||||||
const handleClick = (tab, event) => {
|
const handleClick = (tab, event) => {
|
||||||
state.selectName = tab.props.name;
|
state.selectName = tab.props.name;
|
||||||
getTableData();
|
getTableData();
|
||||||
|
@ -268,7 +203,8 @@ const state = reactive({
|
||||||
edit: {},
|
edit: {},
|
||||||
radio:null,
|
radio:null,
|
||||||
dislat:'',
|
dislat:'',
|
||||||
dislon: ''
|
dislon:'',
|
||||||
|
wktPoint_Poly:undefined
|
||||||
});
|
});
|
||||||
// 初始化表格数据
|
// 初始化表格数据
|
||||||
const getTableData = () => {
|
const getTableData = () => {
|
||||||
|
@ -279,7 +215,6 @@ const getTableData = () => {
|
||||||
} else {
|
} else {
|
||||||
state.tableData.param.respondStatus = 2;
|
state.tableData.param.respondStatus = 2;
|
||||||
}
|
}
|
||||||
console.log(activeName.value);
|
|
||||||
getList(state.tableData.param).then((res) => {
|
getList(state.tableData.param).then((res) => {
|
||||||
state.tableData.data = res.records;
|
state.tableData.data = res.records;
|
||||||
state.tableData.total = res.total;
|
state.tableData.total = res.total;
|
||||||
|
@ -294,23 +229,21 @@ const onOpenEditRole = (type, row) => {
|
||||||
|
|
||||||
//深拷贝
|
//深拷贝
|
||||||
state.edit = JSON.parse(JSON.stringify(row));
|
state.edit = JSON.parse(JSON.stringify(row));
|
||||||
nextTick(() => {
|
|
||||||
//赋值地图范围,并且可以修改点或者区域
|
|
||||||
//TODO
|
|
||||||
map.mapOperations.wktParseToMap(row.geometry)
|
|
||||||
});
|
|
||||||
state.dialogVisible = true;
|
state.dialogVisible = true;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
state.radio = "1"
|
state.radio = "1"
|
||||||
// mapRef.value.mapOperations.removeAll()
|
// mapRef.value.mapOperations.removeAll()
|
||||||
//赋值地图范围,并且可以修改点或者区域
|
//赋值地图范围,并且可以修改点或者区域
|
||||||
if (state.wktPoint) {
|
if(state.wktPoint_Poly){
|
||||||
mapRef.value.mapOperations.removeLayer(state.wktPoint)
|
mapRef.value.mapOperations.removeLayer(state.wktPoint_Poly)
|
||||||
}
|
}
|
||||||
state.wktPoint = mapRef.value.mapOperations.wktParseToMap(row.geometry)
|
let wkt=mapRef.value.mapOperations.wktParseToMap(row.geometry)
|
||||||
|
state.wktPoint_Poly= wkt.layer
|
||||||
|
console.log(wkt.location)
|
||||||
|
changelatlon(wkt.location[0],wkt.location[1]);
|
||||||
// mapRef.value.mapOperations.on("click", (res)=>{
|
// mapRef.value.mapOperations.on("click", (res)=>{
|
||||||
// mapRef.value.mapOperations.clearPolygon()
|
// mapRef.value.mapOperations.clearPolygon()
|
||||||
// mapRef.value.mapOperations.removeLayer( state.wktPoint)
|
// mapRef.value.mapOperations.removeLayer( state.wktPoint_Poly)
|
||||||
// mapRef.value.mapOperations.addInteractMarker(res.latlng.lat, res.latlng.lng)
|
// mapRef.value.mapOperations.addInteractMarker(res.latlng.lat, res.latlng.lng)
|
||||||
// })
|
// })
|
||||||
mapEvents('1')
|
mapEvents('1')
|
||||||
|
@ -318,40 +251,51 @@ const onOpenEditRole = (type, row) => {
|
||||||
};
|
};
|
||||||
const mapEvents = (ev)=>{
|
const mapEvents = (ev)=>{
|
||||||
if(ev == '1'){
|
if(ev == '1'){
|
||||||
|
// mapRef.value.mapOperations.clearPolygon()
|
||||||
|
mapRef.value.mapOperations.on("click", mapClick)
|
||||||
|
// mapRef.value.mapOperations.on("mousemove", changelatlon)
|
||||||
mapRef.value.mapOperations.clearPolygon()
|
mapRef.value.mapOperations.clearPolygon()
|
||||||
// mapRef.value.mapOperations.on("click", mapClick)
|
|
||||||
mapRef.value.mapOperations.on("mousemove", changelatlon)
|
}else if(ev == '2'){
|
||||||
variableStore.polygoncontrol = "option1"
|
|
||||||
} else {
|
|
||||||
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.drawCreated()
|
// mapRef.value.mapOperations.drawCreated()
|
||||||
variableStore.polygoncontrol = "option2"
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
mapRef.value.mapOperations.Edit()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const ClearSubmit = () => {
|
const ClearSubmit = () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
mapRef.value.mapOperations.removeAll()
|
mapRef.value.mapOperations.removeAll()
|
||||||
variableStore.wktdata = null
|
variableStore.wktdata = null
|
||||||
|
variableStore.layerGroupPoint=null;
|
||||||
|
layerGroupPoly=null;
|
||||||
}, 100)
|
}, 100)
|
||||||
}
|
}
|
||||||
const mapClick=(res)=>{
|
const mapClick=(res)=>{
|
||||||
mapRef.value.mapOperations.removeLayer(state.wktPoint)
|
mapRef.value.mapOperations.removeLayer( state.wktPoint_Poly )
|
||||||
changelatlon(res);
|
changelatlon(res.latlng.lat.toFixed(3),res.latlng.lng.toFixed(3));
|
||||||
mapRef.value.mapOperations.addInteractMarker(res.latlng.lat.toFixed(3),res.latlng.lng.toFixed(3))
|
mapRef.value.mapOperations.addInteractMarker(res.latlng.lat.toFixed(3),res.latlng.lng.toFixed(3))
|
||||||
|
// console.log(state.wktPoint_Poly)
|
||||||
}
|
}
|
||||||
|
|
||||||
const reviews = (index) => {
|
const reviews = (index) => {
|
||||||
//将修改后的地图位置赋值到state.edit.geometry
|
//将修改后的地图位置赋值到state.edit.geometry
|
||||||
//TODO 修改地图赋值
|
//TODO 修改地图赋值
|
||||||
//state.edit.geometry = map.mapOperations.getWkt();
|
//state.edit.geometry = map.mapOperations.getWkt();
|
||||||
|
|
||||||
//判断index的值来判断是审核通过还是不通过
|
//判断index的值来判断是审核通过还是不通过
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (index === 1) {
|
if (index === 1) {
|
||||||
state.edit.respondStatus = 1;
|
state.edit.respondStatus = 1;
|
||||||
} else {
|
} else {
|
||||||
state.edit.respondStatus = 2;
|
state.edit.respondStatus = 2;
|
||||||
}
|
}
|
||||||
|
state.edit.geometry = variableStore.layerGroupPoint === null ? variableStore.layerGroupPoly : variableStore.layerGroupPoint;
|
||||||
//时间格式化
|
//时间格式化
|
||||||
state.edit.disasterTime = useDateFormat(state.edit.disasterTime, 'YYYY-MM-DD').value + " 00:00:00";
|
state.edit.disasterTime = useDateFormat(state.edit.disasterTime, 'YYYY-MM-DD').value + " 00:00:00";
|
||||||
review(state.edit).then((res) => {
|
review(state.edit).then((res) => {
|
||||||
|
@ -362,20 +306,15 @@ const reviews = (index) => {
|
||||||
}
|
}
|
||||||
// 分页改变
|
// 分页改变
|
||||||
const onHandleCurrentChange = (val) => {
|
const onHandleCurrentChange = (val) => {
|
||||||
console.log(val);
|
|
||||||
state.tableData.param.pageNum = val;
|
state.tableData.param.pageNum = val;
|
||||||
getTableData();
|
getTableData();
|
||||||
};
|
};
|
||||||
const onMapClick = (e) => {
|
const changelatlon = (lat,lon) => {
|
||||||
state.lat = e.latlng.lat.toFixed(3);
|
//深拷贝e
|
||||||
state.lon = e.latlng.lng.toFixed(3);
|
// state.dislat = e.latlng.lat.toFixed(3);
|
||||||
map.value.mapOperations.addInteractMarker(state.lat, state.lon)
|
// state.dislon= e.latlng.lng.toFixed(3);
|
||||||
}
|
state.dislat = lat;
|
||||||
const changelatlon = (e) => {
|
state.dislon= lon;
|
||||||
|
|
||||||
state.dislat = e.latlng.lat.toFixed(3);
|
|
||||||
state.dislon = e.latlng.lng.toFixed(3);
|
|
||||||
// state.lon = state.lon % 360;
|
|
||||||
// if (state.lon < 0) {
|
// if (state.lon < 0) {
|
||||||
// state.lon = state.lon + 360;
|
// state.lon = state.lon + 360;
|
||||||
// }
|
// }
|
||||||
|
@ -421,27 +360,14 @@ onMounted(() => {
|
||||||
getDictionary({ code: 'disaster' }).then((res) => {
|
getDictionary({ code: 'disaster' }).then((res) => {
|
||||||
state.disasterTypeList = res;
|
state.disasterTypeList = res;
|
||||||
});
|
});
|
||||||
watchEffect(() => {
|
|
||||||
if (state.radio == "1") {
|
|
||||||
// map.value.mapOperations.on("click", onMapClick)
|
|
||||||
// map.value.mapOperations.clearPolygon()
|
|
||||||
// map.value.mapOperations.on("mousemove", changelatlon)
|
|
||||||
// variableStore.polygoncontrol = "option1"
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// map.value.mapOperations.off("click", onMapClick)
|
|
||||||
// map.value.mapOperations.drawPolygon()
|
|
||||||
// map.value.mapOperations.drawCreated()
|
|
||||||
// variableStore.polygoncontrol = "option2"
|
|
||||||
}
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
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;
|
||||||
|
@ -458,10 +384,4 @@ const getValue = (key) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.mt15 {
|
|
||||||
display: flex;
|
|
||||||
justify-content: end;
|
|
||||||
float: right;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue