소스 검색

提交代码

zhuxinbo 5 년 전
부모
커밋
d3aac060f0

+ 16 - 8
src/views/modules/Statistics/videoStatics/vDay.vue

@@ -49,11 +49,11 @@
           <a-button id="btn" type="link" @click="clearAllList">清空全部</a-button>
           <ul class="selectlist">
             <li v-for="(item,index) in listNum" :key="index">
-              <span v-if=" index <4">
+              <span v-if=" index <5">
                 <a-icon type="lock" />
                 <span class="listText">{{item.title}}</span>
               </span>
-              <span v-else-if=" index >=4">
+              <span v-else-if=" index >=5">
                 <a-icon type="menu" style="color:#ccc" />
                 <span class="listText">{{item.title}}</span>
                 <a-icon
@@ -166,6 +166,13 @@ const columnsFixd = [
     key: 'videoU',
     scopedSlots: { customRender: 'videoU' }
   },
+   {
+    title: '项目名称',
+    dataIndex: 'projectName',
+    align: 'center',
+    width: 100,
+    fixed: 'left'
+  },
   {
     title: '视频ID',
     dataIndex: 'signature',
@@ -446,7 +453,7 @@ export default {
       }
 
       // console.log(this.columns.length)
-      if (this.columns.length == 3) {
+      if (this.columns.length == 4) {
         // console.log(this.listNum.length)
         this.columns.map((item, index) => {
           item.width = 500
@@ -456,7 +463,7 @@ export default {
         this.columns.map((item, index) => {
           if (index == 1||index==2) {
             item.width = 150
-          } else if (index >= 2 && index < 4 || index == 0) {
+          } else if (index >= 2 && index < 5 || index == 0) {
             item.width = 100
           }
         })
@@ -527,8 +534,9 @@ export default {
       // console.log(res)
       if(res.success){
       // console.log(JSON.parse(res.result))
-      let columns=JSON.parse(res.result)
-      if(columns.length){
+      if(res.result){
+        let columns=JSON.parse(res.result)
+        if(columns.length){
            columns.map((item,index)=>{
              if(index>columnsFixd.length-1){
                  item.sorter=function(a,b){  return a[item.dataIndex]-b[item.dataIndex]}
@@ -537,10 +545,10 @@ export default {
             this.columns=[...columnsFixd,...columns]
             this.tableHandle()
         }
-           
-        
         // console.log(this.columns)
       }
+      }
+      
 
     })
   },

+ 31 - 22
src/views/modules/Statistics/videoStatics/vMonth.vue

@@ -51,11 +51,11 @@
           <a-button id="btn" type="link" @click="clearAllList">清空全部</a-button>
           <ul class="selectlist">
             <li v-for="(item,index) in listNum" :key="index">
-              <span v-if=" index <5">
+              <span v-if=" index <6">
                 <a-icon type="lock" />
                 <span class="listText">{{item.title}}</span>
               </span>
-              <span v-else-if=" index >=5">
+              <span v-else-if=" index >=6">
                 <a-icon type="menu" style="color:#ccc" />
                 <span class="listText">{{item.title}}</span>
                 <a-icon
@@ -200,6 +200,13 @@ const columnsFixd = [
     width: 100,
     fixed: 'left'
   },
+   {
+    title: '项目名称',
+    dataIndex: 'projectName',
+    align: 'center',
+    width: 100,
+    fixed: 'left'
+  },
 //   {
 //     title: '视频链接',
 //     dataIndex: 'videoUrl',
@@ -311,24 +318,24 @@ let detailConsum = [
       return obj
     }
   },
-  {
-    title: '视频链接',
-    dataIndex: 'url',
-    align: 'center',
-    width:250,
-    customRender: (value, row, index) => {
-      const obj = {
-        children: value,
-        attrs: {}
-      }
-      if (index === 0) {         
-              obj.attrs.rowSpan = length     
-      } else {
-        obj.attrs.rowSpan = 0
-      }
-      return obj
-    }
-  },
+//   {
+//     title: '视频链接',
+//     dataIndex: 'url',
+//     align: 'center',
+//     width:250,
+//     customRender: (value, row, index) => {
+//       const obj = {
+//         children: value,
+//         attrs: {}
+//       }
+//       if (index === 0) {         
+//               obj.attrs.rowSpan = length     
+//       } else {
+//         obj.attrs.rowSpan = 0
+//       }
+//       return obj
+//     }
+//   },
   {
     title: '时间',
     dataIndex: 'statDatetime',
@@ -601,7 +608,7 @@ export default {
 
       
 
-      if (this.listNum.length == 5) {
+      if (this.listNum.length == 6) {
         this.columns.map((item, index) => {
           item.width = 300
         })
@@ -609,7 +616,7 @@ export default {
         this.columns.map((item, index) => {
           if (index == 1||index==3) {
             item.width = 150
-          } else if (index >= 2 && index < 5 || index == 0) {
+          } else if (index >= 2 && index < 6 || index == 0) {
             item.width = 100
           }
         })
@@ -715,6 +722,7 @@ export default {
       // console.log(res)
       if(res.success){
       // console.log(JSON.parse(res.result))
+      if(res.result){
       let columns=JSON.parse(res.result)
       if(columns.length){
         if(columns.length>=columnsFixd.length){
@@ -730,6 +738,7 @@ export default {
         
         // console.log(this.columns)
       }
+      }
      
       }
 

+ 10 - 3
src/views/modules/Statistics/videoStatics/vSummary.vue

@@ -56,11 +56,11 @@
           <a-button id="btn" type="link" @click="clearAllList">清空全部</a-button>
           <ul class="selectlist">
             <li v-for="(item,index) in listNum" :key="index">
-              <span v-if=" index <3">
+              <span v-if=" index <4">
                 <a-icon type="lock" />
                 <span class="listText">{{item.title}}</span>
               </span>
-              <span v-else-if=" index >=3">
+              <span v-else-if=" index >=4">
                 <a-icon type="menu" style="color:#ccc" />
                 <span class="listText">{{item.title}}</span>
                 <a-icon
@@ -199,6 +199,13 @@ const columnsFixd = [
     fixed: 'left'
   },
   {
+    title: '项目名称',
+    dataIndex: 'projectName',
+    align: 'center',
+    width: 100,
+    fixed: 'left'
+  },
+  {
     title: '视频描述',
     dataIndex: 'materialDesc',
     align: 'center',
@@ -493,7 +500,7 @@ export default {
         this.columns = [...this.listNum]
       }
 
-      if (this.listNum.length == 3) {
+      if (this.listNum.length == 4) {
         // console.log(this.listNum.length)
         this.scrollX = 0
         this.columns.map((item, index) => {

+ 13 - 4
src/views/modules/Statistics/videoStatics/vWeek.vue

@@ -51,11 +51,11 @@
           <a-button id="btn" type="link" @click="clearAllList">清空全部</a-button>
           <ul class="selectlist">
             <li v-for="(item,index) in listNum" :key="index">
-              <span v-if=" index <5">
+              <span v-if=" index <6">
                 <a-icon type="lock" />
                 <span class="listText">{{item.title}}</span>
               </span>
-              <span v-else-if=" index >=5">
+              <span v-else-if=" index >=6">
                 <a-icon type="menu" style="color:#ccc" />
                 <span class="listText">{{item.title}}</span>
                 <a-icon
@@ -200,6 +200,13 @@ const columnsFixd = [
     width: 100,
     fixed: 'left'
   },
+  {
+    title: '项目名称',
+    dataIndex: 'projectName',
+    align: 'center',
+    width: 100,
+    fixed: 'left'
+  },
 //   {
 //     title: '视频链接',
 //     dataIndex: 'url',
@@ -588,7 +595,7 @@ export default {
       }
 
 
-      if (this.listNum.length == 5) {
+      if (this.listNum.length == 6) {
         this.columns.map((item, index) => {
           item.width = 300
         })
@@ -596,7 +603,7 @@ export default {
         this.columns.map((item, index) => {
           if (index == 1||index==3) {
             item.width = 150
-          } else if (index >= 2 && index < 5 || index == 0) {
+          } else if (index >= 2 && index < 6 || index == 0) {
             item.width = 100
           }
         })
@@ -700,6 +707,7 @@ export default {
     }).then((res)=>{
       // console.log(res)
       if(res.success){
+      if(res.result){
       // console.log(JSON.parse(res.result))
       let columns=JSON.parse(res.result)
       if(columns.length){
@@ -717,6 +725,7 @@ export default {
         // console.log(this.columns)
       }
       }
+      }
 
     })
   },