Explorar o código

供货商后台-花材列表-分页

jf %!s(int64=5) %!d(string=hai) anos
pai
achega
742664413c
Modificáronse 1 ficheiros con 2 adicións e 23 borrados
  1. 2 23
      ghs/src/views/item/list.vue

+ 2 - 23
ghs/src/views/item/list.vue

@@ -308,7 +308,6 @@ export default {
     addFn () {
     addFn () {
       this.showItemModal = true
       this.showItemModal = true
     },
     },
-    uploadSuccess() {},
     selClassFn(val) {
     selClassFn(val) {
 			let index = this.itemClassList.findIndex((e) => e.name == val);
 			let index = this.itemClassList.findIndex((e) => e.name == val);
 			this.replaceForm.classId = this.itemClassList[index].id;
 			this.replaceForm.classId = this.itemClassList[index].id;
@@ -329,29 +328,8 @@ export default {
       this.app.refresh({ classId: this.classId });
       this.app.refresh({ classId: this.classId });
     },
     },
     onLoad ({ ctx, app }) {
     onLoad ({ ctx, app }) {
-
-      if (this.$route.query.classId) {
-        this.classId = Number(this.$route.query.classId)
-        this.className = this.$route.query.className
-        this.tabsData[0].text = this.className
-      }
-
       this.app = app
       this.app = app
-
-      let getItem = () => {
-        return this.$service.product.list({ classId: this.classId, showPage: 1}).then(res => {
-          return {
-            ...res,
-            pagination: {
-              totalPage: res.totalPage,
-              total: parseInt(res.totalNum),
-            }
-			    };
-		    });
-      }
-      ctx.service({
-        page: getItem
-      })
+      ctx.service(this.$service.product)
         .set('table', {
         .set('table', {
           columns: [
           columns: [
             {
             {
@@ -455,6 +433,7 @@ export default {
         ])
         ])
         .done();
         .done();
       app.refresh({ classId: this.classId });
       app.refresh({ classId: this.classId });
+      app.refresh({ showPage: 1 });
     },
     },
     uploadSuccess() {
     uploadSuccess() {
 			console.log(this.$refs['replaceForm'].validateField('cover'))
 			console.log(this.$refs['replaceForm'].validateField('cover'))