浏览代码

问题修改

suxinf 4 年之前
父节点
当前提交
3fa1bd15ab

+ 2 - 2
src/App.vue

@@ -118,8 +118,8 @@ export default {
         localStorage.clear();
         let query = this.$route.query || {};
         sessionStorage.setItem("setToken", query.token);
-        // this.userToken = query.token || '';
-        this.userToken = query.token || 'dXNlcklkPTEwMDEmYWNjb3VudD1MMDIxMF9NTSZmcm9tPXNpd2VpJnRpbWVzdGFtcD0xNjE4NTU2MTQ4JnNpZ249MWI3MmIwODkzNmZhNDdmMDU5MDRiNDc3N2FkOTdkMTI==';
+        this.userToken = query.token || '';
+        // this.userToken = query.token || 'dXNlcklkPTEwMDEmYWNjb3VudD1MMDIxMF9NTSZmcm9tPXNpd2VpJnRpbWVzdGFtcD0xNjE4NTU2MTQ4JnNpZ249MWI3MmIwODkzNmZhNDdmMDU5MDRiNDc3N2FkOTdkMTI==';
         console.log("token:", this.userToken);
         this.getTokenRequest();
       }

+ 21 - 32
src/components/Modal.vue

@@ -2,7 +2,7 @@
   <div class="modal-backdrop">
     <div class="modal">
       <div class="modal-header">
-        <span>编辑</span>
+        <span>{{ modalTitle }}</span>
       </div>
       <div class="modal-body">
         <div class="bodyRow">
@@ -53,16 +53,21 @@
             </select>
           </div>
           <div class="contentCol2">
-            <span>平台版块</span
-            ><select name="" id="" v-model="releaseP">
-              <option
-                v-for="(item, index) in releasePlate"
-                :key="index"
-                :value="item.platformName"
-              >
-                {{ item.platformName }}
-              </option>
-            </select>
+            <span>平台版块</span>
+            <div v-if="releaseC !== '其它'">
+              <select name="" id="" v-model="releaseP">
+                <option
+                  v-for="(item, index) in releasePlate"
+                  :key="index"
+                  :value="item.platformName"
+                >
+                  {{ item.platformName }}
+                </option>
+              </select>
+            </div>
+            <div v-else>
+              <input type="text" v-model="releaseP">
+            </div>
           </div>
         </div>
         <div class="bodyRow">
@@ -150,6 +155,10 @@ export default {
       type: String,
       default: "",
     },
