| | |
| | | <apex:includeScript value="{!URLFOR($Resource.apex20)}"/> |
| | | |
| | | <title> |
| | | 查看附件 |
| | | 查看文件 |
| | | </title> |
| | | <script> |
| | | var widthJs = "500px"; |
| | |
| | | <!-- 标题 --> |
| | | <div style="height: 40px;background-color:#0f218b;width: 100%;text-align: center;"> |
| | | <h1 style="color: white;font-size: 24px;"> |
| | | 查看附件 |
| | | 查看文件 |
| | | </h1> |
| | | </div> |
| | | <div style="height: 30px; margin-top: 10px;"> |
| | |
| | | 4、#control 旋转图标 |
| | | 5、#OriginalDiv 切换原图和画布 --> |
| | | <div id="popLayer"> |
| | | <!--左侧表格 展示所有的附件--> |
| | | <!--左侧表格 展示所有的文件--> |
| | | <div class="solution-list"> |
| | | <apex:pageBlock id="oppBlock" tabStyle="Report"> |
| | | <apex:outputPanel > |
| | |
| | | <apex:variable value="identif" var="identif" rendered="{!IF(identifier == '经销商', true, false)}" > |
| | | <table class="list" style="border-bottom-width: 0px; width:100%; font-size:11px; border-spacing:0;" border="" id="tableHeader_L"> |
| | | <tr class="headerRow" height="30px" align="center"> |
| | | <td><a href="#" onclick="return false;" >附件名称</a></td> |
| | | <td width="55px"><a href="#" onclick="return false;">附件类型</a></td> |
| | | <td><a href="#" onclick="return false;" >文件名称</a></td> |
| | | <td width="55px"><a href="#" onclick="return false;">文件类型</a></td> |
| | | </tr> |
| | | <apex:repeat value="{!acccData}" var="or" id="oppTable"> |
| | | <apex:variable value="{!1}" var="cnt"/> |
| | | <apex:variable value="trcnt" var="trcnt" rendered="{!IF(or.accessory.ContentType == '经销商', true, false)}"> |
| | | <tr style="cursor:pointer;" onclick="changeColor('{!or.accessory.Id}');onShowImge('{!or.accessory.Id}',this);" class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}"> |
| | | <apex:variable value="trcnt" var="trcnt" rendered="{!IF(or.accessory.Description == '经销商', true, false)}"> |
| | | <tr style="cursor:pointer;" onclick="changeColor('{!or.accessory.ContentDocumentId}');onShowImge('{!or.accessory.ContentDocumentId}',this);" class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}"> |
| | | <td align="center" id="" style="border-right-width:thin"> |
| | | <a href="#"><apex:outputText value="{!or.accessory.Name}" /></a> |
| | | <a href="#"><apex:outputText value="{!or.accessory.Title}.{!or.accessory.FileType}" /></a> |
| | | </td> |
| | | <td width="55px" align="center"> |
| | | <apex:outputText value="{!or.accessory.ContentType}" /> |
| | | <apex:outputText value="{!or.accessory.Description}" /> |
| | | </td> |
| | | <td style="display:none"> |
| | | <apex:outputText value="{!or.accessory.Id}"/> |
| | | <apex:outputText value="{!or.accessory.ContentDocumentId}"/> |
| | | </td> |
| | | </tr> |
| | | </apex:variable> |
| | |
| | | <table class="list" style="border-bottom-width: 0px; width:100%; font-size:11px; border-spacing:0;" border="" id="tableHeader_M"> |
| | | <apex:variable value="identif" var="identif" rendered="{!IF(identifier2 == '医院' && identifier != '经销商' , true, false)}"> |
| | | <tr class="headerRow" height="30px" align="center"> |
| | | <td><a href="#" onclick="return false;" >附件名称</a></td> |
| | | <td width="55px"><a href="#" onclick="return false;">附件类型</a></td> |
| | | <td><a href="#" onclick="return false;" >文件名称</a></td> |
| | | <td width="55px"><a href="#" onclick="return false;">文件类型</a></td> |
| | | </tr> |
| | | </apex:variable> |
| | | <apex:variable value="identif" var="identif" rendered="{!IF(identifier2 == '医院' && identifier == '经销商' , true, false)}"> |
| | |
| | | </apex:variable> |
| | | <apex:repeat value="{!acccData}" var="or" id="oppTable2"> |
| | | <apex:variable value="{!1}" var="cnt"/> |
| | | <apex:variable value="trcnt" var="trcnt" rendered="{!IF(or.accessory.ContentType == '医院', true, false)}"> |
| | | <tr style="cursor:pointer;" onclick="changeColor('{!or.accessory.Id}');onShowImge('{!or.accessory.Id}',this);" class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}"> |
| | | <apex:variable value="trcnt" var="trcnt" rendered="{!IF(or.accessory.Description == '医院', true, false)}"> |
| | | <tr style="cursor:pointer;" onclick="changeColor('{!or.accessory.ContentDocumentId}');onShowImge('{!or.accessory.ContentDocumentId}',this);" class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}"> |
| | | <td align="center" id="" style="border-right-width:thin"> |
| | | <a href="#"><apex:outputText value="{!or.accessory.Name}" /></a> |
| | | <a href="#"><apex:outputText value="{!or.accessory.Title}.{!or.accessory.FileType}" /></a> |
| | | </td> |
| | | <td width="55px" align="center"> |
| | | <apex:outputText value="{!or.accessory.ContentType}" /> |
| | | <apex:outputText value="{!or.accessory.Description}" /> |
| | | </td> |
| | | <td style="display:none"> |
| | | <apex:outputText value="{!or.accessory.Id}"/> |
| | | <apex:outputText value="{!or.accessory.ContentDocumentId}"/> |
| | | </td> |
| | | </tr> |
| | | </apex:variable> |
| | |
| | | </h1> |
| | | </div> |
| | | <div class="solution-item" id="imgeDiv"> |
| | | <div id="onCloseId" style="position: absolute;top:55px;padding-left:73%;cursor:pointer;display:none;"><a href="javascript:void(0)" onclick="closePop()" style="padding-rigth:13px;color:#fff;font-weight:bolder;font-size:15px;text-decoration: none;">关闭</a></div> |
| | | <div id="onCloseId" style="position: absolute;top:75px;padding-left:67%;cursor:pointer;display:none;"><a href="javascript:void(0)" onclick="closePop()" style="padding-rigth:13px;color:#fff;font-weight:bolder;font-size:15px;text-decoration: none;">关闭</a></div> |
| | | <!-- 增加pdf关闭按钮 精琢技术 thh 2021-09-27 start --> |
| | | <div class="PdfCss" id="fontpdf" style="display: none;"> |
| | | <h1 style="position:absolute;top:50%;margin:-4% 0 0 -10%;"> |
| | | <h1 style="position:absolute;top:50%;"> |
| | | <font face="verdana" style="font-size: 40px;">此页暂时只支持图片文件的预览</font> |
| | | </h1> |
| | | </div> |
| | |
| | | document.getElementById("imgeDiv").style.display='block'; |
| | | |
| | | fadeIn("imgeDiv",1000); |
| | | //获取点击的附件名称 |
| | | //获取点击的文件名称 |
| | | var accName = obj.cells[0].innerText; |
| | | //asdf-kjklljk 电子签收-担当环节优化开发 精琢技术 wql 2021/08/09 start |
| | | //获取点击的附件类型 |
| | | //获取点击的文件类型 |
| | | var accContentType = obj.cells[1].innerText; |
| | | //asdf-kjklljk 电子签收-担当环节优化开发 精琢技术 wql 2021/08/09 end |
| | | //截取后缀名 |
| | |
| | | }else{ |
| | | //如果不是图片,那么下载文件 |
| | | //window.open('https://ocsm--stagefull--c.documentforce.com/servlet/servlet.FileDownload?file='+accId); |
| | | window.open('https://ocsm--c.ap0.content.force.com/servlet/servlet.FileDownload?file='+accId); |
| | | window.open('/sfc/servlet.shepherd/document/download/'+accId); |
| | | debugger |
| | | //右边的画布显示 |
| | | showPdf(); |
| | |
| | | } |
| | | //图片加载和canvas 画图 |
| | | function imgShow(accId,accContentType){ |
| | | var imageUrl = "/servlet/servlet.FileDownload?file="+accId; |
| | | // var imageUrl = "/servlet/servlet.FileDownload?file="+accId; |
| | | var imageUrl = "/sfc/servlet.shepherd/document/download/"+accId; |
| | | //js动态赋值 |
| | | document.getElementById("j_id0:testImg").src = imageUrl; |
| | | //js动态赋值 |
| | |
| | | mouseDownLocation = windowToCanvas(canvas, event.clientX, event.clientY); |
| | | if (isPointInImageArea(mouseDownLocation)) { |
| | | isMouseDown = true; |
| | | document.title = '查看附件'; |
| | | document.title = '查看文件'; |
| | | } |
| | | } |
| | | /**鼠标弹起*/ |
| | | document.body.onmouseup = function() { |
| | | isMouseDown = false; |
| | | canvas.style.cursor = "default"; |
| | | document.title = '查看附件'; |
| | | document.title = '查看文件'; |
| | | } |
| | | /**鼠标移动*/ |
| | | pandiv.onmousemove = function(event) { |