|
@@ -26,7 +26,7 @@
|
|
|
|
|
|
<div style="display:flex;margin-bottom:15px" class="btndiv">
|
|
<div style="display:flex;margin-bottom:15px" class="btndiv">
|
|
<a-button type="primary" @click="customColumns">自定义列</a-button>
|
|
<a-button type="primary" @click="customColumns">自定义列</a-button>
|
|
- <a-button type="default" @click="exportExcel" id="mybtn" v-show="exportExcelIsOk">导出报表</a-button>
|
|
|
|
|
|
+ <a-button type="default" @click="exportExcel" id="mybtn" v-show="exportExcelIsOk">导出报表</a-button>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<a-modal v-model="visible" title="自定义列" on-ok="handleOk" width="65%">
|
|
<a-modal v-model="visible" title="自定义列" on-ok="handleOk" width="65%">
|
|
@@ -40,7 +40,11 @@
|
|
<p>可添加的列</p>
|
|
<p>可添加的列</p>
|
|
<div class="selectionList">
|
|
<div class="selectionList">
|
|
<!-- v-for="(item,index) in addColumns" :key="index" -->
|
|
<!-- v-for="(item,index) in addColumns" :key="index" -->
|
|
- <selectComponent :showCol="listNum" @getshowlist="getshowlist" :fixedColLength='columnsFixd.length' />
|
|
|
|
|
|
+ <selectComponent
|
|
|
|
+ :showCol="listNum"
|
|
|
|
+ @getshowlist="getshowlist"
|
|
|
|
+ :fixedColLength="columnsFixd.length"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="listNum">
|
|
<div class="listNum">
|
|
@@ -78,12 +82,17 @@
|
|
:scroll="{ x: scrollX }"
|
|
:scroll="{ x: scrollX }"
|
|
:loading="loading"
|
|
:loading="loading"
|
|
ref="vSummaryTable"
|
|
ref="vSummaryTable"
|
|
- :width='tableWidth'
|
|
|
|
- @customHeaderCell='customHeaderCell(columns)'
|
|
|
|
- height='100'
|
|
|
|
|
|
+ :width="tableWidth"
|
|
|
|
+ @customHeaderCell="customHeaderCell(columns)"
|
|
|
|
+ height="100"
|
|
>
|
|
>
|
|
- <div slot="videoU" slot-scope="test,records">
|
|
|
|
- <img :src="records.url+'?x-oss-process=video/snapshot,t_0,m_fast'" alt="" style="width:140px" @click="openVideo(records.url)">
|
|
|
|
|
|
+ <div slot="videoU" slot-scope="test,records">
|
|
|
|
+ <img
|
|
|
|
+ :src="records.url+'?x-oss-process=video/snapshot,t_0,m_fast'"
|
|
|
|
+ alt
|
|
|
|
+ style="width:140px"
|
|
|
|
+ @click="openVideo(records.url)"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
<span slot="ctr" slot-scope="ctr">{{ ctr | toPercentage }}</span>
|
|
<span slot="ctr" slot-scope="ctr">{{ ctr | toPercentage }}</span>
|
|
<span
|
|
<span
|
|
@@ -98,16 +107,31 @@
|
|
<span slot="cpc" slot-scope="cpm">{{ cpm | tofixed }}</span>
|
|
<span slot="cpc" slot-scope="cpm">{{ cpm | tofixed }}</span>
|
|
<span slot="cpm" slot-scope="cpm">{{ cpm | tofixed }}</span>
|
|
<span slot="cpm" slot-scope="cpm">{{ cpm | tofixed }}</span>
|
|
<span slot="activeRate" slot-scope="activeRate">{{ activeRate | toPercentage }}</span>
|
|
<span slot="activeRate" slot-scope="activeRate">{{ activeRate | toPercentage }}</span>
|
|
- <span slot="installFinishRate" slot-scope="installFinishRate">{{ installFinishRate | toPercentage }}</span>
|
|
|
|
|
|
+ <span
|
|
|
|
+ slot="installFinishRate"
|
|
|
|
+ slot-scope="installFinishRate"
|
|
|
|
+ >{{ installFinishRate | toPercentage }}</span>
|
|
<span slot="validPlayRate" slot-scope="validPlayRate">{{ validPlayRate | tofixed }}</span>
|
|
<span slot="validPlayRate" slot-scope="validPlayRate">{{ validPlayRate | tofixed }}</span>
|
|
<span slot="activePayCost" slot-scope="activePayCost">{{ activePayCost | tofixed }}</span>
|
|
<span slot="activePayCost" slot-scope="activePayCost">{{ activePayCost | tofixed }}</span>
|
|
<span slot="nextDayOpenCost" slot-scope="nextDayOpenCost">{{ nextDayOpenCost | tofixed }}</span>
|
|
<span slot="nextDayOpenCost" slot-scope="nextDayOpenCost">{{ nextDayOpenCost | tofixed }}</span>
|
|
<span slot="validPlayCost" slot-scope="validPlayCost">{{ validPlayCost | tofixed }}</span>
|
|
<span slot="validPlayCost" slot-scope="validPlayCost">{{ validPlayCost | tofixed }}</span>
|
|
<span slot="activeCost" slot-scope="activeCost">{{ activeCost | tofixed }}</span>
|
|
<span slot="activeCost" slot-scope="activeCost">{{ activeCost | tofixed }}</span>
|
|
- <span slot="gameAddictionCost" slot-scope="gameAddictionCost">{{ gameAddictionCost | tofixed }}</span>
|
|
|
|
- <span slot="downloadFinishCost" slot-scope="downloadFinishCost">{{ downloadFinishCost | tofixed }}</span>
|
|
|
|
- <span slot="downloadStartCost" slot-scope="downloadStartCost">{{ downloadStartCost | tofixed }}</span>
|
|
|
|
- <span slot="installFinishCost" slot-scope="installFinishCost">{{ installFinishCost | tofixed }}</span>
|
|
|
|
|
|
+ <span
|
|
|
|
+ slot="gameAddictionCost"
|
|
|
|
+ slot-scope="gameAddictionCost"
|
|
|
|
+ >{{ gameAddictionCost | tofixed }}</span>
|
|
|
|
+ <span
|
|
|
|
+ slot="downloadFinishCost"
|
|
|
|
+ slot-scope="downloadFinishCost"
|
|
|
|
+ >{{ downloadFinishCost | tofixed }}</span>
|
|
|
|
+ <span
|
|
|
|
+ slot="downloadStartCost"
|
|
|
|
+ slot-scope="downloadStartCost"
|
|
|
|
+ >{{ downloadStartCost | tofixed }}</span>
|
|
|
|
+ <span
|
|
|
|
+ slot="installFinishCost"
|
|
|
|
+ slot-scope="installFinishCost"
|
|
|
|
+ >{{ installFinishCost | tofixed }}</span>
|
|
<span slot="convertCost" slot-scope="convertCost">{{ convertCost | tofixed }}</span>
|
|
<span slot="convertCost" slot-scope="convertCost">{{ convertCost | tofixed }}</span>
|
|
|
|
|
|
<!-- -->
|
|
<!-- -->
|
|
@@ -133,14 +157,14 @@
|
|
<span slot="statDatetime" slot-scope>{{ timedata[0]+'~'+timedata[1]}}</span>
|
|
<span slot="statDatetime" slot-scope>{{ timedata[0]+'~'+timedata[1]}}</span>
|
|
</a-table>
|
|
</a-table>
|
|
|
|
|
|
- <a-modal v-model="Videovisible" title="视频详情" @ok="videoOk" :footer="null" width='50%'>
|
|
|
|
- <video
|
|
|
|
- @click.stop
|
|
|
|
- class="video"
|
|
|
|
- :src="videoUrl"
|
|
|
|
- controls="controls"
|
|
|
|
- style="height:600px;width:100%"
|
|
|
|
- >您的浏览器不支持 video 标签。</video>
|
|
|
|
|
|
+ <a-modal v-model="Videovisible" title="视频详情" @ok="videoOk" :footer="null" width="50%">
|
|
|
|
+ <video
|
|
|
|
+ @click.stop
|
|
|
|
+ class="video"
|
|
|
|
+ :src="videoUrl"
|
|
|
|
+ controls="controls"
|
|
|
|
+ style="height:600px;width:100%"
|
|
|
|
+ >您的浏览器不支持 video 标签。</video>
|
|
</a-modal>
|
|
</a-modal>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -188,7 +212,7 @@ let variableCol = [
|
|
{
|
|
{
|
|
title: '消耗',
|
|
title: '消耗',
|
|
dataIndex: 'cost',
|
|
dataIndex: 'cost',
|
|
-
|
|
|
|
|
|
+
|
|
scopedSlots: { customRender: 'cost' },
|
|
scopedSlots: { customRender: 'cost' },
|
|
align: 'center',
|
|
align: 'center',
|
|
sorter: (a, b) => a.cost - b.cost
|
|
sorter: (a, b) => a.cost - b.cost
|
|
@@ -197,7 +221,7 @@ let variableCol = [
|
|
title: '点击数',
|
|
title: '点击数',
|
|
dataIndex: 'clickMaterial',
|
|
dataIndex: 'clickMaterial',
|
|
align: 'center',
|
|
align: 'center',
|
|
-
|
|
|
|
|
|
+
|
|
scopedSlots: { customRender: 'clickMaterial' },
|
|
scopedSlots: { customRender: 'clickMaterial' },
|
|
sorter: (a, b) => a.clickMaterial - b.clickMaterial
|
|
sorter: (a, b) => a.clickMaterial - b.clickMaterial
|
|
},
|
|
},
|
|
@@ -205,7 +229,7 @@ let variableCol = [
|
|
title: '点击率',
|
|
title: '点击率',
|
|
dataIndex: 'ctr',
|
|
dataIndex: 'ctr',
|
|
align: 'center',
|
|
align: 'center',
|
|
-
|
|
|
|
|
|
+
|
|
scopedSlots: { customRender: 'ctr' },
|
|
scopedSlots: { customRender: 'ctr' },
|
|
sorter: (a, b) => a.ctr - b.ctr
|
|
sorter: (a, b) => a.ctr - b.ctr
|
|
},
|
|
},
|
|
@@ -214,7 +238,7 @@ let variableCol = [
|
|
title: '展示数',
|
|
title: '展示数',
|
|
dataIndex: 'showMaterial',
|
|
dataIndex: 'showMaterial',
|
|
align: 'center',
|
|
align: 'center',
|
|
-
|
|
|
|
|
|
+
|
|
scopedSlots: { customRender: 'showMaterial' },
|
|
scopedSlots: { customRender: 'showMaterial' },
|
|
sorter: (a, b) => a.showMaterial - b.showMaterial
|
|
sorter: (a, b) => a.showMaterial - b.showMaterial
|
|
},
|
|
},
|
|
@@ -222,7 +246,7 @@ let variableCol = [
|
|
title: '25%进度播放率',
|
|
title: '25%进度播放率',
|
|
dataIndex: 'play25FeedBreakRate',
|
|
dataIndex: 'play25FeedBreakRate',
|
|
align: 'center',
|
|
align: 'center',
|
|
-
|
|
|
|
|
|
+
|
|
scopedSlots: { customRender: 'play25FeedBreakRate' },
|
|
scopedSlots: { customRender: 'play25FeedBreakRate' },
|
|
sorter: (a, b) => a.play25FeedBreakRate - b.play25FeedBreakRate
|
|
sorter: (a, b) => a.play25FeedBreakRate - b.play25FeedBreakRate
|
|
},
|
|
},
|
|
@@ -230,7 +254,7 @@ let variableCol = [
|
|
title: '播完率',
|
|
title: '播完率',
|
|
dataIndex: 'playOverRate',
|
|
dataIndex: 'playOverRate',
|
|
align: 'center',
|
|
align: 'center',
|
|
-
|
|
|
|
|
|
+
|
|
tip: '表示广告在投放期内的预估花费金额。当天数据可能会有波动,次日稳定',
|
|
tip: '表示广告在投放期内的预估花费金额。当天数据可能会有波动,次日稳定',
|
|
scopedSlots: { customRender: 'playOverRate' },
|
|
scopedSlots: { customRender: 'playOverRate' },
|
|
sorter: (a, b) => a.playOverRate - b.playOverRate
|
|
sorter: (a, b) => a.playOverRate - b.playOverRate
|
|
@@ -239,7 +263,7 @@ let variableCol = [
|
|
title: '转化数',
|
|
title: '转化数',
|
|
dataIndex: 'convertMaterial',
|
|
dataIndex: 'convertMaterial',
|
|
align: 'center',
|
|
align: 'center',
|
|
-
|
|
|
|
|
|
+
|
|
scopedSlots: { customRender: 'convertMaterial' },
|
|
scopedSlots: { customRender: 'convertMaterial' },
|
|
sorter: (a, b) => a.convertMaterial - b.convertMaterial
|
|
sorter: (a, b) => a.convertMaterial - b.convertMaterial
|
|
},
|
|
},
|
|
@@ -247,7 +271,7 @@ let variableCol = [
|
|
title: '转化率',
|
|
title: '转化率',
|
|
dataIndex: 'convertRate',
|
|
dataIndex: 'convertRate',
|
|
align: 'center',
|
|
align: 'center',
|
|
-
|
|
|
|
|
|
+
|
|
scopedSlots: { customRender: 'convertRate' },
|
|
scopedSlots: { customRender: 'convertRate' },
|
|
sorter: (a, b) => a.convertRate - b.convertRate
|
|
sorter: (a, b) => a.convertRate - b.convertRate
|
|
}
|
|
}
|
|
@@ -257,17 +281,17 @@ export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
//设置表格的列宽
|
|
//设置表格的列宽
|
|
- tableWidth:'',
|
|
|
|
|
|
+ tableWidth: '',
|
|
|
|
|
|
//gudinglie
|
|
//gudinglie
|
|
- columnsFixd:columnsFixd,
|
|
|
|
|
|
+ columnsFixd: columnsFixd,
|
|
|
|
|
|
//是否打开视频
|
|
//是否打开视频
|
|
- Videovisible:false,
|
|
|
|
- videoUrl:'',
|
|
|
|
|
|
+ Videovisible: false,
|
|
|
|
+ videoUrl: '',
|
|
|
|
|
|
//是否显示导出按钮
|
|
//是否显示导出按钮
|
|
- exportExcelIsOk:true,
|
|
|
|
|
|
+ exportExcelIsOk: true,
|
|
consumeValue: 1000,
|
|
consumeValue: 1000,
|
|
|
|
|
|
columns: [...columnsFixd, ...variableCol],
|
|
columns: [...columnsFixd, ...variableCol],
|
|
@@ -286,7 +310,7 @@ export default {
|
|
listNum: [],
|
|
listNum: [],
|
|
//
|
|
//
|
|
form: [],
|
|
form: [],
|
|
- videoID:'',
|
|
|
|
|
|
+ videoID: '',
|
|
timedata: []
|
|
timedata: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -297,12 +321,12 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
moment,
|
|
moment,
|
|
//打开视频
|
|
//打开视频
|
|
- openVideo(val){
|
|
|
|
- this.Videovisible=true;
|
|
|
|
- this.videoUrl=val
|
|
|
|
|
|
+ openVideo(val) {
|
|
|
|
+ this.Videovisible = true
|
|
|
|
+ this.videoUrl = val
|
|
},
|
|
},
|
|
- videoOk(){
|
|
|
|
- this.Videovisible=false
|
|
|
|
|
|
+ videoOk() {
|
|
|
|
+ this.Videovisible = false
|
|
},
|
|
},
|
|
|
|
|
|
disabledDate(current) {
|
|
disabledDate(current) {
|
|
@@ -329,7 +353,7 @@ export default {
|
|
let result = res.result
|
|
let result = res.result
|
|
this.data.push({ ...result, key: 1 })
|
|
this.data.push({ ...result, key: 1 })
|
|
result.map((item, index) => {
|
|
result.map((item, index) => {
|
|
- item.key = index;
|
|
|
|
|
|
+ item.key = index
|
|
})
|
|
})
|
|
this.data = result
|
|
this.data = result
|
|
}
|
|
}
|
|
@@ -354,10 +378,10 @@ export default {
|
|
|
|
|
|
downFilePost('/toutiao/videoReportDaily/bytedanceVideoInfoListTotalExportExcel', {
|
|
downFilePost('/toutiao/videoReportDaily/bytedanceVideoInfoListTotalExportExcel', {
|
|
columns,
|
|
columns,
|
|
- signature:this.videoID,
|
|
|
|
- startDate:this.timedata[0],
|
|
|
|
- endDate:this.timedata[1],
|
|
|
|
- cost:this.consumeValue
|
|
|
|
|
|
+ signature: this.videoID,
|
|
|
|
+ startDate: this.timedata[0],
|
|
|
|
+ endDate: this.timedata[1],
|
|
|
|
+ cost: this.consumeValue
|
|
}).then(res => {
|
|
}).then(res => {
|
|
let blob = new Blob([res], {
|
|
let blob = new Blob([res], {
|
|
type: 'application/vnd.ms-excel'
|
|
type: 'application/vnd.ms-excel'
|
|
@@ -375,22 +399,20 @@ export default {
|
|
|
|
|
|
//日期选择回调
|
|
//日期选择回调
|
|
dateChange(data, dataString) {
|
|
dateChange(data, dataString) {
|
|
- if(data.length){
|
|
|
|
- this.timedata = dataString
|
|
|
|
- this.dateRange[0] = data[0]
|
|
|
|
- this.totalSelect = (data[1]._d - data[0]._d) / (24 * 60 * 60 * 1000) + 1
|
|
|
|
- this.daysFlag = true
|
|
|
|
- if (this.totalSelect > 92) {
|
|
|
|
- this.$message.error('时间跨度太长啦,选小一点好嘛?')
|
|
|
|
- this.daysFlag = false
|
|
|
|
- this.dateRange = []
|
|
|
|
- }
|
|
|
|
- }else{
|
|
|
|
- this.daysFlag=false
|
|
|
|
- this.dateRange=[]
|
|
|
|
|
|
+ if (data.length) {
|
|
|
|
+ this.timedata = dataString
|
|
|
|
+ this.dateRange[0] = data[0]
|
|
|
|
+ this.totalSelect = (data[1]._d - data[0]._d) / (24 * 60 * 60 * 1000) + 1
|
|
|
|
+ this.daysFlag = true
|
|
|
|
+ if (this.totalSelect > 92) {
|
|
|
|
+ this.$message.error('时间跨度太长啦,选小一点好嘛?')
|
|
|
|
+ this.daysFlag = false
|
|
|
|
+ this.dateRange = []
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ this.daysFlag = false
|
|
|
|
+ this.dateRange = []
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
},
|
|
},
|
|
|
|
|
|
//弹出框打开,自定义列
|
|
//弹出框打开,自定义列
|
|
@@ -400,20 +422,19 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
//设置头部单元格属性
|
|
//设置头部单元格属性
|
|
- customHeaderCell(columns){
|
|
|
|
- console.log(columns)
|
|
|
|
|
|
+ customHeaderCell(columns) {
|
|
|
|
+ console.log(columns)
|
|
},
|
|
},
|
|
|
|
|
|
- tableHandle(){
|
|
|
|
|
|
+ tableHandle() {
|
|
// this.listNum = [...this.columns]
|
|
// this.listNum = [...this.columns]
|
|
- console.log(this.listNum.length,this.columns)
|
|
|
|
-
|
|
|
|
- if(this.listNum.length >= 9|| this.columns.length>=9){
|
|
|
|
- console.log('chugundong')
|
|
|
|
- this.tableWidth=120;
|
|
|
|
- this.scrollX=this.columns.length*130
|
|
|
|
- console.log(this.scrollX)
|
|
|
|
- }else{
|
|
|
|
|
|
+ console.log(this.listNum.length, this.columns)
|
|
|
|
+
|
|
|
|
+ if (this.listNum.length >= 9 || this.columns.length >= 9) {
|
|
|
|
+ this.tableWidth = 120
|
|
|
|
+ this.scrollX = this.columns.length * 120
|
|
|
|
+ console.log(this.scrollX)
|
|
|
|
+ } else {
|
|
this.scrollX = 0
|
|
this.scrollX = 0
|
|
console.log('scroll==0')
|
|
console.log('scroll==0')
|
|
}
|
|
}
|
|
@@ -422,32 +443,29 @@ export default {
|
|
//弹出框确定
|
|
//弹出框确定
|
|
handleOk(e) {
|
|
handleOk(e) {
|
|
this.loading = false
|
|
this.loading = false
|
|
-
|
|
|
|
|
|
+
|
|
this.visible = false
|
|
this.visible = false
|
|
-
|
|
|
|
- if(this.listNum.length>=10){
|
|
|
|
|
|
|
|
- let newlist=this.listNum.slice(columnsFixd.length)
|
|
|
|
|
|
+ if (this.listNum.length >= 10) {
|
|
|
|
+ let newlist = this.listNum.slice(columnsFixd.length)
|
|
console.log(newlist)
|
|
console.log(newlist)
|
|
- this.columns = [...columnsFixd,...newlist]
|
|
|
|
- }else{
|
|
|
|
|
|
+ this.columns = [...columnsFixd, ...newlist]
|
|
|
|
+ } else {
|
|
this.columns = [...this.listNum]
|
|
this.columns = [...this.listNum]
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
|
|
if (this.listNum.length == 4) {
|
|
if (this.listNum.length == 4) {
|
|
// console.log(this.listNum.length)
|
|
// console.log(this.listNum.length)
|
|
- this.scrollX=0
|
|
|
|
|
|
+ this.scrollX = 0
|
|
this.columns.map((item, index) => {
|
|
this.columns.map((item, index) => {
|
|
item.width = 500
|
|
item.width = 500
|
|
})
|
|
})
|
|
// console.log(1)
|
|
// console.log(1)
|
|
} else {
|
|
} else {
|
|
-
|
|
|
|
this.columns.map((item, index) => {
|
|
this.columns.map((item, index) => {
|
|
- if (index == 2||index==0) {
|
|
|
|
|
|
+ if (index == 2 || index == 0) {
|
|
item.width = 150
|
|
item.width = 150
|
|
- } else if (index ==1 || index ==3) {
|
|
|
|
|
|
+ } else if (index == 1 || index == 3) {
|
|
item.width = 100
|
|
item.width = 100
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -458,8 +476,7 @@ export default {
|
|
},
|
|
},
|
|
//弹出框取消按钮
|
|
//弹出框取消按钮
|
|
handleCancel(e) {
|
|
handleCancel(e) {
|
|
- this.visible = false;
|
|
|
|
-
|
|
|
|
|
|
+ this.visible = false
|
|
},
|
|
},
|
|
//弹出框里的搜索框
|
|
//弹出框里的搜索框
|
|
onSearch(value) {
|
|
onSearch(value) {
|
|
@@ -482,43 +499,42 @@ export default {
|
|
//从自定义列拿选择的项
|
|
//从自定义列拿选择的项
|
|
getshowlist(val) {
|
|
getshowlist(val) {
|
|
var arr = []
|
|
var arr = []
|
|
-
|
|
|
|
|
|
+
|
|
// console.log(val)
|
|
// console.log(val)
|
|
if (val.length) {
|
|
if (val.length) {
|
|
- if(val.flag){
|
|
|
|
- let newArr = val.arr
|
|
|
|
- newVal.map((item, index) => {
|
|
|
|
- // if(JSON.stringify(this.listNum).indexOf(JSON.stringify(item))==-1){
|
|
|
|
- // this.listNum.push(item); // 进行动态的操作
|
|
|
|
- // }
|
|
|
|
- var result = this.listNum.some(items => {
|
|
|
|
- if (items.dataIndex == item.dataIndex) {
|
|
|
|
- return true
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- // console.log(result)
|
|
|
|
- if(result){
|
|
|
|
- newArr.splice(index,1)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- this.listNum=[...this.listNum,...newArr]
|
|
|
|
- }else{
|
|
|
|
- //取消全选 清楚listNum中的val里的值
|
|
|
|
- val.arr.map((item, index) => {
|
|
|
|
|
|
+ if (val.flag) {
|
|
|
|
+ let newArr = val.arr
|
|
|
|
+ newVal.map((item, index) => {
|
|
|
|
+ // if(JSON.stringify(this.listNum).indexOf(JSON.stringify(item))==-1){
|
|
|
|
+ // this.listNum.push(item); // 进行动态的操作
|
|
|
|
+ // }
|
|
var result = this.listNum.some(items => {
|
|
var result = this.listNum.some(items => {
|
|
- if (items.dataIndex == item.dataIndex) {
|
|
|
|
- return true
|
|
|
|
- }
|
|
|
|
|
|
+ if (items.dataIndex == item.dataIndex) {
|
|
|
|
+ return true
|
|
|
|
+ }
|
|
})
|
|
})
|
|
|
|
+
|
|
// console.log(result)
|
|
// console.log(result)
|
|
- if(result){
|
|
|
|
- this.listNum.splice(index,1)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+ if (result) {
|
|
|
|
+ newArr.splice(index, 1)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ this.listNum = [...this.listNum, ...newArr]
|
|
|
|
+ } else {
|
|
|
|
+ //取消全选 清楚listNum中的val里的值
|
|
|
|
+ val.arr.map((item, index) => {
|
|
|
|
+ var result = this.listNum.some(items => {
|
|
|
|
+ if (items.dataIndex == item.dataIndex) {
|
|
|
|
+ return true
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ // console.log(result)
|
|
|
|
+ if (result) {
|
|
|
|
+ this.listNum.splice(index, 1)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
arr = this.listNum.filter((item, index) => {
|
|
arr = this.listNum.filter((item, index) => {
|
|
return item.dataIndex == val.dataIndex
|
|
return item.dataIndex == val.dataIndex
|
|
@@ -545,40 +561,38 @@ export default {
|
|
|
|
|
|
moment().format('YYYY-MM-DD_HH:mm')
|
|
moment().format('YYYY-MM-DD_HH:mm')
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
postAction('/toutiao/videoReportDaily/getColumnJson', {
|
|
postAction('/toutiao/videoReportDaily/getColumnJson', {
|
|
- columnType:1,
|
|
|
|
- }).then((res)=>{
|
|
|
|
|
|
+ columnType: 1
|
|
|
|
+ }).then(res => {
|
|
// console.log(res)
|
|
// console.log(res)
|
|
- if(res.success){
|
|
|
|
- // console.log(JSON.parse(res.result))
|
|
|
|
- let columns=JSON.parse(res.result)
|
|
|
|
- if(columns.length){
|
|
|
|
- if(columns.length>=columnsFixd.length){
|
|
|
|
- columns.map((item,index)=>{
|
|
|
|
- if(index>columnsFixd.length-1){
|
|
|
|
- item.sorter=function(a,b){ return a[item.dataIndex]-b[item.dataIndex]}
|
|
|
|
- }})
|
|
|
|
- columns=columns.slice(columnsFixd.length);
|
|
|
|
- this.columns=[...columnsFixd,...columns]
|
|
|
|
|
|
+ if (res.success) {
|
|
|
|
+ // console.log(JSON.parse(res.result))
|
|
|
|
+ let columns = JSON.parse(res.result)
|
|
|
|
+ if (columns.length) {
|
|
|
|
+ if (columns.length >= columnsFixd.length) {
|
|
|
|
+ columns.map((item, index) => {
|
|
|
|
+ if (index > columnsFixd.length - 1) {
|
|
|
|
+ item.sorter = function(a, b) {
|
|
|
|
+ return a[item.dataIndex] - b[item.dataIndex]
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ columns = columns.slice(columnsFixd.length)
|
|
|
|
+ this.columns = [...columnsFixd, ...columns]
|
|
this.tableHandle()
|
|
this.tableHandle()
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // console.log(this.columns)
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
- // console.log(this.columns)
|
|
|
|
}
|
|
}
|
|
- }
|
|
|
|
-
|
|
|
|
})
|
|
})
|
|
},
|
|
},
|
|
deactivated() {
|
|
deactivated() {
|
|
- let arr = JSON.stringify(this.columns)
|
|
|
|
- // console.log(arr)
|
|
|
|
|
|
+ let arr = JSON.stringify(this.columns)
|
|
|
|
+ // console.log(arr)
|
|
postAction('/toutiao/videoReportDaily/saveOrUpdateColumnJson', {
|
|
postAction('/toutiao/videoReportDaily/saveOrUpdateColumnJson', {
|
|
json: arr,
|
|
json: arr,
|
|
columnType: 1
|
|
columnType: 1
|
|
-
|
|
|
|
}).then(res => {
|
|
}).then(res => {
|
|
// console.log(res)
|
|
// console.log(res)
|
|
})
|
|
})
|
|
@@ -594,7 +608,7 @@ export default {
|
|
// return this.timedata[0] + '~' + this.timedata[1]
|
|
// return this.timedata[0] + '~' + this.timedata[1]
|
|
return val
|
|
return val
|
|
},
|
|
},
|
|
- tofixed(val){
|
|
|
|
|
|
+ tofixed(val) {
|
|
return Number(val).toFixed(2)
|
|
return Number(val).toFixed(2)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -602,18 +616,16 @@ export default {
|
|
mounted() {
|
|
mounted() {
|
|
this.columns = [...columnsFixd, ...variableCol]
|
|
this.columns = [...columnsFixd, ...variableCol]
|
|
console.log('mounted')
|
|
console.log('mounted')
|
|
- postAction('/toutiao/videoReportDaily/videoInfoListTotalExportExcelPermission').then((res)=>{
|
|
|
|
|
|
+ postAction('/toutiao/videoReportDaily/videoInfoListTotalExportExcelPermission').then(res => {
|
|
console.log(res)
|
|
console.log(res)
|
|
- if(res.success){
|
|
|
|
- if(res.result){
|
|
|
|
- this.exportExcelIsOk=true
|
|
|
|
- }else{
|
|
|
|
- this.exportExcelIsOk=false
|
|
|
|
- }
|
|
|
|
|
|
+ if (res.success) {
|
|
|
|
+ if (res.result) {
|
|
|
|
+ this.exportExcelIsOk = true
|
|
|
|
+ } else {
|
|
|
|
+ this.exportExcelIsOk = false
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-
|
|
|
|
})
|
|
})
|
|
-
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
@@ -621,16 +633,14 @@ export default {
|
|
.ant-table .ant-table-fixed-left .ant-table-thead {
|
|
.ant-table .ant-table-fixed-left .ant-table-thead {
|
|
height: 108px !important ;
|
|
height: 108px !important ;
|
|
}
|
|
}
|
|
-.ant-table .ant-table-thead .ant-table-header-column .ant-table-column-title{
|
|
|
|
-
|
|
|
|
- // display:block;
|
|
|
|
- white-space:normal;
|
|
|
|
- word-break: break-all;
|
|
|
|
|
|
+.ant-table .ant-table-thead .ant-table-header-column .ant-table-column-title {
|
|
|
|
+ // display:block;
|
|
|
|
+ white-space: normal;
|
|
|
|
+ word-break: break-all;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
-
|
|
|
|
.vsummary {
|
|
.vsummary {
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 100%;
|
|
height: 100%;
|
|
@@ -692,13 +702,13 @@ span {
|
|
top: 5px;
|
|
top: 5px;
|
|
}
|
|
}
|
|
.selectlist {
|
|
.selectlist {
|
|
- width:100%;
|
|
|
|
|
|
+ width: 100%;
|
|
list-style: none;
|
|
list-style: none;
|
|
margin: 0;
|
|
margin: 0;
|
|
height: 450px;
|
|
height: 450px;
|
|
padding: 0 15px 10px;
|
|
padding: 0 15px 10px;
|
|
overflow: auto;
|
|
overflow: auto;
|
|
-
|
|
|
|
|
|
+
|
|
li {
|
|
li {
|
|
width: 100%;
|
|
width: 100%;
|
|
padding: 5px 8px;
|
|
padding: 5px 8px;
|
|
@@ -716,7 +726,7 @@ span {
|
|
// text-overflow:ellipsis;
|
|
// text-overflow:ellipsis;
|
|
// white-space: nowrap;
|
|
// white-space: nowrap;
|
|
}
|
|
}
|
|
- .listText{
|
|
|
|
|
|
+ .listText {
|
|
position: absolute;
|
|
position: absolute;
|
|
top: 2;
|
|
top: 2;
|
|
left: 10;
|
|
left: 10;
|
|
@@ -724,7 +734,6 @@ span {
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
text-overflow: ellipsis;
|
|
-
|
|
|
|
}
|
|
}
|
|
#closeStyle {
|
|
#closeStyle {
|
|
position: absolute;
|
|
position: absolute;
|