Commit 1e1705be by Elune

修复运维管理的一些bug

parent 2bc97e31
......@@ -49,12 +49,12 @@
<el-form-item label="备份目录" prop="backupPath">
<el-input v-model="form.backupPath" style="width: 670px" placeholder="例如: /opt/backup" />
</el-form-item>
<el-form-item label="启动脚本" prop="startScript">
<el-input v-model="form.startScript" :rows="3" type="textarea" autosize style="width: 670px" placeholder="" />
</el-form-item>
<el-form-item label="部署脚本" prop="deployScript">
<el-input v-model="form.deployScript" :rows="3" type="textarea" autosize style="width: 670px" placeholder="" />
</el-form-item>
<el-form-item label="启动脚本" prop="startScript">
<el-input v-model="form.startScript" :rows="3" type="textarea" autosize style="width: 670px" placeholder="" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">取消</el-button>
......
......@@ -41,7 +41,7 @@ export default {
loading: false,
dialog: false,
headers: {
Authorization: 'Bearer ' + getToken()
Authorization: getToken()
},
rules: {}
}
......
......@@ -36,14 +36,14 @@
<eForm ref="execute" :database-info="currentRow" />
<el-dialog append-to-body :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="530px">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="100px">
<el-form-item label="数据库名称" prop="name">
<el-form-item label="连接名称" prop="name">
<el-input v-model="form.name" style="width: 370px" />
</el-form-item>
<el-form-item label="连接地址" prop="jdbcUrl">
<el-form-item label="JDBC地址" prop="jdbcUrl">
<el-input v-model="form.jdbcUrl" style="width: 300px" />
<el-button :loading="loading" type="info" @click="testConnectDatabase">测试</el-button>
<el-button :loading="loading" type="success" @click="testConnectDatabase">测试</el-button>
</el-form-item>
<el-form-item label="用户" prop="userName">
<el-form-item label="用户" prop="userName">
<el-input v-model="form.userName" style="width: 370px" />
</el-form-item>
<el-form-item label="密码" prop="pwd">
......@@ -58,10 +58,10 @@
<!--表格渲染-->
<el-table ref="table" v-loading="crud.loading" :data="crud.data" highlight-current-row stripe style="width: 100%" @selection-change="crud.selectionChangeHandler" @current-change="handleCurrentChange">
<el-table-column type="selection" width="55" />
<el-table-column v-if="columns.visible('name')" prop="name" label="数据库名称" />
<el-table-column v-if="columns.visible('name')" prop="name" width="130px" label="数据库名称" />
<el-table-column v-if="columns.visible('jdbcUrl')" prop="jdbcUrl" label="连接地址" />
<el-table-column v-if="columns.visible('userName')" prop="userName" label="用户名" />
<el-table-column v-if="columns.visible('createTime')" prop="createTime" label="创建日期">
<el-table-column v-if="columns.visible('userName')" prop="userName" width="200px" label="用户名" />
<el-table-column v-if="columns.visible('createTime')" prop="createTime" width="200px" label="创建日期">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
......@@ -91,7 +91,7 @@ import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
// crud交由presenter持有
const defaultCrud = CRUD({ title: '数据库', url: 'api/database', crudMethod: { ...crudDatabase }})
const defaultForm = { id: null, name: null, jdbcUrl: null, userName: null, pwd: null }
const defaultForm = { id: null, name: null, jdbcUrl: 'jdbc:mysql://', userName: null, pwd: null }
export default {
name: 'DataBase',
components: { eForm, pagination, crudOperation, rrOperation, udOperation },
......@@ -130,7 +130,7 @@ export default {
this.loading = true
testDbConnect(this.form).then((res) => {
this.loading = false
crud.notify(res ? '连接成功' : '连接失败', res ? 'success' : 'error')
this.crud.notify(res ? '连接成功' : '连接失败', res ? 'success' : 'error')
}).catch(() => {
this.loading = false
})
......
......@@ -104,7 +104,7 @@ export default {
this.dialog = false
this.submitLoading = false
this.appNames = ''
this.$parent.init()
this.$parent.crud.toQuery()
})
.catch(err => {
this.submitLoading = false
......
......@@ -86,7 +86,7 @@ export default {
methods: {
delMethod(id) {
this.delLoading = true
del(id).then(() => {
del([id]).then(() => {
this.delLoading = false
this.$refs[id].doClose()
this.crud.dleChangePage(1)
......
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