123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299 |
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
- <meta http-equiv="Pragma" content="no-cache" />
- <meta http-equiv="Cache-Control" content="no-cache" />
- <meta http-equiv="Expires" content="0" />
- <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
- <title>表单构建器改版</title>
- <link href="../../AFrontEnd/css/animate.css" rel="stylesheet" />
- <link href="../../AFrontEnd/css/fontawesome/css/font-awesome.css" rel="stylesheet" />
- <link href="../../AFrontEnd/css/bootstrap.css" rel="stylesheet" />
- <link href="../../AFrontEnd/css/style.min.css" rel="stylesheet" />
- <link href="../../AFrontEnd/plugins/codemirror/codemirror.css" rel="stylesheet" />
- <link href="../../AFrontEnd/plugins/codemirror/ambiance.css" rel="stylesheet" />
- <link href="css/summernote.css" rel="stylesheet" />
- <link href="css/summernote-bs3.css?v=121" rel="stylesheet" />
- <script>document.write("<link href='../../AFrontEnd/css/special.css?time=" + new Date().getTime() + "' rel='stylesheet'>");</script>
- <script>document.write("<link href='css/formbuilder.css?time=" + new Date().getTime() + "' rel='stylesheet'>");</script>
-
- </head>
- <body>
- <div class="fb-left">
- <div class="sp-tab" id="sptabLeftCode">
- <ul class="sp-tab-menu">
- <li class="sp-tab-current sp-text-left" style="width:50%;"> <i class="fa fa-th-list"></i> 主表字段</li>
- <li class="sp-text-right" style="width: 50%;"><i class="fa fa-list-ul"></i> 子表字段 </li>
- </ul>
- <div class="sp-tab-box">
- <div class="sp-tab-current">
- <div class="sp-page" id="controlDivPart">
-
- </div>
- </div>
- <div class="sp-tab-hide" id="controlDivPartSubTable">
- <!--<span data-type="" data-code="" data-showtype="" id="spandown_" class="" data-class="" data-style="" data-theme="" data-required="" data-format=""></span>-->
- </div>
- </div>
- </div>
- </div>
- <div class="fb-center">
- <div class="sp-list-type-gray">
- <span class="sp-list-type-title sp-list-type-active" id="btnStartDesign_tab" onclick="btnStartDesign(this)" data-href="#formBuilderTextareaPart"><i class="fa fa-table"></i> 表单设计</span>
- <span class="sp-list-type-title" onclick="btnViewCode(this)" data-href="#formBuilderCodePart"><i class="fa fa-clipboard"></i> 表单源码</span>
- <!--<span class="sp-list-type-title" onclick="btnViewDesign(this)" data-href="#formBuilderDesignPart"><i class="fa fa-arrows-alt"></i> 表单预览</span>-->
- <span class="sp-list-type-right">
- <span onclick="btnGoBack()" class="sp-btn-gray-outline sp-btn-sm"><i class="fa fa-reply-all"></i> 返回</span>
- <span onclick="btn_spbldClear()" class="sp-btn-gray-outline sp-btn-sm"><i class="fa fa-trash"></i> 清空表单</span>
- <span onclick="btnViewDesign(this)" data-href="#formBuilderDesignPart" class="sp-btn-gray-outline sp-btn-sm"><i class="fa fa-arrows-alt"></i> 预览</span>
- <span class="sp-btn-blue-outline sp-btn-sm" id="btnSaveHtmlFileSpan" onclick="btnSaveHtmlFile()" style="display:none;"><i class="fa fa-check"></i> 保存表单</span>
- </span>
- </div>
- <div class="sp-page sp-mt-10 sp-form-builder" id="formBuilderTextareaPart">
- <textarea id="formBuilderTextarea"></textarea>
- </div>
- <div class="sp-page sp-mt-10 sp-form-builder" style="display:none;" id="formBuilderCodePart">
- </div>
- </div>
- <div class="fb-right">
- <div class="sp-page-title"><i class="fa fa-cog"></i> 整体设置</div>
- <div class="sp-line-gray"></div>
- <span class="sp-lh-24 sp-color-gray">表单主题色调</span>
- <div class="sp-lh-26" style="width:80%; margin-left:2%;">
- <span class="sp-checkbox-tabs" id="chb_selectRedTheme">红色</span>
- </div>
- <div class="sp-lh-26" style="width:80%; margin-left:2%;">
- <span class="sp-checkbox-tabs" id="chb_selectRedTheme_noneOutLine">无外层边框</span>
- </div>
- <div class="sp-line-gray"></div>
- <!--start--常用文本区域设置-->
- <span class="sp-lh-24 sp-color-gray fb-textbox-part">必填设置</span>
- <div class="sp-lh-24 sp-checkbox-blue fb-textbox-part"><label><input type="checkbox" id="fucbtnRequire" />这个是必填项</label></div>
-
- <span class="sp-lh-24 sp-color-gray fb-textbox-part sp-mt-10">填写设置</span>
- <div class="sp-lh-22 sp-checkbox-blue fb-textbox-part"><label><input type="checkbox" />限制字数</label></div>
- <div class="sp-lh-26 fb-textbox-part">
- <div class="sp-page" style="width:80%; margin-left:16%;">
-
- </div>
- </div>
- <div class="sp-lh-22 sp-checkbox-blue fb-textbox-part sp-mt-10"><label><input type="checkbox" id="funbtnuseRegular" />使用正则校验</label></div>
- <div class="sp-lh-26 fb-textbox-part" id="regularSelectPart" style="display:none;">
- <div class="sp-page" style="width:80%; margin-left:16%;">
- <select class="sp-select">
- <option value="0">--请选择--</option>
- <option value="sp-phone">手机号</option>
- <option value="sp-tel">座机号</option>
- <option value="sp-card">身份证号</option>
- <option value="sp-email">邮箱</option>
- <option value="sp-postcode">邮编</option>
- <option value="sp-fax">传真</option>
- <option value="sp-num">数字</option>
- <option value="sp-decimal">数字和小数</option>
- <option value="sp-url">网址</option>
- <option value="sp-ip">ip地址</option>
- <option value="sp-chinese">中文</option>
- </select>
- </div>
- </div>
-
- <!--end--常用文本区域设置-->
- <!--start--单选多选区域设置-->
- <!--d单选按钮区域-->
- <span class="sp-lh-24 sp-color-gray fb-radio-part">皮肤设置</span>
- <div class="sp-lh-26 sp-checkbox-blue fb-radio-part">
- <label><input type="checkbox" id="chb_selectRadioStyle" />选择皮肤类型</label>
- </div>
- <div class="sp-lh-26 fb-radio-part" id="selectRadioStylePart" style="width:80%; margin-left:16%; display:none;">
- <select class="sp-select">
- <option value="sp-radio-none">无皮肤</option>
- <option value="sp-radio-default">灰色</option>
- <option value="sp-radio-blue">蓝色</option>
- <option value="sp-radio-orange">橙色</option>
- </select>
- </div>
- <!--d多选按钮区域-->
- <span class="sp-lh-24 sp-color-gray fb-checkbox-part">皮肤设置</span>
- <div class="sp-lh-26 sp-checkbox-blue fb-checkbox-part">
- <label><input type="checkbox" id="chb_selectCheckboxStyle" />选择皮肤类型</label>
- </div>
- <div class="sp-lh-26 fb-checkbox-part" id="selectCheckboxStylePart" style="width:80%; margin-left:16%; display:none;">
- <select class="sp-select">
- <option value="sp-checkbox-none">无皮肤</option>
- <option value="sp-checkbox-gray">灰色</option>
- <option value="sp-checkbox-blue">蓝色</option>
- <option value="sp-checkbox-orange">橙色</option>
- </select>
- </div>
- <!--end--单选多选区域设置-->
- <!--start--日期控件设置区域-->
- <span class="sp-lh-22 sp-color-gray fb-dateset-part">必填设置</span>
- <div class="sp-lh-22 sp-checkbox-blue fb-dateset-part"><label><input type="checkbox" id="btnDateSetRequire" />这个是必填项</label></div>
- <div class="sp-lh-22 sp-color-gray fb-dateset-part">日期格式:</div>
- <div class="sp-page sp-radio-blue fb-dateset-part" style="width:90%; margin-left:10px;" id="fbdatesetspanpart">
- <span class="sp-checkbox-tabs" data-value="yyyy-MM-dd">年-月-日</span>
- <span class="sp-checkbox-tabs" data-value="yyyy-MM">年-月</span>
- <span class="sp-checkbox-tabs" data-value="MM-dd">月-日</span>
- <span class="sp-checkbox-tabs" data-value="yyyy">仅年</span>
- <span class="sp-checkbox-tabs" data-value="MM">仅月</span>
- <span class="sp-checkbox-tabs" data-value="dd">仅日</span>
- <span class="sp-checkbox-tabs" data-value="yyyy-MM-dd HH:mm:ss">年-月-日 时:分:秒</span>
- <span class="sp-checkbox-tabs" data-value="yyyy-MM-dd HH:mm">年-月-日 时:分</span>
- <span class="sp-checkbox-tabs" data-value="HH:mm:ss">时:分:秒</span>
- <span class="sp-checkbox-tabs" data-value="HH:mm">时:分</span>
- </div>
- <!--end--日期控件设置区域-->
- <!--start--日期控件设置区域-->
- <span class="sp-lh-30 sp-color-gray fb-upload-img">设置宽度、高度</span>
- <div class="sp-lh-30 fb-upload-img">
- <div class="sp-page-col" style="width: 25%; margin-left: 5%;">宽度</div>
- <div class="sp-page-col" style="width:40%;">
- <input type="number" id="fbUploadImgWidth" class="fb-upload-img-input" />
- </div>
- <div class="sp-page-col sp-color-gray" style="width: 5%; margin-left: 5%;">px</div>
- </div>
- <div class="sp-lh-30 fb-upload-img">
- <div class="sp-page-col" style="width:25%; margin-left:5%;">高度</div>
- <div class="sp-page-col" style="width:40%;">
- <input type="number" id="fbUploadImgHeight" class="fb-upload-img-input" />
- </div>
- <div class="sp-page-col sp-color-gray" style="width: 5%; margin-left: 5%;">px</div>
- </div>
- <!--end--日期控件设置区域-->
-
- <!--start--补充样式设置区域、删除选中控件-->
- <div class="sp-page fb-setStyle-part">
- <span class="sp-lh-24 sp-color-gray sp-mt-10">样式补充</span>
- <div class="sp-page">
- <textarea rows="5" class="sp-textarea" id="trea_setClassBuChong"></textarea>
- <span class="sp-btn-blue sp-btn-md sp-btn-radius sp-pull-right" id="btn_trea_setClassBuChong_submit">确定</span>
- </div>
- <div class="sp-page sp-lh-24 sp-color-gray sp-mt-10">
- <div class="sp-page-col">删除组件</div>
- <div class="sp-page-col sp-ml-20">
- <span class="sp-btn-red-outline sp-btn-md sp-btn-radius" id="btn_delControl"><i class="fa fa-close"></i> 删除</span>
- </div>
- </div>
- </div>
- <!--end--补充样式设置区域、删除选中控件-->
- </div>
- <div class="sp-layer" data-title="表单预览--表单布局效果" id="formBuilderDesignPart" style="width:1050px; height:550px;">
- <div class="sp-layer-body" style="">
- <iframe name="iframeViewPart" id="iframeViewPart" src="formbuilder_view.html" style="width:100%;height: 500px;" frameborder="0"></iframe>
- </div>
- </div>
-
- <div class="sp-page">
- <div class="sp-page-col" style="calc(100vw - 160px)">意见说明</div>
- <div class="sp-page-col" style="width:80px;">
- <span class="sp-lh-20">姓名</span>
- <span class="sp-lh-20">2022-10-11</span>
- </div>
- <div class="sp-page-col" style="width:80px;">
- <span class="sp-btn-red-outline sp-btn-radius">删除</span>
- <span class="sp-btn-blue-outline sp-btn-radius">修改</span>
- </div>
- </div>
-
-
- <script src="../../AFrontEnd/js/jquery/jquery-1.8.3.min.js"></script>
- <script src="../../AFrontEnd/js/jquery/jquery-2.1.4.min.js"></script>
- <script src="../../AFrontEnd/js/bootstrap/bootstrap.js"></script>
- <script src="../../AFrontEnd/js/jquery/jquery-ui-1.10.4.min.js"></script>
- <!--<script src="../../AFrontEnd/plugins/laydate-1/laydate.js"></script>-->
- <script src="../../AFrontEnd/js/laydate/laydate.js"></script>
- <script>document.write('<scri' + 'pt src="../../AFrontEnd/js/special/special.js?time=' + new Date().getTime() + '" type="text/javascript"></s' + 'cript>');;</script>
- <script src="../../AFrontEnd/plugins/spvld/spvld.js"></script><!--原生的验证插件-->
-
- <!--用于查看表单源码的插件-->
- <script src="../../AFrontEnd/plugins/codemirror/codemirror.js?v=2023052311"></script>
- <script src="../../AFrontEnd/plugins/codemirror/mode/javascript/javascript.js?v=2023052311"></script>
-
- <!--美化表单源码中的代码格式-->
- <script src="../../AFrontEnd/plugins/beautifyhtml/beautifyhtml.js"></script>
-
- <!--表格编辑设计基础插件-->
- <script src="tinymce/tinymce.js" type="text/javascript"></script>
- <script src="../../apiurljs.js"></script>
- <script src="../../js/sm4.js"></script>
- <script>document.write('<scri' + 'pt src="js/formbuilder.js?time=' + new Date().getTime() + '" type="text/javascript"></s' + 'cript>');;</script>
-
- <script type="text/javascript">
- ////设置表单设置的区域
- function setFbTinymce() {
- tinymce.init({
- language: 'zh_CN',
- name: '#formBuilderTextarea',
- selector: '#formBuilderTextarea',
- height: 400,
- // plugins: "table",
- plugins: [
- 'advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker',
- 'searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking',
- 'save table contextmenu directionality emoticons template paste textcolor'
- ],
- content_css: [
- '../../AFrontEnd/css/fontawesome/css/font-awesome.css',
- '../../AFrontEnd/css/special.css',
- 'css/iframebuilder.css?v=20230522'
- ],
- toolbar: 'insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media fullpage | forecolor backcolor emoticons',
- table_default_attributes: { class: 'sp-fb-grid' },
- table_default_styles: {
- 'width': '100%'
- },
- table_responsive_width: true
- }).then(function (editors) {
- getData(); ///整体加载数据
- //setup_draggable();///拖拽方法设置
- });
- };
- setFbTinymce();////调用tinymce插件,加载网格数据方法
- sp.radio();///美化单选
- sp.checkbox();///美化多选
- ////spvld.getValidate(); ///表单正则验证插件
- ////测试开发单项选择器
- //setTimeout(function () {
- // sp.layer("#layer_popcheckbox_showcode");
- // $("#layer_popcheckbox_showcode").find(".spfb-layer-popcheckbox-all").click(function () {
- // if ($(this).hasClass("hasClick")) {
- // $(this).removeClass("hasClick").removeClass("sp-checkbox-tabs-active");
- // $("#layer_popcheckbox_showcode .spfb-layer-popcheckbox-part").find(".sp-checkbox-tabs").removeClass("sp-checkbox-tabs-active");
- // } else {
-
- // $(this).addClass("hasClick").addClass("sp-checkbox-tabs-active");
-
- // $("#layer_popcheckbox_showcode .spfb-layer-popcheckbox-part").find(".sp-checkbox-tabs").addClass("sp-checkbox-tabs-active");
- // }
- // })
- //}, 1000);
- </script>
- </body>
- </html>
|