钉钉修改

master
tangyi 2021-12-07 17:36:53 +08:00
commit 5ba09c9c14
250 changed files with 34228 additions and 0 deletions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
.htaccess
nginx.htaccess
node_modules
.rar
.zip

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"liveServer.settings.port": 8080
}

785
dist/Administration.html vendored Normal file
View File

@ -0,0 +1,785 @@
<!doctype html>
<html lang="en">
<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>
<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>
</div>
</div>
</div>
<script type="text/javascript">
window.onload=function(){
// alert(localStorage.getItem('pubilc')+'2')
let title=localStorage.getItem('pubilc')
$('#title').html(title)
}
</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" data-id="5" data-two="2">
<div class="con-tit font-20 pc-block">
设置
</div>
<div class="con-seclevel font-18 bg-w top20 phone-top-0 ">
<span class="pc-block">主管理设置</span>
<a href="javascript:;" class="add2" onclick="choosePeopleAddoperator()">+添加主操作员</a>
<a href="javascript:;" class="add" onclick="choosePeople()">+添加主管理员</a>
</div>
<div class="con-content top20 con-content-none">
<div class="con-text bg-w pc-block">
<!--管理-->
<div class="org-list">
<div class="org-con top20">
<div>
<div class="org-remarks">
<p>主管理员权限:</p>
<p>1. 查看、下载所有文件; </p>
<p>2. 添加组织、组织设置、创建公共文件分类和创建主操作员; </p>
</div>
<div class="org-list list-content top20">
<table class="table">
<thead>
<tr>
<th>姓名</th>
<th>职位</th>
<th>组织</th>
<th>联系电话</th>
<th>操作</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<!--page-->
<div class="page t-r" id="page"></div>
</div>
</div>
</div>
</div>
<!--手机版-->
<div class="org-phone-list phone-block"></div>
</div>
</div>
</div>
<div class="history small">
<div class="center-center download-hight">
<div class="history-content bg-w">
<div class="on-name">
<h3 class="font-14">移交总管理员</h3>
</div>
<a href="javascript:;" class="close">&nbsp;</a>
<form class="layui-form" action="">
<div class="p-25">
<!--文件夹-->
<div class="con-list bg-w top20 add-border">
<div class="layui-form-item">
<label class="layui-form-label">请选择</label>
<div class="layui-input-block">
<select name="toBossUserId" class="toBossUserId" lay-verify="required" lay-reqtext="请选择">
<option value="">请选择</option>
</select>
</div>
</div>
</div>
<!--保存-->
<div class="upload-form t-r">
<button class="flie-btn" lay-submit lay-filter="formDemo2">保存</button>
<button type="reset" class="flie-btn flie-btn-primary field-btn">取消</button>
</div>
</div>
</form>
</div>
</div>
</div>
<link rel="stylesheet" type="text/css" href="js/orgTree/orgTree.css"/>
<script src="js/orgTree/orgTree.js" type="text/javascript" charset="utf-8"></script>
<script type="text/html" id="list-item-tpl">
{{# layui.each(d.items, function(idx, item) { }}
<div class="list bg-w">
<div class="img"><img src="image/img_01.png"/></div>
<div class="text">
<h3>{{item.name}}</h3>
<p>{{item.phone}}</p>
<div class="last">
<span>{{item.deptName}}</span>
<span>{{item.deptName}}</span>
</div>
</div>
{{# if (idx === 0) { }}
<a href="javascript:;" onclick="transfer(this)" data-id="{{item.userId}}" class="btn-transfer del transfer">&nbsp;</a>
{{# } else { }}
<a href="javascript:;" onclick="removeUser(this)" data-id="{{item.userId}}" class="btn-del del">&nbsp;</a>
{{# } }}
</div>
{{# }); }}
</script>
<script>
var tckd = ['620px','542px'];
if($(window).width() <= 425){
tckd = ['90%','90%'];
}
var itemTpl = $('#list-item-tpl').html(), $items = $('.org-phone-list');
function renderList(items) {
if (MobileLib.isMobile()) {
$items.html(layui.laytpl(itemTpl).render({ items: items }))
return true
}
return false
}
layui.use(['element', 'form', 'laydate', 'laypage', 'laytpl'], function() {
var laypage = layui.laypage;
var element = layui.element;
var form = layui.form;
var laydate = layui.laydate;
var mainUserListIntervalScript = setInterval(function(){
var tmpHaveLogin = localStorage['haveLogin'] || false;
if(tmpHaveLogin){
clearInterval(mainUserListIntervalScript);
initMainUserList();
}
}, 500);
//获取管理员列表
function initMainUserList(){
$.ajax({
url: host + '/ding/dept/getMainUserList'+'?timetmp='+ Date.parse( new Date() ).toString().substr(0,10),
headers: {
'Blade-Auth': 'bearer ' + localStorage.accessToken
},
data: {
current:1,
size:10
},
type: "get",
contentType:"application/json",
dataType: "json",
success: function(data) {
if (data.code == 200) {
if (renderList(data.data.records || [])) {
return
}
$('.list-content .table tbody').empty()
if(data.data.records.length > 0){
data.data.records.forEach(function(item){
var html = '<tr>'
+'<td><div class="list-img"><img src="image/img_01.png"><span>'+item.name+'</span></div></td>'
+'<td>'+item.deptName+'</td>'
+'<td>'+item.deptName+'</td>'
+'<td>'+item.phone+'</td>'
+'<td>'
if(item.roleId == 1){
html += '<a href="javascript:;" class="color-org" data-id="'+item.userId+'" onclick="transfer(this)">移交</a>'
}else{
html +='<a href="javascript:;" class="color-r" data-roleId="'+item.roleId+'" data-id="'+item.userId+'" onclick="removeUser(this)">删除</a>'
}
+'</td>'
+'</tr>'
$('.list-content .table tbody').append(html)
})
laypage.render({
elem: 'page',
limit: data.data.size,
count: data.data.total,
layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'],
jump: function(obj,first) {
if(!first){
getMainUserList(obj.curr,obj.limit)
}
}
});
}
} else {
layer.msg(data.msg)
}
},
error: function(data) {
console.log(data);
}
});
}
form.on('submit(formDemo2)', function(data){
var data = {
toBossUserId: data.field.toBossUserId
}
$.ajax({
url: host + '/ding/dept/moveBossUser',
headers: {
'Blade-Auth': 'bearer ' + localStorage.accessToken
},
data: JSON.stringify(data),
type: "post",
contentType:"application/json",
dataType: "json",
success: function(data) {
if (data.code == 200) {
getMainUserList('','')
} else {
layer.msg(data.msg)
}
},
error: function(data) {
layer.msg(data.responseJSON.msg)
}
});
return false;
});
});
//获取列表
function getMainUserList(obj1,obj2){
$.ajax({
url: host + '/ding/dept/getMainUserList'+'?timetmp='+ Date.parse( new Date() ).toString().substr(0,10),
headers: {
'Blade-Auth': 'bearer ' + localStorage.accessToken
},
data: {
current:obj1,
size:obj2
},
type: "get",
contentType:"application/json",
dataType: "json",
success: function(data) {
if (data.code == 200) {
if (renderList(data.data.records || [])) {
return
}
$('.list-content .table tbody').empty()
if(data.data.records.length > 0){
data.data.records.forEach(function(item){
var html = '<tr>'
+'<td><div class="list-img"><img src="image/img_01.png"><span>'+item.name+'</span></div></td>'
+'<td>'+item.deptName+'</td>'
+'<td>'+item.deptName+'</td>'
+'<td>'+item.phone+'</td>'
+'<td>'
if(item.roleId == 1){
html += '<a href="javascript:;" class="color-org" data-id="'+item.userId+'" onclick="transfer(this)">移交</a>'
}else{
html +='<a href="javascript:;" class="color-r" data-roleId="'+item.roleId+'" data-id="'+item.userId+'" onclick="removeUser(this)">删除</a>'
}
+'</td>'
+'</tr>'
$('.list-content .table tbody').append(html)
})
}
} else {
layer.msg(data.msg)
}
},
error: function(data) {
console.log(data);
}
});
}
//移交
function transfer(obj){
$('.history').show()
$.ajax({
url: host + '/ding/dept/getMainUserList'+'?timetmp='+ Date.parse( new Date() ).toString().substr(0,10),
headers: {
'Blade-Auth': 'bearer ' + localStorage.accessToken
},
data: {
current:'',
size:100
},
type: "get",
contentType:"application/json",
dataType: "json",
success: function(data) {
if (data.code == 200) {
$('.toBossUserId option').next().empty()
if(data.data.records.length > 0){
data.data.records.forEach(function(item){
if(item.userId != localStorage.userId){
}
$('.toBossUserId').append('<option value="'+item.userId+'">'+item.name+'</option>')
})
layui.use(['element', 'form', 'laydate', 'laypage'], function() {
var form = layui.form
form.render()
})
}
} else {
layer.msg(data.msg)
}
},
error: function(data) {
console.log(data);
}
});
}
//删除
function removeUser(obj){
layer.confirm('是否删除?', {icon: 3, title:'提示'}, function(index){
var ajaxdata = {
"folderId": 0,
"roleId":$(obj).attr('data-roleId'),
"toBossUserId": "",
"userIds": [$(obj).attr('data-id')]
}
$.ajax({
url: host + '/ding/dept/delUser'+'?timetmp='+ Date.parse( new Date() ).toString().substr(0,10),
headers: {
'Blade-Auth': 'bearer ' + localStorage.accessToken
},
data: JSON.stringify(ajaxdata),
type: "post",
contentType:"application/json",
dataType: "json",
success: function(data) {
if (data.code == 200) {
getMainUserList('','')
layer.close(index);
} else {
layer.msg(data.msg)
}
},
error: function(data) {
console.log(data);
}
});
});
return false
}
//添加主管理员人员
function choosePeople(){
dd.biz.contact.complexPicker({
title:"添加主管理人员", //标题
corpId:corpId, //企业的corpId
multiple:true, //是否多选
limitTips:"超出了", //超过限定人数返回提示
maxUsers:1000, //最大可选人数
pickedUsers:[], //已选用户
pickedDepartments:[], //已选部门
disabledUsers:[], //不可选用户
disabledDepartments:[], //不可选部门
requiredUsers:[], //必选用户(不可取消选中状态)
requiredDepartments:[], //必选部门(不可取消选中状态)
appId:agentId, //微应用Id企业内部应用查看AgentId
permissionType:"GLOBAL", //可添加权限校验选人权限目前只有GLOBAL这个参数
responseUserOnly:false, //返回人,或者返回人和部门
startWithDepartmentId:0 , //仅支持0和-1
onSuccess: function(result) {
/**
{
selectedCount:1, //选择人数
users:[{"name":"","avatar":"","userid":""}]//返回选人的列表列表中的对象包含name用户名avatar用户头像emplId用户工号三个字段
departments:[{"id":,"name":"","number":}]//返回已选部门列表列表中每个对象包含id部门id、name部门名称、number部门人数
}
*/
console.log(result)
var arr = []
result.users.forEach(function(item){
arr.push(item.emplId)
})
var ajaxdata = {
"folderId": 0,
"roleId": 2,
"toBossUserId": "",
"userIds": arr
}
$.ajax({
url: host + '/ding/dept/addUser'+'?timetmp='+ Date.parse( new Date() ).toString().substr(0,10),
headers: {
'Blade-Auth': 'bearer ' + localStorage.accessToken
},
data: JSON.stringify(ajaxdata),
type: "post",
contentType:"application/json",
dataType: "json",
success: function(data) {
if (data.code == 200) {
getMainUserList('','')
} else {
layer.msg(data.msg)
}
},
error: function(data) {
console.log(data);
}
});
},
onFail : function(err) {}
});
}
//添加主操作人员
function choosePeopleAddoperator(){
dd.biz.contact.complexPicker({
title:"添加主操作人员", //标题
corpId:corpId, //企业的corpId
multiple:true, //是否多选
limitTips:"超出了", //超过限定人数返回提示
maxUsers:1000, //最大可选人数
pickedUsers:[], //已选用户
pickedDepartments:[], //已选部门
disabledUsers:[], //不可选用户
disabledDepartments:[], //不可选部门
requiredUsers:[], //必选用户(不可取消选中状态)
requiredDepartments:[], //必选部门(不可取消选中状态)
appId:agentId, //微应用Id企业内部应用查看AgentId
permissionType:"GLOBAL", //可添加权限校验选人权限目前只有GLOBAL这个参数
responseUserOnly:false, //返回人,或者返回人和部门
startWithDepartmentId:0 , //仅支持0和-1
onSuccess: function(result) {
/**
{
selectedCount:1, //选择人数
users:[{"name":"","avatar":"","userid":""}]//返回选人的列表列表中的对象包含name用户名avatar用户头像emplId用户工号三个字段
departments:[{"id":,"name":"","number":}]//返回已选部门列表列表中每个对象包含id部门id、name部门名称、number部门人数
}
*/
var arr = []
result.users.forEach(function(item){
arr.push(item.emplId)
})
var ajaxdata = {
"folderId": 0,
"roleId": 4,
"toBossUserId": "",
"userIds": arr
}
$.ajax({
url: host + '/ding/dept/addUser'+'?timetmp='+ Date.parse( new Date() ).toString().substr(0,10),
headers: {
'Blade-Auth': 'bearer ' + localStorage.accessToken
},
data: JSON.stringify(ajaxdata),
type: "post",
contentType:"application/json",
dataType: "json",
success: function(data) {
if (data.code == 200) {
getMainUserList('','')
} else {
layer.msg(data.msg)
}
},
error: function(data) {
console.log(data);
}
});
},
onFail : function(err) {}
});
}
</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>

399
dist/appHome.html vendored Normal file
View File

@ -0,0 +1,399 @@
<!doctype html>
<html lang="en">
<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>
<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>
</div>
</div>
</div>
<script type="text/javascript">
window.onload=function(){
// alert(localStorage.getItem('pubilc')+'2')
let title=localStorage.getItem('pubilc')
$('#title').html(title)
}
</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="phone-top-20" id="func-section">
<div class="borderblockbgfff">
<div class="fonttitle">基本功能</div>
<div class="display disLeftRihgt aligncneter base">
<!-- <div class="wh76 ">
<a href="upload.html">
<img src="image/icon-app/inco_app07.png" class="wh50" alt="">
<div class="displayCenter fontS12 margitt7">文件上传</div>
</a>
</div>
<div class="wh76">
<a href="renew.html">
<img src="image/icon-app/inco_app06.png" class="wh50" alt="">
<div class="displayCenter fontS12 margitt7">文件更新</div>
</a>
</div>
<div class="wh76"></div>
<div class="wh76"></div> -->
</div>
</div>
<div class="borderblockbgfff">
<div class="fonttitle">高级设置</div>
<div class="display disLeftRihgt aligncneter config">
<!-- <div class="wh76">
<a href="organization.html">
<img src="image/icon-app/inco_app08.png" class="wh50">
<div class="displayCenter fontS12 margitt7">组织设置</div>
</a>
</div>
<div class="wh76">
<a href="Administration.html" class="flexcolumn">
<img src="image/icon-app/inco_app09.png" class="wh50">
<div class="displayCenter fontS12 margitt7">主管理员设置</div>
</a>
</div>
<div class="wh76">
<a href="field.html">
<img src="image/icon-app/inco_app11.png" class="wh50">
<div class="displayCenter fontS12 margitt7">自定义字段</div>
</a>
</div>
<div class="wh76">
<a href="record.html">
<img src="image/icon-app/inco_app10.png" class="wh50">
<div class="displayCenter fontS12 margitt7">操作记录</div>
</a>
</div> -->
</div>
</div>
<div class="borderblockbgfff">
<div class="fonttitle">消息通知</div>
<div class="display disLeftRihgt aligncneter notice">
<!-- <div class="wh76">
<a href="notice.html">
<img src="image/icon-app/inco_app12.png" class="wh50">
<div class="displayCenter fontS12 margitt7">消息通知</div>
</a>
</div> -->
<!-- <div class="wh76">
<a href="notice.html">
<img src="image/icon-app/inco_app13.png" class="wh50">
<div class="displayCenter fontS12 margitt7">下载警告</div>
</a>
</div> -->
<!-- <div class="wh76"></div>
<div class="wh76"></div> -->
</div>
</div>
</div>
<script>
$('.wh76').click(() => {
dd.biz.util.open({
name: 'organization',//页面名称
params: '',//传参
onSuccess: function () {
},
onFail: function (err) { }
});
})
</script>
<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>

3067
dist/css/animate.min.css vendored Normal file

File diff suppressed because it is too large Load Diff

5
dist/css/bootstrap.min.css vendored Normal file

File diff suppressed because one or more lines are too long

628
dist/css/mobile.css vendored Normal file
View File

@ -0,0 +1,628 @@
.head, .nav {
display: none;
}
.phone-bg-w{
background: #fff;
}
.poflexfoot {
display: block;
}
.content,.content-auto{
width: 100%;
height: 100vh;
}
.content-pd-50,.content-pd-50 .content-auto{
height: calc(100vh - 50px);
}
.list-content > ul {
text-align: center;
}
.list-content > ul > .list {
width: 33.3333%;
margin: 0;
text-align: left;
}
.con-list-mero {
position: relative;
float: left;
margin-left: 1rem;
}
.con-list-cn .list-content{
overflow: auto;
white-space: nowrap;
}
.filter-icon {
display: block !important;
}
#toggle-filter {
background: url(../image/icon-app/inco_app05.png) no-repeat center / 17px;
}
.file-filter-layer .layui-layer-content {
padding: 25px;
}
.content-auto > .con-search {
height: 0;
overflow: hidden;
padding: 0;
}
.con-search .layui-form-item {
width: 100%;
}
.pc-block,.pc-inline{
display: none;
}
.phone-block {
display: block;
}
.phone-inline{
display: inline-block;
}
.phone-bg-none {
background: none;
}
.phone-top-0 {
margin-top: 0px;
}
.phone-top-20{
margin-top: 20px;
}
.phone-padding-0{
padding: 0;
}
.phone-padding-10{
padding: 10px 0;
}
/**/
.con-list {
padding: 0px;
}
.con-list .phone-tit {
padding: 20px;
background: #fff;
margin-bottom: 20px;
}
.con-list-mero {
float: right;
}
.toolbox {
float: right;
}
.con-list .phone-tit .name {
width: auto;
}
.con-list .phone-tit .name a {
font-size: 16px;
margin-right: 20px;
position: relative;
display: inline-block;
}
.con-list .phone-tit .name a.active::after {
width: 20px;
height: 3px;
content: "";
background-color: #3d59f8;
position: absolute;
bottom: -3px;
left: 50%;
margin-left: -10px;
border-radius: 3px;
}
.list-content > ul > .list {
text-align: center;
}
.list-content > ul > .list .img, .list-content .list .list-hight {
width: 100%;
background: #fff;
padding: 10px;
}
.list-content .list .list-hight{
padding-top: 0px;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
-webkit-line-clamp: 1;
width: 100%;
display: inline-block;
}
.list-content .list:nth-child(8n) {
margin-right: 0px;
}
.list-content table {
background: #fff;
margin-top: 20px;
}
.list-content .list:hover {
background: none;
}
.con-list-cn {
margin-top: 0px;
}
.con-search .layui-btn,.flie-btn{
width: calc((100% - 20px) / 2);
float: left;
}
.upload-form .flie-btn:last-child{
margin-right: 0px;
}
.content-auto {
padding:10px 10px 10px;
}
.no-con-list {
padding: 0;
}
.no-con-list img {
max-width: 100%;
}
.con-content:after {
height: auto;
}
.con-mune {
width: 100%;
}
.con-mune ul {
padding: 0 25px;
}
.hide-wide {
display: block;
}
.show-wide {
display: none;
}
.hide-mobile {
display: none;
}
.show-mobile {
display: block;
}
.text-gray {
color: #a9a9a9;
}
.avatar {
border-radius: 50%;
width: 32px;
height: 32px;
}
.down-arrow {
padding-right: 25px;
background: url(../image/icon-app/down-arrow.svg) no-repeat right;
}
.float-right {
color: #a9a9a9;
float: right;
padding-right: 25px;
background: url(../image/icon-app/left-arrow.svg) no-repeat right;
}
.float-right > svg {
float: left;
}
.list-content table.table td .list-img img, .history-content table.table td .list-img img{
float: none;
max-width: inherit;
}
.layui-laypage a, .layui-laypage span{
margin-bottom: 0px;
height: 30px;
line-height: 30px;
}
.layui-laypage select{
height: 25px;
}
.layui-laypage{
background: #fff;
padding: 10px;
}
.con-tit:after{
display: none;
}
.con-tit .add{
width: 100%;
}
/**/
.add-list .add-list-tow .list,.add-list.phone-add-list .list {
width: 100%;
display: inline-block;
margin-right: 0;
border-bottom: 1px solid rgba(238,238,238,1);
}
.add-list .phone-add-list{
padding-bottom: 10px;
}
.add-list .phone-add-list .renew-list{
padding-bottom: 0px;
}
.add-list .add-list-tow .list .layui-input-block,.add-list .phone-add-list .layui-input-block{
width:calc(100% - 80px);
display: inline-block;
}
.add-list .add-list-tow .list .layui-form-label,.add-list .phone-add-list .layui-form-label{
width: 80px;
float: left;
}
.add-list .add-list-tow .list .layui-input,.add-list .add-list-tow .list .layui-select,.add-list .add-list-tow .list .xm-select-parent .xm-input, .add-list .phone-add-list .list .xm-select-parent .xm-input{
border:none
}
.layui-upload-list .list,.add-path .path-list li{
width: 100%;
}
.download, .history{
padding: 10px;
}
.p-25{
padding-left: 10px;
padding-right: 10px;
}
.upload .list-content .list, .upload .list-content .list:nth-child(8n), .upload .list-content .list:nth-child(5n),.upload .list-content .list:nth-child(7n){
width: calc((100% - 40px) / 3);
margin-right: 20px;
}
.upload .list-content .list:nth-child(3n){
margin-right: 0;
}
.history .con-list-cn .list-content{
max-height: 250px;
}
.phone-layui-tit{
border: none;
}
.phone-layui-tit .layui-form-label{
width: 100%;
float: none;
color: #999;
}
.add-list .phone-layui-tit .layui-input-block{
margin-left: 0px;
}
.phone-layui-tit .layui-form-radio>i,.phone-layui-tit .layui-form-radioed > i{
display: none;
}
.phone-layui-tit .layui-form-radio div{
padding: 5px 20px;
background: rgb(199, 199, 202);
color: #fff;
}
.phone-layui-tit .layui-form-radioed div{
background: rgb(61, 90, 254);
}
.layui-form-item{
margin-bottom: 10px;
}
.history-content{
padding-bottom: 20px;
}
/**/
.con-seclevel{
line-height: inherit;
}
.con-seclevel .form-control__dept{
margin-left: 0;
float: none;
display: inline-block;
}
.con-seclevel .js_party_select_result{
margin-top: 0px;
}
.con-seclevel .add,.con-seclevel .add2{
top: 0;
right: 0;
display: inline-block;
width: 46%;
position: relative;
margin: 0;
}
.con-seclevel .add.js_show_party_selector{
width: 100%;
}
.con-seclevel .add2{
margin-right: 4%;
}
.con-mune .name.pc-block{
display: none;
}
.switch .list-group {
padding: 20px 0;
}
.switch .list-group-item{
border: none;
color: #666;
border-radius: 0px;
text-align: center;
padding: 15px 0;
font-size: 16px;
}
.switch .list-group-item.active {
border-radius: 0px;
border: 1px solid #e3e3e3;
color: #000;
background-color: #fff;
border-left: none;
border-right: none;
}
.list-people{
padding: 20px;
}
.list-people .list-group-item{
background: rgb(245, 245, 245);
border: none;
margin-bottom: 20px;
}
.list-people .list-group-item .list-del{
position: absolute;
right: 10px;
height: 16px;
width: 16px;
top: 50%;
margin-top: -8px;
background-position: 1px -40px;
cursor: pointer;
}
.model-add{
float: right;
height: 30px;
line-height: 30px;
color: rgba(61, 90, 254, 1)
}
.org-phone-list .list{
padding: 10px 43px 10px 53px;
margin-bottom: 10px;
border-radius: 3px;
position: relative;
}
.org-phone-list .list .img{
width: 30px;
height: 30px;
position: absolute;
left: 10px;
border-radius: 50%;
}
.org-phone-list .list .img img{
width: 30px;
height: 30px;
overflow: hidden;
border-radius: 50%;
}
.org-phone-list .list .text h3{
font-size: 14px;
color: #000;
}
.org-phone-list .list .text p{
font-size: 12px;
color: #999;
margin: 5px 0 10px;
}
.org-phone-list .list .text div.last{
display: inline-block;
width: 100%;
font-size: 12px;
color: #999;
}
.org-phone-list .list .text div.last span:last-child{
margin-left: 50px;
}
.org-phone-list .del{
position: absolute;
top: 50%;
right: 20px;
margin-top: -10px;
width: 20px;
height: 20px;
background: url(../image/icon_33.png) no-repeat center / 15px;
}
.org-phone-list .transfer{
background: url(../image/icon_38.png) no-repeat center / 15px;
}
.con-seclevel.con-seclevel-padding{
padding:10px 0px;
}
.field-tab-title{
float: none;
background: none;
border: none;
}
.field-tab-title li{
position: relative;
font-size: 14px;
}
.field-tab-title li.active{
background: none;
}
.field-tab-title li.active a{
color: #000;
}
.field-tab-title li.active::after{
content: "";
background: #3d5afe;
height: 3px;
width: 30px;
position: absolute;
bottom: -5px;
left: 50%;
margin-left: -15px;
border-radius: 3px;
}
.list-content .list.establish,
.list-content .list.establish a .img,
.list-content .list.establish a .list-hight{
background: none;
border: none;
}
.list-content .list.establish a{
display: block;
background: #f5f6ff;
border: 1px dotted #3d59f8;
border-radius: 5px;
}
.list-content > ul > .list .img{
border-radius: 5px 5px 0 0;
}
.list-content .list .list-hight{
border-radius: 0 0 5px 5px;
}
.con-list-mero li .img-list,.con-list-mero li .tab-list{
background-color: #fff;
}
.record-tit{
display: inline-block;
height: auto;
width: 100%;
padding: 15px;
}
.record-list .list{
background-color: #fff;
padding: 10px;
position: relative;
margin-bottom: 10px;
}
.record-list .list .name{
padding-right: 50px;
}
.record-list .list .name img{
width: 20px;
height: 20px;
border-radius: 20px;
overflow: hidden;
}
.record-list .list .name span{
height: 30px;
line-height: 30px;
display: inline-block;
padding-left: 10px;
}
.record-list .list .types{
position: absolute;
right: 10px;
top: 10px;
height: 30px;
line-height: 30px;
}
.record-list .list .text{
margin-top: 20px;
display: inline-block;
width: 100%;
}
.record-list .list .text span{
width: 50%;
float: left;
color: #999;
}
.record-list .list .text span:first-child{
padding-left: 20px;
background: url(../image/iocn_39.png) no-repeat center left / 14px;
}
.record-list .list .text span:last-child{
text-align: right;
}
.notice-tab-title{
padding: 10px 0;
}
.phone-tab-title-bg{
background: #fff;
width: 100%;
border-radius: 0;
}
.notice-list .lists{
display: inline-block;
width: 100%;
background:#fff url(../image/icon_40.png) no-repeat 10px 15px / 18px;
padding: 10px 10px 10px 40px;
margin-bottom: 10px;
}
.notice-list-warning .lists{
background:#fff url(../image/icon_41.png) no-repeat 10px 15px / 18px;
}
.notice-list .lists .name{
display: inline-block;
width: 100%;
}
.notice-list .lists .name span{
float: right;
color: #999;
}
.notice-list .lists .text{
margin-top: 10px;
color: #999;
}
.con-list-none li{
display: block;
}
.con-list-none li.active{
display: none;
}
/**/
#layui-laydate2{
max-width: 275px !important;
margin-left:-137px;
left: 50% !important;
top: 0 !important;
}
/**/
.field-list .more,.list-content .list .more{
display: block;
top: 10px;
right: 20px;
width: 20px;
}
.con-mune ul.org-menu-lis-children{
padding-right: 0px;
}
.con-mune ul li{
display: inline-block;
width: 100%;
}
.con-mune ul.org-menu-list li > a{
display: inline-block;
padding-left: 40px;
}
span.PutAway {
right: auto;
top: 0px;
height: 49px;
line-height: 49px;
position: absolute;
left: 0px;
background: none;
}
.con-mune ul.org-menu-list li span.float-right{
height: 49px;
line-height: 49px;
}

2089
dist/css/style.css vendored Normal file

File diff suppressed because it is too large Load Diff

906
dist/field.html vendored Normal file
View File

@ -0,0 +1,906 @@
<!doctype html>
<html lang="en">
<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>
<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>
</div>
</div>
</div>
<script type="text/javascript">
window.onload=function(){
// alert(localStorage.getItem('pubilc')+'2')
let title=localStorage.getItem('pubilc')
$('#title').html(title)
}
</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" data-id="5" data-two="3">
<div class="con-tit font-20 pc-block ">
设置
</div>
<div class="con-seclevel font-18 bg-w top20 phone-top-0 con-seclevel-padding">
<span class=" pc-inline ">自定义字段</span>
<ul class="field-tab-title" role="tablist">
<!-- <li data-id="1" class="active" role="presentation">-->
<!-- <a href="#public" aria-controls="public" role="tab" data-toggle="tab">公共文件</a>-->
<!-- </li>-->
<!-- <li data-id="0" role="presentation">-->
<!-- <a href="#inside" aria-controls="inside" role="tab" data-toggle="tab">内部文件</a>-->
<!-- </li>-->
</ul>
</div>
<div class="con-content top20 con-content-none">
<div class="con-text bg-w tab-content phone-bg-none phone-padding-0">
<!--管理-->
<!-- <div role="tabpanel" class="tab-pane active" id="public">-->
<!-- <div class="org-list">-->
<!-- <div class="org-con top20 pc-block">-->
<!-- <div class="org-remarks">-->
<!-- <p>公共文件:通过进入不同文件夹路径,创建对应目录下的公共文件自定义字段 </p>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div role="tabpanel" class="tab-pane" id="inside">-->
<!-- <div class="org-list">-->
<!-- <div class="org-con top20 pc-block">-->
<!-- <div class="org-remarks">-->
<!-- <p>内部文件:通过进入不同文件夹路径,创建对应目录下的内部文件自定义字段</p>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<div class="con-list org-list list-content top20 phone-top-0">
<div class="name">
<span class="font-14" id="folder-navigation"><i class="icon-back"></i><a
data-id="0">全部文件</a></span>
<input type="hidden" id="navigation" value="0">
</div>
<div class=" field">
<div class="list-content">
<ul>
<li class="list establish" data-type="inside">
<a href="javascript:;">
<div class="img"><img src="image/icon_36.png"></div>
<div class="text-two-hide list-hight">创建字段</div>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 内部文件-->
<div class="history small inside-add">
<div class="center-center download-hight">
<div class="history-content bg-w ">
<div class="on-name">
<h3 class="font-14">创建字段</h3>
</div>
<a href="javascript:;" class="close">&nbsp;</a>
<form class="layui-form" action="" lay-filter="example3">
<div class="p-25">
<!--文件夹-->
<div class="con-list bg-w top20 ">
<div class="layui-form-item">
<label class="layui-form-label">文件分类</label>
<div class="layui-input-block">
<input type="text" name="title" lay-verify="required" lay-reqtext="请填写自定义字段名称"
placeholder="请填写自定义字段名称" autocomplete="off" class="layui-input">
</div>
</div>
</div>
<div class="con-list bg-w top20 ">
<div class="layui-form-item">
<label class="layui-form-label">管理员</label>
<div class="layui-input-block">
<input type="text" name="adminUsers" lay-verify="required" onclick="choosePeople(this,1)" placeholder="请选择管理员"
lay-reqtext="请选择管理员"
autocomplete="on" class="layui-input clickinput">
</div>
</div>
</div>
<div class="con-list bg-w top20">
<div class="layui-form-item">
<label class="layui-form-label">操作员</label>
<div class="layui-input-block">
<input type="text" lay-verify="required" name="operatorUsers" onclick="choosePeople(this,2)"
lay-reqtext="请选择操作员"
placeholder="请选择操作员" autocomplete="on" class="layui-input">
</div>
</div>
</div>
<!-- <div class="con-list bg-w top20">-->
<!-- <div class="layui-form-item">-->
<!-- <label class="layui-form-label">查看人员</label>-->
<!-- <div class="layui-input-block">-->
<!-- <input type="text" name="viewUsers" onclick="choosePeople(this,3)" placeholder="请选择查看人员" autocomplete="on" class="layui-input">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!--保存-->
<div class="upload-form t-r">
<button class="flie-btn" lay-submit lay-filter="formDemoset">保存</button>
<button type="reset" class="flie-btn flie-btn-primary field-btn">取消</button>
</div>
</div>
</form>
</div>
</div>
</div>
<!--点击编辑/创建文件-->
<div class="history small field-add">
<div class="center-center download-hight">
<div class="history-content bg-w ">
<div class="on-name">
<h3 class="font-14">创建字段</h3>
</div>
<a href="javascript:;" class="close">&nbsp;</a>
<form class="layui-form" action="">
<div class="p-25">
<!--文件夹-->
<div class="con-list bg-w top20 add-border">
<div class="layui-form-item">
<label class="layui-form-label">文件分类</label>
<div class="layui-input-block">
<input type="text" name="title" lay-verify="required" lay-reqtext="请填写文件名称"
placeholder="请填写文件名称" autocomplete="off" class="layui-input">
</div>
</div>
</div>
<!--保存-->
<div class="upload-form t-r">
<button class="flie-btn" lay-submit lay-filter="formDemo">保存</button>
<button type="reset" class="flie-btn flie-btn-primary field-btn">取消</button>
</div>
</div>
</form>
</div>
</div>
</div>
<!--
<div class="history small field-edit">
<div class="center-center download-hight">
<div class="history-content bg-w ">
<div class="on-name">
<h3 class="font-14">修改名称</h3>
</div>
<a href="javascript:;" class="close">&nbsp;</a>
<form class="layui-form" action="">
<div class="p-25">
<div class="con-list bg-w top20 add-border">
<div class="layui-form-item">
<label class="layui-form-label">文件分类</label>
<div class="layui-input-block">
<input type="text" name="title" lay-verify="required" lay-reqtext="请填写文件名称"
placeholder="请填写文件名称" autocomplete="off" class="layui-input">
<input type="hidden" name="id" value=""/>
</div>
</div>
</div>
<div class="upload-form t-r">
<button class="flie-btn" lay-submit lay-filter="formDemo2">保存</button>
<button type="reset" class="flie-btn flie-btn-primary field-btn">取消</button>
</div>
</div>
</form>
</div>
</div>
</div>
-->
<!-- 内部文件-->
<div class="history small field-edit">
<div class="center-center download-hight">
<div class="history-content bg-w ">
<div class="on-name">
<h3 class="font-14">修改字段</h3>
</div>
<a href="javascript:;" class="close">&nbsp;</a>
<form class="layui-form" action="" lay-filter="example3">
<div class="p-25">
<!--文件夹-->
<div class="con-list bg-w top20 ">
<div class="layui-form-item">
<label class="layui-form-label">文件分类</label>
<div class="layui-input-block">
<input type="text" name="title" lay-verify="required" lay-reqtext="请填写自定义字段名称"
placeholder="请填写自定义字段名称" autocomplete="off" class="layui-input">
<input type="hidden" name="id" value=""/>
</div>
</div>
</div>
<div class="con-list bg-w top20 ">
<div class="layui-form-item">
<label class="layui-form-label">管理员</label>
<div class="layui-input-block">
<input type="text" name="adminUsers" onclick="choosePeople(this,1)" placeholder="请选择管理员"
autocomplete="on" class="layui-input clickinput">
</div>
</div>
</div>
<div class="con-list bg-w top20">
<div class="layui-form-item">
<label class="layui-form-label">操作员</label>
<div class="layui-input-block">
<input type="text" name="operatorUsers" onclick="choosePeople(this,2)"
placeholder="请选择操作员" autocomplete="on" class="layui-input">
</div>
</div>
</div>
<!-- <div class="con-list bg-w top20">-->
<!-- <div class="layui-form-item">-->
<!-- <label class="layui-form-label">查看人员</label>-->
<!-- <div class="layui-input-block">-->
<!-- <input type="text" name="viewUsers" onclick="choosePeople(this,3)" placeholder="请选择查看人员" autocomplete="on" class="layui-input">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!--保存-->
<div class="upload-form t-r">
<button class="flie-btn" lay-submit lay-filter="formDemo2">保存</button>
<button type="reset" class="flie-btn flie-btn-primary field-btn">取消</button>
</div>
</div>
</form>
</div>
</div>
</div>
<script>
var ajaxData = {
current: '',
size: '',
isPublic: 1,
parentFolderId: 0
},
adminUsersArr = [],
operatorUsersArr = [],
viewUsersArr = [];
var fieldIntervalScript = setInterval(function(){
var tmpHaveLogin = localStorage['haveLogin'] || false;
if(tmpHaveLogin){
clearInterval(fieldIntervalScript);
getFileList(ajaxData)
}
}, 500);
$('.field-tab-title li').click(function () {
ajaxData.isPublic = $(this).attr('data-id')
ajaxData.parentFolderId = 0
$("#navigation").val(0)
$('.con-list .name span a').next().remove()
var type = $(this).children('a:first').attr('aria-controls');
console.log(type);
$('.establish').attr('data-type', type);
getFileList(ajaxData)
})
$(".establish").click(function () {
var type = $(this).attr('data-type');
console.log(type);
if (type == 'public') {
console.log('public===')
$(".field-add").show();
} else {
console.log('inside===')
$(".inside-add").show();
}
});
//表单取值
// layui.$('.').on('click', function(){
// var data = form.val('example');
// alert(JSON.stringify(data));
// });
//添加人员
function choosePeople(obj, type) {
var that = $(obj);
dd.biz.contact.complexPicker({
title: "添加人员", //标题
corpId: corpId, //企业的corpId
multiple: true, //是否多选
limitTips: "超出了", //超过限定人数返回提示
maxUsers: 1000, //最大可选人数
pickedUsers: [], //已选用户
pickedDepartments: [], //已选部门
disabledUsers: [], //不可选用户
disabledDepartments: [], //不可选部门
requiredUsers: [], //必选用户(不可取消选中状态)
requiredDepartments: [], //必选部门(不可取消选中状态)
appId: agentId, //微应用Id企业内部应用查看AgentId
permissionType: "GLOBAL", //可添加权限校验选人权限目前只有GLOBAL这个参数
responseUserOnly: false, //返回人,或者返回人和部门
startWithDepartmentId: 0, //仅支持0和-1
onSuccess: function (result) {
console.log(result)
var departmentsName = [], userIds = [];
result.departments.forEach(function (item) {
departmentsName.push(item.name);
userIds.push(item.id);
});
result.users.forEach(function (item) {
userIds.push(item.emplId);
departmentsName.push(item.name);
})
that.val(departmentsName.toString());
if (type == 1) {
adminUsersArr = userIds;
} else if (type == 2) {
operatorUsersArr = userIds;
} else if (type == 3) {
viewUsersArr = userIds;
}
},
onFail: function (err) {
}
});
}
layui.use(['form', 'upload', 'element', 'layer'], function () {
var form = layui.form;
var upload = layui.upload;
var element = layui.element;
var layer = layui.layer;
//创建
form.on('submit(formDemo)', function (data) {
var addFolderData = {
"adminUsers": [],
"createTime": "",
"id": '',
"isPublic": ajaxData.isPublic,
"name": data.field.title,
"operatorUsers": [],
"parentFolderId": $("#navigation").val(),
"viewUsers": []
}
$.ajax({
url: host + '/ding/folder/addFolder'+'?timetmp='+ Date.parse( new Date() ).toString().substr(0,10),
headers: {
'Blade-Auth': 'bearer ' + localStorage.accessToken
},
data: JSON.stringify(addFolderData),
type: "post",
contentType: "application/json",
dataType: "json",
success: function (data) {
if (data.code == 200) {
$('.field-add').hide()
$('.field-add .con-list input[name=title]').val('')
getFileList(ajaxData)
} else {
layer.msg(data.msg)
}
},
error: function (data) {
console.log(data);
}
});
return false;
});
//保存
form.on('submit(formDemoset)', function (data) {
var addFolderData = {
"createTime": "",
"adminUsers": adminUsersArr,//管理员
"operatorUsers": operatorUsersArr,//操作员
"viewUsers": viewUsersArr,//查看
"id": data.field.id,
"isPublic": ajaxData.isPublic,
"name": data.field.title,
"parentFolderId": $("#navigation").val()
}
$.ajax({
url: host + '/ding/folder/addFolder'+'?timetmp='+ Date.parse( new Date() ).toString().substr(0,10),
headers: {
'Blade-Auth': 'bearer ' + localStorage.accessToken
},
data: JSON.stringify(addFolderData),
type: "post",
contentType: "application/json",
dataType: "json",
success: function (data) {
if (data.code == 200) {
$('.inside-add').hide()
getFileList(ajaxData)
} else {
layer.msg(data.msg)
}
},
error: function (data) {
console.log(data);
}
});
return false;
});
//修改
form.on('submit(formDemo2)', function (data) {
console.log($("#navigation").val())
var addFolderData = {
"createTime": "",
"id": data.field.id,
"isPublic": ajaxData.isPublic,
"name": data.field.title,
"adminUsers": adminUsersArr,//管理员
"operatorUsers": operatorUsersArr,//操作员
"parentFolderId": $("#navigation").val()
}
$.ajax({
url: host + '/ding/folder/updFolder'+'?timetmp='+ Date.parse( new Date() ).toString().substr(0,10),
headers: {
'Blade-Auth': 'bearer ' + localStorage.accessToken
},
data: JSON.stringify(addFolderData),
type: "post",
contentType: "application/json",
dataType: "json",
success: function (data) {
if (data.code == 200) {
$('.field-edit').hide();
console.log(ajaxData);
getFileList(ajaxData)
} else {
layer.msg(data.msg)
}
},
error: function (data) {
console.log(data);
}
});
return false;
});
});
function editFile(obj) {
$.ajax({
url: host + '/ding/folder/getFolderRoleUser'+'?timetmp='+ Date.parse( new Date() ).toString().substr(0,10),
headers: {
'Blade-Auth': 'bearer ' + localStorage.accessToken
},
data: {
folderId:$(obj).attr('data-id')
},
type: "post",
contentType: "application/x-www-form-urlencoded",
dataType: "json",
success: function (data) {
if (data.code == 200) {
$('.field-edit').show()
$('.field-edit .con-list input[name=title]').val($(obj).attr('data-name'))
$('.field-edit .con-list input[name=id]').val($(obj).attr('data-id'));
var adminUsers="";
var operatorUsers="";
for (var aa=0;aa<data.data.adminUsers.length;aa++){
adminUsers+=(data.data.adminUsers[aa].name+" ")
}
for (var bb=0;bb<data.data.operatorUsers.length;bb++){
operatorUsers+=(data.data.operatorUsers[bb].name+" ")
}
$('.field-edit .con-list input[name=adminUsers]').val(adminUsers);
$('.field-edit .con-list input[name=operatorUsers]').val(operatorUsers);
} else {
layer.msg(data.msg)
}
},
error: function (data) {
console.log(data);
}
});
return false;
}
function init() {
//返回事件
$('.con-list .name span .icon-back').off("click").click(function () {
var that = $(this)
if ($("#navigation").val() != 0) {
ajaxData.parentFolderId = $('.con-list .name span a').eq(-2).attr('data-id')
$("#navigation").val($('.con-list .name span a').eq(-2).attr('data-id'))
$('.con-list .name span a').eq(-1).remove()
getFileList(ajaxData)
}
});
//路由事件
$('#folder-navigation a').off("click").click(function () {
var that = $(this)
ajaxData.parentFolderId = that.attr('data-id')
$('.con-list .name span a').each(function () {
if ($(this).index() >= that.index()) {
$('.con-list .name span a').eq($(this).index()).remove()
}
})
$("#navigation").val(that.attr('data-id'))
getFileList(ajaxData)
})
}
//打开文件夹
function openFolder(obj) {
ajaxData.parentFolderId = $(obj).attr('data-id')
getFileList(ajaxData)
$("#navigation").val($(obj).attr('data-id'))
$('#folder-navigation').append('<a data-id="' + $(obj).attr('data-id') + '"> > ' + $(obj).attr('data-name') + '</a>')
}
//点击 显示按钮
function showBtn(obj){
$(obj).next(".more-edit").toggle();
}
//文件列表
function getFileList(ajaxData) {
$('.list-content ul li').next().remove()
$.ajax({
//ding/file/getFileList
//ding/folder/getFolderList
url: host + '/ding/file/getFileList'+'?timetmp='+ Date.parse( new Date() ).toString().substr(0,10),
headers: {
'Blade-Auth': 'bearer ' + localStorage.accessToken
},
data: ajaxData,
type: "get",
contentType: "application/x-www-form-urlencoded",
dataType: "json",
success: function (data) {
if (data.code == 200) {
init()
if (data.data.folders.length > 0) {
data.data.folders.forEach(function (item) {
var html1 = '<li class="list field-list" ondblclick="openFolder(this)" >'
+ '<div class="more">'
+ '<span onclick="showBtn(this)">...</span>'
+ '<div class="more-edit" onclick="editFile(this)" data-id="' + item.id + '" data-name="' + item.name + '">编辑</div>'
+ '</div>'
+ '<div class="img" onclick="openFolder(this)" data-id="' + item.id + '" data-name="' + item.name + '" ><img src="image/' + (item.folderType == "0" ? "icon_11.png" : "icon_11_2.png") + '"></div>'
+ '<div class="text-two-hide list-hight">' + item.name + '</div>'
+ '</li>'
$('.list-content ul').append(html1)
})
}
} else {
layer.msg(data.msg)
}
},
error: function (data) {
console.log(data);
}
});
}
</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>

525
dist/file.html vendored Normal file
View File

@ -0,0 +1,525 @@
<!doctype html>
<html lang="en">
<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>
<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>
</div>
</div>
</div>
<script type="text/javascript">
window.onload=function(){
// alert(localStorage.getItem('pubilc')+'2')
let title=localStorage.getItem('pubilc')
$('#title').html(title)
}
</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>

967
dist/hidefile.html vendored Normal file
View File

@ -0,0 +1,967 @@
<!doctype html>
<html lang="en">
<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>
<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>
</div>
</div>
</div>
<script type="text/javascript">
window.onload=function(){
// alert(localStorage.getItem('pubilc')+'2')
let title=localStorage.getItem('pubilc')
$('#title').html(title)
}
</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 content-pd-50">
<div class="content-auto" data-id="11" >
<div class="con-tit font-20 pc-block">
隐藏文件
</div>
<div class="con-search bg-w top20 phone-top-0">
<form class="layui-form" id="search-form">
<div class="layui-form-item">
<label class="layui-form-label">文件类型:</label>
<div class="layui-input-block">
<select name="type">
<option value="">全部类型</option>
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">拟稿人:</label>
<div class="layui-input-block">
<input type="text" name="drafter" class="layui-input" placeholder="请输入拟稿人">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">发布人:</label>
<div class="layui-input-block">
<input type="text" name="createUser" class="layui-input" placeholder="请输入发布人">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">时间段:</label>
<div class="layui-input-block">
<input type="text" name="times" class="layui-input layui-time-time" placeholder="请选择时间段">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">文件号:</label>
<div class="layui-input-block">
<input type="text" name="fileNum" class="layui-input" placeholder="请输入文件号">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">文件名:</label>
<div class="layui-input-block">
<input type="text" name="name" class="layui-input" placeholder="请输入文件名">
</div>
</div>
<div class="layui-form-item">
<button class="layui-btn" id="formDemo" lay-submit lay-filter="formDemo">搜索</button>
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
</div>
</form>
</div>
<!--内容-->
<div class="con-list bg-w top20 phone-bg-none phone-top-0">
<!--手机-->
<div class="phone-tit phone-block">
<div class="name" id="phone-menu">
<!-- <a href="javascript:;" class="active">公共文件</a>
<a href="inside.html" >内部文件</a> -->
</div>
<ul class="con-list-mero con-list-none" role="tablist">
<li role="presentation" class="active">
<a class="img-list" href="#Chart" aria-controls="Chart" role="tab" data-toggle="tab">&nbsp;</a>
</li>
<li role="presentation">
<a href="#tab" aria-controls="tab" role="tab" data-toggle="tab" class="tab-list">&nbsp;</a>
</li>
</ul>
<div class="toolbox">
<ul class="con-list-mero filter-icon" style="display:none">
<li role="presentation">
<a href="javascript:void(0);" id="toggle-filter">&nbsp;</a>
</li>
</ul>
</div>
</div>
<!--pc-->
<div class="name">
<span class="font-14" id="folder-navigation"><i class="icon-back"></i><a href="hidefile.html"
data-id="0">全部文件</a></span>
<input type="hidden" id="navigation" value="">
<ul class="con-list-mero pc-block" role="tablist">
<li role="presentation" class="active">
<a class="img-list" href="#Chart" aria-controls="Chart" role="tab" data-toggle="tab">&nbsp;</a>
</li>
<li role="presentation">
<a href="#tab" aria-controls="tab" role="tab" data-toggle="tab" class="tab-list">&nbsp;</a>
</li>
</ul>
</div>
<div class="con-list-cn tab-content">
<div class="list-content active tab-pane" role="tabpanel" id="Chart">
<ul></ul>
</div>
<div class="list-content tab-pane" role="tabpanel" id="tab">
<table class="table">
<thead>
<tr>
<th>文件名称</th>
<th>文件号</th>
<th>拟稿人</th>
<th>发布人</th>
<th>文件类型</th>
<th>修改时间</th>
<th>操作</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
<!-- 无内容 -->
<div class="no-con-list">
<img src="image/img_02.jpg">
</div>
</div>
</div>
</div>
<!--点击弹出下载-->
<div class="download">
<div class="center-center download-hight">
<div class="download-content bg-w t-c">
<a href="javascript:;" class="close">&nbsp;</a>
<div class="text">
<img src="">
<h3>文件名称</h3>
<p></p>
<a href="#" class="btn1" id="preview-button" onclick="previewBtn(this)">预览</a>
<a onclick="downloadfile(this)" id="download" class="btn2" download="">下载</a>
</div>
</div>
</div>
</div>
<!--点击弹出历史记录-->
<div class="history">
<div class="center-center download-hight">
<div class="history-content bg-w">
<div class="on-name">
<h3 class="font-14">历史记录</h3>
</div>
<a href="javascript:;" class="close">&nbsp;</a>
<div class="p-25">
<table class="table">
<thead>
<tr>
<th>文件名称</th>
<th>文件类型</th>
<th>修改时间</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var ajaxData = {
createUser: '',
drafter: '',
fileNum: '',
isPublic: 1,
name: '',
parentFolderId: 0,
endTime: '',
startTime: '',
type: ''
}
var serch_flag = false;
$(function() {
layui.use(['form', 'upload', 'element', 'layer'], function() {
var form = layui.form;
var upload = layui.upload;
var element = layui.element;
var layer = layui.layer;
//var haveLogin = localStorage['haveLogin'] || false;
var loginInterval = setInterval(function() {
var tmpHaveLogin = localStorage['haveLogin'] || false;
if (tmpHaveLogin) {
clearInterval(loginInterval);
pageInit();
}
}, 500);
function pageInit() {
getFileType();
getFileList(ajaxData);
}
$('#toggle-filter').on('click', function() {
layer.open({
type: 1,
title: ['文件过滤', 'font-size:18px;padding:0;text-align:center'],
content: $('#search-form'),
offset: [0, 0],
area: ['100%', '100%'],
closeBtn: 1,
skin: 'file-filter-layer',
success: function(dom, index) {
dom.find('.layui-btn[lay-submit]').on('click', function() {
layer.close(index);
});
}
})
});
//搜索
form.on('submit(formDemo)', function(data) {
ajaxData = {
createUser: data.field.createUser,
drafter: data.field.drafter,
fileNum: data.field.fileNum,
isPublic: 1,
name: data.field.name,
//parentFolderId: $("#navigation").val(),
parentFolderId: '',
startTime: data.field.times.split(' - ')[0] || '',
endTime: data.field.times.split(' - ')[1] || '',
type: data.field.type
}
// $("#navigation").val(0)
// $('.con-list .name span a').next().remove()
getFileList(ajaxData);
serch_flag = true;
return false;
});
//文件类型
function getFileType() {
$.ajax({
url: host + '/ding/file/getFileType'+'?timetmp='+ Date.parse( new Date() ).toString().substr(0,10),
headers: {
'Blade-Auth': 'bearer ' + accessToken,
},
data: {},
type: "get",
dataType: "json",
success: function(data) {
if (data.code == 200) {
if (data.data.length > 0) {
data.data.forEach(function(item) {
$('.con-search select[name=type]').append(
'<option value="' + item + '">' + item +
'</option>')
})
form.render()
}
// else {
// layer.msg('暂无记录')
// }
} else {
layer.msg(data.msg)
}
},
error: function(data) {
console.log(data);
}
});
}
});
})
function init() {
$('.con-list .name span .icon-back').off("click").click(function() {
var that = $(this);
if (serch_flag) {
$("#search-form")[0].reset();
layui.use(['form'], function() {
var form = layui.form;
form.render();
})
$("#navigation").val($('.con-list .name span a').last().attr('data-id'))
var ajaxData = {
createUser: '',
drafter: '',
fileNum: '',
isPublic: 1,
name: '',
parentFolderId: parseInt($('.con-list .name span a').last().attr('data-id')),
endTime: '',
startTime: '',
type: ''
}
getFileList(ajaxData);
} else {
if ($("#navigation").val() != 0) {
var ajaxData = {
createUser: '',
drafter: '',
fileNum: '',
isPublic: 1,
name: '',
parentFolderId: parseInt($('.con-list .name span a').eq(-2).attr('data-id')),
endTime: '',
startTime: '',
type: ''
}
$("#navigation").val($('.con-list .name span a').eq(-2).attr('data-id'))
$('.con-list .name span a').eq(-1).remove()
getFileList(ajaxData)
}
}
serch_flag = false;
});
//路由事件
$('#folder-navigation a').off("click").click(function() {
var that = $(this)
console.log(that.attr('data-id'), 'parentFolderId');
ajaxData.parentFolderId = that.attr('data-id')
ajaxData.name = '';
$('.con-list .name span a').each(function() {
if ($(this).index() >= that.index()) {
$('.con-list .name span a').eq($(this).index()).remove()
}
})
$("#navigation").val(that.attr('data-id'))
getFileList(ajaxData);
serch_flag = false;
})
}
//历史记录
function getHistory(obj) {
$.ajax({
url: host + '/ding/file/getHistory'+'?timetmp='+ Date.parse( new Date() ).toString().substr(0,10),
headers: {
'Blade-Auth': 'bearer ' + accessToken,
},
data: {
groupId: $(obj).attr('data-groupid')
},
type: "get",
dataType: "json",
success: function(data) {
if (data.code == 200) {
if (data.data.length > 0) {
var html = '';
data.data.forEach(function(item) {
html += '<tr>' +
'<td><div class="list-img click-download" onclick="openFile(this)" data-id="' +
item.id + '" data-name="' + item.name + '" data-type="' + item
.type + '" data-url="' + item.url + '" data-time="' + item
.createTime + '" data-dingid="' + item.dingFileId +
'" data-dingname="' + item.dingFileName + '" data-dingsize="' + item
.dingFileSize + '" data-spaceid="' + item.dingSpaceId +
'"><img src="image/icon_22.png"><span>' + item.name +
'</span></div></td>'
html += '<td>';
if (item.isPublic) {
html += '公共文件类型';
} else {
html += '内部文件类型';
}
html += '</td>';
html += '<td>' + item.updateTime + '</td>' +
'</tr>';
})
$(".history .table tbody").html(html)
$(".history").show();
}
// else {
// layer.msg('暂无记录')
// }
} else {
layer.msg(data.msg)
}
},
error: function(data) {
console.log(data);
}
});
}
//打开文件夹
function openFolder(obj) {
ajaxData.parentFolderId = $(obj).attr('data-id')
getFileList(ajaxData)
$("#navigation").val($(obj).attr('data-id'));
$('#folder-navigation').append('<a data-id="' + $(obj).attr('data-id') + '"> > ' + $(obj).text() + '</a>');
serch_flag = false;
}
//文件下载
function downloadfile(obj) {
var id = $(obj).data('fileid');
$.ajax({
url: host + '/ding/file/downLoadFile'+'?timetmp='+ Date.parse( new Date() ).toString().substr(0,10),
headers: {
'Blade-Auth': 'bearer ' + localStorage.accessToken
},
data: {
fileId: id
},
type: "get",
contentType: "application/json",
dataType: "json",
success: function(data) {
if (data.code == 200) {
$(obj).attr('data', data.data);
console.log(data.data);
window.open(data.data);
} else {
layer.msg(data.msg)
}
},
error: function(data) {
console.log(data);
}
});
}
//预览文件
function openFile(obj) {
var id = $(obj).attr('data-id');
var name = $(obj).attr('data-name');
var type = $(obj).attr('data-type');
var url = $(obj).attr('data-url');
var time = $(obj).attr('data-time');
var dingFileId = $(obj).data('dingid');
var dingFileName = $(obj).data('dingname');
var dingFileSize = $(obj).data('dingsize');
var dingSpaceId = $(obj).data('spaceid');
$('.download .download-content .text h3').text(name)
$('.download .download-content .text p').text(time)
$('.download .download-content .text a.btn2').attr('download', name)
$('.download-content .text img').attr('src', 'image/icon-file/icon_' + type + '.png')
$('#download').data('fileid', id);
var previewButton = $('#preview-button');
previewButton.attr('dingfileid', dingFileId);
previewButton.attr('dingfilename', dingFileName);
previewButton.attr('dingfilesize', dingFileSize);
previewButton.attr('dingspaceid', dingSpaceId);
previewButton.attr('filetype', type);
$('.download').show()
// $.ajax({
// url: host + '/ding/file/downLoadFile',
// headers: {
// 'Blade-Auth': 'bearer ' + localStorage.accessToken
// },
// data: {
// fileId: id
// },
// type: "get",
// contentType:"application/json",
// dataType: "json",
// success: function(data) {
// if (data.code == 200) {
// console.log(data.data, '路径555');
// $('.download .download-content .text a.btn1').attr('data-url',data.data)
// $('.download .download-content .text a.btn2').attr('href',data.data)
// $('.download').show()
// } else {
// layer.msg(data.msg)
// }
// },
// error: function(data) {
// console.log(data);
// }
// });
}
//隐藏文件
function hideFile(obj){
layer.confirm('确认显示这个文件吗?', {
btn: ['确认', '取消'] //可以无限个按钮
,
}, function(index, layero){
//按钮【按钮一】的回调
$.ajax({
url: host + '/ding/file/disPlayFile'+'?timetmp='+ Date.parse( new Date() ).toString().substr(0,10),
headers: {
'Blade-Auth': 'bearer ' + localStorage.accessToken
},
data: {
fileId:$(obj).attr("data-id"),
isShow:1
},
type: "get",
contentType: "application/x-www-form-urlencoded",
dataType: "json",
success: function(data) {
if(data.code==200){
layer.msg('显示成功')
getFileList(ajaxData)
}else{
layer.msg(data.msg)
}
},
error: function(data) {
console.log(data);
}
})
}, function(index){
//按钮【按钮二】的回调
layer.closeAll();
});
return false;
}
//影藏文件列表
function getFileList(ajaxData) {
console.log(ajaxData, 'getFileList');
$('.list-content#Chart ul').empty()
$('.list-content#tab tbody').empty()
$.ajax({
url: host + '/ding/file/getDisplayFile'+'?timetmp='+ Date.parse( new Date() ).toString().substr(0,10),
headers: {
'Blade-Auth': 'bearer ' + localStorage.accessToken
},
data: ajaxData,
type: "get",
contentType: "application/x-www-form-urlencoded",
dataType: "json",
success: function(data) {
if (data.code == 200) {
init()
if (data.data.folders.length > 0) {
data.data.folders.forEach(function(item) {
var html1 =
'<li class="list" onclick="openFolder(this)" ondblclick="openFolder(this)" data-id="' +
item.id + '">' +
'<div class="img"><img src="image/'+(item.folderType=="0"?"icon_11.png":"icon_11_2.png")+'"></div>' +
'<div class="text-two-hide list-hight">' + item.name + '</div>' +
'</li>'
$('.list-content#Chart ul').append(html1)
var html2 = '<tr>' +
'<td><div class="list-img" onclick="openFolder(this)" ondblclick ="openFolder(this)" data-id="' +
item.id + '"><img src="image/'+(item.folderType=="0"?"icon_11.png":"icon_11_2.png")+'"><span>' + item.name +
'</span></div></td>' +
'<td></td>' +
'<td></td>' +
'<td></td>' +
'<td>公共文件</td>' +
'<td>' + item.createTime + '</td>' +
'<td></td>'
//+'<td><a href="javascript:;" class="news-red" data-groupid="'+item.groupId+'" onclick="getHistory(this)">历史记录</a></td>'
+
'</tr>'
$('.list-content#tab tbody').append(html2)
})
}
if (data.data.files.length > 0) {
data.data.files.forEach(function(item) {
var html1 =
'<li class="list click-download" >'
+ '<div class="more">'
+ '<span>...</span>'
+ '<div class="more-edit" onclick="hideFile(this)" data-id="' + item.id + '" data-name="' + item.name + '">显示</div>'
+ '</div>'+
'<div class="img" onclick="openFile(this)" data-id="' +
item.id + '" data-name="' + item.name + '" data-type="' + item
.type + '" data-url="' + item.url + '" data-time="' + item
.createTime + '" data-dingid="' + item.dingFileId +
'" data-dingname="' + item.dingFileName + '" data-dingsize="' + item
.dingFileSize + '" data-spaceid="' + item.dingSpaceId + '"><img src="image/icon-file/icon_' + item.type +
'.png"></div>' +
'<div class="text-two-hide list-hight">' + item.name + '</div>' +
'</li>'
$('.list-content#Chart ul').append(html1)
var html2 = '<tr>' +
'<td>'
+ '<div class="more">'
+ '<span>...</span>'
+ '<div class="more-edit" onclick="hideFile(this)" data-id="' + item.id + '" data-name="' + item.name + '">显示</div>'
+ '</div>'
+
'<div class="list-img" onclick="openFile(this)" data-id="' +
item.id + '" data-name="' + item.name + '" data-type="' + item
.type + '" data-url="' + item.url + '" data-time="' + item
.createTime + '" ><img src="image/icon-file/icon_' + item.type +
'.png"><span>' + item.name + '</span></div></td>' +
'<td>' + item.number + '</td>' +
'<td><div class="list-img"><span>' + item.drafter +
'</span></div></td>' +
'<td><div class="list-img"><span>' + item.createUser +
'</span></div></td>' +
'<td>' + item.type + '</td>' +
'<td>' + item.createTime + '</td>'
html2 += '<td>';
if (item.isHistory == 1) {
html2 += '<a href="javascript:;" class="news-red" data-groupid="' +
item.groupId + '" onclick="getHistory(this)">历史记录</a>';
}
html2 += '</td>';
html2 += '</tr>';
$('.list-content#tab tbody').append(html2)
})
}
if (data.data.folders.length == 0 && data.data.files.length == 0) {
$('.no-con-list').show()
} else {
$('.no-con-list').hide()
}
} else {
layer.msg(data.msg)
}
},
error: function(data) {
console.log(data);
}
});
}
</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>

1
dist/image/icon-app/down-arrow.svg vendored Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" class="svg-icon" viewBox="0 0 24 24" width="16" height="16" style="fill: rgb(140, 140, 140);"><path d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"></path></svg>

After

Width:  |  Height:  |  Size: 203 B

BIN
dist/image/icon-app/inco_app01.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

BIN
dist/image/icon-app/inco_app02.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 B

BIN
dist/image/icon-app/inco_app03.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 B

BIN
dist/image/icon-app/inco_app04.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

BIN
dist/image/icon-app/inco_app05.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B

BIN
dist/image/icon-app/inco_app06.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
dist/image/icon-app/inco_app07.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
dist/image/icon-app/inco_app08.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
dist/image/icon-app/inco_app09.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
dist/image/icon-app/inco_app10.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
dist/image/icon-app/inco_app11.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
dist/image/icon-app/inco_app12.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
dist/image/icon-app/inco_app13.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

1
dist/image/icon-app/left-arrow.svg vendored Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" class="svg-icon" viewBox="0 0 24 24" width="20" height="20" style="fill: rgb(174, 174, 178);"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"></path></svg>

After

Width:  |  Height:  |  Size: 205 B

BIN
dist/image/icon-file/icon_.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
dist/image/icon-file/icon_csv.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
dist/image/icon-file/icon_doc.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
dist/image/icon-file/icon_docx.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
dist/image/icon-file/icon_eps.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
dist/image/icon-file/icon_gif.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
dist/image/icon-file/icon_jpeg.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
dist/image/icon-file/icon_jpg.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
dist/image/icon-file/icon_pdf.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
dist/image/icon-file/icon_png.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
dist/image/icon-file/icon_ppt.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
dist/image/icon-file/icon_pptx.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
dist/image/icon-file/icon_psd.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
dist/image/icon-file/icon_svg.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
dist/image/icon-file/icon_xls.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
dist/image/icon-file/icon_xlsx.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
dist/image/icon_01.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
dist/image/icon_02.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
dist/image/icon_03.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
dist/image/icon_04.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
dist/image/icon_05.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 B

BIN
dist/image/icon_06-1.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
dist/image/icon_06.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
dist/image/icon_07-1.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
dist/image/icon_07.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
dist/image/icon_08-1.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
dist/image/icon_08.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
dist/image/icon_09-1.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
dist/image/icon_09.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
dist/image/icon_10-1.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
dist/image/icon_10.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
dist/image/icon_11.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
dist/image/icon_11_2.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
dist/image/icon_25.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

BIN
dist/image/icon_26-1.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
dist/image/icon_26.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
dist/image/icon_27-1.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
dist/image/icon_27.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
dist/image/icon_28.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 B

BIN
dist/image/icon_29.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B

BIN
dist/image/icon_30.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
dist/image/icon_31-1.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
dist/image/icon_31.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
dist/image/icon_32.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
dist/image/icon_33.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 B

BIN
dist/image/icon_34.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 B

BIN
dist/image/icon_35.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

BIN
dist/image/icon_36.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
dist/image/icon_37.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

BIN
dist/image/icon_38.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

BIN
dist/image/icon_40.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
dist/image/icon_41.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
dist/image/img_01.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
dist/image/img_02.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
dist/image/iocn_39.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 B

926
dist/index - 副本.html vendored Normal file
View File

@ -0,0 +1,926 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<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=8" />
<link rel="stylesheet" type="text/css" media="screen and (max-width: 768px)" href="css/mobile.css?v=3" />
<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=1" type="text/javascript" charset="utf-8"></script>
</head>
<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>
</div>
</div>
</div>
<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['menu10'] = 'hidefile.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';
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';
var haveLogin = localStorage['haveLogin'] || false;
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) {
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]+'" class="'+activeClass+'">'+child.name+'</a></dd>';
});
html += '</dl>';
}else{
html += '<a href="'+menuUrl['menu'+item.id]+'" class="'+menuClass['menu'+item.id]+'">'+item.name+'</a>';
}
html += '</li>';
// 手机版文件夹 只取id<=2
if (item.id <= 2) {
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)
}
});
}
})
</script>
<!--内容-->
<div class="f-r content content-pd-50">
<div class="content-auto" data-id="1">
<div class="con-tit font-20 pc-block">
公共文件
</div>
<div class="con-search bg-w top20 phone-top-0">
<form class="layui-form" id="search-form">
<div class="layui-form-item">
<label class="layui-form-label">文件类型:</label>
<div class="layui-input-block">
<select name="type">
<option value="">全部类型</option>
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">拟稿人:</label>
<div class="layui-input-block">
<input type="text" name="drafter" class="layui-input" placeholder="请输入拟稿人">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">发布人:</label>
<div class="layui-input-block">
<input type="text" name="createUser" class="layui-input" placeholder="请输入发布人">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">时间段:</label>
<div class="layui-input-block">
<input type="text" name="times" class="layui-input layui-time-time" placeholder="请选择时间段">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">文件号:</label>
<div class="layui-input-block">
<input type="text" name="fileNum" class="layui-input" placeholder="请输入文件号">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">文件名:</label>
<div class="layui-input-block">
<input type="text" name="name" class="layui-input" placeholder="请输入文件名">
</div>
</div>
<div class="layui-form-item">
<button class="layui-btn" id="formDemo" lay-submit lay-filter="formDemo">搜索</button>
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
</div>
</form>
</div>
<!--内容-->
<div class="con-list bg-w top20 phone-bg-none phone-top-0">
<!--手机-->
<div class="phone-tit phone-block">
<div class="name" id="phone-menu">
<!-- <a href="javascript:;" class="active">公共文件</a>
<a href="inside.html" >内部文件</a> -->
</div>
<ul class="con-list-mero con-list-none" role="tablist">
<li role="presentation" class="active">
<a class="img-list" href="#Chart" aria-controls="Chart" role="tab" data-toggle="tab">&nbsp;</a>
</li>
<li role="presentation">
<a href="#tab" aria-controls="tab" role="tab" data-toggle="tab" class="tab-list">&nbsp;</a>
</li>
</ul>
<div class="toolbox">
<ul class="con-list-mero filter-icon" style="display:none">
<li role="presentation">
<a href="javascript:void(0);" id="toggle-filter">&nbsp;</a>
</li>
</ul>
</div>
</div>
<!--pc-->
<div class="name">
<span class="font-14" id="folder-navigation"><i class="icon-back"></i><a href="index.html"
data-id="0">全部文件</a></span>
<input type="hidden" id="navigation" value="">
<ul class="con-list-mero pc-block" role="tablist">
<li role="presentation" class="active">
<a class="img-list" href="#Chart" aria-controls="Chart" role="tab" data-toggle="tab">&nbsp;</a>
</li>
<li role="presentation">
<a href="#tab" aria-controls="tab" role="tab" data-toggle="tab" class="tab-list">&nbsp;</a>
</li>
</ul>
</div>
<div class="con-list-cn tab-content">
<div class="list-content active tab-pane" role="tabpanel" id="Chart">
<ul></ul>
</div>
<div class="list-content tab-pane" role="tabpanel" id="tab">
<table class="table">
<thead>
<tr>
<th>文件名称</th>
<th>文件号</th>
<th>拟稿人</th>
<th>发布人</th>
<th>文件类型</th>
<th>修改时间</th>
<th>操作</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
<!-- 无内容 -->
<div class="no-con-list">
<img src="image/img_02.jpg">
</div>
</div>
</div>
</div>
<!--点击弹出下载-->
<div class="download">
<div class="center-center download-hight">
<div class="download-content bg-w t-c">
<a href="javascript:;" class="close">&nbsp;</a>
<div class="text">
<img src="">
<h3>文件名称</h3>
<p></p>
<a href="#" class="btn1" id="preview-button" onclick="previewBtn(this)">预览</a>
<a onclick="downloadfile(this)" id="download" class="btn2" download="">下载</a>
</div>
</div>
</div>
</div>
<!--点击弹出历史记录-->
<div class="history">
<div class="center-center download-hight">
<div class="history-content bg-w">
<div class="on-name">
<h3 class="font-14">历史记录</h3>
</div>
<a href="javascript:;" class="close">&nbsp;</a>
<div class="p-25">
<table class="table">
<thead>
<tr>
<th>文件名称</th>
<th>文件类型</th>
<th>修改时间</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var ajaxData = {
createUser: '',
drafter: '',
fileNum: '',
isPublic: 1,
name: '',
parentFolderId: 0,
endTime: '',
startTime: '',
type: ''
}
var serch_flag = false;
$(function() {
layui.use(['form', 'upload', 'element', 'layer'], function() {
var form = layui.form;
var upload = layui.upload;
var element = layui.element;
var layer = layui.layer;
var haveLogin = localStorage['haveLogin'] || false;
if (haveLogin) {
pageInit();
} else {
var loginInterval = setInterval(function() {
var tmpHaveLogin = localStorage['haveLogin'] || false;
if (tmpHaveLogin) {
clearInterval(loginInterval);
pageInit();
}
}, 500);
}
function pageInit() {
getFileType();
getFileList(ajaxData);
}
$('#toggle-filter').on('click', function() {
layer.open({
type: 1,
title: ['文件过滤', 'font-size:18px;padding:0;text-align:center'],
content: $('#search-form'),
offset: [0, 0],
area: ['100%', '100%'],
closeBtn: 1,
skin: 'file-filter-layer',
success: function(dom, index) {
dom.find('.layui-btn[lay-submit]').on('click', function() {
layer.close(index);
});
}
})
});
//搜索
form.on('submit(formDemo)', function(data) {
ajaxData = {
createUser: data.field.createUser,
drafter: data.field.drafter,
fileNum: data.field.fileNum,
isPublic: 1,
name: data.field.name,
//parentFolderId: $("#navigation").val(),
parentFolderId: '',
startTime: data.field.times.split(' - ')[0] || '',
endTime: data.field.times.split(' - ')[1] || '',
type: data.field.type
}
// $("#navigation").val(0)
// $('.con-list .name span a').next().remove()
getFileList(ajaxData);
serch_flag = true;
return false;
});
//文件类型
function getFileType() {
$.ajax({
url: host + '/ding/file/getFileType'+'?timetmp='+ Date.parse( new Date() ).toString().substr(0,10),
headers: {
'Blade-Auth': 'bearer ' + accessToken,
},
data: {},
type: "get",
dataType: "json",
success: function(data) {
if (data.code == 200) {
if (data.data.length > 0) {
data.data.forEach(function(item) {
$('.con-search select[name=type]').append(
'<option value="' + item + '">' + item +
'</option>')
})
form.render()
}
// else {
// layer.msg('暂无记录')
// }
} else {
layer.msg(data.msg)
}
},
error: function(data) {
console.log(data);
}
});
}
});
})
function init() {
$('.con-list .name span .icon-back').off("click").click(function() {
var that = $(this);
if (serch_flag) {
$("#search-form")[0].reset();
layui.use(['form'], function() {
var form = layui.form;
form.render();
})
$("#navigation").val($('.con-list .name span a').last().attr('data-id'))
var ajaxData = {
createUser: '',
drafter: '',
fileNum: '',
isPublic: 1,
name: '',
parentFolderId: parseInt($('.con-list .name span a').last().attr('data-id')),
endTime: '',
startTime: '',
type: ''
}
getFileList(ajaxData);
} else {
if ($("#navigation").val() != 0) {
var ajaxData = {
createUser: '',
drafter: '',
fileNum: '',
isPublic: 1,
name: '',
parentFolderId: parseInt($('.con-list .name span a').eq(-2).attr('data-id')),
endTime: '',
startTime: '',
type: ''
}
$("#navigation").val($('.con-list .name span a').eq(-2).attr('data-id'))
$('.con-list .name span a').eq(-1).remove()
getFileList(ajaxData)
}
}
serch_flag = false;
});
//路由事件
$('#folder-navigation a').off("click").click(function() {
var that = $(this)
console.log(that.attr('data-id'), 'parentFolderId');
ajaxData.parentFolderId = that.attr('data-id')
ajaxData.name = '';
$('.con-list .name span a').each(function() {
if ($(this).index() >= that.index()) {
$('.con-list .name span a').eq($(this).index()).remove()
}
})
$("#navigation").val(that.attr('data-id'))
getFileList(ajaxData);
serch_flag = false;
})
}
//历史记录
function getHistory(obj) {
$.ajax({
url: host + '/ding/file/getHistory'+'?timetmp='+ Date.parse( new Date() ).toString().substr(0,10),
headers: {
'Blade-Auth': 'bearer ' + accessToken,
},
data: {
groupId: $(obj).attr('data-groupid')
},
type: "get",
dataType: "json",
success: function(data) {
if (data.code == 200) {
if (data.data.length > 0) {
var html = '';
data.data.forEach(function(item) {
html += '<tr>' +
'<td><div class="list-img click-download" onclick="openFile(this)" data-id="' +
item.id + '" data-name="' + item.name + '" data-type="' + item
.type + '" data-url="' + item.url + '" data-time="' + item
.createTime + '" data-dingid="' + item.dingFileId +
'" data-dingname="' + item.dingFileName + '" data-dingsize="' + item
.dingFileSize + '" data-spaceid="' + item.dingSpaceId +
'"><img src="image/icon_22.png"><span>' + item.name +
'</span></div></td>'
html += '<td>';
if (item.isPublic) {
html += '公共文件类型';
} else {
html += '内部文件类型';
}
html += '</td>';
html += '<td>' + item.updateTime + '</td>' +
'</tr>';
})
$(".history .table tbody").html(html)
$(".history").show();
}
// else {
// layer.msg('暂无记录')
// }
} else {
layer.msg(data.msg)
}
},
error: function(data) {
console.log(data);
}
});
}
//打开文件夹
function openFolder(obj) {
ajaxData.parentFolderId = $(obj).attr('data-id')
getFileList(ajaxData)
$("#navigation").val($(obj).attr('data-id'));
$('#folder-navigation').append('<a data-id="' + $(obj).attr('data-id') + '"> > ' + $(obj).text() + '</a>');
serch_flag = false;
}
//文件下载
function downloadfile(obj) {
var id = $(obj).data('fileid');
$.ajax({
url: host + '/ding/file/downLoadFile'+'?timetmp='+ Date.parse( new Date() ).toString().substr(0,10),
headers: {
'Blade-Auth': 'bearer ' + localStorage.accessToken
},
data: {
fileId: id
},
type: "get",
contentType: "application/json",
dataType: "json",
success: function(data) {
if (data.code == 200) {
$(obj).attr('data', data.data);
console.log(data.data);
window.open(data.data);
} else {
layer.msg(data.msg)
}
},
error: function(data) {
console.log(data);
}
});
}
//预览文件
function openFile(obj) {
var id = $(obj).attr('data-id');
var name = $(obj).attr('data-name');
var type = $(obj).attr('data-type');
var url = $(obj).attr('data-url');
var time = $(obj).attr('data-time');
var dingFileId = $(obj).data('dingid');
var dingFileName = $(obj).data('dingname');
var dingFileSize = $(obj).data('dingsize');
var dingSpaceId = $(obj).data('spaceid');
$('.download .download-content .text h3').text(name)
$('.download .download-content .text p').text(time)
$('.download .download-content .text a.btn2').attr('download', name)
$('.download-content .text img').attr('src', 'image/icon-file/icon_' + type + '.png')
$('#download').data('fileid', id);
var previewButton = $('#preview-button');
previewButton.attr('dingfileid', dingFileId);
previewButton.attr('dingfilename', dingFileName);
previewButton.attr('dingfilesize', dingFileSize);
previewButton.attr('dingspaceid', dingSpaceId);
previewButton.attr('filetype', type);
$('.download').show()
// $.ajax({
// url: host + '/ding/file/downLoadFile',
// headers: {
// 'Blade-Auth': 'bearer ' + localStorage.accessToken
// },
// data: {
// fileId: id
// },
// type: "get",
// contentType:"application/json",
// dataType: "json",
// success: function(data) {
// if (data.code == 200) {
// console.log(data.data, '路径555');
// $('.download .download-content .text a.btn1').attr('data-url',data.data)
// $('.download .download-content .text a.btn2').attr('href',data.data)
// $('.download').show()
// } else {
// layer.msg(data.msg)
// }
// },
// error: function(data) {
// console.log(data);
// }
// });
}
//隐藏文件
function hideFile(obj){
layer.confirm('确认隐藏改文件吗?', {
btn: ['确认', '取消'] //可以无限个按钮
,
}, function(index, layero){
//按钮【按钮一】的回调
$.ajax({
url: host + '/ding/file/disPlayFile'+'?timetmp='+ Date.parse( new Date() ).toString().substr(0,10),
headers: {
'Blade-Auth': 'bearer ' + localStorage.accessToken
},
data: {
fileId:$(obj).attr("data-id"),
isShow:0
},
type: "get",
contentType: "application/x-www-form-urlencoded",
dataType: "json",
success: function(data) {
if(data.code==200){
layer.msg('隐藏成功')
getFileList(ajaxData)
}else{
layer.msg(data.msg)
}
},
error: function(data) {
console.log(data);
}
})
}, function(index){
//按钮【按钮二】的回调
layer.closeAll();
});
return false;
}
//文件列表
function getFileList(ajaxData) {
console.log(ajaxData, 'getFileList');
$('.list-content#Chart ul').empty()
$('.list-content#tab tbody').empty()
$.ajax({
url: host + '/ding/file/getFileList'+'?timetmp='+ Date.parse( new Date() ).toString().substr(0,10),
headers: {
'Blade-Auth': 'bearer ' + localStorage.accessToken
},
data: ajaxData,
type: "get",
contentType: "application/x-www-form-urlencoded",
dataType: "json",
success: function(data) {
if (data.code == 200) {
init()
if (data.data.folders.length > 0) {
data.data.folders.forEach(function(item) {
var html1 =
'<li class="list" onclick="openFolder(this)" ondblclick="openFolder(this)" data-id="' +
item.id + '">' +
'<div class="img"><img src="image/'+(item.folderType=="0"?"icon_11.png":"icon_11_2.png")+'"></div>' +
'<div class="text-two-hide list-hight">' + item.name + '</div>' +
'</li>'
$('.list-content#Chart ul').append(html1)
var html2 = '<tr>' +
'<td><div class="list-img" onclick="openFolder(this)" ondblclick ="openFolder(this)" data-id="' +
item.id + '"><img src="image/'+(item.folderType=="0"?"icon_11.png":"icon_11_2.png")+'"><span>' + item.name +
'</span></div></td>' +
'<td></td>' +
'<td></td>' +
'<td></td>' +
'<td>公共文件</td>' +
'<td>' + item.createTime + '</td>' +
'<td></td>'
//+'<td><a href="javascript:;" class="news-red" data-groupid="'+item.groupId+'" onclick="getHistory(this)">历史记录</a></td>'
+
'</tr>'
$('.list-content#tab tbody').append(html2)
})
}
if (data.data.files.length > 0) {
data.data.files.forEach(function(item) {
var html1 =
'<li class="list click-download" >'
+ '<div class="more">'
+ '<span>...</span>'
+ '<div class="more-edit" onclick="hideFile(this)" data-id="' + item.id + '" data-name="' + item.name + '">隐藏</div>'
+ '</div>'+
'<div class="img" onclick="openFile(this)" data-id="' +
item.id + '" data-name="' + item.name + '" data-type="' + item
.type + '" data-url="' + item.url + '" data-time="' + item
.createTime + '" data-dingid="' + item.dingFileId +
'" data-dingname="' + item.dingFileName + '" data-dingsize="' + item
.dingFileSize + '" data-spaceid="' + item.dingSpaceId + '"><img src="image/icon-file/icon_' + item.type +
'.png"></div>' +
'<div class="text-two-hide list-hight">' + item.name + '</div>' +
'</li>'
$('.list-content#Chart ul').append(html1)
var html2 = '<tr>' +
'<td>'
+ '<div class="more">'
+ '<span>...</span>'
+ '<div class="more-edit" onclick="hideFile(this)" data-id="' + item.id + '" data-name="' + item.name + '">隐藏</div>'
+ '</div>'
+
'<div class="list-img" onclick="openFile(this)" data-id="' +
item.id + '" data-name="' + item.name + '" data-type="' + item
.type + '" data-url="' + item.url + '" data-time="' + item
.createTime + '" ><img src="image/icon-file/icon_' + item.type +
'.png"><span>' + item.name + '</span></div></td>' +
'<td>' + item.number + '</td>' +
'<td><div class="list-img"><span>' + item.drafter +
'</span></div></td>' +
'<td><div class="list-img"><span>' + item.createUser +
'</span></div></td>' +
'<td>' + item.type + '</td>' +
'<td>' + item.createTime + '</td>'
html2 += '<td>';
if (item.isHistory == 1) {
html2 += '<a href="javascript:;" class="news-red" data-groupid="' +
item.groupId + '" onclick="getHistory(this)">历史记录</a>';
}
html2 += '</td>';
html2 += '</tr>';
$('.list-content#tab tbody').append(html2)
})
}
if (data.data.folders.length == 0 && data.data.files.length == 0) {
$('.no-con-list').show()
} else {
$('.no-con-list').hide()
}
} else {
layer.msg(data.msg)
}
},
error: function(data) {
console.log(data);
}
});
}
</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">
<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">
<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>

1108
dist/index.html vendored Normal file

File diff suppressed because it is too large Load Diff

1072
dist/inside.html vendored Normal file

File diff suppressed because it is too large Load Diff

1
dist/js/dingtalk.open.js vendored Normal file

File diff suppressed because one or more lines are too long

2114
dist/js/dx_bootstrap.js vendored Normal file

File diff suppressed because it is too large Load Diff

2
dist/js/jquery-3.4.1.min.js vendored Normal file

File diff suppressed because one or more lines are too long

2
dist/js/layui/css/layui.css vendored Normal file

File diff suppressed because one or more lines are too long

2
dist/js/layui/css/layui.mobile.css vendored Normal file

File diff suppressed because one or more lines are too long

2
dist/js/layui/css/modules/code.css vendored Normal file
View File

@ -0,0 +1,2 @@
/** layui-v2.5.6 MIT License By https://www.layui.com */
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
dist/js/layui/font/iconfont.eot vendored Normal file

Binary file not shown.

554
dist/js/layui/font/iconfont.svg vendored Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 299 KiB

BIN
dist/js/layui/font/iconfont.ttf vendored Normal file

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More