|
@@ -96,6 +96,7 @@
|
|
alt
|
|
alt
|
|
style="width:140px"
|
|
style="width:140px"
|
|
@click="openVideo(records.url)"
|
|
@click="openVideo(records.url)"
|
|
|
|
+ @load="loadShow"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
<span slot="ctr" slot-scope="ctr">{{ ctr | toPercentage }}</span>
|
|
<span slot="ctr" slot-scope="ctr">{{ ctr | toPercentage }}</span>
|
|
@@ -272,10 +273,11 @@ let variableCol = [
|
|
sorter: (a, b) => a.convertRate - b.convertRate
|
|
sorter: (a, b) => a.convertRate - b.convertRate
|
|
}
|
|
}
|
|
]
|
|
]
|
|
-
|
|
|
|
|
|
+let show = 0
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ roleCode: localStorage.getItem('roleCode'),
|
|
//下拉选择框的数据
|
|
//下拉选择框的数据
|
|
projectArr:[],
|
|
projectArr:[],
|
|
selectValue:'',
|
|
selectValue:'',
|
|
@@ -344,7 +346,7 @@ export default {
|
|
//查询按钮
|
|
//查询按钮
|
|
searchRes() {
|
|
searchRes() {
|
|
this.date = []
|
|
this.date = []
|
|
- if(this.appId.length>0){
|
|
|
|
|
|
+ if(this.appId.length>0||this.roleCode=='admin'||this.roleCode=='plane'||this.roleCode=='plan'||this.roleCode=='shot'||this.roleCode=='clip'||this.roleCode=='designTeamLeader'||this.roleCode=='planeLeader'){
|
|
this.HttpPost();
|
|
this.HttpPost();
|
|
}else{
|
|
}else{
|
|
this.$message.error('请选择项目')
|
|
this.$message.error('请选择项目')
|
|
@@ -354,6 +356,7 @@ export default {
|
|
//网络请求table数据函数
|
|
//网络请求table数据函数
|
|
HttpPost(){
|
|
HttpPost(){
|
|
this.loading=true;
|
|
this.loading=true;
|
|
|
|
+ show = 0
|
|
postAction('/toutiao/videoReportDaily/videoInfoListTotal', {
|
|
postAction('/toutiao/videoReportDaily/videoInfoListTotal', {
|
|
startDate: this.timedata[0],
|
|
startDate: this.timedata[0],
|
|
endDate: this.timedata[1],
|
|
endDate: this.timedata[1],
|
|
@@ -364,21 +367,24 @@ export default {
|
|
projectIds:this.appId
|
|
projectIds:this.appId
|
|
}).then(res => {
|
|
}).then(res => {
|
|
let resArr = []
|
|
let resArr = []
|
|
- this.loading = false
|
|
|
|
- console.log(res)
|
|
|
|
|
|
+
|
|
if (res.success) {
|
|
if (res.success) {
|
|
- 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.list.map((item,index)=>{
|
|
|
|
|
|
+ this.data = res.result.list.map((item,index)=>{
|
|
return {
|
|
return {
|
|
...item,
|
|
...item,
|
|
key:index
|
|
key:index
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- this.ipagination.total = result.total
|
|
|
|
|
|
+ this.ipagination.total = res.result.total
|
|
|
|
+ this.loading = false
|
|
|
|
+
|
|
|
|
+ }else{
|
|
|
|
+ this.loading = false
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -500,6 +506,14 @@ export default {
|
|
handleCancel(e) {
|
|
handleCancel(e) {
|
|
this.visible = false
|
|
this.visible = false
|
|
},
|
|
},
|
|
|
|
+ loadShow(){
|
|
|
|
+ show++
|
|
|
|
+ if(this.data.length>0){
|
|
|
|
+ if(show == (this.data.length*2)){
|
|
|
|
+ this.data = [...this.data]
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
//弹出框里的搜索框
|
|
//弹出框里的搜索框
|
|
onSearch(value) {
|
|
onSearch(value) {
|
|
console.log(value)
|
|
console.log(value)
|
|
@@ -579,7 +593,7 @@ export default {
|
|
watch:{
|
|
watch:{
|
|
'ipagination.current':function(n,o){
|
|
'ipagination.current':function(n,o){
|
|
console.log(n,o)
|
|
console.log(n,o)
|
|
- if(this.appId.length>0){
|
|
|
|
|
|
+ if(this.appId.length>0||this.roleCode=='admin'||this.roleCode=='plane'||this.roleCode=='plan'||this.roleCode=='shot'||this.roleCode=='clip'||this.roleCode=='designTeamLeader'||this.roleCode=='planeLeader'){
|
|
this.HttpPost()
|
|
this.HttpPost()
|
|
}
|
|
}
|
|
|
|
|
|
@@ -663,7 +677,11 @@ export default {
|
|
this.dateRange=[moment().subtract(1,'days'),moment()]
|
|
this.dateRange=[moment().subtract(1,'days'),moment()]
|
|
this.timedata=[moment().subtract(1,'days').format('YYYY-MM-DD'),moment().format('YYYY-MM-DD')]
|
|
this.timedata=[moment().subtract(1,'days').format('YYYY-MM-DD'),moment().format('YYYY-MM-DD')]
|
|
// this.loading=true;
|
|
// this.loading=true;
|
|
- // this.HttpPost();
|
|
|
|
|
|
+ if(this.appId.length>0||this.roleCode=='admin'||this.roleCode=='plane'||this.roleCode=='plan'||this.roleCode=='shot'||this.roleCode=='clip'||this.roleCode=='designTeamLeader'||this.roleCode=='planeLeader'){
|
|
|
|
+ this.HttpPost();
|
|
|
|
+ }else{
|
|
|
|
+ this.$message.error('请选择项目')
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|