Commit d32942a2 authored by qzhxx's avatar qzhxx

合并

parents b61ccdaf a046937f
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -16,14 +16,16 @@
"echarts": "^4.2.0-rc.2",
"element-ui": "^2.4.8",
"file-saver": "^2.0.0-rc.3",
"html2canvas": "^1.0.0-rc.7",
"jspdf": "^2.3.1",
"moment": "^2.22.2",
"ol": "^5.2.0",
"ol-ext": "^3.0.2",
"qrcode.vue": "^1.6.1",
"qs": "^6.5.2",
"qs-stringify": "^1.1.0",
"video.js": "^7.11.4",
"swiper": "^5.4.5",
"video.js": "^7.11.4",
"vue": "^2.5.2",
"vue-awesome-swiper": "^4.1.1",
"vue-qr": "^1.5.2",
......
......@@ -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{
......
<template>
<div id="backlogin">
<div class="content">
<div class="page-content">
<div class="page-title">
<p>中国国家博物馆建党百年展</p>
<p>点播院线服务平台</p>
......@@ -41,6 +42,7 @@
</el-form>
</div>
</div>
</div>
</template>
<script>
......@@ -155,8 +157,17 @@ export default {
background: url("~@/assets/login/login_bt01.png") no-repeat center/ 100%
100%;
}
.page-content {
position: absolute;
top: 50%;
left: 50%;
margin-top: -50%;
margin-left: -50%;
width:100%;
}
.page-title {
margin-top: 140px;
width: 100%;
margin-bottom: 60px;
p {
text-align: center;
font-weight: bold;
......@@ -181,13 +192,8 @@ export default {
background: url("~@/assets/login/pwd.png") no-repeat center/ 100%;
}
/deep/.el-form {
// margin-top: 120px;
width: 100%;
text-align: center;
z-index: 99;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 150px;
.el-form-item {
margin-bottom: 60px;
}
......@@ -228,7 +234,7 @@ export default {
@media (min-width: 1301px) and (max-width: 1600px) {
#backlogin .content {
.page-title {
margin-top: 50px;
margin-bottom: 50px;
p {
font-size: 30px;
}
......@@ -238,7 +244,7 @@ export default {
@media screen and (max-width: 1300px) {
#backlogin .content {
.page-title {
margin-top: 20px;
margin-bottom: 30px;
p {
font-size: 24px;
}
......
<template>
<div class="top-bar">
<div class="top-bar-left">
<div class="logo"></div>
<div class="logo" @click="$router.push('/index')"></div>
<span class="title f24">中国国家博物馆建党百年展点播院线服务平台</span>
</div>
<div class="top-bar-right">
......@@ -77,6 +77,7 @@ export default {
display: inline-block;
vertical-align: middle;
background: url("~@/assets/login/logo.png") no-repeat center/100% 100%;
cursor: pointer;
}
.title {
color: @party-white;
......
......@@ -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');
}
......
......@@ -29,6 +29,10 @@ import '../static/ueditor/ueditor.all.js'
import '../static/ueditor/themes/default/css/ueditor.min.css'
import '../static/ueditor/lang/zh-cn/zh-cn.js'
// 引入JsPdf
import exportToPdf from "@/utils/exportToPdf"
Vue.use(exportToPdf)
Vue.filter('dateformat', function(dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') {
return moment(dataStr).format(pattern)
})
......
......@@ -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
}
},
// 提交
......
<template>
<div class="listPage H100">
<div class="search-container">
<el-form :inline="true" :model="form" ref="form" class="search-form" onsubmit="return false;">
<el-form
:inline="true"
:model="form"
ref="form"
class="search-form"
onsubmit="return false;"
>
<el-form-item label="">
<el-input
size="mini"
......@@ -11,7 +17,7 @@
clearable
></el-input>
</el-form-item>
<el-form-item >
<el-form-item>
<el-select v-model="form.status" placeholder="请选择审核状态">
<el-option label="待初审" value="TBC"></el-option>
<el-option label="已驳回" value="REFUSED"></el-option>
......@@ -21,26 +27,41 @@
</el-form-item>
<el-form-item>
<div class="btn-group">
<el-button size="mini" type="primary" class="btn_form_search" @click="Search">查询</el-button>
<el-button size="mini" class="btn_form_search" @click="Reset">重置</el-button>
<el-button
size="mini"
type="primary"
class="btn_form_search"
@click="Search"
>查询</el-button
>
<el-button size="mini" class="btn_form_search" @click="Reset"
>重置</el-button
>
</div>
</el-form-item>
</el-form>
<div class="page-tip">
<span class="page-tip-title">页面说明:</span>
<span class="page-tips">可查看展板待审核的所有内容,可根据审核类别进行筛选</span>
<span class="page-tips"
>可查看展板待审核的所有内容,可根据审核类别进行筛选</span
>
</div>
</div>
<div class="table-content">
<div class="party-table">
<el-table
border
style="width: 100%;height:100%" height="100%"
style="width: 100%; height: 100%"
height="100%"
ref="multipleTable"
:data="tableData"
@selection-change="handleSelectionChange"
>
<el-table-column type="index" width="120" label="序号"></el-table-column>
<el-table-column
type="index"
width="120"
label="序号"
></el-table-column>
<el-table-column label="展板名称" prop="name"></el-table-column>
<el-table-column label="提交人" prop="userName"></el-table-column>
<el-table-column label="提交日期" prop="createTime"></el-table-column>
......@@ -50,7 +71,9 @@
<span v-if="scope.row.status === 'TBC'">待初审</span>
<span v-else-if="scope.row.status === 'REFUSED'">已驳回</span>
<span v-else-if="scope.row.status === 'TBCA'">待复审</span>
<span v-else-if="scope.row.status === 'APPROVED_FINAL'">通过</span>
<span v-else-if="scope.row.status === 'APPROVED_FINAL'"
>通过</span
>
</template>
</el-table-column>
<el-table-column label="操作" header-align="center" align="center">
......@@ -100,7 +123,13 @@
</div>
</div>
<!--新增弹框-->
<el-dialog title="新建" custom-class="party-dialog" width="468px" :visible.sync="FormVisible1" :before-close="close1">
<el-dialog
title="新建"
custom-class="party-dialog"
width="468px"
:visible.sync="FormVisible1"
:before-close="close1"
>
<div class="dialog-content">
<el-form
:model="classForm"
......@@ -117,55 +146,80 @@
</el-form>
</div>
<div slot="footer" class="dialog-footer btn-group">
<el-button size="mini" type="primary" @click="permisSave">确定</el-button>
<el-button size="mini" type="primary" @click="permisSave"
>确定</el-button
>
<!-- <el-button size="mini" v-show="!type" type="primary" @click="permisEdit">确定</el-button> -->
<el-button size="mini" @click="close1">取 消</el-button>
</div>
</el-dialog>
<!--请填写驳回原因-->
<el-dialog custom-class="party-dialog" title="展板详情" width="468px" :visible.sync="FormVisible" :before-close="close" >
<el-dialog
custom-class="party-dialog"
title="展板详情"
width="468px"
:visible.sync="FormVisible"
:before-close="close"
>
<div class="dialog-content">
<el-form :model="editForm" disabled class="party-form" ref="editForm" label-width="80px" label-position="top" :rules="rules">
<el-form
:model="editForm"
disabled
class="party-form"
ref="editForm"
label-width="80px"
label-position="top"
:rules="rules"
>
<el-form-item label="展板名称" :label-width="formLabelWidth">
<el-input
size="small"
v-model="editForm.name"
auto-complete="off"
clearable
></el-input>
</el-form-item>
<el-form-item label="版权方" :label-width="formLabelWidth">
<el-input
size="small"
v-model="editForm.menuName"
v-model="editForm.boardCopyrightOwnerName"
auto-complete="off"
clearable
onkeyup="this.value=this.value.replace(/^ +| +$/g,'')"
></el-input>
</el-form-item>
<el-form-item label="宣传图" :label-width="formLabelWidth">
<img class="imgSize" :src="editForm.cover" alt="">
<img class="imgSize" :src="editForm.cover" alt="" />
</el-form-item>
<el-form-item label="简介" :label-width="formLabelWidth">
<el-input type="textarea" v-model="editForm.remarks"></el-input>
</el-form-item>
<el-form-item label="展板视频" :label-width="formLabelWidth">
<div>
<img class="iconImg" src="" alt="">
<span>xxx.mp4</span>
<div class="video-box">
<div
class="video-item"
v-for="(item, index) in editForm.videoList"
:key="index"
>
<video :src="item.fileUrl" controls />
<span>{{ item.fileName }}</span>
</div>
</div>
</el-form-item>
<el-form-item label="展板音频" :label-width="formLabelWidth">
<div>
<img class="iconImg" src="" alt="">
<span>xxx.mp3</span>
<div class="audio-box">
<div
class="audio-item"
v-for="(item, index) in editForm.audioList"
:key="index"
>
<audio :src="item.fileUrl" controls />
<span>{{ item.fileName }}</span>
</div>
</div>
</el-form-item>
</el-form>
</div>
<div slot="footer" class="dialog-footer btn-group">
<!-- <el-button size="mini" type="primary" @click="submitForm('editForm')">确定</el-button> -->
<el-button size="mini" type="primary" @click="close">关闭</el-button>
</div>
</el-dialog>
......@@ -184,8 +238,7 @@ export default {
}
};
return {
type:true,
type: true,
value1: "",
page: { currentPage: 1, pageSize: 10, total: 0 },
tableData: [],
......@@ -194,39 +247,39 @@ export default {
formLabelWidth: "100px",
form: {
name: "",
type:"EXHIBITION_BOARD"
type: "EXHIBITION_BOARD",
},
editForm: {
name:"",
cover:'',
sort:""
name: "",
cover: "",
sort: "",
},
classForm: {
status:"",
remarks:"",
id: ""
status: "",
remarks: "",
id: "",
},
typeList: [],
rules: {
sort: [
{ required: true, message: "请输入顺序值", trigger: "change" },
{ pattern: /^(\d{1,5})?$/, message: "排序值为低于5位数的纯数字" }
{ pattern: /^(\d{1,5})?$/, message: "排序值为低于5位数的纯数字" },
],
menuName: [
{ required: true, message: "请输入菜单名称", trigger: "change" },
{ max: 20, message: "不能超过20个字符", trigger: "change" },
{ validator: checkIsNull, trigger: "blur" }
{ validator: checkIsNull, trigger: "blur" },
],
menuUrl: [
{ required: true, message: "请输入菜单地址", trigger: "change" },
{ validator: checkIsNull, trigger: "blur" }
{ validator: checkIsNull, trigger: "blur" },
],
parentId: [
{ required: true, message: "请输入父级菜单", trigger: "change" }
]
{ required: true, message: "请输入父级菜单", trigger: "change" },
],
},
value: "",
name: ""
name: "",
};
},
computed: {},
......@@ -242,9 +295,9 @@ export default {
vm.$https({
method: "get",
url: "menu/getRoleMenu?roleId=" + sessionStorage.getItem("roleId"),
authType: this.backToken
authType: this.backToken,
}).then(
res => {
(res) => {
let data = res.data;
vm.typeList = data.map((e, i) => {
return {
......@@ -252,11 +305,11 @@ export default {
name:
e.menuName.indexOf("-") == -1
? e.menuName
: e.menuName.split("-")[1]
: e.menuName.split("-")[1],
};
});
},
error => {
(error) => {
console.log(error);
}
);
......@@ -268,18 +321,18 @@ export default {
{
url: "audit/getPageAllList",
method: "get",
authType: this.backToken
authType: this.backToken,
},
// vm.$qs.stringify(param)
param
)
.then(res => {
.then((res) => {
let data = res.data.data;
vm.page.pageSize = data.size;
vm.page.total = data.total;
vm.tableData = data.records;
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
......@@ -301,23 +354,23 @@ export default {
_index: 1,
_size: _this.page.pageSize,
name: _this.form.name,
status:_this.form.status,
type:"EXHIBITION_BOARD"
status: _this.form.status,
type: "EXHIBITION_BOARD",
};
this.getTableData(searchObj);
},
// 重置
Reset(){
Reset() {
// this.$refs["form"].resetFields();
this.form = {type:"EXHIBITION_BOARD"}
this.Search()
this.form = { type: "EXHIBITION_BOARD" };
this.Search();
},
// // 获取当前查询参数
getSearchQuery() {
let _this = this;
let searchObj = {
_index: _this.page.currentPage,
_size: _this.page.pageSize
_size: _this.page.pageSize,
};
for (let key in _this.form) {
if (_this.form[key]) {
......@@ -329,28 +382,32 @@ export default {
// 添加
addPermis() {
// this.$router.push({ path: "videoContentAdd", query: { type: "add" } });
$('.el-dialog__title').html('新建');
$(".el-dialog__title").html("新建");
this.FormVisible1 = true;
this.type = true
this.type = true;
},
// 请填写驳回原因视频分类确认保存
permisEdit() {
let _this = this;
_this.$refs.classForm.validate(valid => {
_this.$refs.classForm.validate((valid) => {
if (valid) {
_this
.$https(
{ url: "videoContentCat/update", method: "put", authType: this.backToken },
{
url: "videoContentCat/update",
method: "put",
authType: this.backToken,
},
_this.$qs.stringify(_this.classForm)
// _this.classForm
)
.then(
res => {
(res) => {
if (res.data.resultCode == 200 || res.data.resultCode == 201) {
_this.$message({
type: "success",
message: '新建成功!'
message: "新建成功!",
});
//跳回用户列表
_this.onSearch();
......@@ -362,14 +419,14 @@ export default {
} else {
_this.$message({
type: "error",
message: res.data.msg
message: res.data.msg,
});
}
},
error => {
(error) => {
_this.$message({
type: "error",
message: error
message: error,
});
}
);
......@@ -395,19 +452,19 @@ export default {
this.$refs["classForm"].resetFields();
},
// 通过
adopt(row){
this.classForm.id= row.id
this.classForm.status = "APPROVED_FINAL"
this.classForm.remarks = ""
this.permisSave('classForm')
adopt(row) {
this.classForm.id = row.id;
this.classForm.status = "APPROVED_FINAL";
this.classForm.remarks = "";
this.permisSave("classForm");
},
// 请填写驳回原因弹框
reject(row) {
this.type = false
$('.el-dialog__title').html('请填写驳回原因');
let _this=this;
_this.classForm.id= row.id
_this.classForm.status = "REFUSED"
this.type = false;
$(".el-dialog__title").html("请填写驳回原因");
let _this = this;
_this.classForm.id = row.id;
_this.classForm.status = "REFUSED";
_this.FormVisible1 = true;
},
// 驳回原因保存
......@@ -415,21 +472,21 @@ export default {
let _this = this;
_this
.$https(
{ url: "audit/updateAuditAllById",
headers:{'Content-Type': 'application/json'},
{
url: "audit/updateAuditAllById",
headers: { "Content-Type": "application/json" },
method: "put",
authType: this.backToken,
},
// _this.$qs.stringify(_this.classForm)
_this.classForm
)
.then(
res => {
(res) => {
if (res.data.resultCode == 200 || res.data.resultCode == 201) {
_this.$message({
type: "success",
message: '操作成功!'
message: "操作成功!",
});
//跳回用户列表
_this.onSearch();
......@@ -441,14 +498,14 @@ export default {
} else {
_this.$message({
type: "error",
message: res.data.msg
message: res.data.msg,
});
}
},
error => {
(error) => {
_this.$message({
type: "error",
message: error
message: error,
});
}
);
......@@ -459,31 +516,29 @@ export default {
// });
},
// 获取视频分类详情
getAssetTypeInfo(id){
getAssetTypeInfo(id) {
let vm = this;
vm.$https(
{
url: "videoContentCat/get/" + id,
method: "get",
authType: this.backToken
},
authType: this.backToken,
}
// param
)
.then(res => {
.then((res) => {
let data = res.data.data;
this.classForm = data
this.classForm = data;
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
openDetails(row) {
let _this = this;
_this.FormVisible = true;
_this.getInfo(row.refItemId)
$('.el-dialog__title').html( row.name +'展板详情');
_this.getInfo(row.refItemId);
$(".el-dialog__title").html(row.name + "展板详情");
},
// 获取版权方详情
getInfo(id) {
......@@ -492,16 +547,16 @@ export default {
{
url: "exhibitionBoard/get/" + id,
method: "get",
authType: this.backToken
authType: this.backToken,
}
// param
)
.then(res => {
let data = res.data.data;
// this.editForm = data
.then((res) => {
let resData = res.data.data;
this.editForm = resData;
// this.ruleForm = data;
// this.ruleForm = {
// assetCopyrightOwnerId :data.assetCopyrightOwnerId,
// videoContentCopyrightOwnerId :data.videoContentCopyrightOwnerId,
// assetId:data.assetId,
// assetTypeId:data.assetTypeId,
// boardCopyrightOwnerId:data.boardCopyrightOwnerId,
......@@ -517,9 +572,8 @@ export default {
// materialUrlList:data.materialUrlList
// }
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
......@@ -529,20 +583,27 @@ export default {
this.$confirm("此操作将永久删除, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
type: "warning",
})
.then(() => {
_this.$https({
method: 'delete',
url: 'videoContentCat/delete/'+ row.id,
authType: this.backToken
}).then((res) => {
this.$message({type: 'success', message: '删除成功!'});
_this
.$https({
method: "delete",
url: "videoContentCat/delete/" + row.id,
authType: this.backToken,
})
.then(
(res) => {
this.$message({ type: "success", message: "删除成功!" });
_this.Search();
}, (error) => {
this.$message({type: 'fail', message: "删除失败!" + error.response.data});
},
(error) => {
this.$message({
type: "fail",
message: "删除失败!" + error.response.data,
});
}
)
);
})
.catch(() => {});
},
......@@ -608,7 +669,7 @@ export default {
let arr = [];
let str = "";
if (_this.selection) {
_this.selection.forEach(function(e) {
_this.selection.forEach(function (e) {
arr.push(e.id);
});
str = arr.join(",");
......@@ -625,45 +686,45 @@ export default {
this.$confirm("此操作将删除选中菜单, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
type: "warning",
}).then(() => {
_this
.$https({
url: "menu/batchDel?menuIds=" + str,
method: "DELETE",
authType: this.backToken
authType: this.backToken,
})
.then(
res => {
(res) => {
if (res.data.status == 201 || res.data.status == 200) {
this.$message({
type: "success",
message: "删除成功!"
message: "删除成功!",
});
}
//重新查询数据
_this.onSearch();
},
error => {}
(error) => {}
);
});
} else {
this.$message({
type: "info",
message: "请至少选择一个选项!"
message: "请至少选择一个选项!",
});
}
}
}
},
},
};
</script>
<style lang="less">
.imgSize{
.imgSize {
width: 160px;
height: 100px;
}
.iconImg{
.iconImg {
height: 32px;
width: 32px;
margin-right: 8px;
......@@ -671,6 +732,14 @@ export default {
// @import "../../../../style/common";
// @import "../../style/list";
@import "../../../style/dialog.less";
@import '../../../style/table.less';
@import '../../../style/pagination.less';
@import "../../../style/table.less";
@import "../../../style/pagination.less";
.video-box {
width: 100%;
.video-item { width: 100%;}
video {width: 100%;height: 200px;}
}
audio:focus{
outline: none;
}
</style>
......@@ -10,59 +10,75 @@
label-position="top"
>
<el-form-item label="学习内容名称" class="w50">
xxxxxxx
<!-- <el-input v-model="formInline.user" placeholder="审批人"></el-input> -->
<span>{{ formInline.name }}</span>
</el-form-item>
<el-form-item label="学习内容宣传图" class="w50">
<img class="imgSize" src alt />
<img class="imgSize" :src="formInline.cover" alt />
</el-form-item>
</el-form>
<el-collapse v-model="activeNames" @change="handleChange">
<el-collapse-item title="展板名称:建党伟业" name="1">
<el-collapse-item
v-for="(item, index) in formInline.exhibitionBoardList"
:key="index"
:title="item.name"
>
<el-form
class="demo-form-inline"
:inline="true"
:model="formInline"
label-position="top"
>
<el-form-item label="展板宣传图">
<img class="imgSize" :src="item.cover" alt />
</el-form-item>
<el-form-item label="展板版权方">
xxxxxxx
<span>{{ item.boardCopyrightOwnerName }}</span>
</el-form-item>
<el-form-item label="展板宣传图" class="w100">
<img class="imgSize" src alt />
<el-form-item label="展板名称" class="w50">
<span>{{ item.name }}</span>
</el-form-item>
<el-form-item label="展板简介">
各区域为夫妻房我发给各区域为夫妻房我发给各区域为夫妻房我发给各区域为夫妻房我发给各区域为夫妻房我发给各区域为夫妻房我发给各区域为夫妻房我发给
<!-- <el-input type="textarea" v-model="formInline.remarks"></el-input> -->
<span>{{ item.remarks }}</span>
</el-form-item>
<el-form-item label="展板视频" class="w100">
<div>
<img class="iconImg" src alt />
<span>xxx.mp4</span>
<div class="video-box">
<div
class="video-item"
v-for="(vi, index) in item.videoList"
:key="index"
>
<video :src="vi.fileUrl" controls />
<span>{{ vi.fileName }}</span>
</div>
</div>
</el-form-item>
<el-form-item label="展板音频">
<div>
<img class="iconImg" src alt />
<span>xxx.mp3</span>
<div class="audio-box">
<div
class="audio-item"
v-for="(au, index) in item.audioList"
:key="index"
>
<audio :src="au.fileUrl" controls />
<span>{{ au.fileName }}</span>
</div>
</div>
</el-form-item>
</el-form>
</el-collapse-item>
<el-collapse-item title="改革之路" name="2">
<div>与现实生活一致:与现实生活的流程、逻辑保持一致,遵循用户习惯的语言和概念;</div>
<div>在界面中一致:所有的元素和结构需保持一致,比如:设计样式、图标和文本、元素的位置等。</div>
</el-collapse-item>
<el-collapse-item title="伟大复兴" name="3"></el-collapse-item>
<el-collapse-item title="辉煌成就" name="4"></el-collapse-item>
</el-collapse>
</div>
</div>
<div class="info-footer">
<div class="btn-group">
<el-button size="mini" type="primary" class="btn_form_search" @click="close">关闭</el-button>
<el-button
size="mini"
type="primary"
class="btn_form_search"
@click="close"
>关闭</el-button
>
</div>
</div>
</div>
......@@ -72,15 +88,12 @@
export default {
data() {
return {
activeNames: ["1"],
formInline: {
user: "",
region: ""
}
activeNames: [1],
formInline: {},
};
},
mounted(){
this.init()
mounted() {
this.init();
},
methods: {
init() {
......@@ -93,18 +106,16 @@ export default {
{
url: "learningContent/get/" + id,
method: "get",
authType: this.backToken
authType: this.backToken,
}
// param
)
.then(res => {
.then((res) => {
let data = res.data.data;
this.ruleForm = data;
console.log(this.ruleForm)
vm.formInline = data;
console.log(this.ruleForm);
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
......@@ -113,11 +124,30 @@ export default {
},
handleChange(val) {
console.log(val);
}
}
},
},
};
</script>
<style lang="less">
.video-box {
width: 100%;
.video-item {
width: 100%;
}
video {
width: 100%;
height: 200px;
}
}
audio:focus {
outline: none;
}
.audio-item{
display: flex;
align-items: center;
span{
margin-left: 30px;
}
}
</style>
\ No newline at end of file
......@@ -87,7 +87,6 @@
</div>
<div class="partyt-pagination">
<el-pagination
small
background
@current-change="handleCurrentChange"
:current-page="page.currentPage"
......
......@@ -417,10 +417,10 @@ export default {
// }
// _this.editform= Object.assign({}, row);
_this.FormVisible1 = true;
this.getAssetTypeInfo(row.id)
this.getVideoContentCatInfo(row.id)
},
// 获取展板分类详情
getAssetTypeInfo(id){
getVideoContentCatInfo(id){
let vm = this;
vm.$https(
{
......
......@@ -75,7 +75,7 @@
<el-select
placeholder="请选择视频版权方"
@focus="getAssetCopyrightData"
v-model="ruleForm.assetCopyrightOwnerId"
v-model="ruleForm.videoContentCopyrightOwnerId"
>
<el-option
v-for="item in copyrightOwner"
......@@ -88,9 +88,9 @@
<el-form-item label="请选择预设视频分类">
<el-select
placeholder="请选择预设视频分类"
@focus="getAssetTypeData"
v-model="ruleForm.assetTypeId"
@change="getAssetType"
@focus="getVideoContentCatData"
v-model="ruleForm.videoContentCatId"
@change="getVideoContentCat"
>
<el-option
v-for="item in videoContentCat"
......@@ -104,10 +104,10 @@
<el-select
placeholder="请选择视频"
@focus="getVideoData"
v-model="ruleForm.assetId"
v-model="ruleForm.videoContentId"
>
<el-option
v-for="item in assetId"
v-for="item in videoContentId"
:label="item.name"
:value="item.id"
:key="item.id"
......@@ -162,7 +162,7 @@ export default {
copyrightOwner: [],
boardCopyrightOwnerId:[],
exhibitionBoardCatId:[],
assetId:[],
videoContentId:[],
type: this.$route.query.type,
dialogVisible: false,
formLabelWidth: "100px",
......@@ -174,8 +174,8 @@ export default {
ruleForm: {
name: "",
boardCopyrightOwnerId:"",
assetCopyrightOwnerId: "",
assetTypeId: "",
videoContentCopyrightOwnerId: "",
videoContentCatId: "",
videoUrlList: []
},
videoContentCat: [
......@@ -234,7 +234,7 @@ export default {
},
// 视频版权方名称id
videoCopyright(idlist) {
this.ruleForm.assetCopyrightOwnerId = idlist;
this.ruleForm.videoContentCopyrightOwnerId = idlist;
},
// 缩略图地址
imgUrl(url) {
......@@ -249,14 +249,14 @@ export default {
videoList(list) {
this.ruleForm.videoUrlList = list;
},
getAssetType(data) {
getVideoContentCat(data) {
console.log(data);
console.log(this.ruleForm.assetTypeId);
console.log(this.ruleForm.videoContentCatId);
},
init() {
if (this.$route.query.type === "Update") {
this.getInfo(this.$route.query.id);
this.getAssetTypeData();
this.getVideoContentCatData();
this.getAssetCopyrightData();
this.getExhibitionBoardCatId();
this.getBoardCopyrightOwnerId();
......@@ -279,9 +279,9 @@ export default {
// this.ruleForm = data;
console.log(this.ruleForm)
this.ruleForm = {
assetCopyrightOwnerId :data.assetCopyrightOwnerId,
assetId:data.assetId,
assetTypeId:data.assetTypeId,
videoContentCopyrightOwnerId :data.videoContentCopyrightOwnerId,
videoContentId:data.videoContentId,
videoContentCatId:data.videoContentCatId,
boardCopyrightOwnerId:data.boardCopyrightOwnerId,
cover:data.cover,
exhibitionBoardCatId:data.exhibitionBoardCatId,
......@@ -454,7 +454,7 @@ export default {
});
},
// 获取视频分类列表
getAssetTypeData() {
getVideoContentCatData() {
let vm = this;
vm.$https({
url: "videoContentCat/getList",
......@@ -479,7 +479,7 @@ export default {
})
.then(res => {
let data = res.data.data;
this.assetId = data;
this.videoContentId = data;
})
.catch(function(err) {
console.log(err);
......
<template>
<div class="info">
<div class="info-header">学习内容详情</div>
<div class="info info-board">
<div class="info-header">展板内容详情</div>
<div class="page-tip">
<span class="tip-title">页面说明:</span>
<span
>可查看某块展板包含的所有文字及文件信息,视频及文档材料可下载到本地观看。</span
>
</div>
<div class="info-container">
<div class="info-wrapper">
<el-collapse v-model="activeNames" @change="handleChange">
<el-collapse v-model="activeNames">
<el-collapse-item title="审核意见" name="1">
<el-form
class="demo-form-inline"
:inline="true"
:model="formInline"
:model="reviewData"
label-position="top"
>
<el-form-item label="审核层级" class="w100">
<span class="w50 l-float">
<strong>初审</strong> 2021/02/02
<strong>初审</strong>{{ reviewData.firstTime }}
</span>
<span class="w50">
<strong>复审</strong> 2021/02/23
<strong>复审</strong>{{ reviewData.secondTime }}
</span>
</el-form-item>
<el-form-item label="审核结果" class="w50">驳回</el-form-item>
<el-form-item label="审核结果" class="w50">{{
keyMap[reviewData.status]
}}</el-form-item>
<el-form-item
label="驳回原因"
>各区域为夫妻房我发给各区域为夫妻房我发给各区域为夫妻房我发给各区域为夫妻房我发给各区域为夫妻房我发给各区域为夫妻房我发给各区域为夫妻房我发给
</el-form-item>
v-if="reviewData.status === 'REFUSED'"
>{{
reviewData.firstRemarks || reviewData.secondRemarks
}}</el-form-item
>
</el-form>
</el-collapse-item>
<el-collapse-item title="展板基本信息" name="2">
<el-form
class="demo-form-inline"
:inline="true"
:model="formInline"
:model="contentData"
label-position="top"
>
<el-form-item label="版权方" class="w50">xxxxxxx</el-form-item>
<el-form-item label="创建时间" >2021/02/23</el-form-item>
<el-form-item label="展板分类" class="w50">反腐类</el-form-item>
<el-form-item label="上架情况" >已上架</el-form-item>
<el-form-item label="审核情况" class="w50">已审核</el-form-item>
<el-form-item label="版权方" class="w50">{{
contentData.boardCopyrightOwnerName
}}</el-form-item>
<el-form-item label="创建时间">{{
contentData.createTime
}}</el-form-item>
<el-form-item label="展板分类" class="w50">{{
contentData.createTime
}}</el-form-item>
<el-form-item label="上架情况">{{
contentData.published ? "已上架" : "未上架"
}}</el-form-item>
<el-form-item label="审核情况" class="w50">{{
keyMap[contentData.auditStatus]
}}</el-form-item>
<el-form-item label="展板图片" class="w50">
<img class="imgSize" src alt />
</el-form-item>
<el-form-item
label="展板简介"
>各区域为夫妻房我发给各区域为夫妻房我发给各区域为夫妻房我发给各区域为夫妻房我发给各区域为夫妻房我发给各区域为夫妻房我发给各区域为夫妻房我发给
<img class="imgSize" :src="contentData.cover" />
</el-form-item>
<el-form-item label="展板简介">{{
contentData.remarks
}}</el-form-item>
</el-form>
</el-collapse-item>
<el-collapse-item title="展板影音信息" name="3">
<el-form
class="demo-form-inline"
:inline="true"
:model="formInline"
:model="contentData"
label-position="top"
>
<el-form-item label="展板视频" class="w100">
<div>
<img class="iconImg" src alt />
<span>xxx.mp4</span>
<img class="iconImg" src alt />
<span>xxx.mp4</span>
<div v-if="contentData.videoList.length">
<span
class="file-box"
v-for="(s, i) in contentData.videoList"
:key="i"
>
<video
controls
width="100%"
height="100%"
poster="images/applets/video.png"
>
<source :src="s.fileUrl" />
</video>
<span>{{ s.fileName }}</span>
</span>
</div>
<div v-else>暂无数据</div>
</el-form-item>
<el-form-item label="展板音频">
<div>
<img class="iconImg" src alt />
<span>xxx.mp3</span>
<div v-if="contentData.audioList.length">
<span
class="file-box"
v-for="(s, i) in contentData.audioList"
:key="i"
>
<audio
controls
width="100%"
height="100%"
poster="images/applets/audio.png"
>
<source :src="s.fileUrl" />
</audio>
<span>{{ s.fileName }}</span>
</span>
</div>
<div v-else>暂无数据</div>
</el-form-item>
<el-form-item label="展板图片" class="w100">
<img class="imgSize" src alt />
<img class="imgSize" src alt />
<img class="imgSize" src alt />
<img class="imgSize" src alt />
<div v-if="contentData.imagesList.length">
<span
class="file-box"
v-for="(s, i) in contentData.imagesList"
:key="i"
>
<img class="imgSize" :src="s.fileUrl" alt />
<span>{{ s.fileName }}</span>
</span>
</div>
<div v-else>暂无数据</div>
</el-form-item>
<el-form-item label="展板文档">
<div>
<img class="iconImg" src alt />
<span>xxx.pdf</span>
<el-form-item label="展板文档(可点击查看或下载查看)" class="w100">
<div v-if="contentData.dirList.length">
<span
class="dir-box"
v-for="(s, i) in contentData.dirList"
:key="i"
@click="reviewFile(s)"
>
<img
v-if="s.fileExtName === 'pdf'"
src="@/assets/pdf-icon.png"
alt=""
/>
<img
v-if="s.fileExtName === 'pptx'"
src="@/assets/ppt-icon.png"
alt=""
/>
<img
v-if="s.fileExtName === 'docx'"
src="@/assets/doc-icon.png"
alt=""
/>
<img
v-if="s.fileExtName === 'mp4'"
src="@/assets/video-icon.png"
alt=""
/>
<img
v-if="s.fileExtName === 'mp3'"
src="@/assets/audio-icon.png"
alt=""
/>
<img
v-if="s.fileExtName === 'xls'"
src="@/assets/excel-icon.png"
alt=""
/>
<span><a target="_blank" :href="s.fileUrl">{{ s.fileName }}</a></span>
</span>
</div>
<div v-else>暂无数据</div>
</el-form-item>
</el-form>
</el-collapse-item>
......@@ -89,7 +178,13 @@
<div class="info-footer">
<div class="btn-group">
<!-- 确定、取消 -->
<el-button size="mini" type="primary" class="btn_form_search" @click="close">关闭</el-button>
<el-button
size="mini"
type="primary"
class="btn_form_search"
@click="close"
>关闭</el-button
>
</div>
</div>
</div>
......@@ -98,62 +193,152 @@
<script>
export default {
data() {
const keyMap = {
TBC: "待初审",
REFUSED: "已驳回",
TBCA: "待复审",
APPROVED_FINAL: "通过",
};
return {
tableData: [
{
id: "1",
name: "1"
id: "",
activeNames: ["1", "2", "3"],
keyMap: keyMap,
contentData: {},
reviewData: {},
};
},
{
id: "2",
name: "2"
mounted() {
this.id = this.$route.query.id;
this.getReviewById();
this.getContentById();
},
{
id: "3",
name: "3"
methods: {
getContentById() {
let vm = this;
vm.$https({
url: "exhibitionBoard/get/" + this.id,
method: "get",
authType: this.backToken,
})
.then((res) => {
if (res.data.resultCode === "200") {
vm.contentData = res.data.data;
vm.contentData.imagesList = [];
vm.contentData.dirList = [];
vm.contentData.datumList.forEach((item) => {
if (item.fileType === "IMAGE") {
vm.contentData.imagesList.push(item);
} else {
vm.contentData.dirList.push(item);
}
],
activeNames: ["1","2","3"],
formInline: {
user: "",
region: ""
});
} else {
this.$message.error(res.data.message);
}
})
.catch(function (err) {
console.log(err);
});
},
getReviewById() {
let vm = this;
const param = {
id: this.id,
type: "EXHIBITION_BOARD",
};
vm.$https(
{
url: "audit/getById",
method: "get",
authType: this.backToken,
},
param
)
.then((res) => {
if (res.data.resultCode === "200") {
vm.reviewData = res.data.data || {};
} else {
this.$message.error(res.data.message);
}
})
.catch(function (err) {
console.log(err);
});
},
reviewFile() {
console.log("点击预览。。。");
// const _this = this;
// this.$confirm("确定要下载该文件?", "提示", {
// confirmButtonText: "确定",
// cancelButtonText: "取消",
// type: "warning",
// center: true,
// })
// .then(() => {
// this.updateVersion(row);
// })
// .catch(() => {
// this.$message("已取消");
// });
},
methods: {
close() {
history.go(-1);
this.$router.go(-1);
},
handleChange(val) {
console.log(val);
},
moveUpward(row, index) {
if (index > 0) {
let upData = this.tableData[index - 1];
this.tableData.splice(index - 1, 1);
this.tableData.splice(index, 0, upData);
} else {
this.$message({
message: "已经是第一条,上移失败",
type: "warning"
});
};
</script>
<style lang="less" scoped>
.info-board {
.file-box {
display: inline-block;
width: 180px;
height: 180px;
margin: 0 10px;
}
},
moveDown(row, index) {
if (index + 1 == this.tableData.length) {
this.$message({
message: "已经是最后一条,下移失败",
type: "warning"
});
} else {
let downData = this.tableData[index + 1];
this.tableData.splice(index + 1, 1);
this.tableData.splice(index, 0, downData);
/deep/.el-collapse-item__wrap {
padding: 16px;
}
/deep/.el-collapse-item__header {
position: relative;
padding-left: 20px;
font-size: 18px;
color: #333;
&::before {
content: "";
position: absolute;
top: 14px;
left: 0px;
width: 4px;
height: 18px;
background: #000;
}
}
};
</script>
<style lang="less">
.page-tip {
width: 640px;
background: #f7f5f2;
border-radius: 8px;
padding: 16px 20px;
margin: 20px auto;
font-size: 14px;
color: #333333;
.tip-title {
font-weight: 700;
margin-right: 5px;
}
}
.dir-box {
display: block;
width: 100%;
height: 96px;
img {
width: 96px;
height: 96px;
vertical-align: middle;
}
span {
margin-left: 10px;
line-height: 96px;
}
}
}
</style>
\ No newline at end of file
......@@ -46,7 +46,7 @@
>
<el-table-column type="index" width="120" label="序号"></el-table-column>
<el-table-column show-overflow-tooltip label="版权方名称" prop="name"></el-table-column>
<el-table-column show-overflow-tooltip label="展板分类" prop="assetTypeNames"></el-table-column>
<el-table-column show-overflow-tooltip label="展板分类" prop="exhibitionBoardCatNames"></el-table-column>
<el-table-column label="创建时间" prop="createTime"></el-table-column>
<el-table-column label="版权方有效期" prop="expireDateEnd"></el-table-column>
<el-table-column show-overflow-tooltip label="备注" prop="remarks"></el-table-column>
......
......@@ -445,10 +445,10 @@ export default {
// }
// _this.editform= Object.assign({}, row);
_this.FormVisible1 = true;
this.getAssetTypeInfo(row.id)
this.getVideoContentCatInfo(row.id)
},
// 获取视频分类详情
getAssetTypeInfo(id){
getVideoContentCatInfo(id){
let vm = this;
vm.$https(
{
......
......@@ -88,12 +88,11 @@
style="width: 100%;height:300px;overflow:auto;"
height="100%"
ref="multipleTable"
:data="tableData"
>
:data="tableData">
<el-table-column type="selection" width="55" ></el-table-column>
<el-table-column type="index" width="120" label="序号"></el-table-column>
<el-table-column show-overflow-tooltip label="版权方名称" prop="name"></el-table-column>
<el-table-column show-overflow-tooltip label="展板类别" prop="assetCopyrightOwnerName"></el-table-column>
<el-table-column show-overflow-tooltip label="展板类别" prop="exhibitionBoardCatName"></el-table-column>
<el-table-column show-overflow-tooltip label="展板版权方" prop="boardCopyrightOwnerName"></el-table-column>
<el-table-column label="操作" width="180">
<template slot-scope="scope">
......
......@@ -45,7 +45,7 @@
<el-select
placeholder="请选择视频版权方"
@focus="getAssetCopyrightData"
v-model="ruleForm.assetCopyrightOwnerId"
v-model="ruleForm.videoContentCopyrightOwnerId"
>
<el-option
v-for="item in copyrightOwner"
......@@ -163,7 +163,7 @@ export default {
value1: [],
ruleForm: {
name: "",
assetCopyrightOwnerId:"",
videoContentCopyrightOwnerId:"",
assetTypeId: "",
thumbnail:"",
videoUrlList:[]
......@@ -227,7 +227,7 @@ export default {
methods: {
// 视频版权方名称id
videoCopyright(idlist){
this.ruleForm.assetCopyrightOwnerId = idlist
this.ruleForm.videoContentCopyrightOwnerId = idlist
},
// 缩略图地址
imgUrl(url){
......@@ -265,7 +265,7 @@ export default {
// this.ruleForm = data;
this.ruleForm.id = data.id
this.ruleForm.name = data.name
this.ruleForm.assetCopyrightOwnerId = data.assetCopyrightOwnerId
this.ruleForm.videoContentCopyrightOwnerId = data.videoContentCopyrightOwnerId
this.ruleForm.assetTypeId = data.assetTypeId
this.ruleForm.thumbnail = data.thumbnail
this.ruleForm.videoUrlList = data.videoUrlList
......@@ -324,7 +324,7 @@ export default {
// 新增
submitForm(formName) {
this.$refs[formName].validate(valid => {
// this.ruleForm.assetCopyrightOwnerId = ["1373225989501456385"]
// this.ruleForm.videoContentCopyrightOwnerId = ["1373225989501456385"]
// this.ruleForm.assetTypeIdList = []
// this.ruleForm.videoUrlList = [
// "http://111.203.232.175:8085/group1/M00/00/39/wKhuVWBgIvaANgtZAAAAAAAAAAA947.mp4"
......
......@@ -39,6 +39,7 @@
>
<el-table-column type="index" width="120" label="序号"></el-table-column>
<el-table-column show-overflow-tooltip label="视频名称" prop="name"></el-table-column>
<<<<<<< HEAD
<el-table-column show-overflow-tooltip label="版权方" prop="assetCopyrightOwnerName"></el-table-column>
<el-table-column label="视频分类" prop="assetTypeName"></el-table-column>
<el-table-column label="审核状态" prop="auditStatus">
......@@ -49,6 +50,18 @@
<span v-else-if="scope.row.auditStatus === 'APPROVED_FINAL'">通过</span>
</template>
</el-table-column>
=======
<el-table-column show-overflow-tooltip label="版权方" prop="videoContentCopyrightOwnerName"></el-table-column>
<el-table-column label="视频分类" prop="videoContentCatName"></el-table-column>
<el-table-column label="审核状态" prop="auditStatus">
<template slot-scope="scope">
<span v-if="scope.row.auditStatus === 'TBC'">待初审</span>
<span v-else-if="scope.row.auditStatus === 'REFUSED'">已驳回</span>
<span v-else-if="scope.row.auditStatus === 'TBCA'">待复审</span>
<span v-else-if="scope.row.auditStatus === 'APPROVED_FINAL'">通过</span>
</template>
</el-table-column>
>>>>>>> master
<el-table-column label="操作" header-align="center" align="center">
<template slot-scope="scope" width="220">
<div class="table-btn-group">
......@@ -159,7 +172,7 @@
<!--查看详情-->
<el-dialog
custom-class="party-dialog"
title="查看详情"
title="审核详情"
width="468px"
:visible.sync="FormVisible"
:before-close="close"
......@@ -171,37 +184,25 @@
class="party-form"
ref="editform"
label-width="80px"
label-position="right"
label-position="top"
:rules="rules"
>
<el-form-item label="审核层级:" :label-width="formLabelWidth">
<el-input size="small" v-model="editform.sort" auto-complete="off" clearable></el-input>
<el-form-item label="初审时间:" :label-width="formLabelWidth">
<span class="input-item">{{editform.firstTime}}</span>
</el-form-item>
<el-form-item label="审核时间:" :label-width="formLabelWidth">
<el-input
size="small"
v-model="editform.menuName"
auto-complete="off"
clearable
onkeyup="this.value=this.value.replace(/^ +| +$/g,'')"
></el-input>
<el-form-item label="复审时间:" :label-width="formLabelWidth">
<span class="input-item">{{editform.secondTime}}</span>
</el-form-item>
<el-form-item label="审核结果:" :label-width="formLabelWidth">
<el-input
size="small"
v-model="editform.menuUrl"
auto-complete="off"
clearable
onkeyup="this.value=this.value.replace(/^ +| +$/g,'')"
></el-input>
<span class="input-item">{{keyMap[editform.status]}}</span>
</el-form-item>
<el-form-item label="驳回原因:" :label-width="formLabelWidth">
<el-input type="textarea" v-model="editform.desc"></el-input>
<el-form-item label="驳回原因:" :label-width="formLabelWidth" v-if="editform.status==='REFUSED'">
<span class="input-item">{{editform.firstRemarks || editform.secondRemarks}}</span>
</el-form-item>
</el-form>
</div>
<div slot="footer" class="dialog-footer btn-group">
<el-button size="mini" type="primary" @click="submitForm('editform')">确定</el-button>
<el-button size="mini" type="primary" @click="close">确定</el-button>
<el-button size="mini" @click="close">取 消</el-button>
</div>
</el-dialog>
......@@ -219,7 +220,9 @@ export default {
}
}
};
const keyMap ={'TBC':'待初审','REFUSED':'已驳回','TBCA':'待复审','APPROVED_FINAL':'通过'}
return {
keyMap:keyMap,
value1: "",
page: { currentPage: 1, pageSize: 10, total: 0 },
tableData: [],
......@@ -229,13 +232,7 @@ export default {
form: {
name: ""
},
editform: {
menuName: "",
menuUrl: "",
parentId: "",
sort: "",
id: ""
},
editform: {},
permisform: {
menuName: "",
menuUrl: "",
......@@ -445,17 +442,21 @@ export default {
// 获取视频分类详情
getAssetInfo(id) {
let vm = this;
const param ={
id:id,
type:'VIDEO_CONTENT'
}
vm.$https(
{
url: "videoContent/get/" + id,
url: "audit/getById",
method: "get",
authType: this.backToken
}
// param
},
param
)
.then(res => {
let data = res.data.data;
this.editform = data;
this.editform = data || {};
})
.catch(function(err) {
console.log(err);
......@@ -495,57 +496,6 @@ export default {
})
.catch(() => {});
},
// 保存编辑信息
submitForm() {
let _this = this;
_this.$refs.editform.validate(valid => {
if (valid) {
let searchObj = {};
for (let key in _this.editform) {
if (this.editform[key]) {
searchObj[key] = _this.editform[key];
}
}
let str = _this.editform.menuName;
let index = str.lastIndexOf("-");
str = str.substring(index + 1, str.length);
searchObj.menuName = str;
_this
.$https(
{
url: "menu/edit",
method: "put",
authType: this.backToken
},
_this.$qs.stringify(searchObj)
)
.then(
res => {
if (res.data.status == 200 || res.data.status == 201) {
_this.$message({
type: "success",
message: res.data.message
});
_this.onSearch();
_this.FormVisible = false;
_this.$refs["editform"].resetFields();
} else {
_this.$message({
type: "error",
message: res.data.message
});
}
},
error => {
_this.$message({
type: "error",
message: error
});
}
);
}
});
},
// 批量操作
handleSelectionChange(selection) {
......@@ -614,4 +564,11 @@ export default {
@import "../../../../style/table.less";
@import "../../../../style/pagination.less";
@import "../../../../style/dialog.less";
.listPage {
.input-item {
font-size: 16px;
color:#333;
}
}
</style>
<template>
<div class="index-container">
<div class="panel-box" v-for="(item,index) in menuList" :key="index">
<div class="index-container">
<div class="panel-box" v-for="(item, index) in menuList" :key="index">
<div class="panel-box-title">
<span class="panel-box-title-wrapper">
<i :class="item.icon" class="panel-box-title-icon"></i>
<span>{{item.name}}</span>
<span>{{ item.name }}</span>
</span>
<div class="panel-box-title-img">
<img :src="requireImg(item.avatar)" alt="">
<img :src="requireImg(item.avatar)" alt="" />
</div>
</div>
<div class="panel-box-content">
<div class="panel-sub-box" v-for="(subItem,subIndex) in item.children" :key="subIndex">
<div
class="panel-sub-box"
v-for="(subItem, subIndex) in item.children"
:key="subIndex"
>
<div class="panel-box-sub-title">
<span class="line"></span>
<span class="panel-box-sub-title_name">{{subItem.name}}</span>
<span class="panel-box-sub-title_name">{{ subItem.name }}</span>
</div>
<ul >
<li v-for="(menu,mIndex) in subItem.children" :key="mIndex" @click="goPage(menu.url)" >
<ul>
<li
v-for="(menu, mIndex) in subItem.children"
:key="mIndex"
@click="goPage(menu.url)"
>
<div :class="menu.color" class="icon-div">
<i :class="menu.icon" class="icon-memu"></i>
</div>
<span class="menu-label">{{menu.name}}</span>
<span class="menu-label">{{ menu.name }}</span>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
// import { menuList } from '@/config/menu'
export default{
export default {
data() {
return{
menuList:[]
}
return {
menuList: [],
};
},
mounted(){
this.menuList = JSON.parse(localStorage.getItem('menuList') || [])
},
methods:{
goPage(path){
if(path){
this.$router.push(path)
mounted() {
let menuList = localStorage.getItem("menuList");
if (menuList) {
this.menuList = JSON.parse(menuList);
} else {
this.menuList = [];
}
},
requireImg(imgSrc){
return require(`@/assets/menu/${imgSrc}`)
}
methods: {
goPage(path) {
if (path) {
this.$router.push(path);
}
}
},
requireImg(imgSrc) {
return require(`@/assets/menu/${imgSrc}`);
},
},
};
</script>
<style lang="less" scoped>
@import '~@/style/menu.less';
@import "~@/style/menu.less";
@media screen and (max-width: 1440px) {
.index-container{ width: 100%; }
.index-container {
width: 100%;
}
}
@media (min-width:1441px) and (max-width:1680px) {
.index-container{ width: 96%; }
@media (min-width: 1441px) and (max-width: 1680px) {
.index-container {
width: 96%;
}
}
@media (min-width:1681px){
.index-container{ width: 92%; }
@media (min-width: 1681px) {
.index-container {
width: 92%;
}
}
.index-container{
.index-container {
margin: 0 auto;
height: 100%;
overflow-y: auto;
.panel-box{
.panel-box {
background: @party-white;
border: 1px solid @party-white;
box-shadow: 0 4px 16px 0 rgba(0,0,0,0.10);
box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.1);
border-radius: 8px;
border-radius: 8px;
margin-bottom: 24px;
display: flex;
padding: 40px 20px 20px 20px;
.panel-box-title{
.panel-box-title {
padding-right: 3.125vw;
}
.panel-box-title-wrapper{
.panel-box-title-icon{
.panel-box-title-wrapper {
.panel-box-title-icon {
display: inline-block;
width: 28px;
height: 28px;
vertical-align: middle;
margin-right: 18px;
}
span{
span {
font-size: 20px;
line-height: 20px;
font-weight: bold;
......@@ -95,35 +114,35 @@ export default{
vertical-align: middle;
}
}
.panel-box-title-img{
.panel-box-title-img {
width: 10.4vw;
height: 10.4vw;
max-width: 200px;
max-height: 200px;
margin-top: 20px;
img{
img {
width: 100%;
height: 100%;
object-fit: cover;
}
}
.panel-box-content{
.panel-box-content {
padding-left: 20px;
display: flex
display: flex;
}
.panel-box-sub-title{
border-bottom:1px solid @party-border-color;
.panel-box-sub-title {
border-bottom: 1px solid @party-border-color;
line-height: 24px;
padding-bottom: 20px;
box-sizing: content-box;
.line{
.line {
display: inline-block;
width: 4px;
height: 18px;
background-color:@party-black;
background-color: @party-black;
vertical-align: middle;
}
.panel-box-sub-title_name{
.panel-box-sub-title_name {
font-size: 18px;
line-height: 18px;
font-weight: bold;
......@@ -131,44 +150,43 @@ export default{
vertical-align: middle;
margin-left: 12px;
}
}
.panel-sub-box{
&:not(:first-child){
.panel-sub-box {
&:not(:first-child) {
margin-left: 3.125vw;
}
ul{
ul {
display: flex;
padding-top: 20px;
margin-left: -20px;
li{
li {
width: 6.67vw;
height:8.33vw ;
height: 8.33vw;
max-width: 128px;
max-height: 160px;
text-align: center;
border-radius: 8px;
color: @font-color;
cursor: pointer;
&:not(:first-child){
&:not(:first-child) {
margin-left: 20px;
}
.icon-div{
.icon-div {
padding-top: 0.94vw;
height: 4.79vw;
width: 4.79vw;
border-radius: 16px;
margin: 0 auto 0.8vw ;
margin: 0 auto 0.8vw;
}
.icon-memu{
.icon-memu {
display: block;
margin: 0 auto;
width: 2.91vw;
height: 2.91vw;
}
.menu-label{
.menu-label {
line-height: 24px;
text-shadow: 0 2px 4px rgba(0,0,0,0.20);
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.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>
<template>
<div id="dialogTends" style="width:100%;height:100%"></div>
<div id="dialogTends" style="width: 100%; height: 100%"></div>
</template>
<script>
export default {
name: 'interaction',
name: "interaction",
data() {
return {
title:'展板点播趋势图'
}
title: "展板点播趋势图",
};
},
props: {
data: {
type: Object,
default: () => {
return {};
},
},
},
mounted() {
setTimeout(()=>{
this.init()
},100)
// setTimeout(()=>{
// this.init()
// },100)
},
methods: {
init(){
init() {
let option = {
tooltip: {
trigger: 'axis'
trigger: "axis",
},
grid: {
top:20,
left: '2%',
right: 40,
top: 20,
left: 50,
right: 50,
bottom: 30,
containLabel: true
containLabel: true,
},
// dataZoom: [{
// type: "slider",
......@@ -46,101 +53,103 @@ export default {
// }
// ],
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: { //坐标轴刻度标签的相关设置。
type: "category",
boundaryGap: false, //坐标轴两边留白
data: this.data.xAxisData,
axisLabel: {
//坐标轴刻度标签的相关设置。
textStyle: {
color: '#333333',
fontStyle: 'normal',
fontFamily: '微软雅黑',
color: "#333333",
fontStyle: "normal",
fontFamily: "微软雅黑",
fontSize: 14,
},
},
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',
type: "value",
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: 'line',
smooth:true,
type: "line",
smooth: true,
itemStyle: {
normal: {
color:'#AC9374',
color: "#AC9374",
lineStyle: {
color: "#9B1E23",
width:1
width: 1,
},
areaStyle: {
color: new this.$echarts.graphic.LinearGradient(0, 1, 0, 0, [{
color: new this.$echarts.graphic.LinearGradient(0, 1, 0, 0, [
{
offset: 0,
color: 'rgba(172,141,116,0.4)'
}, {
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
]
}
]
color: "rgba(155,30,35,0.4)",
},
]),
},
},
},
data: this.data.yAxisData,
},
],
};
let echartsDiv = this.$echarts.init(document.getElementById('dialogTends'))
echartsDiv.setOption(option)
let echartsDiv = this.$echarts.init(
document.getElementById("dialogTends")
);
echartsDiv.setOption(option);
},
}
}
},
};
</script>
<style lang="less">
#dialogTends{
#dialogTends {
width: 100%;
height: 100%;
}
......
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="btn-group">
<el-button
class="export"
type="primary"
icon="el-icon-download"
@click="handleExport"
>导出文件</el-button
>
</div>
<div id="bodyCanvas">
<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" @change="handleChange">
<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 ref="echarts" :data="echartsData" />
</div>
</div>
<div class="rank-panel-box">
......@@ -25,42 +39,152 @@
<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>
</div>
</template>
<script>
import {trendLine, rankTable} from './components'
import { trendLine, rankTable } from "./components";
import { getCurDate } from "@/utils/util.time";
import htmlCanvas from "@/utils/htmlCanvas";
import JsPDF from "jspdf";
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: "1",
data: [],
echartsData: {},
options: [
{ label: "年", value: "1" },
{ label: "月", value: "2" },
{ label: "日", value: "3" },
],
timer: null,
};
},
components: { trendLine, rankTable },
mounted() {
this.handleChange("1");
},
methods: {
getList(frequencyDate) {
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:{trendLine, rankTable},
methods:{
handleChange(val) {
let frequencyDate = this.getCurTime(val);
this.getList(frequencyDate);
},
getCurTime(type) {
let curTime = getCurDate();
let frequencyDate = curTime.year + curTime.month;
switch (type) {
case "1":
frequencyDate = curTime.year;
return frequencyDate;
break;
case "2":
frequencyDate = curTime.year + curTime.month;
return frequencyDate;
break;
case "3":
frequencyDate = curTime.year + curTime.month + curTime.date;
return frequencyDate;
break;
default:
return "";
break;
}
}
},
init() {
this.$refs.echarts.init();
},
handleExport() {
let _this = this;
if (this.timer) {
return false;
}
this.timer = setTimeout(() => {
clearTimeout(_this.timer);
_this.timer = null;
}, 30000);
_this.getPdf("#bodyCanvas", "趋势分析");
const loading = this.$loading({
lock: true,
text: "Loading",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
setTimeout(() => {
loading.close();
}, 2000);
},
},
};
</script>
<style lang="less" scoped>
.trend-wrapper {
.btn-group {
margin-bottom: 20px;
height: 36px;
}
/deep/ .el-button.export {
width: 128px;
float: right;
.el-icon-download {
font-size: 18px;
font-weight: bold;
}
}
.el-select {
margin-left: 40px;
/deep/.el-input__inner {
border-radius: 22px;
background-color: @party-bg-gray;
border-color: @party-border-color;
}
}
#bodyCanvas {
height: calc(100% - 56px);
}
.ul-wrapper {
background-color: @party-white;
}
}
</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"
import JsPDF from "jspdf"
export default {
install(Vue, options) {
Vue.prototype.getPdf = function (id, title) {
var title = title
html2Canvas(document.querySelector(id), {
allowTaint: true
}).then(function (canvas) {
let contentWidth = canvas.width
let contentHeight = canvas.height
let pageHeight = contentWidth / 592.28 * 841.89
let leftHeight = contentHeight
let position = 0
let imgWidth = 595.28
let imgHeight = 592.28 / contentWidth * contentHeight
let pageData = canvas.toDataURL("image / jpeg", 1.0)
let PDF = new JsPDF("", "pt", "a4")
if (leftHeight < pageHeight) {
PDF.addImage(pageData, "JPEG", 0, 0, imgWidth, imgHeight)
} else {
while (leftHeight > 0) {
PDF.addImage(pageData, "JPEG", 0, position, imgWidth, imgHeight)
leftHeight -= pageHeight
position -= 841.89
if (leftHeight > 0) {
PDF.addPage()
}
}
}
PDF.save(title + ".pdf")
}
)
}
}
}
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
}).then((canvas) => {
if (!canvas) {
callback(null)
return
}
callback(canvas)
// 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