流程阅览

This commit is contained in:
zhal 2022-07-28 20:01:58 +08:00
parent 66377dcc60
commit e9448d1ec4
3 changed files with 77 additions and 228 deletions

View File

@ -10,6 +10,7 @@
<link type='text/css' rel='stylesheet' href='../apps/com.actionsoft.apps.coe.pal/lib/designer/themes/default/diagraming/ui.css' />
<link rel="stylesheet" href="../commons/css/awsui.css">
<style>
html,body{height: auto!important;}
.button.blue {
background-color: #2375BE;
color: #FFFFFF;
@ -536,6 +537,8 @@
<script type='text/javascript' charset='UTF-8' src='../apps/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.methods.js'></script>
<script type='text/javascript' charset='UTF-8' src='../apps/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.events.js'></script>
<script type='text/javascript' charset='UTF-8' src='../apps/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.ui.js'></script>
<script type='text/javascript' charset='UTF-8' src='../apps/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.core.js'></script>
<script type='text/javascript' charset='UTF-8' src='../apps/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.customize.js'></script>
<!--针对HTML5设计器核心js进行的扩展-->
<script type='text/javascript' charset='UTF-8' src='../apps/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.js'></script>
@ -567,7 +570,7 @@
}
#canvas_container{
width: 100%;
height: 100% !important;
/* height: 100% !important;*/
padding:0px;
}
.awsui-message-page .content{
@ -588,7 +591,9 @@
</script>
<script>
//页面标注
$(document).ready(function(){
$('#content_zoom').append(Math.round(Designer.config.scale * 100) + "%")
var winSize = {
w: $(window).width() - 332,
@ -598,14 +603,20 @@
w: $("#canvas_container").width(),
h: $("#canvas_container").height()
}
if (designerSize.w <= designerSize.h && designerSize.h > winSize.h) {
resizeCanvas('width')
} else if(designerSize.w > designerSize.h && designerSize.w > winSize.w) {
resizeCanvas('height')
}
var wei = $(window).height() - 150;
console.log(wei)
$("#designer_layout").height(wei)
function resizeCanvas(type) {
if (type == 'height') {
console.log(Designer.config.scale)
if($("#canvas_container").height() <= winSize.h || Designer.config.scale <= 0.25) {
return
} else {
@ -623,13 +634,13 @@
}
$(window).trigger('resize');
var newHeight = $(window).height() - $('#toolbarName').height() - $('#newadd_tools').height() - 41 - 0;
var newHeight = $(window).height() - $('#toolbarName').height() - $('#newadd_tools').height() - 80;
// $('.newadd_portalAttr').height(newHeight-100);
$('.newadd_portalAttr').height(500);
$('.newadd_portalAttr').css('overflow-y','auto');
//$('#closeTab').hide();
$('#tab').hide();
// $("#designer_layout").height(newHeight);
// $("#designer_layout").height(newHeight);
//$("#designer_layout").height(473);
$('#openTab').hide();
$('#closeTab').show();
@ -638,8 +649,6 @@
initProcessDesc();
});
// 操作tab页打开关闭
function tabOperate(type) {
if (type=='open') {//打开tab
@ -657,6 +666,8 @@
}
}
function clickTab(obj) {
isClickTab = true;
$('#tab').find('div').removeClass('selected');
@ -678,8 +689,8 @@
if (isCurrentFile == "block") {
isFile = 40;
}
var newHeight = $(window).height() - $('#toolbarName').height() - $('#newadd_tools').height() - 41 - isFile;
// $("#designer_layout").height(newHeight);
var newHeight = $(window).height() - $('#toolbarName').height() - $('#newadd_tools').height() - 80 - isFile;
// $("#designer_layout").height(newHeight);
})
function navOperate(type) {
@ -695,41 +706,28 @@
}
function canvasresizeMax() {
// designerZoom = designerZoom * 1.1;
// Designer.setZoomScale(designerZoom / 100);
resizeMax()
$('#content_zoom').empty()
$('#content_zoom').append(Math.round(Designer.config.scale * 100) + "%")
}
function canvasresizeMin() {
// designerZoom = designerZoom * 0.9;
// Designer.setZoomScale(designerZoom / 100);
resizeMin()
$('#content_zoom').empty()
$('#content_zoom').append(Math.round(Designer.config.scale * 100) + "%")
}
</script>
<style>
body{height:100%!important; overflow: hidden;}
.newadd_card {
}
.suofang{
}
.newadd_title{ }
body{}
.page .footer{position:absolute; left:0; bottom:0; height:200px; width:100%;}
.newadd_card .title{font-size: 16px; margin: 20px;}
.newadd_card .title{font-size: 16px; padding: 20px;}
.selected{
border-bottom: 2px solid #4e7ff9; color:#4e7ff9
}
#designer_layout{background: none!important;margin:10px!important;}
#designer_layout{background: none!important; overflow-x: hidden!important;}
.awsui-table-bordered td{border:0!important; padding: 5px 0!important;}
.awsui-table-bordered,.tableContent{border:0!important;line-height: 20px; float:left}
#designer_canvas{background: none!important;}
#designer_canvas{background: none!important; margin-top: -100px;}
.processfiledown li{line-height: 20px;}
.awsui-table td{border:0!important; padding: 2px 0!important;}
@ -744,208 +742,25 @@
<div>
<span class="newadd_title" style="font-size: 18px;font-weight: bold; margin-bottom:20px;display: block"><#toolbarName></span>
</div>
<div class="newadd_card" style="float: left;
width: 100%;
<div class="newadd_card" style="
background-color: #fff;
background-clip: border-box;
border-radius: 4px;
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
margin-bottom: 20px;
height: 90%!important;
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
">
<div class="title"><span><#typeName></span></div>
<div id="designer_layout" class="" >
<div id="designer_layout">
<div id="canvas_container" style="padding:0px;background-color:white;">
<div id="designer_canvas" style="background-color: white !important;margin-top:-150px !important;">
<div id="designer_canvas" style="background-color: white !important;">
<canvas id="designer_grids" style="background-color:white;">您的浏览器不支持HTML5请使用IE9及以上版本或Chrome、Firefox等浏览器</canvas>
<!--&lt;!&ndash; 链接图层 &ndash;&gt;-->
<ul id="link-dialog-normal_contextmenu" class="menu list options_menu">
</ul>
</div>
</div>
<!-- <div id="shape_img_container"></div>
<div id="layout_block"></div>-->
</div>
<!-- <div id="shape_thumb" class="menu">
<canvas width="160px"></canvas>
<div></div>
</div>-->
<!--<div class="suofang" style=" height: 40px;
background-color: white;
border-top: 1px solid #efefef;
vertical-align: middle;
position: absolute;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
bottom: 0;
width: 100%;">-->
<!--<div id="outputFile" style="vertical-align:middle;padding-top:9px;display:none;float: left; width:60%"></div>-->
<!--<div style="font-size: 15px;vertical-align:middle;padding-top:9px;float:right; width: 30%;text-align: right;">-->
<!--<span class="awsui-iconfont" id="showNav" style="margin-right:30px;display: none" awsui-qtip="显示导航" onclick="navOperate('show')">
<i class="awsui-iconfont" style="color:#555;">&#xe722;</i>
</span>
<span class="awsui-iconfont" id="closeNav" style="margin-right:30px" awsui-qtip="关闭导航" onclick="navOperate('close')">
<i class="awsui-iconfont" style="color:#555;">&#xe723;</i>
</span>
<span class="awsui-iconfont" id="narrow" style="margin-right:10px;" onclick="canvasresizeMin()" awsui-qtip="缩小" >
<i class="awsui-iconfont" style="color:#555;">&#xe71d;</i>
</span>
<span class="awsui-iconfont" id="content_zoom" style="margin-right:10px;"></span>
<span class="awsui-iconfont" id="enlarge" style="margin-right:50px;" onclick="canvasresizeMax()" awsui-qtip="放大" >
<i class="awsui-iconfont" style="color:#555;">&#xe71e;</i>
</span>-->
<!--</div>-->
<!--<div id="navigation_view" class="dock_view dock_view_navigator" style="position:absolute;top: -200px">
<div class="navigation_bounding">
<div class="navigation_view_container">
<canvas id="navigation_canvas" width="120px" height="160px"></canvas>
<div id="navigation_eye"></div>
</div>
</div>
</div>-->
<!--</div>-->
</div>
<!-- <div class="clearfix"></div>
<div class="newadd_card">
<div id="pinglun">-->
<!--&lt;!&ndash; 附件图层 &ndash;&gt;-->
<!--<ul id="attachment-dialog-normal_contextmenu" class="menu list options_menu" style="max-height:200px;overflow:hidden auto;">
</ul>-->
<!--&lt;!&ndash; 端到端串接图层 &ndash;&gt;-->
<!-- <div id="ete-cascade-normal_contextmenu" style="display:none;">
<div id="ete-cascade-img">
<img width="400px" height="250px" src="" />
</div>
<div class="ete-cascade-waiting">
<div align="center">
<img src="../commons/img/waiting.gif" />
</div>
</div>
<div class="ete-cascade-nopic" style="display:none;">
<div align="center">
<span class="ete-cascade-nopic-tip">文件无内容</span>
</div>
</div>
<div id="ete-cascade-name" class="ete-word">
<span class="ete-word-1" style="cursor:pointer;font-size:18px;">&lt;</span>
<span class="ete-word-2"></span>
<span class="ete-word-3">/</span>
<span class="ete-word-4"></span>
<span class="ete-word-5" style="cursor:pointer;font-size:18px;">&gt;</span>
<span class="ete-word-showname">
<span class="ete-word-6">(</span>
<span class="ete-word-7"></span>
<span class="ete-word-8">)</span>
<span class="ete-word-9"></span>
</span>
</div>
<div id="ete-cascade-open" class="ete-word" awsui-qtip="打开模型"><i class="awsui-iconfont" style="color:#707070;font-size:19px;">&#xe800;</i></div>
<div id="ete-cascade-slider" class="ausui-slider-vertical">
<div class="awsui-slider" style="height:188px;" id="verticalSlide2">
<input class="slider-input" id="verticalSlide2_input" />
</div>
</div>
<div id="ete-cascade-analysis" class="ete-word" awsui-qtip="串联分析"><i class="awsui-iconfont" style="color:#108ee9;font-size:22px;">&#xec57;</i></div>
<form id="eteCascadeAnalysisForm" name="eteCascadeAnalysisForm" method="post" action="./w" target="_blank">
<input type="hidden" name="appId" value="com.actionsoft.apps.coe.pal.processlink">
<input type="hidden" name="cmd" value="com.actionsoft.apps.coe.pal.processlink_ete_analysis_home">
<input type="hidden" name="sid" value="<#sid>">
<input type="hidden" name="wsId" value="<#wsId>">
<input type="hidden" name="teamId" value="<#teamId>">
<input type="hidden" name="uuid" value="<#uuid>">
</form>
</div>-->
<!--</div>
</div>
<div class="clearfix"></div>-->
<!--&lt;!&ndash; 弹框表格 &ndash;&gt;-->
<!--<div id="attribute-table-window2" style="width:500px;height:325px;display:none;">
<div style='margin:0px;height:235px;width:500px;'>
<div style="height: 225px;width: 493px;overflow:auto;">
<table style="width: 100%;border-collapse:collapse;">
<tbody class="dialogTableTbody" id='attribute-table-content2'>
</tbody>
</table>
<div style="margin-top: 5px" id="attribute-add-content2"></div>
</div>
</div>
</div>-->
<!-- <button name="dock_btn_enlarge" type="button" class="awsui-btn" onclick="canvasresizeMax();">放大</button>-->
<!-- <button name="dock_btn_narrow" type="button" class="awsui-btn" onclick="canvasresizeMin();">缩小</button>-->
<!--<div id="designer">
<div id="designer_viewport" class="readonly">
&lt;!&ndash;&lt;!&ndash; Graphic Dock Window &ndash;&gt;&ndash;&gt;
</div>
</div>-->
<!--</div>-->
<!--<div style="width:510px;display:none;" id="shapes_dialog">-->
<!--<div id="content" class="dlg-content awsui-ux">-->
<!--<ul id="shape_manage_list">-->
<!--<#liStr>-->
<!--</ul>-->
<!--</div>-->
<!--</div>-->
<!--<div id="designer-version-manager" style="width:600px; display:none;">
<div id='contentDiv' style='margin-top:1px;height:220px;' class="dlg-content">
<iframe width="100%" id="designerManager" name="coeCreateUser" frameBorder="0" style="width: 100%; height: 220px;"></iframe>
</div>
</div>-->
<!--&lt;!&ndash; 不支持HTML5的页面显示图片 &ndash;&gt;-->
<!--<div id="mainDiv" style="display: none;">
<div class="view_box">
<div id="chartDivBox" style="background: none;">
<div id="chartDiv" style="left: 148.5px; top: 0px;">
<img alt="<#fileName>" id="chart_img" style="display: block; opacity: 1;" src="<#diagram>">
</div>
</div>
<div id="chart_preview" style="background: rgba(255, 255, 255, 0.701961);">
<div id="chart_preview_wrap" style="position: absolute; opacity: 1;">
<img id="preview_img" style="position: absolute; display: block;" src="<#diagram>">
<div class="preview_box" id="preview_box" style="cursor: move; background: rgba(255, 255, 255, 0);"></div>
</div>
</div>
</div>
</div>&ndash;&gt;
<div title="" style="width:550px;display:none;" id="upfile-dialog">
<div id='upfile-content' style='height:330px;'>
<iframe width="100%" id="upfile-content-iframe" name="upfile-content-iframe" frameBorder="0" style="width: 100%; height:100%;"></iframe>
</div>
</div>
&lt;!&ndash;WFVersion对话框&ndash;&gt;
<div id="dialog_wf_version" style="width:900px; display:none;">
<div id="dialog_wf_version_area" style="height:250px;" class="dlg-content">
<iframe id="wf_version_frame" src="" frameborder="0" width="100%" height="100%"></iframe>
</div>
<div class="dialog-button-wrap" style="text-align:right">
<div class="dlg-button" style="text-align:right;">
<div class="dlg-info">
<span style='font-family: Consolas;font-size:16px;'>Version ID:
<input type='text' class='IDInput' readonly='readonly' value='<#processDefVersionId>' />
</span>
</div>
<button class="button" onclick="$('#dialog_wf_version').dialog('close');return false;">关闭</button>
</div>
</div>
</div>
<div id="noContent" class="awsui-message-page" style="display:none;">
<div class="content">
<span class="icon" message-type="no_content"></span>
<span class="title">无数据</span>
</div>
</div>-->
<form id="openNewModelForm" name="openNewModelForm" method="post" action="./w" target="_blank">
<input type="hidden" name="sid" id="sid" value="<#sid>">
<input type="hidden" name="imgPath" id="imgPath" value="<#imgPath>">

View File

@ -600,6 +600,15 @@
} else if(designerSize.w > designerSize.h && designerSize.w > winSize.w) {
resizeCanvas('height')
}
if($('.awsui-iconfont').length > 6){
$("#designer_layout").css({
height:$('.awsui-iconfont').length * 50
});
}else{
$("#designer_layout").css({
height: $(window).height() - 180
});
}
function resizeCanvas(type) {
if (type == 'height') {
console.log(Designer.config.scale)
@ -643,6 +652,17 @@
});
if($('.awsui-iconfont').length > 6){
$("#designer_layout").css({
height:$('.awsui-iconfont').length * 50
});
}else{
$("#designer_layout").css({
height: $(window).height() - 180
});
}
//渲染评论内容
function initPl() {
$(".message-detial-reply").empty();
@ -681,6 +701,23 @@
}
}
var wei=0;
$('.shape_box').each(function(e){
if($('.shape_box:eq('+e+') .shape_canvas').width() > $('.shape_box:eq('+e+') .shape_canvas').height()){
wei+= JSON.parse($('.shape_box:eq('+e+') .shape_canvas').height())
}
})
if($('.shape_box').length > 6){
$("#designer_layout").css({
height: wei//$('.shape_box').length * 120
});
}else{
$("#designer_layout").css({
height: $(window).height() - 180
});
}
function clickTab(obj) {
isClickTab = true;
$('#tab').find('div').removeClass('selected');
@ -757,13 +794,6 @@
box-shadow: 0 2px 4px rgb(0, 0, 0, 0.2);
}
.tableContent{
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
width:200px;
}
.toolbar_info2{margin-bottom:10px;}
#tools{position: relative; padding:20px;}
#tab{ clear: both;overflow: hidden; border-bottom:1px solid #dbdbdb;width:100%;}

View File

@ -75,9 +75,10 @@ var Designer = {
}
},
initCanvas: function() {
var q = Model.define.page.width.toScale();
var v = Model.define.page.height.toScale();
// var q = Model.define.page.width.toScale();
var q = ($(window).width()-200).toScale()
// var v = Model.define.page.height.toScale();
var v = (Model.define.elements * 100);
var B = Model.define.page.backgroundColor;
var s = Utils.getDarkerColor(B);
var A = Utils.getDarkestColor(B);
@ -86,8 +87,7 @@ var Designer = {
});
var w = $("#designer_grids");
w.attr({
width: q,
height: v
width: $(window).width()-200
});
var h = w[0].getContext("2d");
h.clearRect(0, 0, q, v);
@ -140,8 +140,8 @@ var Designer = {
}
}
$("#canvas_container").css({
width: q,
height: v,
width: $(window).width()-200,
/* height: v,*/
padding: Designer.config.pageMargin
});
if (!this.initialized) {
@ -2884,6 +2884,7 @@ var Designer = {
}
var I = ab.attach;
var al = I.lineStyle.lineWidth;
console.log((I.props.h + al).toScale())
Y.css({
width: (I.props.w + al).toScale(),
height: (I.props.h + al).toScale(),
@ -4117,6 +4118,7 @@ var Designer = {
}
var t = Utils.getShapeBox(q);
var w = (t.w + 20).toScale();
console.log(t)
var s = (t.h + 20).toScale();
o.find(".shape_canvas").attr({
width: w,
@ -4128,6 +4130,7 @@ var Designer = {
width: w,
height: s
});
var n = o.find(".shape_canvas")[0].getContext("2d");
n.clearRect(0, 0, q.props.w + 20, q.props.h + 20);
n.scale(Designer.config.scale, Designer.config.scale);
@ -6012,6 +6015,7 @@ var Model = {
f = this.orderList[this.orderList.length - 1].zindex
}
this.maxZIndex = f
},
getShapeLinkers: function(b) {
return this.linkerMap.map[b]
@ -9411,4 +9415,4 @@ Number.prototype.toScale = function() {
};
Number.prototype.restoreScale = function() {
return this / Designer.config.scale
};
};