Przeglądaj źródła

经销商链接上传 新增

liuYb 4 lat temu
rodzic
commit
87020ec256
3 zmienionych plików z 33 dodań i 12 usunięć
  1. 1 1
      src/App.vue
  2. 26 9
      src/components/Modal.vue
  3. 6 2
      src/views/data/InforList.vue

+ 1 - 1
src/App.vue

@@ -38,7 +38,7 @@ export default {
     return {
       navTitle1: ' > 数据管理',
       navTitle2: '',
-      isManufacturer: 'distributor', // distributor 经销商 manufacturer 厂商
+      isManufacturer: 'manufacturer', // distributor 经销商 manufacturer 厂商
       userAccount: ''
     }
   },

+ 26 - 9
src/components/Modal.vue

@@ -200,9 +200,13 @@ export default {
       let m = date.getMonth() + 1;
       let y = date.getFullYear();
       let d = y + "/" + m;
+
       let config = {
-        url: "/dealerFeedback",
+        //url: "/dealerFeedback",
+       // url: "/updateDealerFeedback",
+        url: "",
         data: {
+          id: '', //主键值
           month: d,
           dealerId: "254",
           dataId: this.ziliaoId,
@@ -213,13 +217,23 @@ export default {
           releasePlate: this.selectedPlatform,
           releaseMedia: this.releaseP,
           draftGenre: this.contentName1,
-          
+
           //内容分类2?
           contentClass: this.contentName2,
           articleTitle: this.mediaTitle,
           articleLink: this.mediaUrl,
         },
       };
+
+      console.log("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", this.LinkData.id);
+      if (this.LinkData.id) {
+        config.url = "/updateDealerFeedback";
+        config.data.id=this.LinkData.id
+        console.log(config.url);
+      }else{
+        config.url = "/dealerFeedback"
+      }
+
       //console.log("edit2:", this.releaseP);
       this.$emit("update", config);
       this.$emit("closeme");
@@ -230,7 +244,10 @@ export default {
         url: "/firmsUploadListByAgent",
         //url: "/firmsLinkUpload",
         method: "post",
-        data: {},
+        data: {
+          downLoad: true,
+          report: false,
+        },
       })
         .then((res) => {
           if (res.data.code === 200) {
@@ -395,13 +412,13 @@ export default {
     testUrl: function () {
       var regex = /^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- ./?%&=]*)?$/;
       let flag = regex.test(this.mediaUrl);
-      console.log(flag,regex)
-      if(flag){
-          this.edit()
-      }else{
-        alert("链接输入有误!\n示例:https://www.baidu.com")
+      console.log(flag, regex);
+      if (flag) {
+        this.edit();
+      } else {
+        alert("链接输入有误!\n示例:https://www.baidu.com");
       }
-    }
+    },
   },
   mounted() {
     this.chooseDataName();

+ 6 - 2
src/views/data/InforList.vue

@@ -73,7 +73,8 @@
                 <td>{{ obj.report === "1" ? "已反馈" : "未反馈" }}</td>
 
                 <td v-if="operation" :style="trStyle" class="operationStyle">
-                  <span style="cursor:pointer"
+                  <span
+                    style="cursor: pointer"
                     v-for="(operationObj, i) in operation"
                     :key="i"
                     @click="
@@ -148,6 +149,7 @@ export default {
               url: "/dealerDownload",
               data: {
                 informationId: obj.id,
+                agentId: this.userId,
               },
             };
             this.downloadPost(config, obj);
@@ -241,7 +243,9 @@ export default {
       let url =
         this.onlineUrl +
         "/dealerDownload?informationId=" +
-        config.data.informationId;
+        config.data.informationId +
+        "&agentId=" +
+        config.data.agentId;
       window.open(url);
 
       let data = {