+    modalTitle: {
+      type: String,
+      default: "编辑",
+    }
   },
   data() {
     return {
@@ -207,9 +216,7 @@ export default {
       } else {
         month = month + "";
       }
-      //this.localMonth = year + "-" + month;
       this.localDay = year + "-" + month + "-" + day;
-      console.log(this.localDay);
     },
     edit: function () {
       let obj = {};
@@ -233,7 +240,6 @@ export default {
       let m = date.getMonth() + 1;
       let y = date.getFullYear();
       let d = y + "/" + m;
-console.log(this.ziliaoId)
       let config = {
         url: "",
         data: {
@@ -241,7 +247,6 @@ console.log(this.ziliaoId)
           month: d,
           dealerId: this.userId,
           dataId: this.ziliaoId,
-          //dataId: "1386025423408103425",
           informationName: this.ziliaoName,
           releaseTime: this.ziliaoTime,
           carService: this.carS,
@@ -270,11 +275,9 @@ console.log(this.ziliaoId)
         //编辑
         config.url = "/updateDealerFeedback";
         config.data.id = this.LinkData.id;
-        console.log(config.url);
       } else {
         //新增
         config.url = "/dealerFeedback";
-        console.log("新增", 222);
       }
 
       this.$emit("update", config);
@@ -294,7 +297,6 @@ console.log(this.ziliaoId)
         .then((res) => {
           if (res.data.code === 200) {
             this.dataName = res.data.data;
-            console.log(this.dataName);
             //获取资料名
             let obj = {};
             let idVal = this.ziliaoId;
@@ -316,7 +318,6 @@ console.log(this.ziliaoId)
         data: {},
       })
         .then((res) => {
-          console.log(res, 2222222222222222);
           if (res.data.code === 200) {
             this.carType = res.data.data;
             this.chooseCarType();
@@ -335,14 +336,13 @@ console.log(this.ziliaoId)
       obj = this.carSeries.find(function (item) {
         return item.typeName === nameCarS;
       });
-      console.log(this.carSeries, obj);
       this.carTypeId = obj.id;
 
       this.$http({
         url: "/base/carTypeManager/selectCarTypeList",
         method: "post",
         data: {
-          parentId: this.carTypeId || -1,
+          parentId: this.carTypeId || '-',
         },
       })
         .then((res) => {
@@ -370,7 +370,6 @@ console.log(this.ziliaoId)
             this.content1Id = res.data.data[0].id;
             this.secondContent1Classify();
           }
-          console.log("contentClassify1", res.data.data[0].id);
         })
         .catch((err) => {
           console.log(err);
@@ -388,7 +387,6 @@ console.log(this.ziliaoId)
           if (res.data.code === 200) {
             this.content1 = res.data.data;
           }
-          console.log("second contentClassify1", res.data.data);
         })
         .catch((err) => {
           console.log(err);
@@ -408,7 +406,6 @@ console.log(this.ziliaoId)
             this.content2Id = res.data.data[0].id;
             this.secondContent2Classify();
           }
-          console.log("contentClassify2", res.data.data[0].id);
         })
         .catch((err) => {
           console.log(err);
@@ -426,7 +423,6 @@ console.log(this.ziliaoId)
           if (res.data.code === 200) {
             this.content2 = res.data.data;
           }
-          console.log("second contentClassify2", res.data.data);
         })
         .catch((err) => {
           console.log(err);
@@ -434,7 +430,6 @@ console.log(this.ziliaoId)
     },
 
     initialData: function () {
-      console.log(this.fileName, this.$route.query.informationName);
       this.ziliaoName = this.fileName;
       if(this.LinkData.informationId) this.ziliaoId = this.LinkData.informationId;
       else{
@@ -473,7 +468,6 @@ console.log(this.ziliaoId)
     testUrl: function () {
       var regex = /^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- ./?%&=]*)?$/;
       let flag = regex.test(this.mediaUrl);
-      // console.log(flag, regex);
       if (flag) {
         if (flag) {
           this.edit();
@@ -505,7 +499,6 @@ this.readCount&&this.goodCount&&  this.bbsCount&& this.lookingCount */
             obj = this.releaseChannel.find(function (item) {
               return item.platformName === val;
             });
-            console.log(this.releaseC, obj);
             //传当前渠道 id,  获取发布版块列表
             this.chooseReleasePlate(obj.id);
           }
@@ -524,10 +517,8 @@ this.readCount&&this.goodCount&&  this.bbsCount&& this.lookingCount */
         },
       })
         .then((res) => {
-          console.log(res);
           if (res.data.code === 200) {
             this.releasePlate = res.data.data;
-            console.log("发布版块", this.releasePlate);
           }
         })
         .catch((err) => {
@@ -538,10 +529,8 @@ this.readCount&&this.goodCount&&  this.bbsCount&& this.lookingCount */
   mounted() {
     let localUserId = localStorage.getItem("userId");
     if (localUserId) {
-      console.log("经销商ID", localUserId);
       this.userId = localUserId;
     } else {
-      console.log("经销商ID '-");
       this.userId = "";
     }
     this.getLocalMonth();

+ 31 - 35
src/views/data/InforList.vue

@@ -178,7 +178,7 @@ export default {
                 agentId: this.userId,
               },
             };
-            this.downloadPost(config, obj);
+            this.downloadPost(config);
           },
         },
         {
@@ -213,6 +213,7 @@ export default {
       userId: localStorage.getItem("userId") || '',
       endDate: "",
       localReport: "",
+      downLoadFlag: false // 下载以后刷新页面
     };
   },
   computed: {
@@ -224,9 +225,7 @@ export default {
       return this.$route.query && this.$route.query.tag ? true : false;
     },
     showItemOperation: function () {
-      console.log(this.localReport);
       if (!this.localReport) {
-        console.log(this.localReport);
         return { showItemOperationStyle: false };
       } else {
         return { showItemOperationStyle: true };
@@ -245,6 +244,30 @@ export default {
       } */
     },
   },
+  watch: {
+    downLoadFlag:function (newValue) {
+      if(newValue) {
+        setTimeout (() => {
+          let data = {
+            informationName: this.searchName,
+            asc: this.timeSortVal == "dec" ? false : true,
+            report: "",
+            download: "",
+            Page: this.currentPage,
+            Rows: this.pageSize,
+            agentId: this.userId,
+          };
+          if (this.reportSortVal) {
+            data.report = this.reportSortVal === "already" ? true : false;
+          }
+          if (this.downloadSortVal) {
+            data.download = this.downloadSortVal === "already" ? true : false;
+          }
+          this.newGetDataList(data);
+        }, 1000)
+      }
+    }
+  },  
   methods: {
     download: function () {
       alert("下载");
@@ -287,8 +310,6 @@ export default {
           this.currentPage = this.totalPage;
           break;
       }
-      console.log(this.currentPage);
-
       //携带搜索条件
       let data = {
         informationName: this.searchName,
@@ -308,36 +329,14 @@ export default {
       this.newGetDataList(data);
     },
     //下载文件
-    downloadPost: function (config, obj) {
-      console.log("下载文件:", config, obj);
-      let url =
-        this.onlineUrl +
-        "/dealerDownload?informationId=" +
-        config.data.informationId +
-        "&agentId=" +
-        config.data.agentId;
+    downloadPost: function (config) {
+      let url = this.onlineUrl + "/dealerDownload?informationId=" + config.data.informationId + "&agentId=" + config.data.agentId;
+      // 刷新页面
+      this.downLoadFlag = true;
       window.open(url);
-
-      let data = {
-        informationName: this.searchName,
-        asc: this.timeSortVal == "dec" ? false : true,
-        report: "",
-        download: "",
-        Page: this.currentPage,
-        Rows: this.pageSize,
-        agentId: this.userId,
-      };
-       if (this.reportSortVal) {
-        data.report = this.reportSortVal === "already" ? true : false;
-      }
-      if (this.downloadSortVal) {
-        data.download = this.downloadSortVal === "already" ? true : false;
-      }
-      this.newGetDataList(data);
     },
     //查看详情
     showDetail: function (config, i) {
-      console.log(config);
       /*  //获取附件数据
       this.$http({
         url: "/selectInformationFileList",
@@ -391,7 +390,6 @@ export default {
         },
       })
         .then((res) => {
-          console.log(res, 'aaaaaaaaaaaaaaa')
           if (res.data.code === 200) {
             this.tableData = res.data.data;
             this.sum = res.data.count;
@@ -412,6 +410,7 @@ export default {
           if (res.data.code === 200) {
             this.tableData = res.data.data;
             this.sum = res.data.count;
+            this.downLoadFlag = false;
           }
         })
         .catch((err) => {
@@ -421,7 +420,6 @@ export default {
 
     //搜索资料名
     searchByName: function (p) {
-      console.log("insearchByName", p);
       let searchName = this.searchName;
       let data = {
         informationName: searchName,
@@ -479,11 +477,9 @@ export default {
       };
       if (!this.searchName) {
         this.newGetDataList(data);
-        console.log("insearchByCondition", data);
       } else {
         data.informationName = this.searchName;
         this.newGetDataList(data);
-        console.log("insearchByCondition", data);
       }
     },
     //待办跳转

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

@@ -288,7 +288,7 @@ export default {
       userId: '',
       //截止日期
       endTime: "",
-      nowDate: 0
+      nowDate: 0,
     };
   },
   computed: {
@@ -425,7 +425,6 @@ export default {
           this.currentPage = this.totalPage;
           break;
       }
-      console.log(this.currentPage);
       //分页取数据
       let config = {
         Page: this.currentPage,
@@ -506,28 +505,6 @@ export default {
           console.log(err);
         });
     },
-    //导入经销商反馈信息  经销商反馈服务>导入经销商反馈信息
-    /*   importDataList: function () {
-      this.file = event.target.files;
-      this.fileDes = [];
-      this.file.forEach((item) => {
-        this.fileDes.push(item.name);
-      });
-
-        this.$http({
-        url: "/importDealerFeedback",
-        method: "post",
-        data: {},
-      })
-        .then((res) => {
-          if (res.data.code === 200) {
-            this.tableData = res.data.data;
-          }
-        })
-        .catch((err) => {
-          console.log(err);
-        });
-    }, */
     //导出excel
     onOutputExcel: function () {
       //let url = this.onlineUrl + "/exportNoFactory";
@@ -538,26 +515,16 @@ export default {
     // 获取文件
     getFileInfo: function (event) {
       this.file = event.target.files;
-      console.log(this.file);
       let fileDes = [];
       this.file.forEach((item) => {
         fileDes.push(item.name);
       });
-      console.log(fileDes);
-      //导入文件与限制文件导入数量
- /*      let remainCount = this.publishCount - this.sum;
-      console.log(remainCount, this.publishCount, this.sum);
-      if (remainCount >= this.file.length) { */
         this.submitRequest();
-     /*  } else if (remainCount < this.file.length) {
-        this.showModal3 = !this.showModal3;
-      } */
     },
     // 导入接口
     submitRequest: function () {
       let paramData = new FormData();
       this.file.forEach((item) => {
-        console.log(item, 'item');
         paramData.append("file", item);
       });
       this.$http

+ 6 - 10
src/views/data/UploadLink/sonUploadLink.vue

@@ -103,6 +103,7 @@
       v-on:closeme="closemeAdd"
       @update="editTitle"
       :fileName="sfileName"
+      :modalTitle='addModalTitle'
     ></Modal>
 
     <!-- 弹窗: 确定删除? -->
@@ -159,7 +160,6 @@ export default {
       // 表格配置
       sum: 0, // 一共有多少条数据
       pageSize: 20, // 每页展示的数据
-      discolor: false, // false是隔行变色
       currentPage: 1,
       tableHeader: [
         "NO.",
@@ -192,6 +192,7 @@ export default {
 
       nowDate: "", //反馈截止时间
       php_url: php_url,
+      addModalTitle: '新增'
     };
   },
   computed: {
@@ -204,7 +205,6 @@ export default {
       if (!this.endTime) {
         return { showItemOperationStyle: true };
       } else {
-        console.log(this.endTime);
         return { showItemOperationStyle: false };
       }
     },
@@ -221,7 +221,6 @@ export default {
         month = month + "";
       }
       this.nowDate = +(year + month + day);
-      console.log(this.nowDate);
     },
     /*toggleModal:点击编辑后弹窗; toggleModal2:点击删除后弹窗; toggleModal3:点击导入后弹窗;  */
     toggleModal: function (i) {
@@ -246,14 +245,12 @@ export default {
     },
     /* 编辑内容,,Modal传参 */
     editTitle: function (val) {
-      console.log("editTitle文件:", val);
       this.$http({
         url: val.url,
         method: "post",
         data: val.data,
       })
         .then((res) => {
-          console.log(res);
           if (res.data && res.data.code === 200) {
             //更新数据
             this.newGetDataList();
@@ -266,8 +263,7 @@ export default {
         });
     },
 
-    toDel: function (n) {
-      console.log("inToDel:", n);
+    toDel: function () {
       this.showModal2 = !this.showModal2;
       //更新数据
 
@@ -277,7 +273,7 @@ export default {
     /* 表格翻页 */
     changePage: function (page) {
       this.currentPage = page;
-      console.log(page);
+      this.getDataList();
     },
     // 点击上一页,下一页,首页,尾页
     jumpPage: function (item) {
@@ -295,7 +291,7 @@ export default {
           this.currentPage = this.totalPage;
           break;
       }
-      console.log(this.currentPage);
+      this.getDataList();
     },
     //获取资料列表
     // getDataList: function () {
@@ -341,6 +337,7 @@ export default {
       })
         .then((res) => {
           if (res.data.code === 200) {
+            this.tableData = [];
             let data = res.data.data;
             this.sum = res.data.count;
             for (let i = 0, j = 0; j < data.length; i++, j++) {
@@ -410,7 +407,6 @@ export default {
   },
   mounted() {
     let userId = localStorage.getItem("userId");
-    console.log(userId);
     if (userId) {
       this.accountId = userId;
       this.getDataList();

+ 29 - 19
src/views/data/UploadLinks.vue

@@ -53,8 +53,8 @@
 import TablePage from "../../components/TablePage";
 import Count from "../../components/Count";
 import Table from "./components/UploadLinksTable";
-import { env_url , php_url} from "../../config/env"
-import axiosTest from 'axios';
+import { env_url, php_url } from "../../config/env";
+import axiosTest from "axios";
 export default {
   components: {
     TablePage,
@@ -73,7 +73,7 @@ export default {
       startTime: "",
       endTime: "",
       onlineUrl: env_url, //'http://8.140.188.129:8080'线上 //http://8.136.230.133:8080 //测试,
-      otherUrl:php_url,
+      otherUrl: php_url,
     };
   },
   computed: {
@@ -96,7 +96,7 @@ export default {
         Page: this.currentPage,
         Rows: this.pageSize,
       };
-    //  this.firmsLinkUpload(data);
+      //  this.firmsLinkUpload(data);
       this.getPageTableDate(data);
     },
     changePage: function (page) {
@@ -109,8 +109,8 @@ export default {
         Page: this.currentPage,
         Rows: this.pageSize,
       };
-     // this.firmsLinkUpload(req);
-      this.getPageTableDate(req)
+      // this.firmsLinkUpload(req);
+      this.getPageTableDate(req);
     },
     // 点击上一页,下一页,首页,尾页
     jumpPage: function (item) {
@@ -136,8 +136,8 @@ export default {
         Page: this.currentPage,
         Rows: this.pageSize,
       };
-     // this.firmsLinkUpload(req);
-      this.getPageTableDate(req)
+      // this.firmsLinkUpload(req);
+      this.getPageTableDate(req);
     },
     ulrJump: function (url) {
       window.open(url);
@@ -166,16 +166,17 @@ export default {
     getPageTableDate: function (data = {}) {
       axiosTest({
         method: "post",
-        url: this.otherUrl + '/lexus_php/api/report_list.php',
+        url: this.otherUrl + "/lexus_php/api/report_list.php",
         data: data,
       })
-              .then((res) => {
-                this.tableData = res.data.data;
-                this.sum = +res.data.count;
-              })
-              .catch((err) => {
-                console.log(err);
-              });
+        .then((res) => {
+          console.log(res, 22)
+          this.tableData = res.data.data;
+          this.sum = +res.data.count;
+        })
+        .catch((err) => {
+          console.log(err);
+        });
     },
     // 获取 所有区域  接口
     getAreaList: function () {
@@ -200,8 +201,17 @@ export default {
       //         localArea: this.areaValue,
       //         startTime: this.startTime,
       //         endTime: this.endTime,
-     // let url = this.onlineUrl + "/exportFactory";
-      let url = this.otherUrl + '/lexus_php/web/report_export.php?queryParams='+ this.inputValue + '&localArea=' + this.areaValue + '&startTime=' + this.startTime + '&endTime=' + this.endTime;
+      // let url = this.onlineUrl + "/exportFactory";
+      let url =
+        this.otherUrl +
+        "/lexus_php/web/report_export.php?queryParams=" +
+        this.inputValue +
+        "&localArea=" +
+        this.areaValue +
+        "&startTime=" +
+        this.startTime +
+        "&endTime=" +
+        this.endTime;
       window.open(url);
     },
   },
@@ -213,7 +223,7 @@ export default {
     //this.firmsLinkUpload(req);
     this.getPageTableDate(req);
     this.getAreaList();
-  }
+  },
 };
 </script>
 

+ 15 - 17
src/views/data/components/UploadLinkEditModal.vue

@@ -37,27 +37,29 @@
               @change="chooseChannel($event)"
             >
               <option v-for="(item, index) in releaseChannel" :key="index">
-                <!-- :value="item.platformName" -->
-                {{ item.platformName || "11" }}
+                {{ item.platformName || "-" }}
               </option>
             </select>
           </div>
           <div class="contentCol2">
-            <span>平台版块</span
-            ><select name="" id="" v-model="releaseP">
-              <option v-for="(item, index) in releasePlate" :key="index">
-                <!-- :value="item.platformName" -->
-                {{ item.platformName || "22" }}
-              </option>
-            </select>
+            <span>平台版块</span>
+            <div v-if="releaseC !== '其它'">
+              <select name="" id="" v-model="releaseP">
+                <option v-for="(item, index) in releasePlate" :key="index">
+                  {{ item.platformName || "-" }}
+                </option>
+              </select>              
+            </div>
+            <div v-else>
+              <input type="text" v-model="releaseP">
+            </div>
           </div>
         </div>
         <div class="bodyRow">
           <div class="contentCol1">
-            <span>稿件类别</span
-            ><select name="" id="" v-model="contentName1">
+            <span>稿件类别</span>
+            <select name="" id="" v-model="contentName1">
               <option v-for="(item, index) in content1" :key="index">
-                <!-- :value="item.dictName" -->
                 {{ item.dictName }}
               </option>
             </select>
@@ -66,8 +68,7 @@
             <span>内容分类</span
             ><select name="" id="" v-model="contentName2">
               <option v-for="(item, index) in content2" :key="index">
-                <!-- :value="item.dictName" -->
-                {{ item.dictName }}
+                {{ item.dictName || '-' }}
               </option>
             </select>
           </div>
@@ -239,9 +240,7 @@ export default {
       } else {
         month = month + "";
       }
-      //this.localMonth = year + "-" + month;
       this.localDay = year + "-" + month + "-" + day;
-      console.log(this.localDay);
     },
     initialData: function () {
       this.ziliaoName = this.LinkData.informationName;
@@ -269,7 +268,6 @@ export default {
         .then((res) => {
           if (res.data && res.data.code === 200) {
             this.carType = res.data.data;
-            console.log(this.carType, 22);
           } else {
             console.log(res);
           }

+ 2 - 3
src/views/data/components/UploadLinksTable.vue

@@ -38,10 +38,9 @@
           <td>{{ obj.localArea }}</td>
           <td>{{ (obj.publishDate || '').replace(RegExp("-", "g"), '/') }}</td>
           <td style="width: 180px">{{ obj.informationName }}</td>
-          <td>{{ (((obj.reportDate || '').replace('T', ' ')).slice(0, -4)).replace(RegExp("-", "g"), '/') }}</td>
-           
-          <td>{{ obj.publishSourceName || '' }}</td>
+          <td>{{ ((obj.reportDate || '')).replace(RegExp("-", "g"), '/') }}</td>
           <td>{{ obj.publishPlatformName || '-' }}</td>
+          <td>{{ obj.publishSourceName || '' }}</td>
           <td>{{ obj.readCount || '-' }}</td>
           <td>{{ obj.goodCount || '-' }}</td>
           <td>{{ obj.bbsCount || '-'}}</td>