shish 2 vuotta sitten
vanhempi
commit
58dcdd7a7b
2 muutettua tiedostoa jossa 5 lisäystä ja 10 poistoa
  1. 1 3
      pt/src/views/item-class/list.vue
  2. 4 7
      pt/src/views/item/list.vue

+ 1 - 3
pt/src/views/item-class/list.vue

@@ -159,14 +159,12 @@ export default {
 		handleClick(tab, e) {
 		handleClick(tab, e) {
 			this.app.refresh({ type: this.tabIndex });
 			this.app.refresh({ type: this.tabIndex });
 		},
 		},
-		//添加花材
 		getItemList(data) {
 		getItemList(data) {
 			let query = {};
 			let query = {};
 			query.classId = data.id
 			query.classId = data.id
-			query.tabName = data.name
+			query.className = data.name
 			this.$router.push({ path: '/item/list', query });
 			this.$router.push({ path: '/item/list', query });
 		},
 		},
-		// x-crud 组件
 		onLoad({ ctx, app }) {
 		onLoad({ ctx, app }) {
 			this.app = app;
 			this.app = app;
 			ctx.service(this.$service.itemClass)
 			ctx.service(this.$service.itemClass)

+ 4 - 7
pt/src/views/item/list.vue

@@ -509,10 +509,7 @@ export default {
 			this.app = app;
 			this.app = app;
 			if (this.$route.query.classId) {
 			if (this.$route.query.classId) {
 				this.classId = this.$route.query.classId;
 				this.classId = this.$route.query.classId;
-				if (this.$route.query.name != '') {
-					this.tabsData[0].text = this.$route.query.tabName;
-					this.$forceUpdate();
-				}
+				this.currentItemClassName = this.$route.query.className ? this.$route.query.className : ''
 			}
 			}
 			ctx.service(this.$service.item)
 			ctx.service(this.$service.item)
 				.set('table', {
 				.set('table', {
@@ -607,16 +604,16 @@ export default {
 				})
 				})
 				.set('dict', {
 				.set('dict', {
 					search: {
 					search: {
-						keyWord: 'name',
+						keyWord:'name',
 					},
 					},
 				})
 				})
 				.set('search', {
 				.set('search', {
 					key: {
 					key: {
-						placeholder: '花材名称',
+						placeholder:'花材名称',
 					},
 					},
 				})
 				})
 				.set('pagination', {
 				.set('pagination', {
-					size:50
+					size:20
 				})
 				})
 				.set('layout', [
 				.set('layout', [
 					['slot-tabs'],
 					['slot-tabs'],