From 358cd52a1f11d9b6fbc91713fa56be2da75818d1 Mon Sep 17 00:00:00 2001 From: zx <604444282@qq.com> Date: Tue, 21 Feb 2023 13:44:56 +0800 Subject: [PATCH] zx --- src/mixins/index.js | 4 +- src/store/actions.js | 3 + src/store/getters.js | 3 + src/store/mutations.js | 5 ++ src/store/state.js | 1 + .../EventDEC/mediaInterpretationED/index.vue | 4 +- src/views/Index/dynamicNumber/index.vue | 7 ++- src/views/IndustryDataExport/getApiData.js | 9 ++- src/views/IndustryDataExport/tableEvent.js | 1 - .../MWDnegativeOpinionKOL/index.vue | 4 +- .../MWDpositiveViewKOL/index.vue | 4 +- src/views/MoreWarning/index.vue | 25 +++++++- src/views/MyBrand/brandData/index.vue | 22 +++++-- src/views/MyBrand/eventList/index.vue | 21 +++++-- src/views/MyBrand/index.vue | 40 ++++++------ src/views/MyBrand/mediaList/index.vue | 21 +++++-- src/views/MyBrand/warningInfo/index.vue | 21 +++++-- src/views/ThemeAnalize/index.vue | 61 +++++++++++++++---- src/views/ThemeAnalize/tbEvent.js | 47 +++++++++++++- .../ThemeBoard/TransformAnalize/index.vue | 4 +- .../WeiboDetails/negativeOpinionKOL/index.vue | 4 +- .../WeiboDetails/positiveViewKOL/index.vue | 4 +- 22 files changed, 245 insertions(+), 70 deletions(-) diff --git a/src/mixins/index.js b/src/mixins/index.js index ad79aa6..9e5b2aa 100644 --- a/src/mixins/index.js +++ b/src/mixins/index.js @@ -141,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','getWarningBrand','getWarningSeries']) + 'getChangeSTime', 'getMcStatus','getBcStatus','getScStatus','getTcStatus','getIsLight','getCarCircle','getSpecialGuid','getWarningBrand','getWarningSeries','getHealth']) }, 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','setWarningBrand','setWarningSeries']), + 'setChangeSTime','setMcStatus','setBcStatus','setScStatus','setTcStatus','setIsLight','setCarCircle','setSpecialGuid','setWarningBrand','setWarningSeries','setHealth']), // 获取当前日期时间 getDatetime() { let now = new Date(); diff --git a/src/store/actions.js b/src/store/actions.js index 91e9cf8..208f9b3 100644 --- a/src/store/actions.js +++ b/src/store/actions.js @@ -92,5 +92,8 @@ const actions = { setWarningSeries: ({commit}, log) => { commit('setWarningSeries', log) }, + setHealth: ({commit}, log) => { + commit('setHealth', log) + }, } export default actions diff --git a/src/store/getters.js b/src/store/getters.js index 85598a0..c047903 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -95,5 +95,8 @@ const getters = { getWarningSeries(state) { return state.warningSeries }, + getHealth(state) { + return state.health + } } export default getters diff --git a/src/store/mutations.js b/src/store/mutations.js index 2bb9442..090d27e 100644 --- a/src/store/mutations.js +++ b/src/store/mutations.js @@ -151,6 +151,11 @@ const mutations = { state.warningSeries = log; let str = JSON.stringify(log); LS.put('warningSeries', str, 1/8); + }, + setHealth: (state, log) => { + state.health = log; + let str = JSON.stringify(log); + LS.put('health', str, 1/8); } } diff --git a/src/store/state.js b/src/store/state.js index e5f969c..7793ca1 100644 --- a/src/store/state.js +++ b/src/store/state.js @@ -36,5 +36,6 @@ const state = { specialGuid: LS.get('specialGuid') || '', //专项分析 warningBrand: LS.get('warningBrand') ? JSON.parse(LS.get('warningBrand')) : {}, //预警主品牌 warningSeries: LS.get('warningSeries') ? JSON.parse(LS.get('warningSeries')) : {}, //预警车型 + health: LS.get('health') || 50, //健康指数 } export default state; diff --git a/src/views/EventDEC/mediaInterpretationED/index.vue b/src/views/EventDEC/mediaInterpretationED/index.vue index a9fe5d2..2639528 100644 --- a/src/views/EventDEC/mediaInterpretationED/index.vue +++ b/src/views/EventDEC/mediaInterpretationED/index.vue @@ -48,9 +48,9 @@
-
+
{{item._source.user_author}}
粉丝数:{{bigNumberTransform(item._source.weibofans)}}
diff --git a/src/views/Index/dynamicNumber/index.vue b/src/views/Index/dynamicNumber/index.vue index 1eb2143..748ec8f 100644 --- a/src/views/Index/dynamicNumber/index.vue +++ b/src/views/Index/dynamicNumber/index.vue @@ -15,10 +15,10 @@
-
+
短视频 - +
@@ -76,6 +76,7 @@ export default { news: 0, weipo: 0, other: 0, + tiktok: 0, short: 0, forum: 0, wecat: 0, @@ -125,6 +126,8 @@ export default { this.form.wecat = ele.value; } else if (ele.key == "微博") { this.form.weipo = ele.value; + } else if (ele.key == "短视频") { + this.form.tiktok = ele.value; } else { this.form.other = ele.value; } diff --git a/src/views/IndustryDataExport/getApiData.js b/src/views/IndustryDataExport/getApiData.js index 7bb4b09..6c238d2 100644 --- a/src/views/IndustryDataExport/getApiData.js +++ b/src/views/IndustryDataExport/getApiData.js @@ -184,9 +184,13 @@ export default { let data = res.data; let arr = []; let arr1 = []; + let obj1 = {}; data.forEach((ele) => { if(ele.checked == 1) { - arr1.push(ele.field) + arr1.push(ele.field); + obj1[ele.field] = 1; + } else { + obj1[ele.field] = 0; } let obj = { label: ele.name, @@ -195,7 +199,8 @@ export default { arr.push(obj); }); this.checkedIds = arr1; - this.fileTypeChange(arr1); + this.execlForm.sField = JSON.stringify(obj1) + // this.fileTypeChange(arr1); this.plainOptions4 = arr; resolve(arr); }).catch(() => { diff --git a/src/views/IndustryDataExport/tableEvent.js b/src/views/IndustryDataExport/tableEvent.js index 2c0b797..7f23f88 100644 --- a/src/views/IndustryDataExport/tableEvent.js +++ b/src/views/IndustryDataExport/tableEvent.js @@ -65,7 +65,6 @@ 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); diff --git a/src/views/ModelWeiboDetails/MWDnegativeOpinionKOL/index.vue b/src/views/ModelWeiboDetails/MWDnegativeOpinionKOL/index.vue index a806f55..22406e4 100644 --- a/src/views/ModelWeiboDetails/MWDnegativeOpinionKOL/index.vue +++ b/src/views/ModelWeiboDetails/MWDnegativeOpinionKOL/index.vue @@ -12,9 +12,9 @@
-
+
{{item.title}}
粉丝数:{{item.fans}}
diff --git a/src/views/ModelWeiboDetails/MWDpositiveViewKOL/index.vue b/src/views/ModelWeiboDetails/MWDpositiveViewKOL/index.vue index c452cc3..d1639fb 100644 --- a/src/views/ModelWeiboDetails/MWDpositiveViewKOL/index.vue +++ b/src/views/ModelWeiboDetails/MWDpositiveViewKOL/index.vue @@ -11,9 +11,9 @@
-
+
{{ item.title }}
diff --git a/src/views/MoreWarning/index.vue b/src/views/MoreWarning/index.vue index 7649f23..028f02c 100644 --- a/src/views/MoreWarning/index.vue +++ b/src/views/MoreWarning/index.vue @@ -6,10 +6,14 @@ 返回我的品牌 -
+
调性:
+
+ 调性: + +
状态: @@ -64,6 +68,7 @@ export default { currentIndex: 0, noClick: false, dx: [1,2,3], + dx1: [1,2,3], status: [0,1], plainOptions: [ {label: '低级危机', value: 1}, @@ -92,6 +97,13 @@ export default { iReadState: '', crisis: '' }, + warningForm2: { + token: '', + iPageIndex: 1, + iPageSize: 12, + iReadState: '', + crisis: '' + }, pagination: { total: 0, current: 1, @@ -163,6 +175,7 @@ export default { created() { this.form.token = this.getToken; this.warningForm.token = this.getToken; + this.warningForm2.token = this.getToken; this.form.sBrand = this.getWarningBrand.brandname || this.brand; this.form.sSeriesName = this.getWarningSeries || '' this.getData(); @@ -185,7 +198,7 @@ export default { }, getWarning() { this.tableLoading = true; - let obj = Object.assign({}, this.getCtime2, this.warningForm) + let obj = Object.assign({}, this.getCtime2, this.warningForm2) getSwsQyMessageList(obj).then(res => { this.tbData2 = res.data; this.pagination2.total = res.totalNum; @@ -202,6 +215,14 @@ export default { this.form.iPageIndex = 1; this.pagination.current = 1; this.getData(); + this.noClick = false; + }, + onChange1(val, type) { + this.noClick = true; + this.form.sCrisis = val.join(','); + this.warningForm2.crisis = val.join(','); + this.form.iPageIndex = 1; + this.pagination.current = 1; this.getWarning(); this.noClick = false; }, diff --git a/src/views/MyBrand/brandData/index.vue b/src/views/MyBrand/brandData/index.vue index ae693ab..b4a81c5 100644 --- a/src/views/MyBrand/brandData/index.vue +++ b/src/views/MyBrand/brandData/index.vue @@ -86,7 +86,18 @@ import {getHealthIndex} from "@/api/MyBrand" export default { name: "brandData", - props: ["brand"], + props: ["brand","series"], + watch: { + series: { + handler(val) { + if(val != 'default') { + this.form.token = this.getToken; + this.getData(); + } + }, + immediate: true + }, + }, data() { return { count: 0, @@ -113,16 +124,17 @@ export default { }; }, created() { - this.form.token = this.getToken; - this.form.sBrand = this.getWarningBrand.brandname || this.brand; - this.form.sSeriesName = this.getWarningSeries || ''; - this.getData(); + // this.form.token = this.getToken; + // this.getData(); }, methods: { getData() { + this.form.sBrand = this.getWarningBrand.brandname || this.brand; + this.form.sSeriesName = this.getWarningSeries || this.series; let obj = Object.assign({}, this.getCtime2, this.form) getHealthIndex(obj).then(res => { let data = res.data; + this.setHealth(data.healthIndex) 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; diff --git a/src/views/MyBrand/eventList/index.vue b/src/views/MyBrand/eventList/index.vue index b2d56a2..1e7b16d 100644 --- a/src/views/MyBrand/eventList/index.vue +++ b/src/views/MyBrand/eventList/index.vue @@ -21,7 +21,18 @@ import { getHotEventsList0528 } from "@/api/MyBrand"; export default { name: "eventList", - props: ["brand"], + props: ["brand","series"], + watch: { + series: { + handler(val) { + if(val != 'default') { + this.form.token = this.getToken; + this.getData(); + } + }, + immediate: true + }, + }, data() { return { load: false, @@ -37,13 +48,13 @@ export default { }; }, created() { - this.form.token = this.getToken; - this.form.sBrand = this.getWarningBrand.brandname || this.brand; - this.form.sSeriesName = this.getWarningSeries || '' - this.getData(); + // this.form.token = this.getToken; + // this.getData(); }, methods: { getData() { + this.form.sBrand = this.getWarningBrand.brandname || this.brand; + this.form.sSeriesName = this.getWarningSeries || this.series; let obj = Object.assign({}, this.getCtime2, this.form); this.load = true; getHotEventsList0528(obj).then((res) => { diff --git a/src/views/MyBrand/index.vue b/src/views/MyBrand/index.vue index 169f8b6..fd4b516 100644 --- a/src/views/MyBrand/index.vue +++ b/src/views/MyBrand/index.vue @@ -3,23 +3,23 @@
- +
{{this.brand}}
-
{{healthNum}}
+
{{getHealth?getHealth:0}}
健康指数
- +
- - + +
@@ -65,7 +65,7 @@ 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 {getSwsQyUserCarMainBrandList, getSwsQyQuartzList, addOrUpdSwsQyQuartzList} from "@/api/MyBrand" import { getSeriesNameByCategory } from "@/api/comm"; export default { name: "MyBrand", @@ -75,7 +75,7 @@ export default { }, data() { return { - healthNum: undefined, + healthNum: 0, series: [], form: { token: '', @@ -101,16 +101,16 @@ export default { models: [], list: [], brand: '', + srs: 'default', } }, - mounted() { + created() { 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(); + this.getData(); }, methods: { getApi() { @@ -122,25 +122,31 @@ export default { 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 != '') { + if(data[0].Es.SeriesNames) { this.list = data[0].Es.SeriesNames.split(','); this.setWarningSeries(data[0].Es.SeriesNames); + this.form.sSeriesName = data[0].Es.SeriesNames; + this.srs = data[0].Es.SeriesNames; + } else { + this.setWarningSeries(''); + this.form.sSeriesName = ''; + this.srs = ''; } this.Id = data[0].Id; - this.Statu = data[0].Statu + this.Statu = data[0].Statu; + // let obj = Object.assign({}, this.form, this.getCtime2); + // getHealthIndex(obj).then(res => { + // this.healthNum = res.data.healthIndex + // }); }) }, 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(); @@ -194,7 +200,7 @@ export default { }; addOrUpdSwsQyQuartzList(form).then(res => { if(res.msg == 'Success') { - this.setWarningSeries(this.settingForm.SeriesNames); + // this.setWarningSeries(this.settingForm.SeriesNames); this.$message.success('修改成功'); this.visible = false; this.reload(); diff --git a/src/views/MyBrand/mediaList/index.vue b/src/views/MyBrand/mediaList/index.vue index 0c5285c..2ae9736 100644 --- a/src/views/MyBrand/mediaList/index.vue +++ b/src/views/MyBrand/mediaList/index.vue @@ -20,7 +20,18 @@ import {getSourceTop} from "@/api/MyBrand" import createOpt from "./opt" export default { name: "brand-top", - props: ["brand"], + props: ["brand","series"], + watch: { + series: { + handler(val) { + if(val != 'default') { + this.form.token = this.getToken; + this.getData(); + } + }, + immediate: true + }, + }, data() { return { load: false, @@ -33,14 +44,14 @@ export default { } }, created() { - this.form.token = this.getToken; - this.form.sBrand = this.getWarningBrand.brandname || this.brand; - this.form.sSeriesName = this.getWarningSeries || ''; - this.getData() + // this.form.token = this.getToken; + // this.getData() }, methods: { getData() { this.load = true; + this.form.sBrand = this.getWarningBrand.brandname || this.brand; + this.form.sSeriesName = this.getWarningSeries || this.series; let obj = Object.assign({},this.getCtime2, this.form); getSourceTop(obj).then(res => { let data = res.data || {}; diff --git a/src/views/MyBrand/warningInfo/index.vue b/src/views/MyBrand/warningInfo/index.vue index a402d0c..7d27c78 100644 --- a/src/views/MyBrand/warningInfo/index.vue +++ b/src/views/MyBrand/warningInfo/index.vue @@ -23,7 +23,18 @@ import {getList} from "@/api/MyBrand" export default { name: "", - props: ["brand"], + props: ["brand","series"], + watch: { + series: { + handler(val) { + if(val != 'default') { + this.form.token = this.getToken; + this.getData(); + } + }, + immediate: true + }, + }, data() { return { load: false, @@ -41,13 +52,13 @@ export default { }; }, created() { - this.form.token = this.getToken; - this.form.sBrand = this.getWarningBrand.brandname || this.brand ; - this.form.sSeriesName = this.getWarningSeries || ''; - this.getData(); + // this.form.token = this.getToken; + // this.getData(); }, methods: { getData() { + this.form.sBrand = this.getWarningBrand.brandname || this.brand; + this.form.sSeriesName = this.getWarningSeries || this.series; let obj = Object.assign({}, this.getCtime2, this.form) getList(obj).then(res => { let data = res.data || []; diff --git a/src/views/ThemeAnalize/index.vue b/src/views/ThemeAnalize/index.vue index cce7e51..b9e8a7d 100644 --- a/src/views/ThemeAnalize/index.vue +++ b/src/views/ThemeAnalize/index.vue @@ -18,13 +18,6 @@ 进行中
已完成
-
@@ -78,7 +71,7 @@
-