2021-12-07 09:36:53 +00:00
|
|
|
|
<!doctype html>
|
|
|
|
|
<html lang="en">
|
2021-12-10 10:01:35 +00:00
|
|
|
|
|
2021-12-07 09:36:53 +00:00
|
|
|
|
<head>
|
|
|
|
|
<meta charset="UTF-8" />
|
|
|
|
|
<title id="title"></title>
|
|
|
|
|
<meta http-equiv="Access-Control-Allow-Origin" content="*">
|
|
|
|
|
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
|
|
|
|
|
<meta name="format-detection" content="telephone=no" />
|
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
|
|
|
<meta name="renderer" content="webkit|ie-comp|ie-stand">
|
|
|
|
|
<meta name="Keywords" content="">
|
|
|
|
|
<meta name="description" content="">
|
|
|
|
|
<link rel="shortcut icon" type="image/ico" href="/favicon.ico">
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
|
|
|
|
|
<link href="js/layui/css/layui.css" rel="stylesheet" type="text/css" />
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="css/style.css?v=4" />
|
|
|
|
|
<link rel="stylesheet" type="text/css" media="screen and (max-width: 768px)" href="css/mobile.css?v=5" />
|
|
|
|
|
<script src="js/jquery-3.4.1.min.js" type="text/javascript" charset="utf-8"></script>
|
|
|
|
|
<script src="js/dx_bootstrap.js" type="text/javascript" charset="utf-8"></script>
|
|
|
|
|
<script src="js/dingtalk.open.js" type="text/javascript" charset="utf-8"></script>
|
|
|
|
|
<script src="js/layui/layui.js" type="text/javascript" charset="utf-8"></script>
|
|
|
|
|
<script src="js/script.js?v=2" type="text/javascript" charset="utf-8"></script>
|
|
|
|
|
</head>
|
2021-12-10 10:01:35 +00:00
|
|
|
|
|
2021-12-07 09:36:53 +00:00
|
|
|
|
<body class="w-100 p-40">
|
|
|
|
|
<div class="head p-25">
|
|
|
|
|
<div class="head-tit f-l">
|
|
|
|
|
<span class="color-w font-18">文件池管理</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="head-other f-r">
|
|
|
|
|
<div class="head-news f-l">
|
|
|
|
|
<!-- <div class="head-news-icon">
|
|
|
|
|
<img src="image/icon_02.png">
|
|
|
|
|
<span class="color-w"></span>
|
|
|
|
|
</div> -->
|
|
|
|
|
<div class="head-drop-down">
|
|
|
|
|
<ul class="down-ul">
|
|
|
|
|
<li data-id="1">系统通知(<i>0</i>)</li>
|
|
|
|
|
<li data-id="2">下载告警(<i>0</i>)</li>
|
|
|
|
|
</ul>
|
|
|
|
|
<div class="down-con">
|
|
|
|
|
<div>
|
|
|
|
|
<ul class="down-list list1">
|
|
|
|
|
</ul>
|
|
|
|
|
<ul class="down-list">
|
|
|
|
|
<li class="down-list-center">
|
|
|
|
|
<a href="notice.html" class="color-g6 font-14 t-c">查看全部</a>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<ul class="down-list list2">
|
|
|
|
|
</ul>
|
|
|
|
|
<ul class="down-list">
|
|
|
|
|
<li class="down-list-center">
|
|
|
|
|
<a href="notice.html" class="color-g6 font-14 t-c">查看全部</a>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="operation font-14">
|
|
|
|
|
<div class="f-l operation-list operation-icon">全部已读</div>
|
|
|
|
|
<div class="f-r operation-list"><a href="#" class="color-b">历史通知</a></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="head-name f-r">
|
|
|
|
|
<div class="img f-l">
|
|
|
|
|
<img src="image/img_01.png">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="name color-w f-l">钉钉用户名称</div>
|
2021-12-10 10:01:35 +00:00
|
|
|
|
<div class="xr">
|
|
|
|
|
<div class="qh">
|
|
|
|
|
<p>管理员</p>
|
|
|
|
|
<p>员工</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-12-07 09:36:53 +00:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-12-10 10:01:35 +00:00
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
console.log(localStorage['roleId'] == 2, "if");
|
|
|
|
|
|
|
|
|
|
window.onload = function () {
|
2021-12-07 09:36:53 +00:00
|
|
|
|
// alert(localStorage.getItem('pubilc')+'2')
|
2021-12-10 10:01:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let title = localStorage.getItem('pubilc')
|
|
|
|
|
$('#title').html(title)
|
|
|
|
|
|
2021-12-07 09:36:53 +00:00
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<div class="f-l nav">
|
|
|
|
|
<ul class="layui-nav layui-nav-tree" lay-filter="test" id="forMenu">
|
|
|
|
|
<!-- <li class="layui-nav-item" data-id="1">
|
|
|
|
|
<a href="index.html" class="nav-icon-public">公共文件</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="layui-nav-item" data-id="2"><a href="inside.html" class="nav-icon-inside">内部文件</a></li>
|
|
|
|
|
<li class="layui-nav-item" data-id="3"><a href="upload.html" class="nav-icon-upload">文件上传</a></li>
|
|
|
|
|
<li class="layui-nav-item" data-id="4"><a href="renew.html" class="nav-icon-renew">文件更新</a></li>
|
|
|
|
|
<li class="layui-nav-item" data-id="5">
|
|
|
|
|
<a href="javascript:;" class="nav-icon-set">设置</a>
|
|
|
|
|
<dl class="layui-nav-child">
|
|
|
|
|
<dd><a href="organization.html">组织设置</a></dd>
|
|
|
|
|
<dd><a href="Administration.html">主管理设置</a></dd>
|
|
|
|
|
<dd><a href="field.html">自定义字段</a></dd>
|
|
|
|
|
<dd><a href="record.html">操作记录</a></dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="layui-nav-item" data-id="6"><a href="notice.html" class="nav-icon-notice">通知</a></li> -->
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
|
|
layui.use(['element', 'layer'], function () {
|
|
|
|
|
|
|
|
|
|
var element = layui.element;
|
|
|
|
|
// $(window).on("load", function() {
|
|
|
|
|
$('.nav .layui-nav-tree .layui-nav-item').each(function (i) {
|
|
|
|
|
|
|
|
|
|
var that = $(this)
|
|
|
|
|
var newNum = $('.content-auto').attr('data-id')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (newNum == that.attr('data-id')) {
|
|
|
|
|
$('.nav .layui-nav-tree .layui-nav-item').removeClass('layui-nav-itemed').eq(i).addClass('layui-nav-itemed')
|
|
|
|
|
$('.nav .layui-nav-tree .layui-nav-item .layui-nav-child dd').each(function () {
|
|
|
|
|
if ($(this).index() + 1 == $('.content-auto').attr('data-two')) {
|
|
|
|
|
$(this).find('a').addClass('active')
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
var menuUrl = {};
|
|
|
|
|
menuUrl['menu1'] = 'index.html';
|
|
|
|
|
menuUrl['menu2'] = 'inside.html';
|
|
|
|
|
menuUrl['menu3'] = 'upload.html';
|
|
|
|
|
menuUrl['menu4'] = 'renew.html';
|
|
|
|
|
menuUrl['menu5'] = 'index.html';
|
|
|
|
|
menuUrl['menu6'] = 'notice.html';
|
|
|
|
|
menuUrl['menu7'] = 'organization.html';
|
|
|
|
|
menuUrl['menu8'] = 'Administration.html';
|
|
|
|
|
menuUrl['menu9'] = 'field.html';
|
|
|
|
|
menuUrl['menu10'] = 'record.html';
|
|
|
|
|
menuUrl['menu11'] = 'hidefile.html';
|
|
|
|
|
menuUrl['menu12'] = 'file.html';
|
|
|
|
|
var menuClass = {};
|
|
|
|
|
menuClass['menu1'] = 'nav-icon-public';
|
|
|
|
|
menuClass['menu2'] = 'nav-icon-inside';
|
|
|
|
|
menuClass['menu3'] = 'nav-icon-upload';
|
|
|
|
|
menuClass['menu4'] = 'nav-icon-renew';
|
|
|
|
|
menuClass['menu5'] = 'nav-icon-set';
|
|
|
|
|
menuClass['menu6'] = 'nav-icon-notice';
|
|
|
|
|
menuClass['menu11'] = 'nav-icon-public';
|
|
|
|
|
|
|
|
|
|
var menuIcon = {};
|
|
|
|
|
menuIcon['menu1'] = 'inco_app08';
|
|
|
|
|
menuIcon['menu2'] = 'inco_app08';
|
|
|
|
|
menuIcon['menu3'] = 'inco_app07';
|
|
|
|
|
menuIcon['menu4'] = 'inco_app06';
|
|
|
|
|
menuIcon['menu5'] = 'inco_app08';
|
|
|
|
|
menuIcon['menu6'] = 'inco_app12';
|
|
|
|
|
menuIcon['menu7'] = 'inco_app08';
|
|
|
|
|
menuIcon['menu8'] = 'inco_app09';
|
|
|
|
|
menuIcon['menu9'] = 'inco_app11';
|
|
|
|
|
menuIcon['menu10'] = 'inco_app10';
|
|
|
|
|
menuIcon['menu11'] = 'inco_app08';
|
|
|
|
|
|
|
|
|
|
var haveLogin = localStorage['haveLogin'] || false;
|
|
|
|
|
var loginIntervalLefter = setInterval(function () {
|
|
|
|
|
var tmpHaveLogin = localStorage['haveLogin'] || false;
|
|
|
|
|
if (tmpHaveLogin) {
|
|
|
|
|
clearInterval(loginIntervalLefter);
|
|
|
|
|
getMenu();
|
|
|
|
|
}
|
|
|
|
|
}, 500);
|
|
|
|
|
// if(haveLogin){
|
|
|
|
|
// getMenu();
|
|
|
|
|
// }else{
|
|
|
|
|
// var loginIntervalLefter = setInterval(function(){
|
|
|
|
|
// var tmpHaveLogin = localStorage['haveLogin'] || false;
|
|
|
|
|
// if(tmpHaveLogin){
|
|
|
|
|
// clearInterval(loginIntervalLefter);
|
|
|
|
|
// getMenu();
|
|
|
|
|
// }
|
|
|
|
|
// }, 500);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
function getMenu() {
|
|
|
|
|
|
|
|
|
|
var url = host + '/ding/menu/getMenuList';
|
|
|
|
|
dxtcRequest('get', url, {}, function (data) {
|
|
|
|
|
console.log(data)
|
|
|
|
|
var newNum = $('.content-auto').attr('data-id');
|
|
|
|
|
if (data.code == 200) {
|
|
|
|
|
if (data.data.length > 0) {
|
|
|
|
|
var html = '';
|
|
|
|
|
var phoneHtml = '';
|
|
|
|
|
var funcSectionBase = '';
|
|
|
|
|
var funcSectionConfig = '';
|
|
|
|
|
var funcSectionNotice = '';
|
|
|
|
|
var extHtml = '<div class="wh76"></div>';
|
|
|
|
|
data.data.forEach(function (item) {
|
|
|
|
|
|
|
|
|
|
var classStr = '';
|
|
|
|
|
if (item.id == newNum) {
|
|
|
|
|
classStr = 'layui-nav-itemed';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
html += '<li class="layui-nav-item ' + classStr + '" data-id="' + item.id + '">';
|
|
|
|
|
if (item.hasChildren) {
|
|
|
|
|
|
|
|
|
|
var childMenuId = $('.content-auto').attr('data-two')
|
|
|
|
|
html += '<a href="javascript:;" class="' + menuClass['menu' + item.id] + '" >' + item.name + '</a>';
|
|
|
|
|
html += '<dl class="layui-nav-child">';
|
|
|
|
|
item.children.forEach(function (child) {
|
|
|
|
|
var activeClass = '';
|
|
|
|
|
if (child.sort == childMenuId) {
|
|
|
|
|
activeClass = 'active';
|
|
|
|
|
}
|
|
|
|
|
html += '<dd><a href="' + menuUrl['menu' + child.id] + '" data-id="' + child.name + '" onclick="secondary(this)" class="' + activeClass + '">' + child.name + '</a></dd>';
|
|
|
|
|
});
|
|
|
|
|
html += '</dl>';
|
|
|
|
|
} else {
|
|
|
|
|
//var title=item.id`
|
|
|
|
|
//html += '<a href="'+menuUrl['menu'+item.id]+'" class="'+menuClass['menu'+item.id]+'" onclick="a('+item.name+')">'+item.name+'</a>';
|
|
|
|
|
html += '<a href="' + menuUrl['menu' + item.id] + '" class="' + menuClass['menu' + item.id] + '" data-id="' + item.name + '" onclick="sidebar(this)">' + item.name + '</a>';
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
html += '</li>';
|
|
|
|
|
|
|
|
|
|
// 手机版文件夹 只取id<=2
|
|
|
|
|
if (item.id <= 2 || item.id == 11) {
|
|
|
|
|
let activeStr = '';
|
|
|
|
|
let urlStr = `${menuUrl['menu' + item.id]}`;
|
|
|
|
|
if (item.id == newNum) {
|
|
|
|
|
classStr = 'active';
|
|
|
|
|
urlStr = 'javascript:;';
|
|
|
|
|
}
|
|
|
|
|
phoneHtml += `<a href="${urlStr}" class="${classStr}">${item.name}</a>`;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 手机版功能区 基本区域
|
|
|
|
|
if ($.inArray(item.id, [3, 4]) >= 0) {
|
|
|
|
|
funcSectionBase += `<div class="wh76 ">
|
|
|
|
|
<a href="${menuUrl['menu' + item.id]}" class="flexcolumn">
|
|
|
|
|
<img src="image/icon-app/${menuIcon['menu' + item.id]}.png" class="wh50" alt="">
|
|
|
|
|
<div class="displayCenter fontS12 margitt7">${item.name}</div>
|
|
|
|
|
</a>
|
|
|
|
|
</div>`;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 手机版功能区 设置区域
|
|
|
|
|
if (item.id === 5) {
|
|
|
|
|
item.children.forEach(function (it) {
|
|
|
|
|
funcSectionConfig += `<div class="wh76 ">
|
|
|
|
|
<a href="${menuUrl['menu' + it.id]}" class="flexcolumn">
|
|
|
|
|
<img src="image/icon-app/${menuIcon['menu' + it.id]}.png" class="wh50" alt="">
|
|
|
|
|
<div class="displayCenter fontS12 margitt7">${it.name}</div>
|
|
|
|
|
</a>
|
|
|
|
|
</div>`;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
// 手机版功能区 通知区域
|
|
|
|
|
if (item.id === 6) {
|
|
|
|
|
funcSectionNotice += `<div class="wh76 ">
|
|
|
|
|
<a href="${menuUrl['menu' + item.id]}" class="flexcolumn">
|
|
|
|
|
<img src="image/icon-app/${menuIcon['menu' + item.id]}.png" class="wh50" alt="">
|
|
|
|
|
<div class="displayCenter fontS12 margitt7">${item.name}</div>
|
|
|
|
|
</a>
|
|
|
|
|
</div>`;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
let baseCount = $(funcSectionBase).find('a').length;
|
|
|
|
|
let configCount = $(funcSectionConfig).find('a').length;
|
|
|
|
|
let noticeCount = $(funcSectionNotice).find('a').length;
|
|
|
|
|
funcSectionBase += baseCount > 0 ? extHtml.repeat(4 - baseCount) : '';
|
|
|
|
|
funcSectionConfig += configCount > 0 ? extHtml.repeat(4 - configCount) : '';
|
|
|
|
|
funcSectionNotice += noticeCount > 0 ? extHtml.repeat(4 - noticeCount) : '';
|
|
|
|
|
$('#forMenu').html(html);
|
|
|
|
|
|
|
|
|
|
$('#phone-menu').html(phoneHtml);
|
|
|
|
|
$('#func-section').find('.base').html(funcSectionBase);
|
|
|
|
|
$('#func-section').find('.config').html(funcSectionConfig);
|
|
|
|
|
$('#func-section').find('.notice').html(funcSectionNotice);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
element.init();
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
layer.msg(data.msg)
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
function sidebar(obj) {
|
|
|
|
|
localStorage.setItem('pubilc', $(obj).data('id'))
|
|
|
|
|
}
|
|
|
|
|
function secondary(data) {
|
|
|
|
|
localStorage.setItem('pubilc', $(data).data('id'))
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<div class="f-r content ">
|
|
|
|
|
<div class="content-auto pr" data-id="6" data-two="5">
|
|
|
|
|
<div class="con-tit font-20 pc-block">
|
|
|
|
|
设置
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="file-tit">
|
|
|
|
|
<p class="file-tit-name">文件夹图片管理</p>
|
|
|
|
|
<div class=" file-tit-button ">
|
|
|
|
|
<a class="file-tit-btn editorBtn">编辑文件</a>
|
|
|
|
|
<p class="file-tit-btn moveBtn">删除文件</p>
|
|
|
|
|
<a class="file-tit-btn addTitBtn">添加图片</a>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="file-con ps">
|
|
|
|
|
<div class="file-con-img">
|
|
|
|
|
<img src="" alt="">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="file-make">
|
|
|
|
|
<div class="file-make-con">
|
|
|
|
|
<h2>新增文件夹图片</h2>
|
|
|
|
|
<div class="name">
|
|
|
|
|
<p>图片名称</p>
|
|
|
|
|
<input type="text">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="file-upload">
|
|
|
|
|
<p>请选择你要新增的图片</p>
|
|
|
|
|
<div class="layui-upload">
|
|
|
|
|
<button type="button" class="layui-btn" id="test1" name="123">上传图片</button>
|
|
|
|
|
|
|
|
|
|
<div class="layui-upload-list">
|
|
|
|
|
<img class="layui-upload-img" src="" id="demo1">
|
|
|
|
|
<p id="demoText"></p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="btn-con">
|
|
|
|
|
<div class="addBtn btn">
|
|
|
|
|
确定新增
|
|
|
|
|
</div>
|
|
|
|
|
<div class="btn btnmove">
|
|
|
|
|
取消新增
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
getFile()
|
|
|
|
|
let dataDelet = []
|
|
|
|
|
|
|
|
|
|
// 事件
|
|
|
|
|
$(".addTitBtn").on("click", () => {
|
|
|
|
|
$(".file-make").css("display", "flex")
|
|
|
|
|
})
|
|
|
|
|
$(".btnmove").on("click", () => {
|
|
|
|
|
$(".file-make").css("display", "none")
|
|
|
|
|
})
|
|
|
|
|
$(".moveBtn").on("click", () => {
|
|
|
|
|
layer.confirm('确定选中图片?', {
|
|
|
|
|
btn: ['确定', '取消'] //可以无限个按钮
|
|
|
|
|
, btn3: function (index, layero) {
|
|
|
|
|
}
|
|
|
|
|
}, function (index, layero) {
|
|
|
|
|
for (let index = 0; index < dataDelet.length; index++) {
|
|
|
|
|
deletFile(dataDelet[index].id)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}, function (index) {
|
|
|
|
|
layer.closeAll()
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
$(".addBtn").on("click", () => {
|
|
|
|
|
addFile(
|
|
|
|
|
{
|
|
|
|
|
name: "测试",
|
|
|
|
|
coverImg: "ceshi"
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
let editorBtnIf = true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(".editorBtn").on("click", (e) => {
|
|
|
|
|
if (editorBtnIf) {
|
|
|
|
|
$(e.target).html("取消编辑")
|
|
|
|
|
$(".delet-cken").css("display", "block")
|
|
|
|
|
editorBtnIf = !editorBtnIf
|
|
|
|
|
} else {
|
|
|
|
|
dataDelet = []
|
|
|
|
|
$(e.target).html("编辑文件")
|
|
|
|
|
$(".delet-cken").css("display", "none")
|
|
|
|
|
editorBtnIf = !editorBtnIf
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 查询
|
|
|
|
|
function getFile() {
|
|
|
|
|
let url = host + '/ding/folder/getFolderType'
|
|
|
|
|
dxtcRequest('get', url, {}, function name(data) {
|
|
|
|
|
if (data.code == 200) {
|
|
|
|
|
let str = data.data.map((v) => `<div class="file-con-img">
|
|
|
|
|
<img src="${v.coverImg}" alt="">
|
|
|
|
|
<span class="delet-cken" data-id="${v.id}"></span>
|
|
|
|
|
</div>`).join("")
|
|
|
|
|
$(".file-con").html(`${str}`)
|
|
|
|
|
|
|
|
|
|
$(".delet-cken").on("click", (e) => {
|
|
|
|
|
|
|
|
|
|
let id = $(e.target).attr("data-id")
|
|
|
|
|
let da = {
|
|
|
|
|
daIf: true
|
|
|
|
|
};
|
|
|
|
|
for (let index = 0; index < dataDelet.length; index++) {
|
|
|
|
|
console.log(dataDelet[index].id, 'a');
|
|
|
|
|
console.log(id, "b");
|
|
|
|
|
if (dataDelet[index].id == id) {
|
|
|
|
|
da.num = index
|
|
|
|
|
da.daIf = false
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (da.daIf) {
|
|
|
|
|
dataDelet.push({ id: id })
|
|
|
|
|
$(e.target).css("backgroundColor", "red")
|
|
|
|
|
} else {
|
|
|
|
|
dataDelet.splice(da.num, 1)
|
|
|
|
|
$(e.target).css("backgroundColor", "rgba(0,0,0,0)")
|
|
|
|
|
}
|
|
|
|
|
console.log(dataDelet, "123");
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
layer.msg(data.msg)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function addFile(data) {
|
|
|
|
|
let contentType = "application/json"
|
|
|
|
|
let url = host + '/ding/folder/saveFolderType'
|
|
|
|
|
dxtcRequest('post', url, JSON.stringify(data), function name(data) {
|
|
|
|
|
if (data.code == 200) {
|
|
|
|
|
console.log(data);
|
|
|
|
|
} else {
|
|
|
|
|
layer.msg(data.msg)
|
|
|
|
|
}
|
|
|
|
|
}, contentType)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 删除
|
|
|
|
|
|
|
|
|
|
function deletFile(id) {
|
|
|
|
|
let contentType = "application/json"
|
|
|
|
|
let url = host + '/ding/folder/delFolderType'
|
|
|
|
|
dxtcRequest('post', url, JSON.stringify({ "id": id }), function name(data) {
|
|
|
|
|
dataDelet = []
|
|
|
|
|
if (data.code == 200) {
|
|
|
|
|
console.log(data);
|
|
|
|
|
} else {
|
|
|
|
|
layer.msg(data.msg)
|
|
|
|
|
}
|
|
|
|
|
}, contentType)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
layui.use(['element','form','laydate','layer'],function(){
|
|
|
|
|
var element = layui.element;
|
|
|
|
|
var form = layui.form;
|
|
|
|
|
var laydate = layui.laydate;
|
|
|
|
|
var layer = layui.layer;
|
|
|
|
|
//单时间
|
|
|
|
|
laydate.render({
|
|
|
|
|
elem: '.layui-time',
|
|
|
|
|
theme: '#3e5afa',
|
|
|
|
|
type:'date',
|
|
|
|
|
format: 'yyyy-MM-dd',
|
|
|
|
|
max: 0
|
|
|
|
|
});
|
|
|
|
|
//时间段
|
|
|
|
|
laydate.render({
|
|
|
|
|
elem: '.layui-time-time',
|
|
|
|
|
range: true,
|
|
|
|
|
theme: '#3e5afa'
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
<!--appfooter-->
|
|
|
|
|
<div class="height84 poflexfoot">
|
|
|
|
|
<div class="height50 display disLeftRihgt aligncneter">
|
|
|
|
|
<div class=" widthb50" id="1">
|
|
|
|
|
<a href="index.html" class="flexcolumn">
|
|
|
|
|
<img src="image/icon-app/inco_app03.png" class="wh20">
|
|
|
|
|
<div class="displayCenter fontS12 margitt7" >文件夹</div>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class=" widthb50" id="2">
|
|
|
|
|
<a href="appHome.html" class="flexcolumn">
|
|
|
|
|
<img src="image/icon-app/inco_app04.png" class="wh20">
|
|
|
|
|
<div class="displayCenter fontS12 margitt7" >功能区</div>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
$('#1').click(function(){
|
|
|
|
|
localStorage.setItem('pubilc','公共文件')
|
|
|
|
|
})
|
|
|
|
|
$('#2').click(function(){
|
|
|
|
|
localStorage.setItem('pubilc','功能区')
|
|
|
|
|
})
|
|
|
|
|
</script>
|