|
@@ -20,7 +20,89 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- 正文信息 -->
|
|
<!-- 正文信息 -->
|
|
- <div class="box-body"></div>
|
|
|
|
|
|
+ <div class="box-body">
|
|
|
|
+ <!-- 表单 -->
|
|
|
|
+ <el-form
|
|
|
|
+ :inline="true"
|
|
|
|
+ :model="formSearch"
|
|
|
|
+ label-position="right"
|
|
|
|
+ label-width="100px"
|
|
|
|
+ >
|
|
|
|
+ <el-row :gutter="5">
|
|
|
|
+ <el-form-item
|
|
|
|
+ v-if="isSuperAdmin"
|
|
|
|
+ label="顶级机构"
|
|
|
|
+ class="pull-left"
|
|
|
|
+ >
|
|
|
|
+ <el-select v-model="formSearch.rootOrgId" placeholder="请选择">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in rootOrgList"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="姓名" class="pull-left">
|
|
|
|
+ <el-input
|
|
|
|
+ placeholder="请输入姓名"
|
|
|
|
+ v-model="formSearch.name"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="学号" class="pull-left">
|
|
|
|
+ <el-input
|
|
|
|
+ placeholder="请输入学号"
|
|
|
|
+ v-model="formSearch.studentCode"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="身份证" class="pull-left">
|
|
|
|
+ <el-input
|
|
|
|
+ placeholder="请输入身份证"
|
|
|
|
+ v-model="formSearch.identityNumber"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item class="pull-right buttonframe">
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="rolePrivileges.search_student"
|
|
|
|
+ size="small"
|
|
|
|
+ type="primary"
|
|
|
|
+ icon="search"
|
|
|
|
+ @click="searchForm"
|
|
|
|
+ >查询
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="rolePrivileges.upload_student_photo"
|
|
|
|
+ size="small"
|
|
|
|
+ type="info"
|
|
|
|
+ @click="uploadPhoto"
|
|
|
|
+ >上传照片
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="rolePrivileges.reset_student_password"
|
|
|
|
+ size="small"
|
|
|
|
+ type="warning"
|
|
|
|
+ @click="resetPassword('');"
|
|
|
|
+ >重置密码
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="rolePrivileges.change_student_availability"
|
|
|
|
+ size="small"
|
|
|
|
+ type="success"
|
|
|
|
+ @click="enableStudent('');"
|
|
|
|
+ >启用
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="rolePrivileges.change_student_availability"
|
|
|
|
+ size="small"
|
|
|
|
+ type="danger"
|
|
|
|
+ @click="disableStudent('');"
|
|
|
|
+ >禁用
|
|
|
|
+ </el-button>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-row>
|
|
|
|
+ </el-form>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</section>
|
|
</div>
|
|
</div>
|
|
@@ -31,14 +113,67 @@ import { mapState } from "vuex";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
- return {};
|
|
|
|
|
|
+ return {
|
|
|
|
+ rolePrivileges: {
|
|
|
|
+ search_student: false,
|
|
|
|
+ upload_student_photo: false,
|
|
|
|
+ reset_student_password: false,
|
|
|
|
+ change_student_availability: false,
|
|
|
|
+ unbind_student_code: false,
|
|
|
|
+ unbind_security_phone: false
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ isSuperAdmin: false,
|
|
|
|
+ rootOrgList: null,
|
|
|
|
+ formSearch: {
|
|
|
|
+ rootOrgId: null,
|
|
|
|
+ name: null,
|
|
|
|
+ studentCode: null,
|
|
|
|
+ identityNumber: null,
|
|
|
|
+ enable: null
|
|
|
|
+ }
|
|
|
|
+ };
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapState({ user: state => state.user })
|
|
...mapState({ user: state => state.user })
|
|
},
|
|
},
|
|
- methods: {},
|
|
|
|
|
|
+ methods: {
|
|
|
|
+ searchForm() {},
|
|
|
|
+ uploadPhoto() {},
|
|
|
|
+ resetPassword() {},
|
|
|
|
+ enableStudent() {},
|
|
|
|
+ disableStudent() {},
|
|
|
|
+ initPrivileges() {
|
|
|
|
+ var params = new URLSearchParams({
|
|
|
|
+ privilegeCodes: Object.keys(this.rolePrivileges).toString()
|
|
|
|
+ });
|
|
|
|
+ var url = core_api + "/rolePrivilege/checkPrivileges?" + params;
|
|
|
|
+ this.$http.post(url).then(response => {
|
|
|
|
+ this.rolePrivileges = response.data;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ init() {
|
|
|
|
+ this.initPrivileges();
|
|
|
|
+
|
|
|
|
+ for (let role of this.user.roleList) {
|
|
|
|
+ if (role.roleCode == "SUPER_ADMIN") {
|
|
|
|
+ this.isSuperAdmin = true;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ var url = core_api + "/org/getRootOrgList";
|
|
|
|
+
|
|
|
|
+ this.$http.get(url).then(response => {
|
|
|
|
+ this.rootOrgList = response.data;
|
|
|
|
+ this.formSearch.rootOrgId = this.user.rootOrgId;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
//初始化查询
|
|
//初始化查询
|
|
- created() {}
|
|
|
|
|
|
+ created() {
|
|
|
|
+ this.init();
|
|
|
|
+ }
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
|
|
|