浏览代码

修改已知问题

306132416@qq.com 4 年之前
父节点
当前提交
a9cd1c6b99

+ 2 - 5
src/App.vue

@@ -10,13 +10,10 @@
         <Routerbanner :isManufacturer="isManufacturer" />
       </div>
       <div class="router_view">
-        <keep-alive exclude="dishes">
           <router-view
             :isManufacturer="isManufacturer"
             :isLoading="loadingFlag"
-            :key="this.$route.path"
           ></router-view>
-        </keep-alive>
       </div>
     </div>
     <div v-if="!loadingFlag">
@@ -138,7 +135,7 @@ export default {
     localTest(){
       // 本地调试打开
       this.loadingFlag = false;
-      this.isManufacturer = "distributor"; //  distributor
+      this.isManufacturer = "manufacturer"; //  distributor
       if (this.isManufacturer === "manufacturer") {
         if (this.$route.path === "/loading")
           this.$router.replace({ path: "/uploadInfor" });
@@ -164,7 +161,7 @@ export default {
   created() {
      this.loadingFlag = true;
      this.getData(); // 线上打开
-    // this.localTest();// 本地调试打开
+     //this.localTest();// 本地调试打开
   },
 };
 </script>

+ 12 - 8
src/views/notification/changShang.vue

@@ -32,7 +32,7 @@
                       <!--.slice(0, -4)-->
                       <!--.replace(RegExp("-", "g"), "/")-->
                   <!--}}-->
-                  {{obj.addtime}}
+                  {{obj.addtime.substr(0,10)}}
                 </td>
 
                 <td v-if="operation" :style="trStyle" class="operationStyle">
@@ -61,9 +61,7 @@
         <p>共{{ totalPage }}页,共{{ sum }}条数据</p>
       </div>
     </div>
-    <keep-alive exclude="dishes">
       <router-view :key="this.$route.path"></router-view>
-    </keep-alive>
   </div>
 </template>
 
@@ -156,6 +154,10 @@ export default {
     },
     //编辑
     edit: function (config) {
+      console.log(config,'father')
+      if(typeof (config.area) === 'string'){
+        config.area =  (config.area).split(',');
+      }
       this.$router.push({
         path: "/changShang/editPage",
         query: config,
@@ -189,7 +191,7 @@ export default {
         },
       })
         .then((res) => {
-          if (res.data.code === 200 || res.data.code === 401) {
+          if (res.data.code === 200) {
             alert(res.data.msg);
             this.getDataList();
           }
@@ -207,16 +209,18 @@ export default {
           content:``,
           id:'',
           files:[],
-          area:"全区"
+          area:['全区']
         },
       });
     },
   },
+  watch: {
+    // 如果路由发生变化,再次执行该方法
+    "$route": "getDataList"
+  },
   created() {
   },
   mounted() {
-  },
-  activated() {
     this.getDataList()
   }
 };
@@ -248,7 +252,7 @@ export default {
   }
 }
 .table_gray {
-  background-color: #eeeeee;
+  background-color: #f5f5f5;
 }
 .operationStyle span {
   color: #0000ff;

+ 6 - 7
src/views/notification/editPage/editPage.vue

@@ -132,7 +132,7 @@ export default {
       tipText: "",
       noticeTitle: "",
       InfoType: "",
-      title: this.$route.query && this.$route.query.title,
+      title: this.$route.query.title,
       areaList: ["全区", "北区", "南区", "东区"], // 按区域添加
       extensions: [
         // new Preview(),
@@ -310,11 +310,9 @@ export default {
       });
     },
     // 转地区的格式
-    areaToList() {
-      this.contentParam = this.$route.query || {};
-      const areaList = this.contentParam.area.split(",");
-      this.contentParam.area = areaList;
-    },
+    // areaToList() {
+    //   this.contentParam = this.$route.query
+    // },
     getDataList: function (data = {}) {
       axiosPhp({
         method: "post",
@@ -359,8 +357,9 @@ export default {
     },
   },
   mounted() {
+    console.log(this.contentParam,'child')
     this.getDataList();
-    this.areaToList();
+    this.contentParam = this.$route.query;
     this.noticeId = this.contentParam.id;
     if (this.contentParam.files) {
       this.editFileLength = this.contentParam.files.length;

+ 0 - 2
src/views/notification/jingXiaoshang.vue

@@ -30,9 +30,7 @@
         </div>
       </div>
     </div>
-    <keep-alive>
       <router-view></router-view>
-    </keep-alive>
   </div>
 </template>