|
@@ -2,7 +2,7 @@
|
|
|
<section style="margin-top: 0px">
|
|
|
<div>
|
|
|
<div style="width: 643px; padding: 10px 0px">
|
|
|
- <el-alert title="算法代号" type="warning" show-icon>
|
|
|
+ <el-alert title="算法代号" type="success" show-icon :closable="false">
|
|
|
<el-breadcrumb separator="|" style="font-size: 9px">
|
|
|
<el-breadcrumb-item>AES 简写 A</el-breadcrumb-item>
|
|
|
<el-breadcrumb-item>Base64 简写 B</el-breadcrumb-item>
|
|
@@ -35,6 +35,35 @@
|
|
|
>保存</el-button
|
|
|
>
|
|
|
</el-transfer>
|
|
|
+
|
|
|
+ <div style="width: 643px; margin: 50px 0px 20px 0px">
|
|
|
+ <el-alert
|
|
|
+ title="配置被禁用旧版本API的学校ID列表"
|
|
|
+ type="info"
|
|
|
+ show-icon
|
|
|
+ :closable="false"
|
|
|
+ effect="dark"
|
|
|
+ >
|
|
|
+ 注:多个值请逗号分隔!
|
|
|
+ <el-button
|
|
|
+ class="el-alert__closebtn"
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ round
|
|
|
+ @click="updateDisabledRootOrgIds()"
|
|
|
+ >
|
|
|
+ 保存</el-button
|
|
|
+ >
|
|
|
+ </el-alert>
|
|
|
+
|
|
|
+ <el-input
|
|
|
+ v-model="disabledRootOrgIds"
|
|
|
+ type="textarea"
|
|
|
+ placeholder="示例:111,222,333"
|
|
|
+ maxlength="500"
|
|
|
+ rows="3"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</section>
|
|
|
</template>
|
|
@@ -50,6 +79,7 @@ export default {
|
|
|
canEdit: false,
|
|
|
allCryptoConfigs: [],
|
|
|
enableCryptoConfigs: [],
|
|
|
+ disabledRootOrgIds: null,
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -61,6 +91,7 @@ export default {
|
|
|
created() {
|
|
|
if (this.isSuperAdmin) {
|
|
|
this.loadCryptoConfigs();
|
|
|
+ this.loadDisabledRootOrgIds();
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -140,13 +171,65 @@ export default {
|
|
|
);
|
|
|
});
|
|
|
},
|
|
|
+ loadDisabledRootOrgIds() {
|
|
|
+ let url = "/api/ecs_oe_student/temp/config/list";
|
|
|
+ this.$http.post(url).then(
|
|
|
+ (response) => {
|
|
|
+ let data = response.data;
|
|
|
+ this.disabledRootOrgIds = data.join(",");
|
|
|
+ },
|
|
|
+ () => {
|
|
|
+ this.$notify({
|
|
|
+ type: "error",
|
|
|
+ message: "获取被禁用旧版本API的学校ID列表失败!",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
+ updateDisabledRootOrgIds() {
|
|
|
+ let params = [];
|
|
|
+ if (this.disabledRootOrgIds) {
|
|
|
+ let values = this.disabledRootOrgIds.split(",");
|
|
|
+ // console.log("values", values);
|
|
|
+ let reg = /^[0-9]+$/;
|
|
|
+ for (let n = 0; n < values.length; n++) {
|
|
|
+ if (reg.test(values[n])) {
|
|
|
+ params.push(values[n]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ this.$confirm("确认保存?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ let url = "/api/ecs_oe_student/temp/config/update";
|
|
|
+ this.$http.post(url, params).then(
|
|
|
+ () => {
|
|
|
+ this.$notify({
|
|
|
+ type: "success",
|
|
|
+ message: "保存成功!",
|
|
|
+ });
|
|
|
+ this.disabledRootOrgIds = params.join(",");
|
|
|
+ },
|
|
|
+ () => {
|
|
|
+ this.$notify({
|
|
|
+ type: "error",
|
|
|
+ message: "保存失败!",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ );
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
.transfer-footer {
|
|
|
- margin-left: 70px;
|
|
|
+ margin: 4px 13px 0px 0px;
|
|
|
+ float: right;
|
|
|
}
|
|
|
</style>
|
|
|
|