|
@@ -18,16 +18,16 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<el-select
|
|
<el-select
|
|
- v-model.trim="searchForm.attendanceStatus"
|
|
|
|
- filterable
|
|
|
|
|
|
+ placeholder="请选择乐器类型"
|
|
|
|
+ v-model="searchForm.subjectId"
|
|
clearable
|
|
clearable
|
|
- placeholder="乐器种类"
|
|
|
|
|
|
+ filterable
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
- v-for="(item, index) in typeList"
|
|
|
|
|
|
+ v-for="(item, index) in soundLists"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.id"
|
|
:key="index"
|
|
:key="index"
|
|
- :label="item.label"
|
|
|
|
- :value="item.value"
|
|
|
|
></el-option>
|
|
></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -53,7 +53,9 @@
|
|
<el-button type="primary" native-type="reset">重置</el-button>
|
|
<el-button type="primary" native-type="reset">重置</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</save-form>
|
|
</save-form>
|
|
- <el-button @click="addMusicVisible = true" type="primary">新增乐器</el-button>
|
|
|
|
|
|
+ <el-button @click="addMusicVisible = true" type="primary"
|
|
|
|
+ >新增乐器</el-button
|
|
|
|
+ >
|
|
<div class="tableWrap">
|
|
<div class="tableWrap">
|
|
<el-table
|
|
<el-table
|
|
:header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
:header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
@@ -89,20 +91,29 @@
|
|
@pagination="getList"
|
|
@pagination="getList"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
- <el-dialog title="新增乐器"
|
|
|
|
- :visible.sync="addMusicVisible" v-if="addMusicVisible">
|
|
|
|
- <addMusic />
|
|
|
|
- </el-dialog>
|
|
|
|
|
|
+ <el-dialog
|
|
|
|
+ title="新增乐器"
|
|
|
|
+ width="600px"
|
|
|
|
+ :visible.sync="addMusicVisible"
|
|
|
|
+ v-if="addMusicVisible"
|
|
|
|
+ >
|
|
|
|
+ <addMusic />
|
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="addMusicVisible = false">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="addMusicSubmit">确 定</el-button>
|
|
|
|
+ </span>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
import pagination from "@/components/Pagination/index";
|
|
import pagination from "@/components/Pagination/index";
|
|
-import addMusic from "../modals/addMusic"
|
|
|
|
|
|
+import addMusic from "../modals/addMusic";
|
|
|
|
+import { getSoundTree } from "@/api/buildTeam";
|
|
export default {
|
|
export default {
|
|
- components:{pagination},
|
|
|
|
|
|
+ components: { pagination, addMusic },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- typeList: [],
|
|
|
|
|
|
+ soundLists: [],
|
|
tableList: [],
|
|
tableList: [],
|
|
searchForm: {},
|
|
searchForm: {},
|
|
pageInfo: {
|
|
pageInfo: {
|
|
@@ -112,14 +123,34 @@ export default {
|
|
total: 0, // 总条数
|
|
total: 0, // 总条数
|
|
page_size: [10, 20, 40, 50], // 选择限制显示条数
|
|
page_size: [10, 20, 40, 50], // 选择限制显示条数
|
|
},
|
|
},
|
|
- addMusicVisible:false
|
|
|
|
|
|
+ addMusicVisible: false,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- mounted() {},
|
|
|
|
|
|
+ mounted() {
|
|
|
|
+ getSoundTree({ tenantId: 1, rows: 9999 }).then((res) => {
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ this.soundList = res.data.rows;
|
|
|
|
+ this.getSound();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
onSearch() {},
|
|
onSearch() {},
|
|
onReSet() {},
|
|
onReSet() {},
|
|
- getList(){},
|
|
|
|
|
|
+ getList() {},
|
|
|
|
+ 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);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|