| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706 |
- <html>
- <head>
- <%-- 先去掉,好像没用到。Lin
- <wdDialog collect="true" close="true"/>
- --%>
- <meta http-equiv="pragma" content="no-cache">
- <meta http-equiv="cache-control" content="no-cache">
- <meta http-equiv="expires" content="0">
- <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
- <meta http-equiv="description" content="This is my page">
- <css.ss file="/ss/jquery-smartMenu/smartMenu.css"/>
- <js.ss file="/ss/jquery-smartMenu/jquery-smartMenu.js"/>
- <%--<script type="text/javascript" src="js/top.js"></script>--%>
- <js.ss file="/ss/growHeight.js"/>
- <!-- 引入查阅pdf的相关文件 -->
- <css.ss file="/ss/pdf/base.min.css"/>
- <css.ss file="/ss/pdf/fancy.min.css"/>
- <js.ss file="/ss/pdf/compatibility.min.js"/>
- <js.ss file="/ss/pdf/pdf2htmlEX.min.js"/>
- <!-- 引入关于锚点的js-->
- <js.ss file="/ss/jquery-anchor/jquery.anchor.1.0.js"/>
- <style>
- .leftTab-dim {
- position: relative;
- top: -11px;
- left: 31px;
- }
- .about_bt {
- min-height: 16px;
- position: relative;
- bottom: 12px;
- }
- #mainDiv .img {
- width: auto !important;
- height: auto !important;
- max-width: 100%!important;
- max-height: 100%!important;
- }
- #mainDiv{
- width: 100% !important;
- overflow: hidden!important;
- }
- .leftTab-selected #qbian{
- display:none !important;
- }
- #ascrail2000{
- display:none!important;
- }
- .item{
- /* height: 52px !important; */
- height: auto !important;
- word-break: break-all;
- }
- #dragIcon{
- background-color: white;
- }
- #topMsg{position: absolute;}
- #bottomMsg{position: absolute;}
- .item_slt{
- text-align: center;
- }
- </style>
- </head>
- <body style="overflow: hidden;">
- <wd:iterate name="${helplist}" id="item">
- <textarea style="display:none;" class="helplist" size="${item.size}" title='<wd:write value="${item.title}"/>' helpHaShCode="${item.helpMd5Code}">
- <wd:write value="${item.content}"/>
- </textarea>
- </wd:iterate>
- <div class="nr-system-div" ssFith="true" style="width: 100%;height:100%;position: relative;display: flex;overflow: hidden;position:fixed;padding:5px;">
- <div id="leftDiv" class="smallScrollbar cms-background" style="min-width: 191px;height: 100%;overflow: auto;display: inline-block;position: relative;z-index: 9;" class="smallScrollbar" ssDragw="{min:186,max:300,right:true}"> <%-- wdDragWidth="min:186px,max:300px,side:right"。Lin --%>
- <!-- <div class='container'> -->
- <div id="container" style="width:100%;min-height: 100%;padding-bottom: 83px;box-sizing: border-box;border-right: 1px solid #6c9ed7;">
- <!-- <div class="show-way">
- <span class="list-way" id="list-way"></span>
- <span class="grid-way" id="grid-way"></span>
- </div> -->
- <div class="dragList column" id="column1">
- </div>
- </div>
- <!-- <div class="slideL-div"><img src="wd/theme/standard/img/leftSlide.png"></div>
- <div class="slideR-div"><img src="wd/theme/standard/img/rightSlide.png"></div> -->
- <!-- <div style="clear: both;"></div> -->
- <!-- </div> -->
- </div>
- <div id='topMsg' style="left: 167px;top: 0px;"></div>
- <div id="mainDiv" unselectable="on" ondragstart="return false;" style="width:100%" style="min-height: 100%;" onselectstart="return false;" class="mainDiv scrollbar " ssDragw=""> <%-- wdDragWidth=""。先保留,搞明白再去掉???Lin --%>
- </div>
- <input type="button" style="position:absolute;right:16px;top:16px;border: none;display:none;" id="fullscreen" class="" title="全屏/还原按钮">
- <div id='bottomMsg' style="left: 167px;top: 0px;"></div>
- </div>
- <div class='bottom-div'>
- <!-- 底部区域 -->
- <!--<input type="button" value="关闭" onclick="wd.display.closeDialog();" class="bottom-button">-->
- </div>
- <%-- <input type="button" value="" name="" id="scale" class="scale"> --%>
- <%--<script type="text/javascript" src='wd/js/contentSys.js'></script>--%>
- </body>
- <script type="text/javascript">
- /* 添加全屏等,如果是内嵌 */
- if ('true' == '${inner}' && window.frameElement) { //内嵌编辑器
- var thisIsFullFrame = window.frameElement.getAttribute("fullframe") == "true";
- var $full = $("#fullscreen");
- var cms_title = '<wd:write value="${cms_title}"/>';
- if (!thisIsFullFrame && cms_title != '' && window.frameElement && !window.frameElement.titleIsShowed) { //鼠标进入时显示title
- var cms_showTitle = function (e) {
- var _frame = window.frameElement;
- var fbound = _frame.getBoundingClientRect();
- var windowWidth = window.top.document.documentElement.getBoundingClientRect().width;
- var xy = recursionIframe();
- var right = (windowWidth - fbound.width - xy.left);
- wd.topWindow.$("#flashmsgtipsId").css({
- "top": (xy.top + 5 - window.top.document.body.scrollTop) + "px",
- "right": (Math.max(right, 10) + 2 ) + "px",
- "bottom": "",
- "left": ""
- });
- var options = {
- onShow: function () {
- wd.topWindow.$("#flashmsgtipsId").find(".flashMsg-down").hide();
- $full.fadeOut();
- },
- onHide: function () {
- wd.topWindow.$("#flashmsgtipsId").find(".flashMsg-down").show();
- $full.fadeIn();
- }
- };
- window.frameElement.titleIsShowed = true;
- wd.display.alert(cms_title, options);
- document.body.removeEventListener("mouseenter", cms_showTitle);
- }
- document.body.addEventListener("mouseenter", cms_showTitle);
- }
- $full.click(function () {
- if (thisIsFullFrame) {
- window.frameElement.srcFrame.contentWindow.location.reload();
- window.frameElement.parentNode.removeChild(window.frameElement);
- } else {
- var fullframe = window.parent.document.createElement("iframe");
- fullframe.width = "100%";
- fullframe.height = "100%";
- fullframe.setAttribute("fullframe", "true");
- fullframe.style.background = "white";
- fullframe.style.position = "absolute";
- fullframe.style.bottom = 0;
- fullframe.style.left = 0;
- fullframe.style.right = 0;
- fullframe.style.top = 0;
- fullframe.style.zIndex = 99999;
- fullframe.src = window.frameElement.src;
- fullframe.srcFrame = window.frameElement;
- window.parent.document.body.appendChild(fullframe);
- }
- })
- .attr("title", thisIsFullFrame ? "还原" : "全屏").addClass(thisIsFullFrame?"icon-restore ":"icon-fullscreen")
- .show();
- }
- /* 添加全屏等,如果是内嵌end */
- var currSubNrid; //当前选中的子内容ID
- var haveButton = false;
- var isnrjson = false;
- var ishelp = false;
- var isabout = false;
- //设置弹出窗口右上角的按钮
- function setWindowButton() {
- //获取当前窗口对应的dhxWin对象
- var w = wd.display.getwdDialogWindows();
- if (!haveButton) {
- //添加下载按钮
- w.button("CMS_download").show();
- w.button("CMS_download").onclick = function() {
- var downloadUrl = "@service{name:'downloadNr'}@" + "&nrid=" + currSubNrid;
- wd.display.downloadFile(downloadUrl);
- //window.open(downloadUrl);
- }
- //添加全屏按钮
- w.button("CMS_fullscreen").show();
- w.button("CMS_fullscreen").onclick = function() {
- //使参数指定的DOM元素全屏,如果不传参数则默认带个页面全屏
- wd.display.CmsFullScreen($('.mainDiv')[0]);
- //alert($('#mainDiv')[0].outerHTML);
- }
- //如果变动状态下出现变动查看按钮
- if (true) {
- <%--
- w.button("change_off").show();
- w.button("change_off").onclick = function () {
- $.ajax({
- type: "GET",
- url: "@service{name:'nr_nrxtsy_all'}@",
- data: {
- nrid: "${nrid}"
- },
- async: false,
- dataType: "json",
- success: function (data) {
- var el = document.getElementById("column1");
- el.innerHTML = "";
- if (data) {
- for (var i = 0; i < data.length; i++) {
- var datachild = data[i].nrchild;
- if (data[i].change != undefined) {
- addItemall(datachild.mswj, datachild.mc, datachild.sltwj, datachild.tbwj, datachild.nrjslbm, data[i].change);
- } else {
- addItemall(datachild.mswj, datachild.mc, datachild.sltwj, datachild.tbwj, datachild.nrjslbm, "");
- }
- }
- $('.mainDiv').attr("isCmsFullScreen", 'false');
- var items = $(".dragList").find(".item");
- if (items != undefined && items.length != 0) {
- var nrid = $(items[0]).find(".nrid").text();
- var nrjslbm = $(items[0]).find(".nrjslbm").text();
- var topMsg = $(this).find(".topMsg").text();
- var bottomMsg = $(this).find(".bottomMsg").text();
- loadPlayer(nrid, nrjslbm, topMsg, bottomMsg);
- selectItem($(items[0])[0]);
- currSubNrid = nrid;//当前选中的子内容ID
- //$(items[0])[0].style.border = "2px solid #FF0000";//点击变红 20170929
- //设置弹出窗口右上角的按钮
- setWindowButton();
- wd.display.CmsNrscroll($('.mainDiv')[0], nrid);
- }
- }
- menu();
- w.button("change_off").hide();
- w.button("change_on").show();
- },
- error: function () {
- //alert('fail');
- }
- });
- }
- --%>
- w.button("change_on").onclick = function() {
- $.ajax({
- type: "GET",
- /* 改。Lin
- url: "@service{name:'nrxtsy'}@",
- */ url: "<serv.ss name='wrCmsList'/>",
- data: {
- nrid: "${nrid}",
- sfbf: "1",
- jlztm: "${jlztm}",
- sqsj: "${sqsj}"
- },
- async: false,
- dataType: "json",
- success: function(data) {
- var el = document.getElementById("column1");
- el.innerHTML = "";
- if (data) {
- for (var i = 0; i < data.length; i++) {
- console.info(data[i]);
- if (data) {
- for (var i = 0; i < data.length; i++) {
- console.info(data[i]);
- if (data[i].nrchild == undefined || data[i].nrchild == "") {
- addItem(data[i].mswj, data[i].mc, data[i].sltwj, data[i].tbwj, data[i].nrjslbm, "", "", "", i);
- } else {
- var datachild = data[i].nrchild;
- addItem(datachild.mswj, datachild.mc, datachild.sltwj, datachild.tbwj, datachild.nrjslbm, data[i].change, "", "", i);
- }
- }
- }
- }
- menu();
- $('.mainDiv').attr("isCmsFullScreen", 'false');
- var items = $(".dragList").find(".item");
- if (items != undefined && items.length != 0) {
- var nrid = $(items[0]).find(".nrid").text();
- var nrjslbm = $(items[0]).find(".nrjslbm").text();
- var topMsg = $(this).find(".topMsg").text();
- var bottomMsg = $(this).find(".bottomMsg").text();
- loadPlayer(nrid, nrjslbm, topMsg, bottomMsg);
- selectItem($(items[0])[0]);
- currSubNrid = nrid; //当前选中的子内容ID
- //$(items[0])[0].style.border = "2px solid #FF0000";//点击变红 20170929
- //设置弹出窗口右上角的按钮
- setWindowButton();
- wd.display.CmsNrscroll($('.mainDiv')[0], nrid);
- }
- w.button("change_on").hide();
- w.button("change_off").show();
- }
- },
- error: function() {
- //alert('fail');
- }
- });
- }
- }
- haveButton = true;
- }
- }
- function save() {
- var nrid = "${nrid}"
- wd.display.getwdDialogOpener().loadNrid(nrid);
- wd.display.closeDialog();
- }
- function loadItem() {
- var nrid_ = "${nrid}";
- var nrjson_ = '${jsonStr}';
- var ishelp_ = '${ishelp}';
- var isabout_ = '${isabout or not empty aboutlist}';
- //var nrjson_ = '[{"whid":"1008610702", "fsryid":"100861110130", "topmsg":"新春快乐", "fcsj":null, "mc":"fj1008620105061","nrid":"T-1008620105061", "nrjslbm":"150", "sltwj":null, "tbwj":null, "bottommsg":"信息中心职员" , "sltlj":"/WEB-INF/app/$@{sessionScope['XMMC']}/data/nr/000100/8620/1050/1008620105061/T/T/thumbnail"}]';
- console.info(nrid_);
- if (nrjson_ == '' && ishelp_ == '' && (isabout_ == ''||isabout_=="false")) {
- $("#mainDiv").css({
- "-moz-user-select": "none",
- "float": "left",
- "width": "730px",
- "height": "100%",
- "display": "flex",
- "justify-content": "center"
- });
- var el = document.getElementById("column1");
- el.innerHTML = "";
- $.ajax({
- type: "GET",
- /* 改。Lin
- url: "@service{name:'nrxtsy'}@",
- */ url: "<serv.ss name='wrCmsList'/>",
- data: {
- nrid: nrid_,
- sfbf: "1",
- jlztm: "${jlztm}",
- sqsj: "${sqsj}"
- },
- async: false,
- dataType: "json",
- success: function(data) {
- if (data) {
- if(data.length==1){
- $("#leftDiv").css("display","none");
- $("#dragIcon").css("display","none");
- }
- for (var i = 0; i < data.length; i++) {
- console.info(data[i]);
- if (data[i].nrchild == undefined || data[i].nrchild == "") {
- addItem(data[i].mswj, data[i].mc, data[i].sltwj, data[i].tbwj, data[i].nrjslbm, "", "", "", i);
- } else {
- var datachild = data[i].nrchild;
- addItem(datachild.mswj, datachild.mc, datachild.sltwj, datachild.tbwj, datachild.nrjslbm, data[i].change, "", "", i);
- }
- }
- }
- },
- error: function() {
- //alert('fail');
- }
- });
- } else if (ishelp_ == '' && nrjson_ != '' && (isabout_ == ''||isabout_=="false")) {
- $("#mainDiv").css({
- "-moz-user-select": "none",
- "float": "left",
- "width": "730px",
- "height": "100%",
- "display": "flex",
- "justify-content": "center"
- });
- isnrjson = true;
- nrjson_ = JSON.parse(nrjson_);
- console.info(nrjson_);
- console.info(nrjson_.length);
- for (var iii = 0; iii < nrjson_.length; iii++) {
- console.info(nrjson_[iii]);
- console.info(nrjson_[iii].nrid);
- $.ajax({
- type: "GET",
- url: "<serv.ss name='regCms'/>", // ='register'。Lin
- data: {
- nrid: nrjson_[iii].nrid
- },
- async: false,
- success: function(data) {},
- error: function() {
- //alert('fail');
- }
- });
- addItem(nrjson_[iii].nrid, nrjson_[iii].mc, nrjson_[iii].sltwj, nrjson_[iii].tbwj, nrjson_[iii].nrjslbm, "", nrjson_[iii].topMsg, nrjson_[iii].bottomMsg, iii);
- }
- } else if (ishelp_ == 'true') {
- //复制代码
- var copybutton=wd.display.getwdDialogWindows().button("wdHelpCopyhexcode");
- copybutton.show();
- copybutton.onclick=function(){
- var v= $(".leftTab-selected .help_id").html();
- jsCopy(v);
- }
- var dialogid = '${dialogid}';
- var helplist = [];
- if ("1" == dialogid) {
- $(".helplist").each(function() {
- helplist.push({
- title: $(this).attr("title"),
- size: $(this).attr("size"),
- helpHaShCode: $(this).attr("helpHaShCode"),
- helpContent: $(this).text()
- });
- })
- } else {
- helplist = wd.edit.findAllHelpData(dialogid);
- }
- for (var iii = 0; iii < helplist.length; iii++) {
- addHelp(helplist[iii].helpHaShCode, helplist[iii].title, helplist[iii].helpContent, iii);
- }
- // $("#mainDiv").css({"moz-user-select":"none","float":"right","display":"block","justify-content":"center","align-items":"center","width":"80%","box-sizing":"border-box","padding":"0px 18px","padding-top":"25px","margin-right":"4px","height":"100%"});
- ishelp = true;
- } else if (ishelp_ == '' && nrjson_ == '' && isabout_ != '') {
- var aboutlist;
- // try{
- aboutlist = eval(${aboutlist});
- // }catch{
- // aboutlist = [];
- // }
- //aboutlist = JSON.parse(aboutlist);
- console.log(aboutlist);
- for (var iii = 0; iii < aboutlist.length; iii++) {
- addAbout(aboutlist[iii].bbh, aboutlist[iii].aboutContent, aboutlist[iii].gxsj, iii);
- }
- isabout = true;
- }
- menu();
- }
- function addAbout(bbh, gxsm, gxsj, index) {
- var el = document.getElementById("column1");
- var gxsj = new Date(gxsj).format("yyyy/MM/dd");
- var co = "<div class=\"item leftTab hLine\"><img style=\"width:22px;height:28px;margin-top:10px;margin-bottom:-2px;\" src=\"${sessionScope.ssUser.skinDir}image/icon/nrjslb-610-large.png\"></img>" +
- "<div class='about_bt' style=\"width:108px;margin-left:10px;height:16px;display:inline-block;line-height:16px;vertical-align:bottom;\" id=\"cms_name_" + bbh + "_" + index + "\">" +
- bbh + "</div><div class='leftTab-dim' >" + gxsj + "</div><span style='display:none;' class='gxsm'>" + gxsm + "</span></div>";
- $(el).append(co);
- wd.display.initGrowHigh("cms_name_" + bbh + "_" + index, '60px', {});
- }
- function addHelp(help_id, help_name, help_html, index) {
- var el = document.getElementById("column1");
- var gethelpUrl = help_html;
- var co;
- var tbwj = "${sessionScope.ssUser.skinDir}image/icon/nrjslb-610-large.png";
- co = "<div class=\"item leftTab hLine\" style=\"display:table;\"><img style=\"width:22px;height:28px;margin-top:13px;margin-bottom:10px;\" src=\"" + tbwj + "\"></img>" +
- // "<div style=\"width:108px;margin-left:10px;height:16px;display:inline-block;line-height:16px;vertical-align:bottom;margin-bottom:10px;\" id=\"cms_name_" + help_id + "_" + index + "\">" +
- "<div style=\"width:108px;margin-left:10px;height:32px;line-height:17px;overflow: hidden;text-overflow: ellipsis;display: inline-block;-webkit-line-clamp: 2;-webkit-box-orient: vertical;\" id=\"cms_name_" + help_id + "_" + index + "\">" +
- help_name + "</div><span style='display:none;' class='help_id'>" + help_id + "</span><xmp id=\"helpcontent" + help_id + "\" style=\"display:none\">" + help_html + "</xmp></div>";
- $(el).append(co);
- wd.display.initGrowHigh("cms_name_" + help_id + "_" + index, '60px', {});
- }
- function addItem(id, name, sltwj, tbwj, nrjslbm, change, topMsg, bottomMsg, index) {
- var el = document.getElementById("column1");
- /* 改。Lin
- var getDataUrl = '@service{name:"getData",param:{path:"wdVal{path}",download:"1"}}@';
- */ var getDataUrl = "<serv.ss name='dlByHttp' parm='{path:"ssVal{path}",download:"1"}'/>";
- var json;
- var co;
- if (sltwj != null) {
- json = JSON.parse('{"path":"' + encodeURI(sltwj) + '"}');
- getDataUrl = wd.display.replaceDynamicParam(getDataUrl, json);
- co = "<div class=\"item leftTab hLine\"><div class=\"item_slt\"><div style=\"border:1px solid #e0e0e0;width:141px;height:79px;border-box:box-sizing;display:flex;justify-content:center;align-items:center;background-color:#fff;margin-bottom:5px;margin-top:15px;\"><img style=\"max-width:100%;max-height:100%;\" src=\"" + getDataUrl + "\"></img></div><div style=\"display:inline-block;max-width:100%;margin:0 auto;height:20px;margin-bottom:5px;\" id=\"cms_name_" + id + "_" + index + "\">" +
- name + "</div><span style='display:none;' class='nrid'>" + id + "</span><span style='display:none;' class='nrjslbm'>" + nrjslbm + "</span><span style='display:none;' class='topMsg'>" + topMsg + "</span><span style='display:none;' class='bottomMsg'>" + bottomMsg + "</span></div><p>" + change + "</p><span id='line'></span><div id=\"qbian\" class=\"qbian\" style=\"width: 1.5px;margin-top: -42px;position: absolute;background-color: #FFF;right:0px;display:none;\"></div></div>";
- } else {
- if (tbwj == "") {
- tbwj = wd.common.loadSkinFile("image/icon/nrjslb-" + nrjslbm + "-large.png");
- getDataUrl = tbwj;
- } else {
- json = JSON.parse('{"path":"' + encodeURI(tbwj) + '"}');
- getDataUrl = wd.display.replaceDynamicParam(getDataUrl, json);
- }
- // co = "<div class=\"item leftTab hLine\" style=\"display:table;\"><img style=\"width:22px;height:28px;margin-top:13px;margin-bottom:10px;\" src=\"" + getDataUrl + "\"></img><div style=\"width:108px;margin-left:10px;height:16px;display:inline-block;line-height:16px;vertical-align:bottom;margin-bottom:10px;\" id=\"cms_name_" + id + "_" + index + "\">" +
- co = "<div class=\"item leftTab hLine\"><img style=\"width:22px;height:28px;margin-top:13px;margin-bottom:10px;float:left;\" src=\"" + getDataUrl + "\"></img><div style=\"width:87px;margin-left:20px;margin-top:10px;height:32px;line-height:17px;overflow: hidden;text-overflow: ellipsis;display:inline-block;-webkit-line-clamp: 2;-webkit-box-orient: vertical;\" id=\"cms_name_" + id + "_" + index + "\">" +
- name + "</div><span style='display:none;' class='nrid'>" + id + "</span><span style='display:none;' class='nrjslbm'>" + nrjslbm + "</span><span style='display:none;' class='topMsg'>" + topMsg + "</span><span style='display:none;' class='bottomMsg'>" + bottomMsg + "</span><p>" + change + "</p><span id='line'></span><div id=\"qbian\" class=\"qbian\" style=\"width: 1.5px;margin-top: -42px;position: absolute;background-color: #FFF;right:0px;display:none;\"></div></div>";
- }
- $(el).append(co);
- wd.display.initGrowHigh("cms_name_" + id + "_" + index, '60px', {});
- }
- function addItemall(id, name, sltwj, tbwj, nrjslbm, change) {
- var el = document.getElementById("column1");
- /* 改。Lin
- var getDataUrl = '@service{name:"getData",param:{path:"wdVal{path}",download:"1"}}@';
- */ var getDataUrl = "<serv.ss name='dlByHttp' parm='{path:"ssVal{path}",download:"1"}'/>";
- var json;
- var co;
- if (sltwj != null) {
- json = JSON.parse('{"path":"' + encodeURI(sltwj) + '"}');
- getDataUrl = wd.display.replaceDynamicParam(getDataUrl, json);
- co = "<div class=\"item\"><div class=\"item_slt\"><img src=\"" + getDataUrl + "\"></img><p>" + name + "</p><span style='display:none;' class='nrid'>" + id + "</span><span style='display:none;' class='nrjslbm'>" + nrjslbm + "</span><span id='line'></span></div><table>";
- for (var i = 0; i < change.length; i++) {
- var sqsjdata = change[i].sqsj.split(" ");
- co += "<tr><td>" + sqsjdata[0] + "</td>";
- if (change[i].lbm == "1") {
- co += "<td>创建</td>";
- } else if (change[i].lbm == "51") {
- co += "<td>停用</td>";
- } else if (change[i].lbm == "55") {
- co += "<td>启用</td>";
- }
- if (change[i].lcztm == "1") {
- co += "<td>审核中</td>";
- } else if (change[i].lcztm == "51") {
- co += "<td>同意</td>";
- } else if (change[i].lcztm == "55") {
- co += "<td>退回</td>";
- }
- co += "</tr>";
- }
- co += "</table></div>";
- } else {
- if (tbwj == "") {
- tbwj = wd.common.loadSkinFile("image/icon/nrjslb-" + nrjslbm + "-large.png");
- getDataUrl = tbwj;
- } else {
- json = JSON.parse('{"path":"' + encodeURI(tbwj) + '"}');
- getDataUrl = wd.display.replaceDynamicParam(getDataUrl, json);
- }
- co = "<div class=\"item\"><div class=\"item_tb\"><img src=\"" + getDataUrl + "\"></img><p>" + name + "</p><span style='display:none;' class='nrid'>" + id + "</span><span style='display:none;' class='nrjslbm'>" + nrjslbm + "</span><span id='line'></span></div><table>";
- for (var i = 0; i < change.length; i++) {
- var sqsjdata = change[i].sqsj.split(" ");
- co += "<tr><td>" + sqsjdata[0] + "</td>";
- if (change[i].lbm == "1") {
- co += "<td>创建</td>";
- } else if (change[i].lbm == "51") {
- co += "<td>停用</td>";
- } else if (change[i].lbm == "55") {
- co += "<td>启用</td>";
- }
- if (change[i].lcztm == "1") {
- co += "<td>审核中</td>";
- } else if (change[i].lcztm == "51") {
- co += "<td>同意</td>";
- } else if (change[i].lcztm == "55") {
- co += "<td>退回</td>";
- }
- co += "</tr>";
- }
- co += "</table></div>";
- }
- $(el).append(co);
- }
- //加载播放器
- function loadPlayer(nrid, nrjslbm, topMsg, bottomMsg) {
- if (isnrjson == true) {
- $("#topMsg").show();
- $("#bottomMsg").show();
- $("#topMsg").html(topMsg);
- $("#bottomMsg").html(bottomMsg);
- } else {
- $("#topMsg").hide();
- $("#bottomMsg").hide();
- }
- //
- var mainNrin = $(".mainDiv").attr("nrid");
- console.log("mainNrin:" + mainNrin);
- if (mainNrin == nrid) {
- console.log("相同内容 不重复加载");
- return;
- }
- //
- $.ajax({
- type: "GET",
- /* 改。Lin
- url: "@service{name:'loadNrDesignAndPlayerData'}@",
- */ url: "<serv.ss name='wrCmsPlay'/>",
- data: {
- "nrid": nrid,
- "nrjslbm": nrjslbm
- },
- async: true,
- dataType: "json",
- success: function(data) {
- /// 增加,增加错误处理 -- 统一 Ajax 返回标准 -- .ssCode、.ssMsg、.ssData。Lin
- if (data.ssCode != 0) {
- alert(data.ssMsg);
- return;
- }
- ///
- var div = document.createElement("div");
- var obj = {};
- obj.design = data.design;
- obj.resDesign = data.resDesign;
- div.setAttribute("data-init", JSON.stringify(obj));
- var tempData = data.data.replace(new RegExp('@dataFolder@', 'gm'), data.dataFolderPath);
- div.innerHTML = tempData;
- if(nrjslbm=="150"){
- $(div).find(".container").css("display","none");
- }
- $("#mainDiv").html($(div));
- $(".mainDiv").attr("nrid", nrid);
- }
- });
- wd.display.CmsNrscroll($('.mainDiv')[0], nrid);
- }
- function loadAbout(gxsm) {
- // $("#mainDiv").html($("#helpcontent" + help_id).html());
- $("#mainDiv").html("<div>" + gxsm + "</div>");
- }
- function loadHelpXML(help_id) {
- $("#mainDiv").html($("#helpcontent" + help_id).html());
- // $("#mainDiv").html("<iframe src=\"" + help_src + "\" style=\"width: 100%; height: 100%; overflow-y: hidden; outline: none;\"/>");
- }
- //为元素添加className:selected
- function selectItem(element) {
- $('.item').removeClass('leftTab-selected').addClass('hLine');
- $(element).addClass("leftTab-selected").removeClass('hLine');
- }
- function menu() {
- //显示事件
- var showDetail = function() {
- if (ishelp == true) {
- var help_src = $(this).find(".help_id").text();
- selectItem(this);
- loadHelpXML(help_src);
- } else if (isabout == true) {
- var gxsm = $(this).find(".gxsm").html();
- loadAbout(gxsm);
- selectItem(this);
- } else {
- var nrid = $(this).find(".nrid").text();
- var nrjslbm = $(this).find(".nrjslbm").text(); //新增
- var topMsg = $(this).find(".topMsg").text();
- var bottomMsg = $(this).find(".bottomMsg").text();
- // $(".dragList").find(".item").each(function () {
- // $(this)[0].style.border = "solid 1px #CCCCCC";//全部边框变黑 20170929
- // });
- // this.style.border = "2px solid #FF0000";//点击变红 20170929
- selectItem(this);
- console.info("nrid:" + nrid + " nrjslbm:" + nrjslbm);
- currSubNrid = nrid; //当前选中的子内容ID
- loadPlayer(nrid, nrjslbm, topMsg, bottomMsg);
- //设置弹出窗口右上角的按钮
- setWindowButton();
- }
- }
- //添加点击是事件
- $('.item').on('click', showDetail);
- $('.item').click(function () {
- // var h = $(this).height();
- // $('#qbian').css('height',h);
- $(".leftTab-selected").find(".qbian").show();
- $(".leftTab-selected").siblings().find(".qbian").hide();
- });
- }
- loadItem();
- (function() {
- $('.mainDiv').attr("isCmsFullScreen", 'false');
- var items = $(".dragList").find(".item");
- if (items != undefined && items.length != 0) {
- if (ishelp == true) {
- var help_id = $(items[0]).find(".help_id").text();
- loadHelpXML(help_id);
- selectItem($(items[0])[0]);
- } else if (isabout == true) {
- var gxsm = $(items[0]).find(".gxsm").html();
- loadAbout(gxsm);
- selectItem($(items[0])[0]);
- } else {
- var nrid = $(items[0]).find(".nrid").text();
- var nrjslbm = $(items[0]).find(".nrjslbm").text();
- var topMsg = $(items[0]).find(".topMsg").text();
- var bottomMsg = $(items[0]).find(".bottomMsg").text();
- loadPlayer(nrid, nrjslbm, topMsg, bottomMsg);
- selectItem($(items[0])[0]);
- currSubNrid = nrid; //当前选中的子内容ID
- //$(items[0])[0].style.border = "2px solid #FF0000";//点击变红 20170929
- //设置弹出窗口右上角的按钮
- setWindowButton();
- wd.display.CmsNrscroll($('.mainDiv')[0], nrid);
- }
- }
- })();
- </script>
- </html>
|