floder_list.html 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741
  1. {extend name="public/layout" /} {block name="title"}作品管理{/block} {block name="head"} {include file="public/head"}
  2. <link rel="stylesheet" href="__STATIC__/css/csspc.css">
  3. <style>
  4. html,body{min-width:1210px;}
  5. .layui-fluid{min-height: calc(100vh - 30px);margin:15px;display: block; box-shadow: 0 0 4px 0 #B6CADE; border-radius: 5px; background-color: #ffffff;}
  6. .layui-card{box-shadow:none;padding:10px;}
  7. .works{border-bottom: 1px solid #ccc;}
  8. .works_title{border:0;border-bottom: 1px solid #f6f6f6;}
  9. .layui-tab-title .layui-this {color: #249EFB;}
  10. .layui-tab-title .layui-this:after{border:0;border-bottom: 4px solid #249EFB;position: absolute;top:-1px;left:0;}
  11. .layui-form-select{width:17%;margin:10px 1%;height: 38px;float:right;}
  12. .folder_name{border:1px solid #e6e6e6;width:100%;height: 100%;}
  13. .border_s{border:1px solid #249EFB;width:120px;border-radius: 4px;color: #249EFB;}
  14. .bor_b{border-bottom: 1px solid #f6f6f6;padding-bottom: 10px;height: 68px;}
  15. .folder_ul li{float:left;width:13.285%;height: 173px;overflow: hidden;box-sizing: border-box;margin:40px 0.5% 0;min-width: 212px;}
  16. .bgD7D7D7{background: #D7D7D7;}
  17. .folder_top{border-radius:30px 30px 0 0;height:40px;}
  18. .folder_bottom{height: 173px;width:212px;}
  19. .folder_text{bottom:0;left:0;height: 60px;}
  20. .folder_ps_t{position:absolute;bottom:0;left:-3.5%;overflow: hidden;width:107%;padding:5px 0;}
  21. .folder_li_01 .folder_b{bottom:4px;left:5%;border-radius: 0 0 11px 11px;width:89.5%;display: none;border-top: 54px solid #dadada;border-left: 3px solid transparent;border-right:3px solid transparent;}
  22. .folder_bor_b{background: #fff;}
  23. .folder_ul li:hover .folder_b{display: block;}
  24. .editor_del{position:absolute;bottom:0;left:10%;}
  25. .editor_del span{display:block;width:50%;float:left;line-height: 46px;text-align: center;cursor: pointer;}
  26. .bolder_img_box{height: 117px;}
  27. .bolder_img{height:100%;overflow: hidden;}
  28. .bolder_click{top:3%;left:3%;}
  29. .folder_div_02{border:1px solid #f2f2f2;border-radius: 10px;overflow: hidden;}
  30. .folder_div_02s{border:1px solid #f2f2f2;border-radius: 10px;overflow: hidden;box-shadow: 0px 0px 4px 3px #f5f5f5;}
  31. .bolder_text_box{height:50px;display: flex;}
  32. .deleteIcon{width:100%;top:0;left:0;height: 50px;background: #fff;display: none;}
  33. .del_img{width:40px;height: 23px;cursor: pointer;right: -100px;}
  34. .checkbtn{right:5px;top:5px;width:30px;height: 30px;z-index: 5;display: none;}
  35. .add_check .checkbtn{display: block;}
  36. .add_check:hover .folder_b{display: none !important;}
  37. .mobile_del{width:220px;margin-right:1%;display: none;}
  38. .mobile_del a{display: block;width:100px;height: 42px;border:1px solid #e6e6e6;cursor: pointer;border-radius: 4px;}
  39. .hongse{color:#D9001B;}
  40. .search_ico{width:40px;position: absolute;right:0;top:0;cursor: pointer;}
  41. .h36{height: 36px;}
  42. .color249EFB {color: #249EFB;}
  43. .ml5 {margin-left: 5px;}
  44. .pt5 {padding-top: 5px;}
  45. .fontW700 {font-weight: 700;}
  46. .color999 {color: #999;}
  47. .folder_ul {padding: 10px 0px;}
  48. .preview {position: absolute;left: 50px;top:50%;bottom: 0px;transform: translateY(-50%);color: #249EFB;font-weight: 600;cursor: pointer;}
  49. .page_down{ position: absolute;bottom: 0;}
  50. .layui-form-switch {margin-top: 0px;height: auto !important;}
  51. .switchBox {
  52. width: 150px;
  53. display: flex;
  54. align-items: center;
  55. padding: 0px;
  56. position: absolute;
  57. top: 30px;
  58. right: 0px;
  59. }
  60. .switchBox > div {
  61. margin-right: 5px;
  62. }
  63. .headimg{width:32px;height: 32px;border-radius: 50%;border:1px solid #fff;overflow: hidden;right:5%;bottom:2%;position: absolute;}
  64. </style>
  65. {/block} {block name="body"}
  66. <body>
  67. <div class="layui-fluid">
  68. <div class="layui-card">
  69. <!-- <p class="font25 pdb10 textb works">作品</p> -->
  70. <div class="layui-tab relative">
  71. <ul class="layui-tab-title works_title">
  72. <li data-index="1" class="layui-this">全部</li>
  73. <li data-index="2" class="">提交记录</li>
  74. </ul>
  75. <div class="switchBox layui-form layui-hide">
  76. <div>审核开关</div>
  77. <input type="checkbox" lay-skin="switch" lay-filter="switchElement" {if condition="$switch eq 1" }
  78. checked {/if} lay-text="开启|关闭">
  79. </div>
  80. <div class="layui-tab-content pd0 mdtb10" style="padding: 0;">
  81. <div class="layui-tab-item layui-show">
  82. <div class="lh60 layui-form bor_b">
  83. <p class="wleft font18">全部作品<span class="font16 color249EFB ml5">(共{$group_count}个作品)</span></p>
  84. <div class="wpsr width17_ mdt11 wright h36 search_btn">
  85. <input type="text" placeholder="请输入作品名称" name="name" id="name" class="ds folder_name">
  86. <div class="height100_ search_ico">
  87. <img class="wpsa width70_ wpsauto" src="__STATIC__/img/searchmail.png" alt="">
  88. </div>
  89. </div>
  90. <select name="employee" id="employee" lay-filter="employee_select" lay-search>
  91. <option value="">全体成员</option>
  92. </select>
  93. <select name="org" id="org" lay-filter="org_select" lay-search>
  94. <option value="">按部门筛选</option>
  95. </select>
  96. </div>
  97. <div class="clear"></div>
  98. <div class="mdt15 woverflow">
  99. <p class="font14 textc lh40 border_s batchbtn href wright">批量管理</p>
  100. <div class="wright woverflow mobile_del">
  101. <a class="wleft textc lh40 color249EFB" id="mobile_btn">移动</a>
  102. <a class="hongse wright textc lh40" id="del_all">删除</a>
  103. </div>
  104. <p class="font14 textc lh40 mdr01_ border_s addbolder href wright">+创建文件夹</p>
  105. </div>
  106. <div class="">
  107. <ul class="woverflow folder_ul">
  108. </ul>
  109. </div>
  110. <div id="pages" class="page_down"></div>
  111. </div>
  112. <div class="layui-tab-item">
  113. <table lay-filter="management" id="management"></table>
  114. </div>
  115. </div>
  116. </div>
  117. </div>
  118. </div>
  119. </body>
  120. {/block} {block name="js"}
  121. <script type="text/html" id="employee_name">
  122. {{# if(d.name){ }}
  123. <span>{{d.name}}</span>
  124. {{# }else{ }}
  125. <span style="color: #cccccc;">无</span>
  126. {{# } }}
  127. </script>
  128. <script type="text/html" id="status">
  129. <span>待审核</span>
  130. </script>
  131. <script type="text/html" id="title">
  132. {{# if(d.title){ }}
  133. <span>{{d.title}}</span>
  134. {{# }else{ }}
  135. <span style="color: #cccccc;">未命名作品</span>
  136. {{# } }}
  137. </script>
  138. <script type="text/html" id="table-train-action">
  139. <a class="layui-btn layui-btn-xs" lay-event="preview">预览</a>
  140. {{# if(d.status == 1){ }}
  141. <a class="layui-btn layui-btn-xs" lay-event="laypass">通过</a>
  142. <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="layreject">驳回</a>
  143. {{# }else if(d.status == 2){ }}
  144. {{# }else if(d.status == -1){ }}
  145. {{# } }}
  146. </script>
  147. <script type="text/html" id="addtimetpl">
  148. {{# if(d.status == 1){ }}
  149. <span>待审核</span>
  150. {{# }else{ }}
  151. <span>{{d.review_time}}</span>
  152. {{# } }}
  153. </script>
  154. <script type="text/html" id="headimgurl">
  155. {{# if(d.headimgurl){ }}
  156. <img src="{{d.headimgurl}}" style="width: 30px;height: 30px;">
  157. {{# }else{ }}
  158. <span style="color: #cccccc;">无</span>
  159. {{# } }}
  160. </script>
  161. <script>
  162. var orgids_str = '{:$orgids}';
  163. var orgids = JSON.parse(orgids_str);
  164. var org = eval('{$org|raw}');
  165. layui.config({
  166. base: '__LAYUI__/',
  167. urlbase: '/sys'
  168. }).extend({
  169. index: 'lib/index' //主入口模块
  170. }).use(['index','form','table', 'element','laypage'], function () {
  171. var form = layui.form,
  172. upload = layui.upload,
  173. table = layui.table,
  174. laypage = layui.laypage,
  175. datass = {},
  176. page = 1,
  177. limit=21,
  178. datass = {
  179. name: '',
  180. page:page,
  181. limit:limit
  182. },
  183. $ = layui.jquery;
  184. $('#org').append(setOrgOption(org, ''));
  185. form.render('select')
  186. form.on('select(org_select)', function (data) {
  187. var val = data.value;
  188. requestEmployee(val);
  189. });
  190. $('.search_ico').click(function(){
  191. var orgids = $("#org").val();
  192. var empid = $("#employee").val();
  193. var keyname = $("#name").val();
  194. datass.org_id = orgids;
  195. datass.employee_id = empid;
  196. datass.keyname = keyname;
  197. console.log(datass);
  198. getList(datass);
  199. })
  200. $('.works_title li').click(function() {
  201. let index = $(this).prop('dataset').index;
  202. if (index == 2) {
  203. //执行重载
  204. table.reload('management', {});
  205. $(".switchBox").removeClass('layui-hide')
  206. } else {
  207. $(".switchBox").addClass('layui-hide')
  208. }
  209. })
  210. $('.addbolder').click(function () {
  211. layer.prompt(function (val, index) {
  212. //layer.msg('得到了' + val);
  213. $.ajax({
  214. type: "post",
  215. url: '{:url("VrManage/make_floder")}',
  216. data: {
  217. name: val
  218. },
  219. success: function (res) {
  220. if (res.code == 0) {
  221. layer.msg(res.msg);
  222. layer.close(index);
  223. getList(datass);
  224. } else {
  225. layer.msg(res.msg)
  226. }
  227. }
  228. });
  229. //layer.close(index);
  230. });
  231. })
  232. window.imgarr = function(){
  233. var arrs = new Array();
  234. $("input[name='like']:checked").each(function(i){
  235. arrs[i] = $(this).data('id');
  236. });
  237. return arrs.join(",")
  238. }
  239. //批量删除
  240. $('#del_all').click(function(){
  241. var arrs = new Array();
  242. var fid = null;
  243. $("input[name='like']:checked").each(function(i){
  244. arrs[i] = $(this).data('id');
  245. fid = $(this).data('fid');
  246. });
  247. if(arrs.length == 0){
  248. layer.msg('请选择作品');
  249. return false;
  250. }
  251. layer.confirm('确定删除当前作品', {
  252. title: ['删除', 'color:#333333;background-color:#D8E6F1;'],
  253. end: function () {
  254. //cIndex = 0;
  255. }
  256. }, function (index) {
  257. $.ajax({
  258. url: "{:url('VrManage/del_group')}",
  259. data: {
  260. id: arrs.join(","),
  261. fid:fid
  262. },
  263. type: 'post',
  264. success: function (res) {
  265. if (res.code == 0) {
  266. layer.msg('删除成功')
  267. getList(datass);
  268. } else {
  269. layer.msg(res.msg)
  270. }
  271. }
  272. });
  273. });
  274. })
  275. function setOrgOption(opt, sj) {
  276. var html = '';
  277. opt.forEach(element => {
  278. if (orgids.length > 0) {
  279. if (in_array(element.id, orgids)) {
  280. html += '<option value="' + element.id + '">' + sj + element.title + '</option>';
  281. }
  282. }
  283. if (element && element.children.length > 0) html += setOrgOption(element.children, sj + '-');
  284. });
  285. return html;
  286. }
  287. function in_array(search, array) {
  288. for (var i in array) {
  289. if (array[i] == search) {
  290. return true;
  291. }
  292. }
  293. return false;
  294. }
  295. requestEmployee('');
  296. function requestEmployee(val) {
  297. $.ajax({
  298. url: '{:url("org/employee")}'
  299. , data: { org:val,limit:10000}
  300. , type: 'get'
  301. , success: function (res) {
  302. if (res.code == 0) {
  303. $('#employee').html('<option value="">请选择</option>');
  304. res.data.forEach(element => {
  305. $('#employee').append('<option value="' + element.id + '">' + element.name + '</option>');
  306. });
  307. form.render('select')
  308. }
  309. }
  310. });
  311. }
  312. $('.batchbtn').click(function(){
  313. if($(this).hasClass('cancelbtn')){
  314. $(this).html('批量管理');
  315. $(this).removeClass('cancelbtn');
  316. $('.folder_li_02').removeClass('add_check');
  317. $('.mobile_del').hide();
  318. $('.addbolder').show();
  319. }else{
  320. $(this).html('取消');
  321. $(this).addClass('cancelbtn');
  322. $('.folder_li_02').addClass('add_check');
  323. $('.addbolder').hide();
  324. $('.mobile_del').show();
  325. }
  326. })
  327. $('#mobile_btn').click(function () {
  328. var arrs = new Array();
  329. $("input[name='like']:checked").each(function(i){
  330. arrs[i] = $(this).data('id');
  331. });
  332. if(arrs.length == 0){
  333. layer.msg('请选择作品');
  334. return false;
  335. }
  336. layer.open({
  337. type: 2,
  338. title: ['批量移动', 'color:#333333;background-color:#D8E6F1;'],
  339. content: '{:url("vrManage/batch_mobile")}',
  340. resize: false,
  341. area: ['80%', '80%'],
  342. btn: ['确定', '取消'],
  343. btn1: function () {
  344. var ids = window.submits();
  345. //console.log(id);
  346. //return false;
  347. $.ajax({
  348. type: "post",
  349. url: '{:url("VrManage/moveto_floder")}',
  350. data: {
  351. floder_id: ids[0],
  352. group_ids: ids[1]
  353. },
  354. success: function (res) {
  355. if (res.code == 0) {
  356. layer.msg(res.msg);
  357. layer.closeAll();
  358. getList(datass);
  359. //layer.close(index);
  360. } else {
  361. layer.msg(res.msg)
  362. }
  363. }
  364. });
  365. console.log(id)
  366. }
  367. });
  368. })
  369. getList(datass);
  370. //调数据
  371. function getList(datass) {
  372. var url = '{:url("VrManage/floder_list")}';
  373. $.ajax({
  374. url: url,
  375. type: 'post',
  376. dataType: 'json',
  377. data: datass,
  378. success: function (res) {
  379. if (res.code == 0) {
  380. setListHtml(res.data);
  381. if (res.data.length == 0) {
  382. $('.building_list_ul' + t).append('<img class="noneimgs" src="__STATIC__/img/nonedata.png"/>');
  383. }else{
  384. pages('pages',datass, res.count);
  385. // if(t==''){
  386. // pages('pages',datass, res.count);
  387. // }else{
  388. // pages('mobelepage',datass, res.count);
  389. // }
  390. }
  391. }
  392. }
  393. });
  394. }
  395. //分页样式
  396. function pages(objname,where,count) {
  397. laypage.render({
  398. elem: objname
  399. , count: count
  400. , curr: where.page
  401. , limit: where.limit
  402. ,limits: [21,10,20,30,40,50]
  403. , prev:'<i class="layui-icon layui-icon-left"></i>'
  404. , next:'<i class="layui-icon layui-icon-right"></i>'
  405. , layout: ['prev', 'page', 'next' , 'skip','count','limit']
  406. , jump: function (obj, first) {
  407. limit = obj.limit;
  408. where.page = obj.curr;
  409. where.limit = obj.limit;
  410. if (!first) {
  411. $('.building_list_ul').animate({scrollTop:0}, 0);
  412. if(objname == 'pages'){
  413. getList(where);
  414. }
  415. if(objname == 'mobelepage'){
  416. getList(where,'s');
  417. }
  418. }
  419. }
  420. });
  421. }
  422. function setListHtml(arr) {
  423. let htmls = arr.floder_list.map((u, x) => {
  424. return `<li class="folder_li_01">
  425. <div class="width100_ wauto">
  426. <a href="floder_child.html?id=${u.id}">
  427. <div class="width50_ bgD7D7D7 pdt10 wpsr woverflow dsnone folder_top">
  428. <div class="wleft mdt01 mdl20 pt5">
  429. <svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="15px" height="13px" xmlns="http://www.w3.org/2000/svg">
  430. <g transform="matrix(1 0 0 1 -328 -494 )">
  431. <path d="M 12.816339066339067 0.009226401703336107 C 14.358108108108109 0.05843387745445816 15.082923832923832 1.061036195883606 14.99078624078624 3.0170333569907744 C 14.92936117936118 4.4686538916489225 13.90970515970516 6.470783061272769 11.931818181818182 9.023420865862313 C 9.886363636363637 11.674473621954105 8.160319410319412 13 6.753685503685504 13 C 5.881449631449632 13 5.144348894348894 12.191152117340904 4.542383292383293 10.57345635202271 C 4.272113022113023 9.589306837000235 3.8667076167076173 8.106931629997632 3.326167076167076 6.126330731014903 C 2.883906633906634 4.514785900165601 2.4017199017199022 3.70901348474095 1.8796068796068797 3.70901348474095 C 1.769041769041769 3.70901348474095 1.378992628992629 3.9427489945587872 0.7094594594594595 4.410220014194464 L 0 3.506032647267566 C 0.14742014742014742 3.3768630234208663 0.47911547911547914 3.0800804352969005 0.9950859950859949 2.6156848828956707 C 1.511056511056511 2.15128933049444 1.9103194103194108 1.796072864916014 2.1928746928746925 1.550035486160398 C 3.151105651105651 0.7012065294535138 3.891277641277642 0.25218831322450774 4.413390663390663 0.2029808374733857 C 4.996928746928748 0.1476224272533705 5.4668304668304675 0.31831085876508125 5.823095823095823 0.7150461320085165 C 6.179361179361179 1.1117814052519517 6.428132678132679 1.737638987461556 6.569410319410319 2.592618878637332 C 6.83968058968059 4.3579370712088945 7.042383292383293 5.505086349656966 7.177518427518428 6.034066713981547 C 7.515356265356266 7.565649396735273 7.883906633906634 8.331440738112136 8.283169533169533 8.331440738112136 C 8.596437346437348 8.331440738112136 9.069410319410322 7.836290513366452 9.702088452088452 6.845990063875088 C 10.322481572481575 5.855689614383723 10.657248157248157 5.099124674710196 10.706388206388207 4.5762952448545064 C 10.786240786240787 3.721315353678731 10.451474201474202 3.2938254080908442 9.702088452088452 3.2938254080908442 C 9.351965601965603 3.2938254080908442 8.98034398034398 3.3737875561864192 8.587223587223587 3.5337118523775732 C 9.324324324324325 1.1163946061036198 10.734029484029485 -0.05843387745446105 12.816339066339067 0.009226401703336107 Z " fill-rule="nonzero" fill="#000000" stroke="none" transform="matrix(1 0 0 1 328 494 )"/>
  432. </svg>
  433. </div>
  434. <p class="wleft mdl03 color249EFB font18 pt5">${u.vr_num}</p>
  435. </div>
  436. </a>
  437. <div class="width100_ bgD7D7D7 folder_bottom wpsr woverflow">
  438. <a class="dsa" href="floder_child.html?id=${u.id}">
  439. <img style="width:100%" src="__STATIC__/img/folder_ico.png"/>
  440. </a>
  441. <div class="wpsa width100_ folder_text">
  442. <div class="folder_ps_t">
  443. <div class="folder_t pdlr25 pdb05">
  444. <p class="font16 textlh1 fontW700">${u.fld_name}</p>
  445. <p class="font12">${u.createtime}</p>
  446. </div>
  447. <div class="folder_b wpsa height100_ folder_bor_b">
  448. <div class="width80_ woverflow wauto editor_del">
  449. <span class="edit_floder color249EFB font16" data-id="${u.id}" data-name="${u.fld_name}">编辑</span>
  450. <span class="hongses del_floder hongse" data-id="${u.id}">删除</span>
  451. </div>
  452. </div>
  453. </div>
  454. </div>
  455. </div>
  456. </div>
  457. </li>`;
  458. }).join('');
  459. htmls += arr.group_list.map((u, x) => {
  460. return `<li class="folder_li_02">
  461. <div class="width90_ wauto wpsr folder_div_02s">
  462. <input type="checkbox" name="like" data-id="${u.id}" data-fid="${u.team_floder_id}" class="ds wpsa checkbtn" title="写作">
  463. <div class="woverflow bolder_img_box">
  464. <div class="bolder_img wpsr">
  465. <img class="headimg" src="${u.headimgurl}"/>
  466. <img class="width100_ height100_" src="${u.pic_path}?x-oss-process=image/resize,w_200" alt="">
  467. <div class="wpsa woverflow bolder_click">
  468. <div class="wleft">
  469. <svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="19px" height="11px" xmlns="http://www.w3.org/2000/svg">
  470. <g transform="matrix(1 0 0 1 -631 -714 )">
  471. <path d="M 14.106863839285715 8.617621527777777 C 15.524088541666668 7.844184027777777 16.702752976190478 6.804976851851849 17.642857142857142 5.5 C 16.56845238095238 3.997685185185185 15.221912202380953 2.874131944444444 13.603236607142856 2.1293402777777772 C 14.034412202380953 2.7913773148148135 14.25 3.507523148148148 14.25 4.277777777777777 C 14.25 5.455439814814813 13.785249255952381 6.462818287037036 12.855747767857144 7.299913194444445 C 11.926246279761905 8.13700810185185 10.80766369047619 8.555555555555555 9.5 8.555555555555555 C 8.19233630952381 8.555555555555555 7.073753720238097 8.13700810185185 6.144252232142858 7.299913194444445 C 5.2147507440476195 6.462818287037036 4.75 5.455439814814813 4.75 4.277777777777777 C 4.75 3.507523148148148 4.965587797619048 2.7913773148148135 5.396763392857142 2.1293402777777772 C 3.7780877976190483 2.874131944444444 2.4315476190476195 3.997685185185185 1.357142857142857 5.5 C 2.297247023809524 6.804976851851849 3.4759114583333335 7.844184027777777 4.893136160714286 8.617621527777777 C 6.310360863095239 9.391059027777777 7.845982142857142 9.777777777777777 9.5 9.777777777777777 C 11.154017857142856 9.777777777777777 12.689639136904765 9.391059027777777 14.106863839285715 8.617621527777777 Z M 9.860491071428571 2.1579861111111116 C 9.959449404761905 2.068865740740741 10.008928571428571 1.9606481481481477 10.008928571428571 1.833333333333333 C 10.008928571428571 1.7060185185185182 9.959449404761905 1.597800925925925 9.860491071428571 1.5086805555555558 C 9.761532738095239 1.419560185185184 9.641369047619047 1.3749999999999987 9.5 1.375 C 8.616443452380953 1.3749999999999987 7.85835193452381 1.6598668981481477 7.225725446428572 2.229600694444444 C 6.593098958333334 2.799334490740741 6.276785714285714 3.482060185185185 6.276785714285714 4.277777777777777 C 6.276785714285714 4.405092592592592 6.326264880952382 4.513310185185185 6.425223214285714 4.602430555555555 C 6.524181547619048 4.691550925925925 6.644345238095239 4.736111111111112 6.785714285714286 4.736111111111112 C 6.927083333333334 4.736111111111112 7.047247023809525 4.691550925925925 7.146205357142858 4.602430555555555 C 7.245163690476191 4.513310185185185 7.294642857142858 4.405092592592592 7.294642857142858 4.277777777777777 C 7.294642857142858 3.730324074074074 7.510230654761905 3.2624421296296298 7.94140625 2.874131944444444 C 8.372581845238097 2.485821759259259 8.892113095238097 2.291666666666666 9.5 2.291666666666667 C 9.641369047619047 2.291666666666666 9.761532738095239 2.2471064814814805 9.860491071428571 2.1579861111111116 Z M 18.787946428571427 4.841145833333333 C 18.929315476190478 5.0639467592592595 19 5.283564814814813 19 5.5 C 19 5.716435185185184 18.929315476190478 5.9360532407407405 18.787946428571427 6.158854166666666 C 17.7983630952381 7.622974537037036 16.467726934523814 8.795862268518519 14.796037946428571 9.67751736111111 C 13.124348958333334 10.559172453703704 11.359002976190478 11 9.5 11 C 7.640997023809525 11 5.875651041666667 10.557581018518519 4.203962053571429 9.672743055555555 C 2.5322730654761907 8.787905092592592 1.2016369047619049 7.616608796296296 0.21205357142857142 6.158854166666666 C 0.07068452380952381 5.9360532407407405 0 5.716435185185184 0 5.5 C 0 5.283564814814813 0.07068452380952381 5.0639467592592595 0.21205357142857142 4.841145833333333 C 1.2016369047619049 3.3833912037037033 2.5322730654761907 2.2120949074074066 4.203962053571429 1.3272569444444442 C 5.875651041666667 0.4424189814814806 7.640997023809525 0 9.5 0 C 11.359002976190478 0 13.124348958333334 0.4424189814814806 14.796037946428571 1.3272569444444442 C 16.467726934523814 2.2120949074074066 17.7983630952381 3.3833912037037033 18.787946428571427 4.841145833333333 Z " fill-rule="nonzero" fill="#000000" stroke="none" transform="matrix(1 0 0 1 631 714 )"/>
  472. </g>
  473. </svg>
  474. </div>
  475. <p class="wleft mdl06 color249EFB">${u.view_count}</p>
  476. </div>
  477. </div>
  478. </div>
  479. <div class="bolder_text_box wpsr">
  480. <div class="width92_ pdt05 wauto">
  481. <p class="font16 textlh1 width100_ fontW700">${u.title}</p>
  482. <p class="font10 color999">${u.createtime}</p>
  483. </div>
  484. <div class="wpsa folder_b deleteIcon">
  485. <div class="preview" data-url="${u.show_url}">预览</div>
  486. <div class="del_img wpsa wpsauto hongse" data-id="${u.id}" data-fid="${u.team_floder_id}">
  487. 删除
  488. </div>
  489. </div>
  490. </div>
  491. </div>
  492. </li>`;
  493. }).join('');
  494. $('.folder_ul').html(htmls);
  495. /*
  496. <svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="21px" height="23px" xmlns="http://www.w3.org/2000/svg">
  497. <g transform="matrix(1 0 0 1 -1050 -870 )">
  498. <path d="M 7.502130681818182 8.759765625 C 7.591619318181818 8.849609375 7.636363636363637 8.964409722222221 7.636363636363637 9.104166666666668 L 7.636363636363637 17.729166666666668 C 7.636363636363637 17.86892361111111 7.591619318181818 17.983723958333332 7.502130681818182 18.073567708333332 C 7.412642045454545 18.163411458333332 7.298295454545456 18.208333333333332 7.159090909090908 18.208333333333332 L 6.204545454545455 18.208333333333332 C 6.06534090909091 18.208333333333332 5.950994318181819 18.163411458333332 5.861505681818182 18.073567708333332 C 5.772017045454545 17.983723958333332 5.727272727272727 17.86892361111111 5.727272727272727 17.729166666666668 L 5.727272727272727 9.104166666666668 C 5.727272727272727 8.964409722222221 5.772017045454545 8.849609375 5.861505681818182 8.759765625 C 5.950994318181819 8.669921875 6.06534090909091 8.625 6.204545454545455 8.625 L 7.159090909090908 8.625 C 7.298295454545456 8.625 7.412642045454545 8.669921875 7.502130681818182 8.759765625 Z M 11.3203125 8.759765625 C 11.409801136363637 8.849609375 11.454545454545453 8.964409722222221 11.454545454545453 9.104166666666668 L 11.454545454545453 17.729166666666668 C 11.454545454545453 17.86892361111111 11.409801136363637 17.983723958333332 11.3203125 18.073567708333332 C 11.230823863636363 18.163411458333332 11.116477272727273 18.208333333333332 10.977272727272727 18.208333333333332 L 10.022727272727273 18.208333333333332 C 9.883522727272728 18.208333333333332 9.769176136363637 18.163411458333332 9.6796875 18.073567708333332 C 9.590198863636363 17.983723958333332 9.545454545454545 17.86892361111111 9.545454545454545 17.729166666666668 L 9.545454545454545 9.104166666666668 C 9.545454545454545 8.964409722222221 9.590198863636363 8.849609375 9.6796875 8.759765625 C 9.769176136363637 8.669921875 9.883522727272728 8.625 10.022727272727273 8.625 L 10.977272727272727 8.625 C 11.116477272727273 8.625 11.230823863636363 8.669921875 11.3203125 8.759765625 Z M 15.138494318181817 8.759765625 C 15.227982954545453 8.849609375 15.272727272727273 8.964409722222221 15.272727272727273 9.104166666666668 L 15.272727272727273 17.729166666666668 C 15.272727272727273 17.86892361111111 15.227982954545453 17.983723958333332 15.138494318181817 18.073567708333332 C 15.049005681818183 18.163411458333332 14.934659090909092 18.208333333333332 14.795454545454547 18.208333333333332 L 13.84090909090909 18.208333333333332 C 13.701704545454545 18.208333333333332 13.587357954545453 18.163411458333332 13.497869318181817 18.073567708333332 C 13.408380681818183 17.983723958333332 13.363636363636363 17.86892361111111 13.363636363636363 17.729166666666668 L 13.363636363636363 9.104166666666668 C 13.363636363636363 8.964409722222221 13.408380681818183 8.849609375 13.497869318181817 8.759765625 C 13.587357954545453 8.669921875 13.701704545454545 8.625 13.84090909090909 8.625 L 14.795454545454547 8.625 C 14.934659090909092 8.625 15.049005681818183 8.669921875 15.138494318181817 8.759765625 Z M 17.077414772727273 20.5517578125 C 17.147017045454547 20.367078993055557 17.181818181818183 20.164930555555557 17 19.9453125 L 17 6 L 4 6 L 4 19.9453125 C 3.8181818181818183 20.164930555555557 3.852982954545455 20.367078993055557 3.9225852272727275 20.5517578125 C 3.9921875000000004 20.736436631944443 4.064275568181818 20.871202256944443 4.138849431818182 20.9560546875 C 4.213423295454546 21.040907118055557 4.265625 21.083333333333332 4.295454545454546 21 L 16.704545454545453 21 C 16.734375 21.083333333333332 16.786576704545453 21.040907118055557 16.861150568181817 20.9560546875 C 16.935724431818183 20.871202256944443 17.007812500000004 20.736436631944443 17.077414772727273 20.5517578125 Z M 7.889914772727273 2.0813802083333326 L 7.159090909090908 3.8333333333333326 L 13.84090909090909 3.8333333333333326 L 13.125 2.0813802083333326 C 13.05539772727273 1.9915364583333326 12.970880681818182 1.9366319444444433 12.871448863636363 1.9166666666666674 L 8.143465909090908 1.9166666666666674 C 8.044034090909092 1.9366319444444433 7.959517045454547 1.9915364583333326 7.889914772727273 2.0813802083333326 Z M 20.865767045454547 3.9680989583333326 C 20.955255681818183 4.057942708333332 21 4.1727430555555545 21 4.3125 L 21 5.270833333333332 C 21 5.410590277777776 20.955255681818183 5.525390625 20.865767045454547 5.615234375 C 20.77627840909091 5.705078125 20.66193181818182 5.75 20.522727272727273 5.75 L 19 5.75 L 19 19.9453125 C 19.09090909090909 20.773871527777775 18.85724431818182 21.490125868055557 18.389914772727273 22.094075520833332 C 17.922585227272727 22.69802517361111 17.360795454545453 23 16.704545454545453 23 L 4.295454545454546 23 C 3.639204545454546 23 3.0774147727272734 22.7080078125 2.610085227272727 22.1240234375 C 2.142755681818182 21.5400390625 1.9090909090909092 20.83376736111111 2 20.005208333333332 L 2 5.75 L 0.4772727272727273 5.75 C 0.3380681818181818 5.75 0.22372159090909094 5.705078125 0.13423295454545456 5.615234375 C 0.04474431818181818 5.525390625 0 5.410590277777776 0 5.270833333333332 L 0 4.3125 C 0 4.1727430555555545 0.04474431818181818 4.057942708333332 0.13423295454545456 3.9680989583333326 C 0.22372159090909094 3.8782552083333326 0.3380681818181818 3.8333333333333326 0.4772727272727273 3.8333333333333326 L 5.0859375 3.8333333333333326 L 6.129971590909092 1.3326822916666674 C 6.279119318181819 0.9633246527777758 6.547585227272728 0.6488715277777758 6.935369318181818 0.3893229166666675 C 7.32315340909091 0.12977430555555414 7.715909090909091 0 8.113636363636363 0 L 12.886363636363637 0 C 13.284090909090912 0 13.67684659090909 0.12977430555555414 14.064630681818183 0.3893229166666675 C 14.452414772727273 0.6488715277777758 14.720880681818183 0.9633246527777758 14.87002840909091 1.3326822916666674 L 15.9140625 3.8333333333333326 L 20.522727272727273 3.8333333333333326 C 20.66193181818182 3.8333333333333326 20.77627840909091 3.8782552083333326 20.865767045454547 3.9680989583333326 Z " fill-rule="nonzero" fill="#d9001b" stroke="none" transform="matrix(1 0 0 1 1050 870 )"/>
  499. </g>
  500. </svg>
  501. */
  502. setTimeout(() => {
  503. $('.edit_floder').on('click', (e) => {
  504. let fid = e.target.dataset.id;
  505. let name = e.target.dataset.name;
  506. //console.log(id);
  507. //return false;
  508. layer.prompt({ title: ['编辑', 'color:#333333;background-color:#D8E6F1;'], value: name,id:fid},function (val,index) {
  509. //layer.msg('得到了' + val);
  510. $.ajax({
  511. type: "post",
  512. url: '{:url("VrManage/edit_floder")}',
  513. data: {
  514. name: val,
  515. id:fid
  516. },
  517. success: function (res) {
  518. if (res.code == 0) {
  519. layer.msg(res.msg);
  520. layer.close(index);
  521. getList(datass);
  522. } else {
  523. layer.msg(res.msg)
  524. }
  525. }
  526. });
  527. //layer.close(index);
  528. });
  529. })
  530. $('.del_floder').on('click', (e) => {
  531. let id = e.target.dataset.id;
  532. //cIndex++;
  533. layer.confirm('确定删除当前文件夹', {
  534. title: ['删除', 'color:#333333;background-color:#D8E6F1;'],
  535. id:id,
  536. end: function () {
  537. //cIndex = 0;
  538. }
  539. }, function (index) {
  540. $.ajax({
  541. url: "{:url('VrManage/del_floder')}",
  542. data: {
  543. id: id
  544. },
  545. type: 'post',
  546. success: function (res) {
  547. if (res.code == 0) {
  548. layer.msg('删除成功')
  549. layer.close(index);
  550. getList(datass);
  551. } else {
  552. layer.msg(res.msg)
  553. }
  554. }
  555. });
  556. });
  557. })
  558. $('.del_img').on('click', (e) => {
  559. let id = e.currentTarget.dataset.id;
  560. let fid = e.currentTarget.dataset.fid;
  561. //console.log(id);
  562. //return false;
  563. //cIndex++;
  564. layer.confirm('确定删除当前作品', {
  565. title: ['删除', 'color:#333333;background-color:#D8E6F1;'],
  566. id:id,
  567. end: function () {
  568. //cIndex = 0;
  569. }
  570. }, function (index) {
  571. $.ajax({
  572. url: "{:url('VrManage/del_group')}",
  573. data: {
  574. id: id,
  575. fid:fid
  576. },
  577. type: 'post',
  578. success: function (res) {
  579. if (res.code == 0) {
  580. layer.msg('删除成功')
  581. getList(datass);
  582. } else {
  583. layer.msg(res.msg)
  584. }
  585. }
  586. });
  587. });
  588. })
  589. //预览
  590. $('.preview').on('click', (e) => {
  591. let url = e.currentTarget.dataset.url;
  592. window.open(url)
  593. })
  594. }, 300)
  595. }
  596. //话术列表
  597. table.render({
  598. elem: '#management',
  599. autoSort: false,
  600. url: "{:url('VrManage/group_check_list')}",
  601. cols: [
  602. [{
  603. field: 'title',
  604. title: '作品',
  605. templet: '#title'
  606. }, {
  607. field: 'title',
  608. title: '作者',
  609. templet: '#employee_name',
  610. },{
  611. field: 'title',
  612. title: '头像',
  613. templet: '#headimgurl',
  614. },{
  615. field: 'publish_time',
  616. title: '提交时间',
  617. }, {
  618. field: 'review_time',
  619. title: '审核通过时间',
  620. templet: '#addtimetpl'
  621. },
  622. {
  623. title: '操作',
  624. width: 220,
  625. align: 'center',
  626. fixed: 'right',
  627. toolbar: '#table-train-action'
  628. }
  629. ]
  630. ],
  631. page: true,
  632. limit: 30,
  633. height: 'full-200',
  634. text: '对不起,加载出现异常!'
  635. });
  636. //监听列表
  637. table.on('tool(management)', function (obj) {
  638. var data = obj.data;
  639. if (obj.event === 'laypass') {
  640. //监听关联的数量
  641. $.ajax({
  642. url: '{:url("VrManage/checking")}',
  643. type: 'post',
  644. data: { id: data.id, status: 2 },
  645. dataType: 'json',
  646. success: function (res) {
  647. if (res.code == 0) {
  648. layer.msg('审核成功');
  649. //执行重载
  650. table.reload('management', {
  651. });
  652. cutimg(data.id)
  653. } else {
  654. layer.msg(res.msg)
  655. }
  656. }
  657. });
  658. }else if (obj.event === 'layreject') {
  659. $.ajax({
  660. url: '{:url("VrManage/checking")}',
  661. type: 'post',
  662. data: { id: data.id, status: -1 },
  663. dataType: 'json',
  664. success: function (res) {
  665. if (res.code == 0) {
  666. layer.msg('审核成功');
  667. //执行重载
  668. table.reload('management', {
  669. });
  670. } else {
  671. layer.msg(res.msg)
  672. }
  673. }
  674. });
  675. }else if(obj.event === 'preview'){
  676. window.open(data.show_url)
  677. }
  678. });
  679. //审核开关
  680. form.on('switch(switchElement)', function (data) {
  681. $.ajax({
  682. url: '{:url("VrManage/switch")}',
  683. type: 'post',
  684. data: {},
  685. dataType: 'json',
  686. success: function (res) {
  687. if (res.code === 0) {
  688. layer.msg(res.msg, {
  689. anim: 0
  690. , time: 2000
  691. });
  692. } else {
  693. layer.msg(res.msg, {
  694. anim: 6
  695. , time: 2000
  696. });
  697. }
  698. }
  699. });
  700. })
  701. });
  702. </script>
  703. {/block}