|
@@ -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'))
|