<!DOCTYPE html>
|
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:layout="http://www.w3.org/1999/xhtml"
|
xmlns:th="http://www.thymeleaf.org" layout:decorator="MasterPage/CommonPage/Layout">
|
<head>
|
<meta charset="UTF-8"/>
|
<title th:text="'资源查看 - '+${systemName}"></title>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
<link rel="stylesheet" th:href="@{${pubzyWebRoot} + 'BootStrap4/expand/plugins/jqgrid/ui.jqgrid-bootstrap.css'}"/>
|
<link rel="stylesheet"
|
th:href="@{${pubzyWebRoot} + 'BootStrap4/assets/plugins/bootstrap-datepicker/old_datepaker/datepicker.css'}"/>
|
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>
|
<link rel="stylesheet" th:href="@{${pubzyWebRoot} + 'BootStrap4/expand/plugins/portlet/css/portlet.css'}"/>
|
<script th:src="@{${pubzyWebRoot} + 'BootStrap4/assets/js/jquery.min.js'}"></script>
|
<script th:src="@{${pubzyWebRoot} + 'BootStrap4/expand/plugins/portlet/portlet.js'}"></script>
|
<script th:src="@{${pubzyWebRoot} + 'BootStrap4/assets/plugins/bootstrap-datepicker/old_datepaker/bootstrap-datepicker.js'}"></script>
|
<script th:src="@{${pubzyWebRoot} + 'BootStrap4/assets/plugins/bootstrap-datepicker/old_datepaker/bootstrap-datepicker.zh-CN.min.js'}"></script>
|
<script th:src="@{${pubzyWebRoot} + 'media/js/tabPages.js'}"></script>
|
<script src="/js/copyJs/clipboard.min.js"></script>
|
<style>
|
body {
|
background-color: white;
|
box-sizing: border-box;
|
overflow-x: hidden;
|
font-family: '微软雅黑',"Roboto", sans-serif !important;
|
}
|
|
.form-control {
|
padding: 0.3rem 0.7rem;
|
height: 34px;
|
display: inline-block;
|
}
|
|
.control-label {
|
padding-top: 0 !important;
|
width: 160px;
|
float: left;
|
line-height: 30px;
|
padding-right: 1.5em;
|
}
|
|
.control-group {
|
margin-bottom: 1em;
|
}
|
|
.controls {
|
margin-left: 160px;
|
}
|
|
.row {
|
margin-left: 0;
|
margin-right: 0;
|
}
|
|
.col-sm-3,
|
.col-sm-6,
|
.col-sm-12 {
|
padding-left: 0;
|
padding-right: 0;
|
}
|
|
.fade {
|
display: none;
|
}
|
|
.in.fade {
|
display: block;
|
}
|
|
.control-group error {
|
border-color: #b94a48;
|
}
|
|
#button {
|
color: #fff !important;
|
background-color: #039cfd !important;
|
border-color: #039cfd !important;
|
}
|
|
img {
|
cursor: pointer;
|
}
|
|
.nav-tabs > .active > a,
|
.nav-tabs > .active > a:hover,
|
.nav-tabs > .active > a:focus {
|
color: #555;
|
cursor: default;
|
background-color: #fff;
|
border: 1px solid #ddd;
|
border-bottom-color: transparent;
|
}
|
|
/*#div_ziYuanInfo {*/
|
/*border-left: 1px solid #ddd;*/
|
/*border-right: 1px solid #ddd;*/
|
/*border-bottom: 1px solid #ddd;*/
|
/*padding: 8px !important;*/
|
/*}*/
|
|
.control-label {
|
white-space: nowrap;
|
width: 200px !important;
|
}
|
|
.control-right {
|
white-space: nowrap;
|
width: 200px;
|
text-align: left;
|
padding-top: 5px;
|
}
|
|
.tb {
|
width: 100%;
|
}
|
|
.td-box {
|
padding: 10px;
|
font-size: 15.5px;
|
}
|
|
.td-title {
|
width: 140px;
|
float: left;
|
text-align:right;
|
font-size: 19px;
|
}
|
|
.td-info{
|
color: #43B0F5;
|
font-size: 19px;
|
}
|
|
.td-img {
|
width: 18%;
|
text-align: center;
|
vertical-align: middle;
|
max-height: 250px;
|
}
|
|
.inner-tb td {
|
border-style: hidden;
|
}
|
|
.badge {
|
padding-top: 4px;
|
padding-bottom: 4px;
|
}
|
|
.label-zdy,
|
.badge-zdy {
|
background-color: #40A8CD;
|
background-image: none !important;
|
text-shadow: none !important;
|
}
|
|
div#items3 a {
|
text-decoration: none;
|
color: #3deeee;
|
text-align: center;
|
vertical-align: middle;
|
}
|
|
#items3 .item3 {
|
display: block;
|
width: 250px !important;
|
height: 139px !important;
|
}
|
|
.clear {
|
clear: both;
|
}
|
|
.effect {
|
box-shadow: 0 0 10px #444;
|
-moz-box-shadow: 0 0 10px #444;
|
-webkit-box-shadow: 0 0 10px #444;
|
}
|
|
#btnzybj:hover {
|
box-shadow: 0px 0px 1px 1px #0094ff;
|
}
|
|
.hand:hover {
|
box-shadow: 0px 0px 1px 1px #0094ff;
|
}
|
|
.hand {
|
margin-right: 5px;
|
}
|
|
#btnzysq:hover {
|
box-shadow: 0px 0px 1px 1px #247720;
|
}
|
|
#ImgZheZhao {
|
width: 241px;
|
height: 140px;
|
background-color: black;
|
color: white;
|
font-size: 18px;
|
opacity: 0.5;
|
text-align: center;
|
line-height: 150px;
|
position: absolute;
|
top: 0;
|
left: 0;
|
margin-left:1058px;
|
margin-top: 103px;
|
}
|
|
#PingJiaBox ul {
|
list-style-type: none;
|
padding-left: 0;
|
}
|
|
#PingJiaBox ul li {
|
/*height: 55px;*/
|
margin-left: 20px;
|
border-bottom: 1px dashed #ddd;
|
}
|
|
#PingJiaContent li {
|
padding:9px 0 0 0;
|
}
|
|
.ShuJuGuanJianZi{
|
float: left;
|
margin-left: 5px;
|
font-size: 13px;
|
background-color: #B6DAFA;
|
padding: 5px 16px;
|
border-radius: 4px;
|
}
|
|
.leftTotalDiv{
|
margin-top:20px;
|
width: 280px;
|
height: 70px;
|
background-color: white;
|
border:1px solid #E0E0E0;
|
}
|
.leftImgDiv{
|
float: left;
|
width:80px;
|
height: 100%;
|
background-color: #f3f3f3;
|
}
|
.leftImgDiv img{
|
margin-left: 9px;
|
margin-top: 5px;
|
}
|
.leftTextDiv{
|
float: left;
|
width:198px;
|
}
|
.leftTextDiv div:first-child{
|
float: left;
|
}
|
.leftTextDiv div:first-child span{
|
font-size: 16px;
|
line-height: 66px;
|
margin-left: 8px;
|
}
|
.leftTextDiv div:not(:first-child){
|
float: right;
|
color: #EF5728;
|
margin-right: 5px;
|
}
|
.leftTextDiv div:not(:first-child) span{
|
font-size: 23px;
|
line-height: 66px;
|
}
|
#starrating img {
|
vertical-align: text-top;
|
cursor: default !important;
|
}
|
.btn-primary-outline{
|
color:#767b7c;
|
height: 42px !important;
|
}
|
.btn-primary:hover{
|
color: white;
|
}
|
|
#fuwudizhi{
|
width: 705px !important;
|
}
|
</style>
|
|
<script th:inline="javascript">
|
/*<![CDATA[*/
|
var pubdate = $("#pubdate").val();
|
var actionid = [[${actionid}]];
|
var shenhe = [[${shenhe}]];
|
var integratetype = [[${integratetype}]];
|
var integrateurl = [[${integrateurl}]];
|
var tokenStr = "";
|
//安全级别图片路径
|
var star = "/image/ZiYuan/star.png";
|
var starOff = "/image/ZiYuan/staroff.png";
|
$(function () {
|
|
var clipboard = new ClipboardJS('#btn-copy', {
|
text: function() {
|
fuzhi();
|
return $("#js-copy").text();
|
}
|
});
|
clipboard.on('success', function(e) {
|
alert("复制成功!");
|
});
|
|
clipboard.on('error', function(e) {
|
alert("复制失败!");
|
});
|
|
|
var resourceType = $("#resourceType").val();
|
// $("#ResourceImg img").prop("src","/image/classimg/"+resourceType+".gif");
|
if(resourceType != "SJWJ" && resourceType != "KJ_KJFX") {
|
$("#ResourceImg").hover(function () {
|
$("#ImgZheZhao").show();
|
}, function () {
|
$("#ImgZheZhao").hide();
|
});
|
}
|
// $("#JieKouFuWuBox").css("width",window.innerWidth-380+"px");
|
// $("#XiangGuanFuJianBox").css("width",window.innerWidth-380+"px");
|
// $("#PingJiaBox").css("width",window.innerWidth-380+"px");
|
// $("#BiaoJieGouBox").css("width",window.innerWidth-380+"px");
|
// $("#ZiYuanFuJianBox").css("width",window.innerWidth-380+"px");
|
// $("#BangZhuShuoMingBox").css("width",window.innerWidth-380+"px");
|
// $("#DingYueBox").css("width",window.innerWidth-380+"px");
|
// $("#ZiDingYiFengGeBox").css("width",window.innerWidth-380+"px");
|
showMainInfoByType(resourceType);//各类型主表信息
|
setPingJiaList();//获取资源评价列表
|
getPingJiaJiBie();
|
|
//收藏按钮处理
|
if(actionid == 0) {
|
$("#shoucang").show();
|
} else {
|
$("#unshoucang").show();
|
}
|
//加载接口服务
|
if(resourceType == "JKFW"){
|
$("#jiekoufuwu").load("/res/resExtInterFaceService/WSDL?resMainInfoId="+$("#resMainInfoId").val());
|
}
|
var helpurl=[[${helpurl}]] == null?"":[[${helpurl}]];
|
$("#BangZhuShuoMing").html(htmlDecodeByRegExp(helpurl));
|
$("#shenheStatus").html(shenhe);
|
});
|
|
//解码
|
function htmlDecodeByRegExp(str){
|
var s = "";
|
if(str.length == 0) return "";
|
s = str.replace(/&/g,"&");
|
s = s.replace(/</g,"<");
|
s = s.replace(/>/g,">");
|
s = s.replace(/ /g," ");
|
s = s.replace(/'/g,"\'");
|
s = s.replace(/"/g,"\"");
|
return s;
|
}
|
|
//显示或隐藏基本信息
|
function showOrhideBaseInfoBox(type) {
|
if(type == 1){
|
$("#BaseInfoBox").show();
|
$("#CaoZuoBox").show();
|
$("#BiaoJieGouBox").show();
|
$("#ZiYuanFuJianBox").show();
|
$("#JieKouFuWuBox").show();
|
$("#XiangGuanFuJianBox").show();
|
$("#BangZhuShuoMingBox").show();
|
$("#XiangGuanFuJianBox").show();
|
$("#JieKouFuWuBox").show();
|
$("#ZiDingYiFengGeBox").show();
|
$("#DingYueBox").show();
|
}else{
|
$("#CaoZuoBox").hide();
|
$("#BaseInfoBox").hide();
|
$("#BiaoJieGouBox").hide();
|
$("#ZiYuanFuJianBox").hide();
|
$("#JieKouFuWuBox").hide();
|
$("#XiangGuanFuJianBox").hide();
|
$("#BangZhuShuoMingBox").hide();
|
$("#XiangGuanFuJianBox").hide();
|
$("#JieKouFuWuBox").hide();
|
$("#ZiDingYiFengGeBox").hide();
|
$("#DingYueBox").hide();
|
}
|
}
|
|
//获取资源评价列表
|
function setPingJiaList() {
|
$.ajax({
|
url: '/res/manage/evaluation/selectByResourceid?resourceid=' + $("#resMainInfoId").val(),
|
type: 'get',
|
success: function (result) {
|
var data = eval(result);
|
var html = "";
|
if (data != null && data.length != 0) {
|
for (var i = 0; i < data.length; i++) {
|
var content = data[i].content==null?'': data[i].content;
|
html += "<li>"+ "<p style='margin-bottom: 3px;'>【"+data[i].username+"】"+ data[i].unitname
|
+ "<span id='starrating' style=\"color:gray;margin: 0 25px;\">"
|
+ PJJB(data[i].starrating) +"</span>"+data[i].evaltime.substring(0,10)
|
+"</p><p style='text-indent: 2em;margin-bottom: 5px;'>" + content + "</p>"
|
+"</li>";
|
}
|
}
|
else {
|
html += "<div style='color:#ce4f4f;padding: 10px 10px 0;'>暂无评价!</div>";
|
}
|
$("#PingJiaContent").html(html);
|
$("#pingjiaCount").text(data.length);
|
},
|
error: function (e) {
|
//alert(e.message);
|
}
|
});
|
}
|
|
//构造评价等级HTML
|
function PJJB(starrating) {
|
var html = "";
|
for (var i = 0; i < 5; i++) {
|
if (i < starrating) {
|
html += "<img data-on='yes' src='/image/ZiYuan/star.png' />";
|
} else {
|
html += "<img data-on='no' src='/image/ZiYuan/staroff.png' />";
|
}
|
}
|
return html;
|
}
|
|
//初始化评价级别
|
function getPingJiaJiBie(){
|
for (var i = 0; i < 5; i++) {
|
if (i < parseInt($("#starrating").val())) {
|
$("#divPingJiaJiBie").append($('<img data-on="yes" src="/image/ZiYuan/star.png" />'));
|
} else {
|
$("#divPingJiaJiBie").append($('<img data-on="no" src="/image/ZiYuan/staroff.png" />'));
|
}
|
}
|
$('#divPingJiaJiBie img').click(function () {
|
$(this).attr({"src": star, "data-on": "yes"})
|
.prevAll().each(function (index, obj) {
|
$(obj).attr({"src": starOff, "data-on": "yes"});
|
});
|
$(this).nextAll().attr(({"src": star, "data-on": "no"}));
|
}).mousemove(function () {
|
$(this).attr("src", star)
|
.prevAll().each(function (index, obj) {
|
$(obj).attr("src", star);
|
});
|
$(this).nextAll().each(function (index, obj) {
|
$(obj).attr("src", starOff);
|
});
|
}).mouseout(function () {
|
$(this).attr("src", function () {
|
if ($(this).attr("data-on") == "no") {
|
return starOff;
|
} else {
|
return star;
|
}
|
}).siblings().each(function (index, obj) {
|
$(obj).attr("src", function () {
|
if ($(this).attr("data-on") == "no") {
|
return starOff;
|
} else {
|
return star;
|
}
|
});
|
});
|
});
|
}
|
/*]]>*/
|
|
//收藏
|
function shoucang() {
|
var resMainInfoId = $("#resMainInfoId").val();
|
$.ajax({
|
url:'/res/resActionRecord/registerActionRecord',
|
type: 'post',
|
data: {'resourceid': resMainInfoId,'actiontype': '收藏','checked': true},
|
success: function (data) {
|
var jsonb = eval('(' + data + ')');
|
$("#shoucang").hide();
|
$("#unshoucang").show();
|
$("#shoucangcount").text(jsonb.shoucangCount);
|
},
|
error: function (e) {
|
alert(e.message);
|
}
|
});
|
}
|
|
//申请
|
function AddZiYuanShenQing(){
|
var resMainInfoId = $("#resMainInfoId").val();
|
if([[${apply}]]== 1){
|
alert('您已申请了该资源,请等待管理员批复后再申请');
|
return;
|
}
|
window.open("/res/resApplyRecommend/ziYuanShenQing?resourceid="+resMainInfoId);
|
}
|
|
//订阅
|
function AddZiYuanDingYue(){
|
var resMainInfoId = $("#resMainInfoId").val();
|
if([[${dingyue}]]== 1){
|
window.open("/res/ressubscriptions/ziyuandingyue?appid=&resourceid="+resMainInfoId+"&edit=1");
|
return;
|
}
|
|
window.open("/res/ressubscriptions/ziyuandingyue?appid=&resourceid="+resMainInfoId+"&edit=1");
|
}
|
|
//各类型主表信息
|
function showMainInfoByType(type){
|
//alert ykm 2019/02/26
|
if(type=="KJ_SWMX" || type=="KJ_SWDX" || type=="KJ_SWYX") type = "KJ_SW";
|
var pageName = "";
|
switch (type){
|
case 'KJ_JCDT' :
|
pageName = "BaseInfoExtBaseMap";
|
break;
|
case 'KJ_YWTC' :
|
pageName = "BaseInfoExtBusinessLayer";
|
break;
|
case 'KJ_KJFX' :
|
pageName = "BaseInfoExtSpaceServer";
|
break;
|
case 'KJ_ZTDT' :
|
pageName = "BaseInfoExtThemeMap";
|
break;
|
case 'YWJC' :
|
pageName = "BaseInfoExtIntegrate";
|
break;
|
case 'SJWJ' :
|
pageName = "BaseInfoExtFileSource";
|
break;
|
case 'SJKB' :
|
pageName = "BaseInfoExtDataBase";
|
break;
|
case 'JKFW' :
|
pageName = "BaseInfoEextInterFace";
|
break;
|
// case 'KJ_SWMX' :
|
case 'KJ_SW' : //三维类型,三维模型,三维地形,三维影像
|
pageName = "BaseInfoExt3D";
|
break;
|
}
|
$("#BaseInfoBox").load(pageName,{resourceid:$("#resMainInfoId").val()},function(){});
|
}
|
|
//评价窗口
|
function openEvaluation() {
|
layer.open({
|
type: 1,
|
title: '资源评价',
|
shadeClose: false,
|
area: ['550px', '365px'],
|
content: jQuery("#resEvaluationInfo")
|
});
|
//监听关闭事件
|
$(".layui-layer-close1").click(function () {
|
$("#resEvaluationInfo").css("display","none");
|
})
|
}
|
|
//保存评价级别
|
function addResEvaluation(){
|
if( $('#divPingJiaJiBie img[data-on="yes"]').length == 0){
|
alert("评价星级不能为空!");
|
return false;
|
}
|
$.ajax({
|
url:'/res/manage/evaluation/save',
|
type: 'post',
|
data: {'resourceid': $("#resMainInfoId").val(),'starrating': $('#divPingJiaJiBie img[data-on="yes"]').length,'content': $("#content").val()},
|
success: function (data) {
|
var result = eval('(' + data + ')');
|
if(result = 1){
|
alert("评价成功!");
|
colseLayer();
|
location = location;
|
}
|
},
|
error: function (e) {
|
alert(e.message);
|
}
|
});
|
}
|
|
//关闭评价窗口
|
function colseLayer(){
|
$(".layui-layer-close1")[0].click();
|
}
|
//取消收藏
|
function quxiaoshoucang() {
|
var resMainInfoId = $("#resMainInfoId").val();
|
$.ajax({
|
url:'/res/resActionRecord/registerActionRecord',
|
type: 'post',
|
data: {'resourceid': resMainInfoId,'actiontype': '收藏','checked': false},
|
success: function (data) {
|
var jsonb = eval('(' + data + ')');
|
$("#shoucang").show();
|
$("#unshoucang").hide();
|
$("#shoucangcount").text(jsonb.shoucangCount);
|
},
|
error: function (e) {
|
alert(e.message);
|
}
|
});
|
}
|
|
function ShuJuKuChaKan(){
|
var resMainInfoId = $("#resMainInfoId").val();
|
//判断是否填写了扩展表
|
$.ajax({
|
url:'/res/ZiYuan/selectISNULL?resourceid='+resMainInfoId,
|
type: 'post',
|
success: function (data) {
|
if(data=="1"){
|
alert("请添加关联表数据")
|
}else {
|
url ="BaseLeftSource?resourceid=" + resMainInfoId;
|
window.open(url);
|
}
|
},
|
error: function (e) {
|
alert(e.message);
|
}
|
});
|
}
|
// 接口查看
|
function JieKouChakan() {
|
var resMainInfoId = $("#resMainInfoId").val();
|
//判断是否填写了扩展表
|
$.ajax({
|
url:'/res/ResManage/ResRegister/serverurl?resMainInfoId='+resMainInfoId,
|
type: 'post',
|
success: function (data) {
|
if(data==""){
|
alert("请添加服务地址")
|
}else if(data=="0"){
|
alert("你没有权限查看,请申请")
|
}else {
|
var jsonb = eval("("+data+")");
|
window.open(jsonb.serverurl);
|
}
|
},
|
error: function (e) {
|
alert(e.message);
|
}
|
});
|
}
|
|
//查看地图
|
function showMap() {
|
var resourceChaKan = [[${resourceChaKan}]];
|
var resourceType = $("#resourceType").val();
|
if(resourceType == "SJWJ"){
|
return;
|
}
|
if(resourceChaKan == 1) {
|
if (resourceType == "KJ_JCDT" || resourceType == "KJ_YWTC" || resourceType == "KJ_ZTDT" || resourceType == "YWJC") {
|
if (resourceType == "YWJC" && integratetype == "页面集成") {
|
if (integrateurl == "") {
|
alert("抱歉,您没有权限!");
|
} else {
|
window.open(integrateurl);
|
}
|
} else {
|
var firstMapUrl = [[${firstMapUrl}]];
|
if (resourceType == "KJ_ZTDT" && firstMapUrl != null && firstMapUrl != "") {//专题地图portal专题类型资源查看地图直接打开首笔协议服务路径
|
window.open(firstMapUrl);
|
} else {
|
var gisPortal = [[${gisPortal}]];
|
var userId = [[${userId}]];
|
var resMainInfoId = $("#resMainInfoId").val();
|
url = gisPortal + "leafportal.html?resourceid=" + resMainInfoId + "&uid=" + userId;
|
window.open(url);
|
}
|
}
|
} else if (resourceType == "SJKB") {
|
ShuJuKuChaKan();
|
} else if (resourceType == "JKFW") {
|
JieKouChakan();
|
}
|
else {
|
alert("开发中...");
|
}
|
}
|
else {
|
alert("抱歉,你没有权限!");
|
}
|
}
|
|
//打开编辑页面
|
function openUrl(){
|
window.open('../ResManage/ResRegister/ResEdit?resMainInfoId=' + $("#resMainInfoId").val(), '_blank');
|
$.ajax({
|
url: '/res/resActionRecord/registerActionRecord',
|
type: 'post',
|
data: {'resourceid': $("#resMainInfoId").val(), 'actiontype': '编辑'}
|
});
|
}
|
|
//下载 资源查看页面,数据文件类型 资源附件列表下载不兼容谷歌修改
|
function download(url) {
|
if(!!window.ActiveXObject || "ActiveXObject" in window) {
|
var test=window.open(url);
|
test.document.execCommand("SaveAs");
|
test.close();
|
}
|
else {
|
var a = document.createElement('a');
|
a.setAttribute("download","");
|
a.href = url;
|
a.click();
|
}
|
|
}
|
|
//打开问题查看
|
function openProblems(){
|
layer.open({
|
type: 2,
|
title: '问题反馈',
|
id: 'probemshow',
|
shadeClose: true,
|
shade: 0.7,
|
maxmin: false, //开启最大化最小化按钮
|
area: ['1000px', '550px'],
|
content: "/res/problemFeedback/index?resourceid=" + $("#resMainInfoId").val()
|
});
|
}
|
|
/*<![CDATA[*/
|
//删除自定义风格
|
function deleteRowData(obj,id) {
|
if(confirm("确定删除该自定义风格?"))
|
{
|
$.ajax({
|
url: '../diylayer/deleteDiyLayerInfo?diyid=' + id,
|
type: 'post',
|
success: function (data) {
|
if (data == "1") {
|
var tbList = document.getElementById("tbGKList");
|
var temRow = obj.parentNode.parentNode;
|
tbList.deleteRow(temRow.rowIndex);
|
}
|
},
|
error: function (e) {
|
alert(e.message);
|
}
|
})
|
}
|
}
|
/*]]>*/
|
|
function openDingYue(id) {
|
var url = "/res/ressubscriptions/ziyuandingyue?appid=" + id+"&edit=0";
|
window.open(url);
|
}
|
|
//修改属性 挂起
|
function IsHangup(id,hangup){
|
$.ajax({
|
url:'/res/ressubscriptions/updateHangup?appid='+id +'&hangup=' + hangup,
|
type:'post',
|
async:false,
|
success:function(data){
|
window.location.reload();
|
},
|
error:function(){
|
alert("请求失败!");
|
}
|
})
|
}
|
|
//复制服务地址
|
function fuzhi() {
|
|
var resourceid = $("#resMainInfoId").val();
|
var url = $("#fuwudizhi").text();
|
var sharprotocol = $("#sharprotocol").text();
|
if(sharprotocol=='完全公开'){
|
$('#js-copy').text(url);
|
return
|
}
|
// modified by qufangxu
|
if(url.indexOf('34:8066') > 0 || url.indexOf('104:8066') > 0){
|
// TODO
|
}else{
|
$('#js-copy').text(url);
|
return
|
}
|
if(tokenStr=="") {
|
$.ajax({
|
url: '/res/genTokenForApply?resourceid='+resourceid,
|
type: 'get',
|
async: false,
|
success: function (data) {
|
let datajson = JSON.parse(data);
|
let token = datajson.data;
|
tokenStr = token;
|
},
|
error: function (e) {
|
alert("复制失败!");
|
}
|
});
|
}
|
|
$('#js-copy').text(url + "?token=" + tokenStr);
|
}
|
|
//检查服务地址是否异常
|
function checkServerurl(){
|
var resourceid = $("#resMainInfoId").val();
|
if($("#fuwudizhi") == undefined || $("#fuwudizhi").text() == ""){
|
return;
|
}
|
$.ajax({
|
url: '/res/ZiYuan/CheckServerurl',
|
type: 'post',
|
data:{
|
resourceid:resourceid,
|
urlStr:$("#fuwudizhi").text()
|
},
|
success: function (data) {
|
if(data != ""){
|
var data = eval("("+data+")");
|
if(data.result != -1){
|
if(data.result == 1){//异常
|
if($("#yichang").length != 0){
|
$("#yichang").text("【网络异常】");
|
}else{
|
$("#tdtitle").append("<span id=\"yichang\" style=\"font-size: 14px;color:red;\">【网络异常】</span>");
|
}
|
}else{//正常
|
if($("#yichang").length != 0){
|
$("#yichang").remove();
|
}
|
}
|
if($("#zhuxiao").length != 0) $("#zhuxiao").remove();
|
}
|
}
|
},
|
error: function (e) {
|
console.log("error");
|
}
|
});
|
}
|
</script>
|
</head>
|
<body>
|
<div layout:fragment="content" style="background-color: #fff;">
|
<input type="hidden" id="resMainInfoId" th:value="${resMainInfoId}"/>
|
<input type="hidden" id="resourceType" th:value="${resourceType}" />
|
<div id="div_content" style="width: 1400px;margin:0 auto;margin-top: 20px;margin-bottom: 20px;">
|
<div class="row" style="border:1px solid #bfbfbf !important;border-radius: 10px;">
|
<div class="col-sm-12">
|
<!--BEGIN TABS-->
|
<div class="tabbable tabbable-custom">
|
<div class="tab-content" id="div_ziYuanInfo" style="padding: 5px !important;">
|
<div id="rightBox" style="">
|
<div id="zytitleBox" style="height: 57px;border-radius: 10px;background-color: #4677fe;color:white;line-height:56.5px;">
|
<span style="font-size: 21px;margin-left: 30px;font-weight: 600;" id="tdtitle">
|
<span th:if="${mainInfo.resourcestatus == 1}" th:title="${ProblemFeedback}" style="font-size: 18px !important;color: red;">
|
<i class="fa fa-warning tooltips"></i>
|
</span>
|
<span th:text="${mainInfo.title}"></span>
|
<span id="shenheStatus"></span>
|
<span id="yichang" th:if="${mainInfo.resourcestatus == 1}" th:text="'【'+${problemStatus}+'异常】'" style="font-size: 14px;color:red;"></span>
|
<span id="zhuxiao" th:if="${mainInfo.resourcestatus == 3}" style="font-size: 14px;color:red;">【注销】</span>
|
</span>
|
</div>
|
<div id="BaseInfoBox" style="margin-bottom: 25px;float: left;width: 1000px;padding: 35px;">
|
</div>
|
<div id="CaoZuoBox" style="float: right;width: 343px;margin-top: 40px;margin-right: 43px;">
|
<div id="BaseInfoBox_Right">
|
<div style="width: 241px;margin-bottom: 10px;margin-left: 50px;">
|
<div id="ResourceImg" th:style="(${resourceType} != 'SJWJ')? (${resourceType} != 'KJ_KJFX' ? 'cursor:pointer;':'cursor:auto;') :'cursor:auto;'">
|
<img width="241" height="140" th:src="${imgurl}" th:style="(${resourceType} != 'SJWJ')? (${resourceType} != 'KJ_KJFX' ? 'cursor:pointer;':'cursor:auto;'):'cursor:auto;'"/>
|
<div id="ImgZheZhao" onclick="showMap();" style="display: none;">
|
<span>数据查看</span>
|
</div>
|
</div>
|
</div>
|
<div style="margin-bottom: 10px;text-align: center;">
|
<button type="button" id="shoucang" onclick="shoucang()" class="btn btn-primary-outline" style="width: 233px;height: 45px;font-size: 17px;display: none;">
|
添加到收藏夹
|
</button>
|
<button type="button" id="unshoucang" onclick="quxiaoshoucang()" class="btn btn-primary-outline" style="width: 233px;height: 45px;font-size: 17px;display: none;">
|
<img src="/image/ZiYuan/star.png">已收藏
|
</button>
|
</div>
|
<div style="margin-bottom: 10px;text-align: center;" th:if="${apply} > -1">
|
<button onclick="AddZiYuanShenQing()" type="button" id="ApplyBtn" class="btn btn-primary-outline" style="width: 233px;height: 45px;font-size: 17px;">
|
申请
|
</button>
|
</div>
|
<div style="margin-bottom: 10px;text-align: center;" th:if="${dingyue} > -1">
|
<button onclick="AddZiYuanDingYue()" type="button" id="DingYueBtn" class="btn btn-primary-outline" style="width: 233px;height: 45px;font-size: 17px;">
|
订阅
|
</button>
|
</div>
|
<div style="margin-bottom: 10px;text-align: center;">
|
<button type="button" id="resEvaluation" onclick="openEvaluation()" class="btn btn-primary-outline" style="width: 233px;height: 45px;font-size: 17px;">
|
评价
|
</button>
|
</div>
|
<div style="margin-bottom: 10px;text-align: center;" th:if="${isEdit}==true">
|
<button class="btn btn-primary-outline" onclick="openUrl()" style="width: 233px;height: 45px;font-size: 17px;" type="button">
|
编辑
|
</button>
|
</div>
|
<div style="margin-bottom: 10px;text-align: center;" th:if="${resourceType}!='SJWJ'? ${resourceType}!='KJ_KJFX' : false">
|
<button type="button" id="LookMapBtn" onclick="showMap();" th:if="${resourceType}!='SJKB'" class="btn btn-primary" style="width: 233px;height: 45px;font-size: 17px;">
|
数据查看
|
</button>
|
<button type="button" onclick="ShuJuKuChaKan()" th:if="${resourceType}=='SJKB'" class="btn btn-primary" style="width: 233px;height: 45px;font-size: 17px;">
|
打开数据库表格
|
</button>
|
</div>
|
<div th:if="${resourceChaKan} == 1" style="margin-bottom:10px;text-align: center;">
|
<button class="btn btn-primary-outline" onclick="openProblems()" style="width: 233px;height: 45px;font-size: 17px;" type="button">
|
问题反馈
|
</button>
|
</div>
|
<div style="margin-bottom: 10px;text-align: center;margin-left: 58.5px;margin-top: 15px;">
|
<div style="width: 228px;height: 32px;font-size: 17px;border-bottom: 1px dashed #E0E0E0;color:black;">
|
<div style="float: left;">资源收藏</div>
|
<div style="float: right;width: 55px;height: 25px;border-radius: 5px;background-color: #fef5c7;color: #fd5c5d;font-weight: 600;"><span id="shoucangcount" th:text="${shoucangcount}"></span></div>
|
</div>
|
</div>
|
<div style="margin-bottom: 10px;text-align: center;margin-left: 58.5px;margin-top: 15px;">
|
<div style="width: 228px;height: 32px;font-size: 17px;border-bottom: 1px dashed #E0E0E0;color:black;">
|
<div style="float: left;">浏览次数</div>
|
<div style="float: right;width: 55px;height: 25px;border-radius: 5px;background-color: #fef5c7;color: #fd5c5d;font-weight: 600;"><span th:text="${liulancount}"></span></div>
|
</div>
|
</div>
|
<div style="margin-bottom: 10px;text-align: center;margin-left: 58.5px;margin-top: 15px;">
|
<div style="width: 228px;height: 32px;font-size: 17px;border-bottom: 1px dashed #E0E0E0;color:black;">
|
<div style="float: left;">调用次数</div>
|
<div style="float: right;width: 55px;height: 25px;border-radius: 5px;background-color: #fef5c7;color: #fd5c5d;font-weight: 600;"><span th:text="${diaoyongcount}"></span></div>
|
</div>
|
</div>
|
<div style="margin-bottom: 10px;text-align: center;margin-left: 58.5px;margin-top: 15px;">
|
<div style="width: 228px;height: 32px;font-size: 17px;border-bottom: 1px dashed #E0E0E0;color:black;">
|
<div style="float: left;">申请次数</div>
|
<div style="float: right;width: 55px;height: 25px;border-radius: 5px;background-color: #fef5c7;color: #fd5c5d;font-weight: 600;"><span th:text="${shenqingcount}"></span></div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div id="ZiYuanFuJianBox" style="min-height: 250px;float: left;width: 954px;padding:0 0 0 35px;" th:if="${XianShiWenJian}==1" >
|
<div style="height: 40px;line-height: 40px;font-size: 18px;border-bottom: 1px solid #43B0F5;padding:0 20px;">
|
<i class="fa fa-user"></i>
|
<span>资源附件</span>
|
</div>
|
<table class="table" >
|
<tr th:if="${webUrl}!=null">
|
<th style="font-size: 15px;width: 70%" th:text="'文件目录: '+${webUrl}"> </th>
|
<th style="font-size: 15px;width: 30%">
|
<a class="btn btn-primary" target="_blank" th:each="user:${res_fileSource_way}" th:href="${user.remark}" th:text="${user.showway}"></a>
|
</th>
|
</tr>
|
</table>
|
<div>
|
<div style="margin-left: 20px;">
|
<table class="table">
|
<tr>
|
<th width="50px" >序号</th>
|
<th width="330px">文件名</th>
|
<th width="100px">文件大小</th>
|
<th>查看</th>
|
</tr>
|
<tr th:each="user,userStat : ${filelist}">
|
<td th:text="${userStat.count}"></td>
|
<td >
|
<a target="_blank" th:text="${user.name}" th:href="${user.path}"></a>
|
<i class="fa fa-download" aria-hidden="true" title="下载" th:onclick="'javascript:download(\''+${user.path}+'\')'"></i>
|
</td>
|
<td th:text="${user.size}"></td>
|
<td>
|
<a class="btn btn-primary" style="margin-top: 3px" target="_blank" th:each="lists,listStat: ${user.list}" th:href="${lists.url}" th:text="${lists.showway}"></a>
|
</td>
|
</tr>
|
</table>
|
</div>
|
</div>
|
</div>
|
<div id="BiaoJieGouBox" style="min-height: 250px;float: left;width: 954px;padding:0 0 0 35px;" th:if="${leirongjson}!=null">
|
<div style="height: 40px;line-height: 40px;font-size: 18px;border-bottom: 1px solid #43B0F5;padding:0 20px;">
|
<i class="fa fa-user"></i>
|
<span><span th:text="'【'+ ${resExtDataBase.tablename} + '】'"></span>数据库表结构</span>
|
</div>
|
<div style="margin-left: 20px;">
|
<table class="table">
|
<tr>
|
<th>编码</th>
|
<th>字段名称</th>
|
<th>字段类型</th>
|
<th>字段长度</th>
|
<th>字段必填</th>
|
</tr>
|
<tr th:each="user,userStat : ${leirongjson}">
|
<td th:text="${user.name}"></td>
|
<td th:text="${user.columnDescription}"></td>
|
<td th:text="${user.dataType}"></td>
|
<td th:if="${user.xiaoShuNum}=='0'" th:text="${user.colLength} "></td>
|
<td th:if="${user.xiaoShuNum}!='0'" th:text="${user.colLength}+','+${user.xiaoShuNum}" ></td>
|
<td>
|
<img th:if="${user.required} == '是'" src="/image/ytg.png">
|
<img title="表主键" th:if="${user.name} == ${resExtDataBase.primarykey}" src="/image/primarykey.png">
|
</td>
|
</tr>
|
</table>
|
</div>
|
</div>
|
<div id="DingYueBox" style="min-height: 250px;float: left;width: 954px;padding:0 0 0 35px;" th:if="${isDingYueList} == true">
|
<div style="height: 40px;line-height: 40px;font-size: 18px;border-bottom: 1px solid #43B0F5;padding:0 20px;">
|
<i class="fa fa-user"></i>
|
<span>订阅列表</span><span th:text=" '(订阅次数:'+ ${dingyuecount} + '次)'"></span>
|
<button onclick="AddZiYuanDingYue()" type="button" class="btn btn-primary" style="float: right; right: 1.75em;padding: 2px 5px;margin-top: 5px;" >
|
订阅
|
</button>
|
</div>
|
<div style="margin-left: 20px;">
|
<table class="table">
|
<tr>
|
<th>序号</th>
|
<th>订阅单位</th>
|
<th>订阅时间</th>
|
<th>数据库类型</th>
|
<th>表名</th>
|
<th>最后同步时间</th>
|
<th>最后同步状态</th>
|
<th>操作</th>
|
</tr>
|
<tr th:each="dingyue,dingyueStat : ${dingYues}">
|
<td th:text="${dingyueStat.count}"></td>
|
<td style="cursor: pointer;text-decoration: underline;" th:if="${dingyue.flag} == '0'" th:text="${dingyue.unit}+ '('+ ${dingyue.username}+')'" th:onclick="'openDingYue('+${dingyue.id}+')'">
|
<!--<a ></a>-->
|
</td>
|
<td th:if="${dingyue.flag} == '1'" th:text="${dingyue.unit}+ '('+ ${dingyue.username}+')'">
|
<!--<a ></a>-->
|
</td>
|
<!--<td th:text="${dingyue.username}"></td>-->
|
<td th:text="${dingyue.appdate}"></td>
|
<td th:text="${dingyue.databasetype}"></td>
|
<td th:text="${dingyue.tablename}"></td>
|
<td th:text="${dingyue.lastupdate}"></td>
|
<td th:if="${dingyue.syncresult==0}" th:text="同步成功"></td>
|
<td th:if="${dingyue.syncresult==1}" th:text="同步失败"></td>
|
<td th:if="${dingyue.syncresult==2}" th:text="暂未同步"></td>
|
<td>
|
<span th:if="${dingyue.auditresult==0}">未批复</span>
|
<span th:if="${dingyue.auditresult==2}">未通过</span>
|
<span th:if="${dingyue.auditresult==1}">
|
<span th:if="${dingyue.hangup==0}">
|
<button th:onclick="'IsHangup('+${dingyue.id}+',1)'" type="button" class="btn btn-primary" style="float: left; right: 1.75em;padding: 2px 5px;" >挂起</button>
|
</span>
|
<span th:if="${dingyue.hangup==1}">
|
<button th:onclick="'IsHangup('+${dingyue.id}+',0)'" type="button" class="btn btn-warning" style="float: left; right: 1.75em;padding: 2px 5px;" >解除</button>
|
</span>
|
</span>
|
</td>
|
</tr>
|
</table>
|
</div>
|
</div>
|
<div id="BangZhuShuoMingBox" style="min-height: 250px;float: left;width: 954px;padding:0 0 0 35px;" th:if="${(resourceType=='JKFW' || resourceType=='KJ_KJFX')&& not #lists.isEmpty(helpurl) && ShuoMing==1}" >
|
<div style="height: 40px;line-height: 40px;font-size: 18px;border-bottom: 1px solid #43B0F5;padding:0 20px;">
|
<i class="fa fa-tasks"></i>
|
<span>帮助说明</span>
|
</div>
|
<div id="BangZhuShuoMing" style="margin-top: 20px;padding-left: 20px;padding-right: 20px">
|
|
</div>
|
</div>
|
<div id="XiangGuanFuJianBox" style="min-height: 250px;float: left;width: 954px;padding:0 0 0 35px;" th:if="${(resourceType=='JKFW' || resourceType=='KJ_KJFX') && not #lists.isEmpty(resFileList) && show==1}" >
|
<div style="height: 40px;line-height: 40px;font-size: 18px;border-bottom: 1px solid #43B0F5;padding:0 20px;">
|
<i class="fa fa-tasks"></i>
|
<span>相关附件</span>
|
</div>
|
<table id="XiangGuanFuJian" style="margin: 20px auto 0px;width: 98%;border: 1px solid #E3E3E3;text-align: center;">
|
<tr style="background-color: #F2F1EF;height: 45px;border: 1px solid #E3E3E3;">
|
<th style="text-align: center;width: 25%;">文件名称</th>
|
<th style="text-align: center;width: 25%;">文件类型</th>
|
<th style="text-align: center;width: 50%;">服务地址</th>
|
</tr>
|
<tr th:each="resFiles,resFilesStat:${resFileList}" style="border: 1px solid #E3E3E3;height: 45px;">
|
<td th:text="${resFiles.filename}"></td>
|
<td th:text="${resFiles.filetype}"></td>
|
<td th:text="${resFiles.serverurl}" id="serverurl"></td>
|
</tr>
|
</table>
|
</div>
|
<div id="JieKouFuWuBox" style="min-height: 250px;float: left;width: 954px;padding:0 0 0 35px;" th:if="${resourceType=='JKFW' && show==1 }">
|
<div style="height: 40px;line-height: 40px;font-size: 18px;border-bottom: 1px solid #43B0F5;padding:0 20px;">
|
<i class="fa fa-tasks"></i>
|
<span>接口列表</span>
|
</div>
|
<div id="jiekoufuwu" style="margin-top: 20px;">
|
|
</div>
|
</div>
|
<div id="ZiDingYiFengGeBox" style="min-height: 250px;float: left;width: 954px;padding:0 0 0 35px;" th:if="${not #lists.isEmpty(diyLayerInfos)}">
|
<div style="height: 40px;line-height: 40px;font-size: 18px;border-bottom: 1px solid #43B0F5;padding:0 20px;">
|
<i class="fa fa-tasks"></i>
|
<span>自定义风格</span>
|
</div>
|
<table id="tbGKList" style="width: 100%;margin: 10px 0;">
|
<tr style="height:30px;background-color: transparent;color:#999;">
|
<td style="width:45%;background-color:#DDD;color:#666;padding-left: 35px;">名称</td>
|
<td style="width:30%;background-color:#DDD;color:#666">时间</td>
|
<td style="text-align:center;width:15%;background-color:#DDD;color:#666">操作</td>
|
</tr>
|
<tr style="line-height: 40px;border-bottom: 1px solid #e3e3e3" th:each="diyLayer,diyLayerStat:${diyLayerInfos}">
|
<td th:text="${diyLayer.title}" style="padding-left: 35px;">
|
</td>
|
<td th:text="${diyLayer.diydate}">
|
</td>
|
<td style="text-align:center;">
|
<img th:if="${diyLayer.del == true}" src="/image/wrong.gif" alt="删除" style="cursor:pointer;" th:onclick="'deleteRowData(this,\''+ ${diyLayer.diyid} +'\')'" />
|
</td>
|
</tr>
|
</table>
|
</div>
|
<div id="PingJiaBox" style="min-height: 250px;float: left;width: 954px;padding:0 0 0 35px;">
|
<div style="height: 40px;line-height: 40px;font-size: 18px;border-bottom: 1px solid #43B0F5;padding:0 20px;">
|
<i class="fa fa-user"></i>
|
<span>资源评价</span>
|
<!--<button onclick="openEvaluation()" type="button" class="btn btn-primary" style="float: right; right: 1.75em;padding: 2px 5px;margin-top: 5px;" >-->
|
<!--评价-->
|
<!--</button>-->
|
</div>
|
<div>
|
<ul id="PingJiaContent">
|
</ul>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div id="resEvaluationInfo" style="padding:20px;display:none;">
|
<div style="width:100%;">
|
<div style="float:left;line-height:24px;width:15%;"><span>评价星级:</span></div>
|
<div class="input-icon" id="divPingJiaJiBie" >
|
<input style="width:15%;" type="hidden" id="starrating" name="starrating" />
|
</div>
|
</div>
|
<div style="float:left;line-height:24px;width:100%;">
|
<label style="float: left; margin-top: 10px;width:15%;">评价内容:</label>
|
<div style="float:left;width:85%;">
|
<textarea id="content" name="content" class="col-sm-12" style="border: 1px solid #e3e3e3;margin-top: 10px;height: 190px;"></textarea>
|
</div>
|
</div>
|
<div style="margin-top:25px;float:right;">
|
<button class="btn btn-primary" id="savePingJia" onclick="addResEvaluation()" type="button">
|
<i class="fa fa-check"></i> 保存
|
</button>
|
<button class="btn btn-warning" id="close" type="button" onclick="colseLayer()">
|
<i class="fa fa-remove"></i> 关闭
|
</button>
|
</div>
|
</div>
|
</div>
|
</body>
|
</html>
|