shish 2 лет назад
Родитель
Сommit
c09e013252
2 измененных файлов с 19 добавлено и 4 удалено
  1. 7 2
      pt/src/views/cp/pt-list.vue
  2. 12 2
      pt/src/views/item/list.vue

+ 7 - 2
pt/src/views/cp/pt-list.vue

@@ -139,7 +139,6 @@ export default {
 			tabsData: [
 				{ text: '产品列表', key: '0', }
 			],
-			selects: {},
 			sort: {
 				status: false,
 			},
@@ -171,7 +170,8 @@ export default {
 					required: true,
 					message: '请选择分类',
 				}
-			}
+			},
+			selects:{ids:[]}
 		};
 	},
 	computed: {},
@@ -326,6 +326,11 @@ export default {
 							minWidth: 150,
 						},
 					],
+					on: {
+						'selection-change': selection => {
+							this.selects.ids = selection.map(e => e.id)
+						}
+					},
 					op: {
 						visible: true,
 						props: {

+ 12 - 2
pt/src/views/item/list.vue

@@ -167,7 +167,6 @@ export default {
 			operateData: {},
 			tabIndex: '0',
 			tabsData: [{text:'花材列表',key:'0'}],
-			selects: {},
 			sort: { status: false, },
 			classId: 0,
 			cpId:0,
@@ -234,7 +233,8 @@ export default {
 			currentCpClassName:'',
 			currentItemClassName:'',
 			cpClassData:[],
-			cpClassStyle:"-1"
+			cpClassStyle:"-1",
+			selects:{ids:[]}
 		};
 	},
 	computed: {},
@@ -390,6 +390,11 @@ export default {
 			ctx.service(this.$service.item)
 				.set('table', {
 					columns: [
+						{
+							type: 'selection',
+							align: 'center',
+							width: '60'
+						},
 						{
 							prop: 'id',
 							label: 'ID',
@@ -444,6 +449,11 @@ export default {
 							minWidth: 180,
 						},
 					],
+					on: {
+						'selection-change': selection => {
+							this.selects.ids = selection.map(e => e.id)
+						}
+					},
 					op: {
 						visible: true,
 						props: {