瀏覽代碼

Merge branch 'master' of http://121.40.40.223:3000/zizhong.wang/Lexus-media

suxinf 4 年之前
父節點
當前提交
39700e5298

+ 1 - 1
src/App.vue

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

+ 2 - 1
src/components/Modal.vue

@@ -363,7 +363,8 @@ export default {
     },
 
     initialData: function () {
-      // this.ziliaoId = this.LinkData.id;
+       this.ziliaoId = this.LinkData.informationId;
+       
       this.mediaTitle = this.LinkData.mediaTitle;
       this.mediaUrl = this.LinkData.mediaUrl;
       this.carS = this.LinkData.carTypeName;

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

@@ -295,6 +295,7 @@ export default {
         url: "/firmsUploadListByAgent",
         method: "post",
         data: {
+          agentId: 254,
           Page: this.currentPage,
           Rows: this.pageSize,
         },
@@ -316,6 +317,7 @@ export default {
         url: "/firmsUploadListByAgent",
         method: "post",
         data: {
+          agentId: 254,
           Page: nowpage,
           Rows: this.pageSize,
         },
@@ -381,6 +383,7 @@ export default {
         download: download,
         Page: 1,
         Rows: this.pageSize,
+        agentId: 254,
       };
       this.newGetDataList(data);
     },

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

@@ -60,8 +60,10 @@
               <span @click="toggleModal2(index)">删除</span>
               <!-- 弹窗: 确定删除? -->
               <deleteModal
+                v-if="showModal2"
                 @dataDel="toDel"
                 @hide_modal="closeme2"
+                :LinkData="modalData"
                 :showModalFlag="showModal2"
                 :chooseItemIndex="nowIndex"
               ></deleteModal>
@@ -96,7 +98,6 @@
             name="fileName"
             id="fileInput"
             multiple
-            accept=".xlsx, .xls"
         /></label>
         <!-- <button @click="toggleModal4()">导出</button> <input
             type="file"
@@ -296,11 +297,13 @@ export default {
     closeme: function () {
       this.showModal = !this.showModal;
     },
+    //删除
     toggleModal2: function (i) {
       this.showModal2 = !this.showModal2;
       this.nowIndex = i;
       this.modalData = this.tableData[i];
       console.log("INtoggleModal2", this.modalData, this.nowIndex);
+
     },
     closeme2: function () {
       this.showModal2 = !this.showModal2;
@@ -334,20 +337,20 @@ export default {
     },
 
     toDel: function (n) {
-      // console.log("inToDel:", n);
+       console.log("inToDel:", n);
       //清空数据
-      if (n == -2) {
+     /*  if (n == -2) {
         this.tableData = "";
       }
       //清空某一项数据
       {
         let obj = this.tableData[n];
-        // console.log(obj);
         Object.keys(obj).forEach((key) => {
           obj[key] = "";
         });
-      }
+      } */
       this.showModal2 = !this.showModal2;
+      this.choosePlatform();
     },
     /* 表格翻页 */
     changePage: function (page) {
@@ -409,14 +412,14 @@ export default {
         });
     },
     //导入经销商反馈信息  经销商反馈服务>导入经销商反馈信息
-    importDataList: function () {
+    /*   importDataList: function () {
       this.file = event.target.files;
       this.fileDes = [];
       this.file.forEach((item) => {
         this.fileDes.push(item.name);
       });
 
-      /*  this.$http({
+        this.$http({
         url: "/importDealerFeedback",
         method: "post",
         data: {},
@@ -428,8 +431,8 @@ export default {
         })
         .catch((err) => {
           console.log(err);
-        });*/
-    },
+        }); 
+    }, */
     //导出excel
     onOutputExcel: function () {
       this.$http({
@@ -450,7 +453,7 @@ export default {
         });
     },
     //导入excel
-    onImportExcel: function () {
+    /*   onImportExcel: function () {
       this.$http({
         url: "/importDealerFeedback",
         method: "get",
@@ -465,7 +468,7 @@ export default {
         .catch((err) => {
           console.log(err);
         });
-    },
+    }, */
     // 获取文件
     getFileInfo: function (event) {
       this.file = event.target.files;
@@ -480,14 +483,18 @@ export default {
     // 导入接口
     submitRequest: function () {
       let paramData = new FormData();
-      paramData.append("file", this.file);
+      //paramData.append("file", this.file);
+      this.file.forEach((item)=>{
+          paramData.append("file", item);
+      })
+      console.log(this.file);
       this.$http
         .uploadFile("/importDealerFeedback", paramData)
         .then((res) => {
           if (res.data && res.data.code === 200) {
             console.log("上传成功!");
           } else {
-            alert("上传失败,请重试");
+            alert("上传失败,res.data || res.data.code !== 200");
             console.log(res);
           }
         })
@@ -523,7 +530,7 @@ export default {
         return item.platformName === val;
       });
       this.selectedPlatform = val;
-      this.selectedPlatformId=obj.id;
+      this.selectedPlatformId = obj.id;
       //获取可发布数量
       this.getReleaseQuantity(obj.id);
 
@@ -540,19 +547,20 @@ export default {
       let y = date.getFullYear();
       let d = y + "/" + m;
       this.$http({
-        url: "/base/mediaPublishManager/selectMediaPublishList",
+        // url: "/base/mediaPublishManager/selectMediaPublishList",
+        url: "/base/mediaPublishManager/selectMediaPublishListByMonth",
         method: "post",
         data: {
-          //publishPlatformId: val,
-          //publishMonth: d,
-          id: val,
-          month: d,
+          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;
+            this.publishCount = res.data.data[0].publishCount;
             let len = this.publishCount;
             let l = this.tableData.length;
             console.log("获取可发布数量", len, l);
@@ -632,7 +640,7 @@ export default {
       }); */
     },
     //导入
-    importFile: function () {
+    /*   importFile: function () {
       this.$http({
         url: "/importDealerFeedback",
         method: "get",
@@ -647,9 +655,9 @@ export default {
         .catch((err) => {
           console.log(err);
         });
-    },
+    }, */
     //导出
- /*    outputFile: function () {
+    /*    outputFile: function () {
       this.$http({
         url: "/exportNoFactory",
         method: "get",

+ 8 - 9
src/views/data/components/InfoListItemDetail.vue

@@ -96,18 +96,17 @@ export default {
   methods: {
     // 下载附件
     downloadFile: function (index) {
-      let config = {
+      /* let config = {
         informationId: this.fileData[index].informationId,
         fileId: this.fileData[index].id,
-      };
-
-      let url =
-        this.onlineUrl +
-        "/selectInformationFileList?informationId=" +
-        config.informationId; //+
-      /* "&" +
+      }; */
+      let config =
+        "informationId=" +
+        this.fileData[index].informationId +
+        "&" +
         "fileId=" +
-        config.fileId; */
+        this.fileData[index].id;
+      let url = this.onlineUrl + "/dealerDownload?" + config;
       console.log("下载附件:", config, url);
       window.open(url);
       /* 

+ 35 - 5
src/views/data/components/UploadLinkModalDelete.vue

@@ -23,12 +23,19 @@ export default {
     },
     chooseItemIndex: {
       type: Number,
-      default: 0
+      default: 0,
+    },
+    LinkData: {
+      type: Object,
+      default: () => {
+        return {};
+      },
     },
   },
   data() {
     return {
-      itemIndex:0,
+      itemIndex: 0,
+      deleteId: 0,
     };
   },
   methods: {
@@ -36,11 +43,34 @@ export default {
       this.$emit("hide_modal");
     },
     sonDataDel: function () {
-      this.itemIndex=this.chooseItemIndex;
-      this.$emit("dataDel",this.itemIndex);
+      this.itemIndex = this.chooseItemIndex;
+      this.$emit("dataDel", this.itemIndex);
+
+      this.$http({
+        url: "/deleteAccountReportRecordInfo",
+        method: "post",
+        data: {
+          id: this.deleteId,
+        },
+      })
+        .then((res) => {
+          console.log("已删除", res);
+        })
+        .catch((err) => {
+          console.log(err);
+        });
     },
+    initial: function () {
+      this.deleteId=this.LinkData.id;
+      console.log(this.LinkData)
+    }
+  },
+  mounted() {
+    this.initial();
   },
-  mounted() {},
+ /*  created() {
+    console.log(this.LinkData)
+  } */
 };
 </script>