Pre Merge pull request !177 from AdamHall/master

This commit is contained in:
AdamHall 2024-01-11 07:47:55 +00:00 committed by Gitee
commit 44ebebea8a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 15 additions and 6 deletions

View File

@ -110,11 +110,12 @@
v-hasPermi="['${moduleName}:${businessName}:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="${businessName}List" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
#set($index=0)
#foreach($column in $columns)
#set($javaField=$column.javaField)
#set($parentheseIndex=$column.columnComment.indexOf(""))
@ -124,21 +125,21 @@
#set($comment=$column.columnComment)
#end
#if($column.pk)
<el-table-column label="${comment}" align="center" prop="${javaField}" />
<el-table-column label="${comment}" align="center" prop="${javaField}" v-if="columns[$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[$index].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.${javaField}, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
#elseif($column.list && $column.htmlType == "imageUpload")
<el-table-column label="${comment}" align="center" prop="${javaField}" width="100">
<el-table-column label="${comment}" align="center" prop="${javaField}" width="100" v-if="columns[$index].visible">
<template slot-scope="scope">
<image-preview :src="scope.row.${javaField}" :width="50" :height="50"/>
</template>
</el-table-column>
#elseif($column.list && "" != $column.dictType)
<el-table-column label="${comment}" align="center" prop="${javaField}">
<el-table-column label="${comment}" align="center" prop="${javaField}" v-if="columns[$index].visible">
<template slot-scope="scope">
#if($column.htmlType == "checkbox")
<dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/>
@ -148,8 +149,9 @@
</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[$index].visible"/>
#end
#set($index=$index+1)
#end
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
@ -362,6 +364,13 @@ export default {
#end
data() {
return {
columns: [
#set($index=0)
#foreach($column in $columns)
{ key: $index, label: `$column.columnComment`, visible: true },
#set($index=$index+1)
#end
],
// 遮罩层
loading: true,
// 选中数组