|
@@ -80,16 +80,22 @@
|
|
placeholder="请输入手机号码"
|
|
placeholder="请输入手机号码"
|
|
></el-input>
|
|
></el-input>
|
|
</el-form-item> -->
|
|
</el-form-item> -->
|
|
- <!-- <el-form-item label="组织" prop="sBySchool">
|
|
|
|
|
|
+ <el-form-item label="组织" prop="org">
|
|
<el-select
|
|
<el-select
|
|
- v-model="ruleForm.sBySchool"
|
|
|
|
|
|
+ v-model="ruleForm.org"
|
|
clearable
|
|
clearable
|
|
- placeholder="请选择组织"
|
|
|
|
|
|
+ placeholder="暂无组织"
|
|
disabled
|
|
disabled
|
|
>
|
|
>
|
|
- <el-option :value="ruleForm.sBySchool"> </el-option>
|
|
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in orgJuri"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
</el-select>
|
|
</el-select>
|
|
- </el-form-item> -->
|
|
|
|
|
|
+ </el-form-item>
|
|
<el-form-item label="学校" prop="sBySchool">
|
|
<el-form-item label="学校" prop="sBySchool">
|
|
<el-select
|
|
<el-select
|
|
v-model="ruleForm.sBySchool"
|
|
v-model="ruleForm.sBySchool"
|
|
@@ -171,11 +177,13 @@ export default {
|
|
// mail: "",
|
|
// mail: "",
|
|
phone: "",
|
|
phone: "",
|
|
sBySchool: "",
|
|
sBySchool: "",
|
|
|
|
+ org: "",
|
|
headportrait: "",
|
|
headportrait: "",
|
|
},
|
|
},
|
|
tx: require("../../assets/avatar.png"),
|
|
tx: require("../../assets/avatar.png"),
|
|
userinfo: "",
|
|
userinfo: "",
|
|
schoolJuri: [],
|
|
schoolJuri: [],
|
|
|
|
+ orgJuri: [],
|
|
userid: this.$route.query.userid,
|
|
userid: this.$route.query.userid,
|
|
rules: {
|
|
rules: {
|
|
pass: [{ validator: validatePass, trigger: "blur" }],
|
|
pass: [{ validator: validatePass, trigger: "blur" }],
|
|
@@ -215,7 +223,19 @@ export default {
|
|
console.error(err);
|
|
console.error(err);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+ getOrg() {
|
|
|
|
+ this.isLoading = true;
|
|
|
|
+ this.ajax
|
|
|
|
+ .get(this.$store.state.api + "selectorg2", "")
|
|
|
|
+ .then((res) => {
|
|
|
|
+ this.isLoading = false;
|
|
|
|
+ this.orgJuri = res.data[0];
|
|
|
|
+ })
|
|
|
|
+ .catch((err) => {
|
|
|
|
+ this.isLoading = false;
|
|
|
|
+ console.error(err);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
submitForm(formName) {
|
|
submitForm(formName) {
|
|
this.$refs[formName];
|
|
this.$refs[formName];
|
|
let params = [
|
|
let params = [
|
|
@@ -267,6 +287,7 @@ export default {
|
|
if (res.data[0][0]) {
|
|
if (res.data[0][0]) {
|
|
res.data[0][0].sex = res.data[0][0].sex ? "女" : "男";
|
|
res.data[0][0].sex = res.data[0][0].sex ? "女" : "男";
|
|
this.ruleForm = res.data[0][0];
|
|
this.ruleForm = res.data[0][0];
|
|
|
|
+ this.ruleForm.org = res.data[0][0].org.split(",")[0];
|
|
this.ruleForm.type = res.data[0][0].type == 1 ? "老师" : "学生";
|
|
this.ruleForm.type = res.data[0][0].type == 1 ? "老师" : "学生";
|
|
console.log(res.data[0][0]);
|
|
console.log(res.data[0][0]);
|
|
}
|
|
}
|
|
@@ -278,6 +299,7 @@ export default {
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.getSchool();
|
|
this.getSchool();
|
|
|
|
+ this.getOrg();
|
|
this.getDetail();
|
|
this.getDetail();
|
|
},
|
|
},
|
|
};
|
|
};
|