|
|
|
@ -1,127 +1,72 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="app-container">
|
|
|
|
<div class="app-container">
|
|
|
|
|
|
|
|
## ========== 搜索区 ==========
|
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
|
#foreach($column in $columns)
|
|
|
|
#foreach($column in $columns)
|
|
|
|
#if($column.query)
|
|
|
|
#if ($column.listOperation)
|
|
|
|
#set($dictType=$column.dictType)
|
|
|
|
#set ($dictType=$column.dictType)
|
|
|
|
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
|
|
|
#set ($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
|
|
|
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
|
|
|
#set ($comment=$column.columnComment)
|
|
|
|
#if($parentheseIndex != -1)
|
|
|
|
#set ($parentheseIndex=$column.columnComment.indexOf("("))
|
|
|
|
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
|
|
|
|
#if ($parentheseIndex >= 0) #set($comment=$column.columnComment.substring(0, $parentheseIndex)) #end
|
|
|
|
#else
|
|
|
|
#if ($column.htmlType == "input")
|
|
|
|
#set($comment=$column.columnComment)
|
|
|
|
|
|
|
|
#end
|
|
|
|
|
|
|
|
#if($column.htmlType == "input")
|
|
|
|
|
|
|
|
<el-form-item label="${comment}" prop="${column.javaField}">
|
|
|
|
<el-form-item label="${comment}" prop="${column.javaField}">
|
|
|
|
<el-input
|
|
|
|
<el-input v-model="queryParams.${column.javaField}" placeholder="请输入${comment}" clearable size="small" @keyup.enter.native="handleQuery"/>
|
|
|
|
v-model="queryParams.${column.javaField}"
|
|
|
|
|
|
|
|
placeholder="请输入${comment}"
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && "" != $dictType)
|
|
|
|
#elseif ($column.htmlType == "select" || $column.htmlType == "radio")
|
|
|
|
<el-form-item label="${comment}" prop="${column.javaField}">
|
|
|
|
|
|
|
|
<el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable size="small">
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
v-for="dict in ${column.javaField}Options"
|
|
|
|
|
|
|
|
:key="dict.dictValue"
|
|
|
|
|
|
|
|
:label="dict.dictLabel"
|
|
|
|
|
|
|
|
:value="dict.dictValue"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && $dictType)
|
|
|
|
|
|
|
|
<el-form-item label="${comment}" prop="${column.javaField}">
|
|
|
|
<el-form-item label="${comment}" prop="${column.javaField}">
|
|
|
|
<el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable size="small">
|
|
|
|
<el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable size="small">
|
|
|
|
|
|
|
|
#if ("" != $dictType) ## 设置了 dictType 数据字典的情况
|
|
|
|
|
|
|
|
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.$dictType.toUpperCase())"
|
|
|
|
|
|
|
|
:key="parseInt(dict.dictValue)" :label="dict.dictLabel" :value="parseInt(dict.dictValue)"/>
|
|
|
|
|
|
|
|
#else ## 未设置 dictType 数据字典的情况
|
|
|
|
<el-option label="请选择字典生成" value="" />
|
|
|
|
<el-option label="请选择字典生成" value="" />
|
|
|
|
|
|
|
|
#end
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
#elseif($column.htmlType == "datetime" && $column.queryType != "BETWEEN")
|
|
|
|
#elseif($column.htmlType == "datetime")
|
|
|
|
|
|
|
|
#if ($column.queryType != "BETWEEN") ## 非范围
|
|
|
|
<el-form-item label="${comment}" prop="${column.javaField}">
|
|
|
|
<el-form-item label="${comment}" prop="${column.javaField}">
|
|
|
|
<el-date-picker clearable size="small"
|
|
|
|
<el-date-picker clearable size="small" v-model="queryParams.${column.javaField}" type="date" value-format="yyyy-MM-dd" placeholder="选择${comment}" />
|
|
|
|
v-model="queryParams.${column.javaField}"
|
|
|
|
|
|
|
|
type="date"
|
|
|
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
|
|
|
placeholder="选择${comment}">
|
|
|
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
|
|
|
|
#else ## 范围
|
|
|
|
<el-form-item label="${comment}">
|
|
|
|
<el-form-item label="${comment}">
|
|
|
|
<el-date-picker
|
|
|
|
<el-date-picker v-model="dateRange${AttrName}" size="small" style="width: 240px" value-format="yyyy-MM-dd"
|
|
|
|
v-model="daterange${AttrName}"
|
|
|
|
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
style="width: 240px"
|
|
|
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
|
|
|
type="daterange"
|
|
|
|
|
|
|
|
range-separator="-"
|
|
|
|
|
|
|
|
start-placeholder="开始日期"
|
|
|
|
|
|
|
|
end-placeholder="结束日期"
|
|
|
|
|
|
|
|
></el-date-picker>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
<el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## ========== 操作区 ==========
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-button
|
|
|
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
|
|
|
type="primary"
|
|
|
|
v-hasPermi="['${moduleName}:${businessName}:add']">新增</el-button>
|
|
|
|
icon="el-icon-plus"
|
|
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
|
|
@click="handleAdd"
|
|
|
|
|
|
|
|
v-hasPermi="['${moduleName}:${businessName}:add']"
|
|
|
|
|
|
|
|
>新增</el-button>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
type="success"
|
|
|
|
|
|
|
|
icon="el-icon-edit"
|
|
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
|
|
:disabled="single"
|
|
|
|
|
|
|
|
@click="handleUpdate"
|
|
|
|
|
|
|
|
v-hasPermi="['${moduleName}:${businessName}:edit']"
|
|
|
|
|
|
|
|
>修改</el-button>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
type="danger"
|
|
|
|
|
|
|
|
icon="el-icon-delete"
|
|
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
|
|
:disabled="multiple"
|
|
|
|
|
|
|
|
@click="handleDelete"
|
|
|
|
|
|
|
|
v-hasPermi="['${moduleName}:${businessName}:remove']"
|
|
|
|
|
|
|
|
>删除</el-button>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-button
|
|
|
|
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
|
|
|
type="warning"
|
|
|
|
v-hasPermi="['${moduleName}:${businessName}:export']">导出</el-button>
|
|
|
|
icon="el-icon-download"
|
|
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
|
|
@click="handleExport"
|
|
|
|
|
|
|
|
v-hasPermi="['${moduleName}:${businessName}:export']"
|
|
|
|
|
|
|
|
>导出</el-button>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## ========== 列表区 ==========
|
|
|
|
<el-table v-loading="loading" :data="${businessName}List" @selection-change="handleSelectionChange">
|
|
|
|
<el-table v-loading="loading" :data="${businessName}List" @selection-change="handleSelectionChange">
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
#foreach($column in $columns)
|
|
|
|
#foreach($column in $columns)
|
|
|
|
#set($javaField=$column.javaField)
|
|
|
|
#set ($dictType=$column.dictType)
|
|
|
|
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
|
|
|
#set ($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
|
|
|
#if($parentheseIndex != -1)
|
|
|
|
#set ($comment=$column.columnComment)
|
|
|
|
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
|
|
|
|
#set ($parentheseIndex=$column.columnComment.indexOf("("))
|
|
|
|
#else
|
|
|
|
#if ($parentheseIndex >= 0) #set($comment=$column.columnComment.substring(0, $parentheseIndex)) #end
|
|
|
|
#set($comment=$column.columnComment)
|
|
|
|
#if ($column.pk) ## 主键
|
|
|
|
#end
|
|
|
|
|
|
|
|
#if($column.pk)
|
|
|
|
|
|
|
|
<el-table-column label="${comment}" align="center" prop="${javaField}" />
|
|
|
|
<el-table-column label="${comment}" align="center" prop="${javaField}" />
|
|
|
|
#elseif($column.list && $column.htmlType == "datetime")
|
|
|
|
#elseif($column.list && $column.htmlType == "datetime")
|
|
|
|
<el-table-column label="${comment}" align="center" prop="${javaField}" width="180">
|
|
|
|
<el-table-column label="${comment}" align="center" prop="${javaField}" width="180">
|
|
|
|
@ -181,9 +126,13 @@
|
|
|
|
<el-form-item label="${comment}" prop="${field}">
|
|
|
|
<el-form-item label="${comment}" prop="${field}">
|
|
|
|
<el-input v-model="form.${field}" placeholder="请输入${comment}" />
|
|
|
|
<el-input v-model="form.${field}" placeholder="请输入${comment}" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
#elseif($column.htmlType == "uploadImage")
|
|
|
|
#elseif($column.htmlType == "imageUpload")
|
|
|
|
<el-form-item label="${comment}">
|
|
|
|
<el-form-item label="${comment}">
|
|
|
|
<uploadImage v-model="form.${field}"/>
|
|
|
|
<imageUpload v-model="form.${field}"/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
#elseif($column.htmlType == "fileUpload")
|
|
|
|
|
|
|
|
<el-form-item label="${comment}">
|
|
|
|
|
|
|
|
<fileUpload v-model="form.${field}"/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
#elseif($column.htmlType == "editor")
|
|
|
|
#elseif($column.htmlType == "editor")
|
|
|
|
<el-form-item label="${comment}">
|
|
|
|
<el-form-item label="${comment}">
|
|
|
|
@ -270,8 +219,14 @@
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName}, export${BusinessName} } from "@/api/${moduleName}/${businessName}";
|
|
|
|
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName}, export${BusinessName} } from "@/api/${moduleName}/${businessName}";
|
|
|
|
#foreach($column in $columns)
|
|
|
|
#foreach($column in $columns)
|
|
|
|
#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "uploadImage")
|
|
|
|
#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "imageUpload")
|
|
|
|
import UploadImage from '@/components/UploadImage';
|
|
|
|
import ImageUpload from '@/components/ImageUpload';
|
|
|
|
|
|
|
|
#break
|
|
|
|
|
|
|
|
#end
|
|
|
|
|
|
|
|
#end
|
|
|
|
|
|
|
|
#foreach($column in $columns)
|
|
|
|
|
|
|
|
#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "fileUpload")
|
|
|
|
|
|
|
|
import FileUpload from '@/components/FileUpload';
|
|
|
|
#break
|
|
|
|
#break
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
@ -286,8 +241,14 @@ export default {
|
|
|
|
name: "${BusinessName}",
|
|
|
|
name: "${BusinessName}",
|
|
|
|
components: {
|
|
|
|
components: {
|
|
|
|
#foreach($column in $columns)
|
|
|
|
#foreach($column in $columns)
|
|
|
|
#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "uploadImage")
|
|
|
|
#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "imageUpload")
|
|
|
|
UploadImage,
|
|
|
|
ImageUpload,
|
|
|
|
|
|
|
|
#break
|
|
|
|
|
|
|
|
#end
|
|
|
|
|
|
|
|
#end
|
|
|
|
|
|
|
|
#foreach($column in $columns)
|
|
|
|
|
|
|
|
#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "fileUpload")
|
|
|
|
|
|
|
|
FileUpload,
|
|
|
|
#break
|
|
|
|
#break
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
@ -304,6 +265,10 @@ export default {
|
|
|
|
loading: true,
|
|
|
|
loading: true,
|
|
|
|
// 选中数组
|
|
|
|
// 选中数组
|
|
|
|
ids: [],
|
|
|
|
ids: [],
|
|
|
|
|
|
|
|
#if($table.sub)
|
|
|
|
|
|
|
|
// 子表选中数据
|
|
|
|
|
|
|
|
checked${subClassName}: [],
|
|
|
|
|
|
|
|
#end
|
|
|
|
// 非单个禁用
|
|
|
|
// 非单个禁用
|
|
|
|
single: true,
|
|
|
|
single: true,
|
|
|
|
// 非多个禁用
|
|
|
|
// 非多个禁用
|
|
|
|
@ -314,6 +279,10 @@ export default {
|
|
|
|
total: 0,
|
|
|
|
total: 0,
|
|
|
|
// ${functionName}表格数据
|
|
|
|
// ${functionName}表格数据
|
|
|
|
${businessName}List: [],
|
|
|
|
${businessName}List: [],
|
|
|
|
|
|
|
|
#if($table.sub)
|
|
|
|
|
|
|
|
// ${subTable.functionName}表格数据
|
|
|
|
|
|
|
|
${subclassName}List: [],
|
|
|
|
|
|
|
|
#end
|
|
|
|
// 弹出层标题
|
|
|
|
// 弹出层标题
|
|
|
|
title: "",
|
|
|
|
title: "",
|
|
|
|
// 是否显示弹出层
|
|
|
|
// 是否显示弹出层
|
|
|
|
@ -331,7 +300,7 @@ export default {
|
|
|
|
#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
|
|
|
|
#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
|
|
|
|
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
|
|
|
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
|
|
|
// $comment时间范围
|
|
|
|
// $comment时间范围
|
|
|
|
daterange${AttrName}: [],
|
|
|
|
dateRange${AttrName}: [],
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
// 查询参数
|
|
|
|
// 查询参数
|
|
|
|
@ -389,9 +358,9 @@ export default {
|
|
|
|
#foreach ($column in $columns)
|
|
|
|
#foreach ($column in $columns)
|
|
|
|
#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
|
|
|
|
#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
|
|
|
|
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
|
|
|
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
|
|
|
if (null != this.daterange${AttrName} && '' != this.daterange${AttrName}) {
|
|
|
|
if (null != this.dateRange${AttrName} && '' != this.dateRange${AttrName}) {
|
|
|
|
this.queryParams.params["begin${AttrName}"] = this.daterange${AttrName}[0];
|
|
|
|
this.queryParams.params["begin${AttrName}"] = this.dateRange${AttrName}[0];
|
|
|
|
this.queryParams.params["end${AttrName}"] = this.daterange${AttrName}[1];
|
|
|
|
this.queryParams.params["end${AttrName}"] = this.dateRange${AttrName}[1];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
@ -401,20 +370,6 @@ export default {
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
#foreach ($column in $columns)
|
|
|
|
|
|
|
|
#if(${column.dictType} != '')
|
|
|
|
|
|
|
|
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
|
|
|
|
|
|
|
#if($parentheseIndex != -1)
|
|
|
|
|
|
|
|
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
#set($comment=$column.columnComment)
|
|
|
|
|
|
|
|
#end
|
|
|
|
|
|
|
|
// $comment字典翻译
|
|
|
|
|
|
|
|
${column.javaField}Format(row, column) {
|
|
|
|
|
|
|
|
return this.selectDictLabel#if($column.htmlType == "checkbox")s#end(this.${column.javaField}Options, row.${column.javaField});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
#end
|
|
|
|
|
|
|
|
#end
|
|
|
|
|
|
|
|
// 取消按钮
|
|
|
|
// 取消按钮
|
|
|
|
cancel() {
|
|
|
|
cancel() {
|
|
|
|
this.open = false;
|
|
|
|
this.open = false;
|
|
|
|
@ -436,6 +391,9 @@ export default {
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
#if($table.sub)
|
|
|
|
|
|
|
|
this.${subclassName}List = [];
|
|
|
|
|
|
|
|
#end
|
|
|
|
this.resetForm("form");
|
|
|
|
this.resetForm("form");
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
@ -448,7 +406,7 @@ export default {
|
|
|
|
#foreach ($column in $columns)
|
|
|
|
#foreach ($column in $columns)
|
|
|
|
#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
|
|
|
|
#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
|
|
|
|
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
|
|
|
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
|
|
|
this.daterange${AttrName} = [];
|
|
|
|
this.dateRange${AttrName} = [];
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
this.resetForm("queryForm");
|
|
|
|
this.resetForm("queryForm");
|
|
|
|
@ -476,6 +434,9 @@ export default {
|
|
|
|
#if($column.htmlType == "checkbox")
|
|
|
|
#if($column.htmlType == "checkbox")
|
|
|
|
this.form.$column.javaField = this.form.${column.javaField}.split(",");
|
|
|
|
this.form.$column.javaField = this.form.${column.javaField}.split(",");
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
|
|
|
|
#end
|
|
|
|
|
|
|
|
#if($table.sub)
|
|
|
|
|
|
|
|
this.${subclassName}List = response.data.${subclassName}List;
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
this.open = true;
|
|
|
|
this.open = true;
|
|
|
|
this.title = "修改${functionName}";
|
|
|
|
this.title = "修改${functionName}";
|
|
|
|
@ -489,6 +450,9 @@ export default {
|
|
|
|
#if($column.htmlType == "checkbox")
|
|
|
|
#if($column.htmlType == "checkbox")
|
|
|
|
this.form.$column.javaField = this.form.${column.javaField}.join(",");
|
|
|
|
this.form.$column.javaField = this.form.${column.javaField}.join(",");
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
|
|
|
|
#end
|
|
|
|
|
|
|
|
#if($table.sub)
|
|
|
|
|
|
|
|
this.form.${subclassName}List = this.${subclassName}List;
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
if (this.form.${pkColumn.javaField} != null) {
|
|
|
|
if (this.form.${pkColumn.javaField} != null) {
|
|
|
|
update${BusinessName}(this.form).then(response => {
|
|
|
|
update${BusinessName}(this.form).then(response => {
|
|
|
|
@ -520,6 +484,40 @@ export default {
|
|
|
|
this.msgSuccess("删除成功");
|
|
|
|
this.msgSuccess("删除成功");
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
#if($table.sub)
|
|
|
|
|
|
|
|
/** ${subTable.functionName}序号 */
|
|
|
|
|
|
|
|
row${subClassName}Index({ row, rowIndex }) {
|
|
|
|
|
|
|
|
row.index = rowIndex + 1;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/** ${subTable.functionName}添加按钮操作 */
|
|
|
|
|
|
|
|
handleAdd${subClassName}() {
|
|
|
|
|
|
|
|
let obj = {};
|
|
|
|
|
|
|
|
#foreach($column in $subTable.columns)
|
|
|
|
|
|
|
|
#if($column.pk || $column.javaField == ${subTableFkclassName})
|
|
|
|
|
|
|
|
#elseif($column.list && "" != $javaField)
|
|
|
|
|
|
|
|
obj.$column.javaField = "";
|
|
|
|
|
|
|
|
#end
|
|
|
|
|
|
|
|
#end
|
|
|
|
|
|
|
|
this.${subclassName}List.push(obj);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/** ${subTable.functionName}删除按钮操作 */
|
|
|
|
|
|
|
|
handleDelete${subClassName}() {
|
|
|
|
|
|
|
|
if (this.checked${subClassName}.length == 0) {
|
|
|
|
|
|
|
|
this.$alert("请先选择要删除的${subTable.functionName}数据", "提示", { confirmButtonText: "确定", });
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.${subclassName}List.splice(this.checked${subClassName}[0].index - 1, 1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/** 单选框选中数据 */
|
|
|
|
|
|
|
|
handle${subClassName}SelectionChange(selection) {
|
|
|
|
|
|
|
|
if (selection.length > 1) {
|
|
|
|
|
|
|
|
this.$refs.${subclassName}.clearSelection();
|
|
|
|
|
|
|
|
this.$refs.${subclassName}.toggleRowSelection(selection.pop());
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.checked${subClassName} = selection;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
#end
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
handleExport() {
|
|
|
|
handleExport() {
|
|
|
|
const queryParams = this.queryParams;
|
|
|
|
const queryParams = this.queryParams;
|