Commit fbf73fb8 authored by Your Name's avatar Your Name

上传视频改为30M

parent 60fb94c8
<template> <template>
<div class="map-box"> <div class="map-box">
<span id="back" v-if="parentInfo.length !== 1" @click="handleBack()" <span id="back" v-if="parentInfo.length !== 1" @click="handleBack()"
>返回</span >返回</span
> >
<div id="mapDiv"></div> <div id="mapDiv"></div>
</div> </div>
</template> </template>
<script> <script>
// import "echarts/map/js/china"; // import "echarts/map/js/china";
import axios from "axios"; import axios from "axios";
import echarts from "echarts"; import echarts from "echarts";
export default { export default {
name: "maps", name: "maps",
data() { data() {
return { return {
dataList: [], dataList: [],
show: "province", show: "province",
parentInfo: [ parentInfo: [
{ {
cityName: "全国", cityName: "全国",
code: 100000, code: 100000,
}, },
], ],
}; };
}, },
mounted() { mounted() {
// this.getList(); // this.getList();
this.initData(100000); this.initData(100000);
}, },
methods: { methods: {
getList(type, areaCode) { getList(type, areaCode) {
let _this = this; let _this = this;
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let httpUrl = ""; let httpUrl = "";
let dataList = []; let dataList = [];
if (type === "china") { if (type === "china") {
httpUrl = "tBoardStatistic/getBoardProvincePlayTotalList"; httpUrl = "tBoardStatistic/getBoardProvincePlayTotalList";
} }
if (type === "map") { if (type === "map") {
httpUrl = `tBoardStatistic/getBoardCityPlayTotalList?areaCode=${areaCode}`; httpUrl = `tBoardStatistic/getBoardCityPlayTotalList?areaCode=${areaCode}`;
} }
_this _this
.$shttp({ .$shttp({
method: "post", method: "post",
url: httpUrl, url: httpUrl,
authType: _this.backToken, authType: _this.backToken,
}) })
.then((res) => { .then((res) => {
if (res.status == 200) { if (res.status == 200) {
if (res.data.resultCode == 200) { if (res.data.resultCode == 200) {
dataList = res.data.data; dataList = res.data.data;
} else { } else {
dataList = []; dataList = [];
} }
} else { } else {
dataList = []; dataList = [];
} }
resolve(dataList); resolve(dataList);
}) })
.catch((err) => { .catch((err) => {
this.$message.error(err.message); this.$message.error(err.message);
resolve([]); resolve([]);
}); });
}); });
}, },
initData(adcode) { initData(adcode) {
Promise.all([ Promise.all([
this.getGeoJson(adcode), this.getGeoJson(adcode),
this.getList(this.parentInfo.length === 1 ? "china" : "map", adcode), this.getList(this.parentInfo.length === 1 ? "china" : "map", adcode),
]).then((res) => { ]).then((res) => {
let features = res[0].features; let features = res[0].features;
let json = res[1]; let json = res[1];
let flen = features.length; let flen = features.length;
let jlen = json.length; let jlen = json.length;
for (let i = 0; i < flen; i++) { for (let i = 0; i < flen; i++) {
for (let j = 0; j < jlen; j++) { for (let j = 0; j < jlen; j++) {
let jName = json[j].name.substring(0, 2); let jName = json[j].name.substring(0, 2);
if (features[i].properties.name.indexOf(jName) != -1) { if (features[i].properties.name.indexOf(jName) != -1) {
features[i].properties.value = json[j].value; features[i].properties.value = json[j].value;
break; break;
} }
} }
} }
this.getMapData({ features: features }); this.getMapData({ features: features });
}); });
}, },
init(mapData) { init(mapData) {
let _this = this; let _this = this;
let option = { let option = {
tooltip: { tooltip: {
// triggerOn: "click", // triggerOn: "click",
formatter: function (e, t, n) { formatter: function (e, t, n) {
return 0.5 == e.value return 0.5 == e.value
? e.name + ":播放量" ? e.name + ":播放量"
: e.seriesName + "<br />" + e.name + ":" + e.value; : e.seriesName + "<br />" + e.name + ":" + e.value;
}, },
}, },
visualMap: [ visualMap: [
{ {
dimension: 0, dimension: 0,
left: "8%", left: "8%",
bottom: 20, bottom: 20,
itemWidth: 16, itemWidth: 16,
orient: "horizontal", orient: "horizontal",
text: ["播放量", "由低到高"], text: ["播放量", "由低到高"],
backgroundColor: "rgba(0,19,45,0.4)", backgroundColor: "rgba(0,19,45,0.4)",
padding: 16, padding: 16,
textStyle: { textStyle: {
color: "gba(255,255,255,1)", color: "gba(255,255,255,1)",
}, },
inRange: { inRange: {
color: [ color: [
"rgba(161,255,255,1)", "rgba(161,255,255,1)",
"rgba(91,214,255,1)", "rgba(91,214,255,1)",
"rgba(38,157,255,1)", "rgba(38,157,255,1)",
"rgba(0,72,149,1)", "rgba(0,72,149,1)",
], ],
}, },
}, },
], ],
geo: { geo: {
map: _this.parentInfo.length === 1 ? "china" : "map", map: _this.parentInfo.length === 1 ? "china" : "map",
roam: true, //是否开启平游或缩放 roam: true, //是否开启平游或缩放
// scaleLimit: { // scaleLimit: {
// //滚轮缩放的极限控制 // //滚轮缩放的极限控制
// min: 1, // min: 1,
// // max: 2, // // max: 2,
// }, // },
zoom: 1.1, zoom: 1.1,
top: 51, top: 51,
label: { label: {
normal: { normal: {
show: !0, show: !0,
fontSize: "12", fontSize: "12",
color: "#968f8f", color: "#968f8f",
formatter: (p) => { formatter: (p) => {
switch (p.name) { switch (p.name) {
case "内蒙古自治区": case "内蒙古自治区":
p.name = "内蒙古"; p.name = "内蒙古";
break; break;
case "西藏自治区": case "西藏自治区":
p.name = "西藏"; p.name = "西藏";
break; break;
case "新疆维吾尔自治区": case "新疆维吾尔自治区":
p.name = "新疆"; p.name = "新疆";
break; break;
case "宁夏回族自治区": case "宁夏回族自治区":
p.name = "宁夏"; p.name = "宁夏";
break; break;
case "广西壮族自治区": case "广西壮族自治区":
p.name = "广西"; p.name = "广西";
break; break;
case "香港特别行政区": case "香港特别行政区":
p.name = "香港"; p.name = "香港";
break; break;
case "澳门特别行政区": case "澳门特别行政区":
p.name = "澳门"; p.name = "澳门";
break; break;
} }
return p.name; return p.name;
}, },
}, },
emphasis: { emphasis: {
// color: "#ffffff", // color: "#ffffff",
show: true, show: true,
}, },
}, },
itemStyle: { itemStyle: {
normal: { normal: {
borderColor: "rgba(0, 0, 0, 0.2)", borderColor: "rgba(0, 0, 0, 0.2)",
}, },
emphasis: { emphasis: {
// areaColor: "#f2d5ad", // areaColor: "#f2d5ad",
areaColor: "#8dd7fc", areaColor: "#8dd7fc",
shadowOffsetX: 0, shadowOffsetX: 0,
shadowOffsetY: 0, shadowOffsetY: 0,
borderWidth: 0, borderWidth: 0,
}, },
}, },
regions: [ regions: [
{ {
name: "南海诸岛", name: "南海诸岛",
itemStyle: { itemStyle: {
// 隐藏地图 // 隐藏地图
normal: { normal: {
opacity: 0, // 为 0 时不绘制该图形 opacity: 0, // 为 0 时不绘制该图形
}, },
}, },
label: { label: {
show: false, // 隐藏文字 show: false, // 隐藏文字
}, },
}, },
], ],
}, },
series: [ series: [
{ {
name: "播放量", name: "播放量",
type: "map", type: "map",
geoIndex: 0, geoIndex: 0,
data: mapData, data: mapData,
}, },
], ],
}; };
let echartsDiv = this.$echarts.init(document.getElementById("mapDiv")); let echartsDiv = this.$echarts.init(document.getElementById("mapDiv"));
echartsDiv.setOption(option, true); echartsDiv.setOption(option, true);
echartsDiv.on("click", _this.echartsMapClick); echartsDiv.on("click", _this.echartsMapClick);
}, },
handleBack() { handleBack() {
if (this.parentInfo.length === 1) { if (this.parentInfo.length === 1) {
return; return;
} }
this.parentInfo.pop(); this.parentInfo.pop();
let areaCode = this.parentInfo[this.parentInfo.length - 1].code; let areaCode = this.parentInfo[this.parentInfo.length - 1].code;
this.emitParent(areaCode); this.emitParent(areaCode);
this.initData(this.parentInfo[this.parentInfo.length - 1].code); this.initData(this.parentInfo[this.parentInfo.length - 1].code);
}, },
emitParent(areaCode) { emitParent(areaCode) {
this.$emit("changeAreaCode", areaCode); this.$emit("changeAreaCode", areaCode);
}, },
echartsMapClick(params) { echartsMapClick(params) {
if (!params.data) { if (!params.data) {
return; return;
} }
if (params.data.level === "district") { if (params.data.level === "district") {
return false; return false;
} }
let cityCode = params.data.cityCode; let cityCode = params.data.cityCode;
this.emitParent(cityCode); this.emitParent(cityCode);
this.parentInfo.push({ this.parentInfo.push({
cityName: params.data.name, cityName: params.data.name,
code: params.data.cityCode, code: params.data.cityCode,
}); });
console.log(params.data.cityCode); console.log(params.data.cityCode);
this.initData(cityCode); this.initData(cityCode);
}, },
//这里我封装了下,直接可以拿过来用 //这里我封装了下,直接可以拿过来用
// getGeoJson(adcode, childAdcode = "") { // getGeoJson(adcode, childAdcode = "") {
// return new Promise((resolve, reject) => { // return new Promise((resolve, reject) => {
// function insideFun(adcode, childAdcode) { // function insideFun(adcode, childAdcode) {
// AMapUI.loadUI(["geo/DistrictExplorer"], (DistrictExplorer) => { // AMapUI.loadUI(["geo/DistrictExplorer"], (DistrictExplorer) => {
// var districtExplorer = new DistrictExplorer(); // var districtExplorer = new DistrictExplorer();
// districtExplorer.loadAreaNode(adcode, function (error, areaNode) { // districtExplorer.loadAreaNode(adcode, function (error, areaNode) {
// if (error) { // if (error) {
// console.error(error); // console.error(error);
// reject(error); // reject(error);
// return; // return;
// } // }
// let Json = areaNode.getSubFeatures(); // let Json = areaNode.getSubFeatures();
// if (Json.length === 0) { // if (Json.length === 0) {
// let parent = areaNode._data.geoData.parent.properties.acroutes; // let parent = areaNode._data.geoData.parent.properties.acroutes;
// insideFun(parent[parent.length - 1], adcode); // insideFun(parent[parent.length - 1], adcode);
// return; // return;
// } // }
// if (childAdcode) { // if (childAdcode) {
// Json = Json.filter((item) => { // Json = Json.filter((item) => {
// return item.properties.adcode == childAdcode; // return item.properties.adcode == childAdcode;
// }); // });
// } // }
// let mapJson = { // let mapJson = {
// features: Json, // features: Json,
// }; // };
// resolve(mapJson); // resolve(mapJson);
// }); // });
// }); // });
// } // }
// insideFun(adcode, childAdcode); // insideFun(adcode, childAdcode);
// }); // });
// }, // },
getGeoJson(adcode) { getGeoJson(adcode) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
axios({ axios({
method: "get", method: "get",
url: `feature/${adcode}_full.json`, url: `feature/${adcode}_full.json`,
}).then((res) => { }).then((res) => {
let mapJson = { let mapJson = {
features: res.data.features, features: res.data.features,
}; };
resolve(mapJson); resolve(mapJson);
}); });
}); });
}, },
getMapData(geoJson) { getMapData(geoJson) {
// 获取后台接口数据 // 获取后台接口数据
let Json = geoJson.features; let Json = geoJson.features;
let mapData = Json.map((item) => { let mapData = Json.map((item) => {
return { return {
name: item.properties.name, name: item.properties.name,
value: item.properties.value, value: item.properties.value,
level: item.properties.level, level: item.properties.level,
cityCode: item.properties.adcode, cityCode: item.properties.adcode,
}; };
}); });
let mapJson = {}; let mapJson = {};
//geoJson必须这种格式 //geoJson必须这种格式
mapJson.features = Json; mapJson.features = Json;
//去渲染echarts //去渲染echarts
this.initEcharts(mapData, mapJson); this.initEcharts(mapData, mapJson);
}, },
initEcharts(mapData, mapJson) { initEcharts(mapData, mapJson) {
echarts.registerMap( echarts.registerMap(
this.parentInfo.length === 1 ? "china" : "map", this.parentInfo.length === 1 ? "china" : "map",
mapJson mapJson
); );
this.init(mapData); this.init(mapData);
}, },
}, },
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.map-box { .map-box {
width: 100%; width: 100%;
height: 100%; height: 100%;
#back { #back {
position: absolute; position: absolute;
font-size: 14px; font-size: 14px;
color: rgba(255, 255, 255, 0.8); color: rgba(255, 255, 255, 0.8);
left: 60px; left: 60px;
cursor: pointer; cursor: pointer;
z-index: 99; z-index: 99;
&:hover { &:hover {
color: #4efffd; color: #4efffd;
} }
} }
#mapDiv { #mapDiv {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
</style> </style>
<template> <template>
<div class="list-of-top10"> <div class="list-of-top10">
<triangle> <triangle>
<slot> <slot>
<div class="list-of-top10-title common-title"> <div class="list-of-top10-title common-title">
<img <img
class="icon-title" class="icon-title"
src="@/assets/images/screen/boardsDemand.png" src="@/assets/images/screen/boardsDemand.png"
alt="" alt=""
/> />
<span class="title">{{ title }}</span> <span class="title">{{ title }}</span>
<img class="bg" src="@/assets/images/screen/title01_bg.png" alt="" /> <img class="bg" src="@/assets/images/screen/title01_bg.png" alt="" />
</div> </div>
<div class="list-of-body"> <div class="list-of-body">
<ul class="body-title"> <ul class="body-title">
<li class="f1">排名</li> <li class="f1">排名</li>
<li class="f7">展板名称</li> <li class="f7">展板名称</li>
<li class="f2">播放量</li> <li class="f2">播放量</li>
</ul> </ul>
<div class="body-content" id="bodyContent"> <div class="body-content" id="bodyContent">
<div id="con1"> <div id="con1">
<ul class="body-item" v-for="(item, index) in list" :key="index"> <ul class="body-item" v-for="(item, index) in list" :key="index">
<li class="f1">{{ (index % 10) + 1 }}</li> <li class="f1">{{ (index % 10) + 1 }}</li>
<li class="f7"> <li class="f7">
<div class="title" :title="item.boardName"> <div class="title" :title="item.boardName">
{{ item.boardName }} {{ item.boardName }}
</div> </div>
</li> </li>
<li class="f2">{{ item.playNumber }}</li> <li class="f2">{{ item.playNumber }}</li>
</ul> </ul>
</div> </div>
<div id="con2"></div> <div id="con2"></div>
<div id="con3"></div> <div id="con3"></div>
<div id="con4"></div> <div id="con4"></div>
<div id="con5"></div> <div id="con5"></div>
<div id="con6"></div> <div id="con6"></div>
</div> </div>
</div> </div>
</slot> </slot>
</triangle> </triangle>
</div> </div>
</template> </template>
<script> <script>
import triangle from "../components/slot/triangle"; import triangle from "../components/slot/triangle";
import { getCurDate } from "./util.time.js"; import { getCurDate } from "./util.time.js";
export default { export default {
name: "top10", name: "top10",
data() { data() {
return { return {
title: "全国2021年3月展板点播TOP10", title: "全国2021年3月展板点播TOP10",
timer: null, timer: null,
speed: 50, speed: 50,
box: null, box: null,
con1: null, con1: null,
list: [], list: [],
}; };
}, },
components: { triangle }, components: { triangle },
props: { props: {
data: { data: {
type: Array, type: Array,
default: () => { default: () => {
return []; return [];
}, },
}, },
}, },
mounted() { mounted() {
this.title = this.getTitle(); this.title = this.getTitle();
}, },
methods: { methods: {
clearDom(){ clearDom(){
[2,3,4,5,6].forEach(v=>{ [2,3,4,5,6].forEach(v=>{
document.getElementById(`con${v}`).innerHTML = "" document.getElementById(`con${v}`).innerHTML = ""
}) })
}, },
getTitle() { getTitle() {
let curTime = getCurDate(); let curTime = getCurDate();
return `${curTime.year}${curTime.month}月展板点播TOP10`; return `${curTime.year}${curTime.month}月展板点播TOP10`;
}, },
initScroll() { initScroll() {
let _this = this; let _this = this;
this.box = document.getElementById("bodyContent"); this.box = document.getElementById("bodyContent");
this.con1 = document.getElementById("con1"); this.con1 = document.getElementById("con1");
for (let i = 2; i < 7; i++) { for (let i = 2; i < 7; i++) {
let con = document.getElementById(`con${i}`); let con = document.getElementById(`con${i}`);
con.innerHTML = _this.con1.innerHTML; con.innerHTML = _this.con1.innerHTML;
} }
this.timer = setInterval(_this.scrollUp, _this.speed); this.timer = setInterval(_this.scrollUp, _this.speed);
}, },
scrollUp() { scrollUp() {
if (this.box.scrollTop >= this.con1.scrollHeight) { if (this.box.scrollTop >= this.con1.scrollHeight) {
this.box.scrollTop = 0; this.box.scrollTop = 0;
} else { } else {
this.box.scrollTop++; this.box.scrollTop++;
} }
}, },
Ups() { Ups() {
let _this = this; let _this = this;
this.timer = setInterval(_this.scrollUp, _this.speed); this.timer = setInterval(_this.scrollUp, _this.speed);
}, },
Stops() { Stops() {
clearInterval(this.timer); clearInterval(this.timer);
}, },
}, },
watch: { watch: {
data() { data() {
this.clearDom() this.clearDom()
this.list = this.data; this.list = this.data;
if (this.list.length > 4) { if (this.list.length > 4) {
this.$nextTick(() => { this.$nextTick(() => {
this.initScroll(); this.initScroll();
}); });
} }
}, },
}, },
}; };
</script> </script>
<style lang=scss> <style lang=scss>
</style> </style>
<template> <template>
<div class="screen-container"> <div class="screen-container">
<div class="page-title"> <div class="page-title">
<p>- 播放数据统计 -</p> <p>- 播放数据统计 -</p>
</div> </div>
<div class="user-info"> <div class="user-info">
<!-- <img src="@/assets/images/screen/user.png" alt="" class="icon-user" /> <!-- <img src="@/assets/images/screen/user.png" alt="" class="icon-user" />
<span class="user-name">中国国家博物馆</span> <span class="user-name">中国国家博物馆</span>
<img src="@/assets/images/screen/close.png" alt="" class="signup" /> <img src="@/assets/images/screen/close.png" alt="" class="signup" />
<img <img
src="@/assets/images/screen/manager.png" src="@/assets/images/screen/manager.png"
@click="goManager" @click="goManager"
alt="" alt=""
class="manager" class="manager"
/> --> /> -->
</div> </div>
<div class="middel-part"> <div class="middel-part">
<!--地区展板播放统计--> <!--地区展板播放统计-->
<areas class="table-list" :data="areaList"></areas> <areas class="table-list" :data="areaList"></areas>
<!--中间地图--> <!--中间地图-->
<div class="map-container"> <div class="map-container">
<borderNums :areaCode="areaCode"></borderNums> <borderNums :areaCode="areaCode"></borderNums>
<mapDiv @changeAreaCode="changeAreaCode"></mapDiv> <mapDiv @changeAreaCode="changeAreaCode"></mapDiv>
</div> </div>
<!--全国点播板块--> <!--全国点播板块-->
<top10 class="table-list" :data="top10List"></top10> <top10 class="table-list" :data="top10List"></top10>
</div> </div>
<div class="echartspanel"> <div class="echartspanel">
<demand <demand
ref="interactEcharts" ref="interactEcharts"
class="echarts-box left" class="echarts-box left"
:data="interactEcharts" :data="interactEcharts"
@itemClick="itemClick" @itemClick="itemClick"
> >
</demand> </demand>
<interaction <interaction
ref="trendEcharts" ref="trendEcharts"
class="echarts-box right" class="echarts-box right"
:data="trendEcharts" :data="trendEcharts"
@itemClick="itemClick" @itemClick="itemClick"
></interaction> ></interaction>
</div> </div>
<!-- 弹框 --> <!-- 弹框 -->
<m-dialog <m-dialog
ref="mdialog" ref="mdialog"
:is-show.sync="showDialog" :is-show.sync="showDialog"
:dialog-data="dialogData" :dialog-data="dialogData"
/> />
</div> </div>
</template> </template>
<script> <script>
import { import {
demand, demand,
interaction, interaction,
areas, areas,
top10, top10,
mapDiv, mapDiv,
borderNums, borderNums,
MDialog, MDialog,
} from "../components"; } from "../components";
import { getCurDate } from "../components/util.time.js"; import { getCurDate } from "../components/util.time.js";
export default { export default {
data() { data() {
return { return {
showDialog: false, showDialog: false,
dialogData: {}, // 1 是互动频次弹框 2 是趋势图弹框 dialogData: {}, // 1 是互动频次弹框 2 是趋势图弹框
trendList: [], trendList: [],
trendEcharts: {}, trendEcharts: {},
interactList: [], interactList: [],
interactEcharts: {}, interactEcharts: {},
areaList: [], areaList: [],
top10List: [], top10List: [],
areaCode:10000 areaCode:10000
}; };
}, },
components: { components: {
demand, demand,
interaction, interaction,
areas, areas,
top10, top10,
mapDiv, mapDiv,
borderNums, borderNums,
MDialog, MDialog,
}, },
mounted() { mounted() {
let clientWidth = document.body.clientWidth; let clientWidth = document.body.clientWidth;
clientWidth = clientWidth > 1920 ? 1920 : clientWidth; clientWidth = clientWidth > 1920 ? 1920 : clientWidth;
let fontSize = (clientWidth / 1920) * 100; let fontSize = (clientWidth / 1920) * 100;
document.getElementsByTagName("html")[0].style.fontSize = fontSize + "px"; document.getElementsByTagName("html")[0].style.fontSize = fontSize + "px";
this.getDataOfEcharts(100000); this.getDataOfEcharts(100000);
this.getDataOfList(100000); this.getDataOfList(100000);
}, },
methods: { methods: {
changeAreaCode(areaCode) { changeAreaCode(areaCode) {
this.areaCode = areaCode this.areaCode = areaCode
this.getDataOfList(areaCode); this.getDataOfList(areaCode);
this.getDataOfEcharts(areaCode) this.getDataOfEcharts(areaCode)
}, },
// 接收柱状图传来的数据 // 接收柱状图传来的数据
itemClick(params) { itemClick(params) {
// let type = ""; // let type = "";
// 互动 // 互动
if (params.type == "1") { if (params.type == "1") {
// type = "interact"; // type = "interact";
this.dialogData = { this.dialogData = {
data: this.interactEcharts, data: this.interactEcharts,
list: this.interactList, list: this.interactList,
}; };
} else if (params.type == "2") { } else if (params.type == "2") {
// type = "trend"; // type = "trend";
// 趋势 // 趋势
this.dialogData = { this.dialogData = {
data: this.trendEcharts, data: this.trendEcharts,
list: this.trendList, list: this.trendList,
}; };
} }
this.dialogData = Object.assign(this.dialogData, params); this.dialogData = Object.assign(this.dialogData, params);
this.showDialog = true; this.showDialog = true;
}, },
goManager() { goManager() {
location.href = "http://121.4.56.121:84"; location.href = "http://121.4.56.121:84";
}, },
getDataOfList(areaCode) { getDataOfList(areaCode) {
let requestparams = {}; let requestparams = {};
requestparams._index = 1; requestparams._index = 1;
requestparams._size = 10; requestparams._size = 10;
requestparams.areaCode = Number(areaCode); requestparams.areaCode = Number(areaCode);
this.getTableList("area", requestparams); this.getTableList("area", requestparams);
this.getTableList("top10", requestparams); this.getTableList("top10", requestparams);
}, },
getDataOfEcharts(areaCode) { getDataOfEcharts(areaCode) {
let curTime = getCurDate(); let curTime = getCurDate();
let frequencyDate = curTime.year + curTime.month; let frequencyDate = curTime.year + curTime.month;
this.getPageList("interact", frequencyDate,areaCode); // 互动 this.getPageList("interact", frequencyDate,areaCode); // 互动
this.getPageList("trend", frequencyDate,areaCode); //趋势 this.getPageList("trend", frequencyDate,areaCode); //趋势
}, },
getTableList(type, requestparams) { getTableList(type, requestparams) {
let httpUrl = ""; let httpUrl = "";
let _this = this; let _this = this;
if (type === "top10") { if (type === "top10") {
httpUrl = `tBoardStatistic/getBoardRankPageList`; httpUrl = `tBoardStatistic/getBoardRankPageList`;
} }
if (type === "area") { if (type === "area") {
httpUrl = `tBoardStatistic/getBoardDistrictPageList`; httpUrl = `tBoardStatistic/getBoardDistrictPageList`;
} }
_this _this
.$shttp ({ .$shttp ({
method: "post", method: "post",
url: httpUrl, url: httpUrl,
authType: _this.backToken, authType: _this.backToken,
}, },
requestparams requestparams
) )
.then((res) => { .then((res) => {
if (res.status == 200) { if (res.status == 200) {
if (res.data.resultCode == 200) { if (res.data.resultCode == 200) {
_this[`${type}List`] = res.data.data.records; _this[`${type}List`] = res.data.data.records;
} else { } else {
_this[`${type}List`] = []; _this[`${type}List`] = [];
} }
} else { } else {
_this[`${type}List`] = []; _this[`${type}List`] = [];
} }
}) })
.catch((err) => { .catch((err) => {
_this[`${type}List`] = []; _this[`${type}List`] = [];
_this.$message.error(err.message); _this.$message.error(err.message);
}); });
}, },
getPageList(type, frequencyDate,areaCode) { getPageList(type, frequencyDate,areaCode) {
let httpUrl = ""; let httpUrl = "";
let _this = this; let _this = this;
if (type === "interact") { if (type === "interact") {
httpUrl = `tBoardStatistic/getInteractionFrequencyPageList?frequencyDate=${frequencyDate}&areaCode=${areaCode}`; httpUrl = `tBoardStatistic/getInteractionFrequencyPageList?frequencyDate=${frequencyDate}&areaCode=${areaCode}`;
} }
if (type === "trend") { if (type === "trend") {
httpUrl = `tBoardStatistic/getBoardTrendPageList?playDate=${frequencyDate}&areaCode=${areaCode}`; httpUrl = `tBoardStatistic/getBoardTrendPageList?playDate=${frequencyDate}&areaCode=${areaCode}`;
} }
_this _this
.$shttp ({ .$shttp ({
method: "post", method: "post",
url: `${httpUrl}`, url: `${httpUrl}`,
authType: _this.backToken, authType: _this.backToken,
}) })
.then((res) => { .then((res) => {
if (res.status == 200) { if (res.status == 200) {
if (res.data.resultCode == 200) { if (res.data.resultCode == 200) {
_this.setDataWithSus(type, res.data.data); _this.setDataWithSus(type, res.data.data);
} else { } else {
_this.setDataWithErr(type); _this.setDataWithErr(type);
} }
} else { } else {
_this.setDataWithErr(type); _this.setDataWithErr(type);
} }
}) })
.catch((err) => { .catch((err) => {
_this.$message.error(err.message); _this.$message.error(err.message);
_this.setDataWithErr(type); _this.setDataWithErr(type);
}); });
}, },
setDataWithSus(type, data) { setDataWithSus(type, data) {
this[`${type}Echarts`] = {}; this[`${type}Echarts`] = {};
this[`${type}List`] = data.page.records; this[`${type}List`] = data.page.records;
this[`${type}Echarts`].yAxisData = data.cntList; this[`${type}Echarts`].yAxisData = data.cntList;
if (type == "interact") { if (type == "interact") {
this[`${type}Echarts`].xAxisData = data.organList; this[`${type}Echarts`].xAxisData = data.organList;
} }
if (type == "trend") { if (type == "trend") {
this[`${type}Echarts`].xAxisData = data.dateList; this[`${type}Echarts`].xAxisData = data.dateList;
} }
let _this = this; let _this = this;
setTimeout(() => { setTimeout(() => {
_this.$refs[`${type}Echarts`].init(); _this.$refs[`${type}Echarts`].init();
}, 1000); }, 1000);
}, },
setDataWithErr(type) { setDataWithErr(type) {
this[`${type}Echarts`] = {}; this[`${type}Echarts`] = {};
this[`${type}List`] = []; this[`${type}List`] = [];
}, },
}, },
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.screen-container { .screen-container {
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 8px; width: 8px;
height: 10px; height: 10px;
//background-color: rgba(255, 255, 255, 0.2) !important; //background-color: rgba(255, 255, 255, 0.2) !important;
} }
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
background-color: #08214c; background-color: #08214c;
/*background: url("/images/screen/bg.png") no-repeat;*/ /*background: url("/images/screen/bg.png") no-repeat;*/
background: url("~@/assets/images/screen/bg@1x.png") no-repeat; background: url("~@/assets/images/screen/bg@1x.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
padding: 0 0.32rem; padding: 0 0.32rem;
box-sizing: border-box; box-sizing: border-box;
.page-title { .page-title {
width: 100%; width: 100%;
height: 0.67rem; height: 0.67rem;
background: url("~@/assets/images/screen/top_bg.png") no-repeat; background: url("~@/assets/images/screen/top_bg.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
p { p {
font-size: 0.32rem; font-size: 0.32rem;
color: #62baff; color: #62baff;
position: absolute; position: absolute;
left: 50%; left: 50%;
transform: translate(-50%, 0.1rem); transform: translate(-50%, 0.1rem);
margin: 0; margin: 0;
} }
} }
.user-info { .user-info {
position: absolute; position: absolute;
right: 0.56rem; right: 0.56rem;
top: 0.31rem; top: 0.31rem;
display: flex; display: flex;
align-items: center; align-items: center;
.icon-user, .icon-user,
.signup { .signup {
width: 0.28rem; width: 0.28rem;
height: 0.28rem; height: 0.28rem;
} }
.user-name { .user-name {
font-size: 0.18rem; font-size: 0.18rem;
color: #4ffffd; color: #4ffffd;
margin-left: 0.12rem; margin-left: 0.12rem;
} }
.signup { .signup {
margin-left: 0.4rem; margin-left: 0.4rem;
} }
.manager { .manager {
cursor: pointer; cursor: pointer;
width: 0.32rem; width: 0.32rem;
height: 0.32rem; height: 0.32rem;
margin-left: 0.2rem; margin-left: 0.2rem;
} }
} }
.echartspanel { .echartspanel {
height: 34vh; height: 34vh;
width: 100%; width: 100%;
bottom: 0rem; bottom: 0rem;
padding: 0.24rem 0; padding: 0.24rem 0;
box-sizing: border-box; box-sizing: border-box;
.echarts-box { .echarts-box {
height: 100%; height: 100%;
width: 50%; width: 50%;
display: inline-block; display: inline-block;
box-sizing: border-box; box-sizing: border-box;
&.left { &.left {
padding-right: 0.12rem; padding-right: 0.12rem;
float: left; float: left;
} }
&.right { &.right {
padding-left: 0.12rem; padding-left: 0.12rem;
float: right; float: right;
} }
} }
} }
.middel-part { .middel-part {
display: flex; display: flex;
margin-top: 4.16vh; margin-top: 4.16vh;
height: 56.48vh; height: 56.48vh;
justify-content: space-between; justify-content: space-between;
.table-list { .table-list {
width: 25vw; width: 25vw;
height: 100%; height: 100%;
} }
} }
.table-list { .table-list {
.list-of-body { .list-of-body {
padding-top: 0.7rem; padding-top: 0.7rem;
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
ul { ul {
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
font-size: 0.16rem; font-size: 0.16rem;
padding-left: 0.24rem; padding-left: 0.24rem;
box-sizing: border-box; box-sizing: border-box;
li { li {
line-height: 0.4rem; line-height: 0.4rem;
&.f1 { &.f1 {
width: 10%; width: 10%;
} }
&.f2 { &.f2 {
width: 20%; width: 20%;
} }
&.f3 { &.f3 {
width: 30%; width: 30%;
} }
&.f5 { &.f5 {
width: 50%; width: 50%;
} }
&.f6 { &.f6 {
width: 60%; width: 60%;
} }
&.f7 { &.f7 {
width: 70%; width: 70%;
} }
div.title { div.title {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
} }
} }
.body-title { .body-title {
color: #62baff; color: #62baff;
margin-bottom: 0.07rem; margin-bottom: 0.07rem;
} }
.body-content { .body-content {
height: calc(100% - 0.8rem); height: calc(100% - 0.8rem);
overflow-y: hidden; overflow-y: hidden;
.body-item { .body-item {
height: 0.4rem; height: 0.4rem;
background-color: rgba(98, 186, 255, 0.2); background-color: rgba(98, 186, 255, 0.2);
margin-bottom: 0.04rem; margin-bottom: 0.04rem;
color: #4efffd; color: #4efffd;
} }
} }
} }
} }
.common-title { .common-title {
.icon-title { .icon-title {
position: absolute; position: absolute;
top: 0.1rem; top: 0.1rem;
left: 0.1rem; left: 0.1rem;
width: 0.4rem; width: 0.4rem;
} }
.title { .title {
position: absolute; position: absolute;
top: 0.2rem; top: 0.2rem;
left: 0.52rem; left: 0.52rem;
font-size: 0.2rem; font-size: 0.2rem;
line-height: 0.2rem; line-height: 0.2rem;
color: #4efffd; color: #4efffd;
} }
.bg { .bg {
position: absolute; position: absolute;
width: calc(100% - 0.48rem); width: calc(100% - 0.48rem);
left: 0.24rem; left: 0.24rem;
top: 0.24rem; top: 0.24rem;
} }
} }
.map-container { .map-container {
flex: 1; flex: 1;
height: 100%; height: 100%;
position: relative; position: relative;
padding-top: 0.7rem; padding-top: 0.7rem;
box-sizing: border-box; box-sizing: border-box;
} }
} }
</style> </style>
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
<img src="@/assets/images/applets/tip.png" alt /> <img src="@/assets/images/applets/tip.png" alt />
<span> <span>
最多支持上传 最多支持上传
<b>3</b> 段视频,每段大小不能超过 <b>10MB</b> <b>3</b> 段视频,每段大小不能超过 <b>30MB</b>
</span> </span>
</div> </div>
</div> </div>
...@@ -146,6 +146,7 @@ ...@@ -146,6 +146,7 @@
</div> </div>
<div class="field-content"> <div class="field-content">
<van-field <van-field
@input="form.content=form.content.replace(regStr,'');"
required required
class="field-textarea" class="field-textarea"
type="textarea" type="textarea"
...@@ -168,6 +169,7 @@ import util from "@/utils/index.js"; ...@@ -168,6 +169,7 @@ import util from "@/utils/index.js";
export default { export default {
data() { data() {
return { return {
regStr: /[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,
form: { form: {
username: JSON.parse(sessionStorage.getItem("userInfo")).orgName, username: JSON.parse(sessionStorage.getItem("userInfo")).orgName,
organId: JSON.parse(sessionStorage.getItem("userInfo")).orgId, organId: JSON.parse(sessionStorage.getItem("userInfo")).orgId,
...@@ -325,12 +327,12 @@ export default { ...@@ -325,12 +327,12 @@ export default {
beforeVideo(file) { beforeVideo(file) {
let isOver = true let isOver = true
if(Array.isArray(file)){ if(Array.isArray(file)){
isOver = file.every(item=>item <= 10*1024*1024) isOver = file.every(item=>item <= 30*1024*1024)
}else{ }else{
isOver = file.size <= 10*1024*1024 isOver = file.size <= 30*1024*1024
} }
if(!isOver){ if(!isOver){
this.$toast.fail("上传文件大小不能超过 10MB"); this.$toast.fail("上传文件大小不能超过 30MB");
return false return false
}else{ }else{
return true return true
...@@ -375,6 +377,7 @@ export default { ...@@ -375,6 +377,7 @@ export default {
}) })
}else{ }else{
this.$toast(res.data.message) this.$toast(res.data.message)
// this.deleteInterface()
} }
}) })
.catch(function (err) { .catch(function (err) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment