|
@@ -5,21 +5,23 @@
|
|
|
ref="form"
|
|
|
:inline="true"
|
|
|
:model="searchForm"
|
|
|
+ :rules="formRules"
|
|
|
clearable
|
|
|
class="mt-10">
|
|
|
- <!--TODO 用户ID查找歌曲时,建议回传用户信息-->
|
|
|
- <el-form-item label="用户ID:">
|
|
|
+ <el-form-item label="用户ID:"
|
|
|
+ prop="id"
|
|
|
+ :rules="formRules.required">
|
|
|
<el-input v-model="searchForm.id" placeholder="请输入用户ID" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item class="ml-10">
|
|
|
- <el-button icon="el-icon-search" type="primary" @click="searchSubmit">查询</el-button>
|
|
|
+ <el-button icon="el-icon-search" type="primary" @click="handleSearch">查询</el-button>
|
|
|
</el-form-item>
|
|
|
<el-form-item class="ml-10">
|
|
|
<el-button icon="el-icon-plus" type="primary" @click="add">新增</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
- <h3 class="marginT-10">{{ decodeURIComponent($route.query.name) }}的曲库</h3>
|
|
|
+ <h3 class="marginT-10">{{ user_song_name }}的曲库</h3>
|
|
|
<el-table :data="tableData"
|
|
|
stripe
|
|
|
v-loading="tableLoading"
|
|
@@ -82,7 +84,8 @@ export default {
|
|
|
},
|
|
|
searchForm: {},
|
|
|
tableData: [],
|
|
|
- tableUrl: '/v1/user/song/list'
|
|
|
+ tableUrl: '/v1/user/song/list',
|
|
|
+ user_song_name: ''
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -106,6 +109,13 @@ export default {
|
|
|
this.init()
|
|
|
}
|
|
|
}).catch(() => {})
|
|
|
+ },
|
|
|
+ handleSearch () {
|
|
|
+ this.$refs.form.validate(async valid => {
|
|
|
+ if (valid) {
|
|
|
+ this.searchSubmit()
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|