فهرست منبع

update 页面修正

15724580513 5 سال پیش
والد
کامیت
9af8612764

+ 0 - 0
src/api/hangyezixun.js → src/api/news.js


+ 8 - 2
src/views/management/HangYeZiXun/HangYeZiXunConfig/index.vue

@@ -73,7 +73,7 @@
     import MtaStQuillEditor     from '@/components/management/QuillEditor.vue';
     import mySelect             from '../components/Select';
     import * as commonTools     from '@/utils/admin/tools';
-    import * as HYZXService     from '@/api/hangyezixun';
+    import * as HYZXService     from '@/api/news';
     import * as NewsClassifyApi from '@/api/newsClassify';
     import Vue                  from 'vue';
 
@@ -256,6 +256,12 @@
                 }
 
             },
+            clearPageData() {
+                selectServiceData.options = [];
+                selectServiceData.newsClassifyId = null;
+                this.$refs.HangYeZiXun.resetFields();
+                this.$refs.editorQuill.setContent('');
+            },
         },
         created() {
             this.queryData = this.$route.query;
@@ -270,7 +276,7 @@
             }
         },
         beforeDestroy() {
-            Object.assign(selectServiceData, selectData);
+            this.clearPageData();
         },
     };
 </script>

+ 11 - 4
src/views/management/HangYeZiXun/index.vue

@@ -34,7 +34,7 @@
 <script>
     import myPagination         from './components/Pagination';
     import myTable              from './components/Table';
-    import * as HYZXApi         from '@/api/hangyezixun';
+    import * as HYZXApi         from '@/api/news';
     import * as NewsClassifyApi from '@/api/newsClassify';
     import mySelect             from './components/Select';
     import Vue                  from 'vue';
@@ -230,14 +230,21 @@
                     loading.close();
                 }
             },
+            clearPageData() {
+                selectServiceData.options = [];
+                selectServiceData.newsClassifyId = null;
+                tableServiceData.myData = [];
+                paginationServiceData.page = 1;
+                paginationServiceData.size = 10;
+                paginationServiceData.total = 0;
+            }
         },
         created() {
             this.initPageService();
         },
         beforeDestroy() {
-            Object.assign(tableServiceData, tableData);
-            Object.assign(paginationServiceData, pagination);
-            Object.assign(selectServiceData, selectData);
+            this.clearPageData();
+
         },
     };
 </script>

+ 1 - 1
src/views/management/Login/components/Login.vue

@@ -81,7 +81,7 @@
                 return saveCache(key, val);
             },
             goHomePage() {
-                this.$router.push({ name: 'hangyezixun' });
+                this.$router.push({ name: 'news' });
             },
             checkISLoading() {
                 const userAuth = getUserAuth();