域名管理调整

This commit is contained in:
joylink_fanyuhong 2021-12-29 09:14:09 +08:00
parent b3fb8bff0a
commit ba80caeb82
2 changed files with 18 additions and 6 deletions

View File

@ -24,7 +24,8 @@ export default {
formModel: {
id: '',
domainName: '',
project: ''
project: '',
resourcesDomainName: ''
},
loading: false
};
@ -34,7 +35,8 @@ export default {
const form = {
labelWidth: '120px',
items: [
{ prop: 'domainName', label: '域名', type: 'text', required: true, placeholder: '请输入域名' },
{ prop: 'domainName', label: '接口域名', type: 'text', required: true, placeholder: '请输入域名' },
{ prop: 'resourcesDomainName', label: '资源域名', type: 'text', required: true, placeholder: '请输入域名' },
{ prop: 'project', label: '项目', type: 'select', required: true, options: this.projectList, placeholder: '请选择项目' }
]
};
@ -43,7 +45,10 @@ export default {
rules() {
const crules = {
domainName: [
{ required: true, message: '请输入域名', trigger: 'blur' }
{ required: true, message: '请输入接口域名', trigger: 'blur' }
],
resourcesDomainName: [
{ required: true, message: '请输入资源域名', trigger: 'blur' }
],
project: [
{ required: true, message: '请选择项目', trigger: 'change' }
@ -63,6 +68,7 @@ export default {
this.formModel.id = data.id;
this.formModel.domainName = data.domainName;
this.formModel.project = data.project;
this.formModel.resourcesDomainName = data.resourcesDomainName;
}
this.dialogVisible = true;
},
@ -72,7 +78,8 @@ export default {
const data = {
id: this.formModel.id,
domainName: this.formModel.domainName,
project: this.formModel.project.toUpperCase()
project: this.formModel.project.toUpperCase(),
resourcesDomainName: this.formModel.resourcesDomainName
};
if (data.id) {
updateProjectServer(data.id, data).then(resp => {
@ -99,7 +106,8 @@ export default {
this.formModel = {
id: '',
domainName: '',
project: ''
project: '',
resourcesDomainName: ''
};
this.$refs.dataform.resetForm();
this.dialogVisible = false;

View File

@ -44,9 +44,13 @@ export default {
indexShow: true,
columns: [
{
title: '域名',
title: '接口域名',
prop: 'domainName'
},
{
title: '资源域名',
prop: 'resourcesDomainName'
},
{
title: '项目名称',
prop: 'projectCode',