174 lines
5.8 KiB
Plaintext
174 lines
5.8 KiB
Plaintext
<%@ page language="java" pageEncoding="UTF-8" %>
|
|
<%@page import="com.sipai.entity.process.DataVisualFrame" %>
|
|
<% request.setAttribute("Type_frame", DataVisualFrame.Type_frame); %>
|
|
<style type="text/css">
|
|
.helpTitle {
|
|
/*border-bottom: 1px dotted #666;*/
|
|
color: #333;
|
|
cursor: help;
|
|
}
|
|
|
|
.helpTitle:hover {
|
|
color: #000000;
|
|
background-color: #ffffff;
|
|
}
|
|
|
|
.helpTitle-content {
|
|
position: absolute;
|
|
white-space: pre;
|
|
/*top: 10px;*/
|
|
/*left: 850px;*/
|
|
border: 1px solid #000000;
|
|
padding: 5px;
|
|
background-color: #ffffff;
|
|
color: #000;
|
|
/*border-radius: 5px;*/
|
|
font-size: 12px;
|
|
z-index: 9999;
|
|
display: none;
|
|
}
|
|
</style>
|
|
<script type="text/javascript">
|
|
let ownName = "";
|
|
var doSelectCopy = function (id) {
|
|
let ckName = "";
|
|
|
|
$.ajax({
|
|
type: 'GET',
|
|
url: ext.contextPath + "/process/dataVisualFrame/getFrame.do",
|
|
async: false,
|
|
globle: false,
|
|
data: {
|
|
id: id
|
|
},
|
|
dataType: 'json',
|
|
error: function () {
|
|
return false;
|
|
},
|
|
success: function (result) {
|
|
ckName = result.name
|
|
}
|
|
});
|
|
|
|
swal({
|
|
text: "将把"+ckName+"页面元素拷贝至"+ownName+"页面。此操作无法撤回,请确认操作!",
|
|
dangerMode: true,
|
|
buttons: {
|
|
cancel: {
|
|
text: "取消",
|
|
value: null,
|
|
visible: true,
|
|
className: "btn btn-default btn-sm",
|
|
closeModal: true,
|
|
},
|
|
confirm: {
|
|
text: "确定",
|
|
value: true,
|
|
visible: true,
|
|
className: "btn btn-danger btn-sm",
|
|
closeModal: true
|
|
}
|
|
}
|
|
})
|
|
.then(function (willDelete) {
|
|
if (willDelete) {
|
|
$.post(ext.contextPath + '/process/dataVisualFrame/copyFrame.do', {
|
|
ckid: id,
|
|
id: '${param.ownId}'
|
|
}, function (data) {
|
|
// console.log(data)
|
|
closeModal("menu4SelectModal");
|
|
});
|
|
|
|
}
|
|
});
|
|
}
|
|
|
|
$(function () {
|
|
// getTitleContent("将拷贝层级树中选择的页面元素至所选界面", "helpTitle_id_1");
|
|
|
|
$.ajax({
|
|
type: 'GET',
|
|
url: ext.contextPath + "/process/dataVisualFrame/getFrame.do",
|
|
async: true,
|
|
globle: false,
|
|
data: {
|
|
id: '${param.ownId}'
|
|
},
|
|
dataType: 'json',
|
|
error: function () {
|
|
return false;
|
|
},
|
|
success: function (result) {
|
|
ownName = result.name
|
|
}
|
|
});
|
|
|
|
$.post(ext.contextPath + '/process/dataVisualFrame/getMenusJson.do', {
|
|
unitId: unitId,
|
|
ownId: '${param.ownId}',
|
|
menuType: '${param.menuType}'
|
|
}, function (data) {
|
|
// console.info(data);
|
|
if (data.length > 0) {
|
|
$('#menu_select_tree').treeview({
|
|
data: data,
|
|
});
|
|
$('#menu_select_tree').on('nodeSelected', function (event, data) {
|
|
if (data.type == '${Type_frame}') {
|
|
doSelectCopy(data.id);
|
|
}
|
|
});
|
|
}
|
|
}, 'json');
|
|
|
|
});
|
|
|
|
function getTitleContent(title, id) {
|
|
// 给需要提示的元素绑定鼠标悬浮事件
|
|
$('#' + id).hover(function (e) {
|
|
// 鼠标悬浮时显示提示内容
|
|
// var title = $(this).attr('title');
|
|
// var title = "";
|
|
$(this).attr('data-title', title);
|
|
$(this).removeAttr('title');
|
|
$('<div class="helpTitle-content"></div>').text(title).appendTo('body').fadeIn();
|
|
let mouseX = e.pageX + 15;
|
|
let mouseY = e.pageY;
|
|
$('.helpTitle-content').css('top', mouseY + 'px');
|
|
$('.helpTitle-content').css('left', mouseX + 'px');
|
|
}, function () {
|
|
// 鼠标移出时隐藏提示内容
|
|
$(this).attr('title', $(this).attr('data-title'));
|
|
$('.helpTitle-content').remove();
|
|
});
|
|
}
|
|
|
|
</script>
|
|
<div class="modal fade" id="menu4SelectModal">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
<span aria-hidden="true">×</span></button>
|
|
<h4 class="modal-title">
|
|
<div style="float: left;width: 80px;">选择菜单</div>
|
|
<%-- <div id="helpTitle_id_1" class="helpTitle"--%>
|
|
<%-- style="float: left;width: 18px;height: 18px;margin-left: 10px;">--%>
|
|
<%-- <i class="fa fa-question-circle" aria-hidden="true"></i>--%>
|
|
<%-- </div>--%>
|
|
</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div id="menu_select_tree" style="height:430px;overflow:auto;width:100%"></div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
|
<!-- <button type="button" class="btn btn-primary" onclick="selectMenu()">保存</button> -->
|
|
</div>
|
|
</div>
|
|
<!-- /.modal-content -->
|
|
</div>
|
|
<!-- /.modal-dialog -->
|
|
</div>
|