shish %!s(int64=2) %!d(string=hai) anos
pai
achega
1d5c43cda0
Modificáronse 2 ficheiros con 15 adicións e 7 borrados
  1. 9 6
      pt/src/views/cp/pt-list.vue
  2. 6 1
      pt/src/views/item/list.vue

+ 9 - 6
pt/src/views/cp/pt-list.vue

@@ -385,7 +385,7 @@ export default {
 				})
 				.set('dict', {
 					search: {
-					keyWord: 'search'
+						keyWord: 'search'
 					}
 				})
 				.set('search', {
@@ -402,11 +402,14 @@ export default {
 					this.cpInfoList = list
 				})
 				.done();
-			app.refresh({ classStyle:this.classStyle,classId:this.currentCpClassId })
-
-			this.$service.ptCpClass.getMenu().then(res=>{
-				this.cpClassData = res.list ? res.list : []
-			})
+				if (this.$route.query.serarchCpName) {
+					app.refresh({ classStyle:this.classStyle,classId:this.currentCpClassId,search:this.$route.query.serarchCpName })
+				}else{
+					app.refresh({ classStyle:this.classStyle,classId:this.currentCpClassId })
+				}
+				this.$service.ptCpClass.getMenu().then(res=>{
+					this.cpClassData = res.list ? res.list : []
+				})
 		},
 		showSort(e) {
 			this.sort.status = true;

+ 6 - 1
pt/src/views/item/list.vue

@@ -28,7 +28,7 @@
 			</template>
 
 			<template #table-column-cpName="{ scope }">
-				<div v-for="(item, index) in scope.row.cpList" :key="index">
+				<div v-for="(item, index) in scope.row.cpList" :key="index" @click="goCpList(item)">
 					<i class="el-icon-success" size="medium" v-if="item.auth == 1" style="margin-right:2px;"></i>{{item.name}}
 				</div>
 			</template>
@@ -322,6 +322,11 @@ export default {
 	},
 	computed: {},
 	methods: {
+		goCpList(data){
+			let query = {};
+			query.serarchCpName = data.name
+			this.$router.push({ path: '/cp/pt-list', query});
+		},
 		searchSelectCp(e){
 			this.selectCpId = e
 		},