3efff59657b97bd40e3b16001f333107.php 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. <?php /*a:5:{s:83:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\setting\system_config_tab\sonconfigtab.php";i:1595820902;s:61:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\container.php";i:1595820902;s:62:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_head.php";i:1595820902;s:57:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\style.php";i:1595820902;s:64:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_footer.php";i:1595820902;}*/ ?>
  2. <!DOCTYPE html>
  3. <html lang="zh-CN">
  4. <head>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <?php if(empty($is_layui) || (($is_layui instanceof \think\Collection || $is_layui instanceof \think\Paginator ) && $is_layui->isEmpty())): ?>
  8. <link href="/system/frame/css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
  9. <?php endif; ?>
  10. <link href="/static/plug/layui/css/layui.css" rel="stylesheet">
  11. <link href="/system/css/layui-admin.css" rel="stylesheet">
  12. <link href="/system/frame/css/font-awesome.min.css?v=4.3.0" rel="stylesheet">
  13. <link href="/system/frame/css/animate.min.css" rel="stylesheet">
  14. <link href="/system/frame/css/style.min.css?v=3.0.0" rel="stylesheet">
  15. <script src="/system/frame/js/jquery.min.js"></script>
  16. <script src="/system/frame/js/bootstrap.min.js"></script>
  17. <script src="/static/plug/layui/layui.all.js"></script>
  18. <script>
  19. $eb = parent._mpApi;
  20. window.controlle="<?php echo strtolower(trim(preg_replace("/[A-Z]/", "_\\0", app('request')->controller()), "_"));?>";
  21. window.module="<?php echo app('http')->getName();?>";
  22. </script>
  23. <title></title>
  24. <!--<script type="text/javascript" src="/static/plug/basket.js"></script>-->
  25. <script type="text/javascript" src="/static/plug/requirejs/require.js"></script>
  26. <?php /* <script type="text/javascript" src="/static/plug/requirejs/require-basket-load.js"></script> */ ?>
  27. <script>
  28. var hostname = location.hostname;
  29. if(location.port) hostname += ':' + location.port;
  30. requirejs.config({
  31. map: {
  32. '*': {
  33. 'css': '/static/plug/requirejs/require-css.js'
  34. }
  35. },
  36. shim:{
  37. 'iview':{
  38. deps:['css!iviewcss']
  39. },
  40. 'layer':{
  41. deps:['css!layercss']
  42. }
  43. },
  44. baseUrl:'//'+hostname+'/',
  45. paths: {
  46. 'static':'static',
  47. 'system':'system',
  48. 'vue':'static/plug/vue/dist/vue.min',
  49. 'axios':'static/plug/axios.min',
  50. 'iview':'static/plug/iview/dist/iview.min',
  51. 'iviewcss':'static/plug/iview/dist/styles/iview',
  52. 'lodash':'static/plug/lodash',
  53. 'layer':'static/plug/layer/layer',
  54. 'layercss':'static/plug/layer/theme/default/layer',
  55. 'jquery':'static/plug/jquery/jquery.min',
  56. 'moment':'static/plug/moment',
  57. 'sweetalert':'static/plug/sweetalert2/sweetalert2.all.min',
  58. 'formCreate':'/static/plug/form-create/form-create.min',
  59. },
  60. basket: {
  61. excludes:['system/js/index','system/util/mpVueComponent','system/util/mpVuePackage']
  62. // excludes:['system/util/mpFormBuilder','system/js/index','system/util/mpVueComponent','system/util/mpVuePackage']
  63. }
  64. });
  65. </script>
  66. <script type="text/javascript" src="/system/util/mpFrame.js"></script>
  67. </head>
  68. <body class="gray-bg">
  69. <div class="wrapper wrapper-content">
  70. <div class="row">
  71. <div class="col-sm-12">
  72. <div class="ibox float-e-margins">
  73. <div class="ibox-title">
  74. <button type="button" class="btn btn-w-m btn-primary add-filed">配置分类</button>
  75. <button type="button" class="btn btn-w-m btn-primary add_filed_base">添加配置</button>
  76. </div>
  77. <div class="ibox-content">
  78. <div class="table-responsive">
  79. <table class="table table-striped table-bordered">
  80. <thead>
  81. <tr>
  82. <th>编号</th>
  83. <th>配置名称</th>
  84. <th>字段变量</th>
  85. <th>字段类型</th>
  86. <th>值</th>
  87. <th>是否显示</th>
  88. <th>操作</th>
  89. </tr>
  90. </thead>
  91. <tbody class="">
  92. <?php if(is_array($list) || $list instanceof \think\Collection || $list instanceof \think\Paginator): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
  93. <tr>
  94. <td class="text-center">
  95. <?php echo htmlentities($vo['id']); ?>
  96. </td>
  97. <td class="text-center">
  98. <?php echo htmlentities($vo['info']); ?>
  99. </td>
  100. <td class="text-center">
  101. <?php echo htmlentities($vo['menu_name']); ?>
  102. </td>
  103. <td class="text-center">
  104. <?php echo htmlentities($vo['type']); ?>
  105. </td>
  106. <td class="text-center">
  107. <?php
  108. if($vo['type'] == 'text' || $vo['type'] == 'textarea' || $vo['type'] == 'radio' || $vo['type'] == 'checkbox'){
  109. echo $vo['value'];
  110. }else if($vo['type'] == 'upload'){
  111. if($vo['upload_type'] == 3){
  112. if($vo['value']) {
  113. if(is_array($vo['value'])){
  114. foreach ($vo['value'] as $v){
  115. ?>
  116. <div class="attachment">
  117. <div class="file-box">
  118. <div class="file">
  119. <a href="http://<?php echo $_SERVER['SERVER_NAME'].$v;?>" target="_blank">
  120. <span class="corner"></span>
  121. <div class="icon">
  122. <i class="fa fa-file"></i>
  123. </div>
  124. <div class="file-name">
  125. <?php
  126. //显示带有文件扩展名的文件名
  127. echo basename($v);
  128. ?>
  129. </div>
  130. </a>
  131. </div>
  132. </div>
  133. <div class="clearfix"></div>
  134. </div>
  135. <?php } }else{ ?>
  136. <div class="attachment">
  137. <div class="file-box">
  138. <div class="file">
  139. <a href="http://<?php echo $_SERVER['SERVER_NAME'].$vo['value'];?>" target="_blank">
  140. <span class="corner"></span>
  141. <div class="icon">
  142. <i class="fa fa-file"></i>
  143. </div>
  144. <div class="file-name">
  145. <?php
  146. //显示带有文件扩展名的文件名
  147. echo basename($vo['value']);
  148. ?>
  149. </div>
  150. </a>
  151. </div>
  152. </div>
  153. <div class="clearfix"></div>
  154. </div>
  155. <?php }
  156. }
  157. }else{?>
  158. <div class="attachment">
  159. <?php
  160. if(is_array($vo['value'])){
  161. foreach ($vo['value'] as $v){
  162. ?>
  163. <div class="file-box">
  164. <div class="file">
  165. <span class="corner"></span>
  166. <div class="image" style="cursor: pointer">
  167. <img alt="image" class="img-responsive open_image" data-image="<?php echo htmlentities($v); ?>" src="<?php echo htmlentities($v); ?>">
  168. </div>
  169. <div class="file-name">
  170. <?php
  171. //显示带有文件扩展名的文件名
  172. echo basename($v);
  173. ?>
  174. </div>
  175. </div>
  176. </div>
  177. <?php
  178. }
  179. }else{
  180. ?>
  181. <div class="file-box">
  182. <div class="file">
  183. <span class="corner"></span>
  184. <div class="image" style="cursor: pointer">
  185. <img alt="image" class="img-responsive open_image" data-image="<?php echo htmlentities($vo['value']); ?>" src="<?php echo htmlentities($vo['value']); ?>">
  186. </div>
  187. <div class="file-name">
  188. <?php
  189. //显示带有文件扩展名的文件名
  190. echo basename($vo['value']);
  191. ?>
  192. </div>
  193. </div>
  194. </div>
  195. <?php
  196. }
  197. ?>
  198. <div class="clearfix"></div>
  199. </div>
  200. <?php
  201. }
  202. }
  203. ?>
  204. </td>
  205. <td class="text-center">
  206. <?php if($vo['status'] == 1): ?>
  207. <i class="fa fa-check text-navy"></i>
  208. <?php elseif($vo['status'] == 2): ?>
  209. <i class="fa fa-close text-danger"></i>
  210. <?php endif; ?>
  211. </td>
  212. <td class="text-center">
  213. <button class="btn btn-info btn-xs" type="button" onclick="$eb.createModalFrame('编辑','<?php echo Url('setting.system_config/edit_config',array('id'=>$vo['id'])); ?>')"><i class="fa fa-edit"></i> 编辑</button>
  214. <button class="btn btn-danger btn-xs del_config_tab" data-id="<?php echo htmlentities($vo['id']); ?>" type="button" data-url="<?php echo Url('setting.system_config/delete_config',array('id'=>$vo['id'])); ?>" ><i class="fa fa-times"></i> 删除
  215. </button>
  216. </td>
  217. </tr>
  218. <?php endforeach; endif; else: echo "" ;endif; ?>
  219. </tbody>
  220. </table>
  221. </div>
  222. </div>
  223. </div>
  224. </div>
  225. </div>
  226. <script>
  227. $('.add-filed').on('click',function (e) {
  228. window.location.replace("<?php echo Url('index'); ?>");
  229. })
  230. $('.open_image').on('click',function (e) {
  231. var image = $(this).data('image');
  232. $eb.openImage(image);
  233. })
  234. $('.del_config_tab').on('click',function(){
  235. var _this = $(this),url =_this.data('url');
  236. $eb.$swal('delete',function(){
  237. $eb.axios.get(url).then(function(res){
  238. if(res.status == 200 && res.data.code == 200) {
  239. $eb.$swal('success',res.data.msg);
  240. _this.parents('tr').remove();
  241. }else
  242. return Promise.reject(res.data.msg || '删除失败')
  243. }).catch(function(err){
  244. $eb.$swal('error',err);
  245. });
  246. })
  247. });
  248. $('.add_filed_base').on('click',function (e) {
  249. $eb.createModalFrame('添加配置字段',"<?php echo Url('setting.systemConfig/create',['tab_id'=>app('request')->param('tab_id'),'type'=>0]); ?>");
  250. // $eb.swal({
  251. // title: '请选择数据类型',
  252. // input: 'radio',
  253. // inputOptions: ['文本框','多行文本框','单选框','文件上传','多选框'],
  254. // inputValidator: function(result) {
  255. // return new Promise(function(resolve, reject) {
  256. // if (result) {
  257. // resolve();
  258. // } else {
  259. // reject('请选择数据类型');
  260. // }
  261. // });
  262. // }
  263. // }).then(function(result) {
  264. // if (result) {
  265. // $eb.createModalFrame(this.innerText,"<?php echo Url('setting.systemConfig/create',array('tab_id'=>app('request')->param('tab_id'))); ?>?type="+result);
  266. // }
  267. // })
  268. })
  269. </script>
  270. </div>
  271. </body>
  272. </html>