|
@@ -31,10 +31,13 @@
|
|
<el-button type="primary" icon="el-icon-search" @click="getSearch">搜索</el-button>
|
|
<el-button type="primary" icon="el-icon-search" @click="getSearch">搜索</el-button>
|
|
<el-button icon="el-icon-refresh" @click="getRefresh">重置</el-button>
|
|
<el-button icon="el-icon-refresh" @click="getRefresh">重置</el-button>
|
|
<el-button type="primary" plain icon="el-icon-plus" @click="getDetail()">新增</el-button>
|
|
<el-button type="primary" plain icon="el-icon-plus" @click="getDetail()">新增</el-button>
|
|
|
|
+ <el-button type="primary" :disabled="obj.id === ''" @click="getChange(obj, 1)">批量上架</el-button>
|
|
|
|
+ <el-button type="primary" :disabled="obj.id === ''" @click="getChange(obj, 2)">批量下架</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
- <el-table :data="tableData" v-loading="loading">
|
|
|
|
|
|
+ <el-table :data="tableData" v-loading="loading" @selection-change="handleSelect">
|
|
|
|
+ <el-table-column type="selection" align="center" />
|
|
<el-table-column label="ID" prop="id" align="center" show-overflow-tooltip />
|
|
<el-table-column label="ID" prop="id" align="center" show-overflow-tooltip />
|
|
<el-table-column label="电台名称" prop="name" align="center" show-overflow-tooltip />
|
|
<el-table-column label="电台名称" prop="name" align="center" show-overflow-tooltip />
|
|
<el-table-column label="电台封面" align="center" width="100px">
|
|
<el-table-column label="电台封面" align="center" width="100px">
|
|
@@ -89,7 +92,12 @@ export default {
|
|
// 内容分类
|
|
// 内容分类
|
|
contentOptions: [],
|
|
contentOptions: [],
|
|
// 地域分类
|
|
// 地域分类
|
|
- addressOptions: []
|
|
|
|
|
|
+ addressOptions: [],
|
|
|
|
+ // 批量上下架
|
|
|
|
+ obj: {
|
|
|
|
+ id: '',
|
|
|
|
+ name: '已选数据'
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -166,6 +174,12 @@ export default {
|
|
}).catch(() => { })
|
|
}).catch(() => { })
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ // 多选
|
|
|
|
+ handleSelect(e) {
|
|
|
|
+ this.obj.id = ''
|
|
|
|
+ e.map((item, index) => this.obj.id += item.id + ((index + 1) < e.length ? ',' : ''))
|
|
|
|
+ },
|
|
|
|
+
|
|
// 字典翻译
|
|
// 字典翻译
|
|
platformFormatter(row) {
|
|
platformFormatter(row) {
|
|
return this.selectDictLabel(this.platformOptions, row.platformId)
|
|
return this.selectDictLabel(this.platformOptions, row.platformId)
|