浏览代码

前端新增路由记录多tag页切换。

wucl 10 月之前
父节点
当前提交
bf83651b90

+ 2 - 2
src/components/personalForms/houseCertificate.vue

@@ -197,13 +197,13 @@
                                 </el-form-item>
                             </el-col>
                             <el-col :xs="24" :sm="12" :lg="6" :span="6"
-                                v-show="certificate.isPledge === 'SAME' || certificate.isPledge === 'DIFFERENT'">
+                                v-show="certificate.isPledge === '向同一抵押权人申请续期贷款' || certificate.isPledge === '向新抵押权人申请贷款'">
                                 <el-form-item label="抵押权人:" prop="pledgePerson" label-width="140px"
                                     class="postInfo-container-item">
                                     <el-input v-model="certificate.pledgePerson" class="filter-item" />
                                 </el-form-item>
                             </el-col>
-                            <el-col :xs="24" :sm="12" :lg="6" :span="6" v-show="certificate.isPledge === 'DIFFERENT'">
+                            <el-col :xs="24" :sm="12" :lg="6" :span="6" v-show="certificate.isPledge === '向新抵押权人申请贷款'">
                                 <el-form-item label="新抵押权人:" prop="otherPledgePerson" label-width="140px"
                                     class="postInfo-container-item">
                                     <el-input v-model="certificate.otherPledgePerson" class="filter-item" />

+ 2 - 2
src/components/personalForms/immovableCertificate.vue

@@ -169,12 +169,12 @@
                 </el-form-item>
               </el-col>
               <el-col :xs="24" :sm="12" :lg="6" :span="6"
-                v-show="certificate.isPledge === 'SAME' || certificate.isPledge === 'DIFFERENT'">
+                v-show="certificate.isPledge === '向同一抵押权人申请续期贷款' || certificate.isPledge === '向新抵押权人申请贷款'">
                 <el-form-item label="抵押权人:" prop="pledgePerson" label-width="140px" class="postInfo-container-item">
                   <el-input v-model="certificate.pledgePerson" class="filter-item" />
                 </el-form-item>
               </el-col>
-              <el-col :xs="24" :sm="12" :lg="6" :span="6" v-show="certificate.isPledge === 'DIFFERENT'">
+              <el-col :xs="24" :sm="12" :lg="6" :span="6" v-show="certificate.isPledge === '向新抵押权人申请贷款'">
                 <el-form-item label="新抵押权人:" prop="otherPledgePerson" label-width="140px" class="postInfo-container-item">
                   <el-input v-model="certificate.otherPledgePerson" class="filter-item" />
                 </el-form-item>

+ 44 - 7
src/layout/components/TagsView/index.vue

@@ -1,10 +1,10 @@
 <template>
-  <div id="tags-view-container" class="tags-view-container" v-show="false">
+  <div id="tags-view-container" class="tags-view-container" v-show="true">
     <scroll-pane ref="scrollPane" class="tags-view-wrapper">
       <router-link
         v-for="tag in visitedViews"
         ref="tag"
-        :key="tag.path"
+        :key="tag.fullPath"
         :class="isActive(tag)?'active':''"
         :to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }"
         tag="span"
@@ -12,12 +12,12 @@
         @click.middle.native="!isAffix(tag)?closeSelectedTag(tag):''"
         @contextmenu.prevent.native="openMenu(tag,$event)"
       >
-        {{ tag.title }}
+        {{buildTagName(tag)}}
         <span v-if="!isAffix(tag)" class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)" />
       </router-link>
     </scroll-pane>
     <ul v-show="visible" :style="{left:left+'px',top:top+'px'}" class="contextmenu">
-      <li @click="refreshSelectedTag(selectedTag)">刷新</li>
+      <!-- <li @click="refreshSelectedTag(selectedTag)">刷新</li> -->
       <li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)">关闭</li>
       <li @click="closeOthersTags">关闭其他</li>
       <li @click="closeAllTags(selectedTag)">关闭所有</li>
