|
@@ -9,6 +9,38 @@
|
|
|
>
|
|
|
<!-- 表单 -->
|
|
|
<el-form inline :model="searchForm">
|
|
|
+ <el-form-item v-if="isSuperAdmin" label="学校">
|
|
|
+ <el-select
|
|
|
+ v-model="searchForm.rootOrgId"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ placeholder="请选择"
|
|
|
+ class="search_width"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in rootOrgList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="操作">
|
|
|
+ <el-select
|
|
|
+ v-model="searchForm.operate"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ placeholder="请选择"
|
|
|
+ class="input_width"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in operateList"
|
|
|
+ :key="item"
|
|
|
+ :label="item"
|
|
|
+ :value="item"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="登录名">
|
|
|
<el-input
|
|
|
v-model="searchForm.loginName"
|
|
@@ -16,6 +48,7 @@
|
|
|
style="width: 180px"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
<el-form-item label="角色">
|
|
|
<el-select
|
|
|
v-model="searchForm.roleId"
|
|
@@ -41,13 +74,11 @@
|
|
|
end-placeholder="结束日期"
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
:clearable="false"
|
|
|
- size="small"
|
|
|
@change="changeTimeRange"
|
|
|
></el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button
|
|
|
- size="small"
|
|
|
type="primary"
|
|
|
icon="el-icon-search"
|
|
|
@click="handleSearchBtn"
|
|
@@ -99,15 +130,19 @@ export default {
|
|
|
name: "Project",
|
|
|
data() {
|
|
|
return {
|
|
|
+ rootOrgList: [],
|
|
|
+ operateList: [],
|
|
|
examList: [],
|
|
|
loading: false,
|
|
|
paginationShow: false,
|
|
|
roleList4Search: [],
|
|
|
timeRange: [],
|
|
|
searchForm: {
|
|
|
+ rootOrgId: null,
|
|
|
startTime: null,
|
|
|
endTime: null,
|
|
|
loginName: "",
|
|
|
+ operate: "",
|
|
|
roleId: "",
|
|
|
},
|
|
|
tableData: [],
|
|
@@ -118,6 +153,9 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState({ user: (state) => state.user }),
|
|
|
+ isSuperAdmin() {
|
|
|
+ return this.user.roleList.some((role) => role.roleCode == "SUPER_ADMIN");
|
|
|
+ },
|
|
|
},
|
|
|
//初始化查询
|
|
|
created() {
|
|
@@ -148,6 +186,13 @@ export default {
|
|
|
},
|
|
|
//查询
|
|
|
search() {
|
|
|
+ if (this.searchForm.rootOrgId == null) {
|
|
|
+ this.$notify({
|
|
|
+ type: "warning",
|
|
|
+ message: "请选择学校",
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.loading = true;
|
|
|
var url =
|
|
|
CORE_API +
|
|
@@ -169,8 +214,6 @@ export default {
|
|
|
.finally(() => (this.loading = false));
|
|
|
},
|
|
|
init() {
|
|
|
- this.search();
|
|
|
-
|
|
|
var url =
|
|
|
CORE_API +
|
|
|
"/rolePrivilege/getRoles?includeSuperAdmin=true&rootOrgId=" +
|
|
@@ -179,6 +222,20 @@ export default {
|
|
|
Promise.all([this.$httpWithMsg.post(url)]).then(([resp]) => {
|
|
|
this.roleList4Search = resp.data;
|
|
|
});
|
|
|
+
|
|
|
+ this.$httpWithMsg.get(CORE_API + "/adminOperate/types").then((resp) => {
|
|
|
+ this.operateList = resp.data;
|
|
|
+ });
|
|
|
+ if (this.isSuperAdmin) {
|
|
|
+ this.$httpWithMsg
|
|
|
+ .get(CORE_API + "/org/getRootOrgList")
|
|
|
+ .then((response) => {
|
|
|
+ this.rootOrgList = response.data;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.searchForm.rootOrgId = this.user.rootOrgId;
|
|
|
+ this.search();
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
};
|