Merge remote-tracking branch 'origin/main' into main
This commit is contained in:
commit
b8dea4de18
File diff suppressed because it is too large
Load Diff
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<el-config-provider :size="getGlobalComponentSize" :locale="zhCn">
|
||||
<el-config-provider :size="getGlobalComponentSize" :locale="en">
|
||||
<router-view v-show="setLockScreen" />
|
||||
<LockScreen v-if="themeConfig.isLockScreen" />
|
||||
<Setings ref="setingsRef" v-show="setLockScreen" />
|
||||
|
@ -11,6 +11,7 @@
|
|||
import { defineAsyncComponent, computed, ref, onBeforeMount, onMounted, onUnmounted, nextTick, watch } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import zhCn from 'element-plus/es/locale/lang/zh-cn';
|
||||
import en from 'element-plus/dist/locale/en.mjs'
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';
|
||||
import { useThemeConfig } from '/@/stores/themeConfig';
|
||||
|
|
|
@ -24,7 +24,7 @@ export const news = (disaster_id, keywords, page, isBaidu, id) => {
|
|||
},
|
||||
});
|
||||
};
|
||||
export const rs = (stime, etime, disaster_id, ranges, type = 1) => {
|
||||
export const rs = (stime, etime, disaster_id, ranges, type = 1,id) => {
|
||||
let method = 'sentinel';
|
||||
if (type == 1) {
|
||||
method = 'sentinel';
|
||||
|
@ -33,16 +33,21 @@ export const rs = (stime, etime, disaster_id, ranges, type = 1) => {
|
|||
} else {
|
||||
method = 'searchone';
|
||||
}
|
||||
|
||||
let data = {
|
||||
stime,
|
||||
etime,
|
||||
disaster_id,
|
||||
id,
|
||||
}
|
||||
if(type != 1 && type != 2){
|
||||
data['geo'] = ranges
|
||||
}else{
|
||||
data['ranges']=ranges
|
||||
}
|
||||
return request({
|
||||
url: '/api/' + crawlModule + '/rs/' + method,
|
||||
method: 'post',
|
||||
data: {
|
||||
stime,
|
||||
etime,
|
||||
disaster_id,
|
||||
ranges,
|
||||
},
|
||||
data: data,
|
||||
});
|
||||
};
|
||||
export const submit = (row) => {
|
||||
|
@ -66,3 +71,25 @@ export const getList = (current, size, param) => {
|
|||
params: params,
|
||||
});
|
||||
};
|
||||
|
||||
//geoserver发布基础地理数据
|
||||
export const pushing = (data) => {
|
||||
return request({
|
||||
url: '/api/' + crawlModule + '/geoserve/pushing',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
//wordcloud服务
|
||||
export const landsat = (disaster_id,number,id) => {
|
||||
return request({
|
||||
url: '/api/' + crawlModule + '/visual/wordcloud',
|
||||
method: 'get',
|
||||
params:{
|
||||
disaster_id,
|
||||
number,
|
||||
id
|
||||
}
|
||||
});
|
||||
};
|
|
@ -81,4 +81,17 @@ export const deleteData = (id) => {
|
|||
id
|
||||
}
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改实体数据
|
||||
* @param data
|
||||
* @returns {Promise<AxiosResponse<any>>}
|
||||
*/
|
||||
export const updateEntityData = (data) => {
|
||||
return request({
|
||||
url: '/api/' + moduleName + '/ui/EntityData/updateEntityData',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
|
|
@ -59,6 +59,10 @@ onMounted(() => {
|
|||
const mapOperations = {
|
||||
wktParseToMap: (res) => {
|
||||
let layer = omnivore.wkt.parse(res)
|
||||
if(featureLayerG_area.getLayers().length != 0||featureLayerG_point.getLayers().length != 0){
|
||||
|
||||
return;
|
||||
}
|
||||
layer.addTo(featureLayerG_point)
|
||||
|
||||
let attr = Object.values(layer._layers)
|
||||
|
@ -66,9 +70,12 @@ const mapOperations = {
|
|||
// 判断审核的数据类型,如果是点则直接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])
|
||||
|
@ -83,8 +90,9 @@ const mapOperations = {
|
|||
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
|
||||
// return layer
|
||||
|
||||
},
|
||||
/** 添加点标注
|
||||
|
@ -313,6 +321,11 @@ const mapOperations = {
|
|||
})
|
||||
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;
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
<!--灾害列表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 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-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 />
|
||||
|
@ -16,26 +15,25 @@
|
|||
</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" />
|
||||
highlight-current-row @row-click="tableClick">
|
||||
<el-table-column prop="vordmId" label="VoRDM ID" width="118" />
|
||||
<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>
|
||||
<slot></slot>
|
||||
</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>
|
||||
</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";
|
||||
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"]);
|
||||
//定义组件接收的参数
|
||||
|
@ -47,11 +45,11 @@ const props = defineProps({
|
|||
})
|
||||
const state = reactive({
|
||||
//查询参数
|
||||
search:{
|
||||
respondStatus:props.status
|
||||
search: {
|
||||
respondStatus: props.status
|
||||
},
|
||||
//灾害类型字典项
|
||||
dictList:[],
|
||||
dictList: [],
|
||||
//表格数据
|
||||
disasterData: {
|
||||
data: [],
|
||||
|
@ -64,13 +62,15 @@ const state = reactive({
|
|||
},
|
||||
},
|
||||
})
|
||||
|
||||
//灾害表格点击事件
|
||||
const tableClick = (row, column, event) => {
|
||||
emit("click", row.disasterId);
|
||||
emit("childClick", row);
|
||||
}
|
||||
|
||||
//获取字典数据
|
||||
const getDictBizData = () => {
|
||||
getList({code:'disaster'}).then(res =>{
|
||||
getList({ code: 'disaster' }).then(res => {
|
||||
state.dictList = res[0].children
|
||||
})
|
||||
}
|
||||
|
@ -78,6 +78,10 @@ const getDictBizData = () => {
|
|||
const getDisasterTable = () => {
|
||||
getPage(state.disasterData.param.pageNum, state.disasterData.param.pageSize, state.search).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;
|
||||
})
|
||||
}
|
||||
|
@ -92,7 +96,7 @@ const onHandleDisasterCurrentChange = (val) => {
|
|||
getDisasterTable();
|
||||
};
|
||||
//页面加载
|
||||
onMounted(()=>{
|
||||
onMounted(() => {
|
||||
//获取灾害类型
|
||||
getDictBizData();
|
||||
//获取灾害列表
|
||||
|
@ -109,12 +113,14 @@ defineExpose({
|
|||
display: flex;
|
||||
justify-content: end;
|
||||
}
|
||||
.search{
|
||||
|
||||
.search {
|
||||
display: flex;
|
||||
margin-left: 10px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.form-control{
|
||||
|
||||
.form-control {
|
||||
margin-left: 10px;
|
||||
width: 200px;
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@ export const useThemeConfig = defineStore('themeConfig', {
|
|||
// 是否开启水印
|
||||
isWartermark: false,
|
||||
// 水印文案
|
||||
wartermarkText: 'vue-next-admin',
|
||||
wartermarkText: 'vordm',
|
||||
|
||||
/**
|
||||
* 其它设置
|
||||
|
@ -142,7 +142,7 @@ export const useThemeConfig = defineStore('themeConfig', {
|
|||
* 全局网站标题 / 副标题
|
||||
*/
|
||||
// 网站主标题(菜单导航、浏览器当前网页标题)
|
||||
globalTitle: 'vue-next-admin',
|
||||
globalTitle: 'vordm',
|
||||
// 网站副标题(登录页顶部文字)
|
||||
globalViceTitle: 'vueNextAdmin',
|
||||
// 网站副标题(登录页顶部文字)
|
||||
|
|
|
@ -4,9 +4,8 @@ import qs from 'qs';
|
|||
import { Session } from '/@/utils/storage';
|
||||
|
||||
// export const moduleName = 'zqq-biz-vordm';
|
||||
export const moduleName = 'biz-vordm';
|
||||
export const moduleName = 'yyhouc-biz-vordm';
|
||||
export const crawlModule = 'vordm-crawl';
|
||||
// 配置新建一个 axios 实例
|
||||
const service = axios.create({
|
||||
//baseURL: import.meta.env.VITE_API_URL,
|
||||
timeout: 50000,
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
<el-config-provider :locale="en">
|
||||
<el-row :gutter="22">
|
||||
<el-col :span="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%"
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 90vh;">
|
||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%;"
|
||||
highlight-current-row @row-click="tableClick">
|
||||
<el-table-column prop="vordmId" label="ID" width="118" />
|
||||
<el-table-column prop="vordmId" label="VoRDM ID" width="118" />
|
||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip>
|
||||
<!-- 在disasterType中获取dictKey 对应的dictValue -->
|
||||
<template #default="scope">
|
||||
|
@ -23,7 +23,7 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
|
||||
class="mt15" :pager-count="2" :page-sizes="[10, 20, 30]"
|
||||
class="mt15" :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">
|
||||
|
@ -31,7 +31,7 @@
|
|||
</div>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 90vh;">
|
||||
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
||||
<el-form-item label="Type" label-width="100px">
|
||||
<el-select v-model="state.searchName" placeholder="Please select data type" style="max-width: 200px"
|
||||
|
@ -65,7 +65,7 @@
|
|||
</el-button>
|
||||
</div>
|
||||
<el-table :data=" state.tableData.data " v-loading=" state.tableData.loading "
|
||||
@selection-change=" handleSelectionChange " style="width: 100%">
|
||||
@selection-change=" handleSelectionChange " style="width: 100%; height: 600px;">
|
||||
<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"
|
||||
|
@ -81,7 +81,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column prop="content" label="Link" show-overflow-tooltip>
|
||||
<template #default=" scope ">
|
||||
<a :href=" scope.row.link " target="_blank">goto link</a>
|
||||
<a :href=" scope.row.link " target="_blank">Read more</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
@ -105,7 +105,7 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination style="margin-left: 20px;" @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
|
||||
: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>
|
||||
|
@ -146,11 +146,10 @@ import { getOtherDataPage, getDisasterPage, deleteData } from '/@/api/data/other
|
|||
import { getList } from '/@/api/disasterInfo/index';
|
||||
import { getList as getNewsList, review } from '/@/api/news/index';
|
||||
import { getDictionary } from '/@/api/system/dictbiz';
|
||||
|
||||
//复制内容
|
||||
import { defineAsyncComponent, reactive, onMounted, ref } from 'vue';
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import boot from "./component/boot.vue"
|
||||
import boot from "./component/boot.vue";
|
||||
// 引入组件
|
||||
const auditRef = ref();
|
||||
const bootRef = ref();
|
||||
|
@ -252,7 +251,7 @@ const formatSizeUnits = (size) => {
|
|||
}
|
||||
//灾害表格点击事件
|
||||
const tableClick = (row, column, event) => {
|
||||
state.disasterId = row.id;
|
||||
state.disasterId = row.disasterId;
|
||||
getTableData();
|
||||
}
|
||||
// 初始化灾害表格数据
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<el-dialog title="upload" v-model="state.isShowDialog" width="700px">
|
||||
<el-form :model="state.ruleForm" size="default" label-width="120px" :rules="rules" ref="adminAddFormRef">
|
||||
<el-dialog title="upload" v-model="state.isShowDialog" width="500px">
|
||||
<el-form :model="state.ruleForm" size="default" label-width="120px" :rules="rules" ref="adminAddFormRef" style="margin-left: 6%;">
|
||||
<el-form-item label="upload picture" prop="img">
|
||||
<el-upload ref="upFileRef" class="upload-demo" drag accept="image/*" action="#" multiple :http-request="uploadPic"
|
||||
:on-remove="removePic" :before-upload="beforeUpload">
|
||||
|
@ -15,6 +15,10 @@
|
|||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item prop="title" label="data title">
|
||||
<el-input v-model="state.ruleForm.title" class="m-2" placeholder="please enter data title" :rows="3"
|
||||
type="text" style="width:220px;" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="type" label="data type">
|
||||
<el-select v-model="state.ruleForm.type" class="m-2" placeholder="please select data type">
|
||||
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
|
||||
|
@ -149,6 +153,7 @@ const onSubmit = () => {
|
|||
state.dataForm.append('remark', state.ruleForm.remark);
|
||||
state.dataForm.append('disasterId', state.disasterId);
|
||||
state.dataForm.append('visualFlag', state.ruleForm.visualFlag);
|
||||
state.dataForm.append('title', state.ruleForm.title);
|
||||
for (let [a, b] of state.dataForm.entries()) {
|
||||
console.log(a, b, '--------------');
|
||||
}
|
||||
|
|
|
@ -3,24 +3,12 @@
|
|||
<el-config-provider :locale="en">
|
||||
<el-row :gutter="22">
|
||||
<el-col :span="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 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>
|
||||
<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 class="system-role-padding layout-padding-auto layout-padding-view" style="height: 90vh;">
|
||||
<disasterTable @childClick="tableClick"></disasterTable>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 90vh;">
|
||||
<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"
|
||||
size="default" clearable>
|
||||
|
@ -50,11 +38,17 @@
|
|||
<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 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="uploaderName" label="Uploader name" width="100"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="isPublish" label="isPublish" width="90" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-tag type="warning" v-if="scope.row.isPublish == 0">NO</el-tag>
|
||||
<el-tag type="success" v-if="scope.row.isPublish == 1">YES</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="title" label="Professional title" show-overflow-tooltip
|
||||
width="150"></el-table-column>
|
||||
<el-table-column prop="size" label="Data size" show-overflow-tooltip>
|
||||
<el-table-column prop="size" label="Data size" width="90" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ formatSizeUnits(scope.row.size) }}
|
||||
</template>
|
||||
|
@ -63,6 +57,8 @@
|
|||
<el-table-column prop="Operate" label="Operate" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-button size="small" text type="primary" @click="del(scope.row)">Delete</el-button>
|
||||
<el-button v-if="scope.row.visualFlag == 1" size="small" text type="primary"
|
||||
@click="pub(scope.row)">Publish</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -84,12 +80,14 @@
|
|||
import en from 'element-plus/dist/locale/en.mjs'
|
||||
import type { TabsPaneContext } from 'element-plus';
|
||||
import Upload from './component/upload.vue';
|
||||
import { getOtherDataPage, getDisasterPage, deleteData } from '/@/api/data/otherData.js'
|
||||
import { getOtherDataPage, getDisasterPage, deleteData, updateEntityData } from '/@/api/data/otherData.js'
|
||||
import { pushing } from '/@/api/crawl/index.js'
|
||||
const activeName = ref('first');
|
||||
|
||||
//复制内容
|
||||
import { defineAsyncComponent, reactive, onMounted, ref } from 'vue';
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import disasterTable from "/@/components/table/DisasterTable.vue";
|
||||
// 引入组件
|
||||
const RoleDialog = defineAsyncComponent(() => import('/@/views/system/role/dialog.vue'));
|
||||
const auditRef = ref();
|
||||
|
@ -97,6 +95,7 @@ const uploadRef = ref();
|
|||
// 定义变量内容
|
||||
const roleDialogRef = ref();
|
||||
const state = reactive({
|
||||
vordmId:null,
|
||||
multipleSelection: [],
|
||||
searchName: '',
|
||||
disasterId: null,
|
||||
|
@ -156,18 +155,21 @@ const formatSizeUnits = (size) => {
|
|||
|
||||
return (size / Math.pow(k, i)).toPrecision(3) + ' ' + sizes[i];
|
||||
}
|
||||
|
||||
//灾害表格点击事件
|
||||
const tableClick = (row, column, event) => {
|
||||
state.disasterId = row.disasterId;
|
||||
const tableClick = (i) => {
|
||||
state.disasterId = i.disasterId;
|
||||
state.vordmId = i.vordmId
|
||||
getTableData();
|
||||
}
|
||||
|
||||
// 初始化灾害表格数据
|
||||
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);
|
||||
state.disasterData.data.forEach(item => {
|
||||
let date = item.disasterTime.slice(0, 10);
|
||||
item.disasterTime = date;
|
||||
})
|
||||
state.disasterData.total = res.total;
|
||||
|
@ -180,7 +182,7 @@ const getTableData = () => {
|
|||
state.tableData.loading = true;
|
||||
getOtherDataPage(state.tableData.param.pageNum, state.tableData.param.pageSize, { "disasterId": state.disasterId, "type": state.searchName, "isDeleted": 0 }).then(res => {
|
||||
console.log(res);
|
||||
|
||||
|
||||
state.tableData.data = res.records;
|
||||
state.tableData.total = res.total;
|
||||
})
|
||||
|
@ -237,6 +239,31 @@ const del = (row) => {
|
|||
})
|
||||
.catch(() => { });
|
||||
};
|
||||
|
||||
|
||||
|
||||
// 删除其他数据
|
||||
const pub = (row) => {
|
||||
console.log(row, "发布信息");
|
||||
let da = {
|
||||
vordm_id:state.vordmId,
|
||||
link:row.link,
|
||||
disaster_id:row.id,
|
||||
name:row.title
|
||||
}
|
||||
pushing(da).then(data => {
|
||||
console.log(data,"row==================");
|
||||
let daNew = {
|
||||
id: row.id,
|
||||
isPublish: 1
|
||||
}
|
||||
updateEntityData(daNew).then(da => {
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
};
|
||||
|
||||
// 分页改变
|
||||
const onHandleDisasterSizeChange = (val) => {
|
||||
state.disasterData.param.pageSize = val;
|
||||
|
@ -280,6 +307,7 @@ onMounted(() => {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mt15 {
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
|
|
|
@ -2,17 +2,8 @@
|
|||
<el-dialog title="upload" v-model="state.isShowDialog" width="700px">
|
||||
<el-form :model="state.ruleForm" size="default" label-width="150px" :rules="rules" ref="adminAddFormRef">
|
||||
<el-form-item label="upload picture" prop="img">
|
||||
<el-upload
|
||||
ref="upFileRef"
|
||||
class="upload-demo"
|
||||
drag
|
||||
accept="image/*"
|
||||
action="#"
|
||||
multiple
|
||||
:http-request="uploadPic"
|
||||
:on-remove="removePic"
|
||||
:before-upload="beforeUpload"
|
||||
>
|
||||
<el-upload ref="upFileRef" class="upload-demo" drag accept="image/*" action="#" multiple :http-request="uploadPic"
|
||||
:on-remove="removePic" :before-upload="beforeUpload">
|
||||
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
||||
<div class="el-upload__text">
|
||||
Drop file here or <em>click to upload</em>
|
||||
|
@ -24,69 +15,67 @@
|
|||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item prop="title" label="data title">
|
||||
<el-input v-model="state.ruleForm.title" class="m-2" placeholder="please enter data title" :rows="3" type="text"
|
||||
style="width:220px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Home page show" prop="isMain">
|
||||
<el-select v-model="state.ruleForm.isMain" class="m-2" placeholder="please select home show">
|
||||
<el-option
|
||||
label="show"
|
||||
value="1"
|
||||
></el-option>
|
||||
<el-option
|
||||
label="not show"
|
||||
value="0"
|
||||
></el-option>
|
||||
<el-option label="show" value="1"></el-option>
|
||||
<el-option label="not show" value="0"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="onCancel" size="default">cancel</el-button>
|
||||
<el-button type="primary" @click="onSubmit" size="default" :loading="state.isLoading">upload</el-button>
|
||||
</span>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="onCancel" size="default">cancel</el-button>
|
||||
<el-button type="primary" @click="onSubmit" size="default" :loading="state.isLoading">upload</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {reactive, ref} from "vue";
|
||||
import {uploadData} from '/@/api/data/pictureInfo.js';
|
||||
import {ElMessage} from "element-plus";
|
||||
import { reactive, ref } from "vue";
|
||||
import { uploadData } from '/@/api/data/pictureInfo.js';
|
||||
import { ElMessage } from "element-plus";
|
||||
import { UploadFilled } from '@element-plus/icons-vue'
|
||||
const upFileRef = ref();
|
||||
const emit = defineEmits(['callback']);
|
||||
const adminAddFormRef = ref();
|
||||
const state = reactive({
|
||||
isShowDialog: false,
|
||||
isLoading:false,
|
||||
isLoading: false,
|
||||
ruleForm: {
|
||||
},
|
||||
tableData: [],
|
||||
//字典值
|
||||
dictData: [],
|
||||
unitData:[],
|
||||
unitData: [],
|
||||
standardId: '',
|
||||
detectionData: [],
|
||||
disasterId:null,
|
||||
dataForm:new FormData(),
|
||||
fileArray:[],
|
||||
disasterId: null,
|
||||
dataForm: new FormData(),
|
||||
fileArray: [],
|
||||
})
|
||||
const validImg = (rule, value, callback) => {
|
||||
if(state.fileArray.length>0){
|
||||
if (state.fileArray.length > 0) {
|
||||
adminAddFormRef.value.clearValidate('img')
|
||||
callback();
|
||||
}else{
|
||||
} else {
|
||||
return callback(new Error('please upload image'));
|
||||
}
|
||||
}
|
||||
//校验规则
|
||||
const rules = reactive({
|
||||
img: [
|
||||
{required: true,trigger: 'change',validator:validImg}
|
||||
{ required: true, trigger: 'change', validator: validImg }
|
||||
],
|
||||
isMain: [
|
||||
{required: true, message: 'please select home page show', trigger: 'change'}
|
||||
{ required: true, message: 'please select home page show', trigger: 'change' }
|
||||
],
|
||||
remark:[
|
||||
{required: true, message: 'please select data details', trigger: 'blur'}
|
||||
remark: [
|
||||
{ required: true, message: 'please select data details', trigger: 'blur' }
|
||||
],
|
||||
})
|
||||
//图片上传之前
|
||||
|
@ -103,7 +92,7 @@ const uploadPic = (data) => {
|
|||
}
|
||||
//移除时
|
||||
const removePic = (data) => {
|
||||
state.fileArray.splice(state.fileArray.findIndex(item=>item.uid===data.raw.uid), 1)
|
||||
state.fileArray.splice(state.fileArray.findIndex(item => item.uid === data.raw.uid), 1)
|
||||
console.log(state.fileArray)
|
||||
}
|
||||
//重置表单
|
||||
|
@ -134,18 +123,19 @@ const onSubmit = () => {
|
|||
adminAddFormRef.value.validate((valid, fields) => {
|
||||
if (valid) {
|
||||
state.isLoading = true;
|
||||
state.fileArray.forEach(item=>{
|
||||
state.dataForm.append('file',item);
|
||||
state.fileArray.forEach(item => {
|
||||
state.dataForm.append('file', item);
|
||||
})
|
||||
state.dataForm.append('disasterId',state.disasterId);
|
||||
state.dataForm.append('isMain',state.ruleForm.isMain);
|
||||
for(let [a, b] of state.dataForm.entries()){
|
||||
state.dataForm.append('disasterId', state.disasterId);
|
||||
state.dataForm.append('isMain', state.ruleForm.isMain);
|
||||
state.dataForm.append('title', state.ruleForm.title);
|
||||
for (let [a, b] of state.dataForm.entries()) {
|
||||
console.log(a, b, '--------------');
|
||||
}
|
||||
uploadData(state.dataForm).then(res => {
|
||||
ElMessage.success("Upload successfully");
|
||||
emit('callback');
|
||||
}).finally(()=>{
|
||||
}).finally(() => {
|
||||
state.isLoading = false;
|
||||
})
|
||||
closeDialog();
|
||||
|
@ -160,6 +150,4 @@ defineExpose({
|
|||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
<style scoped></style>
|
|
@ -3,24 +3,12 @@
|
|||
<el-config-provider :locale="en">
|
||||
<el-row :gutter="22">
|
||||
<el-col :span="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 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>
|
||||
<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 class="system-role-padding layout-padding-auto layout-padding-view" style="height: 90vh;">
|
||||
<disasterTable @childClick="tableClick"></disasterTable>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 90vh;">
|
||||
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
||||
<!-- <el-input size="default" placeholder="please enter username" style="max-width: 180px" v-model="state.searchName"
|
||||
clearable></el-input>
|
||||
|
@ -65,16 +53,6 @@
|
|||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="size"
|
||||
label="size"
|
||||
show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{formatSizeUnits(scope.row.size)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="type"
|
||||
label="type"
|
||||
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="editData(scope.row)">Edit</el-button>
|
||||
|
@ -83,8 +61,7 @@
|
|||
</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
|
||||
: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>
|
||||
|
@ -105,7 +82,7 @@ import EditPicture from './component/editPicture.vue';
|
|||
import { getPicturePage, getDisasterPage, delPicture } from '/@/api/data/pictureInfo.js';
|
||||
import en from 'element-plus/dist/locale/en.mjs';
|
||||
const activeName = ref('first');
|
||||
|
||||
import disasterTable from "/@/components/table/DisasterTable.vue";
|
||||
//复制内容
|
||||
import { defineAsyncComponent, reactive, onMounted, ref } from 'vue';
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
|
@ -146,9 +123,7 @@ const handleSelectionChange = (val) => {
|
|||
};
|
||||
//格式化图片名称
|
||||
const formatName = (name) => {
|
||||
if (name) {
|
||||
return name.substr(0, name.indexOf('.'));
|
||||
}
|
||||
|
||||
return name;
|
||||
};
|
||||
const auditData = (row) => {
|
||||
|
@ -189,8 +164,8 @@ const formatSizeUnits = (size) => {
|
|||
return (size / Math.pow(k, i)).toPrecision(3) + ' ' + sizes[i];
|
||||
};
|
||||
//灾害表格点击事件
|
||||
const tableClick = (row, column, event) => {
|
||||
state.disasterId = row.disasterId;
|
||||
const tableClick = (i) => {
|
||||
state.disasterId = i.disasterId;
|
||||
getTableData();
|
||||
};
|
||||
// 初始化灾害表格数据
|
||||
|
@ -198,8 +173,8 @@ 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);
|
||||
state.disasterData.data.forEach(item => {
|
||||
let date = item.disasterTime.slice(0, 10);
|
||||
item.disasterTime = date;
|
||||
})
|
||||
state.disasterData.total = res.total;
|
||||
|
|
|
@ -2,43 +2,31 @@
|
|||
<div>
|
||||
<el-row :gutter="22">
|
||||
<el-col :span="10">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 80vh;">
|
||||
<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 style="margin-right:20px;" @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
|
||||
class="mt15" :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-role-padding layout-padding-auto layout-padding-view" style="height:80vh;">
|
||||
<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"
|
||||
style="margin-right: 20px;" :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,13 +104,17 @@
|
|||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
<script setup>
|
||||
import Map from "/@/components/Map.vue";
|
||||
import { ref, reactive, watch } from 'vue';
|
||||
import { ref, reactive, watch, defineExpose } from 'vue';
|
||||
import { rs, submit } from '/@/api/crawl/index';
|
||||
import { useUserInfo } from '/@/stores/userInfo';
|
||||
import { ElMessage,ElMessageBox} from "element-plus";
|
||||
const userInfo = useUserInfo();
|
||||
|
||||
const emit = defineEmits(['response']);
|
||||
const disabledDate = (time) => {
|
||||
return time.getTime() > Date.now()
|
||||
}
|
||||
// 初始化数据
|
||||
const map = ref()
|
||||
const state = reactive({
|
||||
|
@ -184,82 +163,82 @@ const state = reactive({
|
|||
// }
|
||||
// ]
|
||||
},
|
||||
{
|
||||
value: '国产系列卫星',
|
||||
label: '国产系列卫星',
|
||||
children: [
|
||||
{
|
||||
value: 'GF - 1',
|
||||
label: 'GF - 1',
|
||||
},
|
||||
{
|
||||
value: 'GF - 2',
|
||||
label: 'GF - 2',
|
||||
},
|
||||
{
|
||||
value: 'GF - 3',
|
||||
label: 'GF - 3',
|
||||
},
|
||||
{
|
||||
value: 'GF - 4',
|
||||
label: 'GF - 4',
|
||||
},
|
||||
{
|
||||
value: 'GF - 6',
|
||||
label: 'GF - 6',
|
||||
},
|
||||
{
|
||||
value: 'ZY - 3',
|
||||
label: 'ZY - 3',
|
||||
},
|
||||
{
|
||||
value: 'ZY - 302',
|
||||
label: 'ZY - 302',
|
||||
},
|
||||
{
|
||||
value: 'ZY - 02C',
|
||||
label: 'ZY - 02C',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: '欧比特珠海一号系列卫星',
|
||||
label: '欧比特珠海一号系列卫星',
|
||||
children: [
|
||||
{
|
||||
value: 'OVS - 2A',
|
||||
label: 'OVS - 2A',
|
||||
},
|
||||
{
|
||||
value: 'OVS - 3A',
|
||||
label: 'OVS - 3A',
|
||||
},
|
||||
{
|
||||
value: 'OVS - 1A',
|
||||
label: 'OVS - 1A',
|
||||
},
|
||||
{
|
||||
value: 'OVS - 1B',
|
||||
label: 'OVS - 1B',
|
||||
},
|
||||
{
|
||||
value: 'OHS - 2A',
|
||||
label: 'OHS - 2A',
|
||||
},
|
||||
{
|
||||
value: 'OHS - 2B',
|
||||
label: 'OHS - 2B',
|
||||
},
|
||||
{
|
||||
value: 'OHS - 2C',
|
||||
label: 'OHS - 2C',
|
||||
},
|
||||
{
|
||||
value: 'OHS - 2D',
|
||||
label: 'OHS - 2D',
|
||||
},
|
||||
],
|
||||
}
|
||||
// {
|
||||
// value: '国产系列卫星',
|
||||
// label: '国产系列卫星',
|
||||
// children: [
|
||||
// {
|
||||
// value: 'GF - 1',
|
||||
// label: 'GF - 1',
|
||||
// },
|
||||
// {
|
||||
// value: 'GF - 2',
|
||||
// label: 'GF - 2',
|
||||
// },
|
||||
// {
|
||||
// value: 'GF - 3',
|
||||
// label: 'GF - 3',
|
||||
// },
|
||||
// {
|
||||
// value: 'GF - 4',
|
||||
// label: 'GF - 4',
|
||||
// },
|
||||
// {
|
||||
// value: 'GF - 6',
|
||||
// label: 'GF - 6',
|
||||
// },
|
||||
// {
|
||||
// value: 'ZY - 3',
|
||||
// label: 'ZY - 3',
|
||||
// },
|
||||
// {
|
||||
// value: 'ZY - 302',
|
||||
// label: 'ZY - 302',
|
||||
// },
|
||||
// {
|
||||
// value: 'ZY - 02C',
|
||||
// label: 'ZY - 02C',
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// value: '欧比特珠海一号系列卫星',
|
||||
// label: '欧比特珠海一号系列卫星',
|
||||
// children: [
|
||||
// {
|
||||
// value: 'OVS - 2A',
|
||||
// label: 'OVS - 2A',
|
||||
// },
|
||||
// {
|
||||
// value: 'OVS - 3A',
|
||||
// label: 'OVS - 3A',
|
||||
// },
|
||||
// {
|
||||
// value: 'OVS - 1A',
|
||||
// label: 'OVS - 1A',
|
||||
// },
|
||||
// {
|
||||
// value: 'OVS - 1B',
|
||||
// label: 'OVS - 1B',
|
||||
// },
|
||||
// {
|
||||
// value: 'OHS - 2A',
|
||||
// label: 'OHS - 2A',
|
||||
// },
|
||||
// {
|
||||
// value: 'OHS - 2B',
|
||||
// label: 'OHS - 2B',
|
||||
// },
|
||||
// {
|
||||
// value: 'OHS - 2C',
|
||||
// label: 'OHS - 2C',
|
||||
// },
|
||||
// {
|
||||
// value: 'OHS - 2D',
|
||||
// label: 'OHS - 2D',
|
||||
// },
|
||||
// ],
|
||||
// }
|
||||
],
|
||||
shortcuts: [
|
||||
{
|
||||
|
@ -312,6 +291,7 @@ const state = reactive({
|
|||
lon: '',
|
||||
disLat: '',
|
||||
disLon: '',
|
||||
data: {}
|
||||
})
|
||||
|
||||
const onMapClick = (e) => {
|
||||
|
@ -399,6 +379,20 @@ const editCoordinate = () => {
|
|||
|
||||
// 开始爬虫
|
||||
const startCrawl = () => {
|
||||
if (!state.startTime) {
|
||||
ElMessage.error("Please select the search start time")
|
||||
return;
|
||||
}
|
||||
if (!state.endTime) {
|
||||
ElMessage.error("Please select the search end time")
|
||||
return;
|
||||
}
|
||||
if (state.coordinateList.length == 0 || !state.coordinateList[0].Lat || !state.coordinateList[0].Lng || !state.coordinateList[1].Lat || !state.coordinateList[1].Lng) {
|
||||
ElMessage.error("Please draw the area on the map")
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var ranges = state.coordinateList[0].Lat + ' ' + state.coordinateList[0].Lng + ',' + state.coordinateList[1].Lat + ' ' + state.coordinateList[1].Lng
|
||||
var type = null
|
||||
if (state.satelliteSelected[0] == 'landsat') {
|
||||
|
@ -413,34 +407,58 @@ const startCrawl = () => {
|
|||
var param = {
|
||||
"stime": state.startTime,
|
||||
"etime": state.endTime,
|
||||
"disaster_id": state.selectID * 1,
|
||||
"disaster_id": state.data.disasterId,
|
||||
"ranges": ranges,
|
||||
"id": id
|
||||
}
|
||||
|
||||
console.log(param);
|
||||
submit(
|
||||
{
|
||||
type: type,
|
||||
startDate: state.startTime,
|
||||
endDate: state.endTime,
|
||||
manageId: userInfo.userInfos.id,
|
||||
status: 0,
|
||||
disasterId: state.selectID,
|
||||
disasterId: state.data.disasterId,
|
||||
id: (id ? id : null)
|
||||
}
|
||||
).then(ret => {
|
||||
if (ret == 1042) {
|
||||
ElMessage.error("error")
|
||||
} else {
|
||||
|
||||
rs(param).then(res => {
|
||||
console.log(res);
|
||||
// getData();
|
||||
ElMessage({
|
||||
message: 'Success, Start crawling.',
|
||||
type: 'success',
|
||||
})
|
||||
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(() => {
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -453,6 +471,7 @@ const ClearCondition = () => {
|
|||
state.satelliteSelected = []
|
||||
state.coordinateList = []
|
||||
state.selectID = ''
|
||||
emit('response')
|
||||
}
|
||||
|
||||
// 监听
|
||||
|
@ -464,49 +483,70 @@ 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
|
||||
console.log(row);
|
||||
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">
|
||||
|
|
|
@ -3,24 +3,12 @@
|
|||
<el-config-provider :locale="en">
|
||||
<el-row :gutter="22">
|
||||
<el-col :span="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 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>
|
||||
<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 class="system-role-padding layout-padding-auto layout-padding-view" style="height: 90vh;">
|
||||
<disasterTable @childClick="tableClick"></disasterTable>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 90vh;">
|
||||
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
||||
<!-- <el-input size="default" placeholder="please enter username" style="max-width: 180px" v-model="state.searchName"
|
||||
clearable></el-input>
|
||||
|
@ -30,7 +18,10 @@
|
|||
</el-icon>
|
||||
search
|
||||
</el-button>-->
|
||||
<el-button size="default" type="success" class="ml10" @click="uploadData">
|
||||
<el-button v-if="!state.nameNew" size="default" type="success" class="ml10" @click="generateData">
|
||||
Generate
|
||||
</el-button>
|
||||
<el-button v-if="state.nameNew" size="default" type="success" class="ml10" @click="uploadData">
|
||||
<el-icon>
|
||||
<ele-Upload />
|
||||
</el-icon>
|
||||
|
@ -116,6 +107,12 @@ const editWordCloudsRef = ref();
|
|||
//复制内容
|
||||
import { defineAsyncComponent, reactive, onMounted, ref } from 'vue';
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import disasterTable from "/@/components/table/DisasterTable.vue";
|
||||
import { ta } from 'element-plus/es/locale';
|
||||
import { landsat, submit } from '/@/api/crawl/index.js'
|
||||
import { useUserInfo } from '/@/stores/userInfo';
|
||||
|
||||
const userInfo = useUserInfo();
|
||||
// 引入组件
|
||||
const RoleDialog = defineAsyncComponent(() => import('/@/views/system/role/dialog.vue'));
|
||||
const auditRef = ref();
|
||||
|
@ -123,6 +120,7 @@ const uploadRef = ref();
|
|||
// 定义变量内容
|
||||
const roleDialogRef = ref();
|
||||
const state = reactive({
|
||||
nameNew: false,
|
||||
multipleWord: [],
|
||||
multipleHotspot: [],
|
||||
tabVal: 'first',
|
||||
|
@ -156,7 +154,13 @@ const handleSelectionChange = (val) => {
|
|||
const handleSelectionHotspotChange = (val) => {
|
||||
state.multipleHotspot = val
|
||||
}
|
||||
|
||||
const handleClick = (tab) => {
|
||||
if (tab == "second") {
|
||||
state.nameNew = true;
|
||||
} else {
|
||||
state.nameNew = false;
|
||||
}
|
||||
state.tabVal = tab;
|
||||
state.tableData = {
|
||||
data: [],
|
||||
|
@ -203,8 +207,8 @@ const formatSizeUnits = (size) => {
|
|||
return (size / Math.pow(k, i)).toPrecision(3) + ' ' + sizes[i];
|
||||
}
|
||||
//灾害表格点击事件
|
||||
const tableClick = (row, column, event) => {
|
||||
state.disasterId = row.disasterId;
|
||||
const tableClick = (i) => {
|
||||
state.disasterId = i.disasterId;
|
||||
getTableData();
|
||||
}
|
||||
// 初始化灾害表格数据
|
||||
|
@ -212,8 +216,8 @@ 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);
|
||||
state.disasterData.data.forEach(item => {
|
||||
let date = item.disasterTime.slice(0, 10);
|
||||
item.disasterTime = date;
|
||||
})
|
||||
state.disasterData.total = res.total;
|
||||
|
@ -247,13 +251,40 @@ const uploadData = () => {
|
|||
}
|
||||
state.tabVal == 'first' ? wordCloudsRef.value.openDialog(state.disasterId) : hotspotRef.value.openDialog(state.disasterId);
|
||||
};
|
||||
//获取图文信息
|
||||
const generateData = () => {
|
||||
if (!state.disasterId) {
|
||||
ElMessage.error("Please select disaster information!")
|
||||
return;
|
||||
}
|
||||
//记录爬虫信息
|
||||
submit(
|
||||
{
|
||||
type: 8,
|
||||
manageId: userInfo.userInfos.id,
|
||||
status: 0,
|
||||
disasterId: state.disasterId,
|
||||
keywords: 'word clouds',
|
||||
}
|
||||
).then(ret => {
|
||||
if (ret == 1042) {
|
||||
ElMessage.error("error")
|
||||
} else {
|
||||
landsat(ret.disasterId, 30, ret.id).then(res => {
|
||||
getTableData;
|
||||
ElMessage.success("success")
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 打开修改热点弹窗
|
||||
const editHotspot = (row) => {
|
||||
editHotspotRef.value.openDialog(row);
|
||||
};
|
||||
// 打开修改词云弹窗
|
||||
const editWordCloud = (row) => {
|
||||
editWordCloudsRef.value.openDialog(row);
|
||||
editWordCloudsRef.value.openDialog(row);
|
||||
};
|
||||
//批量删除词云或者热点数据
|
||||
const batchDel = () => {
|
||||
|
|
|
@ -277,12 +277,12 @@ const initLineChart = (xData,data1, data2) => {
|
|||
symbol: 'circle',
|
||||
smooth: true,
|
||||
data: data2,
|
||||
lineStyle: { color: '#44c05b' },
|
||||
itemStyle: { color: '#44c05b', borderColor: '#44c05b' },
|
||||
lineStyle: { color: 'rgba(145,204,117,1)' },
|
||||
itemStyle: { color: 'rgba(145,204,117,1)', borderColor: 'rgba(145,204,117,1)' },
|
||||
areaStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: '#44c05b' },
|
||||
{ offset: 1, color: '#44c05b' },
|
||||
{ offset: 0, color: 'rgba(145,204,117,1)' },
|
||||
{ offset: 1, color: 'rgba(145,204,117,0)' },
|
||||
]),
|
||||
},
|
||||
}
|
||||
|
@ -328,12 +328,12 @@ const initLineVandDChart = (xData,data1, data2) => {
|
|||
symbol: 'circle',
|
||||
smooth: true,
|
||||
data: data2,
|
||||
lineStyle: { color: '#3d91e7' },
|
||||
itemStyle: { color: '#3d91e7', borderColor: '#3d91e7' },
|
||||
lineStyle: { color: 'rgba(84,112,198,1)' },
|
||||
itemStyle: { color: 'rgba(84,112,198,1)', borderColor: 'rgba(84,112,198,1)' },
|
||||
areaStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: '#3d91e7' },
|
||||
{ offset: 1, color: '#3d91e7' },
|
||||
{ offset: 0, color: 'rgba(84,112,198,1)' },
|
||||
{ offset: 1, color: 'rgba(84,112,198,0)' },
|
||||
]),
|
||||
},
|
||||
},{
|
||||
|
@ -343,12 +343,12 @@ const initLineVandDChart = (xData,data1, data2) => {
|
|||
symbol: 'circle',
|
||||
smooth: true,
|
||||
data: data1,
|
||||
lineStyle: { color: '#e78d3d' },
|
||||
itemStyle: { color: '#e78d3d', borderColor: '#e78d3d' },
|
||||
lineStyle: { color: 'rgba(250,200,88,1)' },
|
||||
itemStyle: { color: 'rgba(250,200,88,1)', borderColor: 'rgba(250,200,88,1)' },
|
||||
areaStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: '#e78d3d' },
|
||||
{ offset: 1, color: '#e78d3d' },
|
||||
{ offset: 0, color: 'rgba(250,200,88,1)' },
|
||||
{ offset: 1, color: 'rgba(250,200,88,0)' },
|
||||
]),
|
||||
},
|
||||
}
|
||||
|
@ -398,8 +398,8 @@ const initChiefChart = (xData,yData) => {
|
|||
barWidth: 30,
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: '#fe9a8bb3' },
|
||||
{ offset: 1, color: '#fe9a8b03' },
|
||||
{ offset: 0, color: 'rgba(238,102,102,1)' },
|
||||
{ offset: 1, color: 'rgba(238,102,102,0)' },
|
||||
]),
|
||||
//柱状图圆角
|
||||
borderRadius: [30, 30, 0, 0],
|
||||
|
@ -451,8 +451,8 @@ const initAdministratorsChart = (xData,yData) => {
|
|||
yAxisIndex: 0,
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: 'rgba(108,80,243,0.3)' },
|
||||
{ offset: 1, color: 'rgba(108,80,243,0)' },
|
||||
{ offset: 0, color: 'rgba(115,192,222,1)' },
|
||||
{ offset: 1, color: 'rgba(115,192,222,0)' },
|
||||
]),
|
||||
//柱状图圆角
|
||||
borderRadius: [30, 30, 0, 0],
|
||||
|
|
|
@ -2,11 +2,7 @@
|
|||
<div class="login-container flex">
|
||||
<div class="login-left">
|
||||
<div class="login-left-logo">
|
||||
<img :src="logoMini" />
|
||||
<div class="login-left-logo-text">
|
||||
<span>{{ getThemeConfig.globalViceTitle }}</span>
|
||||
<span class="login-left-logo-text-msg">{{ getThemeConfig.globalViceTitleMsg }}</span>
|
||||
</div>
|
||||
<img src="/logo.png">
|
||||
</div>
|
||||
<div class="login-left-img">
|
||||
<img :src="loginMain" />
|
||||
|
@ -18,7 +14,7 @@
|
|||
<span class="login-right-warp-one"></span>
|
||||
<span class="login-right-warp-two"></span>
|
||||
<div class="login-right-warp-mian">
|
||||
<div class="login-right-warp-main-title">{{ getThemeConfig.globalTitle }} 欢迎您!</div>
|
||||
<div class="login-right-warp-main-title">VoRDM 欢迎您!</div>
|
||||
<div class="login-right-warp-main-form">
|
||||
<div v-if="!state.isScan">
|
||||
<el-tabs v-model="state.tabsActiveName">
|
||||
|
@ -78,11 +74,13 @@ onMounted(() => {
|
|||
.login-container {
|
||||
height: 100%;
|
||||
background: var(--el-color-white);
|
||||
|
||||
.login-left {
|
||||
flex: 1;
|
||||
position: relative;
|
||||
background-color: rgba(211, 239, 255, 1);
|
||||
margin-right: 100px;
|
||||
|
||||
.login-left-logo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -91,24 +89,29 @@ onMounted(() => {
|
|||
left: 80px;
|
||||
z-index: 1;
|
||||
animation: logoAnimation 0.3s ease;
|
||||
|
||||
img {
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
width: 60%;
|
||||
height: 70%;
|
||||
}
|
||||
|
||||
.login-left-logo-text {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
span {
|
||||
margin-left: 10px;
|
||||
font-size: 28px;
|
||||
color: #26a59a;
|
||||
}
|
||||
|
||||
.login-left-logo-text-msg {
|
||||
font-size: 12px;
|
||||
color: #32a99e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.login-left-img {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
|
@ -116,20 +119,24 @@ onMounted(() => {
|
|||
transform: translate(-50%, -50%);
|
||||
width: 100%;
|
||||
height: 52%;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
animation: error-num 0.6s ease;
|
||||
}
|
||||
}
|
||||
|
||||
.login-left-waves {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: -100px;
|
||||
}
|
||||
}
|
||||
|
||||
.login-right {
|
||||
width: 700px;
|
||||
|
||||
.login-right-warp {
|
||||
border: 1px solid var(--el-color-primary-light-3);
|
||||
border-radius: 3px;
|
||||
|
@ -138,12 +145,14 @@ onMounted(() => {
|
|||
position: relative;
|
||||
overflow: hidden;
|
||||
background-color: var(--el-color-white);
|
||||
|
||||
.login-right-warp-one,
|
||||
.login-right-warp-two {
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: inherit;
|
||||
height: inherit;
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
content: '';
|
||||
|
@ -151,6 +160,7 @@ onMounted(() => {
|
|||
z-index: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.login-right-warp-one {
|
||||
&::before {
|
||||
filter: hue-rotate(0deg);
|
||||
|
@ -161,6 +171,7 @@ onMounted(() => {
|
|||
background: linear-gradient(90deg, transparent, var(--el-color-primary));
|
||||
animation: loginLeft 3s linear infinite;
|
||||
}
|
||||
|
||||
&::after {
|
||||
filter: hue-rotate(60deg);
|
||||
top: -100%;
|
||||
|
@ -172,6 +183,7 @@ onMounted(() => {
|
|||
animation-delay: 0.7s;
|
||||
}
|
||||
}
|
||||
|
||||
.login-right-warp-two {
|
||||
&::before {
|
||||
filter: hue-rotate(120deg);
|
||||
|
@ -183,6 +195,7 @@ onMounted(() => {
|
|||
animation: loginRight 3s linear infinite;
|
||||
animation-delay: 1.4s;
|
||||
}
|
||||
|
||||
&::after {
|
||||
filter: hue-rotate(300deg);
|
||||
bottom: -100%;
|
||||
|
@ -194,10 +207,12 @@ onMounted(() => {
|
|||
animation-delay: 2.1s;
|
||||
}
|
||||
}
|
||||
|
||||
.login-right-warp-mian {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
|
||||
.login-right-warp-main-title {
|
||||
height: 130px;
|
||||
line-height: 130px;
|
||||
|
@ -208,9 +223,11 @@ onMounted(() => {
|
|||
animation-delay: 0.3s;
|
||||
color: var(--el-text-color-primary);
|
||||
}
|
||||
|
||||
.login-right-warp-main-form {
|
||||
flex: 1;
|
||||
padding: 0 50px 50px;
|
||||
|
||||
.login-content-main-sacn {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
@ -221,6 +238,7 @@ onMounted(() => {
|
|||
cursor: pointer;
|
||||
transition: all ease 0.3s;
|
||||
color: var(--el-color-primary);
|
||||
|
||||
&-delta {
|
||||
position: absolute;
|
||||
width: 35px;
|
||||
|
@ -231,11 +249,13 @@ onMounted(() => {
|
|||
background: var(--el-color-white);
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
transition: all ease 0.3s;
|
||||
color: var(--el-color-primary) !important;
|
||||
}
|
||||
|
||||
i {
|
||||
width: 47px;
|
||||
height: 50px;
|
||||
|
@ -250,5 +270,4 @@ onMounted(() => {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
}</style>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<el-config-provider :locale="en">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="24">
|
||||
<el-card shadow="hover">
|
||||
<el-card shadow="hover" style="height: 83vh;margin:25px ;">
|
||||
<div class="system-user-search mb15">
|
||||
<el-form>
|
||||
<el-row>
|
||||
|
@ -37,7 +37,7 @@
|
|||
|
||||
|
||||
</div>
|
||||
<el-table :data="state.tableData.data" style="width: 100%" v-loading="state.tableData.loading"
|
||||
<el-table :data="state.tableData.data" style="width: 100%;height: 65vh;" 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>
|
||||
|
@ -81,8 +81,8 @@
|
|||
<!-- </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">
|
||||
<el-button @click="state.dialogVisible = false;state.email.text=''">Cancel</el-button>
|
||||
<el-button type="primary" @click="send();state.email.text=''" v-if="state.email.status != 1">
|
||||
Send
|
||||
</el-button>
|
||||
</span>
|
||||
|
@ -174,25 +174,27 @@ const onOpenEdit = (row) => {
|
|||
|
||||
};
|
||||
const send = () => {
|
||||
state.email.email = "792163605@qq.com"
|
||||
// state.email.email = "792163605@qq.com"
|
||||
emailSend(state.email).then(res => {
|
||||
ElMessage.success('发送成功');
|
||||
ElMessage.success('send success');
|
||||
state.dialogVisible = false;
|
||||
})
|
||||
|
||||
};
|
||||
// 删除用户
|
||||
const onRowDel = (row) => {
|
||||
ElMessageBox.confirm(`此操作将永久此参数:“${row.name}”,是否继续?`, '提示', {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
ElMessageBox.confirm(
|
||||
`This operation will permanently delete the contact “${row.userName}”. Do you want to continue?`
|
||||
, 'Tips', {
|
||||
confirmButtonText: 'Yes',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
remove(row.id).then(res => {
|
||||
ElMessage.success('删除成功');
|
||||
initTableData();
|
||||
})
|
||||
// remove(row.id).then(res => {
|
||||
// ElMessage.success('删除成功');
|
||||
// initTableData();
|
||||
// })
|
||||
})
|
||||
.catch(() => { });
|
||||
};
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<el-config-provider :locale="en">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="24">
|
||||
<el-card shadow="hover">
|
||||
<el-card shadow="hover" style="margin:25px ;height: 83vh;">
|
||||
<div class="system-user-search mb15">
|
||||
<el-form>
|
||||
<el-row>
|
||||
|
@ -40,7 +40,7 @@
|
|||
</el-button>
|
||||
</el-row> -->
|
||||
</div>
|
||||
<el-table :data="state.tableData.data" style="width: 100%" v-loading="state.tableData.loading"
|
||||
<el-table :data="state.tableData.data" style="width: 100%;height: 65vh;" v-loading="state.tableData.loading"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column prop="toolName" label="Tool Name">
|
||||
<template #default="scope">
|
||||
|
@ -135,14 +135,14 @@ const onOpenEdit = (row) => {
|
|||
};
|
||||
// 删除用户
|
||||
const onRowDel = (row) => {
|
||||
ElMessageBox.confirm(`此操作将永久此参数:“${row.name}”,是否继续?`, '提示', {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
ElMessageBox.confirm(`After rejecting the tool for “${row.toolName}” this data will be deleted.`, 'Tips', {
|
||||
confirmButtonText: 'Yes',
|
||||
cancelButtonText: 'cancel',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
remove(row.id).then(res => {
|
||||
ElMessage.success('删除成功');
|
||||
ElMessage.success('delete success');
|
||||
initTableData();
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,45 +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="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>
|
||||
<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 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">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="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>
|
||||
|
@ -55,29 +55,29 @@
|
|||
>
|
||||
</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-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>
|
||||
<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 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">
|
||||
|
@ -86,72 +86,78 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="chiefName" label="Answer" show-overflow-tooltip></el-table-column>
|
||||
<!-- <el-table-column prop="responseTime" label="Response time" show-overflow-tooltip></el-table-column> -->
|
||||
<!-- <el-table-column prop="Operate" label="Operate" show-overflow-tooltip></el-table-column> -->
|
||||
<el-table-column prop="respondStatus" label="Response status" show-overflow-tooltip>
|
||||
<el-table-column prop="reviewTime" label="reviewTime" show-overflow-tooltip />
|
||||
|
||||
<template #default="scope">
|
||||
<el-tag type="info" v-if="scope.row.respondStatus === 2">Approved</el-tag>
|
||||
<el-tag type="info" v-if="scope.row.respondStatus === 1">Rejected</el-tag>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="responseTime" label="Response time" show-overflow-tooltip></el-table-column> -->
|
||||
<!-- <el-table-column prop="Operate" label="Operate" show-overflow-tooltip></el-table-column> -->
|
||||
<el-table-column width="170" prop="respondStatus" label="Response status" show-overflow-tooltip>
|
||||
|
||||
<el-table-column prop="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="Review" width="30%">
|
||||
<el-container style="margin-top: -2%;margin-bottom: 2%;">
|
||||
<el-radio v-model="state.radio" label='1' @click="mapEvents('1')">Point</el-radio>
|
||||
<el-radio v-model="state.radio" label='2' @click="mapEvents('2')">Area</el-radio>
|
||||
<el-radio v-model="state.radio" label='3' @click="mapEvents('3')">Edit</el-radio>
|
||||
<el-button type="primary" style="margin-left: 5%;" @click="ClearSubmit">Clear</el-button>
|
||||
</el-container>
|
||||
<el-container style="margin-top: 2%;margin-bottom: 2%;" v-if="state.radio==='1'?true:false">
|
||||
<span style="line-height: 35px;"> Latitude:</span>
|
||||
<el-input placeholder="wait……" style="height:35px;margin-right: 1%;" v-model="state.dislat" readonly="readonly"> </el-input>
|
||||
<span style="line-height: 35px;">Longitude:</span>
|
||||
<el-input placeholder="wait……" style="height:35px;" v-model="state.dislon" readonly="readonly"></el-input>
|
||||
</el-container>
|
||||
<MapPage style="height:350px ; width:100% ;margin-bottom: 10px;" ref="mapRef"></MapPage>
|
||||
<el-form-item label="Disaster Time">
|
||||
<el-date-picker v-model="state.edit.disasterTime" type="date" value-format="YYYY-MM-DD"
|
||||
placeholder="Select date and time" />
|
||||
</el-form-item>
|
||||
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">Cancel</el-button>
|
||||
<el-button type="danger" @click="reviews(1)">
|
||||
Reject
|
||||
</el-button>
|
||||
<el-button type="primary" @click="reviews(2)">
|
||||
Approve
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<selectUser ref ="select" @callback="getTableData"></selectUser>
|
||||
<template #default="scope">
|
||||
<el-tag type="info" v-if="scope.row.respondStatus === 2">Approved</el-tag>
|
||||
<el-tag type="info" v-if="scope.row.respondStatus === 1">Rejected</el-tag>
|
||||
<el-tag type="success" v-if="scope.row.respondStatus === 3">Complete response</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column width="200" prop="Operate" label="Operate" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-button size="small" text type="primary" @click="onAllocation(scope.row)">Allocation</el-button>
|
||||
<el-button size="small" text type="danger" @click="responseEnded(scope.row)">Response ended</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
|
||||
:pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.current" background
|
||||
v-model:page-size="state.tableData.param.size" layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="state.tableData.total">
|
||||
</el-pagination>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
<el-dialog v-model="state.dialogVisible" title="Approval" width="30%">
|
||||
<el-container style="margin-top: -2%;margin-bottom: 2%;">
|
||||
<el-radio v-model="state.radio" label='1' @click="mapEvents('1')">Point</el-radio>
|
||||
<el-radio v-model="state.radio" label='2' @click="mapEvents('2')">Area</el-radio>
|
||||
<el-radio v-model="state.radio" label='3' @click="mapEvents('3')">Edit</el-radio>
|
||||
<el-button type="primary" style="margin-left: 5%;" @click="ClearSubmit">Clear</el-button>
|
||||
</el-container>
|
||||
<el-container style="margin-top: 2%;margin-bottom: 2%;" v-if="state.radio === '1' ? true : false">
|
||||
<span style="line-height: 35px;"> Latitude:</span>
|
||||
<el-input placeholder="wait……" style="height:35px;margin-right: 1%;" v-model="state.dislat" readonly="readonly">
|
||||
</el-input>
|
||||
<span style="line-height: 35px;">Longitude:</span>
|
||||
<el-input placeholder="wait……" style="height:35px;" v-model="state.dislon" readonly="readonly"></el-input>
|
||||
</el-container>
|
||||
<MapPage style="height:350px ; width:100% ;margin-bottom: 10px;" ref="mapRef"></MapPage>
|
||||
<el-form-item label="Disaster Time">
|
||||
<el-date-picker v-model="state.edit.disasterTime" type="date" value-format="YYYY-MM-DD"
|
||||
placeholder="Select date and time" />
|
||||
</el-form-item>
|
||||
|
||||
<template #footer>
|
||||
<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 { getList, review, responseEndedDisasterInfo } from '/@/api/disasterInfo/index';
|
||||
import { getDictionary } from '/@/api/system/dictbiz';
|
||||
import { useVariableStore } from '/@/stores/index.ts'
|
||||
//引入地图
|
||||
|
@ -159,8 +165,8 @@ 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'
|
||||
|
@ -175,12 +181,29 @@ const handleClick = (tab, event) => {
|
|||
getTableData();
|
||||
};
|
||||
const MapPage = defineAsyncComponent({
|
||||
loader:() =>import('/@/components/Map.vue'),
|
||||
loader: () => import('/@/components/Map.vue'),
|
||||
delay: 200,
|
||||
})
|
||||
const onAllocation = (row) => {
|
||||
select.value.openDialog(row)
|
||||
};
|
||||
|
||||
|
||||
const responseEnded = (row) => {
|
||||
ElMessageBox.confirm(`Confirm completion of response?`, 'Prompt', {
|
||||
confirmButtonText: 'Yes',
|
||||
cancelButtonText: 'No',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
responseEndedDisasterInfo(row.id).then((da) => {
|
||||
ElMessage.success('Operation successful');
|
||||
})
|
||||
})
|
||||
.catch(() => { });
|
||||
};
|
||||
|
||||
|
||||
const dateFormat = (date) => {
|
||||
return useDateFormat(date, 'YYYY-MM-DD').value;
|
||||
}
|
||||
|
@ -202,10 +225,10 @@ const state = reactive({
|
|||
disasterTypeList: [],
|
||||
selectName: 'first',
|
||||
edit: {},
|
||||
radio:null,
|
||||
dislat:'',
|
||||
dislon:'',
|
||||
wktPoint_Poly:undefined
|
||||
radio: null,
|
||||
dislat: '',
|
||||
dislon: '',
|
||||
wktPoint_Poly: undefined
|
||||
});
|
||||
// 初始化表格数据
|
||||
const getTableData = () => {
|
||||
|
@ -214,7 +237,7 @@ const getTableData = () => {
|
|||
if (state.selectName === 'first') {
|
||||
state.tableData.param.respondStatus = 0;
|
||||
} else {
|
||||
state.tableData.param.respondStatus = 2;
|
||||
state.tableData.param.respondStatus = 3;
|
||||
}
|
||||
getList(state.tableData.param).then((res) => {
|
||||
state.tableData.data = res.records;
|
||||
|
@ -227,41 +250,41 @@ const onHandleSizeChange = (val) => {
|
|||
getTableData();
|
||||
};
|
||||
const onOpenEditRole = (type, row) => {
|
||||
|
||||
|
||||
//深拷贝
|
||||
state.edit = JSON.parse(JSON.stringify(row));
|
||||
state.dialogVisible = true;
|
||||
setTimeout(() => {
|
||||
state.radio = "1"
|
||||
// mapRef.value.mapOperations.removeAll()
|
||||
//赋值地图范围,并且可以修改点或者区域
|
||||
if(state.wktPoint_Poly){
|
||||
mapRef.value.mapOperations.removeLayer(state.wktPoint_Poly)
|
||||
}
|
||||
state.wktPoint_Poly= mapRef.value.mapOperations.wktParseToMap(row.geometry)
|
||||
// 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);
|
||||
state.radio = "1"
|
||||
// mapRef.value.mapOperations.removeAll()
|
||||
//赋值地图范围,并且可以修改点或者区域
|
||||
if (state.wktPoint_Poly) {
|
||||
mapRef.value.mapOperations.removeLayer(state.wktPoint_Poly)
|
||||
}
|
||||
state.wktPoint_Poly = mapRef.value.mapOperations.wktParseToMap(row.geometry)
|
||||
// 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()
|
||||
|
||||
}else if(ev == '2'){
|
||||
mapRef.value.mapOperations.off("click",mapClick);
|
||||
|
||||
} else if (ev == '2') {
|
||||
mapRef.value.mapOperations.off("click", mapClick);
|
||||
mapRef.value.mapOperations.drawPolygon()
|
||||
// mapRef.value.mapOperations.drawPolygon()
|
||||
// mapRef.value.mapOperations.drawCreated()
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
else {
|
||||
mapRef.value.mapOperations.Edit()
|
||||
}
|
||||
};
|
||||
|
@ -269,14 +292,14 @@ const ClearSubmit = () => {
|
|||
setTimeout(() => {
|
||||
mapRef.value.mapOperations.removeAll()
|
||||
variableStore.wktdata = null
|
||||
variableStore.layerGroupPoint=null;
|
||||
layerGroupPoly=null;
|
||||
variableStore.layerGroupPoint = null;
|
||||
layerGroupPoly = null;
|
||||
}, 100)
|
||||
}
|
||||
const mapClick=(res)=>{
|
||||
mapRef.value.mapOperations.removeLayer( state.wktPoint_Poly )
|
||||
const mapClick = (res) => {
|
||||
// mapRef.value.mapOperations.removeLayer( state.wktPoint_Poly )
|
||||
changelatlon(res);
|
||||
state.wktPoint_Poly=mapRef.value.mapOperations.addInteractMarker(res.latlng.lat.toFixed(3),res.latlng.lng.toFixed(3))
|
||||
mapRef.value.mapOperations.addInteractMarker(res.latlng.lat.toFixed(3), res.latlng.lng.toFixed(3))
|
||||
// console.log(state.wktPoint_Poly)
|
||||
}
|
||||
const reviews = (index) => {
|
||||
|
@ -291,13 +314,13 @@ const reviews = (index) => {
|
|||
if (index === 1) {
|
||||
state.edit.respondStatus = 1;
|
||||
} else {
|
||||
state.edit.respondStatus = 2;
|
||||
state.edit.respondStatus = 3;
|
||||
}
|
||||
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) => {
|
||||
ElMessage.success('操作成功');
|
||||
ElMessage.success('success');
|
||||
state.dialogVisible = false;
|
||||
getTableData();
|
||||
});
|
||||
|
@ -310,44 +333,44 @@ const onHandleCurrentChange = (val) => {
|
|||
const changelatlon = (e) => {
|
||||
//深拷贝e
|
||||
state.dislat = e.latlng.lat.toFixed(3);
|
||||
state.dislon= e.latlng.lng.toFixed(3);
|
||||
// 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"
|
||||
}
|
||||
state.dislon = e.latlng.lng.toFixed(3);
|
||||
// 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 > 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 < 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 > 180 && state.dislon <= 360) {
|
||||
state.dislon = String((360 - state.dislon).toFixed(3)) + "°W"
|
||||
else if (state.dislon > 360) {
|
||||
let n = Math.floor(state.dislon / 360)
|
||||
state.dislon = (state.dislon - n * 360).toFixed(3)
|
||||
if (state.dislon <= 180 && state.dislon >= 0) {
|
||||
state.dislon = String(Math.abs(state.dislon)) + "°E"
|
||||
}
|
||||
else if (state.dislon > 180 && state.dislon <= 360) {
|
||||
state.dislon = String((360 - state.dislon).toFixed(3)) + "°W"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// 页面加载时
|
||||
|
@ -356,14 +379,14 @@ onMounted(() => {
|
|||
getDictionary({ code: 'disaster' }).then((res) => {
|
||||
state.disasterTypeList = res;
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
const getValue = (key) => {
|
||||
//返回state.disasterTypeLis 对应的value
|
||||
return state.disasterTypeList.find((item) => item.dictKey === key)?.dictValue;
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
<style lang="scss">
|
||||
.demo-tabs>.el-tabs__content {
|
||||
padding: 0px;
|
||||
color: #6b778c;
|
||||
|
@ -380,4 +403,11 @@ const getValue = (key) => {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mt15 {
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
float: right;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -8,24 +8,24 @@
|
|||
<el-form ref="dicDialogFormRef" :model="state.ruleForm" size="default" label-width="90px">
|
||||
<el-row :gutter="35">
|
||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||
<el-form-item label="字典名">
|
||||
<el-input v-model="state.ruleForm.dictValue" placeholder="请输入字典名称" clearable></el-input>
|
||||
<el-form-item label="Dictionary Name" label-width="180">
|
||||
<el-input v-model="state.ruleForm.dictValue" placeholder="Please enter a Dictionary Name" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||
<el-form-item label="字典值">
|
||||
<el-input v-model="state.ruleForm.dictKey" placeholder="请输入字段名,拼接 ruleForm.children" clearable></el-input>
|
||||
<el-form-item label="Dictionary value" label-width="180">
|
||||
<el-input v-model="state.ruleForm.dictKey" placeholder="Please enter a Dictionary Value" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
||||
<el-form-item label="字典状态">
|
||||
<el-switch v-model="state.ruleForm.status" inline-prompt active-text="启" inactive-text="禁"></el-switch>
|
||||
<el-form-item label="Dictionary Status" label-width="180">
|
||||
<el-switch v-model="state.ruleForm.status" inline-prompt active-text="on" inactive-text="off"></el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
||||
<el-row :gutter="35" v-for="(v, k) in state.ruleForm.children" :key="k">
|
||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||
<el-form-item :prop="`list[${k}].label`">
|
||||
<el-form-item :prop="`list[${k}].label`" label-width="180">
|
||||
<template #label>
|
||||
<el-button type="primary" circle size="small" @click="onAddRow" v-if="k === 0">
|
||||
<el-icon>
|
||||
|
@ -37,28 +37,28 @@
|
|||
<ele-Delete />
|
||||
</el-icon>
|
||||
</el-button>
|
||||
<span class="ml10">字典名</span>
|
||||
<span class="ml10">Dictionary Name</span>
|
||||
</template>
|
||||
<el-input v-model="v.dictValue" style="width: 100%" placeholder="请输入字段名"> </el-input>
|
||||
<el-input v-model="v.dictValue" style="width: 100%" placeholder="Please enter a Dictionary Name"> </el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||
<el-form-item label="字典值" :prop="`list[${k}].value`">
|
||||
<el-input v-model="v.dictKey" style="width: 100%" placeholder="请输入字典值"> </el-input>
|
||||
<el-form-item label="Dictionary Value" :prop="`list[${k}].value`" label-width="180">
|
||||
<el-input v-model="v.dictKey" style="width: 100%" placeholder="Please enter a Dictionary Value"> </el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
||||
<el-form-item label="字典描述">
|
||||
<el-input v-model="state.ruleForm.remark" type="textarea" placeholder="请输入字典描述" maxlength="150"></el-input>
|
||||
<el-form-item label="Dictionary Description" label-width="180">
|
||||
<el-input v-model="state.ruleForm.remark" type="textarea" placeholder="Please enter a Dictionary Description" maxlength="150"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="onCancel" size="default">取 消</el-button>
|
||||
<el-button @click="onCancel" size="default">Cancel</el-button>
|
||||
<el-button type="primary" @click="onSubmit" size="default">{{ state.dialog.submitTxt }}</el-button>
|
||||
</span>
|
||||
</template>
|
||||
|
@ -103,11 +103,11 @@ const openDialog = (type, row) => {
|
|||
state.ruleForm.children=[{ dictValue: '', dictKey: '' }];
|
||||
}
|
||||
state.ruleForm.status = row.isSealed === 0;
|
||||
state.dialog.title = '修改字典';
|
||||
state.dialog.submitTxt = '修 改';
|
||||
state.dialog.title = 'Edit';
|
||||
state.dialog.submitTxt = 'Edit';
|
||||
} else {
|
||||
state.dialog.title = '新增字典';
|
||||
state.dialog.submitTxt = '新 增';
|
||||
state.dialog.title = 'Add';
|
||||
state.dialog.submitTxt = 'Add';
|
||||
if (!state.ruleForm.children || state.ruleForm.children.length === 0) {
|
||||
state.ruleForm.children=[{ dictValue: '', dictKey: '' }];
|
||||
}
|
||||
|
|
|
@ -2,35 +2,35 @@
|
|||
<div class="system-dic-container layout-padding">
|
||||
<el-card shadow="hover" class="layout-padding-auto">
|
||||
<div class="system-user-search mb15">
|
||||
<el-input size="default" placeholder="请输入字典名称" style="max-width: 180px"> </el-input>
|
||||
<el-input size="default" placeholder="Please enter a dictionary name" style="max-width: 180px" v-model="state.query.dictValue"> </el-input>
|
||||
<el-button size="default" type="primary" class="ml10">
|
||||
<el-icon>
|
||||
<ele-Search />
|
||||
</el-icon>
|
||||
查询
|
||||
search
|
||||
</el-button>
|
||||
<el-button size="default" type="success" class="ml10" @click="onOpenAddDic('add')">
|
||||
<el-icon>
|
||||
<ele-FolderAdd />
|
||||
</el-icon>
|
||||
新增字典
|
||||
add
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading" style="width: 100%">
|
||||
<el-table-column type="index" label="序号" width="50" />
|
||||
<el-table-column prop="dictValue" label="字典名称" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="dictKey" label="字典值" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="isSealed" label="字典状态" show-overflow-tooltip>
|
||||
<el-table-column type="index" label="index" width="120" />
|
||||
<el-table-column prop="dictValue" label="Dictionary Name" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="dictKey" label="Dictionary value" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="isSealed" label="Dictionary Status" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-tag type="success" v-if="scope.row.isSealed===0">启用</el-tag>
|
||||
<el-tag type="info" v-else>禁用</el-tag>
|
||||
<el-tag type="success" v-if="scope.row.isSealed===0">Enable</el-tag>
|
||||
<el-tag type="info" v-else>Disabled</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="字典描述" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<el-table-column prop="remark" label="Dictionary Description" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="Operate" width="180">
|
||||
<template #default="scope">
|
||||
<el-button size="small" text type="primary" @click="onOpenEditDic('edit', scope.row)">修改</el-button>
|
||||
<el-button size="small" text type="primary" @click="onRowDel(scope.row)">删除</el-button>
|
||||
<el-button size="small" text type="primary" @click="onOpenEditDic('edit', scope.row)">Edit</el-button>
|
||||
<el-button size="small" text type="primary" @click="onRowDel(scope.row)">Remove</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -71,6 +71,9 @@ const state = reactive({
|
|||
pageSize: 10,
|
||||
},
|
||||
},
|
||||
query:{
|
||||
dictValue:""
|
||||
}
|
||||
});
|
||||
|
||||
// 初始化表格数据
|
||||
|
@ -91,14 +94,14 @@ const onOpenEditDic = (type, row) => {
|
|||
};
|
||||
// 删除字典
|
||||
const onRowDel = (row) => {
|
||||
ElMessageBox.confirm(`此操作将永久删除字典名称:“${row.dicName}”,是否继续?`, '提示', {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
ElMessageBox.confirm(`This operation will permanently delete the dictionary named “${row.dicName}” Do you want to continue?`, 'Tips', {
|
||||
confirmButtonText: 'Yes',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
remove(row.id).then(() => {
|
||||
getTableData();
|
||||
ElMessage.success('删除成功');
|
||||
ElMessage.success('Delete Success');
|
||||
});
|
||||
}).catch(() => {});
|
||||
};
|
||||
|
|
|
@ -25,17 +25,15 @@
|
|||
</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="disasterType" label="DisasterType" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterCountry" label="DisasterCountry" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterKeyword" label="DisasterKeyword" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="managerName" label="ManagerName" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="sponsorOrganization" label="SponsorOrganization" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="researchField" label="ResearchField" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="occupation" label="occupation" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="applyTime" label="applyTime" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column v-if="state.status == '1'" prop="reviewTime" label="reviewTime" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterType" label="DisasterType" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="disasterCountry" label="DisasterCountry" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="disasterTime" label="disasterTime" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="managerName" label="ManagerName" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="sponsorOrganization" label="SponsorOrganization" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="researchField" label="ResearchField" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="occupation" label="occupation" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="applyTime" label="applyTime" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column v-if="state.status == '1'" prop="reviewTime" label="reviewTime" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column v-if="state.status == '0'" prop="Operate" label="Operate" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<!-- <el-button link type="primary" size="small" @click="handleClick">Detail</el-button>-->
|
||||
|
@ -113,6 +111,10 @@ const getTableData = () => {
|
|||
state.tableData.loading = true;
|
||||
getAdminManagerPage(state.tableData.param.pageNum, state.tableData.param.pageSize, { "managerName": state.searchName,"status": state.status}).then(res => {
|
||||
state.tableData.data = res.records;
|
||||
state.tableData.data.forEach(item => {
|
||||
let date = item.disasterTime.slice(0, 10);
|
||||
item.disasterTime = date;
|
||||
})
|
||||
state.tableData.total = res.total;
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue