|
|
|
|
@ -78,11 +78,11 @@
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['${moduleName}:${businessName}:export']">导出</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
|
<right-toolbar v-model:showSearch="showSearch" :columns="columns" :search="true" @queryTable="getList"></right-toolbar>
|
|
|
|
|
</el-row>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<el-table v-loading="loading" border :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" />
|
|
|
|
|
#foreach($column in $columns)
|
|
|
|
|
#set($javaField=$column.javaField)
|
|
|
|
|
@ -93,21 +93,21 @@
|
|
|
|
|
#set($comment=$column.columnComment)
|
|
|
|
|
#end
|
|
|
|
|
#if($column.pk)
|
|
|
|
|
<el-table-column label="${comment}" align="center" prop="${javaField}" v-if="${column.list}" />
|
|
|
|
|
<el-table-column label="${comment}" align="center" prop="${javaField}" v-if="${column.list}" v-if="columns[${foreach.index}].visible"/>
|
|
|
|
|
#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" v-if="columns[${foreach.index}].visible">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<span>{{ parseTime(scope.row.${javaField}, '{y}-{m}-{d}') }}</span>
|
|
|
|
|
<span>{{ parseTime(scope.row.${javaField}, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
#elseif($column.list && $column.htmlType == "imageUpload")
|
|
|
|
|
<el-table-column label="${comment}" align="center" prop="${javaField}Url" width="100">
|
|
|
|
|
<el-table-column label="${comment}" align="center" prop="${javaField}Url" width="100" v-if="columns[${foreach.index}].visible">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<image-preview :src="scope.row.${javaField}Url" :width="50" :height="50"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
#elseif($column.list && $column.dictType && "" != $column.dictType)
|
|
|
|
|
<el-table-column label="${comment}" align="center" prop="${javaField}">
|
|
|
|
|
<el-table-column label="${comment}" align="center" prop="${javaField}" v-if="columns[${foreach.index}].visible">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
#if($column.htmlType == "checkbox")
|
|
|
|
|
<dict-tag :options="${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/>
|
|
|
|
|
@ -117,7 +117,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
#elseif($column.list && "" != $javaField)
|
|
|
|
|
<el-table-column label="${comment}" align="center" prop="${javaField}" />
|
|
|
|
|
<el-table-column label="${comment}" align="center" prop="${javaField}" v-if="columns[${foreach.index}].visible"/>
|
|
|
|
|
#end
|
|
|
|
|
#end
|
|
|
|
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
|
|
|
|
@ -136,7 +136,7 @@
|
|
|
|
|
</el-card>
|
|
|
|
|
<!-- 添加或修改${functionName}对话框 -->
|
|
|
|
|
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
|
|
|
|
<el-form ref="${businessName}FormRef" :model="form" :rules="rules" label-width="80px">
|
|
|
|
|
<el-form ref="${businessName}FormRef" :model="form" :rules="rules" label-width="120px">
|
|
|
|
|
#foreach($column in $columns)
|
|
|
|
|
#set($field=$column.javaField)
|
|
|
|
|
#if(($column.insert || $column.edit) && !$column.pk)
|
|
|
|
|
@ -281,6 +281,19 @@ const dialog = reactive<DialogOption>({
|
|
|
|
|
title: ''
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 列显隐信息
|
|
|
|
|
const columns = ref<FieldOption[]>([
|
|
|
|
|
#foreach ($column in $columns)
|
|
|
|
|
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
|
|
|
|
#if($parentheseIndex != -1)
|
|
|
|
|
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
|
|
|
|
|
#else
|
|
|
|
|
#set($comment=$column.columnComment)
|
|
|
|
|
#end
|
|
|
|
|
{ key: ${foreach.index}, label: `${comment}`, visible: true },
|
|
|
|
|
#end
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
const initFormData: ${BusinessName}Form = {
|
|
|
|
|
#foreach ($column in $columns)
|
|
|
|
|
#if($column.insert || $column.edit)
|
|
|
|
|
|