<!DOCTYPE html>
|
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.w3.org/1999/xhtml">
|
<head>
|
<meta charset="UTF-8" />
|
<script th:src="@{${pubzyWebRoot} + 'media/js/jquery-1.11.1.js'}"></script>
|
<script th:src="@{${pubzyWebRoot} + 'media/js/winPro.js'}"></script>
|
<script src="/js/MenHuMore.js"></script>
|
<script type="text/javascript" th:inline="javascript">
|
/*<![CDATA[*/
|
var backstageWebRoot = [[${backstageWebRoot}]];
|
var id = [[${id}]];
|
var otherids = "";
|
$(function () {
|
loadSysList();
|
// more("更多", "http://" + window.location.host + "/res/systeminfo/index?Menu=DTFW&menuId=10", window.location.href); //增加“更多”
|
more("更多", "http://" + window.location.host + "/res/systeminfo/index?Menu=DTFW&menuId=10", "http://www.nmsmp.com:8082/login?oldurl=%2Fres%2FPingTaiMenHu%2FLianJie"); //增加“更多”
|
});
|
// 加载应用程序列表
|
function loadSysList() {
|
var thistype = getType("type");
|
$.ajax({
|
type: "GET",
|
url: backstageWebRoot + 'api/sys/systeminfo/queryTopList',
|
data:{
|
userid:id,
|
num:10,
|
type:thistype!=null?thistype:""
|
},
|
success: function (result) {
|
var html = "";
|
var uploadFileResource = backstageWebRoot + 'uploadFile/';
|
var data = eval(result);
|
otherids = "";
|
// 从后台获取数据
|
if (data.length > 0) {
|
for (var i = 0; i < data.length; i++) {
|
var id = data[i].id != null ? data[i].id :0;
|
html += "<div class='div_app'><div class='div_img'><img onclick=\"openSysWin('"
|
+ data[i].sysaddress + "')\" src='" + uploadFileResource
|
+ data[i].sysimgurl + "' title='" + data[i].appfullname + "'></div>"
|
+"<div class='div_delete' onclick=\"deleteUserApp("
|
+data[i].appid+","+id+")\" style='display: none;'>X</div></div>";
|
if(otherids != ""){
|
otherids += ","+data[i].appid;
|
}else{
|
otherids += data[i].appid;
|
}
|
}
|
}
|
//数据少于10笔时显示添加按钮
|
if(data.length < 10) {
|
html += "<div><div class='div_img'><img onclick='showsysteminfoList()' src='/image/MenHuIndex/addPic.gif' title='添加'></div></div>";
|
for (var i = 0; i < 10-data.length-1; i++) {
|
html+="<div><div class='div_img'><div style='background-color: #BDEAEB;margin: 0 auto;height:100%;width: 92%;'></div></div></div>";
|
}
|
}
|
$(".div_main").html(html);
|
$(".div_app").mouseenter(function () {
|
$(this).find(".div_delete").css("display","");
|
})
|
$(".div_app").mouseleave(function () {
|
$(this).find(".div_delete").css("display","none");
|
})
|
}
|
});
|
}
|
|
function openSysWin(url) {
|
window.open(url, "_blank");
|
}
|
|
//弹出应用程序选择列表
|
function showsysteminfoList() {
|
winPro.openFullwin("/res/PingTaiMenHu/SystemInfoList", "应用程序", "false", 545, 630);
|
}
|
|
function deleteUserApp(appid,sid) {
|
var type = getType("type")
|
$.ajax({
|
type:"post",
|
url: backstageWebRoot + "/api/sys/app/deleteByUseridAndAppid",
|
data:{
|
userid:id,
|
appid:appid,
|
otherids:otherids,
|
type:type,
|
id:sid
|
},
|
success: function (result) {
|
alert("删除成功!");
|
loadSysList();
|
},
|
error: function (e) {
|
console.log(e)
|
alert("删除失败!错误提示:" + e.message);
|
}
|
});
|
}
|
|
//获取地址栏参数
|
function getType(name) {
|
var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
|
var r = window.location.search.substr(1).match(reg);
|
if(r!=null)return r[2]; return null;
|
}
|
/*]]>*/
|
</script>
|
<style>
|
body {
|
margin: 0;
|
height: 100%;
|
background-color: #e9f8fe;
|
font-family: "Roboto", sans-serif !important;
|
}
|
|
.div_main {
|
padding: 0px 0px 0px 8px;
|
width: 1042px;
|
height: 174px;
|
background-color: #e9f8fe;
|
text-align: center;
|
}
|
|
.div_img {
|
width: 193px;
|
height: 72px;
|
float: left;
|
margin-top: 19px;
|
}
|
|
.div_main div img {
|
width: 92%;
|
height: 100%;
|
cursor: pointer;
|
}
|
|
.div_delete{
|
float:left;
|
margin-left: -20px;
|
margin-top: 20px;
|
cursor: pointer;
|
position:relative;
|
}
|
</style>
|
</head>
|
<body>
|
<div class="div_main"></div>
|
</body>
|
</html>
|