Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19d2399eb2 | ||
|
|
37b0a120c9 | ||
|
|
5fb6ab0ca6 | ||
|
|
2ba8b953d3 | ||
|
|
738fd5c552 | ||
|
|
745f6e88c0 | ||
|
|
3db837d6d6 | ||
|
|
14054a964f | ||
|
|
14581655d2 | ||
|
|
f162584d1e | ||
|
|
e57e8127b5 | ||
|
|
b7d4efa6a6 | ||
|
|
91a4db4eb8 | ||
|
|
7ed84e48cf | ||
|
|
f068bd9c90 | ||
|
|
4ae907a023 | ||
|
|
652a242c2b |
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>5.6.0-SNAPSHOT</version>
|
||||
<version>5.6.1-SNAPSHOT</version>
|
||||
<relativePath>../parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>5.6.0-SNAPSHOT</version>
|
||||
<version>5.6.1-SNAPSHOT</version>
|
||||
<relativePath>../../parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -14,4 +14,5 @@
|
||||
5.5.0
|
||||
5.5.1
|
||||
5.5.2
|
||||
5.6.0
|
||||
5.6.0
|
||||
5.6.1
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>5.6.0-SNAPSHOT</version>
|
||||
<version>5.6.1-SNAPSHOT</version>
|
||||
<relativePath>../../parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -22,4 +22,5 @@
|
||||
5.5.0
|
||||
5.5.1
|
||||
5.5.2
|
||||
5.6.0
|
||||
5.6.0
|
||||
5.6.1
|
||||
@@ -21,7 +21,7 @@
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required ">*</span> ${text('所属栏目')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:treeselect id="category" title="${text('所属栏目')}"
|
||||
<#form:treeselect id="category" title="${text('所属栏目')}"
|
||||
path="category.categoryCode" labelPath="category.categoryName"
|
||||
url="${ctx}/cms/category/treeData?excludeCode=${article.category.categoryCode}"
|
||||
class="required" allowClear="false" canSelectRoot="true" canSelectParent="false" />
|
||||
@@ -70,145 +70,145 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="${text('数值越大排序越靠前,可设置权重过期时间')}。">
|
||||
${text('权重/排序')}: <i class="fa icon-question"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<div class="form-inline m0">
|
||||
<#form:input path="weight" class="form-control width-90 digits" maxlength="10"/>
|
||||
<#form:checkbox id="weightTop" label="${text('置顶')}" value="${article.weight==9999 ?'1' : ''}"
|
||||
class="form-control" style="vertical-align:middle;"/>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="${text('数值越大排序越靠前,可设置权重过期时间')}。">
|
||||
${text('权重/排序')}: <i class="fa icon-question"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<div class="form-inline m0">
|
||||
<#form:input path="weight" class="form-control width-90 digits" maxlength="10"/>
|
||||
<#form:checkbox id="weightTop" label="${text('置顶')}" value="${article.weight==9999 ?'1' : ''}"
|
||||
class="form-control" style="vertical-align:middle;"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="${text('时间到期后,权重自动恢复为0,如果为空,则权重永不过期')}。">
|
||||
${text('权重过期时间')}: <i class="fa icon-question"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="weightDate" readonly="true" maxlength="20" class="form-control laydate"
|
||||
dataFormat="datetime" data-type="datetime" data-format="yyyy-MM-dd HH:mm"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="${text('时间到期后,权重自动恢复为0,如果为空,则权重永不过期')}。">
|
||||
${text('权重过期时间')}: <i class="fa icon-question"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="weightDate" readonly="true" maxlength="20" class="form-control laydate"
|
||||
dataFormat="datetime" data-type="datetime" data-format="yyyy-MM-dd HH:mm"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-unit">${text('详细信息')}</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-1">${text('摘要')}:</label>
|
||||
<div class="col-sm-11">
|
||||
<#form:textarea path="description" maxlength="500" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-1">${text('正文')}:</label>
|
||||
<div class="col-sm-11">
|
||||
<#form:ueditor id="content" path="articleData.content" maxlength="10000" height="500" class="required" outline="${parameter.outline}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-unit">${text('其他信息')}</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('内容图片')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-10">
|
||||
<#form:fileupload id="uploadImage" bizKey="${article.id}"
|
||||
bizType="article_image" returnPath="true"
|
||||
filePathInputId="image" uploadType="image" readonly="false"
|
||||
maxUploadNum="4" isMini="false" />
|
||||
<#form:input path="image" maxlength="1000" readonly="true" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('关键字')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="keywords" maxlength="500" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">${text('推荐位')}:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="checkbox-list">
|
||||
<#form:checkbox path="posidList" dictType="cms_post" class="form-control" />
|
||||
<div class="form-unit">${text('详细信息')}</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-1">${text('摘要')}:</label>
|
||||
<div class="col-sm-11">
|
||||
<#form:textarea path="description" maxlength="500" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="${text('文章的发布状态')}">${text('状态')}:<i class="fa icon-question"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:select path="state" dictType="sys_status" blankOption="true" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="${text('可修改发布时间,不填则使用当前时间')}">
|
||||
${text('发布时间')}: <i class="fa icon-question"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="createDate" readonly="true" maxlength="20" class="form-control laydate"
|
||||
dataFormat="datetime" data-type="datetime" data-format="yyyy-MM-dd HH:mm"/>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-1">${text('正文')}:</label>
|
||||
<div class="col-sm-11">
|
||||
<#form:ueditor id="content" path="articleData.content" maxlength="10000" height="500" class="required" outline="${parameter.outline}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-unit">${text('高级信息')}</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('自定义内容视图')}:<i class="fa icon-question" title="自定义内容视图名称必须以'${article_DEFAULT_TEMPLATE}'开始"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:select path="customContentView" items="${contentViewList}" itemLabel="id" itemValue="id" blankOption="true" class="form-control " />
|
||||
<div class="form-unit">${text('其他信息')}</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('内容图片')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-10">
|
||||
<#form:fileupload id="uploadImage" bizKey="${article.id}"
|
||||
bizType="article_image" returnPath="true"
|
||||
filePathInputId="image" uploadType="image" readonly="false"
|
||||
maxUploadNum="4" isMini="false" />
|
||||
<#form:input path="image" maxlength="1000" readonly="true" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('视图参数配置')}:<i class="fa icon-question" title="视图参数例如: {count:2, title_show:'yes'} 则在视图文件中的获取方法是:\${viewConfig_count}、\${viewConfig_titleShow}"></i></label>
|
||||
<div class="col-sm-10">
|
||||
<#form:input path="viewConfig" maxlength="1000" placeholder="视图参数例如: {count:2, title_show:'yes'} 则在视图文件中的获取方法是:${'${'}viewConfig_count}、${'${'}viewConfig_titleShow}" class="form-control"/>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('关键字')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="keywords" maxlength="500" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">${text('推荐位')}:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="checkbox-list">
|
||||
<#form:checkbox path="posidList" dictType="cms_post" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('备注信息')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-10">
|
||||
<#form:textarea path="remarks" rows="4" maxlength="500" class="form-control"/>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="${text('文章的发布状态')}">${text('状态')}:<i class="fa icon-question"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:select path="state" dictType="sys_status" blankOption="true" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="${text('可修改发布时间,不填则使用当前时间')}">
|
||||
${text('发布时间')}: <i class="fa icon-question"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="createDate" readonly="true" maxlength="20" class="form-control laydate"
|
||||
dataFormat="datetime" data-type="datetime" data-format="yyyy-MM-dd HH:mm"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-unit">${text('页面配置')}</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('自定义内容视图')}:<i class="fa icon-question" title="自定义内容视图名称必须以'${article_DEFAULT_TEMPLATE}'开始"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:select path="customContentView" items="${contentViewList}" itemLabel="id" itemValue="id" blankOption="true" class="form-control " />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('视图参数配置')}:<i class="fa icon-question" title="视图参数例如: {count:2, title_show:'yes'} 则在视图文件中的获取方法是:\${viewConfig_count}、\${viewConfig_titleShow}"></i></label>
|
||||
<div class="col-sm-10">
|
||||
<#form:input path="viewConfig" maxlength="1000" placeholder="视图参数例如: {count:2, title_show:'yes'} 则在视图文件中的获取方法是:${'${'}viewConfig_count}、${'${'}viewConfig_titleShow}" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('备注信息')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-10">
|
||||
<#form:textarea path="remarks" rows="4" maxlength="500" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<#form:extend collapsed="true" pathPrefix="articleData"/>
|
||||
</div>
|
||||
<#form:extend collapsed="true" pathPrefix="articleData"/>
|
||||
<div class="box-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
@@ -226,7 +226,7 @@
|
||||
<script src="${ctxStatic}/colorpicker/bootstrap-colorpicker.js"></script>
|
||||
<script type="text/javascript">
|
||||
// 颜色控件初始化
|
||||
$("#inputForm .input-color").colorpicker();
|
||||
$('#inputForm .input-color').colorpicker();
|
||||
// 权重、排序
|
||||
$('#weightTop input').on('ifChecked ifUnchecked', function(){
|
||||
if ($(this).is(':checked')){
|
||||
@@ -235,7 +235,7 @@ $('#weightTop input').on('ifChecked ifUnchecked', function(){
|
||||
$('#weight').val('0');
|
||||
}
|
||||
});
|
||||
$("#inputForm").validate({
|
||||
$('#inputForm').validate({
|
||||
submitHandler: function(form){
|
||||
$('#wordCount').val(contentUE.getContentTxt().length);
|
||||
js.ajaxSubmitForm($(form), function(data){
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
</div>
|
||||
<#form:form id="inputForm" model="${category}" action="${ctx}/cms/category/save" method="post" class="form-horizontal">
|
||||
<div class="box-body">
|
||||
<div class="form-unit">${text('基本信息')}</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
@@ -131,112 +132,112 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-unit">${text('栏目配置')}</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="是否在导航中显示该栏目">
|
||||
<span class="required hide">*</span> ${text('是否在导航中显示')}:<i class="fa icon-question"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:radio path="inMenu" dictType="sys_show_hide" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('是否允许评论')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:radio path="isCanComment" dictType="sys_yes_no" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="是否在分类页中显示该栏目的文章列表">
|
||||
<span class="required hide">*</span> ${text('是否在分类页中显示')}:<i class="fa icon-question" ></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:radio path="inList" dictType="sys_show_hide" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title=""> <span class="required hide">*</span>
|
||||
${text('是否需要审核')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:radio path="isNeedAudit" dictType="sys_yes_no" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="默认展现方式,首栏目内容列表,栏目第一条内容">
|
||||
<span class="required hide">*</span> ${text('内容展现模式')}:<i class="fa icon-question" ></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:radio path="showModes" dictType="cms_show_modes" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="自定义内容视图名称必须以'${category_DEFAULT_TEMPLATE}'开始">
|
||||
${text('自定义列表视图')}:<i class="fa icon-question "></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:select path="customListView" items="${listViewList}" itemLabel="id" itemValue="id" blankOption="true" class="form-control " />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="自定义内容视图名称必须以'${article_DEFAULT_TEMPLATE}'开始"> <span class="required hide">*</span>
|
||||
${text('自定义内容视图')}:<i class="fa icon-question "></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:select path="customContentView" items="${contentViewList}" itemLabel="id" itemValue="id" blankOption="true" class="form-control " />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="视图参数例如: {count:2, title_show:'yes'} 则在视图文件中的获取方法是:\${viewConfig_count}、\${viewConfig_titleShow}">
|
||||
${text('视图参数配置')}:<i class="fa icon-question"></i></label>
|
||||
<div class="col-sm-10">
|
||||
<#form:input path="viewConfig" maxlength="1000" class="form-control"
|
||||
placeholder="视图参数例如: {count:2, title_show:'yes'} 则在视图文件中的获取方法是:${'${'}viewConfig_count}、${'${'}viewConfig_titleShow}" />
|
||||
<br />
|
||||
<ul class="text-muted well well-lg no-shadow m0 pt10 pb10">
|
||||
<li>例如视图参数设置为:{count:2,titleShow:'yes'} 则在视图文件中的获取方法是:\${viewConfig_count}、\${viewConfig_titleShow}。</li>
|
||||
<li>设置栏目的管理地址:若设置【adminUrl:false】表示无管理地址,在内容发布栏目列表中不显示该栏目;</li>
|
||||
<li>设置【adminUrl:'/cms/guestbook'】表示有管理地址,在内容发布栏目列表中点击该栏目链接到该地址。</li>
|
||||
<!-- <li>管理地址参数:若设置【adminUrlParam:'fileDownload=true'】则代表链接模型为文件下载的栏目,新增链接的时候出现文件上传对话框。</li>
|
||||
<li>管理地址参数:若设置【adminUrlParam:'outlineView=true'】则代表文章模型开启大纲视图编辑,在线编辑器左侧显示大纲视图。</li> -->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-unit">${text('其他信息')}</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('备注信息')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-10">
|
||||
<#form:textarea path="remarks" rows="4" maxlength="500" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<#form:extend collapsed="true" />
|
||||
</div>
|
||||
<div class="form-unit">${text('栏目配置')}</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="是否在导航中显示该栏目">
|
||||
<span class="required hide">*</span> ${text('是否在导航中显示')}:<i class="fa icon-question"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:radio path="inMenu" dictType="sys_show_hide" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('是否允许评论')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:radio path="isCanComment" dictType="sys_yes_no" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="是否在分类页中显示该栏目的文章列表">
|
||||
<span class="required hide">*</span> ${text('是否在分类页中显示')}:<i class="fa icon-question" ></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:radio path="inList" dictType="sys_show_hide" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title=""> <span class="required hide">*</span>
|
||||
${text('是否需要审核')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:radio path="isNeedAudit" dictType="sys_yes_no" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="默认展现方式,首栏目内容列表,栏目第一条内容">
|
||||
<span class="required hide">*</span> ${text('内容展现模式')}:<i class="fa icon-question" ></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:radio path="showModes" dictType="cms_show_modes" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="自定义内容视图名称必须以'${category_DEFAULT_TEMPLATE}'开始">
|
||||
${text('自定义列表视图')}:<i class="fa icon-question "></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:select path="customListView" items="${listViewList}" itemLabel="id" itemValue="id" blankOption="true" class="form-control " />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="自定义内容视图名称必须以'${article_DEFAULT_TEMPLATE}'开始"> <span class="required hide">*</span>
|
||||
${text('自定义内容视图')}:<i class="fa icon-question "></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:select path="customContentView" items="${contentViewList}" itemLabel="id" itemValue="id" blankOption="true" class="form-control " />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="视图参数例如: {count:2, title_show:'yes'} 则在视图文件中的获取方法是:\${viewConfig_count}、\${viewConfig_titleShow}">
|
||||
${text('视图参数配置')}:<i class="fa icon-question"></i></label>
|
||||
<div class="col-sm-10">
|
||||
<#form:input path="viewConfig" maxlength="1000" class="form-control"
|
||||
placeholder="视图参数例如: {count:2, title_show:'yes'} 则在视图文件中的获取方法是:${'${'}viewConfig_count}、${'${'}viewConfig_titleShow}" />
|
||||
<br />
|
||||
<ul class="text-muted well well-lg no-shadow m0 pt10 pb10">
|
||||
<li>例如视图参数设置为:{count:2,titleShow:'yes'} 则在视图文件中的获取方法是:\${viewConfig_count}、\${viewConfig_titleShow}。</li>
|
||||
<li>设置栏目的管理地址:若设置【adminUrl:false】表示无管理地址,在内容发布栏目列表中不显示该栏目;</li>
|
||||
<li>设置【adminUrl:'/cms/guestbook'】表示有管理地址,在内容发布栏目列表中点击该栏目链接到该地址。</li>
|
||||
<!-- <li>管理地址参数:若设置【adminUrlParam:'fileDownload=true'】则代表链接模型为文件下载的栏目,新增链接的时候出现文件上传对话框。</li>
|
||||
<li>管理地址参数:若设置【adminUrlParam:'outlineView=true'】则代表文章模型开启大纲视图编辑,在线编辑器左侧显示大纲视图。</li> -->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-unit">${text('其他信息')}</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('备注信息')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-10">
|
||||
<#form:textarea path="remarks" rows="4" maxlength="500" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<#form:extend collapsed="true" />
|
||||
<div class="box-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
@@ -252,7 +253,7 @@
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
$("#inputForm").validate({
|
||||
$('#inputForm').validate({
|
||||
submitHandler : function(form) {
|
||||
js.ajaxSubmitForm($(form), function(data) {
|
||||
js.showMessage(data.message);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<% layout('/layouts/default.html', {title: '站点管理', libs: ['validate','fileupload','ueditor','dataGrid']}){ %>
|
||||
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header with-border">
|
||||
@@ -71,12 +70,10 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2">${text('站点logo')}</label>
|
||||
<div class="col-sm-10">
|
||||
<#form:fileupload id="uploadLogo" bizKey="${site.id}" bizType="site_logo" returnPath="true"
|
||||
filePathInputId="logo"
|
||||
uploadType="image" readonly="false" maxUploadNum="1" isMini="false"/>
|
||||
<#form:input path="logo" class="form-control"/>
|
||||
|
||||
|
||||
<#form:fileupload id="uploadLogo" bizKey="${site.id}" bizType="site_logo" returnPath="true"
|
||||
filePathInputId="logo" uploadType="image" readonly="false" maxUploadNum="1" isMini="false"/>
|
||||
<#form:input path="logo" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -163,7 +160,7 @@
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
$("#inputForm").validate({
|
||||
$('#inputForm').validate({
|
||||
submitHandler: function(form){
|
||||
js.ajaxSubmitForm($(form), function(data){
|
||||
js.showMessage(data.message);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>5.6.0-SNAPSHOT</version>
|
||||
<version>5.6.1-SNAPSHOT</version>
|
||||
<relativePath>../../parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Oracle 11g -->
|
||||
<dependency>
|
||||
<groupId>com.oracle</groupId>
|
||||
@@ -36,37 +37,33 @@
|
||||
<version>11.2.0.3</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<!-- Oracle 12c
|
||||
<!-- Oracle 12c 及以上版本
|
||||
<dependency>
|
||||
<groupId>com.oracle.ojdbc</groupId>
|
||||
<groupId>com.oracle.database.jdbc</groupId>
|
||||
<artifactId>ojdbc8</artifactId>
|
||||
<version>19.3.0.0</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.oracle.ojdbc</groupId>
|
||||
<artifactId>orai18n</artifactId>
|
||||
<version>19.3.0.0</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency> -->
|
||||
<!-- SqlServer 2008 -->
|
||||
|
||||
<!-- SqlServer 2008
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.jtds</groupId>
|
||||
<artifactId>jtds</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<!-- SqlServer 2012
|
||||
</dependency> -->
|
||||
<!-- SqlServer 2012 及以上版本 -->
|
||||
<dependency>
|
||||
<groupId>com.microsoft.sqlserver</groupId>
|
||||
<artifactId>mssql-jdbc</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency> -->
|
||||
</dependency>
|
||||
|
||||
<!-- PostgreSQL -->
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- H2 DB
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
@@ -87,6 +84,11 @@
|
||||
<artifactId>jeesite-framework</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||
<!--<artifactId>spring-boot-starter-undertow</artifactId>-->
|
||||
</dependency>
|
||||
|
||||
<!-- ELK 日志收集 -->
|
||||
<dependency>
|
||||
|
||||
@@ -200,14 +200,6 @@ public class FormFilter extends org.apache.shiro.web.filter.authc.FormAuthentica
|
||||
protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue) {
|
||||
return (!isLoginRequest(request, response) && isPermissive(mappedValue)); // 不验证登录状态,只验证登录请求
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳转登录页时,跳转到默认首页
|
||||
*/
|
||||
@Override
|
||||
protected void redirectToLogin(ServletRequest request, ServletResponse response) throws IOException {
|
||||
PermissionsFilter.redirectToDefaultPath(request, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 地址访问接入验证
|
||||
@@ -255,6 +247,14 @@ public class FormFilter extends org.apache.shiro.web.filter.authc.FormAuthentica
|
||||
boolean isLogin = WebUtils.isTrue(request, LOGIN_PARAM);
|
||||
return super.isLoginSubmission(request, response) || isLogin;
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳转登录页时,跳转到默认首页
|
||||
*/
|
||||
@Override
|
||||
protected void redirectToLogin(ServletRequest request, ServletResponse response) throws IOException {
|
||||
PermissionsFilter.redirectToDefaultPath(request, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行登录方法
|
||||
|
||||
@@ -19,15 +19,17 @@ import javax.servlet.http.HttpServletRequest;
|
||||
*/
|
||||
public class InnerFilter extends AccessControlFilter {
|
||||
|
||||
private static final String[] prefixes = Global.getPropertyToArray("shiro.innerFilterAllowRemoteAddrs", "127.0.0.1");
|
||||
|
||||
@Override
|
||||
protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue) throws Exception {
|
||||
boolean result = false;
|
||||
String[] prefixes = (String[])mappedValue;
|
||||
if (prefixes == null){
|
||||
prefixes = Global.getPropertyToArray("shiro.innerFilterAllowRemoteAddrs", "127.0.0.1");
|
||||
prefixes = InnerFilter.prefixes;
|
||||
}
|
||||
if (prefixes != null && request instanceof HttpServletRequest){
|
||||
String ip = request.getRemoteAddr();
|
||||
String ip = request.getRemoteAddr() + "]";
|
||||
for (String prefix : prefixes){
|
||||
result = StringUtils.startsWithIgnoreCase(ip, StringUtils.trim(prefix));
|
||||
if (result){
|
||||
|
||||
@@ -29,11 +29,6 @@ import com.jeesite.common.web.http.wrapper.GetHttpServletRequestWrapper;
|
||||
*/
|
||||
public class PermissionsFilter extends org.apache.shiro.web.filter.authz.PermissionsAuthorizationFilter {
|
||||
|
||||
@Override
|
||||
protected void redirectToLogin(ServletRequest request, ServletResponse response) throws IOException {
|
||||
PermissionsFilter.redirectToDefaultPath(request, response);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws IOException {
|
||||
return PermissionsFilter.redirectTo403Page(request, response);
|
||||
@@ -99,5 +94,10 @@ public class PermissionsFilter extends org.apache.shiro.web.filter.authz.Permiss
|
||||
WebUtils.issueRedirect(request, response, loginUrl);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void redirectToLogin(ServletRequest request, ServletResponse response) throws IOException {
|
||||
PermissionsFilter.redirectToDefaultPath(request, response);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,10 +4,9 @@
|
||||
*/
|
||||
package com.jeesite.common.shiro.filter;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* 角色权限过滤器
|
||||
@@ -16,14 +15,14 @@ import javax.servlet.ServletResponse;
|
||||
*/
|
||||
public class RolesFilter extends org.apache.shiro.web.filter.authz.RolesAuthorizationFilter {
|
||||
|
||||
@Override
|
||||
protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws IOException {
|
||||
return PermissionsFilter.redirectTo403Page(request, response);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void redirectToLogin(ServletRequest request, ServletResponse response) throws IOException {
|
||||
PermissionsFilter.redirectToDefaultPath(request, response);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws IOException {
|
||||
return PermissionsFilter.redirectTo403Page(request, response);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,10 +4,9 @@
|
||||
*/
|
||||
package com.jeesite.common.shiro.filter;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* 用户权限过滤器
|
||||
@@ -15,15 +14,15 @@ import javax.servlet.ServletResponse;
|
||||
* @version 2017-03-22
|
||||
*/
|
||||
public class UserFilter extends org.apache.shiro.web.filter.authc.UserFilter {
|
||||
|
||||
@Override
|
||||
protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws IOException {
|
||||
return PermissionsFilter.redirectTo403Page(request, response);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void redirectToLogin(ServletRequest request, ServletResponse response) throws IOException {
|
||||
PermissionsFilter.redirectToDefaultPath(request, response);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws IOException {
|
||||
return PermissionsFilter.redirectTo403Page(request, response);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,23 +4,16 @@
|
||||
*/
|
||||
package com.jeesite.modules.config.web;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.FilterConfig;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletRequestWrapper;
|
||||
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.Ordered;
|
||||
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletRequestWrapper;
|
||||
|
||||
/**
|
||||
* 将请求协议转换为 https
|
||||
* @author ThinkGem
|
||||
@@ -34,35 +27,23 @@ public class SchemeHttpsConfig {
|
||||
public FilterRegistrationBean<Filter> schemeFilterRegistrationBean() {
|
||||
FilterRegistrationBean<Filter> bean = new FilterRegistrationBean<>();
|
||||
bean.setOrder(Ordered.HIGHEST_PRECEDENCE);
|
||||
bean.setFilter(new Filter() {
|
||||
|
||||
@Override
|
||||
public void init(FilterConfig filterConfig) throws ServletException {}
|
||||
bean.setFilter((request, response, chain) -> {
|
||||
chain.doFilter(new HttpServletRequestWrapper((HttpServletRequest) request) {
|
||||
@Override
|
||||
public String getScheme() {
|
||||
return "https";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
|
||||
chain.doFilter(new HttpServletRequestWrapper((HttpServletRequest) request) {
|
||||
|
||||
@Override
|
||||
public String getScheme() {
|
||||
return "https";
|
||||
@Override
|
||||
public StringBuffer getRequestURL() {
|
||||
StringBuffer sb = super.getRequestURL();
|
||||
if ("http:".equals(sb.substring(0, 5))){
|
||||
return sb.replace(0, 5, "https:");
|
||||
}else{
|
||||
return sb;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StringBuffer getRequestURL() {
|
||||
StringBuffer sb = super.getRequestURL();
|
||||
if ("http:".equals(sb.substring(0, 5))){
|
||||
return sb.replace(0, 5, "https:");
|
||||
}else{
|
||||
return sb;
|
||||
}
|
||||
}
|
||||
|
||||
}, response);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {}
|
||||
}
|
||||
}, response);
|
||||
});
|
||||
bean.addUrlPatterns("/*");
|
||||
return bean;
|
||||
|
||||
@@ -107,9 +107,8 @@ public class LoginController extends BaseController{
|
||||
*/
|
||||
@RequestMapping(value = "loginFailure")
|
||||
public String loginFailure(HttpServletRequest request, HttpServletResponse response, Model model) {
|
||||
LoginInfo loginInfo = UserUtils.getLoginInfo();
|
||||
|
||||
// 如果已经登录,则跳转到管理首页
|
||||
// // 如果已经登录,则跳转到管理首页
|
||||
// LoginInfo loginInfo = UserUtils.getLoginInfo();
|
||||
// if(loginInfo != null){ // 注释掉,已经登录的账号,正常返回登录失败信息,方便前端判断。
|
||||
// String queryString = request.getQueryString();
|
||||
// queryString = queryString == null ? "" : "?" + queryString;
|
||||
|
||||
@@ -51,7 +51,7 @@ jdbc:
|
||||
removeAbandoned: false
|
||||
removeAbandonedTimeout: 2100
|
||||
|
||||
# Oracle 下会自动开启 PSCache,并指定每个连接上 PSCache 大小。若不指定,则与 maxActive 相同(4.1.5+)
|
||||
# 是否缓存 PreparedStatement 对象的最大数量(4.1.5+)
|
||||
maxPoolPreparedStatementPerConnectionSize: ~
|
||||
|
||||
# 设置连接属性,可获取到表的 remark (备注)
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
/*可以在这里添加你自己的css*/
|
||||
p{line-height:28px}
|
||||
p {line-height:28px}
|
||||
.skin-dark {background: #1a1a1a;border-color:#414141;color:#ddd}
|
||||
|
||||
@@ -6929,7 +6929,8 @@ var fillCharReg = new RegExp(domUtils.fillChar, 'g');
|
||||
container.style.zIndex = options.zIndex;
|
||||
|
||||
var html = ( ie && browser.version < 9 ? '' : '<!DOCTYPE html>') +
|
||||
'<html xmlns=\'http://www.w3.org/1999/xhtml\' class=\'view\' ><head>' +
|
||||
'<html xmlns=\'http://www.w3.org/1999/xhtml\' class=\'view '
|
||||
+ $('html').attr('class') + '\' ><head>' +
|
||||
'<style type=\'text/css\'>' +
|
||||
//设置四周的留边
|
||||
'.view{padding:0;word-wrap:break-word;cursor:text;height:90%;}\n' +
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
width="60%"
|
||||
>
|
||||
<template #title>
|
||||
<Icon :icon="getTitle.icon" class="pr-1 m-1" />
|
||||
<Icon :icon="getTitle.icon" class="m-1 pr-1" />
|
||||
<span> {{ getTitle.value }} </span>
|
||||
</template>
|
||||
<% if (table.childList.~size > 0){ %>
|
||||
|
||||
@@ -1,750 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
No deletion without permission, or be held responsible to law. -->
|
||||
<template>
|
||||
<name>vueFormRoute</name>
|
||||
<filePath>${frontDir}/src/views/${urlPrefix}</filePath>
|
||||
<fileName>formRoute.vue</fileName>
|
||||
<content><![CDATA[
|
||||
<!--
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
* @author ${functionAuthor}
|
||||
-->
|
||||
<template>
|
||||
<FormPage
|
||||
:config="formSettings"
|
||||
:storeKey="'${moduleName}${isNotEmpty(subModuleName)?'-'+subModuleName:''}-${className}-route'"
|
||||
:okAuth="'${permissionPrefix}:edit'"
|
||||
:loading="loadingRef"
|
||||
@close="handleClose"
|
||||
@ok="handleSubmit"
|
||||
>
|
||||
<template #main>
|
||||
<BasicForm @register="registerForm" />
|
||||
</template>
|
||||
<% for (child in table.childList){ %>
|
||||
<template #${@StringUtils.uncap(child.className)}>
|
||||
<BasicForm @register="register${child.className}Form">
|
||||
<template #${@StringUtils.uncap(child.className)}List>
|
||||
<BasicTable
|
||||
@register="register${child.className}Table"
|
||||
@row-click="handle${child.className}RowClick"
|
||||
/>
|
||||
<% if(table.tplCategory != 'query'){ %>
|
||||
<a-button class="mt-2" @click="handle${child.className}Add" v-auth="'${permissionPrefix}:edit'">
|
||||
<Icon icon="ant-design:plus-circle-outlined" /> {{ t('新增') }}
|
||||
</a-button>
|
||||
<% } %>
|
||||
</template>
|
||||
</BasicForm>
|
||||
</template>
|
||||
<% } %>
|
||||
<% if(toBoolean(table.optionMap['isBpmForm'])){ %>
|
||||
<template #actions>
|
||||
<BpmButton
|
||||
v-model:bpmEntity="record"
|
||||
bpmEntityKey="id"
|
||||
formKey="${table.optionMap['bpmFormKey']}"
|
||||
completeText="提交"
|
||||
:completeModal="true"
|
||||
:loading="loadingRef"
|
||||
:auth="'${permissionPrefix}:edit'"
|
||||
@validate="handleValidate"
|
||||
@complete="handleSubmit"
|
||||
@success="handleSuccess"
|
||||
@close="handleClose"
|
||||
size="small"
|
||||
/>
|
||||
</template>
|
||||
<% } %>
|
||||
<template #other>
|
||||
<div>其它选项的内容,按需添加,也可以删除。</div>
|
||||
</template>
|
||||
</FormPage>
|
||||
</template>
|
||||
<script lang="ts" setup name="${compNamePrefix}Form">
|
||||
import { ref, unref, computed, onMounted } from 'vue';
|
||||
import { useEmitter } from '/@/store/modules/user';
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { router } from '/@/router';
|
||||
import { Icon } from '/@/components/Icon';
|
||||
import { FormPage } from '/@/components/FormPage';
|
||||
import { BasicForm, FormSchema, useForm } from '/@/components/Form';
|
||||
<% if (table.childList.~size > 0){ %>
|
||||
import { BasicTable, useTable } from '/@/components/Table';
|
||||
<% } %>
|
||||
import { ${ClassName}, ${className}Save, ${className}Form<% if(table.isTreeEntity){ %>, ${className}TreeData<% } %> } from '/@/api/${moduleName}${isNotEmpty(subModuleName)?'/'+subModuleName:''}/${className}';
|
||||
<%
|
||||
var userselectExists = false;
|
||||
var officeselectExists = false;
|
||||
var areaselectExists = false;
|
||||
for(c in table.columnList){
|
||||
if(c.isQuery == "1" && !c.isTreeEntityColumn){
|
||||
if(c.showType == 'userselect'){
|
||||
userselectExists = true;
|
||||
}else if(c.showType == 'officeselect'){
|
||||
officeselectExists = true;
|
||||
}else if(c.showType == 'areaselect'){
|
||||
areaselectExists = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
%>
|
||||
<% if(userselectExists || officeselectExists) { %>
|
||||
import { officeTreeData } from '/@/api/sys/office';
|
||||
<% } %>
|
||||
<% if(areaselectExists) { %>
|
||||
import { areaTreeData } from '/@/api/sys/area';
|
||||
<% } %>
|
||||
<% if(toBoolean(table.optionMap['isBpmForm'])){ %>
|
||||
import { BpmButton } from '/@/components/Bpm';
|
||||
<% } %>
|
||||
import { useQuery } from '/@/hooks/web/usePage';
|
||||
import { useTabs } from '/@/hooks/web/useTabs';
|
||||
|
||||
const formSettings = ref<any[]>([
|
||||
{
|
||||
label: '基础表单',
|
||||
value: 'main',
|
||||
show: true,
|
||||
},
|
||||
<% for (child in table.childList){ %>
|
||||
{
|
||||
label: '${child.comments}',
|
||||
value: '${@StringUtils.uncap(child.className)}',
|
||||
show: true,
|
||||
},
|
||||
<% } %>
|
||||
{
|
||||
label: '其它选项',
|
||||
value: 'other',
|
||||
show: false,
|
||||
},
|
||||
]);
|
||||
|
||||
const emitter = useEmitter();
|
||||
|
||||
const { t } = useI18n('${moduleName}${isNotEmpty(subModuleName)?'.'+subModuleName:''}.${className}');
|
||||
const { showMessage } = useMessage();
|
||||
const { setTitle, close } = useTabs(router);
|
||||
const record = ref<${ClassName}>({} as ${ClassName});
|
||||
const loadingRef = ref<boolean>(false);
|
||||
const query = useQuery();
|
||||
|
||||
const updateTabTitle = () => {
|
||||
setTitle(record.value.isNewRecord ? t('新增${functionNameSimple}') : t('编辑${functionNameSimple}'));
|
||||
};
|
||||
|
||||
const inputFormSchemas: FormSchema[] = [
|
||||
<% if(table.isTreeEntity){ %>
|
||||
{
|
||||
label: t('上级${functionNameSimple}'),
|
||||
field: 'parentCode',
|
||||
fieldLabel: 'parentName',
|
||||
component: 'TreeSelect',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
style: 'width: calc(50% - 60px)',
|
||||
},
|
||||
colProps: { lg: 24, md: 24 },
|
||||
},
|
||||
<% }
|
||||
for (c in table.columnList){
|
||||
if (c.isEdit == '1' && c.showType != 'hidden'){
|
||||
// 如果是树结构的字段,则自动忽略
|
||||
if(table.isTreeEntity && @StringUtils.inString(c.columnName, 'parent_code',
|
||||
'parent_codes', 'tree_sorts', 'tree_leaf', 'tree_level', 'tree_names')
|
||||
&& c.attrName != table.treeViewCodeAttrName
|
||||
&& c.attrName != table.treeViewNameAttrName){
|
||||
continue;
|
||||
}
|
||||
// 是否强制新行获取,生成字段界面用户设定的
|
||||
var isNewLine = @Global.YES.equals(c.optionMap['isNewLine']);
|
||||
if (isBlank(c.optionMap['isNewLine'])){
|
||||
if (c.showType == 'textarea'){
|
||||
isNewLine = true;
|
||||
}
|
||||
}
|
||||
%>
|
||||
{
|
||||
label: t('${c.columnLabel}'),
|
||||
field: '${c.attrName}',
|
||||
<% if(c.showType == 'input' || c.showType == 'textarea'){ %>
|
||||
<% if (c.simpleAttrType == 'Integer' && c.attrName == 'treeSort'){ %>
|
||||
helpMessage: '升序',
|
||||
component: 'InputNumber',
|
||||
defaultValue: '30',
|
||||
<% }else{ %>
|
||||
component: '${c.showType == 'input' ? 'Input' : 'InputTextArea'}',
|
||||
<% } %>
|
||||
<% if (c.dataLength != '0'){ %>
|
||||
componentProps: {
|
||||
maxlength: ${c.dataLength},
|
||||
},
|
||||
<% } %>
|
||||
<% }else if(c.showType == 'select' || c.showType == 'select_multiple'){
|
||||
var isMultiple = (c.showType == 'select_multiple'); %>
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
dictType: '${c.optionMap['dictType']}',
|
||||
allowClear: true,
|
||||
<% if(isMultiple){ %>
|
||||
mode: 'multiple',
|
||||
<% } %>
|
||||
},
|
||||
<% }else if(c.showType == 'radio' || c.showType == 'checkbox'){ %>
|
||||
component: '${@StringUtils.cap(c.showType)}Group',
|
||||
componentProps: {
|
||||
dictType: '${c.optionMap['dictType']}',
|
||||
},
|
||||
<% }else if(c.showType == 'date' || c.showType == 'datetime'){
|
||||
var isTime = (c.showType == 'datetime'); %>
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
format: 'YYYY-MM-DD${isTime?' HH:mm':''}',
|
||||
showTime: ${isTime?'{ format: \'HH:mm\' \}':'false'},
|
||||
},
|
||||
<% }else if(c.showType == 'userselect'){
|
||||
if (isNotBlank(c.attrName2)){ %>
|
||||
fieldLabel: '${c.attrName2}',
|
||||
<% } %>
|
||||
component: 'TreeSelect',
|
||||
componentProps: {
|
||||
api: officeTreeData,
|
||||
params: { isLoadUser: true, userIdPrefix: '' },
|
||||
canSelectParent: false,
|
||||
allowClear: true,
|
||||
},
|
||||
<% }else if(c.showType == 'officeselect'){
|
||||
if (isNotBlank(c.attrName2)){ %>
|
||||
fieldLabel: '${c.attrName2}',
|
||||
<% } %>
|
||||
component: 'TreeSelect',
|
||||
componentProps: {
|
||||
api: officeTreeData,
|
||||
canSelectParent: false,
|
||||
allowClear: true,
|
||||
},
|
||||
<% }else if(c.showType == 'areaselect'){
|
||||
if (isNotBlank(c.attrName2)){ %>
|
||||
fieldLabel: '${c.attrName2}',
|
||||
<% } %>
|
||||
component: 'TreeSelect',
|
||||
componentProps: {
|
||||
api: areaTreeData,
|
||||
canSelectParent: false,
|
||||
allowClear: true,
|
||||
},
|
||||
<% }else{ %>
|
||||
component: 'Input',
|
||||
<% }
|
||||
var fieldValid = c.optionMap['fieldValid'], fvs = [], rules = [];
|
||||
if(isNotEmpty(fieldValid)){
|
||||
var t = type.name(fieldValid);
|
||||
if (t == 'String[]' || t == 'ArrayList'){
|
||||
fvs = fieldValid;
|
||||
}else if(t == 'String' && isNotBlank(fieldValid)){
|
||||
@fvs.add(fieldValid);
|
||||
}
|
||||
}
|
||||
for(var fv in fvs){
|
||||
if (fv == 'email'){
|
||||
var s = { %>{ type: 'email', message: t('请输入邮箱地址') }<% };
|
||||
@rules.add(s);
|
||||
}
|
||||
if (fv == 'number'){
|
||||
var s = { %>{ pattern: /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/, message: t('请输入一个数值') }<% };
|
||||
@rules.add(s);
|
||||
}
|
||||
if (fv == 'integer'){
|
||||
var s = { %>{ pattern: /^-?\d+$/, message: t('请输入一个整数') }<% };
|
||||
@rules.add(s);
|
||||
}
|
||||
if (fv == 'digits'){
|
||||
var s = { %>{ pattern: /^\d+$/, message: t('请输入一个正整数') }<% };
|
||||
@rules.add(s);
|
||||
}
|
||||
if (fv == 'userName'){
|
||||
var s = { %>{ pattern: /^[\u0391-\uFFE5\w]+$/, message: t('请输入登录账号') }<% };
|
||||
@rules.add(s);
|
||||
}
|
||||
if (fv == 'realName'){
|
||||
var s = { %>{ pattern: /^[\u4e00-\u9fa5]{2,30}$/, message: t('请输入真实姓名') }<% };
|
||||
@rules.add(s);
|
||||
}
|
||||
if (fv == 'abc'){
|
||||
var s = { %>{ pattern: /^[a-zA-Z0-9_]*$/, message: t('请输入字母数字下划线') }<% };
|
||||
@rules.add(s);
|
||||
}
|
||||
if (fv == 'mobile'){
|
||||
var s = { %>{ pattern: /^1[3,4,5,6,7,8,9]\d{9}$/g, message: t('请输入手机号码') }<% };
|
||||
@rules.add(s);
|
||||
}
|
||||
if (fv == 'simplePhone'){
|
||||
var s = { %>{ pattern: /^(\d{3,4}-?)?\d{7,9}$/g, message: t('请输入固话号码') }<% };
|
||||
@rules.add(s);
|
||||
}
|
||||
if (fv == 'phone'){
|
||||
var s = { %>{ pattern: /(^0[1-9]{1}\d{8,10}$)|(^1[3,4,5,6,7,8,9]\d{9}$)/g, message: t('请输入固话或手机号码') }<% };
|
||||
@rules.add(s);
|
||||
}
|
||||
if (fv == 'zipCode'){
|
||||
var s = { %>{ pattern: /^[0-9]{6}$/, message: t('请输入邮政编码') }<% };
|
||||
@rules.add(s);
|
||||
}
|
||||
}
|
||||
if(rules.~size == 0){
|
||||
if(c.isRequired == '1'){
|
||||
%> required: true,
|
||||
<%
|
||||
}
|
||||
} else { %>
|
||||
rules: [<%
|
||||
if(c.isRequired == '1'){
|
||||
%>{ required: true }, <%
|
||||
}
|
||||
for (var rule in rules){
|
||||
print(rule);
|
||||
if (ruleLP.index < rules.~size) {
|
||||
print(', ');
|
||||
}
|
||||
} %>],
|
||||
<%
|
||||
}
|
||||
if (isNewLine){ %>
|
||||
colProps: { lg: 24, md: 24 },
|
||||
<%
|
||||
}
|
||||
%>
|
||||
},
|
||||
<%
|
||||
}
|
||||
}
|
||||
if(toBoolean(table.optionMap['isImageUpload'])){
|
||||
%>
|
||||
{
|
||||
label: t('图片上传'),
|
||||
field: 'dataMap',
|
||||
component: 'Upload',
|
||||
componentProps: {
|
||||
loadTime: computed(() => record.value.__t),
|
||||
bizKey: computed(() => record.value.id),
|
||||
bizType: '${className}_image',
|
||||
uploadType: 'image',
|
||||
},
|
||||
colProps: { lg: 24, md: 24 },
|
||||
},
|
||||
<%
|
||||
}
|
||||
if(toBoolean(table.optionMap['isFileUpload'])){
|
||||
%>
|
||||
{
|
||||
label: t('附件上传'),
|
||||
field: 'dataMap',
|
||||
component: 'Upload',
|
||||
componentProps: {
|
||||
loadTime: computed(() => record.value.__t),
|
||||
bizKey: computed(() => record.value.id),
|
||||
bizType: '${className}_file',
|
||||
uploadType: 'all',
|
||||
},
|
||||
colProps: { lg: 24, md: 24 },
|
||||
},
|
||||
<%
|
||||
}
|
||||
%>
|
||||
];
|
||||
<%
|
||||
for (child in table.childList){ %>
|
||||
|
||||
const input${child.className}FormSchemas: FormSchema[] = [
|
||||
{
|
||||
field: '${@StringUtils.uncap(child.className)}List',
|
||||
component: 'Input',
|
||||
colProps: { lg: 24, md: 24 },
|
||||
slot: '${@StringUtils.uncap(child.className)}List',
|
||||
},
|
||||
];
|
||||
<%
|
||||
}
|
||||
if(false && toBoolean(table.optionMap['isBpmForm'])){
|
||||
%>
|
||||
|
||||
const inputBpmFormSchemas: FormSchema[] = [
|
||||
{
|
||||
label: t('审批意见'),
|
||||
field: 'bpm.comment',
|
||||
component: 'InputTextArea',
|
||||
componentProps: {
|
||||
maxlength: 500,
|
||||
},
|
||||
colProps: { lg: 24, md: 24 },
|
||||
show: () => record.value.bpm.status != '2',
|
||||
},
|
||||
{
|
||||
label: t('下一步流程信息'),
|
||||
field: 'nextTaskInfo',
|
||||
component: 'FormGroup',
|
||||
colProps: { lg: 24, md: 24 },
|
||||
},
|
||||
{
|
||||
label: t('要求完成时间'),
|
||||
field: 'bpm.dueDate',
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
format: 'YYYY-MM-DD HH:mm',
|
||||
showTime: { format: 'HH:mm' },
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('任务优先级'),
|
||||
field: 'bpm.priority',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
dictType: 'bpm_task_priority',
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('下一步处理人'),
|
||||
field: 'bpm.nextUserCodes',
|
||||
component: 'ListSelect',
|
||||
componentProps: {
|
||||
selectType: 'empUserSelect',
|
||||
},
|
||||
},
|
||||
];
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<%
|
||||
var updateSchemas = [];
|
||||
if(table.isTreeEntity){
|
||||
var s = {
|
||||
%> {
|
||||
field: 'parentCode',
|
||||
componentProps: {
|
||||
api: ${className}TreeData,
|
||||
params: {
|
||||
excludeCode: record.value.id,
|
||||
isShowRawName: true,
|
||||
},
|
||||
},
|
||||
},<%
|
||||
};
|
||||
@updateSchemas.add(s);
|
||||
}
|
||||
for (c in table.columnList){
|
||||
if (c.isPk == '1' && c.showType == 'input'){
|
||||
var s = {
|
||||
%> {
|
||||
field: '${c.attrName}',
|
||||
componentProps: {
|
||||
disabled: !record.value.isNewRecord,
|
||||
},
|
||||
},<%
|
||||
};
|
||||
@updateSchemas.add(s);
|
||||
}
|
||||
}
|
||||
%>
|
||||
const [registerForm, formAction] = useForm({
|
||||
labelWidth: 120,
|
||||
schemas: inputFormSchemas,
|
||||
<% var formColNum = table.optionMap['formColNum']; %>
|
||||
baseColProps: { lg: ${formColNum=="1"?24:formColNum=="3"?8:12}, md: 24 },
|
||||
});
|
||||
<% for (child in table.childList){ %>
|
||||
|
||||
const [register${child.className}Form, ${@StringUtils.uncap(child.className)}Form] = useForm({
|
||||
labelWidth: 120,
|
||||
schemas: input${child.className}FormSchemas,
|
||||
baseColProps: { lg: 24, md: 24 },
|
||||
});
|
||||
|
||||
const [register${child.className}Table, ${@StringUtils.uncap(child.className)}Table] = useTable({
|
||||
actionColumn: {
|
||||
width: 60,
|
||||
actions: (record: Recordable) => [
|
||||
{
|
||||
icon: 'ant-design:delete-outlined',
|
||||
color: 'error',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handle${child.className}Delete.bind(this, record),
|
||||
},
|
||||
auth: '${permissionPrefix}:edit',
|
||||
},
|
||||
],
|
||||
},
|
||||
rowKey: 'id',
|
||||
pagination: false,
|
||||
bordered: true,
|
||||
size: 'small',
|
||||
inset: true,
|
||||
});
|
||||
|
||||
async function set${child.className}TableData(_res: Recordable) {
|
||||
${@StringUtils.uncap(child.className)}Table.setColumns([
|
||||
<%
|
||||
for (c in child.columnList){
|
||||
if (c.isEdit != '1' || c.isPk == '1'){
|
||||
continue;
|
||||
}
|
||||
if(child.parentExists && child.parentTableFkName == c.columnName){
|
||||
continue;
|
||||
}
|
||||
%>
|
||||
{
|
||||
title: t('${c.columnLabel}'),
|
||||
dataIndex: '${c.attrName}',
|
||||
<% if(c.showType == 'datetime'){ %>
|
||||
width: 215,
|
||||
<% }else{ %>
|
||||
width: 130,
|
||||
<% } %>
|
||||
<% if ((isNotBlank(c.optionMap['dictType']) || @StringUtils.inString(c.attrType, 'java.util.Date', 'Integer', 'Long'))){ %>
|
||||
align: 'center',
|
||||
<% }else if (@StringUtils.inString(c.attrType, 'Float', 'Double')){ %>
|
||||
align: 'right',
|
||||
<% }else{ %>
|
||||
align: 'left',
|
||||
<% } %>
|
||||
<% if(c.showType == 'select' || c.showType == 'select_multiple' || c.showType == 'checkbox' || c.showType == 'radio'){ %>
|
||||
dictType: '${c.optionMap['dictType']}',
|
||||
<% } %>
|
||||
editRow: true,
|
||||
<% if(c.showType == 'input' || c.showType == 'textarea'){ %>
|
||||
<% if (c.simpleAttrType == 'Integer' && c.attrName == 'treeSort'){ %>
|
||||
editComponent: 'InputNumber',
|
||||
editDefaultValue: '30',
|
||||
<% }else{ %>
|
||||
editComponent: '${c.showType == 'input' ? 'Input' : 'InputTextArea'}',
|
||||
<% } %>
|
||||
<% if (c.dataLength != '0'){ %>
|
||||
editComponentProps: {
|
||||
maxlength: ${c.dataLength},
|
||||
},
|
||||
<% } %>
|
||||
<% }else if(c.showType == 'select' || c.showType == 'select_multiple' || c.showType == 'radio' || c.showType == 'checkbox'){
|
||||
var isMultiple = (c.showType == 'select_multiple'); %>
|
||||
editComponent: 'Select',
|
||||
editComponentProps: {
|
||||
dictType: '${c.optionMap['dictType']}',
|
||||
allowClear: true,
|
||||
<% if(isMultiple){ %>
|
||||
mode: 'multiple',
|
||||
<% } %>
|
||||
},
|
||||
<% }else if(c.showType == 'date' || c.showType == 'datetime'){
|
||||
var isTime = (c.showType == 'datetime'); %>
|
||||
editComponent: 'DatePicker',
|
||||
editComponentProps: {
|
||||
format: 'YYYY-MM-DD${isTime?' HH:mm':''}',
|
||||
showTime: ${isTime?'{ format: \'HH:mm\' \}':'false'},
|
||||
},
|
||||
<% }else if(c.showType == 'userselect'){
|
||||
if (isNotBlank(c.attrName2)){ %>
|
||||
dataLabel: '${c.attrName2}',
|
||||
<% } %>
|
||||
editComponent: 'TreeSelect',
|
||||
editComponentProps: {
|
||||
api: officeTreeData,
|
||||
params: { isLoadUser: true, userIdPrefix: '' },
|
||||
canSelectParent: false,
|
||||
allowClear: true,
|
||||
},
|
||||
<% }else if(c.showType == 'officeselect'){
|
||||
if (isNotBlank(c.attrName2)){ %>
|
||||
dataLabel: '${c.attrName2}',
|
||||
<% } %>
|
||||
editComponent: 'TreeSelect',
|
||||
editComponentProps: {
|
||||
api: officeTreeData,
|
||||
canSelectParent: false,
|
||||
allowClear: true,
|
||||
},
|
||||
<% }else if(c.showType == 'areaselect'){
|
||||
if (isNotBlank(c.attrName2)){ %>
|
||||
dataLabel: '${c.attrName2}',
|
||||
<% } %>
|
||||
editComponent: 'TreeSelect',
|
||||
editComponentProps: {
|
||||
api: areaTreeData,
|
||||
canSelectParent: false,
|
||||
allowClear: true,
|
||||
},
|
||||
<% }else{ %>
|
||||
editComponent: 'Input',
|
||||
<% } %>
|
||||
editRule: ${c.isRequired == '1'},
|
||||
},
|
||||
<%
|
||||
}
|
||||
%>
|
||||
]);
|
||||
${@StringUtils.uncap(child.className)}Table.setTableData(record.value.${@StringUtils.uncap(child.className)}List || []);
|
||||
}
|
||||
|
||||
function handle${child.className}RowClick(record: Recordable) {
|
||||
record.onEdit?.(true, false);
|
||||
}
|
||||
|
||||
function handle${child.className}Add() {
|
||||
${@StringUtils.uncap(child.className)}Table.insertTableDataRecord({
|
||||
id: new Date().getTime(),
|
||||
isNewRecord: true,
|
||||
editable: true,
|
||||
});
|
||||
}
|
||||
|
||||
function handle${child.className}Delete(record: Recordable) {
|
||||
${@StringUtils.uncap(child.className)}Table.deleteTableDataRecord(record);
|
||||
}
|
||||
|
||||
async function get${child.className}List() {
|
||||
let ${@StringUtils.uncap(child.className)}ListValid = true;
|
||||
let ${@StringUtils.uncap(child.className)}List: Recordable[] = [];
|
||||
for (const record of ${@StringUtils.uncap(child.className)}Table.getDataSource()) {
|
||||
if (!(await record.onEdit?.(false, true))) {
|
||||
${@StringUtils.uncap(child.className)}ListValid = false;
|
||||
}
|
||||
${@StringUtils.uncap(child.className)}List.push({
|
||||
...record,
|
||||
id: !!record.isNewRecord ? '' : record.id,
|
||||
});
|
||||
}
|
||||
for (const record of ${@StringUtils.uncap(child.className)}Table.getDelDataSource()) {
|
||||
if (!!record.isNewRecord) continue;
|
||||
${@StringUtils.uncap(child.className)}List.push({
|
||||
...record,
|
||||
status: '1',
|
||||
});
|
||||
}
|
||||
if (!${@StringUtils.uncap(child.className)}ListValid) {
|
||||
throw { errorFields: [{ name: ['${@StringUtils.uncap(child.className)}List'] }] };
|
||||
}
|
||||
return ${@StringUtils.uncap(child.className)}List;
|
||||
}
|
||||
<% } %>
|
||||
|
||||
async function resetFields() {
|
||||
await formAction.resetFields();
|
||||
<% for (child in table.childList){ %>
|
||||
await ${@StringUtils.uncap(child.className)}Form.resetFields();
|
||||
<% } %>
|
||||
}
|
||||
|
||||
async function setFieldsValue(values: Recordable) {
|
||||
await formAction.setFieldsValue(values);
|
||||
<% for (child in table.childList){ %>
|
||||
await ${@StringUtils.uncap(child.className)}Form.setFieldsValue(values);
|
||||
<% } %>
|
||||
}
|
||||
|
||||
async function validate(): Promise<Recordable<any>> {
|
||||
return Object.assign(
|
||||
await formAction.validate(),
|
||||
<% for (child in table.childList){ %>
|
||||
await ${@StringUtils.uncap(child.className)}Form.validate(),
|
||||
<% } %>
|
||||
);
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await resetFields();
|
||||
const res = await ${className}Form(unref(query));
|
||||
record.value = (res.${className} || {}) as ${ClassName};
|
||||
record.value.__t = new Date().getTime();
|
||||
<% if(table.isTreeEntity){ %>
|
||||
if (data.parentCode && data.parentName) {
|
||||
record.value.parentCode = data.parentCode;
|
||||
record.value.parentName = data.parentName;
|
||||
}
|
||||
<% } %>
|
||||
setFieldsValue(record.value);
|
||||
<% for (child in table.childList){ %>
|
||||
set${child.className}TableData(res);
|
||||
<% } %>
|
||||
<% if(updateSchemas.~size > 0){ %>
|
||||
formAction.updateSchema([
|
||||
<% for(updateSchema in updateSchemas){
|
||||
print(updateSchema + '\n');
|
||||
} %>
|
||||
]);
|
||||
<% } %>
|
||||
updateTabTitle();
|
||||
});
|
||||
|
||||
function handleClose() {
|
||||
setTimeout(close);
|
||||
}
|
||||
<% if(toBoolean(table.optionMap['isBpmForm'])){ %>
|
||||
|
||||
async function handleValidate(_event: any, formData: any) {
|
||||
try {
|
||||
const data = await validate();
|
||||
formData(true, data); // 将表单数据传递给 BpmButton
|
||||
} catch (error: any) {
|
||||
if (error && error.errorFields) {
|
||||
showMessage(t('common.validateError'));
|
||||
}
|
||||
console.log('error', error);
|
||||
}
|
||||
}
|
||||
<% } %>
|
||||
|
||||
async function handleSubmit(<% if(toBoolean(table.optionMap['isBpmForm'])){ %>event: any<% } %>) {
|
||||
try {
|
||||
loadingRef.value = true;
|
||||
<% if(toBoolean(table.optionMap['isBpmForm'])){ %>
|
||||
const data = event?.formData || (await validate()); // 接受 BpmButton 传递过来的表单数据
|
||||
data.bpm = Object.assign(data.bpm || {}, record.value.bpm); // 流程信息
|
||||
data.status = record.value.status; // 提交状态
|
||||
<% } else { %>
|
||||
const data = await validate();
|
||||
<% } %>
|
||||
const params: any = {
|
||||
isNewRecord: record.value.isNewRecord,
|
||||
<%
|
||||
for (c in table.columnList){
|
||||
if (c.isPk == '1' || c.showType == 'hidden'){ %>
|
||||
${c.attrName}: record.value.${c.attrName},
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
};
|
||||
<% for (child in table.childList){ %>
|
||||
data.${@StringUtils.uncap(child.className)}List = await get${child.className}List();
|
||||
<% } %>
|
||||
<% if(table.isTreeEntity){ %>
|
||||
data.oldParentCode = record.value.parentCode;
|
||||
<% } %>
|
||||
// console.log('submit', params, data, record);
|
||||
const res = await ${className}Save(params, data);
|
||||
showMessage(res.message);
|
||||
emitter.emit('${moduleName}${isNotEmpty(subModuleName)?'-'+subModuleName:''}-${className}-reload');
|
||||
handleClose();
|
||||
} catch (error: any) {
|
||||
if (error && error.errorFields) {
|
||||
showMessage(t('common.validateError'));
|
||||
}
|
||||
console.log('error', error);
|
||||
} finally {
|
||||
loadingRef.value = false;
|
||||
}
|
||||
}
|
||||
<% if(toBoolean(table.optionMap['isBpmForm'])){ %>
|
||||
|
||||
async function handleSuccess() {
|
||||
emitter.emit('${moduleName}${isNotEmpty(subModuleName)?'-'+subModuleName:''}-${className}-reload');
|
||||
}
|
||||
<% } %>
|
||||
</script>
|
||||
<% %>
|
||||
]]>
|
||||
</content>
|
||||
</template>
|
||||
@@ -52,16 +52,18 @@
|
||||
import { Icon } from '/@/components/Icon';
|
||||
import { BasicModal, useModalInner } from '/@/components/Modal';
|
||||
import { ${className}ImportData } from '/@/api/${moduleName}${isNotEmpty(subModuleName)?'/'+subModuleName:''}/${className}';
|
||||
import { FileType } from 'ant-design-vue/es/upload/interface';
|
||||
import { AxiosProgressEvent } from 'axios';
|
||||
|
||||
const emit = defineEmits(['success', 'register']);
|
||||
|
||||
const { t } = useI18n('${moduleName}${isNotEmpty(subModuleName)?'.'+subModuleName:''}.${className}');
|
||||
const { showMessage, showMessageModal } = useMessage();
|
||||
|
||||
const fileList = ref([]);
|
||||
const fileList = ref(FileType[]);
|
||||
const uploadInfo = ref('');
|
||||
|
||||
const beforeUpload = (file: never) => {
|
||||
const beforeUpload = (file: FileType) => {
|
||||
fileList.value = [file];
|
||||
return false;
|
||||
};
|
||||
@@ -80,8 +82,8 @@
|
||||
downloadByUrl({ url: ctxAdminPath + '/${urlPrefix}/importTemplate' });
|
||||
}
|
||||
|
||||
function onUploadProgress(progressEvent: ProgressEvent) {
|
||||
const complete = ((progressEvent.loaded / progressEvent.total) * 100) | 0;
|
||||
function onUploadProgress(progressEvent: AxiosProgressEvent) {
|
||||
const complete = ((progressEvent.loaded / (progressEvent.total || 1)) * 100) | 0;
|
||||
if (complete != 100) {
|
||||
uploadInfo.value = t('正在导入,请稍后') + ' ' + complete + '%...';
|
||||
} else {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<BasicTable @register="registerTable"<% if(table.isTreeEntity){ %> @fetchSuccess="fetchSuccess"<% } %>>
|
||||
<BasicTable @register="registerTable"<% if(table.isTreeEntity){ %> @fetch-success="fetchSuccess"<% } %>>
|
||||
<template #tableTitle>
|
||||
<Icon :icon="getTitle.icon" class="m-1 pr-1" />
|
||||
<span> {{ getTitle.value }} </span>
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
<span class="required hide">*</span> \${text('图片上传')}:</label>
|
||||
<div class="${txtGridRowCol[2]}">
|
||||
<${'#'}form:fileupload id="uploadImage" bizKey="\${${className}.id}" bizType="${className}_image"
|
||||
uploadType="image" class="" readonly="false" preview="true"/>
|
||||
uploadType="image" class="" readonly="false" preview="true" dataMap="true"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -204,7 +204,7 @@
|
||||
<span class="required hide">*</span> \${text('附件上传')}:</label>
|
||||
<div class="${txtGridRowCol[2]}">
|
||||
<${'#'}form:fileupload id="uploadFile" bizKey="\${${className}.id}" bizType="${className}_file"
|
||||
uploadType="all" class="" readonly="false" preview="true"/>
|
||||
uploadType="all" class="" readonly="false" preview="true" dataMap="true"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -64,13 +64,6 @@
|
||||
<artifactId>jeesite-cloud-module-seata-client</artifactId>
|
||||
<version>\${project.parent.version}</version>
|
||||
</dependency> -->
|
||||
|
||||
<!-- Spring Boot Tomcat
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency> -->
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ productName: JeeSite Demo
|
||||
companyName: ThinkGem
|
||||
|
||||
# 产品版本、版权年份
|
||||
productVersion: V5.5
|
||||
productVersion: V5.6
|
||||
copyrightYear: 2024
|
||||
|
||||
# 数据库连接
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-modules</artifactId>
|
||||
<version>5.6.0-SNAPSHOT</version>
|
||||
<version>5.6.1-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>JeeSite Modules</name>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>5.6.0-SNAPSHOT</version>
|
||||
<version>5.6.1-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>JeeSite Parent</name>
|
||||
@@ -53,7 +53,7 @@
|
||||
<mybatis.version>3.5.14</mybatis.version>
|
||||
<mybatis-spring.version>2.0.7</mybatis-spring.version>
|
||||
<jsqlparser.version>4.6</jsqlparser.version>
|
||||
<druid.version>1.2.20</druid.version>
|
||||
<druid.version>1.2.21</druid.version>
|
||||
<shiro.version>1.13.0</shiro.version>
|
||||
<j2cache.version>2.8.0-release</j2cache.version>
|
||||
<swagger.version>1.6.6</swagger.version>
|
||||
@@ -258,7 +258,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-eclipse-plugin</artifactId>
|
||||
<!--<version>2.10</version>-->
|
||||
<version>2.10</version>
|
||||
<configuration>
|
||||
<downloadSources>${eclipse-plugin-download-sources}</downloadSources>
|
||||
<downloadJavadocs>${eclipse-plugin-download-javadocs}</downloadJavadocs>
|
||||
|
||||
2
pom.xml
2
pom.xml
@@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite</artifactId>
|
||||
<version>5.6.0-SNAPSHOT</version>
|
||||
<version>5.6.1-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>JeeSite</name>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-root</artifactId>
|
||||
<version>5.6.0-SNAPSHOT</version>
|
||||
<version>5.6.1-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>JeeSite Root</name>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>5.6.0-SNAPSHOT</version>
|
||||
<version>5.6.1-SNAPSHOT</version>
|
||||
<relativePath>../parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -72,13 +72,6 @@
|
||||
<artifactId>jeesite-module-filepreview</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
</dependency> -->
|
||||
|
||||
<!-- Spring Boot Tomcat
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency> -->
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ productName: JeeSite Demo
|
||||
companyName: ThinkGem
|
||||
|
||||
# 产品版本、版权年份
|
||||
productVersion: V5.5
|
||||
productVersion: V5.6
|
||||
copyrightYear: 2024
|
||||
|
||||
# 是否演示模式
|
||||
@@ -59,7 +59,7 @@ jdbc:
|
||||
password: 123456
|
||||
testSql: SELECT 1
|
||||
|
||||
# # Oracle 数据库配置(若使用 12c,请修改 /modules/core/pom.xml 文件,打开 12c 依赖,去掉 11g 依赖)
|
||||
# # Oracle 数据库配置(11g,若使用 12c 以上版本,请打开 /modules/core/pom.xml 文件,替换为 Oracle 12c 驱动并编译打包 core 模块)
|
||||
# type: oracle
|
||||
# driver: oracle.jdbc.OracleDriver
|
||||
# url: jdbc:oracle:thin:@127.0.0.1:1521/orcl
|
||||
@@ -67,7 +67,7 @@ jdbc:
|
||||
# password: jeesite
|
||||
# testSql: SELECT 1 FROM DUAL
|
||||
|
||||
# # Sql Server 数据库配置(2008)
|
||||
# # Sql Server 数据库配置(2008 版本,请打开 /modules/core/pom.xml 文件,替换为 SqlServer 2008 驱动并编译打包 core 模块)
|
||||
# type: mssql
|
||||
# driver: net.sourceforge.jtds.jdbc.Driver
|
||||
# url: jdbc:jtds:sqlserver://127.0.0.1:1433/jeesite
|
||||
@@ -75,14 +75,14 @@ jdbc:
|
||||
# password: jeesite
|
||||
# testSql: SELECT 1
|
||||
|
||||
# # Sql Server 数据库配置(2012以上版本)(请修改 /modules/core/pom.xml 文件,打开 SqlServer 2012 依赖并编译打包)
|
||||
# # Sql Server 数据库配置(2012 及以上版本,请打开 /modules/core/pom.xml 文件,替换为 SqlServer 2021 驱动并编译打包 core 模块)
|
||||
# type: mssql2012
|
||||
# driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=jeesite;encrypt=true;trustServerCertificate=true
|
||||
# username: jeesite
|
||||
# password: jeesite
|
||||
# testSql: SELECT 1
|
||||
|
||||
|
||||
# # PostgreSql 数据库配置
|
||||
# type: postgresql
|
||||
# driver: org.postgresql.Driver
|
||||
@@ -91,7 +91,7 @@ jdbc:
|
||||
# password: jeesite
|
||||
# testSql: SELECT 1
|
||||
|
||||
# # H2 数据库配置(请修改 /modules/core/pom.xml 文件,打开 H2 DB 依赖)
|
||||
# # H2 数据库配置(请打开 /modules/core/pom.xml 文件,打开 H2 DB 驱动并编译打包 core 模块)
|
||||
# type: h2
|
||||
# driver: org.h2.Driver
|
||||
# url: jdbc:h2:~/jeesite-db/jeesite
|
||||
@@ -143,7 +143,7 @@ jdbc:
|
||||
# removeAbandoned: false
|
||||
# removeAbandonedTimeout: 2100
|
||||
#
|
||||
# # Oracle 下会自动开启 PSCache,并指定每个连接上 PSCache 大小。若不指定,则与 maxActive 相同(4.1.5+)
|
||||
# # 是否缓存 PreparedStatement 对象的最大数量(4.1.5+)
|
||||
# maxPoolPreparedStatementPerConnectionSize: ~
|
||||
#
|
||||
# # 设置连接属性,可获取到表的 remark (备注)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>5.6.0-SNAPSHOT</version>
|
||||
<version>5.6.1-SNAPSHOT</version>
|
||||
<relativePath>../parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -81,13 +81,6 @@
|
||||
<artifactId>jeesite-module-filepreview</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
</dependency> -->
|
||||
|
||||
<!-- Spring Boot Tomcat
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency> -->
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ productName: JeeSite Demo
|
||||
companyName: ThinkGem
|
||||
|
||||
# 产品版本、版权年份
|
||||
productVersion: V5.5
|
||||
productVersion: V5.6
|
||||
copyrightYear: 2024
|
||||
|
||||
# 是否演示模式
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>5.6.0-SNAPSHOT</version>
|
||||
<version>5.6.1-SNAPSHOT</version>
|
||||
<relativePath>../parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -86,13 +86,6 @@
|
||||
<artifactId>jeesite-module-filepreview</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
</dependency> -->
|
||||
|
||||
<!-- Spring Boot Tomcat
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency> -->
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ productName: JeeSite Demo
|
||||
companyName: ThinkGem
|
||||
|
||||
# 产品版本、版权年份
|
||||
productVersion: V5.5
|
||||
productVersion: V5.6
|
||||
copyrightYear: 2024
|
||||
|
||||
# 是否演示模式
|
||||
@@ -59,7 +59,7 @@ jdbc:
|
||||
password: 123456
|
||||
testSql: SELECT 1
|
||||
|
||||
# # Oracle 数据库配置(若使用 12c,请修改 /modules/core/pom.xml 文件,打开 12c 依赖,去掉 11g 依赖)
|
||||
# # Oracle 数据库配置(11g,若使用 12c 以上版本,请打开 /modules/core/pom.xml 文件,替换为 Oracle 12c 驱动并编译打包 core 模块)
|
||||
# type: oracle
|
||||
# driver: oracle.jdbc.OracleDriver
|
||||
# url: jdbc:oracle:thin:@127.0.0.1:1521/orcl
|
||||
@@ -67,7 +67,7 @@ jdbc:
|
||||
# password: jeesite
|
||||
# testSql: SELECT 1 FROM DUAL
|
||||
|
||||
# # Sql Server 数据库配置(2008)
|
||||
# # Sql Server 数据库配置(2008 版本,请打开 /modules/core/pom.xml 文件,替换为 SqlServer 2008 驱动并编译打包 core 模块)
|
||||
# type: mssql
|
||||
# driver: net.sourceforge.jtds.jdbc.Driver
|
||||
# url: jdbc:jtds:sqlserver://127.0.0.1:1433/jeesite
|
||||
@@ -75,7 +75,7 @@ jdbc:
|
||||
# password: jeesite
|
||||
# testSql: SELECT 1
|
||||
|
||||
# # Sql Server 数据库配置(2012以上版本)(请修改 /modules/core/pom.xml 文件,打开 SqlServer 2012 依赖并编译打包)
|
||||
# # Sql Server 数据库配置(2012 及以上版本,请打开 /modules/core/pom.xml 文件,替换为 SqlServer 2021 驱动并编译打包 core 模块)
|
||||
# type: mssql2012
|
||||
# driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=jeesite;encrypt=true;trustServerCertificate=true
|
||||
@@ -91,7 +91,7 @@ jdbc:
|
||||
# password: jeesite
|
||||
# testSql: SELECT 1
|
||||
|
||||
# # H2 数据库配置(请修改 /modules/core/pom.xml 文件,打开 H2 DB 依赖)
|
||||
# # H2 数据库配置(请打开 /modules/core/pom.xml 文件,打开 H2 DB 驱动并编译打包 core 模块)
|
||||
# type: h2
|
||||
# driver: org.h2.Driver
|
||||
# url: jdbc:h2:~/jeesite-db/jeesite
|
||||
@@ -143,7 +143,7 @@ jdbc:
|
||||
# removeAbandoned: false
|
||||
# removeAbandonedTimeout: 2100
|
||||
#
|
||||
# # Oracle 下会自动开启 PSCache,并指定每个连接上 PSCache 大小。若不指定,则与 maxActive 相同(4.1.5+)
|
||||
# # 是否缓存 PreparedStatement 对象的最大数量(4.1.5+)
|
||||
# maxPoolPreparedStatementPerConnectionSize: ~
|
||||
#
|
||||
# # 设置连接属性,可获取到表的 remark (备注)
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<#form:form id="inputForm" model="${testData}" action="${ctx}/test/testData/save" method="post" class="form-horizontal">
|
||||
<#form:form id="inputForm" model="${testData}" action="${ctx}/test/testData/save" method="post" class="form-horizontal"
|
||||
enctype="application/json" data-params="isNewRecord,id">
|
||||
<div class="box-body">
|
||||
<div class="form-unit">${text('基本信息')}</div>
|
||||
<#form:hidden path="id"/>
|
||||
@@ -154,7 +155,7 @@
|
||||
<label class="control-label col-sm-2">${text('图片上传')}:</label>
|
||||
<div class="col-sm-10">
|
||||
<#form:fileupload id="uploadImage" bizKey="${testData.id}" bizType="testData_image"
|
||||
uploadType="image" class="" readonly="false" preview="true"/>
|
||||
uploadType="image" class="" readonly="false" preview="true" dataMap="true"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -165,7 +166,7 @@
|
||||
<label class="control-label col-sm-2">${text('附件上传')}:</label>
|
||||
<div class="col-sm-10">
|
||||
<#form:fileupload id="uploadFile" bizKey="${testData.id}" bizType="testData_file"
|
||||
uploadType="all" class="" readonly="false" preview="true"/>
|
||||
uploadType="all" class="" readonly="false" preview="true" dataMap="true"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -201,18 +202,18 @@
|
||||
<#form:listselect id="{{d.id}}" title="{{d.title}}" name="{{d.name}}" value="{{d.value}}"
|
||||
labelName="{{d.labelName}}" labelValue="{{d.labelValue}}" url="{{d.url}}"
|
||||
class="{{d.cssClass}}" btnClass="btn-sm" allowClear="true" readonly="{{d.readonly}}"
|
||||
itemCode="{{d.itemCode}}" itemName="{{d.itemName}}"/>
|
||||
itemCode="{{d.itemCode}}" itemName="{{d.itemName}}" dataMap="true"/>
|
||||
</div>//--></script>
|
||||
<script id="fileuploadTpl" type="text/template">//<!--<div>
|
||||
<#form:fileupload id="{{d.id}}" bizKey="{{d.bizKey}}" bizType="{{d.bizType}}" uploadType="all"
|
||||
class="{{d.cssClass}}" isMini="true" preview="true" readonly="{{d.readonly}}"/>
|
||||
class="{{d.cssClass}}" isMini="true" preview="true" readonly="{{d.readonly}}" dataMap="true"/>
|
||||
</div>//--></script>
|
||||
<script>
|
||||
//初始化测试数据子表DataGrid对象
|
||||
$("#testDataChildDataGrid").dataGrid({
|
||||
$('#testDataChildDataGrid').dataGrid({
|
||||
|
||||
data: "#{toJson(testData.testDataChildList)}",
|
||||
datatype: "local", // 设置本地数据
|
||||
datatype: 'local', // 设置本地数据
|
||||
autoGridHeight: function(){return 'auto'}, // 设置自动高度
|
||||
|
||||
// 设置数据表格列
|
||||
@@ -419,7 +420,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
},
|
||||
editable: true, edittype: "custom", editoptions: {
|
||||
custom_element: function(val, editOptions) {
|
||||
log(val, editOptions)
|
||||
// log(val, editOptions)
|
||||
return js.template('fileuploadTpl', {
|
||||
id: 'fileupload_'+editOptions.rowId, bizKey: editOptions.rowId,
|
||||
bizType: 'testDataChild_file', cssClass: '', readonly: false
|
||||
@@ -447,7 +448,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
editGridInputFormListName: 'testDataChildList', // 提交的数据列表名
|
||||
editGridInputFormListAttrs: 'status,id,testSort,testData.id,testInput,testTextarea,testSelect,testSelectMultiple,'
|
||||
+'testRadio,testCheckbox,testDate,testDatetime,testUser.userCode,testUser.userName,testOffice.officeCode,'
|
||||
+'testOffice.officeName,testAreaCode,testAreaName,testDataChild_file,testDataChild_file__del', // 提交数据列表的属性字段
|
||||
+'testOffice.officeName,testAreaCode,testAreaName,dataMap[testDataChild_file],dataMap[testDataChild_file__del]', // 提交数据列表的属性字段
|
||||
|
||||
//# // 加载成功后执行事件
|
||||
ajaxSuccess: function(data){
|
||||
@@ -463,7 +464,7 @@ $('#testDataChildDataGrid').on('click', '.uploaderFile', function(){
|
||||
})
|
||||
});
|
||||
});
|
||||
$("#inputForm").validate({
|
||||
$('#inputForm').validate({
|
||||
submitHandler: function(form){
|
||||
js.ajaxSubmitForm($(form), function(data){
|
||||
js.showMessage(data.message);
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user