彭锟
2022-03-22 2ecb63062fe10bbfb6853e37a38a74dcc10291db
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<apex:page showheader="false" showquickactionvfheader="false" controller="QLMAttachmentPreviewController">
<!-- 隐藏原图 展示画布 旋转图片(4个90°)鼠标滚轮伸缩放大放小 (会失帧) -->
    <head>
        <apex:includescript value="/soap/ajax/40.0/connection.js">
        </apex:includescript>
        <apex:includescript value="/soap/ajax/40.0/apex.js">
        </apex:includescript>
        <apex:includescript value="{!URLFOR($Resource.jquery183minjs)}">
        </apex:includescript>
        <title>
            查看附件
        </title>
        <style>
            * {
               margin: 0px;
               padding: 0px;
              }
 
              #pandiv {
               width: 30%;
               height: 500px;
              }
                
              #control {
               /*background: #ccc;*/
               opacity: 0.7;
                width: 200px;
                /*liying start*/
               width: 80px;
                /*liying  end*/
               height: 30px; display: none;
               padding-top: 5px;
               position: absolute;
                /*liying start*/
               align-content: center;
                /*liying end*/
               /*left: 550px;*/
               top: 450px;
              }
                
              #canvas {
               border: 1px solid black;
              }
                
              #left {
               float: left;
               display: block;
              }
                
              #right {
               float: right;
               display: block;
              }
        </style>
        <script language="javascript" type="text/javascript">
            //初始化方法 
            //接收url上的参数
            var queryVal=GetQueryValue('id');
            var url='https://ocsm--stagefull--c.visualforce.com/apex/QLMAttachmentPreview1?id='+queryVal; 
            //js取参
            //20201221 liying start
            function GetQueryValue(queryName) {
                  var query = decodeURI(window.location.search.substring(1));
                  var vars = query.split("&");
                 for (var i = 0; i < vars.length; i++) {
                     var pair = vars[i].split("=");
                     if (pair[0] == queryName) { return pair[1]; }
                 }
                 return null;
             }
    </script>
    </head>
    <body>
      <!-- 标题 -->
      <div style="height: 40px;background-color:#0f218b;width: 100%;text-align: center;">
          <h1 style="color: white;font-size: 24px;">
              查看附件
          </h1>
      </div>
 
         <apex:form id="mainform">
               <apex:outputText escape="false" value="{!htmlvalue}"/>
         </apex:form>
      <input id="left" onclick="javascript:history.go(-1);" style="margin-left: 80%;   border-radius: 3px; /* 边框半径 */
              width: 50px;
              height: 30px;
              margin-top:-16px;
              background: #0f218b; /* 背景颜色 */
              cursor: pointer; /* 鼠标移入按钮范围时出现手势 */
              outline: none; /* 不显示轮廓线 */
              font-family: Microsoft YaHei; /* 设置字体 */
              color: white; /* 字体颜色 */
              font-size: 14px; /* 字体大小 */
              border: 1px solid #0f218b " type="button" value="返回"/>
 
    </body>
</apex:page>