glj-代码提交
This commit is contained in:
parent
355cd9d3aa
commit
7157576afc
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
|
@ -84,7 +84,7 @@ export const pushing = (data) => {
|
|||
//wordcloud服务
|
||||
export const landsat = (disaster_id,number,id) => {
|
||||
return request({
|
||||
url: '/api/' + crawlModule + '/rs/landsat',
|
||||
url: '/api/' + crawlModule + '/visual/wordcloud',
|
||||
method: 'get',
|
||||
params:{
|
||||
disaster_id,
|
||||
|
|
|
@ -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,9 @@
|
|||
<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%"
|
||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%; height: 700px;"
|
||||
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">
|
||||
|
@ -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"
|
||||
|
@ -251,7 +251,7 @@ const formatSizeUnits = (size) => {
|
|||
}
|
||||
//灾害表格点击事件
|
||||
const tableClick = (row, column, event) => {
|
||||
state.disasterId = row.id;
|
||||
state.disasterId = row.disasterId;
|
||||
getTableData();
|
||||
}
|
||||
// 初始化灾害表格数据
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
</el-icon>
|
||||
search
|
||||
</el-button>-->
|
||||
<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="generateData">
|
||||
Generate
|
||||
</el-button>
|
||||
<el-button v-if="state.nameNew" size="default" type="success" class="ml10" @click="uploadData">
|
||||
<el-icon>
|
||||
<ele-Upload />
|
||||
|
@ -35,7 +35,7 @@
|
|||
</el-button>
|
||||
</div>
|
||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-change="handleClick" type="card">
|
||||
<el-tab-pane label="Word cloud" name="first" >
|
||||
<el-tab-pane label="Word cloud" name="first">
|
||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading"
|
||||
@selection-change="handleSelectionChange" style="width: 100%">
|
||||
<el-table-column type="selection" width="55" />
|
||||
|
@ -56,7 +56,7 @@
|
|||
:total="state.tableData.total">
|
||||
</el-pagination>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="Hotspot area" name="second" >
|
||||
<el-tab-pane label="Hotspot area" name="second">
|
||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading"
|
||||
@selection-change="handleSelectionHotspotChange" style="width: 100%">
|
||||
<el-table-column type="selection" width="55" />
|
||||
|
@ -109,7 +109,10 @@ 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 } from '/@/api/crawl/index.js'
|
||||
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();
|
||||
|
@ -117,7 +120,7 @@ const uploadRef = ref();
|
|||
// 定义变量内容
|
||||
const roleDialogRef = ref();
|
||||
const state = reactive({
|
||||
nameNew:false,
|
||||
nameNew: false,
|
||||
multipleWord: [],
|
||||
multipleHotspot: [],
|
||||
tabVal: 'first',
|
||||
|
@ -153,9 +156,9 @@ const handleSelectionHotspotChange = (val) => {
|
|||
}
|
||||
|
||||
const handleClick = (tab) => {
|
||||
if (tab=="second") {
|
||||
if (tab == "second") {
|
||||
state.nameNew = true;
|
||||
}else{
|
||||
} else {
|
||||
state.nameNew = false;
|
||||
}
|
||||
state.tabVal = tab;
|
||||
|
@ -213,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;
|
||||
|
@ -249,10 +252,29 @@ const uploadData = () => {
|
|||
state.tabVal == 'first' ? wordCloudsRef.value.openDialog(state.disasterId) : hotspotRef.value.openDialog(state.disasterId);
|
||||
};
|
||||
//获取图文信息
|
||||
const generateData =()=>{
|
||||
landsat(state.disasterId).then(da=>{
|
||||
console.log(da);
|
||||
|
||||
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")
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue