Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-smart
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
platform
hp-smart
Commits
c040081b
Commit
c040081b
authored
Mar 14, 2024
by
wuwenlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企业logo更换
parent
b6a26c28
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3101 additions
and
0 deletions
+3101
-0
hpjx-logo.png
src/main/resources/META-INF/resources/hpjx-logo.png
+0
-0
iPlatV7-index.js
src/main/resources/META-INF/resources/iPlatV7-index.js
+2520
-0
iPlatV7-index.jsp
src/main/resources/META-INF/resources/iPlatV7-index.jsp
+581
-0
No files found.
src/main/resources/META-INF/resources/hpjx-logo.png
0 → 100644
View file @
c040081b
5.43 KB
src/main/resources/META-INF/resources/iPlatV7-index.js
0 → 100644
View file @
c040081b
;(
function
(
$
,
_
)
{
var
trim
=
$
.
trim
,
extend
=
$
.
extend
;
var
treeid
;
var
selectedNodeText
;
var
isObject
=
IPLAT
.
isObject
||
function
(
obj
)
{
return
null
!==
obj
&&
typeof
obj
===
'object'
;
};
// 为首页定制的新增Tab接口
kendo
.
ui
.
TabStrip
.
fn
.
addTab
=
function
(
item
)
{
if
(
!
isObject
(
item
))
return
;
// newWindow模式: 重新打开window窗口展示新页面
// tabView模式: 在首页的tab项中添加新页面
// 默认是newWindow模式
var
mode
=
item
.
mode
;
if
(
mode
===
'newWindow'
)
{
if
(
item
.
urlFlag
)
{
window
.
open
(
item
.
url
)
}
else
{
if
(
isAvailable
(
item
.
param
)){
IPLAT
.
openForm
(
item
.
title
,
item
.
param
);
return
;
}
else
{
IPLAT
.
openForm
(
item
.
title
);
return
;
}
}
return
;
}
if
(
mode
===
'thisWindow'
)
{
window
.
open
(
item
.
url
,
'_self'
);
return
;
}
if
(
mode
===
'tabView'
)
{
this
.
append
({
text
:
item
.
title
,
content
:
""
});
var
last
=
this
.
tabGroup
.
children
().
length
-
1
;
var
lastItem
=
this
.
tabGroup
.
children
().
eq
(
last
);
lastItem
.
append
(
'<span data-type="remove" class="k-link"><span class="k-icon k-i-close"></span></span>'
);
var
lastContentElement
=
this
.
contentElement
(
last
);
var
iframe
=
$
(
'<iframe>'
);
iframe
.
appendTo
(
$
(
lastContentElement
));
$
(
lastContentElement
).
css
(
'height'
,
$
(
window
).
height
()
-
$
(
'#page-list'
).
offset
().
top
-
$
(
'#page-list'
)[
0
].
firstChild
.
offsetHeight
-
4
);
// 当前tab页k-content的高度
iframe
.
attr
(
'width'
,
'100%'
);
iframe
.
attr
(
'frameborder'
,
'0'
);
iframe
.
attr
(
'height'
,
$
(
window
).
height
()
-
$
(
'#page-list'
).
offset
().
top
-
$
(
'#page-list'
)[
0
].
firstChild
.
offsetHeight
-
4
);
// iframe的高度
iframe
.
attr
(
'src'
,
item
.
url
);
this
.
activateTab
(
lastItem
);
}
};
var
_defaultOptions
=
{
// slick: true, // 首页轮播
menu
:
true
,
// 左侧菜单
pageSearch
:
true
,
// 页面号查询
favorite
:
true
,
// 收藏页面
panelBar
:
true
,
// 消息主看板
unload
:
true
,
// 首页刷新或者关闭时,关闭所有的子窗口
apm
:
false
,
// APM指标默认不展示
tabs
:
true
,
// 页面切换
calendar
:
true
//日历区域
};
var
uiLayout
=
function
(
isTabs
)
{
var
offsetTop
=
!!
isTabs
?
$
(
'#page-list'
).
offset
().
top
+
10
*
2
+
31
:
80
;
var
$hWindow
=
$
(
window
).
height
();
var
offsetHeight
=
$hWindow
-
offsetTop
;
// $(".main-content").css('height', $hWindow - 80);
$
(
"#iplat-menu"
).
css
(
'height'
,
$hWindow
-
90
);
$
(
"#iplat-menu"
).
getNiceScroll
().
resize
();
var
topH
=
offsetHeight
*
0.55
,
bottomH
=
offsetHeight
*
0.45
;
$
(
".i-index-top"
).
css
(
'height'
,
topH
-
4
);
$
(
".i-index-tab"
).
css
(
'height'
,
topH
-
80
);
// 最外层tab的高度固定,防止切换tab时的抖动
$
(
".i-index-bottom"
).
css
(
'height'
,
bottomH
-
10
);
$
(
".index-favorite"
).
css
(
'height'
,
bottomH
-
56
);
// 10 + 10 + 36
$
(
".i-index-panelbar"
).
css
(
'height'
,
topH
-
120
);
// 只允许panelbar 出现滚动条
//$(".i-region-content").css('height', $(".index-favorite").height() - 36);
/*$(".index-favorite .i-region-content").css('height', $(".index-charts").height() - 46);
$(".index-links ").css('height', $(".index-charts").height() - 46);*/
$
(
"#info"
).
css
(
'height'
,
$
(
".index-charts"
).
height
());
$
(
".index-charts"
).
find
(
".i-region-content"
).
css
(
'height'
,
$
(
".index-charts"
).
height
()
-
36
);
$
(
".index-charts"
).
find
(
".i-region-content.notice-region"
).
css
(
'height'
,
$
(
".index-charts"
).
height
());
// $(".index-apm").find(".i-region-content").css('height', $(".index-apm").height() - 36);
$
(
".index-links .dropdown-menu"
).
css
(
"left"
,
47
-
$
(
".index-links"
).
width
());
/*
if (echarts.getInstanceByDom($("#qps")[0])) {
echarts.getInstanceByDom($("#qps")[0]).resize();
echarts.getInstanceByDom($("#servicepv")[0]).resize();
echarts.getInstanceByDom($("#pagepv")[0]).resize();
}
*/
};
var
V6Index
=
function
(
options
)
{
if
(
this
instanceof
V6Index
)
{
this
.
_options
=
extend
({},
_defaultOptions
,
options
);
this
.
init
();
}
else
{
return
new
V6Index
(
options
);
}
};
// 调用各个模块
V6Index
.
prototype
.
init
=
function
()
{
var
_options
=
this
.
_options
,
that
=
this
,
key
;
var
keys
=
_
.
keys
(
_options
);
for
(
var
i
=
0
,
length
=
keys
.
length
;
i
<
length
;
i
++
)
{
key
=
keys
[
i
];
if
(
key
&&
_options
[
key
]
&&
_
.
isFunction
(
that
[
key
]))
{
// 防止页面JS报错,导致页面无法继续执行
try
{
that
[
key
].
call
(
that
);
}
catch
(
e
)
{
console
.
error
(
e
);
}
}
}
// 样式重置
uiLayout
(
true
);
// APM echarts
// drawCharts();
// reisze 重新布局
$
(
window
).
resize
(
kendo
.
throttle
(
function
()
{
uiLayout
(
true
);
},
200
));
$
(
".fa-file-o"
).
on
(
"click"
,
function
()
{
$
(
"#new-window-view"
).
css
(
'display'
,
'block'
);
$
(
"#tab-view"
).
css
(
'display'
,
'none'
);
$
(
'#toggle-view-mode'
).
data
(
'mode'
,
'newWindow'
);
});
$
(
".fa-files-o"
).
on
(
"click"
,
function
()
{
$
(
"#tab-view"
).
css
(
'display'
,
'block'
);
$
(
"#new-window-view"
).
css
(
'display'
,
'none'
);
$
(
'#toggle-view-mode'
).
data
(
'mode'
,
'tabView'
);
});
if
(
IPLAT
.
Browser
.
isIE8
)
{
$
(
"#new-window-view"
).
css
(
"display"
,
"none"
);
$
(
"#tab-view"
).
css
(
"display"
,
"none"
);
}
};
V6Index
.
prototype
.
meet
=
function
()
{
var
meetInfo
=
new
EiInfo
();
// EiCommunicator.send("KB00M", "meetingToThisWeek", meetInfo, {
// onSuccess: function (eiInfo) {
// var status = eiInfo.getStatus();
// var fileUrl = eiInfo.get("fileUrl");
// var title = eiInfo.get("title");
// if (status != -1) {
// $("#meetingAnnouncement").html('<a href="' + fileUrl + '">' + title + '公司会议安排</a>')
// } else {
// $("#meetingAnnouncement").html(' ');
// console.log("调用会议接口" + eiInfo.getMsg());
// }
// },
// onFail: function (eMsg) {
// $("#meetingAnnouncement").html(' ');
// console.log("调用会议接口:" + eMsg);
// }
// });
};
// APM指标
/*
V6Index.prototype.apm = function () {
// 绘制图表
var apmData = "";
var draw = function (elementList) {
for (var k = 0; k < elementList.length; k++) {
var elementId = elementList[k]['elementId'],
text = elementList[k]['text'],
themeColor = elementList[k]['themeColor'],
_index = elementList[k]['_index'],
type = elementList[k]['type'];
var thisChart = echarts.init(document.getElementById(elementId));
var _option = {
title: {
show: true,
text: text,
top: '2%',
left: '0',
textStyle: {
color: '#25A4D1',
fontStyle: 'normal',
fontWeight: 'normal',
fontSize: 13
}
},
grid: {
top: '30%',
height: '65%',
width: '95%',
left: '3%',
right: '10%'
},
textStyle: {
color: '#f7f7f7',
fontStyle: 'normal',
fontSize: 13
},
tooltip: {
show: true,
trigger: 'axis',
// formatter: "{c}?11:{c}</br>" + "<span style='font-size: 5px;'>{b}</span>",
formatter: function (params) {
if (!_.isUndefined(params[0].value)) {
var res = '<span>时间:' + params[0].name + '</span>';
for (var i = 0; i < params.length; i++) {
res += '<p>' + params[i].seriesName + ': ' + params[i].data + '</p>'
}
return res;
} else {
return "无数据";
}
},
backgroundColor: "rgba(255, 255, 255, 0.8)",
confine: true, // 将tooltip限制在图表区域内
textStyle: {
color: themeColor,
fontWeight: 'bold',
fontSize: 10
},
axisPointer: {
type: 'line',
lineStyle: {
color: themeColor,
width: 1,
type: 'solid'
}
}
},
xAxis: {
data: [],
type: 'category',
// interval: 9,
splitNumber: 6,
axisLine: {
show: true //显示坐标轴轴线
},
axisLabel: {
show: false,
textStyle: {
fontSize: 9
},
interval: 9
},
axisTick: {
show: false,
alignWithLabel: true,
interval: 9
},
splitLine: { //grid 区域中的分隔线。
show: false,
interval: 9,
lineStyle: {
type: 'solid',
color: '#65686A'
}
},
boundaryGap: type == "bar" //柱状图留白
},
yAxis: {
gridIndex: 0,
type: 'value',
nameGap: 20,
axisLabel: {
show: true,
textStyle: {
fontSize: 9,
fontWeight: 'bold'
}
},
axisTick: { //显示坐标轴刻度
show: false
},
axisLine: {
show: true //显示坐标轴轴线
},
splitLine: { //grid 区域中的分隔线。
show: true,
interval: 3,
lineStyle: {
type: 'dotted',
color: '#65686A'
}
}
},
dataZoom: [{
type: 'inside', //鼠标缩放
start: 0, //开始缩放百分比(default:0)
end: 100 //最大缩放百分比(default:100)
}]
};
thisChart.setOption(_option);
drawThisChart(thisChart, k);
// 绘制单个chart
function drawThisChart(thisChart, k) {
apmData = k === 0 ? queryAPMData() : apmData;
var esData = apmData.get("result");
var date = [];
var value = [];
var _node, _now;
if (!_.isEmpty(esData) && esData['hits']['hits'].length > 0) {
var nodes = esData['hits']['hits'];
for (var i = 0; i < nodes.length; i++) {
_node = nodes[i];
var nodeSource = _node['_source'];
_now = new Date(nodeSource['@timestamp']);
var timeStr = [_now.getHours(), Math.floor(_now.getMinutes() / 10) == 0 ? '0' + _now.getMinutes() : _now.getMinutes()].join(":");
date.push(timeStr);
value.push(nodeSource[elementList[k]['_index']]);
}
// // 在线用户数
// var onlineUserNumStr = nodes[nodes.length - 1]['_source']['onlineuser'].toString();
// $(".index-charts-layout-0-span2").html("");
// for (var j = 0; j < onlineUserNumStr.length; j++) {
// $("<span class='index-charts-layout-0-span3'>" + onlineUserNumStr[j] + "</span>").appendTo(".index-charts-layout-0-span2");
// }
}
// 在线用户数
var onlineUserStr = apmData.get("onlineUser");
if (!_.isEmpty(onlineUserStr)) {
$(".index-charts-layout-0-span2").html("");
for (var j = 0; j < onlineUserStr.length; j++) {
$("<span class='index-charts-layout-0-span3'>" + onlineUserStr[j] + "</span>").appendTo(".index-charts-layout-0-span2");
}
}
thisChart.setOption({
xAxis: {data: date},
series: [
{
// type: 'line',
type: elementList[k]['type'],
symbol: 'circle',
symbolSize: 8,
itemStyle: {
normal: {
color: elementList[k]['themeColor']
},
emphasis: {
color: elementList[k]['themeColor']
}
},
connectNulls: true,
name: elementList[k]['text'],
data: value
}
]
});
setTimeout(function () {
drawThisChart(thisChart, k);
}, APM_REFRESH * 60 * 1000);
}
// 获取APM数据
function queryAPMData() {
var result = "";
var nowTimestamp = new Date().getTime();
var ei = new EiInfo();
ei.set("request_body", {
"size": IPLATUI.ES_SPAN, //数据条数
"sort": [
{
"@timestamp": {
"order": "asc"
}
}
],
"query": {
"bool": {
"must": [
{
"range": {
"@timestamp": {
"gte": nowTimestamp - IPLATUI.ES_SPAN * 60 * 1000,//开始时间(Unix时间戳 ,毫秒)
"lte": nowTimestamp //结束时间(毫秒)
}
}
}
]
}
}
});
EiCommunicator.send("EF0001", "queryAPM", ei, {
onSuccess: function (ei) {
result = ei;
},
onFail: function (ei) {
}
}, {async: false});
return result;
}
}
};
var drawCharts = function () {
var elementList = [];
elementList.push({
'elementId': 'pagepv',
'text': '页面访问量',
'themeColor': '#FF9100',
"_index": 'pagepv',
"type": "bar"
});
elementList.push({
'elementId': 'servicepv',
'text': '服务访问量',
'themeColor': '#0067E9',
"_index": 'servicepv',
"type": "bar"
});
elementList.push({
'elementId': 'qps',
'text': '每秒查询率',
'themeColor': '#F25753',
"_index": 'QPS',
"type": "line"
});
draw(elementList);
};
// 显示APM区内容
$(".index-apm .i-region-content").css("display", "block");
drawCharts();
// APM部分查看更多
$("#moreAPM").on("click", function () {
window.open("http://pscstest.baogang.info/iPlatAPM/web/XPSJ03");
});
};
*/
// 轮播图
V6Index
.
prototype
.
slick
=
function
()
{
$
(
'.slick'
).
slick
({
slidesToShow
:
4
,
slidesToScroll
:
4
,
dots
:
true
,
autoplay
:
true
,
autoplaySpeed
:
5000
,
appendDots
:
$
(
"#i-region-dots-append"
),
dotsClass
:
'slick-dots i-slick-dots'
});
};
/**
* 菜单在底部展开时,自动定位
* @param node
* @return {number}
*/
function
getOffsetTop
(
node
)
{
var
t
=
0
;
var
p
=
$
(
node
);
while
(
!
p
.
parent
().
hasClass
(
'iplat-menu-content'
))
{
if
(
p
.
is
(
'li'
))
{
// console.debug(p);
t
+=
p
.
position
().
top
;
}
p
=
p
.
parent
();
}
return
t
;
}
// 菜单
V6Index
.
prototype
.
menu
=
function
()
{
var
v6Index
=
this
;
// 首页菜单
var
iplatMenu
=
function
(
root
,
menuId
)
{
var
ei
=
new
EiInfo
();
var
$menus
=
$
(
"#"
+
menuId
);
$menus
.
css
(
"visibility"
,
"hidden"
);
var
openMenu
=
function
(
$li
)
{
var
content
=
$li
.
find
(
".iplat-menu-content"
);
var
id
=
content
.
attr
(
"id"
);
var
$menu
=
$
(
"#"
+
id
);
var
first
=
content
.
data
(
"first"
);
treeid
=
id
;
$li
.
addClass
(
"open"
);
// 内容首次加载时候,加载生成树
// 后面再点击不再重新生成树
if
(
first
)
{
IPLAT
.
TreeView
({
treeId
:
id
,
ROOT
:
id
.
replace
(
"tree"
,
""
),
url
:
IPLATUI
.
CONTEXT_PATH
,
serviceName
:
"EF0000"
,
methodName
:
"query"
,
textField
:
"text"
,
valueField
:
"label"
,
hasChildren
:
"leaf"
,
dataSpriteCssClassField
:
"imagePath"
,
messages
:
{
loading
:
"加载中......"
},
// 菜单展开时候,分为两种情况下,一种是需要ajax调用后端数据,然后展开。 另外一种是子结点折叠起来,然后展开
// dataBound是处理ajax调用后端数据,展开子结点展开的回调
dataBound
:
function
()
{
$
(
"#iplat-menu"
).
getNiceScroll
().
resize
();
$
(
".k-treeview-leaf"
).
click
(
function
(
e
)
{
$
(
"#"
+
treeid
).
data
(
"kendoTreeView"
).
select
(
$
());
});
},
// expand是处理是子结点折叠起来,然后展开
// 可以通过aria-expanded存在这个属性表明是子结点已经获取,不需要再从后端获取结点信息
expand
:
function
(
e
)
{
var
node
=
e
.
node
;
// var expanded = $(node).attr('aria-expanded');
// setTimeout: 400是异步执行,防止子结点没有展开完
setTimeout
(
function
()
{
$
(
"#iplat-menu"
).
getNiceScroll
().
resize
();
// 自动定位菜单滚动条的位置
var
t
=
getOffsetTop
(
node
);
$
(
"#iplat-menu"
).
getNiceScroll
(
0
).
doScrollTop
(
t
,
200
);
},
400
);
},
select
:
function
(
e
)
{
var
tree
=
e
.
sender
;
var
model
=
tree
.
dataItem
(
e
.
node
)
||
{};
var
formEname
=
model
[
'label'
];
//单页面模式传中文名称作为title
var
text
=
model
[
'text'
];
var
defaultMode
=
'newWindow'
;
var
mode
=
$
(
'#toggle-view-mode'
).
data
(
'mode'
)
||
defaultMode
;
var
openType
=
model
[
'openType'
];
if
(
openType
!=
null
&&
openType
!=
"0"
){
mode
=
getopenType
(
openType
)
}
selectedNodeText
=
text
;
if
(
!
model
[
'leaf'
])
{
var
url
=
trim
(
model
.
nodeUrl
),
param
=
trim
(
model
.
nodeParam
),
tabTarget
;
//单页模式下获得的对象
for
(
var
i
=
0
;
i
<
v6Index
.
tabs
.
tabGroup
.
children
().
length
;
i
++
)
{
if
(
v6Index
.
tabs
.
tabGroup
.
children
()[
i
].
innerText
==
text
)
{
tabTarget
=
v6Index
.
tabs
.
tabGroup
.
children
()[
i
];
break
;
}
}
if
(
v6Index
.
_options
.
tabs
&&
v6Index
.
tabs
)
{
if
(
url
)
{
v6Index
.
tabs
.
addTab
({
title
:
text
,
url
:
url
,
urlFlag
:
true
,
mode
:
mode
});
}
else
{
//打开页面
if
(
mode
===
'tabView'
)
{
if
(
tabTarget
==
null
)
{
v6Index
.
tabs
.
addTab
({
title
:
text
,
url
:
IPLAT
.
createUrl
(
formEname
,
param
),
urlFlag
:
false
,
mode
:
mode
});
}
else
{
//模拟点击事件切换tab标签
tabTarget
.
click
();
}
}
else
{
v6Index
.
tabs
.
addTab
({
title
:
formEname
,
url
:
IPLAT
.
createUrl
(
formEname
,
param
),
urlFlag
:
false
,
mode
:
mode
,
param
:
param
});
}
}
}
else
{
if
(
url
)
{
var
alreadyExists
=
_
.
some
(
window
.
childWindows
,
{
location
:
{
href
:
url
}});
var
openedWindow
=
window
.
open
(
alreadyExists
?
""
:
url
,
formEname
);
alreadyExists
?
void
0
:
window
.
childWindows
.
push
(
openedWindow
);
}
else
{
IPLAT
.
openForm
(
formEname
,
param
);
}
}
}
},
loadComplete
:
function
()
{
$menu
.
on
(
"click"
,
"li .k-state-selected"
,
function
()
{
var
treeview
=
$
(
"#"
+
id
).
data
(
"kendoTreeView"
),
node
=
$
(
this
).
closest
(
"li"
)[
0
];
treeview
.
trigger
(
"select"
,
{
node
:
node
});
});
}
});
content
.
data
(
"first"
,
false
);
var
kendoTreeView
=
$menu
.
data
(
"kendoTreeView"
);
$menu
.
on
(
"click"
,
".k-in"
,
function
(
e
)
{
kendoTreeView
.
toggle
(
$
(
e
.
target
).
closest
(
".k-item"
));
});
}
$menu
.
show
();
};
var
init
=
function
(
menusHtml
)
{
$menus
.
html
(
menusHtml
);
$menus
.
on
(
"click"
,
".iplat-menu"
,
function
(
e
)
{
// 获取li的结点
var
$li
=
$
(
this
),
leaf
=
$li
.
data
(
"leaf"
),
url
=
trim
(
$li
.
data
(
'url'
)),
param
=
trim
(
$li
.
data
(
'param'
)),
pageSerial
=
$li
.
data
(
"page"
);
if
(
leaf
==
1
)
{
if
(
v6Index
.
_options
.
tabs
&&
v6Index
.
tabs
)
{
if
(
url
)
{
v6Index
.
tabs
.
addTab
({
title
:
pageSerial
,
url
:
url
});
}
else
{
v6Index
.
tabs
.
addTab
({
title
:
pageSerial
,
url
:
IPLAT
.
createUrl
(
pageSerial
,
param
)
});
}
}
else
{
if
(
url
)
{
window
.
open
(
url
);
}
else
{
IPLAT
.
openForm
(
pageSerial
,
param
);
}
}
}
else
{
var
$iplatMenu
=
$
(
"#iplat-menu"
);
if
(
$
(
e
.
target
).
closest
(
".iplat-menu-content"
).
length
<
1
)
{
var
opened
=
$li
.
hasClass
(
"open"
);
// 关闭已经打开menu
$menus
.
find
(
".iplat-menu-content"
).
hide
();
$iplatMenu
.
find
(
"li.iplat-menu"
).
removeClass
(
"open"
);
if
(
!
opened
)
{
// 菜单之前是打开的,不再打开
openMenu
(
$li
);
}
}
$iplatMenu
.
getNiceScroll
().
resize
();
}
});
};
ei
.
set
(
"inqu_status-0-node"
,
root
);
// 构建menu
EiCommunicator
.
send
(
"EF0000"
,
"query"
,
ei
,
{
onSuccess
:
function
(
ei
)
{
var
nodeList
=
ei
.
getBlock
(
root
).
getMappedRows
()
||
[];
var
menusHtml
=
kendo
.
template
(
$
(
"#menu-template"
).
html
())({
menus
:
nodeList
});
init
(
menusHtml
);
$menus
.
css
(
"visibility"
,
"visible"
);
$
(
"#iplat-menu"
).
niceScroll
({
// cursorwidth: "7px",
// cursorborder: "none",
// height: $menus.height()
});
},
onFail
:
function
(
ei
)
{
// alert("菜单服务调用失败");
}
});
};
var
iplatMenuName
=
trim
(
$
(
"input[name='iplatMenuName']"
).
val
());
if
(
trim
(
iplatMenuName
))
{
iplatMenu
(
iplatMenuName
,
"iplat-menu"
)
}
// 菜单的收缩展开
$
(
"#side-toggle"
).
on
(
"click"
,
function
()
{
App
.
layout
(
"sidebar_mini_toggle"
);
});
};
// 收藏功能
V6Index
.
prototype
.
favorite
=
function
()
{
// 收藏页面
var
favoriteTmpl
=
kendo
.
template
(
$
(
"#favorite-template"
).
html
());
EiCommunicator
.
send
(
"EDFA10"
,
"query"
,
new
EiInfo
(),
{
onSuccess
:
function
(
e
)
{
var
favData
=
[],
item
=
e
.
getBlock
(
"result"
).
getMappedRows
(),
favList
=
$
(
"#fav-list"
);
if
(
item
.
length
>
0
)
{
for
(
var
i
=
0
;
i
<
item
.
length
;
i
++
)
{
favData
.
push
({
encoded
:
false
,
text
:
favoriteTmpl
({
form_ename
:
item
[
i
][
'form_ename'
],
form_cname
:
item
[
i
][
'form_cname'
]
})
})
}
}
else
{
favData
.
push
({
text
:
"暂无收藏页面!"
});
favList
.
next
(
".for-more"
).
css
(
"display"
,
"none"
);
}
favList
.
kendoPanelBar
({
dataSource
:
favData
,
select
:
onSelect
});
},
onFail
:
function
(
e
)
{
}
});
var
onSelect
=
function
(
e
)
{
var
ename
=
$
(
e
.
item
).
find
(
"div"
).
attr
(
"ename"
);
if
(
ename
){
IPLAT
.
openForm
(
ename
);
}
};
$
(
".moreCollection"
).
on
(
"click"
,
function
()
{
IPLAT
.
openForm
(
"EDFA10"
);
});
/* $("#meetingAnnouncement").on("click", function () {
var meetInfo = new EiInfo();
EiCommunicator.send("KB00M", "meetingToThisWeek", meetInfo, {
onSuccess : function(eiInfo) {
var status = eiInfo.getStatus();
var fileUrl = eiInfo.get("fileUrl");
if (status != -1) {
$("#meetingAnnouncement").html('<a href="http://sp.baogang.info:9082/NMfiledownloadservlet?fileguid=ebc227e9-fe91-48b4-b8c5-475a15b22e31">本周会议</a>')
}
},
onFail : function(eMsg) {
IPLAT.NotificationUtil("调用会议接口服务失败.");
}
});
});*/
};
// 页面号查询功能
V6Index
.
prototype
.
pageSearch
=
function
()
{
var
v6Index
=
this
;
// 防止抖动
var
filterChinese
=
_
.
debounce
(
function
(
td
)
{
td
.
value
=
td
.
value
.
replace
(
/
[\u
4e00-
\u
9fa5
]
/g
,
''
);
},
60
);
var
$formEname
=
$
(
"#inqu_status-0-form_ename"
);
// 过滤中文
// $formEname.on("input", function () {
// filterChinese(this)
// });
var
defaultPageSize
=
100
;
// 页面号的查询
var
dataSource
=
new
kendo
.
data
.
DataSource
({
transport
:
{
read
:
{
url
:
IPLATUI
.
CONTEXT_PATH
+
"/service/EF0001/query"
,
type
:
'POST'
,
dataType
:
"json"
,
contentType
:
"application/json;charset=utf-8"
},
parameterMap
:
function
()
{
var
info
=
new
EiInfo
();
info
.
set
(
"inqu_status-0-form_ename"
,
$
(
"#inqu_status-0-form_ename"
).
val
());
info
.
set
(
"inqu_status-0-isSubFormFilter"
,
"true"
);
info
.
set
(
"result-limit"
,
defaultPageSize
);
info
.
set
(
"result-offset"
,
0
);
return
info
.
toJSONString
(
true
);
}
},
schema
:
{
model
:
{
id
:
"form_ename"
},
data
:
function
(
response
)
{
// 处理异常
var
ajaxEi
=
EiInfo
.
parseJSONObject
(
response
);
if
(
ajaxEi
.
getStatus
()
<
0
)
{
NotificationUtil
(
ajaxEi
);
return
[];
}
return
ajaxEi
.
getBlock
(
"result"
).
getMappedRows
();
}
},
error
:
function
(
e
)
{
NotificationUtil
(
'网络发生异常, 请稍后再试'
,
'error'
);
},
pageSize
:
defaultPageSize
,
serverFiltering
:
true
});
// 设置下拉列的宽度
var
width
=
$formEname
.
width
()
*
1.4
;
var
template
=
"<div style='white-space: nowrap;'>"
+
'#: form_ename #-#: form_cname#'
+
"</div>"
;
// 按下Enter键后触发change事件
var
enterFunc
=
function
(
e
)
{
if
(
kendo
.
keys
.
ENTER
===
e
.
keyCode
)
{
$formEname
.
unbind
(
"keyup.iplat"
,
enterFunc
);
// 解绑keyup事件,防止单页展示时出现两个相同tab
var
autoComplete
=
$
(
"#inqu_status-0-form_ename"
).
data
(
"kendoAutoComplete"
);
var
data
=
autoComplete
.
dataSource
.
data
();
var
form_ename
=
$
(
"#inqu_status-0-form_ename"
).
val
().
toUpperCase
();
let
list
=
data
.
filter
((
obj
)
=>
obj
.
form_ename
==
form_ename
);
if
(
list
.
length
!=
0
)
{
autoComplete
.
trigger
(
"change"
,
{
sender
:
autoComplete
,
open
:
true
});
}
else
{
NotificationUtil
(
'该页面不存在或无法打开'
,
'warning'
);
}
}
};
var
close
=
false
;
$formEname
.
blur
(
function
()
{
close
=
true
;
$formEname
.
data
(
"kendoAutoComplete"
).
close
();
close
=
false
;
});
$formEname
.
kendoAutoComplete
({
autoWidth
:
true
,
dataSource
:
dataSource
,
dataTextField
:
"form_ename"
,
minLength
:
2
,
enforceMinLength
:
true
,
height
:
200
,
template
:
template
,
suggest
:
false
,
select
:
function
(
e
)
{
var
param
=
""
,
form_ename
=
e
.
dataItem
.
form_ename
;
var
form_cname
=
e
.
dataItem
.
form_cname
;
var
openType
=
e
.
dataItem
.
openType
;
if
(
v6Index
.
_options
.
tabs
&&
v6Index
.
tabs
)
{
var
defaultMode
=
'newWindow'
;
var
mode
=
$
(
'#toggle-view-mode'
).
data
(
'mode'
)
||
defaultMode
;
if
(
openType
!=
null
&&
openType
!=
"0"
){
mode
=
getopenType
(
openType
)
}
if
(
mode
===
'tabView'
)
{
for
(
var
i
=
0
;
i
<
v6Index
.
tabs
.
tabGroup
.
children
().
length
;
i
++
)
{
var
tabTarget
;
if
(
v6Index
.
tabs
.
tabGroup
.
children
()[
i
].
innerText
==
form_cname
)
{
tabTarget
=
v6Index
.
tabs
.
tabGroup
.
children
()[
i
];
break
;
}
}
if
(
tabTarget
==
null
)
{
v6Index
.
tabs
.
addTab
({
title
:
form_cname
,
url
:
IPLAT
.
createUrl
(
form_ename
,
param
),
urlFlag
:
false
,
mode
:
mode
});
}
else
{
//模拟点击事件切换tab标签
tabTarget
.
click
();
}
}
else
{
v6Index
.
tabs
.
addTab
({
title
:
form_ename
,
url
:
IPLAT
.
createUrl
(
form_ename
,
param
),
urlFlag
:
false
,
mode
:
mode
});
}
}
else
{
IPLAT
.
openNewForm
(
form_ename
.
toUpperCase
(),
param
);
}
},
change
:
function
(
e
)
{
// 支持重新打开页面
$formEname
.
unbind
(
"keydown.iplat"
);
$formEname
.
on
(
"keydown.iplat"
,
enterFunc
);
// 支持Enter时候触发,其他时候触发change不打开页面
if
(
e
.
open
)
{
var
dataSource
=
e
.
sender
.
dataSource
,
form_ename
=
trim
(
e
.
sender
.
element
.
val
()).
toUpperCase
(),
param
=
""
,
item
=
dataSource
.
get
(
form_ename
);
var
form_cname
=
form_ename
;
var
openType
;
if
(
!!
item
)
{
param
=
trim
(
item
[
'form_param'
]);
form_cname
=
item
.
form_cname
;
openType
=
item
.
openType
;
}
if
(
v6Index
.
_options
.
tabs
&&
v6Index
.
tabs
)
{
var
defaultMode
=
'newWindow'
;
var
mode
=
$
(
'#toggle-view-mode'
).
data
(
'mode'
)
||
defaultMode
;
if
(
openType
!=
null
&&
openType
!=
"0"
){
mode
=
getopenType
(
openType
)
}
if
(
mode
===
'tabView'
)
{
for
(
var
i
=
0
;
i
<
v6Index
.
tabs
.
tabGroup
.
children
().
length
;
i
++
)
{
var
tabTarget
;
if
(
v6Index
.
tabs
.
tabGroup
.
children
()[
i
].
innerText
==
form_cname
)
{
tabTarget
=
v6Index
.
tabs
.
tabGroup
.
children
()[
i
];
break
;
}
}
if
(
tabTarget
==
null
)
{
v6Index
.
tabs
.
addTab
({
title
:
form_cname
,
url
:
IPLAT
.
createUrl
(
form_ename
,
param
),
urlFlag
:
false
,
mode
:
mode
});
}
else
{
//模拟点击事件切换tab标签
tabTarget
.
click
();
}
}
else
{
v6Index
.
tabs
.
addTab
({
title
:
form_ename
,
url
:
IPLAT
.
createUrl
(
form_ename
,
param
),
urlFlag
:
false
,
mode
:
mode
});
}
}
else
{
IPLAT
.
openNewForm
(
form_ename
.
toUpperCase
(),
param
);
}
}
},
close
:
function
(
e
)
{
// 避免下拉列表滚动条到底部后再向下滚动关闭下拉列表
// 阻止除了主动触发外的关闭
if
(
!
close
)
e
.
preventDefault
();
}
});
// 页面第一次加载时,用keyup事件弹出新窗口
$formEname
.
on
(
"keyup.iplat"
,
enterFunc
);
};
// index刷新 关闭时,关闭所有的子窗口
V6Index
.
prototype
.
unload
=
function
()
{
window
.
onunload
=
function
()
{
__iplat__closeWindows
(
true
);
};
};
// 首页消息主看板模块
V6Index
.
prototype
.
panelBar
=
function
()
{
/*
var rows = [
[
"质量模块",
"PQ",
"disputeAppr",
"质量异议审批",
"Manual4",
"备件二级审批人",
"a3ce7050-728d-11e7-a9a1-005056b604c3",
"创建人同时提交工作流",
"019328",
"2017-07-27 13:50:37",
"open",
"PQYY02A",
"01",
"0"
],
[
"基础模块",
"PSCS-PM",
"PmTestAuditDC",
"基础工作流审核测试1",
"PM_LEV1",
"一级审核",
"107c4d9f-710b-11e7-ba7f-005056b604c3",
"创建人同时提交工作流",
"019328",
"2017-07-25 15:30:24",
"open",
"PMJPA303",
"01",
"0"
],
[
"基础模块",
"PSCS-PM",
"PmTestAuditDC",
"基础工作流审核测试1",
"PM_LEV2",
"二级审核",
"d6123e71-710e-11e7-ba7f-005056b604c3",
"创建人同时提交工作流",
"019328",
"2017-07-25 18:08:36",
"open",
"PMJPA303",
"01",
"0"
],
[
"基础模块",
"PSCS-PM",
"PmTestAuditDC",
"基础工作流审核测试1",
"PM_LEV1",
"一级审核",
"c009262f-70eb-11e7-92a2-005056b604c3",
"创建人同时提交工作流",
"019328",
"2017-07-25 14:00:23",
"open",
"PMJPA303",
"01",
"0"
],
[
"基础模块",
"PSCS-PM",
"PmTestAuditDC",
"基础工作流审核测试1",
"AUDIT1",
"一级审核",
"276476a4-715a-11e7-a9a1-005056b604c3",
"创建人同时提交工作流",
"019328",
"2017-07-26 00:57:19",
"open",
"PMJPA303",
"01",
"0"
],
[
"基础模块",
"PSCS-PM",
"PmTestAuditDC",
"基础工作流审核测试1",
"AUDIT1",
"一级审核",
"f323d809-7159-11e7-a9a1-005056b604c3",
"创建人同时提交工作流",
"019328",
"2017-07-26 00:55:44",
"open",
"PMJPA303",
"01",
"0"
],
[
"基础模块",
"PSCS-PM",
"PmTestAuditDC",
"基础工作流审核测试1",
"AUDIT1",
"一级审核",
"dd40fcf8-7152-11e7-a9a1-005056b604c3",
"创建人同时提交工作流",
"019328",
"2017-07-26 00:33:36",
"open",
"PMJPA303",
"01",
"0"
],
[
"基础模块",
"PSCS-PM",
"PmTestAuditDC",
"基础工作流审核测试1",
"AUDIT1",
"一级审核",
"c1fe1945-715a-11e7-a9a1-005056b604c3",
"创建人同时提交工作流",
"019328",
"2017-07-26 01:02:49",
"open",
"PMJPA303",
"01",
"0"
],
[
"基础模块",
"PSCS-PM",
"PmTestAuditDC",
"基础工作流审核测试1",
"AUDIT1",
"一级审核",
"8d5bfaba-715a-11e7-a9a1-005056b604c3",
"创建人同时提交工作流",
"019328",
"2017-07-26 01:00:14",
"open",
"PMJPA303",
"01",
"0"
],
[
"基础模块",
"PSCS-PM",
"PmTestAuditDC",
"基础工作流审核测试1",
"AUDIT1",
"一级审核",
"6e33c01f-715a-11e7-a9a1-005056b604c3",
"创建人同时提交工作流",
"019328",
"2017-07-26 00:58:47",
"open",
"PMJPA303",
"01",
"0"
],
[
"基础模块",
"PSCS-PM",
"PmTestAuditDC",
"基础工作流审核测试1",
"AUDIT1",
"一级审核",
"8ed7ec1e-76ab-11e7-b0b4-005056b604c3",
"创建人同时提交工作流",
"019328",
"2017-08-01 19:22:05",
"open",
"PMJPA303",
"01",
"0"
],
[
"基础模块",
"PSCS-PM",
"PmTestAuditDC",
"基础工作流审核测试1",
"AUDIT3",
"三级审核",
"d799ef4c-7296-11e7-a9a1-005056b604c3",
"创建人同时提交工作流",
"019328",
"2017-07-27 18:13:13",
"open",
"PMJPA303",
"01",
"0"
],
[
"寻源模版",
"PSCS-PH",
"PhContract1001",
"合同审核",
"AUDIT2",
"二级审核",
"616227f8-75c1-11e7-a9a1-005056b604c3",
"创建人同时提交工作流",
"019328",
"2017-07-31 15:26:17",
"open",
"PHCTTASK",
"01",
"0"
]
];
var columns = ["categoryName", "categoryKey", "processKey", "processName", "taskDefKey", "taskDefName", "procInstId",
"subject", "assignee", "startTime", "state", "form", "taskType"];
var block = EiBlock.build("result", columns);
block.setRows(rows);
var jsonRows = block.getMappedRows();
*/
/**
* 刷新服务.
*
* @param service 调用的本地service
* @param method 调用本地service的方法
* @param drawfunc 渲染区域的function
* @param info 提交的数据
* @param acceptFail 即使服务调用失败,也调用处理函数
*/
var
refreshService
=
function
(
service
,
method
,
drawfunc
,
info
,
acceptFail
)
{
if
(
!
service
||
!
method
)
{
return
;
}
if
(
!
info
)
{
info
=
new
EiInfo
();
}
EiCommunicator
.
send
(
service
,
method
,
info
,
{
onSuccess
:
function
(
ei
)
{
if
(
!
acceptFail
&&
ei
.
getStatus
()
===
-
1
)
{
// IPLAT.alert('<b>' + ei.getMsg() + '</b>', function (e) {
// }, '警告');
return
false
;
}
if
(
drawfunc
&&
typeof
drawfunc
===
'function'
)
{
drawfunc
(
ei
);
}
},
onFail
:
function
(
errorMsg
,
status
,
e
)
{
// console.error(e);
NotificationUtil
(
errorMsg
,
"error"
);
}
});
};
// 看板id和顺序
var
panelIndex
=
{
"todo"
:
0
,
// 待办
"information"
:
1
,
// 提醒
"trace"
:
2
,
// 跟踪
"record"
:
3
,
// 已办
"notification"
:
4
,
// 通知
"notice"
:
5
,
// 公告
};
// 清除看板和数量
var
clearPanel
=
function
(
id
)
{
if
(
!
id
||
panelIndex
[
id
]
===
undefined
)
{
return
null
;
}
$
(
"#"
+
id
).
html
(
''
);
var
tabElements
=
$
(
"#info-board>ul>li[role='tab']"
);
var
tab
=
tabElements
.
eq
(
panelIndex
[
id
]);
// 如果原来有通知数量,先清除
var
bg
=
tab
.
find
(
'.badge.badge-danger'
);
if
(
bg
)
{
bg
.
remove
();
}
return
tab
;
};
// 绑定刷新链接
var
bandForRefresh
=
function
(
id
,
refreshfunc
)
{
if
(
!
id
||
!
refreshfunc
||
typeof
refreshfunc
!==
'function'
)
{
return
false
;
}
$
(
"#"
+
id
+
" ~ .for-refresh"
).
off
(
"click"
);
$
(
"#"
+
id
+
" ~ .for-refresh"
).
on
(
"click"
,
function
()
{
refreshfunc
();
});
};
// 绑定查看更多链接
var
bandForMore
=
function
(
id
,
form
,
param
)
{
if
(
!
id
||
!
form
)
{
return
false
;
}
$
(
"#"
+
id
+
" ~ .for-more"
).
off
(
"click"
);
$
(
"#"
+
id
+
" ~ .for-more"
).
on
(
"click"
,
function
()
{
IPLAT
.
openForm
(
form
,
param
);
});
};
// 待办
var
tempData
;
var
drawTodo
=
function
(
ei
)
{
//CHG: remove all first 20200217.yanzj
if
(
$
(
'#todo'
).
length
==
0
)
{
//未构造
}
else
if
(
$
(
'#todo'
).
hasClass
(
'todo-empty-node'
))
{
//前一次是空 tabStrip,为新构造 待办构造一个新dom
$
(
'#todo'
).
data
(
'kendoPanelBar'
).
destroy
();
var
joTd
=
$
(
'#todo'
);
joTd
.
after
(
'<ul id="todo"></ul>'
);
joTd
.
remove
();
}
else
if
(
$
(
'#todo'
).
parent
().
data
(
'kendoTabStrip'
))
{
//已经存在 tabStrip,为新构造 待办构造一个新dom
var
joTd
=
$
(
'#todo'
);
joTd
.
closest
(
'.k-tabstrip-wrapper'
).
after
(
'<div><ul id="todo"></ul></div>'
);
joTd
.
parent
().
data
(
'kendoTabStrip'
).
destroy
();
joTd
.
parent
().
remove
();
}
var
tab
=
clearPanel
(
'todo'
);
//刷新按钮绑定事件提前 20200110.yanzj
$
(
"#info-board-1"
).
off
(
"click"
,
".for-refresh"
);
$
(
"#info-board-1"
).
on
(
"click"
,
".for-refresh"
,
function
()
{
refreshTodo
();
});
var
jsonRows
=
ei
.
get
(
'result'
)
||
[];
var
taskCount
=
parseInt
(
jsonRows
.
length
);
if
(
taskCount
===
0
)
{
var
kendoPanelBar
=
$
(
"#todo"
).
kendoPanelBar
({
dataSource
:
{
text
:
'暂无待办任务!'
}
});
$
(
kendoPanelBar
).
addClass
(
'todo-empty-node'
);
//空数据时,标识一下 20200217.yanzj
return
false
;
}
var
modules
=
_
.
groupBy
(
jsonRows
,
"categoryKey"
);
var
processTmpl
=
kendo
.
template
(
$
(
"#process-template"
).
html
());
var
taskTmpl
=
kendo
.
template
(
$
(
"#task-template"
).
html
());
for
(
var
module
in
modules
)
{
// 生成子tab
// var $module = $("<li id='" + module + "' >" + modules[module][0]["categoryName"] +
// "[" + modules[module].length + "]</li>");
var
$panel
=
$
(
'.todo-panel-items.module-'
+
module
);
$panel
=
$panel
.
length
>
0
?
$panel
:
$
(
"<div id='"
+
module
+
"_panelBar' class='i-index-panelbar todo-panel-items module-"
+
module
+
"' />"
);
$
(
"#todo"
).
parent
().
append
(
$panel
);
// $("#todo").append($module);
// $("#todo").append($panel);
var
groups
=
_
.
groupBy
(
modules
[
module
],
function
(
value
)
{
// 按照流程定义和活动Id分组//20200121.CHG: 任务不按角色分组
return
value
[
"processKey"
];
});
var
dataSource
=
_
.
map
(
groups
,
function
(
group
,
key
)
{
var
process
=
{
encoded
:
false
};
// context/web/form
// process["text"] = "您有" + group.length + "个" + group[0]["processName"] + group[0]["taskDefName"];
process
[
"text"
]
=
processTmpl
({
count
:
group
.
length
,
processDefName
:
group
[
0
][
"processDefName"
],
taskName
:
group
[
0
][
"taskName"
],
form
:
group
[
0
][
"form"
],
categoryName
:
modules
[
module
][
0
][
"categoryName"
]
});
process
[
"items"
]
=
_
.
map
(
group
,
function
(
value
)
{
// context/web/form?pid=pid
// return {text: value["subject"]};
return
{
text
:
taskTmpl
({
instSubject
:
value
[
"instSubject"
],
processInstanceId
:
value
[
"processInstanceId"
],
form
:
value
[
"form"
]
}),
encoded
:
false
};
});
return
process
;
});
$panel
.
kendoPanelBar
({
dataSource
:
dataSource
});
setTimeout
(
function
()
{
//刷新父节点,计算panel高度
$panel
.
parent
().
resize
();
},
500
);
// tempData = dataSource;
}
$
(
"#todo"
).
parent
().
kendoTabStrip
({
scrollable
:
{
distance
:
125
}
}).
data
(
"kendoTabStrip"
).
select
(
0
);
$
(
".i-index-process"
).
off
(
"click"
);
$
(
".i-index-process"
).
on
(
"click"
,
function
(
e
)
{
$
(
e
.
currentTarget
).
parent
().
click
();
return
false
;
});
// 渲染待办数量
if
(
tab
&&
taskCount
>
0
)
{
// 显示通知数量
tab
.
append
(
'<span class="badge badge-danger">'
+
taskCount
+
'</span>'
);
}
};
var
refreshTodo
=
function
()
{
// refreshService('KB00WF', 'getTask', drawTodo);
var
Info1
=
new
EiInfo
();
Info1
.
set
(
"userId"
,
loginName
);
Info1
.
set
(
"limit"
,
10
);
// refreshService('EW11', 'getTaskList', drawTodonew, Info1);
};
var
drawTodonew
=
function
(
ei
)
{
if
(
ei
.
extAttr
.
tasks
.
length
==
0
){
var
kendoPanelBar
=
$
(
"#todo"
).
kendoPanelBar
({
dataSource
:
[
{
text
:
'暂无待办任务!'
}
]
});
}
else
{
var
newDataSource
=
[];
for
(
var
i
=
0
;
i
<
ei
.
extAttr
.
tasks
.
length
;
i
++
){
if
(
"docViewFlow"
==
ei
.
extAttr
.
tasks
[
i
].
processKey
){
var
datalist
=
{
text
:
ei
.
extAttr
.
tasks
[
i
].
name
+
":"
+
ei
.
extAttr
.
tasks
[
i
].
businessKey
,
url
:
ctx
+
'/web/EUDC07?'
+
ei
.
extAttr
.
tasks
[
i
].
processInstanceId
}
newDataSource
.
push
(
datalist
)
}
else
{
var
datalist
=
{
text
:
ei
.
extAttr
.
tasks
[
i
].
name
,
url
:
ctx
+
'/web/EWPC01?taskId='
+
ei
.
extAttr
.
tasks
[
i
].
actProcInstanceId
}
newDataSource
.
push
(
datalist
)
}
}
var
kendoPanelBar
=
$
(
"#todo"
).
kendoPanelBar
({
dataSource
:
newDataSource
});
}
bandForMore
(
'todo'
,
'EWPC01'
,
'methodName=query'
);
bandForRefresh
(
'todo'
,
refreshTodo
);
}
//获取提醒中的数据信息 add@20200224.yanzj
var
getInformationSum
=
function
(
ei
)
{
var
info
=
{
sum
:
0
};
var
rows
=
ei
.
getBlock
(
'result'
).
getMappedRows
();
for
(
var
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
var
count
=
(
rows
[
i
].
notifyContent
||
'[0]'
).
replace
(
new
RegExp
(
'.*
\\
[([
\\
d]{1,})
\\
].*'
),
'$1'
);
console
.
log
(
'count :'
,
count
);
info
.
sum
+=
parseInt
(
count
);
}
return
info
;
};
//显示提醒总数 add@20200224.yanzj
var
showInformationSum
=
function
(
tab
,
ei
)
{
if
(
tab
&&
ei
)
{
try
{
var
info
=
getInformationSum
(
ei
);
if
(
info
)
{
tab
.
append
(
'<span class="badge badge-danger">'
+
info
.
sum
+
'</span>'
);
}
}
catch
(
ex
)
{
}
}
};
//给eiInfo 追加工时内容
var
appendWorkHours
=
function
(
oldInfo
)
{
var
defer
=
$
.
Deferred
();
var
info
=
new
EiInfo
();
// EiCommunicator.send("KPPE1700", "getManHour", info, {
/*onSuccess : function(ei) {
try {
if (ei.getStatus() === -1) {// 调用失败
console.error('获取工时信息失败 : ' + ei.getMsg(), ei.getDetailMsg());
defer.resolve(oldInfo);
return;
}
// 添加工时数据
var count = parseInt(oldInfo.get('result-count') || '0');
var resultBlock = oldInfo.getBlock('result');
if (!resultBlock) {
resultBlock = new EiBlock('result');
oldInfo.addBlock(resultBlock);
}
// add rows
var rows = ei.getBlock('result').getMappedRows();
for (var i = 0; i < rows.length; i++) {
if (parseInt(rows[i].notFillManhour) != 0 || parseInt(rows[i].notCommTime) != 0) {//有未填报 或 未提交工时,则认为本周未处理
count++;
}
}
// 添加一行工时新数据
var ridx = resultBlock.getRows().length;
oldInfo.set('result', ridx, 'notifyTitle', 'KPPE1700');
oldInfo.set('result', ridx, 'notifyContent', '您有工时需要填报,共[' + rows.length + ']周');
oldInfo.set('result', ridx, 'eiMetadata', '{}');
oldInfo.set('result-count', count);// 总数修改成新的
// 移动到最前面
var rows = resultBlock.getRows();
var row = rows.splice(rows.length - 1)[0];
rows.splice(0, 0, row);
// 将明细,置于最终的eiInfo中
ei.getBlock('result').getBlockMeta().blockId = 'manhour';
oldInfo.addBlock(ei.getBlock('result'));
} catch (ex) {
console.error('处理工时出错:', ex);
}
defer.resolve(oldInfo);
},
onFail : function(errorMsg, status, e) {
console.error('获取工时出错:', e);
defer.resolve(oldInfo);
}*/
// });
return
defer
.
promise
();
};
// 显示工时明细
var
showManHoursItems
=
function
(
tab
,
ei
)
{
try
{
var
joPanel
=
$
(
'#information'
);
var
joHours
=
null
;
joPanel
.
find
(
'a'
).
each
(
function
()
{
// 找工时项目
if
(
$
(
this
).
attr
(
'href'
).
indexOf
(
'KPPE1700'
)
>
0
)
{
// 工时填报页面
joHours
=
$
(
this
).
closest
(
'li.k-item'
);
}
});
// console.debug(' joHours :', joHours);
if
(
joHours
)
{
// 找到,则处理
joHours
.
addClass
(
'man-hour-li'
);
// 标识出自己这一项
var
manHoursTmpl
=
kendo
.
template
(
$
(
"#manhours-template"
).
html
());
var
txt
=
manHoursTmpl
({
rows
:
ei
.
getBlock
(
'manhour'
).
getMappedRows
()
});
joHours
.
append
(
txt
);
// 添加模板
joHours
.
closest
(
'li'
).
on
(
'click'
,
function
()
{
// 添加展开折叠事件
joHours
.
find
(
'.man-hour-items'
).
toggleClass
(
'hide'
);
});
joHours
.
find
(
'.k-header:first'
).
append
(
'<span class="man-hour-open">展开</span>'
);
//添加可展开提示
}
}
catch
(
ex
)
{
console
.
error
(
'显示工时明细 出错'
,
ex
);
}
};
// 提醒
var
drawInformation
=
function
(
ei
)
{
appendWorkHours
(
ei
).
then
(
function
(
ei
)
{
//添加工时信息
var
tab
=
clearPanel
(
'information'
);
// 提醒数量
var
infoCount
=
parseInt
(
ei
.
get
(
'result-count'
));
if
(
infoCount
===
0
)
{
$
(
"#information"
).
kendoPanelBar
({
dataSource
:
{
text
:
'暂无提醒信息!'
}
});
}
else
{
var
result
=
ei
.
getBlock
(
"result"
).
getMappedRows
();
// 提醒数据
var
informationData
=
[];
// 提醒模板
var
informationTmpl
=
kendo
.
template
(
$
(
"#information-template"
).
html
());
// 构造提醒显示内容
$
.
each
(
result
,
function
(
i
,
n
)
{
informationData
.
push
({
text
:
informationTmpl
(
n
),
encoded
:
false
});
});
// 渲染提醒
$
(
"#information"
).
kendoPanelBar
({
dataSource
:
informationData
});
showInformationSum
(
tab
,
ei
);
//显示提醒总数 add@20200224.yanzj
showManHoursItems
(
tab
,
ei
);
//显示工时明细
}
bandForRefresh
(
'information'
,
refreshInformation
);
});
};
var
refreshInformation
=
function
()
{
// refreshService('KB00WF', 'getBusinessTask', drawInformation, null, true);
// refreshService('KPPE1700', 'getManHour', drawInformation, null, true);
};
// 跟踪
drawTrace
=
function
(
ei
)
{
var
tab
=
clearPanel
(
'trace'
);
// 跟踪数量
var
traceCount
=
parseInt
(
ei
.
get
(
'result-count'
));
if
(
traceCount
===
0
)
{
$
(
"#trace"
).
kendoPanelBar
({
dataSource
:
{
text
:
'暂无跟踪信息!'
}
});
}
else
{
/* TODO 待实现
var result = ei.getBlock("result").getMappedRows();
// 跟踪数据
var traceData = [];
// 跟踪模板
var traceTmpl = kendo.template($("#trace-template").html());
// 构造跟踪显示内容
$.each(result, function(i,n) {
traceData.push({
text: infoTmpl(n),
encoded: false
});
});
// 渲染跟踪
$("#trace").kendoPanelBar({
dataSource: traceData
});
// 渲染跟踪数量
if (traceCount > 0) {
// 显示跟踪数量
tab.append('<span class="badge badge-danger">'+traceCount+'</span>');
}
*/
}
bandForMore
(
'trace'
,
''
,
''
);
bandForRefresh
(
'trace'
,
null
);
};
var
refreshTrace
=
function
()
{
var
info
=
new
EiInfo
();
info
.
set
(
'result-count'
,
0
);
drawTrace
(
info
);
//refreshService('', '', drawTrace);
};
// 已办
var
drawRecord
=
function
(
ei
)
{
var
tab
=
clearPanel
(
'record'
);
// 已办数量
var
recordCount
=
parseInt
(
ei
.
get
(
'result-count'
));
if
(
recordCount
===
0
)
{
$
(
"#record"
).
kendoPanelBar
({
dataSource
:
{
text
:
'暂无已办任务!'
}
});
}
else
{
var
result
=
ei
.
getBlock
(
"result"
).
getMappedRows
();
// 已办数据
var
recordData
=
[];
// 已办模板
var
recordTmpl
=
kendo
.
template
(
$
(
"#record-template"
).
html
());
// 构造已办显示内容
$
.
each
(
result
,
function
(
i
,
n
)
{
var
ar
=
n
.
approvalResult
||
' '
;
var
op
=
n
.
opinion
||
'无'
;
op
=
op
.
trim
()
||
'无'
;
switch
(
ar
)
{
case
'grant'
:
ar
=
'同意'
;
break
;
case
'deny'
:
ar
=
'拒绝'
;
break
;
case
'reject'
:
ar
=
'驳回'
;
break
;
default
:
ar
=
'提交'
;
}
n
.
ar
=
ar
;
n
.
op
=
op
;
n
.
endTime
=
kendo
.
toString
(
kendo
.
parseDate
(
n
.
endTime
,
'yyyyMMddHHmmss'
),
'yyyy-MM-dd HH:mm:ss'
);
recordData
.
push
({
text
:
recordTmpl
(
n
),
encoded
:
false
});
});
// 渲染已办
$
(
"#record"
).
kendoPanelBar
({
dataSource
:
recordData
});
// 渲染已办数量
//if (recordCount > 0) {
// 显示已办数量
// tab.append('<span class="badge badge-danger">'+recordCount+'</span>');
//}
}
// bandForMore('record', 'KB00WF', 'methodName=getHistoryTask');
bandForRefresh
(
'record'
,
refreshRecord
);
};
var
refreshRecord
=
function
()
{
// refreshService('KB00WF', 'getHistoryTask', drawRecord);
};
// 通知
var
drawNotification
=
function
(
ei
)
{
var
tab
=
clearPanel
(
'notification'
);
// 通知数量
var
notifyCount
=
parseInt
(
ei
.
get
(
'count'
));
if
(
notifyCount
===
0
)
{
$
(
"#notification"
).
kendoPanelBar
({
dataSource
:
{
text
:
'暂无未阅通知!'
}
});
}
else
{
var
result
=
ei
.
getBlock
(
"result"
).
getMappedRows
();
// 通知数据
var
notifyData
=
[];
// 通知模板
var
notifyTmpl
=
kendo
.
template
(
$
(
"#notify-template"
).
html
());
// 构造通知显示内容
$
.
each
(
result
,
function
(
i
,
n
)
{
notifyData
.
push
({
text
:
notifyTmpl
(
n
),
encoded
:
false
});
});
// 渲染通知
$
(
"#notification"
).
kendoPanelBar
({
dataSource
:
notifyData
});
// 渲染通知数量
if
(
notifyCount
>
0
)
{
// 显示通知数量
tab
.
append
(
'<span class="badge badge-danger">'
+
notifyCount
+
'</span>'
);
}
// 清除原来的事件
$
(
"#notification"
).
off
(
"click"
,
"[data-notify-guid]"
);
// 重新绑定关闭事件
$
(
"#notification"
).
on
(
"click"
,
"[data-notify-guid]"
,
function
(
e
)
{
var
guid
=
$
(
e
.
target
).
data
(
'notifyGuid'
);
var
rows
=
[{
guid
:
guid
}];
var
info
=
new
EiInfo
();
info
.
set
(
'data'
,
rows
);
// EiCommunicator.send('KBCT00', 'confirm', info, {
// onSuccess: function (ei) {
// if (ei.getStatus() === -1) {
// IPLAT.alert('<b>' + ei.getMsg() + '</b>', function (e) {
// }, '警告');
// return false;
// }
// // IPLAT.alert('通知已读');//20200326.yanzj 领导不想看删除后的提示
// refreshNotification();
// },
// onFail: function (errorMsg, status, e) {
// console.error(e);
// NotificationUtil(errorMsg, "error");
// }
// });
});
}
bandForMore
(
'notification'
,
'KBCT00'
,
'methodName=query'
);
bandForRefresh
(
'notification'
,
refreshNotification
);
};
var
refreshNotification
=
function
()
{
// refreshService('KBCTNotify', 'queryNotification', drawNotification);
};
// 公告
var
drawNotice
=
function
(
ei
)
{
var
tab
=
clearPanel
(
'notice'
);
var
MAX_NOTICE_DISPLAY
=
10
;
var
result
=
ei
.
get
(
"result"
);
// console.debug(JSON.stringify(result, null,2));
// 公告数量
var
noticeCount
=
result
.
length
;
if
(
noticeCount
===
0
)
{
$
(
"#notice"
).
kendoPanelBar
({
dataSource
:
{
text
:
'暂无未阅公告!'
}
});
}
else
{
// 公告数据
var
noticeData
=
[];
// 公告模板
var
noticeHtml
=
kendo
.
template
(
$
(
"#notice-template"
).
html
())({
nodes
:
result
,
encode
:
false
});
$
(
"#notice"
).
append
(
noticeHtml
).
resize
();
$
(
'.slick-notice'
).
css
({
height
:
"100%"
,
overflow
:
"hidden"
});
$
(
'.slick-notice'
).
slick
({
slidesToShow
:
1
,
slidesToScroll
:
1
,
dots
:
true
,
autoplay
:
false
,
autoplaySpeed
:
5000
,
infinite
:
true
,
appendDots
:
$
(
"#i-region-dots-append-notice"
),
dotsClass
:
'slick-dots i-slick-dots'
});
$
(
'#info-board'
).
data
(
'kendoTabStrip'
).
setOptions
({
show
:
function
(
e
)
{
if
(
e
.
contentElement
.
id
===
'info-board-6'
)
{
$
(
'.slick-notice'
)[
0
].
slick
.
refresh
();
}
}
});
// 渲染公告数量
if
(
noticeCount
>
0
)
{
// 显示通知数量
tab
.
append
(
'<span class="badge badge-danger">'
+
noticeCount
+
'</span>'
);
}
$
(
"#notice"
).
off
(
'click'
,
'.notice-close[data-notice-guid]'
);
$
(
"#notice"
).
on
(
'click'
,
'.notice-close[data-notice-guid]'
,
function
(
e
)
{
var
guid
=
$
(
e
.
target
).
data
(
'noticeGuid'
);
console
.
debug
(
'notice.guid'
,
guid
);
var
info
=
new
EiInfo
();
info
.
set
(
'guid'
,
guid
);
// EiCommunicator.send('KBCTNotify', 'closeNotice', info, {
// onSuccess: function (ei) {
// if (ei.getStatus() === -1) {
// IPLAT.alert('<b>' + ei.getMsg() + '</b>', function (e) {
// }, '警告');
// return false;
// }
// refreshNotice();
// },
// onFail: function (errorMsg, status, e) {
// console.error(e);
// NotificationUtil(errorMsg, "error");
// }
// });
});
}
bandForRefresh
(
'notice'
,
refreshNotice
);
};
var
refreshNotice
=
function
()
{
var
info
=
new
EiInfo
();
info
.
set
(
'unread'
,
'true'
);
// refreshService('KBCTNotify', 'queryNotice', drawNotice, info);
};
// 首页消息主看板的Tab的图标的添加
window
.
onload
=
function
()
{
var
data
=
sessionStorage
.
getItem
(
"frameOpenWeb"
);
if
(
data
==
null
||
data
==
""
){
// 准备条数
var
tabElements
=
$
(
"#info-board>.k-tabstrip-items-wrapper.k-hstack>ul>li[role='tab']"
);
var
tabElementsTwo
=
$
(
"#info>.k-tabstrip-items-wrapper.k-hstack>ul>li[role='tab']"
);
// 待办
// tabElements.eq(0).prepend('<span class="k-link k-distance"><span class="index-todo"></span></span>');
// 提醒
tabElements
.
eq
(
1
).
prepend
(
'<span class="k-link k-distance"><span class="index-warn"></span></span>'
);
// 跟踪
//tabElements.eq(2).prepend('<span class="k-link"><span class="index-icon index-follow"></span></span>');
// 已办
// tabElements.eq(3).prepend('<span class="k-link k-distance"><span class="index-record"></span></span>');
// 通知
tabElements
.
eq
(
4
).
prepend
(
'<span class="k-link k-distance"><span class="index-notification"></span></span>'
);
// 公告
tabElements
.
eq
(
5
).
prepend
(
'<span class="k-link k-distance"><span class="index-announcement"></span></span>'
);
// tabElementsTwo.eq(0).prepend('<span class="k-link k-distance"><span class="index-icon-fav index-fav"></span></span>');
// tabElementsTwo.eq(1).prepend('<span class="k-link k-distance"><span class="index-icon-link index-link"></span></span>');
var
tabPanel
=
$
(
'#info-board'
).
data
(
'kendoTabStrip'
);
// 刷新看板数据
// 待办
refreshTodo
();
(
function
()
{
//定时刷新
var
refreshLimits
=
null
;
if
(
needRefresh
)
{
//指定刷新
$
(
'.i-index-todo .refresh-timer'
).
removeClass
(
'hide'
);
try
{
taskRefeshTime
=
IPLAT
.
trimString
(
taskRefeshTime
);
taskRefeshTime
=
taskRefeshTime
==
''
?
5
*
60
*
1000
:
(
taskRefeshTime
*
1
);
refreshLimits
=
refreshLimits
||
taskRefeshTime
;
var
refreshTimmer
=
new
RefreshTimer
().
setLimits
(
refreshLimits
).
setSlice
(
1000
);
$
(
'.i-index-todo .refresh-timer .refresh-limits'
).
text
(
refreshTimmer
.
seconds2Minutes
(
refreshLimits
/
1000
));
var
ticker
=
function
(
refresher
)
{
var
text
=
refreshTimmer
.
seconds2Minutes
(
refresher
.
getSpareSeconds
());
$
(
'.i-index-todo .refresh-timer .spare-seconds'
).
text
(
text
);
};
var
trigger
=
function
(
refresher
)
{
refreshTodo
();
};
refreshTimmer
.
setTicker
(
ticker
).
setTrigger
(
trigger
).
start
();
}
catch
(
ex
)
{
console
.
error
(
ex
);
}
}
})();
// 提醒
refreshInformation
();
// tabPanel.hide(1);
// 跟踪
//refreshTrace();
tabPanel
.
hide
(
1
);
tabPanel
.
hide
(
2
);
tabPanel
.
hide
(
4
);
tabPanel
.
hide
(
5
);
// 已办
refreshRecord
();
// 通知
refreshNotification
();
// 公告
refreshNotice
();
}
function
updateTime
()
{
var
now
=
new
Date
();
var
hours
=
now
.
getHours
().
toString
().
padStart
(
2
,
'0'
);
var
minutes
=
now
.
getMinutes
().
toString
().
padStart
(
2
,
'0'
);
var
seconds
=
now
.
getSeconds
().
toString
().
padStart
(
2
,
'0'
);
document
.
getElementById
(
'usertime'
).
innerHTML
=
hours
+
':'
+
minutes
+
':'
+
seconds
;
}
setInterval
(
updateTime
,
1000
);
};
};
V6Index
.
prototype
.
tabs
=
function
()
{
var
page_list
=
$
(
'#page-list'
).
data
(
'kendoTabStrip'
);
if
(
page_list
)
{
var
contextTab
;
page_list
.
tabGroup
.
on
(
"click"
,
"[data-type='remove']"
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
var
item
=
$
(
e
.
target
).
closest
(
".k-item"
);
var
itemindex
=
item
.
index
();
page_list
.
remove
(
item
.
index
());
if
(
page_list
.
items
().
length
>
0
&&
item
.
hasClass
(
'k-active'
))
{
page_list
.
select
(
itemindex
-
1
);
}
if
(
item
[
0
].
innerText
==
selectedNodeText
){
$
(
"#"
+
treeid
).
data
(
"kendoTreeView"
).
select
(
$
());
}
});
this
.
tabs
=
page_list
;
$
(
"#page-list"
).
on
(
"contextmenu"
,
"li.k-item"
,
function
(
e
)
{
e
.
preventDefault
();
// 阻止默认右键菜单
contextTab
=
$
(
e
.
target
).
closest
(
"li"
);
// 更新选中的 Tab 元素
var
itemindex
=
contextTab
.
index
();
if
(
itemindex
!=
0
){
// 定位右键菜单
var
menu
=
$
(
"#context-menu"
);
menu
.
css
({
left
:
e
.
pageX
,
top
:
e
.
pageY
});
menu
.
show
();
}
});
$
(
"#close-tab"
).
on
(
"click"
,
function
()
{
$
(
"#context-menu"
).
hide
();
var
itemindex
=
contextTab
.
index
();
if
(
page_list
.
items
().
length
>
0
&&
contextTab
.
hasClass
(
'k-active'
))
{
page_list
.
select
(
itemindex
-
1
);
}
if
(
contextTab
)
{
page_list
.
remove
(
contextTab
.
index
());
// 关闭当前页
}
if
(
contextTab
[
0
].
innerText
==
selectedNodeText
){
$
(
"#"
+
treeid
).
data
(
"kendoTreeView"
).
select
(
$
());
}
});
$
(
"#close-all-tabs"
).
on
(
"click"
,
function
()
{
var
tabCount
=
page_list
.
tabGroup
.
children
(
"li"
).
length
;
// 遍历每个选项卡并关闭除第一页以外的所有选项卡
for
(
var
i
=
tabCount
-
1
;
i
>
0
;
i
--
)
{
var
tab
=
page_list
.
tabGroup
.
children
(
"li"
).
eq
(
i
);
page_list
.
remove
(
tab
);
}
$
(
"#context-menu"
).
hide
();
page_list
.
select
(
0
);
$
(
"#"
+
treeid
).
data
(
"kendoTreeView"
).
select
(
$
());
});
$
(
"#close-other-tabs"
).
on
(
"click"
,
function
()
{
var
tabCount
=
page_list
.
tabGroup
.
children
(
"li"
).
length
;
// 遍历每个选项卡并关闭除第一页以外的所有选项卡
for
(
var
i
=
tabCount
-
1
;
i
>
0
;
i
--
)
{
if
(
i
!=
contextTab
.
index
()){
var
tab
=
page_list
.
tabGroup
.
children
(
"li"
).
eq
(
i
);
page_list
.
remove
(
tab
);
}
}
$
(
"#context-menu"
).
hide
();
if
(
page_list
.
items
().
length
>
0
&&
!
contextTab
.
hasClass
(
'k-active'
))
{
page_list
.
select
(
1
);
}
if
(
contextTab
[
0
].
innerText
!=
selectedNodeText
){
$
(
"#"
+
treeid
).
data
(
"kendoTreeView"
).
select
(
$
());
}
});
$
(
"#refresh-tab"
).
on
(
"click"
,
function
()
{
$
(
"#context-menu"
).
hide
();
var
itemindex
=
contextTab
.
index
();
var
currentTab
=
page_list
.
contentElement
(
itemindex
);
// 获取当前 Tab 页内的 iframe 元素
var
iframeElement
=
$
(
currentTab
).
find
(
"iframe"
)[
0
];
// 刷新 iframe 内容
if
(
iframeElement
!=
null
){
iframeElement
.
contentWindow
.
location
.
reload
();
}
});
}
var
data
=
sessionStorage
.
getItem
(
"frameOpenWeb"
);
if
(
data
!=
null
&&
data
!=
""
){
var
tab
=
page_list
.
tabGroup
.
children
(
"li"
).
eq
(
0
);
$
(
'#page-list'
).
data
(
'kendoTabStrip'
).
remove
(
tab
);
}
};
$
(
document
).
on
(
"click "
,
function
(
e
)
{
var
menu
=
$
(
"#context-menu"
);
if
(
e
.
which
===
1
)
{
if
(
!
menu
.
is
(
e
.
target
)
&&
menu
.
has
(
e
.
target
).
length
===
0
)
{
menu
.
hide
();
// 隐藏菜单
}
}
});
window
.
V6Index
=
V6Index
;
V6Index
.
uiLayout
=
uiLayout
;
// 设置人员下拉框中明细信息
var
setUserInfoValue
=
function
(
name
,
obj
,
key
,
value
)
{
var
node
=
$
(
"#user-info-dropdown"
).
find
(
'.detail-info.'
+
name
);
if
(
!
node
||
!
obj
||
!
obj
[
key
]
||
!
obj
[
value
])
{
return
false
;
}
var
display
=
obj
[
key
]
+
' - '
+
obj
[
value
];
node
.
text
(
display
);
};
var
setUserInfoValueByOrg
=
function
(
name
,
obj
,
key
,
value
)
{
var
node
=
$
(
"#user-info-dropdown"
).
find
(
'.detail-info.'
+
name
);
if
(
!
node
||
!
obj
||
!
obj
[
key
]
||
!
obj
[
value
])
{
return
false
;
}
if
(
name
.
indexOf
(
"-oth"
)
===
-
1
)
{
var
display
=
obj
[
key
];
node
.
text
(
display
);
}
else
{
var
display
=
obj
[
value
];
node
.
text
(
display
);
}
};
// 设置人员组织机构信息
var
setUserOrg
=
function
(
obj
)
{
setUserInfoValue
(
'user-org'
,
obj
,
'orgEname'
,
'orgCname'
);
// 附加设置代理委托用户
var
node
=
$
(
"#user-info-dropdown"
).
find
(
'.delegate-user'
);
if
(
!
node
)
{
return
false
;
}
else
if
(
!
obj
||
!
obj
.
delegateLoginName
||
!
obj
.
delegateLoginName
.
trim
())
{
node
.
text
(
''
);
return
false
;
}
node
.
text
(
'['
+
obj
.
delegateLoginName
+
'-'
+
obj
.
delegateUserName
+
']'
);
$
(
'.change-password'
).
remove
();
};
// 设置人员公司别账套信息
var
selectAccountSet
=
function
(
accountSetObj
)
{
setUserInfoValue
(
'user-company'
,
accountSetObj
,
'companyCode'
,
'companyName'
);
setUserInfoValue
(
'user-accountset'
,
accountSetObj
,
'accountSet'
,
'accountSetName'
);
$
(
'#header-navbar>ul.pull-right>li[data-accountset]>a>span'
).
text
(
accountSetObj
.
accountSetName
);
setTimeout
(
function
()
{
V6Index
.
prototype
.
meet
();
},
200
);
};
// 设置人员业务组织机构信息
var
selectOrg
=
function
(
data
,
blockId
)
{
// console.debug(blockId, data);
if
(
blockId
)
{
setUserInfoValueByOrg
(
'user-'
+
blockId
+
'-org'
,
data
,
'orgEname'
,
'orgCname'
);
setUserInfoValueByOrg
(
'user-'
+
blockId
+
'-org-oth'
,
data
,
'orgEname'
,
'orgCname'
);
}
};
// 打开公司别、账套选择弹框
var
openAccountSet
=
function
(
type
)
{
wChangeUserInfoWindow
.
content
(
''
);
wChangeUserInfoWindow
.
setOptions
({
// 打开是刷新
open
:
function
()
{
wChangeUserInfoWindow
.
refresh
({
url
:
IPLATUI
.
CONTEXT_PATH
+
'/web/KB00?methodName=query'
});
if
(
type
===
'auto'
)
{
wChangeUserInfoWindow
.
element
.
siblings
().
find
(
'div.k-window-actions'
).
hide
();
}
else
{
wChangeUserInfoWindow
.
element
.
siblings
().
find
(
'div.k-window-actions'
).
show
();
}
},
height
:
"50%"
});
wChangeUserInfoWindow
.
open
().
center
();
};
// 打开业务组织机构选择弹框
var
openOrg
=
function
(
type
)
{
wChangeUserInfoWindow
.
content
(
''
);
wChangeUserInfoWindow
.
setOptions
({
// 打开是刷新
open
:
function
()
{
wChangeUserInfoWindow
.
refresh
({
url
:
IPLATUI
.
CONTEXT_PATH
+
'/web/KB01?methodName=query&inqu_status-0-type='
+
type
});
},
height
:
"80%"
});
wChangeUserInfoWindow
.
open
().
center
();
};
$
.
extend
(
window
,
{
setUserOrg
:
setUserOrg
,
selectAccountSet
:
selectAccountSet
,
selectOrg
:
selectOrg
,
openAccountSet
:
openAccountSet
,
openOrg
:
openOrg
//refreshNotify: refreshNotify
});
$
(
window
).
load
(
function
(
elementId
)
{
var
data
=
sessionStorage
.
getItem
(
"frameOpenWeb"
);
if
(
data
!=
null
&&
data
!=
""
){
var
formCname
=
sessionStorage
.
getItem
(
"frameOpenCname"
);
$
(
'#page-list'
).
data
(
'kendoTabStrip'
).
addTab
({
title
:
formCname
,
url
:
IPLAT
.
createUrl
(
data
),
urlFlag
:
false
,
mode
:
"tabView"
});
$
(
'#page-list'
).
data
(
'kendoTabStrip'
).
select
(
0
);
}
$
(
"#user-info-dropdown"
).
on
(
"click"
,
"[data-stopPropagation]"
,
function
(
e
)
{
e
.
stopPropagation
();
});
// 切换账套按钮
$
(
"#header-navbar"
).
on
(
"click"
,
"[data-accountset]"
,
function
(
e
)
{
openAccountSet
(
'manual'
);
});
$
(
"#user-info-dropdown"
).
on
(
"click"
,
"[data-accountset]"
,
function
(
e
)
{
openAccountSet
(
'manual'
);
});
// 切换组织按钮
$
(
"#user-info-dropdown"
).
on
(
"click"
,
"[data-org]"
,
function
(
e
)
{
openOrg
(
$
(
this
).
data
(
'org'
));
});
// refreshNotify();
$
(
"#user-info-dropdown"
).
on
(
"click"
,
".k-link.user-name"
,
function
(
e
)
{
IPLAT
.
confirm
({
message
:
'<b>切换代理将<span style="color: #ff0000">关闭</span>所有已打开的画面<br>确定执行该操作吗?</b>'
,
okFn
:
function
(
e
)
{
window
.
location
.
href
=
IPLATUI
.
CONTEXT_PATH
+
'/web/KB00DL?methodName=query'
;
},
cancelFn
:
function
(
e
)
{
},
title
:
'确认对话框'
});
});
var
info
=
new
EiInfo
();
info
.
set
(
"result-limit"
,
100
);
EiCommunicator
.
send
(
"EDFA63"
,
"query"
,
info
,
{
onSuccess
:
function
(
eiInfo
)
{
var
status
=
eiInfo
.
getStatus
();
var
item
=
eiInfo
.
getBlock
(
"result"
).
getMappedRows
();
var
page
=
''
;
if
(
item
.
length
>
0
)
{
for
(
var
i
=
0
;
i
<
item
.
length
;
i
++
)
{
var
iconAddress
=
"roc"
+
item
[
i
][
'iconAddress'
];
var
iconParam
=
item
[
i
][
'iconParam'
];
var
pageCname
=
item
[
i
][
'pageCname'
];
var
url
=
item
[
i
][
'url'
];
page
=
page
+
" <div class='dashboard_item' data-iconUrl='"
+
url
+
"' data-pageCname='"
+
pageCname
+
"'> <span class='rocIcon "
+
iconAddress
+
"' style='display:block;height:50px;font-size: 50px;color: "
+
iconParam
+
"'></span>
\
n"
+
" <p >"
+
pageCname
+
"</p></div>"
;
}
}
var
contain
=
document
.
getElementById
(
"dashboard"
);
if
(
contain
!=
null
){
contain
.
innerHTML
=
page
;
}
$
(
".dashboard_item"
).
on
(
"click"
,
function
()
{
let
pageurl
=
this
.
getAttribute
(
'data-iconUrl'
);
let
pageCname
=
this
.
getAttribute
(
'data-pageCname'
);
indexOpenForm
(
pageurl
,
pageCname
)
});
},
onFail
:
function
(
eMsg
)
{
}
});
// 对于超长的 菜单项,显示叠层
(
function
()
{
// 构造
var
MENU_ITEM_TITLE
=
'cls-menu-item-title'
;
var
joParent
=
null
;
var
joTitle
=
$
(
'.'
+
MENU_ITEM_TITLE
);
// 添加动态显示条
if
(
joTitle
.
length
==
0
)
{
joTitle
=
$
(
'<span class="'
+
MENU_ITEM_TITLE
+
' left-hide"></span>'
);
joParent
=
joParent
||
$
(
'#page-container'
);
joParent
.
append
(
joTitle
);
}
// 检查,项目是否被覆盖
var
checkItemCovered
=
function
(
joItem
)
{
var
maxWidth
=
$
(
'#iplat-menu'
).
width
();
var
titleWith
=
$
(
'.'
+
MENU_ITEM_TITLE
).
width
()
+
28
+
2
;
// 文本内容 + padding + 线宽
var
titleLeft
=
joItem
.
find
(
'.k-in:last'
).
offset
().
left
;
// 真实项目的左偏移
if
(
titleLeft
+
titleWith
>
maxWidth
)
{
return
true
;
}
return
false
;
};
// 显示
var
showItemTitle
=
function
(
joItem
)
{
var
offset
=
joItem
.
find
(
'.k-in:first'
).
offset
();
joTitle
.
text
(
joItem
.
find
(
'.k-in:first'
).
text
());
if
(
checkItemCovered
(
joItem
))
{
joTitle
.
css
({
left
:
offset
.
left
-
1
,
// 减边框宽度
top
:
offset
.
top
});
joTitle
.
removeClass
(
'left-hide'
);
}
};
// 隐藏
var
hideItemTitle
=
function
(
joItem
)
{
joTitle
.
addClass
(
'left-hide'
);
};
$
(
'#iplat-menu'
).
on
(
'mouseover'
,
'ul.k-group > li.k-item'
,
function
(
e
)
{
var
joItem
=
$
(
e
.
target
).
closest
(
'.k-item'
);
// 显示
try
{
showItemTitle
(
joItem
);
}
catch
(
ex
)
{
}
});
$
(
'#iplat-menu'
).
on
(
'mouseout'
,
'ul.k-group > li.k-item'
,
function
(
e
)
{
var
joItem
=
$
(
e
.
target
).
closest
(
'.k-item'
);
try
{
hideItemTitle
(
joItem
);
}
catch
(
ex
)
{
}
});
})();
if
(
SideBarIsMini
){
App
.
layout
(
"sidebar_mini_toggle"
);
}
});
/**
* 定时刷新器.
*/
var
RefreshTimer
=
function
()
{
this
.
_start
=
null
;
this
.
_slicer
=
null
;
this
.
_slice
=
null
;
this
.
_limits
=
null
;
this
.
_trigger
=
null
;
};
RefreshTimer
.
prototype
=
{
setTicker
:
function
(
ticker
)
{
this
.
_ticker
=
ticker
;
return
this
;
},
setSlice
:
function
(
slice
)
{
this
.
_slice
=
slice
;
return
this
;
},
getSpareSeconds
:
function
()
{
return
parseInt
((
this
.
_start
+
this
.
_limits
-
new
Date
().
getTime
())
/
1000
)
+
1
;
},
setLimits
:
function
(
limits
)
{
this
.
_limits
=
limits
;
return
this
;
},
setTrigger
:
function
(
trigger
)
{
this
.
_trigger
=
trigger
;
return
this
;
},
seconds2Minutes
:
function
(
seconds
)
{
var
min
=
parseInt
(
seconds
/
60
);
var
sec
=
parseInt
(
seconds
%
60
);
var
text
=
(
min
<
10
?
'0'
:
''
)
+
min
+
':'
+
(
sec
<
10
?
'0'
:
''
)
+
sec
;
return
text
;
},
startTicker
:
function
()
{
var
that
=
this
;
var
loop
=
function
()
{
if
(
$
.
isFunction
(
that
.
_ticker
))
{
try
{
that
.
_ticker
(
that
);
}
catch
(
ex
)
{
}
}
};
this
.
_sliceTimer
=
setInterval
(
loop
,
this
.
_slice
);
},
start
:
function
()
{
var
that
=
this
;
this
.
_start
=
new
Date
().
getTime
();
var
loop
=
function
()
{
that
.
_start
=
new
Date
().
getTime
();
if
(
$
.
isFunction
(
that
.
_trigger
))
{
try
{
that
.
_trigger
(
that
);
}
catch
(
ex
)
{
}
}
setTimeout
(
loop
,
that
.
_limits
);
};
setTimeout
(
loop
,
this
.
_limits
);
this
.
startTicker
();
}
};
// App.layout("sidebar_mini_toggle");
})(
jQuery
,
_
);
$
(
function
()
{
var
taskCount
=
0
;
if
(
taskCount
===
0
)
{
var
kendoPanelBar
=
$
(
"#todo"
).
kendoPanelBar
({
dataSource
:
[
{
text
:
'暂无待办任务!'
}
]
});
}
var
recordCount
=
0
;
if
(
recordCount
===
0
)
{
$
(
"#record"
).
kendoPanelBar
({
dataSource
:
[
{
text
:
'暂无已办任务!'
}
]
});
}
var
notifyCount
=
0
;
if
(
notifyCount
===
0
)
{
$
(
"#notification"
).
kendoPanelBar
({
dataSource
:
[
{
text
:
'暂无未阅通知!'
}
]
});
}
var
noticeCount
=
0
;
if
(
noticeCount
===
0
)
{
$
(
"#notice"
).
kendoPanelBar
({
dataSource
:
{
text
:
'暂无未阅公告!'
}
});
}
})
function
timedisplay
()
{
var
element
=
document
.
getElementById
(
'usertime'
);
var
style
=
window
.
getComputedStyle
(
element
);
var
display
=
style
.
getPropertyValue
(
'display'
);
if
(
display
==
"inline"
){
element
.
style
.
display
=
"none"
;
}
else
if
(
display
==
"none"
){
element
.
style
.
display
=
"inline"
;
}
}
function
getopenType
(
type
)
{
var
result
=
"newWindow"
;
switch
(
type
)
{
case
"1"
:
result
=
"newWindow"
;
break
;
case
"2"
:
result
=
"tabView"
;
break
;
case
"3"
:
result
=
"thisWindow"
;
break
;
}
return
result
;
}
var
indexOpenForm
=
function
(
url
,
cname
)
{
var
defaultMode
=
'newWindow'
;
var
mode
=
$
(
'#toggle-view-mode'
).
data
(
'mode'
)
||
defaultMode
;
if
(
mode
==
"newWindow"
){
window
.
open
(
url
)
}
else
{
let
tab
=
$
(
'#page-list'
).
data
(
'kendoTabStrip'
);
let
tabTarget
;
for
(
var
i
=
0
;
i
<
tab
.
tabGroup
.
children
().
length
;
i
++
)
{
if
(
tab
.
tabGroup
.
children
()[
i
].
innerText
==
cname
)
{
tabTarget
=
tab
.
tabGroup
.
children
()[
i
];
break
;
}
}
if
(
tabTarget
==
null
)
{
tab
.
addTab
({
title
:
cname
,
url
:
url
,
urlFlag
:
false
,
mode
:
"tabView"
});
}
else
{
//模拟点击事件切换tab标签
tabTarget
.
click
();
}
}
}
function
changepassword
(
formEname
,
formCname
){
layx
.
iframe
(
formEname
,
formCname
,
'./web/'
+
formEname
,{
moveLimit
:{
leftOut
:
false
,
rightOut
:
false
,
topOut
:
false
,
bottomOut
:
false
,
},
escKey
:
false
,
dragInTopToMax
:
false
,
// border:false,
// skin:windtheme,
});
}
src/main/resources/META-INF/resources/iPlatV7-index.jsp
0 → 100644
View file @
c040081b
<!DOCTYPE html>
<
%@
page
contentType=
"text/html; charset=UTF-8"
%
>
<
%@
page
import=
"com.baosight.iplat4j.core.FrameworkInfo"
%
>
<
%@
page
import=
"com.baosight.iplat4j.core.ei.EiConstant"
%
>
<
%@
page
import=
"com.baosight.iplat4j.core.ei.EiInfo"
%
>
<
%@
page
import=
"com.baosight.iplat4j.core.ioc.spring.PlatApplicationContext"
%
>
<
%@
page
import=
"com.baosight.iplat4j.core.log.Logger"
%
>
<
%@
page
import=
"com.baosight.iplat4j.core.log.LoggerFactory"
%
>
<
%@
page
import=
"com.baosight.iplat4j.core.security.SecurityTokenFilter"
%
>
<
%@
page
import=
"com.baosight.iplat4j.core.service.soa.XServiceManager"
%
>
<
%@
page
import=
"org.apache.commons.lang.StringUtils"
%
>
<
%@
page
import=
"com.baosight.iplat4j.core.web.threadlocal.UserSession"
%
>
<
%@
page
import=
"com.baosight.iplat4j.core.service.soa.XLocalManager"
%
>
<
%@
page
import=
"com.baosight.iplat4j.ed.service.PlatApplicationDynamicContext"
%
>
<
%@
taglib
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%
>
<
%@
taglib
prefix=
"EF"
tagdir=
"/WEB-INF/tags/EF"
%
>
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<
%
UserSession
.
web2Service
(
request
);
String
userName =
UserSession.getLoginCName();
String
loginName =
UserSession.getLoginName();
request
.
setAttribute
("
userName
",
userName
);
request
.
setAttribute
("
loginName
",
loginName
);
String
efSecurityToken =
null;
Boolean
SideBarIsMini =
PlatApplicationContext.getProperty("SideBarIsMini")==null?false:
Boolean
.
valueOf
(
PlatApplicationContext
.
getProperty
("
SideBarIsMini
"));
if
(
PlatApplicationContext
.
containsBean
("
securityTokenFilter
"))
{
SecurityTokenFilter
securityTokenFilter =
(SecurityTokenFilter)
PlatApplicationContext
.
getBean
("
securityTokenFilter
");
efSecurityToken =
securityTokenFilter.getSecurityToken(request);
}
//
获取
iPlatUI
静态资源地址
String
iPlatStaticURL =
FrameworkInfo.getPlatStaticURL(request);
//
获取
Context
根路径,考虑到分布式部署的场景,不能直接使用
WebContext
String
iPlatContext =
FrameworkInfo.getPlatWebContext(request);
String
theme =
org.apache.commons.lang.StringUtils.defaultIfEmpty(PlatApplicationContext.getProperty("theme"),"ant");
boolean
hasTheme =
false;
Cookie
[]
cookies =
request.getCookies();
//
防止匿名访问页面无
cookie
信息
if
(
null
!=
cookies
)
{
for
(
Cookie
cookie
:
cookies
)
{
if
(("
iplat
.
theme
").
equals
(
cookie
.
getName
()))
{
hasTheme =
true;
theme =
cookie.getValue();
break
;
}
}
}
if
(!
hasTheme
)
{
EiInfo
eiInfo =
new
EiInfo
();
final
Logger
logger =
LoggerFactory.getLogger(this.getClass());
//
获取主题服务
try
{
eiInfo
.
set
(
EiConstant
.
serviceName
,
"
EDFA61
");
eiInfo
.
set
(
EiConstant
.
methodName
,
"
getUserStyle
");
EiInfo
outInfo =
XLocalManager.call(eiInfo);
//
获取个人自定义配置主题
String
styleEname =
(String)
outInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getCell
(
0
,
"
style_ename
");
if
(
StringUtils
.
isNotEmpty
(
styleEname
))
{
theme =
styleEname;
}
}
catch
(
Exception
e
)
{
logger
.
error
("无法获取页面主题",
e
);
}
}
String
loadingIcon=
StringUtils.defaultIfEmpty(PlatApplicationContext.getProperty("iplat4j.ui.loading.iconConfig"),
"
default
");
//
获取首页菜单目录初始化参数
String
menuRoot =
null;
try
{
String
projectName =
PlatApplicationContext.getProperty("projectName");
String
moduleName =
PlatApplicationContext.getProperty("moduleName");
if
(
null
!=
projectName
&&
null
!=
moduleName
)
{
EiInfo
eiInfo =
new
EiInfo
();
eiInfo
.
set
(
EiConstant
.
serviceId
,
"
S_ED_21
");
eiInfo
.
set
("
project
",
projectName
.
toUpperCase
());
eiInfo
.
set
("
module
",
moduleName
.
toUpperCase
());
eiInfo
.
set
("
key
",
"
menuRoot
");
EiInfo
outInfo =
XServiceManager.call(eiInfo);
if
("".
equals
(
outInfo
.
get
("
menuRoot
"))
||
"
".
equals
(
outInfo
.
get
("
menuRoot
"))
||
null =
=
outInfo
.
get
("
menuRoot
"))
{
menuRoot =
"root"
;
}
else
{
menuRoot =
(String)
outInfo
.
get
("
menuRoot
");
}
}
}
catch
(
Exception
e
)
{
final
Logger
logger =
LoggerFactory.getLogger("index");
logger
.
error
("无法获取首页菜单目录",
e
);
}
request
.
setAttribute
("
menuRoot
",
menuRoot
);
//
获取首页
APM
指标刷新间隔参数(
min
)
String
apmRefresh =
PlatApplicationContext.getProperty("apmRefresh").isEmpty()
?
"
5
"
:
PlatApplicationContext
.
getProperty
("
apmRefresh
");
request
.
setAttribute
("
apmRefresh
",
apmRefresh
);
String
projectCname =
FrameworkInfo.getProjectCname();
String
projectTypeDesc =
FrameworkInfo.getProjectTypeDesc();
%
>
<c:set
var=
"ctx"
value=
"<%=iPlatContext%>"
/>
<c:set
var=
"iPlatStaticURL"
value=
"<%=iPlatStaticURL%>"
/>
<c:set
var=
"theme"
value=
"<%=theme%>"
scope=
"session"
/>
<c:set
var=
"loadingIcon"
value=
"<%=loadingIcon%>"
scope=
"session"
/>
<c:set
var=
"SideBarIsMini"
value=
"<%=SideBarIsMini%>"
/>
<c:set
var=
"loginName"
value=
"<%=loginName%>"
/>
<!--[if IE 9]>
<html class="ie9 no-focus" xmlns="http://www.w3.org/1999/xhtml">
<![endif]-->
<!--[if gt IE 9]><!-->
<html
class=
"no-focus"
xmlns=
"http://www.w3.org/1999/xhtml"
>
<!--<![endif]-->
<head>
<meta
charset=
"utf-8"
/>
<meta
name=
"robots"
content=
"noindex, nofollow"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
/>
<meta
http-equiv=
"Cache-Control"
content=
"public"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1,maximum-scale=1.0"
/>
<
%
if
(
StringUtils
.
isNotEmpty
(
projectCname
)
&&
StringUtils
.
isNotEmpty
(
projectTypeDesc
))
{
%
>
<title><
%=
projectCname
%
>
[
<
%=
projectTypeDesc
%
>
]首页
</title>
<
%
}
else
{
%
>
<title>
首页
</title>
<
%
}
%
>
<
%@
include
file=
"/WEB-INF/fragments/kendo-ui-css.tagf"
%
>
<link
rel=
"shortcut icon"
href=
"${iPlatStaticURL}/iplat.ico"
type=
"image/x-icon"
>
<
%
--
<
link
href=
"${iPlatStaticURL}/iPlatV7-index.css"
rel=
"stylesheet"
type=
"text/css"
/>
--%>
<link
rel=
"stylesheet"
href=
"${iPlatStaticURL}/iplatui/assets/js/plugins/slick/slick.min.css"
>
<link
rel=
"stylesheet"
href=
"${iPlatStaticURL}/iplatui/assets/js/plugins/slick/slick-theme.min.css"
onload=
"this.rel='stylesheet'"
rel=
"preload"
as=
"style"
>
<script
src=
"${iPlatStaticURL}/kendoui/js/jquery.min.js"
></script>
<script
src=
"${iPlatStaticURL}/kendoui/js/kendo.all.min.js"
></script>
<script
src=
"${iPlatStaticURL}/kendoui/js/messages/kendo.messages.zh-CN.min.js"
defer
></script>
<script
src=
"${iPlatStaticURL}/kendoui/js/cultures/kendo.culture.zh-CN.min.js"
></script>
<script
src=
"${iPlatStaticURL}/iplatui/js/lib/underscore.min.js"
></script>
<script
src=
"${iPlatStaticURL}/iplatui/js/lib/echarts.min.js"
defer
></script>
<!--[if lte IE 8]>
<link href="${iPlatStaticURL}/iPlatV7-index-ie.css" rel="stylesheet" type="text/css"/>
<![endif]-->
<script
src=
"${iPlatStaticURL}/iplatui/js/iplat.ui.config.js"
></script>
<script
src=
"${iPlatStaticURL}/iplatui/assets/js/plugins/slick/slick.min.js"
></script>
<script>
IPLATUI
.
CONTEXT_PATH
=
"${ctx}"
;
var
taskRefeshTime
=
"${taskRefeshTime}"
;
var
needRefresh
=
"${needRefresh}"
==
'true'
;
</script>
<script
src=
"${iPlatStaticURL}/iplatui/assets/js/iplat.ui.bootstrap.min.js"
></script>
<script
src=
"${iPlatStaticURL}/iplatui/js/iplat.ui.min.js"
></script>
<script
src=
"${iPlatStaticURL}/iPlatV7-index.js"
></script>
<
%
--
<
link
href=
"${iPlatStaticURL}/Layx/layx.css"
rel=
"stylesheet"
type=
"text/css"
/>
--%>
<
%
--
<
script
src=
"${iPlatStaticURL}/Layx/layx.js"
type=
"text/javascript"
></script>
--%>
<
%
--
<
script
src=
"${iPlatStaticURL}/EM/NT/websocket.js"
></script>
--%>
</head>
<body
class=
"i-theme-${theme}"
>
<div
id=
"iplatV6index"
style=
"height: 100%"
>
<ul
id=
"context-menu"
class=
"dropdown-menu"
>
<li><a
href=
"#"
id=
"close-tab"
>
关闭当前页
</a></li>
<li><a
href=
"#"
id=
"close-all-tabs"
>
关闭所有页
</a></li>
<li><a
href=
"#"
id=
"close-other-tabs"
>
关闭其他页
</a></li>
<li><a
href=
"#"
id=
"refresh-tab"
>
刷新当前页
</a></li>
</ul>
<div
id=
"page-container"
class=
"i-index-content sidebar-l sidebar-o side-scroll header-navbar-fixed"
>
<input
type=
"hidden"
id=
"efSecurityToken"
value=
"<%=efSecurityToken%>"
/>
<div
id=
"sidebar"
>
<div
class=
"sidebar-content"
>
<!-- Side Header -->
<div
class=
"side-header"
>
<img
src=
"${ctx}/hpjx-logo.png"
style=
"width:200px;height:55px;background-image: none;"
/>
<
%
--
<
span
class=
"logo"
></span>
--%>
<
%
--
<
span
class=
"projectType"
>
[
<
%=
projectTypeDesc
%
>
]
</span>
--%>
</div>
<!-- END Side Header -->
<!-- Side Content -->
<div
id=
"iplat-menu"
class=
"side-content"
>
</div>
<div
id=
"side-toggle"
class=
"side-content-toggle"
>
<span
class=
"hide-mini fa fa-thumb-tack"
></span>
<span
class=
"hide-normal fa fa-bars"
></span>
</div>
<!-- END Side Content -->
</div>
<!-- Sidebar Content -->
</div>
<div
id=
"header-navbar"
>
<ul
class=
"nav-header pull-right"
>
<
%
--
<
li
style=
"margin-right: 0"
><a
href=
"#"
class=
"fa fa-search"
>
<span
style=
"margin-left:3px"
>
搜索
</span></a>
</li>
--%>
<li
class=
"search-input"
>
<input
id=
"inqu_status-0-form_ename"
name=
"inqu_status-0-form_ename"
placeholder=
"请输入页面号|页面中文名"
>
<i
class=
"fa fa-search iconPosition"
></i>
</li>
<li
id=
"user-time-region"
>
<a
href=
"#"
class=
"fa fa-clock-o"
id=
"user-time"
onclick=
"timedisplay()"
>
<span
id=
"usertime"
>
00:00:00
</span>
</a>
</li>
<li
id=
"user-info-dropdown"
>
<a
href=
"#"
class=
"fa fa-user"
id=
"user-info"
data-toggle=
"dropdown"
aria-expanded=
"true"
>
<span><
%=
userName
%
></span>
</a>
<
%
--DAM
包中使用
--
%
>
<
%
--
<
ul
class=
"dropdown-menu dropdown-menu-right"
>
--%>
<
%
--
<
li
>
--%>
<
%
--
<
a
id=
'myInfo'
href=
"#"
>
--%>
<
%
--
<
i
class=
"fa fa-user"
style=
"margin-right: 5px"
></i>
--%>
<
%
--
我的信息</
a
>
--%>
<
%
--
</
li
>
--%>
<
%
--
<
li
class=
"divider"
></li>
--%>
<
%
--
<
li
><a
id=
'modifiedPassWord'
href=
"#"
><i
class=
"fa fa-pencil-square-o"
--
%
>
<
%
--style=
"margin-right: 5px"
></i>
修改密码
</a></li>
--%>
<
%
--
<
li
class=
"divider"
></li>
--%>
<
%
--
</
ul
>
--%>
<
%
--DAM
包中注释掉此段
ul
开始
--
%
>
<
%
--
<
ul
class=
"dropdown-menu dropdown-menu-right profile"
data-stopPropagation=
"true"
>
<span
class=
"dropdown-triangle"
></span>
<li>
<div
class=
"info-title"
>
<span
class=
"user-name"
>
${userName}
</span>
<span
class=
"information"
>
工号:
</span>
<span
class=
"detail-info"
>
${userId}
</span>
<span
class=
"information"
>
区域:
</span>
<span
class=
"detail-info"
></span>
<a
class=
"k-link change-password"
target=
"_blank"
href=
"${ctx}/web/XS0104"
>
修改密码
</a>
</div>
</li>
<li>
<div>
<span
class=
"information"
>
岗号:
</span>
<span
class=
"detail-info"
></span>
</div>
</li>
<li>
<div>
<span
class=
"information"
>
部门:
</span>
<span
class=
"detail-info"
></span>
</div>
</li>
<li>
<div>
<span
class=
"information"
>
领用账套:
</span>
<span
class=
"detail-info"
></span>
</div>
</li>
<li>
<div>
<span
class=
"information"
>
采购账套:
</span>
<span
class=
"detail-info"
></span>
</div>
</li>
<li>
<div>
<span
class=
"information i-last"
>
采购组织:
</span>
<span
class=
"detail-info"
></span>
</div>
</li>
<li
class=
"divider"
></li>
<li>
<div>
<span
class=
"information i-first"
>
联系方式:
</span>
<span
class=
"detail-info"
></span>
</div>
</li>
<li>
<div>
<span
class=
"information"
>
邮件:
</span>
<span
class=
"detail-info"
></span>
</div>
</li>
<li>
<div>
<span
class=
"information"
>
地址:
</span>
<span
class=
"detail-info"
></span>
</div>
</li>
</ul>
--%>
<div
class=
"dropdown-menu dropdown-menu-right profile"
data-stopPropagation=
"true"
>
<span
class=
"dropdown-triangle"
></span>
<div
class=
"fl"
>
<div
class=
"headPortrait"
>
<img
src=
"iplatui/img/index/headPortrait.png"
alt=
"headPortrait"
>
</div>
<div>
<ul
class=
"personal-information"
>
<li
class=
"userName"
>
<span>
${userName}
</span>
</li>
<li>
<span
class=
"job-number"
>
工号:
</span>
<span>
${loginName}
</span>
</li>
<li>
<span
class=
"information"
>
组织机构:
</span>
<span
class=
"detail-info user-org"
></span>
</li>
<
%
--
<
li
data-accountset=
"true"
>
<span
class=
"information k-link change-org"
>
公司别:
</span>
<span
class=
"detail-info user-company"
></span>
</li>
<li
data-accountset=
"true"
>
<span
class=
"information k-link change-org"
>
账套:
</span>
<span
class=
"detail-info user-accountset"
></span>
</li>
--%>
</ul>
</div>
<c:choose>
<c:when
test=
"${loginName == 'admin'}"
>
<div
class=
"change-password"
style=
"right: 80px;"
>
<a
href=
"javascript:void(0)"
onclick=
"changepassword('XS0108','重置密码')"
>
重置密码
</a>
</div>
</c:when>
</c:choose>
<div
class=
"change-password"
>
<a
href=
"javascript:void(0)"
onclick=
"changepassword('XS0104','修改密码')"
>
修改密码
</a>
</div>
</div>
<
%
--
<
div
class=
"cut-off-rule"
></div>
--%>
<div>
<ul
class=
"fl left-distance"
>
</ul>
</div>
</div>
<
%
--DAM
包中注释掉此段
ul
结束
--
%
>
</li>
<li
id=
"toggle-view-mode"
>
<a
href=
"#"
class=
"fa fa-files-o"
id=
"new-window-view"
>
<span
data-toggle=
"tooltip"
data-placement=
"bottom"
data-original-title=
"在新窗口中打开页面"
>
多页展示
</span>
</a>
<a
href=
"#"
class=
"fa fa-file-o"
id=
"tab-view"
style=
"display: none"
>
<span
data-toggle=
"tooltip"
data-placement=
"bottom"
data-original-title=
"在当前窗口中打开页面"
>
单页展示
</span>
</a>
</li>
<li>
<a
class=
"logout"
href=
"login.jsp"
data-toggle=
"tooltip"
data-placement=
"bottom"
data-original-title=
"注销"
>
<i
class=
"fa fa-sign-out"
></i>
</a>
</li>
</ul>
<ul
class=
"nav-header pull-left"
>
</ul>
</div>
<div
id=
"main-container"
class=
"main-content"
style=
"height: 100%"
>
<EF:EFTab
id=
"page-list"
showClose=
"false"
active=
"0"
>
<div
title=
"首页"
style=
"padding-top: 8px;padding-left: 10px;"
>
<div
class=
"row"
>
<div
class=
"col-sm-9 i-index-todo i-index-top"
>
<EF:EFTab
id=
"info-board"
class=
"i-index-top"
>
<div
class=
"i-index-tab"
title=
"待办"
>
<div
id=
"todo"
>
</div>
<a
class=
"for-more"
><i
class=
"fa fa-angle-double-right"
></i>
查看更多
</a>
<a
class=
"for-refresh"
><i
class=
"fa fa-refresh"
></i>
刷新
</a>
<div
class=
"refresh-timer hide"
>
距离下次刷新时间还剩
<span
class=
"spare-seconds"
>
00:00
</span>
/
<span
class=
"refresh-limits"
>
00:00
</span></div>
</div>
<div
class=
"i-index-tab"
title=
"提醒"
>
<div
id=
"information"
></div>
<
%
--
<
a
class=
"for-more"
><i
class=
"fa fa-angle-double-right"
></i>
查看更多
</a>
--%>
<a
class=
"for-refresh"
><i
class=
"fa fa-refresh"
></i>
刷新
</a>
</div>
<div
class=
"i-index-tab"
title=
"跟踪"
>
<div
id=
"trace"
></div>
<a
class=
"for-more"
><i
class=
"fa fa-angle-double-right"
></i>
查看更多
</a>
<a
class=
"for-refresh"
><i
class=
"fa fa-refresh"
></i>
刷新
</a>
</div>
<div
class=
"i-index-tab"
title=
"已办"
>
<div
id=
"record"
></div>
<a
class=
"for-more"
><i
class=
"fa fa-angle-double-right"
></i>
查看更多
</a>
<a
class=
"for-refresh"
><i
class=
"fa fa-refresh"
></i>
刷新
</a>
</div>
<div
class=
"i-index-tab"
title=
"通知"
>
<div
id=
"notification"
></div>
<a
class=
"for-more"
><i
class=
"fa fa-angle-double-right"
></i>
查看更多
</a>
<a
class=
"for-refresh"
><i
class=
"fa fa-refresh"
></i>
刷新
</a>
</div>
<div
class=
"i-index-tab"
title=
"公告"
>
<div
id=
"notice"
style=
"height: 100%; overflow:hidden;"
></div>
<a
class=
"for-refresh"
><i
class=
"fa fa-refresh"
></i>
刷新
</a>
</div>
</EF:EFTab>
</div>
<div
class=
"col-sm-3"
>
<div
class=
"index-apm i-index-top"
>
<
%
--
<
div
class=
"i-region-header"
>
<span
class=
"index-meet"
></span>
日历
</div>
--%>
<div
class=
"i-region-content"
>
<div
class=
"fp-calendar"
>
<script>
$
(
".fp-calendar"
).
kendoCalendar
({
culture
:
"zh-CN"
,
footer
:
false
});
</script>
</div>
</div>
</div>
</div>
</div>
<div
class=
"row"
style=
"padding-top: 8px"
>
<div
class=
"col-sm-9"
>
<div
class=
"index-charts i-index-bottom"
>
<div
class=
"i-region-header"
><span
class=
"index-dashboard"
></span>
业务快捷
</div>
<div
class=
"i-region-content"
id=
"i-region-dots-append"
>
<div
class=
"dashboard_content"
id=
"dashboard"
>
</div>
</div>
</div>
</div>
<div
class=
"col-sm-3 i-index-todo"
>
<EF:EFTab
id=
"info"
>
<div
class=
"i-index-tab index-favorite"
title=
"收藏"
>
<div
class=
"i-region-content"
>
<div
id=
"fav-list"
class=
"fav-list"
></div>
</div>
<a
class=
"for-more moreCollection"
><i
class=
"fa fa-angle-double-right"
></i>
查看更多
</a>
</div>
<div
class=
"i-index-tab index-links"
title=
"友情链接"
style=
"margin: 0;"
>
<div
>
<div
class=
"dropup open"
>
<ul
class=
"dropdown-menu"
role=
"menu"
>
<li
style=
"text-align: left;"
>
<div
class=
"link-list"
style=
"padding-bottom:1px;"
>
<
%
--
<
span
class=
"index-icon index-related-clip"
></span>
--%>
<a>
暂无友情链接!
</a>
</div>
</li>
<
%
--
<
li
>
<div
class=
"link-list"
>
<span
class=
"index-icon index-related-clip"
></span>
<a
target=
"_blank"
href=
"${ctx}/web/EDFA10"
>
收藏页
</a>
</div>
</li>
<li>
<div
class=
"link-list"
>
<span
class=
"index-icon index-related-clip"
></span>
<a
target=
"_blank"
href=
"${ctx}/web/EEDM4004"
>
AutoComplete示例
</a>
</div>
</li>
<li>
<div
class=
"link-list"
>
<span
class=
"index-icon index-related-clip"
></span>
<a
target=
"_blank"
href=
"${ctx}/web/EDFA61"
>
用户自选风格管理表
</a>
</div>
</li>
--%>
</ul>
</div>
</div>
</div>
</EF:EFTab>
</div>
</div>
</div>
<
%
--
第一项删除会被关闭
--
%
>
</EF:EFTab>
</div>
</div>
</div>
<
%
--
菜单结点名称
--
%
>
<input
type=
"hidden"
name=
"iplatMenuName"
value=
"${menuRoot}"
validate=
"false"
novalidate=
"novalidate"
/>
<EF:EFFragment/>
<script
id=
"menu-template"
type=
"text/x-kendo-template"
>
<
ul
class
=
"iplat-menu-ul"
>
#
for
(
var
index
in
menus
){
var
menu
=
menus
[
index
]
#
<
li
class
=
"iplat-menu"
data
-
page
=
"#:menu.label#"
data
-
url
=
"#:menu.nodeUrl#"
data
-
param
=
"#:menu.nodeParam#"
data
-
leaf
=
"#:menu.leaf#"
>
<
a
class
=
"i-sub-#:menu.leaf#"
href
=
"
\\
#"
>
<
i
class
=
"i-menu-icon # var iconCss = IPLAT.Util.parseBtnClass(menu.imagePath).css;
if (iconCss !== '') {# #:iconCss# #} else {# fa fa-cube #} #"
><
/i
>
<
span
class
=
"sidebar-mini-hide iplat-menu-title"
>
#
:
menu
.
text
#
<
/span
>
<
/a
>
<
div
id
=
"tree#=menu.label#"
class
=
"iplat-menu-content"
data
-
first
=
"true"
>
<
/div
>
<
/li
>
#
}
#
<
/ul
>
</script>
<script
id=
"menu-item-template"
type=
"text/x-kendo-template"
>
#
:
item
.
text
#
#
if
(
!
item
.
leaf
&&
IPLATUI
.
Config
.
Layout
.
MENU_WITH_FORM_ENAME
)
{
#
[
#
:
item
.
label
#
]
#
}
#
</script>
<script
id=
"process-template"
type=
"text/x-kendo-template"
>
<
p
style
=
"margin-bottom: 0"
>
您有
<
a
class
=
"i-index-process"
target
=
"_blank"
href
=
"${ctx}/web/#:form#"
>
[
#
:
count
#
]
<
/a>个#:processName##:taskDefName
#
<
/p
>
</script>
<script
id=
"task-template"
type=
"text/x-kendo-template"
>
<
a
target
=
"_blank"
href
=
"${ctx}/web/#:form#?procInstId=#:procInstId#"
>
#
:
subject
#
<
/a
>
</script>
<script
id=
"favorite-template"
type=
"text/x-kendo-template"
>
<
div
class
=
"k-link k-header"
ename
=
"#:form_ename#"
><
span
class
=
"index-icon index-clip"
><
/span>#:form_ename# - #:form_cname
#
<
/div
>
</script>
<script>
window
.
IPLAT_INDEX_WINDOW
=
"rootWindow"
;
window
.
APM_REFRESH
=
"${apmRefresh}"
;
$
(
function
()
{
V6Index
();
});
</script>
<!--[if lte IE 8]>
<script src="${iPlatStaticURL}/iplatui/assets/js/polyfills/iplat.ui.ie8.polyfills.min.js"></script>
<![endif]-->
</body>
<script
type=
"text/javascript"
>
var
ctx
=
"${ctx}"
;
var
loginName
=
"${loginName}"
;
var
SideBarIsMini
=
$
{
SideBarIsMini
};
var
theme
=
"${theme}"
;
</script>
<style>
.icon-badge
{
position
:
absolute
;
top
:
-8px
;
right
:
-18px
;
background-color
:
red
;
color
:
white
;
font-size
:
12px
;
font-weight
:
bold
;
width
:
24px
;
height
:
24px
;
border-radius
:
50%
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
</style>
</html>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment