|
|
|
@ -1,6 +1,6 @@
@@ -1,6 +1,6 @@
|
|
|
|
|
<template> |
|
|
|
|
<div class="app-container"> |
|
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> |
|
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
|
|
|
|
#foreach($column in $columns) |
|
|
|
|
#if($column.query) |
|
|
|
|
#set($dictType=$column.dictType) |
|
|
|
@ -51,23 +51,30 @@
@@ -51,23 +51,30 @@
|
|
|
|
|
#end |
|
|
|
|
#end |
|
|
|
|
<el-form-item> |
|
|
|
|
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
|
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
|
|
|
|
|
<el-row :gutter="10" class="mb8"> |
|
|
|
|
<el-col :span="1.5"> |
|
|
|
|
<el-button |
|
|
|
|
class="filter-item" |
|
|
|
|
type="primary" |
|
|
|
|
icon="el-icon-search" |
|
|
|
|
size="mini" |
|
|
|
|
@click="handleQuery" |
|
|
|
|
>搜索</el-button> |
|
|
|
|
<el-button |
|
|
|
|
class="filter-item" |
|
|
|
|
type="primary" |
|
|
|
|
icon="el-icon-plus" |
|
|
|
|
size="mini" |
|
|
|
|
@click="handleAdd" |
|
|
|
|
v-hasPermi="['${moduleName}:${businessName}:add']" |
|
|
|
|
>新增</el-button> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
</el-col> |
|
|
|
|
<div class="top-right-btn"> |
|
|
|
|
<el-tooltip class="item" effect="dark" content="刷新" placement="top"> |
|
|
|
|
<el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> |
|
|
|
|
</el-tooltip> |
|
|
|
|
<el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top"> |
|
|
|
|
<el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> |
|
|
|
|
</el-tooltip> |
|
|
|
|
</div> |
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
<el-table |
|
|
|
|
v-loading="loading" |
|
|
|
@ -151,6 +158,12 @@
@@ -151,6 +158,12 @@
|
|
|
|
|
></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
#elseif($column.htmlType == "select" && $dictType) |
|
|
|
|
<el-form-item label="${comment}"> |
|
|
|
|
<el-select v-model="form.${field}" placeholder="请选择${comment}"> |
|
|
|
|
<el-option label="请选择字典生成" value="" /> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
#elseif($column.htmlType == "checkbox" && "" != $dictType) |
|
|
|
|
<el-form-item label="${comment}"> |
|
|
|
|
<el-checkbox-group v-model="form.${field}"> |
|
|
|
@ -168,12 +181,6 @@
@@ -168,12 +181,6 @@
|
|
|
|
|
<el-checkbox>请选择字典生成</el-checkbox> |
|
|
|
|
</el-checkbox-group> |
|
|
|
|
</el-form-item> |
|
|
|
|
#elseif($column.htmlType == "select" && $dictType) |
|
|
|
|
<el-form-item label="${comment}"> |
|
|
|
|
<el-select v-model="form.${field}" placeholder="请选择${comment}"> |
|
|
|
|
<el-option label="请选择字典生成" value="" /> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
#elseif($column.htmlType == "radio" && "" != $dictType) |
|
|
|
|
<el-form-item label="${comment}"> |
|
|
|
|
<el-radio-group v-model="form.${field}"> |
|
|
|
@ -229,6 +236,8 @@ export default {
@@ -229,6 +236,8 @@ export default {
|
|
|
|
|
return { |
|
|
|
|
// 遮罩层 |
|
|
|
|
loading: true, |
|
|
|
|
// 显示搜索条件 |
|
|
|
|
showSearch: true, |
|
|
|
|
// ${functionName}表格数据 |
|
|
|
|
${businessName}List: [], |
|
|
|
|
// ${functionName}树选项 |
|
|
|
@ -253,7 +262,7 @@ export default {
@@ -253,7 +262,7 @@ export default {
|
|
|
|
|
queryParams: { |
|
|
|
|
#foreach ($column in $columns) |
|
|
|
|
#if($column.query) |
|
|
|
|
$column.javaField: undefined#if($velocityCount != $columns.size()),#end |
|
|
|
|
$column.javaField: null#if($velocityCount != $columns.size()),#end |
|
|
|
|
|
|
|
|
|
#end |
|
|
|
|
#end |
|
|
|
@ -349,7 +358,7 @@ export default {
@@ -349,7 +358,7 @@ export default {
|
|
|
|
|
$column.javaField: []#if($velocityCount != $columns.size()),#end |
|
|
|
|
|
|
|
|
|
#else |
|
|
|
|
$column.javaField: undefined#if($velocityCount != $columns.size()),#end |
|
|
|
|
$column.javaField: null#if($velocityCount != $columns.size()),#end |
|
|
|
|
|
|
|
|
|
#end |
|
|
|
|
#end |
|
|
|
@ -376,7 +385,7 @@ export default {
@@ -376,7 +385,7 @@ export default {
|
|
|
|
|
handleUpdate(row) { |
|
|
|
|
this.reset(); |
|
|
|
|
this.getTreeselect(); |
|
|
|
|
if (row != undefined) { |
|
|
|
|
if (row != null) { |
|
|
|
|
this.form.${treeParentCode} = row.${treeCode}; |
|
|
|
|
} |
|
|
|
|
get${BusinessName}(row.${pkColumn.javaField}).then(response => { |
|
|
|
@ -391,7 +400,7 @@ export default {
@@ -391,7 +400,7 @@ export default {
|
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
/** 提交按钮 */ |
|
|
|
|
submitForm: function() { |
|
|
|
|
submitForm() { |
|
|
|
|
this.#[[$]]#refs["form"].validate(valid => { |
|
|
|
|
if (valid) { |
|
|
|
|
#foreach ($column in $columns) |
|
|
|
@ -399,7 +408,7 @@ export default {
@@ -399,7 +408,7 @@ export default {
|
|
|
|
|
this.form.$column.javaField = this.form.${column.javaField}.join(","); |
|
|
|
|
#end |
|
|
|
|
#end |
|
|
|
|
if (this.form.${pkColumn.javaField} != undefined) { |
|
|
|
|
if (this.form.${pkColumn.javaField} != null) { |
|
|
|
|
update${BusinessName}(this.form).then(response => { |
|
|
|
|
if (response.code === 200) { |
|
|
|
|
this.msgSuccess("修改成功"); |
|
|
|
|