|
@@ -66,7 +66,7 @@
|
|
|
<el-table-column prop="ldap_field_name" label="Ldap字段">
|
|
|
<template slot-scope="{ row, $index }">
|
|
|
<div
|
|
|
- style="width: 100%; min-height: 24px;"
|
|
|
+ style="width: 100%; min-height: 24px"
|
|
|
@click="
|
|
|
{
|
|
|
{
|
|
@@ -116,25 +116,31 @@ export default {
|
|
|
ruleForm: {
|
|
|
name: "",
|
|
|
logo: "",
|
|
|
- is_ldap: false
|
|
|
+ is_ldap: false,
|
|
|
},
|
|
|
rules: {
|
|
|
name: [
|
|
|
{ required: true, message: "请输入系统名称", trigger: "blur" },
|
|
|
- { min: 3, max: 15, message: "长度在 3 到 15 个字符", trigger: "blur" }
|
|
|
+ {
|
|
|
+ min: 3,
|
|
|
+ max: 15,
|
|
|
+ message: "长度在 3 到 15 个字符",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
],
|
|
|
- logo: [{ required: true, message: "请设置Logo", trigger: "blur" }]
|
|
|
+ logo: [{ required: true, message: "请设置Logo", trigger: "blur" }],
|
|
|
},
|
|
|
tableData: [],
|
|
|
ossUploadUrl: "https://ks3-cn-beijing.ksyuncs.com/daya",
|
|
|
+ preUploadUrl: "https://daya.ks3-cn-beijing.ksyuncs.com",
|
|
|
dataObj: {
|
|
|
policy: "",
|
|
|
signature: "",
|
|
|
key: "",
|
|
|
KSSAccessKeyId: "",
|
|
|
acl: "public-read",
|
|
|
- name: ""
|
|
|
- }
|
|
|
+ name: "",
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -142,14 +148,14 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
getSettingsInfo() {
|
|
|
- getSettings().then(response => {
|
|
|
+ getSettings().then((response) => {
|
|
|
for (var v of response.data) {
|
|
|
if (v.classify === 1) {
|
|
|
if (v.content === undefined || v.content === null) {
|
|
|
this.ruleForm = {
|
|
|
name: "",
|
|
|
logo: "",
|
|
|
- is_ldap: false
|
|
|
+ is_ldap: false,
|
|
|
};
|
|
|
} else {
|
|
|
if (
|
|
@@ -174,10 +180,10 @@ export default {
|
|
|
submitForm(formName, classify) {
|
|
|
var requestStatus = false;
|
|
|
var jsonValue = {
|
|
|
- classify: classify
|
|
|
+ classify: classify,
|
|
|
};
|
|
|
if (classify === 1) {
|
|
|
- this.$refs[formName].validate(valid => {
|
|
|
+ this.$refs[formName].validate((valid) => {
|
|
|
if (valid) {
|
|
|
jsonValue.content = this.ruleForm;
|
|
|
requestStatus = true;
|
|
@@ -188,11 +194,11 @@ export default {
|
|
|
requestStatus = true;
|
|
|
}
|
|
|
if (requestStatus) {
|
|
|
- setSettings(jsonValue).then(response => {
|
|
|
+ setSettings(jsonValue).then((response) => {
|
|
|
this.$store.dispatch("settings/getSystemSettings");
|
|
|
this.$message({
|
|
|
message: "设置成功",
|
|
|
- type: "success"
|
|
|
+ type: "success",
|
|
|
});
|
|
|
});
|
|
|
}
|
|
@@ -201,7 +207,7 @@ export default {
|
|
|
this.$refs[formName].resetFields();
|
|
|
},
|
|
|
handleAvatarSuccess(res, file) {
|
|
|
- let url = this.ossUploadUrl + "/" + this.dataObj.key;
|
|
|
+ let url = this.preUploadUrl + "/" + this.dataObj.key;
|
|
|
this.ruleForm.logo = url;
|
|
|
},
|
|
|
async beforeAvatarUpload(file) {
|
|
@@ -220,8 +226,8 @@ export default {
|
|
|
filename,
|
|
|
acl: "public-read",
|
|
|
key,
|
|
|
- unknowValueField: []
|
|
|
- }
|
|
|
+ unknowValueField: [],
|
|
|
+ },
|
|
|
};
|
|
|
|
|
|
const res = await policy(obj);
|
|
@@ -231,7 +237,7 @@ export default {
|
|
|
key,
|
|
|
KSSAccessKeyId: res.data.kssAccessKeyId,
|
|
|
acl: "public-read",
|
|
|
- name: filename
|
|
|
+ name: filename,
|
|
|
};
|
|
|
console.log(res, "policy", this.dataObj);
|
|
|
|
|
@@ -244,8 +250,8 @@ export default {
|
|
|
// 我的方法
|
|
|
this.editable[row] = status;
|
|
|
this.$set(this.editable, row, status);
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|