Merge remote-tracking branch 'gitea/master'
This commit is contained in:
commit
c53568c121
|
@ -181,109 +181,109 @@
|
|||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-row>
|
||||
#foreach($column in $columns)
|
||||
#set($field=$column.javaField)
|
||||
#if($column.insert && !$column.pk)
|
||||
#if(($column.usableColumn) || (!$column.superColumn))
|
||||
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
||||
#if($parentheseIndex != -1)
|
||||
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
|
||||
#else
|
||||
#set($comment=$column.columnComment)
|
||||
#end
|
||||
#set($dictType=$column.dictType)
|
||||
#if($column.htmlType == "input")
|
||||
<form-col :span="span" label="${comment}" prop="${field}">
|
||||
<el-input v-model="form.${field}" placeholder="请输入${comment}" />
|
||||
</form-col>
|
||||
#elseif($column.htmlType == "imageUpload")
|
||||
<form-col :span="span" label="${comment}" prop="${field}">
|
||||
<image-upload v-model="form.${field}"/>
|
||||
</form-col>
|
||||
#elseif($column.htmlType == "fileUpload")
|
||||
<form-col :span="span" label="${comment}" prop="${field}">
|
||||
<file-upload v-model="form.${field}"/>
|
||||
</form-col>
|
||||
#elseif($column.htmlType == "editor")
|
||||
<form-col :span="span" label="${comment}">
|
||||
<editor v-model="form.${field}" :min-height="192"/>
|
||||
</form-col>
|
||||
#elseif($column.htmlType == "select" && "" != $dictType)
|
||||
<form-col :span="span" label="${comment}" prop="${field}">
|
||||
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
||||
<el-option
|
||||
v-for="dict in dict.type.${dictType}"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
#if($column.javaType == "Integer" || $column.javaType == "Long")
|
||||
:value="parseInt(dict.value)"
|
||||
#else
|
||||
:value="dict.value"
|
||||
#end
|
||||
></el-option>
|
||||
</el-select>
|
||||
</form-col>
|
||||
#elseif($column.htmlType == "select" && $dictType)
|
||||
<form-col :span="span" label="${comment}" prop="${field}">
|
||||
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</form-col>
|
||||
#elseif($column.htmlType == "checkbox" && "" != $dictType)
|
||||
<form-col :span="span" label="${comment}" prop="${field}">
|
||||
<el-checkbox-group v-model="form.${field}">
|
||||
<el-checkbox
|
||||
v-for="dict in dict.type.${dictType}"
|
||||
:key="dict.value"
|
||||
:label="dict.value">
|
||||
{{dict.label}}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</form-col>
|
||||
#elseif($column.htmlType == "checkbox" && $dictType)
|
||||
<form-col :span="span" label="${comment}" prop="${field}">
|
||||
<el-checkbox-group v-model="form.${field}">
|
||||
<el-checkbox>请选择字典生成</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</form-col>
|
||||
#elseif($column.htmlType == "radio" && "" != $dictType)
|
||||
<form-col :span="span" label="${comment}" prop="${field}">
|
||||
<el-radio-group v-model="form.${field}">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.${dictType}"
|
||||
:key="dict.value"
|
||||
#if($column.javaType == "Integer" || $column.javaType == "Long")
|
||||
:label="parseInt(dict.value)"
|
||||
#else
|
||||
:label="dict.value"
|
||||
#end
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</form-col>
|
||||
#elseif($column.htmlType == "radio" && $dictType)
|
||||
<form-col :span="span" label="${comment}" prop="${field}">
|
||||
<el-radio-group v-model="form.${field}">
|
||||
<el-radio label="1">请选择字典生成</el-radio>
|
||||
</el-radio-group>
|
||||
</form-col>
|
||||
#elseif($column.htmlType == "datetime")
|
||||
<form-col :span="span" label="${comment}" prop="${field}">
|
||||
<el-date-picker clearable
|
||||
v-model="form.${field}"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择${comment}">
|
||||
</el-date-picker>
|
||||
</form-col>
|
||||
#elseif($column.htmlType == "textarea")
|
||||
<form-col :span="span" label="${comment}" prop="${field}">
|
||||
<el-input v-model="form.${field}" type="textarea" placeholder="请输入内容" />
|
||||
</form-col>
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
</el-row>
|
||||
#foreach($column in $columns)
|
||||
#set($field=$column.javaField)
|
||||
#if($column.insert && !$column.pk)
|
||||
#if(($column.usableColumn) || (!$column.superColumn))
|
||||
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
||||
#if($parentheseIndex != -1)
|
||||
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
|
||||
#else
|
||||
#set($comment=$column.columnComment)
|
||||
#end
|
||||
#set($dictType=$column.dictType)
|
||||
#if($column.htmlType == "input")
|
||||
<form-col :span="span" label="${comment}" prop="${field}">
|
||||
<el-input v-model="form.${field}" placeholder="请输入${comment}" />
|
||||
</form-col>
|
||||
#elseif($column.htmlType == "imageUpload")
|
||||
<form-col :span="span" label="${comment}" prop="${field}">
|
||||
<image-upload v-model="form.${field}"/>
|
||||
</form-col>
|
||||
#elseif($column.htmlType == "fileUpload")
|
||||
<form-col :span="span" label="${comment}" prop="${field}">
|
||||
<file-upload v-model="form.${field}"/>
|
||||
</form-col>
|
||||
#elseif($column.htmlType == "editor")
|
||||
<form-col :span="span" label="${comment}">
|
||||
<editor v-model="form.${field}" :min-height="192"/>
|
||||
</form-col>
|
||||
#elseif($column.htmlType == "select" && "" != $dictType)
|
||||
<form-col :span="span" label="${comment}" prop="${field}">
|
||||
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
||||
<el-option
|
||||
v-for="dict in dict.type.${dictType}"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
#if($column.javaType == "Integer" || $column.javaType == "Long")
|
||||
:value="parseInt(dict.value)"
|
||||
#else
|
||||
:value="dict.value"
|
||||
#end
|
||||
></el-option>
|
||||
</el-select>
|
||||
</form-col>
|
||||
#elseif($column.htmlType == "select" && $dictType)
|
||||
<form-col :span="span" label="${comment}" prop="${field}">
|
||||
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</form-col>
|
||||
#elseif($column.htmlType == "checkbox" && "" != $dictType)
|
||||
<form-col :span="span" label="${comment}" prop="${field}">
|
||||
<el-checkbox-group v-model="form.${field}">
|
||||
<el-checkbox
|
||||
v-for="dict in dict.type.${dictType}"
|
||||
:key="dict.value"
|
||||
:label="dict.value">
|
||||
{{dict.label}}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</form-col>
|
||||
#elseif($column.htmlType == "checkbox" && $dictType)
|
||||
<form-col :span="span" label="${comment}" prop="${field}">
|
||||
<el-checkbox-group v-model="form.${field}">
|
||||
<el-checkbox>请选择字典生成</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</form-col>
|
||||
#elseif($column.htmlType == "radio" && "" != $dictType)
|
||||
<form-col :span="span" label="${comment}" prop="${field}">
|
||||
<el-radio-group v-model="form.${field}">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.${dictType}"
|
||||
:key="dict.value"
|
||||
#if($column.javaType == "Integer" || $column.javaType == "Long")
|
||||
:label="parseInt(dict.value)"
|
||||
#else
|
||||
:label="dict.value"
|
||||
#end
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</form-col>
|
||||
#elseif($column.htmlType == "radio" && $dictType)
|
||||
<form-col :span="span" label="${comment}" prop="${field}">
|
||||
<el-radio-group v-model="form.${field}">
|
||||
<el-radio label="1">请选择字典生成</el-radio>
|
||||
</el-radio-group>
|
||||
</form-col>
|
||||
#elseif($column.htmlType == "datetime")
|
||||
<form-col :span="span" label="${comment}" prop="${field}">
|
||||
<el-date-picker clearable
|
||||
v-model="form.${field}"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择${comment}">
|
||||
</el-date-picker>
|
||||
</form-col>
|
||||
#elseif($column.htmlType == "textarea")
|
||||
<form-col :span="span" label="${comment}" prop="${field}">
|
||||
<el-input v-model="form.${field}" type="textarea" placeholder="请输入内容" />
|
||||
</form-col>
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
</el-row>
|
||||
#if($table.sub)
|
||||
<el-divider content-position="center">${subTable.functionName}信息</el-divider>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
|
@ -372,6 +372,7 @@ export default {
|
|||
components: {FormCol},
|
||||
data() {
|
||||
return {
|
||||
span: 24,
|
||||
// 字段列表
|
||||
columns: [
|
||||
#foreach($column in $columns)
|
||||
|
|
Loading…
Reference in New Issue
Block a user