提交 5dade8b2 编写于 作者: Skyeye云's avatar Skyeye云

【云盘】拆分微服务完成

上级 11d20b89
...@@ -12,7 +12,7 @@ function getFilePath(treeObj) { ...@@ -12,7 +12,7 @@ function getFilePath(treeObj) {
// 创建Word文件 // 创建Word文件
function createWordFile(folderId, callBack){ function createWordFile(folderId, callBack){
AjaxPostUtil.request({url: reqBasePath + "fileconsole025", params:{folderId: folderId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole025", params: {folderId: folderId}, type: 'json', callback: function (json) {
winui.window.msg("创建成功", {icon: 1, time: 2000}); winui.window.msg("创建成功", {icon: 1, time: 2000});
if(typeof(callBack) == "function") { if(typeof(callBack) == "function") {
callBack(); callBack();
...@@ -22,7 +22,7 @@ function createWordFile(folderId, callBack){ ...@@ -22,7 +22,7 @@ function createWordFile(folderId, callBack){
// 创建Excel文件 // 创建Excel文件
function createExcelFile(folderId, callBack){ function createExcelFile(folderId, callBack){
AjaxPostUtil.request({url: reqBasePath + "fileconsole026", params:{folderId: folderId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole026", params: {folderId: folderId}, type: 'json', callback: function (json) {
winui.window.msg("创建成功", {icon: 1, time: 2000}); winui.window.msg("创建成功", {icon: 1, time: 2000});
if(typeof(callBack) == "function") { if(typeof(callBack) == "function") {
callBack(); callBack();
...@@ -32,7 +32,7 @@ function createExcelFile(folderId, callBack){ ...@@ -32,7 +32,7 @@ function createExcelFile(folderId, callBack){
// 创建PPT文件 // 创建PPT文件
function createPPTFile(folderId, callBack){ function createPPTFile(folderId, callBack){
AjaxPostUtil.request({url: reqBasePath + "fileconsole027", params:{folderId: folderId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole027", params: {folderId: folderId}, type: 'json', callback: function (json) {
winui.window.msg("创建成功", {icon: 1, time: 2000}); winui.window.msg("创建成功", {icon: 1, time: 2000});
if(typeof(callBack) == "function") { if(typeof(callBack) == "function") {
callBack(); callBack();
...@@ -42,7 +42,7 @@ function createPPTFile(folderId, callBack){ ...@@ -42,7 +42,7 @@ function createPPTFile(folderId, callBack){
// 创建TXT文件 // 创建TXT文件
function createTXTFile(folderId, callBack){ function createTXTFile(folderId, callBack){
AjaxPostUtil.request({url: reqBasePath + "fileconsole028", params:{folderId: folderId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole028", params: {folderId: folderId}, type: 'json', callback: function (json) {
winui.window.msg("创建成功", {icon: 1, time: 2000}); winui.window.msg("创建成功", {icon: 1, time: 2000});
if(typeof(callBack) == "function") { if(typeof(callBack) == "function") {
callBack(); callBack();
...@@ -52,7 +52,7 @@ function createTXTFile(folderId, callBack){ ...@@ -52,7 +52,7 @@ function createTXTFile(folderId, callBack){
// 创建Html文件 // 创建Html文件
function createHtmlFile(folderId, callBack){ function createHtmlFile(folderId, callBack){
AjaxPostUtil.request({url: reqBasePath + "fileconsole029", params:{folderId: folderId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole029", params: {folderId: folderId}, type: 'json', callback: function (json) {
winui.window.msg("创建成功", {icon: 1, time: 2000}); winui.window.msg("创建成功", {icon: 1, time: 2000});
if(typeof(callBack) == "function") { if(typeof(callBack) == "function") {
callBack(); callBack();
...@@ -62,7 +62,7 @@ function createHtmlFile(folderId, callBack){ ...@@ -62,7 +62,7 @@ function createHtmlFile(folderId, callBack){
// 创建文件夹 // 创建文件夹
function createFolder(folderId, refreshCallBack, initDragCallBack, currentUserId){ function createFolder(folderId, refreshCallBack, initDragCallBack, currentUserId){
AjaxPostUtil.request({url: reqBasePath + "fileconsole002", params: {parentId: folderId, catalogName: '新建文件夹'}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole002", params: {parentId: folderId, catalogName: '新建文件夹'}, type: 'json', callback: function (json) {
initNewFolder(json.bean.id, json.bean.catalogName, json.bean.logoPath, true, currentUserId); initNewFolder(json.bean.id, json.bean.catalogName, json.bean.logoPath, true, currentUserId);
// 刷新节点 // 刷新节点
if(typeof(refreshCallBack) == "function") { if(typeof(refreshCallBack) == "function") {
......
...@@ -10,7 +10,7 @@ layui.config({ ...@@ -10,7 +10,7 @@ layui.config({
var index = parent.layer.getFrameIndex(window.name); var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$; var $ = layui.$;
AjaxPostUtil.request({url: reqBasePath + "fileconsole031", params:{rowId: parent.shareId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole031", params: {rowId: parent.shareId}, type: 'json', callback: function (json) {
$("#fileName").html(json.bean.fileName); $("#fileName").html(json.bean.fileName);
$("#fileType").html(json.bean.fileType); $("#fileType").html(json.bean.fileType);
$("#createName").html(json.bean.createUserName); $("#createName").html(json.bean.createUserName);
......
...@@ -57,7 +57,7 @@ layui.config({ ...@@ -57,7 +57,7 @@ layui.config({
var ztree = null; var ztree = null;
fsTree.render({ fsTree.render({
id: "treeDemo", id: "treeDemo",
url: reqBasePath + "fileconsole001", url: sysMainMation.diskCloudBasePath + "fileconsole001",
checkEnable: false, checkEnable: false,
loadEnable: true,//异步加载 loadEnable: true,//异步加载
showLine: false, showLine: false,
...@@ -277,7 +277,7 @@ layui.config({ ...@@ -277,7 +277,7 @@ layui.config({
// 加载目录下的文件 // 加载目录下的文件
loadThisFolderChild(); loadThisFolderChild();
}else if($.inArray(fileType, vedioType) >= 0){//视频 }else if($.inArray(fileType, vedioType) >= 0){//视频
AjaxPostUtil.request({url: reqBasePath + "fileconsole009", params:{rowId: $(this).attr("rowid")}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole009", params: {rowId: $(this).attr("rowid")}, type: 'json', callback: function (json) {
fileUrl = json.bean.fileAddress; fileUrl = json.bean.fileAddress;
fileThumbnail = json.bean.fileThumbnail; fileThumbnail = json.bean.fileThumbnail;
_openNewWindows({ _openNewWindows({
...@@ -289,21 +289,21 @@ layui.config({ ...@@ -289,21 +289,21 @@ layui.config({
}}); }});
}else if($.inArray(fileType, officeType) >= 0){//office文件 }else if($.inArray(fileType, officeType) >= 0){//office文件
var thisId = $(this).attr("rowid"); var thisId = $(this).attr("rowid");
AjaxPostUtil.request({url: reqBasePath + "fileconsole009", params:{rowId: thisId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole009", params: {rowId: thisId}, type: 'json', callback: function (json) {
fileUrl = json.bean.fileAddress; fileUrl = json.bean.fileAddress;
selFileType = json.bean.fileType; selFileType = json.bean.fileType;
window.open(reqBasePath + "/tpl/fileconsole/officeshow.html?fileUrl=" + fileUrl + "&selFileType=" + selFileType + "&title=" + json.bean.fileName + "&thisId=" + thisId); window.open(sysMainMation.homePagePath + "/tpl/fileconsole/officeshow.html?fileUrl=" + fileUrl + "&selFileType=" + selFileType + "&title=" + json.bean.fileName + "&thisId=" + thisId);
}}); }});
}else if($.inArray(fileType, aceType) >= 0){//ace文件 }else if($.inArray(fileType, aceType) >= 0){//ace文件
var thisId = $(this).attr("rowid"); var thisId = $(this).attr("rowid");
_openNewWindows({ _openNewWindows({
url: reqBasePath + "fileconsole024?rowId=" + thisId, url: sysMainMation.diskCloudBasePath + "fileconsole024?rowId=" + thisId,
title: '在线预览', title: '在线预览',
pageId: "aceShow", pageId: "aceShow",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){}}); callBack: function(refreshCode){}});
}else if($.inArray(fileType, epubType) >= 0){//电子书 }else if($.inArray(fileType, epubType) >= 0){//电子书
AjaxPostUtil.request({url: reqBasePath + "fileconsole009", params:{rowId: $(this).attr("rowid")}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole009", params: {rowId: $(this).attr("rowid")}, type: 'json', callback: function (json) {
fileUrl = json.bean.fileAddress; fileUrl = json.bean.fileAddress;
fileThumbnail = json.bean.fileThumbnail; fileThumbnail = json.bean.fileThumbnail;
_openNewWindows({ _openNewWindows({
...@@ -314,7 +314,7 @@ layui.config({ ...@@ -314,7 +314,7 @@ layui.config({
callBack: function(refreshCode){}}); callBack: function(refreshCode){}});
}}); }});
}else if($.inArray(fileType, packageType) >= 0){//压缩包 }else if($.inArray(fileType, packageType) >= 0){//压缩包
AjaxPostUtil.request({url: reqBasePath + "fileconsole009", params:{rowId: $(this).attr("rowid")}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole009", params: {rowId: $(this).attr("rowid")}, type: 'json', callback: function (json) {
fileUrl = json.bean.fileAddress; fileUrl = json.bean.fileAddress;
fileThumbnail = json.bean.fileThumbnail; fileThumbnail = json.bean.fileThumbnail;
_openNewWindows({ _openNewWindows({
...@@ -408,7 +408,7 @@ layui.config({ ...@@ -408,7 +408,7 @@ layui.config({
// 删除文件夹以及该文件夹下的所有子内容 // 删除文件夹以及该文件夹下的所有子内容
function deleteFolderAndChild(deleteArray, callBack){ function deleteFolderAndChild(deleteArray, callBack){
AjaxPostUtil.request({url: reqBasePath + "fileconsole004", params:{fileList: JSON.stringify(deleteArray)}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole004", params: {fileList: JSON.stringify(deleteArray)}, type: 'json', callback: function (json) {
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
callBack(); callBack();
}}); }});
...@@ -421,7 +421,7 @@ layui.config({ ...@@ -421,7 +421,7 @@ layui.config({
$(".layui-dropdown-menu").hide(); $(".layui-dropdown-menu").hide();
$(".select-op-more").hide(); $(".select-op-more").hide();
var fileType = $("#file-content div[rowid='" + operaterId + "']").attr("filetype"); var fileType = $("#file-content div[rowid='" + operaterId + "']").attr("filetype");
AjaxPostUtil.request({url: reqBasePath + "fileconsole013", params:{rowId: operaterId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole013", params: {rowId: operaterId}, type: 'json', callback: function (json) {
winui.window.msg("已放入回收站", {icon: 1, time: 2000}); winui.window.msg("已放入回收站", {icon: 1, time: 2000});
$("#file-content div[rowid='" + operaterId + "']").remove(); $("#file-content div[rowid='" + operaterId + "']").remove();
// 如果删除的对象是文件夹 // 如果删除的对象是文件夹
...@@ -451,7 +451,7 @@ layui.config({ ...@@ -451,7 +451,7 @@ layui.config({
jsonStr: jsonStr jsonStr: jsonStr
}; };
winui.window.msg("文件副本创建中,期间请勿进行其他操作。", {icon: 7,time: 4000}); winui.window.msg("文件副本创建中,期间请勿进行其他操作。", {icon: 7,time: 4000});
AjaxPostUtil.request({url: reqBasePath + "fileconsole030", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole030", params: params, type: 'json', callback: function (json) {
winui.window.msg("副本创建成功", {icon: 1, time: 2000}); winui.window.msg("副本创建成功", {icon: 1, time: 2000});
if(fileType === 'folder'){//文件夹 if(fileType === 'folder'){//文件夹
//刷新节点 //刷新节点
...@@ -502,7 +502,7 @@ layui.config({ ...@@ -502,7 +502,7 @@ layui.config({
jsonStr: jsonStr jsonStr: jsonStr
}; };
winui.window.msg("文件打包中,期间请勿进行其他操作.", {icon: 7,time: 4000}); winui.window.msg("文件打包中,期间请勿进行其他操作.", {icon: 7,time: 4000});
AjaxPostUtil.request({url: reqBasePath + "fileconsole032", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole032", params: params, type: 'json', callback: function (json) {
winui.window.msg("打包成功.", {icon: 1, time: 2000}); winui.window.msg("打包成功.", {icon: 1, time: 2000});
loadThisFolderChild(); loadThisFolderChild();
}}); }});
...@@ -512,17 +512,17 @@ layui.config({ ...@@ -512,17 +512,17 @@ layui.config({
$("body").on("click", ".openByOnlyOffice", function (e) { $("body").on("click", ".openByOnlyOffice", function (e) {
var thisId = operaterId; var thisId = operaterId;
$(".layui-dropdown-menu").hide(); $(".layui-dropdown-menu").hide();
AjaxPostUtil.request({url: reqBasePath + "fileconsole009", params:{rowId: thisId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole009", params:{rowId: thisId}, type: 'json', callback: function (json) {
fileUrl = json.bean.fileAddress; fileUrl = json.bean.fileAddress;
selFileType = json.bean.fileType; selFileType = json.bean.fileType;
window.open(reqBasePath + "/tpl/fileconsole/officeshow.html?fileUrl=" + fileUrl + "&selFileType=" + selFileType + "&title=" + json.bean.fileName + "&thisId=" + thisId); window.open(sysMainMation.homePagePath + "/tpl/fileconsole/officeshow.html?fileUrl=" + fileUrl + "&selFileType=" + selFileType + "&title=" + json.bean.fileName + "&thisId=" + thisId);
}}); }});
}); });
// 通过微软office打开office文件 // 通过微软office打开office文件
$("body").on("click", ".openByMicrosoftOffice", function (e) { $("body").on("click", ".openByMicrosoftOffice", function (e) {
$(".layui-dropdown-menu").hide(); $(".layui-dropdown-menu").hide();
AjaxPostUtil.request({url: reqBasePath + "fileconsole009", params:{rowId: operaterId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole009", params:{rowId: operaterId}, type: 'json', callback: function (json) {
window.open('https://view.officeapps.live.com/op/view.aspx?src=http://gzwp.free.idcfengye.com/' + json.bean.fileAddress); window.open('https://view.officeapps.live.com/op/view.aspx?src=http://gzwp.free.idcfengye.com/' + json.bean.fileAddress);
}}); }});
}); });
...@@ -561,7 +561,7 @@ layui.config({ ...@@ -561,7 +561,7 @@ layui.config({
jsonStr: jsonStr jsonStr: jsonStr
}; };
winui.window.msg("文件打包中,期间请勿进行其他操作.", {icon: 7,time: 4000}); winui.window.msg("文件打包中,期间请勿进行其他操作.", {icon: 7,time: 4000});
AjaxPostUtil.request({url: reqBasePath + "fileconsole038", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole038", params: params, type: 'json', callback: function (json) {
winui.window.msg("打包成功,开始下载.", {icon: 1, time: 2000}); winui.window.msg("打包成功,开始下载.", {icon: 1, time: 2000});
if(isNull(json.bean) || isNull(json.bean.fileAddress)){ if(isNull(json.bean) || isNull(json.bean.fileAddress)){
winui.window.msg('打包失败', {icon: 2, time: 2000}); winui.window.msg('打包失败', {icon: 2, time: 2000});
...@@ -572,7 +572,7 @@ layui.config({ ...@@ -572,7 +572,7 @@ layui.config({
}}); }});
} else { } else {
//不包含文件夹 //不包含文件夹
AjaxPostUtil.request({url: reqBasePath + "fileconsole009", params:{rowId: operaterId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole009", params: {rowId: operaterId}, type: 'json', callback: function (json) {
if($.inArray(json.bean.fileType, imageType) >= 0){//图片 if($.inArray(json.bean.fileType, imageType) >= 0){//图片
downloadImage(fileBasePath + json.bean.fileAddress, json.bean.fileName); downloadImage(fileBasePath + json.bean.fileAddress, json.bean.fileName);
} else { } else {
...@@ -586,7 +586,7 @@ layui.config({ ...@@ -586,7 +586,7 @@ layui.config({
$("body").on("click", ".unzipToTheCurrent", function (e) { $("body").on("click", ".unzipToTheCurrent", function (e) {
layer.confirm("确定解压该压缩包到当前文件夹吗?", { icon: 3, title: '压缩包解压' }, function (index) { layer.confirm("确定解压该压缩包到当前文件夹吗?", { icon: 3, title: '压缩包解压' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: reqBasePath + "fileconsole033", params:{rowId: operaterId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole033", params: {rowId: operaterId}, type: 'json', callback: function (json) {
winui.window.msg("解压成功。", {icon: 1, time: 2000}); winui.window.msg("解压成功。", {icon: 1, time: 2000});
refreshTreePointNode(); refreshTreePointNode();
loadThisFolderChild(); loadThisFolderChild();
...@@ -713,7 +713,7 @@ layui.config({ ...@@ -713,7 +713,7 @@ layui.config({
layer.confirm("确定将该文件夹及其子文件放入回收站吗?", { icon: 3, title: '回收站' }, function (index) { layer.confirm("确定将该文件夹及其子文件放入回收站吗?", { icon: 3, title: '回收站' }, function (index) {
layer.close(index); layer.close(index);
var fileType = 'folder'; var fileType = 'folder';
AjaxPostUtil.request({url: reqBasePath + "fileconsole013", params:{rowId: folderId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole013", params: {rowId: folderId}, type: 'json', callback: function (json) {
winui.window.msg("已放入回收站", {icon: 1, time: 2000}); winui.window.msg("已放入回收站", {icon: 1, time: 2000});
$("#file-content div[rowid='" + folderId + "']").remove(); $("#file-content div[rowid='" + folderId + "']").remove();
var selNode = ztree.getNodeByParam("id", folderId, null); var selNode = ztree.getNodeByParam("id", folderId, null);
...@@ -839,7 +839,7 @@ layui.config({ ...@@ -839,7 +839,7 @@ layui.config({
} }
if(newName != title){//修改前的名称和当前名称不一致,则调用后台接口进行修改 if(newName != title){//修改前的名称和当前名称不一致,则调用后台接口进行修改
var id = fileFolderEdit.parent().attr("rowid"); var id = fileFolderEdit.parent().attr("rowid");
AjaxPostUtil.request({url: reqBasePath + "fileconsole005", params: {rowId: id, catalogName: newName, fileType: fileType}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole005", params: {rowId: id, catalogName: newName, fileType: fileType}, type: 'json', callback: function (json) {
fileFolderEdit.parent().find("div[class='filename']").show(); fileFolderEdit.parent().find("div[class='filename']").show();
fileFolderEdit.parent().find("div[class='filename']").find("span").html(newName); fileFolderEdit.parent().find("div[class='filename']").find("span").html(newName);
fileFolderEdit.parent().attr("title", "名称:" + newName); fileFolderEdit.parent().attr("title", "名称:" + newName);
...@@ -874,7 +874,7 @@ layui.config({ ...@@ -874,7 +874,7 @@ layui.config({
} }
function loadThisFolderChildList(){ function loadThisFolderChildList(){
AjaxPostUtil.request({url: reqBasePath + "fileconsole003", params: {folderId: folderId, orderBy: orderBy}, type: 'json', callback: function(j){ AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole003", params: {folderId: folderId, orderBy: orderBy}, type: 'json', callback: function(j){
// 遮罩层隐藏 // 遮罩层隐藏
$(".fileconsole-mask").hide(); $(".fileconsole-mask").hide();
var jsonStr = "";//实体json对象 var jsonStr = "";//实体json对象
...@@ -1215,7 +1215,7 @@ layui.config({ ...@@ -1215,7 +1215,7 @@ layui.config({
}; };
//遮罩层显示 //遮罩层显示
$(".fileconsole-mask").show(); $(".fileconsole-mask").show();
AjaxPostUtil.request({url: reqBasePath + "fileconsole035", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole035", params: params, type: 'json', callback: function (json) {
refreshTreePointNode();//刷新树节点 refreshTreePointNode();//刷新树节点
loadThisFolderChild();//刷新文件列表 loadThisFolderChild();//刷新文件列表
if(typeof(callback) == "function") { if(typeof(callback) == "function") {
...@@ -1231,7 +1231,7 @@ layui.config({ ...@@ -1231,7 +1231,7 @@ layui.config({
//加载总文件大小 //加载总文件大小
function loadFileSizeById(){ function loadFileSizeById(){
loadFileSizeCS = true; loadFileSizeCS = true;
AjaxPostUtil.request({url: reqBasePath + "fileconsole012", params: {}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole012", params: {}, type: 'json', callback: function (json) {
$(".memory-num").html(json.bean.size); $(".memory-num").html(json.bean.size);
}, async: false}); }, async: false});
} }
...@@ -1546,7 +1546,7 @@ layui.config({ ...@@ -1546,7 +1546,7 @@ layui.config({
}; };
winui.window.msg("文件正在粘贴中,期间请勿进行其他操作。", {icon: 7,time: 4000}); winui.window.msg("文件正在粘贴中,期间请勿进行其他操作。", {icon: 7,time: 4000});
if(pastedJson.type === '1' || pastedJson.type == 1){ if(pastedJson.type === '1' || pastedJson.type == 1){
AjaxPostUtil.request({url: reqBasePath + "fileconsole034", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole034", params: params, type: 'json', callback: function (json) {
winui.window.msg("文件粘贴成功", {icon: 1, time: 2000}); winui.window.msg("文件粘贴成功", {icon: 1, time: 2000});
if(pastedJson.fileType === 'folder'){//文件夹 if(pastedJson.fileType === 'folder'){//文件夹
//刷新节点 //刷新节点
...@@ -1555,7 +1555,7 @@ layui.config({ ...@@ -1555,7 +1555,7 @@ layui.config({
loadThisFolderChild(); loadThisFolderChild();
}}); }});
}else if(pastedJson.type === '2' || pastedJson.type == 2){ }else if(pastedJson.type === '2' || pastedJson.type == 2){
AjaxPostUtil.request({url: reqBasePath + "fileconsole035", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole035", params: params, type: 'json', callback: function (json) {
var selNode = ztree.getNodeByParam("id", pastedJson.id, null); var selNode = ztree.getNodeByParam("id", pastedJson.id, null);
if(!isNull(selNode)){ if(!isNull(selNode)){
ztree.removeNode(selNode);//移除节点 ztree.removeNode(selNode);//移除节点
...@@ -1682,7 +1682,7 @@ layui.config({ ...@@ -1682,7 +1682,7 @@ layui.config({
//当前分块大小 //当前分块大小
"chunkSize": block.end - block.start "chunkSize": block.end - block.start
}; };
AjaxPostUtil.request({url: reqBasePath + "fileconsole008", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole008", params: params, type: 'json', callback: function (json) {
//分块存在,跳过 //分块存在,跳过
deferred.reject(); deferred.reject();
}, errorCallback: function (json) { }, errorCallback: function (json) {
...@@ -1696,7 +1696,7 @@ layui.config({ ...@@ -1696,7 +1696,7 @@ layui.config({
//时间点3:所有分块上传成功后调用此函数 //时间点3:所有分块上传成功后调用此函数
afterSendFile: function (data) { afterSendFile: function (data) {
//如果分块上传成功,则通知后台合并分块 //如果分块上传成功,则通知后台合并分块
AjaxPostUtil.request({url: reqBasePath + "fileconsole007", params: {md5: md5, folderId: folderId, name: data.name, size: data.size}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole007", params: {md5: md5, folderId: folderId, name: data.name, size: data.size}, type: 'json', callback: function (json) {
}}); }});
} }
}); });
...@@ -1718,7 +1718,7 @@ layui.config({ ...@@ -1718,7 +1718,7 @@ layui.config({
fileSizeLimit: 2000 * 1024 * 1024,//最大2GB fileSizeLimit: 2000 * 1024 * 1024,//最大2GB
fileSingleSizeLimit: 2000 * 1024 * 1024, fileSingleSizeLimit: 2000 * 1024 * 1024,
resize: false,//不压缩 resize: false,//不压缩
server: reqBasePath + 'fileconsole006', server: sysMainMation.diskCloudBasePath + 'fileconsole006',
fileNumLimit: 300 fileNumLimit: 300
}); });
// 添加“添加文件”的按钮, // 添加“添加文件”的按钮,
......
...@@ -101,7 +101,7 @@ function loadUploadMethod(){ ...@@ -101,7 +101,7 @@ function loadUploadMethod(){
//当前分块大小 //当前分块大小
"chunkSize": block.end - block.start "chunkSize": block.end - block.start
}; };
AjaxPostUtil.request({url: reqBasePath + "fileconsole008", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole008", params: params, type: 'json', callback: function (json) {
//分块存在,跳过 //分块存在,跳过
deferred.reject(); deferred.reject();
}, errorCallback: function (json) { }, errorCallback: function (json) {
...@@ -115,7 +115,7 @@ function loadUploadMethod(){ ...@@ -115,7 +115,7 @@ function loadUploadMethod(){
//时间点3:所有分块上传成功后调用此函数 //时间点3:所有分块上传成功后调用此函数
afterSendFile: function (data) { afterSendFile: function (data) {
//如果分块上传成功,则通知后台合并分块 //如果分块上传成功,则通知后台合并分块
AjaxPostUtil.request({url: reqBasePath + "fileconsole007", params: {md5: md5, folderId: parent.folderId, name: data.name, size: data.size}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole007", params: {md5: md5, folderId: parent.folderId, name: data.name, size: data.size}, type: 'json', callback: function (json) {
}}); }});
} }
}); });
...@@ -141,7 +141,7 @@ function loadUploadMethod(){ ...@@ -141,7 +141,7 @@ function loadUploadMethod(){
fileSizeLimit: 2000 * 1024 * 1024,//最大2GB fileSizeLimit: 2000 * 1024 * 1024,//最大2GB
fileSingleSizeLimit: 2000 * 1024 * 1024, fileSingleSizeLimit: 2000 * 1024 * 1024,
resize: false,//不压缩 resize: false,//不压缩
server: reqBasePath + 'fileconsole006', server: sysMainMation.diskCloudBasePath + 'fileconsole006',
fileNumLimit: 300, fileNumLimit: 300,
}); });
// 添加“添加文件”的按钮, // 添加“添加文件”的按钮,
......
...@@ -101,7 +101,7 @@ function loadUploadMethod(){ ...@@ -101,7 +101,7 @@ function loadUploadMethod(){
//当前分块大小 //当前分块大小
"chunkSize": block.end - block.start "chunkSize": block.end - block.start
}; };
AjaxPostUtil.request({url: reqBasePath + "fileconsole008", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole008", params: params, type: 'json', callback: function (json) {
//分块存在,跳过 //分块存在,跳过
deferred.reject(); deferred.reject();
}, errorCallback: function (json) { }, errorCallback: function (json) {
...@@ -115,7 +115,7 @@ function loadUploadMethod(){ ...@@ -115,7 +115,7 @@ function loadUploadMethod(){
//时间点3:所有分块上传成功后调用此函数 //时间点3:所有分块上传成功后调用此函数
afterSendFile: function (data) { afterSendFile: function (data) {
//如果分块上传成功,则通知后台合并分块 //如果分块上传成功,则通知后台合并分块
AjaxPostUtil.request({url: reqBasePath + "fileconsole007", params: {md5: md5, folderId: parent.folderId, name: data.name, size: data.size}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole007", params: {md5: md5, folderId: parent.folderId, name: data.name, size: data.size}, type: 'json', callback: function (json) {
}}); }});
} }
}); });
...@@ -142,7 +142,7 @@ function loadUploadMethod(){ ...@@ -142,7 +142,7 @@ function loadUploadMethod(){
fileSizeLimit: 2000 * 1024 * 1024,//最大2GB fileSizeLimit: 2000 * 1024 * 1024,//最大2GB
fileSingleSizeLimit: 2000 * 1024 * 1024, fileSingleSizeLimit: 2000 * 1024 * 1024,
resize: false,//不压缩 resize: false,//不压缩
server: reqBasePath + 'fileconsole006', server: sysMainMation.diskCloudBasePath + 'fileconsole006',
fileNumLimit: 300, fileNumLimit: 300,
}); });
// 添加“添加文件”的按钮, // 添加“添加文件”的按钮,
......
...@@ -14,7 +14,7 @@ layui.config({ ...@@ -14,7 +14,7 @@ layui.config({
var jsonData = new Array(); var jsonData = new Array();
AjaxPostUtil.request({url: reqBasePath + "fileconsole037", params: {}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole037", params: {}, type: 'json', callback: function (json) {
jsonData = json.bean; jsonData = json.bean;
$("#layer02_01 .layer02-data").find('span').eq(0).html(jsonData.allNum.fileNum); $("#layer02_01 .layer02-data").find('span').eq(0).html(jsonData.allNum.fileNum);
drawLayer02Label($("#layer02_01 canvas").get(0), "文件总数量", 80, 200); drawLayer02Label($("#layer02_01 canvas").get(0), "文件总数量", 80, 200);
......
...@@ -75,19 +75,19 @@ layui.config({ ...@@ -75,19 +75,19 @@ layui.config({
systemCommonUtil.getSysCurrentLoginUserMation(function (data){ systemCommonUtil.getSysCurrentLoginUserMation(function (data){
currentUserMation = data.bean; currentUserMation = data.bean;
}); });
AjaxPostUtil.request({url: reqBasePath + "fileconsole036", params:{rowId: thisId}, type: 'json', callback: function(j){ AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole036", params: {rowId: thisId}, type: 'json', callback: function(j){
if(!isNull(j.bean)){ if(!isNull(j.bean)){
window.docEditor = new DocsAPI.DocEditor("placeholder", { window.docEditor = new DocsAPI.DocEditor("placeholder", {
"document": { "document": {
"fileType": selFileType,//定义源查看或编辑文档的文件类型 "fileType": selFileType,//定义源查看或编辑文档的文件类型
"key": thisId + "-" + j.bean.updateTime + "",//定义服务用于文档识别的唯一文档标识符。 如果发送已知密钥,文档将从缓存中获取。 每次文档被编辑和保存时,都必须重新生成密钥。 文档url可以用作密钥,但不包含特殊字符,长度限制为20个符号。(注意如果秘钥值不更换那么看到的文档还是最先加载的缓存文档) "key": thisId + "-" + j.bean.updateTime + "",//定义服务用于文档识别的唯一文档标识符。 如果发送已知密钥,文档将从缓存中获取。 每次文档被编辑和保存时,都必须重新生成密钥。 文档url可以用作密钥,但不包含特殊字符,长度限制为20个符号。(注意如果秘钥值不更换那么看到的文档还是最先加载的缓存文档)
"title": title,//为查看或编辑的文档定义所需的文件名,当文档被下载时它也将被用作文件名。 "title": title,//为查看或编辑的文档定义所需的文件名,当文档被下载时它也将被用作文件名。
"url": "http://192.168.1.105:8081/" + fileUrl,//定义存储源查看或编辑文档的绝对URL "url": sysMainMation.fileBasePath + fileUrl,//定义存储源查看或编辑文档的绝对URL
"userdata": thisId "userdata": thisId
}, },
"documentType": documentType,//文件编辑类型,根据文件的类型在客户端用不通的编辑器来编辑文件主要三种 文档类-text、表格类-spreadsheet、ppt类-presentation "documentType": documentType,//文件编辑类型,根据文件的类型在客户端用不通的编辑器来编辑文件主要三种 文档类-text、表格类-spreadsheet、ppt类-presentation
"editorConfig": { "editorConfig": {
"callbackUrl": "http://192.168.1.105:8081/fileconsole010?id=" + thisId,//文件关闭后回调路劲 这个用来保存文件用的 文件编辑保存后 当你关闭窗口后 server端会请求把你在服务器上的编辑提交到这个路劲 ,所以这个路劲的代码 一般就是上传保存 ; "callbackUrl": sysMainMation.diskCloudBasePath + "fileconsole010?id=" + thisId,//文件关闭后回调路劲 这个用来保存文件用的 文件编辑保存后 当你关闭窗口后 server端会请求把你在服务器上的编辑提交到这个路劲 ,所以这个路劲的代码 一般就是上传保存 ;
"lang": "zh-CN",//"en-US",汉化 "lang": "zh-CN",//"en-US",汉化
"mode": mode, "mode": mode,
"user": { "user": {
......
...@@ -14,9 +14,9 @@ layui.config({ ...@@ -14,9 +14,9 @@ layui.config({
id: 'messageTable', id: 'messageTable',
elem: '#messageTable', elem: '#messageTable',
method: 'post', method: 'post',
url: reqBasePath + 'fileconsole014', url: sysMainMation.diskCloudBasePath + 'fileconsole014',
where:{}, where: {},
even:true, even: true,
page: true, page: true,
limits: [8, 16, 24, 32, 40, 48, 56], limits: [8, 16, 24, 32, 40, 48, 56],
limit: 8, limit: 8,
...@@ -46,7 +46,7 @@ layui.config({ ...@@ -46,7 +46,7 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '还原文件' }, function (index) { layer.confirm(msg, { icon: 3, title: '还原文件' }, function (index) {
layer.close(index); layer.close(index);
parent.refreshCode = '0'; parent.refreshCode = '0';
AjaxPostUtil.request({url: reqBasePath + "fileconsole015", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole015", params: {rowId: data.id}, type: 'json', callback: function (json) {
winui.window.msg("还原成功", {icon: 1, time: 2000}); winui.window.msg("还原成功", {icon: 1, time: 2000});
loadTable(); loadTable();
}}); }});
......
...@@ -33,7 +33,7 @@ layui.config({ ...@@ -33,7 +33,7 @@ layui.config({
rowId: parent.shareId, rowId: parent.shareId,
shareType: shareType shareType: shareType
}; };
AjaxPostUtil.request({url: reqBasePath + "fileconsole016", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole016", params: params, type: 'json', callback: function (json) {
json.bean.shareUrl = reqBasePath + json.bean.shareUrl; json.bean.shareUrl = reqBasePath + json.bean.shareUrl;
var str = "链接:" + json.bean.shareUrl; var str = "链接:" + json.bean.shareUrl;
if(json.bean.shareType === '1'){//无提取码 if(json.bean.shareType === '1'){//无提取码
......
...@@ -14,9 +14,9 @@ layui.config({ ...@@ -14,9 +14,9 @@ layui.config({
id: 'messageTable', id: 'messageTable',
elem: '#messageTable', elem: '#messageTable',
method: 'post', method: 'post',
url: reqBasePath + 'fileconsole017', url: sysMainMation.diskCloudBasePath + 'fileconsole017',
where:{reqBasePath: reqBasePath}, where: {reqBasePath: reqBasePath},
even:true, even: true,
page: true, page: true,
limits: [8, 16, 24, 32, 40, 48, 56], limits: [8, 16, 24, 32, 40, 48, 56],
limit: 8, limit: 8,
...@@ -53,7 +53,7 @@ layui.config({ ...@@ -53,7 +53,7 @@ layui.config({
function cancleShare(data, obj){ function cancleShare(data, obj){
layer.confirm("取消分享链接将失效,确定不分享了吗?", { icon: 3, title: '系统提示', btn: ['取消分享','我再想想'] }, function (index) { layer.confirm("取消分享链接将失效,确定不分享了吗?", { icon: 3, title: '系统提示', btn: ['取消分享','我再想想'] }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: reqBasePath + "fileconsole018", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole018", params: {rowId: data.id}, type: 'json', callback: function (json) {
winui.window.msg("取消外链分享成功", {icon: 1, time: 2000}); winui.window.msg("取消外链分享成功", {icon: 1, time: 2000});
loadTable(); loadTable();
}}); }});
......
...@@ -16,7 +16,7 @@ layui.config({ ...@@ -16,7 +16,7 @@ layui.config({
var ztree = null; var ztree = null;
fsTree.render({ fsTree.render({
id: "treeDemo", id: "treeDemo",
url: reqBasePath + "fileconsole001", url: sysMainMation.diskCloudBasePath + "fileconsole001",
checkEnable: true, checkEnable: true,
loadEnable: true,//异步加载 loadEnable: true,//异步加载
showLine: false, showLine: false,
...@@ -47,7 +47,7 @@ layui.config({ ...@@ -47,7 +47,7 @@ layui.config({
}; };
saveBtn = false; saveBtn = false;
winui.window.msg("文件正在保存,期间请勿进行其他操作。", {icon: 7,time: 4000}); winui.window.msg("文件正在保存,期间请勿进行其他操作。", {icon: 7,time: 4000});
AjaxPostUtil.request({url: reqBasePath + "fileconsole023", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole023", params: params, type: 'json', callback: function (json) {
saveBtn = true; saveBtn = true;
parent.layer.close(index); parent.layer.close(index);
parent.refreshCode = '0'; parent.refreshCode = '0';
......
...@@ -22,7 +22,7 @@ layui.config({ ...@@ -22,7 +22,7 @@ layui.config({
$(".sys-logo").html(sysMainMation.mationTitle); $(".sys-logo").html(sysMainMation.mationTitle);
var rowId = GetUrlParam("id"); var rowId = GetUrlParam("id");
AjaxPostUtil.request({url: reqBasePath + "fileconsole019", params: {rowId: rowId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole019", params: {rowId: rowId}, type: 'json', callback: function (json) {
if(isNull(json.bean)){//文件不存在 if(isNull(json.bean)){//文件不存在
location.href = "../../tpl/shareFile/shareFilepwd.html?id=" + rowId; location.href = "../../tpl/shareFile/shareFilepwd.html?id=" + rowId;
} else { } else {
...@@ -33,7 +33,7 @@ layui.config({ ...@@ -33,7 +33,7 @@ layui.config({
if(isNull(getCookie("file" + rowId))){//输入的提取码为空 if(isNull(getCookie("file" + rowId))){//输入的提取码为空
location.href = "../../tpl/shareFile/shareFilepwd.html?id=" + rowId; location.href = "../../tpl/shareFile/shareFilepwd.html?id=" + rowId;
} else {//输入的提取码不为空 } else {//输入的提取码不为空
AjaxPostUtil.request({url: reqBasePath + "fileconsole020", params: {rowId: rowId, sharePassword: getCookie("file" + rowId)}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole020", params: {rowId: rowId, sharePassword: getCookie("file" + rowId)}, type: 'json', callback: function (json) {
if(isNull(json.bean)){//分享取消 if(isNull(json.bean)){//分享取消
location.href = "../../tpl/shareFile/shareFilepwd.html?id=" + rowId; location.href = "../../tpl/shareFile/shareFilepwd.html?id=" + rowId;
} else {//加载列表 } else {//加载列表
...@@ -70,7 +70,7 @@ layui.config({ ...@@ -70,7 +70,7 @@ layui.config({
//加载列表 //加载列表
function loadFileMation(){ function loadFileMation(){
//加载分享基础信息 //加载分享基础信息
AjaxPostUtil.request({url: reqBasePath + "fileconsole021", params: {rowId: rowId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole021", params: {rowId: rowId}, type: 'json', callback: function (json) {
var str = ""; var str = "";
if(json.bean.fileType == 1){//文件夹 if(json.bean.fileType == 1){//文件夹
str = '<img src="../../assets/images/share-folder.png"/>'; str = '<img src="../../assets/images/share-folder.png"/>';
...@@ -90,7 +90,7 @@ layui.config({ ...@@ -90,7 +90,7 @@ layui.config({
$("#checkAll").prop("checked", false); $("#checkAll").prop("checked", false);
showGrid({ showGrid({
id: "fileListContent", id: "fileListContent",
url: reqBasePath + "fileconsole022", url: sysMainMation.diskCloudBasePath + "fileconsole022",
params: {folderId: folderId, shareId: shareId}, params: {folderId: folderId, shareId: shareId},
pagination: false, pagination: false,
template: getFileContent('tpl/shareFile/shareFileItem.tpl'), template: getFileContent('tpl/shareFile/shareFileItem.tpl'),
...@@ -123,7 +123,7 @@ layui.config({ ...@@ -123,7 +123,7 @@ layui.config({
if(fileType === 'folder'){//文件夹 if(fileType === 'folder'){//文件夹
winui.window.msg('暂不提供文件夹的下载。', {icon: 2, time: 2000}); winui.window.msg('暂不提供文件夹的下载。', {icon: 2, time: 2000});
} else {//文件 } else {//文件
AjaxPostUtil.request({url: reqBasePath + "fileconsole009", params:{rowId: operaterId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole009", params: {rowId: operaterId}, type: 'json', callback: function (json) {
if($.inArray(json.bean.fileType, imageType) >= 0){//图片 if($.inArray(json.bean.fileType, imageType) >= 0){//图片
downloadImage(fileBasePath + json.bean.fileAddress, json.bean.fileName); downloadImage(fileBasePath + json.bean.fileAddress, json.bean.fileName);
} else { } else {
......
...@@ -12,7 +12,7 @@ layui.config({ ...@@ -12,7 +12,7 @@ layui.config({
var rowId = GetUrlParam("id"); var rowId = GetUrlParam("id");
AjaxPostUtil.request({url: reqBasePath + "fileconsole019", params: {rowId: rowId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole019", params: {rowId: rowId}, type: 'json', callback: function (json) {
if(isNull(json.bean)){ if(isNull(json.bean)){
$("#showForm").hide(); $("#showForm").hide();
$("#showFormNone").show(); $("#showFormNone").show();
...@@ -37,7 +37,7 @@ layui.config({ ...@@ -37,7 +37,7 @@ layui.config({
winui.window.msg("请输入提取码", {icon: 2, time: 2000}); winui.window.msg("请输入提取码", {icon: 2, time: 2000});
return; return;
} }
AjaxPostUtil.request({url: reqBasePath + "fileconsole020", params: {rowId: rowId, sharePassword: $("#sharePassword").val()}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.diskCloudBasePath + "fileconsole020", params: {rowId: rowId, sharePassword: $("#sharePassword").val()}, type: 'json', callback: function (json) {
if(isNull(json.bean)){ if(isNull(json.bean)){
$("#showForm").hide(); $("#showForm").hide();
$("#showFormNone").show(); $("#showFormNone").show();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册