Merge branch 'dev'

prod
校文 3 years ago
commit 0107c6c619

@ -0,0 +1,50 @@
import httpService from "@/request"
// 专项分析列表页 - 专题列表
export function getSchemeDataToSpecial(params) {
let obj = Object.assign({action: 'getSchemeDataToSpecial'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',
data: obj,
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
})
}
// 专项分析列表页 - 添加修改
export function setSchemeDataSpecial(params) {
let obj = Object.assign({action: 'setSchemeDataSpecial'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',
data: obj,
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
})
}
// 专项分析列表页 - 获取品牌和车型
export function getSchemeDataToBrandOrSeries(params) {
let obj = Object.assign({action: 'getSchemeDataToBrandOrSeries'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',
data: obj,
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
})
}
// 专项分析列表页 - 删除专题
export function delSchemeDataSpecial(params) {
let obj = Object.assign({action: 'delSchemeDataSpecial'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',
data: obj,
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
})
}

@ -23,6 +23,9 @@
<a-menu-item key="saleRank" v-menu="'/saleRank'">
<span>销量排行</span>
</a-menu-item>
<a-menu-item key="specialAnalize" v-menu="'/specialAnalize'">
<span>专项分析</span>
</a-menu-item>
</a-menu>
</a-dropdown>
<span class="iH-left-s1">菜单</span>
@ -144,7 +147,7 @@ export default {
obj.key === "eventInsight"
) {
this.setHeaderType(3);
} else if (obj.key === "saleRank") {
} else if (obj.key === "saleRank" || obj.key === "specialAnalize") {
this.setHeaderType(4);
}
else {
@ -165,6 +168,8 @@ export default {
// 退
layout() {
LS.remove("token");
LS.remove("userInfo");
LS.remove("account");
LS.remove("menu");
LS.remove("levelBtn");
LS.remove("user");
@ -181,6 +186,7 @@ export default {
LS.remove("mComparison");
LS.remove("tComparison");
LS.remove("mcStatus");
LS.remove("specialGuid");
this.$router.replace("/login");
},
},

@ -23,6 +23,9 @@
<a-menu-item key="saleRank" v-menu="'/saleRank'">
<span>销量排行</span>
</a-menu-item>
<a-menu-item key="specialAnalize" v-menu="'/specialAnalize'">
<span>专项分析</span>
</a-menu-item>
</a-menu>
</a-dropdown>
<span class="iH-left-s1">菜单</span>
@ -185,7 +188,7 @@ export default {
obj.key === "eventInsight"
) {
this.setHeaderType(3);
} else if (obj.key === "saleRank") {
} else if (obj.key === "saleRank" || obj.key === "specialAnalize") {
this.setHeaderType(4);
} else {
this.setHeaderType(1);
@ -211,6 +214,7 @@ export default {
LS.remove("mComparison");
LS.remove("tComparison");
LS.remove("mcStatus");
LS.remove("specialGuid");
this.$router.replace("/login");
},
///

@ -23,6 +23,9 @@
<a-menu-item key="saleRank" v-menu="'/saleRank'">
<span>销量排行</span>
</a-menu-item>
<a-menu-item key="specialAnalize" v-menu="'/specialAnalize'">
<span>专项分析</span>
</a-menu-item>
</a-menu>
</a-dropdown>
<span class="iH-left-s1">菜单</span>
@ -152,7 +155,7 @@ export default {
this.setHeaderType(2);
} else if(obj.key === 'brandInsight' || obj.key === 'modelInsight' || obj.key === "eventInsight") {
this.setHeaderType(3);
} else if (obj.key === "saleRank") {
} else if (obj.key === "saleRank" || obj.key === "specialAnalize") {
this.setHeaderType(4);
} else {
this.setHeaderType(1);
@ -178,6 +181,7 @@ export default {
LS.remove("mComparison");
LS.remove("tComparison");
LS.remove("mcStatus");
LS.remove("specialGuid");
this.$router.replace("/login");
}
},

@ -23,6 +23,9 @@
<a-menu-item key="saleRank" v-menu="'/saleRank'">
<span>销量排行</span>
</a-menu-item>
<a-menu-item key="specialAnalize" v-menu="'/specialAnalize'">
<span>专项分析</span>
</a-menu-item>
</a-menu>
</a-dropdown>
<span class="iH-left-s1">菜单</span>
@ -146,7 +149,7 @@ export default {
this.setHeaderType(2);
} else if(obj.key === 'brandInsight' || obj.key === 'modelInsight' || obj.key === "eventInsight") {
this.setHeaderType(3);
} else if (obj.key === "saleRank") {
} else if (obj.key === "saleRank" || obj.key === "specialAnalize") {
this.setHeaderType(4);
} else {
this.setHeaderType(1);
@ -172,6 +175,7 @@ export default {
LS.remove("mComparison");
LS.remove("tComparison");
LS.remove("mcStatus");
LS.remove("specialGuid");
this.$router.replace("/login");
}
},

@ -0,0 +1,271 @@
<!--
* @Author: your name
* @Date: 2021-10-15 09:16:31
* @LastEditTime: 2021-12-07 19:10:36
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/lycomponents/iSwitchBrand/index.vue
-->
<template>
<div class="sb-outter" v-if="show">
<div class="sb-inner">
<v-label-div title="品牌切换">
<span class="iconfont icon-guanbi v-m-close" @click="handlerClose"></span>
</v-label-div>
<div class="sb-d">
<ul class="sb-ul">
<span class="liSn">按品牌拼音首字母查找:</span>
<li v-for="(item,index) in letterArr" :key="index" :class="activeLi === index ? 'lactive': ''" @click="handlerLi(index)">{{item}}</li>
</ul>
<div style="clear: both"></div>
<div class="sb-dd">
<vue-scroll>
<div class="sb-bd">
<div class="s-item" :class="list.indexOf(item.brandname) != -1 ? 's-item-active': ''" v-for="(item,index) in showCars" :key="index" @click="handlerChoose(item)">
<div class="d1">
<img class="m1" :src="item.img">
</div>
<span class="s1">{{item.brandname}}</span>
</div>
</div>
</vue-scroll>
</div>
</div>
<div class="sb-footer" align="center">
<img class="m1" src="../../assets/images/BrandInsight/btn-01.png" @click="handlerSubmit">
</div>
</div>
</div>
</template>
<script>
import { getUserBrand} from "@/api/comm";
export default {
name: "iSwitchBrand",
props: {
visible: {
type: Boolean,
default: false,
},
brand: {
type: String,
default: "",
},
list: {
type: Array,
default: () => {
return []
},
}
},
watch: {
visible: {
handler(val) {
this.show = val ? true : false;
},
immediate: true,
},
},
created() {
this.brandname = this.brand;
this.brandList = this.list;
this.getBrands().then(() => {
this.handlerLi(0);
let row = this.cars.find((ele) => {
return ele.brandname === this.brandname;
});
this.chooseBrand = row;
});
},
data() {
return {
show: false,
activeLi: 0,
form: {
token: "",
},
letterArr: [
],
cars: [],
showCars: [],
showActive: "",
chooseBrand: null,
models: [],
brandname: "",
brandList: [],
};
},
methods: {
//
handlerClose() {
this.show = false;
this.$emit("update:visible", this.show);
},
// li
handlerLi(n) {
this.activeLi = n;
let key = this.letterArr[n];
this.showCars = this.cars.filter((ele) => ele.firstword === key);
},
//
getBrands() {
if (!this.getToken) return;
return new Promise((resolve, reject) => {
this.form.token = this.getToken;
getUserBrand(this.form)
.then((res) => {
let data = res.data || [];
let arr = [];
data.forEach((ele) => {
let fk = ele.firstword;
arr.push(fk);
});
let sarr = new Set(arr);
let arr1 = Array.from(sarr);
this.letterArr = this.todo(arr1, '热门');
this.cars = data;
resolve(true);
})
.catch(() => {
reject(false);
});
});
},
todo(arr, id) {
let index = 1,
newArr = [],
length = arr.length;
for (let i = 0; i < length; i++) {
if (arr[i] === id) {
newArr[0] = arr[i];
} else {
newArr[index++] = arr[i];
}
}
return newArr;
},
//
handlerChoose(row) {
this.$emit('choose', row.brandname)
},
//
handlerSubmit() {
this.$emit("change", this.list);
},
},
};
</script>
<style lang="less" scoped>
.sb-outter {
position: fixed;
width: 100%;
height: 100%;
z-index: 1000;
top: 0px;
left: 0px;
background-color: rgba(0, 0, 0, 0.45);
overflow: auto;
.sb-inner {
position: absolute;
width: 1230px;
height: 720px;
top: 0px;
left: 50%;
border-radius: 2px;
transform: translate(-50%, 90px);
background: #0c2342;
min-width: 400px;
min-height: 300px;
.sb-d {
width: 100%;
height: calc(100% - 128px);
overflow: hidden;
}
.sb-ul {
margin: 0px;
padding: 0px;
list-style: none;
margin-left: 16px;
margin-top: 10px;
height: 30px;
.liSn {
float: left;
color: #fff;
font-size: 16px;
margin-right: 24px;
}
li {
float: left;
color: #fff;
font-size: 16px;
margin-right: 24px;
cursor: pointer;
&:hover {
color: #3373cc;
}
}
.lactive {
color: #3373cc;
}
}
.sb-dd {
width: 100%;
height: calc(100% - 30px);
box-shadow: 0 0 20px;
}
.sb-bd {
padding: 0px 16px 16px 16px;
display: flex;
justify-content: flex-start;
flex-wrap: wrap;
.s-item {
cursor: pointer;
margin-left: 16px;
margin-top: 16px;
transition: all 0.3s;
border: 1px solid transparent;
&:hover {
border: 1px solid #3373cc;
}
.d1 {
width: 152px;
height: 132px;
background: #fff;
border-radius: 2px;
display: flex;
justify-content: center;
align-items: center;
}
.m1 {
width: 90px;
}
.s1 {
display: block;
text-align: center;
font-size: 16px;
color: #fff;
}
}
.s-item-active {
border: 1px solid #3373cc;
}
}
.sb-footer {
position: absolute;
width: 100%;
height: 80px;
bottom: 0px;
left: 0px;
border-top: 1px solid #1e3d64;
.m1 {
width: 480px;
height: 100%;
cursor: pointer;
}
}
}
}
</style>

@ -0,0 +1,352 @@
<!--
* @Author: your name
* @Date: 2021-10-15 09:16:31
* @LastEditTime: 2021-11-21 14:58:52
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/lycomponents/iSwitchBrand/index.vue
-->
<template>
<div class="sb-outter" v-if="show">
<div class="sb-inner">
<v-label-div title="车型切换">
<span class="iconfont icon-guanbi v-m-close" @click="handlerClose"></span>
</v-label-div>
<div class="sb-d">
<ul class="sb-ul">
<span class="liSn">按品牌拼音首字母查找:</span>
<li v-for="(item,index) in letterArr" :key="index" :class="activeLi === index ? 'lactive': ''" @click="handlerLi(index)">{{item}}</li>
</ul>
<div style="clear: both"></div>
<div class="sb-body">
<div class="sb-dd">
<vue-scroll>
<div class="sb-bd">
<div class="s-item" :class="brandname === item.brandname ? 's-item-active': ''" v-for="(item,index) in showCars" :key="index" @click="handlerChoose(index,item)">
<div class="d1">
<img class="m1" :src="item.img">
</div>
<span class="s1">{{item.brandname}}</span>
</div>
</div>
</vue-scroll>
</div>
<div class="sb-dd-right">
<vue-scroll>
<div class="sb-bd" v-loading="load">
<div class="sb-b-item" :class="list.indexOf(item.name) != -1 ? 'sb-b-item-active': ''" v-for="(item,index) in models" :key="index" @click="handlerModel(index, item)">
<div v-if="item.name.length > 12" style="font-size: 15px">{{item.name}}</div>
<div v-else>{{item.name}}</div>
</div>
</div>
</vue-scroll>
</div>
</div>
</div>
<div class="sb-footer" align="center">
<img class="m1" src="../../assets/images/BrandInsight/btn-01.png" @click="handlerSubmit">
</div>
</div>
</div>
</template>
<script>
import { getUserBrand, getUserSeriesName } from "@/api/comm";
export default {
name: "iSwitchModel",
props: {
visible: {
type: Boolean,
default: false,
},
brand: {
type: String,
default: ""
},
model: {
type: String,
default: ""
},
list: {
type: Array,
default: () => {
return []
}
}
},
watch: {
visible: {
handler(val) {
this.show = val ? true : false;
},
immediate: true,
},
},
created() {
this.brandname = this.brand;
this.modelName = this.model;
this.getBrands().then(() => {
this.handlerLi(0);
let row = this.cars.find(ele => {
return ele.brandname === this.brandname
})
this.chooseBrand = row;
});
this.getUserSeriesName(this.brandname);
},
data() {
return {
show: false,
activeLi: 0,
load: false,
form: {
token: "",
sBrandName: ""
},
letterArr: [
],
cars: [],
models: [],
showCars: [],
showActive: "",
chooseBrand: null,
chooseModel: null,
modelName: "",
brandname: ""
};
},
methods: {
//
handlerClose() {
this.show = false;
this.$emit("update:visible", this.show);
},
// li
handlerLi(n) {
this.activeLi = n;
let key = this.letterArr[n];
this.showCars = this.cars.filter((ele) => ele.firstword === key);
},
//
getBrands() {
if(!this.getToken) return;
this.form.token = this.getToken;
return new Promise((resolve, reject) => {
getUserBrand(this.form)
.then((res) => {
let data = res.data;
let arr = [];
data.forEach((ele) => {
let fk = ele.firstword;
arr.push(fk);
});
let sarr = new Set(arr);
let arr1 = Array.from(sarr);
this.letterArr = this.todo(arr1, '热门');
this.cars = data;
resolve(true);
})
.catch(() => {
reject(false);
});
});
},
todo(arr, id) {
let index = 1,
newArr = [],
length = arr.length;
for (let i = 0; i < length; i++) {
if (arr[i] === id) {
newArr[0] = arr[i];
} else {
newArr[index++] = arr[i];
}
}
return newArr;
},
//
handlerChoose(n, row) {
this.showActive = row.brandid;
this.chooseBrand = row;
this.brandname = this.chooseBrand.brandname;
this.getUserSeriesName(this.brandname)
},
//
handlerModel(n, row) {
this.$emit("choose", row.name);
},
//
handlerSubmit() {
// if(this.chooseBrand && this.chooseModel) {
// this.$emit("change", [this.chooseBrand, this.chooseModel]);
// this.handlerClose();
// } else {
// this.$message.warning('');
// }
this.$emit("change", this.list);
},
//
getUserSeriesName(brandName) {
if(!this.getToken) return;
this.form.token = this.getToken;
this.form.sBrandName = brandName;
this.load = true;
getUserSeriesName(this.form).then(res => {
let data = res.data || [];
this.models = data;
this.load = false;
})
}
},
};
</script>
<style lang="less" scoped>
.sb-body {
width: 100%;
height: calc(100% - 30px);
display: flex;
justify-content: flex-start;
}
.sb-outter {
position: fixed;
width: 100%;
height: 100%;
z-index: 1000;
top: 0px;
left: 0px;
background-color: rgba(0, 0, 0, 0.45);
overflow: auto;
.sb-inner {
position: absolute;
width: 1230px;
height: 720px;
top: 0px;
left: 50%;
border-radius: 2px;
transform: translate(-50%, 90px);
background: #0c2342;
min-width: 400px;
min-height: 300px;
.sb-d {
width: 100%;
height: calc(100% - 128px);
overflow: hidden;
}
.sb-ul {
margin: 0px;
padding: 0px;
list-style: none;
margin-left: 16px;
margin-top: 10px;
height: 30px;
.liSn {
float: left;
color: #fff;
font-size: 16px;
margin-right: 24px;
}
li {
float: left;
color: #fff;
font-size: 16px;
margin-right: 24px;
cursor: pointer;
&:hover {
color: #3373cc;
}
}
.lactive {
color: #3373cc;
}
}
.sb-dd {
width: 46%;
height: 100%;
box-shadow: 0 0 20px;
}
.sb-bd {
padding: 0px 16px 16px 16px;
display: flex;
justify-content: flex-start;
flex-wrap: wrap;
.s-item {
cursor: pointer;
margin-left: 16px;
margin-top: 16px;
transition: all 0.3s;
border: 1px solid transparent;
&:hover {
border: 1px solid #3373cc;
}
.d1 {
width: 152px;
height: 132px;
background: #fff;
border-radius: 2px;
display: flex;
justify-content: center;
align-items: center;
}
.m1 {
width: 90px;
}
.s1 {
display: block;
text-align: center;
font-size: 16px;
color: #fff;
}
}
.s-item-active {
border: 1px solid #3373cc;
}
.sb-b-item {
width: 194px;
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;
cursor: pointer;
&:hover {
background: #3373CC;
color: #fff;
}
}
.sb-b-item-active {
background: #3373CC;
color: #fff;
}
}
.sb-dd-right {
width: 54%;
height: 100%;
box-shadow: 0 0 20px;
}
.sb-footer {
position: absolute;
width: 100%;
height: 80px;
bottom: 0px;
left: 0px;
border-top: 1px solid #1e3d64;
.m1 {
width: 480px;
height: 100%;
cursor: pointer;
}
}
}
}
</style>

@ -10,6 +10,8 @@ import iHeader from "@/lycomponents/iHeader";
import iSwitchBrand from "@/lycomponents/iSwitchBrand";
import iSwitchModel from "@/lycomponents/iSwitchModel";
import iSaleModelChoose from "@/lycomponents/iSaleModelChoose";
import iSpecialBrandChoose from "@/lycomponents/iSpecialBrandChoose";
import iSpecialSeriesChoose from "@/lycomponents/iSpecialSeriesChoose";
import iHeaderMa from "@/lycomponents/iHeaderMa"
import iHeaderBrand from "@/lycomponents/iHeaderBrand"
import iHeaderMyself from "@/lycomponents/iHeaderMyself";
@ -23,7 +25,9 @@ export default {
iSwitchModel,
iHeaderBrand,
iHeaderMyself,
iSaleModelChoose
iSaleModelChoose,
iSpecialBrandChoose,
iSpecialSeriesChoose
}
})
}

