| | |
| | | line-height:0px!important; |
| | | font-size: 0.2rem!important; |
| | | } |
| | | /* 控制附件浏览现在次数的样式 */ |
| | | .kv-zoom-actions{ |
| | | max-width: 500px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | flex-direction: row; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | |
| | | }) |
| | | }).on('filezoomshown', function (event, params) { |
| | | //此事件在模态对用户可见后触发(将等待 CSS 转换完成) |
| | | Event.imageEvent(); |
| | | Event.imageEvent(params); |
| | | }).on('filezoomprev', function (event, params) { |
| | | //事件在缩放预览模式下,当点击上一个导航按钮查看上一个文件时触发(也在缩放模式下按下键盘左箭头时触发) |
| | | Event.imageEvent(); |
| | | setTimeout(function(){//这个事件不是渲染完进入,导致提前渲染图片查看器。 没什么决绝办法用setTimeout吧 |
| | | Event.imageEvent(params) |
| | | },300); |
| | | }).on('filezoomnext', function (event, params) { |
| | | //该事件在缩放预览模式下,当点击下一个导航按钮查看下一个文件时触发(也在缩放模式下按下键盘右箭头时触发)。 |
| | | Event.imageEvent(); |
| | | setTimeout(function(){ |
| | | Event.imageEvent(params) |
| | | },300); |
| | | }).on('filezoomhidden',function (event,params) { |
| | | top.$('.layui-layer-setwin').show();//隐藏图片的时候打开弹出层的关闭按钮 xin 2022-10-28 09:08:24 |
| | | }); |
| | | },imageEvent:function () { |
| | | let kv = $('#kvFileinputModal .file-zoom-content img'); |
| | | if (kv.length > 0) { |
| | | try { |
| | | isFileInputImage = new Viewer(kv[0], { |
| | | title: false, viewed: function () { |
| | | if (isFileInputImage.imageCurrent != null) { |
| | | isFileInputImage.rotate(isFileInputImage.imageCurrent); |
| | | } |
| | | } |
| | | }); |
| | | isFileInputImage.imageCurrent = 0 |
| | | } catch (e) { |
| | | isFileInputImage = null; |
| | | } |
| | | },imageEvent:function (param) { |
| | | try { |
| | | isFileInputImage = new Viewer(param.modal.find('ul')[0], { |
| | | title: true, inline: true, button: false |
| | | , viewed: function () {// 图片渲染完后进入,旋转大图片 |
| | | param.modal.css('overflow-y','hidden'); |
| | | top.$('.layui-layer-setwin').hide();//打开图片的时候隐藏弹出层的关闭按钮 xin 2022-10-28 09:07:59 |
| | | } |
| | | }); |
| | | isFileInputImage.imageCurrent = 0 |
| | | isFileInputImage.view(param.viewerIndex || 0); |
| | | } catch (e) { |
| | | isFileInputImage = null; |
| | | } |
| | | } |
| | | } |
| | |
| | | param.controltype = controlType; |
| | | param.formid = value.formid; |
| | | param.ishd = value.ishd; |
| | | let strIs = ""; |
| | | let strIs = "";//判断更新单据字段值需要到 |
| | | if (value.is1 != null && value.is1 != "") { |
| | | strIs = "&is1=" + value.is1 + "&ishd=" + value.ishd; |
| | | } else if (value.is8 != null && value.is8 != "") { |
| | | strIs = "&is8=" + value.is8 + "&ishd=" + value.ishd; |
| | | } else { |
| | | } else if(value.ishd==2){ |
| | | strIs = "&is16=1&ishd=" + value.ishd; |
| | | }else { |
| | | strIs = "&ishd=" + value.ishd; |
| | | } |
| | | param.docstatus = value.docstatus == null ? 0 : value.docstatus; |
| | | param.rowid = value.rowid; |
| | | param.rowid = (value.detailrowid || value.rowid);//value.rowid; |
| | | param.usercode = value.usercode; |
| | | param.doccode = value.doccode; |
| | | param.headflag = (value.ishd == 0) ? 1 : 0; |
| | |
| | | 'type': jsons[i].fileType, // 上传的图片类型 |
| | | 'filetype': jsons[i].fileType + '/' + jsons[i].orgFileType, |
| | | 'key': jsons[i].unid + ';' + jsons[i].seq, |
| | | 'seq': jsons[i].seq, |
| | | 'title': title,//title |
| | | 'downloadUrl': jsons[i].allowDownload ? Down : false,//jsons[i].domain + "/attachment/downLoadAttachment.do?filePath=" + fileURL,//top.getAttachmentUrl(jsons[i].staticUrl, jsons[i].formid, jsons[i].unid + "@p@" + jsons[i].seq, "", jsons[i].dbid, false, 60, 60, jsons[i].orgFileType, true), |
| | | 'url': deleURL,//删除 |
| | |
| | | }); |
| | | } |
| | | } |
| | | //下载地址 |
| | | //上传地址 |
| | | let upURL = value.domain + '/attachment/uploadAttachmentV2.do?type=' + |
| | | (controlType == 9 ? '1' : '3') + '&formid=' + value.formid |
| | | + '&doccode=' + value.doccode + '&fieldid=' + value.fieldid |
| | | + '&usercode=' + encodeURIComponent(encrypt.encrypt(value.usercode)) + |
| | | '&username=' + encodeURIComponent(encrypt.encrypt(value.username)) + |
| | | '&dbid=' + encodeURIComponent(encrypt.encrypt(value.dbid)) |
| | | + strIs + '&rowid=' + value.rowid + '&uuid=' + (value.unid == undefined ? "" : value.unid); |
| | | '&dbid=' + encodeURIComponent(encrypt.encrypt(value.dbid))+ |
| | | '&rowid=' + (value.detailrowid || value.rowid) + '&uuid=' + (value.unid == undefined ? "" : value.unid)+ |
| | | strIs; |
| | | fileInput.option.uploadUrl = upURL; // 附件上传路径 |
| | | // fileInput.option.maxFileCount = 1; // 为每个多次上载允许的最大文件数。如果设置为0,则意味着允许的文件数是无限的。默认值为0。 |
| | | fileInput.option.maxTotalFileCount = 1; |