|
|
@@ -21,10 +21,13 @@
|
|
|
</el-button>
|
|
|
</page-title>
|
|
|
<div class="filters-container">
|
|
|
- <el-radio-group v-model="platform" size="small" class="filter-item">
|
|
|
- <el-radio-button label="iOS"></el-radio-button>
|
|
|
- <el-radio-button label="Android"></el-radio-button>
|
|
|
- </el-radio-group>
|
|
|
+ <el-select v-model="platform" size="small" class="filter-item">
|
|
|
+ <el-option label="iOS" value="iOS">iOS</el-option>
|
|
|
+ <el-option label="Android" value="Android">Android</el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-select v-model="channel" size="small" class="filter-item">
|
|
|
+ <el-option v-for="item in channels" :key="item" :label="item" :value="item"></el-option>
|
|
|
+ </el-select>
|
|
|
<el-input
|
|
|
placeholder="搜索..."
|
|
|
v-model="search"
|
|
|
@@ -101,7 +104,9 @@ export default {
|
|
|
search: '',
|
|
|
url: '/appVersion/all',
|
|
|
downloading: false,
|
|
|
- platform: 'iOS'
|
|
|
+ platform: 'iOS',
|
|
|
+ channels: ['default', 'huawei', 'oppo', 'vivo', 'xiaomi', 'qq'],
|
|
|
+ channel: 'default'
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -110,8 +115,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ beforeCreated() {
|
|
|
+ if (this.$route.query.platform) {
|
|
|
+ this.platform = this.$route.query.platform;
|
|
|
+ }
|
|
|
+ if (this.$route.query.channel) {
|
|
|
+ this.channel = this.$route.query.channel;
|
|
|
+ }
|
|
|
+ },
|
|
|
beforeGetData() {
|
|
|
- return { search: this.search, query: { del: false, platform: this.platform } };
|
|
|
+ return { search: this.search, query: { del: false, platform: this.platform, channel: this.channel } };
|
|
|
},
|
|
|
toggleMultipleMode(multipleMode) {
|
|
|
this.multipleMode = multipleMode;
|
|
|
@@ -187,9 +200,17 @@ export default {
|
|
|
watch: {
|
|
|
platform() {
|
|
|
this.getData();
|
|
|
+ this.$router
|
|
|
+ .replace({ ...this.$route, query: { ...this.$route.query, platform: this.platform } })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
+ channel() {
|
|
|
+ this.getData();
|
|
|
+ this.$router
|
|
|
+ .replace({ ...this.$route, query: { ...this.$route.query, channel: this.channel } })
|
|
|
+ .catch(() => {});
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
-<style lang="less" scoped>
|
|
|
-</style>
|
|
|
+<style lang="less" scoped></style>
|