@ -128,11 +128,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'])
'getChangeSTime', 'getMcStatus','getBcStatus','getScStatus','getTcStatus','getIsLight','getCarCircle','getSpecialGuid'])
},
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']),
'setChangeSTime','setMcStatus','setBcStatus','setScStatus','setTcStatus','setIsLight','setCarCircle','setSpecialGuid']),
// 获取当前日期时间
getDatetime() {
let now = new Date();

@ -29,7 +29,7 @@ router.afterEach(() => {
// 检查菜单权限
function checkMenu(path, next) {
let menuStr = store.getters.getMenu || [];
let arr = ['/modelInsight', '/eventInsight', '/marketingAnalysis', '/saleRank'];
let arr = ['/modelInsight', '/eventInsight', '/marketingAnalysis', '/saleRank', '/specialAnalize'];
let n = menuStr.findIndex(ele => ele.link === path);
if(arr.includes(path) && n === -1) next('/index')
else next()

@ -18,13 +18,8 @@ Router.prototype.push = function push(location) {
import Login from "@/views/Login"
import mcIndex from "@/views/MarketingComparison"
import ModelComparison from "@/views/ModelComparison"
import SaleRank from "@/views/SaleRank"
// 销量排行
import ThemeAnalize from "@/views/ThemeAnalize"
import ThemeData from "@/views/ThemeData"
import ThemeBoard from "@/views/ThemeBoard"
import ThemeComparison from "@/views/ThemeComparison"
import iSwitchEvent from "@/lycomponents/iSwitchEvent"
const router = [
{
path: '/login',
@ -397,6 +392,18 @@ const router = [
desc: "主题对比",
component: ThemeComparison
},
{
path: '/specialAnalize',
name: "specialAnalize",
desc: "专项分析",
component: resolve => require(["@/views/SpecialAnalize"], resolve),
},
{
path: '/specialAnalizeChoose',
name: "specialAnalizeChoose",
desc: "专项分析-选择",
component: resolve => require(["@/views/SpecialAnalizeChoose"], resolve),
},
]
},

@ -83,5 +83,8 @@ const actions = {
setCarCircle: ({commit}, log) => {
commit('setCarCircle', log)
},
setSpecialGuid: ({commit}, log) => {
commit('setSpecialGuid', log)
},
}
export default actions

@ -85,6 +85,9 @@ const getters = {
},
getCarCircle(state) {
return state.carCircle
},
getSpecialGuid(state) {
return state.specialGuid
}
}
export default getters

@ -136,6 +136,11 @@ const mutations = {
state.carCircle = log;
let str = JSON.stringify(log);
LS.put('carCircle', str, 1/8);
},
setSpecialGuid: (state, log) => {
state.specialGuid = log;
let str = JSON.stringify(log);
LS.put('specialGuid', str, 1/8);
}
}

@ -33,5 +33,6 @@ const state = {
menu: LS.get('menu') ? JSON.parse(LS.get('menu')) : [],
isLight: LS.get('isLight') || false, //浅色背景
carCircle: LS.get('carCircle') || 0, // 0全部 1车友圈
specialGuid: LS.get('specialGuid') || '', //专项分析
}
export default state;

@ -61,6 +61,10 @@ export default {
});
},
goKeyMedia(item) {
let type = this.getCtime.sTimeType
this.setCtime2({
sTimeType: type,
})
this.$router.push({
path: '/keyMediaHome',
query: {

@ -127,8 +127,13 @@ export default {
let obj = {
link:'/saleRank',
text:'销量排行'
}
data.meun.push(obj)
};
let obj2 = {
link:'/specialAnalize',
text:'专项分析'
};
data.meun.push(obj);
data.meun.push(obj2);
////
this.setMenu(data.meun);
if(this.remCheck) {

@ -0,0 +1,191 @@
<template>
<div class="d-container">
<div class="d-outer">
<div class="ds-inner">
<v-label-div style="background: #010B19" title="专项分析">
<a-button @click="handlerAdd" type="primary">新增主题</a-button>
</v-label-div>
<div class="card-container">
<a-tabs type="card" @change=handlerChangeTheme>
<a-tab-pane class="tab-pane" key="0" tab="专项列表">
<div class="card-items" v-for="(item, index) in myThemeArr" :key="index">
<div class="card-item-top">
<div class="card-uncomp" v-if="!item.isCom">
<span style="margin-top: 5px">进行中</span>
</div>
<div class="card-completed" v-else></div>
<v-card-button @edit="handlerEdit(item.Guids)" @del="handlerDel(item.Guids)"></v-card-button>
</div>
<div class="card-item-data" @click="toThemeData(item.Guids,item.Name)">
<div class="cid-title">
{{item.Name}}
</div>
<div class="cid-data">
<div class="s1"><div class="s1-title">开始时间</div><div class="s1-text">{{item.StartTime}}</div></div>
<div class="s1"><div class="s1-title">结束时间</div><div class="s1-text">{{item.EndTime}}</div></div>
<div class="s1"><div class="s1-title">选择数量</div><div class="s1-text">{{item.ReportSum}}</div></div>
</div>
</div>
</div>
</a-tab-pane>
<a-tab-pane class="tab-pane" key="1" tab="往期列表">
<div class="card-items" v-for="(item, index) in myThemeArr" :key="index">
<div class="card-item-top">
<div class="card-uncomp" v-if="!item.isCom">
<span style="margin-top: 5px">进行中</span>
</div>
<div class="card-completed" v-else></div>
<v-card-button @edit="handlerEdit(item.Guids)" @del="handlerDel(item.Guids)"></v-card-button>
</div>
<div class="card-item-data" @click="toThemeData(item.Guids,item.Name)">
<div class="cid-title">
{{item.Name}}
</div>
<div class="cid-data">
<div class="s1"><div class="s1-title">开始时间</div><div class="s1-text">{{item.StartTime}}</div></div>
<div class="s1"><div class="s1-title">结束时间</div><div class="s1-text">{{item.EndTime}}</div></div>
<div class="s1"><div class="s1-title">选择数量</div><div class="s1-text">{{item.ReportSum}}</div></div>
</div>
</div>
</div>
</a-tab-pane>
</a-tabs>
</div>
</div>
</div>
</div>
</template>
<script>
import tbEvent from './tbEvent'
export default {
name: "specialAnalize",
data() {
return {
myThemeArr: [],
//
form: {
token: "",
pageIndex: '',
pageSize: '',
sType: "now" //former now
},
}
},
created() {
this.form.token = this.getToken;
this.getNowData();
},
methods: {
...tbEvent,
}
}
</script>
<style lang="less">
.d-outer {
padding: 0px 16px 16px 16px;
}
.ds-inner {
width: 100%;
// height: 960px;
border: 2px solid #0F2A4D;
background: #010B19;
}
.card-container {
background: #010B19;
overflow: hidden;
padding: 16px;
}
.tab-pane {
display: flex;
flex-wrap:wrap;
justify-content: flex-start;
align-items: center;
}
.card-items {
width: 446px;
height: 240px;
border: 2px solid #0F2A4D;
border-radius: 4px;
margin-top: 16px;
margin-right: 16px;
background: #010B19;
.card-item-top {
width: 100%;
display: flex;
justify-content: space-between;
.card-uncomp {
color: #63AECC;
width: 95px;
height: 28px;
border-radius: 0px 0px 0px 1px;
background-repeat: no-repeat;
background-size: cover;
background-image: url('../../assets/images/Index/card_status.png');
display: -webkit-box;
-webkit-box-align: center;/*兼容FSafari、Chrome */
-webkit-box-pack: center;/*兼容FSafari、Chrome */
};
.card-completed {
color: rgb(71, 114, 145);
width: 95px;
height: 28px;
background-repeat: no-repeat;
background-size: cover;
border-radius: 0px 0px 0px 1px;
background-image: url('../../assets/images/Index/card_status.png');
display: -webkit-box;
-webkit-box-align: center;/*兼容FSafari、Chrome */
-webkit-box-pack: center;/*兼容FSafari、Chrome */
}
}
.card-item-data {
width: 100%;
padding: 16px;
color: white;
.cid-title {
height: 133px;
font-size: 20px;
}
.cid-data {
display: flex;
justify-content: flex-start;
.s1 {
width: 33%;
display: block;
font-family: Bebas;
font-size: 12px;
.s1-title {
color: #7b93a5;
}
}
}
}
}
.modal-outter {
background: rgb(18, 35, 65);
.modal-top {
padding: 16px;
}
}
.modal-container {
display: flex;
justify-content: flex-start;
color: white;
width: 1200px;
// height: 680px;
.modal-form {
width: 60%;
}
.model-display {
background: rgb(21, 49, 81);
}
}
.modal-tips {
float: right;
font-weight: 400;
color: #63AECC;
line-height: 12px
}
</style>

@ -0,0 +1,55 @@
import {getSchemeDataToSpecial} from "@/api/SpecialAnalize"
import {delSchemeDataSpecial} from "@/api/SpecialAnalize"
export default {
getNowData() {
getSchemeDataToSpecial(this.form).then(res => {
this.myThemeArr = res.data;
})
},
//回退
goBack() {
this.setHeaderType(3);
this.$router.go(-1);
},
handlerChangeTheme(n) {
if(n == 1) {
this.form.sType = 'former';
}
if(n == 0) {
this.form.sType = 'now';
};
this.getNowData();
},
//新增按钮
handlerAdd() {
this.$router.push('/specialAnalizeChoose')
},
//编辑修改
handlerEdit(guids) {
this.$router.push({path: '/specialAnalizeChoose', query: {sSpecialGuid: guids}});
},
//删除
handlerDel(guids) {
let obj = {
token: this.getToken,
sGuids: guids
}
delSchemeDataSpecial(obj).then(() => {
this.getNowData();
})
},
//前往详情页
toThemeData(guids,name) {
},
//日期
calendarPriceRangeChange(date) {
},
handlerChangeTime(val) {
},
disabledDate(current) {
return false;
},
}

@ -0,0 +1,245 @@
<template>
<div class="d-container">
<div class="sac-outter">
<div class="sac-inner">
<v-label-div title="分析设置">
<v-btn @click="goBack"></v-btn>
</v-label-div>
<div style="padding: 16px;display: flex">
<a-form-model layout="inline">
<a-form-model-item label="专项名称">
<a-input style="width: 472px" v-model="form.Name" placeholder="请输入名称"></a-input>
</a-form-model-item>
</a-form-model>
<div style="margin: 4px 16px 0 16px">
<span style="color: #fff;">分析方向</span>
<v-tab-group :value="direction" :style="{ background: 'transparent' }" :btns="['品牌分析','车型分析']" @change="handlerType"></v-tab-group>
</div>
<a-form-model layout="inline">
<a-form-model-item label="选择日期">
<a-range-picker show-time v-model="selTime" :disabled-date="disabledDate" :size="$vuiSize" valueFormat="YYYY-MM-DD HH:mm:ss" @ok="handlerChangeTime">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
</a-form-model-item>
</a-form-model>
</div>
</div>
<div class="sac-inner-d2">
<v-label-div title="品牌列表">
<v-btn @click="reset"></v-btn>
</v-label-div>
<div class="brandChooseContent" v-if="form.Classify == 1">
<div class="brand-item" v-for="(item, index) in chosenBrandList" :key="index">
<span style="margin-left: 40px">{{item}}</span><a-icon @click="delBrand(index)" class="close-icon" type="close" />
</div>
<div class="brand-item" style="text-align: center;">
<a-icon @click="handlerAdd" style="cursor: pointer;font-size: 36px;margin-top: 20px" type="plus" />
</div>
</div>
<div class="brandChooseContent" v-if="form.Classify == 2">
<div class="brand-item" v-for="(item, index) in chosenSeriesList" :key="index">
<span style="margin-left: 40px">{{item}}</span><a-icon @click="delBrand(index)" class="close-icon" type="close" />
</div>
<div class="brand-item" style="text-align: center;">
<a-icon @click="handlerAdd" style="cursor: pointer;font-size: 36px;margin-top: 20px" type="plus" />
</div>
</div>
</div>
<div class="beCpm-footer" @click="handlerConfirm">
保存
</div>
</div>
<iSpecialBrandChoose :list="chosenBrandList" :visible.sync="brandShow" @choose="brandChose" @change="handlerBrand"></iSpecialBrandChoose>
<iSpecialSeriesChoose brand="奥迪" :list="chosenSeriesList" :visible.sync="seriesShow" @choose="seriesChose" @change="handlerSeries"></iSpecialSeriesChoose>
</div>
</template>
<script>
import {setSchemeDataSpecial} from "@/api/SpecialAnalize";
import {getSchemeDataToBrandOrSeries} from "@/api/SpecialAnalize";
export default {
name: 'sac',
data() {
return {
token: '',
form: {
Guids: null,
Name: '',
Classify: 1, // 1 2
StartTime: '',
EndTime: '',
Types: 'SpecialV6',
},
chosenBrandList: [],
chosenSeriesList: [],
itemList: [], //
selTime: [],
direction: 0,
//
brandShow: false,
seriesShow: false,
}
},
created() {
this.token = this.getToken;
if(this.$route.query.sSpecialGuid) {
this.form.Guids = this.$route.query.sSpecialGuid
getSchemeDataToBrandOrSeries({token: this.token, sGuids: this.form.Guids}).then(res =>{
this.form.Classify = res.data.classify;
if(res.data.classify == 1) {
this.direction = 0;
this.chosenBrandList = (res.data.brand).split(',');
} else {
this.direction = 1;
this.chosenSeriesList = (res.data.seriesname).split(',');
}
})
}
},
methods: {
goBack() {
this.$router.go(-1)
},
handlerType(value) {
if(value == 0) {
this.form.Classify = 1
} else {
this.form.Classify = 2
}
},
handlerChangeTime(val) {
this.form.StartTime = val[0];
this.form.EndTime = val[1];
},
reset() {
if(this.form.Classify == 1) {
this.chosenBrandList = [];
} else if(this.form.Classify == 2) {
this.chosenSeriesList = [];
}
},
handlerConfirm() {
let obj = Object.assign(this.form, {AnalyzeWord: this.form.Classify == 1 ? this.chosenBrandList.join(','):this.chosenSeriesList.join(',')})
let str = JSON.stringify(obj);
let o = {
token: this.token,
DataJson: str
}
setSchemeDataSpecial(o).then(res => {
if(res.msg) {
if(this.$route.query.sSpecialGuid) {
this.$message.success('修改成功');
} else {
this.$message.success('添加成功');
}
this.$router.push('/specialAnalize')
}
})
},
handlerAdd() {
if(this.form.Classify == 1) {
this.brandShow = true;
} else {
this.seriesShow = true;
}
},
brandChose(value) {
if(this.chosenBrandList.indexOf(value) == -1) {
this.chosenBrandList.push(value)
} else {
let index = this.chosenBrandList.indexOf(value);
this.chosenBrandList.splice(index, 1);
}
},
handlerBrand(value) {
// console.log(value);
this.brandShow = false;
},
seriesChose(value) {
if(this.chosenSeriesList.indexOf(value) == -1) {
this.chosenSeriesList.push(value)
} else {
let index = this.chosenSeriesList.indexOf(value);
this.chosenSeriesList.splice(index, 1);
}
},
handlerSeries(value) {
this.seriesShow = false;
},
delBrand(index) {
if(this.form.Classify == 1) {
this.chosenBrandList.splice(index,1);
} else if(this.form.Classify == 2) {
this.chosenSeriesList.splice(index,1);
}
},
disabledDate() {
return false
}
}
}
</script>
<style lang="less">
.sac-outter {
padding: 0px 16px 16px 16px;
}
.sac-inner {
width: 100%;
// height: 960px;
border: 2px solid #0F2A4D;
background: #010B19;
}
.sac-inner-d2 {
width: 100%;
// height: 960px;
border: 2px solid #0F2A4D;
background: #010B19;
margin-top: 16px;
.brandChooseContent {
padding: 0 0 24px 24px;
display: flex;
flex-wrap: wrap;
.brand-item {
width: 286px;
height: 80px;
background: #1B4163;
border-radius: 4px;
font-size: 20px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #FFFFFF;
line-height: 80px;
margin-right: 24px;
margin-top: 24px;
text-align: center;
.close-icon {
position: relative;
margin-top: 30px;
margin-right: 24px;
float: right;
color: #3373CC;
cursor: pointer;
}
}
}
}
.beCpm-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%;
transform: translate(-50%);
cursor: pointer;
color: #63aecc;
font-size: 24px;
font-weight: bold;
text-align: center;
line-height: 64px;
margin-top: 16px;
}
</style>
Loading…
Cancel
Save