...
|
...
|
@@ -5,7 +5,7 @@ |
|
|
<Row>
|
|
|
<Col :span="6"><label class="field-label">{{fieldSort.first.label}}:</label></Col>
|
|
|
<Col :span="18">
|
|
|
<Select v-model="sortId.first" :placeholder="fieldSort.first.holder" @on-change="firstChange">
|
|
|
<Select v-model="_firstModel" :placeholder="fieldSort.first.holder" @on-change="firstChange" clearable>
|
|
|
<Option v-for="option in firstList" :value="option.sortId" :key="option.sortId">
|
|
|
{{option.sortName}}
|
|
|
</Option>
|
...
|
...
|
@@ -17,7 +17,7 @@ |
|
|
<Row>
|
|
|
<Col :span="6"><label class="field-label">{{fieldSort.second.label}}:</label></Col>
|
|
|
<Col :span="18">
|
|
|
<Select v-model="sortId.second" :placeholder="fieldSort.second.holder" @on-change="secondChange">
|
|
|
<Select v-model="_secondModel" :placeholder="fieldSort.second.holder" @on-change="secondChange" clearable>
|
|
|
<Option v-for="option in secondList" :value="option.sortId" :key="option.sortId">
|
|
|
{{option.sortName}}
|
|
|
</Option>
|
...
|
...
|
@@ -29,7 +29,7 @@ |
|
|
<Row>
|
|
|
<Col :span="6"><label class="field-label">{{fieldSort.third.label}}:</label></Col>
|
|
|
<Col :span="18">
|
|
|
<Select v-model="sortId.third" :placeholder="fieldSort.third.holder" @on-change="thirdChange">
|
|
|
<Select v-model="_thirdModel" :placeholder="fieldSort.third.holder" @on-change="thirdChange" clearable>
|
|
|
<Option v-for="option in thirdList" :value="option.sortId" :key="option.sortId">
|
|
|
{{option.sortName}}
|
|
|
</Option>
|
...
|
...
|
@@ -50,6 +50,9 @@ |
|
|
props: {
|
|
|
fieldSort: {
|
|
|
type: Object
|
|
|
},
|
|
|
firstModel: {
|
|
|
type: [String, Number]
|
|
|
}
|
|
|
},
|
|
|
data() {
|
...
|
...
|
@@ -66,28 +69,44 @@ |
|
|
}
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
_firstModel() {
|
|
|
return this.fieldSort.first.model;
|
|
|
},
|
|
|
_secondModel() {
|
|
|
return this.fieldSort.second.model;
|
|
|
},
|
|
|
_thirdModel() {
|
|
|
return this.fieldSort.third.model;
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
this.getSortInfo({level: 1});
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
firstChange(val) {
|
|
|
this.sortId.first = val;
|
|
|
this.getSortInfo({
|
|
|
level: 2,
|
|
|
sortId: this.sortId.first
|
|
|
});
|
|
|
this.showSecond = true;
|
|
|
level: 2,
|
|
|
sortId: val
|
|
|
});
|
|
|
|
|
|
this.showSecond = val !== '' && val !== null;
|
|
|
this.$emit('on-change', this.sortId);
|
|
|
},
|
|
|
secondChange(val) {
|
|
|
this.sortId.second = val;
|
|
|
this.getSortInfo({
|
|
|
level: 3,
|
|
|
sortId: this.sortId.second
|
|
|
});
|
|
|
this.showThird = true;
|
|
|
level: 3,
|
|
|
sortId: val
|
|
|
});
|
|
|
|
|
|
this.showThird = val !== '' && val !== null;
|
|
|
this.$emit('on-change', this.sortId);
|
|
|
},
|
|
|
thirdChange(val) {
|
|
|
this.sortId.third = val;
|
|
|
this.$emit('on-change', this.sortId);
|
|
|
},
|
|
|
getSortInfo(params) {
|
...
|
...
|
|