Commit db851fd3 authored by qzhxx's avatar qzhxx

merge

parents 44d2d2f5 835fb5ba
...@@ -21,7 +21,8 @@ module.exports = { ...@@ -21,7 +21,8 @@ module.exports = {
}, },
// Various Dev Server settings // Various Dev Server settings
host: 'localhost', // can be overwritten by process.env.HOST //host: 'localhost', // can be overwritten by process.env.HOST
host: '0.0.0.0', // can be overwritten by process.env.HOST
port: 3000, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined port: 3000, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false, autoOpenBrowser: false,
errorOverlay: true, errorOverlay: true,
......
...@@ -44,9 +44,7 @@ ...@@ -44,9 +44,7 @@
</template> </template>
<script> <script>
import { baseUrl } from "@/config/env"; import { loginOut } from "@/config/loginOut";
import axios from "axios";
let i = 0;
export default { export default {
data() { data() {
return { return {
...@@ -65,7 +63,9 @@ export default { ...@@ -65,7 +63,9 @@ export default {
flag: false, flag: false,
}; };
}, },
mounted() {}, mounted() {
loginOut();
},
methods: { methods: {
submitForm() { submitForm() {
let _this = this; let _this = this;
...@@ -95,6 +95,10 @@ export default { ...@@ -95,6 +95,10 @@ export default {
}); });
localStorage.setItem("user", resData.user.userName); localStorage.setItem("user", resData.user.userName);
localStorage.setItem("backToken", resData.token); localStorage.setItem("backToken", resData.token);
localStorage.setItem(
"menuList",
JSON.stringify(resData.menuList)
);
_this.$router.push("index"); _this.$router.push("index");
} else { } else {
_this.$message.error(res.data.message); _this.$message.error(res.data.message);
...@@ -122,7 +126,8 @@ export default { ...@@ -122,7 +126,8 @@ export default {
top: 0; top: 0;
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
background: url("~@/assets/login/login_bg.png") no-repeat center/ 100% 100%; background: #9b1f23 url("~@/assets/login/login_bg.png") no-repeat center/ 100%
100%;
.content { .content {
width: 33.33%; width: 33.33%;
height: 100vh; height: 100vh;
...@@ -176,8 +181,13 @@ export default { ...@@ -176,8 +181,13 @@ export default {
background: url("~@/assets/login/pwd.png") no-repeat center/ 100%; background: url("~@/assets/login/pwd.png") no-repeat center/ 100%;
} }
/deep/.el-form { /deep/.el-form {
margin-top: 120px; // margin-top: 120px;
text-align: center; text-align: center;
z-index: 99;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 150px;
.el-form-item { .el-form-item {
margin-bottom: 60px; margin-bottom: 60px;
} }
...@@ -223,9 +233,6 @@ export default { ...@@ -223,9 +233,6 @@ export default {
font-size: 30px; font-size: 30px;
} }
} }
.el-form {
margin-top: 50px;
}
} }
} }
@media screen and (max-width: 1300px) { @media screen and (max-width: 1300px) {
...@@ -236,9 +243,6 @@ export default { ...@@ -236,9 +243,6 @@ export default {
font-size: 24px; font-size: 24px;
} }
} }
.el-form {
margin-top: 50px;
}
} }
} }
</style> </style>
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
</div> </div>
</template> </template>
<script> <script>
import { loginOut } from "@/config/loginOut";
export default { export default {
data() { data() {
return { return {
...@@ -31,11 +32,11 @@ export default { ...@@ -31,11 +32,11 @@ export default {
handleLogout() { handleLogout() {
let _this = this; let _this = this;
_this _this
.$https( { .$https({
method: "get", method: "get",
url: "logout", url: "logout",
authType:'back' authType: "back",
} ) })
.then((res) => { .then((res) => {
if (res.status == 200) { if (res.status == 200) {
let resData = res.data; let resData = res.data;
...@@ -44,8 +45,7 @@ export default { ...@@ -44,8 +45,7 @@ export default {
type: "success", type: "success",
message: resData.message, message: resData.message,
}); });
localStorage.removeItem("user"); loginOut();
localStorage.removeItem("backToken");
_this.$router.push("login"); _this.$router.push("login");
} else { } else {
_this.$message.error(res.data.message); _this.$message.error(res.data.message);
......
export function loginOut(){
localStorage.removeItem("user")
localStorage.removeItem("backToken")
localStorage.removeItem("menuList")
}
\ No newline at end of file
...@@ -62,14 +62,14 @@ export const menuList = [ ...@@ -62,14 +62,14 @@ export const menuList = [
children: [ children: [
{ name: '视频审核', icon: 'icon-video', color: 'index-blue', url: '/checkVideo' }, { name: '视频审核', icon: 'icon-video', color: 'index-blue', url: '/checkVideo' },
{ name: '展板审核', icon: 'icon-screen', color: 'index-green', url: '/checkDisplay' }, { name: '展板审核', icon: 'icon-screen', color: 'index-green', url: '/checkDisplay' },
{ name: '平台学习内容审核', icon: 'icon-magnifier', color: 'index-pink', url: '/checkLearn' }, { name: '学习内容审核', icon: 'icon-magnifier', color: 'index-pink', url: '/checkLearn' },
{ name: '账号禁用审核', icon: 'icon-disable', color: 'index-red', url: '/checkLearn' } { name: '账号禁用审核', icon: 'icon-disable', color: 'index-red', url: '/recheck' }
] ]
} }
] ]
}, },
{ {
title: '单位用户管理', name: '单位用户管理',
icon: 'icon-headUser', icon: 'icon-headUser',
avatar: 'user_head_picture.png', avatar: 'user_head_picture.png',
color: '', color: '',
...@@ -82,7 +82,7 @@ export const menuList = [ ...@@ -82,7 +82,7 @@ export const menuList = [
color: '', color: '',
url: '', url: '',
children: [ children: [
{ label: '互动管理', icon: 'icon-interaction', color: 'index-purple', url: '/interactive' } { name: '互动内容', icon: 'icon-interaction', color: 'index-purple', url: '/interactive' }
] ]
}, },
{ {
...@@ -92,7 +92,7 @@ export const menuList = [ ...@@ -92,7 +92,7 @@ export const menuList = [
color: '', color: '',
url: '', url: '',
children: [ children: [
{ label: '账号管理', icon: 'icon-account', color: 'index-blue', url: '/unitAdmin' } { name: '账号管理', icon: 'icon-account', color: 'index-blue', url: '/unitAdmin' }
] ]
} }
] ]
...@@ -135,7 +135,7 @@ export const menuList = [ ...@@ -135,7 +135,7 @@ export const menuList = [
avatar: 'statistics_head_picture.png', avatar: 'statistics_head_picture.png',
color: '', color: '',
url: '', url: '',
menu: [ children: [
{ {
name: '统计图表', name: '统计图表',
icon: '', icon: '',
...@@ -144,8 +144,8 @@ export const menuList = [ ...@@ -144,8 +144,8 @@ export const menuList = [
url: '', url: '',
children: [ children: [
{ name: '统计概览', icon: 'icon-overview', color: 'index-purple', url: '/overview' }, { name: '统计概览', icon: 'icon-overview', color: 'index-purple', url: '/overview' },
{ name: '互动统计', icon: 'icon-interaction', color: 'index-green', url: '' }, { name: '互动统计', icon: 'icon-interaction', color: 'index-green', url: '/interaction' },
{ name: '趋势分析', icon: 'icon-tend', color: 'index-pink', url: '' } { name: '趋势分析', icon: 'icon-tend', color: 'index-pink', url: '/tend' }
] ]
}, },
{ {
...@@ -166,7 +166,7 @@ export const menuList = [ ...@@ -166,7 +166,7 @@ export const menuList = [
avatar: 'system_head_picture.png', avatar: 'system_head_picture.png',
color: '', color: '',
url: '', url: '',
menu: [ children: [
{ {
name: '机构及信息管理', name: '机构及信息管理',
icon: '', icon: '',
......
This diff is collapsed.
...@@ -17,28 +17,47 @@ ...@@ -17,28 +17,47 @@
:rules="rules" :rules="rules"
> >
<el-form-item label="版本号:" prop="appVersion"> <el-form-item label="版本号:" prop="appVersion">
<el-input size="small" v-model="formItem.appVersion" clearable placeholder="请输入版本号"></el-input> <el-input
size="small"
v-model="formItem.appVersion"
clearable
placeholder="请输入版本号"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="版本信息:" prop="versionInfo"> <el-form-item label="版本信息:" prop="versionInfo">
<el-input type="textarea" size="small" v-model="formItem.versionInfo"></el-input> <el-input
type="textarea"
size="small"
v-model="formItem.versionInfo"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="更新内容:" prop="updateContent"> <el-form-item label="更新内容:" prop="updateContent">
<el-input type="textarea" size="small" v-model="formItem.updateContent"></el-input> <el-input
type="textarea"
size="small"
v-model="formItem.updateContent"
></el-input>
</el-form-item> </el-form-item>
<el-upload <el-upload
class="text-center" class="text-center"
drag drag
action="http://192.168.110.67/mall/file/upload/allType" :action="uploadUrl"
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:file-list="fileList"> :before-upload="handleBeforeUpload"
:file-list="fileList"
>
<i class="el-icon-upload"></i> <i class="el-icon-upload"></i>
<div class="el-upload__text">将安装包拖到此处,或<em>点击上传安装包</em></div> <div class="el-upload__text">
<div class="el-upload__tip" slot="tip">只能上传apk文件,且不超过500kb</div> 将安装包拖到此处,或<em>点击上传安装包</em>
</div>
<div class="el-upload__tip" slot="tip">只能上传apk文件</div>
</el-upload> </el-upload>
</el-form> </el-form>
</div> </div>
<div slot="footer" class="dialog-footer btn-group"> <div slot="footer" class="dialog-footer btn-group">
<el-button size="mini" type="primary" @click="submitForm('formItem')">确定</el-button> <el-button size="mini" type="primary" @click="submitForm('formItem')"
>确定</el-button
>
<el-button size="mini" @click="close">取 消</el-button> <el-button size="mini" @click="close">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -48,111 +67,103 @@ ...@@ -48,111 +67,103 @@
export default { export default {
data() { data() {
return { return {
uploadUrl:'http://192.168.110.67/mall/file/upload/allType',
formVisible: false, formVisible: false,
formItem: {}, formItem: {},
fileList:[], fileList: [],
rules: { rules: {
appVersion: [ appVersion: [
{ required: true, message: "请输入版本号", trigger: "blur" } { required: true, message: "请输入版本号", trigger: "blur" },
], ],
versionInfo: [{ required: true, message: "请输入版本信息", trigger: "blur" }], versionInfo: [
updateContent: [{ required: true, message: "请输入更新内容", trigger: "blur" }] { required: true, message: "请输入版本信息", trigger: "blur" },
} ],
updateContent: [
{ required: true, message: "请输入更新内容", trigger: "blur" },
],
},
}; };
}, },
methods: { methods: {
backFn(item) { backFn() {
this.formVisible = true; this.formVisible = true
this.$nextTick(()=>{ this.$nextTick(() => {
this.$refs.formItem.clearValidate(); this.$refs.formItem.clearValidate()
}) });
this.formItem = {}; this.formItem = {}
}, },
// 关闭 // 关闭
close() { close() {
this.formVisible = false; this.formVisible = false;
for (let key in this.formItem) { for (let key in this.formItem) {
this.formItem[key] = null; this.formItem[key] = null
}
this.$refs["formItem"].resetFields()
},
// 格式控制
handleBeforeUpload(file) {
if (file.type !== "application/vnd.android.package-archive") {
this.$message.error("只能上传apk文件")
return false
} }
this.$refs["formItem"].resetFields(); return true
}, },
// 上传数据操作 // 上传数据操作
handleAvatarSuccess(res, file) { handleAvatarSuccess(res, file) {
this.formItem.apkUrl = res.url if(res.resultCode==='200'){
this.formItem.apkUrl = res.data.url
}else{
this.$message.error(res.message)
}
}, },
// 保存编辑信息 // 保存编辑信息
submitForm() { submitForm() {
let _this = this; let _this = this
console.log(this.formItem) _this.$refs.formItem.validate((valid) => {
_this.$refs.formItem.validate(valid => {
if (valid) { if (valid) {
if (!this.formItem.apkUrl) { if (!this.formItem.apkUrl) {
this.$message.info('请先选取文件!') this.$message.info("请先选取文件!")
return false return false
} }
let param = { let param = {
appVersion: this.formItem.appVersion, appVersion: this.formItem.appVersion,
versionInfo: this.formItem.versionInfo, versionInfo: this.formItem.versionInfo,
updateContent: this.formItem.updateContent , updateContent: this.formItem.updateContent,
apkUrl: this.formItem.apkUrl , apkUrl: this.formItem.apkUrl,
}; }
// const fileType = this.fileList.every(item => { _this
// console.log(item.raw.type) .$https(
// return item.raw.type === 'application/zip'
// })
// if (!fileType) {
// this.$message.error('支持扩展名:.zip格式!')
// return false
// }
// const param = new FormData()
// this.fileList.forEach(file => {
// param.append('file', file.raw) // 此处一定是append file.raw 上传文件只需维护fileList file.raw.name要加上
// param.append('fileName', file.name)
// param.append('appVersion', this.formItem.appVersion)
// param.append('versionInfo', this.formItem.versionInfo)
// param.append('updateContent', this.formItem.updateContent)
// })
// _this.$emit("refreshFn");
// _this.formVisible = false;
_this.$https(
{ {
url: "tAppVersion/save", url: "tAppVersion/save",
method: "post", method: "post",
authType: this.backToken authType: this.backToken,
}, },
_this.$qs.stringify(param) _this.$qs.stringify(param)
).then(res => { )
if (res.data.resultCode === '200') { .then(
_this.$message({ (res) => {
type: "success", if (res.data.resultCode === "200") {
message: res.data.message _this.$message.success(res.data.message)
}); _this.formVisible = false
_this.formVisible = false; _this.$emit("refreshFn")
_this.$emit("refreshFn");
} else { } else {
_this.$message({ _this.$message.error(res.data.message)
type: "error",
message: res.data.message
});
} }
}, },
error => { (error) => {
_this.$message({ console.log(error)
type: "error",
message: error
});
} }
); )
} }
}); })
},
}, },
}
}; };
</script> </script>
<style lang="less"> <style lang="less">
@import "../../../../style/dialog.less"; @import "~@/style/dialog.less";
.text-center { .text-center {
text-align: center; text-align: center;
} }
......
...@@ -15,19 +15,41 @@ ...@@ -15,19 +15,41 @@
label-position="right" label-position="right"
> >
<el-form-item label="上传时间:" prop="createTime"> <el-form-item label="上传时间:" prop="createTime">
<el-input size="small" v-model="formItem.createTime" disabled></el-input> <el-input
size="small"
v-model="formItem.createTime"
disabled
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="操作者:" prop="userName"> <el-form-item label="操作者:" prop="userName">
<el-input size="small" v-model="formItem.userName" disabled></el-input> <el-input
size="small"
v-model="formItem.userName"
disabled
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="是否为当前使用版本:"> <el-form-item label="是否为当前使用版本:">
<el-input size="small" :value="formItem.isCurrent?'是':'否'" disabled></el-input> <el-input
size="small"
:value="formItem.isCurrent ? '是' : '否'"
disabled
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="版本信息:" prop="versionInfo"> <el-form-item label="版本信息:" prop="versionInfo">
<el-input type="textarea" size="small" v-model="formItem.versionInfo" disabled></el-input> <el-input
type="textarea"
size="small"
v-model="formItem.versionInfo"
disabled
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="更新内容:" prop="updateLog"> <el-form-item label="更新内容:" prop="updateLog">
<el-input type="textarea" size="small" v-model="formItem.updateLog" disabled></el-input> <el-input
type="textarea"
size="small"
v-model="formItem.updateLog"
disabled
></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -47,18 +69,17 @@ export default { ...@@ -47,18 +69,17 @@ export default {
}, },
methods: { methods: {
backFn(item) { backFn(item) {
this.formVisible = true; this.formVisible = true
this.formItem = item; this.formItem = item
}, },
// 关闭 // 关闭
close() { close() {
this.formVisible = false; this.formVisible = false
},
}, },
}
}; };
</script> </script>
<style lang="less"> <style lang="less">
@import "../../../../style/dialog.less"; @import "~@/style/dialog.less";
</style> </style>
\ No newline at end of file
...@@ -21,7 +21,9 @@ ...@@ -21,7 +21,9 @@
</el-form> </el-form>
<div class="page-tip"> <div class="page-tip">
<span class="page-tip-title">页面说明:</span> <span class="page-tip-title">页面说明:</span>
<span class="page-tips">可查看系统使用过的所有app版本信息,可设置其中一个版本为当前使用版本。可产看安装包详情信息。可上传新的安装包,“*”为必填项。</span> <span class="page-tips"
>可查看系统使用过的所有app版本信息,可设置其中一个版本为当前使用版本。可产看安装包详情信息。可上传新的安装包,“*”为必填项。</span
>
</div> </div>
</div> </div>
<div class="table-content"> <div class="table-content">
...@@ -29,12 +31,24 @@ ...@@ -29,12 +31,24 @@
<el-button type="primary" @click="addBox">上传安装包</el-button> <el-button type="primary" @click="addBox">上传安装包</el-button>
</div> </div>
<div class="party-table"> <div class="party-table">
<el-table border style="width: 100%;height:100%" height="100%" :data="tableData"> <el-table
<el-table-column type="index" width="120" label="序号"></el-table-column> border
<el-table-column label="app版本号" prop="appVersion"></el-table-column> style="width: 100%; height: 100%"
height="100%"
:data="tableData"
>
<el-table-column
type="index"
width="120"
label="序号"
></el-table-column>
<el-table-column
label="app版本号"
prop="appVersion"
></el-table-column>
<el-table-column label="是否为最新版本"> <el-table-column label="是否为最新版本">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.isCurrent?'是':'否'}}</span> <span>{{ scope.row.isCurrent ? "是" : "否" }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="上传时间" prop="createTime"></el-table-column> <el-table-column label="上传时间" prop="createTime"></el-table-column>
...@@ -68,70 +82,74 @@ ...@@ -68,70 +82,74 @@
></el-pagination> ></el-pagination>
</div> </div>
</div> </div>
<add-dialog ref="addDialog" @refreshFn="onSearch"/> <add-dialog ref="addDialog" @refreshFn="onSearch" />
<detail-dialog ref="detailDialog"/> <detail-dialog ref="detailDialog" />
</div> </div>
</template> </template>
<script> <script>
import { partyPagination, partyTable } from "@/components/index"; import { partyPagination, partyTable } from "@/components/index";
import { addDialog , detailDialog } from "./components/index"; import { addDialog, detailDialog } from "./components/index";
export default { export default {
data() { data() {
return { return {
page: { currentPage: 1, pageSize: 10, total: 0 }, page: {
currentPage: 1,
pageSize: 10,
total: 0
},
form: { form: {
dateRange: [] dateRange: [],
}, },
tableData: [] tableData: [],
}; };
}, },
components: { partyPagination ,addDialog ,detailDialog}, components: { partyPagination, addDialog, detailDialog },
mounted() { mounted() {
this.onSearch() this.onSearch();
}, },
methods: { methods: {
// 查询 // 查询
onSearch() { onSearch() {
this.page.currentPage = 1 this.page.currentPage = 1;
this.getTableData(); this.getTableData();
}, },
// 获得数据接口 // 获得数据接口
getTableData() { getTableData() {
let vm = this; let vm = this
let param = { let param = {
_index: this.page.currentPage, _index: this.page.currentPage,
_size: this.page.pageSize, _size: this.page.pageSize,
startTime: this.form.dateRange.length?this.form.dateRange[0]:'' , startDate: this.form.dateRange.length ? this.form.dateRange[0] : "",
endTime: this.form.dateRange.length?this.form.dateRange[1]:'' , endDate: this.form.dateRange.length ? this.form.dateRange[1] : "",
}; };
vm.$https( vm.$https(
{ {
url: "tAppVersion/getPageList", url: "tAppVersion/getPageList",
method: "post", method: "post",
authType: this.backToken authType: this.backToken,
}, },
vm.$qs.stringify(param) vm.$qs.stringify(param)
) )
.then(res => { .then((res) => {
if(res.data.resultCode==='200'){ if (res.data.resultCode === "200") {
let data = res.data.data let data = res.data.data
vm.page.total = data.total vm.page.total = data.total
vm.tableData = data.records vm.tableData = data.records
}else{ } else {
this.$message({type:'error',message:res.data.message}) this.$message.error(res.data.message)
} }
}) })
.catch(function(err) { .catch(function (err) {
console.log(err); console.log(err)
}); });
}, },
// 新增弹框打开 // 新增弹框打开
addBox() { addBox() {
this.$refs.addDialog.backFn() this.$refs.addDialog.backFn();
}, },
// 详情弹框打开 // 详情弹框打开
handleDetail(item) { handleDetail(item) {
this.$refs.detailDialog.backFn(item) this.$refs.detailDialog.backFn(item);
}, },
// 启用 // 启用
ableBtn(row) { ableBtn(row) {
...@@ -140,55 +158,58 @@ export default { ...@@ -140,55 +158,58 @@ export default {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
center: true center: true,
}) })
.then(() => { .then(() => {
// 请求接口 tAppVersion/update this.updateVersion(row);
this.updateVersion(row)
}) })
.catch(() => { .catch(() => {
this.$message("已取消") this.$message("已取消");
}); });
}, },
updateVersion(row){ // 启用
let vm = this; updateVersion(row) {
let vm = this
let param = { let param = {
id: row.id, id: row.id,
isCurrent:1 isCurrent: 1,
}; };
vm.$https( vm.$https(
{ {
url: "tAppVersion/update", url: "tAppVersion/update",
method: "put", method: "put",
authType: this.backToken authType: this.backToken,
}, },
vm.$qs.stringify(param) vm.$qs.stringify(param)
) )
.then(res => { .then((res) => {
if(res.data.resultCode==='200'){ if (res.data.resultCode === "200") {
this.$message.success("操作成功") this.$message.success("操作成功")
this.onSearch() this.onSearch()
}else{ } else {
this.$message({type:'error',message:res.data.message}) this.$message.error(res.data.message)
} }
}) })
.catch(function(err) { .catch(function (err) {
console.log(err); console.log(err)
}); });
}, },
// 重置
handleReset() { handleReset() {
this.form = {}; this.form = {
dateRange: [],
};
this.onSearch()
}, },
// 分页 // 分页
handleCurrentChange(val) { handleCurrentChange(val) {
this.page.currentPage = val this.page.currentPage = val
this.getTableData() this.getTableData()
} },
} },
}; };
</script> </script>
<style lang="less"> <style lang="less">
@import "../../../style/dialog.less"; @import "~@/style/table.less";
@import "../../../style/table.less"; @import "~@/style/pagination.less";
@import "../../../style/pagination.less";
</style> </style>
\ No newline at end of file
...@@ -32,7 +32,11 @@ ...@@ -32,7 +32,11 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="机构地理位置:" prop="areaName"> <el-form-item label="机构地理位置:" prop="areaName">
<el-input size="small" v-model="formItem.areaName" disabled></el-input> <el-input
size="small"
v-model="formItem.areaName"
disabled
></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -44,32 +48,31 @@ ...@@ -44,32 +48,31 @@
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
title:'', title: "", // 标题
formVisible: false, formVisible: false,
formItem: {}, formItem: {},
orgOptions: [], orgOptions: [], // 单位信息
rules: { rules: {
orgId: [{ required: true, message: "请选择所属单位", trigger: "change" }] orgId: [
} { required: true, message: "请选择所属单位", trigger: "change" },
}; ],
}, },
mounted(){ };
}, },
mounted() {},
methods: { methods: {
backFn(item) { backFn(item) {
this.formVisible = true; this.formVisible = true;
this.$nextTick(()=>{ this.$nextTick(() => {
this.$refs.formItem.clearValidate(); this.$refs.formItem.clearValidate();
}) });
// 新增 // 新增
this.orgOptions = item this.orgOptions = item;
this.title="新增" this.title = "新增";
this.formItem = {}; this.formItem = {};
}, },
// 关闭 // 关闭
close() { close() {
...@@ -81,65 +84,58 @@ export default { ...@@ -81,65 +84,58 @@ export default {
}, },
// 联动出地址 // 联动出地址
selectItem(val) { selectItem(val) {
this.orgOptions.forEach(item=>{ this.orgOptions.forEach((item) => {
if(val===item.id){ if (val === item.id) {
this.formItem.areaName = item.areaName; this.formItem.areaName = item.areaName;
this.formItem.areaId = item.areaId; this.formItem.areaId = item.areaId;
} }
if(item.id===this.formItem.orgId){ if (item.id === this.formItem.orgId) {
this.formItem.userName = item.name this.formItem.userName = item.name;
} }
}) });
}, },
// 保存编辑信息 // 保存编辑信息
submitForm() { submitForm() {
let _this = this; let _this = this;
console.log(this.formItem) _this.$refs.formItem.validate((valid) => {
_this.$refs.formItem.validate(valid => {
if (valid) { if (valid) {
let searchObj = {}; let searchObj = {};
for (let key in _this.formItem) { for (let key in _this.formItem) {
if (this.formItem[key]) { if (this.formItem[key]) {
searchObj[key] = _this.formItem[key]; searchObj[key] = _this.formItem[key]
} }
} }
_this.$https({ _this
.$https(
{
url: "tUser/boxAdd", url: "tUser/boxAdd",
method: "post", method: "post",
authType: this.backToken authType: this.backToken,
}, },
_this.$qs.stringify(searchObj) _this.$qs.stringify(searchObj)
).then(res => { )
if (res.data.resultCode == '200') { .then(
_this.$message({ (res) => {
type: "success", if (res.data.resultCode === "200") {
message: res.data.message _this.$message.success(res.data.message)
}); _this.formVisible = false
_this.formVisible = false; _this.$emit("refreshFn")
_this.$emit("refreshFn");
} else { } else {
_this.$message({ _this.$message.error(res.data.message)
type: "error",
message: res.data.message
});
} }
}, },
error => { (error) => {
_this.$message({ console.log(error)
type: "error",
message: error
});
}
);
}
});
} }
)
} }
})
},
},
}; };
</script> </script>
<style lang="less"> <style lang="less">
@import "../../../../style/dialog.less"; @import "~@/style/dialog.less";
</style> </style>
\ No newline at end of file
...@@ -29,7 +29,9 @@ ...@@ -29,7 +29,9 @@
</el-form> </el-form>
<div class="page-tip"> <div class="page-tip">
<span class="page-tip-title">页面说明:</span> <span class="page-tip-title">页面说明:</span>
<span class="page-tips">可按照账号状态及所属单位进行信息筛选。可新增机顶盒账号,“*”为必填项。请先创建单位管理员账号,否则机顶盒无法激活</span> <span class="page-tips"
>机顶盒账号为机顶盒所属单位名称,新建后生成6位数字及字母的随机密码,作为机顶盒的登录密码。</span
>
</div> </div>
</div> </div>
<div class="table-content"> <div class="table-content">
...@@ -37,13 +39,22 @@ ...@@ -37,13 +39,22 @@
<el-button type="primary" @click="addBox">新建机顶盒账号</el-button> <el-button type="primary" @click="addBox">新建机顶盒账号</el-button>
</div> </div>
<div class="party-table"> <div class="party-table">
<el-table border style="width: 100%;height:100%" height="100%" :data="tableData"> <el-table
<el-table-column type="index" width="120" label="序号"></el-table-column> 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="MAC地址" prop="mac"></el-table-column>
<el-table-column label="所属单位" prop="organName"></el-table-column> <el-table-column label="所属单位" prop="organName"></el-table-column>
</el-table> </el-table>
</div> </div>
<div class="partyt-pagination" style="margin:0 20px;"> <div class="partyt-pagination" style="margin: 0 20px">
<el-pagination <el-pagination
background background
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
...@@ -66,19 +77,23 @@ export default { ...@@ -66,19 +77,23 @@ export default {
components: { partyPagination, customDialog }, components: { partyPagination, customDialog },
data() { data() {
return { return {
page: { currentPage: 1, pageSize: 10, total: 0 }, page: {
areaOptions: [], currentPage: 1,
pageSize: 10,
total: 0
},
orgOptions: [], // 单位信息
areaOptions: [], //区域信息
defaultProps: { defaultProps: {
label: "name", label: "name",
value: "id", value: "id",
checkStrictly: true checkStrictly: true,
}, },
orgOptions: [],
form: { form: {
orgId: "", orgId: "",
areaId: [] areaId: [],
}, },
tableData: [] tableData: [], // 表格信息
}; };
}, },
...@@ -88,21 +103,18 @@ export default { ...@@ -88,21 +103,18 @@ export default {
this.getOrgList(); this.getOrgList();
}, },
methods: { methods: {
getOrgList(){ // 获取单位信息
getOrgListWithOutPage().then(res => { async getOrgList() {
console.log(res) this.orgOptions = await getOrgListWithOutPage()
this.orgOptions = res;
});
}, },
getAreas() { // 获取区域信息
getAreas().then(res => { async getAreas() {
this.areaOptions = res; this.areaOptions = await getAreas()
});
}, },
// 查询 // 查询
onSearch() { onSearch() {
this.page.currentPage = 1; this.page.currentPage = 1
this.getTableData(); this.getTableData()
}, },
// 获得数据接口 // 获得数据接口
getTableData() { getTableData() {
...@@ -110,49 +122,51 @@ export default { ...@@ -110,49 +122,51 @@ export default {
let param = { let param = {
_index: this.page.currentPage, _index: this.page.currentPage,
_size: this.page.pageSize, _size: this.page.pageSize,
areaId: this.form.areaId[this.form.areaId.length-1], areaId: this.form.areaId.length ? this.form.areaId[this.form.areaId.length - 1] : '',
organId: this.form.orgId, organId: this.form.orgId
}; };
vm.$https( vm.$https(
{ {
url: "boxOperation/selectPageList", url: "boxOperation/selectPageList",
method: "post", method: "post",
authType: this.backToken authType: this.backToken,
}, },
vm.$qs.stringify(param) vm.$qs.stringify(param)
) )
.then(res => { .then((res) => {
console.log(res.data.data); if (res.data.resultCode === "200") {
let data = res.data.data; let data = res.data.data
vm.page.total = data.total; vm.page.total = data.total
vm.tableData = data.records; vm.tableData = data.records
} else {
this.$message.error(res.data.message)
}
}) })
.catch(function(err) { .catch(function (err) {
console.log(err); console.log(err)
}); });
}, },
// 新增弹框打开 // 新增弹框打开
addBox() { addBox() {
console.log(this.$refs.formItem);
this.$refs.formItem.backFn(this.orgOptions); this.$refs.formItem.backFn(this.orgOptions);
}, },
// 重置
handleReset() { handleReset() {
this.form = { this.form = {
orgId: "", orgId: "",
areaId: [] areaId: [],
}; };
this.onSearch() this.onSearch();
}, },
// 分页 // 分页
handleCurrentChange(val) { handleCurrentChange(val) {
this.page.currentPage = val; this.page.currentPage = val;
this.getTableData(); this.getTableData();
} },
} },
}; };
</script> </script>
<style lang="less"> <style lang="less">
@import "../../../style/dialog.less"; @import "~@/style/table.less";
@import "../../../style/table.less"; @import "~@/style/pagination.less";
@import "../../../style/pagination.less";
</style> </style>
\ No newline at end of file
<template>
<div class="interactive-wrapper height100">
<el-card class="height100 tree-box">
<div class="tree-title">组织机构</div>
<div class="tree-body">
<el-input
suffix-icon="el-icon-search"
placeholder="请输入组织结构名称"
v-model="filterText"
></el-input>
<div class="tree-content">
<el-tree
class="org-tree"
:data="treeData"
:props="defaultProps"
accordion
:filter-node-method="filterNode"
@node-click="handleNodeClick"
ref="tree"
>
<div
class="custom-tree-node"
slot-scope="{ node, data }"
:class="'tree-node-level' + data.level"
>
<i class="icon-org" v-if="data.level === 1"></i>
<span>{{ node.label }}</span>
</div>
</el-tree>
</div>
</div>
</el-card>
<el-card class="height100 detail-box" ref="rightBox">
<div class="content-title">
<div class="title">“北京市政府”展板互动信息汇总</div>
<div class="page-tip">
<span class="page-tip-title">页面说明:</span>
<span class="page-tips"
>可查看某个组织机构的互动信息</span
>
</div>
</div>
<div class="scrollBox">
<div
class="content-item"
v-for="(item, index) in tableData"
:key="index"
>
<h5 class="title">{{ item.name }}</h5>
<p>{{ item.content }}</p>
<div class="img-box">
<img v-for="(j, idx) in item.images" :src="j" :key="idx" alt="" />
</div>
<div class="author">
<div>{{ item.username }}</div>
<div>{{ item.createTime }}</div>
</div>
</div>
</div>
<div class="partyt-pagination" style="margin: 0 20px">
<el-pagination
background
@current-change="handleCurrentChange"
:current-page="page.currentPage"
:page-size="page.pageSize"
layout="prev, pager, next, jumper"
:total="page.total"
></el-pagination>
</div>
</el-card>
</div>
</template>
<script>
export default {
data() {
return {
filterText: "",
page: {
currentPage: 1,
pageSize: 10,
total: 0
},
treeData: [],
defaultProps: {
children: "children",
label: "name",
},
selectAreaId: "",
tableData: [],
};
},
watch: {
filterText(val) {
this.$refs.tree.filter(val);
},
},
mounted() {
// 获取全部组织机构数据
this.getOrgData()
this.onSearch()
},
methods: {
// 查询
onSearch() {
this.page.currentPage = 1
this.getTableData()
},
// 获得数据接口
getTableData() {
let vm = this
vm.tableData = []
let param = {
_index: this.page.currentPage,
_size: this.page.pageSize,
orgId: this.selectAreaId,
};
vm.$https(
{
url: "interaction/getList",
method: "post",
authType: this.backToken,
},
vm.$qs.stringify(param)
)
.then((res) => {
if (res.data.resultCode === "200") {
let data = res.data.data
vm.page.total = data.total
vm.tableData = data.records
vm.tableData.forEach((item) => {
item.images = item.images.split(",")
item.images.forEach((result, index) => {
if (/\.(MP4|mp4)/.test(result)) {
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")
}
})
})
vm.tableData = [...vm.tableData]
} else {
this.$message.error(res.data.message)
}
})
.catch(function (err) {
console.log(err)
});
},
// 获取组织机构数据
getOrgData() {
this.$https({
method: "get",
url: "organ/getTree",
authType: this.backToken,
}).then(
(res) => {
if (res.data.resultCode === "200") {
this.treeData = res.data.data
} else {
this.$message.error(res.data.message)
}
},
(error) => {
console.log(error)
}
);
},
// 过滤树结构数据
filterNode(value, data) {
if (!value) return true;
return data.name.indexOf(value) !== -1;
},
// 点击节点事件
handleNodeClick(data) {
this.selectAreaId = data.id;
this.onSearch()
},
// 分页
handleCurrentChange(val) {
this.page.currentPage = val
this.getTableData()
},
},
};
</script>
<style lang="less">
@import "~@/style/pagination.less";
.interactive-wrapper {
display: flex;
.tree-box {
width: 420px;
.tree-body {
padding: 20px;
height: calc(100% - 56px);
.tree-content {
overflow-y: auto;
height: calc(100% - 50px);
}
.el-input {
margin-bottom: 10px;
.el-input__inner {
background: #f8f8f8;
border-radius: 22px;
}
.el-input__icon {
font-size: 18px;
color: #ac9374;
}
}
}
}
.detail-box {
width: calc(100% - 440px);
margin-left: 20px;
}
.scrollBox {
height: calc(100% - 160px);
overflow-y: auto;
}
.page-tip {
display: flex;
font-size: 14px;
color: #333333;
line-height: 30px;
.page-tip-title {
font-weight: bold;
padding-right: 10px;
}
}
.el-card__body {
padding: 0;
height: 100%;
}
.tree-title {
font-size: 16px;
color: #fff;
text-align: center;
height: 56px;
line-height: 56px;
background: #9b1e23;
border-radius: 8px 8px 0 0;
}
.content-title {
display: flex;
justify-content: space-between;
padding: 20px;
border-bottom: 1px solid #eee;
.title {
font-size: 20px;
color: #333;
}
.page-tips {
width: 220px;
}
}
.content-item {
font-size: 16px;
margin: 20px;
padding: 40px;
background: #f8f8f8;
.title {
padding-bottom: 20px;
}
p {
padding-bottom: 20px;
border-bottom: 1px solid #bbb;
}
.img-box {
padding: 20px;
border-bottom: 1px solid #bbb;
img {
width: 90px;
height: 90px;
margin-right: 20px;
}
}
.author {
display: flex;
justify-content: space-between;
padding-top: 16px;
font-size: 14px;
}
}
}
</style>
\ No newline at end of file
...@@ -39,25 +39,36 @@ ...@@ -39,25 +39,36 @@
</el-form> </el-form>
<div class="page-tip"> <div class="page-tip">
<span class="page-tip-title">页面说明:</span> <span class="page-tip-title">页面说明:</span>
<span class="page-tips">可按照机顶盒状态及所属单位进行信息筛选。可查看当前系统所有机顶盒运维状态信息。</span> <span class="page-tips"
>可按照机顶盒状态及所属单位进行信息筛选。可查看当前系统所有机顶盒运维状态信息。</span
>
</div> </div>
</div> </div>
<div class="table-content"> <div class="table-content">
<div class="party-table"> <div class="party-table">
<el-table border style="width: 100%;height:100%" height="100%" :data="tableData"> <el-table
<el-table-column type="index" width="120" label="序号"></el-table-column> 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="mac地址" prop="mac"></el-table-column>
<el-table-column label="所属单位" prop="organName"></el-table-column> <el-table-column label="所属单位" prop="organName"></el-table-column>
<el-table-column label="机顶盒状态" prop="status"> <el-table-column label="机顶盒状态" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.status===1">待激活</span> <span v-if="scope.row.status === 1">待激活</span>
<span v-if="scope.row.status===2">已激活</span> <span v-if="scope.row.status === 2">已激活</span>
<span v-if="scope.row.status===3">故障</span> <span v-if="scope.row.status === 3">故障</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div class="partyt-pagination" style="margin:0 20px;"> <div class="partyt-pagination" style="margin: 0 20px">
<el-pagination <el-pagination
background background
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
...@@ -76,51 +87,54 @@ import { getOrgListWithOutPage } from "@/config/organ.js"; ...@@ -76,51 +87,54 @@ import { getOrgListWithOutPage } from "@/config/organ.js";
export default { export default {
data() { data() {
return { return {
page: { currentPage: 1, pageSize: 10, total: 0 }, page: {
areaOptions: [], currentPage: 1,
pageSize: 10,
total: 0,
},
orgOptions: [], // 单位信息
areaOptions: [], // 区域信息
defaultProps: { defaultProps: {
label: "name", label: "name",
value: "id", value: "id",
checkStrictly: true, checkStrictly: true,
}, },
orgOptions: [],
statusOptions: [ statusOptions: [
// 状态信息
{ {
value: "1", value: "1",
label: "待激活" label: "待激活",
}, },
{ {
value: "2", value: "2",
label: "已激活" label: "已激活",
}, },
{ {
value: "3", value: "3",
label: "故障" label: "故障",
} },
], ],
form: { form: {
orgId: "", orgId: "",
status: "", status: "",
areaId: [] areaId: [],
}, },
tableData:[] tableData: [], // 表格信息
}; };
}, },
mounted() { mounted() {
this.getAreas(); this.getAreas();
this.getOrgList();
this.onSearch(); this.onSearch();
this.getOrgList()
}, },
methods: { methods: {
getAreas() { // 获取区域信息
getAreas().then(res => { async getAreas() {
this.areaOptions = res; this.areaOptions = await getAreas();
});
}, },
getOrgList(){ // 获取单位信息
getOrgListWithOutPage().then(res => { async getOrgList() {
this.orgOptions = res; this.orgOptions = await getOrgListWithOutPage();
});
}, },
// 查询 // 查询
onSearch() { onSearch() {
...@@ -133,7 +147,9 @@ export default { ...@@ -133,7 +147,9 @@ export default {
let param = { let param = {
_index: this.page.currentPage, _index: this.page.currentPage,
_size: this.page.pageSize, _size: this.page.pageSize,
areaId: this.form.areaId[this.form.areaId.length-1], areaId: this.form.areaId.length
? this.form.areaId[this.form.areaId.length - 1]
: "",
organId: this.form.orgId, organId: this.form.orgId,
status: this.form.status, status: this.form.status,
}; };
...@@ -141,36 +157,41 @@ export default { ...@@ -141,36 +157,41 @@ export default {
{ {
url: "boxOperation/getPageList", url: "boxOperation/getPageList",
method: "post", method: "post",
authType: this.backToken authType: this.backToken,
}, },
vm.$qs.stringify(param) vm.$qs.stringify(param)
) )
.then(res => { .then((res) => {
if (res.data.resultCode === "200") {
let data = res.data.data; let data = res.data.data;
vm.page.total = data.total; vm.page.total = data.total;
vm.tableData = data.records; vm.tableData = data.records;
} else {
this.$message.error(res.data.message);
}
}) })
.catch(function(err) { .catch(function (err) {
console.log(err); console.log(err);
}); });
}, },
// 重置
handleReset() { handleReset() {
this.form = { this.form = {
orgId: "", orgId: "",
status: "", status: "",
areaId: [] areaId: [],
}; };
this.onSearch() this.onSearch();
}, },
// 分页 // 分页
handleCurrentChange(val) { handleCurrentChange(val) {
this.page.currentPage = val; this.page.currentPage = val;
this.getTableData(); this.getTableData();
} },
} },
}; };
</script> </script>
<style lang="less"> <style lang="less">
@import "../../../style/table.less"; @import "~@/style/table.less";
@import "../../../style/pagination.less"; @import "~@/style/pagination.less";
</style> </style>
\ No newline at end of file
<template> <template>
<div class="custom-page height100"> <div class="custom-page height100">
<el-card class="height100"> <el-card class="height100">
<!-- <div class="page-title">app界面自定义</div> -->
<div class="page-content"> <div class="page-content">
<div class="page-tip"> <div class="page-tip">
<span class="tip-title">页面说明:</span> <span class="tip-title">页面说明:</span>
...@@ -14,6 +13,7 @@ ...@@ -14,6 +13,7 @@
<el-upload <el-upload
action="http://192.168.110.67/mall/file/image/upload" action="http://192.168.110.67/mall/file/image/upload"
:on-success="uploadPageImg" :on-success="uploadPageImg"
:before-upload="handleBeforeUpload"
:file-list="dirList" :file-list="dirList"
> >
<el-button type="default">上传背景图</el-button> <el-button type="default">上传背景图</el-button>
...@@ -44,7 +44,9 @@ ...@@ -44,7 +44,9 @@
<el-upload <el-upload
action="http://192.168.110.67/mall/file/image/upload" action="http://192.168.110.67/mall/file/image/upload"
:on-success="uploadRunImg" :on-success="uploadRunImg"
:file-list="fileRunList"> :before-upload="handleBeforeUpload"
:file-list="fileRunList"
>
<el-button type="default">上传背景图</el-button> <el-button type="default">上传背景图</el-button>
</el-upload> </el-upload>
</div> </div>
...@@ -54,7 +56,7 @@ ...@@ -54,7 +56,7 @@
<swiper-slide v-for="(item, index) in runList" :key="index"> <swiper-slide v-for="(item, index) in runList" :key="index">
<div class="swiper-item"> <div class="swiper-item">
<el-radio v-model="radioRun" :label="item.id"></el-radio> <el-radio v-model="radioRun" :label="item.id"></el-radio>
<img :src="item.url" alt /> <img :src="item.appRunPic" alt />
</div> </div>
</swiper-slide> </swiper-slide>
<div class="swiper-button-prev" slot="button-prev"> <div class="swiper-button-prev" slot="button-prev">
...@@ -69,7 +71,9 @@ ...@@ -69,7 +71,9 @@
</div> </div>
<div class="btn-group footer-btn"> <div class="btn-group footer-btn">
<el-button size="mini" @click="close">取 消</el-button> <el-button size="mini" @click="close">取 消</el-button>
<el-button size="mini" type="primary" @click="submitForm('editform')">确定</el-button> <el-button size="mini" type="primary" @click="submitForm('editform')"
>确定</el-button
>
</div> </div>
</el-card> </el-card>
</div> </div>
...@@ -82,40 +86,37 @@ export default { ...@@ -82,40 +86,37 @@ export default {
components: { Swiper, SwiperSlide }, components: { Swiper, SwiperSlide },
data() { data() {
return { return {
radioPage: '', radioPage: "", // 选中项
radioRun: '', radioRun: "",
dirList:[], dirList: [], // 上传列表
fileRunList:[], fileRunList: [],
swiperOption: { swiperOption: {
slideToClickedSlide: true, //点击后居中展示 slideToClickedSlide: true, //点击后居中展示
slidesPerView: 5, slidesPerView: 5,
spaceBetween: 30, spaceBetween: 30,
centeredSlides: true, centeredSlides: true,
observer: true, // 动态检查器,自动初始化swiper,默认为false observer: true,
observerParents: true, observerParents: true,
// centerInsufficientSlides: true, //不够5个时居中显示 // centerInsufficientSlides: true, //不够5个时居中显示
// loop: true, // 不能同上一个属性同用 // loop: true, // 不能同上一个属性同用
navigation: { navigation: {
nextEl: ".swiper-button-next", nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev" prevEl: ".swiper-button-prev",
}, },
on: { on: {
click: function() { click: function () {
console.log(vm) console.log(vm);
if (this.$el[0].parentNode.className.indexOf("top") > 0) { if (this.$el[0].parentNode.className.indexOf("top") > 0) {
vm.radioPage = this.realIndex; vm.radioPage = this.realIndex;
// vm.radioPage = vm.pageList[this.realIndex].id;
} }
if (this.$el[0].parentNode.className.indexOf("bottom") > 0) { if (this.$el[0].parentNode.className.indexOf("bottom") > 0) {
vm.radioRun = this.realIndex; vm.radioRun = this.realIndex;
// vm.radioRun = vm.runList[this.realIndex].id;
}
}
} }
}, },
pagefileList: [], },
pageList: [], },
runList: [] pageList: [], // 数据列表
runList: [],
}; };
}, },
created() {}, created() {},
...@@ -127,131 +128,147 @@ export default { ...@@ -127,131 +128,147 @@ export default {
// 查询目录列表 // 查询目录列表
getDirPicList() { getDirPicList() {
let _this = this; let _this = this;
_this.$https({ _this
.$https({
url: "tAppDirPic/getList", url: "tAppDirPic/getList",
method: "get", method: "get",
authType: this.backToken authType: this.backToken,
}) })
.then(res => { .then((res) => {
if (res.data.resultCode === "200") { if (res.data.resultCode === "200") {
_this.pageList = res.data.data; _this.pageList = res.data.data;
_this.pageList.forEach(item => { _this.pageList.forEach((item) => {
if (item.isCurrent) { if (item.isCurrent) {
this.radioPage = item.id; this.radioPage = item.id;
} }
}); });
} else { } else {
this.$message({ type: "error", message: res.data.message }); this.$message.error(res.data.message);
} }
}) })
.catch(function(err) { .catch(function (err) {
console.log(err); console.log(err);
}); });
}, },
// 查询运行列表 // 查询运行列表
getAppRunList() { getAppRunList() {
let _this = this; let _this = this;
_this.$https({ _this
.$https({
url: "tAppRunPic/getList", url: "tAppRunPic/getList",
method: "get", method: "get",
authType: this.backToken authType: this.backToken,
}) })
.then(res => { .then((res) => {
if (res.data.resultCode === "200") { if (res.data.resultCode === "200") {
_this.runList = res.data.data; _this.runList = res.data.data;
_this.runList.forEach(item => { _this.runList.forEach((item) => {
if (item.isCurrent) { if (item.isCurrent) {
this.radioRun = item.id; this.radioRun = item.id;
} }
}); });
} else { } else {
this.$message({ type: "error", message: res.data.message }); this.$message.error(res.data.message);
} }
}) })
.catch(function(err) { .catch(function (err) {
console.log(err); console.log(err);
}); });
}, },
// 上传文件格式限制
handleBeforeUpload(file) {
if (file.type !== "image/jpeg" && file.type !== "image/png") {
this.$message.error("只能上传jpeg、jpg、png格式的文件");
return false;
}
return true;
},
// 新增目录图片
uploadPageImg(res, file) { uploadPageImg(res, file) {
this.saveItem(res.url,'tAppDirPic/save') if (res.resultCode === "200") {
this.saveItem(
{ appDirPic: res.data.url, isCurrent: 1 },
"tAppDirPic/save"
);
} else {
this.$message.error(res.message);
}
}, },
// 新增运行图片
uploadRunImg(res, file) { uploadRunImg(res, file) {
this.saveItem(res.url,'tAppRunPic/save') if (res.resultCode === "200") {
this.saveItem(
{ appRunPic: res.data.url, isCurrent: 1 },
"tAppRunPic/save"
);
} else {
this.$message.error(res.message);
}
}, },
saveItem(pic,url){ // 新增接口
saveItem(param, url) {
let _this = this; let _this = this;
let param = { _this
appDirPic: pic, .$https(
isCurrent: 1
};
_this.$https(
{ {
url: url, url: url,
method: "post", method: "post",
authType: this.backToken authType: this.backToken,
}, },
_this.$qs.stringify(param) _this.$qs.stringify(param)
) )
.then( .then(
res => { (res) => {
if (res.data.resultCode === "200") { if (res.data.resultCode === "200") {
_this.$message({ _this.$message.success(res.data.message);
type: "success", this.getDirPicList();
message: res.data.message this.getAppRunList();
});
this.getDirPicList()
this.getAppRunList()
} else { } else {
_this.$message({ _this.$message.error(res.data.message);
type: "error",
message: res.data.message
});
} }
}, },
error => { (error) => {
_this.$message({ console.log(error);
type: "error",
message: error
});
} }
); );
}, },
submitForm() {
// 修改当前项 // 修改当前项
this.updateCurrent(this.pageList[vm.radioPage].id,'tAppDirPic/update') submitForm() {
this.updateCurrent(this.runList[vm.radioRun].id,'tAppRunPic/update') this.updateCurrent(this.pageList[vm.radioPage].id, "tAppDirPic/update");
this.updateCurrent(this.runList[vm.radioRun].id, "tAppRunPic/update");
}, },
updateCurrent(id,url){ updateCurrent(id, url) {
let vm = this; let vm = this;
let param = { let param = {
id: id, id: id,
isCurrent:1 isCurrent: 1,
}; };
vm.$https( vm.$https(
{ {
url: url, url: url,
method: "put", method: "put",
authType: this.backToken authType: this.backToken,
}, },
vm.$qs.stringify(param) vm.$qs.stringify(param)
) )
.then(res => { .then((res) => {
if(res.data.resultCode==='200'){ if (res.data.resultCode === "200") {
this.$message.success("操作成功") this.$message.success("操作成功");
this.getDirPicList(); this.getDirPicList();
this.getAppRunList(); this.getAppRunList();
}else{ } else {
this.$message({type:'error',message:res.data.message}) this.$message.error(res.data.message);
} }
}) })
.catch(function(err) { .catch(function (err) {
console.log(err); console.log(err);
}); });
}, },
// 取消
close() { close() {
this.$router.go(-1); this.$router.go(-1);
} },
} },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
<template>
<el-dialog
custom-class="party-dialog"
title="审核详情"
:visible.sync="dialogVisible"
width="468px"
:before-close="handleClose"
>
<div class="dialog-content">
<p class="isNoData" v-if="isNoData">暂无数据</p>
<el-form
v-else
ref="form"
:model="form"
label-width="80px"
label-position="top"
class="party-form"
>
<el-form-item label="审核层级">
{{ form.level | levelFilter }}
</el-form-item>
<el-form-item label="审核时间">
{{ form.level === "TBCA" ? form.secondTime : form.firstTime }}
</el-form-item>
<el-form-item label="审核结果">
{{ form.status | statusFilter }}
</el-form-item>
<el-form-item label="驳回原因" v-if="form.status === 'REFUSED'">
{{ form.level === "TBCA" ? form.secondRemarks : form.firstRemarks }}
</el-form-item>
</el-form>
</div>
</el-dialog>
</template>
<script>
export default {
data() {
return {
dialogVisible: false,
id: "",
form: {},
isNoData: false,
};
},
filters: {
levelFilter(level) {
switch (level) {
case "TBCA":
return "复审";
break;
case "TBC":
return "初审";
break;
default:
return "暂无数据";
break;
}
},
statusFilter(status) {
switch (status) {
case "TBC":
return "待初审";
break;
case "TBCA":
return "待复审";
break;
case "REFUSED":
return "驳回";
break;
case "APPROVED_FINAL":
return "通过";
break;
default:
return "暂无数据";
break;
}
},
},
methods: {
// 根据id获取获取详情内容
getDetailById() {
let _this = this;
this.$https(
{
method: "get",
url: "audit/getById",
type: "ACCOUNT",
authType: this.backToken,
},
{ id: _this.id }
)
.then((res) => {
if (res.status == 200) {
if (res.data.resultCode == 200) {
if (res.data.data) {
this.isNoData = false;
this.form = res.data.data;
} else {
this.isNoData = true;
this.form = {};
}
} else {
_this.$message.error(res.data.message);
}
} else {
_this.$message.error(res.data);
}
})
.catch((err) => {
console.log(err);
});
},
// 弹窗关闭
handleClose() {
this.handleReset();
},
handleReset() {
this.dialogVisible = false;
this.form = {};
},
},
};
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
...@@ -36,12 +36,13 @@ export default { ...@@ -36,12 +36,13 @@ export default {
return { return {
dialogVisible: false, dialogVisible: false,
form: { form: {
status: 2, status: "REFUSED",
content: "", remarks: "",
type: 3, //0,看板;1 视频;2 学习内容;3 账号禁用 type:"ACCOUNT",
}, },
activeRow:{},
rules: { rules: {
content: [ remarks: [
{ required: true, message: "请填写驳回原因", trigger: "change" }, { required: true, message: "请填写驳回原因", trigger: "change" },
], ],
}, },
...@@ -69,6 +70,14 @@ export default { ...@@ -69,6 +70,14 @@ export default {
handleSubmit() { handleSubmit() {
// 校验用户输入值 // 校验用户输入值
let _this = this; let _this = this;
let params = {};
params.id = this.activeRow.id;
params.refItemId = this.activeRow.refItemId;
params.status = this.form.status;
params.type = this.form.type;
let times = this.activeRow.level == "TBC" ? "first" : "second";
params.level = this.activeRow.status;
params[`${times}Remarks`] = this.form.remarks;
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
this.$https( this.$https(
...@@ -77,7 +86,8 @@ export default { ...@@ -77,7 +86,8 @@ export default {
url: "audit/update", url: "audit/update",
authType: this.backToken, authType: this.backToken,
}, },
_this.form // _this.$qs.stringify(params)
params
) )
.then((res) => { .then((res) => {
this.handleReset(); this.handleReset();
......
<template> <template>
<div class="party-table"> <div class="party-table">
<el-table border :data="list" style="width: 100%;height:100%" height="100%"> <el-table
<el-table-column border
label="序号" :data="list"
align="center" style="width: 100%; height: 100%"
width="100"> height="100%"
<template slot-scope="scope" > >
<span>{{ (currentPage-1) * 10 + scope.$index + 1}}</span> <el-table-column label="序号" align="center" width="100">
<template slot-scope="scope">
<span>{{ (currentPage - 1) * 10 + scope.$index + 1 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
v-for="(item,index) in feildList" v-for="(item, index) in feildList"
:key="index" :key="index"
:prop="item.prop" :prop="item.prop"
:label="item.label" :label="item.label"
:width="item.width"> :width="item.width"
<template slot-scope="scope" > >
<template slot-scope="scope">
<div v-if="item.isEdit" class="table-btn-group"> <div v-if="item.isEdit" class="table-btn-group">
<el-tooltip content="修改" placement="top"> <el-tooltip content="修改" placement="top">
<el-button circle @click="handleOperate(scope.row,'edit')"> <el-button circle @click="handleOperate(scope.row, 'edit')">
<i class="icon-table icon-edit"></i> <i class="icon-table icon-edit"></i>
</el-button> </el-button>
</el-tooltip> </el-tooltip>
<el-tooltip content="重置密码" placement="top"> <el-tooltip content="重置密码" placement="top">
<el-button circle @click="handleOperate(scope.row,'reset')"> <el-button circle @click="handleOperate(scope.row, 'reset')">
<i class="icon-table icon-reset"></i> <i class="icon-table icon-reset"></i>
</el-button> </el-button>
</el-tooltip> </el-tooltip>
<el-tooltip content="禁用" placement="top"> <el-tooltip content="禁用" placement="top">
<el-button <el-button
circle circle
:disabled="scope.row.status == 2 || scope.row.statusName == '待审核' " :disabled="scope.row.statusName !== '活跃'"
@click="handleOperate(scope.row,'disable')"> @click="handleOperate(scope.row, 'disable')"
>
<i class="icon-table icon-disable"></i> <i class="icon-table icon-disable"></i>
</el-button> </el-button>
</el-tooltip> </el-tooltip>
<el-tooltip content="激活" placement="top"> <el-tooltip content="激活" placement="top">
<el-button <el-button
circle circle
:disabled="scope.row.status == 1" :disabled="scope.row.statusName !== '禁用'"
@click="handleOperate(scope.row,'enable')"> @click="handleOperate(scope.row, 'enable')"
>
<i class="icon-table icon-enable"></i> <i class="icon-table icon-enable"></i>
</el-button> </el-button>
</el-tooltip> </el-tooltip>
<el-tooltip content="审核详情" placement="top"> <el-tooltip content="审核详情" placement="top">
<el-button <el-button
circle circle
@click="handleOperate(scope.row,'examine')"> :disabled="scope.row.statusName == '活跃'"
@click="handleOperate(scope.row, 'examine')"
>
<i class="icon-table icon-detail"></i> <i class="icon-table icon-detail"></i>
</el-button> </el-button>
</el-tooltip> </el-tooltip>
</div> </div>
<div v-else> <div v-else>
<span v-if="item.prop==='type'"> <span v-if="item.prop === 'type'">
{{scope.row[item.prop] | accoutType}} {{ scope.row[item.prop] | accoutType }}
</span> </span>
<span v-else>{{scope.row[item.prop]}}</span> <span v-else>{{ scope.row[item.prop] }}</span>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<audit-info ref="audit" />
</div> </div>
</template> </template>
<script> <script>
// status 1 启用 2 禁用 // status 1 启用 2 禁用
import auditInfo from "../auditInfo.vue";
export default { export default {
data(){ data() {
return { return {};
}
}, },
props:{ props: {
currentPage:{ currentPage: {
type:Number, type: Number,
default:1 default: 1,
},
list: {
type: Array,
default: () => {
return [];
},
},
feildList: {
type: Array,
default: () => {
return [];
}, },
list:{
type:Array,
default:()=>{return []}
}, },
feildList:{
type:Array,
default:()=>{return []}
}
}, },
filters:{ filters: {
accoutType(type){ accoutType(type) {
switch (type){ switch (type) {
case "1": case "1":
return "平台账号" return "平台账号";
break; break;
case "2": case "2":
return "用户账号" return "用户账号";
break; break;
case "3": case "3":
return "机顶盒账号" return "机顶盒账号";
break; break;
case "4": case "4":
return "运维账号" return "运维账号";
break; break;
default: default:
return "" return "";
} }
},
},
components: { auditInfo },
methods: {
handleOperate(row, type) {
if (type != "edit" && type != "examine") {
this.$confirm("确认进行此操作?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.handlEmitMsg(row, type);
})
.catch(() => {});
} else if (type == "examine") {
this.$refs.audit.id = row.id;
this.$refs.audit.getDetailById();
this.$refs.audit.dialogVisible = true;
} else {
this.handlEmitMsg(row, type);
} }
}, },
methods:{ handlEmitMsg(row, type) {
handleOperate(row,type){ this.$emit("action", {
if(type != 'edit'){ row: row,
this.$confirm('确认进行此操作?', '提示', { type: type,
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handlEmitMsg(row,type)
}).catch(() => {
}); });
}else{
this.handlEmitMsg(row,type)
}
}, },
handlEmitMsg(row,type){ },
this.$emit( };
"action",
{
row:row,
type:type
}
)
}
}
}
</script> </script>
<style lang="less"> <style lang="less">
@import '../../../style/table.less'; @import "../../../style/table.less";
</style> </style>
\ No newline at end of file
...@@ -85,6 +85,8 @@ export default { ...@@ -85,6 +85,8 @@ export default {
total: 0, total: 0,
}, },
type:'ACCOUNT', type:'ACCOUNT',
passStatus:'APPROVED_FINAL'
//待初审 TBC, 驳回 REFUSED, 待复审 TBCA, 通过APPROVED_FINAL
}; };
}, },
components: { partyPagination, checkTable, rejectDialog }, components: { partyPagination, checkTable, rejectDialog },
...@@ -162,20 +164,26 @@ export default { ...@@ -162,20 +164,26 @@ export default {
}, },
// 驳回 // 驳回
handleRject() { handleRject() {
this.$refs.rejectDialog.activeRow = this.activeRow;
this.$refs.rejectDialog.dialogVisible = true; this.$refs.rejectDialog.dialogVisible = true;
}, },
// 通过 // 通过
handlePass() { handlePass() {
let params = {}; let params = {};
let _this = this
params.id = this.activeRow.id; params.id = this.activeRow.id;
params.status = 4; params.status = this.passStatus;
params.type = this.type params.type = this.type
params.refItemId = this.activeRow.refItemId
params.level = this.activeRow.status
this.$https( this.$https(
{ {
method: "put", method: "put",
url: "audit/update", url: "audit/update",
authType: this.backToken, authType: this.backToken,
}, },
// _this.$qs.stringify(params)
params params
) )
.then((res) => { .then((res) => {
......
This diff is collapsed.
<template>
<el-dialog
custom-class="party-dialog"
title="编辑统计账号"
:visible.sync="dialogVisible"
width="468px"
:before-close="handleClose"
>
<div class="dialog-content">
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="80px"
label-position="top"
class="party-form"
>
<el-form-item label="用户名" prop="userName">
<el-input
v-model="form.userName"
placeholder="请输入用户名"
></el-input>
</el-form-item>
<el-form-item label="所在机构" prop="orgId">
<el-select v-model="form.orgId" filterable placeholder="请选择">
<el-option
v-for="item in organList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="账号有效期" prop="permanent">
<el-radio-group v-model="form.permanent">
<el-radio :label="true">永久有效</el-radio>
<el-radio :label="false">设置有效期</el-radio>
</el-radio-group>
<div v-if="!form.permanent">
<el-date-picker
class="mt16"
v-model="form.date"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</div>
</el-form-item>
</el-form>
</div>
<div slot="footer" class="dialog-footer btn-group">
<el-button @click="handleClose()">取 消</el-button>
<el-button type="primary" @click="handleSubmit()">确 定</el-button>
</div>
</el-dialog>
</template>
<script>
import { getOrgListWithOutPage } from "@/config/organ";
export default {
data() {
return {
dialogVisible: false,
organList: [],
form: {
userName: "",
orgId: "",
permanent: true,
date: "",
},
rules: {
userName: [
{ required: true, message: "请填写管理员姓名", trigger: "change" },
],
orgId: [
{ required: true, message: "请输入所在机构", trigger: "change" },
],
permanent: [
{ required: true, message: "请选择账号有效期", trigger: "change" },
],
},
};
},
mounted() {
this.getOrgList();
},
methods: {
// 获取机构列表
getOrgList() {
getOrgListWithOutPage().then((res) => {
this.organList = res;
});
},
// 弹窗关闭
handleClose() {
this.$confirm("确认关闭?")
.then((_) => {
this.handleReset();
})
.catch((_) => {});
},
handleReset() {
this.dialogVisible = false;
this.$refs.form.resetFields();
this.form = {
userName: "",
orgId: "",
permanent: true,
date: "",
};
},
// 提交
handleSubmit() {
// 校验用户输入值
this.$refs.form.validate((valid) => {
if (valid) {
let user = {};
if (!this.form.permanent && !this.form.date) {
this.$message.error("请选择有效期");
return false;
}
if (!this.form.permanent) {
user.effectiveDate = this.form.date[0];
user.exiredDate = this.form.date[1];
}
user.permanent = this.form.permanent;
user.userName = this.form.userName;
user.orgId = this.form.orgId;
let requetsparams = this.$qs.stringify(user)
this.$https(
{
method: "post",
url: "tUser/statisticsAdd",
authType: this.backToken,
},
requetsparams
)
.then((res) => {
if (res.status == 200) {
if (res.data.resultCode == 200) {
this.$message({
type: "success",
message: res.data.message,
});
this.handleReset();
this.$emit("success", true);
} else {
this.$message.error(res.data.message);
}
} else {
this.$message.error(res.data);
}
})
.catch((err) => {
console.log(err);
});
} else {
console.log("error submit!!");
return false;
}
});
},
},
};
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
<template>
<el-dialog
custom-class="party-dialog"
title="新建统计账号"
:visible.sync="dialogVisible"
width="468px"
:before-close="handleClose"
>
<div class="dialog-content">
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="80px"
label-position="top"
class="party-form"
>
<el-form-item label="用户名" prop="userName">
<el-input
v-model="form.userName"
placeholder="请输入用户名"
></el-input>
</el-form-item>
<el-form-item label="所在机构" prop="orgId">
<el-select v-model="form.orgId" filterable placeholder="请选择">
<el-option
v-for="item in organList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="账号有效期" prop="permanent">
<el-radio-group v-model="form.permanent">
<el-radio :label="true">永久有效</el-radio>
<el-radio :label="false">设置有效期</el-radio>
</el-radio-group>
<div v-if="!form.permanent">
<el-date-picker
class="mt16"
v-model="form.date"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</div>
</el-form-item>
</el-form>
</div>
<div slot="footer" class="dialog-footer btn-group">
<el-button @click="handleClose()">取 消</el-button>
<el-button type="primary" @click="handleSubmit()">确 定</el-button>
</div>
</el-dialog>
</template>
<script>
import { getOrgListWithOutPage } from "@/config/organ";
export default {
data() {
return {
dialogVisible: false,
organList: [],
id:'',
form: {
userName: "",
orgId: "",
permanent: true,
date: "",
},
rules: {
userName: [
{ required: true, message: "请填写管理员姓名", trigger: "change" },
],
orgId: [
{ required: true, message: "请输入所在机构", trigger: "change" },
],
permanent: [
{ required: true, message: "请选择账号有效期", trigger: "change" },
],
},
};
},
mounted() {
this.getOrgList();
},
methods: {
// 获取机构列表
getOrgList() {
getOrgListWithOutPage().then((res) => {
this.organList = res;
});
},
// 根据id获取获取详情内容
getDetailById(){
let _this = this
this.$https(
{
method: "get",
url: "tUser/getById",
authType: this.backToken,
},
{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(!this.form.permanent){
this.form.date = [
resData.effectiveDate,
resData.exiredDate
]
}
} else {
_this.$message.error(res.data.message);
}
} else {
_this.$message.error(res.data);
}
})
.catch((err) => {
console.log(err);
});
},
// 弹窗关闭
handleClose() {
this.$confirm("确认关闭?")
.then((_) => {
this.handleReset();
})
.catch((_) => {});
},
handleReset() {
this.dialogVisible = false;
this.$refs.form.resetFields();
this.form = {
userName: "",
orgId: "",
permanent: true,
date: "",
};
},
// 提交
handleSubmit() {
// 校验用户输入值
this.$refs.form.validate((valid) => {
if (valid) {
let user = {};
if (!this.form.permanent && !this.form.date) {
this.$message.error("请选择有效期");
return false;
}
if (!this.form.permanent) {
user.effectiveDate = this.form.date[0];
user.exiredDate = this.form.date[1];
}
user.permanent = this.form.permanent;
user.userName = this.form.userName;
user.orgId = this.form.orgId;
user.id = this.id
user.type = 5
this.$https(
{
method: "put",
url: "tUser/update",
authType: this.backToken,
},
user
)
.then((res) => {
if (res.status == 200) {
if (res.data.resultCode == 200) {
this.$message({
type: "success",
message: res.data.message,
});
this.handleReset();
this.$emit("success", true);
} else {
this.$message.error(res.data.message);
}
} else {
this.$message.error(res.data);
}
})
.catch((err) => {
console.log(err);
});
} else {
console.log("error submit!!");
return false;
}
});
},
},
};
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
import addDialog from './add'
import editDialog from './edit'
export {
addDialog,
editDialog
}
\ No newline at end of file
...@@ -74,6 +74,7 @@ export default { ...@@ -74,6 +74,7 @@ export default {
{ prop: "orgName", label: "运维区域" }, { prop: "orgName", label: "运维区域" },
{ prop: "exiredDate", label: "到期时间" }, { prop: "exiredDate", label: "到期时间" },
{ prop: "type", label: "账号类型" }, { prop: "type", label: "账号类型" },
{ prop: "statusName", label: "账号状态" },
{ prop: "", label: "操作", isEdit: true, width: 280 }, { prop: "", label: "操作", isEdit: true, width: 280 },
], ],
list: [], list: [],
...@@ -214,7 +215,7 @@ export default { ...@@ -214,7 +215,7 @@ export default {
let _this = this; let _this = this;
this.$https({ this.$https({
method: "put", method: "put",
url: `tUser/disable?userId=${this.activeRow.id}`, url: `tUser/enable?userId=${this.activeRow.id}`,
authType: this.backToken, authType: this.backToken,
}) })
.then((res) => { .then((res) => {
......
...@@ -272,7 +272,7 @@ export default { ...@@ -272,7 +272,7 @@ export default {
let _this = this; let _this = this;
this.$https({ this.$https({
method: "put", method: "put",
url: `tUser/disable?userId=${this.activeRow.id}`, url: `tUser/enable?userId=${this.activeRow.id}`,
authType: this.backToken, authType: this.backToken,
}) })
.then((res) => { .then((res) => {
......
...@@ -90,7 +90,6 @@ ...@@ -90,7 +90,6 @@
</template> </template>
<script> <script>
import { getOrgListWithOutPage } from "@/config/organ"; import { getOrgListWithOutPage } from "@/config/organ";
import { getRoles } from "@/config/roles";
export default { export default {
data() { data() {
var validateMobilePhone = (rule, value, callback) => { var validateMobilePhone = (rule, value, callback) => {
......
...@@ -50,7 +50,7 @@ export default { ...@@ -50,7 +50,7 @@ export default {
return { return {
form: { form: {
userName: "", userName: "",
type: 1, //1.用户账号 2.平台单位单位管理员账号 3.机顶盒账号 4.运维账号 type: 1, //1.用户账号 2.平台单位单位管理员账号 3.机顶盒账号 4.运维账号 5. 统计账号
}, },
feildList: [ feildList: [
{ prop: "userName", label: "平台用户名" }, { prop: "userName", label: "平台用户名" },
...@@ -195,7 +195,7 @@ export default { ...@@ -195,7 +195,7 @@ export default {
let _this = this; let _this = this;
this.$https({ this.$https({
method: "put", method: "put",
url: `tUser/disable?userId=${this.activeRow.id}`, url: `tUser/enable?userId=${this.activeRow.id}`,
authType: this.backToken, authType: this.backToken,
}) })
.then((res) => { .then((res) => {
......
<template>
<div class="interactive-wrapper height100">
<el-row :gutter="16" style="margin-left:0;margin-right:0;height:calc(100% - 41px);">
<el-col :span="6" class="height100">
<el-card class="height100">
<div class="tree-title">组织机构</div>
<div class="tree-body">
<el-input suffix-icon="el-icon-search" placeholder="请输入组织结构名称" v-model="filterText"></el-input>
<el-tree
class="filter-tree"
:data="treeData"
:props="defaultProps"
default-expand-all
accordion
:filter-node-method="filterNode"
@node-click="handleNodeClick"
ref="tree"
/>
</div>
</el-card>
</el-col>
<el-col :span="18" class="height100" ref="rightBox">
<el-card class="height100">
<div class="content-title">
<div class="title">“北京市政府”展板互动信息汇总</div>
<div class="page-tip">
<span class="page-tip-title">页面说明:</span>
<span class="page-tips">可按照账号状态及所属单位进行信息筛选。可新增机顶盒账号,“*”为必填项。请先创建单位管理员账号,否则机顶盒无法激活</span>
</div>
</div>
<div class="scrollBox" :style="{height:height+'px'}">
<div class="content-item" v-for="(item,index) in tableData" :key="index">
<h5 class="title">{{item.name}}</h5>
<p>{{item.content}}</p>
<div class="img-box">
<img v-for="(j,idx) in item.images" :src="j" :key='idx' alt="">
<!-- <img src="@/assets/audio-icon.png" alt="">
<img src="@/assets/audio-icon.png" alt="">
<img src="@/assets/video-icon.png" alt="">
<img src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic139.nipic.com%2Ffile%2F20170825%2F24044964_112347917039_2.jpg&refer=http%3A%2F%2Fpic139.nipic.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1616393684&t=43405cf2c33d8addc98e0909da78f359" alt=""> -->
</div>
<div class="author">
<div>{{item.username}}</div>
<div>{{item.createTime}}</div>
</div>
</div>
</div>
<div class="partyt-pagination" style="margin:0 20px;">
<el-pagination
background
@current-change="handleCurrentChange"
:current-page="page.currentPage"
:page-size="page.pageSize"
layout="prev, pager, next, jumper"
:total="page.total"
></el-pagination>
</div>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
export default {
data() {
return {
height:'',
filterText: "",
page: { currentPage: 1, pageSize: 10, total: 0 },
treeData: [],
defaultProps: {
children: "children",
label: "name"
},
selectAreaId:'',
tableData: [
{
title: "建党百年,爱国主义教育",
content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo. Proin sodales pulvinar tempor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam fermentum, nulla luctus pharetra vulputate, felis tellus mollis orci, sed rhoncus sapien nunc eget.",
author: "邢潇潇",
files:['@/assets/audio-icon.png','@/assets/video-icon.png','https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic139.nipic.com%2Ffile%2F20170825%2F24044964_112347917039_2.jpg&refer=http%3A%2F%2Fpic139.nipic.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1616393684&t=43405cf2c33d8addc98e0909da78f359'],
macUrl: "2021/01/02 14:34:22"
},
{
title: "建党百年,爱国主义教育",
content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo. Proin sodales pulvinar tempor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam fermentum, nulla luctus pharetra vulputate, felis tellus mollis orci, sed rhoncus sapien nunc eget.",
author: "邢潇潇",
files:['@/assets/audio-icon.png','@/assets/video-icon.png','https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic139.nipic.com%2Ffile%2F20170825%2F24044964_112347917039_2.jpg&refer=http%3A%2F%2Fpic139.nipic.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1616393684&t=43405cf2c33d8addc98e0909da78f359'],
macUrl: "2021/01/02 14:34:22"
},
]
};
},
watch: {
filterText(val) {
this.$refs.tree.filter(val);
}
},
mounted(){
this.height = this.$refs.rightBox.$el.offsetHeight-160
// 获取全部组织机构数据
this.getOrgData()
this.onSearch()
},
methods: {
// 查询
onSearch() {
this.page.currentPage = 1
this.getTableData();
},
// 获得数据接口
getTableData() {
let vm = this;
vm.tableData = []
let param = {
_index:this.page.currentPage,
_size:this.page.pageSize,
orgId: this.selectAreaId
};
vm.$https(
{
url: "interaction/getList",
method: "post",
authType: this.backToken
},
vm.$qs.stringify(param)
).then(res => {
if(res.data.resultCode==='200'){
let data = res.data.data;
vm.page.total = data.total;
vm.tableData = data.records;
vm.tableData.forEach(item=>{
item.images = item.images.split(',')
item.images.forEach((result,index)=>{
if (/\.(MP4|mp4)/.test(result)){
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')
}
})
})
vm.tableData = [...vm.tableData]
}else{
this.$message({type:'error',message:res.data.message})
}
})
.catch(function(err) {
console.log(err);
})
},
// 获取组织机构数据
getOrgData(){
this.$https({
method: "get",
url: "organ/getList",
authType: this.backToken
}).then(res => {
if(res.data.resultCode === '200'){
this.treeData = res.data.data;
}else{
this.$message({type:'error',message:res.data.message})
}
},
error => {
console.log(error);
}
);
},
// 过滤树结构数据
filterNode(value, data) {
if (!value) return true;
return data.name.indexOf(value) !== -1;
},
// 点击节点事件
handleNodeClick(data) {
this.selectAreaId = data.id
this.getTableData()
},
// 分页
handleCurrentChange(val) {
this.page.currentPage = val;
this.getTableData();
},
}
};
</script>
<style lang="less">
@import '../../../style/pagination.less';
.interactive-wrapper {
.scrollBox {
overflow: auto;
}
.page-tip {
display: flex;
font-size: 14px;
color: #333333;
.page-tip-title {
font-weight: bold;
padding-right: 10px;
}
}
.el-card__body {
padding: 0;
}
.tree-title {
font-size: 16px;
color: #fff;
text-align: center;
height: 56px;
line-height: 56px;
background: #9B1E23;
border-radius: 8px 8px 0 0;
}
.tree-body {
padding: 20px;
.el-input__inner {
background: #F8F8F8;
border-radius: 22px;
}
.el-input__icon {
font-size: 18px;
color: #AC9374;
}
.el-tree-node__content:hover {
border-radius: 20px;
}
.el-tree-node__content {
height:30px;
margin: 5px 0;
}
}
.content-title {
display: flex;
justify-content: space-between;
padding: 20px;
border-bottom: 1px solid #eee;
.title {
font-size: 20px;
color: #333;
}
.page-tips {
width:500px;
}
}
.content-item {
font-size: 16px;
margin: 20px;
padding: 40px;
background: #f8f8f8;
.title {
padding-bottom: 20px;
}
p {
padding-bottom: 20px;
border-bottom: 1px solid #bbb;
}
.img-box {
padding: 20px;
border-bottom: 1px solid #bbb;
img {
width: 90px;
height: 90px;
margin-right: 20px;
}
}
.author {
display: flex;
justify-content: space-between;
padding-top: 16px;
font-size: 14px;
}
}
}
</style>
\ No newline at end of file
...@@ -17,9 +17,10 @@ ...@@ -17,9 +17,10 @@
<span class="panel-box-sub-title_name">{{subItem.name}}</span> <span class="panel-box-sub-title_name">{{subItem.name}}</span>
</div> </div>
<ul > <ul >
<li v-for="(menu,mIndex) in subItem.children" :key="mIndex" @click="goPage(menu.url)" :class="menu.color"> <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> <i :class="menu.icon" class="icon-memu"></i>
</div>
<span class="menu-label">{{menu.name}}</span> <span class="menu-label">{{menu.name}}</span>
</li> </li>
</ul> </ul>
...@@ -29,15 +30,15 @@ ...@@ -29,15 +30,15 @@
</div> </div>
</template> </template>
<script> <script>
import { menuList } from '@/config/menu' // import { menuList } from '@/config/menu'
export default{ export default{
data() { data() {
return{ return{
menuList:menuList menuList:[]
} }
}, },
mounted(){ mounted(){
this.menuList = JSON.parse(localStorage.getItem('menuList') || [])
}, },
methods:{ methods:{
goPage(path){ goPage(path){
...@@ -54,37 +55,13 @@ export default{ ...@@ -54,37 +55,13 @@ export default{
<style lang="less" scoped> <style lang="less" scoped>
@import '~@/style/menu.less'; @import '~@/style/menu.less';
@media screen and (max-width: 1440px) { @media screen and (max-width: 1440px) {
.index-container{ .index-container{ width: 100%; }
width: 100%;
}
.panel-sub-box ul li{
padding:1.25vw 10px;
.menu-label{
font-size: 14px;
}
}
} }
@media (min-width:1441px) and (max-width:1680px) { @media (min-width:1441px) and (max-width:1680px) {
.index-container{ .index-container{ width: 96%; }
width: 96%;
}
.panel-sub-box ul li{
padding:1.25vw 20px;
.menu-label{
font-size: 14px;
}
}
} }
@media (min-width:1681px){ @media (min-width:1681px){
.index-container{ .index-container{ width: 92%; }
width: 92%;
}
.panel-sub-box ul li{
padding:1.25vw;
.menu-label{
font-size: 16px;
}
}
} }
.index-container{ .index-container{
margin: 0 auto; margin: 0 auto;
...@@ -163,6 +140,7 @@ export default{ ...@@ -163,6 +140,7 @@ export default{
ul{ ul{
display: flex; display: flex;
padding-top: 20px; padding-top: 20px;
margin-left: -20px;
li{ li{
width: 6.67vw; width: 6.67vw;
height:8.33vw ; height:8.33vw ;
...@@ -171,26 +149,22 @@ export default{ ...@@ -171,26 +149,22 @@ export default{
text-align: center; text-align: center;
border-radius: 8px; border-radius: 8px;
color: @font-color; color: @font-color;
cursor: pointer;
&:not(:first-child){ &:not(:first-child){
margin-left: 20px; margin-left: 20px;
} }
&.active,&:hover{ .icon-div{
background: @party-red; padding-top: 0.94vw;
box-shadow: 0 8px 4px -4px rgba(155,30,35,0.40); height: 4.79vw;
border-radius: 8px; width: 4.79vw;
border-radius: 8px; border-radius: 16px;
color: @party-white; margin: 0 auto 0.8vw ;
cursor: pointer;
color:@party-white;
} }
.icon-memu{ .icon-memu{
display: block; display: block;
width: 2.08vw; margin: 0 auto;
height: 2.08vw; width: 2.91vw;
border-radius:50%; height: 2.91vw;
margin: 0 auto 0.83vw;
background-image: linear-gradient(180deg, #FFF7E8 0%, #FFEDCC 100%);
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.20);
} }
.menu-label{ .menu-label{
line-height: 24px; line-height: 24px;
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<div class="list-of-area"> <div class="list-of-area">
<div class="list-of-area-title common-title"> <div class="list-of-area-title common-title">
<div class="icon-and-title"> <div class="icon-and-title">
<img class="icon-title" src="@/assets/overview/s-play.png" alt=""> <img class="icon-title" src="@/assets/overview/s-play.png" alt="" />
<span class="title">{{title}}</span> <span class="title">{{ title }}</span>
</div> </div>
<img class="bg" src="@/assets/overview/bg_title.png" alt=""> <img class="bg" src="@/assets/overview/bg_title.png" alt="" />
</div> </div>
<div class="list-of-body"> <div class="list-of-body">
<ul class="body-title"> <ul class="body-title">
...@@ -15,56 +15,40 @@ ...@@ -15,56 +15,40 @@
</ul> </ul>
<div class="body-content" id="areaContent"> <div class="body-content" id="areaContent">
<div id="area1"> <div id="area1">
<ul class="body-item" v-for="(item,index) in list" :key="index"> <ul class="body-item" v-for="(item, index) in list" :key="index">
<li class="f5">{{item.city}}</li> <li class="f5">{{ item.areaName }}</li>
<li class="f3">{{item.play}}</li> <li class="f3">{{ item.playNumber }}</li>
<li class="f2">{{item.num}}</li> <li class="f2">{{ item.boardCnt }}</li>
</ul> </ul>
</div> </div>
<div id="area2"></div> <div id="area2"></div>
<div id="area3">></div> <div id="area3">></div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'areas', name: "areas",
data() { data() {
return { return {
title:'地区展板播放统计', title: "地区展板播放统计",
timer:null, timer: null,
speed:50, speed: 50,
box:null, box: null,
area1:null, area1: null,
list:[ list: [],
{ city:'山西省',play:'10000', num:'24'}, };
{ city:'湖南省',play:'8878', num:'22'},
{ city:'海南省',play:'5934', num:'21'},
{ city:'贵州省',play:'5899', num:'18'},
{ city:'云南省',play:'5523', num:'16'},
{ city:'甘肃省',play:'4678', num:'12'},
{ city:'四川省',play:'4224', num:'6'},
{ city:'湖南省',play:'3023', num:'4'},
{ city:'江西省',play:'2412', num:'2'},
{ city:'黑龙江省',play:'2258', num:'2'},
{ city:'湖北省',play:'2198', num:'2'},
{ city:'安徽省',play:'2158', num:'2'},
{ city:'新疆维吾尔自治区',play:'2258', num:'2'},
{ city:'广西壮族自治区',play:'1588', num:'2'},
{ city:'西藏自治区',play:'1258', num:'2'},
]
}
}, },
mounted() { mounted() {
setTimeout(()=>{ this.getList();
this.initScroll() this.$nextTick((v) => {
},1000) this.initScroll();
});
}, },
methods: { methods: {
initScroll() { initScroll() {
let _this = this let _this = this;
this.box = document.getElementById("areaContent"); this.box = document.getElementById("areaContent");
this.con1 = document.getElementById("area1"); this.con1 = document.getElementById("area1");
let con2 = document.getElementById("area2"); let con2 = document.getElementById("area2");
...@@ -76,14 +60,40 @@ ...@@ -76,14 +60,40 @@
scrollUp() { scrollUp() {
if (this.box.scrollTop >= this.con1.scrollHeight) { if (this.box.scrollTop >= this.con1.scrollHeight) {
this.box.scrollTop = 0; this.box.scrollTop = 0;
} else{ } else {
this.box.scrollTop++; this.box.scrollTop++;
} }
}, },
getList() {
let requestparams = {};
requestparams._index = 1;
requestparams._size = 10;
this.$https(
{
method: "post",
url: "tBoardStatistic/getBoardDistrictPageList",
authType: this.backToken,
},
requestparams
)
.then((res) => {
if (res.status == 200) {
if (res.data.resultCode == 200) {
this.list = res.data.data.records;
} else {
this.list = [];
} }
} else {
this.list = [];
} }
})
.catch((err) => {
this.$message.error(err.message);
});
},
},
};
</script> </script>
<style lang="less"> <style lang="less">
</style> </style>
...@@ -2,17 +2,18 @@ ...@@ -2,17 +2,18 @@
<div class="dashbord-list"> <div class="dashbord-list">
<p class="tip"> <p class="tip">
<span class="tip-title">页面说明:</span> <span class="tip-title">页面说明:</span>
<span>可查看当前系统各项数据统计情况。互动频次及点播趋势图展示部分数据,可进入互动统计及趋势分析详情页查看全部数据。</span> <span
>可查看当前系统各项数据统计情况。互动频次及点播趋势图展示部分数据,可进入互动统计及趋势分析详情页查看全部数据。</span
>
</p> </p>
<ul> <ul>
<li v-for="(item, index) in list" :key="index"> <li v-for="(item, index) in list" :key="index">
<div class="title-name">{{item.label}}</div> <div class="title-name">{{ item.label }}</div>
<img :src="getImg(item.urlName)" alt=""> <img :src="getImg(item.urlName)" alt="" />
<!-- <img src="@/assets/overview/play.png" alt=""> -->
<div class="title"> <div class="title">
<span> <span>
<a class="num">{{item.num}}</a> <a class="num">{{ item.num }}</a>
<a class="unit">{{item.unit}}</a> <a class="unit">{{ item.unit }}</a>
</span> </span>
</div> </div>
</li> </li>
...@@ -21,79 +22,121 @@ ...@@ -21,79 +22,121 @@
</template> </template>
<script> <script>
export default { export default {
name: 'nums', name: "nums",
data() { data() {
return { return {
list:[ data: [
{label:'总播放量',num: 1000, unit: '次',urlName:'play'}, {
{label:'单位组织',num: 688, unit: '家',urlName:'org'}, label: "总播放量",
{label:'展板总量',num: 20, unit: '个',urlName:'boardsTotal'}, num: 0,
{label:'互动总量',num: 899, unit: '次',urlName:'interaction'}, unit: "次",
] urlName: "play",
} feild: "playCnt",
},
{
label: "单位组织",
num: 0,
unit: "家",
urlName: "org",
feild: "orgCnt",
},
{
label: "展板总量",
num: 0,
unit: "个",
urlName: "boardsTotal",
feild: "boardCnt",
},
{
label: "互动总量",
num: 0,
unit: "次",
urlName: "interaction",
feild: "interactionCnt",
},
],
list: [],
};
}, },
mounted() { mounted() {
// this.initData() this.getList()
}, },
methods: { methods: {
getImg(imgUrl){ getImg(imgUrl) {
return require('@/assets/overview/'+ imgUrl + '.png') return require("@/assets/overview/" + imgUrl + ".png");
}, },
initData(){ getList() {
const _this = this this.$https({
setInterval(()=>{ method: "post",
let num = Math.floor(Math.random()*4) url: "tBoardStatistic/getBoardSurvey",
num = num > 2 ? 3:0 authType: this.backToken,
_this.$set(_this.list[num],'num', ++_this.list[num]['num'] ) })
},3000) .then((res) => {
} if (res.status == 200) {
if (res.data.resultCode == 200) {
let resData = res.data.data;
this.list = [...this.data].map((v) => {
v['num'] = resData[v['feild']];
return v
});
} else {
this.list = [...this.data];
} }
} else {
this.list = [...this.data];
} }
})
.catch((err) => {
this.$message.error(err.message);
});
},
},
};
</script> </script>
<style lang="less"> <style lang="less">
.dashbord-list{ .dashbord-list {
width: 100%; width: 100%;
position: absolute; position: absolute;
padding: 0 10px; padding: 0 10px;
z-index: 100; z-index: 100;
.tip{ .tip {
color: @font-color; color: @font-color;
.tip-title{ .tip-title {
font-weight: bold; font-weight: bold;
padding-right: 10px; padding-right: 10px;
} }
} }
ul{ ul {
display: flex; display: flex;
font-size: 0; font-size: 0;
justify-content: space-around; justify-content: space-around;
li{ li {
position: relative; position: relative;
width: 9vw; width: 9vw;
margin-top: 15px; margin-top: 15px;
} }
img{ img {
width: 100%; width: 100%;
} }
.title-name{ .title-name {
font-size: 18px; font-size: 18px;
color: @font-color; color: @font-color;
position: absolute; position: absolute;
top: -8px; top: -8px;
right: 0; right: 0;
} }
.title{ .title {
position: absolute; position: absolute;
right: 0.2rem; right: 0.2rem;
bottom: 5px; bottom: 5px;
color: @party-white; color: @party-white;
.num{ .num {
font-size: 28px; font-size: 28px;
} }
.unit{ .unit {
font-size:16px; font-size: 16px;
margin-left: 5px; margin-left: 5px;
} }
} }
......
<template> <template>
<div id="mapDiv"> <div id="mapDiv"></div>
</div>
</template> </template>
<script> <script>
import 'echarts/map/js/china' // import "echarts/map/js/china";
var dataList = [{ import echarts from 'echarts'
name: '安徽',value: 5498 import { chinaJson } from "@/map/china";
}, { echarts.registerMap("china", chinaJson);
name: '澳门',value: 0 export default {
}, { name: "maps",
name: '北京',value: 0
}, {
name: '福建',value: 4111
}, {
name: '甘肃',value: 59
}, {
name: '广东',value: 1928
}, {
name: '广西',value: 4
}, {
name: '贵州',value: 52
}, {
name: '海南',value: 1284
}, {
name: '河北',value: 3151
}, {
name: '河南',value: 3814
}, {
name: '黑龙江',value: 316
}, {
name: '湖北',value: 1724
}, {
name: '湖南',value: 33378
}, {
name: '吉林',value: 520
}, {
name: '江苏',value: 113
}, {
name: '江西',value: 961
}, {
name: '辽宁',value: 139
}, {
name: '内蒙古',value: 0
}, {
name: '宁夏',value: 60
}, {
name: '青海',value: 0
}, {
name: '山东',value: 106
}, {
name: '山西',value: 0
}, {
name: '陕西',value: 114
}, {
name: '上海',value: 1321
}, {
name: '四川',value: 7867
}, {
name: '台湾',value: 0
}, {
name: '天津',value: 1157
}, {
name: '西藏',value: 14
}, {
name: '香港',value: 0
}, {
name: '新疆',value: 115
}, {
name: '云南',value: 3811
}, {
name: '浙江',value: 0
}, {
name: '重庆',value: 886
}
];
export default {
name: 'maps',
data() { data() {
return { return {
dataList: [],
} };
}, },
mounted() { mounted() {
setTimeout(()=>{ this.getList();
this.init()
},100)
}, },
methods: { methods: {
init(){ getList() {
this.$https({
method: "post",
url: "tBoardStatistic/getBoardProvincePlayTotalList",
authType: this.backToken,
})
.then((res) => {
if (res.status == 200) {
if (res.data.resultCode == 200) {
this.dataList = res.data.data;
} else {
this.dataList = [];
}
} else {
this.dataList = [];
}
this.init();
})
.catch((err) => {
this.$message.error(err.message);
this.init();
});
},
init() {
let option = { let option = {
tooltip: { tooltip: {
triggerOn: "click", triggerOn: "click",
formatter: function(e, t, n) { formatter: function (e, t, n) {
return .5 == e.value ? e.name + ":播放量" : e.seriesName + "<br />" + e.name + ":" + e.value return 0.5 == e.value
} ? e.name + ":播放量"
: e.seriesName + "<br />" + e.name + ":" + e.value;
}, },
visualMap: [{ },
visualMap: [
{
dimension: 0, dimension: 0,
right: 20, right: 20,
bottom: 20, bottom: 20,
itemWidth: 16, itemWidth: 16,
itemHeight: '200px', itemHeight: "200px",
orient:'horizontal', orient: "horizontal",
text: ['由高到低','播放量'], text: ["由高到低", "播放量"],
backgroundColor:'rgba(0,28,66,0.6)', backgroundColor: "rgba(0,28,66,0.6)",
padding:[15,10], padding: [15, 10],
textStyle: { textStyle: {
color: 'rgba(255,255,255,1)' color: "rgba(255,255,255,1)",
}, },
inRange: { inRange: {
color: ['#9B1E23', '#E72128', '#FB8D1F', '#FFCF4E'] color: ["#9B1E23", "#E72128", "#FB8D1F", "#FFCF4E"],
} },
}], },
],
geo: { geo: {
map: "china", map: "china",
roam: !1, roam: !1,
scaleLimit: { scaleLimit: {
min: 1, min: 1,
max: 2 max: 2,
}, },
roam: true, //是否开启平游或缩放 roam: true, //是否开启平游或缩放
scaleLimit: { //滚轮缩放的极限控制 scaleLimit: {
//滚轮缩放的极限控制
min: 1, min: 1,
max: 2 max: 2,
}, },
zoom: 1, zoom: 1,
top: 100, top: 100,
left:'10%', left: "10%",
label: { label: {
normal: { normal: {
show: !0, show: !0,
fontSize: "12", fontSize: "12",
color: "#fff" color: "#fff",
} },
}, },
itemStyle: { itemStyle: {
normal: { normal: {
borderColor: "rgba(0, 0, 0, 0.2)" borderColor: "rgba(0, 0, 0, 0.2)",
}, },
emphasis: { emphasis: {
areaColor: "#f2d5ad", areaColor: "#f2d5ad",
shadowOffsetX: 0, shadowOffsetX: 0,
shadowOffsetY: 0, shadowOffsetY: 0,
borderWidth: 0 borderWidth: 0,
} },
}, },
regions: [ regions: [
{ {
...@@ -156,31 +113,33 @@ ...@@ -156,31 +113,33 @@
// 隐藏地图 // 隐藏地图
normal: { normal: {
opacity: 0, // 为 0 时不绘制该图形 opacity: 0, // 为 0 时不绘制该图形
} },
}, },
label: { label: {
show: false // 隐藏文字 show: false, // 隐藏文字
} },
} },
] ],
}, },
series: [{ series: [
{
name: "播放量", name: "播放量",
type: "map", type: "map",
geoIndex: 0, geoIndex: 0,
data: dataList data: this.dataList,
}] },
],
}; };
let echartsDiv = this.$echarts.init(document.getElementById('mapDiv')) let echartsDiv = this.$echarts.init(document.getElementById("mapDiv"));
echartsDiv.setOption(option) echartsDiv.setOption(option);
} },
} },
} };
</script> </script>
<style lang="less"> <style lang="less">
#mapDiv{ #mapDiv {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
</style> </style>
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<div class="list-of-top10"> <div class="list-of-top10">
<div class="list-of-top10-title common-title"> <div class="list-of-top10-title common-title">
<div class="icon-and-title"> <div class="icon-and-title">
<img class="icon-title" src="@/assets/overview/board.png" alt=""> <img class="icon-title" src="@/assets/overview/board.png" alt="" />
<span class="title">{{title}}</span> <span class="title">{{ title }}</span>
</div> </div>
<img class="bg" src="@/assets/overview/bg_title.png" alt=""> <img class="bg" src="@/assets/overview/bg_title.png" alt="" />
</div> </div>
<div class="list-of-body"> <div class="list-of-body">
<ul class="body-title"> <ul class="body-title">
...@@ -15,12 +15,14 @@ ...@@ -15,12 +15,14 @@
</ul> </ul>
<div class="body-content" id="bodyContent"> <div class="body-content" id="bodyContent">
<div id="con1"> <div id="con1">
<ul class="body-item" v-for="(item,index) in list" :key="index"> <ul class="body-item" v-for="(item, index) in list" :key="index">
<li class="f1">{{index%10 + 1}}</li> <li class="f1">{{ (index % 10) + 1 }}</li>
<li class="f7"> <li class="f7">
<div class="title" :title="item.name">{{item.name}}</div> <div class="title" :title="item.boardName">
{{ item.boardName }}
</div>
</li> </li>
<li class="f2">{{item.num}}</li> <li class="f2">{{ item.playNumber }}</li>
</ul> </ul>
</div> </div>
<div id="con2"></div> <div id="con2"></div>
...@@ -30,51 +32,41 @@ ...@@ -30,51 +32,41 @@
</template> </template>
<script> <script>
export default { export default {
name: 'top10', name: "top10",
data() { data() {
return { return {
title:'全国2021年3月展板点播TOP10', title: "",
timer:null, timer: null,
speed:50, speed: 50,
box:null, box: null,
con1:null, con1: null,
list:[ list: [],
{ name:'中国沦为半殖民地半封建社会', num:'11902' }, };
{ name:'抗日战争取得伟大胜利', num:'59876' },
{ name:'筹建新中国', num:'68902' },
{ name:'中华人民共和国成立', num:'368902' },
{ name:'伟大成就', num:'78902' },
{ name:'完善和落实中国特色社会主义事业总体布局', num:'58902' },
{ name:'中国特色社会主义进入新时代', num:'88902'},
{ name:'开创中国特色社会主义新局面', num:'78902'},
{ name:'社会主义文化强国建设迈出坚实步伐', num:'108902'},
{ name:'坚决打赢脱贫攻坚战', num:'188902'},
// { name:'蒋介石背叛革命 建立独裁统治', num:'20300' },
// { name:'开辟农村包围城市武装夺取政权道路', num:'50780' },
// { name:'坚持党的基本路线不动摇', num:'68902' },
// { name:'港澳回归', num:'68902' },
// { name:'让人民群众共享改革发展成果', num:'48902'},
// { name:'“一带一路”倡议推进对外开放向纵深拓展', num:'8902'},
// { name:'生态保护与修复力度持续加大', num:'7902'},
// { name:'大力践行外交为民', num:'9902'},
]
}
}, },
components:{}, components: {},
mounted() { mounted() {
this.list.sort((a,b)=>{ this.title = this.getTitle();
return b.num - a.num this.getList()
}) setTimeout(() => {
this.list = [...this.list,...this.list] this.initScroll();
setTimeout(()=>{ }, 1000);
this.initScroll()
},1000)
}, },
methods: { 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}`,
};
},
initScroll() { initScroll() {
let _this = this let _this = this;
this.box = document.getElementById("bodyContent"); this.box = document.getElementById("bodyContent");
this.con1 = document.getElementById("con1"); this.con1 = document.getElementById("con1");
let con2 = document.getElementById("con2"); let con2 = document.getElementById("con2");
...@@ -84,21 +76,47 @@ ...@@ -84,21 +76,47 @@
scrollUp() { scrollUp() {
if (this.box.scrollTop >= this.con1.scrollHeight) { if (this.box.scrollTop >= this.con1.scrollHeight) {
this.box.scrollTop = 0; this.box.scrollTop = 0;
} else{ } else {
this.box.scrollTop++; this.box.scrollTop++;
} }
}, },
Ups() { Ups() {
let _this = this let _this = this;
this.timer = setInterval(_this.scrollUp, _this.speed); this.timer = setInterval(_this.scrollUp, _this.speed);
}, },
Stops() { Stops() {
clearInterval(this.timer); clearInterval(this.timer);
},
getList() {
let requestparams = {};
requestparams._index = 1;
requestparams._size = 10;
this.$https(
{
method: "post",
url: "tBoardStatistic/getBoardRankPageList",
authType: this.backToken,
},
requestparams
)
.then((res) => {
if (res.status == 200) {
if (res.data.resultCode == 200) {
this.list = res.data.data.records;
} else {
this.list = [];
} }
} else {
this.list = [];
} }
} })
.catch((err) => {
this.$message.error(err.message);
});
},
},
};
</script> </script>
<style lang="less"> <style lang="less">
</style> </style>
...@@ -21,7 +21,7 @@ export let STBoxRoute = [ ...@@ -21,7 +21,7 @@ export let STBoxRoute = [
{ {
path: '/interactive', path: '/interactive',
name: '互动内容', name: '互动内容',
component: () => import('@/page/content/interactive/index'), component: () => import('@/page/STB/interactive/index'),
meta: { meta: {
showBreadcrumb: true, showBreadcrumb: true,
title: '互动内容', title: '互动内容',
......
...@@ -57,7 +57,7 @@ export let accoutsRoute = [ ...@@ -57,7 +57,7 @@ export let accoutsRoute = [
component: () => import('@/page/accounts/recheck'), component: () => import('@/page/accounts/recheck'),
meta:{ meta:{
showBreadcrumb:true, showBreadcrumb:true,
title:'账号禁用审核(复审)', title:'账号禁用审核',
} }
} }
] ]
\ No newline at end of file
.party-dialog{ .party-dialog {
background:@party-white; background: @party-white;
box-shadow: 0 4px 8px 0 rgba(221,221,221,0.40); box-shadow: 0 4px 8px 0 rgba(221, 221, 221, 0.40);
border-radius: 8px; border-radius: 8px;
padding: 20px 20px 0 20px; padding: 20px 20px 0 20px;
&.noHeader{
.el-dialog__header{ &.noHeader {
.el-dialog__header {
display: none; display: none;
} }
} }
.el-dialog__header{
.el-dialog__header {
padding: 0; padding: 0;
border-bottom: 1px solid @party-border-color; border-bottom: 1px solid @party-border-color;
height: 40px; height: 40px;
text-align: center; text-align: center;
.el-dialog__title{
.el-dialog__title {
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
color: @font-color; color: @font-color;
} }
.el-dialog__close{
.el-dialog__close {
font-size: 20px; font-size: 20px;
&:hover{
&:hover {
color: @party-btn-color; color: @party-btn-color;
} }
} }
} }
.el-dialog__footer{
.dialog-content {
min-height: 150px;
.isNoData {
text-align: center;
line-height: 100px;
}
}
.el-dialog__footer {
padding-top: 20px; padding-top: 20px;
border-top: 1px solid @party-border-color; border-top: 1px solid @party-border-color;
text-align: center; text-align: center;
.el-button{
.el-button {
width: 160px; width: 160px;
} }
} }
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
@party-pink:#CF6BA4; @party-pink:#CF6BA4;
@party-blue:#5E8DE5; @party-blue:#5E8DE5;
@party-green:#3DD0C6; @party-green:#3DD0C6;
@colors: purple, pink, blue, green,red; @party-red:#B93838;
@colors: @party-purple, @party-pink, @party-blue, @party-green,@party-red;
@colorName:-purple,-pink,-blue,-green,-red;
@iconList:headContent,copyrights,classify,content,plane, @iconList:headContent,copyrights,classify,content,plane,
pen,data,headAudit,video,screen,magnifier,disable,headUser,interaction, pen,data,headAudit,video,screen,magnifier,disable,headUser,interaction,
account,headStb,radio,message,gear,appversion,interface,headStatistics,overview,tend, account,headStb,radio,message,gear,appversion,interface,headStatistics,overview,tend,
...@@ -16,9 +18,8 @@ ...@@ -16,9 +18,8 @@
} }
}); });
each(@colors, { each(@colorName, {
// .index-@{value}{ .index@{value}{
// background-color: @{party-@{value}} background-color: extract(@colors, @index);
// } }
}); });
\ No newline at end of file
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