代码生成器优化,配置更方便
This commit is contained in:
@@ -1,45 +1,72 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" size="mini" @click="toGen">生成代码</el-button>
|
<el-button type="primary" size="mini" @click="toGen">生成代码</el-button>
|
||||||
<el-dialog :visible.sync="dialog" title="代码生成配置" append-to-body width="800px">
|
<el-dialog :visible.sync="dialog" :close-on-click-modal="false" :before-close="cancel" title="代码生成配置" append-to-body width="850px">
|
||||||
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
|
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="small" label-width="78px">
|
||||||
<el-table-column label="序号" width="80" align="center">
|
<el-form-item label="模块名称" prop="moduleName">
|
||||||
<template slot-scope="scope">
|
<el-input v-model="form.moduleName"/>
|
||||||
<div>{{ scope.$index + 1 }}</div>
|
</el-form-item>
|
||||||
</template>
|
<el-form-item label="至于包下" prop="pack">
|
||||||
</el-table-column>
|
<el-input v-model="form.pack"/>
|
||||||
<el-table-column prop="columnName" label="字段名称"/>
|
</el-form-item>
|
||||||
<el-table-column prop="columnType" label="字段类型"/>
|
<el-form-item label="前端路径" prop="path">
|
||||||
<el-table-column prop="columnComment" label="字段标题">
|
<el-input v-model="form.path"/>
|
||||||
<template slot-scope="scope">
|
</el-form-item>
|
||||||
<el-input v-model="data[scope.$index].columnComment" class="edit-input"/>
|
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;margin-bottom: 15px">
|
||||||
</template>
|
<el-table-column label="序号" width="80" align="center">
|
||||||
</el-table-column>
|
<template slot-scope="scope">
|
||||||
<el-table-column label="查询方式">
|
<div>{{ scope.$index + 1 }}</div>
|
||||||
<template slot-scope="scope">
|
</template>
|
||||||
<el-select v-model="data[scope.$index].columnQuery" class="edit-input" clearable placeholder="请选择">
|
</el-table-column>
|
||||||
<el-option
|
<el-table-column prop="columnName" label="字段名称"/>
|
||||||
label="模糊查询"
|
<el-table-column prop="columnType" label="字段类型"/>
|
||||||
value="1"/>
|
<el-table-column prop="columnComment" label="字段标题">
|
||||||
<el-option
|
<template slot-scope="scope">
|
||||||
label="精确查询"
|
<el-input v-model="data[scope.$index].columnComment" class="edit-input"/>
|
||||||
value="2"/>
|
</template>
|
||||||
</el-select>
|
</el-table-column>
|
||||||
</template>
|
<el-table-column label="查询方式">
|
||||||
</el-table-column>
|
<template slot-scope="scope">
|
||||||
<el-table-column align="center" prop="columnShow" label="列表显示">
|
<el-select v-model="data[scope.$index].columnQuery" class="edit-input" clearable placeholder="请选择">
|
||||||
<template slot-scope="scope">
|
<el-option
|
||||||
<el-tooltip :content="scope.row.columnShow === 'true' ?'显示':'不显示'" placement="top">
|
label="模糊查询"
|
||||||
<el-switch
|
value="1"/>
|
||||||
v-model="data[scope.$index].columnShow"
|
<el-option
|
||||||
active-color="#13ce66"
|
label="精确查询"
|
||||||
inactive-color="#ff4949"
|
value="2"/>
|
||||||
active-value="true"
|
</el-select>
|
||||||
inactive-value="false"/>
|
</template>
|
||||||
</el-tooltip>
|
</el-table-column>
|
||||||
</template>
|
<el-table-column align="center" prop="columnShow" label="列表显示">
|
||||||
</el-table-column>
|
<template slot-scope="scope">
|
||||||
</el-table>
|
<el-tooltip :content="scope.row.columnShow === 'true' ?'显示':'不显示'" placement="top">
|
||||||
|
<el-switch
|
||||||
|
v-model="data[scope.$index].columnShow"
|
||||||
|
active-color="#13ce66"
|
||||||
|
inactive-color="#ff4949"
|
||||||
|
active-value="true"
|
||||||
|
inactive-value="false"/>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-form-item label="作者名称" prop="author">
|
||||||
|
<el-input v-model="form.author"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="去表前缀" prop="prefix">
|
||||||
|
<el-input v-model="form.prefix" placeholder="默认不去除表前缀"/>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- 可自定义显示配置 -->
|
||||||
|
<!-- <el-form-item label="Api路径">-->
|
||||||
|
<!-- <el-input v-model="form.apiPath"/>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<el-form-item label="是否覆盖" prop="cover">
|
||||||
|
<el-radio-group v-model="form.cover" size="mini">
|
||||||
|
<el-radio-button label="true">是</el-radio-button>
|
||||||
|
<el-radio-button label="false">否</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="text" @click="cancel">取消</el-button>
|
<el-button type="text" @click="cancel">取消</el-button>
|
||||||
<el-button :loading="genLoading" type="primary" @click="doSubmit">生成</el-button>
|
<el-button :loading="genLoading" type="primary" @click="doSubmit">生成</el-button>
|
||||||
@@ -50,6 +77,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import initData from '@/mixins/initData'
|
import initData from '@/mixins/initData'
|
||||||
|
import { update, get } from '@/api/genConfig'
|
||||||
import { generator } from '@/api/generator'
|
import { generator } from '@/api/generator'
|
||||||
export default {
|
export default {
|
||||||
name: 'Generator',
|
name: 'Generator',
|
||||||
@@ -62,7 +90,25 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
genLoading: false, dialog: false, columnQuery: ''
|
genLoading: false, dialog: false, columnQuery: '',
|
||||||
|
form: { author: '', pack: '', path: '', moduleName: '', cover: 'false', apiPath: '', prefix: '' },
|
||||||
|
rules: {
|
||||||
|
author: [
|
||||||
|
{ required: true, message: '作者不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
pack: [
|
||||||
|
{ required: true, message: '包路径不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
moduleName: [
|
||||||
|
{ required: true, message: '包路径不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
path: [
|
||||||
|
{ required: true, message: '前端代码生成路径不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
cover: [
|
||||||
|
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -71,6 +117,10 @@ export default {
|
|||||||
this.time = 130
|
this.time = 130
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.init()
|
this.init()
|
||||||
|
get().then(data => {
|
||||||
|
this.form = data
|
||||||
|
this.form.cover = this.form.cover.toString()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
beforeInit() {
|
beforeInit() {
|
||||||
@@ -81,21 +131,33 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
this.dialog = false
|
this.dialog = false
|
||||||
|
this.genLoading = false
|
||||||
|
this.$refs['form'].resetFields()
|
||||||
|
this.form = { author: '', pack: '', path: '', moduleName: '', cover: 'false', apiPath: '', prefix: '' }
|
||||||
},
|
},
|
||||||
doSubmit() {
|
doSubmit() {
|
||||||
this.genLoading = true
|
this.genLoading = true
|
||||||
generator(this.data, this.name).then(res => {
|
this.$refs['form'].validate((valid) => {
|
||||||
this.$notify({
|
if (valid) {
|
||||||
title: '生成成功',
|
update(this.form).then(res => {
|
||||||
type: 'success',
|
generator(this.data, this.name).then(res => {
|
||||||
duration: 2500
|
this.$notify({
|
||||||
})
|
title: '生成成功',
|
||||||
this.dialog = false
|
type: 'success',
|
||||||
this.genLoading = false
|
duration: 2500
|
||||||
}).catch(err => {
|
})
|
||||||
this.dialog = false
|
this.cancel()
|
||||||
this.genLoading = false
|
}).catch(err => {
|
||||||
console.log(err.response.data.message)
|
this.cancel()
|
||||||
|
console.log(err.response.data.message)
|
||||||
|
})
|
||||||
|
}).catch(err => {
|
||||||
|
this.cancel()
|
||||||
|
console.log(err.response.data.message)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -109,3 +171,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
/deep/ .el-dialog__body{
|
||||||
|
padding-bottom: 5px;
|
||||||
|
}
|
||||||
|
/deep/ .input-with-select .el-input-group__prepend {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -4,47 +4,7 @@
|
|||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<el-input v-model="query.name" clearable placeholder="请输入表名" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
|
<el-input v-model="query.name" clearable placeholder="请输入表名" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
|
||||||
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toQuery">搜索</el-button>
|
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toQuery">搜索</el-button>
|
||||||
<!-- 新增 -->
|
|
||||||
<div style="display: inline-block;margin: 0px 2px;">
|
|
||||||
<el-button
|
|
||||||
class="filter-item"
|
|
||||||
size="mini"
|
|
||||||
type="warning"
|
|
||||||
icon="el-icon-setting"
|
|
||||||
@click="openConfig">生成器配置</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<!--生成器配置-->
|
|
||||||
<el-dialog :visible.sync="dialog" title="生成器配置" append-to-body width="550px">
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="78px">
|
|
||||||
<el-form-item label="作者名称" prop="author">
|
|
||||||
<el-input v-model="form.author" style="width: 420px;"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="去表前缀" prop="prefix">
|
|
||||||
<el-input v-model="form.prefix" placeholder="默认不去除表前缀" style="width: 420px;"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="模块名称" prop="moduleName">
|
|
||||||
<el-input v-model="form.moduleName" style="width: 420px;"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="至于包下" prop="pack">
|
|
||||||
<el-input v-model="form.pack" style="width: 420px;"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="前端路径" prop="path">
|
|
||||||
<el-input v-model="form.path" style="width: 420px;"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="API路径" prop="apiPath">
|
|
||||||
<el-input v-model="form.apiPath" style="width: 420px;"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="是否覆盖" prop="cover">
|
|
||||||
<el-radio v-model="form.cover" label="true">是</el-radio>
|
|
||||||
<el-radio v-model="form.cover" label="false">否</el-radio>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="text" @click="cancel">取消</el-button>
|
|
||||||
<el-button :loading="loading" type="primary" @click="doSubmit">确认</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
|
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
|
||||||
<el-table-column label="序号" width="85" align="center">
|
<el-table-column label="序号" width="85" align="center">
|
||||||
@@ -79,7 +39,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { get, update } from '@/api/genConfig'
|
|
||||||
import initData from '@/mixins/initData'
|
import initData from '@/mixins/initData'
|
||||||
import { parseTime } from '@/utils/index'
|
import { parseTime } from '@/utils/index'
|
||||||
import Generator from './generator'
|
import Generator from './generator'
|
||||||
@@ -127,13 +86,6 @@ export default {
|
|||||||
if (name) { this.params['name'] = name }
|
if (name) { this.params['name'] = name }
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
openConfig() {
|
|
||||||
get().then(data => {
|
|
||||||
this.form = data
|
|
||||||
this.form.cover = this.form.cover.toString()
|
|
||||||
})
|
|
||||||
this.dialog = true
|
|
||||||
},
|
|
||||||
cancel() {
|
cancel() {
|
||||||
this.resetForm()
|
this.resetForm()
|
||||||
},
|
},
|
||||||
@@ -146,25 +98,6 @@ export default {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
|
||||||
doUpdate() {
|
|
||||||
update(this.form).then(res => {
|
|
||||||
this.resetForm()
|
|
||||||
this.$notify({
|
|
||||||
title: '更新成功',
|
|
||||||
type: 'success',
|
|
||||||
duration: 2500
|
|
||||||
})
|
|
||||||
this.loading = false
|
|
||||||
}).catch(err => {
|
|
||||||
this.loading = false
|
|
||||||
console.log(err.response.data.message)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
resetForm() {
|
|
||||||
this.dialog = false
|
|
||||||
this.$refs['form'].resetFields()
|
|
||||||
this.form = { author: '', pack: '', path: '', moduleName: '', cover: 'false', apiPath: '', prefix: '' }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :append-to-body="true" :visible.sync="dialog" :title="isAdd ? '新增部门' : '编辑部门'" width="500px">
|
<el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog" :title="isAdd ? '新增部门' : '编辑部门'" width="500px">
|
||||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
|
||||||
<el-form-item label="名称" prop="name">
|
<el-form-item label="名称" prop="name">
|
||||||
<el-input v-model="form.name" style="width: 370px;"/>
|
<el-input v-model="form.name" style="width: 370px;"/>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :append-to-body="true" :visible.sync="dialog" :title="isAdd ? '新增字典' : '编辑字典'" width="500px">
|
<el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog" :title="isAdd ? '新增字典' : '编辑字典'" width="500px">
|
||||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
|
||||||
<el-form-item label="字典名称" prop="name">
|
<el-form-item label="字典名称" prop="name">
|
||||||
<el-input v-model="form.name" style="width: 370px;"/>
|
<el-input v-model="form.name" style="width: 370px;"/>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :append-to-body="true" :visible.sync="dialog" :title="isAdd ? '新增字典详情' : '编辑字典详情'" width="500px">
|
<el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog" :title="isAdd ? '新增字典详情' : '编辑字典详情'" width="500px">
|
||||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
|
||||||
<el-form-item label="字典标签" prop="label">
|
<el-form-item label="字典标签" prop="label">
|
||||||
<el-input v-model="form.label" style="width: 370px;"/>
|
<el-input v-model="form.label" style="width: 370px;"/>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :append-to-body="true" :visible.sync="dialog" :title="isAdd ? '新增岗位' : '编辑岗位'" width="500px">
|
<el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog" :title="isAdd ? '新增岗位' : '编辑岗位'" width="500px">
|
||||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
|
||||||
<el-form-item label="名称" prop="name">
|
<el-form-item label="名称" prop="name">
|
||||||
<el-input v-model="form.name" style="width: 370px;"/>
|
<el-input v-model="form.name" style="width: 370px;"/>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :visible.sync="dialog" :title="isAdd ? '新增菜单' : '编辑菜单'" append-to-body width="600px">
|
<el-dialog :visible.sync="dialog" :close-on-click-modal="false" :before-close="cancel" :title="isAdd ? '新增菜单' : '编辑菜单'" append-to-body width="600px">
|
||||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
|
||||||
<el-form-item label="菜单图标">
|
<el-form-item label="菜单图标">
|
||||||
<el-popover
|
<el-popover
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :visible.sync="dialog" :title="isAdd ? '新增权限' : '编辑权限'" append-to-body width="500px">
|
<el-dialog :visible.sync="dialog" :close-on-click-modal="false" :before-close="cancel" :title="isAdd ? '新增权限' : '编辑权限'" append-to-body width="500px">
|
||||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
|
||||||
<el-form-item label="名称" prop="name">
|
<el-form-item label="名称" prop="name">
|
||||||
<el-input v-model="form.name" style="width: 360px;"/>
|
<el-input v-model="form.name" style="width: 360px;"/>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :visible.sync="dialog" :title="isAdd ? '新增角色' : '编辑角色'" append-to-body width="500px">
|
<el-dialog :visible.sync="dialog" :close-on-click-modal="false" :before-close="cancel" :title="isAdd ? '新增角色' : '编辑角色'" append-to-body width="500px">
|
||||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
|
||||||
<el-form-item label="角色名称" prop="name">
|
<el-form-item label="角色名称" prop="name">
|
||||||
<el-input v-model="form.name" style="width: 370px;"/>
|
<el-input v-model="form.name" style="width: 370px;"/>
|
||||||
|
|||||||
@@ -311,3 +311,9 @@ export default {
|
|||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
/deep/ .el-tree-node__label{
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--Form表单-->
|
<!--Form表单-->
|
||||||
<el-dialog :visible.sync="dialog" :title="isAdd ? '新增任务' : '编辑任务'" append-to-body width="600px">
|
<el-dialog :visible.sync="dialog" :close-on-click-modal="false" :before-close="cancel" :title="isAdd ? '新增任务' : '编辑任务'" append-to-body width="600px">
|
||||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="100px">
|
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="100px">
|
||||||
<el-form-item label="任务名称" prop="jobName">
|
<el-form-item label="任务名称" prop="jobName">
|
||||||
<el-input v-model="form.jobName" style="width: 460px;"/>
|
<el-input v-model="form.jobName" style="width: 460px;"/>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="display: inline-block;">
|
<div style="display: inline-block;">
|
||||||
<el-dialog :visible.sync="dialog" :close-on-click-modal="false" :title="title" append-to-body width="475px" @close="cancel">
|
<el-dialog :visible.sync="dialog" :close-on-click-modal="false" :before-close="cancel" :title="title" append-to-body width="475px" @close="cancel">
|
||||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="88px">
|
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="88px">
|
||||||
<el-form-item label="新邮箱" prop="email">
|
<el-form-item label="新邮箱" prop="email">
|
||||||
<el-input v-model="form.email" auto-complete="on" style="width: 200px;"/>
|
<el-input v-model="form.email" auto-complete="on" style="width: 200px;"/>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="display: inline-block">
|
<div style="display: inline-block">
|
||||||
<el-dialog :visible.sync="dialog" :close-on-click-modal="false" :title="title" append-to-body width="500px" @close="cancel">
|
<el-dialog :visible.sync="dialog" :close-on-click-modal="false" :before-close="cancel" :title="title" append-to-body width="500px" @close="cancel">
|
||||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="88px">
|
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="88px">
|
||||||
<el-form-item label="旧密码" prop="oldPass">
|
<el-form-item label="旧密码" prop="oldPass">
|
||||||
<el-input v-model="form.oldPass" type="password" auto-complete="on" style="width: 370px;"/>
|
<el-input v-model="form.oldPass" type="password" auto-complete="on" style="width: 370px;"/>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :visible.sync="dialog" :title="isAdd ? '新增用户' : '编辑用户'" append-to-body width="570px">
|
<el-dialog :visible.sync="dialog" :close-on-click-modal="false" :before-close="cancel" :title="isAdd ? '新增用户' : '编辑用户'" append-to-body width="570px">
|
||||||
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="small" label-width="66px">
|
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="small" label-width="66px">
|
||||||
<el-form-item label="用户名" prop="username">
|
<el-form-item label="用户名" prop="username">
|
||||||
<el-input v-model="form.username"/>
|
<el-input v-model="form.username"/>
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--上传图片-->
|
<!--上传图片-->
|
||||||
<el-dialog :visible.sync="dialog" append-to-body width="600px" @close="doSubmit">
|
<el-dialog :visible.sync="dialog" :close-on-click-modal="false" append-to-body width="600px" @close="doSubmit">
|
||||||
<el-upload
|
<el-upload
|
||||||
:on-preview="handlePictureCardPreview"
|
:on-preview="handlePictureCardPreview"
|
||||||
:before-remove="handleBeforeRemove"
|
:before-remove="handleBeforeRemove"
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 文件上传 -->
|
<!-- 文件上传 -->
|
||||||
<el-dialog :visible.sync="dialog" append-to-body width="500px" @close="doSubmit">
|
<el-dialog :visible.sync="dialog" :close-on-click-modal="false" append-to-body width="500px" @close="doSubmit">
|
||||||
<el-upload
|
<el-upload
|
||||||
:before-remove="handleBeforeRemove"
|
:before-remove="handleBeforeRemove"
|
||||||
:on-success="handleSuccess"
|
:on-success="handleSuccess"
|
||||||
|
|||||||
Reference in New Issue
Block a user