From b366ee8739494977f0672ae4f8df9f8b376b9e80 Mon Sep 17 00:00:00 2001 From: zx <604444282@qq.com> Date: Mon, 24 Jan 2022 17:23:36 +0800 Subject: [PATCH] zx --- src/styles/antd.less | 3 +- src/views/EventInsight/hotEventPO/index.vue | 1 - .../EventInsight/industryTOPHE/index.vue | 1 + src/views/IndustryDataExport/tableEvent.js | 1 - src/views/ThemeAnalize/index.vue | 217 ++++++------------ .../ThemeAnalize/newThemeModal/index.vue | 49 ---- src/views/ThemeAnalize/tbEvent.js | 182 +++++++++++++++ src/views/ThemeBoard/TotalSource/index.vue | 4 +- src/views/ThemeData/getApi.js | 1 + src/views/ThemeData/index.vue | 15 +- src/views/ThemeData/tableEvent.js | 96 ++++++-- 11 files changed, 345 insertions(+), 225 deletions(-) delete mode 100644 src/views/ThemeAnalize/newThemeModal/index.vue create mode 100644 src/views/ThemeAnalize/tbEvent.js diff --git a/src/styles/antd.less b/src/styles/antd.less index e636c74..b485d76 100644 --- a/src/styles/antd.less +++ b/src/styles/antd.less @@ -175,7 +175,7 @@ .ant-calendar-range .ant-calendar-in-range-cell::before { background: #1990fe !important; } -.ant-calendar-cell ant-calendar-in-range-cell { +.ant-calendar-cell .ant-calendar-in-range-cell { background: transparent !important; } .ant-calendar-range .ant-calendar-input, .ant-calendar-range .ant-calendar-time-picker-input { @@ -290,6 +290,7 @@ li.ant-calendar-time-picker-select-option-selected { .ant-tabs-card > .ant-tabs-content > .ant-tabs-tabpane { background: rgb(26, 38, 65) !important; + padding-bottom: 22px; } .ant-tabs-card > .ant-tabs-bar { diff --git a/src/views/EventInsight/hotEventPO/index.vue b/src/views/EventInsight/hotEventPO/index.vue index 64704b3..442de5a 100644 --- a/src/views/EventInsight/hotEventPO/index.vue +++ b/src/views/EventInsight/hotEventPO/index.vue @@ -54,7 +54,6 @@ export default { //点击事件 clickEchars(data) { let ele = data; - console.log(ele); } } }; diff --git a/src/views/EventInsight/industryTOPHE/index.vue b/src/views/EventInsight/industryTOPHE/index.vue index 997642d..5210d64 100644 --- a/src/views/EventInsight/industryTOPHE/index.vue +++ b/src/views/EventInsight/industryTOPHE/index.vue @@ -99,6 +99,7 @@ export default { this.$router.push({path: '/eventComparison'}) }, goTheme() { + this.setHeaderType(4); this.$router.push({path: '/themeAnalize'}) }, goRefresh() { diff --git a/src/views/IndustryDataExport/tableEvent.js b/src/views/IndustryDataExport/tableEvent.js index 6e716f5..6b734cb 100644 --- a/src/views/IndustryDataExport/tableEvent.js +++ b/src/views/IndustryDataExport/tableEvent.js @@ -84,7 +84,6 @@ export default { } else { this.gValue = x; } - console.log(this.form); this.getList(); this.getTable(); }); diff --git a/src/views/ThemeAnalize/index.vue b/src/views/ThemeAnalize/index.vue index 5510e0d..e205223 100644 --- a/src/views/ThemeAnalize/index.vue +++ b/src/views/ThemeAnalize/index.vue @@ -13,11 +13,11 @@
- 进行中 - 已完成 + 进行中 + 已完成 编辑 - +
此操作将删除数据,是否继续?
删除
@@ -40,95 +40,103 @@
- -
- - + +
确定
- - +
@@ -292,29 +205,28 @@ export default { } .d-inner { width: 100%; - height: 960px; + // height: 960px; border: 2px solid #0F2A4D; background: rgba(6, 21, 41, 0.4); } .card-container { background: rgba(6, 21, 41, 0.4); overflow: hidden; - padding: 24px; + padding: 16px; } .tab-pane { display: flex; flex-wrap:wrap; - justify-content: flex-start; + justify-content: space-between; align-items: center; } .card-items { - width: 430px; - height: 240px; + width: 446px; + // height: 240px; background: linear-gradient(180deg, #0088c9 0%, #001c43 100%); border-radius: 4px; - border: 2px solid #0091ff; - margin-left: 24px; margin-top: 24px; + border: 2px solid #0091ff; .card-item-top { width: 100%; } @@ -323,7 +235,8 @@ export default { padding: 16px; color: white; .cid-title { - height: 110px; + height: 133px; + font-size: 20px; } .cid-data { display: flex; @@ -340,11 +253,15 @@ export default { } } } +.modal-outter { + background: rgb(28, 39, 65); +} .modal-container { display: flex; justify-content: flex-start; color: white; width: 1200px; + height: 680px; .modal-form { width: 60%; } diff --git a/src/views/ThemeAnalize/newThemeModal/index.vue b/src/views/ThemeAnalize/newThemeModal/index.vue deleted file mode 100644 index 30be0a6..0000000 --- a/src/views/ThemeAnalize/newThemeModal/index.vue +++ /dev/null @@ -1,49 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/views/ThemeAnalize/tbEvent.js b/src/views/ThemeAnalize/tbEvent.js new file mode 100644 index 0000000..e83d1fc --- /dev/null +++ b/src/views/ThemeAnalize/tbEvent.js @@ -0,0 +1,182 @@ +import {getSchemeDataToTheme} from "@/api/ThemeAnalize" +import {setSchemeData} from "@/api/ThemeAnalize" +import {delCarBigDataByGuid} from "@/api/ThemeAnalize" +import {getSchemeDataByGuid} from "@/api/ThemeAnalize" +import moment from "moment"; +export default { + getNowData() { + let obj = Object.assign({}, this.form); + getSchemeDataToTheme(obj).then(res => { + let data = res.data; + let themeArr = []; + data.forEach(ele => { + let obj = { + guids: ele.Guids, + name: ele.Name, + startTime: ele.StartTime, + endTime: ele.EndTime, + total: ele.ReportSum, + isCom: true + }; + //判断是否到期 + if(new Date(ele.EndTime) <= new Date(this.getDatetime().clock + '' + this.getDatetime().sClock)) { + obj.isCom = false + } + themeArr.push(obj); + }) + this.myThemeArr = themeArr; + }) + }, + //回退 + goBack() { + this.setHeaderType(3); + this.$router.go(-1); + }, + //新增按钮 + handlerAdd() { + this.reSet(); + this.combo = { + number: 0, + display: [] + }; + this.comboHigh = ''; + this.modalObj.visible = true + }, + //编辑修改 + handlerEdit(guids) { + let obj = { + token: this.getToken, + Guids: guids + }; + getSchemeDataByGuid(obj).then(res => { + let data = res.data; + console.log(data); + this.addForm = data; + this.doCombo(); + this.doComboHigh(); + this.modalObj.visible = true; + }) + }, + //删除 + handlerDel(guids) { + let obj = { + token: this.getToken, + Guids: guids + } + delCarBigDataByGuid(obj).then(() => { + this.getNowData(); + }) + }, + //删除确认框 + cancel() {}, + //新增确认框 + handlerOk() { + let newForm = { + token: "", + DataJson: "" + }; + newForm.token = this.getToken; + newForm.DataJson = JSON.stringify(this.addForm); + let obj = Object.assign({}, newForm); + setSchemeData(obj).then(res => { + this.getNowData(); + this.reSet(); + }) + this.modalObj.visible = false; + }, + handlerCancel() { + this.addForm.Guids = null; + this.reSet(); + this.modalObj.visible = false; + }, + //配置示例 + doCombo() { + let bWord = this.addForm.DetailsData[0].AnalyzeWord.split(',') + let hWord = this.addForm.DetailsData[0].HuoWord.split(',') + let arr = []; + let bString = ''; + // bWord.forEach(ele => { + // bString = bString + ele.trim() + // }); + for(let i=0;i { + let str = ''; + if(ele != '') { + str = bString + '+' + ele.trim(); + } else { + str = bString + ele.trim(); + } + arr.push(str) + }) + this.combo.display = arr; + this.combo.number = arr.length; + }, + doComboHigh() { + this.comboHigh = this.addForm.DetailsData[0].AnalyzeWord + }, + //切换模式 + handlerTabs(activeTab) { + this.addForm.DetailsData[0].IsAdvancedQuery = activeTab; + }, + //重置表单 + reSet() { + this.addForm = { + Name: "", + Classify: 0, + StartTime: '', + EndTime: '', + Types: "theme_v6", + DetailsData: [ + {AnalyzeWord: "", + HuoWord: "", + PaiChu: "", + Source: "", + UserAuthor: "", + IsAdvancedQuery: 0 //0普通 1高级 + } + ] + } + }, + //前往详情页 + toThemeData(guids) { + this.$router.push( + { + path: '/ThemeData', + query: { + action: "getList", + // sTimeType, + // sQuDao, + // sQingGan, + // iPageIndex, + // iPageSize, + token: this.getToken, + sType: "ZhuTiFenXiBl", + sGuid: guids, + // iGroupBy, + // isSourcetype, + // listType, + // website, + // iTimeType + }, + } + ) + }, + //日期 + calendarPriceRangeChange(date) { + this.selectPriceDate = date[0]; + }, + handlerChangeTime(val) { + this.addForm.StartTime = val[0]; + this.addForm.EndTime = val[1]; + this.selectPriceDate = ""; + }, + disabledDate(current) { + return current > moment(); + }, +} \ No newline at end of file diff --git a/src/views/ThemeBoard/TotalSource/index.vue b/src/views/ThemeBoard/TotalSource/index.vue index 5ee83c6..fb90f2c 100644 --- a/src/views/ThemeBoard/TotalSource/index.vue +++ b/src/views/ThemeBoard/TotalSource/index.vue @@ -106,9 +106,9 @@ export default { this.modelStyle.left = mw.offsetX - this.ecmodel.width - 20 + "px" } if((this.ecbox.height - mw.offsetY - 20) > this.ecmodel.height) { - this.modelStyle.top = mw.offsetY + 1500 + "px" + this.modelStyle.top = mw.offsetY + "px" } else { - this.modelStyle.top = mw.offsetY - this.ecmodel.height + 1500 + "px" + this.modelStyle.top = mw.offsetY - this.ecmodel.height + "px" } }, closeBox() { diff --git a/src/views/ThemeData/getApi.js b/src/views/ThemeData/getApi.js index 376a32f..37f648b 100644 --- a/src/views/ThemeData/getApi.js +++ b/src/views/ThemeData/getApi.js @@ -4,6 +4,7 @@ export default { //获取表格数据 getTableData() { let obj = Object.assign({}, this.form); + this.tableLoading = true; getList(obj).then(res => { let data = res.data; this.totalNum = res.totalNum; diff --git a/src/views/ThemeData/index.vue b/src/views/ThemeData/index.vue index 1b8324e..d957a9d 100644 --- a/src/views/ThemeData/index.vue +++ b/src/views/ThemeData/index.vue @@ -7,8 +7,8 @@
时间: - - + +
@@ -28,12 +28,12 @@
关键词: - - + +
时间筛选: - +
去重筛选: @@ -78,6 +78,8 @@ export default { form: { action: 'getList', sTimeType: '', + sStartTime: '', + sEndTime: '', sQuDao: '', sQingGan: '', iPageIndex: 1, @@ -98,6 +100,7 @@ export default { selTime: [], timesSel: [], buttonTime: [], + selectPriceDate: "", //渠道 quDao: [], plainOptions: [], @@ -114,6 +117,8 @@ export default { //去重筛选 gValue2: 0, btnTimes2:['不去重','相似度去重'], + //搜索框 + searchTitle: '', //表格 columns: [ { diff --git a/src/views/ThemeData/tableEvent.js b/src/views/ThemeData/tableEvent.js index 47d28a2..320851b 100644 --- a/src/views/ThemeData/tableEvent.js +++ b/src/views/ThemeData/tableEvent.js @@ -28,6 +28,8 @@ export function rowSelection() { return a } +import moment from "moment"; + export default { //---主页面---// initData() { @@ -47,7 +49,7 @@ export default { this.doFormQudao(qudao); this.doFormQS(series); - this.form.sTimeType = this.$route.query.sTimeType || '20'; + this.form.sTimeType = this.$route.query.sTimeType || '34'; this.form.sStartTime = this.$route.query.startTime || ""; this.form.sEndTime = this.$route.query.endTime || ""; if (this.form.sStartTime && this.form.sEndTime) { @@ -61,7 +63,6 @@ export default { } else { this.gValue = x; } - console.log(this.form) this.getTableData(); }) }, @@ -86,12 +87,29 @@ export default { }, //------// //时间 - calendarPriceRangeChange() {}, - handlerChangeTime() {}, - disabledDate() {}, - changeTime(n) { + calendarPriceRangeChange(date) { + this.selectPriceDate = date[0]; + }, + handlerChangeTime(val) { + this.form.sStartTime = val[0]; + this.form.sEndTime = val[1]; + this.selectPriceDate = ""; + this.sk = []; + this.tableAll = false; + this.getTableData(); + }, + disabledDate(current) { + return current > moment(); + }, + handlerTime(n) { let ele = this.timesSel[n]; this.form.sTimeType = ele.key; + this.sk = []; + this.tableAll = false; + if (ele.key != this.selVal) { + this.getTableData(); + // this.getList(); + } }, // 选择情感和渠道的情况 onChange(val, type) { @@ -100,33 +118,79 @@ export default { this.qdIndeterminate = !!this.quDao.length && this.quDao.length < this.plainOptions.length; this.qdCheckAll = this.quDao.length === this.plainOptions.length; this.form.sQuDao = this.quDao.toString(); - } else if (type === "qingGan") { - this.qgIndeterminate = !!this.qingGan.length && this.qingGan.length < this.plainOptions3.length; - this.qgCheckAll = this.qingGan.length === this.plainOptions3.length; - this.doFormQS(this.qingGan); + } else if (type === "diaoXing") { + this.dxIndeterminate = !!this.diaoXing.length && this.diaoXing.length < this.plainOptions1.length; + this.dxCheckAll = this.diaoXing.length === this.plainOptions1.length; + // this.doFormQS(this.diaoXing); + this.form.sQingGan = this.diaoXing.toString(); } this.form.iPageIndex = 1; Promise.all([this.getTableData()]).then(() => { this.noClick = false; }); }, - //渠道 - onCheckAllChangeQd() {}, - //调性 - onCheckAllChangeDx() {}, + //渠道全选 + onCheckAllChangeQd(e) { + let arr = []; + this.plainOptions.forEach(ele => { + let value = ele.value; + arr.push(value) + }) + Object.assign(this, { + quDao: e.target.checked ? arr : [], + qdIndeterminate: false, + qdCheckAll: e.target.checked, + }); + this.form.sQuDao = this.quDao.toString(); + this.form.iPageIndex = 1; + this.pagination.current = 1; + this.sk = []; + this.tableAll = false; + Promise.all([this.getTableData()]).then(() => { + this.noClick = false; + }); + }, + //调性全选 + onCheckAllChangeDx(e) { + let arr = []; + this.plainOptions1.forEach(ele => { + let value = ele.value; + arr.push(value) + }) + Object.assign(this, { + diaoXing: e.target.checked ? arr : [], + dxIndeterminate: false, + dxCheckAll: e.target.checked, + }); + this.doFormQS(this.diaoXing); + this.form.iPageIndex = 1; + this.pagination.current = 1; + this.sk = []; + this.tableAll = false; + Promise.all([this.getTableData()]).then(() => { + this.noClick = false; + }); + }, //时间筛选 - handlerTime(activeIndex) { + handlerSxTime(activeIndex) { this.form.iTimeType = activeIndex; + this.getTableData(); }, //去重筛选 handlerTime2(activeIndex) { this.form.iGroupBy = activeIndex; + this.getTableData(); + }, + //关键词搜索 + onSearch() { + this.form.sTitle = this.searchTitle; + this.getTableData(); }, // 改变页面的数据 handlerPage(p) { let iPageIndex = p.current; this.form.iPageIndex = iPageIndex; this.pagination.current = iPageIndex; - this.getTable(); + this.getTableData(); }, } \ No newline at end of file