|
|
|
|
@ -3,6 +3,59 @@
|
|
|
|
|
<div ref="leftContainer" class="left" style="padding: 20px;">
|
|
|
|
|
<el-form :inline="true" :model="form" :rules="rules" ref="systemConfigForm"
|
|
|
|
|
style="display: flex;align-items: center;justify-content: space-between;flex-wrap: wrap;">
|
|
|
|
|
<h3>{{ $t("system:config:WebConfig") }}</h3>
|
|
|
|
|
<el-form-item :label="$t('system:config:VUE_APP_ONLYOFFICE_URL')" style="width: 45%;"
|
|
|
|
|
prop="WebConfigInfo.VUE_APP_ONLYOFFICE_URL">
|
|
|
|
|
<el-input v-model="form.WebConfigInfo.VUE_APP_ONLYOFFICE_URL" clearable />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="$t('system:config:VUE_APP_LOGIN_FOR_PERMISSION')" style="width: 45%;"
|
|
|
|
|
prop="WebConfigInfo.VUE_APP_LOGIN_FOR_PERMISSION">
|
|
|
|
|
<el-select v-model="form.WebConfigInfo.VUE_APP_LOGIN_FOR_PERMISSION" placeholder="">
|
|
|
|
|
<el-option v-for="item in $d.YesOrNo" :key="item.id" :label="item.label" :value="item.value" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="$t('system:config:VUE_APP_LOCK_FOR_PERMISSION_MFA')" style="width: 45%;"
|
|
|
|
|
prop="WebConfigInfo.VUE_APP_LOCK_FOR_PERMISSION_MFA">
|
|
|
|
|
<el-select v-model="form.WebConfigInfo.VUE_APP_LOCK_FOR_PERMISSION_MFA" placeholder="">
|
|
|
|
|
<el-option v-for="item in $d.YesOrNo" :key="item.id" :label="item.label" :value="item.value" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="$t('system:config:VUE_APP_LOCK_FOR_PERMISSION')" style="width: 45%;"
|
|
|
|
|
prop="WebConfigInfo.VUE_APP_LOCK_FOR_PERMISSION">
|
|
|
|
|
<el-select v-model="form.WebConfigInfo.VUE_APP_LOCK_FOR_PERMISSION" placeholder="">
|
|
|
|
|
<el-option v-for="item in $d.YesOrNo" :key="item.id" :label="item.label" :value="item.value" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="$t('system:config:VUE_APP_LOCK_FOR_TIME')" style="width: 45%;"
|
|
|
|
|
prop="WebConfigInfo.VUE_APP_LOCK_FOR_TIME">
|
|
|
|
|
<el-input-number v-model="form.WebConfigInfo.VUE_APP_LOCK_FOR_TIME" clearable type="number" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="$t('system:config:VUE_APP_LOGOUT_FOR_PERMISSION')" style="width: 45%;"
|
|
|
|
|
prop="WebConfigInfo.VUE_APP_LOGOUT_FOR_PERMISSION">
|
|
|
|
|
<el-select v-model="form.WebConfigInfo.VUE_APP_LOGOUT_FOR_PERMISSION" placeholder="">
|
|
|
|
|
<el-option v-for="item in $d.YesOrNo" :key="item.id" :label="item.label" :value="item.value" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="$t('system:config:VUE_APP_LOGOUT_FOR_TIME')" style="width: 45%;"
|
|
|
|
|
prop="WebConfigInfo.VUE_APP_LOGOUT_FOR_TIME">
|
|
|
|
|
<el-input-number v-model="form.WebConfigInfo.VUE_APP_LOGOUT_FOR_TIME" clearable type="number" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="$t('system:config:VUE_APP_PASSWORD_FOR_PERMISSION')" style="width: 45%;"
|
|
|
|
|
prop="WebConfigInfo.VUE_APP_PASSWORD_FOR_PERMISSION">
|
|
|
|
|
<el-select v-model="form.WebConfigInfo.VUE_APP_PASSWORD_FOR_PERMISSION" placeholder="">
|
|
|
|
|
<el-option v-for="item in $d.YesOrNo" :key="item.id" :label="item.label" :value="item.value" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<!-- <el-form-item :label="$t('system:config:VUE_APP_WORD_FOR_PERMISSION')" style="width: 45%;"
|
|
|
|
|
prop="WebConfigInfo.VUE_APP_WORD_FOR_PERMISSION">
|
|
|
|
|
<el-select v-model="form.WebConfigInfo.VUE_APP_WORD_FOR_PERMISSION" placeholder="">
|
|
|
|
|
<el-option v-for="item in $d.YesOrNo" :key="item.id" :label="item.label" :value="item.value" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item> -->
|
|
|
|
|
<el-form-item :label="$t('system:config:VUE_APP_COMPANY_NAME')" style="width: 45%;"
|
|
|
|
|
prop="WebConfigInfo.VUE_APP_COMPANY_NAME">
|
|
|
|
|
<el-input v-model="form.WebConfigInfo.VUE_APP_COMPANY_NAME" clearable />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<h3>{{ $t("system:config:BasicSystemConfig") }}</h3>
|
|
|
|
|
<el-form-item :label="$t('system:config:QcRiskControl')" style="width: 45%;">
|
|
|
|
|
<el-select v-model="form.BasicSystemConfig.QCRiskControl" placeholder="">
|
|
|
|
|
@ -84,7 +137,7 @@
|
|
|
|
|
<el-input v-model="form.SystemEmailSendConfig.Port" clearable type="number" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="$t('system:config:Imap')" style="width: 45%;" prop="SystemEmailSendConfig.Imap">
|
|
|
|
|
<el-input v-model="form.SystemEmailSendConfig.Imap" clearable />
|
|
|
|
|
<el-input v-model="form.SystemEmailSendConfig.Imap" clearable />http://localhost:8080/trials/trials-list
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="$t('system:config:ImapPort')" style="width: 45%;" prop="SystemEmailSendConfig.ImapPort">
|
|
|
|
|
<el-input v-model="form.SystemEmailSendConfig.ImapPort" clearable type="number" />
|
|
|
|
|
@ -157,7 +210,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import { getSystemBasicConfigInfo, getEmailConfigInfo, updateSystemBasicConfig, updateSystemEmailConfig } from '@/api/admin'
|
|
|
|
|
import { getSystemBasicConfigInfo, getEmailConfigInfo, updateSystemBasicConfig, updateSystemEmailConfig, getWebConfigInfo, updateWebConfigInfo } from '@/api/admin'
|
|
|
|
|
export default {
|
|
|
|
|
name: "systemConfig",
|
|
|
|
|
data() {
|
|
|
|
|
@ -255,8 +308,53 @@ export default {
|
|
|
|
|
'SystemEmailSendConfig.EmailRegexStr': [
|
|
|
|
|
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
'WebConfigInfo.VUE_APP_ONLYOFFICE_URL': [
|
|
|
|
|
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
'WebConfigInfo.VUE_APP_LOGIN_FOR_PERMISSION': [
|
|
|
|
|
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
'WebConfigInfo.VUE_APP_LOCK_FOR_PERMISSION_MFA': [
|
|
|
|
|
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
'WebConfigInfo.VUE_APP_LOCK_FOR_PERMISSION': [
|
|
|
|
|
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
'WebConfigInfo.VUE_APP_LOCK_FOR_TIME': [
|
|
|
|
|
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
|
|
|
|
|
{ type: 'number', message: this.$t('systemConfig:ruleMessage:mustNumber'), trigger: 'blur' },
|
|
|
|
|
],
|
|
|
|
|
'WebConfigInfo.VUE_APP_LOGOUT_FOR_PERMISSION': [
|
|
|
|
|
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
'WebConfigInfo.VUE_APP_LOGOUT_FOR_TIME': [
|
|
|
|
|
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
|
|
|
|
|
{ type: 'number', message: this.$t('systemConfig:ruleMessage:mustNumber'), trigger: 'blur' },
|
|
|
|
|
],
|
|
|
|
|
'WebConfigInfo.VUE_APP_PASSWORD_FOR_PERMISSION': [
|
|
|
|
|
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
// 'WebConfigInfo.VUE_APP_WORD_FOR_PERMISSION': [
|
|
|
|
|
// { required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }
|
|
|
|
|
// ],
|
|
|
|
|
'WebConfigInfo.VUE_APP_COMPANY_NAME': [
|
|
|
|
|
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
form: {
|
|
|
|
|
WebConfigInfo: {
|
|
|
|
|
VUE_APP_ONLYOFFICE_URL: '', // onlyoffice地址
|
|
|
|
|
VUE_APP_LOGIN_FOR_PERMISSION: false, // 是否开启登陆限制
|
|
|
|
|
VUE_APP_LOCK_FOR_PERMISSION_MFA: false,// 是否开启长时间无操作锁定弹框MFA验证
|
|
|
|
|
VUE_APP_LOCK_FOR_PERMISSION: false, // 是否开启长时间无操作锁定弹框
|
|
|
|
|
VUE_APP_LOCK_FOR_TIME: 900, // 无操作锁定弹框判断时间
|
|
|
|
|
VUE_APP_LOGOUT_FOR_PERMISSION: false,// 是否开启长时间无操作登出
|
|
|
|
|
VUE_APP_LOGOUT_FOR_TIME: 1800, // 无操作登出判断时间
|
|
|
|
|
VUE_APP_PASSWORD_FOR_PERMISSION: false, // 是否开启密码正则验证
|
|
|
|
|
// VUE_APP_WORD_FOR_PERMISSION: false, // 是否开启文档签署验证,
|
|
|
|
|
VUE_APP_COMPANY_NAME: '', // 公司名称
|
|
|
|
|
},
|
|
|
|
|
"BasicSystemConfig": {
|
|
|
|
|
// 启用质控风险控制功能
|
|
|
|
|
"QCRiskControl": true,
|
|
|
|
|
@ -340,14 +438,14 @@ export default {
|
|
|
|
|
methods: {
|
|
|
|
|
handleSave() {
|
|
|
|
|
this.loading = true
|
|
|
|
|
Promise.all([this.updateSystemBasicConfig(), this.updateSystemEmailConfig()]).then(res => {
|
|
|
|
|
Promise.all([this.updateSystemBasicConfig(), this.updateSystemEmailConfig(), this.updateWebConfigInfo()]).then(res => {
|
|
|
|
|
this.loading = false
|
|
|
|
|
this.getInfo()
|
|
|
|
|
// this.getInfo()
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getInfo() {
|
|
|
|
|
this.loading = true
|
|
|
|
|
Promise.all([this.getSystemBasicConfigInfo(), this.getEmailConfigInfo()]).then(res => {
|
|
|
|
|
Promise.all([this.getSystemBasicConfigInfo(), this.getEmailConfigInfo(), this.getWebConfigInfo()]).then(res => {
|
|
|
|
|
this.loading = false
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
@ -383,6 +481,38 @@ export default {
|
|
|
|
|
console.log(err)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async updateWebConfigInfo() {
|
|
|
|
|
try {
|
|
|
|
|
let validate = await this.$refs.systemConfigForm.validate()
|
|
|
|
|
if (!validate) return false
|
|
|
|
|
let data = {}
|
|
|
|
|
Object.keys(this.form.WebConfigInfo).forEach(key => {
|
|
|
|
|
data[key] = this.form.WebConfigInfo[key]
|
|
|
|
|
})
|
|
|
|
|
let res = await updateWebConfigInfo({
|
|
|
|
|
configStr: JSON.stringify(data)
|
|
|
|
|
})
|
|
|
|
|
if (res.IsSuccess) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
} catch (err) {
|
|
|
|
|
console.log(err)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async getWebConfigInfo() {
|
|
|
|
|
try {
|
|
|
|
|
let res = await getWebConfigInfo()
|
|
|
|
|
if (res.IsSuccess) {
|
|
|
|
|
let data = res.Result ? JSON.parse(res.Result) : {}
|
|
|
|
|
Object.keys(this.form.WebConfigInfo).forEach(key => {
|
|
|
|
|
this.form.WebConfigInfo[key] = data[key] ? data[key] : this.form.WebConfigInfo[key]
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
} catch (err) {
|
|
|
|
|
this.loading = false
|
|
|
|
|
console.log(err)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async getSystemBasicConfigInfo() {
|
|
|
|
|
try {
|
|
|
|
|
let res = await getSystemBasicConfigInfo()
|
|
|
|
|
|