|
@@ -52,10 +52,10 @@
|
|
|
<el-cascader
|
|
|
class="item-width-300"
|
|
|
v-model="setQuery.goodsCateId"
|
|
|
- show-all-levels
|
|
|
+ :show-all-levels="false"
|
|
|
+ placeholder=""
|
|
|
:options="typeOptions"
|
|
|
- :props="{ value: 'id', label: 'cateName', children: 'child' }"
|
|
|
- clearable
|
|
|
+ :props="{ value: 'id', label: 'cateName', children: 'child', emitPath: false }"
|
|
|
></el-cascader>
|
|
|
</el-form-item>
|
|
|
|
|
@@ -736,9 +736,21 @@ export default Vue.extend({
|
|
|
getData() {
|
|
|
getData().then((res) => {
|
|
|
if (res.state == "Success") {
|
|
|
- this.typeOptions = res.content;
|
|
|
+ this.typeOptions = res.content.map(e=>{
|
|
|
+ try{
|
|
|
+ e.child.map(
|
|
|
+ r=>{
|
|
|
+ delete r.child
|
|
|
+ return r
|
|
|
+ }
|
|
|
+ )
|
|
|
+ }catch(e){
|
|
|
+ console.log(e);
|
|
|
+ }
|
|
|
+ return e
|
|
|
+ });
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
// 规则
|
|
|
getRuleList() {
|
|
@@ -765,9 +777,7 @@ export default Vue.extend({
|
|
|
this.loading = false;
|
|
|
if (res.state == "Success") {
|
|
|
this.setQuery = res.content;
|
|
|
- this.setQuery.goodsCateId = this.setQuery.goodsCateId
|
|
|
- .split(",")
|
|
|
- .map((item) => Number(item));
|
|
|
+ this.setQuery.goodsCateId = Number(this.setQuery.goodsCateId);
|
|
|
// 初始化购买设置
|
|
|
if (!this.setQuery.goodsSets.length) {
|
|
|
this.setQuery.goodsSets = [];
|