3
0

2 کامیت‌ها f855f30280 ... 1918a11ce8

نویسنده SHA1 پیام تاریخ
  java71- 张威豹 1918a11ce8 Merge remote-tracking branch 'origin/dev' into dev 3 سال پیش
  java71- 张威豹 66815e8505 1.修复岗位变动编辑界面,上传文件后无法打开bug 3 سال پیش

+ 4 - 1
ruoyi-process/src/main/resources/templates/process/declaration/edit.html

@@ -42,7 +42,7 @@
                         </span>
                     </label>
                     <a id="annex1" style=" font-size: 12px;position: absolute;top: 10px;left:20px; z-index: 10;width: 65%;overflow: hidden;
-                        text-overflow:ellipsis;white-space: nowrap;"></a>
+                        text-overflow:ellipsis;white-space: nowrap;" onclick="openFile()"></a>
                 </div>
                 </div>
             </div>
@@ -150,6 +150,8 @@
 
     $(function () {
         if (!$.common.isEmpty(declaration.attachment)) {
+            var attachmentUrl=disposeUrl(declaration.attachment,"SYDW")
+        if (!$.common.isEmpty(attachmentUrl)){
             $("#annex1").text(getFileName(declaration.attachment, "SYDW"));
             var url = encodeURI(disposeUrl(declaration.attachment, "SYDW"), "utf-8");
             $("#annex").val(disposeUrl(declaration.attachment, "SYDW"));
@@ -159,6 +161,7 @@
                 $("#annex1").css("width","65%")
             }
         }
+        }
     })
 
     $(function setIframe() {

+ 10 - 7
ruoyi-process/src/main/resources/templates/process/recruitplan/recruit.html

@@ -470,13 +470,16 @@
             $("#recruitPlanYear").attr("disabled",true);
         }
         if (!$.common.isEmpty(declaration.attachment)) {
-            $("#annex1").text(getFileName(declaration.attachment, "SYDW"));
-            var url = encodeURI(disposeUrl(declaration.attachment, "SYDW"), "utf-8");
-            $("#annex").val(disposeUrl(declaration.attachment, "SYDW"));
-            $("#annex1").attr("onclick", 'openPDF(\'' + url + '\')');
-            if (getFileName(declaration.attachment, "SYDW").length!=0){
-                $("#trasch").css("display","")
-                $("#annex1").css("width","40%");
+            var attachmentUrl=disposeUrl(declaration.attachment,"SYDW")
+            if (!$.common.isEmpty(attachmentUrl)) {
+                $("#annex1").text(getFileName(declaration.attachment, "SYDW"));
+                var url = encodeURI(disposeUrl(declaration.attachment, "SYDW"), "utf-8");
+                $("#annex").val(disposeUrl(declaration.attachment, "SYDW"));
+                $("#annex1").attr("onclick", 'openPDF(\'' + url + '\')');
+                if (getFileName(declaration.attachment, "SYDW").length != 0) {
+                    $("#trasch").css("display", "")
+                    $("#annex1").css("width", "40%");
+                }
             }
         }
     });