liuYb il y a 4 ans
Parent
commit
c572b13fd1

+ 14 - 10
src/components/Modal.vue

@@ -75,7 +75,7 @@
         <div class="bodyRow">
           <div class="contentCol1">
             <span>内容分类1</span
-            ><select name="" id="" v-model="contentName1" >
+            ><select name="" id="" v-model="contentName1">
               <option
                 v-for="(item, index) in content1"
                 :key="index"
@@ -101,7 +101,6 @@
         <div class="bodyRow">
           <span>标题</span>
           <input type="text" placeholder="文章标题" v-model="mediaTitle" />
-          <!--     <span>{{LinkData}}</span> -->
         </div>
         <div class="bodyRow">
           <span>链接</span>
@@ -124,9 +123,9 @@ export default {
   name: "Modal",
   props: {
     LinkData: {
-      type: Array,
+      type: Object,
       default: () => {
-        return [];
+        return {};
       },
     },
     selectedPlatform: {
@@ -135,7 +134,7 @@ export default {
         return "";
       },
     },
-  /*   sonPlatformId: {
+    /*   sonPlatformId: {
       type: String,
       default: () => {
         return "";
@@ -155,7 +154,7 @@ export default {
       carType: [],
       content1: [],
       content2: [],
-      // releasePlate: [],
+      // releasePlate: [],this.LinkData.carTypeName
 
       carS: "",
       carT: "",
@@ -177,13 +176,15 @@ export default {
       ziliaoTime: "",
       contentName1: "",
       contentName2: "",
+
     };
   },
   methods: {
     closeSelf() {
       this.$emit("closeme");
+       console.log(this.LinkData);
     },
-   /*  getAllFileInfo: function () {
+    /*  getAllFileInfo: function () {
       let obj = {};
       //获取资料名
       obj = this.dataName.find(function (item) {
@@ -233,7 +234,7 @@ export default {
       let date = new Date();
       let m = date.getMonth() + 1;
       let y = date.getFullYear();
-      let d = y + '/' + m;
+      let d = y + "/" + m;
       let config = {
         url: "/dealerFeedback",
         data: {
@@ -246,13 +247,13 @@ export default {
           carType: this.carT,
           releasePlate: this.selectedPlatform,
           releaseMedia: this.releaseP,
-          draftGenre:  this.contentName1,
+          draftGenre: this.contentName1,
           contentClass: this.contentName1,
           articleTitle: this.mediaTitle,
           articleLink: this.mediaUrl,
         },
       };
-    //  console.log("edit2:", config);
+      //  console.log("edit2:", config);
       this.$emit("update", config);
     },
     //资料名称列表
@@ -403,6 +404,8 @@ export default {
           console.log(err);
         });
     },
+
+
   },
   mounted() {
     this.chooseDataName();
@@ -410,6 +413,7 @@ export default {
     this.firstContent1Classify();
     this.firstContent2Classify();
     //this.chooseReleasePlate();
+
   },
 };
 </script>

+ 36 - 11
src/views/account/AccountManage.vue

@@ -12,7 +12,12 @@
           </tr>
         </thead>
         <tbody>
-          <tr class="tbodyStyle" v-for="(obj, index) in tableData" :key="index" :class="{table_gray: index%2===0}">
+          <tr
+            class="tbodyStyle"
+            v-for="(obj, index) in tableData"
+            :key="index"
+            :class="{ table_gray: index % 2 === 0 }"
+          >
             <td>{{ obj.dlrName }}</td>
             <td>{{ obj.accountId }}</td>
             <td>{{ "是否认证" }}</td>
@@ -23,9 +28,9 @@
             </td>
           </tr>
         </tbody>
-          <td class="img" v-show="imgFlag">
-              <img src="" alt="aa" />
-            </td>
+        <td class="img" v-show="imgFlag">
+          <img src="" alt="aa" />
+        </td>
       </table>
       <div class="footerTip">
         <p>*编辑平台账号信息时,请按照示例提示填写账号ID</p>
@@ -110,9 +115,28 @@ export default {
     };
   },
   methods: {
+    addDataList: function (val) {
+      console.log(val);
+      this.$http({
+        url: "/sys/mediaAccount/addMediaAccountInfo",
+        method: "post",
+        data: {},
+      })
+        .then((res) => {
+          console.log(res);
+          if (res.data.code === 200) {
+            //  this.tableData = res.data.data;
+          }
+        })
+        .catch((err) => {
+          console.log(err);
+        });
+    },
     editForm: (account, fansNum, flag, editData) => {
       console.log(account, fansNum, flag, editData);
-      alert("编辑");
+      //alert("编辑");
+      this.addDataList(editData);
+      //添加修改后的信息
     },
     toggleModal: function (i) {
       this.editData = this.tableData[i];
@@ -130,7 +154,8 @@ export default {
     //获取资料列表--分页查询每个经销商账号信息
     getDataList: function () {
       this.$http({
-        url: "/sys/mediaAccount/selectMediaAccountPage",
+        //url: "/sys/mediaAccount/selectMediaAccountPage",
+        url: "/sys/mediaAccount/addMediaAccountInfo",
         method: "post",
         data: {},
       })
@@ -146,7 +171,7 @@ export default {
     },
   },
   mounted() {
-    this.getDataList();
+    //this.getDataList();
   },
 };
 </script>
@@ -163,7 +188,7 @@ export default {
     width: 200px;
     height: 300px;
     z-index: 999;
-    img{
+    img {
       height: 100%;
       width: 100%;
     }
@@ -200,13 +225,13 @@ export default {
   margin: 16px;
   margin-left: 0px;
 }
-.footerTip{
-  p{
+.footerTip {
+  p {
     color: red;
     text-align: right;
   }
 }
 .table_gray {
-    background: #f5f5f5
+  background: #f5f5f5;
 }
 </style>

+ 1 - 1
src/views/account/components/Modal2.vue

@@ -102,7 +102,7 @@ export default {
       if (this.fansNum <= 0) {
         alert('粉丝数必须大于0!');
         return
-      } 
+      }
       if (this.flag === '请选择') {
         alert('请选择是否认证');
         return

+ 34 - 7
src/views/data/UploadLink.vue

@@ -74,7 +74,7 @@
     <Modal
       v-show="showModal"
       v-on:closeme="closeme"
-      :Linkdata="modalData"
+      :LinkData="modalData"
       @update="editTitle"
       :selectedPlatform="selectedPlatform"
       :releasePlate="releasePlate"
@@ -171,7 +171,7 @@ export default {
       publishCount: "",
       platform: [],
       platformVal: "",
-      
+
       releasePlate: [],
       selectedPlatform: "",
       nowIndex: 0,
@@ -251,6 +251,25 @@ export default {
         },
       ],
       modalData: {}, //17:44
+      emptyData: {
+        accountId: "",
+        carPlatformName: "",
+        carTypeName: "",
+        contentTypeName: "",
+        endTime: null,
+        id: "",
+        informationId: "",
+        localArea: "",
+        mediaTitle: null,
+        mediaTypeName: "",
+        mediaUrl: "",
+        projectTypeName: "",
+        publishDate: "",
+        publishPlatformName: "",
+        publishSourceName: "",
+        queryParams: null,
+        startTime: null,
+      },
     };
   },
   computed: {
@@ -355,7 +374,7 @@ export default {
       let date = new Date();
       let m = date.getMonth() + 1;
       let y = date.getFullYear();
-      let d = y + '/' + m;
+      let d = y + "/" + m;
       this.$http({
         url: "/firmsLinkUpload",
         method: "post",
@@ -370,9 +389,10 @@ export default {
             let data = res.data.data;
             //this.tableData.push(data[0]);
             Array.prototype.push.apply(this.tableData, data);
+            console.log(res.data.data);
           }
-          console.log("uploadLink this.tableData:", this.tableData);
-          console.log(res.data.data)
+          //console.log("uploadLink this.tableData:", this.tableData);
+          //console.log(res.data.data)
         })
         .catch((err) => {
           console.log(err);
@@ -488,25 +508,32 @@ export default {
       let date = new Date();
       let m = date.getMonth() + 1;
       let y = date.getFullYear();
-      let d = y + '/' + m;
+      let d = y + "/" + m;
       this.$http({
         url: "/base/mediaPublishManager/selectMediaPublishList",
         method: "post",
         data: {
+          //publishPlatformId: val,
+          //publishMonth: d,
           id: val,
           month: d,
         },
       })
         .then((res) => {
           if (res.data.code === 200) {
+            console.log(res)
             this.publishCount = res.data.data[1].publishCount;
             let len = this.publishCount;
             let l = this.tableData.length;
             console.log("获取可发布数量", len, l);
+            
             while (len > l) {
-              this.tableData.push([]);
+              //this.tableData.push([]);
+              Array.prototype.push.apply(this.tableData, [this.emptyData]);
               len--;
             }
+            console.log(this.tableData);
+            console.log(this.tableData.length);
           }
         })
         .catch((err) => {