| | |
| | | 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; |
| | |
| | | + '&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)+ |
| | | '&ishd='+value.ishd+'1&is1=&is8=&is16='+(value.ishd==2?'1':''); |
| | | '&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; |
| | |
| | | var fc = ' file-preview-initial ' + $h.SORT_CSS + (fclass ? ' ' + fclass : ''), |
| | | id = self.previewInitId + '-' + ind, |
| | | fileId = config && config.fileId || id; |
| | | if(!config.hasZoom){//hasZoom=false的时候,控制不显示缩图 cat=='image' && |
| | | cat='other'; |
| | | } |
| | | // if(!config.hasZoom){//hasZoom=false的时候,控制不显示缩图 cat=='image' && |
| | | // cat='other'; |
| | | // } |
| | | /** @namespace config.zoomData */ |
| | | return self._generatePreviewTemplate(cat, dat, fname, ftype, id, fileId, false, null, fc, |
| | | ftr, ind, t, a, config && config.zoomData || dat); |
| | |
| | | } |
| | | return out || self.previewFileIcon; |
| | | }, |
| | | _parseFilePreviewIcon: function (content, fname) { |
| | | _parseFilePreviewIcon: function (content, fname,cat) { |
| | | var self = this, icn = self._getPreviewIcon(fname), out = content; |
| | | if (out.indexOf('{previewFileIcon}') > -1) { |
| | | if(cat=='lock'){//没权限查看时候 |
| | | icn ='<i class="bi bi-lock-fill" style="color: #686809 "></i>' |
| | | } |
| | | out = out.setTokens({'previewFileIconClass': self.previewFileIconClass, 'previewFileIcon': icn}); |
| | | } |
| | | return out; |
| | |
| | | config, title = caption, alt = caption, typeCss = 'type-default', getContent, |
| | | footer = foot || self._renderFileFooter(cat, caption, size, 'auto', isError), |
| | | forcePrevIcon = self.preferIconicPreview, forceZoomIcon = self.preferIconicZoomPreview, |
| | | newCat = forcePrevIcon ? (cat == 'image' || cat=='video' ? cat : 'other') : cat; |
| | | newCat = forcePrevIcon ? (cat == 'image' || cat=='video' ? cat : 'other') : cat; |
| | | config = screenW < 400 ? (self.previewSettingsSmall[newCat] || self.defaults.previewSettingsSmall[newCat]) : |
| | | (self.previewSettings[newCat] || self.defaults.previewSettings[newCat]); |
| | | if (config) { |
| | |
| | | if (zoom) { |
| | | css = css.replace(' ' + $h.SORT_CSS, ''); |
| | | } |
| | | tmplt = self._parseFilePreviewIcon(tmplt, fname); |
| | | tmplt = self._parseFilePreviewIcon(tmplt, fname,cat); |
| | | if (cat === 'object' && !ftype) { |
| | | $.each(self.defaults.fileTypeSettings, function (key, func) { |
| | | if (key === 'object' || key === 'other') { |
| | |
| | | 'htm': '<i class="bi bi-filetype-html" style="color:#369584"></i>', |
| | | 'txt': '<i class="bi bi-filetype-txt" style="color: #5d5a5a"></i>', |
| | | 'mov': '<i class="bi bi-film"></i>', |
| | | 'mp3': '<i class="bi bi-filetype-mp3"></i>' |
| | | 'mp3': '<i class="bi bi-filetype-mp3"></i>', |
| | | 'jpg':'<i class="bi bi-file-image" style="color: #45b8ab"></i>', |
| | | 'key':'<i class="bi bi-filetype-key" style="color: #3fa2e3"></i>' |
| | | }, |
| | | previewFileExtSettings: { |
| | | 'doc': function(ext) { |
| | |
| | | }, |
| | | 'mp3': function(ext) { |
| | | return ext.match(/(mp3|wav)$/i); |
| | | }, |
| | | 'jpg':function (ext) { |
| | | return ext.match(/(jpg|png|jpeg|gif|ico|pic|bmp|tif)$/i); |
| | | } |
| | | }, |
| | | isNodragging:false,//自定义属性,在只读状态是否可以执行拖拽 |
| | |
| | | // if (jsons[i].fileType.toLowerCase() == 'pdf') {//pdf格式调用插件 |
| | | // fileURL = jsons[i].domain + '/general/pdf/web/viewer.jsp?file=' + fileURL; |
| | | // } |
| | | if (jsons[i].orgFileType == 'doc' || jsons[i].orgFileType == 'docx' || jsons[i].orgFileType == 'xls' |
| | | || jsons[i].orgFileType == 'xlsx' || jsons[i].orgFileType == 'ppt' || jsons[i].orgFileType == 'pptx') { |
| | | jsons[i].fileType = 'office'; |
| | | if (jsons[i].fileType == 'office') {//office类型需要 |
| | | fileURL = encodeURIComponent(fileURL); |
| | | } |
| | | fileInput.option.initialPreview.push(fileURL); |
| | |
| | | 'time': jsons[i].uploadTimeStr, //上传开始时间 |
| | | 'name': jsons[i].authorName, //作者名称 |
| | | 'size': jsons[i].fileSizeStr, // 上传的图片大小 |
| | | 'type': jsons[i].fileType, // 上传的图片类型 |
| | | 'type': jsons[i].allowView?jsons[i].fileType:'lock', // 上传的图片类型 |
| | | 'filename': jsons[i].originalFileName,//jsons[i].physicalFile, //物理文件 |
| | | 'filetype': jsons[i].fileType + '/' + jsons[i].orgFileType, |
| | | 'title': title,//title |