123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741 |
- {extend name="public/layout" /} {block name="title"}作品管理{/block} {block name="head"} {include file="public/head"}
- <link rel="stylesheet" href="__STATIC__/css/csspc.css">
- <style>
- html,body{min-width:1210px;}
- .layui-fluid{min-height: calc(100vh - 30px);margin:15px;display: block; box-shadow: 0 0 4px 0 #B6CADE; border-radius: 5px; background-color: #ffffff;}
- .layui-card{box-shadow:none;padding:10px;}
- .works{border-bottom: 1px solid #ccc;}
- .works_title{border:0;border-bottom: 1px solid #f6f6f6;}
- .layui-tab-title .layui-this {color: #249EFB;}
- .layui-tab-title .layui-this:after{border:0;border-bottom: 4px solid #249EFB;position: absolute;top:-1px;left:0;}
- .layui-form-select{width:17%;margin:10px 1%;height: 38px;float:right;}
- .folder_name{border:1px solid #e6e6e6;width:100%;height: 100%;}
- .border_s{border:1px solid #249EFB;width:120px;border-radius: 4px;color: #249EFB;}
- .bor_b{border-bottom: 1px solid #f6f6f6;padding-bottom: 10px;height: 68px;}
- .folder_ul li{float:left;width:13.285%;height: 173px;overflow: hidden;box-sizing: border-box;margin:40px 0.5% 0;min-width: 212px;}
- .bgD7D7D7{background: #D7D7D7;}
- .folder_top{border-radius:30px 30px 0 0;height:40px;}
- .folder_bottom{height: 173px;width:212px;}
- .folder_text{bottom:0;left:0;height: 60px;}
- .folder_ps_t{position:absolute;bottom:0;left:-3.5%;overflow: hidden;width:107%;padding:5px 0;}
- .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;}
- .folder_bor_b{background: #fff;}
- .folder_ul li:hover .folder_b{display: block;}
- .editor_del{position:absolute;bottom:0;left:10%;}
- .editor_del span{display:block;width:50%;float:left;line-height: 46px;text-align: center;cursor: pointer;}
- .bolder_img_box{height: 117px;}
- .bolder_img{height:100%;overflow: hidden;}
- .bolder_click{top:3%;left:3%;}
- .folder_div_02{border:1px solid #f2f2f2;border-radius: 10px;overflow: hidden;}
- .folder_div_02s{border:1px solid #f2f2f2;border-radius: 10px;overflow: hidden;box-shadow: 0px 0px 4px 3px #f5f5f5;}
- .bolder_text_box{height:50px;display: flex;}
- .deleteIcon{width:100%;top:0;left:0;height: 50px;background: #fff;display: none;}
- .del_img{width:40px;height: 23px;cursor: pointer;right: -100px;}
- .checkbtn{right:5px;top:5px;width:30px;height: 30px;z-index: 5;display: none;}
- .add_check .checkbtn{display: block;}
- .add_check:hover .folder_b{display: none !important;}
- .mobile_del{width:220px;margin-right:1%;display: none;}
- .mobile_del a{display: block;width:100px;height: 42px;border:1px solid #e6e6e6;cursor: pointer;border-radius: 4px;}
- .hongse{color:#D9001B;}
- .search_ico{width:40px;position: absolute;right:0;top:0;cursor: pointer;}
- .h36{height: 36px;}
- .color249EFB {color: #249EFB;}
- .ml5 {margin-left: 5px;}
- .pt5 {padding-top: 5px;}
- .fontW700 {font-weight: 700;}
- .color999 {color: #999;}
- .folder_ul {padding: 10px 0px;}
- .preview {position: absolute;left: 50px;top:50%;bottom: 0px;transform: translateY(-50%);color: #249EFB;font-weight: 600;cursor: pointer;}
- .page_down{ position: absolute;bottom: 0;}
- .layui-form-switch {margin-top: 0px;height: auto !important;}
- .switchBox {
- width: 150px;
- display: flex;
- align-items: center;
- padding: 0px;
- position: absolute;
- top: 30px;
- right: 0px;
- }
- .switchBox > div {
- margin-right: 5px;
- }
- .headimg{width:32px;height: 32px;border-radius: 50%;border:1px solid #fff;overflow: hidden;right:5%;bottom:2%;position: absolute;}
- </style>
- {/block} {block name="body"}
- <body>
- <div class="layui-fluid">
- <div class="layui-card">
- <!-- <p class="font25 pdb10 textb works">作品</p> -->
- <div class="layui-tab relative">
- <ul class="layui-tab-title works_title">
- <li data-index="1" class="layui-this">全部</li>
- <li data-index="2" class="">提交记录</li>
- </ul>
- <div class="switchBox layui-form layui-hide">
- <div>审核开关</div>
- <input type="checkbox" lay-skin="switch" lay-filter="switchElement" {if condition="$switch eq 1" }
- checked {/if} lay-text="开启|关闭">
- </div>
- <div class="layui-tab-content pd0 mdtb10" style="padding: 0;">
- <div class="layui-tab-item layui-show">
- <div class="lh60 layui-form bor_b">
- <p class="wleft font18">全部作品<span class="font16 color249EFB ml5">(共{$group_count}个作品)</span></p>
- <div class="wpsr width17_ mdt11 wright h36 search_btn">
- <input type="text" placeholder="请输入作品名称" name="name" id="name" class="ds folder_name">
- <div class="height100_ search_ico">
- <img class="wpsa width70_ wpsauto" src="__STATIC__/img/searchmail.png" alt="">
- </div>
- </div>
- <select name="employee" id="employee" lay-filter="employee_select" lay-search>
- <option value="">全体成员</option>
- </select>
- <select name="org" id="org" lay-filter="org_select" lay-search>
- <option value="">按部门筛选</option>
- </select>
- </div>
- <div class="clear"></div>
- <div class="mdt15 woverflow">
- <p class="font14 textc lh40 border_s batchbtn href wright">批量管理</p>
- <div class="wright woverflow mobile_del">
- <a class="wleft textc lh40 color249EFB" id="mobile_btn">移动</a>
- <a class="hongse wright textc lh40" id="del_all">删除</a>
- </div>
- <p class="font14 textc lh40 mdr01_ border_s addbolder href wright">+创建文件夹</p>
- </div>
-
- <div class="">
- <ul class="woverflow folder_ul">
-
- </ul>
- </div>
- <div id="pages" class="page_down"></div>
- </div>
- <div class="layui-tab-item">
- <table lay-filter="management" id="management"></table>
- </div>
- </div>
- </div>
- </div>
- </div>
- </body>
- {/block} {block name="js"}
- <script type="text/html" id="employee_name">
- {{# if(d.name){ }}
- <span>{{d.name}}</span>
- {{# }else{ }}
- <span style="color: #cccccc;">无</span>
- {{# } }}
- </script>
- <script type="text/html" id="status">
- <span>待审核</span>
- </script>
- <script type="text/html" id="title">
- {{# if(d.title){ }}
- <span>{{d.title}}</span>
- {{# }else{ }}
- <span style="color: #cccccc;">未命名作品</span>
- {{# } }}
- </script>
- <script type="text/html" id="table-train-action">
- <a class="layui-btn layui-btn-xs" lay-event="preview">预览</a>
- {{# if(d.status == 1){ }}
- <a class="layui-btn layui-btn-xs" lay-event="laypass">通过</a>
- <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="layreject">驳回</a>
- {{# }else if(d.status == 2){ }}
- {{# }else if(d.status == -1){ }}
- {{# } }}
- </script>
- <script type="text/html" id="addtimetpl">
- {{# if(d.status == 1){ }}
- <span>待审核</span>
- {{# }else{ }}
- <span>{{d.review_time}}</span>
- {{# } }}
- </script>
-
- <script type="text/html" id="headimgurl">
- {{# if(d.headimgurl){ }}
- <img src="{{d.headimgurl}}" style="width: 30px;height: 30px;">
- {{# }else{ }}
- <span style="color: #cccccc;">无</span>
- {{# } }}
- </script>
- <script>
- var orgids_str = '{:$orgids}';
- var orgids = JSON.parse(orgids_str);
- var org = eval('{$org|raw}');
- layui.config({
- base: '__LAYUI__/',
- urlbase: '/sys'
- }).extend({
- index: 'lib/index' //主入口模块
- }).use(['index','form','table', 'element','laypage'], function () {
- var form = layui.form,
- upload = layui.upload,
- table = layui.table,
- laypage = layui.laypage,
- datass = {},
- page = 1,
- limit=21,
- datass = {
- name: '',
- page:page,
- limit:limit
- },
- $ = layui.jquery;
- $('#org').append(setOrgOption(org, ''));
- form.render('select')
- form.on('select(org_select)', function (data) {
- var val = data.value;
- requestEmployee(val);
- });
-
- $('.search_ico').click(function(){
- var orgids = $("#org").val();
- var empid = $("#employee").val();
- var keyname = $("#name").val();
- datass.org_id = orgids;
- datass.employee_id = empid;
- datass.keyname = keyname;
- console.log(datass);
- getList(datass);
- })
- $('.works_title li').click(function() {
- let index = $(this).prop('dataset').index;
- if (index == 2) {
- //执行重载
- table.reload('management', {});
- $(".switchBox").removeClass('layui-hide')
- } else {
- $(".switchBox").addClass('layui-hide')
- }
- })
- $('.addbolder').click(function () {
- layer.prompt(function (val, index) {
- //layer.msg('得到了' + val);
- $.ajax({
- type: "post",
- url: '{:url("VrManage/make_floder")}',
- data: {
- name: val
- },
- success: function (res) {
- if (res.code == 0) {
- layer.msg(res.msg);
- layer.close(index);
- getList(datass);
- } else {
- layer.msg(res.msg)
- }
- }
- });
- //layer.close(index);
- });
- })
-
- window.imgarr = function(){
- var arrs = new Array();
- $("input[name='like']:checked").each(function(i){
- arrs[i] = $(this).data('id');
- });
- return arrs.join(",")
- }
- //批量删除
- $('#del_all').click(function(){
- var arrs = new Array();
- var fid = null;
- $("input[name='like']:checked").each(function(i){
- arrs[i] = $(this).data('id');
- fid = $(this).data('fid');
- });
- if(arrs.length == 0){
- layer.msg('请选择作品');
- return false;
- }
- layer.confirm('确定删除当前作品', {
- title: ['删除', 'color:#333333;background-color:#D8E6F1;'],
- end: function () {
- //cIndex = 0;
- }
- }, function (index) {
- $.ajax({
- url: "{:url('VrManage/del_group')}",
- data: {
- id: arrs.join(","),
- fid:fid
- },
- type: 'post',
- success: function (res) {
- if (res.code == 0) {
- layer.msg('删除成功')
- getList(datass);
- } else {
- layer.msg(res.msg)
- }
- }
- });
- });
- })
- function setOrgOption(opt, sj) {
- var html = '';
- opt.forEach(element => {
- if (orgids.length > 0) {
- if (in_array(element.id, orgids)) {
- html += '<option value="' + element.id + '">' + sj + element.title + '</option>';
- }
- }
- if (element && element.children.length > 0) html += setOrgOption(element.children, sj + '-');
- });
- return html;
- }
- function in_array(search, array) {
- for (var i in array) {
- if (array[i] == search) {
- return true;
- }
- }
- return false;
- }
- requestEmployee('');
- function requestEmployee(val) {
- $.ajax({
- url: '{:url("org/employee")}'
- , data: { org:val,limit:10000}
- , type: 'get'
- , success: function (res) {
- if (res.code == 0) {
- $('#employee').html('<option value="">请选择</option>');
- res.data.forEach(element => {
- $('#employee').append('<option value="' + element.id + '">' + element.name + '</option>');
- });
- form.render('select')
- }
- }
- });
- }
- $('.batchbtn').click(function(){
- if($(this).hasClass('cancelbtn')){
- $(this).html('批量管理');
- $(this).removeClass('cancelbtn');
- $('.folder_li_02').removeClass('add_check');
- $('.mobile_del').hide();
- $('.addbolder').show();
- }else{
- $(this).html('取消');
- $(this).addClass('cancelbtn');
- $('.folder_li_02').addClass('add_check');
- $('.addbolder').hide();
- $('.mobile_del').show();
- }
- })
-
-
-
- $('#mobile_btn').click(function () {
- var arrs = new Array();
- $("input[name='like']:checked").each(function(i){
- arrs[i] = $(this).data('id');
- });
- if(arrs.length == 0){
- layer.msg('请选择作品');
- return false;
- }
- layer.open({
- type: 2,
- title: ['批量移动', 'color:#333333;background-color:#D8E6F1;'],
- content: '{:url("vrManage/batch_mobile")}',
- resize: false,
- area: ['80%', '80%'],
- btn: ['确定', '取消'],
- btn1: function () {
- var ids = window.submits();
- //console.log(id);
- //return false;
- $.ajax({
- type: "post",
- url: '{:url("VrManage/moveto_floder")}',
- data: {
- floder_id: ids[0],
- group_ids: ids[1]
- },
- success: function (res) {
- if (res.code == 0) {
- layer.msg(res.msg);
- layer.closeAll();
- getList(datass);
- //layer.close(index);
- } else {
- layer.msg(res.msg)
- }
- }
- });
- console.log(id)
- }
- });
- })
- getList(datass);
- //调数据
- function getList(datass) {
- var url = '{:url("VrManage/floder_list")}';
- $.ajax({
- url: url,
- type: 'post',
- dataType: 'json',
- data: datass,
- success: function (res) {
- if (res.code == 0) {
- setListHtml(res.data);
- if (res.data.length == 0) {
- $('.building_list_ul' + t).append('<img class="noneimgs" src="__STATIC__/img/nonedata.png"/>');
- }else{
- pages('pages',datass, res.count);
- // if(t==''){
- // pages('pages',datass, res.count);
- // }else{
- // pages('mobelepage',datass, res.count);
- // }
- }
- }
- }
- });
- }
- //分页样式
- function pages(objname,where,count) {
- laypage.render({
- elem: objname
- , count: count
- , curr: where.page
- , limit: where.limit
- ,limits: [21,10,20,30,40,50]
- , prev:'<i class="layui-icon layui-icon-left"></i>'
- , next:'<i class="layui-icon layui-icon-right"></i>'
- , layout: ['prev', 'page', 'next' , 'skip','count','limit']
- , jump: function (obj, first) {
- limit = obj.limit;
- where.page = obj.curr;
- where.limit = obj.limit;
-
- if (!first) {
- $('.building_list_ul').animate({scrollTop:0}, 0);
- if(objname == 'pages'){
- getList(where);
- }
- if(objname == 'mobelepage'){
- getList(where,'s');
- }
- }
- }
- });
- }
- function setListHtml(arr) {
- let htmls = arr.floder_list.map((u, x) => {
- return `<li class="folder_li_01">
- <div class="width100_ wauto">
- <a href="floder_child.html?id=${u.id}">
- <div class="width50_ bgD7D7D7 pdt10 wpsr woverflow dsnone folder_top">
- <div class="wleft mdt01 mdl20 pt5">
- <svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="15px" height="13px" xmlns="http://www.w3.org/2000/svg">
- <g transform="matrix(1 0 0 1 -328 -494 )">
- <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 )"/>
- </svg>
- </div>
- <p class="wleft mdl03 color249EFB font18 pt5">${u.vr_num}</p>
- </div>
- </a>
- <div class="width100_ bgD7D7D7 folder_bottom wpsr woverflow">
- <a class="dsa" href="floder_child.html?id=${u.id}">
- <img style="width:100%" src="__STATIC__/img/folder_ico.png"/>
- </a>
- <div class="wpsa width100_ folder_text">
- <div class="folder_ps_t">
- <div class="folder_t pdlr25 pdb05">
- <p class="font16 textlh1 fontW700">${u.fld_name}</p>
- <p class="font12">${u.createtime}</p>
- </div>
- <div class="folder_b wpsa height100_ folder_bor_b">
- <div class="width80_ woverflow wauto editor_del">
- <span class="edit_floder color249EFB font16" data-id="${u.id}" data-name="${u.fld_name}">编辑</span>
- <span class="hongses del_floder hongse" data-id="${u.id}">删除</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </li>`;
- }).join('');
- htmls += arr.group_list.map((u, x) => {
- return `<li class="folder_li_02">
- <div class="width90_ wauto wpsr folder_div_02s">
- <input type="checkbox" name="like" data-id="${u.id}" data-fid="${u.team_floder_id}" class="ds wpsa checkbtn" title="写作">
- <div class="woverflow bolder_img_box">
- <div class="bolder_img wpsr">
- <img class="headimg" src="${u.headimgurl}"/>
- <img class="width100_ height100_" src="${u.pic_path}?x-oss-process=image/resize,w_200" alt="">
- <div class="wpsa woverflow bolder_click">
- <div class="wleft">
- <svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="19px" height="11px" xmlns="http://www.w3.org/2000/svg">
- <g transform="matrix(1 0 0 1 -631 -714 )">
- <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 )"/>
- </g>
- </svg>
- </div>
- <p class="wleft mdl06 color249EFB">${u.view_count}</p>
- </div>
- </div>
- </div>
- <div class="bolder_text_box wpsr">
- <div class="width92_ pdt05 wauto">
- <p class="font16 textlh1 width100_ fontW700">${u.title}</p>
- <p class="font10 color999">${u.createtime}</p>
- </div>
- <div class="wpsa folder_b deleteIcon">
- <div class="preview" data-url="${u.show_url}">预览</div>
- <div class="del_img wpsa wpsauto hongse" data-id="${u.id}" data-fid="${u.team_floder_id}">
- 删除
- </div>
- </div>
- </div>
- </div>
- </li>`;
- }).join('');
- $('.folder_ul').html(htmls);
- /*
- <svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="21px" height="23px" xmlns="http://www.w3.org/2000/svg">
- <g transform="matrix(1 0 0 1 -1050 -870 )">
- <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 )"/>
- </g>
- </svg>
- */
-
- setTimeout(() => {
- $('.edit_floder').on('click', (e) => {
- let fid = e.target.dataset.id;
- let name = e.target.dataset.name;
- //console.log(id);
- //return false;
- layer.prompt({ title: ['编辑', 'color:#333333;background-color:#D8E6F1;'], value: name,id:fid},function (val,index) {
- //layer.msg('得到了' + val);
- $.ajax({
- type: "post",
- url: '{:url("VrManage/edit_floder")}',
- data: {
- name: val,
- id:fid
- },
- success: function (res) {
- if (res.code == 0) {
- layer.msg(res.msg);
- layer.close(index);
- getList(datass);
- } else {
- layer.msg(res.msg)
- }
- }
- });
- //layer.close(index);
- });
- })
- $('.del_floder').on('click', (e) => {
- let id = e.target.dataset.id;
- //cIndex++;
- layer.confirm('确定删除当前文件夹', {
- title: ['删除', 'color:#333333;background-color:#D8E6F1;'],
- id:id,
- end: function () {
- //cIndex = 0;
- }
- }, function (index) {
- $.ajax({
- url: "{:url('VrManage/del_floder')}",
- data: {
- id: id
- },
- type: 'post',
- success: function (res) {
- if (res.code == 0) {
- layer.msg('删除成功')
- layer.close(index);
- getList(datass);
- } else {
- layer.msg(res.msg)
- }
- }
- });
- });
- })
- $('.del_img').on('click', (e) => {
- let id = e.currentTarget.dataset.id;
- let fid = e.currentTarget.dataset.fid;
- //console.log(id);
- //return false;
- //cIndex++;
- layer.confirm('确定删除当前作品', {
- title: ['删除', 'color:#333333;background-color:#D8E6F1;'],
- id:id,
- end: function () {
- //cIndex = 0;
- }
- }, function (index) {
- $.ajax({
- url: "{:url('VrManage/del_group')}",
- data: {
- id: id,
- fid:fid
- },
- type: 'post',
- success: function (res) {
- if (res.code == 0) {
- layer.msg('删除成功')
- getList(datass);
- } else {
- layer.msg(res.msg)
- }
- }
- });
- });
- })
- //预览
- $('.preview').on('click', (e) => {
- let url = e.currentTarget.dataset.url;
- window.open(url)
- })
- }, 300)
- }
- //话术列表
- table.render({
- elem: '#management',
- autoSort: false,
- url: "{:url('VrManage/group_check_list')}",
- cols: [
- [{
- field: 'title',
- title: '作品',
- templet: '#title'
- }, {
- field: 'title',
- title: '作者',
- templet: '#employee_name',
- },{
- field: 'title',
- title: '头像',
- templet: '#headimgurl',
- },{
- field: 'publish_time',
- title: '提交时间',
- }, {
- field: 'review_time',
- title: '审核通过时间',
- templet: '#addtimetpl'
- },
- {
- title: '操作',
- width: 220,
- align: 'center',
- fixed: 'right',
- toolbar: '#table-train-action'
- }
- ]
- ],
- page: true,
- limit: 30,
- height: 'full-200',
- text: '对不起,加载出现异常!'
- });
- //监听列表
- table.on('tool(management)', function (obj) {
- var data = obj.data;
- if (obj.event === 'laypass') {
- //监听关联的数量
- $.ajax({
- url: '{:url("VrManage/checking")}',
- type: 'post',
- data: { id: data.id, status: 2 },
- dataType: 'json',
- success: function (res) {
- if (res.code == 0) {
- layer.msg('审核成功');
- //执行重载
- table.reload('management', {
- });
- cutimg(data.id)
- } else {
- layer.msg(res.msg)
- }
- }
- });
- }else if (obj.event === 'layreject') {
- $.ajax({
- url: '{:url("VrManage/checking")}',
- type: 'post',
- data: { id: data.id, status: -1 },
- dataType: 'json',
- success: function (res) {
- if (res.code == 0) {
- layer.msg('审核成功');
- //执行重载
- table.reload('management', {
- });
- } else {
- layer.msg(res.msg)
- }
- }
- });
- }else if(obj.event === 'preview'){
- window.open(data.show_url)
- }
- });
- //审核开关
- form.on('switch(switchElement)', function (data) {
- $.ajax({
- url: '{:url("VrManage/switch")}',
- type: 'post',
- data: {},
- dataType: 'json',
- success: function (res) {
- if (res.code === 0) {
- layer.msg(res.msg, {
- anim: 0
- , time: 2000
- });
- } else {
- layer.msg(res.msg, {
- anim: 6
- , time: 2000
- });
- }
- }
- });
- })
-
- });
- </script>
- {/block}
|