|
@@ -140,9 +140,62 @@
|
|
>
|
|
>
|
|
禁用
|
|
禁用
|
|
</el-button>
|
|
</el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="rolePrivileges.reset_student_password"
|
|
|
|
+ size="small"
|
|
|
|
+ type="danger"
|
|
|
|
+ icon="el-icon-refresh"
|
|
|
|
+ @click="resetPasswordByOrgId()"
|
|
|
|
+ >重置学习中心所有学生密码
|
|
|
|
+ </el-button>
|
|
|
|
|
|
<div style="width: 100%;margin-bottom: 10px;"></div>
|
|
<div style="width: 100%;margin-bottom: 10px;"></div>
|
|
|
|
|
|
|
|
+ <!-- 重置学习中心所有学生密码-->
|
|
|
|
+ <el-dialog
|
|
|
|
+ title="重置学习中心所有学生密码"
|
|
|
|
+ width="500px"
|
|
|
|
+ :visible.sync="resetPasswordByOrgIdDialog"
|
|
|
|
+ >
|
|
|
|
+ <el-form
|
|
|
|
+ :model="resetPasswordByOrgIdForm"
|
|
|
|
+ :inline="true"
|
|
|
|
+ ref="resetPasswordByOrgIdForm"
|
|
|
|
+ label-width="80px"
|
|
|
|
+ :rules="resetPasswordByOrgIdRules"
|
|
|
|
+ >
|
|
|
|
+ <el-form-item label="学习中心" prop="orgId">
|
|
|
|
+ <el-select
|
|
|
|
+ class="input"
|
|
|
|
+ :remote-method="getOrgList4RestPassword"
|
|
|
|
+ :loading="getOrgList4RestPasswordLoading"
|
|
|
|
+ remote
|
|
|
|
+ filterable
|
|
|
|
+ clearable
|
|
|
|
+ v-model="resetPasswordByOrgIdForm.orgId"
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ :disabled="pureLC"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in orgList4RestPassword"
|
|
|
|
+ :label="item.name + ' - ' + item.code"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <div style="text-align: center;margin-top: 20px;">
|
|
|
|
+ <el-button type="primary" @click="submitResetPasswordByOrgId"
|
|
|
|
+ >确 定</el-button
|
|
|
|
+ >
|
|
|
|
+ <el-button @click="resetPasswordByOrgIdDialog = false"
|
|
|
|
+ >取 消</el-button
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
<!-- 页面列表 -->
|
|
<!-- 页面列表 -->
|
|
<el-table
|
|
<el-table
|
|
:data="tableData"
|
|
:data="tableData"
|
|
@@ -556,7 +609,13 @@ export default {
|
|
lc_code: null,
|
|
lc_code: null,
|
|
lc_name: null,
|
|
lc_name: null,
|
|
orgList4Search: [],
|
|
orgList4Search: [],
|
|
|
|
+ orgList4RestPassword: [],
|
|
getOrgList4SearchLoading: false,
|
|
getOrgList4SearchLoading: false,
|
|
|
|
+ getOrgList4RestPasswordLoading: false,
|
|
|
|
+ resetPasswordByOrgIdDialog: false,
|
|
|
|
+ resetPasswordByOrgIdForm: {
|
|
|
|
+ orgId: ""
|
|
|
|
+ },
|
|
formSearch: {
|
|
formSearch: {
|
|
orgId: "",
|
|
orgId: "",
|
|
rootOrgId: null,
|
|
rootOrgId: null,
|
|
@@ -617,6 +676,16 @@ export default {
|
|
infoCollector: "",
|
|
infoCollector: "",
|
|
identityNumber: "",
|
|
identityNumber: "",
|
|
identityNumberLike: false
|
|
identityNumberLike: false
|
|
|
|
+ },
|
|
|
|
+ resetPasswordByOrgIdRules: {
|
|
|
|
+ orgId: [
|
|
|
|
+ {
|
|
|
|
+ type: "number",
|
|
|
|
+ required: true,
|
|
|
|
+ message: "请选择学习中心",
|
|
|
|
+ trigger: "change"
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
}
|
|
}
|
|
};
|
|
};
|
|
},
|
|
},
|
|
@@ -641,6 +710,40 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ resetPasswordByOrgId() {
|
|
|
|
+ this.orgList4RestPassword = [];
|
|
|
|
+ this.resetPasswordByOrgIdForm.orgId = null;
|
|
|
|
+ if (this.pureLC) {
|
|
|
|
+ this.orgList4RestPassword = [
|
|
|
|
+ { id: this.lc_id, name: this.lc_name, code: this.lc_code }
|
|
|
|
+ ];
|
|
|
|
+ this.resetPasswordByOrgIdForm.orgId = this.lc_id;
|
|
|
|
+ } else {
|
|
|
|
+ this.getOrgList4RestPassword("");
|
|
|
|
+ }
|
|
|
|
+ this.resetPasswordByOrgIdDialog = true;
|
|
|
|
+ },
|
|
|
|
+ submitResetPasswordByOrgId() {
|
|
|
|
+ this.$refs.resetPasswordByOrgIdForm.validate(valid => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ var url =
|
|
|
|
+ CORE_API +
|
|
|
|
+ "/student/resetPasswordByOrgId/" +
|
|
|
|
+ this.resetPasswordByOrgIdForm.orgId;
|
|
|
|
+ this.$httpWithMsg.put(url).then(response => {
|
|
|
|
+ console.log(response);
|
|
|
|
+ this.$notify({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: "重置密码成功"
|
|
|
|
+ });
|
|
|
|
+ this.searchForm();
|
|
|
|
+ this.resetPasswordByOrgIdDialog = false;
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
rootOrgChanged() {
|
|
rootOrgChanged() {
|
|
this.getOrgList4Search("");
|
|
this.getOrgList4Search("");
|
|
},
|
|
},
|
|
@@ -663,6 +766,25 @@ export default {
|
|
this.getOrgList4SearchLoading = false;
|
|
this.getOrgList4SearchLoading = false;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ getOrgList4RestPassword(orgName) {
|
|
|
|
+ this.getOrgList4RestPasswordLoading = true;
|
|
|
|
+ let url =
|
|
|
|
+ CORE_API +
|
|
|
|
+ "/org/query?rootOrgId=" +
|
|
|
|
+ this.formSearch.rootOrgId +
|
|
|
|
+ "&name=" +
|
|
|
|
+ orgName;
|
|
|
|
+ this.$httpWithMsg
|
|
|
|
+ .get(url)
|
|
|
|
+ .then(response => {
|
|
|
|
+ this.getOrgList4RestPasswordLoading = false;
|
|
|
|
+ this.orgList4RestPassword = response.data;
|
|
|
|
+ })
|
|
|
|
+ .catch(response => {
|
|
|
|
+ console.log(response);
|
|
|
|
+ this.getOrgList4RestPasswordLoading = false;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
queryExams4Search(name) {
|
|
queryExams4Search(name) {
|
|
this.queryExams(name, "search");
|
|
this.queryExams(name, "search");
|
|
},
|
|
},
|