shish 2 tahun lalu
induk
melakukan
0c5bd6ca21
2 mengubah file dengan 5 tambahan dan 3 penghapusan
  1. 2 2
      pt/src/views/cp/cp-class.vue
  2. 3 1
      pt/src/views/cp/list.vue

+ 2 - 2
pt/src/views/cp/cp-class.vue

@@ -71,8 +71,8 @@ export default {
 			this.app.refresh({ type: this.tabIndex });
 			this.app.refresh({ type: this.tabIndex });
 		},
 		},
 		getCpList(info) {
 		getCpList(info) {
-			let query = {classId:info.id,className:info.name};
-			this.$router.push({ path: '/cp/list', query });
+			let query = {classId:info.id,className:info.name}
+			this.$router.push({ path: '/cp/list', query })
 		},
 		},
 		onLoad({ ctx, app }) {
 		onLoad({ ctx, app }) {
 			this.app = app;
 			this.app = app;

+ 3 - 1
pt/src/views/cp/list.vue

@@ -39,7 +39,7 @@
 			</template>
 			</template>
 
 
 			<template #slot-cp-class="{scope}">
 			<template #slot-cp-class="{scope}">
-				<el-select size="mini" v-model="currentCpClassId" placeholder="请选分类" style="width:150px;margin-right:10px;" @change="getCpClass" clearable>
+				<el-select size="mini" v-model="currentCpClassName" placeholder="请选分类" style="width:150px;margin-right:10px;" @change="getCpClass" clearable>
 					<el-option v-for="item in cpClassData" :key="item.value" :label="item.name" :value="item.id"> </el-option>
 					<el-option v-for="item in cpClassData" :key="item.value" :label="item.name" :value="item.id"> </el-option>
 				</el-select>				
 				</el-select>				
 			</template>
 			</template>
@@ -68,6 +68,7 @@ export default {
 	data() {
 	data() {
 		return {
 		return {
 			cpClassData:[],
 			cpClassData:[],
+			currentCpClassName:'',
 			currentCpClassId:'',
 			currentCpClassId:'',
 			app: null,
 			app: null,
 			sortLink: '',
 			sortLink: '',
@@ -112,6 +113,7 @@ export default {
 			this.app = app;
 			this.app = app;
 			if (this.$route.query.classId) {
 			if (this.$route.query.classId) {
 				this.currentCpClassId = this.$route.query.classId
 				this.currentCpClassId = this.$route.query.classId
+				this.currentCpClassName = this.$route.query.className
 			}
 			}
 			ctx.service(this.$service.cp)
 			ctx.service(this.$service.cp)
 				.set('table', {
 				.set('table', {