Sfoglia il codice sorgente

修改返回值问题

yyfang 3 anni fa
parent
commit
afc9464d16

+ 25 - 5
src/components/admin/getJcds.vue

@@ -24,11 +24,11 @@
                 :current-page="queryInfo.pageNum" :page-sizes="[10, 15, 20]" :page-size="queryInfo.pageSize"
                 layout="total, sizes, prev, pager, next, jumper" :total="total" background />
         <!-- 返回按钮 -->
-            <!-- <div class="btns">
+            <div class="btns">
                 <el-button plain size="medium" @click="returnTask()" >
                     返回
                 </el-button>
-            </div> -->
+            </div>
     </div>
 </template>
 
@@ -78,16 +78,36 @@ export default {
 	methods: {
         //返回
         returnTask(){
+            console.log(this.parentName)
             if(this.parentName == '例行监测'){
                 this.$router.push({
                     name:'routineMonitor',
-                    params:{id:this.$route.params.id}
+                    params:{
+                        task_id:this.$route.params.id
+                        }
                 })
             }
-            if(this.parentName == '专项监测'){
+            else if(this.parentName == '专项监测'){
                  this.$router.push({
                     name:'specialMonitor',
-                    params:{id:this.$route.params.id}
+                    params:{
+                        task_id:this.$route.params.id
+                        }
+                })
+            }
+            else if(this.parentName == '监督抽查'){
+                 this.$router.push({
+                    name:'checkMonitor',
+                    params:{
+                        task_id:this.$route.params.id
+                        }
+                })
+            }else{
+                 this.$router.push({
+                    name:'reTask',
+                    params:{
+                        task_id:this.$route.params.id
+                        }
                 })
             }
         },

+ 1 - 1
src/components/admin/readCheck.vue

@@ -142,7 +142,7 @@
 				this.$router.push({
 					name: 'readCheckList',
 					params: {
-						id: this.$route.params.task_id,
+						task_id: this.$route.params.task_id,
 						task_profile_id: this.$route.params.task_profile_id
 					}
 				})

+ 3 - 2
src/components/admin/readCheckList.vue

@@ -5,7 +5,6 @@
 	    <div slot="header" class="clearfix">
             <el-breadcrumb separator-class="el-icon-arrow-right">		
             <el-breadcrumb-item >首页</el-breadcrumb-item>
-            <el-breadcrumb-item>例行监测</el-breadcrumb-item>
             <el-breadcrumb-item>查看检测单列表</el-breadcrumb-item>
             </el-breadcrumb>
 		</div>
@@ -227,7 +226,9 @@ export default{
             this.$router.push({
                 name:'readCheck',
                 params:{
-                   jcd_id: id
+                   jcd_id: id,
+                   task_id:this.$route.params.task_id,
+                   task_profile_id:this.$route.params.task_profile_id
                 }
             })
         },

+ 1 - 1
src/components/admin/routineMonitor.vue

@@ -305,7 +305,7 @@
 		},
 		created() {
 			this.getTasks()
-			this.task_id = this.$route.params.id
+			this.task_id = this.$route.params.task_id
 		},
 		methods: {
 			//新增

+ 6 - 0
src/router/index.js

@@ -31,14 +31,17 @@ const routes = [{
 		component: () => import('../components/admin'),
 		children: [{
 				path: '/admin/routineMonitor',
+				name:'routineMonitor',
 				component: () => import('../components/admin/routineMonitor')
 			},
 			{
 				path: '/admin/checkMonitor',
+				name:'checkMonitor',
 				component: () => import('../components/admin/checkMonitor')
 			},
 			{
 				path: '/admin/specialMonitor',
+				name:'specialMonitor',
 				component: () => import('../components/admin/specialMonitor')
 			},
 			{
@@ -49,10 +52,12 @@ const routes = [{
 			
 			{
 				path: '/admin/recheckMonitor',
+				name:'recheckMonitor',
 				component: () => import('../components/admin/recheckMonitor')
 			},
 			{
 				path: '/admin/addSpecialTask',
+				name:'addSpecialTask',
 				component: () => import('../components/admin/addSpecialTask')
 			},
 			{
@@ -66,6 +71,7 @@ const routes = [{
 			},{
 
 				path: '/admin/leadReport',
+				name:'leadReport',
 				component: () => import('../components/admin/leadReport')
 			},{
 				path: '/admin/undertakeReport',