|
@@ -10,24 +10,23 @@
|
|
|
>
|
|
|
<el-form-item>
|
|
|
<el-input
|
|
|
- placeholder="乐器编号"
|
|
|
+ placeholder="具体型号"
|
|
|
clearable
|
|
|
@keyup.enter.native="onSearch"
|
|
|
v-model.trim="searchForm.vipGroupName"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item>
|
|
|
+ <el-form-item prop="goodsCategoryId">
|
|
|
<el-select
|
|
|
- placeholder="请选择乐器类型"
|
|
|
- v-model="searchForm.subjectId"
|
|
|
+ v-model.trim="searchForm.goodsCategoryId"
|
|
|
clearable
|
|
|
- filterable
|
|
|
+ placeholder="商品分类"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="(item, index) in soundLists"
|
|
|
- :label="item.name"
|
|
|
- :value="item.id"
|
|
|
+ v-for="(item, index) in categoryList"
|
|
|
:key="index"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -36,7 +35,7 @@
|
|
|
v-model.trim="searchForm.attendanceStatus"
|
|
|
filterable
|
|
|
clearable
|
|
|
- placeholder="乐器编号"
|
|
|
+ placeholder="是否乐保"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="(item, index) in typeList"
|
|
@@ -61,21 +60,16 @@
|
|
|
:header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
:data="tableList"
|
|
|
>
|
|
|
- <el-table-column label="乐器编号" align="center" prop="id">
|
|
|
+ <el-table-column label="具体型号" align="center" prop="id">
|
|
|
<template slot-scope="scope">
|
|
|
<copy-text>{{ scope.row.id }}</copy-text>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="乐器名称" align="center" prop="name">
|
|
|
+ <el-table-column label="乐器分类" align="center" prop="name">
|
|
|
<template slot-scope="scope">
|
|
|
<copy-text>{{ scope.row.name }}</copy-text>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="乐器种类" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.status | courseGroup }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
<el-table-column label="是否乐保" align="center" prop="teacherName">
|
|
|
</el-table-column>
|
|
|
<el-table-column label="乐保有效期" align="center" prop="studentNum">
|
|
@@ -109,13 +103,16 @@
|
|
|
import pagination from "@/components/Pagination/index";
|
|
|
import addMusic from "../modals/addMusic";
|
|
|
import { getSoundTree } from "@/api/buildTeam";
|
|
|
+import { categoryListTree } from "@/api/businessManager";
|
|
|
export default {
|
|
|
components: { pagination, addMusic },
|
|
|
data() {
|
|
|
return {
|
|
|
soundLists: [],
|
|
|
tableList: [],
|
|
|
- searchForm: {},
|
|
|
+ searchForm: {
|
|
|
+ goodsCategoryId: "",
|
|
|
+ },
|
|
|
pageInfo: {
|
|
|
// 分页规则
|
|
|
limit: 10, // 限制显示条数
|
|
@@ -124,17 +121,11 @@ export default {
|
|
|
page_size: [10, 20, 40, 50], // 选择限制显示条数
|
|
|
},
|
|
|
addMusicVisible: false,
|
|
|
+ typeList: [],
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
- getSoundTree({ tenantId: 1, rows: 9999 }).then((res) => {
|
|
|
- if (res.code == 200) {
|
|
|
- if (res.code == 200) {
|
|
|
- this.soundList = res.data.rows;
|
|
|
- this.getSound();
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
+ this.getCategory()
|
|
|
},
|
|
|
methods: {
|
|
|
onSearch() {},
|
|
@@ -143,13 +134,24 @@ export default {
|
|
|
addMusicSubmit() {
|
|
|
this.addMusicVisible = false;
|
|
|
},
|
|
|
- getSound() {
|
|
|
- this.soundLists = [];
|
|
|
- for (let i in this.soundList) {
|
|
|
- if (this.soundList[i].subjects.length > 0) {
|
|
|
- this.soundLists = this.soundLists.concat(this.soundList[i].subjects);
|
|
|
+ getCategory() {
|
|
|
+ let params = {
|
|
|
+ delFlag: 0,
|
|
|
+ rows: 9999,
|
|
|
+ };
|
|
|
+ categoryListTree(params).then((res) => {
|
|
|
+ let result = res.data;
|
|
|
+ if (res.code == 200) {
|
|
|
+ let tempArray = [];
|
|
|
+ result.rows.forEach((row) => {
|
|
|
+ tempArray.push({
|
|
|
+ label: row.name,
|
|
|
+ value: row.id,
|
|
|
+ });
|
|
|
+ });
|
|
|
+ this.categoryList = tempArray;
|
|
|
}
|
|
|
- }
|
|
|
+ });
|
|
|
},
|
|
|
},
|
|
|
};
|