cba55bc259381fa1d09b41941b4731ee.php 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <?php /*a:1:{s:72:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\setting\system_config\index.php";i:1595820902;}*/ ?>
  2. <!DOCTYPE html>
  3. <html lang="en">
  4. <head>
  5. <meta charset="UTF-8">
  6. <title><?=$form->getTitle()?></title>
  7. <link href="/system/frame//css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
  8. <link href="/system//css/layui-admin.css" rel="stylesheet">
  9. <link href="/system/frame//css/style.min.css?v=3.0.0" rel="stylesheet">
  10. <link href="/system/frame/css/font-awesome.min.css?v=4.3.0" rel="stylesheet">
  11. <script src="/static/plug/vue/dist/vue.min.js"></script>
  12. <link href="/static/plug/iview/dist/styles/iview.css" rel="stylesheet">
  13. <script src="/static/plug/iview/dist/iview.min.js"></script>
  14. <script src="/static/plug/jquery/jquery.min.js"></script>
  15. <script src="/static/plug/form-create/province_city.js"></script>
  16. <script src="/static/plug/form-create/form-create.min.js"></script>
  17. <link href="/static/plug/layui/css/layui.css" rel="stylesheet">
  18. <script src="/static/plug/layui/layui.all.js"></script>
  19. <style>
  20. /*弹框样式修改*/
  21. .ivu-modal{top: 20px;}
  22. .ivu-modal .ivu-modal-body{padding: 10px;}
  23. .ivu-modal .ivu-modal-body .ivu-modal-confirm-head{padding:0 0 10px 0;}
  24. .ivu-modal .ivu-modal-body .ivu-modal-confirm-footer{display: none;padding-bottom: 10px;}
  25. .ivu-date-picker {display: inline-block;line-height: normal;width: 280px;}
  26. .ivu-modal-footer{display: none;}
  27. .ivu-poptip-popper{text-align: left;}
  28. .ivu-icon{padding-left: 5px;}
  29. .ivu-btn-long{width: 10%;min-width:100px;margin-left: 18%;}
  30. </style>
  31. </head>
  32. <body class="gray-bg">
  33. <div class="wrapper wrapper-content">
  34. <div class="row">
  35. <div class="col-sm-12">
  36. <div class="ibox float-e-margins">
  37. <?php if($config_tab == null): ?>
  38. <div class="ibox-title">
  39. <h5>系统配置</h5>
  40. </div>
  41. <?php else: ?>
  42. <div class="tabs-container ibox-title gray-bg">
  43. <ul class="nav nav-tabs">
  44. <?php if(is_array($config_tab) || $config_tab instanceof \think\Collection || $config_tab instanceof \think\Paginator): $i = 0; $__LIST__ = $config_tab;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
  45. <li <?php if($vo['id'] == $tab_id): ?> class="active" <?php endif; ?>><a href="<?php echo Url('index',array('tab_id'=>$vo['id'],'type'=>$vo['type'],'pid'=>0)); ?>"><i class="fa fa-<?php echo htmlentities($vo['icon']); ?>"></i><?php echo htmlentities($vo['label']); ?></a></li>
  46. <?php endforeach; endif; else: echo "" ;endif; ?>
  47. </ul>
  48. <?php endif; ?>
  49. <div class="ibox-content">
  50. <?php if($children_config_tab != null): ?>
  51. <div class="tabs-container">
  52. <ul class="nav nav-tabs">
  53. <?php if(is_array($children_config_tab) || $children_config_tab instanceof \think\Collection || $children_config_tab instanceof \think\Paginator): $i = 0; $__LIST__ = $children_config_tab;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$voo): $mod = ($i % 2 );++$i;?>
  54. <li <?php if($voo['id'] == $children_tab_id): ?> class="active" <?php endif; ?>><a href="<?php echo Url('index',array('tab_id'=>$voo['pid'],'type'=>$voo['type'],'children_tab_id'=>$voo['id'])); ?>"><i class="fa fa-<?php echo htmlentities($voo['icon']); ?>"></i><?php echo htmlentities($voo['label']); ?></a></li>
  55. <?php endforeach; endif; else: echo "" ;endif; ?>
  56. </ul>
  57. </div>
  58. <?php endif; ?>
  59. <div class="p-m m-t-sm" id="configboay">
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. </body>
  67. <script>
  68. formCreate.formSuccess = function(form,$r){
  69. <?=$form->getSuccessScript()?>
  70. $r.btn.loading(false);
  71. };
  72. (function () {
  73. var create = (function () {
  74. var getRule = function () {
  75. var rule = <?=json_encode($form->getRules())?>;
  76. rule.forEach(function (c) {
  77. if ((c.type == 'cascader' || c.type == 'tree') && Object.prototype.toString.call(c.props.data) == '[object String]') {
  78. if (c.props.data.indexOf('js.') === 0) {
  79. c.props.data = window[c.props.data.replace('js.', '')];
  80. }
  81. }
  82. });
  83. return rule;
  84. }, vm = new Vue,name = 'formBuilderExec<?= !$form->getId() ? '' : '_'.$form->getId() ?>';
  85. var _b = false;
  86. window[name] = function create(el, callback) {
  87. if(_b) return ;
  88. _b = true;
  89. if (!el) el = document.getElementById('configboay');
  90. var $f = formCreate.create(getRule(), {
  91. el: el,
  92. form:<?=json_encode($form->getConfig('form'))?>,
  93. row:<?=json_encode($form->getConfig('row'))?>,
  94. submitBtn:<?=$form->isSubmitBtn() ? '{}' : 'false'?>,
  95. resetBtn:<?=$form->isResetBtn() ? 'true' : '{}'?>,
  96. iframeHelper:true,
  97. global:{
  98. upload: {
  99. props:{
  100. onExceededSize: function (file) {
  101. vm.$Message.error(file.name + '超出指定大小限制');
  102. },
  103. onFormatError: function () {
  104. vm.$Message.error(file.name + '格式验证失败');
  105. },
  106. onError: function (error) {
  107. vm.$Message.error(file.name + '上传失败,(' + error + ')');
  108. },
  109. onSuccess: function (res, file) {
  110. if (res.code == 200) {
  111. file.url = res.data.filePath;
  112. } else {
  113. vm.$Message.error(res.msg);
  114. }
  115. },
  116. },
  117. },
  118. },
  119. //表单提交事件
  120. onSubmit: function (formData) {
  121. $f.btn.loading(true);
  122. $.ajax({
  123. url: '<?=$form->getAction()?>',
  124. type: '<?=$form->getMethod()?>',
  125. dataType: 'json',
  126. data: formData,
  127. success: function (res) {
  128. if (res.code == 200) {
  129. vm.$Message.success(res.msg);
  130. $f.btn.loading(false);
  131. formCreate.formSuccess && formCreate.formSuccess(res, $f, formData);
  132. callback && callback(0, res, $f, formData);
  133. //TODO 表单提交成功!
  134. } else {
  135. vm.$Message.error(res.msg || '表单提交失败');
  136. $f.btn.loading(false);
  137. callback && callback(1, res, $f, formData);
  138. //TODO 表单提交失败
  139. }
  140. },
  141. error: function () {
  142. vm.$Message.error('表单提交失败');
  143. $f.btn.loading(false);
  144. }
  145. });
  146. }
  147. });
  148. return $f;
  149. };
  150. return window[name];
  151. }());
  152. window.$f = create();
  153. })();
  154. </script>
  155. </html>