瀏覽代碼

修改发布时间限制日期

306132416@qq.com 4 年之前
父節點
當前提交
34a5d710d0
共有 4 個文件被更改,包括 1079 次插入1031 次删除
  1. 19 4
      src/components/Modal.vue
  2. 547 531
      src/components/modalcopy.vue
  3. 1 1
      src/views/data/UploadLink.vue
  4. 512 495
      src/views/data/components/UploadLinkEditModal.vue

+ 19 - 4
src/components/Modal.vue

@@ -11,7 +11,7 @@
         </div>
         <div class="bodyRow timeWidth">
           <span>发布时间</span
-          ><input type="date" placeholder="选择时间" v-model="ziliaoTime" />
+          ><input type="date" placeholder="选择时间" :min="localDay" v-model="ziliaoTime" />
         </div>
         <div class="bodyRow">
           <!--  <div class="contentCol1">
@@ -189,13 +189,28 @@ export default {
       releaseChannel: [],
       releasePlate: [],
       userId: '',
+      localDay: "",
     };
   },
   methods: {
     closeSelf() {
       this.$emit("closeme");
     },
-
+    // 获取当前的月份
+    getLocalMonth: function () {
+      let data = new Date();
+      let year = data.getFullYear();
+      let month = data.getMonth() + 1;
+      let day = data.getDate();
+      if (month < 10) {
+        month = "0" + month;
+      } else {
+        month = month + "";
+      }
+      //this.localMonth = year + "-" + month;
+      this.localDay = year + "-" + month + "-" + day;
+      console.log(this.localDay);
+    },
     edit: function () {
       let obj = {};
       //获取资料名
@@ -468,7 +483,7 @@ console.log(this.ziliaoId)
       } else {
         alert("链接输入有误!\n示例:https://www.baidu.com");
       }
-      /*  
+      /*
 this.ziliaoName && this.ziliaoTime &&this.carS &&this.carT&&
 this.releaseP&& th&& this.contentName1&&
 this.contentName2&& this.mediaTitle&& this.mediaUrl&&
@@ -529,7 +544,7 @@ this.readCount&&this.goodCount&&  this.bbsCount&& this.lookingCount */
       console.log("经销商ID '-");
       this.userId = "";
     }
-
+    this.getLocalMonth();
     this.chooseDataName();
     this.chooseCarSeries();
     this.firstContent1Classify();

File diff suppressed because it is too large
+ 547 - 531
src/components/modalcopy.vue


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

@@ -527,7 +527,7 @@ export default {
     //导出excel
     onOutputExcel: function () {
       //let url = this.onlineUrl + "/exportNoFactory";
-      let url = this.otherUrl + '/lexus_php/web/report_export.php'
+      let url = this.otherUrl + '/lexus_php/web/agent_export.php?agentId='+ this.userId;
       console.log("导出excel:", url);
       window.open(url);
     },

File diff suppressed because it is too large
+ 512 - 495
src/views/data/components/UploadLinkEditModal.vue