|
@ -1,8 +1,9 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div class="system"> |
|
|
<div class="system"> |
|
|
<el-form ref="form" :model="config" label-width="100px"> |
|
|
|
|
|
|
|
|
<el-form ref="form" :model="config" label-width="240px"> |
|
|
<!-- System start --> |
|
|
<!-- System start --> |
|
|
<h2>系统配置</h2> |
|
|
|
|
|
|
|
|
<el-collapse v-model="activeNames" @change="handleChange"> |
|
|
|
|
|
<el-collapse-item title="系统配置" name="1"> |
|
|
<el-form-item label="环境值"> |
|
|
<el-form-item label="环境值"> |
|
|
<el-input v-model="config.system.env" /> |
|
|
<el-input v-model="config.system.env" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
@ -12,9 +13,6 @@ |
|
|
<el-form-item label="数据库类型"> |
|
|
<el-form-item label="数据库类型"> |
|
|
<el-select v-model="config.system.dbType" style="width:100%"> |
|
|
<el-select v-model="config.system.dbType" style="width:100%"> |
|
|
<el-option value="mysql" /> |
|
|
<el-option value="mysql" /> |
|
|
<el-option value="sqlite" /> |
|
|
|
|
|
<el-option value="sqlserver" /> |
|
|
|
|
|
<el-option value="postgresql" /> |
|
|
|
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="Oss类型"> |
|
|
<el-form-item label="Oss类型"> |
|
@ -25,26 +23,28 @@ |
|
|
<el-option value="aliyun-oss" /> |
|
|
<el-option value="aliyun-oss" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="配置文件环境变量名"> |
|
|
|
|
|
<el-input v-model.number="config.system.configEnv" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="数据初始化"> |
|
|
|
|
|
<el-checkbox v-model="config.system.needInitData">开启</el-checkbox> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="多点登录拦截"> |
|
|
<el-form-item label="多点登录拦截"> |
|
|
<el-checkbox v-model="config.system.useMultipoint">开启</el-checkbox> |
|
|
<el-checkbox v-model="config.system.useMultipoint">开启</el-checkbox> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- System end --> |
|
|
|
|
|
|
|
|
|
|
|
<!-- JWT start --> |
|
|
|
|
|
<h2>jwt签名</h2> |
|
|
|
|
|
|
|
|
<el-form-item label="限流次数"> |
|
|
|
|
|
<el-input-number v-model.number="config.system.iplimitCount" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="限流时间"> |
|
|
|
|
|
<el-input-number v-model.number="config.system.iplimitTime" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-collapse-item> |
|
|
|
|
|
<el-collapse-item title="jwt签名" name="2"> |
|
|
<el-form-item label="jwt签名"> |
|
|
<el-form-item label="jwt签名"> |
|
|
<el-input v-model="config.jwt.signingKey" /> |
|
|
<el-input v-model="config.jwt.signingKey" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- JWT end --> |
|
|
|
|
|
|
|
|
|
|
|
<!-- Zap start --> |
|
|
|
|
|
<h2>Zap日志配置</h2> |
|
|
|
|
|
|
|
|
<el-form-item label="有效期(秒)"> |
|
|
|
|
|
<el-input v-model="config.jwt.expiresTime" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="缓冲期(秒)"> |
|
|
|
|
|
<el-input v-model="config.jwt.bufferTime" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-collapse-item> |
|
|
|
|
|
<el-collapse-item title="Zap日志配置" name="3"> |
|
|
<el-form-item label="级别"> |
|
|
<el-form-item label="级别"> |
|
|
<el-input v-model.number="config.zap.level" /> |
|
|
<el-input v-model.number="config.zap.level" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
@ -57,9 +57,6 @@ |
|
|
<el-form-item label="日志文件夹"> |
|
|
<el-form-item label="日志文件夹"> |
|
|
<el-input v-model="config.zap.director" /> |
|
|
<el-input v-model="config.zap.director" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="软链接名称"> |
|
|
|
|
|
<el-input v-model="config.zap.linkName" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="编码级"> |
|
|
<el-form-item label="编码级"> |
|
|
<el-input v-model="config.zap.encodeLevel" /> |
|
|
<el-input v-model="config.zap.encodeLevel" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
@ -72,10 +69,8 @@ |
|
|
<el-form-item label="输出控制台"> |
|
|
<el-form-item label="输出控制台"> |
|
|
<el-checkbox v-model="config.zap.logInConsole" /> |
|
|
<el-checkbox v-model="config.zap.logInConsole" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- Zap end --> |
|
|
|
|
|
|
|
|
|
|
|
<!-- Redis start --> |
|
|
|
|
|
<h2>Redis admin数据库配置</h2> |
|
|
|
|
|
|
|
|
</el-collapse-item> |
|
|
|
|
|
<el-collapse-item title="Redis admin数据库配置" name="4"> |
|
|
<el-form-item label="db"> |
|
|
<el-form-item label="db"> |
|
|
<el-input v-model="config.redis.db" /> |
|
|
<el-input v-model="config.redis.db" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
@ -85,10 +80,9 @@ |
|
|
<el-form-item label="password"> |
|
|
<el-form-item label="password"> |
|
|
<el-input v-model="config.redis.password" /> |
|
|
<el-input v-model="config.redis.password" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- Redis end --> |
|
|
|
|
|
|
|
|
</el-collapse-item> |
|
|
|
|
|
|
|
|
<!-- Email start --> |
|
|
|
|
|
<h2>邮箱配置</h2> |
|
|
|
|
|
|
|
|
<el-collapse-item title="邮箱配置" name="5"> |
|
|
<el-form-item label="接收者邮箱"> |
|
|
<el-form-item label="接收者邮箱"> |
|
|
<el-input v-model="config.email.to" placeholder="可多个,以逗号分隔" /> |
|
|
<el-input v-model="config.email.to" placeholder="可多个,以逗号分隔" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
@ -110,17 +104,14 @@ |
|
|
<el-form-item label="测试邮件"> |
|
|
<el-form-item label="测试邮件"> |
|
|
<el-button @click="email">测试邮件</el-button> |
|
|
<el-button @click="email">测试邮件</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- Email end --> |
|
|
|
|
|
|
|
|
|
|
|
<!-- Casbin start --> |
|
|
|
|
|
<h2>casbin配置</h2> |
|
|
|
|
|
|
|
|
</el-collapse-item> |
|
|
|
|
|
<el-collapse-item title="casbin配置" name="6"> |
|
|
<el-form-item label="模型地址"> |
|
|
<el-form-item label="模型地址"> |
|
|
<el-input v-model="config.casbin.modelPath" /> |
|
|
<el-input v-model="config.casbin.modelPath" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- Casbin end --> |
|
|
|
|
|
|
|
|
</el-collapse-item> |
|
|
|
|
|
|
|
|
<!-- Captcha start --> |
|
|
|
|
|
<h2>验证码配置</h2> |
|
|
|
|
|
|
|
|
<el-collapse-item title="验证码配置" name="7"> |
|
|
<el-form-item label="keyLong"> |
|
|
<el-form-item label="keyLong"> |
|
|
<el-input v-model.number="config.captcha.keyLong" /> |
|
|
<el-input v-model.number="config.captcha.keyLong" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
@ -130,11 +121,22 @@ |
|
|
<el-form-item label="imgHeight"> |
|
|
<el-form-item label="imgHeight"> |
|
|
<el-input v-model.number="config.captcha.imgHeight" /> |
|
|
<el-input v-model.number="config.captcha.imgHeight" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- Captcha end --> |
|
|
|
|
|
|
|
|
</el-collapse-item> |
|
|
|
|
|
|
|
|
<!-- dbType start --> |
|
|
|
|
|
|
|
|
<el-collapse-item title="验证码配置" name="8"> |
|
|
|
|
|
<el-form-item label="keyLong"> |
|
|
|
|
|
<el-input v-model.number="config.captcha.keyLong" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="imgWidth"> |
|
|
|
|
|
<el-input v-model.number="config.captcha.imgWidth" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="imgHeight"> |
|
|
|
|
|
<el-input v-model.number="config.captcha.imgHeight" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-collapse-item> |
|
|
|
|
|
|
|
|
|
|
|
<el-collapse-item title="数据库配置" name="9"> |
|
|
<template v-if="config.system.dbType === 'mysql'"> |
|
|
<template v-if="config.system.dbType === 'mysql'"> |
|
|
<h2>mysql admin数据库配置</h2> |
|
|
|
|
|
<el-form-item label="username"> |
|
|
<el-form-item label="username"> |
|
|
<el-input v-model="config.mysql.username" /> |
|
|
<el-input v-model="config.mysql.username" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
@ -157,80 +159,11 @@ |
|
|
<el-checkbox v-model="config.mysql.logMode" /> |
|
|
<el-checkbox v-model="config.mysql.logMode" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</template> |
|
|
</template> |
|
|
<template v-if="config.system.dbType === 'sqlite'"> |
|
|
|
|
|
<h2>sqlite admin数据库配置</h2> |
|
|
|
|
|
<el-form-item label="path"> |
|
|
|
|
|
<el-input v-model="config.mysql.path" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="maxIdleConns"> |
|
|
|
|
|
<el-input v-model.number="config.mysql.maxIdleConns" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="maxOpenConns"> |
|
|
|
|
|
<el-input v-model.number="config.mysql.maxOpenConns" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="logger"> |
|
|
|
|
|
<el-checkbox v-model="config.mysql.logger" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</template> |
|
|
|
|
|
<template v-if="config.system.dbType === 'sqlserver'"> |
|
|
|
|
|
<h2>sqlserver admin数据库配置</h2> |
|
|
|
|
|
<el-form-item label="username"> |
|
|
|
|
|
<el-input v-model="config.sqlserver.username" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="password"> |
|
|
|
|
|
<el-input v-model="config.sqlserver.password" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="path"> |
|
|
|
|
|
<el-input v-model="config.sqlserver.path" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="dbname"> |
|
|
|
|
|
<el-input v-model="config.sqlserver.dbname" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="maxIdleConns"> |
|
|
|
|
|
<el-input v-model.number="config.sqlserver.maxIdleConns" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="maxOpenConns"> |
|
|
|
|
|
<el-input v-model.number="config.sqlserver.maxOpenConns" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="logger"> |
|
|
|
|
|
<el-checkbox v-model="config.sqlserver.logger" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</template> |
|
|
|
|
|
<template v-if="config.system.dbType === 'postgresql'"> |
|
|
|
|
|
<h2>postgresql admin数据库配置</h2> |
|
|
|
|
|
<el-form-item label="username"> |
|
|
|
|
|
<el-input v-model="config.mysql.username" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="password"> |
|
|
|
|
|
<el-input v-model="config.mysql.password" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="dbName"> |
|
|
|
|
|
<el-input v-model="config.mysql.dbName" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="port"> |
|
|
|
|
|
<el-input v-model="config.mysql.port" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="config"> |
|
|
|
|
|
<el-input v-model="config.mysql.config" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="maxIdleConns"> |
|
|
|
|
|
<el-input v-model.number="config.mysql.maxIdleConns" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="maxOpenConns"> |
|
|
|
|
|
<el-input v-model.number="config.mysql.maxOpenConns" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="logger"> |
|
|
|
|
|
<el-checkbox v-model="config.mysql.logger" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="prefer-simple-protocol"> |
|
|
|
|
|
<el-checkbox v-model="config.mysql.preferSimpleProtocol" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</template> |
|
|
|
|
|
<!-- dbType end --> |
|
|
|
|
|
|
|
|
</el-collapse-item> |
|
|
|
|
|
|
|
|
<!-- ossType start --> |
|
|
|
|
|
|
|
|
<el-collapse-item title="oss配置" name="10"> |
|
|
<template v-if="config.system.ossType === 'local'"> |
|
|
<template v-if="config.system.ossType === 'local'"> |
|
|
<h2>本地上传配置</h2> |
|
|
|
|
|
|
|
|
<h2>本地文件配置</h2> |
|
|
<el-form-item label="本地文件路径"> |
|
|
<el-form-item label="本地文件路径"> |
|
|
<el-input v-model="config.local.path" /> |
|
|
<el-input v-model="config.local.path" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
@ -298,7 +231,73 @@ |
|
|
<el-input v-model="config.aliyunOSS.bucketUrl" /> |
|
|
<el-input v-model="config.aliyunOSS.bucketUrl" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</template> |
|
|
</template> |
|
|
<!-- ossType end --> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-collapse-item> |
|
|
|
|
|
|
|
|
|
|
|
<el-collapse-item title="Excel上传配置" name="11"> |
|
|
|
|
|
<el-form-item label="合成目标地址"> |
|
|
|
|
|
<el-input v-model="config.excel.dir" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-collapse-item> |
|
|
|
|
|
|
|
|
|
|
|
<el-collapse-item title="自动化代码配置" name="12"> |
|
|
|
|
|
<el-form-item label="是否自动重启(linux)"> |
|
|
|
|
|
<el-checkbox v-model="config.autoCode.transferRestart" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="root(项目根路径)"> |
|
|
|
|
|
<el-input v-model="config.autoCode.root" disabled /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="Server(后端代码地址)"> |
|
|
|
|
|
<el-input v-model="config.autoCode.transferRestart" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="SApi(后端api文件夹地址)"> |
|
|
|
|
|
<el-input v-model="config.autoCode.serverApi" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="SInitialize(后端Initialize文件夹)"> |
|
|
|
|
|
<el-input v-model="config.autoCode.serverInitialize" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="SModel(后端Model文件地址)"> |
|
|
|
|
|
<el-input v-model="config.autoCode.serverModel" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="SRequest(后端Request文件夹地址)"> |
|
|
|
|
|
<el-input v-model="config.autoCode.serverRequest" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="SRouter(后端Router文件夹地址)"> |
|
|
|
|
|
<el-input v-model="config.autoCode.serverRouter" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="SService(后端Service文件夹地址)"> |
|
|
|
|
|
<el-input v-model="config.autoCode.serverService" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="Web(前端文件夹地址)"> |
|
|
|
|
|
<el-input v-model="config.autoCode.web" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="WApi(后端WApi文件夹地址)"> |
|
|
|
|
|
<el-input v-model="config.autoCode.webApi" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="WForm(后端WForm文件夹地址)"> |
|
|
|
|
|
<el-input v-model="config.autoCode.webForm" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="WTable(后端WTable文件夹地址)"> |
|
|
|
|
|
<el-input v-model="config.autoCode.webTable" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-collapse-item> |
|
|
|
|
|
|
|
|
|
|
|
<el-collapse-item title="Timer(定时任务)" name="13"> |
|
|
|
|
|
<el-form-item label="Start(是否启用)"> |
|
|
|
|
|
<el-select v-model="config.timer.wTable" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="Spec(CRON表达式)"> |
|
|
|
|
|
<el-input v-model="config.timer.spec" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<template v-for="(item,k) in config.timer.detail"> |
|
|
|
|
|
<div v-for="(key,k2) in item" :key="k2"> |
|
|
|
|
|
<el-form-item :key="k+k2" :label="k2"> |
|
|
|
|
|
<el-input v-model="item[k2]" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-collapse-item> |
|
|
|
|
|
</el-collapse> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<div class="gva-btn-list"> |
|
|
<div class="gva-btn-list"> |
|
|
<el-button type="primary" size="mini" @click="update">立即更新</el-button> |
|
|
<el-button type="primary" size="mini" @click="update">立即更新</el-button> |
|
@ -319,7 +318,8 @@ export default { |
|
|
jwt: {}, |
|
|
jwt: {}, |
|
|
casbin: {}, |
|
|
casbin: {}, |
|
|
mysql: {}, |
|
|
mysql: {}, |
|
|
sqlite: {}, |
|
|
|
|
|
|
|
|
excel: {}, |
|
|
|
|
|
autoCode: {}, |
|
|
redis: {}, |
|
|
redis: {}, |
|
|
qiniu: {}, |
|
|
qiniu: {}, |
|
|
tencentCOS: {}, |
|
|
tencentCOS: {}, |
|
@ -327,7 +327,10 @@ export default { |
|
|
captcha: {}, |
|
|
captcha: {}, |
|
|
zap: {}, |
|
|
zap: {}, |
|
|
local: {}, |
|
|
local: {}, |
|
|
email: {} |
|
|
|
|
|
|
|
|
email: {}, |
|
|
|
|
|
timer: { |
|
|
|
|
|
detail: {} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@ -374,7 +377,7 @@ export default { |
|
|
<style lang="scss"> |
|
|
<style lang="scss"> |
|
|
.system { |
|
|
.system { |
|
|
background: #fff; |
|
|
background: #fff; |
|
|
padding:12px; |
|
|
|
|
|
|
|
|
padding:36px; |
|
|
border-radius: 2px; |
|
|
border-radius: 2px; |
|
|
h2 { |
|
|
h2 { |
|
|
padding: 10px; |
|
|
padding: 10px; |
|
@ -382,5 +385,11 @@ export default { |
|
|
font-size: 16px; |
|
|
font-size: 16px; |
|
|
box-shadow: -4px 0px 0px 0px #e7e8e8; |
|
|
box-shadow: -4px 0px 0px 0px #e7e8e8; |
|
|
} |
|
|
} |
|
|
|
|
|
::v-deep(.el-input-number__increase){ |
|
|
|
|
|
top:5px !important; |
|
|
|
|
|
} |
|
|
|
|
|
.gva-btn-list{ |
|
|
|
|
|
margin-top:16px; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
</style> |
|
|
</style> |