|  | @@ -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,46 +15,32 @@
 | 
	
		
			
				|  |  |            placeholder="学生姓名或手机号"
 | 
	
		
			
				|  |  |          ></el-input>
 | 
	
		
			
				|  |  |        </el-form-item>
 | 
	
		
			
				|  |  | -      <el-form-item prop="organIdList">
 | 
	
		
			
				|  |  | +      <el-form-item prop="subjectId">
 | 
	
		
			
				|  |  |          <el-select
 | 
	
		
			
				|  |  | -          v-model.trim="searchForm.organIdList"
 | 
	
		
			
				|  |  | +          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="organIdList">
 | 
	
		
			
				|  |  | +      <el-form-item prop="brand">
 | 
	
		
			
				|  |  |          <el-select
 | 
	
		
			
				|  |  | -          v-model.trim="searchForm.organIdList"
 | 
	
		
			
				|  |  | +          v-model.trim="searchForm.brand"
 | 
	
		
			
				|  |  |            filterable
 | 
	
		
			
				|  |  |            clearable
 | 
	
		
			
				|  |  | -          placeholder="请选择品牌"
 | 
	
		
			
				|  |  | +          placeholder="请选择品牌型号"
 | 
	
		
			
				|  |  | +          :disabled="!searchForm.subjectId"
 | 
	
		
			
				|  |  |          >
 | 
	
		
			
				|  |  |            <el-option
 | 
	
		
			
				|  |  | -            v-for="(item, index) in selects.branchs"
 | 
	
		
			
				|  |  | -            :key="index"
 | 
	
		
			
				|  |  | -            :label="item.name"
 | 
	
		
			
				|  |  | -            :value="item.id"
 | 
	
		
			
				|  |  | -          ></el-option>
 | 
	
		
			
				|  |  | -        </el-select>
 | 
	
		
			
				|  |  | -      </el-form-item>
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -      <el-form-item prop="organIdList">
 | 
	
		
			
				|  |  | -        <el-select
 | 
	
		
			
				|  |  | -          v-model.trim="searchForm.organIdList"
 | 
	
		
			
				|  |  | -          filterable
 | 
	
		
			
				|  |  | -          clearable
 | 
	
		
			
				|  |  | -          placeholder="请选择型号"
 | 
	
		
			
				|  |  | -        >
 | 
	
		
			
				|  |  | -          <el-option
 | 
	
		
			
				|  |  | -            v-for="(item, index) in selects.branchs"
 | 
	
		
			
				|  |  | +            v-for="(item, index) in branchList"
 | 
	
		
			
				|  |  |              :key="index"
 | 
	
		
			
				|  |  |              :label="item.name"
 | 
	
		
			
				|  |  |              :value="item.id"
 | 
	
	
		
			
				|  | @@ -74,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)" v-if="permission('replacementInstrumentActivity/update')"
 | 
	
		
			
				|  |  | +                >修改</el-button
 | 
	
		
			
				|  |  | +              >
 | 
	
		
			
				|  |  |              </div>
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |          </el-table-column>
 | 
	
	
		
			
				|  | @@ -115,30 +98,40 @@
 | 
	
		
			
				|  |  |        />
 | 
	
		
			
				|  |  |      </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' @getList='getList'/>
 | 
	
		
			
				|  |  | +      <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";
 | 
	
		
			
				|  |  | +import { permission } from "@/utils/directivePage";
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  | -  components: { pagination,resetInfo },
 | 
	
		
			
				|  |  | +  components: { pagination, resetInfo },
 | 
	
		
			
				|  |  | +  props: ["detail"],
 | 
	
		
			
				|  |  |    data() {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  |        searchForm: {
 | 
	
		
			
				|  |  | -        organIdList: "",
 | 
	
		
			
				|  |  | +        cooperationOrganId: "",
 | 
	
		
			
				|  |  | +        brand: "",
 | 
	
		
			
				|  |  |          search: "",
 | 
	
		
			
				|  |  | +        subjectId: "",
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  | -      tableList: [{}],
 | 
	
		
			
				|  |  | +      tableList: [],
 | 
	
		
			
				|  |  |        rules: {
 | 
	
		
			
				|  |  |          // 分页规则
 | 
	
		
			
				|  |  |          limit: 10, // 限制显示条数
 | 
	
	
		
			
				|  | @@ -146,29 +139,74 @@ 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;
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    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);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    updateInfo(){
 | 
	
		
			
				|  |  | +      this.$refs.resetInfo.submited()
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    resetMusic(row){
 | 
	
		
			
				|  |  | -        this.dialogVisible = true
 | 
	
		
			
				|  |  | +      permission(str, parent) {
 | 
	
		
			
				|  |  | +      return permission(str, parent);
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    close(){
 | 
	
		
			
				|  |  | -        this.dialogVisible = false
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |  };
 | 
	
		
			
				|  |  | -</script>
 | 
	
		
			
				|  |  | +</script>
 |