소스 검색

接口调整,其他细节处理

liuYb 4 년 전
부모
커밋
915142d4c0
2개의 변경된 파일33개의 추가작업 그리고 26개의 파일을 삭제
  1. 3 3
      src/views/data/InforList.vue
  2. 30 23
      src/views/data/UploadLink.vue

+ 3 - 3
src/views/data/InforList.vue

@@ -309,7 +309,7 @@ export default {
             for (let i = 0; i < len; i++) {
               let newValue = "";
               let temp = this.tableData[i].filePulishTime;
-              if (this.tableData[0].filePulishTime.length >= 7) {
+              if (this.tableData[0].filePulishTime.length!=null&&this.tableData[0].filePulishTime.length >= 7) {
                 newValue = temp.slice(0, 4) + "/" + temp.slice(5, 7); //+ "/" + temp.slice(8,10)
                 this.$set(this.tableData[i], "filePulishTime", newValue);
               }
@@ -356,7 +356,7 @@ export default {
             for (let i = 0; i < len; i++) {
               let newValue = "";
               let temp = this.tableData[i].filePulishTime;
-              if (this.tableData[0].filePulishTime.length >= 7) {
+              if (this.tableData[0].filePulishTime.length!=null&&this.tableData[0].filePulishTime.length >= 7) {
                 newValue = temp.slice(0, 4) + "/" + temp.slice(5, 7); //+ "/" + temp.slice(8,10)
                 this.$set(this.tableData[i], "filePulishTime", newValue);
               }
@@ -401,7 +401,7 @@ export default {
             for (let i = 0; i < len; i++) {
               let newValue = "";
               let temp = this.tableData[i].filePulishTime;
-              if (this.tableData[0].filePulishTime.length >= 7) {
+              if (this.tableData[0].filePulishTime.length!=null&&this.tableData[0].filePulishTime.length >= 7) {
                 newValue = temp.slice(0, 4) + "/" + temp.slice(5, 7); //+ "/" + temp.slice(8,10)
                 this.$set(this.tableData[i], "filePulishTime", newValue);
               }

+ 30 - 23
src/views/data/UploadLink.vue

@@ -42,18 +42,18 @@
               <!-- 资料名称 -->
 
               <td>{{ obj.informationName }}</td>
-              <!-- 发布渠道 -->
+              <!-- 发布渠道 未定-->
 
               <td>{{ obj.publishSourceName }}</td>
               <!-- 平台板块 发布版块-->
 
-              <td>{{ obj.informationName }}</td>
+              <td>{{ obj.readCount }}</td>
               <!-- 阅读量 -->
-              <td>{{ obj.informationName }}</td>
+              <td>{{ obj.goodCount }}</td>
               <!-- 点赞 -->
-              <td>{{ obj.informationName }}</td>
+              <td>{{ obj.bbsCount }}</td>
               <!-- 评论 -->
-              <td>{{ obj.informationName }}</td>
+              <td>{{ obj.lookingCount }}</td>
               <!-- 在看/转发 -->
 
               <!--  <td>{{ obj.carTypeName }}</td> -->
@@ -68,8 +68,8 @@
               <td>{{ obj.carPlatformName }}</td>
               <!-- 车型 -->
               <td>{{ obj.informationName }}</td>
-              <!-- 反馈状态 -->
-              <td>{{ obj.informationName }}</td>
+              <!-- 反馈状态  未定-->
+              <td>{{ obj.endDate }}</td>
               <!-- 反馈截止日期 -->
               <td>{{ obj.mediaTitle }}</td>
               <!-- 稿件标题 -->
@@ -147,13 +147,11 @@
       </div>
 
       <!-- 弹窗: 上传链接超过剩余限制数量,请修改后重新导入 -->
-     <!--  是否将已反馈数据进行替换? -->
+      <!--  是否将已反馈数据进行替换? -->
       <div class="modal-backdrop" v-show="showModal3">
         <div class="modal">
           <div class="modal-body">
-            <div class="bodyRow">
-              是否将已反馈数据进行替换?
-            </div>
+            <div class="bodyRow">是否将已反馈数据进行替换?</div>
           </div>
           <div class="modal-footer">
             <button type="button" class="btn-confirm" @click="closeme3()">
@@ -246,7 +244,7 @@ export default {
         "操作",
       ],
       tableData: [
-         {
+        {
           informationId: "2021/03/04",
           publishDate: "雷克萨斯ES上市",
           carTypeName: "雷克萨斯ES",
@@ -378,12 +376,13 @@ export default {
       let m = date.getMonth() + 1;
       let y = date.getFullYear();
       let d = y + "/" + m;
+      console.log(config, d);
       this.$http({
         url: "/firmsLinkUpload",
         method: "post",
         data: {
-          month: d,
-          publishPlatformId: config,
+          // month: d,
+          // publishPlatformId: config,
         },
       })
         .then((res) => {
@@ -391,21 +390,26 @@ export default {
             //this.tableData = [];
             let data = res.data.data;
             this.firmsDataCount = data.length;
-            for (
+            /* for (
               let i = 0, j = 0;
               i < this.tableData.length && j < data.length;
               i++, j++
             ) {
               this.$set(this.tableData, i, data[j]);
+            } */
+            for (let i = 0, j = 0; j < data.length; i++, j++) {
+              this.$set(this.tableData, i, data[j]);
             }
-            console.log(this.tableData);
+               console.log(this.tableData);
             //修改素材时间显示格式
-            console.log(this.tableData[0].publishDate);
             let len = this.tableData.length;
             for (let i = 0; i < len; i++) {
               let newValue = "";
               let temp = this.tableData[i].publishDate;
-              if (this.tableData[i].publishDate.length >= 10) {
+              if (
+                this.tableData[i].publishDate != null &&
+                this.tableData[i].publishDate.length >= 10
+              ) {
                 newValue =
                   temp.slice(0, 4) +
                   "/" +
@@ -413,9 +417,11 @@ export default {
                   "/" +
                   temp.slice(8, 10);
                 this.$set(this.tableData[i], "publishDate", newValue);
+              } else {
+                this.$set(this.tableData[i], "publishDate", newValue);
               }
             }
-            console.log(this.tableData);
+            //   console.log(this.tableData);
           }
         })
         .catch((err) => {
@@ -518,7 +524,7 @@ export default {
       this.selectedPlatformId = obj.id;
 
       //获取可发布数量
-      this.getReleaseQuantity(obj.id);
+    //  this.getReleaseQuantity(obj.id);
 
       //获取发布版块
       this.chooseReleasePlate(obj.id);
@@ -648,8 +654,8 @@ export default {
       });
     },
     isFather: function () {
-      console.log("isfffffff",this.$route.path.length)
-      return this.$route.path.length > 11 ? false: true;
+      console.log("isfffffff", this.$route.path.length);
+      return this.$route.path.length > 11 ? false : true;
     },
   },
   mounted() {
@@ -661,7 +667,8 @@ export default {
       console.log("经销商ID 254");
       this.userId = 254;
     }
-    this.getPlatform();
+   // this.getPlatform();
+   this.getDataList();
   },
   created() {
     this.selectSysDataDictList()