|
|
@@ -42,7 +42,7 @@
|
|
|
</template>
|
|
|
|
|
|
<template #slot-cp-class="{scope}">
|
|
|
- <el-select size="mini" v-model="currentCpClassId" placeholder="请选分类" style="width:150px;margin-right:10px;" @change="getCpClass">
|
|
|
+ <el-select size="mini" v-model="currentCpClassId" 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-select>
|
|
|
</template>
|
|
|
@@ -131,12 +131,8 @@ export default {
|
|
|
},
|
|
|
onLoad({ ctx, app }) {
|
|
|
this.app = app;
|
|
|
- if (this.$route.query.catId) {
|
|
|
- this.catId = this.$route.query.catId;
|
|
|
- if (this.$route.query.name != '') {
|
|
|
- this.tabsData[0].text = this.$route.query.tabName;
|
|
|
- this.$forceUpdate();
|
|
|
- }
|
|
|
+ if (this.$route.query.classId) {
|
|
|
+ this.currentCpClassId = this.$route.query.classId
|
|
|
}
|
|
|
ctx.service(this.$service.cp)
|
|
|
.set('table', {
|
|
|
@@ -224,12 +220,11 @@ export default {
|
|
|
['flex1', 'pagination'],
|
|
|
])
|
|
|
.done();
|
|
|
- app.refresh({ classStyle:this.classStyle,classId:this.currentCpClassId })
|
|
|
-
|
|
|
- this.$service.cpClass.getMenu().then(res=>{
|
|
|
- this.cpClassData = res.list ? res.list : []
|
|
|
- })
|
|
|
+ app.refresh({ classStyle:this.classStyle,classId:this.currentCpClassId })
|
|
|
|
|
|
+ this.$service.cpClass.getMenu().then(res=>{
|
|
|
+ this.cpClassData = res.list ? res.list : []
|
|
|
+ })
|
|
|
},
|
|
|
showSort(e) {
|
|
|
this.sort.status = true;
|