master
HZXhuang 3 years ago
parent 5ecb368ef0
commit 214f83bd0e

@ -128,14 +128,6 @@
<script>
import { formatTime } from '../../utils/util.js';
import leftchart1 from "../../components/koi/left/chart1.vue";
import leftchart2 from "../../components/koi/left/chart2data.vue";
import centerchart1 from "../../components/koi/center/chart1.vue";
import centerchart2 from "../../components/koi/center/chart2.vue";
import centerchart3 from "../../components/koi/center/chart3.vue";
import rightchart1 from "../../components/koi/right/chart1.vue";
import rightchart2 from "../../components/koi/right/chart2.vue";
import rightchart3 from "../../components/koi/right/chart3.vue";
//
import SentimentScrollChart from "./charts/SentimentScrollChart";
import PolarityCapsuleChart from "./charts/PolarityCapsuleChart";
@ -148,14 +140,6 @@ import {getMonitorWorkByUserId} from "../../api/monitor_workAPI";
export default {
name: 'BigScreen',
components: { //
leftchart1,
leftchart2,
centerchart1,
centerchart2,
centerchart3,
rightchart1,
rightchart2,
rightchart3,
SentimentScrollChart,
PolarityCapsuleChart,
WordCloud,

@ -146,7 +146,7 @@
<div>
<ul class="footer__nav">
<li class="nav__item nav__item--extra">
<h2 class="nav__title">Links|友情链接</h2>
<h1 class="nav__title">Links|友情链接</h1>
<ul class="nav__ul nav__ul--extra">
<li>
<a href="https://news.google.com/">Google News</a>
@ -179,7 +179,13 @@
<a href="http://www.goodreads.com/">GoodReads</a>
</li>
<li>
<a href="https://www.amazon.com">烂番茄</a>
<a href="https://www.rottentomatoes.com/">烂番茄</a>
</li>
<li>
<a href="https://www.imdb.com/">IMDb</a>
</li>
<li>
<a href="https://haodoo.net/">好读</a>
</li>
</ul>
</li>

@ -6,7 +6,7 @@
</h2>
</div>
<div style="margin-top: 1%;text-align: center" >
<el-select v-model="selectEmotion" placeholder="请选择情感" @change="updateChart">
<el-select size="small" v-model="selectEmotion" placeholder="请选择情感" @change="updateChart">
<el-option
v-for="item in emotionOptions"
:key="item.value"
@ -14,7 +14,7 @@
:value="item.value">
</el-option>
</el-select>
<el-date-picker
<el-date-picker size="small"
v-model="queryMapParam.searchTime"
align="right"
type="date"
@ -25,23 +25,22 @@
>
</el-date-picker>
</div>
<div id="worldMapChart" class="mapStyle" style="height: 90%;width: 100%;position: absolute"></div>
<div id="worldMapChart" class="mapStyle" style="margin: auto; height: 100%;width: 100%;position: absolute;"></div>
</div>
</template>
<script>
import worldJson from '../../../assets/map/world.json'
import {getSentimentByPage} from "../../../api/sentimentAPI";
export default {
name: "worldMap",
/*props: {
name: "WorldMap",
props: {
workName: {
type: String,
require: true
}
},*/
},
data() {
return {
workName: "",
emotionEveryCountry: {},
selectDate: "2023-07-01",
worldMapChart: {},
@ -1482,6 +1481,9 @@ export default {
}
},
visualMap: {
textStyle: {
color: '#b5bb94',
},
min: 0,
max: 100,
left: "65px",
@ -1492,15 +1494,15 @@ export default {
color: [
//
"#fff",
"#c7ddb5",
"#b3cf99",
"#a3c585",
"#95bb72",
"#87ab69", //绿
"#dcd2ee",
"#bfb6d6",
"#ac9ec5",
"#988ab2", //
"#c7b0d4",
"#a693be",
"#8b75a6",
"#6e5e8d",
"#663d74", //
"#f091a1",
"#e782a0",
"#e16c96",
"#eb3c70", //
],
//
},
@ -1513,7 +1515,7 @@ export default {
label: {
show: false,//
fontSize: "10",
color: "rgba(0,0,0,0.7)",
color: "rgba(201,174,174,0.7)",
},
nameMap:{
"Canada": "加拿大",
@ -1790,11 +1792,29 @@ export default {
this.hateData = this.duplicate(this.hateData)
this.angryData = this.duplicate(this.angryData)
this.fearData = this.duplicate(this.fearData)
//
this.happyData = this.calProportion(this.happyData)
this.amazedData = this.calProportion(this.amazedData)
this.neutralityData = this.calProportion(this.neutralityData)
this.hateData = this.calProportion(this.hateData)
this.angryData = this.calProportion(this.angryData)
this.fearData = this.calProportion(this.fearData)
// worldMap
this.updateChart();
}
})
},
//
calProportion(emotionArray){
let sum = 0
emotionArray.forEach(item => {
sum += item.value;
})
emotionArray.forEach(item => {
item.value = (item.value/sum)*100;
})
return emotionArray
},
//worldMap
fillWorldMapData(){
switch (this.selectEmotion){
@ -1870,7 +1890,6 @@ export default {
beforeMount() {
this.workName = this.$route.query.workName
console.log(this.workName)
}
}
</script>

@ -33,11 +33,11 @@ import UserRegister from "../views/user/UserRegister";
import PersonalCenter from "../views/user/PersonalCenter";
import EffectPage from "../views/user/EffectPage";
import AssessmentDetailChart from "../components/user/charts/AssessmentDetailChart";
import worldMap from "../components/user/charts/worldMap";
import background from "../views/user/background";
import HotComment from "../components/user/common/HotComment";
import normalQuestion from "../components/user/common/normalQuestion";
import NotLogin from "../views/user/NotLogin";
import ShowWorldMap from "../views/user/ShowWorldMap";
// 启用路由
Vue.use(Router);
@ -185,7 +185,7 @@ export default new Router({
{
path: "/worldMap",
name: "情感世界分布",
component: worldMap,
component: ShowWorldMap,
meta: {
requireAuth: false
}

@ -36,9 +36,9 @@
</el-table-column>
<el-table-column prop="title" label="作品介绍标题" width="140">
</el-table-column>
<el-table-column prop="content" label="作品介绍内容" width="150">
<el-table-column prop="content" label="作品介绍内容" width="200">
</el-table-column>
<el-table-column align="center" sortable prop="postTime" label="作品介绍时间" min-width="120">
<el-table-column align="center" sortable prop="postTime" label="作品介绍时间" min-width="100">
<template slot-scope="scope">
<div>{{ parseTime(scope.row.postTime, '{y}-{m}-{d}') }}</div>
</template>

@ -170,6 +170,7 @@ export default {
this.visible = false;
updateAdminInfo();
this.$store.state.admin.avatar = this.options.img
location.reload()
// console.log(this.options.img)
} else {
this.$message.error("修改失败!" + res.msg)

@ -26,7 +26,6 @@
</div>
</template>
<script type="text/ecmascript-6">
import { login } from '../api/userMG'
import { setCookie, getCookie, delCookie } from '../utils/util'
import md5 from 'js-md5'
export default {
@ -63,7 +62,7 @@ export default {
this.getcode()
//
this.getuserpwd()
},
//
methods: {
@ -163,4 +162,4 @@ export default {
.codeimg {
height: 40px;
}
</style>
</style>

@ -0,0 +1,176 @@
<!-- -->
<template>
<div id="index">
<!-- DataV-Loading加载动画 -->
<dv-loading v-if="loading">Loading...</dv-loading>
<!-- 总体布局-start -->
<div v-else class="koi-body">
<!-- 第一部分-头部-start -->
<div class="header">
<!-- 首页 -->
<span class="homePage font-bold colorDeepskyblue" :style="{'font-size': Math.round(this.screenWidth/100) + 'px', 'cursor': 'pointer'}" @click="goback"></span>
<!-- 时间 -->
<div class="localTime colorPink" :style="{'font-size': Math.round(this.screenWidth/100) + 'px'}">{{ dateYear }} {{ dateWeek }} {{ dateDay }}</div>
<!-- 装饰10 -->
<dv-decoration-10 class="dv-dec-10-left" />
<!-- 装饰8 -->
<dv-decoration-8 class="dv-dec-8-left" :color="decorationColor"/>
<!-- 标题 -->
<dv-decoration-7 class="title font-bold colorText" style="width: 220px;height: 30px;margin-left: -47px;font-size: 20px">国际情感分布图</dv-decoration-7>
<!-- <span class="title font-bold colorText" :style="{'font-size': Math.round(this.screenWidth/100) + 'px'}">传播效果大屏展示</span>-->
<!-- 装饰8 -->
<dv-decoration-8 class="dv-dec-8-right" :reverse="true" :color="decorationColor" />
<!-- 装饰10 -->
<dv-decoration-10 class="dv-dec-10-right"/>
</div>
<!-- Element-UI Layout布局 -->
<div class="layoutHome">
<el-row>
<!-- 左侧部分-->
<el-col :span="24">
<div :style="{ height: kHOne + 'px'}">
<dv-border-box-12 style="padding:12px">
<WorldMap></WorldMap>
</dv-border-box-12>
</div>
</el-col>
</el-row>
</div>
<!-- 总体布局end -->
</div>
</div>
</template>
<script>
import { formatTime } from '../../utils/util.js';
//
import WorldMap from "../../components/user/charts/WorldMap";
export default {
name: 'ShowWorldMap',
components: { //
WorldMap
},
data () {
return {
loading: true,
// 8
decorationColor: ['#568aea', '#000000'],
//
timer: null,
//
koiTime: null,
//
koiTimer: null,
dateDay: null,
dateYear: null,
dateWeek: null,
weekday: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
//
//
// body ()
screenHeight: window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight,
screenWidth: window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,
kHOne: 1000,
}
},
created () {
},
mounted(){
//
window.addEventListener('resize',this.getScreenHeight, false);
//
window.addEventListener('resize',this.getScreenWidth, false);
//
//window.addEventListener('mousemove',this.getHeight, false);
this.timeInterval();
this.cancelLoading();
this.resizeScreen();
},
beforeDestroy () {
clearInterval(this.timer)
this.timer = null;
clearInterval(this.koiTime);
this.koiTime = null;
clearInterval(this.koiTimer);
this.koiTimer = null;
//
window.removeEventListener('resize',this.getScreenHeight, false);
//
window.removeEventListener('resize',this.getScreenWidth, false);
},
watch: {
screenWidth: function (news, old) {
if (news <= 1200) {
this.$notify({
title: '浏览器高度提示',
dangerouslyUseHTMLString: true,
message: '<strong style= "color: teal">浏览器宽度<1200px将不再进行自适应</strong>',
type: 'warning',
position: 'bottom-right',
duration: 2000
});
}
},
screenHeight: function (news, old) {
if (news <= 700) {
this.$notify({
title: '浏览器宽度提示',
dangerouslyUseHTMLString: true,
message: '<strong style= "color: teal">浏览器高度<700px将不再进行自适应</strong>',
type: 'warning',
position: 'bottom-right',
duration: 2000
});
}
}
},
methods: {
timeInterval() {
this.timer = setInterval(() => {
this.dateDay = formatTime(new Date(), 'HH: mm: ss')
this.dateYear = formatTime(new Date(), 'yyyy/MM/dd')
this.dateWeek = this.weekday[new Date().getDay()]
}, 1000)
},
cancelLoading() {
setTimeout(() => {
this.loading = false
}, 500)
},
resizeScreen(){
this.koiTime = setInterval(() => {
this.getScreenHeight();
this.getScreenWidth();
}, 200)
},
//
getScreenHeight() {
this.screenHeight = window.innerHeight || document.documentElement.innerHeight || document.body.clientHeight;
//
this.kHOne = Math.round(this.screenHeight * 0.95);
//console.log(this.screenHeight +"-"+ Math.round(this.percentHThirty) +"-"+ Math.round(this.percentHForty));
},
//
getScreenWidth(){
this.screenWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
//console.log("hh-"+this.screenWidth+"-"+this.screenHeight);
},
goback() {
console.log("返回")
this.$router.push({path: "/big-screen"})
},
},
beforeMount() {
this.workName = this.$route.query.workName
console.log(this.workName)
}
}
</script>
<style lang="less" scoped>
</style>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -104,8 +104,27 @@ export default {
})
},
logout() {
this.$router.push("/home")
this.$store.commit("user_logout"); // 退
this.$confirm('退出登录, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
setTimeout(() => { // 退
this.$router.push("/home")
this.$store.commit("user_logout"); // 退
this.$message({
type: 'success',
message: '已退出登录!'
})
}, 1000)
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消'
})
})
}
}
};

Loading…
Cancel
Save