代码生成时,vue页面主键字段不筛选是否显示,需将所有vue模板中的column.pk -> column.pkColumn 即可
This commit is contained in:
parent
9476f7f616
commit
bc7888b5a2
@ -106,7 +106,7 @@
|
|||||||
#else
|
#else
|
||||||
#set($comment=$column.columnComment)
|
#set($comment=$column.columnComment)
|
||||||
#end
|
#end
|
||||||
#if($column.pk)
|
#if($column.pkColumn)
|
||||||
#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">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -169,7 +169,7 @@
|
|||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#set($field=$column.javaField)
|
#set($field=$column.javaField)
|
||||||
#if($column.insert && !$column.pk)
|
#if($column.insert && !$column.pkColumn)
|
||||||
#if(($column.usableColumn) || (!$column.superColumn))
|
#if(($column.usableColumn) || (!$column.superColumn))
|
||||||
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
||||||
#if($parentheseIndex != -1)
|
#if($parentheseIndex != -1)
|
||||||
|
@ -123,7 +123,7 @@
|
|||||||
#else
|
#else
|
||||||
#set($comment=$column.columnComment)
|
#set($comment=$column.columnComment)
|
||||||
#end
|
#end
|
||||||
#if($column.pk)
|
#if($column.pkColumn)
|
||||||
<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">
|
||||||
@ -184,7 +184,7 @@
|
|||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#set($field=$column.javaField)
|
#set($field=$column.javaField)
|
||||||
#if($column.insert && !$column.pk)
|
#if($column.insert && !$column.pkColumn)
|
||||||
#if(($column.usableColumn) || (!$column.superColumn))
|
#if(($column.usableColumn) || (!$column.superColumn))
|
||||||
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
||||||
#if($parentheseIndex != -1)
|
#if($parentheseIndex != -1)
|
||||||
@ -299,7 +299,7 @@
|
|||||||
#else
|
#else
|
||||||
#set($comment=$column.columnComment)
|
#set($comment=$column.columnComment)
|
||||||
#end
|
#end
|
||||||
#if($column.pk || $javaField == ${subTableFkclassName})
|
#if($column.pkColumn || $javaField == ${subTableFkclassName})
|
||||||
#elseif($column.list && $column.htmlType == "input")
|
#elseif($column.list && $column.htmlType == "input")
|
||||||
<el-table-column label="$comment" prop="${javaField}" width="150">
|
<el-table-column label="$comment" prop="${javaField}" width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -563,7 +563,7 @@ export default {
|
|||||||
handleAdd${subClassName}() {
|
handleAdd${subClassName}() {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
#foreach($column in $subTable.columns)
|
#foreach($column in $subTable.columns)
|
||||||
#if($column.pk || $column.javaField == ${subTableFkclassName})
|
#if($column.pkColumn || $column.javaField == ${subTableFkclassName})
|
||||||
#elseif($column.list && "" != $javaField)
|
#elseif($column.list && "" != $javaField)
|
||||||
obj.$column.javaField = "";
|
obj.$column.javaField = "";
|
||||||
#end
|
#end
|
||||||
|
@ -103,7 +103,7 @@
|
|||||||
#else
|
#else
|
||||||
#set($comment=$column.columnComment)
|
#set($comment=$column.columnComment)
|
||||||
#end
|
#end
|
||||||
#if($column.pk)
|
#if($column.pkColumn)
|
||||||
#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">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@ -163,7 +163,7 @@
|
|||||||
<el-form ref="${businessName}Ref" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="${businessName}Ref" :model="form" :rules="rules" label-width="80px">
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#set($field=$column.javaField)
|
#set($field=$column.javaField)
|
||||||
#if($column.insert && !$column.pk)
|
#if($column.insert && !$column.pkColumn)
|
||||||
#if(($column.usableColumn) || (!$column.superColumn))
|
#if(($column.usableColumn) || (!$column.superColumn))
|
||||||
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
||||||
#if($parentheseIndex != -1)
|
#if($parentheseIndex != -1)
|
||||||
|
@ -118,7 +118,7 @@
|
|||||||
#else
|
#else
|
||||||
#set($comment=$column.columnComment)
|
#set($comment=$column.columnComment)
|
||||||
#end
|
#end
|
||||||
#if($column.pk)
|
#if($column.pkColumn)
|
||||||
<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">
|
||||||
@ -177,7 +177,7 @@
|
|||||||
<el-form ref="${businessName}Ref" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="${businessName}Ref" :model="form" :rules="rules" label-width="80px">
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#set($field=$column.javaField)
|
#set($field=$column.javaField)
|
||||||
#if($column.insert && !$column.pk)
|
#if($column.insert && !$column.pkColumn)
|
||||||
#if(($column.usableColumn) || (!$column.superColumn))
|
#if(($column.usableColumn) || (!$column.superColumn))
|
||||||
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
||||||
#if($parentheseIndex != -1)
|
#if($parentheseIndex != -1)
|
||||||
@ -292,7 +292,7 @@
|
|||||||
#else
|
#else
|
||||||
#set($comment=$column.columnComment)
|
#set($comment=$column.columnComment)
|
||||||
#end
|
#end
|
||||||
#if($column.pk || $javaField == ${subTableFkclassName})
|
#if($column.pkColumn || $javaField == ${subTableFkclassName})
|
||||||
#elseif($column.list && $column.htmlType == "input")
|
#elseif($column.list && $column.htmlType == "input")
|
||||||
<el-table-column label="$comment" prop="${javaField}" width="150">
|
<el-table-column label="$comment" prop="${javaField}" width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@ -558,7 +558,7 @@ function row${subClassName}Index({ row, rowIndex }) {
|
|||||||
function handleAdd${subClassName}() {
|
function handleAdd${subClassName}() {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
#foreach($column in $subTable.columns)
|
#foreach($column in $subTable.columns)
|
||||||
#if($column.pk || $column.javaField == ${subTableFkclassName})
|
#if($column.pkColumn || $column.javaField == ${subTableFkclassName})
|
||||||
#elseif($column.list && "" != $javaField)
|
#elseif($column.list && "" != $javaField)
|
||||||
obj.$column.javaField = "";
|
obj.$column.javaField = "";
|
||||||
#end
|
#end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user