|
@@ -43,7 +43,17 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-select
|
|
|
+ <el-select style="width: 100% !important;"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ v-model.trim="searchForm.subjectId"
|
|
|
+ placeholder="专业技能">
|
|
|
+ <el-option v-for="(item, i) in selects.subjects"
|
|
|
+ :key="i"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ <!-- <el-select
|
|
|
v-model.trim="searchForm.subjectId"
|
|
|
filterable
|
|
|
clearable
|
|
@@ -61,7 +71,7 @@
|
|
|
:value="item.value"
|
|
|
></el-option>
|
|
|
</el-option-group>
|
|
|
- </el-select>
|
|
|
+ </el-select> -->
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-select
|
|
@@ -71,10 +81,10 @@
|
|
|
placeholder="请选择分部"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="item in branchList"
|
|
|
+ v-for="item in selects.branchs"
|
|
|
:key="item.id"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"> </el-option>
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -327,8 +337,8 @@
|
|
|
import pagination from "@/components/Pagination/index";
|
|
|
import { teacherQueryPage } from "@/api/teacherManager";
|
|
|
import { employeeOperate } from "@/api/systemManage";
|
|
|
-import { subjectListTree } from "@/api/specialSetting";
|
|
|
-import { getEmployeeOrgan, resetPassword2 } from "@/api/buildTeam";
|
|
|
+// import { subjectListTree } from "@/api/specialSetting";
|
|
|
+import { resetPassword2 } from "@/api/buildTeam";
|
|
|
import { jobNature, teacherStatus } from "@/utils/searchArray";
|
|
|
import store from "@/store";
|
|
|
export default {
|
|
@@ -369,10 +379,10 @@ export default {
|
|
|
activatedRow: null,
|
|
|
};
|
|
|
},
|
|
|
- activated() {
|
|
|
- this.__init();
|
|
|
- this.getList();
|
|
|
- },
|
|
|
+ // activated() {
|
|
|
+ // this.__init();
|
|
|
+ // this.getList();
|
|
|
+ // },
|
|
|
mounted() {
|
|
|
this.__init();
|
|
|
this.getList();
|
|
@@ -382,53 +392,47 @@ export default {
|
|
|
this.pageInfo.page = 1;
|
|
|
this.getList();
|
|
|
},
|
|
|
- __init() {
|
|
|
- if (this.$route.query.search) {
|
|
|
- this.$route.query.search instanceof Object
|
|
|
- ? (this.searchForm = this.$route.query.search)
|
|
|
- : (this.searchForm = JSON.parse(this.$route.query.search));
|
|
|
- }
|
|
|
- if (this.$route.query.rules) {
|
|
|
- this.$route.query.rules instanceof Object
|
|
|
- ? (this.pageInfo = this.$route.query.rules)
|
|
|
- : (this.pageInfo = JSON.parse(this.$route.query.rules));
|
|
|
- }
|
|
|
- getEmployeeOrgan().then((res) => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.branchList = [];
|
|
|
- res.data.forEach((item) => {
|
|
|
- this.branchList.push({
|
|
|
- label: item.name,
|
|
|
- value: item.id,
|
|
|
- });
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
+ async __init() {
|
|
|
+ // 获取分部
|
|
|
+ await this.$store.dispatch('setBranchs')
|
|
|
|
|
|
- subjectListTree({
|
|
|
- delFlag: "NO",
|
|
|
- rows: 9999,
|
|
|
- }).then((res) => {
|
|
|
- let result = res.data;
|
|
|
- if (res.code == 200) {
|
|
|
- let tempArray = [];
|
|
|
- result.rows.forEach((item, index) => {
|
|
|
- let subject = [];
|
|
|
- item.subjects.forEach((s) => {
|
|
|
- subject.push({
|
|
|
- value: s.id,
|
|
|
- label: s.name,
|
|
|
- });
|
|
|
- });
|
|
|
+ await this.$store.dispatch('setSubjects')
|
|
|
+ // getEmployeeOrgan().then((res) => {
|
|
|
+ // if (res.code == 200) {
|
|
|
+ // this.branchList = [];
|
|
|
+ // res.data.forEach((item) => {
|
|
|
+ // this.branchList.push({
|
|
|
+ // label: item.name,
|
|
|
+ // value: item.id,
|
|
|
+ // });
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // });
|
|
|
|
|
|
- tempArray[index] = {
|
|
|
- label: item.name,
|
|
|
- options: subject,
|
|
|
- };
|
|
|
- });
|
|
|
- this.subjectList = tempArray;
|
|
|
- }
|
|
|
- });
|
|
|
+ // subjectListTree({
|
|
|
+ // delFlag: "NO",
|
|
|
+ // rows: 9999,
|
|
|
+ // }).then((res) => {
|
|
|
+ // let result = res.data;
|
|
|
+ // if (res.code == 200) {
|
|
|
+ // let tempArray = [];
|
|
|
+ // result.rows.forEach((item, index) => {
|
|
|
+ // let subject = [];
|
|
|
+ // item.subjects.forEach((s) => {
|
|
|
+ // subject.push({
|
|
|
+ // value: s.id,
|
|
|
+ // label: s.name,
|
|
|
+ // });
|
|
|
+ // });
|
|
|
+
|
|
|
+ // tempArray[index] = {
|
|
|
+ // label: item.name,
|
|
|
+ // options: subject,
|
|
|
+ // };
|
|
|
+ // });
|
|
|
+ // this.subjectList = tempArray;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
// this.getList();
|
|
|
},
|
|
|
onTeacher(type, row) {
|