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({
|
||||
url: '/api/' + crawlModule + '/rs/' + method,
|
||||
method: 'post',
|
||||
data: {
|
||||
|
||||
},
|
||||
data: data,
|
||||
});
|
||||
};
|
||||
export const submit = (row) => {
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
import request from '/@/utils/request';
|
||||
import {moduleName} from '/@/utils/request';
|
||||
import { moduleName } from '/@/utils/request';
|
||||
|
||||
export function getList(params) {
|
||||
return request({
|
||||
url: '/api/'+moduleName+'/ui/disasterInfo/list',
|
||||
url: '/api/' + moduleName + '/ui/disasterInfo/list',
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
export function getPage(current,size,params) {
|
||||
export function getPage(current, size, params) {
|
||||
return request({
|
||||
url: '/api/'+moduleName+'/ui/disasterInfo/list',
|
||||
url: '/api/' + moduleName + '/ui/disasterInfo/list',
|
||||
method: 'get',
|
||||
params:{
|
||||
params: {
|
||||
current,
|
||||
size,
|
||||
...params
|
||||
|
@ -21,17 +21,17 @@ export function getPage(current,size,params) {
|
|||
});
|
||||
}
|
||||
|
||||
export function updateDisasterManage(data){
|
||||
export function updateDisasterManage(data) {
|
||||
return request({
|
||||
url: '/api/'+moduleName+'/ui/disasterInfo/updateBatch',
|
||||
url: '/api/' + moduleName + '/ui/disasterInfo/updateBatch',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
export function removeManage(data){
|
||||
export function removeManage(data) {
|
||||
return request({
|
||||
url: '/api/'+moduleName+'/ui/disasterInfo/removeManage',
|
||||
url: '/api/' + moduleName + '/ui/disasterInfo/removeManage',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
|
@ -41,7 +41,7 @@ export function removeManage(data){
|
|||
//review
|
||||
export function review(data) {
|
||||
return request({
|
||||
url: '/api/'+moduleName+'/ui/disasterInfo/review',
|
||||
url: '/api/' + moduleName + '/ui/disasterInfo/review',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
|
@ -50,15 +50,19 @@ export function review(data) {
|
|||
/**
|
||||
* 首页 dashborad
|
||||
*/
|
||||
export function statistics(){
|
||||
|
||||
export function statistics(param){
|
||||
return request({
|
||||
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({
|
||||
url: '/api/yyhouc-system-manager/user/list',
|
||||
url: '/api/system-manager/user/list',
|
||||
method: 'get',
|
||||
params: {
|
||||
name,
|
||||
|
@ -67,11 +71,20 @@ export const getUserList = (name,current,size) => {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function submit(data) {
|
||||
return request({
|
||||
url: '/api/'+moduleName+'/ui/disasterInfo/submit',
|
||||
url: '/api/' + moduleName + '/ui/disasterInfo/submit',
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export function responseEndedDisasterInfo(id) {
|
||||
return request({
|
||||
url: '/api/' + moduleName + '/ui/disasterInfo/responseEndedDisasterInfo',
|
||||
method: 'get',
|
||||
params: {
|
||||
id
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
<div ref="map"
|
||||
class="container"></div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue'
|
||||
import WKT from 'terraformer-wkt-parser'
|
||||
|
||||
import * as turf from '@turf/turf'
|
||||
import L from 'leaflet'
|
||||
import 'leaflet/dist/leaflet.css'
|
||||
import 'leaflet-draw/dist/leaflet.draw'
|
||||
|
@ -19,11 +19,11 @@ import * as omnivore from '@mapbox/leaflet-omnivore'
|
|||
const variableStore = useVariableStore()
|
||||
const map = ref()
|
||||
let homeMap = null
|
||||
let text = null
|
||||
let featureLayerG_area = null
|
||||
let featureLayerG_point = null
|
||||
let layerRectangle = null
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
homeMap = L.map(map.value, {
|
||||
preferCanvas: true,
|
||||
|
@ -44,92 +44,8 @@ onMounted(() => {
|
|||
tileSize: 256,
|
||||
zoomOffset: 1,
|
||||
}).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_point = L.layerGroup().addTo(homeMap)
|
||||
})
|
||||
|
@ -142,13 +58,41 @@ onMounted(() => {
|
|||
*/
|
||||
const mapOperations = {
|
||||
wktParseToMap: (res) => {
|
||||
return omnivore.wkt.parse(res).addTo(featureLayerG_point)
|
||||
// if(omnivore.wkt.parse(res) instanceof L.Marker){
|
||||
let layer = omnivore.wkt.parse(res)
|
||||
if(featureLayerG_area.getLayers().length != 0||featureLayerG_point.getLayers().length != 0){
|
||||
|
||||
return;
|
||||
}
|
||||
layer.addTo(featureLayerG_point)
|
||||
|
||||
// }
|
||||
// else{
|
||||
// return omnivore.wkt.parse(res).addTo(featureLayerG_area )
|
||||
// }
|
||||
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) => {
|
||||
featureLayerG_point.clearLayers()
|
||||
variableStore.layerGroupPoint = null
|
||||
var marker = L.marker([lat, lon], { draggable: true }).addTo(
|
||||
var marker = L.marker([lat, lon]).addTo(
|
||||
featureLayerG_point
|
||||
)
|
||||
let features = featureLayerG_point.toGeoJSON().features
|
||||
|
@ -189,6 +133,7 @@ const mapOperations = {
|
|||
// marker.on('click',function(){
|
||||
// featureLayerG_point.removeLayer(marker)
|
||||
// })
|
||||
|
||||
},
|
||||
/** 添加多边形标注
|
||||
* Object param 参数集合
|
||||
|
@ -344,10 +289,7 @@ const mapOperations = {
|
|||
featureLayerG_point.clearLayers()
|
||||
variableStore.layerGroupPoint = null
|
||||
variableStore.layerGroupPoly = null
|
||||
if (variableStore.polygoncontrol == 'option2') {
|
||||
text = new L.Draw.Polygon(homeMap)
|
||||
text.enable()
|
||||
}
|
||||
|
||||
},
|
||||
/**
|
||||
* 清楚wkt添加的所有
|
||||
|
@ -369,56 +311,84 @@ const mapOperations = {
|
|||
// console.log('2-2')
|
||||
variableStore.layerGroupPoint = null
|
||||
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()
|
||||
// variableStore.layerGroupPoly=null;
|
||||
text = new L.Draw.Polygon(homeMap)
|
||||
text.enable()
|
||||
return polygon
|
||||
},
|
||||
clearPolygon: () => {
|
||||
// console.log('1-2')
|
||||
text.disable()
|
||||
|
||||
featureLayerG_area.clearLayers()
|
||||
variableStore.layerGroupPoly = null
|
||||
homeMap.pm.disableDraw();
|
||||
// variableStore.layerGroupPoint=null
|
||||
// featureLayerG_point.clearLayers()
|
||||
},
|
||||
drawCreated: () => {
|
||||
// console.log("2-3")
|
||||
homeMap.on('draw:created', function (elll) {
|
||||
featureLayerG_area.clearLayers()
|
||||
variableStore.layerGroupPoly = null
|
||||
elll.layer.setStyle({
|
||||
color: '#FF0080',
|
||||
opacity: 1,
|
||||
})
|
||||
featureLayerG_area.addLayer(elll.layer)
|
||||
let features = featureLayerG_area.toGeoJSON().features
|
||||
// console.log(features)
|
||||
variableStore.layerGroupPoly = features.map(function (feature) {
|
||||
return WKT.convert(feature.geometry)
|
||||
})
|
||||
variableStore.layerGroupPoly =
|
||||
variableStore.layerGroupPoly.join('\n')
|
||||
text.enable()
|
||||
})
|
||||
|
||||
// homeMap.on('draw:created', function (elll) {
|
||||
// featureLayerG_area.clearLayers()
|
||||
// variableStore.layerGroupPoly = null
|
||||
// elll.layer.setStyle({
|
||||
// color: '#FF0080',
|
||||
// opacity: 1,
|
||||
// })
|
||||
// featureLayerG_area.addLayer(elll.layer)
|
||||
// let features = featureLayerG_area.toGeoJSON().features
|
||||
// // console.log(features)
|
||||
// variableStore.layerGroupPoly = features.map(function (feature) {
|
||||
// return WKT.convert(feature.geometry)
|
||||
// })
|
||||
// variableStore.layerGroupPoly =
|
||||
// variableStore.layerGroupPoly.join('\n')
|
||||
|
||||
// })
|
||||
},
|
||||
drawDestroyed: () => {
|
||||
homeMap.off('draw:created', function (elll) {
|
||||
elll.layer.setStyle({
|
||||
color: '#FF0080',
|
||||
opacity: 1,
|
||||
})
|
||||
featureLayerG_area.addLayer(elll.layer)
|
||||
let features = featureLayerG_area.toGeoJSON().features
|
||||
// console.log(features)
|
||||
variableStore.layerGroupPoly = features.map(function (feature) {
|
||||
return WKT.convert(feature.geometry)
|
||||
})
|
||||
variableStore.layerGroupPoly =
|
||||
variableStore.layerGroupPoly.join('\n')
|
||||
text = new L.Draw.Polygon(homeMap)
|
||||
text.enable()
|
||||
Edit: () => {
|
||||
homeMap.pm.enableGlobalEditMode({
|
||||
allowSelfIntersection: false,
|
||||
})
|
||||
if (featureLayerG_area.getLayers().length == 1) {
|
||||
featureLayerG_area.eachLayer(function (layer) {
|
||||
layer.on('pm:edit', (e) => {
|
||||
let features = featureLayerG_area.toGeoJSON().features
|
||||
variableStore.layerGroupPoly = features.map(function (feature) {
|
||||
return WKT.convert(feature.geometry)
|
||||
})
|
||||
variableStore.layerGroupPoly = variableStore.layerGroupPoly.join('\n')
|
||||
});
|
||||
});
|
||||
}
|
||||
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: () => {
|
||||
if (layerRectangle != null) {
|
||||
|
@ -437,12 +407,10 @@ const mapOperations = {
|
|||
deleteRectangle: () => {
|
||||
homeMap.removeLayer(layerRectangle)
|
||||
}
|
||||
|
||||
}
|
||||
//omnivore.wkt.parse('POINT(-80 0)').addTo(homeMap);
|
||||
|
||||
defineExpose({
|
||||
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"
|
||||
trigger="click"
|
||||
@command="onLanguageChange">
|
||||
<div class="layout-navbars-breadcrumb-user-icon">
|
||||
<!-- <div class="layout-navbars-breadcrumb-user-icon">
|
||||
<i class="iconfont"
|
||||
:class="state.disabledI18n === 'en' ? 'icon-fuhao-zhongwen' : 'icon-fuhao-yingwen'"></i>
|
||||
</div>
|
||||
<template #dropdown>
|
||||
</div> -->
|
||||
<!-- <template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item command="zh-cn"
|
||||
:disabled="state.disabledI18n === 'zh-cn'">English</el-dropdown-item>
|
||||
<el-dropdown-item command="en"
|
||||
:disabled="state.disabledI18n === 'en'">简体中文</el-dropdown-item>
|
||||
<!-- <el-dropdown-item command="zh-cn" :disabled="state.disabledI18n === 'zh-cn'">简体中文</el-dropdown-item> -->
|
||||
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</template> -->
|
||||
</el-dropdown>
|
||||
<div class="layout-navbars-breadcrumb-user-icon mr10"
|
||||
@click="onScreenfullClick">
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<el-sub-menu :index="val.path" v-if="val.children && val.children.length > 0" :key="val.path">
|
||||
<template #title>
|
||||
<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>
|
||||
<SubItem :chil="val.children" />
|
||||
</el-sub-menu>
|
||||
|
@ -20,7 +20,7 @@
|
|||
<el-menu-item :index="val.path" :key="val.path">
|
||||
<SvgIcon :name="val.meta.icon" />
|
||||
<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 #title v-else>
|
||||
<a class="w100" @click.prevent="onALinkClick(val)">{{ val.meta.title }}</a>
|
||||
|
|
|
@ -181,7 +181,7 @@ export const dynamicRoutes = [
|
|||
name: 'otherData',
|
||||
component: () => import('/@/views/dataService/otherData/index.vue'),
|
||||
meta: {
|
||||
title: 'other data service',
|
||||
title: 'Other data service',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
|
@ -197,7 +197,7 @@ export const dynamicRoutes = [
|
|||
name: 'visualData',
|
||||
component: () => import('/@/views/dataService/visualData/index.vue'),
|
||||
meta: {
|
||||
title: 'visual data service',
|
||||
title: 'Visual data service',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
|
@ -213,7 +213,7 @@ export const dynamicRoutes = [
|
|||
name: 'pictureInfo',
|
||||
component: () => import('/@/views/dataService/pictureInfo/index.vue'),
|
||||
meta: {
|
||||
title: 'picture info service',
|
||||
title: 'Picture info service',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
|
@ -238,7 +238,7 @@ export const dynamicRoutes = [
|
|||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin', 'chief'],
|
||||
roles: ['admin'],
|
||||
icon: 'iconfont icon-xitongshezhi',
|
||||
zh: '系统管理',
|
||||
},
|
||||
|
@ -254,7 +254,7 @@ export const dynamicRoutes = [
|
|||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin', 'chief'],
|
||||
roles: ['admin'],
|
||||
icon: 'ele-ColdDrink',
|
||||
zh: '管理员管理',
|
||||
},
|
||||
|
@ -270,7 +270,7 @@ export const dynamicRoutes = [
|
|||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin', 'chief'],
|
||||
roles: ['admin'],
|
||||
icon: 'iconfont icon-caidan',
|
||||
zh: '普通管理员管理',
|
||||
},
|
||||
|
@ -280,13 +280,13 @@ export const dynamicRoutes = [
|
|||
name: 'systemDic',
|
||||
component: () => import('/@/views/system/dic/index.vue'),
|
||||
meta: {
|
||||
title: '字典管理',
|
||||
title: 'Dictionary management',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin', 'chief'],
|
||||
roles: ['admin'],
|
||||
icon: 'ele-SetUp',
|
||||
},
|
||||
},
|
||||
|
|
|
@ -56,6 +56,7 @@ export const useVariableStore = defineStore(Names.TEST, {
|
|||
// Data_upload_agency:""
|
||||
// }
|
||||
],
|
||||
// 存储wkt格式数据
|
||||
layerGroupPoint:null,
|
||||
layerGroupPoly:null,
|
||||
polygoncontrol:null,
|
||||
|
|
|
@ -4,7 +4,7 @@ import qs from 'qs';
|
|||
import { Session } from '/@/utils/storage';
|
||||
|
||||
// export const moduleName = 'zqq-biz-vordm';
|
||||
export const moduleName = 'yyhouc-biz-vordm';
|
||||
export const moduleName = 'biz-vordm';
|
||||
export const crawlModule = "vordm-crawl";
|
||||
// 配置新建一个 axios 实例
|
||||
const service = axios.create({
|
||||
|
|
|
@ -6,16 +6,16 @@
|
|||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
||||
highlight-current-row @row-click="tableClick">
|
||||
<el-table-column type="index" label="ID" width="50" />
|
||||
<el-table-column prop="vordmId" label="ID" width="118" />
|
||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip>
|
||||
<!-- 在disasterType中获取dictKey 对应的dictValue -->
|
||||
<template #default="scope">
|
||||
<el-tag type="info">{{ getValue(scope.row.disasterType) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="disasterKeyword" label="Disaster keyword" 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="disasterKeyword" label="Disaster keywords" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="Operate" label="Operate" width="85" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-button size="small" text type="primary" @click="startBot(scope.row)">start</el-button>
|
||||
<!-- <el-tag type="info" v-if="scope.row.respondStatus == 3">complete</el-tag> -->
|
||||
|
@ -33,45 +33,45 @@
|
|||
<el-col :span="14">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
||||
<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"
|
||||
size="default" clearable @change="getTableData(); state.queryTitle = ''">
|
||||
<el-option value="1" label="news"></el-option>
|
||||
<el-option value="2" label="socialMedia"></el-option>
|
||||
<el-option value="1" label="News"></el-option>
|
||||
<el-option value="2" label="SocialMedia"></el-option>
|
||||
</el-select>
|
||||
</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"
|
||||
size="default" clearable>
|
||||
<el-option value="0" label="No review"></el-option>
|
||||
<el-option value="1" label="reserve"></el-option>
|
||||
<el-option value="2" label="not retain"></el-option>
|
||||
<el-option value="0" label="Awaiting approval"></el-option>
|
||||
<el-option value="1" label="Approved"></el-option>
|
||||
<el-option value="2" label="Rejected"></el-option>
|
||||
</el-select>
|
||||
</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-form-item>
|
||||
<el-button size="default" type="primary" class="ml10" @click=" getTableData ">
|
||||
<el-icon>
|
||||
<ele-Search />
|
||||
</el-icon>
|
||||
search
|
||||
Search
|
||||
</el-button>
|
||||
<el-button size="default" type="success" class="ml10" @click=" openDialog ">
|
||||
<el-icon>
|
||||
<ele-Upload />
|
||||
</el-icon>
|
||||
review
|
||||
Batch operation
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table :data=" state.tableData.data " v-loading=" state.tableData.loading "
|
||||
@selection-change=" handleSelectionChange " style="width: 100%">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column type="index" label="ID" width="50" />
|
||||
<el-table-column 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>
|
||||
<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="content" label="Content" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="type" label="Type" show-overflow-tooltip>
|
||||
<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 == 1 ">bing</el-tag>
|
||||
|
@ -79,7 +79,7 @@
|
|||
<el-tag type="info" v-if=" state.searchName == '2' && scope.row.type == 1 ">weibo</el-tag>
|
||||
</template>
|
||||
</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 ">
|
||||
<a :href=" scope.row.link " target="_blank">goto link</a>
|
||||
</template>
|
||||
|
@ -96,11 +96,11 @@
|
|||
<el-table-column prop="Operate" label="Operate" show-overflow-tooltip>
|
||||
<template #default=" scope ">
|
||||
<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 "
|
||||
@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 "
|
||||
@click=" openDialog(scope.row, false) ">review</el-button>
|
||||
@click=" openDialog(scope.row, false) ">Rejected</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -272,6 +272,10 @@ const getDisasterData = () => {
|
|||
}
|
||||
getList(param).then(res => {
|
||||
state.disasterData.data = res.records;
|
||||
state.disasterData.data.forEach(item=>{
|
||||
let date = item.disasterTime.slice(0,10);
|
||||
item.disasterTime = date;
|
||||
})
|
||||
state.disasterData.total = res.total;
|
||||
state.disasterData.loading = false;
|
||||
})
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
||||
highlight-current-row @row-click="tableClick">
|
||||
<el-table-column type="index" label="ID" width="50" />
|
||||
<el-table-column prop="vordmId" label="ID" width="118" />
|
||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterCountry" label="disaster country" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterTime" label="disaster time" show-overflow-tooltip></el-table-column>
|
||||
<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-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
|
||||
class="mt15" :pager-count="3" :page-sizes="[10, 20, 30]"
|
||||
|
@ -22,7 +22,7 @@
|
|||
<el-col :span="14">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
||||
<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>
|
||||
<el-option value="0" label="basic data"></el-option>
|
||||
<el-option value="1" label="responded report"></el-option>
|
||||
|
@ -32,26 +32,25 @@
|
|||
<el-icon>
|
||||
<ele-Search />
|
||||
</el-icon>
|
||||
search
|
||||
Search
|
||||
</el-button>
|
||||
<el-button size="default" type="success" class="ml10" @click="uploadData">
|
||||
<el-icon>
|
||||
<ele-Upload />
|
||||
</el-icon>
|
||||
upload
|
||||
Add
|
||||
</el-button>
|
||||
<el-button size="default" type="danger" class="ml10" @click="batchDel">
|
||||
<el-icon>
|
||||
<ele-Delete />
|
||||
</el-icon>
|
||||
batch delete
|
||||
Delete
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading"
|
||||
@selection-change="handleSelectionChange" style="width: 100%">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column type="index" label="ID" width="50" />
|
||||
<el-table-column prop="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="title" label="Professional title" show-overflow-tooltip
|
||||
width="150"></el-table-column>
|
||||
|
@ -167,6 +166,10 @@ const getDisasterData = () => {
|
|||
state.disasterData.loading = true;
|
||||
getDisasterPage(state.disasterData.param.pageNum, state.disasterData.param.pageSize, {}).then(res => {
|
||||
state.disasterData.data = res.records;
|
||||
state.disasterData.data.forEach(item=>{
|
||||
let date = item.disasterTime.slice(0,10);
|
||||
item.disasterTime = date;
|
||||
})
|
||||
state.disasterData.total = res.total;
|
||||
state.disasterData.loading = false;
|
||||
})
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
||||
highlight-current-row @row-click="tableClick">
|
||||
<el-table-column type="index" label="ID" width="50" />
|
||||
<el-table-column prop="vordmId" label="ID" width="118" />
|
||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterCountry" label="disaster country" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterTime" label="disaster time" show-overflow-tooltip></el-table-column>
|
||||
<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-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
|
||||
class="mt15" :pager-count="3" :page-sizes="[10, 20, 30]"
|
||||
|
@ -34,13 +34,13 @@
|
|||
<el-icon>
|
||||
<ele-Upload />
|
||||
</el-icon>
|
||||
upload
|
||||
Upload
|
||||
</el-button>
|
||||
<el-button size="default" type="danger" class="ml10" @click="batchDel">
|
||||
<el-icon>
|
||||
<ele-Delete />
|
||||
</el-icon>
|
||||
batch delete
|
||||
Batch delete
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
|
@ -48,12 +48,12 @@
|
|||
@selection-change="handleSelectionChange" style="width: 100%">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column type="index" label="ID" width="50" />
|
||||
<el-table-column prop="name" label="name" show-overflow-tooltip>
|
||||
<el-table-column prop="name" label="Name" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ formatName(scope.row.name) }}
|
||||
</template>
|
||||
</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">
|
||||
<el-popover trigger="hover" placement="right" popper-class="max-h-300px overflow-auto" :width="330">
|
||||
<!-- table中原本显示的图片 -->
|
||||
|
@ -198,6 +198,10 @@ const getDisasterData = () => {
|
|||
state.disasterData.loading = true;
|
||||
getDisasterPage(state.disasterData.param.pageNum, state.disasterData.param.pageSize, {}).then((res) => {
|
||||
state.disasterData.data = res.records;
|
||||
state.disasterData.data.forEach(item=>{
|
||||
let date = item.disasterTime.slice(0,10);
|
||||
item.disasterTime = date;
|
||||
})
|
||||
state.disasterData.total = res.total;
|
||||
state.disasterData.loading = false;
|
||||
});
|
||||
|
|
|
@ -4,41 +4,29 @@
|
|||
<el-col :span="10">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<span style="margin:2%;font-weight: 600;font-size: 18px;">Disaster Info</span>
|
||||
<el-table :data="state.disasterData.data"
|
||||
v-loading="state.disasterData.loading"
|
||||
style="width: 100%"
|
||||
highlight-current-row
|
||||
@row-click="tableClick">
|
||||
<el-table-column type="index"
|
||||
label="ID"
|
||||
width="50" />
|
||||
<el-table-column prop="disasterType"
|
||||
label="Disaster type"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterCountry"
|
||||
label="disaster country"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterTime"
|
||||
label="disaster time"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
||||
highlight-current-row @row-click="tableClick">
|
||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterCountry" label="Disaster country" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="Operate" label="Operate" width="85" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-button size="small" text type="primary" @click="startBot(scope.row)">start</el-button>
|
||||
<!-- <el-tag type="info" v-if="scope.row.respondStatus == 3">complete</el-tag> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleDisasterSizeChange"
|
||||
@current-change="onHandleDisasterCurrentChange"
|
||||
class="mt15"
|
||||
:pager-count="3"
|
||||
:page-sizes="[10, 20, 30]"
|
||||
v-model:current-page="state.disasterData.param.pageNum"
|
||||
background
|
||||
v-model:page-size="state.disasterData.param.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="state.disasterData.total">
|
||||
<el-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
|
||||
class="mt15" :pager-count="3" :page-sizes="[10, 20, 30]"
|
||||
v-model:current-page="state.disasterData.param.pageNum" background
|
||||
v-model:page-size="state.disasterData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||
:total="state.disasterData.total">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<div class="system-user-search mb15"
|
||||
style="display: flex;margin-left: 10px;margin-top: 10px;">
|
||||
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
||||
<!-- 选择灾害类型 -->
|
||||
<!-- <el-select v-model="state.value_disasterType"
|
||||
size="default"
|
||||
|
@ -74,33 +62,17 @@
|
|||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-tree-select v-model="state.value_satelliteType"
|
||||
:data="state.options_satelliteType"
|
||||
multiple
|
||||
collapse-tags
|
||||
collapse-tags-tooltip
|
||||
:render-after-expand="false"
|
||||
show-checkbox
|
||||
clearable
|
||||
placeholder="Select satellite type" />
|
||||
<el-tree-select v-model="state.value_satelliteType" :data="state.options_satelliteType" multiple
|
||||
collapse-tags collapse-tags-tooltip :render-after-expand="false" show-checkbox clearable
|
||||
placeholder="Select satellite type" />
|
||||
</el-col>
|
||||
<el-col :span="8"
|
||||
style="padding-left:1%;">
|
||||
<el-tree-select v-model="state.value_resolution"
|
||||
:data="state.options_resolution"
|
||||
multiple
|
||||
collapse-tags
|
||||
collapse-tags-tooltip
|
||||
:render-after-expand="false"
|
||||
show-checkbox
|
||||
clearable
|
||||
placeholder="Select resolution" />
|
||||
<el-col :span="8" style="padding-left:1%;">
|
||||
<el-tree-select v-model="state.value_resolution" :data="state.options_resolution" multiple collapse-tags
|
||||
collapse-tags-tooltip :render-after-expand="false" show-checkbox clearable
|
||||
placeholder="Select resolution" />
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-button size="default"
|
||||
type="primary"
|
||||
class="ml10"
|
||||
@click="searchRemoteSensingSourceData">
|
||||
<el-button size="default" type="primary" class="ml10" @click="searchRemoteSensingSourceData">
|
||||
<el-icon>
|
||||
<ele-Search />
|
||||
</el-icon>
|
||||
|
@ -111,40 +83,22 @@
|
|||
|
||||
</div>
|
||||
<!-- id,卫星类型,生产日期,产品谱段,产品分辨率,云覆盖量,景中心经纬度,元数据下载链接,缩略图 支撑单位 -->
|
||||
<el-table :data="state.requestData"
|
||||
style="width: 100%">
|
||||
<el-table-column type="index"
|
||||
label="Index"
|
||||
align="center"
|
||||
width="80"></el-table-column>
|
||||
<el-table-column prop="satelliteCode"
|
||||
label="Satellite code"
|
||||
align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="productTime"
|
||||
label="Product time"
|
||||
align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="productBandsNum"
|
||||
label="Product bands num"
|
||||
align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="productResolution"
|
||||
label="Product resolution(m)"
|
||||
align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="cloudCover"
|
||||
label="Cloud cover(%)"
|
||||
align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="sourceOrganization"
|
||||
label="Source organization"
|
||||
align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="downloadUrl"
|
||||
label="Download url"
|
||||
align="center"
|
||||
show-overflow-tooltip> </el-table-column>
|
||||
<el-table :data="state.requestData" style="width: 100%">
|
||||
<el-table-column type="index" label="Index" align="center" width="80"></el-table-column>
|
||||
<el-table-column prop="satelliteCode" label="Satellite code" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="productTime" label="Product time" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="productBandsNum" label="Product bands num" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="productResolution" label="Product resolution(m)" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="cloudCover" label="Cloud cover(%)" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="sourceOrganization" label="Source organization" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="downloadUrl" label="Download url" align="center" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="Operate"
|
||||
label="Operate"
|
||||
show-overflow-tooltip></el-table-column> -->
|
||||
|
@ -185,16 +139,10 @@
|
|||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleSizeChange"
|
||||
@current-change="onHandleCurrentChange"
|
||||
class="mt15"
|
||||
:pager-count="3"
|
||||
:page-sizes="[10, 20, 30]"
|
||||
background
|
||||
v-model:current-page="state.tableData.param.pageNum"
|
||||
v-model:page-size="state.tableData.param.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="state.tableData.total">
|
||||
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
|
||||
:pager-count="3" :page-sizes="[10, 20, 30]" background v-model:current-page="state.tableData.param.pageNum"
|
||||
v-model:page-size="state.tableData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||
:total="state.tableData.total">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</el-col>
|
||||
|
@ -206,7 +154,7 @@
|
|||
import { ref, reactive, onMounted } from 'vue';
|
||||
import { getRemoteSensingSourceData, getRemoteSensingSourceDataByCondition, getPagesRemoteSensingSourceData } from "/@/api/remoteSensingSourceData/remoteSensingSourceData.js";
|
||||
import { getDisasterPage } from '/@/api/data/otherData.js'
|
||||
|
||||
// import { getList as getDisasterPage } from '/@/api/disasterInfo/index';
|
||||
|
||||
const state = reactive({
|
||||
disasterData: {
|
||||
|
@ -276,7 +224,10 @@ const state = reactive({
|
|||
requestResolution: [],
|
||||
requestSatellite: []
|
||||
})
|
||||
|
||||
const emit = defineEmits(['response']);
|
||||
const startBot=(row)=>{
|
||||
emit('response', row);
|
||||
}
|
||||
// 初始化灾害表格数据
|
||||
const getDisasterData = () => {
|
||||
state.disasterData.loading = true;
|
||||
|
@ -635,11 +586,13 @@ const searchDisasterDate = () => {
|
|||
|
||||
<style scoped lang="scss">
|
||||
.system-role-padding {
|
||||
padding-bottom: 2%;
|
||||
padding-bottom: 2%;
|
||||
}
|
||||
|
||||
.el-pagination {
|
||||
padding-left: 1%;
|
||||
padding-left: 1%;
|
||||
}
|
||||
|
||||
.mt15 {
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
|
|
|
@ -11,12 +11,9 @@
|
|||
<span class="demonstration">Start time</span>
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
<el-date-picker style="width: 90%;"
|
||||
v-model="state.startTime"
|
||||
type="datetime"
|
||||
placeholder="Select start time"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
:shortcuts="state.shortcuts" />
|
||||
<el-date-picker style="width: 90%;" v-model="state.startTime" type="datetime"
|
||||
placeholder="Select start time" value-format="YYYY-MM-DD HH:mm:ss" :shortcuts="state.shortcuts"
|
||||
:disabled-date="disabledDate" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="block">
|
||||
|
@ -24,41 +21,31 @@
|
|||
<span class="demonstration">End time</span>
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
<el-date-picker style="width: 90%;"
|
||||
v-model="state.endTime"
|
||||
type="datetime"
|
||||
placeholder="Select end time"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
:shortcuts="state.shortcuts" />
|
||||
<el-date-picker style="width: 90%;" v-model="state.endTime" type="datetime" placeholder="Select end time"
|
||||
value-format="YYYY-MM-DD HH:mm:ss" :shortcuts="state.shortcuts" :disabled-date="disabledDate" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<el-card class="box-card"
|
||||
style="margin-top: 3%;">
|
||||
<el-card class="box-card" style="margin-top: 3%;">
|
||||
<span>Select a region</span>
|
||||
<el-scrollbar wrap-class="list"
|
||||
view-class="view-box"
|
||||
:native="false">
|
||||
<div v-for="(coordinate,i) in state.coordinateList">
|
||||
<el-scrollbar wrap-class="list" view-class="view-box" :native="false">
|
||||
<div v-for="(coordinate, i) in state.coordinateList ">
|
||||
<el-row class="coordinateContainer">
|
||||
<el-col :span="1"></el-col>
|
||||
<el-col :span="19">
|
||||
<span style="font-size:14px;width: 100%;">{{
|
||||
'Lat: ' + parseFloat(coordinate.Lat).toFixed(4) + ',  Lng: ' + parseFloat(coordinate.Lng).toFixed(4)
|
||||
}}</span>
|
||||
'Lat: ' + parseFloat(coordinate.Lat).toFixed(4) + ',  Lng: ' +
|
||||
parseFloat(coordinate.Lng).toFixed(4)
|
||||
}}</span>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-button class="el-icon"
|
||||
@click="editCoordinate"
|
||||
size="small">
|
||||
<el-button class="el-icon" @click="editCoordinate" size="small">
|
||||
<ele-Edit />
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-button class="el-icon"
|
||||
@click="state.coordinateList.splice(i, 1);"
|
||||
size="small">
|
||||
<el-button class="el-icon" @click="state.coordinateList.splice(i, 1);" size="small">
|
||||
<ele-Delete />
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
@ -66,34 +53,25 @@
|
|||
</div>
|
||||
</el-scrollbar>
|
||||
<el-row>
|
||||
<el-col :span="1"></el-col>
|
||||
<el-col :span="7">
|
||||
<el-button class="coordinateBtn"
|
||||
@click="addCoordinate">Add coordinates</el-button>
|
||||
<el-col :span=" 1 "></el-col>
|
||||
<el-col :span=" 7 ">
|
||||
<el-button class="coordinateBtn" @click=" addCoordinate ">Add coordinates</el-button>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-button class="coordinateBtn"
|
||||
@click="clearCoordinate">Clear coordinates</el-button>
|
||||
<el-col :span=" 7 ">
|
||||
<el-button class="coordinateBtn" @click=" clearCoordinate ">Clear coordinates</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card class="box-card"
|
||||
style="margin-top: 3%;">
|
||||
<el-card class="box-card" style="margin-top: 3%;">
|
||||
<span>Select satellite type</span>
|
||||
<el-tree-select class="satelliteSelect"
|
||||
v-model="state.satelliteSelected"
|
||||
:data="state.sensor"
|
||||
multiple
|
||||
collapse-tags
|
||||
collapse-tags-tooltip
|
||||
:render-after-expand="false"
|
||||
show-checkbox
|
||||
placeholder="Select satellite type" />
|
||||
<el-tree-select class="satelliteSelect" v-model=" state.satelliteSelected " :data=" state.sensor " multiple
|
||||
collapse-tags collapse-tags-tooltip :render-after-expand=" false " show-checkbox
|
||||
placeholder="Select satellite type" />
|
||||
</el-card>
|
||||
|
||||
<el-card class="box-card"
|
||||
<!-- <el-card class="box-card"
|
||||
style="margin-top: 3%;">
|
||||
<span>Select VoRDM ID</span>
|
||||
<el-select class="idSelect"
|
||||
|
@ -105,23 +83,20 @@
|
|||
:label="item.label"
|
||||
:value="item.value" />
|
||||
</el-select>
|
||||
</el-card>
|
||||
</el-card> -->
|
||||
<el-row>
|
||||
<el-col :span="1"></el-col>
|
||||
<el-col :span="6">
|
||||
<el-button class="lowerBtn"
|
||||
@click="startCrawl">Start Crawl</el-button>
|
||||
<el-col :span=" 1 "></el-col>
|
||||
<el-col :span=" 6 ">
|
||||
<el-button class="lowerBtn" @click=" startCrawl ">Start Crawl</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-button class="lowerBtn"
|
||||
@click="ClearCondition">Cancel</el-button>
|
||||
<el-col :span=" 6 ">
|
||||
<el-button class="lowerBtn" @click=" ClearCondition ">Go Back</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<Map id="map"
|
||||
ref="map">
|
||||
<el-col :span=" 16 ">
|
||||
<Map id="map" ref="map">
|
||||
</Map>
|
||||
</el-col>
|
||||
|
||||
|
@ -129,14 +104,17 @@
|
|||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
<script setup>
|
||||
import Map from "/@/components/Map.vue";
|
||||
import { ref, reactive, watch } from 'vue';
|
||||
import { ref, reactive, watch, defineExpose } from 'vue';
|
||||
import { rs, submit } from '/@/api/crawl/index';
|
||||
import { useUserInfo } from '/@/stores/userInfo';
|
||||
import { ElMessage } from "element-plus";
|
||||
import { ElMessage,ElMessageBox} from "element-plus";
|
||||
const userInfo = useUserInfo();
|
||||
|
||||
const emit = defineEmits(['response']);
|
||||
const disabledDate = (time) => {
|
||||
return time.getTime() > Date.now()
|
||||
}
|
||||
// 初始化数据
|
||||
const map = ref()
|
||||
const state = reactive({
|
||||
|
@ -313,6 +291,7 @@ const state = reactive({
|
|||
lon: '',
|
||||
disLat: '',
|
||||
disLon: '',
|
||||
data: {}
|
||||
})
|
||||
|
||||
const onMapClick = (e) => {
|
||||
|
@ -400,20 +379,20 @@ const editCoordinate = () => {
|
|||
|
||||
// 开始爬虫
|
||||
const startCrawl = () => {
|
||||
if(!state.startTime){
|
||||
if (!state.startTime) {
|
||||
ElMessage.error("Please select the search start time")
|
||||
return;
|
||||
}
|
||||
if(!state.endTime){
|
||||
if (!state.endTime) {
|
||||
ElMessage.error("Please select the search end time")
|
||||
return;
|
||||
}
|
||||
if(state.coordinateList.length==0||!state.coordinateList[0].Lat||!state.coordinateList[0].Lng||!state.coordinateList[1].Lat ||!state.coordinateList[1].Lng){
|
||||
if (state.coordinateList.length == 0 || !state.coordinateList[0].Lat || !state.coordinateList[0].Lng || !state.coordinateList[1].Lat || !state.coordinateList[1].Lng) {
|
||||
ElMessage.error("Please draw the area on the map")
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
var ranges = state.coordinateList[0].Lat + ' ' + state.coordinateList[0].Lng + ',' + state.coordinateList[1].Lat + ' ' + state.coordinateList[1].Lng
|
||||
var type = null
|
||||
if (state.satelliteSelected[0] == 'landsat') {
|
||||
|
@ -428,38 +407,60 @@ const startCrawl = () => {
|
|||
var param = {
|
||||
"stime": state.startTime,
|
||||
"etime": state.endTime,
|
||||
"disaster_id": state.selectID,
|
||||
"disaster_id": state.data.disasterId,
|
||||
"ranges": ranges,
|
||||
"id": id
|
||||
}
|
||||
|
||||
console.log(param);
|
||||
// submit(
|
||||
// {
|
||||
// type: type,
|
||||
// startDate:state.startTime,
|
||||
// endDate:state.endTime,
|
||||
// manageId: userInfo.userInfos.id,
|
||||
// status: 0,
|
||||
// disasterId: state.selectID,
|
||||
// id: (id ? id : null)
|
||||
// }
|
||||
// ).then(ret => {
|
||||
// if (ret == 1042) {
|
||||
// ElMessage.error("error")
|
||||
// } else {
|
||||
|
||||
// rs(stime, etime, disaster_id, ranges, type = 1).then(res => {
|
||||
// console.log(res);
|
||||
// // getData();
|
||||
// ElMessage({
|
||||
// message: 'Success, Start crawling.',
|
||||
// type: 'success',
|
||||
// })
|
||||
// })
|
||||
|
||||
// }
|
||||
// })
|
||||
submit(
|
||||
{
|
||||
type: type,
|
||||
startDate: state.startTime,
|
||||
endDate: state.endTime,
|
||||
manageId: userInfo.userInfos.id,
|
||||
status: 0,
|
||||
disasterId: state.data.disasterId,
|
||||
id: (id ? id : null)
|
||||
}
|
||||
).then(ret => {
|
||||
if (ret == 1042) {
|
||||
ElMessage.error("error")
|
||||
} else {
|
||||
state.satelliteSelected.forEach(data => {
|
||||
if (data == 'Sentinel') {
|
||||
rs(state.startTime, state.endTime, state.data.disasterId, ranges, type = 1, ret.id).then(res => {
|
||||
// getData();
|
||||
ElMessage({
|
||||
message: 'Success, Start crawling. sentinel',
|
||||
type: 'success',
|
||||
})
|
||||
})
|
||||
} else if ("landsat" == data) {
|
||||
rs(state.startTime, state.endTime, state.data.disasterId, ranges, type = 1, ret.id).then(res => {
|
||||
// getData();
|
||||
ElMessage({
|
||||
message: 'Success, Start crawling. landsat',
|
||||
type: 'success',
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
ElMessageBox.confirm(
|
||||
'The operation has been submitted, would you like to return to the list page?',
|
||||
'tips',
|
||||
{
|
||||
confirmButtonText: 'OK',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
emit('response')
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 清空搜索条件
|
||||
|
@ -470,6 +471,7 @@ const ClearCondition = () => {
|
|||
state.satelliteSelected = []
|
||||
state.coordinateList = []
|
||||
state.selectID = ''
|
||||
emit('response')
|
||||
}
|
||||
|
||||
// 监听
|
||||
|
@ -481,49 +483,69 @@ watch(
|
|||
}
|
||||
},
|
||||
{ immediate: true })
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.rsSelect {
|
||||
border: 1px solid #040728;
|
||||
height: 52rem;
|
||||
span {
|
||||
display: block;
|
||||
margin-bottom: 3%;
|
||||
font-size: 18px;
|
||||
}
|
||||
.satelliteSelect,
|
||||
.idSelect {
|
||||
width: 90%;
|
||||
margin: 2% 3% 0 3%;
|
||||
}
|
||||
|
||||
.block {
|
||||
margin-top: 2%;
|
||||
}
|
||||
.demonstration {
|
||||
font-size: 14px;
|
||||
float: left;
|
||||
height: 20px;
|
||||
line-height: 40px;
|
||||
}
|
||||
.coordinateContainer {
|
||||
margin: 3%;
|
||||
height: 15px;
|
||||
}
|
||||
.coordinateBtn {
|
||||
width: 90%;
|
||||
word-break: keep-all;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.lowerBtn {
|
||||
width: 90%;
|
||||
margin: 3% 0;
|
||||
}
|
||||
const setData = (row) => {
|
||||
state.data = row;
|
||||
state.selectID = row.disasterId
|
||||
map.value.mapOperations.wktParseToMap(row.geometry)
|
||||
console.log(row)
|
||||
}
|
||||
defineExpose({
|
||||
setData
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.rsSelect {
|
||||
border: 1px solid #040728;
|
||||
height: 52rem;
|
||||
|
||||
span {
|
||||
display: block;
|
||||
margin-bottom: 3%;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.satelliteSelect,
|
||||
.idSelect {
|
||||
width: 90%;
|
||||
margin: 2% 3% 0 3%;
|
||||
}
|
||||
|
||||
.block {
|
||||
margin-top: 2%;
|
||||
}
|
||||
|
||||
.demonstration {
|
||||
font-size: 14px;
|
||||
float: left;
|
||||
height: 20px;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.coordinateContainer {
|
||||
margin: 3%;
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
.coordinateBtn {
|
||||
width: 90%;
|
||||
word-break: keep-all;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.lowerBtn {
|
||||
width: 90%;
|
||||
margin: 3% 0;
|
||||
}
|
||||
}
|
||||
|
||||
#map {
|
||||
height: 52rem;
|
||||
height: 52rem;
|
||||
}
|
||||
</style>
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="container">
|
||||
<el-tabs v-model="state.activeName">
|
||||
<!-- <el-tabs v-model="state.activeName">
|
||||
<el-tab-pane label="Search condition"
|
||||
name="first">
|
||||
<search-condition></search-condition>
|
||||
|
@ -10,20 +10,33 @@
|
|||
name="second">
|
||||
<retrieval-condition></retrieval-condition>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-tabs> -->
|
||||
|
||||
<search-condition v-if ="state.isEdit" ref="edit" @response="responseFn"></search-condition>
|
||||
<retrieval-condition v-if ="!state.isEdit" @response="responseFn"></retrieval-condition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive } from 'vue';
|
||||
import { reactive,ref,nextTick } from 'vue';
|
||||
import retrievalCondition from './components/retrievalCondition.vue'
|
||||
import searchCondition from './components/searchCondition.vue'
|
||||
|
||||
|
||||
const edit = ref();
|
||||
const state = reactive({
|
||||
activeName: 'first'
|
||||
activeName: 'first',
|
||||
isEdit:false,
|
||||
data:{},
|
||||
})
|
||||
const responseFn = (res)=>{
|
||||
state.data = res;
|
||||
state.isEdit = !state.isEdit;
|
||||
nextTick(()=>{
|
||||
if(res){
|
||||
edit.value.setData(state.data);
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
||||
highlight-current-row @row-click="tableClick">
|
||||
<el-table-column type="index" label="ID" width="50" />
|
||||
<el-table-column prop="vordmId" label="ID" width="118" />
|
||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterCountry" label="disaster country" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterTime" label="disaster time" show-overflow-tooltip></el-table-column>
|
||||
<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-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
|
||||
class="mt15" :pager-count="3" :page-sizes="[10, 20, 30]"
|
||||
|
@ -34,24 +34,24 @@
|
|||
<el-icon>
|
||||
<ele-Upload />
|
||||
</el-icon>
|
||||
upload
|
||||
Upload
|
||||
</el-button>
|
||||
<el-button size="default" type="danger" class="ml10" @click="batchDel">
|
||||
<el-icon>
|
||||
<ele-Delete />
|
||||
</el-icon>
|
||||
batch delete
|
||||
Batch delete
|
||||
</el-button>
|
||||
</div>
|
||||
<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"
|
||||
@selection-change="handleSelectionChange" style="width: 100%">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column type="index" label="ID" width="50" />
|
||||
<el-table-column prop="date" label="date" 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="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="word" label="Words" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="Operate" label="Operate" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-button size="small" text type="primary" @click="editWordCloud(scope.row)">Edit</el-button>
|
||||
|
@ -61,18 +61,18 @@
|
|||
</el-table>
|
||||
<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"
|
||||
background v-model:page-size="state.tableData.param.pageSize"
|
||||
layout="total, sizes, prev, pager, next" :total="state.tableData.total">
|
||||
background v-model:page-size="state.tableData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||
:total="state.tableData.total">
|
||||
</el-pagination>
|
||||
</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"
|
||||
@selection-change="handleSelectionHotspotChange" style="width: 100%">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<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="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="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="frequency" label="Frequency" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="Operate" label="Operate" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-button size="small" text type="primary" @click="editHotspot(scope.row)">Edit</el-button>
|
||||
|
@ -82,8 +82,8 @@
|
|||
</el-table>
|
||||
<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"
|
||||
background v-model:page-size="state.tableData.param.pageSize"
|
||||
layout="total, sizes, prev, pager, next" :total="state.tableData.total">
|
||||
background v-model:page-size="state.tableData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||
:total="state.tableData.total">
|
||||
</el-pagination>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
@ -212,6 +212,10 @@ const getDisasterData = () => {
|
|||
state.disasterData.loading = true;
|
||||
getDisasterPage(state.disasterData.param.pageNum, state.disasterData.param.pageSize, {}).then(res => {
|
||||
state.disasterData.data = res.records;
|
||||
state.disasterData.data.forEach(item=>{
|
||||
let date = item.disasterTime.slice(0,10);
|
||||
item.disasterTime = date;
|
||||
})
|
||||
state.disasterData.total = res.total;
|
||||
state.disasterData.loading = false;
|
||||
})
|
||||
|
@ -249,7 +253,7 @@ const editHotspot = (row) => {
|
|||
};
|
||||
// 打开修改词云弹窗
|
||||
const editWordCloud = (row) => {
|
||||
editWordCloudsRef.value.openDialog(row);
|
||||
editWordCloudsRef.value.openDialog(row);
|
||||
};
|
||||
//批量删除词云或者热点数据
|
||||
const batchDel = () => {
|
||||
|
@ -366,6 +370,7 @@ onMounted(() => {
|
|||
font-size: 32px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.mt15 {
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
|
|
|
@ -1,5 +1,15 @@
|
|||
<template>
|
||||
<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"
|
||||
class="home-card-one mb15">
|
||||
|
@ -24,7 +34,8 @@
|
|||
:style="{ background: `var(${v.color2})` }">
|
||||
<i class="flex-margin font32"
|
||||
: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>
|
||||
|
@ -33,77 +44,97 @@
|
|||
<!-- 第二行 -->
|
||||
<el-row :gutter="15"
|
||||
class="home-card-two mb15">
|
||||
<!-- 后台响应须知 -->
|
||||
<!-- 响应和发起量统计 -->
|
||||
<el-col :xs="24"
|
||||
:sm="10"
|
||||
:md="10"
|
||||
:lg="8"
|
||||
:xl="8">
|
||||
:sm="12"
|
||||
:md="12"
|
||||
:lg="12"
|
||||
:xl="12">
|
||||
<div class="home-card-item">
|
||||
<div class="home-card-item-title">Notes on Background Response</div>
|
||||
<div class="home-monitor">
|
||||
<div class="flex-warp">
|
||||
更新日期:2023-03-31<br />
|
||||
注意事项:<br />
|
||||
~对用户申请进行严格审核<br />
|
||||
~对用户提供灾害经纬度范围进行校正<br />
|
||||
~如响应及时,社交媒体数据的Twitter数据直接实时获取即可<br />
|
||||
~数据导出时需检查是否爬取完毕<br />
|
||||
~如灾害发生期间没有遥感数据,在未来一段时间需及时查询更新<br />
|
||||
</div>
|
||||
</div>
|
||||
<div style="height: 100%" ref="homeLineRef"></div>
|
||||
</div>
|
||||
</el-col>
|
||||
<!-- 全年用户申请量统计 -->
|
||||
<!-- 全年用户访问量和下载量 -->
|
||||
<el-col :xs="24"
|
||||
:sm="14"
|
||||
:md="14"
|
||||
:lg="16"
|
||||
:xl="16">
|
||||
:sm="12"
|
||||
:md="12"
|
||||
:lg="12"
|
||||
: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 style="height: 100%"
|
||||
ref="homeBarRef"></div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 第三行 -->
|
||||
<!-- 第四行 -->
|
||||
<el-row :gutter="15"
|
||||
class="home-card-three">
|
||||
class="home-card-four mb15">
|
||||
<!-- 灾害发生区域占比 饼图-->
|
||||
<el-col :xs="24"
|
||||
:sm="10"
|
||||
:md="10"
|
||||
:lg="6"
|
||||
:xl="6">
|
||||
<div class="home-card-item">
|
||||
<div style="height: 100%"
|
||||
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%"
|
||||
:sm="24"
|
||||
:md="24"
|
||||
:lg="24"
|
||||
:xl="24">
|
||||
<div class="home-card-item" style="display: flex;height: 460px;">
|
||||
<div style="height: 100%;width: 58%;"
|
||||
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>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -116,7 +147,13 @@ import { useThemeConfig } from '/@/stores/themeConfig';
|
|||
import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';
|
||||
import {statistics} from '/@/api/disasterInfo/index.js';
|
||||
// 定义变量内容
|
||||
//响应量 发起量
|
||||
const homeLineRef = ref();
|
||||
//访问量和下载量
|
||||
const homeVandDRef = ref();
|
||||
//上传次数统计
|
||||
const homeUploadRef = ref();
|
||||
|
||||
const homePieRef = ref();
|
||||
const homePieRef2 = ref();
|
||||
const homeBarRef = ref();
|
||||
|
@ -125,9 +162,14 @@ const storesThemeConfig = useThemeConfig();
|
|||
const { themeConfig } = storeToRefs(storesThemeConfig);
|
||||
const { isTagsViewCurrenFull } = storeToRefs(storesTagsViewRoutes);
|
||||
const state = reactive({
|
||||
|
||||
param:{
|
||||
year:''
|
||||
},
|
||||
year:new Date,
|
||||
global: {
|
||||
homeChartOne: null,
|
||||
homeVandD:null,
|
||||
homeUpload:null,
|
||||
homeChartTwo: null,
|
||||
homeCharThree: null,
|
||||
homeChartFour: null,
|
||||
|
@ -138,7 +180,7 @@ const state = reactive({
|
|||
num1: '',
|
||||
num2: '',
|
||||
num3: 'Number of Disaster Response Applications',
|
||||
num4: 'fa fa-meetup',
|
||||
num4: 'iconfont',
|
||||
color1: '#FF6462',
|
||||
color2: '--next-color-primary-lighter',
|
||||
color3: '--el-color-primary',
|
||||
|
@ -147,7 +189,7 @@ const state = reactive({
|
|||
num1: '',
|
||||
num2: '',
|
||||
num3: 'Actual times of disaster response',
|
||||
num4: 'iconfont icon-ditu',
|
||||
num4: 'iconfont',
|
||||
color1: '#6690F9',
|
||||
color2: '--next-color-success-lighter',
|
||||
color3: '--el-color-success',
|
||||
|
@ -156,7 +198,7 @@ const state = reactive({
|
|||
num1: '',
|
||||
num2: '',
|
||||
num3: 'User Visits',
|
||||
num4: 'iconfont icon-zaosheng',
|
||||
num4: 'iconfont',
|
||||
color1: '#6690F9',
|
||||
color2: '--next-color-warning-lighter',
|
||||
color3: '--el-color-warning',
|
||||
|
@ -165,110 +207,61 @@ const state = reactive({
|
|||
num1: '',
|
||||
num2: '',
|
||||
num3: 'Data downloads',
|
||||
num4: 'fa fa-github-alt',
|
||||
num4: 'iconfont',
|
||||
color1: '#FF6462',
|
||||
color2: '--next-color-danger-lighter',
|
||||
color3: '--el-color-danger',
|
||||
},
|
||||
],
|
||||
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',
|
||||
},
|
||||
],
|
||||
homeThree: [],
|
||||
myCharts: [],
|
||||
charts: {
|
||||
theme: '',
|
||||
bgColor: '',
|
||||
color: '#303133',
|
||||
},
|
||||
countryTable:[],
|
||||
typeTable:[]
|
||||
});
|
||||
|
||||
// 折线图
|
||||
const initLineChart = (xData,data) => {
|
||||
console.log(xData)
|
||||
console.log(data)
|
||||
|
||||
// 响应量和发起量
|
||||
const initLineChart = (xData,data1, data2) => {
|
||||
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));
|
||||
const option = {
|
||||
backgroundColor: state.charts.bgColor,
|
||||
title: {
|
||||
text: 'Annual user application statistics',
|
||||
text: 'Annual user response application statistics',
|
||||
x: 'left',
|
||||
textStyle: { fontSize: '15', color: state.charts.color },
|
||||
},
|
||||
grid: { top: 70, right: 20, bottom: 30, left: 30 },
|
||||
tooltip: { trigger: 'axis' },
|
||||
legend: { data: ['响应量'], right: 0 },
|
||||
legend: { data: ['response','initiate'], right: 0 },
|
||||
xAxis: {
|
||||
data: xData,
|
||||
data: xData
|
||||
},
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
name: '响应量',
|
||||
name: 'response',
|
||||
splitLine: { show: true, lineStyle: { type: 'dashed', color: '#f5f5f5' } },
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: 'initiate',
|
||||
splitLine: { show: true, lineStyle: { type: 'dashed', color: '#f5f5f5' } },
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '响应量',
|
||||
name: 'response',
|
||||
type: 'line',
|
||||
symbolSize: 6,
|
||||
symbol: 'circle',
|
||||
smooth: true,
|
||||
data: data,
|
||||
data: data1,
|
||||
lineStyle: { color: '#fe9a8b' },
|
||||
itemStyle: { color: '#fe9a8b', borderColor: '#fe9a8b' },
|
||||
areaStyle: {
|
||||
|
@ -277,12 +270,200 @@ const initLineChart = (xData,data) => {
|
|||
{ 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.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 灾害发生区域占比 饼图
|
||||
const initPieChart = (data) => {
|
||||
if (!state.global.dispose.some((b) => b === state.global.homeChartTwo)) state.global.homeChartTwo.dispose();
|
||||
|
@ -297,7 +478,7 @@ const initPieChart = (data) => {
|
|||
const option = {
|
||||
backgroundColor: state.charts.bgColor,
|
||||
title: {
|
||||
text: 'Proportion of Disaster Occurred Areas',
|
||||
text: 'Proportion of Disaster Occurred Areas TOP15',
|
||||
x: 'left',
|
||||
textStyle: { fontSize: '15', color: state.charts.color },
|
||||
},
|
||||
|
@ -365,7 +546,6 @@ const initPieChart = (data) => {
|
|||
};
|
||||
//homePieRef2 灾害类型占比 饼图
|
||||
const initPieChart2 = (data) => {
|
||||
console.log("pie2",data)
|
||||
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));
|
||||
// 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: [
|
||||
{
|
||||
type: 'pie',
|
||||
|
@ -444,59 +594,6 @@ const initPieChart2 = (data) => {
|
|||
state.global.homeChartFour.setOption(option);
|
||||
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
|
||||
const initEchartsResizeFun = () => {
|
||||
nextTick(() => {
|
||||
|
@ -518,68 +615,110 @@ const setHeadData = (data) => {
|
|||
state.homeOne[3].num1 = data.downloadCount
|
||||
}
|
||||
/**
|
||||
* 设置发生区域灾害占比
|
||||
* @param data
|
||||
*/
|
||||
const setDisasterArea = (data) => {
|
||||
let arr = [];
|
||||
for(let [k , v] of Object.entries(data)){
|
||||
arr.push({ name: k, value: v});
|
||||
}
|
||||
initPieChart(arr);
|
||||
}
|
||||
/**
|
||||
* 设置灾害响应月份分布量
|
||||
* 设置响应量和发起量
|
||||
* @param data
|
||||
*/
|
||||
const setResponseDisaster = (data) => {
|
||||
const setLineChart = (data) => {
|
||||
let xData = [];
|
||||
//let yData = [];
|
||||
let data1 = [];//initiate
|
||||
let data2 = [];//response
|
||||
data.forEach(item=>{
|
||||
xData.push(item.key)
|
||||
data1.push(item.initiate)
|
||||
data2.push(item.response)
|
||||
})
|
||||
// 响应量和发起量
|
||||
initLineChart(xData,data1,data2);
|
||||
}
|
||||
/**
|
||||
* 设置访问量 和下载次数
|
||||
* @param 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 yData = [];
|
||||
data.forEach(item=>{
|
||||
for(let [k , v] of Object.entries(item)){
|
||||
xData.push(k);
|
||||
yData.push(v.value);
|
||||
}
|
||||
xData.push(item.name)
|
||||
yData.push(item.val)
|
||||
})
|
||||
initLineChart(xData,yData);
|
||||
initAdministratorsChart(xData,yData);
|
||||
}
|
||||
/**
|
||||
* 设置灾害申请月份分布量
|
||||
* 管理员管理量
|
||||
* @param data
|
||||
*/
|
||||
const setApplyDisaster = (data) => {
|
||||
const setChiefChart = (data) => {
|
||||
let xData = [];
|
||||
let yData = [];
|
||||
data.forEach(item=>{
|
||||
for(let [k , v] of Object.entries(item)){
|
||||
xData.push(k);
|
||||
yData.push(v.value);
|
||||
}
|
||||
xData.push(item.name)
|
||||
yData.push(item.val)
|
||||
})
|
||||
setTimeout(() => {
|
||||
initBarChart(xData,yData);
|
||||
}, 700);
|
||||
initChiefChart(xData,yData);
|
||||
}
|
||||
/**
|
||||
* 设置灾种数量占比
|
||||
* @param 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 = [];
|
||||
for(let [k , v] of Object.entries(data)){
|
||||
arr.push({ name: k, value: v});
|
||||
}
|
||||
initPieChart2(arr)
|
||||
state.countryTable = arr
|
||||
initPieChart(arr);
|
||||
}
|
||||
//获取控制台数据
|
||||
const getDashBoradData = () => {
|
||||
statistics().then(res=>{
|
||||
state.param.year = state.year.getFullYear()
|
||||
statistics(state.param.year).then(res=>{
|
||||
console.log(res);
|
||||
//第一栏
|
||||
setHeadData(res.header);
|
||||
setDisasterArea(res.country);
|
||||
setResponseDisaster(res.responseMonth);
|
||||
setApplyDisaster(res.applyMonth);
|
||||
//第二栏
|
||||
setLineChart(res.line)
|
||||
setLineVandDChart(res.vandd);
|
||||
//第三栏
|
||||
setAdministratorsChart(res.admin)
|
||||
setChiefChart(res.chief)
|
||||
//第四栏
|
||||
setDisasterType(res.disasterNum);
|
||||
//第5栏
|
||||
setDisasterArea(res.country);
|
||||
})
|
||||
}
|
||||
// 批量设置 echarts resize
|
||||
|
@ -610,18 +749,18 @@ watch(
|
|||
state.charts.theme = isIsDark ? 'dark' : '';
|
||||
state.charts.bgColor = isIsDark ? 'transparent' : '';
|
||||
state.charts.color = isIsDark ? '#dadada' : '#303133';
|
||||
setTimeout(() => {
|
||||
//initLineChart();
|
||||
}, 500);
|
||||
setTimeout(() => {
|
||||
//initPieChart();
|
||||
}, 700);
|
||||
setTimeout(() => {
|
||||
//initPieChart2();
|
||||
}, 700);
|
||||
setTimeout(() => {
|
||||
initBarChart();
|
||||
}, 1000);
|
||||
// setTimeout(() => {
|
||||
// //initLineChart();
|
||||
// }, 500);
|
||||
// setTimeout(() => {
|
||||
// //initPieChart();
|
||||
// }, 700);
|
||||
// setTimeout(() => {
|
||||
// //initPieChart2();
|
||||
// }, 700);
|
||||
// setTimeout(() => {
|
||||
// initBarChart();
|
||||
// }, 1000);
|
||||
});
|
||||
},
|
||||
{
|
||||
|
@ -637,7 +776,9 @@ $homeNavLengh: 8;
|
|||
overflow: hidden;
|
||||
.home-card-one,
|
||||
.home-card-two,
|
||||
.home-card-three {
|
||||
.home-card-three ,
|
||||
.home-card-four,
|
||||
.home-card-five{
|
||||
.home-card-item {
|
||||
width: 100%;
|
||||
height: 130px;
|
||||
|
@ -680,7 +821,9 @@ $homeNavLengh: 8;
|
|||
}
|
||||
}
|
||||
.home-card-two,
|
||||
.home-card-three {
|
||||
.home-card-three ,
|
||||
.home-card-four,
|
||||
.home-card-five {
|
||||
.home-card-item {
|
||||
height: 400px;
|
||||
width: 100%;
|
||||
|
|
|
@ -8,13 +8,12 @@
|
|||
<el-form>
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="UserName"><el-input size="default" style="max-width: 180px"
|
||||
v-model="state.query.userName" clearable
|
||||
placeholder="Please enter the UserName">
|
||||
</el-input>
|
||||
<el-form-item label="User name"><el-input size="default" style="max-width: 180px"
|
||||
v-model="state.query.userName" clearable placeholder="Please enter the UserName">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<!-- <el-col :span="4">
|
||||
<el-form-item label="checked" style="margin-left: 10px;">
|
||||
<el-select size="default" v-model="state.query.status" clearable
|
||||
style="max-width: 180px" placeholder="Replied">
|
||||
|
@ -23,13 +22,13 @@
|
|||
<el-option label="Observed" :value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<el-button size="default" type="primary" class="ml15" style="margin-top: 4px ;"
|
||||
@click="initTableData">
|
||||
<el-icon>
|
||||
<ele-Search />
|
||||
</el-icon>
|
||||
search
|
||||
Search
|
||||
</el-button>
|
||||
|
||||
</el-row>
|
||||
|
@ -37,57 +36,59 @@
|
|||
|
||||
|
||||
|
||||
</div>
|
||||
<el-table :data="state.tableData.data" style="width: 100%" v-loading="state.tableData.loading"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column prop="userName" label="userName"> </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="message" label="message"> </el-table-column>
|
||||
<el-table-column label="Operate" width="180">
|
||||
<template #default="scope">
|
||||
<el-button :disabled="scope.row.userName === 'admin'" size="small"
|
||||
v-if="scope.row.status != 2" text type="primary"
|
||||
@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"
|
||||
@click="onOpenEdit(scope.row)">Reply e-mail</el-button>
|
||||
<el-button :disabled="scope.row.userName === 'admin'" size="small"
|
||||
v-if="scope.row.status == 1" text type="primary"
|
||||
@click="onOpenEdit(scope.row)">Reply Info</el-button>
|
||||
<el-button :disabled="scope.row.userName === 'admin'" size="small" text type="primary"
|
||||
@click="onRowDel(scope.row)">Delete</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<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" background
|
||||
v-model:page-size="state.tableData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||
:total="state.tableData.total">
|
||||
</el-pagination>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-dialog v-model="state.dialogVisible" title="Send Email" width="60%" :before-close="handleClose">
|
||||
<el-form-item label="Subject:">
|
||||
<el-input v-model="state.email.subject" placeholder="Please enter the Subject"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="Content:" > -->
|
||||
|
||||
<QuillEditor ref="myQuillEditor" theme="snow" v-model:content="state.email.text" :options="state.options"
|
||||
contentType="html" @update:content="setValue()" style="height:500px ;" />
|
||||
<!-- </el-form-item> -->
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="state.dialogVisible = false">Cancel</el-button>
|
||||
<el-button type="primary" @click="send()" v-if="state.email.status != 1">
|
||||
Send
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</el-config-provider>
|
||||
</div>
|
||||
<el-table :data="state.tableData.data" style="width: 100%" v-loading="state.tableData.loading"
|
||||
@selection-change="handleSelectionChange">
|
||||
<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="organization" label="Organization"> </el-table-column>
|
||||
<el-table-column prop="message" label="Message"> </el-table-column>
|
||||
<el-table-column label="Operate" width="180">
|
||||
<template #default="scope">
|
||||
<!-- <el-button :disabled="scope.row.userName === 'admin'" size="small" v-if="scope.row.status != 2 " text type="primary"
|
||||
@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"
|
||||
@click="onOpenEdit(scope.row)">Reply e-mail</el-button>
|
||||
<el-button :disabled="scope.row.userName === 'admin'" size="small" v-if="scope.row.status == 1 " text type="primary"
|
||||
@click="onOpenEdit(scope.row)">Reply Info</el-button>
|
||||
<el-button :disabled="scope.row.userName === 'admin'" size="small" text type="primary"
|
||||
@click="onRowDel(scope.row)">Delete</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<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"
|
||||
background v-model:page-size="state.tableData.param.pageSize"
|
||||
layout="total, sizes, prev, pager, next" :total="state.tableData.total">
|
||||
</el-pagination>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-dialog v-model="state.dialogVisible" title="Send Email" width="60%" :before-close="handleClose">
|
||||
<el-form-item label="Subject:" >
|
||||
<el-input v-model="state.email.subject" placeholder="Please enter the Subject"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="Content:" > -->
|
||||
|
||||
<QuillEditor ref="myQuillEditor"
|
||||
theme="snow"
|
||||
v-model:content="state.email.text"
|
||||
:options="state.options"
|
||||
contentType="html"
|
||||
@update:content="setValue()"
|
||||
style="height:500px ;"
|
||||
/>
|
||||
<!-- </el-form-item> -->
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="state.dialogVisible = false">Cancel</el-button>
|
||||
<el-button type="primary" @click="send()" v-if="state.email.status != 1">
|
||||
Send
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</el-config-provider>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
||||
highlight-current-row @row-click="tableClick">
|
||||
<el-table-column type="index" label="ID" width="50" />
|
||||
<el-table-column prop="vordmId" label="ID" width="118" />
|
||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterCountry" label="disaster country" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterTime" label="disaster time" show-overflow-tooltip></el-table-column>
|
||||
<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-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
|
||||
class="mt15" :pager-count="3" :page-sizes="[10, 20, 30]"
|
||||
|
@ -26,14 +26,14 @@
|
|||
<el-icon>
|
||||
<ele-EditPen />
|
||||
</el-icon>
|
||||
batch audit
|
||||
Batch operation
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading"
|
||||
@selection-change="handleSelectionChange" style="width: 100%">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column type="index" label="ID" width="50" />
|
||||
<el-table-column prop="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="title" label="Professional title" show-overflow-tooltip
|
||||
width="150"></el-table-column>
|
||||
|
@ -159,6 +159,10 @@ const getDisasterData = () => {
|
|||
state.disasterData.loading = true;
|
||||
getDisasterPage(state.disasterData.param.pageNum, state.disasterData.param.pageSize, {}).then(res => {
|
||||
state.disasterData.data = res.records;
|
||||
state.disasterData.data.forEach(item=>{
|
||||
let date = item.disasterTime.slice(0,10);
|
||||
item.disasterTime = date;
|
||||
})
|
||||
state.disasterData.total = res.total;
|
||||
state.disasterData.loading = false;
|
||||
})
|
||||
|
|
|
@ -13,11 +13,11 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<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
|
||||
placeholder="Please select">
|
||||
<el-option label="checked" value="0"></el-option>
|
||||
<el-option label="unchecked" value="1"></el-option>
|
||||
<el-option label="Approved" value="0"></el-option>
|
||||
<el-option label="Awaiting approval" value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -26,7 +26,7 @@
|
|||
<el-icon>
|
||||
<ele-Search />
|
||||
</el-icon>
|
||||
search
|
||||
Search
|
||||
</el-button>
|
||||
|
||||
</el-row>
|
||||
|
@ -47,16 +47,16 @@
|
|||
<a :href="scope.row.link" target="_blank">{{ scope.row.toolName }}</a>
|
||||
</template>
|
||||
</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="showName" label="Show Name"></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="showName" label="Uploader name"></el-table-column>
|
||||
<el-table-column prop="reviewTime" label="Review Time"></el-table-column>
|
||||
<el-table-column label="Operate" width="140">
|
||||
<template #default="scope">
|
||||
<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"
|
||||
@click="onRowDel(scope.row)">Delete</el-button>
|
||||
@click="onRowDel(scope.row)">Reject</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
|
@ -1,72 +1,45 @@
|
|||
<template>
|
||||
<div class="system-role-container layout-padding">
|
||||
<el-config-provider :locale="en">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<el-tabs v-model="activeName"
|
||||
class="demo-tabs"
|
||||
@tab-click="handleClick"
|
||||
style="margin-left: 20px">
|
||||
<el-tab-pane label="unchecked"
|
||||
name="first">
|
||||
<el-table :data="state.tableData.data"
|
||||
v-loading="state.tableData.loading"
|
||||
style="width: 100%">
|
||||
<el-table-column type="index"
|
||||
label="ID"
|
||||
width="50" />
|
||||
<el-table-column prop="username"
|
||||
label="User name"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="organization"
|
||||
label="Organization"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterType"
|
||||
label="Disaster type"
|
||||
show-overflow-tooltip>
|
||||
<!-- 在disasterType中获取dictKey 对应的dictValue -->
|
||||
<template #default="scope">
|
||||
<el-tag type="info">{{ getValue(scope.row.disasterType) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="disasterKeyword"
|
||||
label="Disaster keyword"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<!-- <el-table-column prop="affectedCountry" label="Affected country" show-overflow-tooltip></el-table-column> -->
|
||||
<!-- <el-table-column prop="Longitude" label="Longitude" show-overflow-tooltip></el-table-column>
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" style="margin-left: 20px">
|
||||
<el-tab-pane label="Unapproved" name="first">
|
||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading" style="width: 100%">
|
||||
<el-table-column type="index" label="ID" width="50" />
|
||||
<el-table-column prop="username" label="User name" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="organization" label="Organization" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip>
|
||||
<!-- 在disasterType中获取dictKey 对应的dictValue -->
|
||||
<template #default="scope">
|
||||
<el-tag type="info">{{ getValue(scope.row.disasterType) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="disasterKeyword" label="Disaster keyword" show-overflow-tooltip></el-table-column>
|
||||
<!-- <el-table-column prop="affectedCountry" label="Affected country" show-overflow-tooltip></el-table-column> -->
|
||||
<!-- <el-table-column prop="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="disasterTime"
|
||||
label="Disaster time"
|
||||
show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<!-- 格式化去除时分秒 -->
|
||||
{{ dateFormat(scope.row.disasterTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="responseTime" label="Response time" show-overflow-tooltip></el-table-column> -->
|
||||
<el-table-column prop="respondStatus"
|
||||
label="Response status"
|
||||
show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-tag type="info"
|
||||
v-if="scope.row.respondStatus === 0">Not reviewed</el-tag>
|
||||
<el-tag type="info"
|
||||
v-if="scope.row.respondStatus === 1">Failed</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="Operate"
|
||||
label="Operate"
|
||||
show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-button size="small"
|
||||
text
|
||||
type="primary"
|
||||
@click="onOpenEditRole('edit', scope.row)">Review</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<!-- 格式化去除时分秒 -->
|
||||
{{ dateFormat(scope.row.disasterTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="responseTime" label="Response time" show-overflow-tooltip></el-table-column> -->
|
||||
<el-table-column prop="respondStatus" label="Response status" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-tag type="info" v-if="scope.row.respondStatus === 0">Awaiting approval</el-tag>
|
||||
<el-tag type="info" v-if="scope.row.respondStatus === 1">Rejected</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="Operate" label="Operate" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-button size="small" text type="primary" @click="onOpenEditRole('edit', scope.row)">Approve</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column prop="describe" label="角色描述" show-overflow-tooltip></el-table-column>
|
||||
<!-- <el-table-column prop="describe" label="角色描述" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="createTime" label="创建时间" show-overflow-tooltip></el-table-column> -->
|
||||
<!-- <el-table-column prop="status" label="角色状态" show-overflow-tooltip>
|
||||
<!-- <el-table-column prop="status" label="角色状态" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-tag type="success" v-if="scope.row.status">启用</el-tag>
|
||||
<el-tag type="info" v-else>禁用</el-tag>
|
||||
|
@ -82,164 +55,126 @@
|
|||
>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
<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.current"
|
||||
background
|
||||
v-model:page-size="state.tableData.param.size"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="state.tableData.total">
|
||||
</el-pagination>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="checked"
|
||||
name="second">
|
||||
<el-table :data="state.tableData.data"
|
||||
v-loading="state.tableData.loading"
|
||||
style="width: 100%">
|
||||
<el-table-column type="index"
|
||||
label="ID"
|
||||
width="50" />
|
||||
<el-table-column prop="username"
|
||||
label="User name"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<!-- <el-table-column prop="Administrator" label="Administrator" show-overflow-tooltip></el-table-column> -->
|
||||
<el-table-column prop="organization"
|
||||
label="Organization"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<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 -->
|
||||
<template #default="scope">
|
||||
<el-tag type="info">{{ getValue(scope.row.disasterType) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="disasterKeyword"
|
||||
label="Disaster keyword"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<!-- <el-table-column prop="Affected country" label="Affected country" show-overflow-tooltip></el-table-column> -->
|
||||
<!-- <el-table-column prop="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="disasterTime"
|
||||
label="Disaster time"
|
||||
show-overflow-tooltip>
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
|
||||
:pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.current" background
|
||||
v-model:page-size="state.tableData.param.size" layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="state.tableData.total">
|
||||
</el-pagination>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="Approved | Rejected" name="second">
|
||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading" style="width: 100%">
|
||||
<el-table-column type="index" label="ID" width="50" />
|
||||
<el-table-column prop="username" label="User name" show-overflow-tooltip></el-table-column>
|
||||
<!-- <el-table-column prop="Administrator" label="Administrator" show-overflow-tooltip></el-table-column> -->
|
||||
<el-table-column prop="organization" label="Organization" show-overflow-tooltip></el-table-column>
|
||||
<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 -->
|
||||
<template #default="scope">
|
||||
<el-tag type="info">{{ getValue(scope.row.disasterType) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="disasterKeyword" label="Disaster keyword" show-overflow-tooltip></el-table-column>
|
||||
<!-- <el-table-column prop="Affected country" label="Affected country" show-overflow-tooltip></el-table-column> -->
|
||||
<!-- <el-table-column prop="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="disasterTime" label="Disaster time" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<!-- 格式化去除时分秒 -->
|
||||
{{ dateFormat(scope.row.disasterTime) }}
|
||||
</template>
|
||||
</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="respondStatus"
|
||||
label="Response status"
|
||||
show-overflow-tooltip>
|
||||
<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="Operate" label="Operate" show-overflow-tooltip></el-table-column> -->
|
||||
<el-table-column prop="respondStatus" label="Response status" show-overflow-tooltip>
|
||||
|
||||
<template #default="scope">
|
||||
<el-tag type="info"
|
||||
v-if="scope.row.respondStatus === 2">Reviewed</el-tag>
|
||||
<el-tag type="info"
|
||||
v-if="scope.row.respondStatus === 1">Failed</el-tag>
|
||||
</template>
|
||||
<template #default="scope">
|
||||
<el-tag type="info" v-if="scope.row.respondStatus === 2">Approved</el-tag>
|
||||
<el-tag type="info" v-if="scope.row.respondStatus === 1">Rejected</el-tag>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<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.current"
|
||||
background
|
||||
v-model:page-size="state.tableData.param.size"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="state.tableData.total">
|
||||
</el-pagination>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
<el-dialog v-model="state.dialogVisible"
|
||||
title="Review"
|
||||
width="30%"
|
||||
:before-close="handleClose">
|
||||
<el-container style="margin-top: -2%;margin-bottom: 2%;">
|
||||
<el-radio v-model="state.radio"
|
||||
label='1'
|
||||
@click="mapEvents('1')">Point</el-radio>
|
||||
<el-radio v-model="state.radio"
|
||||
label='2'
|
||||
@click="mapEvents('2')">Area</el-radio>
|
||||
<el-button type="primary"
|
||||
style="margin-left: 5%;"
|
||||
@click="ClearSubmit">Clear</el-button>
|
||||
</el-container>
|
||||
<el-container style="margin-top: 2%;margin-bottom: 2%;"
|
||||
v-if="state.radio === '1' ? true : false">
|
||||
<span style="line-height: 35px;"> Latitude:</span>
|
||||
<el-input placeholder="请输入内容"
|
||||
style="height:35px;margin-right: 1%;"
|
||||
v-model="state.dislat"></el-input>
|
||||
<span style="line-height: 35px;">Longitude:</span>
|
||||
<el-input placeholder="请输入内容"
|
||||
style="height:35px;"></el-input>
|
||||
</el-container>
|
||||
</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-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
|
||||
:pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.current" background
|
||||
v-model:page-size="state.tableData.param.size" layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="state.tableData.total">
|
||||
</el-pagination>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
<el-dialog v-model="state.dialogVisible" title="Approval" width="30%">
|
||||
<el-container style="margin-top: -2%;margin-bottom: 2%;">
|
||||
<el-radio v-model="state.radio" label='1' @click="mapEvents('1')">Point</el-radio>
|
||||
<el-radio v-model="state.radio" label='2' @click="mapEvents('2')">Area</el-radio>
|
||||
<el-radio v-model="state.radio" label='3' @click="mapEvents('3')">Edit</el-radio>
|
||||
<el-button type="primary" style="margin-left: 5%;" @click="ClearSubmit">Clear</el-button>
|
||||
</el-container>
|
||||
<el-container style="margin-top: 2%;margin-bottom: 2%;" v-if="state.radio==='1'?true:false">
|
||||
<span style="line-height: 35px;"> Latitude:</span>
|
||||
<el-input placeholder="wait……" style="height:35px;margin-right: 1%;" v-model="state.dislat" readonly="readonly"> </el-input>
|
||||
<span style="line-height: 35px;">Longitude:</span>
|
||||
<el-input placeholder="wait……" style="height:35px;" v-model="state.dislon" readonly="readonly"></el-input>
|
||||
</el-container>
|
||||
<MapPage style="height:350px ; width:100% ;margin-bottom: 10px;" ref="mapRef"></MapPage>
|
||||
<el-form-item label="Disaster Time">
|
||||
<el-date-picker v-model="state.edit.disasterTime" type="date" value-format="YYYY-MM-DD"
|
||||
placeholder="Select date and time" />
|
||||
</el-form-item>
|
||||
|
||||
<MapPage style="height:350px ; width:100% ;margin-bottom: 10px;" ref="mapRef"></MapPage>
|
||||
|
||||
<el-form-item label="Disaster Time">
|
||||
<el-date-picker v-model="state.edit.disasterTime"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="Select date and time" />
|
||||
</el-form-item>
|
||||
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">Cancel</el-button>
|
||||
<el-button type="danger"
|
||||
@click="reviews(1)">
|
||||
Not Review
|
||||
</el-button>
|
||||
<el-button type="primary"
|
||||
@click="reviews(2)">
|
||||
Review
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">Cancel</el-button>
|
||||
<el-button type="danger" @click="reviews(1)">
|
||||
Reject
|
||||
</el-button>
|
||||
<el-button type="primary" @click="reviews(2)">
|
||||
Approve
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<selectUser ref ="select" @callback="getTableData"></selectUser>
|
||||
</el-config-provider>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="userResponse">
|
||||
import en from 'element-plus/dist/locale/en.mjs'
|
||||
import { reactive, onMounted, ref, nextTick, watchEffect, defineAsyncComponent } from 'vue';
|
||||
import { reactive, onMounted, ref, nextTick,watchEffect,defineAsyncComponent } from 'vue';
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import { getList, review } from '/@/api/disasterInfo/index';
|
||||
import { getDictionary } from '/@/api/system/dictbiz';
|
||||
import { useVariableStore } from '/@/stores/index.ts'
|
||||
//引入地图
|
||||
import Map from '/@/components/Map.vue';
|
||||
import { useDateFormat } from '@vueuse/shared';
|
||||
import selectUser from './component/selectUser.vue';
|
||||
import L from "leaflet";
|
||||
import '@geoman-io/leaflet-geoman-free';
|
||||
import '@geoman-io/leaflet-geoman-free/dist/leaflet-geoman.css';
|
||||
import '@geoman-io/leaflet-geoman-free';
|
||||
import '@geoman-io/leaflet-geoman-free/dist/leaflet-geoman.css';
|
||||
import "leaflet/dist/leaflet.css";
|
||||
import 'leaflet-draw/dist/leaflet.draw'
|
||||
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 select = ref();
|
||||
const handleClick = (tab, event) => {
|
||||
state.selectName = tab.props.name;
|
||||
getTableData();
|
||||
};
|
||||
const MapPage = defineAsyncComponent({
|
||||
loader: () => import('/@/components/Map.vue'),
|
||||
loader:() =>import('/@/components/Map.vue'),
|
||||
delay: 200,
|
||||
})
|
||||
const onAllocation = (row) => {
|
||||
|
@ -266,9 +201,10 @@ const state = reactive({
|
|||
disasterTypeList: [],
|
||||
selectName: 'first',
|
||||
edit: {},
|
||||
radio: null,
|
||||
dislat: '',
|
||||
dislon: ''
|
||||
radio:null,
|
||||
dislat:'',
|
||||
dislon:'',
|
||||
wktPoint_Poly:undefined
|
||||
});
|
||||
// 初始化表格数据
|
||||
const getTableData = () => {
|
||||
|
@ -279,7 +215,6 @@ const getTableData = () => {
|
|||
} else {
|
||||
state.tableData.param.respondStatus = 2;
|
||||
}
|
||||
console.log(activeName.value);
|
||||
getList(state.tableData.param).then((res) => {
|
||||
state.tableData.data = res.records;
|
||||
state.tableData.total = res.total;
|
||||
|
@ -291,67 +226,76 @@ const onHandleSizeChange = (val) => {
|
|||
getTableData();
|
||||
};
|
||||
const onOpenEditRole = (type, row) => {
|
||||
|
||||
|
||||
//深拷贝
|
||||
state.edit = JSON.parse(JSON.stringify(row));
|
||||
nextTick(() => {
|
||||
//赋值地图范围,并且可以修改点或者区域
|
||||
//TODO
|
||||
map.mapOperations.wktParseToMap(row.geometry)
|
||||
});
|
||||
state.dialogVisible = true;
|
||||
setTimeout(() => {
|
||||
state.radio = "1"
|
||||
// mapRef.value.mapOperations.removeAll()
|
||||
//赋值地图范围,并且可以修改点或者区域
|
||||
if (state.wktPoint) {
|
||||
mapRef.value.mapOperations.removeLayer(state.wktPoint)
|
||||
}
|
||||
state.wktPoint = mapRef.value.mapOperations.wktParseToMap(row.geometry)
|
||||
// mapRef.value.mapOperations.on("click", (res)=>{
|
||||
// mapRef.value.mapOperations.clearPolygon()
|
||||
// mapRef.value.mapOperations.removeLayer( state.wktPoint)
|
||||
// mapRef.value.mapOperations.addInteractMarker(res.latlng.lat, res.latlng.lng)
|
||||
// })
|
||||
mapEvents('1')
|
||||
}, 100);
|
||||
state.radio = "1"
|
||||
// mapRef.value.mapOperations.removeAll()
|
||||
//赋值地图范围,并且可以修改点或者区域
|
||||
if(state.wktPoint_Poly){
|
||||
mapRef.value.mapOperations.removeLayer(state.wktPoint_Poly)
|
||||
}
|
||||
let wkt=mapRef.value.mapOperations.wktParseToMap(row.geometry)
|
||||
state.wktPoint_Poly= wkt.layer
|
||||
console.log(wkt.location)
|
||||
changelatlon(wkt.location[0],wkt.location[1]);
|
||||
// mapRef.value.mapOperations.on("click", (res)=>{
|
||||
// mapRef.value.mapOperations.clearPolygon()
|
||||
// mapRef.value.mapOperations.removeLayer( state.wktPoint_Poly)
|
||||
// mapRef.value.mapOperations.addInteractMarker(res.latlng.lat, res.latlng.lng)
|
||||
// })
|
||||
mapEvents('1')
|
||||
},100);
|
||||
};
|
||||
const mapEvents = (ev) => {
|
||||
if (ev == '1') {
|
||||
const mapEvents = (ev)=>{
|
||||
if(ev == '1'){
|
||||
// mapRef.value.mapOperations.clearPolygon()
|
||||
mapRef.value.mapOperations.on("click", mapClick)
|
||||
// mapRef.value.mapOperations.on("mousemove", changelatlon)
|
||||
mapRef.value.mapOperations.clearPolygon()
|
||||
// mapRef.value.mapOperations.on("click", mapClick)
|
||||
mapRef.value.mapOperations.on("mousemove", changelatlon)
|
||||
variableStore.polygoncontrol = "option1"
|
||||
} else {
|
||||
mapRef.value.mapOperations.off("click", mapClick);
|
||||
|
||||
}else if(ev == '2'){
|
||||
mapRef.value.mapOperations.off("click",mapClick);
|
||||
mapRef.value.mapOperations.drawPolygon()
|
||||
// mapRef.value.mapOperations.drawPolygon()
|
||||
// mapRef.value.mapOperations.drawCreated()
|
||||
variableStore.polygoncontrol = "option2"
|
||||
|
||||
}
|
||||
else{
|
||||
mapRef.value.mapOperations.Edit()
|
||||
}
|
||||
};
|
||||
const ClearSubmit = () => {
|
||||
setTimeout(() => {
|
||||
mapRef.value.mapOperations.removeAll()
|
||||
variableStore.wktdata = null
|
||||
variableStore.layerGroupPoint=null;
|
||||
layerGroupPoly=null;
|
||||
}, 100)
|
||||
}
|
||||
const mapClick = (res) => {
|
||||
mapRef.value.mapOperations.removeLayer(state.wktPoint)
|
||||
changelatlon(res);
|
||||
mapRef.value.mapOperations.addInteractMarker(res.latlng.lat.toFixed(3), res.latlng.lng.toFixed(3))
|
||||
const mapClick=(res)=>{
|
||||
mapRef.value.mapOperations.removeLayer( state.wktPoint_Poly )
|
||||
changelatlon(res.latlng.lat.toFixed(3),res.latlng.lng.toFixed(3));
|
||||
mapRef.value.mapOperations.addInteractMarker(res.latlng.lat.toFixed(3),res.latlng.lng.toFixed(3))
|
||||
// console.log(state.wktPoint_Poly)
|
||||
}
|
||||
|
||||
const reviews = (index) => {
|
||||
//将修改后的地图位置赋值到state.edit.geometry
|
||||
//TODO 修改地图赋值
|
||||
//state.edit.geometry = map.mapOperations.getWkt();
|
||||
|
||||
//判断index的值来判断是审核通过还是不通过
|
||||
|
||||
|
||||
|
||||
if (index === 1) {
|
||||
state.edit.respondStatus = 1;
|
||||
} else {
|
||||
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";
|
||||
review(state.edit).then((res) => {
|
||||
|
@ -362,57 +306,52 @@ const reviews = (index) => {
|
|||
}
|
||||
// 分页改变
|
||||
const onHandleCurrentChange = (val) => {
|
||||
console.log(val);
|
||||
state.tableData.param.pageNum = val;
|
||||
getTableData();
|
||||
};
|
||||
const onMapClick = (e) => {
|
||||
state.lat = e.latlng.lat.toFixed(3);
|
||||
state.lon = e.latlng.lng.toFixed(3);
|
||||
map.value.mapOperations.addInteractMarker(state.lat, state.lon)
|
||||
const changelatlon = (lat,lon) => {
|
||||
//深拷贝e
|
||||
// state.dislat = e.latlng.lat.toFixed(3);
|
||||
// state.dislon= e.latlng.lng.toFixed(3);
|
||||
state.dislat = lat;
|
||||
state.dislon= lon;
|
||||
// if (state.lon < 0) {
|
||||
// state.lon = state.lon + 360;
|
||||
// }
|
||||
// state.lon = state.lon.toFixed(3);
|
||||
if (state.dislat < 0) {
|
||||
state.dislat = String(Math.abs(state.dislat)) + "°S"
|
||||
}
|
||||
else {
|
||||
state.dislat = String(state.dislat) + "°N"
|
||||
}
|
||||
const changelatlon = (e) => {
|
||||
|
||||
state.dislat = e.latlng.lat.toFixed(3);
|
||||
state.dislon = e.latlng.lng.toFixed(3);
|
||||
// state.lon = state.lon % 360;
|
||||
// if (state.lon < 0) {
|
||||
// state.lon = state.lon + 360;
|
||||
// }
|
||||
// state.lon = state.lon.toFixed(3);
|
||||
if (state.dislat < 0) {
|
||||
state.dislat = String(Math.abs(state.dislat)) + "°S"
|
||||
}
|
||||
else {
|
||||
state.dislat = String(state.dislat) + "°N"
|
||||
}
|
||||
|
||||
if (state.dislon <= 180 && state.dislon >= 0) {
|
||||
state.dislon = String(Math.abs(state.dislon)) + "°E"
|
||||
}
|
||||
else if (state.dislon > 180 && state.dislon <= 360) {
|
||||
state.dislon = String((360 - state.dislon).toFixed(3)) + "°W"
|
||||
}
|
||||
else if (state.dislon < 0) {
|
||||
let n = Math.floor(state.dislon / 360)
|
||||
state.dislon = (state.dislon - n * 360).toFixed(3)
|
||||
if (state.dislon <= 180 && state.dislon >= 0) {
|
||||
state.dislon = String(Math.abs(state.dislon)) + "°E"
|
||||
}
|
||||
else if (state.dislon > 180 && state.dislon <= 360) {
|
||||
state.dislon = String((360 - state.dislon).toFixed(3)) + "°W"
|
||||
}
|
||||
else if (state.dislon < 0) {
|
||||
let n = Math.floor(state.dislon / 360)
|
||||
state.dislon = (state.dislon - n * 360).toFixed(3)
|
||||
if (state.dislon <= 180 && state.dislon >= 0) {
|
||||
state.dislon = String(Math.abs(state.dislon)) + "°E"
|
||||
}
|
||||
else if (state.dislon > 180 && state.dislon <= 360) {
|
||||
state.dislon = String((360 - state.dislon).toFixed(3)) + "°W"
|
||||
}
|
||||
}
|
||||
else if (state.dislon > 360) {
|
||||
let n = Math.floor(state.dislon / 360)
|
||||
state.dislon = (state.dislon - n * 360).toFixed(3)
|
||||
if (state.dislon <= 180 && state.dislon >= 0) {
|
||||
state.dislon = String(Math.abs(state.dislon)) + "°E"
|
||||
}
|
||||
else if (state.dislon > 360) {
|
||||
let n = Math.floor(state.dislon / 360)
|
||||
state.dislon = (state.dislon - n * 360).toFixed(3)
|
||||
if (state.dislon <= 180 && state.dislon >= 0) {
|
||||
state.dislon = String(Math.abs(state.dislon)) + "°E"
|
||||
}
|
||||
else if (state.dislon > 180 && state.dislon <= 360) {
|
||||
state.dislon = String((360 - state.dislon).toFixed(3)) + "°W"
|
||||
}
|
||||
else if (state.dislon > 180 && state.dislon <= 360) {
|
||||
state.dislon = String((360 - state.dislon).toFixed(3)) + "°W"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// 页面加载时
|
||||
|
@ -421,47 +360,28 @@ onMounted(() => {
|
|||
getDictionary({ code: 'disaster' }).then((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) => {
|
||||
//返回state.disasterTypeLis 对应的value
|
||||
return state.disasterTypeList.find((item) => item.dictKey === key)?.dictValue;
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.demo-tabs > .el-tabs__content {
|
||||
padding: 0px;
|
||||
color: #6b778c;
|
||||
font-size: 32px;
|
||||
font-weight: 600;
|
||||
<style>
|
||||
.demo-tabs>.el-tabs__content {
|
||||
padding: 0px;
|
||||
color: #6b778c;
|
||||
font-size: 32px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.system-role-container {
|
||||
.system-role-padding {
|
||||
padding: 15px;
|
||||
.system-role-padding {
|
||||
padding: 15px;
|
||||
|
||||
.el-table {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
.mt15 {
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
float: right;
|
||||
margin-bottom: 15px;
|
||||
.el-table {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue