123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017 |
- <!DOCTYPE HTML>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="renderer" content="webkit|ie-comp|ie-stand">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
- <meta http-equiv="Cache-Control" content="no-siteapp" />
- <!--[if lt IE 9]>
- <script type="text/javascript" src="${ctx}/assets/lib/html5.js"></script>
- <script type="text/javascript" src="${ctx}/assets/lib/respond.min.js"></script>
- <script type="text/javascript" src="${ctx}/assets/lib/PIE_IE678.js"></script>
- <![endif]-->
- <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui/css/H-ui.min.css" />
- <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/css/H-ui.admin.css" />
- <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/Hui-iconfont/1.0.7/iconfont.css" />
- <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/icheck/icheck.css" />
- <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/skin/default/skin.css" id="skin" />
- <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/css/style.css" />
- <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/zTree/v3/css/zTreeStyle/zTreeStyle.css" >
- <script type="text/javascript" src="${ctx}/assets/lib/My97DatePicker/WdatePicker.js"></script>
- <script type="text/ecmascript" src="${ctx}/assets/lib/jquery/1.9.1/jquery.js"></script>
- <script type="text/javascript" src="${ctx}/assets/lib/layer/3.0.3/layer.js"></script>
- <script type="text/javascript" src="${ctx}/assets/static/h-ui/js/H-ui.js"></script>
- <link rel="stylesheet" type="text/css" media="screen" href="${ctx}/assets/lib/jqueryui/jquery-ui.css" />
- <link rel="stylesheet" type="text/css" media="screen" href="${ctx}/assets/lib/jqgrid/css/ui.jqgrid.css" />
- <script type="text/ecmascript" src="${ctx}/assets/lib/jqueryui/jquery-ui.js"></script>
- <script type="text/ecmascript" src="${ctx}/assets/lib/jqgrid/js/i18n/grid.locale-cn.js"></script>
- <script type="text/ecmascript" src="${ctx}/assets/lib/jqgrid/js/jquery.jqGrid.min.js"></script>
- <script type="text/javascript" src="${ctx}/assets/js/base.js"></script>
- <script type="text/javascript" src="${ctx}/assets/lib/zTree/v3/js/jquery.ztree.all-3.5.min.js"></script>
- <!--[if IE 6]>
- <script type="text/javascript" src="${ctx}/assets/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
- <script>DD_belatedPNG.fix('*');</script>
- <![endif]-->
- <script type="text/javascript">
- function showFlowPic(executionId){
- layer.open({
- title:"查看流转",
- type: 1,
- anim: 2,
- area: ['600px', '400px'],
- content: "<div style='margin:5px;'><img style='width:100%' src='${ctx}/myconsole/myflow/show?executionId="+executionId+"'></div>"
- });
- }
- function readperm(infoID){
- layer.open({
- type: 2,
- title: '阅读权限',
- shadeClose: true,
- shade: 0.8,
- area: ['570px', '460px'],
- content: '${ctx}/myconsole/readperm?resourceID='+infoID+'&resourceType=info'
- });
- }
- $(function() {
- $(window).resize(function(){
- $("#jqGrid").setGridWidth($(window).width()-41);
- });
- $("#jqGrid").jqGrid({
- url : '${ctx}/myconsole/webinfo/getByPage',
- editurl:"${ctx}/myconsole/webinfo/saveOrUpdate",
- mtype : "POST",
- datatype : "json",
- postData : {'columnID':'${column.columnid!}','siteID':'${currentSite.SiteID!}','TState':$('#TState').val()},
- multiselect: true,
- caption1:'信息管理',
- prmNames : { //定义表单的主键 // Default valuesprmNames: {page:“page”,rows:“rows”, sort: “sidx”,order: “sord”, search:“_search”, nd:“nd”, npage:null} 当参数为null时不会被发到服务器端
- id: "keyid",
- oper:"oper",
- addoper:"add",
- editoper:"edit",
- deloper:"del"
-
- },
- colModel : [ {
- label : '数据编号',
- name : 'keyid',
- key : true,
- editable: false,
- hidden:true
- },{
- label : '标题',
- name : 'fulltitle',
- width : 200,
- formatter: function (cellvalue, options, rowdata) {
- var html = "<a href='${ctx}/myconsole/complaint/repository/browseDetil?strContentId="+rowdata.contentid+"' title='"+cellvalue+"' ><span style='color:"+rowdata.listtitlecolor+";font-weight:"+rowdata.listtitlewidth+";'>"+cellvalue+"</span></a>";
- if(!rowdata.verifyhashkey){
- html = html+"<span style='color:red'>【数据被篡改】</span>";
- }
- return html;
- }
- }, {
- label : '栏目',
- name : 'columnname',
- width : 50
- }, {
- label : '信息序号',
- hidden : true,
- name : 'infoserial',
- width : 50
- },{
- label : '创建人',
- name : 'username',
- width : 30
- }, {
- label : '创建时间',
- name : 'recordtime',
- width : 50
- }, {
- label : '发布时间',
- name : 'releasetime',
- width : 50
- }, {
- label : '状态',
- name : 'tstate',
- width : 30,
- align:"center",
- formatter:'select',
- edittype:"select",
- editoptions: {
- value:"draft:草稿箱;withdraw:撤稿箱;finished:成品箱;waitrelease:待发箱;flow:流转箱;rejection:退稿箱;compound:合成箱"
- },
- sortable:false
- },{
- label : '操作',
- name:'operMod',
- index:'operMod',
- align:"center",
- width:"50",
- sortable:false,
- formatter: function (cellvalue, options, rowdata) {
- var html ="";
- if(rowdata.tstate=='draft'||rowdata.tstate=='withdraw') {
- <#if selfbuttonflag.delete>
-
- html = "<button class='btn btn-success radius size-S' onclick=webinfo_init('修改信息','"+rowdata.keyid+"','update')>修改</button>";
- </#if>
- /* <#if selfbuttonflag.update>
- html =html+"<button class='btn btn-danger radius size-S ml-5' onclick=deleteData('"+rowdata.keyid+"')>删除</button>";
- </#if> */
- }else if(rowdata.tstate=='flow'){
- html=html+ "<button class='btn btn-success radius size-S' onclick=showFlowPic('"+rowdata.workflowinstance+"')>查看流转</button>"
- }else if(rowdata.tstate=='finished'){
- <#if selfbuttonflag.update>
- html = "<button class='btn btn-success radius size-S' onclick=webinfo_init('修改信息','"+rowdata.keyid+"','update')>修改</button>";
- </#if>
- }
- <#if readPerm>
- html = html+" <button class='btn btn-success radius size-S' onclick=readperm('"+rowdata.keyid+"')>阅读权限</button>";
- </#if>
- /* html = html+" <a href='"+rowdata.weburl+"' target='_blank'><button class='btn btn-success radius size-S'>预览外网</button></a>"; */
- return html;
- }
- }],
- rownumbers : true,//添加左侧行号
- viewrecords : true,//是否在浏览导航栏显示记录总数
- rowNum : 10,//每页显示记录数
- rowList : [10,15,20,30,40,50 ],//用于改变显示行数的下拉列表框的元素数组。
- autowidth : true,
- height : 'auto',
- pager : "#jqGridPager",
- //屏蔽点击任意单元格选中checkbox的问题
- beforeSelectRow: function (rowid, e) {
- var $myGrid = $(this),
- i = $.jgrid.getCellIndex($(e.target).closest('td')[0]),
- cm = $myGrid.jqGrid('getGridParam', 'colModel');
- return (cm[i].name === 'cb');
- }
- });
- //拖动排序
- $('#jqGrid').jqGrid('sortableRows', {
- update:function(ev, ui){
- var item = ui.item[0], ri = item.rowIndex, itemId = item.id;
- var array = $('#jqGrid').jqGrid('getDataIDs');
- var options = 'next';//标识参照ID 是取得当前元素的后一个
- if(ri == array.length){//说明在列表最末尾,拿他当前一行数据作为参照物
- ri -=2;
- options = 'pre';//标识参照ID 是取得当前元素的前一个
- }
-
- $.post("${ctx}/myconsole/webinfo/sort/", {
- KeyID: itemId,
- ReferKeyID: array[ri],
- OptionType: options
- });
- }
- });
- //切换资源状态时,动态刷新数据;同时判断发布和撤稿按钮是否可用
- $('#TState').change(reload);
-
-
- $('#ButtonInsert').show();
- $('#ButtonRelease').show();
- $('#ButtonTimeRelease').show();
- $('#ButtonWithdraw').show();
- $('#ButtonSetTop').show();
- $('#ButtonCancelTop').show();
- $('#ButtonBatchCopy').show();
- $('#ButtonBatchMove').show();
- $('#ButtonBatchQuote').show();
- $('#ButtonDelete').show();
- $('#ButtonSelect').show();
-
- });
- //选择数据状态下拉列表重新取数据
- function reload()
- {
- var strTState = $('#TState').val();
- if(strTState == '')
- {
- $('#ButtonInsert').show();
- $('#ButtonRelease').show();
- $('#ButtonTimeRelease').show();
- $('#ButtonWithdraw').show();
- $('#ButtonSetTop').show();
- $('#ButtonCancelTop').show();
- $('#ButtonBatchCopy').show();
- $('#ButtonBatchMove').hide();
- $('#ButtonBatchQuote').show();
- $('#ButtonDelete').show();
- $('#ButtonSelect').show();
- }
- if(strTState == 'finished')
- {
- $('#ButtonInsert').show();
- $('#ButtonRelease').hide();
- $('#ButtonTimeRelease').hide();
- $('#ButtonWithdraw').show();
- $('#ButtonSetTop').show();
- $('#ButtonCancelTop').show();
- $('#ButtonBatchCopy').show();
- $('#ButtonBatchMove').hide();
- $('#ButtonBatchQuote').show();
- $('#ButtonDelete').hide();
- $('#ButtonSelect').show();
- }
- if(strTState == 'draft')
- {
- $('#ButtonInsert').show();
- $('#ButtonRelease').show();
- $('#ButtonTimeRelease').show();
- $('#ButtonWithdraw').hide();
- $('#ButtonSetTop').hide();
- $('#ButtonCancelTop').hide();
- $('#ButtonBatchCopy').show();
- $('#ButtonBatchMove').show();
- $('#ButtonBatchQuote').hide();
- $('#ButtonDelete').show();
- $('#ButtonSelect').show();
- }
- if(strTState == 'waitrelease')
- {
- $('#ButtonInsert').show();
- $('#ButtonRelease').show();
- $('#ButtonTimeRelease').show();
- $('#ButtonWithdraw').show();
- $('#ButtonSetTop').show();
- $('#ButtonCancelTop').show();
- $('#ButtonBatchCopy').show();
- $('#ButtonBatchMove').hide();
- $('#ButtonBatchQuote').hide();
- $('#ButtonDelete').show();
- $('#ButtonSelect').show();
- }
- if(strTState == 'withdraw')
- {
- $('#ButtonInsert').show();
- $('#ButtonRelease').show();
- $('#ButtonTimeRelease').show();
- $('#ButtonWithdraw').hide();
- $('#ButtonSetTop').hide();
- $('#ButtonCancelTop').hide();
- $('#ButtonBatchCopy').hide();
- $('#ButtonBatchMove').hide();
- $('#ButtonBatchQuote').hide();
- $('#ButtonDelete').show();
- $('#ButtonSelect').show();
- }
- if(strTState == 'flow')
- {
- $('#ButtonInsert').show();
- $('#ButtonRelease').hide();
- $('#ButtonTimeRelease').hide();
- $('#ButtonWithdraw').hide();
- $('#ButtonSetTop').hide();
- $('#ButtonCancelTop').hide();
- $('#ButtonBatchCopy').hide();
- $('#ButtonBatchMove').hide();
- $('#ButtonBatchQuote').hide();
- $('#ButtonDelete').hide();
- $('#ButtonSelect').show();
- }
- if(strTState == 'rejection')
- {
- $('#ButtonInsert').show();
- $('#ButtonRelease').hide();
- $('#ButtonTimeRelease').hide();
- $('#ButtonWithdraw').hide();
- $('#ButtonSetTop').hide();
- $('#ButtonCancelTop').hide();
- $('#ButtonBatchCopy').hide();
- $('#ButtonBatchMove').hide();
- $('#ButtonBatchQuote').hide();
- $('#ButtonDelete').show();
- $('#ButtonSelect').show();
- }
- $("#jqGrid").jqGrid('setGridParam', {
- datatype : "json",
- postData : {'columnID' : '${column.columnid!}','TState':$('#TState').val()}
- }).trigger('reloadGrid');
- }
- //新建或者修改信息页面调用函数
- function webinfo_init(title,keyid,strOper){
- var columnID = '${column.columnid!}',
- name = '${column.columnname!}',
- columnName = escape(name).replace(/%/g,"\\").toLowerCase();
- //alert('传递的主键'+id);
- fullOpen("${ctx}/myconsole/webinfo/initWebInfo?columnID="+columnID+"&keyid="+keyid+"&Oper="+strOper);
- }
- //把文章设置到待发布箱中韩林平 2016-12-20
- function timeRelease()
- {
- var data = jQuery('#jqGrid').jqGrid('getGridParam','selarrrow');
- if(data.length <=0){
- layer.msg('请选择要操作的数据',{icon: 5,time:1500});
- return false;
- }
- else
- {
- var doFlag=true;
- $(data).each(function (index, id){
- var row = $("#jqGrid").jqGrid('getRowData', id);
- if(row.tstate != 'draft' )
- {
- doFlag=false;
- }
-
- })
-
- if(!doFlag){
- layer.msg('只有草稿箱中的数据才能设置到待发箱进行定时发布操作!',{icon: 5,time:1500});
- return false;
- }
-
- }
-
- $.getJSON("${ctx}/myconsole/webinfo/timeRelease", {
- keyids : data+""
- }, function(json){
- if(json.status == 'y'){
- layer.alert(json.message, {
- skin: 'layui-layer-molv' //样式类名
- ,closeBtn: 0
- }, function(){reload();layer.closeAll('dialog');});
- }else{
- layer.alert(json.message, {
- skin: 'layui-layer-molv' //样式类名
- ,closeBtn: 0
- }, function(){layer.closeAll('dialog');});
- }
- });
- }
- //文章撤稿 韩林平 2016-11-29
- function setWithdraw()
- {
- var data = jQuery('#jqGrid').jqGrid('getGridParam','selarrrow');
- if(data.length <=0){
- layer.msg('请选择要操作的数据',{icon: 5,time:1500});
- return false;
- }
- else
- {
- var doFlag=true;
- $(data).each(function (index, id){
- var row = $("#jqGrid").jqGrid('getRowData', id);
- if(row.tstate != 'finished' )
- {
- doFlag=false;
- }
-
- })
-
- if(!doFlag){
- layer.msg('只有成品箱中的数据才能进行撤稿操作!',{icon: 5,time:1500});
- return false;
- }
-
- }
-
- $.getJSON("${ctx}/myconsole/webinfo/setWithdraw", {
- keyids : data+""
- }, function(json){
- if(json.status == 'y'){
- layer.alert(json.message, {
- skin: 'layui-layer-molv' //样式类名
- ,closeBtn: 0
- }, function(){reload();layer.closeAll('dialog');});
- }else{
- layer.alert(json.message, {
- skin: 'layui-layer-molv' //样式类名
- ,closeBtn: 0
- }, function(){layer.closeAll('dialog');});
- }
- });
- }
- //批量发布文章 韩林平 2016-11-29
- function batchRelease()
- {
- var data = jQuery('#jqGrid').jqGrid('getGridParam','selarrrow');
- if(data.length <=0){
- layer.msg('请选择要操作的数据',{icon: 5,time:1500});
- return false;
- }
- else
- {
- var doFlag=true;
- $(data).each(function (index, id){
- var row = $("#jqGrid").jqGrid('getRowData', id);
- if(row.tstate != 'draft' && row.tstate != 'withdraw' && row.tstate != 'waitrelease' )
- {
- doFlag=false;
- }
-
- })
-
- if(!doFlag){
- layer.msg('只有草稿箱,撤稿箱和待发布箱中的数据才能进行发布操作',{icon: 5,time:1500});
- return false;
- }
-
- }
-
- $.getJSON("${ctx}/myconsole/webinfo/batchRelease", {
- keyids : data+""
- }, function(json){
- if(json.status == 'y'){
- layer.alert(json.message, {
- skin: 'layui-layer-molv' //样式类名
- ,closeBtn: 0
- }, function(){reload();layer.closeAll('dialog');});
- }else{
- layer.alert(json.message, {
- skin: 'layui-layer-molv' //样式类名
- ,closeBtn: 0
- }, function(){layer.closeAll('dialog');});
- }
- });
- }
- //批量删除文章 韩林平2016-11-30
- function batchDelete(){
- var data = jQuery('#jqGrid').jqGrid('getGridParam','selarrrow');
- if(data.length <=0){
- layer.msg('请选择要操作的数据',{icon: 5,time:1500});
- return false;
- }
- else
- {
- var doFlag=true;
- $(data).each(function (index, id){
- var row = $("#jqGrid").jqGrid('getRowData', id);
- if(row.tstate != 'draft' && row.tstate != 'withdraw' && row.tstate != 'rejection' )
- {
- doFlag=false;
- }
-
- })
-
- if(!doFlag){
- layer.msg('只有草稿箱,撤稿箱和退稿箱中的数据才能进行删除操作',{icon: 5,time:1500});
- return false;
- }
-
- }
-
- $.getJSON("${ctx}/myconsole/webinfo/batchDelete", {
- keyids : data+""
- }, function(json){
- if(json.status == 'y'){
- layer.alert(json.message, {
- skin: 'layui-layer-molv' //样式类名
- ,closeBtn: 0
- }, function(){reload();layer.closeAll('dialog');});
- }else{
- layer.alert(json.message, {
- skin: 'layui-layer-molv' //样式类名
- ,closeBtn: 0
- }, function(){layer.closeAll('dialog');});
- }
- });
-
-
- }
- //删除单条数据处理 韩林平2016-11-28
- function deleteData(strKeyID){
- $.getJSON("${ctx}/myconsole/webinfo/deleteData", {
- keyid : strKeyID
- }, function(json){
- if(json.status == 'y'){
- //处理成功返回消息;
- layer.alert(json.message, {
- skin: 'layui-layer-molv' //样式类名
- ,closeBtn: 0
- }, function(){reload();layer.closeAll('dialog');});
-
- }else{
- //处理失败返回消息;
- layer.alert(json.message, {
- skin: 'layui-layer-molv' //样式类名
- ,closeBtn: 0
- }, function(){reload();layer.closeAll('dialog');});
- }
- });
- }
- //置顶数据处理,韩林平2016-11-29
- function setTop()
- {
- var strColumnID = '${column.columnid!}';
- var data = $('#jqGrid').jqGrid('getGridParam','selarrrow');
- if(data.length <=0){
- layer.msg('请选择要操作的数据!',{icon: 5,time:1500});
- return false;
- }
- else
- {
- if(data.length >1){
- layer.msg('只能选择一条数据进行置顶!',{icon: 5,time:1500});
- return false;
- }
- }
-
- $.getJSON("${ctx}/myconsole/webinfo/setTop", {
- keyid : data+"",
- columnid : strColumnID
- }, function(json){
- if(json.status == 'y'){
- layer.alert(json.message, {
- skin: 'layui-layer-molv' //样式类名
- ,closeBtn: 0
- }, function(){reload();layer.closeAll('dialog');});
- }else{
- layer.alert(json.message, {
- skin: 'layui-layer-molv' //样式类名
- ,closeBtn: 0
- }, function(){layer.closeAll('dialog');});
- }
- });
- }
- //取消置顶数据处理,韩林平2016-11-29
- function cancelTop(){
- var data = $('#jqGrid').jqGrid('getGridParam','selarrrow');
- if(data.length <=0){
- layer.msg('请选择要操作的数据',{icon: 5,time:1500});
- return false;
- }
- $.getJSON("${ctx}/myconsole/webinfo/cancelTop", {
- keyids : data+""
- }, function(json){
- if(json.status == 'y'){
- layer.alert(json.message, {
- skin: 'layui-layer-molv' //样式类名
- ,closeBtn: 0
- }, function(){reload();layer.closeAll('dialog');});
- }else{
- layer.alert(json.message, {
- skin: 'layui-layer-molv' //样式类名
- ,closeBtn: 0
- }, function(){layer.closeAll('dialog');});
- }
- });
- }
- //批量复制文章
- function batchCopy()
- {
- var data = jQuery('#jqGrid').jqGrid('getGridParam','selarrrow');
- if(data.length <=0){
- layer.msg('请选择要操作的数据',{icon: 5,time:1500});
- return false;
- }
- var setting = {
- check: {
- enable: true,
- chkStyle: "checkbox",
- chkboxType: {'Y':'','N':''},
- radioType: "all"
- },
- view: {
- dblClickExpand: true,
- showLine: false,
- selectedMulti: true
- },
- async: {
- enable: true,
- url: '${ctx}/myconsole/column/getColumnBySiteAndType/',
- dataFilter:function(treeId, parentNode, childNodes){
- if (childNodes)
- {
- for(var i =0; i < childNodes.length; i++)
- {
- if(childNodes[i].columnid == '${column.columnid!}')
- {
- childNodes[i].chkDisabled = childNodes[i].chkdisabled;
- }
- }
- }
- return childNodes;
- }
-
- },
- data: {
- simpleData: {
- enable: true,
- idKey: "columnid",
- pIdKey: "parentid",
- rootPId: ""
- }
- },
- callback: {
- onClick: function (event, treeId, treeNode) {
- var zTree = $.fn.zTree.getZTreeObj("columnTree");
- zTree.expandNode(treeNode);
- }
- }
- };
- parent.layer.open({
- type: 1,
- title: '目标栏目选择',
- btn: ['确定','取消'],
- yes:function(index, layero){
- var treeObj = $.fn.zTree.getZTreeObj("columnTree");
- var nodes = treeObj.getCheckedNodes(true);
- if(nodes.length <= 0){
- parent.layer.msg('请选择目标栏目',{icon: 5,time:1500});
- return;
- }
- var columnIDs = "";
- $.each(nodes,function(i,n){
- columnIDs += n.columnid+",";
- });
- columnIDs = columnIDs.substring(0,columnIDs.length-1);
- $.post("${ctx}/myconsole/webinfo/batchCopy",{
- keyid:data+"",
- columnid:columnIDs
- },function(json){
- if(json.status == 'y'){
- layer.alert(json.message, {
- skin: 'layui-layer-molv' //样式类名
- ,closeBtn: 0
- }, function(){reload();layer.closeAll('dialog');});
- }else{
- layer.alert(json.message, {
- skin: 'layui-layer-molv' //样式类名
- ,closeBtn: 0
- }, function(){layer.closeAll('dialog');});
- }
- });
- parent.layer.close(index);
- },
- // skin: 'layui-layer-rim', //加上边框
- area: ['350px', '480px'], //宽高
- content: "<ul id='columnTree' class='ztree'></ul>",
- success:function(layero, index){
- $.fn.zTree.init($(layero).find("#columnTree"), setting);
- }
- });
-
-
- }//批量复制文章结束
- //批量移动文章
- function batchMove()
- {
- var data = jQuery('#jqGrid').jqGrid('getGridParam','selarrrow');
- if(data.length <=0){
- layer.msg('请选择要操作的数据',{icon: 5,time:1500});
- return false;
- }
- var setting = {
- check: {
- enable: true,
- chkStyle: "radio",
- chkboxType: {'Y':'','N':''},
- radioType: "all"
- },
- view: {
- dblClickExpand: false,
- showLine: false,
- selectedMulti: false
- },
- async: {
- enable: true,
- url: '${ctx}/myconsole/column/getColumnBySiteAndType/',
- dataFilter:function(treeId, parentNode, childNodes){
- if (childNodes)
- {
- for(var i =0; i < childNodes.length; i++)
- {
- if(childNodes[i].columnid == '${column.columnid!}')
- {
- childNodes[i].chkDisabled = childNodes[i].chkdisabled;
- }
- }
- }
- return childNodes;
- }
- },
- data: {
- simpleData: {
- enable: true,
- idKey: "columnid",
- pIdKey: "parentid",
- rootPId: 0
- }
- },
- callback: {
- onClick: function (event, treeId, treeNode) {
- var zTree = $.fn.zTree.getZTreeObj("columnTree");
- zTree.expandNode(treeNode);
-
- }
- }
- };
- parent.layer.open({
- type: 1,
- title: '目标栏目选择',
- btn: ['确定','取消'],
- yes:function(index, layero){
- var treeObj = $.fn.zTree.getZTreeObj("columnTree");
- var nodes = treeObj.getCheckedNodes(true);
- if(nodes.length <= 0){
- parent.layer.msg('请选择目标栏目',{icon: 5,time:1500});
- return;
- }
- //myconsole.log("选择的栏目nodes:"+nodes);
- var columnIDs = "";
- $.each(nodes,function(i,n){
- columnIDs += n.columnid+",";
- });
- columnIDs = columnIDs.substring(0,columnIDs.length-1);
-
- $.post("${ctx}/myconsole/webinfo/batchMove",{
- keyid:data+"",
- columnid:columnIDs
- },function(json){
- if(json.status == 'y'){
- layer.alert(json.message, {
- skin: 'layui-layer-molv' //样式类名
- ,closeBtn: 0
- }, function(){reload();layer.closeAll('dialog');});
- }else{
- layer.alert(json.message, {
- skin: 'layui-layer-molv' //样式类名
- ,closeBtn: 0
- }, function(){layer.closeAll('dialog');});
- }
- });
- parent.layer.close(index);
- },
- // skin: 'layui-layer-rim', //加上边框
- area: ['350px', '480px'], //宽高
- content: "<ul id='columnTree' class='ztree'></ul>",
- success:function(layero, index){
- $.fn.zTree.init($(layero).find("#columnTree"), setting);
- }
- });
-
- }//批量移动文章结束
- //批量引用文章
- function batchQuote()
- {
- var data = jQuery('#jqGrid').jqGrid('getGridParam','selarrrow');
- if(data.length <=0){
- layer.msg('请选择要操作的数据',{icon: 5,time:1500});
- return false;
- }
- var setting = {
- check: {
- enable: true,
- chkStyle: "checkbox",
- chkboxType: {'Y':'','N':''},
- radioType: "all"
- },
- view: {
- dblClickExpand: false,
- showLine: false,
- selectedMulti: false
- },
- async: {
- enable: true,
- url: '${ctx}/myconsole/column/getColumnBySiteAndType/',
- dataFilter:function(treeId, parentNode, childNodes){
- if (childNodes)
- {
- for(var i =0; i < childNodes.length; i++)
- {
- if(childNodes[i].columnid == '${column.columnid!}')
- {
- childNodes[i].chkDisabled = childNodes[i].chkdisabled;
- }
- }
- }
- return childNodes;
- }
- },
- data: {
- simpleData: {
- enable: true,
- idKey: "columnid",
- pIdKey: "parentid",
- rootPId: ""
- }
- },
- callback: {
- onClick: function (event, treeId, treeNode) {
- var zTree = $.fn.zTree.getZTreeObj("columnTree");
- zTree.expandNode(treeNode);
- }
- }
- };
- parent.layer.open({
- type: 1,
- title: '目标栏目选择',
- btn: ['确定','取消'],
- yes:function(index, layero){
- var treeObj = $.fn.zTree.getZTreeObj("columnTree");
- var nodes = treeObj.getCheckedNodes(true);
- if(nodes.length <= 0){
- parent.layer.msg('请选择目标栏目',{icon: 5,time:1500});
- return;
- }
- var columnIDs = "";
- $.each(nodes,function(i,n){
- columnIDs += n.columnid+",";
- });
- columnIDs = columnIDs.substring(0,columnIDs.length-1);
- $.post("${ctx}/myconsole/webinfo/batchQuote",{
- keyid:data+"",
- columnid:columnIDs
- },function(json){
- if(json.status == 'y'){
- layer.alert(json.message, {
- skin: 'layui-layer-molv' //样式类名
- ,closeBtn: 0
- }, function(){reload();layer.closeAll('dialog');});
- }else{
- layer.alert(json.message, {
- skin: 'layui-layer-molv' //样式类名
- ,closeBtn: 0
- }, function(){layer.closeAll('dialog');});
- }
- });
- parent.layer.close(index);
- },
- // skin: 'layui-layer-rim', //加上边框
- area: ['350px', '480px'], //宽高
- content: "<ul id='columnTree' class='ztree'></ul>",
- success:function(layero, index){
- $.fn.zTree.init($(layero).find("#columnTree"), setting);
- }
- });
- }//批量引用文章结束
- //查询
- function query(){
- parent.layer.open({
- type: 1,
- title: '选择查询条件',
- btn: ['查询','取消'],
- yes:function(index, layero){
- var btnName = $('#TState').val();
- $("#jqGrid").jqGrid('setGridParam', {
- datatype : "json",
- postData : {'columnID' : $(layero).find("#querycolumnid").val(),'TState':$('#TState').val(),'KeyWord':$(layero).find("#keyword").val(),'BeginDate':$(layero).find("#begindate").val(),'EndDate':$(layero).find("#enddate").val()}
- }).trigger('reloadGrid');
-
-
- parent.layer.close(index);
- },
- skin: 'layui-layer-rim', //加上边框
- area: ['400px', '380px'], //宽高
- content: '<br><div class="row cl"><div>选择栏目:<select id="querycolumnid">${columnOption}<option value="">所有栏目</option></select><div><label class="form-label col-xs-1 col-sm-5"> 关键字:</label>'+
- '<input type="text" class="input-text" id="keyword" name="keyword"></div>'+
- '<br><div class="row cl"><label class="form-label col-xs-1 col-sm-5"> 发布开始时间:</label>'+
- '<input type="text" class="input-text" id="begindate" name="begindate"></div>'+
- '<br><div class="row cl"><label class="form-label col-xs-1 col-sm-5"> 发布结束时间:</label>'+
- '<input type="text" class="input-text" id="enddate" name="enddate"></div>',
- success:function(layero, index){
- $(layero).find("#begindate").on("click",function(){
- WdatePicker();
- })
- $(layero).find("#enddate").on("click",function(){
- WdatePicker();
- })
-
- var begindateObj = $(layero).find("#begindate");
- begindateObj.attr('readOnly',true);
- begindateObj.css({'background':'#cccccc'});
- var enddateObj = $(layero).find("#enddate");
- enddateObj.attr('readOnly',true);
- enddateObj.css({'background':'#cccccc'});
-
- $(layero).find("#querycolumnid").val('${column.columnid}');
- }
- });
-
-
- }
- function compoundTitle(){
- var data = jQuery('#jqGrid').jqGrid('getGridParam','selarrrow');
- console.log(data);
- if(data.length <=0){
- layer.msg('请选择要操作的数据',{icon: 5,time:1500});
- return false;
- }else{
- var keyIDs=data.join(",");
- layer.open({
- type: 2,
- title: '合成标题',
- shadeClose: true,
- shade: 0.8,
- area: ['570px', '330px'],
- content: '${ctx}/myconsole/webinfo/compound?keyIDs='+keyIDs
- });
- }
- }
-
- </script>
- <title>我的桌面</title>
- </head>
- <body>
- <div>
- <nav class="breadcrumb" style="height:100%">
- <span class="l" id=buttoncontent>
-
- <#if selfbuttonflag.insert><a id=ButtonInsert class="btn btn-primary radius" onclick=webinfo_init("添加信息","","add") href="javascript:;">
- <i class="Hui-iconfont"></i> 新建
- </a></#if>
-
- <#if selfbuttonflag.release><a id=ButtonRelease class="btn btn-primary radius finishedc" onclick="batchRelease()" href="javascript:;">
- <i class="Hui-iconfont"></i> 发布</a></#if>
- <!-- <#if selfbuttonflag.timerelease><a id=ButtonTimeRelease class="btn btn-primary radius finishedc" onclick="timeRelease()" href="javascript:;">
- <i class="Hui-iconfont"></i> 定时发布
- </a></#if> -->
- <!-- <#if selfbuttonflag.withdraw><a id=ButtonWithdraw class="btn btn-primary radius withdrawc" onclick="setWithdraw()" href="javascript:;">
- <i class="Hui-iconfont"></i> 撤稿
- </a></#if> -->
- <!-- <#if selfbuttonflag.settop><a id=ButtonSetTop class="btn btn-primary radius setTopc" onclick="setTop()" href="javascript:;" >
- <i class="Hui-iconfont"></i> 置顶
- </a></#if>
- <#if selfbuttonflag.canceltop><a id=ButtonCancelTop class="btn btn-primary radius cancelTopc" onclick="cancelTop()" href="javascript:;" >
- <i class="Hui-iconfont"></i> 取消置顶
- </a></#if>
- <#if selfbuttonflag.batchcopy><a id=ButtonBatchCopy class="btn btn-primary radius copyc" onclick="batchCopy()" href="javascript:;">
- <i class="Hui-iconfont"></i> 复制
- </a></#if>
- <#if selfbuttonflag.batchmove><a id=ButtonBatchMove class="btn btn-primary radius movec" onclick="batchMove()" href="javascript:;">
- <i class="Hui-iconfont"></i> 移动
- </a></#if>
- <#if selfbuttonflag.batchquote><a id=ButtonBatchQuote class="btn btn-primary radius quotec" onclick="batchQuote()" href="javascript:;">
- <i class="Hui-iconfont"></i> 引用
- </a></#if> -->
- <#if selfbuttonflag.delete><a id=ButtonDelete class="btn btn-danger radius deletec" href="javascript:;" onclick="batchDelete()">
- <i class="Hui-iconfont"></i> 删除
- </a></#if>
- <a id=ButtonSelect class="btn btn-primary radius query" onclick="query()" href="javascript:;">
- <i class="Hui-iconfont"></i> 检索
- </a>
- <!-- <a id=ButtonInsert class="btn btn-primary radius" href="${columnUrl}" target="_blank">
- <i class="Hui-iconfont"></i> 预览栏目
- </a>
- <a id=ButtonInsert class="btn btn-primary radius" href="${columnStaticURL}" target="_blank">
- <i class="Hui-iconfont"></i> 预览外网栏目
- </a> -->
- <!-- <a id=ButtonInsert class="btn btn-primary radius" href="javascript:;" onclick="compoundTitle()">
- <i class="Hui-iconfont"></i> 合成标题
- </a> -->
- <span class="select-box" style="width: 120px" >
- <select id="TState" class="select" >
- <option value=''>所有文章</option>
- <!-- <option value='finished'>成品箱</option>
- <option value='draft'>草稿箱</option>
- <option value='waitrelease'>待发箱</option>
- <option value='withdraw'>撤稿箱</option>
- <option value='flow'>流转箱</option>
- <option value='rejection'>退稿箱</option>
- <option value='compound'>合成箱</option> -->
- </select>
- </span>
- </span>
- </nav>
- <div class="page-container">
-
- <table id="jqGrid"></table>
- <div id="jqGridPager"></div>
- </div>
- </div>
-
- </body>
- </html>
|