245 lines
8.9 KiB
Plaintext
245 lines
8.9 KiB
Plaintext
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||
<%@ page contentType="text/html;charset=utf-8" language="java" %>
|
||
<c:set var="root" value="<%=request.getServletContext().getContextPath()%>"></c:set>
|
||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||
<%--<script src="${root}/static/core/js/base/tailwindcss.js"></script>--%>
|
||
<link rel="stylesheet" href="${root}/static/core/js/layui/css/layui.css" media="all">
|
||
<link rel="stylesheet" href="${root}/static/core/css/admin.css" media="all">
|
||
<link rel="stylesheet" href="${root}/static/core/css/message.css" media="all">
|
||
<link href="${root}/static/img/logos.png" rel="icon" type="image/png">
|
||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
|
||
<style type="text/css">
|
||
.laytable-cell-checkbox {
|
||
padding: 5px;
|
||
}
|
||
</style>
|
||
|
||
|
||
<script src="${root}/static/core/js/base/jquery-1.10.2.js"></script>
|
||
<script src="${root}/static/core/js/layui/layui.js"></script>
|
||
<script src="${root}/static/core/js/layui/xm-select.js"></script>
|
||
<script src="${root}/static/core/js/base/message.min.js"></script>
|
||
<script src="${root}/static/core/js/base/modal_dialog.js"></script>
|
||
<script>
|
||
var root = "${root}";
|
||
var admin = function () {
|
||
|
||
};
|
||
|
||
//弹窗提示
|
||
admin.showTip = function (msg, type) {
|
||
$.message({
|
||
message: msg, //提示内容
|
||
type: type, //显示类型,包括4种:success.error,info,warning
|
||
time: '2000', //显示时间(默认:2s) 以下三个可不要
|
||
showClose: false, //显示关闭按钮(默认:否)
|
||
autoClose: true, //是否自动关闭(默认:是)
|
||
});
|
||
}
|
||
|
||
admin.msg = function () {
|
||
$modal({
|
||
type: 'message', //弹框类型 'alert' or 'confirm' or 'message' message提示(开启之前如果之前含有弹框则清除)
|
||
icon: 'info', // 提示图标显示 'info' or 'success' or 'warning' or 'error' or 'question'
|
||
timeout: 2000, // 单位 ms 显示多少毫秒后关闭弹框 ( confirm 下无效 | 不传默认为 2000ms | 最短显示时间为500ms)
|
||
content: '人间值得', // 提示文字
|
||
top: 100, //距离顶部距离 单位px
|
||
transition: 300, //过渡动画 默认 200 单位ms
|
||
closable: false, // 是否显示可关闭按钮 默认为 false
|
||
})
|
||
}
|
||
|
||
admin.msgAlert = function () {
|
||
$modal({
|
||
type: 'alert', //弹框类型 'alert' or 'confirm' or 'message' message提示(开启之前如果之前含有弹框则清除)
|
||
icon: 'info', // 提示图标显示 'info' or 'success' or 'warning' or 'error' or 'question'
|
||
timeout: 2000, // 单位 ms 显示多少毫秒后关闭弹框 ( confirm 下无效 | 不传默认为 2000ms | 最短显示时间为500ms) 时间越长相当于需要手动关闭
|
||
title: '问你个问题', // 提示文字
|
||
content: '人间值得?', // 提示文字
|
||
transition: 300, //过渡动画 默认 200 单位ms
|
||
top: 100, //距离顶部距离 单位px
|
||
closable: true, // 是否显示可关闭按钮 默认为 false
|
||
mask: false, // 是否显示遮罩层 默认为 false
|
||
pageScroll: false, // 是否禁止页面滚动
|
||
width: 300, // 单位 px 默认显示宽度 最下默认为300
|
||
maskClose: true, // 是否点击遮罩层可以关闭提示框 默认为false
|
||
})
|
||
}
|
||
|
||
admin.msgConfirm = function () {
|
||
$modal({
|
||
type: 'confirm', //弹框类型 'alert' or 'confirm' or 'message' message提示(开启之前如果之前含有弹框则清除)
|
||
icon: 'info', // 提示图标显示 'info' or 'success' or 'warning' or 'error' or 'question'
|
||
title: '确定删除吗?', // 提示文字
|
||
content: '删除后将不会保存您的信息', // 提示文字
|
||
transition: 300, //过渡动画 默认 200 单位ms
|
||
closable: true, // 是否显示可关闭按钮 默认为 false
|
||
mask: true, // 是否显示遮罩层 默认为 false
|
||
top: 150, //距离顶部距离 单位px
|
||
center: false,// 是否绝对居中 默认为false 设置true后 top无效
|
||
pageScroll: false, // 是否禁止页面滚动
|
||
// width:500, // 单位 px 默认显示宽度 最下默认为300
|
||
maskClose: true, // 是否点击遮罩层可以关闭提示框 默认为false
|
||
cancelText: '取消',// 取消按钮 默认为 取消
|
||
confirmText: '确认',// 确认按钮 默认未 确认
|
||
cancel: function (close) { // 回调函数 // 函数返回关闭事件 调用-关闭弹窗
|
||
$.message({
|
||
message: "用户点击了取消",
|
||
type: "warning"
|
||
});
|
||
close() // 调用返回的 关闭弹框函数 才能关闭
|
||
},
|
||
confirm: function (close) { // 回调函数 // 函数返回关闭事件 调用-关闭弹窗
|
||
$.message({
|
||
message: "用户点击了确定",
|
||
type: "success"
|
||
});
|
||
close() // 调用返回的 关闭弹框函数 才能关闭
|
||
}
|
||
})
|
||
}
|
||
|
||
admin.open = function (title, url, w, h, full) {
|
||
if (title == null || title == '') {
|
||
title = false;
|
||
}
|
||
if (url == null || url == '') {
|
||
url = root + "/noView";
|
||
}
|
||
if (w == null || w == '') {
|
||
w = ($(window).width() * 0.9);
|
||
}
|
||
if (h == null || h == '') {
|
||
h = ($(window).height() - 50);
|
||
}
|
||
var index = layer.open({
|
||
type: 2,
|
||
area: [w + 'px', h + 'px'],
|
||
fix: false, //不固定
|
||
maxmin: true,
|
||
shadeClose: true,
|
||
shade: 0.4,
|
||
title: title,
|
||
content: url
|
||
})
|
||
if (full) {
|
||
layer.full(index);
|
||
}
|
||
}
|
||
|
||
admin.open2 = function (url, w, h, full) {
|
||
if (url == null || url == '') {
|
||
url = root + "/noView";
|
||
}
|
||
if (w == null || w == '') {
|
||
w = ($(window).width() * 0.9);
|
||
}
|
||
if (h == null || h == '') {
|
||
h = ($(window).height() - 50);
|
||
}
|
||
var index = layer.open({
|
||
type: 2,
|
||
area: [w + 'px', h + 'px'],
|
||
fix: false, //不固定
|
||
shadeClose: true,
|
||
shade: 0.4,
|
||
title: null,
|
||
content: url
|
||
})
|
||
if (full) {
|
||
layer.full(index);
|
||
}
|
||
}
|
||
|
||
admin.open3 = function (title, url, w, h, full) {
|
||
if (title == null || title == '') {
|
||
title = false;
|
||
}
|
||
if (url == null || url == '') {
|
||
url = root + "/noView";
|
||
}
|
||
if (w == null || w == '') {
|
||
w = ($(window).width() * 0.9);
|
||
}
|
||
if (h == null || h == '') {
|
||
h = ($(window).height() - 50);
|
||
}
|
||
var index = layer.open({
|
||
type: 2,
|
||
area: [w + 'px', h + 'px'],
|
||
fix: true, //不固定
|
||
shadeClose: true,
|
||
shade: 0.4,
|
||
title: title,
|
||
content: url
|
||
});
|
||
if (full) {
|
||
layer.full(index);
|
||
}
|
||
}
|
||
|
||
admin.openMax = function (url) {
|
||
if (url == null || url == '') {
|
||
url = root + "/noView";
|
||
}
|
||
var index = layer.open({
|
||
type: 2,
|
||
shade: 0.4,
|
||
title: "》编辑",
|
||
content: url,
|
||
closeBtn: 1
|
||
})
|
||
layer.full(index);
|
||
}
|
||
|
||
admin.openMax = function (url,title) {
|
||
if (url == null || url == '') {
|
||
url = root + "/noView";
|
||
}
|
||
var index = layer.open({
|
||
type: 2,
|
||
shade: 0.4,
|
||
title: title,
|
||
content: url,
|
||
area: ['100%', '100%'],
|
||
offset: ['0px', '0px'],
|
||
scrollbar: false,
|
||
closeBtn: 1
|
||
})
|
||
}
|
||
|
||
/*admin.openMax = function (url) {
|
||
if (url == null || url == '') {
|
||
var url = root + "/noView";
|
||
}
|
||
var index = layer.open({
|
||
type: 2,
|
||
// fix: false, //不固定
|
||
// shadeClose: true,
|
||
shade: 0.4,
|
||
title: null,
|
||
content: url,
|
||
closeBtn: 0
|
||
})
|
||
layer.full(index);
|
||
}*/
|
||
|
||
//关闭弹出层父窗口关闭
|
||
admin.fatherReload = function () {
|
||
parent.location.reload();
|
||
}
|
||
admin.fatherFatherReload = function () {
|
||
parent.parent.location.reload();
|
||
}
|
||
|
||
//关闭弹出层
|
||
admin.close = function () {
|
||
var index = parent.layer.getFrameIndex(window.name);
|
||
parent.layer.close(index);
|
||
}
|
||
|
||
// $(".layui-fluid").find(".backBtn").on("click",function () {
|
||
// var index = parent.layer.getFrameIndex(window.name);
|
||
// parent.layer.close(index);
|
||
// })
|
||
</script> |