|
@@ -9,6 +9,20 @@
|
|
class="demo-ruleForm"
|
|
class="demo-ruleForm"
|
|
:inline-message="true"
|
|
:inline-message="true"
|
|
>
|
|
>
|
|
|
|
+ <el-form-item v-if="isSuperAdmin" label="学校">
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="ruleForm.orgId"
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ style="width: 180px"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in rootOrgList"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item label="系统名称" prop="OE_STUDENT_SYS_NAME">
|
|
<el-form-item label="系统名称" prop="OE_STUDENT_SYS_NAME">
|
|
<el-input
|
|
<el-input
|
|
v-model="ruleForm.OE_STUDENT_SYS_NAME"
|
|
v-model="ruleForm.OE_STUDENT_SYS_NAME"
|
|
@@ -117,7 +131,7 @@ import {
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- rootOrgId: null,
|
|
|
|
|
|
+ rootOrgList: [],
|
|
loginTypes: LOGIN_TYPE,
|
|
loginTypes: LOGIN_TYPE,
|
|
propertyGroupId: "",
|
|
propertyGroupId: "",
|
|
preventCheatingConfigs: PREVENT_CHEATING_CONFIG,
|
|
preventCheatingConfigs: PREVENT_CHEATING_CONFIG,
|
|
@@ -214,13 +228,13 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
initForm() {
|
|
initForm() {
|
|
- this.ruleForm.orgId = this.user.rootOrgId;
|
|
|
|
|
|
+ this.uploadAction = CORE_API + "/org/importLogo/" + this.ruleForm.orgId;
|
|
this.ruleForm.STUDENT_CLIENT_DEFAULT_SIZE = "1400*900";
|
|
this.ruleForm.STUDENT_CLIENT_DEFAULT_SIZE = "1400*900";
|
|
this.ruleForm.relatedPropertyGroupIdList = ["studentClientConfig"];
|
|
this.ruleForm.relatedPropertyGroupIdList = ["studentClientConfig"];
|
|
var url =
|
|
var url =
|
|
CORE_API +
|
|
CORE_API +
|
|
"/org/getOrgPropertiesByGroupWithoutCache/" +
|
|
"/org/getOrgPropertiesByGroupWithoutCache/" +
|
|
- this.rootOrgId +
|
|
|
|
|
|
+ this.ruleForm.orgId +
|
|
"/" +
|
|
"/" +
|
|
this.propertyGroupId;
|
|
this.propertyGroupId;
|
|
this.$httpWithMsg.get(url).then(response => {
|
|
this.$httpWithMsg.get(url).then(response => {
|
|
@@ -419,17 +433,25 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- this.rootOrgId = this.user.rootOrgId;
|
|
|
|
|
|
+ this.ruleForm.orgId = this.user.rootOrgId;
|
|
this.propertyGroupId = "studentClientConfig4Edit";
|
|
this.propertyGroupId = "studentClientConfig4Edit";
|
|
- this.uploadAction = CORE_API + "/org/importLogo/" + this.rootOrgId;
|
|
|
|
this.uploadHeaders = {
|
|
this.uploadHeaders = {
|
|
key: this.user.key,
|
|
key: this.user.key,
|
|
token: this.user.token
|
|
token: this.user.token
|
|
};
|
|
};
|
|
- console.log(this.propertyGroupId);
|
|
|
|
|
|
+ if (this.isSuperAdmin) {
|
|
|
|
+ this.$httpWithMsg.get(CORE_API + "/org/getRootOrgList").then(response => {
|
|
|
|
+ this.rootOrgList = response.data;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
this.initForm();
|
|
this.initForm();
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
|
|
+ "ruleForm.orgId": {
|
|
|
|
+ handler: function() {
|
|
|
|
+ this.initForm();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
ruleForm: {
|
|
ruleForm: {
|
|
deep: true,
|
|
deep: true,
|
|
handler: function(newForm) {
|
|
handler: function(newForm) {
|
|
@@ -460,6 +482,9 @@ export default {
|
|
btnSaveDiabled() {
|
|
btnSaveDiabled() {
|
|
console.log(this.formDataChanged);
|
|
console.log(this.formDataChanged);
|
|
return !this.formDataChanged;
|
|
return !this.formDataChanged;
|
|
|
|
+ },
|
|
|
|
+ isSuperAdmin() {
|
|
|
|
+ return this.user.roleList.some(role => role.roleCode == "SUPER_ADMIN");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|