Compare commits

...

10 Commits

29157
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -26,6 +26,7 @@
"postcss-px2rem": "^0.3.0",
"qs": "^6.10.1",
"vue": "^2.6.11",
"vue-check-view": "^0.3.0",
"vue-count-to": "^1.0.13",
"vue-router": "^3.5.2",
"vue-wordcloud": "^1.1.1",

@ -21,7 +21,7 @@ export function getBrandSourceType0528(params) {
}
// 重点活跃媒体TOP10排行
export function getWebsite(params) {
let obj = Object.assign({action: 'getSourceTop',sType: 'Marketing'}, params)
let obj = Object.assign({action: 'getWebsite',sType: 'Marketing'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',

@ -0,0 +1,118 @@
import httpService from "@/request"
// 用户品牌列表
export function getSwsQyUserCarMainBrandList(params) {
let obj = Object.assign({action: 'getSwsQyUserCarMainBrandList'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',
data: obj,
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
})
}
// 获取品牌信息
export function getHealthIndex(params) {
let obj = Object.assign({action: 'getHealthIndex', sType: 'BrandOverview'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',
data: obj,
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
})
}
// 危机消息和危机列表
export function getList(params) {
let obj = Object.assign({action: 'getList', sType: 'BrandData', sQingGan: 2}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',
data: obj,
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
})
}
// 重点媒体
export function getSourceTop(params) {
let obj = Object.assign({action: 'getSourceTop', sType: 'BrandOverview'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',
data: obj,
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
})
}
// 热点事件
export function getHotEventsList0528(params) {
let obj = Object.assign({action: 'getHotEventsList0528', sType: 'HotEvent'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',
data: obj,
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
})
}
// 预警消息列表
export function getSwsQyMessageList(params) {
let obj = Object.assign({action: 'getSwsQyMessageList'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',
data: obj,
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
})
}
// 预警设为已读
export function updSwsQyMessageByIDRead(params) {
let obj = Object.assign({action: 'updSwsQyMessageByIDRead'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',
data: obj,
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
})
}
// 获取预警列表
export function getSwsQyQuartzList(params) {
let obj = Object.assign({action: 'getSwsQyQuartzList'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',
data: obj,
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
})
}
// 添加修改预警
export function addOrUpdSwsQyQuartzList(params) {
let obj = Object.assign({action: 'addOrUpdSwsQyQuartzList'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',
data: obj,
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
})
}

@ -58,6 +58,19 @@ export function checkVERCode(params) {
}
})
}
// 获取验证码前验证
export function ifUserAdminOnly(params) {
let obj = Object.assign({action: 'ifUserAdminOnly'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',
data: obj,
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
})
}
// 修改密码
export function updPhonePwd(params) {
let obj = Object.assign({action: 'updPhonePwd'}, params)
@ -70,3 +83,29 @@ export function updPhonePwd(params) {
}
})
}
// 注册
export function registerApi(params) {
let obj = Object.assign({action: 'regUser'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',
data: obj,
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
})
}
// 获取品牌的 接口
export function getUserBrand(params) {
let obj = Object.assign({action: 'getUserBrandHome'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',
data: obj,
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

@ -26,6 +26,9 @@
<a-menu-item key="specialAnalize" v-menu="'/specialAnalize'">
<span>专项分析</span>
</a-menu-item>
<a-menu-item key="myBrand" v-menu="'/myBrand'">
<span>我的品牌</span>
</a-menu-item>
</a-menu>
</a-dropdown>
<span class="iH-left-s1">菜单</span>
@ -144,7 +147,8 @@ export default {
} else if (
obj.key === "brandInsight" ||
obj.key === "modelInsight" ||
obj.key === "eventInsight"
obj.key === "eventInsight" ||
obj.key === "myBrand"
) {
this.setHeaderType(3);
} else if (obj.key === "saleRank" || obj.key === "specialAnalize") {

@ -26,6 +26,9 @@
<a-menu-item key="specialAnalize" v-menu="'/specialAnalize'">
<span>专项分析</span>
</a-menu-item>
<a-menu-item key="myBrand" v-menu="'/myBrand'">
<span>我的品牌</span>
</a-menu-item>
</a-menu>
</a-dropdown>
<span class="iH-left-s1">菜单</span>
@ -185,7 +188,8 @@ export default {
} else if (
obj.key === "brandInsight" ||
obj.key === "modelInsight" ||
obj.key === "eventInsight"
obj.key === "eventInsight" ||
obj.key === "myBrand"
) {
this.setHeaderType(3);
} else if (obj.key === "saleRank" || obj.key === "specialAnalize") {

@ -26,6 +26,9 @@
<a-menu-item key="specialAnalize" v-menu="'/specialAnalize'">
<span>专项分析</span>
</a-menu-item>
<a-menu-item key="myBrand" v-menu="'/myBrand'">
<span>我的品牌</span>
</a-menu-item>
</a-menu>
</a-dropdown>
<span class="iH-left-s1">菜单</span>
@ -153,7 +156,7 @@ export default {
handlerType(obj) {
if (obj.key === "marketingAnalysis") {
this.setHeaderType(2);
} else if(obj.key === 'brandInsight' || obj.key === 'modelInsight' || obj.key === "eventInsight") {
} else if(obj.key === 'brandInsight' || obj.key === 'modelInsight' || obj.key === "eventInsight" || obj.key === "myBrand") {
this.setHeaderType(3);
} else if (obj.key === "saleRank" || obj.key === "specialAnalize") {
this.setHeaderType(4);

@ -26,6 +26,9 @@
<a-menu-item key="specialAnalize" v-menu="'/specialAnalize'">
<span>专项分析</span>
</a-menu-item>
<a-menu-item key="myBrand" v-menu="'/myBrand'">
<span>我的品牌</span>
</a-menu-item>
</a-menu>
</a-dropdown>
<span class="iH-left-s1">菜单</span>
@ -147,7 +150,7 @@ export default {
handlerType(obj) {
if (obj.key === "marketingAnalysis") {
this.setHeaderType(2);
} else if(obj.key === 'brandInsight' || obj.key === 'modelInsight' || obj.key === "eventInsight") {
} else if(obj.key === 'brandInsight' || obj.key === 'modelInsight' || obj.key === "eventInsight" || obj.key === "myBrand") {
this.setHeaderType(3);
} else if (obj.key === "saleRank" || obj.key === "specialAnalize") {
this.setHeaderType(4);

@ -21,6 +21,7 @@ import compon from "@/lycomponents/index.js";
import mixins from "@/mixins"
import vuescroll from 'vuescroll'
import createOps from '@/utils/gol/ops';
import checkView from 'vue-check-view'
import '@/utils/rem';
@ -31,6 +32,7 @@ Vue.use(selfUi);
Vue.use(compon);
Vue.use(mixins);
Vue.use(VueLazyComponent);
Vue.use(checkView);
Vue.use(vuescroll, {ops: createOps(true, true),name: 'vue-scroll'});
Vue.config.productionTip = false
Vue.prototype.$vuiSize = 'small'

@ -94,6 +94,19 @@ export default {
clearInterval(el.__vueSetInterval__);
}
},
// 监听元素是否在可视区域
see: {
bind(el) {
function isReize() {
const style = document.defaultView.getComputedStyle(el);
const scrollTop = document.body.scrollTop;
}
el.__vueSetInterval__ = setInterval(isReize, 300);
},
unbind(el) {
clearInterval(el.__vueSetInterval__);
}
},
// 调整元素高度
highly: {
bind(el, binding) { // el为绑定的元素binding为绑定给指令的对象
@ -128,11 +141,11 @@ export default {
},
computed: {
...mapGetters(['getZoom', 'getLoading', 'getToken', 'getUser', 'getAccount', 'getCommTime', 'getCtime', 'getCtime2', 'getHeaderType', 'getBrand', 'getModel', 'getSComparison', 'getBComparison','getTComparison', 'getMComparison', 'getEComparison', 'getLevelBtn', 'getMenu',
'getChangeSTime', 'getMcStatus','getBcStatus','getScStatus','getTcStatus','getIsLight','getCarCircle','getSpecialGuid'])
'getChangeSTime', 'getMcStatus','getBcStatus','getScStatus','getTcStatus','getIsLight','getCarCircle','getSpecialGuid','getWarningBrand','getWarningSeries'])
},
methods: {
...mapActions(["setZoom", 'setLoading', 'setToken', 'setUser', 'setAccount', 'setCommTime', 'setCtime', 'setCtime2', 'setHeaderType', 'setBrand', 'setModel', 'setSComparison', 'setBComparison','setTComparison', 'setMComparison', 'setEComparison', 'setLevelBtn', 'setMenu',
'setChangeSTime','setMcStatus','setBcStatus','setScStatus','setTcStatus','setIsLight','setCarCircle','setSpecialGuid']),
'setChangeSTime','setMcStatus','setBcStatus','setScStatus','setTcStatus','setIsLight','setCarCircle','setSpecialGuid','setWarningBrand','setWarningSeries']),
// 获取当前日期时间
getDatetime() {
let now = new Date();

@ -424,6 +424,18 @@ const router = [
desc: "专项分析-重点媒体",
component: resolve => require(["@/views/KeyMediaSpecial"], resolve),
},
{
path: '/myBrand',
name: "myBrand",
desc: "我的品牌",
component: resolve => require(["@/views/MyBrand"], resolve),
},
{
path: '/moreWarning',
name: "moreWarning",
desc: "负面消息",
component: resolve => require(["@/views/MoreWarning"], resolve),
},
]
},

@ -86,5 +86,11 @@ const actions = {
setSpecialGuid: ({commit}, log) => {
commit('setSpecialGuid', log)
},
setWarningBrand: ({commit}, log) => {
commit('setWarningBrand', log)
},
setWarningSeries: ({commit}, log) => {
commit('setWarningSeries', log)
},
}
export default actions

@ -88,6 +88,12 @@ const getters = {
},
getSpecialGuid(state) {
return state.specialGuid
}
},
getWarningBrand(state) {
return state.warningBrand
},
getWarningSeries(state) {
return state.warningSeries
},
}
export default getters

@ -141,6 +141,16 @@ const mutations = {
state.specialGuid = log;
let str = JSON.stringify(log);
LS.put('specialGuid', str, 1/8);
},
setWarningBrand: (state, log) => {
state.warningBrand = log;
let str = JSON.stringify(log);
LS.put('warningBrand', str, 1/8);
},
setWarningSeries: (state, log) => {
state.warningSeries = log;
let str = JSON.stringify(log);
LS.put('warningSeries', str, 1/8);
}
}

@ -34,5 +34,7 @@ const state = {
isLight: LS.get('isLight') || false, //浅色背景
carCircle: LS.get('carCircle') || 0, // 0全部 1车友圈
specialGuid: LS.get('specialGuid') || '', //专项分析
warningBrand: LS.get('warningBrand') ? JSON.parse(LS.get('warningBrand')) : {}, //预警主品牌
warningSeries: LS.get('warningSeries') ? JSON.parse(LS.get('warningSeries')) : {}, //预警车型
}
export default state;

@ -7,7 +7,7 @@
* @FilePath: /data-show/src/views/BrandInsight/brandTop/index.vue
-->
<template>
<div class="bt-outter" v-loading="load">
<div class="bt-outter" v-see v-loading="load">
<v-label-div title="品牌TOP车型"></v-label-div>
<div class="bt-inner">
<v-echarts :opt="opt" @getData="clickEchars"></v-echarts>

@ -11,7 +11,7 @@
<div class="In-body">
<div class="d1">
<real-time-event></real-time-event>
<key-communication-positions></key-communication-positions>
<key-communication-positions v-view></key-communication-positions>
<spread-the-sound></spread-the-sound>
</div>
<div class="d2">

@ -8,7 +8,7 @@
-->
<template>
<div class="rte-outter" v-loading="load">
<div class="rte-outter" v-view="onceHandler" v-loading="load">
<v-label-div title="实时事件"></v-label-div>
<div class="rte-tb">
<dv-scroll-board :config="config" :style="{ width: '100%', height: '100%' }" @click="handlerSs" />
@ -35,7 +35,7 @@ export default {
};
},
created() {
this.getData();
},
methods: {
getData() {
@ -127,6 +127,10 @@ export default {
this.setModel(this.chooseModel);
});
},
onceHandler() {
this.getData();
}
},
};
</script>

@ -63,7 +63,6 @@ export default {
getHomeBrandSourceType0528(obj).then((res) => {
let data = res.data;
console.log(data)
this.pdata = data;
this.handlerData(data);
this.load = false;

@ -65,7 +65,7 @@ export default {
this.form.sSeriesName = this.$route.query.seriesName || "";
this.doFormQudao(qudao);
console.log(this.doQingGanAndCrisis())
this.plainOptions3 = this.doQingGanAndCrisis();
this.qingGan = series;
this.doFormQS(series);

@ -49,7 +49,6 @@ export default {
let obj = Object.assign({}, this.getCtime2, this.form);
// this.load = true;
getHomeList(obj).then(res => {
console.log(res)
let data = res.data;
let arr = [];
let arr2 = [];

@ -77,7 +77,7 @@ export default {
getCode() {
this.$refs.forgetForm.validateField('sPhone', errMsg => {
if(!errMsg) {
getVERCode({sPhone: this.form.sPhone}).then(() => {
getVERCode({sPhone: this.form.sPhone, iType: 2}).then(() => {
this.countdown()
})
} else {
@ -150,7 +150,7 @@ export default {
}
}
.fpwd-footer {
position: absolute;
position: relative;
width: 354px;
height: 64px;
background-image: url("../../../assets/images/login/img_dlan_nor.png");
@ -158,6 +158,7 @@ export default {
background-size: cover;
bottom: 0px;
left: 50%;
margin-top: 20px;
transform: translate(-50%);
cursor: pointer;
color: #63aecc;

@ -13,9 +13,10 @@
</video>
<div class="login-inner">
<div class="login-div">
<loginForm @forgetPassword="handlerForget" v-if="dateType===1"></loginForm>
<loginForm @forgetPassword="handlerForget" @register="showRegister" v-if="dateType===1"></loginForm>
<forgetPWD v-if="dateType===2" @reLogin="handlerRelogin" @nextStep="handlerNext"></forgetPWD>
<resetPassword v-if="dateType===3" @reLogin="handlerRelogin" :forgetForm="forgetForm"></resetPassword>
<register v-if="dateType === 4" @success="regSuc"></register>
</div>
</div>
</div>
@ -25,17 +26,23 @@
import loginForm from "./loginForm";
import forgetPWD from "./forgetPWD";
import resetPassword from "./resetPassword";
import register from "./register/register.vue";
export default {
name: "Login",
components: {
loginForm,
forgetPWD,
resetPassword,
register
},
data() {
return {
forgetForm: {},
dateType: 1,
loginStyle: {
top: '50%',
height: '430px'
}
};
},
methods: {
@ -49,6 +56,20 @@ export default {
this.dateType = 3;
this.forgetForm = {...obj}
},
//
showRegister(val) {
this.loginStyle = {
height: '650px',
}
this.dateType = val
},
//
regSuc() {
this.loginStyle = {
height: '430px'
}
this.dateType = 1;
}
},
};
</script>
@ -70,22 +91,22 @@ export default {
transition: 1s opacity;
}
.login-inner {
position: absolute;
// position: absolute;
width: 100%;
height: 100%;
top: 0px;
left: 0px;
background-color: transparent;
// height: 100%;
// top: 0px;
// left: 0px;
// background-color: transparent;
.login-div {
position: absolute;
width: 560px;
height: 560px;
width: 580px;
// height: 600px;
left: 50%;
top: 50%;
transform: translate(-50%, -60%);
transform: translate(-50%, -50%);
background-image: url("../../assets/images/login/img_dldt.png");
background-repeat: no-repeat;
background-size: cover;
background-size: 100% 100%;
}
}
</style>

@ -8,40 +8,45 @@
-->
<template>
<div class="lgf-outter">
<a-form-model layout="horizontal" :model="form" :rules="rules" ref="loginForm">
<a-form-model-item label="用户名" prop="sUserName">
<a-input v-model="form.sUserName" placeholder="请输入账号" autocomplete="off" :maxLength="30" />
</a-form-model-item>
<a-form-model-item label="密码" prop="sPwd">
<a-input v-model="form.sPwd" :type="pwdType" placeholder="请输入密码" autocomplete="off">
<span slot="suffix" class="iconfont icon-zhengyan-21 login-eye" v-if="pwdType === 'password'"
@click="changePwdType"></span>
<span slot="suffix" class="iconfont icon-in_biyan login-eye" v-else @click="changePwdType"></span>
</a-input>
</a-form-model-item>
<a-form-model-item label="验证码" prop="sVerifycode">
<a-input v-model="form.sVerifycode" placeholder="请输入验证码" autocomplete="off">
<a-button slot="addonAfter" style="width: 100px" @click="getCode" v-if="!codeImg"
:loading="btnLoading">获取验证码</a-button>
<img style="width: 6rem; height: 2rem;cursor: pointer;" slot="addonAfter" :src="codeImg"
@click="getCode" v-else>
</a-input>
</a-form-model-item>
</a-form-model>
<div class="login-d1">
<a-checkbox v-model="remCheck">
<span style="color: #3373CC">记住密码</span>
</a-checkbox>
<span class="stn" style="color: #3373CC" @click="forgetPassword"></span>
</div>
<div class="login-footer" @click="onSubmit">
登录
<div class="lgf-login">
<a-form-model layout="horizontal" :model="form" :rules="rules" ref="loginForm">
<a-form-model-item label="用户名" prop="sUserName">
<a-input v-model="form.sUserName" placeholder="请输入账号" autocomplete="off" :maxLength="30" />
</a-form-model-item>
<a-form-model-item label="密码" prop="sPwd">
<a-input v-model="form.sPwd" :type="pwdType" placeholder="请输入密码" autocomplete="off">
<span slot="suffix" class="iconfont icon-zhengyan-21 login-eye" v-if="pwdType === 'password'"
@click="changePwdType"></span>
<span slot="suffix" class="iconfont icon-in_biyan login-eye" v-else
@click="changePwdType"></span>
</a-input>
</a-form-model-item>
<a-form-model-item label="验证码" prop="sVerifycode">
<a-input v-model="form.sVerifycode" placeholder="请输入验证码" autocomplete="off">
<a-button slot="addonAfter" style="width: 100px" @click="getCode" v-if="!codeImg"
:loading="btnLoading">获取验证码</a-button>
<img style="width: 6rem; height: 2rem;cursor: pointer;" slot="addonAfter" :src="codeImg"
@click="getCode" v-else>
</a-input>
</a-form-model-item>
</a-form-model>
<div class="login-d1">
<a-checkbox v-model="remCheck">
<span style="color: #3373CC">记住密码</span>
</a-checkbox>
<span class="stn" style="color: #3373CC" @click="forgetPassword"></span>
</div>
<div class="lg-zc">没有账号<span @click="goRegister" style="color: #3373CC;cursor: pointer;">去注册</span></div>
<div class="login-footer" @click="onSubmit">
登录
</div>
</div>
</div>
</template>
<script>
import { loginSubmit, getVerifycode } from "@/api/login"
import {getSwsQyUserCarMainBrandList} from "@/api/MyBrand"
export default {
name: "loginForm",
data() {
@ -119,6 +124,10 @@ export default {
forgetPassword() {
this.$emit("forgetPassword");
},
//
goRegister() {
this.$emit('register', 4)
},
//
onSubmit() {
this.$refs.loginForm.validate((valid) => {
@ -137,8 +146,20 @@ export default {
link: '/specialAnalize',
text: '专项分析'
};
let obj3 = {
link: '/myBrand',
text: '我的品牌'
}
data.meun.push(obj);
data.meun.push(obj2);
data.meun.push(obj3);
getSwsQyUserCarMainBrandList({token: data.toKen}).then(res => {
let brand = res.data[0] || '';
if(brand) {
this.brand = brand.brandname;
this.setWarningBrand(brand);
}
});
////
this.setMenu(data.meun);
if (this.remCheck) {
@ -184,7 +205,7 @@ export default {
}
.login-footer {
position: absolute;
position: relative;
width: 354px;
height: 64px;
background-image: url("../../../assets/images/login/img_dlan_nor.png");
@ -192,6 +213,7 @@ export default {
background-size: cover;
bottom: 0px;
left: 50%;
margin-top: 20px;
transform: translate(-50%);
cursor: pointer;
color: #63aecc;
@ -199,4 +221,11 @@ export default {
text-align: center;
line-height: 64px;
}
.lg-zc {
font-size: 15px;
color: #597088;
text-align: center;
margin-top: 42px;
}
</style>

@ -0,0 +1,250 @@
<template>
<div class="regis-outer">
<a-form-model layout="horizontal" :model="form" :rules="rules" ref="registerForm">
<a-form-model-item label="用户名" prop="sUserName">
<a-input v-model="form.sUserName" placeholder="请输入账号" :maxLength="30" />
</a-form-model-item>
<a-form-model-item label="密码" prop="sPwd">
<a-input v-model="form.sPwd" placeholder="请输入密码" />
</a-form-model-item>
<a-form-model-item label="手机号" prop="sPhone">
<a-input v-model="form.sPhone" placeholder="请输入手机号" />
</a-form-model-item>
<a-form-model-item label="邮箱" prop="sEmail">
<a-input v-model="form.sEmail" placeholder="请输入邮箱" />
</a-form-model-item>
<a-form-model-item label="公司名称" prop="companyName">
<a-input v-model="form.companyName" placeholder="请输入公司名称" />
</a-form-model-item>
<a-form-model-item label="公司品牌" prop="brandName">
<a-select v-model="form.brandName" show-search :filter-option="filterOption" placeholder="请选择公司品牌">
<a-select-option v-for="item in brandArr" :key="item.brandid" :value="item.brandname">
{{ item.brandname }}
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item label="验证码" prop="sVerifycode">
<a-input v-model="form.sVerifycode" placeholder="验证码" autocomplete="off">
<span class="fp-s1" slot="suffix" v-if="showCode" @click="getCode"></span>
<span class="fp-s1" slot="suffix" v-else>{{ count }}</span>
</a-input>
</a-form-model-item>
</a-form-model>
<div class="fpw-d1" align="center">
<span class="ss1" @click="reLogin"><a style="color: #3373CC">上一页</a></span>
</div>
<div class="login-footer" @click="onSubmit">
提交审核
</div>
</div>
</template>
<script>
import { registerApi, getVERCode, ifUserAdminOnly, getUserBrand } from "@/api/login"
export default {
data() {
const validatePass = (rule, value, callback) => {
if (value === "") {
callback(new Error("请输入密码"));
} else {
let reg =
/^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?!([^(0-9a-zA-Z)])+$).{6,}$/;
if (!reg.test(value)) {
callback(new Error("密码由大小写字母、数字和特殊字符组成"));
} else if (value.length < 8 || value.length > 16) {
callback(new Error("密码8~16位"));
} else {
callback();
}
}
};
const validatePhone = (rule, value, callback) => {
if (value === "") {
callback(new Error("请输入手机号"));
} else {
let reg = /^1\d{10}$/;
if (!reg.test(value)) {
callback(new Error("请输入正确的手机号"));
} else {
callback();
}
}
};
const validateEmail = (rule, value, callback) => {
if (value === "") {
callback(new Error("请输入邮箱"));
} else {
let reg = /^([a-zA-Z\d][\w-]{2,})@(\w{2,})\.([a-z]{2,})(\.[a-z]{2,})?$/
if (!reg.test(value)) {
callback(new Error("请输入正确的邮箱"));
} else {
callback();
}
}
};
const validateInput = (rule, value, callback, msg) => {
if (value === "") {
callback(new Error(msg));
} else {
callback();
}
}
return {
showCode: true,
count: 0,
brandShow: false,
brandArr: [],
form: {
sUserName: '',
sPwd: '',
sPhone: '',
sEmail: '',
companyName: '',
brandName: undefined,
sVerifycode: ""
},
rules: {
sUserName: [{ validator: (rule, value, callback) => validateInput(rule, value, callback, '请输入用户名!') }],
sPwd: [{ validator: validatePass }],
sPhone: [{ validator: validatePhone }],
sEmail: [{ validator: validateEmail }],
companyName: [{ validator: (rule, value, callback) => validateInput(rule, value, callback, '请输入公司名称!') }],
brandName: [{ validator: (rule, value, callback) => validateInput(rule, value, callback, '请选择品牌!') }],
sVerifycode: [{ validator: (rule, value, callback) => validateInput(rule, value, callback, '请输入验证码!') }],
}
}
},
created() {
this.getBrandData()
},
methods: {
//
getBrandData() {
getUserBrand().then(res => {
let data = res.data || [];
let arr = [];
data.forEach(ele => {
let n = arr.findIndex(e => e.brandid == ele.brandid);
if (n === -1) {
arr.push(ele)
}
})
this.brandArr = arr;
})
},
//
getCode() {
this.$refs.registerForm.validateField('sPhone', errMsg => {
if (!errMsg) {
let obj = {
sUserName: this.form.sUserName,
sPhone: this.form.sPhone,
sEmail: this.form.sEmail
}
ifUserAdminOnly(obj).then(res => {
if(res.msg == '成功') {
getVERCode({ sPhone: this.form.sPhone, iType: 3 }).then(() => {
this.countdown()
})
}
})
} else {
console.log('验证失败')
}
})
},
//
countdown() {
const TIME_COUNT = 60;
if (!this.timer) {
this.count = TIME_COUNT;
this.showCode = false;
this.timer = setInterval(() => {
if (this.count > 0 && this.count <= TIME_COUNT) {
this.count--;
} else {
this.showCode = true;
clearInterval(this.timer);
this.timer = null;
}
}, 1000);
}
},
filterOption(input, option) {
return (
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
);
},
//
openBrand() {
this.brandShow = true;
},
handlerBrand() {
},
//
reLogin() {
this.$emit('success')
},
//
onSubmit() {
this.$refs.registerForm.validate((valid) => {
if (valid) {
registerApi(this.form).then(() => {
this.$emit('success')
})
} else {
console.log("error submit!!");
return false;
}
})
}
}
}
</script>
<style lang="less" scoped>
.regis-outer {
width: 380px;
margin: 0 auto;
margin-top: 30px;
}
.rcode {
display: inline-block;
cursor: pointer;
margin-left: 10px;
}
.fpw-d1 {
.ss1 {
color: #597088;
font-size: 16px;
cursor: pointer;
}
}
.fp-s1 {
cursor: pointer;
color: #698198;
}
.login-footer {
position: relative;
width: 354px;
height: 64px;
background-image: url("../../../assets/images/login/img_dlan_nor.png");
background-repeat: no-repeat;
background-size: cover;
bottom: 0px;
left: 50%;
margin-top: 20px;
transform: translate(-50%);
cursor: pointer;
color: #63aecc;
font-size: 24px;
text-align: center;
line-height: 64px;
}
</style>

@ -129,7 +129,7 @@ export default {
}
}
.rp-footer {
position: absolute;
position: relative;
width: 354px;
height: 64px;
background-image: url("../../../assets/images/login/img_dlan_nor.png");
@ -137,6 +137,7 @@ export default {
background-size: cover;
bottom: 0px;
left: 50%;
margin-top: 20px;
transform: translate(-50%);
cursor: pointer;
color: #63aecc;

@ -0,0 +1,261 @@
<template>
<div class="d-container">
<div class="more-outter">
<div class="more-d1">
<v-label-div :title="currentIndex==1?'预警信息':'负面信息'">
<v-tab-group style="margin-right: 16px" @change="changeInfo" :btns="['负面信息','预警信息']"></v-tab-group>
<v-btn @click="goback"></v-btn>
</v-label-div>
<div class="ide-d1">
<span class="s1">调性</span>
<a-checkbox-group v-model="dx" :disabled="noClick" :options="plainOptions" @change="(val) => onChange(val, 'dx')" />
</div>
<div class="ide-d1" v-if="currentIndex == 1">
<span class="s1">状态</span>
<a-checkbox-group v-model="status" :disabled="noClick" :options="statusOptions" @change="(val) => statusChange(val, 'status')" />
</div>
<div v-if="currentIndex == 0">
<v-table style="margin-top: 20px" ref="rtable" :columns="columns" :data="tbData" :loading="tableLoading" :pagination="pagination" @change="handlerPage">
<template slot="titlex" slot-scope="text, record">
<div>
<a :href="record.url" style="color: #fff" target="_blank">{{ text|doStr(100) }}</a>
</div>
<!-- <div>{{record.srccontent}}</div> -->
</template>
<template slot="crisisx" slot-scope="text, record">
<a-tag color="#d48c44" v-if="record.crisis === 1"></a-tag>
<a-tag color="#d46a46" v-if="record.crisis === 2"></a-tag>
<a-tag color="#d81c33" v-if="record.crisis === 3"></a-tag>
</template>
</v-table>
</div>
<div v-else>
<v-table style="margin-top: 20px" ref="rtable" :columns="columns2" :data="tbData2" :loading="tableLoading" :pagination="pagination2" @change="handlerPage2">
<template slot="tx" slot-scope="text, record">
<div>
<a :href="record.Url" style="color: #fff" target="_blank">{{ text|doStr(200) }}</a>
</div>
</template>
<template slot="cx" slot-scope="text, record">
<a-tag color="#d48c44" v-if="record.Crisis === 1"></a-tag>
<a-tag color="#d46a46" v-if="record.Crisis === 2"></a-tag>
<a-tag color="#d81c33" v-if="record.Crisis === 3"></a-tag>
</template>
<template slot="readStatex" slot-scope="text, record">
<a-popconfirm @confirm="setRead(record.ID)">
<div slot="title" style="color: white">是否设为已读</div>
<a-button v-if="record.readState == 0" size="small" type="primary"></a-button>
</a-popconfirm>
<a-button v-if="record.readState == 1" size="small" disabled>已读</a-button>
</template>
</v-table>
</div>
</div>
</div>
</div>
</template>
<script>
import {getList, getSwsQyMessageList, updSwsQyMessageByIDRead} from "@/api/MyBrand"
export default {
name: "moreWarning",
data() {
return {
currentIndex: 0,
noClick: false,
dx: [1,2,3],
status: [0,1],
plainOptions: [
{label: '低级危机', value: 1},
{label: '中级危机', value: 2},
{label: '高级危机', value: 3}
],
statusOptions: [
{label: '未读', value: 0},
{label: '已读', value: 1}
],
dxIndeterminate: true,
isCheckAll: false,
form: {
token: '',
sBrand: '',
sSeriesName: '',
sQingGan: 2,
sCrisis: '',
iPageIndex: 1,
iPageSize: 12,
},
warningForm: {
token: '',
iPageIndex: 1,
iPageSize: 12,
iReadState: '',
crisis: ''
},
pagination: {
total: 0,
current: 1,
pageSize: 12,
},
pagination2: {
total: 0,
current: 1,
pageSize: 12,
},
tableLoading: false,
tbData: [],
columns: [
{
title: "标题及内容",
dataIndex: "title",
key: "title",
scopedSlots: { customRender: "titlex" },
},
{
title: "来源",
dataIndex: "source",
key: "source",
},
{
title: "作者",
dataIndex: "user_author",
key: "user_author",
},
{
title: "发布时间",
dataIndex: "sourcetime",
key: "sourcetime",
width: 200,
},
{
title: "危机等级",
dataIndex: "crisis",
key: "crisis",
width: 120,
scopedSlots: { customRender: "crisisx" },
},
],
tbData2: [],
columns2: [
{
title: "标题及内容",
dataIndex: "Title",
key: "Title",
scopedSlots: { customRender: "tx" },
},
{
title: "危机等级",
dataIndex: "Crisis",
key: "Crisis",
width: 120,
scopedSlots: { customRender: "cx" },
},
{
title: "状态",
dataIndex: "readState",
key: "readState",
width: 120,
scopedSlots: { customRender: "readStatex" },
}
],
}
},
created() {
this.form.token = this.getToken;
this.warningForm.token = this.getToken;
this.form.sBrand = this.getWarningBrand.brandname || this.brand;
this.form.sSeriesName = this.getWarningSeries || ''
this.getData();
this.getWarning();
},
methods: {
getData() {
this.tableLoading = true;
let obj = Object.assign({}, this.getCtime2, this.form)
getList(obj).then(res => {
let data = res.data || [];
let arr = [];
data.forEach(ele => {
arr.push(ele._source);
})
this.tbData = arr;
this.pagination.total = res.totalNum;
this.tableLoading = false;
})
},
getWarning() {
this.tableLoading = true;
let obj = Object.assign({}, this.getCtime2, this.warningForm)
getSwsQyMessageList(obj).then(res => {
this.tbData2 = res.data;
this.pagination2.total = res.totalNum;
this.tableLoading = false;
})
},
changeInfo(e) {
this.currentIndex = e;
},
onChange(val, type) {
this.noClick = true;
this.form.sCrisis = val.join(',');
this.warningForm.crisis = val.join(',');
this.form.iPageIndex = 1;
this.pagination.current = 1;
this.getData();
this.getWarning();
this.noClick = false;
},
statusChange(val, status) {
this.noClick = true;
this.warningForm.iReadState = val.join(',');
this.warningForm.iPageIndex = 1;
this.pagination2.current = 1;
this.getWarning();
this.noClick = false;
},
handlerPage(e) {
this.pagination.current = e.current;
this.form.iPageIndex = e.current;
this.getData();
},
handlerPage2(e) {
this.pagination2.current = e.current;
this.warningForm.iPageIndex = e.current;
this.getWarning();
},
setRead(id) {
let obj = {
ID: id,
token: this.getToken
};
updSwsQyMessageByIDRead(obj).then(res => {
this.$message.success('设置成功')
this.getWarning();
})
},
goback() {
this.$router.go(-1);
}
}
}
</script>
<style lang="less" scoped>
.more-outter {
padding: 0px 16px 16px 16px;
}
.more-d1 {
width: 100%;
height: 825px;
border: 2px solid #0f2a4d;
overflow: hidden;
}
.ide-d1 {
width: 100%;
margin: 20px 0 0 20px;
.s1 {
font-size: 14px;
color: #fff;
}
}
</style>

@ -0,0 +1,205 @@
<!--
* @Author: xw
* @Date: 2021-10-11 18:42:58
* @LastEditTime: 2021-11-29 10:48:33
* @LastEditors: Please set LastEditors
* @Description: 品牌数据
* @FilePath: /data-show/src/views/BrandInsight/brandData/index.vue
-->
<template>
<div>
<div class="bd-outter" v-loading="load">
<v-label-div title="品牌数据"></v-label-div>
<div class="bd-inner">
<div class="bd-o-d1">
<div class="d1">
<img class="m1" src="../../../assets/images/BrandInsight/ic_cb.png" />
<span class="s1">传播数据总量</span>
</div>
<span class="s2">{{count}}</span>
</div>
<div class="bd-o-d1" style="margin-top: 16px">
<div class="d1">
<img class="m1" src="../../../assets/images/BrandInsight/ic_dx.png" />
<span class="s1">舆情整体调性</span>
</div>
<a-popover title="舆情整体调性">
<template slot="content">
<template v-for="(item,index) in affObj">
<div class="pd-item" :key="index" v-if="index != 'z'">
<span v-if="index === 'a'"></span>
<span v-if="index === 'b'"></span>
<span v-if="index === 'c'"></span>
<span>{{item}}</span>
</div>
</template>
</template>
<span class="s2">
<span class="s2-s1" :style="{width: affObj.a/affObj.z * 100 +'%'}"></span>
<span class="s2-s1" :style="{width: affObj.b/affObj.z * 100 + '%', background: '#54BF93'}"></span>
<span class="s2-s1" :style="{width: affObj.c/affObj.z * 100 + '%',background: '#CC9D12'}"></span>
</span>
</a-popover>
</div>
</div>
</div>
<div class="bd-outter" style="margin-top: 16px" v-loading="load">
<v-label-div title="负面数据"></v-label-div>
<div class="bd-inner">
<div class="bd-o-d1">
<div class="d1">
<img class="m1" src="../../../assets/images/BrandInsight/ic_warning.png" />
<span class="s1">负面数据总量</span>
</div>
<span class="s2">{{negCount}}</span>
</div>
<div class="bd-o-d1" style="margin-top: 16px">
<div class="d1">
<img class="m1" src="../../../assets/images/BrandInsight/ic_dx.png" />
<span class="s1">舆情整体调性</span>
</div>
<a-popover title="舆情整体调性">
<template slot="content">
<template v-for="(item,index) in negObj">
<div class="pd-item" :key="index" v-if="index != 'z'">
<span v-if="index === 'a'"></span>
<span v-if="index === 'b'"></span>
<span v-if="index === 'c'"></span>
<span>{{item}}</span>
</div>
</template>
</template>
<span class="s2">
<span class="s2-s1" :style="{width: negObj.a/negObj.z * 100 + '%',background: '#CC9D12'}"></span>
<span class="s2-s1" :style="{width: negObj.b/negObj.z * 100 + '%',background: '#CC7733'}"></span>
<span class="s2-s1" :style="{width: negObj.c/negObj.z * 100 + '%',background: '#CC5B41'}"></span>
</span>
</a-popover>
</div>
</div>
</div>
</div>
</template>
<script>
import {getHealthIndex} from "@/api/MyBrand"
export default {
name: "brandData",
props: ["brand"],
data() {
return {
count: 0,
negCount: 0,
load: false,
form: {
token: "",
sBrand: '',
sSeriesName: '',
},
affObj: {
a: 0,
b: 0,
c: 0,
z: 0,
},
negObj: {
a: 0,
b: 0,
c: 0,
z: 0,
}
};
},
created() {
this.form.token = this.getToken;
this.form.sBrand = this.getWarningBrand.brandname || this.brand;
this.form.sSeriesName = this.getWarningSeries || '';
this.getData();
},
methods: {
getData() {
let obj = Object.assign({}, this.getCtime2, this.form)
getHealthIndex(obj).then(res => {
let data = res.data;
this.count = data.affections[0].value + data.affections[1].value + data.affections[2].value;
this.negCount = data.crisis[0].value + data.crisis[1].value + data.crisis[2].value;
this.affObj.a = data.affections[0].value || 0;
this.affObj.b = data.affections[1].value || 0;
this.affObj.c = data.affections[2].value || 0;
this.affObj.z = this.count;
this.negObj.a = data.crisis[0].value || 0;
this.negObj.b = data.crisis[1].value || 0;
this.negObj.c = data.crisis[2].value || 0;
this.negObj.z = this.negCount;
})
}
},
};
</script>
<style lang="less" scoped>
.bd-outter {
width: 620px;
height: 272px;
border: 2px solid #0f2a4d;
border-radius: 2px;
}
.bd-inner {
padding: 16px;
.bd-o-d1 {
width: 588px;
height: 88px;
border: 1px solid #0f2a4d;
border-radius: 2px;
display: flex;
justify-content: space-between;
align-items: center;
.d1 {
display: flex;
height: 100%;
justify-content: flex-start;
align-items: center;
.m1 {
display: block;
width: 64px;
height: 64px;
margin-left: 16px;
}
.s1 {
display: block;
color: #fff;
font-size: 20px;
margin-left: 12px;
}
}
.s2 {
display: block;
color: #fff;
font-size: 44px;
font-family: Bebas;
margin-right: 16px;
display: flex;
justify-content: flex-end;
width: 276px;
cursor: pointer;
.s2-s1 {
display: block;
width: 102px;
height: 36px;
background: #3373cc;
margin-right: 2px;
}
}
}
}
.pd-item {
display: flex;
justify-content: space-between;
color: #fff;
border-bottom: 1px solid #173b6d;
padding: 10px;
}
</style>

@ -0,0 +1,116 @@
<!--
* @Author: xw
* @Date: 2021-10-12 09:32:35
* @LastEditTime: 2021-12-29 17:11:53
* @LastEditors: Please set LastEditors
* @Description: 舆情传播趋势
* @FilePath: /data-show/src/views/BrandInsight/warnsopo/index.vue
-->
<template>
<div class="warn-outter" v-loading="load">
<div class="warn-inner">
<vLabel-div title="热点事件"></vLabel-div>
<div class="warn-bd">
<dv-scroll-board :config="config" :style="{ width: '100%', height: '22rem' }" @click="handlerItem"/>
</div>
</div>
</div>
</template>
<script>
import { getHotEventsList0528 } from "@/api/MyBrand";
export default {
name: "eventList",
props: ["brand"],
data() {
return {
load: false,
form: {
sBrand: "",
token: "",
sSeriesName: '',
iPageIndex: 1,
iPageSize: 100,
},
config: {},
darr: []
};
},
created() {
this.form.token = this.getToken;
this.form.sBrand = this.getWarningBrand.brandname || this.brand;
this.form.sSeriesName = this.getWarningSeries || ''
this.getData();
},
methods: {
getData() {
let obj = Object.assign({}, this.getCtime2, this.form);
this.load = true;
getHotEventsList0528(obj).then((res) => {
let data = res.data || [];
let arr = [];
let arr2 = [];
data.forEach((ele) => {
let a = [
`<span style='cursor: pointer;'>${ele.events_title}</span>`,
ele.count,
ele.ctime,
ele.events_series
];
let b = [
`<span style='cursor: pointer;'>${ele.events_title}</span>`,
ele.count,
ele.ctime,
ele.events_series,
ele.events_id
];
arr.push(a);
arr2.push(b);
});
this.darr = arr2;
this.config = {
headerBGC: "rgba(16,33,59)",
oddRowBGC: "#173b6d",
evenRowBGC: "rgba(69, 149, 244, 0)",
columnWidth: [520,80,130,80],
rowNum: 6,
header: ["事件列表", "影响力", "时间", "关联车型"],
data: arr,
};
this.load = false;
});
},
handlerItem(row) {
let ele = this.darr[row.rowIndex];
if(row.columnIndex === 0) {
let id = ele[4];
this.$router.push({path: '/eventDEC', query: {events_id: id}});
}
}
},
};
</script>
<style lang="less" scoped>
.warn-outter {
width: 936px;
height: 460px;
.warn-inner {
width: 100%;
height: 460px;
margin-top: 16px;
border: 2px solid #0f2a4d;
.warn-bd {
width: 100%;
padding: 16px;
height: calc(100% - 48px);
}
}
}
.more {
font-size: 16px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #AAAAAA;
}
</style>

@ -0,0 +1,383 @@
<template>
<div class="b-container">
<div class="b-outter">
<div class="b-d1">
<div class="bdl-d1-dd1">
<brand-data :brand="brand"></brand-data>
</div>
<div class="bdl-d1-dd2">
<div class="bdl-d1-dd2-d1">
<div class="bdl-d1-dd2-d1-s1">{{this.brand}}</div>
<div class="bdl-d1-dd2-d1-number">{{healthNum}}</div>
<div class="bdl-d1-dd2-d1-number" style="font-size: 18px;line-height: 36px">健康指数</div>
</div>
<img class="m2" src="../../assets/images/BrandInsight/img_warning.png" @click="openBrand"/>
</div>
<div class="bdl-d1-dd3">
<warning-info></warning-info>
</div>
</div>
<div class="bdl-d2">
<event-list :brand="brand"></event-list>
<media-list :brand="brand"></media-list>
</div>
</div>
<a-modal title="推送设置" width="33%" :footer="null" @cancel="visible = false" :visible="visible">
<div class="modal-table">
<a-form-model layout="horizontal" :label-col="{ span: 6 }" :wrapper-col="{ span: 14 }">
<a-form-model-item label="选择车型">
<a-input v-model="settingForm.SeriesNames" disabled placeholder="全部车型"></a-input>
<a @click="chooseSeries"></a>
</a-form-model-item>
<a-form-model-item label="接收时间">
<a-checkbox-group v-model="dx" :options="options" @change="(val) => crisisChange(val, 'crisis')" />
</a-form-model-item>
<a-form-model-item label="是否预警消息">
<a-switch :checked="Statu == '0'" checked-children="" un-checked-children="" @change="openChange" />
</a-form-model-item>
</a-form-model>
</div>
<div class="beCpm-footer" @click="onSave">
保存
</div>
</a-modal>
<a-modal title="车型选择" width="69%" :footer="null" @cancel="seriesVisible = false" :visible="seriesVisible">
<a @click="selectAll" style="color: #FAFAFA;margin-left: 16px">全选</a>
<vue-scroll>
<div class="sb-bd">
<div class="sb-b-item" :class="list.indexOf(item.seriesname) != -1 ? 'sb-b-item-active': ''" v-for="(item,index) in models" :key="index" @click="handlerModel(index, item)">
<!-- <div v-if="item.seriesname.length > 11 && item.seriesname.length <= 13" style="font-size: 15px">{{item.seriesname}}</div>
<div v-else-if="item.seriesname.length > 13 && item.seriesname.length <= 14" style="font-size: 13px">{{item.seriesname}}</div>
<div v-else-if="item.seriesname.length > 14" style="font-size: 13px">{{item.seriesname}}</div> -->
<div>{{item.seriesname}}</div>
</div>
</div>
</vue-scroll>
<div class="beCpm-footer" @click="seriesVisible = false">
确定
</div>
</a-modal>
</div>
</template>
<script>
import brandData from "./brandData";
import warningInfo from "./warningInfo";
import eventList from "./eventList";
import mediaList from "./mediaList"
import {getSwsQyUserCarMainBrandList, getHealthIndex, getSwsQyQuartzList, addOrUpdSwsQyQuartzList} from "@/api/MyBrand"
import { getSeriesNameByCategory } from "@/api/comm";
export default {
name: "MyBrand",
inject: ['reload'],
components: {
brandData,warningInfo,eventList,mediaList
},
data() {
return {
healthNum: undefined,
series: [],
form: {
token: '',
sBrand: '',
sSeriesName: ''
},
//
settingForm: {
SeriesNames: '',
Crisis: '',
},
Id: 0,
Statu: '0',
dx: ['1','2','3'],
options: [
{label: '低级危机', value: '1'},
{label: '中级危机', value: '2'},
{label: '高级危机', value: '3'}
],
visible: false,
seriesVisible: false,
//
models: [],
list: [],
brand: '',
}
},
mounted() {
this.setHeaderType(3);
this.brand = this.getWarningBrand.brandname;
this.form.token = this.getToken;
this.form.sBrand = this.getWarningBrand.brandname;
this.form.sSeriesName = this.getWarningSeries;
this.getData();
this.getApi();
},
methods: {
getApi() {
let obj = {
token: this.getToken, iPageIndex: 1, iPageSize: 20, brandname: this.getWarningBrand.brandname
}
getSwsQyQuartzList(obj).then(res => {
let data = res.data;
this.dx = data[0].Es.Crisis.split(',');
this.settingForm.Crisis = data[0].Es.Crisis;
this.settingForm.SeriesNames = data[0].Es.SeriesNames;
if(data[0].Es.SeriesNames != '') {
this.list = data[0].Es.SeriesNames.split(',');
this.setWarningSeries(data[0].Es.SeriesNames);
}
this.Id = data[0].Id;
this.Statu = data[0].Statu
})
},
getData() {
let obj = Object.assign({}, this.form, this.getCtime2)
getSwsQyUserCarMainBrandList({token: this.getToken}).then(res => {
let brand = res.data[0] || '';
if(brand) {
this.brand = brand.brandname
};
});
getHealthIndex(obj).then(res => {
this.healthNum = res.data.healthIndex
});
},
openBrand() {
this.getApi();
this.visible = true;
},
crisisChange(val, type) {
this.dx = val;
this.settingForm.Crisis = val.join(',');
},
openChange(e) { ///
let obj = {
Id: this.Id,
Statu: e?0:1
};
let form = {
token: this.getToken,
data: JSON.stringify(obj)
};
addOrUpdSwsQyQuartzList(form).then(res => {
if(res.msg == 'Success') {
let m = e?'预警已开启':'预警已关闭'
this.Statu = e?'0':'1';
this.$message.success(m);
}
})
},
chooseSeries() {
let obj = {
token: this.getToken,
sBrand: this.getWarningBrand.brandname,
sType: 'Series',
}
getSeriesNameByCategory(obj).then(res => {
this.models = res.data
})
this.seriesVisible = true;
},
onSave() {
let obj = {
Id: this.Id,
Es: {
Brands: this.getWarningBrand.brandname,
SeriesNames: this.settingForm.SeriesNames,
QingGan: 2,
Crisis: this.settingForm.Crisis
},
};
let form = {
token: this.getToken,
data: JSON.stringify(obj)
};
addOrUpdSwsQyQuartzList(form).then(res => {
if(res.msg == 'Success') {
this.setWarningSeries(this.settingForm.SeriesNames);
this.$message.success('修改成功');
this.visible = false;
this.reload();
}
})
},
//
handlerModel(n, row) {
let value = row.seriesname;
if(this.list.indexOf(value) == -1) {
this.list.push(value)
} else {
let index = this.list.indexOf(value);
this.list.splice(index, 1);
};
this.settingForm.SeriesNames = this.list.join(',')
},
selectAll() {
if(this.list.length = this.models.length && this.list.length != 0) {
this.list = [];
this.settingForm.SeriesNames = '';
} else {
let arr = [];
this.models.forEach(ele => {
arr.push(ele.seriesname)
});
this.list = arr;
this.settingForm.SeriesNames = arr.join(',');
}
}
}
}
</script>
<style lang="less" scoped>
.b-outter {
position: relative;
padding: 0px 16px 16px 16px;
}
.b-d1 {
display: flex;
justify-content: flex-start;
}
.bdl-d1-dd2 {
position: relative;
width: 620px;
height: 560px;
margin-left: 16px;
display: flex;
justify-content: center;
overflow: hidden;
.m1 {
position: absolute;
width: 274px;
height: 64px;
top: 0px;
transform: translate(0px);
cursor: pointer;
}
.m2 {
position: absolute;
width: 274px;
height: 64px;
bottom: 0px;
transform: translate(0px);
cursor: pointer;
}
.bdl-d1-dd2-d1 {
width: 470px;
height: 520px;
background-image: url("../../assets/images/BrandInsight/img_tz.png");
background-repeat: no-repeat;
background-size: cover;
background-position: 0 40px;
.bdl-d1-dd2-d1-s1 {
display: block;
font-size: 24px;
font-weight: bold;
color: #b2daf7;
width: 100%;
text-align: center;
margin-top: 125px;
}
.bdl-d1-dd2-d1-s2 {
display: block;
font-size: 18px;
font-weight: bold;
color: #b2daf7;
width: 100%;
text-align: center;
margin-top: 125px;
}
.bdl-d1-dd2-d1-s3 {
display: block;
font-size: 14px;
font-weight: bold;
color: #b2daf7;
width: 100%;
text-align: center;
margin-top: 125px;
}
.bdl-d1-dd2-d1-number {
display: block;
font-size: 60px;
line-height: 60px;
font-weight: 600;
color: #b2daf7;
width: 100%;
text-align: center;
}
}
}
.bdl-d2 {
// width: 50%;
// height: 460px;
// border: 2px solid #0f2a4d;
display: flex;
justify-content: flex-start;
}
.epor {
// width: 100%;
// height: 80px;
.epor-btn {
width: 274px;
height: 64px;
background-image: url("../../assets/images/comm/img_bbut.png");
background-repeat: no-repeat;
background-size: cover;
text-align: center;
line-height: 80px;
color: #63aecc;
font-size: 28px;
cursor: pointer;
}
}
.beCpm-footer {
position: relative;
width: 354px;
height: 48px;
background-image: url("../../assets/images/login/img_dlan_nor.png");
background-repeat: no-repeat;
background-size: cover;
bottom: 0px;
left: 50%;
transform: translate(-50%);
cursor: pointer;
color: #63aecc;
font-size: 24px;
font-weight: bold;
text-align: center;
line-height: 64px;
margin-top: 16px;
}
.sb-bd {
padding: 0px 16px 16px 8px;
display: flex;
justify-content: flex-start;
flex-wrap: wrap;
.sb-b-item {
width: 190px;
height: 66px;
background: #1B4163;
color: #fff;
border-radius: 2px;
font-size: 20px;
text-align: center;
line-height: 66px;
margin-left: 16px;
margin-top: 16px;
transition: all 0.3s;
white-space:nowrap;
cursor: pointer;
&:hover {
background: #3373CC;
color: #fff;
}
}
.sb-b-item-active {
background: #3373CC;
color: #fff;
}
}
</style>

@ -0,0 +1,77 @@
<!--
* @Author: xw
* @Date: 2021-10-12 09:03:51
* @LastEditTime: 2021-11-01 09:58:03
* @LastEditors: Please set LastEditors
* @Description: 品牌TOP车型
* @FilePath: /data-show/src/views/BrandInsight/brandTop/index.vue
-->
<template>
<div class="ml-outter" v-see v-loading="load">
<v-label-div title="传播媒体TOP10"></v-label-div>
<div class="ml-inner">
<v-echarts :opt="opt" @getData="clickEchars"></v-echarts>
</div>
</div>
</template>
<script>
import {getSourceTop} from "@/api/MyBrand"
import createOpt from "./opt"
export default {
name: "brand-top",
props: ["brand"],
data() {
return {
load: false,
form: {
token: "",
sBrand: '',
sSeriesName: '',
},
opt: {},
}
},
created() {
this.form.token = this.getToken;
this.form.sBrand = this.getWarningBrand.brandname || this.brand;
this.form.sSeriesName = this.getWarningSeries || '';
this.getData()
},
methods: {
getData() {
this.load = true;
let obj = Object.assign({},this.getCtime2, this.form);
getSourceTop(obj).then(res => {
let data = res.data || {};
let dx = [];
let ds = [];
for(let key in data) {
dx.push(key);
ds.push(data[key])
}
this.opt = createOpt(dx,ds);
this.load = false;
})
},
clickEchars(data) {
let ele = data;
let media = ele.axisValueLabel;
}
}
}
</script>
<style lang="less" scoped>
.ml-outter {
width: 936px;
height: 460px;
border: 2px solid #0f2a4d;
margin-top: 16px;
margin-left: 16px;
.ml-inner {
width: 100%;
height: calc(100% - 48px);
}
}
</style>

@ -0,0 +1,111 @@
/*
* @Author: your name
* @Date: 2021-10-12 09:12:13
* @LastEditTime: 2021-11-02 18:03:08
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/brandTop/opt.js
*/
import * as echarts from "echarts";
import { bigNumberTransform } from "@/utils/gol/dataTool"
export default function createOpt(dx,ds) {
return {
grid: {
top: "16px",
left: "16px",
right: "28px",
bottom: "16px",
containLabel: true,
},
tooltip: {
trigger: "axis",
backgroundColor: "#08182F",
color: "#fff",
borderColor: "#3373CC",
textStyle: {
color: "#fff", //设置文字颜色
},
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;",
formatter: function (params) {
var result = "";
var dotHtml =
'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#1197b8"></span>';
params.forEach(function (item) {
result += item.axisValue + "</br>" + dotHtml + item.data;
});
return result;
},
},
xAxis: {
type: "category",
axisTick: {
show: false,
},
axisLine: {
show: false,
lineStyle: {
color: "#fff",
},
},
data: dx,
},
yAxis: {
type: "value",
axisLine: {
show: false,
lineStyle: {
color: "#FFF",
},
},
axisLabel: {
formatter: (value) => {
let str = bigNumberTransform(value);
return str;
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: [
{
name: "2001",
data: ds,
type: "bar",
barWidth: 24,
itemStyle: {
normal: {
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
color: '#fff',
fontSize: 14
}
},
color: new echarts.graphic.LinearGradient(
0,
1,
0,
0,
[
{
offset: 0,
color: "rgb(65,117,203,0.4)", // 0% 处的颜色
},
{
offset: 1,
color: "#3373CC", // 100% 处的颜色#3373CC
},
],
false
),
},
},
},
],
}
}

@ -0,0 +1,115 @@
<!--
* @Author: xw
* @Date: 2021-10-12 09:32:35
* @LastEditTime: 2021-12-29 17:11:53
* @LastEditors: Please set LastEditors
* @Description: 舆情传播趋势
* @FilePath: /data-show/src/views/BrandInsight/warnsopo/index.vue
-->
<template>
<div class="warn-outter" v-loading="load">
<div class="warn-inner">
<vLabel-div title="负面消息">
<a class="more" @click="goMore"></a>
</vLabel-div>
<div class="warn-bd">
<dv-scroll-board :config="config" :style="{ width: '100%', height: '29.5rem' }" @click="handlerItem"/>
</div>
</div>
</div>
</template>
<script>
import {getList} from "@/api/MyBrand"
export default {
name: "",
props: ["brand"],
data() {
return {
load: false,
config: {},
darr: [],
form: {
token: '',
sBrand: '',
sSeriesName: '',
sQingGan: 2,
sCrisis: '',
iPageIndex: 1,
iPageSize: 100,
}
};
},
created() {
this.form.token = this.getToken;
this.form.sBrand = this.getWarningBrand.brandname || this.brand ;
this.form.sSeriesName = this.getWarningSeries || '';
this.getData();
},
methods: {
getData() {
let obj = Object.assign({}, this.getCtime2, this.form)
getList(obj).then(res => {
let data = res.data || [];
let arr = [];
let arr2 = [];
data.forEach((ele) => {
let a = [
`<span style='cursor: pointer;'>${ele._source.title}</span>`,
ele._source.carseries,
ele._source.crisis == 1?'初级危机':ele._source.crisis == 2?'中级危机':'高级危机'
];
let b = [
`<span style='cursor: pointer;'>${ele._source.title}</span>`,
ele._source.carseries,
ele._source.crisis == 1?'初级危机':ele._source.crisis == 2?'中级危机':'高级危机',
ele._source.id
];
arr.push(a);
arr2.push(b);
});
this.darr = arr2;
this.config = {
headerBGC: "rgba(16,33,59)",
oddRowBGC: "#173b6d",
evenRowBGC: "rgba(69, 149, 244, 0)",
columnWidth: [410,110,100],
rowNum: 11,
header: ["事件列表", "关联车型", "调性"],
data: arr,
};
})
},
handlerItem() {
},
goMore() {
this.$router.push("/moreWarning");
}
},
};
</script>
<style lang="less" scoped>
.warn-outter {
width: 618px;
// height: 560px;
margin-left: 16px;
.warn-inner {
width: 100%;
height: 540px;
margin-top: 16px;
border: 2px solid #0f2a4d;
.warn-bd {
width: 100%;
height: calc(100% - 48px);
}
}
}
.more {
font-size: 16px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #AAAAAA;
}
</style>
Loading…
Cancel
Save