提交 c371adef 编写于 作者: W weizhiqiang

【图片】图片查看调优

上级 6e145ab1
...@@ -120,79 +120,19 @@ layui.config({ ...@@ -120,79 +120,19 @@ layui.config({
}); });
} }
/*** // 附件下载
* 图片弹出展示,默认原大小展示。图片大于浏览器时下窗口可视区域时,进行等比例缩小。
* config.src 图片路径。必须项
* default_config.height 图片显示高度,默认原大小展示。图片大于浏览器时下窗口可视区域时,进行等比例缩小。
* default_config.width 图片显示宽度,默认原大小展示。图片大于浏览器时下窗口可视区域时,进行等比例缩小。
* default_config.title 弹出框标题
*/
function previewImg(config) {
if(!config.src || config.src==""){
layer.msg("没有发现图片!");
return ;
}
var default_config = {title: "流程图"};
var img = new Image();
img.onload = function() {//避免图片还未加载完成无法获取到图片的大小。
//避免图片太大,导致弹出展示超出了网页显示访问,所以图片大于浏览器时下窗口可视区域时,进行等比例缩小。
var max_height = $(window).height() - 100;
var max_width = $(window).width();
//rate1,rate2,rate3 三个比例中取最小的。
var rate1 = max_height / img.height;
var rate2 = max_width / img.width;
var rate3 = 1;
var rate = Math.min(rate1, rate2, rate3);
//等比例缩放
default_config.height = img.height * rate; //获取图片高度
default_config.width = img.width * rate; //获取图片宽度
$.extend( default_config, config);
var imgHtml = "<img src='" + default_config.src + "' width='" + default_config.width + "px' height='" + default_config.height + "px'/>";
//弹出层
layer.open({
type: 1,
shade: 0.8,
offset: 'auto',
area: [(default_config.width + 100) + 'px', (default_config.height + 100) + 'px'], ////宽,高
shadeClose:true,
scrollbar: false,
title: default_config.title, //不显示标题
content: imgHtml, //捕获的元素,注意:最好该指定的元素要存放在body最外层,否则可能被其它的相对元素所影响
cancel: function () {
},
error: function(){
}
});
}
img.onerror = function() {
winui.window.msg("该流程图已不存在,无法进行查看。", {icon: 2, time: 2000});
}
img.src = config.src;
}
//附件下载
$("body").on("click", ".enclosureItem", function() { $("body").on("click", ".enclosureItem", function() {
download(fileBasePath + $(this).attr("rowpath"), $(this).html()); download(fileBasePath + $(this).attr("rowpath"), $(this).html());
}); });
//工作流图片查看 // 工作流图片查看
$("body").on("click", "#processInstanceIdImg", function() { $("body").on("click", "#processInstanceIdImg", function() {
previewImg({src: $(this).attr("src")}); systemCommonUtil.showPicImg($(this).attr("src"));
}); });
//图片查看 // 图片查看
$("body").on("click", ".photo-img", function() { $("body").on("click", ".photo-img", function() {
var src = $(this).attr("src"); systemCommonUtil.showPicImg($(this).attr("src"));
layer.open({
type:1,
title:false,
closeBtn:0,
skin: 'demo-class',
shadeClose:true,
content:'<img src="' + src + '" style="max-height:600px;max-width:100%;">',
scrollbar:false
});
}); });
form.render(); form.render();
......
...@@ -32,16 +32,7 @@ layui.config({ ...@@ -32,16 +32,7 @@ layui.config({
}); });
$("body").on("click", "#assetImg", function() { $("body").on("click", "#assetImg", function() {
var src = $(this).attr("src"); systemCommonUtil.showPicImg($(this).attr("src"));
layer.open({
type:1,
title:false,
closeBtn:0,
skin: 'demo-class',
shadeClose:true,
content:'<img src="' + src + '" style="max-height:600px;max-width:100%;">',
scrollbar:false
});
}); });
}); });
}); });
\ No newline at end of file
...@@ -35,18 +35,9 @@ layui.config({ ...@@ -35,18 +35,9 @@ layui.config({
matchingLanguage(); matchingLanguage();
}}); }});
//图片查看 // 图片查看
$("body").on("click", ".photo-img", function() { $("body").on("click", ".photo-img", function() {
var src = $(this).attr("src"); systemCommonUtil.showPicImg($(this).attr("src"));
layer.open({
type:1,
title:false,
closeBtn:0,
skin: 'demo-class',
shadeClose:true,
content:'<img src="' + src + '" style="max-height:600px;max-width:100%;">',
scrollbar:false
});
}); });
}); });
......
...@@ -23,22 +23,12 @@ layui.config({ ...@@ -23,22 +23,12 @@ layui.config({
// 附件回显 // 附件回显
skyeyeEnclosure.showDetails({"enclosureUploadBtn": json.bean.enclosureInfo}); skyeyeEnclosure.showDetails({"enclosureUploadBtn": json.bean.enclosureInfo});
matchingLanguage(); matchingLanguage();
} }
}); });
$("body").on("click", "#roomImg", function() { $("body").on("click", "#roomImg", function() {
var src = $(this).attr("src"); systemCommonUtil.showPicImg($(this).attr("src"));
layer.open({
type:1,
title:false,
closeBtn:0,
skin: 'demo-class',
shadeClose:true,
content:'<img src="' + src + '" style="max-height:600px;max-width:100%;">',
scrollbar:false
});
}); });
}); });
}); });
\ No newline at end of file
...@@ -64,29 +64,21 @@ layui.config({ ...@@ -64,29 +64,21 @@ layui.config({
table.on('tool(messageTable)', function (obj) { table.on('tool(messageTable)', function (obj) {
var data = obj.data; var data = obj.data;
var layEvent = obj.event; var layEvent = obj.event;
if (layEvent === 'repair') { //修复 if (layEvent === 'repair') { // 修复
repair(data); repair(data);
}else if (layEvent === 'roomImg') { //图片预览 } else if (layEvent === 'roomImg') { // 图片预览
layer.open({ systemCommonUtil.showPicImg(fileBasePath + data.roomImg);
type:1, } else if (layEvent === 'details') { // 详情
title:false, details(data);
closeBtn:0, } else if (layEvent === 'scrap') { // 报废
skin: 'demo-class', scrap(data);
shadeClose:true, } else if (layEvent === 'normal') { // 恢复正常
content:'<img src="' + fileBasePath + data.roomImg + '" style="max-height:600px;max-width:100%;">', normal(data);
scrollbar:false } else if (layEvent === 'delet') { // 删除
}); delet(data);
}else if (layEvent === 'details') { //详情 } else if (layEvent === 'edit') { // 编辑
details(data); edit(data);
}else if (layEvent === 'scrap'){ //报废 }
scrap(data);
}else if (layEvent === 'normal'){ //恢复正常
normal(data);
}else if (layEvent === 'delet'){ //删除
delet(data);
}else if (layEvent === 'edit'){ //编辑
edit(data);
}
}); });
form.render(); form.render();
......
...@@ -28,16 +28,7 @@ layui.config({ ...@@ -28,16 +28,7 @@ layui.config({
}); });
$("body").on("click", "#vehicleImg", function() { $("body").on("click", "#vehicleImg", function() {
var src = $(this).attr("src"); systemCommonUtil.showPicImg($(this).attr("src"));
layer.open({
type:1,
title:false,
closeBtn:0,
skin: 'demo-class',
shadeClose:true,
content:'<img src="' + src + '" style="max-height:600px;max-width:100%;">',
scrollbar:false
});
}); });
}); });
}); });
\ No newline at end of file
...@@ -67,29 +67,21 @@ layui.config({ ...@@ -67,29 +67,21 @@ layui.config({
table.on('tool(vehicleTable)', function (obj) { table.on('tool(vehicleTable)', function (obj) {
var data = obj.data; var data = obj.data;
var layEvent = obj.event; var layEvent = obj.event;
if (layEvent === 'vehiclerepair') { //维修 if (layEvent === 'vehiclerepair') { // 维修
vehiclerepair(data); vehiclerepair(data);
}else if (layEvent === 'vehicleImg') { //图片预览 } else if (layEvent === 'vehicleImg') { // 图片预览
layer.open({ systemCommonUtil.showPicImg(fileBasePath + data.vehicleImg);
type:1, } else if (layEvent === 'vehicledetails') { // 详情
title:false, vehicledetails(data);
closeBtn:0, } else if (layEvent === 'vehiclescrap') { // 报废
skin: 'demo-class', vehiclescrap(data);
shadeClose:true, } else if (layEvent === 'vehiclenormal') { // 恢复正常
content:'<img src="' + fileBasePath + data.vehicleImg + '" style="max-height:600px;max-width:100%;">', vehiclenormal(data);
scrollbar:false } else if (layEvent === 'vehicledelet') { // 删除
}); vehicledelet(data);
}else if (layEvent === 'vehicledetails') { //详情 } else if (layEvent === 'vehicleedit') { // 编辑
vehicledetails(data); vehicleedit(data);
}else if (layEvent === 'vehiclescrap'){ //报废 }
vehiclescrap(data);
}else if (layEvent === 'vehiclenormal'){ //恢复正常
vehiclenormal(data);
}else if (layEvent === 'vehicledelet'){ //删除
vehicledelet(data);
}else if (layEvent === 'vehicleedit'){ //编辑
vehicleedit(data);
}
}); });
// 车辆详情 // 车辆详情
......
...@@ -13,7 +13,7 @@ layui.config({ ...@@ -13,7 +13,7 @@ layui.config({
var useTemplate = $("#useTemplate").html(); var useTemplate = $("#useTemplate").html();
AjaxPostUtil.request({url: flowableBasePath + "vehicle016", params:{rowId: parent.rowId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "vehicle016", params:{rowId: parent.rowId}, type: 'json', callback: function (json) {
//状态 // 状态
if(json.bean.state == '0'){ if(json.bean.state == '0'){
json.bean.stateName = "<span>" + json.bean.stateName + "</span>"; json.bean.stateName = "<span>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '1'){ }else if(json.bean.state == '1'){
...@@ -46,16 +46,7 @@ layui.config({ ...@@ -46,16 +46,7 @@ layui.config({
}}); }});
$("body").on("click", "#vehicleImg", function() { $("body").on("click", "#vehicleImg", function() {
var src = $(this).attr("src"); systemCommonUtil.showPicImg($(this).attr("src"));
layer.open({
type:1,
title:false,
closeBtn:0,
skin: 'demo-class',
shadeClose:true,
content:'<img src="' + src + '" style="max-height:600px;max-width:100%;">',
scrollbar:false
});
}); });
}); });
......
...@@ -85,16 +85,7 @@ layui.config({ ...@@ -85,16 +85,7 @@ layui.config({
// 图片预览 // 图片预览
$("body").on("click", ".barCode", function (e) { $("body").on("click", ".barCode", function (e) {
var src = $(this).attr("src"); systemCommonUtil.showPicImg($(this).attr("src"));
layer.open({
type: 1,
title: false,
closeBtn: 0,
skin: 'demo-class',
shadeClose: true,
content: '<img src="' + src + '" style="max-height:600px; max-width:100%;">',
scrollbar: false
});
}); });
// 验收 // 验收
......
...@@ -49,20 +49,12 @@ layui.config({ ...@@ -49,20 +49,12 @@ layui.config({
} }
}); });
//图片预览 // 图片预览
$("body").on("click", ".barCode", function (e) { $("body").on("click", ".barCode", function (e) {
layer.open({ systemCommonUtil.showPicImg(fileBasePath + $(this).attr("src"));
type:1,
title:false,
closeBtn:0,
skin: 'demo-class',
shadeClose:true,
content:'<img src="' + fileBasePath + $(this).attr("src") + '" style="max-height:600px;max-width:100%;">',
scrollbar:false
});
}); });
//取消 // 取消
$("body").on("click", "#cancle", function() { $("body").on("click", "#cancle", function() {
parent.layer.close(index); parent.layer.close(index);
}); });
......
...@@ -39,17 +39,9 @@ layui.config({ ...@@ -39,17 +39,9 @@ layui.config({
}); });
}); });
//图片预览 // 图片预览
$("body").on("click", ".barCode", function (e) { $("body").on("click", ".barCode", function (e) {
layer.open({ systemCommonUtil.showPicImg(fileBasePath + $(this).attr("src"));
type:1,
title:false,
closeBtn:0,
skin: 'demo-class',
shadeClose:true,
content:'<img src="' + fileBasePath + $(this).attr("src") + '" style="max-height:600px;max-width:100%;">',
scrollbar:false
});
}); });
}); });
......
...@@ -39,17 +39,9 @@ layui.config({ ...@@ -39,17 +39,9 @@ layui.config({
}); });
}); });
//图片预览 // 图片预览
$("body").on("click", ".barCode", function (e) { $("body").on("click", ".barCode", function (e) {
layer.open({ systemCommonUtil.showPicImg(fileBasePath + $(this).attr("src"));
type:1,
title:false,
closeBtn:0,
skin: 'demo-class',
shadeClose:true,
content:'<img src="' + fileBasePath + $(this).attr("src") + '" style="max-height:600px;max-width:100%;">',
scrollbar:false
});
}); });
}); });
......
...@@ -39,17 +39,9 @@ layui.config({ ...@@ -39,17 +39,9 @@ layui.config({
}); });
}); });
//图片预览 // 图片预览
$("body").on("click", ".barCode", function (e) { $("body").on("click", ".barCode", function (e) {
layer.open({ systemCommonUtil.showPicImg(fileBasePath + $(this).attr("src"));
type:1,
title:false,
closeBtn:0,
skin: 'demo-class',
shadeClose:true,
content:'<img src="' + fileBasePath + $(this).attr("src") + '" style="max-height:600px;max-width:100%;">',
scrollbar:false
});
}); });
}); });
......
...@@ -57,25 +57,17 @@ layui.config({ ...@@ -57,25 +57,17 @@ layui.config({
table.on('tool(messageTable)', function (obj) { table.on('tool(messageTable)', function (obj) {
var data = obj.data; var data = obj.data;
var layEvent = obj.event; var layEvent = obj.event;
if (layEvent === 'edit') { //编辑 if (layEvent === 'edit') { // 编辑
edit(data); edit(data);
}else if (layEvent === 'delete'){ //删除 } else if (layEvent === 'delete') { // 删除
del(data); del(data);
}else if (layEvent === 'up') { //上线 } else if (layEvent === 'up') { // 上线
up(data); up(data);
}else if (layEvent === 'down') { //下线 } else if (layEvent === 'down') { // 下线
down(data); down(data);
}else if (layEvent === 'appLogo') { //预览 } else if (layEvent === 'appLogo') { // 预览
layer.open({ systemCommonUtil.showPicImg(fileBasePath + data.appLogo);
type:1, }
title:false,
closeBtn:0,
skin: 'demo-class',
shadeClose:true,
content:'<img src="' + fileBasePath + data.appLogo + '" style="max-height:600px;max-width:100%;">',
scrollbar:false
});
}
}); });
form.render(); form.render();
......
...@@ -63,29 +63,21 @@ layui.config({ ...@@ -63,29 +63,21 @@ layui.config({
table.on('tool(messageTable)', function (obj) { table.on('tool(messageTable)', function (obj) {
var data = obj.data; var data = obj.data;
var layEvent = obj.event; var layEvent = obj.event;
if (layEvent === 'edit') { //编辑 if (layEvent === 'edit') { // 编辑
edit(data); edit(data);
}else if (layEvent === 'iconPath') { //预览 } else if (layEvent === 'iconPath') { // 预览
layer.open({ systemCommonUtil.showPicImg(fileBasePath + data.iconPath);
type:1, } else if (layEvent === 'delete') { // 删除
title:false, del(data);
closeBtn:0, } else if (layEvent === 'up') { // 上线
skin: 'demo-class', up(data);
shadeClose:true, } else if (layEvent === 'down') { // 下线
content:'<img src="' + fileBasePath + data.iconPath + '" style="max-height:600px;max-width:100%;">', down(data);
scrollbar:false } else if (layEvent === 'top') { // 上移
}); topOne(data);
}else if (layEvent === 'delete'){ //删除 } else if (layEvent === 'lower') { // 下移
del(data); lowerOne(data);
}else if (layEvent === 'up') { //上线 }
up(data);
}else if (layEvent === 'down') { //下线
down(data);
}else if (layEvent === 'top') { //上移
topOne(data);
}else if (layEvent === 'lower') { //下移
lowerOne(data);
}
}); });
form.render(); form.render();
......
...@@ -264,20 +264,12 @@ layui.config({ ...@@ -264,20 +264,12 @@ layui.config({
} }
}); });
//图片预览 // 图片预览
$('body').on('click', '.cursor', function() { $('body').on('click', '.cursor', function() {
layer.open({ systemCommonUtil.showPicImg($(this).attr("src"));
type:1,
title:false,
closeBtn:0,
skin: 'demo-class',
shadeClose:true,
content:'<img src="' + $(this).attr("src") + '" style="max-height:600px;max-width:100%;">',
scrollbar:false
});
}); });
//页面内组件选中组件项 // 页面内组件选中组件项
$('body').on('click', '.check-item', function() { $('body').on('click', '.check-item', function() {
$(".check-item").removeClass("show-operation"); $(".check-item").removeClass("show-operation");
$(".check-item").removeClass("check-item-shoose");//移除之前被选中的组件 $(".check-item").removeClass("check-item-shoose");//移除之前被选中的组件
......
...@@ -77,21 +77,13 @@ layui.config({ ...@@ -77,21 +77,13 @@ layui.config({
table.on('tool(messageTable)', function (obj) { table.on('tool(messageTable)', function (obj) {
var data = obj.data; var data = obj.data;
var layEvent = obj.event; var layEvent = obj.event;
if (layEvent === 'edit') { //编辑 if (layEvent === 'edit') { // 编辑
edit(data); edit(data);
}else if (layEvent === 'userPhoto') { //头像预览 } else if (layEvent === 'userPhoto') { // 头像预览
layer.open({ systemCommonUtil.showPicImg(fileBasePath + data.userPhoto);
type:1, } else if (layEvent === 'details') { // 教师详情
title:false, details(data);
closeBtn:0, }
skin: 'demo-class',
shadeClose:true,
content:'<img src="' + fileBasePath + data.userPhoto + '" style="max-height:600px;max-width:100%;">',
scrollbar:false
});
}else if (layEvent === 'details') { //教师详情
details(data);
}
}); });
form.render(); form.render();
} }
......
...@@ -86,21 +86,13 @@ layui.config({ ...@@ -86,21 +86,13 @@ layui.config({
layui.table.on('tool(messageTable)', function (obj) { layui.table.on('tool(messageTable)', function (obj) {
var data = obj.data; var data = obj.data;
var layEvent = obj.event; var layEvent = obj.event;
if (layEvent === 'subBind') { //科目技能绑定 if (layEvent === 'subBind') { // 科目技能绑定
subBind(data); subBind(data);
}else if (layEvent === 'userPhoto') { //头像预览 } else if (layEvent === 'userPhoto') { // 头像预览
layer.open({ systemCommonUtil.showPicImg(fileBasePath + data.userPhoto);
type:1, } else if (layEvent === 'details') { // 教师详情
title:false, details(data);
closeBtn:0, }
skin: 'demo-class',
shadeClose:true,
content:'<img src="' + fileBasePath + data.userPhoto + '" style="max-height:600px;max-width:100%;">',
scrollbar:false
});
}else if (layEvent === 'details') { //教师详情
details(data);
}
}); });
form.render(); form.render();
......
...@@ -91,7 +91,7 @@ layui.config({ ...@@ -91,7 +91,7 @@ layui.config({
} }
}); });
//客户详情 // 客户详情
$("body").on("click", ".customerNameMation", function() { $("body").on("click", ".customerNameMation", function() {
rowId = $(this).attr("rowid"); rowId = $(this).attr("rowid");
_openNewWindows({ _openNewWindows({
...@@ -103,7 +103,7 @@ layui.config({ ...@@ -103,7 +103,7 @@ layui.config({
}}); }});
}); });
//产品详情 // 产品详情
$("body").on("click", ".productNameMation", function() { $("body").on("click", ".productNameMation", function() {
rowId = $(this).attr("rowid"); rowId = $(this).attr("rowid");
_openNewWindows({ _openNewWindows({
...@@ -115,7 +115,7 @@ layui.config({ ...@@ -115,7 +115,7 @@ layui.config({
}}); }});
}); });
//故障关键组件详情 // 故障关键组件详情
$("body").on("click", ".faultKeyPartsNameMation", function() { $("body").on("click", ".faultKeyPartsNameMation", function() {
rowId = $(this).attr("rowid"); rowId = $(this).attr("rowid");
_openNewWindows({ _openNewWindows({
...@@ -127,21 +127,12 @@ layui.config({ ...@@ -127,21 +127,12 @@ layui.config({
}}); }});
}); });
//图片查看 // 图片查看
$("body").on("click", ".pictureItem", function() { $("body").on("click", ".pictureItem", function() {
var src = $(this).attr("src"); systemCommonUtil.showPicImg($(this).attr("src"));
layer.open({
type:1,
title:false,
closeBtn:0,
skin: 'demo-class',
shadeClose:true,
content:'<img src="' + src + '" style="max-height:600px;max-width:100%;">',
scrollbar:false
});
}); });
//打印 // 打印
$("body").on("click", "#jprint", function (e) { $("body").on("click", "#jprint", function (e) {
$("#showForm").jqprint({ $("#showForm").jqprint({
title: '售后工单', title: '售后工单',
...@@ -152,7 +143,7 @@ layui.config({ ...@@ -152,7 +143,7 @@ layui.config({
}); });
}); });
//情况反馈详情 // 情况反馈详情
$("body").on("click", ".details", function() { $("body").on("click", ".details", function() {
rowId = $(this).attr("rowid"); rowId = $(this).attr("rowid");
_openNewWindows({ _openNewWindows({
......
...@@ -42,17 +42,10 @@ layui.config({ ...@@ -42,17 +42,10 @@ layui.config({
} }
matchingLanguage(); matchingLanguage();
form.render(); form.render();
$("body").on("click","#menuIconPic", function() { $("body").on("click","#menuIconPic", function() {
layer.open({ systemCommonUtil.showPicImg(fileBasePath + json.bean.menuIconPic);
type:1, })
title:false,
closeBtn:0,
skin: 'demo-class',
shadeClose:true,
content:'<img src="' + fileBasePath + json.bean.menuIconPic + '" style="max-height:400px;max-width:100%;">',
scrollbar:false
});
})
} }
}); });
......
...@@ -111,29 +111,21 @@ layui.config({ ...@@ -111,29 +111,21 @@ layui.config({
table.on('tool(messageTable)', function (obj) { table.on('tool(messageTable)', function (obj) {
var data = obj.data; var data = obj.data;
var layEvent = obj.event; var layEvent = obj.event;
if (layEvent === 'del') { //删除 if (layEvent === 'del') { // 删除
del(data, obj); del(data, obj);
}else if (layEvent === 'edit') { //编辑 } else if (layEvent === 'edit') { // 编辑
edit(data); edit(data);
}else if (layEvent === 'top') { //上移 } else if (layEvent === 'top') { // 上移
topOne(data); topOne(data);
}else if (layEvent === 'lower') { //下移 } else if (layEvent === 'lower') { // 下移
lowerOne(data); lowerOne(data);
}else if (layEvent === 'authpoint') { //权限点 } else if (layEvent === 'authpoint') { // 权限点
authpoint(data); authpoint(data);
}else if(layEvent === 'menuIconPic'){ //图片 } else if (layEvent === 'menuIconPic') { // 图片
layer.open({ systemCommonUtil.showPicImg(fileBasePath + data.menuIconPic);
type:1, } else if (layEvent === 'details') { // 详情
title:false, details(data);
closeBtn:0, }
skin: 'demo-class',
shadeClose:true,
content:'<img src="' + fileBasePath + data.menuIconPic + '" style="max-height:600px;max-width:100%;">',
scrollbar:false
});
}else if (layEvent === 'details') { //详情
details(data);
}
}); });
} }
......
...@@ -65,25 +65,17 @@ layui.config({ ...@@ -65,25 +65,17 @@ layui.config({
table.on('tool(messageTable)', function (obj) { table.on('tool(messageTable)', function (obj) {
var data = obj.data; var data = obj.data;
var layEvent = obj.event; var layEvent = obj.event;
if (layEvent === 'unlock') { //解锁 if (layEvent === 'unlock') { // 解锁
unlock(data); unlock(data);
}else if (layEvent === 'edit') { //编辑 } else if (layEvent === 'edit') { // 编辑
edit(data); edit(data);
}else if (layEvent === 'bindRole') { //绑定角色 } else if (layEvent === 'bindRole') { // 绑定角色
bindRole(data); bindRole(data);
}else if (layEvent === 'userPhoto') { //头像预览 } else if (layEvent === 'userPhoto') { // 头像预览
layer.open({ systemCommonUtil.showPicImg(fileBasePath + data.userPhoto);
type:1, } else if (layEvent === 'details') { // 员工详情
title:false, details(data);
closeBtn:0, }
skin: 'demo-class',
shadeClose:true,
content:'<img src="' + fileBasePath + data.userPhoto + '" style="max-height:600px;max-width:100%;">',
scrollbar:false
});
}else if (layEvent === 'details') { //员工详情
details(data);
}
}); });
var loadCompany = false; var loadCompany = false;
......
...@@ -348,16 +348,7 @@ layui.config({ ...@@ -348,16 +348,7 @@ layui.config({
} }
$("body").on("click", "#userPhoto", function() { $("body").on("click", "#userPhoto", function() {
var src = $(this).attr("src"); systemCommonUtil.showPicImg($(this).attr("src"));
layer.open({
type: 1,
title: false,
closeBtn: 0,
skin: 'demo-class',
shadeClose: true,
content: '<img src="' + src + '" style="max-height:600px;max-width:100%;">',
scrollbar: false
});
}); });
$("body").on("click", ".workDay", function() { $("body").on("click", ".workDay", function() {
......
...@@ -58,25 +58,17 @@ layui.config({ ...@@ -58,25 +58,17 @@ layui.config({
table.on('tool(messageTable)', function (obj) { table.on('tool(messageTable)', function (obj) {
var data = obj.data; var data = obj.data;
var layEvent = obj.event; var layEvent = obj.event;
if (layEvent === 'del') { //删除 if (layEvent === 'del') { // 删除
del(data, obj); del(data, obj);
}else if (layEvent === 'edit') { //编辑 } else if (layEvent === 'edit') { // 编辑
edit(data); edit(data);
}else if (layEvent === 'authorization'){//授权 } else if (layEvent === 'authorization') {// 授权
authorization(data, obj); authorization(data, obj);
}else if (layEvent === 'cancleauthorization'){//取消授权 } else if (layEvent === 'cancleauthorization') {// 取消授权
cancleauthorization(data, obj); cancleauthorization(data, obj);
}else if (layEvent === 'sysPic'){ } else if (layEvent === 'sysPic') {
layer.open({ systemCommonUtil.showPicImg(fileBasePath + data.sysPic);
type:1, }
title:false,
closeBtn:0,
skin: 'demo-class',
shadeClose:true,
content:'<img src="' + fileBasePath + data.sysPic + '" style="max-height:600px;max-width:100%;">',
scrollbar:false
});
}
}); });
//删除 //删除
......
...@@ -90,19 +90,11 @@ layui.config({ ...@@ -90,19 +90,11 @@ layui.config({
table.on('tool(messageTable)', function (obj) { table.on('tool(messageTable)', function (obj) {
var data = obj.data; var data = obj.data;
var layEvent = obj.event; var layEvent = obj.event;
if (layEvent === 'wagesDesign') { // 薪资变更 if (layEvent === 'wagesDesign') { // 薪资变更
wagesDesign(data); wagesDesign(data);
}else if (layEvent === 'userPhoto') { // 头像预览 } else if (layEvent === 'userPhoto') { // 头像预览
layer.open({ systemCommonUtil.showPicImg(fileBasePath + data.userPhoto);
type:1, }
title:false,
closeBtn:0,
skin: 'demo-class',
shadeClose:true,
content:'<img src="' + fileBasePath + data.userPhoto + '" style="max-height:600px;max-width:100%;">',
scrollbar:false
});
}
}); });
var loadCompany = false; var loadCompany = false;
......
...@@ -89,19 +89,11 @@ layui.config({ ...@@ -89,19 +89,11 @@ layui.config({
table.on('tool(messageTable)', function (obj) { table.on('tool(messageTable)', function (obj) {
var data = obj.data; var data = obj.data;
var layEvent = obj.event; var layEvent = obj.event;
if (layEvent === 'wagesDesign') { // 薪资设定 if (layEvent === 'wagesDesign') { // 薪资设定
wagesDesign(data); wagesDesign(data);
}else if (layEvent === 'userPhoto') { // 头像预览 } else if (layEvent === 'userPhoto') { // 头像预览
layer.open({ systemCommonUtil.showPicImg(fileBasePath + data.userPhoto);
type:1, }
title:false,
closeBtn:0,
skin: 'demo-class',
shadeClose:true,
content:'<img src="' + fileBasePath + data.userPhoto + '" style="max-height:600px;max-width:100%;">',
scrollbar:false
});
}
}); });
var loadCompany = false; var loadCompany = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册