Selaa lähdekoodia

电签分类选择修改

duy 2 vuotta sitten
vanhempi
commit
bace37a8ca
2 muutettua tiedostoa jossa 28 lisäystä ja 7 poistoa
  1. 14 5
      src/views/certificate/list.vue
  2. 14 2
      src/views/certificate/lists/addList.vue

+ 14 - 5
src/views/certificate/list.vue

@@ -137,9 +137,11 @@ export default {
       this.$router.push({
         path: '/certificate/list/addList',
         query: {
-          id
+          id,
+          value:this.value
         }
       })
+      console.log(this.value,'value');
     },
     //#endregion
 
@@ -178,18 +180,22 @@ export default {
     },
     async queryProjectList () {//获取所有项目
       const { data: res } = await queryProjectList()
-      console.log(res);
       if (res.code == 200) {
         this.options = res.data
-        this.value=this.options[0].id
+        if(this.$route.query.value){
+          this.value=this.$route.query.value
+        }else{
+          this.value= this.value=this.options[0].id
+        }
         this.listpage()
+      
       }
     },
     async listpage () {//分页获取证书列表数据
       const { data: res } = await listpage({
         current: this.pageindex,
         size: this.pagesize,
-        projectId: this.value||"",
+        projectId: this.value,
       })
      
       if (res.code == 200) {
@@ -212,7 +218,10 @@ export default {
   },
   created () {
     this.queryProjectList()
-    // this.listpage()
+
+   
+   
+    
   },
 }
 </script>

+ 14 - 2
src/views/certificate/lists/addList.vue

@@ -451,7 +451,13 @@ export default {
           type: 'success',
           message: '新增电签成功!'
         })
-        this.$router.push('/certificate/list')
+        // this.$router.push('/certificate/list')
+        this.$router.push({
+          path: '/certificate/list',
+          query: {
+            value:this.$route.query.value
+          }
+        })
       }
     },
     async findUserByName () { //关联用户
@@ -509,7 +515,13 @@ export default {
           type: 'success',
           message: '修改电签成功!'
         })
-        this.$router.push('/certificate/list')
+        // this.$router.push('/certificate/list')
+        this.$router.push({
+          path: '/certificate/list',
+          query: {
+            value:this.$route.query.value
+          }
+        })
       }
     },
     //#endregion