Sin descripción
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.htm 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  1. {include file="public/layout" /}
  2. <body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit;">
  3. <div id="append_parent"></div>
  4. <div id="ajaxwaitid"></div>
  5. <div class="page" style="box-shadow:none;">
  6. {include file="article/bar" /}
  7. <div class="flexigrid" style="min-height: 600px;">
  8. <div class="mDiv">
  9. <div class="ftitle">
  10. {include file="archives/tags_btn" /}
  11. </div>
  12. <form class="navbar-form form-inline" id="searchForm" action="{:url('Article/index')}" method="get" onsubmit="layer_loading('正在处理');">
  13. {$searchform.hidden|default=''}
  14. <div class="sDiv">
  15. {include file="archives/flag_btn" /}
  16. <div class="sDiv2">
  17. <input type="hidden" name="typeid" id="typeid" value="{$Request.param.typeid|default=''}">
  18. <input type="text" size="30" name="keywords" value="{$Request.param.keywords}" class="qsbox" placeholder="标题搜索...">
  19. <input type="submit" class="btn" value="搜索">
  20. <i class="iconfont e-sousuo"></i>
  21. </div>
  22. </div>
  23. </form>
  24. </div>
  25. <div class="hDiv">
  26. <div class="hDivBox">
  27. <table cellspacing="0" cellpadding="0" style="width: 100%">
  28. <thead>
  29. <tr>
  30. <th class="sign w40" axis="col0">
  31. <div class="tc"><input type="checkbox" class="checkAll" autocomplete="off"></div>
  32. </th>
  33. <th abbr="article_title" axis="col3" class="w70">
  34. <div class="tc">ID</div>
  35. </th>
  36. <th abbr="article_title" axis="col3" class="">
  37. <div style="text-align: left; padding-left: 10px;" class="">标题</div>
  38. </th>
  39. <!-- <th abbr="article_time" axis="col6" class="w120">
  40. <div class="tc">付费限制</div>
  41. </th> -->
  42. <th abbr="article_time" axis="col6" class="w120">
  43. <div class="tc">所属栏目</div>
  44. </th>
  45. <th abbr="article_time" axis="col6" class="w50">
  46. <div class="tc sort_style"><a href="{:getArchivesSortUrl('arcrank')}">审核&nbsp;<i {eq name='$Request.param.orderby' value='arcrank'}{eq name='$Request.param.orderway' value='asc'}class="asc"{else /}class="desc"{/eq}{/eq}></i></a></div>
  47. </th>
  48. <th abbr="article_time" axis="col6" class="w60">
  49. <div class="tc">点击</div>
  50. </th>
  51. <th abbr="article_time" axis="col6" class="w100">
  52. <div class="tc">发布时间</div>
  53. </th>
  54. <th axis="col1" class="w160">
  55. <div class="tc">操作</div>
  56. </th>
  57. <th abbr="article_time" axis="col6" class="w60">
  58. <div class="tc sort_style"><a href="{:getArchivesSortUrl('sort_order')}">排序&nbsp;<i {eq name='$Request.param.orderby' value='sort_order'}{eq name='$Request.param.orderway' value='asc'}class="asc"{else /}class="desc"{/eq}{/eq}></i></a></div>
  59. </th>
  60. </tr>
  61. </thead>
  62. </table>
  63. </div>
  64. </div>
  65. <div class="bDiv" style="height: auto;">
  66. <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
  67. <table style="width: 100%;">
  68. <tbody>
  69. {empty name="list"}
  70. <tr>
  71. <td class="no-data" align="center" axis="col0" colspan="50">
  72. <div class="no_row">
  73. <div class="no_pic"><img src="__SKIN__/images/null-data.png"></div>
  74. </div>
  75. </td>
  76. </tr>
  77. {else/}
  78. {foreach name="list" item="vo" key="k" }
  79. <tr>
  80. <td class="sign">
  81. <div class="tc w40"><input type="checkbox" name="ids[]" value="{$vo.aid}" autocomplete="off"></div>
  82. </td>
  83. <td class="sort">
  84. <div class="tc w70">
  85. {$vo.aid}
  86. </div>
  87. </td>
  88. <td class="" style="width: 100%;">
  89. <div class="tl" style="padding-left: 10px;">
  90. {notempty name="$vo.is_litpic"}
  91. <i class="fa fa-picture-o color_z" onmouseover="layer_tips=layer.tips('<img src={$vo.litpic} class=\'layer_tips_img\'>',this,{tips: [3, '#fff'],skin:'layer-yourskin-mt0'});" onmouseout="layer.close(layer_tips);"></i>
  92. {/notempty}
  93. {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}
  94. <a href="{:url('Article/edit',array('id'=>$vo['aid'], 'callback_url'=>$callback_url))}" style="{eq name="vo.is_b" value="1"} font-weight: bold;{/eq}">{$vo.title}</a>
  95. {else /}
  96. {$vo.title}
  97. {/eq}
  98. {assign name='showArcFlagData' value='$vo|showArchivesFlagStr'}
  99. {volist name='$showArcFlagData' id="vo1"}
  100. {eq name='$i' value='1'}<span style="color: red;">[{/eq}
  101. <i style="font-size: 12px;">{$vo1['small_name']}</i>
  102. {eq name='$i' value='$showArcFlagData|count'}]</span>{/eq}
  103. {/volist}
  104. </div>
  105. </td>
  106. <!-- <td class="">
  107. <div class="w120 tc">
  108. <span style="display: block;">{$vo.restric_type_text}</span>
  109. {if condition="1 == $vo.restric_type"}
  110. <span class="red">¥{$vo.users_price}</span>
  111. {elseif condition="2 == $vo.restric_type"}
  112. <span class="red">{$vo.arc_level_name}{if condition="!empty($vo.no_vip_pay) && !empty($vo.users_price)" }(非会员: ¥{$vo.users_price}){/if}</span>
  113. {elseif condition="3 == $vo.restric_type"}
  114. <span class="red">{$vo.arc_level_name}(¥{$vo.users_price})</span>
  115. {/if}
  116. </div>
  117. </td> -->
  118. <td class="">
  119. <div class="w120 tc ellipsis"><a href="{:url('Article/index', array('typeid'=>$vo['typeid'], 'tab'=>3))}" title="{$vo.typename}">{$vo.typename|default='<i class="red">数据出错!</i>'}</a></div>
  120. </td>
  121. <td>
  122. <div class="tc w50">
  123. {if condition="$vo['arcrank'] eq -1"}
  124. <span class="no" {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"} data-typeid="{$vo.typeid}" data-seo_pseudo="{$seo_pseudo|default='1'}" onclick="changeTableVal('archives','aid','{$vo.aid}','arcrank',this);" {/eq} ><i class="fa fa-ban"></i>否</span>
  125. {else /}
  126. <span class="yes" {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"} data-typeid="{$vo.typeid}" data-seo_pseudo="{$seo_pseudo|default='1'}" onclick="changeTableVal('archives','aid','{$vo.aid}','arcrank',this);" {/eq} ><i class="fa fa-check-circle"></i>是</span>
  127. {/if}
  128. </div>
  129. </td>
  130. <td>
  131. <div class="tc w60">
  132. {$vo.click}
  133. </div>
  134. </td>
  135. <td>
  136. <div class="w100 tc">
  137. {$vo.add_time|date='Y-m-d',###}
  138. </div>
  139. </td>
  140. <td class="operation">
  141. <div class="w160 tc">
  142. {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}
  143. <a href="{:url('Article/edit',array('id'=>$vo['aid'], 'callback_url'=>$callback_url))}" class="btn blue">编辑</a>
  144. <i></i>
  145. {/eq}
  146. {eq name="$Think.const.CONTROLLER_NAME.'@del'|is_check_access" value="1"}
  147. <a class="btn red" href="javascript:void(0);" data-url="{:url('Article/del')}" data-id="{$vo.aid}" {eq name="$global['web_recycle_switch']" value='1'} data-deltype="del" {else /} data-deltype="pseudo" {/eq} onClick="delfun(this);">删除</a>
  148. <i></i>
  149. {/eq}
  150. <a href="{$vo.arcurl}" target="_blank" class="btn blue">浏览</a>
  151. </div>
  152. </td>
  153. <td class="sort">
  154. <div class="w60 tc">
  155. {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}
  156. <input type="text" onkeyup="this.value=this.value.replace(/[^\d]/g,'');" onpaste="this.value=this.value.replace(/[^\d]/g,'')" onchange="changeTableVal('archives','aid','{$vo.aid}','sort_order',this);" size="4" value="{$vo.sort_order}" />
  157. {else /}
  158. {$vo.sort_order}
  159. {/eq}
  160. </div>
  161. </td>
  162. </tr>
  163. {/foreach}
  164. {/empty}
  165. </tbody>
  166. </table>
  167. </div>
  168. <div class="iDiv" style="display: none;"></div>
  169. </div>
  170. {notempty name="list"}
  171. <div class="footer-oper">
  172. <span class="ml15">
  173. <input type="checkbox" class="checkAll" autocomplete="off">
  174. </span>
  175. <div class="nav-dropup">
  176. <button class="layui-btn layui-btn-primary dropdown-bt">批量操作<i class="layui-icon layui-icon-up"></i></button>
  177. <div class="dropdown-menus" style="display:none; {if condition='0 < $pager->totalRows && ($pager->totalRows < 4 || $pager->listRows < 4)'}top:28px;bottom:unset;border-bottom:1px solid rgba(0,0,0,.15);border-top:none;min-height: 250px;{/if}">
  178. {eq name="'Archives@batch_attr'|is_check_access" value="1"}
  179. <a href="javascript:void(0);" onclick="batch_attr(this, 'ids', '批量新增属性');" data-url="{:url('Archives/batch_attr', ['opt'=>'add'])}">新增属性</a>
  180. <a href="javascript:void(0);" onclick="batch_attr(this, 'ids', '批量删除属性');" data-url="{:url('Archives/batch_attr', ['opt'=>'del'])}">删除属性</a>
  181. <hr class="layui-bg-gray">
  182. {/eq}
  183. {eq name="'Archives@batch_copy'|is_check_access" value="1"}
  184. <a href="javascript:void(0);" onclick="func_batch_copy(this, 'ids');" data-url="{:url('Archives/batch_copy', array('typeid'=>$Request.param.typeid))}">复制文档</a>
  185. {/eq}
  186. {eq name="'Archives@move'|is_check_access" value="1"}
  187. <a href="javascript:void(0);" onclick="func_move(this, 'ids');" data-url="{:url('Archives/move', array('typeid'=>$Request.param.typeid))}">移动文档</a>
  188. {/eq}
  189. {eq name="$Think.const.CONTROLLER_NAME.'@del'|is_check_access" value="1"}
  190. <a href="javascript:void(0);" onclick="batch_del(this, 'ids');" data-url="{:url('Article/del')}" {eq name="$global['web_recycle_switch']" value='1'} data-deltype="del" {else /} data-deltype="pseudo" {/eq}>删除文档</a>
  191. {/eq}
  192. {eq name="'Archives@check'|is_check_access" value="1"}
  193. <hr class="layui-bg-gray">
  194. <a href="javascript:void(0);" onclick="batch_check(this, 'ids');" data-url="{:url('Archives/check')}">审核文档</a>
  195. <a href="javascript:void(0);" onclick="batch_check(this, 'ids');" data-url="{:url('Archives/uncheck')}">取消审核</a>
  196. {/eq}
  197. </div>
  198. </div>
  199. {eq name="'RecycleBin@archives_index'|is_check_access" value="1"}
  200. {neq name="$global['web_recycle_switch']" value='1'}<a href="{:url('RecycleBin/archives_index')}" class="layui-btn layui-btn-primary" title="回收站">回收站</a>{/neq}
  201. {/eq}
  202. {include file="public/page" /}
  203. </div>
  204. {/notempty}
  205. </div>
  206. </div>
  207. <script type="text/javascript">
  208. $(function(){
  209. $('input[name*=ids]').click(function(){
  210. if ($('input[name*=ids]').length == $('input[name*=ids]:checked').length) {
  211. $('.checkAll').prop('checked','checked');
  212. } else {
  213. $('.checkAll').prop('checked', false);
  214. }
  215. });
  216. $('input[type=checkbox].checkAll').click(function(){
  217. $('input[type=checkbox]').prop('checked',this.checked);
  218. });
  219. });
  220. $(document).ready(function(){
  221. // 表格行点击选中切换
  222. $('#flexigrid > table>tbody >tr').click(function(){
  223. $(this).toggleClass('trSelected');
  224. });
  225. // 点击刷新数据
  226. $('.fa-refresh').click(function(){
  227. location.href = location.href;
  228. });
  229. // 批量操作
  230. $(".dropdown-bt").click(function(){
  231. $(".dropdown-menus").slideToggle(200);
  232. event.stopPropagation();
  233. })
  234. $(document).click(function(){
  235. $(".dropdown-menus").slideUp(200);
  236. event.stopPropagation();
  237. })
  238. });
  239. var aids = '';
  240. function func_move(obj, name)
  241. {
  242. var a = [];
  243. var k = 0;
  244. aids = '';
  245. $('input[name^='+name+']').each(function(i,o){
  246. if($(o).is(':checked')){
  247. a.push($(o).val());
  248. if (k > 0) {
  249. aids += ',';
  250. }
  251. aids += $(o).val();
  252. k++;
  253. }
  254. })
  255. if(a.length == 0){
  256. layer.alert('请至少选择一项', {
  257. shade: layer_shade,
  258. area: ['480px', '190px'],
  259. move: false,
  260. title: '提示',
  261. btnAlign:'r',
  262. closeBtn: 3,
  263. success: function () {
  264. $(".layui-layer-content").css('text-align', 'left');
  265. }
  266. });
  267. return;
  268. }
  269. var url = $(obj).attr('data-url');
  270. //iframe窗
  271. layer.open({
  272. type: 2,
  273. title: '移动文档',
  274. fixed: true, //不固定
  275. shadeClose: false,
  276. shade: layer_shade,
  277. maxmin: false, //开启最大化最小化按钮
  278. area: ['480px', '360px'],
  279. content: url
  280. });
  281. }
  282. /**
  283. * 批量审核
  284. */
  285. function batch_check(obj, name) {
  286. var url = $(obj).attr('data-url');
  287. var a = [];
  288. $('input[name^='+name+']').each(function(i,o){
  289. if($(o).is(':checked')){
  290. a.push($(o).val());
  291. }
  292. })
  293. if(a.length == 0){
  294. layer.alert('请至少选择一项', {
  295. shade: layer_shade,
  296. area: ['480px', '190px'],
  297. move: false,
  298. title: '提示',
  299. btnAlign:'r',
  300. closeBtn: 3,
  301. success: function () {
  302. $(".layui-layer-content").css('text-align', 'left');
  303. }
  304. });
  305. return;
  306. }
  307. // title = '批量审核';
  308. // btn = ['确定', '取消']; //按钮
  309. // // 删除按钮
  310. // layer.confirm(title, {
  311. // title: false,
  312. // btn: btn //按钮
  313. // }, function () {
  314. layer_loading('正在处理');
  315. $.ajax({
  316. type: "POST",
  317. url: url,
  318. data: {ids:a, _ajax:1},
  319. dataType: 'json',
  320. success: function (data) {
  321. layer.closeAll();
  322. if(data.code == 1){
  323. layer.msg(data.msg, {icon: 1});
  324. window.location.reload();
  325. }else{
  326. layer.alert(data.msg, {icon: 2, title:false});
  327. }
  328. },
  329. error:function(e){
  330. layer.closeAll();
  331. layer.alert(e.responseText, {icon: 2, title:false});
  332. }
  333. });
  334. // }, function (index) {
  335. // layer.closeAll(index);
  336. // });
  337. }
  338. /**
  339. * 获取修改之前的内容
  340. */
  341. function get_aids()
  342. {
  343. return aids;
  344. }
  345. </script>
  346. {include file="public/footer" /}