瀏覽代碼

【修改】bug

howie 3 年之前
父節點
當前提交
969fe1d1a9

+ 1 - 0
jsconfig.json

@@ -1,6 +1,7 @@
 {
   "compilerOptions": {
     "baseUrl": "./",
+    "jsx": "preserve",
     "paths": {
         "@/*": ["src/*"]
     }

+ 1 - 0
src/App.vue

@@ -12,6 +12,7 @@ export default {
 
     };
   },
+
   methods:{
 
   }

+ 4 - 2
src/layout/components/AppMain.vue

@@ -1,7 +1,7 @@
 <template>
   <section class="app-main">
     <transition name="fade-transform" mode="out-in">
-      <keep-alive>
+      <keep-alive >
         <router-view />
       </keep-alive>
     </transition>
@@ -13,13 +13,15 @@ export default {
   name: "AppMain",
   computed: {
     cachedViews() {
+
       return this.$store.state.tagsView.cachedViews;
     },
     key() {
-        console.log(this.$route.path,'45454');
+
       return this.$route.path;
     },
   },
+
 };
 </script>
 

+ 3 - 2
src/layout/components/TagsView/index.vue

@@ -46,11 +46,12 @@ export default {
       return this.$store.state.tagsView.visitedViews
     },
     routes() {
-      return this.$store.state.permission.routes
+      return this.$store.state.permission.routes0
     }
   },
   watch: {
-    $route() {
+    $route(val, oval) {
+      console.log(val,oval,'route');
       this.addTags()
       this.moveToCurrentTag()
     },

+ 2 - 0
src/layout/index.vue

@@ -48,6 +48,8 @@ export default {
       }
     }
   },
+
+
   methods: {
     handleClickOutside() {
       this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })

+ 1 - 0
src/permission.js

@@ -51,6 +51,7 @@ router.beforeEach(async (to, from, next) => {
             const item = buildRootRoute(route);
             newRoutes.push(item);
           }
+          console.log(newRoutes,'8589');
           // newRoutes.shift();
           // 添加一项根目录重定向页面
           if (newRoutes[0].path != "/") {

+ 2 - 1
src/router/_import_development.js

@@ -1,2 +1,3 @@
 // 开发环境导入组件
-module.exports = file => require('@/views' + file + '.vue').default
+module.exports = file => require('@/views' + file + '.vue').default
+

+ 4 - 0
src/router/index.js

@@ -270,6 +270,8 @@ export const constantRoutes = [
   // { path: '*', redirect: '/404', hidden: true }
 ]
 
+
+
 const createRouter = () => new Router({
   // mode: 'history', // require service support
   scrollBehavior: () => ({ y: 0 }),
@@ -284,4 +286,6 @@ export function resetRouter() {
   router.matcher = newRouter.matcher // reset router
 }
 
+
+
 export default router

+ 8 - 0
src/views/basic_data/material/material_list.vue

@@ -217,6 +217,14 @@ export default {
       },
     };
   },
+    activated() {
+    // 页面重回
+    console.log(545);
+},
+deactivated() {
+    // 页面离开
+      console.log(777878);
+},
   methods: {
     hanleDetail(id) {
       getMaterialDetail({ id }).then((res) => {

+ 6 - 2
src/views/engin_deposit/components/deposit-apply-surrender.vue

@@ -423,6 +423,7 @@ export default {
       this.$parent.showPage = 1
     },
     handleSvse() {
+          const arr = []
       if (!this.details.installDate) {
         this.$errorMsg('请选择安装时间')
         return
@@ -438,14 +439,17 @@ export default {
           })
         }
 
-        this.details.dataList.push({
+        arr.push({
           dataDescribe: el.name,
           enginOrderNo: this.details.refProjectNo,
           fileName: el.name,
           fileUrl: el.url
         })
       })
-      applyDeposit(this.details).then((res) => {
+      applyDeposit({
+        ...this.details,
+        dataList:arr
+      }).then((res) => {
         this.$successMsg('申请成功')
         this.$parent.showPage = 1
         this.$parent.deduction = ''

+ 1 - 1
src/views/sales_policy/components/AddCondition.vue

@@ -688,7 +688,7 @@ export default {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
         saleTypeCode: this.saleTypeCode,
-        policyId: this.comCode,
+        policyId: this.comCode || this.$parent.searchForm.code,
       }).then((res) => {
         let datas = [];
         for (let j = 0; j < this.conditionBox.length; j++) {

+ 19 - 14
src/views/sales_policy/components/editPolicy.vue

@@ -139,7 +139,7 @@
             v-loading="listLoading"
             :data="dataList"
             element-loading-text="Loading"
-            max-height="600"
+
             border
             fit
             highlight-current-row
@@ -365,15 +365,15 @@
                 @click="handleSave"
               >保存</el-button>
             </div>
-            <!--            <el-pagination-->
-            <!--              :current-page="dcurrentPage"-->
-            <!--              :page-sizes="pageSizeArr"-->
-            <!--              :page-size="size"-->
-            <!--              layout="total, sizes, prev, pager, next, jumper"-->
-            <!--              :total="listTotal"-->
-            <!--              @size-change="handleSizeChange2"-->
-            <!--              @current-change="handleCurrentChange2"-->
-            <!--            />-->
+                       <el-pagination
+                         :current-page="dcurrentPage"
+                         :page-sizes="pageSizeArr"
+                         :page-size="size"
+                         layout="total, sizes, prev, pager, next, jumper"
+                         :total="listTotal"
+                         @size-change="handleSizeChange2"
+                         @current-change="handleCurrentChange2"
+                       />
           </div>
 
           <el-row>
@@ -531,7 +531,7 @@ export default {
       conditName:'',
       dataList: [],
       addList: [],
-      pageSizeArr: [10, 20, 30, 50],
+      pageSizeArr: [10],
       size: 10,
       listLoading: false,
       dialogVisible: false,
@@ -923,11 +923,18 @@ export default {
       if (!this.dataList.length) {
         this.dcurrentPage !== 1 ? this.dcurrentPage -= 1 : this.dcurrentPage = 1
       }
-      // this.listTotal -= 1;
+      this.listTotal -= 1;
       this.$successMsg('删除成功')
     },
     handleNewInfo() {
       // 物料列表
+       this.sleectBox.currentPage = 1
+        this.listTotal += 1;
+      //  if (this.dataList.length ===10 ) {
+      //   this.dataList = []
+      //   this.dcurrentPage +=(this.listTotal /10)+1
+      //  }
+
 
       this.dataList.push({
         id: '',
@@ -945,8 +952,6 @@ export default {
         walletIds: [this.NoRebateWalletList[0].id],
         walletRelaList: []
       })
-      this.sleectBox.currentPage = 1
-      // this.listTotal += 1;
       // this.dataList.push(this.addList[this.addList.length-1])
     },
     handleSave() {