Commit f8c03a71 by qinjianhui

Merge branch 'dev' into 'master'

fix: 问题修改

See merge request !17
parents 4522add0 a306dcd1
......@@ -303,37 +303,6 @@
></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item
label="二级域名"
prop="customDomain"
:rules="[
{ required: true, message: '请输入二级域名' },
]"
>
<el-input
style="width: 200px"
v-model.trim="editForm.customDomain"
placeholder="请输入二级域名"
size="small"
clearable
></el-input>
</el-form-item> -->
<!-- <el-form-item
label="Api Name"
prop="apiName"
:rules="[
{ required: true, message: '请输入Api Name' },
]"
>
<el-input
style="width: 200px"
v-model="editForm.apiName"
placeholder="请输入Api Name"
size="small"
disabled
clearable
></el-input>
</el-form-item> -->
<el-form-item
label="数据库类型"
prop="databaseType"
......@@ -379,7 +348,7 @@
clearable
/>
</el-form-item>
<el-form-item label="数据库名称">
<el-form-item label="数据库名称" v-if="!editId">
<el-input
style="width: 200px"
:value="`saas_${editForm.databaseName || ''}`"
......@@ -389,6 +358,16 @@
>
</el-input>
</el-form-item>
<el-form-item label="数据库名称" v-else>
<el-input
style="width: 200px"
:value="editForm.databaseName || ''"
size="small"
disabled
placeholder="请输入数据库名称"
>
</el-input>
</el-form-item>
<el-form-item
label="数据库用户名"
prop="databaseUserName"
......@@ -594,6 +573,7 @@ export default {
this.editForm = JSON.parse(
JSON.stringify(this.cloneEditForm),
)
this.baseDomain = '.jomalls.com'
this.$nextTick(() => {
this.$refs.form.clearValidate()
})
......@@ -605,11 +585,15 @@ export default {
})
try {
const res = await getDataById(row.id)
res.data.domain =
res.data.domain && res.data.domain.split('.')[0]
res.data.databaseName =
res.data.databaseName &&
res.data.databaseName.substring(5)
const parts = /^(.*)(\.(([^.]+)\.([^.]+)))$/.exec(
res.data.domain,
)
if (parts) {
const name = parts[1]
const tld = '.' + parts[3]
res.data.domain = name
this.baseDomain = tld
}
this.editForm = res.data
} catch (e) {
this.$message.error(e)
......@@ -627,8 +611,10 @@ export default {
const l = this.$loading({
background: 'rgba(0, 0, 0, 0.3)',
})
this.editForm.databaseName =
'saas_' + this.editForm.databaseName
if (!this.editId) {
this.editForm.databaseName =
'saas_' + this.editForm.databaseName
}
this.editForm.domain =
this.editForm.domain + this.baseDomain
try {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment