Commit abbe946c authored by qzhxx's avatar qzhxx
parents 9a3ce287 597720eb
......@@ -43,11 +43,12 @@ export default {
background-color:@party-white;
.icon-loc{
display: inline-block;
width: 11px;
width: 15px;
height: 16px;
background-color: @party-pink;
margin-right: 10px;
vertical-align: middle;
background: url("~@/assets/login/loc.png") no-repeat;
background-size: cover;
}
.breadcrumb__item{
span{
......
......@@ -156,7 +156,7 @@ export default {
100%;
}
.page-title {
margin-top: 140px;
margin-top: 20px;
p {
text-align: center;
font-weight: bold;
......
......@@ -88,8 +88,7 @@ const httpServer = (opts,data,file,timeout)=>{
if(opts.authType && opts.authType!=""){
// Authorization
if(opts.authType==="back"){
//authToken=localStorage.getItem('backToken');
authToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInVzZXJfaWQiOiIxIiwiaXNzIjoiSUFUQSIsImV4cCI6MTYxNzAzMzM3NSwiaWF0IjoxNjE3MDE4OTc1fQ.NN7nF9aOGJIVZm-8x0uVz00S--YbETfkC1Ifu9R4PbnNPvObhDYlY_u2oxiq2dEkjkJ4sQWy5o2X-fTNaIvnIQ"
authToken=localStorage.getItem('backToken');
}else if(opts.authType==="front"){
authToken = localStorage.getItem("token") || MyLocalStorage.Cache.get('token');
}
......
......@@ -3,22 +3,20 @@
class="custom-dialog"
custom-class="party-dialog"
title="上传新版安装包"
width="540px"
width="468px"
:visible.sync="formVisible"
:before-close="close"
>
<div class="dialog-content">
<el-form
:model="formItem"
class="party-form"
class="party-form version-add"
ref="formItem"
label-width="125px"
label-position="right"
label-position="top"
:rules="rules"
>
<el-form-item label="版本号:" prop="appVersion">
<el-input
size="small"
v-model="formItem.appVersion"
clearable
placeholder="请输入版本号"
......@@ -27,14 +25,12 @@
<el-form-item label="版本信息:" prop="versionInfo">
<el-input
type="textarea"
size="small"
v-model="formItem.versionInfo"
></el-input>
</el-form-item>
<el-form-item label="更新内容:" prop="updateContent">
<el-input
type="textarea"
size="small"
v-model="formItem.updateContent"
></el-input>
</el-form-item>
......@@ -55,10 +51,9 @@
</el-form>
</div>
<div slot="footer" class="dialog-footer btn-group">
<el-button size="mini" type="primary" @click="submitForm('formItem')"
>确定</el-button
>
<el-button size="mini" @click="close">取 消</el-button>
<el-button size="mini" type="primary" @click="submitForm('formItem')">确定</el-button>
</div>
</el-dialog>
</template>
......@@ -87,10 +82,12 @@ export default {
methods: {
backFn() {
this.formVisible = true
this.formItem = {}
this.fileList = []
this.$nextTick(() => {
this.$refs.formItem.clearValidate()
});
this.formItem = {}
},
// 关闭
close() {
......@@ -164,12 +161,16 @@ export default {
<style lang="less">
@import "~@/style/dialog.less";
.text-center {
.version-add {
.el-upload-dragger {
height: 120px;
.el-icon-upload {
margin-top: 10px;
}
}
.text-center {
text-align: center;
}
.custom-dialog {
.party-form .el-input {
width: 100%;
}
}
</style>
\ No newline at end of file
......@@ -2,54 +2,31 @@
<el-dialog
custom-class="party-dialog"
title="详情"
width="540px"
width="468px"
:visible.sync="formVisible"
:before-close="close"
>
<div class="dialog-content">
<el-form
:model="formItem"
class="party-form"
class="party-form version-detail"
ref="formItem"
label-width="180px"
label-position="right"
label-position="top"
>
<el-form-item label="上传时间:" prop="createTime">
<el-input
size="small"
v-model="formItem.createTime"
disabled
></el-input>
<span class="input-item">{{formItem.createTime}}</span>
</el-form-item>
<el-form-item label="操作者:" prop="userName">
<el-input
size="small"
v-model="formItem.userName"
disabled
></el-input>
<span class="input-item">{{formItem.userName}}</span>
</el-form-item>
<el-form-item label="是否为当前使用版本:">
<el-input
size="small"
:value="formItem.isCurrent ? '是' : '否'"
disabled
></el-input>
<span class="input-item">{{formItem.isCurrent ? '是' : '否'}}</span>
</el-form-item>
<el-form-item label="版本信息:" prop="versionInfo">
<el-input
type="textarea"
size="small"
v-model="formItem.versionInfo"
disabled
></el-input>
<span class="input-item">{{formItem.versionInfo}}</span>
</el-form-item>
<el-form-item label="更新内容:" prop="updateLog">
<el-input
type="textarea"
size="small"
v-model="formItem.updateLog"
disabled
></el-input>
<span class="input-item">{{formItem.updateLog}}</span>
</el-form-item>
</el-form>
</div>
......@@ -82,4 +59,11 @@ export default {
<style lang="less">
@import "~@/style/dialog.less";
.version-detail {
.input-item {
font-size: 16px;
color:#333;
}
}
</style>
\ No newline at end of file
......@@ -41,19 +41,21 @@
type="index"
width="120"
label="序号"
align="center"
></el-table-column>
<el-table-column
label="app版本号"
prop="appVersion"
align="center"
></el-table-column>
<el-table-column label="是否为最新版本">
<el-table-column align="center" label="是否为最新版本">
<template slot-scope="scope">
<span>{{ scope.row.isCurrent ? "是" : "否" }}</span>
</template>
</el-table-column>
<el-table-column label="上传时间" prop="createTime"></el-table-column>
<el-table-column label="操作者" prop="userName"></el-table-column>
<el-table-column label="操作" header-align="center" align="center">
<el-table-column align="center" label="上传时间" prop="createTime"></el-table-column>
<el-table-column align="center" label="操作者" prop="userName"></el-table-column>
<el-table-column align="center" label="操作" header-align="center">
<template slot-scope="scope" width="220">
<div class="table-btn-group">
<el-tooltip content="详情" placement="top">
......
......@@ -2,7 +2,7 @@
<el-dialog
custom-class="party-dialog"
:title="title"
width="540px"
width="468px"
:visible.sync="formVisible"
:before-close="close"
>
......@@ -12,12 +12,11 @@
class="party-form"
ref="formItem"
label-width="125px"
label-position="right"
label-position="top"
:rules="rules"
>
<el-form-item label="所属单位:" prop="orgId">
<el-select
size="small"
v-model="formItem.orgId"
clearable
placeholder="请选择所属单位"
......@@ -33,7 +32,6 @@
</el-form-item>
<el-form-item label="机构地理位置:" prop="areaName">
<el-input
size="small"
v-model="formItem.areaName"
disabled
></el-input>
......@@ -41,8 +39,8 @@
</el-form>
</div>
<div slot="footer" class="dialog-footer btn-group">
<el-button type="primary" @click="submitForm('formItem')">确定</el-button>
<el-button @click="close">取 消</el-button>
<el-button type="primary" @click="submitForm('formItem')">确定</el-button>
</div>
</el-dialog>
</template>
......
......@@ -38,22 +38,7 @@
<div class="btn-group">
<el-button type="primary" @click="addBox">新建机顶盒账号</el-button>
</div>
<div class="party-table">
<el-table
border
style="width: 100%; height: 100%"
height="100%"
:data="tableData"
>
<el-table-column
type="index"
width="120"
label="序号"
></el-table-column>
<el-table-column label="MAC地址" prop="mac"></el-table-column>
<el-table-column label="所属单位" prop="organName"></el-table-column>
</el-table>
</div>
<party-table :feildList="feildList" :list="tableData"/>
<div class="partyt-pagination" style="margin: 0 20px">
<el-pagination
background
......@@ -70,11 +55,12 @@
</template>
<script>
import { partyPagination } from "@/components/index";
import partyTable from "@/components/table.vue";
import customDialog from "./components/dialog.vue";
import { getAreas } from "@/config/area.js";
import { getOrgListWithOutPage } from "@/config/organ.js";
export default {
components: { partyPagination, customDialog },
components: { partyPagination, customDialog,partyTable },
data() {
return {
page: {
......@@ -82,6 +68,10 @@ export default {
pageSize: 10,
total: 0
},
feildList: [
{ prop: "mac", label: "MAC地址" },
{ prop: "organName", label: "所属单位" }
],
orgOptions: [], // 单位信息
areaOptions: [], //区域信息
defaultProps: {
......
......@@ -35,12 +35,10 @@
<div class="title">“北京市政府”展板互动信息汇总</div>
<div class="page-tip">
<span class="page-tip-title">页面说明:</span>
<span class="page-tips"
>可查看某个组织机构的互动信息</span
>
<span class="page-tips">可查看某个组织机构的互动信息</span>
</div>
</div>
<div class="scrollBox">
<div class="scrollBox" v-show="tableData.length">
<div
class="content-item"
v-for="(item, index) in tableData"
......@@ -48,16 +46,17 @@
>
<h5 class="title">{{ item.name }}</h5>
<p>{{ item.content }}</p>
<div class="img-box">
<div class="img-box" v-if="item.images.length">
<img v-for="(j, idx) in item.images" :src="j" :key="idx" alt="" />
</div>
<div class="img-box" v-if="!item.images.length">暂无数据</div>
<div class="author">
<div>{{ item.username }}</div>
<div>{{ item.createTime }}</div>
</div>
</div>
</div>
<div class="partyt-pagination" style="margin: 0 20px">
<div class="partyt-pagination" style="margin: 0 20px" v-show="tableData.length">
<el-pagination
background
@current-change="handleCurrentChange"
......@@ -78,7 +77,7 @@ export default {
page: {
currentPage: 1,
pageSize: 10,
total: 0
total: 0,
},
treeData: [],
defaultProps: {
......@@ -96,19 +95,19 @@ export default {
},
mounted() {
// 获取全部组织机构数据
this.getOrgData()
this.onSearch()
this.getOrgData();
// this.onSearch()
},
methods: {
// 查询
onSearch() {
this.page.currentPage = 1
this.getTableData()
this.page.currentPage = 1;
this.getTableData();
},
// 获得数据接口
getTableData() {
let vm = this
vm.tableData = []
let vm = this;
vm.tableData = [];
let param = {
_index: this.page.currentPage,
_size: this.page.pageSize,
......@@ -124,29 +123,31 @@ export default {
)
.then((res) => {
if (res.data.resultCode === "200") {
let data = res.data.data
vm.page.total = data.total
vm.tableData = data.records
let data = res.data.data;
vm.page.total = data.total;
vm.tableData = data.records;
if(!vm.tableData.length){
this.$message('暂无数据')
return false
}
vm.tableData.forEach((item) => {
item.images = item.images.split(",")
item.images = item.images ? item.images.split(",") : [];
item.images.forEach((result, index) => {
if (/\.(MP4|mp4)/.test(result)) {
item.images[index] = require("@/assets/video-icon.png")
item.images[index] = require("@/assets/video-icon.png");
} else if (/\.(MP3|mp3)/.test(result)) {
item.images[index] = require("@/assets/audio-icon.png")
} else {
item.images[index] = require("@/assets/default-img.jpeg")
item.images[index] = require("@/assets/audio-icon.png");
}
})
})
});
});
vm.tableData = [...vm.tableData]
vm.tableData = [...vm.tableData];
} else {
this.$message.error(res.data.message)
this.$message.error(res.data.message);
}
})
.catch(function (err) {
console.log(err)
console.log(err);
});
},
// 获取组织机构数据
......@@ -158,13 +159,13 @@ export default {
}).then(
(res) => {
if (res.data.resultCode === "200") {
this.treeData = res.data.data
this.treeData = res.data.data;
} else {
this.$message.error(res.data.message)
this.$message.error(res.data.message);
}
},
(error) => {
console.log(error)
console.log(error);
}
);
},
......@@ -176,12 +177,12 @@ export default {
// 点击节点事件
handleNodeClick(data) {
this.selectAreaId = data.id;
this.onSearch()
this.onSearch();
},
// 分页
handleCurrentChange(val) {
this.page.currentPage = val
this.getTableData()
this.page.currentPage = val;
this.getTableData();
},
},
};
......
......@@ -56,14 +56,13 @@
type="index"
width="120"
label="序号"
align="center"
></el-table-column>
<el-table-column label="mac地址" prop="mac"></el-table-column>
<el-table-column label="所属单位" prop="organName"></el-table-column>
<el-table-column label="机顶盒状态" prop="status">
<el-table-column align="center" label="mac地址" prop="mac"></el-table-column>
<el-table-column align="center" label="所属单位" prop="organName"></el-table-column>
<el-table-column align="center" label="机顶盒状态" prop="status">
<template slot-scope="scope">
<span v-if="scope.row.status === 1">待激活</span>
<span v-if="scope.row.status === 2">已激活</span>
<span v-if="scope.row.status === 3">故障</span>
<span>{{statusOptions[scope.row.status-1].label}}</span>
</template>
</el-table-column>
</el-table>
......
......@@ -65,12 +65,13 @@ export default {
return {
dialogVisible: false,
organList: [],
id:'',
id: "",
form: {
userName: "",
orgId: "",
permanent: true,
date: "",
roleList: [],
},
rules: {
userName: [
......@@ -97,28 +98,25 @@ export default {
},
// 根据id获取获取详情内容
getDetailById(){
let _this = this
getDetailById() {
let _this = this;
this.$https(
{
method: "get",
url: "tUser/getById",
authType: this.backToken,
},
{id:_this.id}
{ id: _this.id }
)
.then((res) => {
if(res.status == 200 ){
if (res.data.resultCode == 200 ) {
let resData = res.data.data
for(let key in _this.form){
this.form[key] = resData[key]
if (res.status == 200) {
if (res.data.resultCode == 200) {
let resData = res.data.data;
for (let key in _this.form) {
this.form[key] = resData[key];
}
if(!this.form.permanent){
this.form.date = [
resData.effectiveDate,
resData.exiredDate
]
if (!this.form.permanent) {
this.form.date = [resData.effectiveDate, resData.exiredDate];
}
} else {
_this.$message.error(res.data.message);
......@@ -147,6 +145,7 @@ export default {
orgId: "",
permanent: true,
date: "",
roleList: [],
};
},
// 提交
......@@ -166,8 +165,9 @@ export default {
user.permanent = this.form.permanent;
user.userName = this.form.userName;
user.orgId = this.form.orgId;
user.id = this.id
user.type = 5
user.id = this.id;
user.roleList = this.form.roleList;
user.type = 5;
this.$https(
{
method: "put",
......@@ -205,5 +205,4 @@ export default {
};
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
......@@ -67,10 +67,11 @@ export default {
form: {
id: "",
userName: "",
areaId: ["110000","110100","110101"],
areaId: ["110000", "110100", "110101"],
permanent: true,
date: "",
type: 4, //1.用户账号 2.平台单位单位管理员账号 3.机顶盒账号 4.运维账号
roleList: [],
type: 4 //1.用户账号 2.平台单位单位管理员账号 3.机顶盒账号 4..机顶盒运维账号
},
cascaderProps: {
label: "name",
......@@ -121,7 +122,7 @@ export default {
if (res.data.resultCode == 200) {
let resData = res.data.data;
for (let key in _this.form) {
if(key != 'areaId'){
if (key != "areaId") {
this.form[key] = resData[key];
}
}
......@@ -156,8 +157,9 @@ export default {
userName: "",
areaId: [],
permanent: true,
roleList: [],
date: "",
type: 4, //1.用户账号 2.平台单位单位管理员账号 3.机顶盒账号 4.运维账号
type: 4 //1.用户账号 2.平台单位单位管理员账号 3.机顶盒账号 4.运维账号
};
},
// 提交
......@@ -178,6 +180,7 @@ export default {
user.areaId = [...this.form.areaId].pop();
user.permanent = this.form.permanent;
user.type = this.form.type;
user.roleList = this.form.roleList;
user.id = this.form.id;
this.$https(
{
......@@ -204,7 +207,8 @@ export default {
}
})
.catch((err) => {
console.log(res);
this.$message.error(err.message);
console.log(err);
});
} else {
console.log("error submit!!");
......
......@@ -120,6 +120,7 @@ export default {
phone: "",
weChat: "",
email: "",
roleList:[],
type: 2, //1.用户账号 2.平台单位管理员账号 3.机顶盒账号 4.运维账号
},
rules: {
......@@ -200,7 +201,7 @@ export default {
permanent: true,
date: "",
roleList: [],
type:1
type: 2
}
},
// 提交
......
......@@ -2,43 +2,79 @@
<div class="demand">
<div class="common-title">
<div class="icon-and-title">
<img class="icon-title" src="@/assets/overview/s-interation.png" alt="">
<span class="title">{{title}}</span>
<img
class="icon-title"
src="@/assets/overview/s-interation.png"
alt=""
/>
<span class="title">{{ title }}</span>
</div>
<img class="bg" src="@/assets/overview/bg_title02.png" alt="">
<img class="bg" src="@/assets/overview/bg_title02.png" alt="" />
</div>
<div id="barDemand" @click="echartsClick"></div>
<div id="barDemand"></div>
</div>
</template>
<script>
export default {
name: 'demand',
import { getCurDate } from "@/utils/util.time.js";
export default {
name: "demand",
data() {
return {
title:'互动频次'
}
title: "互动频次",
xAxisData: [],
yAxisData: [],
};
},
components:{},
components: {},
mounted() {
setTimeout(()=>{
this.init()
},100)
this.getList();
},
methods: {
init(){
getList() {
let curTime = getCurDate();
let frequencyDate = curTime.year + curTime.month;
this.$https({
method: "post",
url: "tBoardStatistic/getInteractionFrequencyPageList?frequencyDate=" + frequencyDate,
authType: this.backToken,
})
.then((res) => {
if (res.status == 200) {
if (res.data.resultCode == 200) {
this.xAxisData = res.data.data.organList;
this.yAxisData = res.data.data.cntList;
} else {
this.xAxisData = [];
this.yAxisData = [];
}
} else {
this.xAxisData = [];
this.yAxisData = [];
}
this.init();
})
.catch((err) => {
this.$message.error(err.message);
this.xAxisData = [];
this.yAxisData = [];
this.init();
});
},
init() {
let option = {
tooltip: {
trigger: 'axis'
trigger: "axis",
},
grid: {
top:30,
left: '2%',
top: 30,
left: "2%",
right: 40,
bottom: 30,
containLabel: true
containLabel: true,
},
dataZoom: [{
dataZoom: [
{
type: "slider",
show: true,
bottom: 0,
......@@ -50,108 +86,113 @@
},
textStyle: {
color: "#fff",
fontSize: "10px"
fontSize: "10px",
},
},
}
],
xAxis: {
type: 'category',
boundaryGap: true,//坐标轴两边留白
data: [
'北京市政府', '天津市政府', '呼和浩特市政府', '石家庄市政府', '合肥市政府', '哈尔滨市政府', '廊坊市政府', '临沂市政府','忻州市政府', '黑龙江市政府',
],
axisLabel: { //坐标轴刻度标签的相关设置。
interval:0,
type: "category",
boundaryGap: true, //坐标轴两边留白
data: this.xAxisData,
axisLabel: {
//坐标轴刻度标签的相关设置。
interval: 0,
textStyle: {
color: '#333333',
fontStyle: 'normal',
fontFamily: '微软雅黑',
color: "#333333",
fontStyle: "normal",
fontFamily: "微软雅黑",
fontSize: 14,
},
formatter: function (value, index) {
if(value.length > 4){
return value.slice(0,4)+ '...'
}else {
return value
}
if (value.length > 4) {
return value.slice(0, 4) + "...";
} else {
return value;
}
},
axisTick:{//坐标轴刻度相关设置。
},
axisTick: {
//坐标轴刻度相关设置。
show: false,
},
axisLine:{//坐标轴轴线相关设置
lineStyle:{
color:'#eeeeee',
type:'solid'
}
axisLine: {
//坐标轴轴线相关设置
lineStyle: {
color: "#eeeeee",
type: "solid",
},
splitLine: { //坐标轴在 grid 区域中的分隔线。
},
splitLine: {
//坐标轴在 grid 区域中的分隔线。
show: false,
}
},
},
yAxis: [
{
type: 'value',
name:'单位/次',
type: "value",
name: "单位/次",
splitNumber: 5,
max:100,
max: 100,
axisLabel: {
textStyle: {
color: '#333333',
fontStyle: 'normal',
fontFamily: '微软雅黑',
color: "#333333",
fontStyle: "normal",
fontFamily: "微软雅黑",
fontSize: 12,
},
interval:'auto'
interval: "auto",
},
axisLine:{
show: false
axisLine: {
show: false,
},
axisTick:{
show: false
axisTick: {
show: false,
},
splitLine: {
show: true,
lineStyle: {
color:'#eeeeee',
type:'dashed'
}
}
}
color: "#eeeeee",
type: "dashed",
},
},
},
],
series: [
{
type: 'bar',
type: "bar",
barWidth: 16, // 柱子宽度
itemStyle:{
itemStyle: {
barBorderRadius: 120, // 圆角(左上、右上、右下、左下)
},
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
'#AC9374', '#9B1E23'
].map((color, offset) => ({
color: new this.$echarts.graphic.LinearGradient(
0,
0,
0,
1,
["#AC9374", "#9B1E23"].map((color, offset) => ({
color,
offset
}))), // 渐变
data: [ 25, 30,40, 52, 56,63, 73, 75, 83, 85,90].reverse()
}
]
offset,
}))
), // 渐变
data: this.yAxisData,
},
],
};
let echartsDiv = this.$echarts.init(document.getElementById('barDemand'))
echartsDiv.setOption(option)
let echartsDiv = this.$echarts.init(document.getElementById("barDemand"));
echartsDiv.setOption(option);
},
// 点击事件
echartsClick(){
this.$emit('itemClick',{type:1,title:this.title})
}
}
}
// echartsClick() {
// this.$emit("itemClick", { type: 1, title: this.title });
// },
},
};
</script>
<style lang="less">
#barDemand{
#barDemand {
width: 100%;
height: calc(100% - 45px);
}
}
</style>
<template>
<div class="ul-wrapper height100">
<div class="ul-wrapper height100">
<div class="panel-table">
<ul class="title-wrapper">
<li v-for="(item,index) in tList" :key="index">
{{item}}
<li v-for="(item, index) in tList" :key="index">
{{ item }}
</li>
</ul>
<ul class="panel-table-content">
<li v-for="(item,index) in data.slice(0,5)" :key="index">
<span v-for="(s,key) in item" :key='key'>
<img :src="getImg(s)" alt="" v-if="s<4">
<p v-else>{{s}}</p>
<li v-for="(item, index) in data.slice(0, 5)" :key="index">
<span>
<img :src="getImg(index + 1)" alt="" v-if="index < 3" />
<p v-else>{{ index + 1 }}</p>
</span>
<span>{{ item.organName }}</span>
<span>{{ item.frequencyCnt }}</span>
</li>
</ul>
</div>
<div class="panel-table">
<ul class="title-wrapper">
<li v-for="(item,index) in tList" :key="index">
{{item}}
<li v-for="(item, index) in tList" :key="index">
{{ item }}
</li>
</ul>
<ul class="panel-table-content">
<li v-for="(item,index) in data.slice(5,10)" :key="index">
<span v-for="(s,key) in item" :key='key'>
{{s}}
<li v-for="(item, index) in data.slice(5, 10)" :key="index">
<span>
{{ 6 + index }}
</span>
<span>{{ item.organName }}</span>
<span>{{ item.frequencyCnt }}</span>
</li>
</ul>
</div>
</div>
</div>
</template>
<script>
export default {
data(){
return{
}
data() {
return {};
},
props:{
tList:{
type:Array,
default:[]
props: {
tList: {
type: Array,
default: [],
},
data:{
type:Array,
default:()=>{return []}
}
data: {
type: Array,
default: () => {
return [];
},
methods:{
getImg(s){
return require('@/assets/overview/rank0'+ s + '.png')
}
}
}
},
},
methods: {
getImg(s) {
return require("@/assets/overview/rank0" + s + ".png");
},
},
};
</script>
<style lang="less" scoped>
.ul-wrapper{
.ul-wrapper {
display: flex;
padding: 15px 20px 40px;
.panel-table{
.panel-table {
width: 50%;
&:first-child{
&:first-child {
padding-right: 10px;
}
&:last-child{
&:last-child {
padding-left: 10px;
}
.title-wrapper{
.title-wrapper {
display: flex;
height: 48px;
line-height: 48px;
li{
li {
text-align: center;
width: 40%;
&:first-child{width: 20%;}
&:first-child {
width: 20%;
}
}
}
.panel-table-content{
.panel-table-content {
height: calc(100% - 56px);
li{
li {
width: 100%;
height: 20%;
line-height: 1;
max-height: 48px;
background-color:@party-bg-gray;
background-color: @party-bg-gray;
margin-bottom: 4px;
border-radius: 2px;
display: flex;
align-items: center;
span{
span {
text-align: center;
width: 40%;
display: inline-block;
&:first-child{width: 20%;}
&:first-child {
width: 20%;
}
}
img{
img {
width: 18px;
vertical-align: middle;
}
}
}
}
}
</style>
\ No newline at end of file
<template>
<div id="dialogBarDemand" style="width:100%;height:100%"></div>
<div id="dialogBarDemand" style="width: 100%; height: 100%"></div>
</template>
<script>
export default {
name: 'demand',
export default {
name: "demand",
data() {
return {
title:'互动频次'
title: "互动频次",
};
},
props: {
data:{
type: Object,
default:()=>{
return {}
}
},
},
mounted() {
setTimeout(()=>{
this.init()
},100)
},
methods: {
init(){
init() {
let option = {
tooltip: {
trigger: 'axis'
trigger: "axis",
},
grid: {
top: 40,
left: '2%',
left: "2%",
right: 40,
bottom: 30,
containLabel: true
containLabel: true,
},
// dataZoom: [{
// type: "slider",
......@@ -45,100 +51,107 @@
// }
// ],
xAxis: {
type: 'category',
boundaryGap: true,//坐标轴两边留白
data: [
'北京市政府', '天津市政府', '呼和浩特市政府', '石家庄市政府', '合肥市政府', '哈尔滨市政府', '廊坊市政府', '临沂市政府','忻州市政府', '黑龙江市政府',
],
axisLabel: { //坐标轴刻度标签的相关设置。
interval:0,
type: "category",
boundaryGap: true, //坐标轴两边留白
data: this.data.xAxisData,
axisLabel: {
//坐标轴刻度标签的相关设置。
interval: 0,
textStyle: {
color: '#333333',
fontStyle: 'normal',
fontFamily: '微软雅黑',
color: "#333333",
fontStyle: "normal",
fontFamily: "微软雅黑",
fontSize: 14,
},
formatter: function (value, index) {
if(value.length > 4){
return value.slice(0,4)+ '...'
}else {
return value
}
if (value.length > 4) {
return value.slice(0, 4) + "...";
} else {
return value;
}
},
axisTick:{//坐标轴刻度相关设置。
},
axisTick: {
//坐标轴刻度相关设置。
show: false,
},
axisLine:{//坐标轴轴线相关设置
lineStyle:{
color:'#eeeeee',
type:'solid'
}
axisLine: {
//坐标轴轴线相关设置
lineStyle: {
color: "#eeeeee",
type: "solid",
},
splitLine: { //坐标轴在 grid 区域中的分隔线。
},
splitLine: {
//坐标轴在 grid 区域中的分隔线。
show: false,
}
},
},
yAxis: [
{
type: 'value',
name:'单位/次',
type: "value",
name: "单位/次",
splitNumber: 5,
max:100,
max: 100,
axisLabel: {
textStyle: {
color: '#333333',
fontStyle: 'normal',
fontFamily: '微软雅黑',
color: "#333333",
fontStyle: "normal",
fontFamily: "微软雅黑",
fontSize: 12,
},
interval:'auto'
interval: "auto",
},
axisLine:{
show: false
axisLine: {
show: false,
},
axisTick:{
show: false
axisTick: {
show: false,
},
splitLine: {
show: true,
lineStyle: {
color:'#eeeeee',
type:'dashed'
}
}
}
color: "#eeeeee",
type: "dashed",
},
},
},
],
series: [
{
type: 'bar',
type: "bar",
barWidth: 16, // 柱子宽度
itemStyle:{
itemStyle: {
barBorderRadius: 120, // 圆角(左上、右上、右下、左下)
},
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
'#AC9374', '#9B1E23'
].map((color, offset) => ({
color: new this.$echarts.graphic.LinearGradient(
0,
0,
0,
1,
["#AC9374", "#9B1E23"].map((color, offset) => ({
color,
offset
}))), // 渐变
data: [ 25, 30,40, 52, 56,63, 73, 75, 83, 85,90].reverse()
}
]
offset,
}))
), // 渐变
data: this.data.yAxisData,
},
],
};
let echartsDiv = this.$echarts.init(document.querySelector('#dialogBarDemand'))
echartsDiv.setOption(option,true)
let echartsDiv = this.$echarts.init(
document.querySelector("#dialogBarDemand")
);
echartsDiv.setOption(option, true);
},
}
}
},
};
</script>
<style
<style lang="less">>
#dialogBarDemand{
<style lang="less">
> #dialogBarDemand {
width: 100%;
height: 100%;
}
}
</style>
import demand from './demand'
import interaction from './interaction'
import interact from './interact'
import areas from './areas'
import top10 from './top10'
import mapDiv from './maps'
......@@ -10,7 +10,7 @@ import trendLine from './echarts/line'
import rankTable from './detail-table/rankTable'
export {
demand,
interaction,
interact,
areas,
top10,
mapDiv,
......
<template>
<div class="interaction">
<div class="common-title">
<div class="icon-and-title">
<img class="icon-title" src="@/assets/overview/board.png" alt="" />
<span class="title">{{ title }}</span>
</div>
<img class="bg" src="@/assets/overview/bg_title02.png" alt="" />
</div>
<div id="tends"></div>
</div>
</template>
<script>
import { getCurDate } from "@/utils/util.time.js";
export default {
name: "interaction",
data() {
return {
title: "展板点播趋势图",
xAxisData: [],
yAxisData: [],
};
},
components: {},
mounted() {
this.getList()
},
methods: {
getList() {
let curTime = getCurDate();
let playDate = curTime.year + curTime.month;
let _this = this
this.$https({
method: "post",
url: "tBoardStatistic/getBoardTrendPageList?playDate=" + playDate,
authType: this.backToken,
})
.then((res) => {
if (res.status == 200) {
if (res.data.resultCode == 200) {
this.xAxisData = res.data.data.dateList;
this.yAxisData = res.data.data.cntList;
} else {
this.xAxisData = [];
this.yAxisData = [];
}
} else {
this.xAxisData = [];
this.yAxisData = [];
}
this.init();
})
.catch((err) => {
this.$message.error(err.message);
this.xAxisData = [];
this.yAxisData = [];
this.init();
});
},
init() {
let option = {
tooltip: {
trigger: "axis",
},
grid: {
top: 20,
left: "2%",
right: 40,
bottom: 30,
containLabel: true,
},
dataZoom: [
{
type: "slider",
show: true,
bottom: 0,
start: 0,
end: 100,
height: 18,
handleStyle: {
color: "#d3dee5",
},
textStyle: {
color: "#fff",
fontSize: "10px",
},
},
],
xAxis: {
type: "category",
boundaryGap: false, //坐标轴两边留白
data: this.xAxisData,
axisLabel: {
//坐标轴刻度标签的相关设置。
textStyle: {
color: "#333333",
fontStyle: "normal",
fontFamily: "微软雅黑",
fontSize: 14,
},
},
axisTick: {
//坐标轴刻度相关设置。
show: false,
},
axisLine: {
//坐标轴轴线相关设置
lineStyle: {
color: "#eeeeee",
type: "solid",
},
},
splitLine: {
//坐标轴在 grid 区域中的分隔线。
show: false,
},
},
yAxis: [
{
type: "value",
splitNumber: 5,
max: 100,
axisLabel: {
textStyle: {
color: "#333333",
fontStyle: "normal",
fontFamily: "微软雅黑",
fontSize: 12,
},
interval: "auto",
},
axisLine: {
show: false,
},
axisTick: {
show: false,
},
splitLine: {
show: true,
lineStyle: {
color: "#eeeeee",
type: "dashed",
},
},
},
],
series: [
{
type: "line",
smooth: true,
itemStyle: {
normal: {
color: "#AC9374",
lineStyle: {
color: "#9B1E23",
width: 1,
},
areaStyle: {
color: new this.$echarts.graphic.LinearGradient(0, 1, 0, 0, [
{
offset: 0,
color: "rgba(172,141,116,0.4)",
},
{
offset: 1,
color: "rgba(155,30,35,0.4)",
},
]),
},
},
},
data: this.yAxisData,
},
],
};
let echartsDiv = this.$echarts.init(document.getElementById("tends"));
echartsDiv.setOption(option);
},
// // 点击事件
// echartsClick() {
// this.$emit("itemClick", { type: 2, title: this.title });
// },
},
};
</script>
<style lang="less">
#tends {
width: 100%;
height: calc(100% - 45px);
}
</style>
<template>
<div class="interaction">
<div class="common-title">
<div class="icon-and-title">
<img class="icon-title" src="@/assets/overview/board.png" alt="">
<span class="title">{{title}}</span>
</div>
<img class="bg" src="@/assets/overview/bg_title02.png" alt="">
</div>
<div id="tends" @click="echartsClick"></div>
</div>
</template>
<script>
export default {
name: 'interaction',
data() {
return {
title:'展板点播趋势图'
}
},
components:{},
mounted() {
setTimeout(()=>{
this.init()
},100)
},
methods: {
init(){
let option = {
tooltip: {
trigger: 'axis'
},
grid: {
top:20,
left: '2%',
right: 40,
bottom: 30,
containLabel: true
},
dataZoom: [{
type: "slider",
show: true,
bottom: 0,
start: 0,
end: 100,
height: 18,
handleStyle: {
color: "#d3dee5",
},
textStyle: {
color: "#fff",
fontSize: "10px"
},
}
],
xAxis: {
type: 'category',
boundaryGap: false,//坐标轴两边留白
data: [
'2021/01/01', '2021/01/02', '2021/01/03', '2021/01/04', '2021/01/05', '2021/01/06', '2021/01/07', '2021/01/08','2021/01/09', '2021/01/10',
'2021/01/11', '2021/01/12', '2021/01/13', '2021/01/14', '2021/01/15', '2021/01/16', '2021/01/17', '2021/01/18','2021/01/19', '2021/01/20',
'2021/01/21', '2021/01/22', '2021/01/23', '2021/01/24', '2021/01/25', '2021/01/26', '2021/01/27', '2021/01/28','2021/01/29', '2021/01/30','2021/01/31'],
axisLabel: { //坐标轴刻度标签的相关设置。
textStyle: {
color: '#333333',
fontStyle: 'normal',
fontFamily: '微软雅黑',
fontSize: 14,
},
},
axisTick:{//坐标轴刻度相关设置。
show: false,
},
axisLine:{//坐标轴轴线相关设置
lineStyle:{
color:'#eeeeee',
type:'solid'
}
},
splitLine: { //坐标轴在 grid 区域中的分隔线。
show: false,
}
},
yAxis: [
{
type: 'value',
splitNumber: 5,
max:100,
axisLabel: {
textStyle: {
color: '#333333',
fontStyle: 'normal',
fontFamily: '微软雅黑',
fontSize: 12,
},
interval:'auto'
},
axisLine:{
show: false
},
axisTick:{
show: false
},
splitLine: {
show: true,
lineStyle: {
color:'#eeeeee',
type:'dashed'
}
}
}
],
series: [
{
type: 'line',
smooth:true,
itemStyle: {
normal: {
color:'#AC9374',
lineStyle: {
color: "#9B1E23",
width:1
},
areaStyle: {
color: new this.$echarts.graphic.LinearGradient(0, 1, 0, 0, [{
offset: 0,
color: 'rgba(172,141,116,0.4)'
}, {
offset: 1,
color: 'rgba(155,30,35,0.4)'
}]),
}
}
},
data: [ 18, 19, 22, 23, 25, 26, 28, 30, 36, 38,
40, 42, 45, 44, 46, 47, 49, 52, 56, 59,
63, 66, 68, 69, 73, 75, 78, 80, 83, 85,90
]
}
]
};
let echartsDiv = this.$echarts.init(document.getElementById('tends'))
echartsDiv.setOption(option)
},
// 点击事件
echartsClick(){
this.$emit('itemClick',{type:2,title:this.title})
}
}
}
</script>
<style lang="less">
#tends{
width: 100%;
height: calc(100% - 45px);
}
</style>
......@@ -32,6 +32,7 @@
</template>
<script>
import { getCurDate } from '@/utils/util.time.js'
export default {
name: "top10",
data() {
......@@ -54,16 +55,8 @@ export default {
},
methods: {
getTitle(){
let curTime = this.getCurrentTime()
return `全国${curTime.yyyy}${curTime.MM}月展板点播TOP10`
},
getCurrentTime() {
let year = new Date().getFullYear();
let month = new Date().getMonth() + 1;
return {
yyyy: year,
MM: month > 9 ? month : `0${month}`,
};
let curTime = getCurDate()
return `全国${curTime.year}${curTime.month}月展板点播TOP10`
},
initScroll() {
let _this = this;
......
/* 互动频次 */
<template>
<div class="interaction-wrapper height100 overview-detail">
<div class="interaction-wrapper height100 overview-detail">
<div class="ecahrts-panel-box">
<div class="panel-box-header">
<span class="title">互动频次</span>
<div class="tip">
<span class="tip-title">页面说明:</span>
<span> 可查看当前系统各项数据统计情况。互动频次及点播趋势图展示部分数据,可进入互动统计及趋势分析详情页查看全部数据。</span>
<span>
可查看当前系统各项数据统计情况。互动频次及点播趋势图展示部分数据,可进入互动统计及趋势分析详情页查看全部数据。</span
>
</div>
</div>
<div class="panel-box-content">
<bar/>
<bar :data="echartsData" ref="echarts" />
</div>
</div>
<div class="rank-panel-box">
......@@ -18,42 +20,70 @@
<span class="title">互动频次排行</span>
</div>
<div class="panel-box-content">
<rank-table
:tList="tList"
:data="data"
/>
<rank-table :tList="tList" :data="data" />
</div>
</div>
</div>
</div>
</template>
<script>
import {bar,rankTable} from './components'
import { getCurDate } from "@/utils/util.time.js";
import { bar, rankTable } from "./components";
export default {
data(){
data() {
return {
tList:['排名','统计时间','点播总量'],
data:[
{index:1,time:'2021年1月',num:'268'},
{index:2,time:'2021年1月',num:'268'},
{index:3,time:'2021年1月',num:'268'},
{index:4,time:'2021年1月',num:'268'},
{index:5,time:'2021年1月',num:'268'},
{index:6,time:'2021年1月',num:'268'},
{index:7,time:'2021年1月',num:'268'},
{index:8,time:'2021年1月',num:'268'},
{index:9,time:'2021年1月',num:'268'},
{index:10,time:'2021年1月',num:'268'}
]
tList: ["排名", "机构名称", "互动频次"],
echartsData: {},
data: [],
};
},
components: { bar, rankTable },
mounted() {
this.getList();
},
methods: {
getList() {
let curTime = getCurDate();
let frequencyDate = curTime.year + curTime.month;
let _this = this
_this.$https({
method: "post",
url:
"tBoardStatistic/getInteractionFrequencyPageList?frequencyDate=" +
frequencyDate,
authType: this.backToken,
})
.then((res) => {
if (res.status == 200) {
if (res.data.resultCode == 200) {
_this.echartsData = {};
_this.echartsData.xAxisData = res.data.data.organList;
_this.echartsData.yAxisData = res.data.data.cntList;
_this.data = res.data.data.page.records;
} else {
_this.echartsData = {};
_this.data = [];
}
} else {
_this.echartsData = {};
_this.data = [];
}
setTimeout(() => {
_this.init();
},100);
})
.catch((err) => {
_this.$message.error(err.message);
_this.echartsData = {};
_this.data = [];
});
},
components:{bar,rankTable},
methods:{
init() {
this.$refs.echarts.init();
}
}
},
};
</script>
<style>
</style>
\ No newline at end of file
......@@ -16,7 +16,7 @@
<demand class="echarts-panel"></demand>
</div>
<div class="echarts-box right">
<interaction class="echarts-panel"></interaction>
<interact class="echarts-panel"></interact>
</div>
</div>
</div>
......@@ -24,7 +24,7 @@
<script>
import {
demand,
interaction,
interact,
areas,
top10,
mapDiv,
......
/* 点播趋势图 */
<template>
<div class="trend-wrapper height100 overview-detail">
<div class="trend-wrapper height100 overview-detail">
<div class="ecahrts-panel-box">
<div class="panel-box-header">
<span class="title">趋势图</span>
<el-date-picker
v-model="value1"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
<el-select v-model="playDate">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<div class="tip">
<span class="tip-title">页面说明:</span>
<span>默认展示当月点播总量趋势图及详情表格,可按照时间段进行检索,图表可以联动变化。</span>
<span
>默认展示当月点播总量趋势图及详情表格,可按照时间段进行检索,图表可以联动变化。</span
>
</div>
</div>
<div class="panel-box-content">
<trend-line/>
<trend-line />
</div>
</div>
<div class="rank-panel-box">
......@@ -25,42 +29,72 @@
<span class="title">点播趋势排行</span>
</div>
<div class="panel-box-content">
<rank-table
:tList="tList"
:data="data"
/>
<rank-table :tList="tList" :data="data" />
</div>
</div>
</div>
</div>
</template>
<script>
import {trendLine, rankTable} from './components'
import { trendLine, rankTable } from "./components";
export default {
data(){
data() {
return {
value1:'',
tList:['排名','统计时间','点播总量'],
data:[
{index:1,time:'2021年1月',num:'268'},
{index:2,time:'2021年1月',num:'268'},
{index:3,time:'2021年1月',num:'268'},
{index:4,time:'2021年1月',num:'268'},
{index:5,time:'2021年1月',num:'268'},
{index:6,time:'2021年1月',num:'268'},
{index:7,time:'2021年1月',num:'268'},
{index:8,time:'2021年1月',num:'268'},
{index:9,time:'2021年1月',num:'268'},
{index:10,time:'2021年1月',num:'268'}
]
}
value1: "",
tList: ["排名", "统计时间", "点播总量"],
playDate:'',
data: [],
options: [
{ label: "年", value: "1" },
{ label: "月", value: "2" },
{ label: "日", value: "3" },
],
};
},
components:{trendLine, rankTable},
methods:{
components: { trendLine, rankTable },
methods: {
getList() {
let curTime = getCurDate();
let frequencyDate = curTime.year + curTime.month;
let _this = this;
_this
.$https({
method: "post",
url:
"tBoardStatistic/getInteractionFrequencyPageList?frequencyDate=" +
frequencyDate,
authType: this.backToken,
})
.then((res) => {
if (res.status == 200) {
if (res.data.resultCode == 200) {
_this.echartsData = {};
_this.echartsData.xAxisData = res.data.data.organList;
_this.echartsData.yAxisData = res.data.data.cntList;
_this.data = res.data.data.page.records;
} else {
_this.echartsData = {};
_this.data = [];
}
} else {
_this.echartsData = {};
_this.data = [];
}
}
setTimeout(() => {
_this.init();
}, 100);
})
.catch((err) => {
_this.$message.error(err.message);
_this.echartsData = {};
_this.data = [];
});
},
init() {
this.$refs.echarts.init();
},
},
};
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
......@@ -60,7 +60,7 @@ export default {
feildList:[
{prop:'userName',label:'运维账号'},
{prop:'area',label:'运维区域'},
{prop:'operationType',label:'操作内容'},
{prop:'operationIp',label:'操作Ip'},
{prop:'createTime',label:'操作时间'}
],
list: [],
......
......@@ -77,7 +77,7 @@ export default {
{prop:'operator',label:'操作者'},
{prop:'operationType',label:'操作类型'},
{prop:'operationObject',label:'操作对象'},
{prop:'operationContent',label:'操作内容'},
{prop:'operationIp',label:'操作Ip'},
],
list: [],
page:{
......
......@@ -77,7 +77,7 @@ export default {
{prop:'operator',label:'操作者'},
{prop:'operationType',label:'操作类型'},
{prop:'operationObject',label:'操作对象'},
{prop:'operationContent',label:'操作内容'},
{prop:'operationIp',label:'操作Ip'},
],
list: [],
page:{
......
import html2canvas from 'html2canvas'
const htmlCanvas = function (callback) {
html2canvas(document.querySelector('#bodyCanvas'), {
backgroundColor: null,
useCORS: true,
allowTaint: true,
taintTest: false,
width: document.querySelector('#bodyCanvas').clientWidth,
height: document.querySelector('#bodyCanvas').clientHeight,
scale: true
// windowWidth: 200,
// windowHeight: 126
// x: 250
}).then((canvas) => {
if (!canvas) {
callback(null)
return
}
// canvas.width = 200
// callback(canvas.toDataURL('image/png'))
callback(canvas.toDataURL('image/jpeg', 0.5))
})
}
export default htmlCanvas
export function getCurDate() {
let date = new Date()
let year = date.getFullYear();
let month = date.getMonth() + 1;
let dates = date.getDate()
return {
year: year,
month: month > 9 ? month : `0${month}`,
date: dates > 9 ? dates : `0${dates}`
};
}
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