glj-代码提交

This commit is contained in:
glj 2023-04-26 16:06:05 +08:00
parent 355cd9d3aa
commit 7157576afc
6 changed files with 74 additions and 33 deletions

BIN
public/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -84,7 +84,7 @@ export const pushing = (data) => {
//wordcloud服务 //wordcloud服务
export const landsat = (disaster_id,number,id) => { export const landsat = (disaster_id,number,id) => {
return request({ return request({
url: '/api/' + crawlModule + '/rs/landsat', url: '/api/' + crawlModule + '/visual/wordcloud',
method: 'get', method: 'get',
params:{ params:{
disaster_id, disaster_id,

View File

@ -109,7 +109,7 @@ export const useThemeConfig = defineStore('themeConfig', {
// 是否开启水印 // 是否开启水印
isWartermark: false, 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', globalViceTitle: 'vueNextAdmin',
// 网站副标题(登录页顶部文字) // 网站副标题(登录页顶部文字)

View File

@ -4,9 +4,9 @@
<el-row :gutter="22"> <el-row :gutter="22">
<el-col :span="10"> <el-col :span="10">
<div class="system-role-padding layout-padding-auto layout-padding-view"> <div class="system-role-padding layout-padding-auto layout-padding-view">
<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"> 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> <el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip>
<!-- 在disasterType中获取dictKey 对应的dictValue --> <!-- 在disasterType中获取dictKey 对应的dictValue -->
<template #default="scope"> <template #default="scope">
@ -65,7 +65,7 @@
</el-button> </el-button>
</div> </div>
<el-table :data=" state.tableData.data " v-loading=" state.tableData.loading " <el-table :data=" state.tableData.data " v-loading=" state.tableData.loading "
@selection-change=" handleSelectionChange " style="width: 100%"> @selection-change=" handleSelectionChange " style="width: 100%; height: 600px;">
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column type="index" label="ID" width="50" /> <el-table-column type="index" label="ID" width="50" />
<el-table-column v-if=" state.searchName == '1' " prop="title" label="Title" <el-table-column v-if=" state.searchName == '1' " prop="title" label="Title"
@ -251,7 +251,7 @@ const formatSizeUnits = (size) => {
} }
// //
const tableClick = (row, column, event) => { const tableClick = (row, column, event) => {
state.disasterId = row.id; state.disasterId = row.disasterId;
getTableData(); getTableData();
} }
// //

View File

@ -18,9 +18,9 @@
</el-icon> </el-icon>
search search
</el-button>--> </el-button>-->
<el-button v-if="!state.nameNew" size="default" type="success" class="ml10" @click="generateData"> <el-button v-if="!state.nameNew" size="default" type="success" class="ml10" @click="generateData">
Generate Generate
</el-button> </el-button>
<el-button v-if="state.nameNew" size="default" type="success" class="ml10" @click="uploadData"> <el-button v-if="state.nameNew" size="default" type="success" class="ml10" @click="uploadData">
<el-icon> <el-icon>
<ele-Upload /> <ele-Upload />
@ -35,7 +35,7 @@
</el-button> </el-button>
</div> </div>
<el-tabs v-model="activeName" class="demo-tabs" @tab-change="handleClick" type="card"> <el-tabs v-model="activeName" class="demo-tabs" @tab-change="handleClick" type="card">
<el-tab-pane label="Word cloud" name="first" > <el-tab-pane label="Word cloud" name="first">
<el-table :data="state.tableData.data" v-loading="state.tableData.loading" <el-table :data="state.tableData.data" v-loading="state.tableData.loading"
@selection-change="handleSelectionChange" style="width: 100%"> @selection-change="handleSelectionChange" style="width: 100%">
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
@ -56,7 +56,7 @@
:total="state.tableData.total"> :total="state.tableData.total">
</el-pagination> </el-pagination>
</el-tab-pane> </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" <el-table :data="state.tableData.data" v-loading="state.tableData.loading"
@selection-change="handleSelectionHotspotChange" style="width: 100%"> @selection-change="handleSelectionHotspotChange" style="width: 100%">
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
@ -109,7 +109,10 @@ import { defineAsyncComponent, reactive, onMounted, ref } from 'vue';
import { ElMessageBox, ElMessage } from 'element-plus'; import { ElMessageBox, ElMessage } from 'element-plus';
import disasterTable from "/@/components/table/DisasterTable.vue"; import disasterTable from "/@/components/table/DisasterTable.vue";
import { ta } from 'element-plus/es/locale'; 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 RoleDialog = defineAsyncComponent(() => import('/@/views/system/role/dialog.vue'));
const auditRef = ref(); const auditRef = ref();
@ -117,7 +120,7 @@ const uploadRef = ref();
// //
const roleDialogRef = ref(); const roleDialogRef = ref();
const state = reactive({ const state = reactive({
nameNew:false, nameNew: false,
multipleWord: [], multipleWord: [],
multipleHotspot: [], multipleHotspot: [],
tabVal: 'first', tabVal: 'first',
@ -153,9 +156,9 @@ const handleSelectionHotspotChange = (val) => {
} }
const handleClick = (tab) => { const handleClick = (tab) => {
if (tab=="second") { if (tab == "second") {
state.nameNew = true; state.nameNew = true;
}else{ } else {
state.nameNew = false; state.nameNew = false;
} }
state.tabVal = tab; state.tabVal = tab;
@ -213,8 +216,8 @@ const getDisasterData = () => {
state.disasterData.loading = true; state.disasterData.loading = true;
getDisasterPage(state.disasterData.param.pageNum, state.disasterData.param.pageSize, {}).then(res => { getDisasterPage(state.disasterData.param.pageNum, state.disasterData.param.pageSize, {}).then(res => {
state.disasterData.data = res.records; state.disasterData.data = res.records;
state.disasterData.data.forEach(item=>{ state.disasterData.data.forEach(item => {
let date = item.disasterTime.slice(0,10); let date = item.disasterTime.slice(0, 10);
item.disasterTime = date; item.disasterTime = date;
}) })
state.disasterData.total = res.total; state.disasterData.total = res.total;
@ -249,10 +252,29 @@ const uploadData = () => {
state.tabVal == 'first' ? wordCloudsRef.value.openDialog(state.disasterId) : hotspotRef.value.openDialog(state.disasterId); state.tabVal == 'first' ? wordCloudsRef.value.openDialog(state.disasterId) : hotspotRef.value.openDialog(state.disasterId);
}; };
// //
const generateData =()=>{ const generateData = () => {
landsat(state.disasterId).then(da=>{ if (!state.disasterId) {
console.log(da); 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")
})
}
}) })
} }

View File

@ -2,11 +2,7 @@
<div class="login-container flex"> <div class="login-container flex">
<div class="login-left"> <div class="login-left">
<div class="login-left-logo"> <div class="login-left-logo">
<img :src="logoMini" /> <img src="/logo.png">
<div class="login-left-logo-text">
<span>{{ getThemeConfig.globalViceTitle }}</span>
<span class="login-left-logo-text-msg">{{ getThemeConfig.globalViceTitleMsg }}</span>
</div>
</div> </div>
<div class="login-left-img"> <div class="login-left-img">
<img :src="loginMain" /> <img :src="loginMain" />
@ -18,7 +14,7 @@
<span class="login-right-warp-one"></span> <span class="login-right-warp-one"></span>
<span class="login-right-warp-two"></span> <span class="login-right-warp-two"></span>
<div class="login-right-warp-mian"> <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 class="login-right-warp-main-form">
<div v-if="!state.isScan"> <div v-if="!state.isScan">
<el-tabs v-model="state.tabsActiveName"> <el-tabs v-model="state.tabsActiveName">
@ -78,11 +74,13 @@ onMounted(() => {
.login-container { .login-container {
height: 100%; height: 100%;
background: var(--el-color-white); background: var(--el-color-white);
.login-left { .login-left {
flex: 1; flex: 1;
position: relative; position: relative;
background-color: rgba(211, 239, 255, 1); background-color: rgba(211, 239, 255, 1);
margin-right: 100px; margin-right: 100px;
.login-left-logo { .login-left-logo {
display: flex; display: flex;
align-items: center; align-items: center;
@ -91,24 +89,29 @@ onMounted(() => {
left: 80px; left: 80px;
z-index: 1; z-index: 1;
animation: logoAnimation 0.3s ease; animation: logoAnimation 0.3s ease;
img { img {
width: 52px; width: 60%;
height: 52px; height: 70%;
} }
.login-left-logo-text { .login-left-logo-text {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
span { span {
margin-left: 10px; margin-left: 10px;
font-size: 28px; font-size: 28px;
color: #26a59a; color: #26a59a;
} }
.login-left-logo-text-msg { .login-left-logo-text-msg {
font-size: 12px; font-size: 12px;
color: #32a99e; color: #32a99e;
} }
} }
} }
.login-left-img { .login-left-img {
position: absolute; position: absolute;
top: 50%; top: 50%;
@ -116,20 +119,24 @@ onMounted(() => {
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
width: 100%; width: 100%;
height: 52%; height: 52%;
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
animation: error-num 0.6s ease; animation: error-num 0.6s ease;
} }
} }
.login-left-waves { .login-left-waves {
position: absolute; position: absolute;
top: 0; top: 0;
right: -100px; right: -100px;
} }
} }
.login-right { .login-right {
width: 700px; width: 700px;
.login-right-warp { .login-right-warp {
border: 1px solid var(--el-color-primary-light-3); border: 1px solid var(--el-color-primary-light-3);
border-radius: 3px; border-radius: 3px;
@ -138,12 +145,14 @@ onMounted(() => {
position: relative; position: relative;
overflow: hidden; overflow: hidden;
background-color: var(--el-color-white); background-color: var(--el-color-white);
.login-right-warp-one, .login-right-warp-one,
.login-right-warp-two { .login-right-warp-two {
position: absolute; position: absolute;
display: block; display: block;
width: inherit; width: inherit;
height: inherit; height: inherit;
&::before, &::before,
&::after { &::after {
content: ''; content: '';
@ -151,6 +160,7 @@ onMounted(() => {
z-index: 1; z-index: 1;
} }
} }
.login-right-warp-one { .login-right-warp-one {
&::before { &::before {
filter: hue-rotate(0deg); filter: hue-rotate(0deg);
@ -161,6 +171,7 @@ onMounted(() => {
background: linear-gradient(90deg, transparent, var(--el-color-primary)); background: linear-gradient(90deg, transparent, var(--el-color-primary));
animation: loginLeft 3s linear infinite; animation: loginLeft 3s linear infinite;
} }
&::after { &::after {
filter: hue-rotate(60deg); filter: hue-rotate(60deg);
top: -100%; top: -100%;
@ -172,6 +183,7 @@ onMounted(() => {
animation-delay: 0.7s; animation-delay: 0.7s;
} }
} }
.login-right-warp-two { .login-right-warp-two {
&::before { &::before {
filter: hue-rotate(120deg); filter: hue-rotate(120deg);
@ -183,6 +195,7 @@ onMounted(() => {
animation: loginRight 3s linear infinite; animation: loginRight 3s linear infinite;
animation-delay: 1.4s; animation-delay: 1.4s;
} }
&::after { &::after {
filter: hue-rotate(300deg); filter: hue-rotate(300deg);
bottom: -100%; bottom: -100%;
@ -194,10 +207,12 @@ onMounted(() => {
animation-delay: 2.1s; animation-delay: 2.1s;
} }
} }
.login-right-warp-mian { .login-right-warp-mian {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100%; height: 100%;
.login-right-warp-main-title { .login-right-warp-main-title {
height: 130px; height: 130px;
line-height: 130px; line-height: 130px;
@ -208,9 +223,11 @@ onMounted(() => {
animation-delay: 0.3s; animation-delay: 0.3s;
color: var(--el-text-color-primary); color: var(--el-text-color-primary);
} }
.login-right-warp-main-form { .login-right-warp-main-form {
flex: 1; flex: 1;
padding: 0 50px 50px; padding: 0 50px 50px;
.login-content-main-sacn { .login-content-main-sacn {
position: absolute; position: absolute;
top: 0; top: 0;
@ -221,6 +238,7 @@ onMounted(() => {
cursor: pointer; cursor: pointer;
transition: all ease 0.3s; transition: all ease 0.3s;
color: var(--el-color-primary); color: var(--el-color-primary);
&-delta { &-delta {
position: absolute; position: absolute;
width: 35px; width: 35px;
@ -231,11 +249,13 @@ onMounted(() => {
background: var(--el-color-white); background: var(--el-color-white);
transform: rotate(-45deg); transform: rotate(-45deg);
} }
&:hover { &:hover {
opacity: 1; opacity: 1;
transition: all ease 0.3s; transition: all ease 0.3s;
color: var(--el-color-primary) !important; color: var(--el-color-primary) !important;
} }
i { i {
width: 47px; width: 47px;
height: 50px; height: 50px;
@ -250,5 +270,4 @@ onMounted(() => {
} }
} }
} }
} }</style>
</style>