| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386 |
- <%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <%@page import="org.jeecgframework.web.cgform.common.CgAutoListConstant"%>
- <%@include file="/context/mytags.jsp"%>
- <!DOCTYPE html>
- <%
- String lang = (String)request.getSession().getAttribute("lang");
- String langurl = basePath + "/plug-in/mutiLang/" + lang +".js";
- %>
- <html>
- <head>
- <title><t:mutiLang langKey="smark.form.form.maintain"/></title>
- <script src=<%=langurl%> type="text/javascript"></script>
- <t:base type="jquery,easyui,jqueryui-sortable,tools"></t:base>
- <script type="text/javascript" src="plug-in/cgform/js/cgformField.js"></script>
- <style type="text/css">
- .table-list {
- margin: 0;
- width: auto;
- margin-left: 0px;
- margin-right: 0px;
- overflow: hidden;
- }
- .table-list td,.table-list th {
- text-align: center;
- }
- .t_table {
- overflow: auto; /*让内容表格外面的div自动有滚动条*/
- margin-left: 0px;
- margin-right: 0px;
- width: auto;
- }
- #tab_div_database tr {
- border-bottom: 1px solid #e6e6e6;
- cursor: n-resize;
- }
- /*update-end--Author:liuht Date:20131207 for[333]:OL模块,增加一个特效 调整字段顺序(上下挪动)*/
- </style>
- </head>
- <body style="overflow-y: hidden; overflow-x: hidden;" scroll="no">
- <!-- 增加beforeSubmit页面逻辑删除-->
- <t:formvalid formid="formobj" dialog="true" usePlugin="password" beforeSubmit="deleteUnUsedFiled();" layout="table" tiptype="1" action="cgFormHeadController.do?save">
- <!-- tiptype="1" -->
- <input id="id" name="id" type="hidden" value="${cgFormHeadPage.id}">
- <input id="langurl" name="langurl" type="hidden" value="<%=langurl%>">
- <!-- add-start--Author:gengjiajia Date:20160804 for:添加表类型隐藏域-->
- <input id="tableType" name="tableType" type="hidden" value="${cgFormHeadPage.tableType}">
- <!-- add-start--Author:gengjiajia Date:20160804 for:添加表类型隐藏域-->
- <table cellpadding="0" cellspacing="1" class="formtable">
- <tr>
- <td align="right"><label class="Validform_label"> <t:mutiLang langKey="table.name"/>: </label></td>
- <td class="value">
- <input class="inputxt" id="tableName" name="tableName" value="${cgFormHeadPage.tableName}"
- prefixName="" <c:if test="${not empty cgFormHeadPage.tableName}">readonly="readonly"</c:if> datatype="*" validType="cgform_head,table_Name,id" nullmsg=<t:mutiLang langKey="please.input.table.name"/>>
- <span class="Validform_checktip"></span>
- </td>
- <td align="right"><label class="Validform_label"> <t:mutiLang langKey="table.description"/>: </label></td>
- <td class="value"><input class="inputxt" id="content" name="content" value="${cgFormHeadPage.content}" datatype="s2-100"> <span class="Validform_checktip"></span></td>
- </tr>
- <tr>
- <td align="right"><label class="Validform_label"> <t:mutiLang langKey="pk.strategies"/>:</label></td>
- <td class="value" id="jformPkTypeTd" <c:if test="${cgFormHeadPage.jformPkType ne 'SEQUENCE'}">colspan="3"</c:if>>
- <select id="jformPkType" name="jformPkType" onchange="jformPkTypeChange();">
- <option value="UUID" <c:if test="${cgFormHeadPage.jformPkType eq 'UUID'}"> selected='selected'</c:if>><t:mutiLang langKey="common.uuid36bit"/></option>
- <option value="NATIVE" <c:if test="${cgFormHeadPage.jformPkType eq 'NATIVE'}"> selected='selected'</c:if>><t:mutiLang langKey="common.native.auto.increment"/></option>
- <option value="SEQUENCE" <c:if test="${cgFormHeadPage.jformPkType eq 'SEQUENCE'}"> selected='selected'</c:if>><t:mutiLang langKey="common.sequence"/></option>
- </select>
- </td>
- <td align="right" id="jformPkSequenceN" <c:if test="${cgFormHeadPage.jformPkType ne 'SEQUENCE'}">style="display: none;"</c:if>><label class="Validform_label"> <t:mutiLang langKey="sequence.name"/>:</label></td>
- <td class="value" id="jformPkSequenceV" <c:if test="${cgFormHeadPage.jformPkType ne 'SEQUENCE'}">style="display: none;"</c:if>><input id="jformPkSequence" name="jformPkSequence" type="text"
- class="inputxt" value="${cgFormHeadPage.jformPkSequence}" /> <span class="Validform_checktip"></span> <label class="Validform_label" style="display: none;"> <t:mutiLang langKey="sequence.name"/>:</label></td>
- </tr>
- <tr>
- <!--add-start--Author:luobaoli Date:20150607 for:增加表单分类下拉列表-->
- <td align="right"><label class="Validform_label"> <t:mutiLang langKey="form.category"/>:</label></td>
- <td class="value"><select id="jformCategory" name="jformCategory">
- <c:forEach items="${typeList}" var="type">
- <option value="${type.typecode}" <c:if test="${type.typecode==cgFormHeadPage.jformCategory}">selected="selected"</c:if>>${type.typename}</option>
- </c:forEach>
- </select></td>
- <!--add-end--Author:luobaoli Date:20150607 for:增加表单分类下拉列表-->
- <td align="right"><label class="Validform_label"> <t:mutiLang langKey="table.type"/>: </label></td>
- <td class="value"><select id="jformType" name="jformType" onchange="formTypeChange();">
- <option value="1" <c:if test="${cgFormHeadPage.jformType eq '1'}"> selected='selected'</c:if>><t:mutiLang langKey="single.table"/></option>
- <option value="2" <c:if test="${cgFormHeadPage.jformType eq '2'}"> selected="selected"</c:if>><t:mutiLang langKey="master.table"/></option>
- <option value="3" <c:if test="${cgFormHeadPage.jformType eq '3'}"> selected="selected"</c:if>><t:mutiLang langKey="slave.table"/></option>
- </select>
- <div id="relation_type_div" style="display: none;">
- <input type="radio" name="relationType"
- <c:if test="${cgFormHeadPage.relationType eq '0' || cgFormHeadPage.relationType ==null }">
- checked="checked"
- </c:if> value="0">
- <t:mutiLang langKey="common.one.to.many"/>
- </input>
- <input type="radio" name="relationType"
- <c:if test="${cgFormHeadPage.relationType eq '1' }">
- checked="checked"
- </c:if> value="1">
- <t:mutiLang langKey="comon.one.to.one"/>
- </input>
- <t:mutiLang langKey="sequence.name"/>:<input class="inputxt" style="width: 30px" id="tabOrder" name="tabOrder" value="${cgFormHeadPage.tabOrder}" datatype="n" ignore="ignore"></div>
- </td>
- </tr>
- <tr>
- <!--add-start--Author:张忠亮 Date:20150618 for:增加表单模板选择-->
- <td align="right"><label class="Validform_label"> <t:mutiLang langKey="form.template.style_pc" />:</label></td>
- <td class="value"><select id="formTemplate" name="formTemplate" temVal="${cgFormHeadPage.formTemplate}"></select></td>
- <!--add-end--Author:张忠亮 Date:20150618 for:增加表单模板选择-->
-
- <!--add-start--Author:scott Date:20160301 for:online表单移动样式单独配置-->
- <td align="right"><label class="Validform_label"> <t:mutiLang langKey="form.template.style_mobile" />:</label></td>
- <td class="value"><select id="formTemplateMobile" name="formTemplateMobile" temVal="${cgFormHeadPage.formTemplateMobile}"></select></td>
- <!--add-start--Author:scott Date:20160301 for:online表单移动样式单独配置-->
- </tr>
- <tr>
- <td align="right"><label class="Validform_label"> <t:mutiLang langKey="show.checkbox"/>: </label></td>
- <td class="value"><select id="isCheckbox" name="isCheckbox">
- <option value="N" <c:if test="${cgFormHeadPage.isCheckbox eq 'N'}"> selected="selected"</c:if>><t:mutiLang langKey="common.no"/></option>
- <option value="Y" <c:if test="${cgFormHeadPage.isCheckbox eq 'Y'}"> selected="selected"</c:if>><t:mutiLang langKey="common.yes"/></option>
- </select></td>
- <td align="right"><label class="Validform_label"> <t:mutiLang langKey="is.page"/>:</label></td>
- <td class="value"><select id="isPagination" name="isPagination">
- <option value="Y" <c:if test="${cgFormHeadPage.isPagination eq 'Y'}"> selected='selected'</c:if>><t:mutiLang langKey="common.yes"/></option>
- <option value="N" <c:if test="${cgFormHeadPage.isPagination eq 'N'}"> selected="selected"</c:if>><t:mutiLang langKey="common.no"/></option>
- </select></td>
- </tr>
- <tr>
- <td align="right"><label class="Validform_label"> <t:mutiLang langKey="is.tree"/>: </label></td>
- <td class="value"><select id="isTree" name="isTree">
- <option value="N" <c:if test="${cgFormHeadPage.isTree eq 'N'}"> selected='selected'</c:if>><t:mutiLang langKey="common.no"/></option>
- <option value="Y" <c:if test="${cgFormHeadPage.isTree eq 'Y'}"> selected='selected'</c:if>><t:mutiLang langKey="common.yes"/></option>
- </select></td>
- <td align="right"><label class="Validform_label"> <t:mutiLang langKey="common.query.module"/>: </label></td>
- <td class="value"><select id="querymode" name="querymode">
- <option value="single" <c:if test="${cgFormHeadPage.querymode eq 'single'}"> selected="selected"</c:if>><t:mutiLang langKey="single.query"/></option>
- <option value="group" <c:if test="${cgFormHeadPage.querymode eq 'group'}"> selected="selected"</c:if>><t:mutiLang langKey="combine.query"/></option>
- </select></td>
- </tr>
- <c:if test="${cgFormHeadPage.jformType eq '2'}">
- <tr id="fb_tb">
- <td align="right"><label class="Validform_label"><t:mutiLang langKey="slave.table"/></label></td>
- <td class="value" colspan="3"><input class="inputxt" style="width: 440px" disabled="disabled" value="${cgFormHeadPage.subTableStr}"></td>
- </tr>
- </c:if>
- <tr class="tree">
- <td align="right"><label class="Validform_label"> 树形表单父id: </label></td>
- <td class="value"><input class="inputxt" id="treeParentIdFieldName" name="treeParentIdFieldName" value="${cgFormHeadPage.treeParentIdFieldName}" datatype="s2-100"> <span class="Validform_checktip"></span></td>
- <td align="right"><label class="Validform_label"> 树开表单列: </label></td>
- <td class="value"><input class="inputxt" id="treeFieldname" name="treeFieldname" value="${cgFormHeadPage.treeFieldname}" datatype="s2-100"> <span class="Validform_checktip"></span></td>
- </tr>
- <tr style="display:none;">
- <td align="right"><label class="Validform_label"> idField: </label></td>
- <td class="value"><input class="inputxt" id="treeIdFieldname" name="treeIdFieldname" value="id" datatype="s2-100"> <span class="Validform_checktip"></span></td>
-
- </tr>
- </table>
- <div id="tabs" class="easyui-tabs" tabPosition="top" fit="false" style="margin: 0px; padding: 0px; overflow: hidden; width: auto;">
- <div title= '<t:mutiLang langKey="database.property"/>' width="auto" style="width: auto; margin: 0px; padding: 0px; overflow: hidden;">
- <!-- add-start--Author:gengjiajia Date:20160804 for:如果表类型是“配置表”,则online表单配置不可修改,禁止添加,删除,按钮-->
- <c:if test="${cgFormHeadPage.tableType != '1'}">
- <div style="height: 25px;" class="datagrid-toolbar"><a id="addColumnBtn" class="easyui-linkbutton" data-options="iconCls:'icon-add'" onclick="addColumnBtnClick();" href="#"><t:mutiLang langKey="common.add.to"/></a> <a
- id="delColumnBtn" class="easyui-linkbutton" data-options="iconCls:'icon-remove'" onclick="delColumnBtnClick();" href="#"><t:mutiLang langKey="common.delete"/></a></div>
- </c:if>
- <!-- add-end--Author:gengjiajia Date:20160804 for:如果表类型是“配置表”,则online表单配置不可修改,禁止添加,删除,按钮-->
- <table id="tab_div_database_title" class="table-list" style="height: 25px;">
- </table>
- <div class="t_table" id="t_table_database">
- <table id="tab_div_database" class="table-list">
- </table>
- <br><br><br>
- <%--//update-end--Author:zhangdaihao Date:20170309 for:TASK #1754 【bug】online编辑的时候,树类型的时候,最后一行没显示出来--%>
- <div style="height: 43px"></div>
- <%--//update-end--Author:zhangdaihao Date:20170309 for:TASK #1754 【bug】online编辑的时候,树类型的时候,最后一行没显示出来--%>
- </div>
- </div>
- <div title='<t:mutiLang langKey="page.property"/>' style="overflow: hidden;">
- <table id="tab_div_page_title" class="table-list" style="height: 25px;">
- </table>
- <div class="t_table" id="t_table_page">
- <table id="tab_div_page" class="table-list">
- </table>
- <br><br><br>
- </div>
- </div>
- <div title='<t:mutiLang langKey="validate.dict"/>' style="overflow: hidden;">
- <table id="tab_div_check_title" class="table-list" style="height: 25px;">
- </table>
- <div class="t_table" id="t_table_check">
- <table id="tab_div_check" class="table-list">
- </table>
- <br><br><br>
- </div>
- </div>
- <div title='<t:mutiLang langKey="common.fk"/>' style="overflow: hidden;">
- <table id="tab_div_key_title" class="table-list" style="height: 25px;">
- </table>
- <div class="t_table" id="t_table_key">
- <table id="tab_div_key" class="table-list">
- </table>
- <br><br><br>
- </div>
- </div>
- <!-- add-start author: wangkun date:20160611 for: TASK #1090 【online】online表单缺少索引配置 代码修改痕迹-->
- <div title='<t:mutiLang langKey="common.index"/>' style="overflow: hidden;">
- <div style="height: 25px;" class="datagrid-toolbar">
- <a id="addColumnBtn1" class="easyui-linkbutton" data-options="iconCls:'icon-add'" onclick="addIndexBtnClick();" href="#"><t:mutiLang langKey="common.add.to"/></a>
- <a id="delColumnBtn1" class="easyui-linkbutton" data-options="iconCls:'icon-remove'" onclick="delIndexBtnClick();" href="#"><t:mutiLang langKey="common.delete"/></a>
- </div>
- <table id="tab_div_index_title" class="table-list" style="height: 25px;">
- </table>
- <div class="t_table" id="t_table_index">
- <table id="tab_div_index" class="table-list">
- </table>
- <br><br><br>
- </div>
- </div>
- <!-- add-end author: wangkun date:20160611 for: TASK #1090 【online】online表单缺少索引配置 代码修改痕迹-->
- </div>
- </t:formvalid>
- <script type="text/javascript">
- $(function() {
- //显示/隐藏树形表单输入项
- isTreeHandle();
- $("#isTree").change(function() {
- isTreeHandle();
- });
- getFormTemplateName();
- <!--add-start--Author:scott Date:20160301 for:online表单移动样式单独配置-->
- getFormTemplateName2();
- <!--add-end--Author:scott Date:20160301 for:online表单移动样式单独配置-->
- });
- //根据是否为树形菜单隐藏或显示tree输入框
- function isTreeHandle() {
- if($("#isTree").val() == "Y") {
- //树形表单设置默认值
- if(!$("#treeFieldname").val()) {
- $("#treeFieldname").val($(":text[name='columns[1].fieldName']").val());
- }
- $("tr.tree").find(":input").attr("disabled", false).attr("datatype", "s2-100").end().show();
- }else {
- $("tr.tree").find(":input").attr("disabled", true).removeAttr("datatype").end().hide();
- }
- }
- <!--add-start--Author:张忠亮 Date:20150714 for:根据表单类型获取风格-->
- //获取表单风格模板名称
- function getFormTemplateName(){
- var type=$("#jformType").val();
- $.ajax({
- url:"${pageContext.request.contextPath}/cgformTemplateController.do?getTemplate",
- type:"post",
- data:{type:type},
- dataType:"json",
- success:function(data){
- if(data.success){
- $("#formTemplate").empty();
- $("#formTemplate").append("<option value='' ><t:mutiLang langKey="common.please.select"/></option>");
- $.each(data.obj,function(i,tem){
- $("#formTemplate").append("<option value='"+tem.templateCode+"' >"+tem.templateName+"</option>");
- });
- var temVal=$("#formTemplate").attr("temVal");
- if(temVal.length>0){
- var len=$("#formTemplate").find("[value='"+temVal+"']").attr("selected","selected");
- }
- }
- }
- });
- }
- <!--add-start--Author:scott Date:20160301 for:online表单移动样式单独配置-->
- //获取表单风格模板名称
- function getFormTemplateName2(){
- var type=$("#jformType").val();
- $.ajax({
- url:"${pageContext.request.contextPath}/cgformTemplateController.do?getTemplate",
- type:"post",
- data:{type:type},
- dataType:"json",
- success:function(data){
- if(data.success){
- $("#formTemplateMobile").empty();
- $("#formTemplateMobile").append("<option value='' ><t:mutiLang langKey="common.please.select"/></option>");
- $.each(data.obj,function(i,tem){
- $("#formTemplateMobile").append("<option value='"+tem.templateCode+"' >"+tem.templateName+"</option>");
- });
- var temVal=$("#formTemplateMobile").attr("temVal");
- if(temVal.length>0){
- var len=$("#formTemplateMobile").find("[value='"+temVal+"']").attr("selected","selected");
- }
- }
- }
- });
- }
- <!--add-end--Author:scott Date:20160301 for:online表单移动样式单独配置-->
- //表单类型改变 调用
- function formTypeChange(){
- jformTypeChange();
- getFormTemplateName();
- <!--add-start--Author:scott Date:20160301 for:online表单移动样式单独配置-->
- getFormTemplateName2();
- <!--add-end--Author:scott Date:20160301 for:online表单移动样式单独配置-->
- }
- <!--add-end--Author:张忠亮 Date:20150714 for:根据表单类型获取风格-->
- //add-start--Author:jg_renjie Date:20160413 for:TASK #1019 【平台bug】ONLINE百度编辑器控件样式不好。
- function getShowType(obj){
- var $this = $(obj),value = obj.value;
- if(value == 'umeditor'){
- $this.parent().next().eq(0).find("input[name$=fieldLength]").val('500');
- } else {
- $this.parent().next().eq(0).find("input[name$=fieldLength]").val('120');
- }
- }
- //add-end--Author:jg_renjie Date:20160301 for:TASK #1019 【平台bug】ONLINE百度编辑器控件样式不好。
- function selectField(select){
- var selected = select.val().split(",");
- var fieldArray = new Array();
- $("#tab_div_database tr").each(function(){
- fieldArray.push($(this).find("td:eq(3)>input").val());
- })
- var content = "<table id='field'>";
- for(var i=0;i<fieldArray.length;i++){
- if(selected.indexOf(fieldArray[i])!=-1){
- content += "<tr><td align='left'><input style='width: 30px' type='checkbox' name='ck' checked='checked'/></td>";
- }else{
- content += "<tr><td align='left'><input style='width: 30px' type='checkbox' name='ck'/></td>";
- }
- content += "<td>"+fieldArray[i]+"</td></tr>";
- }
- content += "</table>";
- $.dialog({
- content: content,
- zIndex: 2200,
- title: '字段',
- lock: false,
- width: 250,
- height: 250,
- opacity: 0.4,
- button: [
- {
- name: '<t:mutiLang langKey="common.confirm"/>',
- callback: function(){
- var s = "";
- parent.$("input[name='ck']").each(function(){
- if($(this).attr("checked")){
- s += $(this).parent().next("td").text()+",";
- }
- });
- /* if(nodes.length>0){
- var ids='',names='';
- for(i=0;i<nodes.length;i++){
- var node = nodes[i];
- ids += node.id+',';
- names += node.name+',';
- }
- $("#" + selectedNamesInputId_depart).val(names);
- $("#" + selectedNamesInputId_depart).blur();
- $("#" + selectedIdsInputId_depart).val(ids);
- } */
-
- select.val(s.substring(0,s.length-1));
- },
- focus: true
- },
- {
- name: '<t:mutiLang langKey="common.cancel"/>',
- callback: function () {
- }
- }
- ]});
- }
- </script>
- <iframe id="iframe_check" name="iframe_check" src="plug-in/cgform/fields/cgformOfCheck.html" style="display: none"></iframe>
- <iframe id="iframe_database" src="plug-in/cgform/fields/cgformOfDatabase.html" style="display: none"></iframe>
- <iframe id="iframe_key" src="plug-in/cgform/fields/cgformOfForeignKey.html" style="display: none"></iframe>
- <iframe id="iframe_page" src="plug-in/cgform/fields/cgformOfPage.html" style="display: none"></iframe>
- <!-- add-start author: wangkun date:20160611 for: TASK #1090 【online】online表单缺少索引配置 代码修改痕迹-->
- <iframe id="iframe_index" src="plug-in/cgform/fields/cgformOfIndex.html" style="display: none"></iframe>
- <!-- add-end author: wangkun date:20160611 for: TASK #1090 【online】online表单缺少索引配置 代码修改痕迹-->
- </body>
|