|  | @@ -23,7 +23,7 @@
 | 
	
		
			
				|  |  |          <el-form-item>
 | 
	
		
			
				|  |  |            <el-select
 | 
	
		
			
				|  |  |              class="multiple"
 | 
	
		
			
				|  |  | -            v-model.trim="searchForm.organIdList"
 | 
	
		
			
				|  |  | +            v-model.trim="searchForm.organId"
 | 
	
		
			
				|  |  |              filterable
 | 
	
		
			
				|  |  |              clearable
 | 
	
		
			
				|  |  |              placeholder="请选择分部"
 | 
	
	
		
			
				|  | @@ -38,27 +38,30 @@
 | 
	
		
			
				|  |  |          </el-form-item>
 | 
	
		
			
				|  |  |          <el-form-item>
 | 
	
		
			
				|  |  |            <el-select
 | 
	
		
			
				|  |  | -            placeholder="请选择乐器类型"
 | 
	
		
			
				|  |  | -            v-model="searchForm.subjectId"
 | 
	
		
			
				|  |  | +            placeholder="请选择乐器分类"
 | 
	
		
			
				|  |  | +            v-model="searchForm.goodsCategoryId"
 | 
	
		
			
				|  |  |              clearable
 | 
	
		
			
				|  |  |              filterable
 | 
	
		
			
				|  |  |            >
 | 
	
		
			
				|  |  | -            <el-option
 | 
	
		
			
				|  |  | -              v-for="(item, index) in soundLists"
 | 
	
		
			
				|  |  | -              :label="item.name"
 | 
	
		
			
				|  |  | -              :value="item.id"
 | 
	
		
			
				|  |  | -              :key="index"
 | 
	
		
			
				|  |  | -            ></el-option>
 | 
	
		
			
				|  |  | +           <el-option
 | 
	
		
			
				|  |  | +            v-for="(item) in categoryList"
 | 
	
		
			
				|  |  | +            :key="item.value"
 | 
	
		
			
				|  |  | +            :label="item.label"
 | 
	
		
			
				|  |  | +            :value="item.value"
 | 
	
		
			
				|  |  | +          ></el-option>
 | 
	
		
			
				|  |  |            </el-select>
 | 
	
		
			
				|  |  |          </el-form-item>
 | 
	
		
			
				|  |  | -        <el-form-item>
 | 
	
		
			
				|  |  | -          <el-input
 | 
	
		
			
				|  |  | -            v-model.trim="searchForm.search"
 | 
	
		
			
				|  |  | -            clearable
 | 
	
		
			
				|  |  | -            @keyup.enter.native="search"
 | 
	
		
			
				|  |  | -            placeholder="乐器编号"
 | 
	
		
			
				|  |  | -          ></el-input>
 | 
	
		
			
				|  |  | -        </el-form-item>
 | 
	
		
			
				|  |  | +        <el-form-item prop="status">
 | 
	
		
			
				|  |  | +        <el-select
 | 
	
		
			
				|  |  | +          v-model.trim="searchForm.status"
 | 
	
		
			
				|  |  | +          filterable
 | 
	
		
			
				|  |  | +          clearable
 | 
	
		
			
				|  |  | +          placeholder="是否乐保"
 | 
	
		
			
				|  |  | +        >
 | 
	
		
			
				|  |  | +          <el-option value="0" label="否"></el-option>
 | 
	
		
			
				|  |  | +          <el-option value="1" label="是"></el-option>
 | 
	
		
			
				|  |  | +        </el-select>
 | 
	
		
			
				|  |  | +      </el-form-item>
 | 
	
		
			
				|  |  |          <el-form-item>
 | 
	
		
			
				|  |  |            <el-button native-type="submit" type="primary">搜索</el-button>
 | 
	
		
			
				|  |  |            <el-button native-type="reset" type="danger">重置</el-button>
 | 
	
	
		
			
				|  | @@ -72,7 +75,7 @@
 | 
	
		
			
				|  |  |          >
 | 
	
		
			
				|  |  |            <el-table-column
 | 
	
		
			
				|  |  |              align="center"
 | 
	
		
			
				|  |  | -            prop="studentId"
 | 
	
		
			
				|  |  | +            prop="organName"
 | 
	
		
			
				|  |  |              label="分部"
 | 
	
		
			
				|  |  |            ></el-table-column>
 | 
	
		
			
				|  |  |            <el-table-column
 | 
	
	
		
			
				|  | @@ -82,34 +85,40 @@
 | 
	
		
			
				|  |  |            ></el-table-column>
 | 
	
		
			
				|  |  |            <el-table-column
 | 
	
		
			
				|  |  |              align="center"
 | 
	
		
			
				|  |  | -            prop="studentId"
 | 
	
		
			
				|  |  | +            prop="studentName"
 | 
	
		
			
				|  |  |              label="学员姓名"
 | 
	
		
			
				|  |  |            ></el-table-column>
 | 
	
		
			
				|  |  |            <el-table-column
 | 
	
		
			
				|  |  |              align="center"
 | 
	
		
			
				|  |  | -            prop="studentId"
 | 
	
		
			
				|  |  | +            prop="phone"
 | 
	
		
			
				|  |  |              label="联系电话"
 | 
	
		
			
				|  |  |            ></el-table-column>
 | 
	
		
			
				|  |  |            <el-table-column
 | 
	
		
			
				|  |  |              align="center"
 | 
	
		
			
				|  |  | -            prop="studentId"
 | 
	
		
			
				|  |  | +            prop="goodsName"
 | 
	
		
			
				|  |  |              label="乐器名称"
 | 
	
		
			
				|  |  |            ></el-table-column>
 | 
	
		
			
				|  |  |            <el-table-column
 | 
	
		
			
				|  |  |              align="center"
 | 
	
		
			
				|  |  | -            prop="studentId"
 | 
	
		
			
				|  |  | +            prop="goodsCategoryName"
 | 
	
		
			
				|  |  |              label="乐器种类"
 | 
	
		
			
				|  |  |            ></el-table-column>
 | 
	
		
			
				|  |  |            <el-table-column
 | 
	
		
			
				|  |  |              align="center"
 | 
	
		
			
				|  |  | -            prop="studentId"
 | 
	
		
			
				|  |  | +            prop="goodsId"
 | 
	
		
			
				|  |  |              label="乐器编号"
 | 
	
		
			
				|  |  |            ></el-table-column>
 | 
	
		
			
				|  |  |            <el-table-column
 | 
	
		
			
				|  |  |              align="center"
 | 
	
		
			
				|  |  |              prop="studentId"
 | 
	
		
			
				|  |  |              label="有效期"
 | 
	
		
			
				|  |  | -          ></el-table-column>
 | 
	
		
			
				|  |  | +          >
 | 
	
		
			
				|  |  | +           <template slot-scope="scope">
 | 
	
		
			
				|  |  | +            <div>
 | 
	
		
			
				|  |  | +              {{ scope.row.startTime|formatTimer}}~{{scope.row.endTime | formatTimer}}
 | 
	
		
			
				|  |  | +            </div>
 | 
	
		
			
				|  |  | +          </template>
 | 
	
		
			
				|  |  | +          </el-table-column>
 | 
	
		
			
				|  |  |            <el-table-column align="center" prop="studentId" label="操作">
 | 
	
		
			
				|  |  |              <template slot-scope="scope">
 | 
	
		
			
				|  |  |                <div>
 | 
	
	
		
			
				|  | @@ -135,7 +144,8 @@
 | 
	
		
			
				|  |  |  import axios from "axios";
 | 
	
		
			
				|  |  |  import { getToken } from "@/utils/auth";
 | 
	
		
			
				|  |  |  import pagination from "@/components/Pagination/index";
 | 
	
		
			
				|  |  | -import { getSoundTree } from "@/api/buildTeam";
 | 
	
		
			
				|  |  | +import { categoryListTree } from "@/api/businessManager";
 | 
	
		
			
				|  |  | +import { getInstrument } from "@/api/buildTeam";
 | 
	
		
			
				|  |  |  import load from "@/utils/loading";
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    components: { pagination },
 | 
	
	
		
			
				|  | @@ -143,10 +153,14 @@ export default {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  |        searchForm: {
 | 
	
		
			
				|  |  |          search: null,
 | 
	
		
			
				|  |  | +        organId:'',
 | 
	
		
			
				|  |  | +        goodsCategoryId:'',
 | 
	
		
			
				|  |  | +        status:''
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |        soundLists: [],
 | 
	
		
			
				|  |  |        organList: [],
 | 
	
		
			
				|  |  | +      tableList:[],
 | 
	
		
			
				|  |  |        rules: {
 | 
	
		
			
				|  |  |          // 分页规则
 | 
	
		
			
				|  |  |          limit: 10, // 限制显示条数
 | 
	
	
		
			
				|  | @@ -154,6 +168,7 @@ export default {
 | 
	
		
			
				|  |  |          total: 0, // 总条数
 | 
	
		
			
				|  |  |          page_size: [10, 20, 40, 50], // 选择限制显示条数
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  | +      categoryList:[]
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    //生命周期 - 创建完成(可以访问当前this实例)
 | 
	
	
		
			
				|  | @@ -163,15 +178,45 @@ export default {
 | 
	
		
			
				|  |  |      // 获取分部
 | 
	
		
			
				|  |  |      this.$store.dispatch("setBranchs");
 | 
	
		
			
				|  |  |      this.init();
 | 
	
		
			
				|  |  | +    this.getList()
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  | -    init() {},
 | 
	
		
			
				|  |  | -    getList() {},
 | 
	
		
			
				|  |  | -    search() {
 | 
	
		
			
				|  |  | +    init() {
 | 
	
		
			
				|  |  | +      this.getCategory()
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +   search() {
 | 
	
		
			
				|  |  |        this.rules.page = 1;
 | 
	
		
			
				|  |  | -      this.getList();
 | 
	
		
			
				|  |  | +      this.getList()
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      onReSet() {},
 | 
	
		
			
				|  |  | +    async getList() {
 | 
	
		
			
				|  |  | +     try{
 | 
	
		
			
				|  |  | +       const res = await getInstrument({...this.searchForm,rows:this.rules.limit,page:this.rules.page})
 | 
	
		
			
				|  |  | +        this.tableList = res.data.rows
 | 
	
		
			
				|  |  | +     }catch(e){
 | 
	
		
			
				|  |  | +       console.log(e)
 | 
	
		
			
				|  |  | +     }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    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;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |  };
 | 
	
		
			
				|  |  |  </script>
 |