|
@@ -4,10 +4,10 @@
|
|
|
:inline="true"
|
|
|
:model="searchForm"
|
|
|
ref="searchForm"
|
|
|
- @submit="search"
|
|
|
- @reset="onReSet"
|
|
|
+ @submit.native.prevent="search"
|
|
|
+ @reset.native.prevent="onReSet"
|
|
|
>
|
|
|
- <el-form-item>
|
|
|
+ <el-form-item prop="search">
|
|
|
<el-input
|
|
|
v-model.trim="searchForm.search"
|
|
|
clearable
|
|
@@ -15,30 +15,32 @@
|
|
|
placeholder="学生姓名或手机号"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="organId">
|
|
|
+ <el-form-item prop="subjectId">
|
|
|
<el-select
|
|
|
- v-model.trim="searchForm.organId"
|
|
|
+ v-model.trim="searchForm.subjectId"
|
|
|
filterable
|
|
|
clearable
|
|
|
placeholder="请选择声部"
|
|
|
+ @change="changeSound"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="(item, index) in selects.branchs"
|
|
|
- :key="index"
|
|
|
+ v-for="(item, i) in selects.subjects"
|
|
|
+ :key="i"
|
|
|
:label="item.name"
|
|
|
:value="item.id"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="organId">
|
|
|
+ <el-form-item prop="brand">
|
|
|
<el-select
|
|
|
- v-model.trim="searchForm.organId"
|
|
|
+ v-model.trim="searchForm.brand"
|
|
|
filterable
|
|
|
clearable
|
|
|
- placeholder="请选择乐器"
|
|
|
+ placeholder="请选择品牌型号"
|
|
|
+ :disabled="!searchForm.subjectId"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="(item, index) in selects.branchs"
|
|
|
+ v-for="(item, index) in branchList"
|
|
|
:key="index"
|
|
|
:label="item.name"
|
|
|
:value="item.id"
|
|
@@ -58,33 +60,30 @@
|
|
|
>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
- prop="studentId"
|
|
|
+ prop="subjectName"
|
|
|
label="声部"
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
- prop="studentId"
|
|
|
+ prop="userName"
|
|
|
label="学员姓名"
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
- prop="studentId"
|
|
|
+ prop="mobileNo"
|
|
|
label="联系电话"
|
|
|
></el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="center"
|
|
|
- prop="studentId"
|
|
|
- label="品牌"
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="center"
|
|
|
- prop="studentId"
|
|
|
- label="型号"
|
|
|
- ></el-table-column>
|
|
|
+ <el-table-column align="center" prop="studentId" label="品牌型号">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{ scope.row.brand }}{{ scope.row.specification }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column align="center" prop="studentId" label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
- <el-button type="text" @click="resetMusic(scope.row)">修改</el-button>
|
|
|
+ <el-button type="text" @click="resetMusic(scope.row)"
|
|
|
+ >修改</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -99,32 +98,39 @@
|
|
|
/>
|
|
|
</div>
|
|
|
<el-dialog
|
|
|
- title="修改信息"
|
|
|
- :visible.sync="dialogVisible"
|
|
|
- width="1000px"
|
|
|
- append-to-body v-if="dialogVisible">
|
|
|
- <resetInfo @close="close"/>
|
|
|
- <div slot="footer">
|
|
|
- <el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
- <el-button type="primary" @click="dialogVisible = false">确认修改</el-button>
|
|
|
- </div>
|
|
|
+ title="修改信息"
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
+ width="600px"
|
|
|
+ append-to-body
|
|
|
+ v-if="dialogVisible"
|
|
|
+ >
|
|
|
+ <resetInfo @close="close" :detail="resetRow" ref='resetInfo'/>
|
|
|
+ <div slot="footer">
|
|
|
+ <el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="updateInfo"
|
|
|
+ >确认修改</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import pagination from "@/components/Pagination/index";
|
|
|
-import resetInfo from './resetInfo'
|
|
|
+import resetInfo from "./resetInfo";
|
|
|
+import { getInstrumentSoundList, getInstrumentActivityList } from "../api";
|
|
|
+import ItemVue from "@/layout/components/Sidebar/Item.vue";
|
|
|
export default {
|
|
|
- components: { pagination,resetInfo },
|
|
|
- props:['activeRow'],
|
|
|
+ components: { pagination, resetInfo },
|
|
|
+ props: ["detail"],
|
|
|
data() {
|
|
|
return {
|
|
|
searchForm: {
|
|
|
- cooperationOrganId:this.activeRow?.cooperationOrganId,
|
|
|
- organIdList: "",
|
|
|
+ cooperationOrganId: "",
|
|
|
+ brand: "",
|
|
|
search: "",
|
|
|
+ subjectId: "",
|
|
|
},
|
|
|
- tableList: [{}],
|
|
|
+ tableList: [],
|
|
|
rules: {
|
|
|
// 分页规则
|
|
|
limit: 10, // 限制显示条数
|
|
@@ -132,28 +138,70 @@ export default {
|
|
|
total: 0, // 总条数
|
|
|
page_size: [10, 20, 40, 50], // 选择限制显示条数
|
|
|
},
|
|
|
- dialogVisible:false
|
|
|
+ dialogVisible: false,
|
|
|
+ branchList: [],
|
|
|
+ resetRow:null
|
|
|
};
|
|
|
},
|
|
|
- mounted() {},
|
|
|
+ mounted() {
|
|
|
+ this.init();
|
|
|
+ },
|
|
|
methods: {
|
|
|
- init() {
|
|
|
+ async init() {
|
|
|
+ this.searchForm.cooperationOrganId = this.detail.cooperationOrganId;
|
|
|
+ await this.$store.dispatch("setSubjects");
|
|
|
this.getList();
|
|
|
},
|
|
|
- getList() {},
|
|
|
+ async getList() {
|
|
|
+ try {
|
|
|
+ const res = await getInstrumentActivityList({
|
|
|
+ ...this.searchForm,
|
|
|
+ page: this.rules.page,
|
|
|
+ rows: this.rules.limit,
|
|
|
+ });
|
|
|
+ this.tableList = res.data.rows;
|
|
|
+ this.rules.total = res.data.total;
|
|
|
+ } catch (e) {}
|
|
|
+ },
|
|
|
search() {
|
|
|
this.rules.page = 1;
|
|
|
this.getList();
|
|
|
},
|
|
|
- onReSet(){
|
|
|
- this.$refs.searchForm.resetFields();
|
|
|
- this.search()
|
|
|
+ onReSet() {
|
|
|
+ this.$refs.searchForm.resetFields();
|
|
|
+ this.searchForm.cooperationOrganId = this.detail.cooperationOrganId;
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ resetMusic(row) {
|
|
|
+ this.resetRow = row
|
|
|
+ this.dialogVisible = true;
|
|
|
+ },
|
|
|
+ close() {
|
|
|
+ this.dialogVisible = false;
|
|
|
},
|
|
|
- resetMusic(row){
|
|
|
- this.dialogVisible = true
|
|
|
+ async changeSound(val) {
|
|
|
+ this.searchForm.brand='';
|
|
|
+ if (val) {
|
|
|
+ try {
|
|
|
+ const res = await getInstrumentSoundList({
|
|
|
+ subjectId: val,
|
|
|
+ page: 1,
|
|
|
+ rows: 999,
|
|
|
+ });
|
|
|
+ this.branchList = res.data.rows.map((item) => {
|
|
|
+ return {
|
|
|
+ name: item.brand + item.specification,
|
|
|
+ id: item.brand,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ console.log(res);
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e);
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
- close(){
|
|
|
- this.dialogVisible = false
|
|
|
+ updateInfo(){
|
|
|
+ this.$refs.resetInfo.submited()
|
|
|
}
|
|
|
},
|
|
|
};
|