@@ -52,7 +52,6 @@ export default {
     $route() {
       this.addTags()
       this.moveToCurrentTag()
-      // console.log('tagsView route 改变监听器')
     },
     visible(value) {
       if (value) {
@@ -68,7 +67,7 @@ export default {
   },
   methods: {
     isActive(route) {
-      return route.path === this.$route.path
+      return route.fullPath === this.$route.fullPath
     },
     isAffix(tag) {
       return tag.meta && tag.meta.affix
@@ -136,6 +135,10 @@ export default {
       })
     },
     closeSelectedTag(view) {
+      console.log(view)
+      if (view.path === '/home/index'){
+        return;
+      }
       this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
         if (this.isActive(view)) {
           this.toLastView(visitedViews, view)
@@ -184,13 +187,41 @@ export default {
         this.left = left
       }
 
-      this.top = e.clientY
+      this.top = e.clientY-40;
       this.visible = true
       this.selectedTag = tag
     },
     closeMenu() {
       this.visible = false
+    },
+    buildTagName(tag){
+      let tagName = '';
+      let path = tag.path;
+      if (path.includes('major')){
+        tagName += '大中型-'
+      }
+      if (path.includes('personal')){
+        tagName += '个贷-'
+      }
+      if (path.includes('assets')){
+        tagName += '资产-'
+      }
+      tagName += tag.title;
+      if (tag.query.reportNo){
+        tagName += '-'+tag.query.reportNo;
+        return tagName;
+      }
+      if (tag.query.statementNo){
+        tagName += '-'+tag.query.statementNo;
+        return tagName;
+      }
+      if (tag.query.orderId){
+        tagName += '-'+tag.query.orderId;
+        return tagName;
+      }
+      return tagName;
     }
+  
   }
 }
 </script>
@@ -204,6 +235,8 @@ export default {
   box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 3px 0 rgba(0, 0, 0, .04);
   .tags-view-wrapper {
     .tags-view-item {
+      transition: transform 0.3s ease;
+      transform: scale(1);
       display: inline-block;
       position: relative;
       cursor: pointer;
@@ -238,6 +271,10 @@ export default {
         }
       }
     }
+    .tags-view-item:hover{
+      transform: scale(1.3); 
+      color:black;
+    }
   }
   .contextmenu {
     margin: 0;

+ 5 - 4
src/store/modules/tagsView.js

@@ -5,12 +5,13 @@ const state = {
 
 const mutations = {
   ADD_VISITED_VIEW: (state, view) => {
-    if (state.visitedViews.some(v => v.path === view.path)) return
+    if (state.visitedViews.some(v => v.fullPath === view.fullPath)) return
     state.visitedViews.push(
       Object.assign({}, view, {
         title: view.meta.title || 'no-name'
       })
     )
+
   },
   ADD_CACHED_VIEW: (state, view) => {
     if (state.cachedViews.includes(view.name)) return
@@ -21,7 +22,7 @@ const mutations = {
 
   DEL_VISITED_VIEW: (state, view) => {
     for (const [i, v] of state.visitedViews.entries()) {
-      if (v.path === view.path) {
+      if (v.fullPath === view.fullPath) {
         state.visitedViews.splice(i, 1)
         break
       }
@@ -34,7 +35,7 @@ const mutations = {
 
   DEL_OTHERS_VISITED_VIEWS: (state, view) => {
     state.visitedViews = state.visitedViews.filter(v => {
-      return v.meta.affix || v.path === view.path
+      return v.meta.affix || v.fullPath === view.fullPath
     })
   },
   DEL_OTHERS_CACHED_VIEWS: (state, view) => {
@@ -58,7 +59,7 @@ const mutations = {
 
   UPDATE_VISITED_VIEW: (state, view) => {
     for (let v of state.visitedViews) {
-      if (v.path === view.path) {
+      if (v.fullPath === view.fullPath) {
         v = Object.assign(v, view)
         break
       }

+ 32 - 5
src/views/major/detail.vue

@@ -2399,6 +2399,37 @@
       WorkflowBoard
     },
     watch:{
+      $route(to, from) {
+        if (to.path === from.path){
+          this.couldEdit = this.$route.query.couldEdit ==='true';
+          this.showBtn = this.$route.query.showBtn ==='true';
+          this.couldBack = this.$route.query.couldBack ==='true';
+          this.reportNo = this.$route.query.reportNo;
+          this.statementNo = this.$route.query.statementNo;
+          this.saveOrderBtn = this.$route.query.saveOrderBtn;
+          this.majorId = this.$route.query.id;
+          this.currentNode.nodeName = this.$route.query.currentNodeName;
+          this.nodeBusinessInfo.doWorkflow = this.$route.query.couldEdit ==='true';
+          this.nodeBusinessInfo.currentNodeInstanceId= this.$route.query.currentNodeId;
+          this.nodeBusinessInfo.businessId= this.$route.query.id;
+          this.nodeBusinessInfo.businessMinId=this.$route.query.reportNo;
+          this.nodeBusinessInfo.businessSubId=this.$route.query.statementNo;
+          this.getMajorDetail();
+          this.getCustomerCompany(0);
+          this.getCustomerCompany(1);
+          this.changeType();
+          if (typeof(this.nodeBusinessInfo.currentNodeInstanceId)!='undefined' &&this.nodeBusinessInfo.currentNodeInstanceId!=null){
+            this.getCurrentNodeInfo();
+          }
+          this.getAllotDepartment();
+          this.getLandTargetList();
+          this.getWorkflowLogs();
+          this.getProductions(this.majorId,this.statementNo,this.reportNo);
+          this.getPerformance(this.majorId,(this.reportNo==null?this.statementNo:this.reportNo));
+          this.getFinanceInvoiceAmountInfo();
+        
+        }
+      },
       productions: {
         handler(newValue, oldVal) {
             for (let p in oldVal){
@@ -2738,11 +2769,7 @@
         if (this.activeTagName === 'finance' && this.productionFinance.length == 0){
           this.getFinanceInvoiceAmountInfo();
         }
-        // if (this.nodeBusinessInfo.currentNodeInstanceId){
-        //   setTimeout(() => {
-        //     this.$refs.board.getInstanceQueue();
-        //   }, 1000);
-        // }
+
     },
     methods: {
       handleChange(){

+ 4 - 4
src/views/major/list.vue

@@ -206,13 +206,13 @@ export default {
 
     orderDetail(row){
       if (row.reportNo && row.statementNo){
-        this.$router.push(`/major/detail?id=${row.majorId}&currentNodeName=${row.nodeName}&couldEdit=${false}&reportNo=${row.reportNo}&statementNo=${row.statementNo}&currentNodeId=${row.currentNodeId}&back=${'/major/list'}`)
+        this.$router.push(`/major/detail?id=${row.majorId}&orderId=${row.orderId}&currentNodeName=${row.nodeName}&couldEdit=${false}&reportNo=${row.reportNo}&statementNo=${row.statementNo}&currentNodeId=${row.currentNodeId}&back=${'/major/list'}`)
       }else if (!row.reportNo && row.statementNo){
-        this.$router.push(`/major/detail?id=${row.majorId}&currentNodeName=${row.nodeName}&couldEdit=${false}&statementNo=${row.statementNo}&currentNodeId=${row.currentNodeId}&back=${'/major/list'}`)
+        this.$router.push(`/major/detail?id=${row.majorId}&orderId=${row.orderId}&currentNodeName=${row.nodeName}&couldEdit=${false}&statementNo=${row.statementNo}&currentNodeId=${row.currentNodeId}&back=${'/major/list'}`)
       }else if (row.reportNo && !row.statementNo){
-        this.$router.push(`/major/detail?id=${row.majorId}&currentNodeName=${row.nodeName}&couldEdit=${false}&reportNo=${row.reportNo}&currentNodeId=${row.currentNodeId}&back=${'/major/list'}`)
+        this.$router.push(`/major/detail?id=${row.majorId}&orderId=${row.orderId}&currentNodeName=${row.nodeName}&couldEdit=${false}&reportNo=${row.reportNo}&currentNodeId=${row.currentNodeId}&back=${'/major/list'}`)
       }else {
-        this.$router.push(`/major/detail?id=${row.majorId}&currentNodeName=${row.nodeName}&couldEdit=${false}&currentNodeId=${row.currentNodeId}&back=${'/major/list'}`)
+        this.$router.push(`/major/detail?id=${row.majorId}&orderId=${row.orderId}&currentNodeName=${row.nodeName}&couldEdit=${false}&currentNodeId=${row.currentNodeId}&back=${'/major/list'}`)
       }
     },
     sortTable(sortParams){

+ 1 - 1
src/views/major/myOrder.vue

@@ -102,7 +102,7 @@
             <div>
               <PermissionButton menu-code="_views_myOrder_detail" class-name="filter-item" type="text" :page-jump="true"
                 size="mini"
-                :page-query="{ 'couldEdit': true, 'id': row.businessId, 'back': '/major/my/order', 'recall': true, 'couldBack': true }" />
+                :page-query="{ 'couldEdit': true, 'id': row.businessId, 'back': '/major/my/order', 'recall': true, 'couldBack': true ,'orderId':row.orderId}" />
               <el-button :disabled="!row.id" type="text" size="small" @click="openShouldAmountDialog(row)">应收款</el-button>
               <!-- <el-button type="text" size="small" @click="openAllotProductionDialog(row)">实收款分配</el-button> -->
             </div>

+ 16 - 0
src/views/major/myOrderDetail.vue

@@ -544,6 +544,22 @@
       Breadcrumb,
       YDetailPageLayout,
     },
+    watch:{
+      $route(to, from) {
+        if (to.path === from.path){
+          this.couldEdit = this.$route.query.couldEdit ==='true';
+          this.couldBack = this.$route.query.couldBack ==='true';
+          this.saveOrderBtn = this.$route.query.saveOrderBtn;
+          this.majorId = this.$route.query.id;
+          this.getAllUser();
+          this.getMajorDetail();
+          this.getCustomerCompany(0);
+          this.getCustomerCompany(1);
+          this.changeType();
+          this.getAllotDepartment();
+        }
+    },
+    },
     data() {
       return {
         majorId:null,

+ 25 - 0
src/views/major/todoDetail.vue

@@ -1683,6 +1683,31 @@ export default {
     ScanEntry
   },
   watch: {
+    $route(to, from) {
+      if (to.path === from.path){
+        this.nodeBusinessInfo.doWorkflow = this.$route.query.doWorkflow === 'true';
+        this.businessMinId = this.$route.query.reportNo;
+        this.businessSubId = this.$route.query.statementNo;
+        this.majorId = this.$route.query.id;
+        this.reportNo = this.$route.query.reportNo;
+        this.statementNo = this.$route.query.statementNo;
+        this.currentNode.nodeCode = this.$route.query.currentNodeCode;
+        this.nodeBusinessInfo.businessId = this.$route.query.id;
+        this.nodeBusinessInfo.currentNodeInstanceId = this.$route.query.currentNodeId;
+        this.nodeBusinessInfo.businessMinId = this.$route.query.reportNo;
+        this.nodeBusinessInfo.businessSubId = this.$route.query.statementNo;
+        this.getCurrentNodeInfo();
+        this.getMajorDetail();
+        this.getAllotDepartment();
+        this.getLandTargetList();
+        setTimeout(() => {
+            this.getProductions(this.majorId, (this.reportNo == null ? this.statementNo : this.reportNo));
+          }, 1000)
+        this.getWorkflowLogs();
+        this.getPerformance(this.majorId, (this.reportNo == null ? this.statementNo : this.reportNo));
+        this.getFinanceInvoiceAmountInfo();
+      }
+    },
     evaluateLandData(newValue, oldValue) {
       this.totalEvaluateValue = 0;
       this.totalAcreage = 0;

+ 4 - 4
src/views/major/todoList.vue

@@ -307,13 +307,13 @@ export default {
           return;
       }
       if (reportNo && statementNo){
-        this.$router.push(`/major/todo/detail?id=${row.businessId}&reportNo=${reportNo}&statementNo=${row.statementNo}&doWorkflow=${true}&currentNodeId=${row.currentNodeId}&currentNodeCode=${row.nodeCode}&back=${'/major/todo'}`)
+        this.$router.push(`/major/todo/detail?id=${row.businessId}&orderId=${row.orderId}&reportNo=${reportNo}&statementNo=${row.statementNo}&doWorkflow=${true}&currentNodeId=${row.currentNodeId}&currentNodeCode=${row.nodeCode}&back=${'/major/todo'}`)
       }else if (!reportNo && statementNo){
-        this.$router.push(`/major/todo/detail?id=${row.businessId}&statementNo=${row.statementNo}&doWorkflow=${true}&currentNodeId=${row.currentNodeId}&currentNodeCode=${row.nodeCode}&back=${'/major/todo'}`)
+        this.$router.push(`/major/todo/detail?id=${row.businessId}&orderId=${row.orderId}&statementNo=${row.statementNo}&doWorkflow=${true}&currentNodeId=${row.currentNodeId}&currentNodeCode=${row.nodeCode}&back=${'/major/todo'}`)
       }else if (reportNo && !statementNo){
-        this.$router.push(`/major/todo/detail?id=${row.businessId}&reportNo=${reportNo}&doWorkflow=${true}&currentNodeId=${row.currentNodeId}&currentNodeCode=${row.nodeCode}&back=${'/major/todo'}`)
+        this.$router.push(`/major/todo/detail?id=${row.businessId}&orderId=${row.orderId}&reportNo=${reportNo}&doWorkflow=${true}&currentNodeId=${row.currentNodeId}&currentNodeCode=${row.nodeCode}&back=${'/major/todo'}`)
       }else{
-        this.$router.push(`/major/todo/detail?id=${row.businessId}&doWorkflow=${true}&currentNodeId=${row.currentNodeId}&currentNodeCode=${row.nodeCode}&back=${'/major/todo'}`)
+        this.$router.push(`/major/todo/detail?id=${row.businessId}&orderId=${row.orderId}&doWorkflow=${true}&currentNodeId=${row.currentNodeId}&currentNodeCode=${row.nodeCode}&back=${'/major/todo'}`)
       }
     },
 

+ 17 - 0
src/views/personal/readonlyDetail.vue

@@ -905,6 +905,23 @@ export default {
     SellingAbilityInfo
   },
   watch: {
+    $route(to, from) {
+      if (to.path === from.path){
+        this.personalId = this.$route.query.id;
+        this.businessSubId = this.$route.query.orderId;
+        this.nodeName = this.$route.query.currentNodeName;
+        this.nodeBusinessInfo.doWorkflow = false
+        this.nodeBusinessInfo.businessId = this.$route.query.id;
+        this.nodeBusinessInfo.businessSubId = this.$route.query.orderId;
+        this.getPersonalTarget();
+        this.getPersonal();
+        this.getOutWardStaffList();
+        this.getWorkflowLogs();
+        this.getCurrentNodeInfo();
+        this.getProductions();
+        this.getScene();
+      }
+    },
     personal: {
       handler(newVal, oldVal) {
         if (newVal.outwardStaff) {

+ 19 - 0
src/views/personal/todoDetail.vue

@@ -1094,6 +1094,25 @@ export default {
     SellingAbilityInfo
   },
   watch: {
+    $route(to, from) {
+      if (to.path === from.path){
+        this.personalId = to.query.id;
+        this.businessSubId = to.query.orderId;
+        this.isOnline = to.query.isOnline === 'true';
+        this.nodeBusinessInfo.currentNodeInstanceCode = to.query.currentNodeCode;
+        this.nodeBusinessInfo.doWorkflow = to.query.doWorkflow === 'true';
+        this.nodeBusinessInfo.businessId = to.query.id;
+        this.nodeBusinessInfo.businessSubId = to.query.orderId;
+        this.activeTagName = this.jumpTabs();
+        this.getPersonalTarget();
+        this.getPersonal();
+        this.getOutWardStaffList();
+        this.getWorkflowLogs();
+        this.getCurrentNodeInfo();
+        this.getProductions();
+        this.getScene();
+      }
+    },
     personal: {
       handler(newVal, oldVal) {
         if (newVal.outwardStaff) {

+ 2 - 0
src/views/personal/todoList.vue

@@ -332,6 +332,8 @@ export default {
           }
       else{
         this.$router.push(`/personal/todo?id=${row.businessId}&currentNodeCode=${row.nodeCode}&orderId=${row.orderId}&doWorkflow=${true}&isOnline=${row.isOnline}&back=${'/personal/todo/list'}`)
+        // window.open(this.$router.resolve(`/personal/todo?id=${row.businessId}&currentNodeCode=${row.nodeCode}&orderId=${row.orderId}&doWorkflow=${true}&isOnline=${row.isOnline}&back=${'/personal/todo/list'}`).href,
+        // '_blank');
       }
     },