| | |
| | | let linkTypes = [ |
| | | { value: 'tel', text: '电话' }, |
| | | { value: 'email', text: '邮箱' }, |
| | | { value: 'download', text: '下载' }, |
| | | { value: 'other', text: '其他' } |
| | | ] |
| | | |
| | |
| | | { value: 'email', text: '邮箱' }, |
| | | { value: 'qywx', text: '企业微信' }, |
| | | { value: 'linkmenu', text: '关联菜单' }, |
| | | { value: 'download', text: '下载' }, |
| | | { value: 'other', text: '其他' } |
| | | ] |
| | | } else if (appType === 'pc') { |
| | |
| | | { value: 'tel', text: '电话' }, |
| | | { value: 'email', text: '邮箱' }, |
| | | { value: 'linkmenu', text: '关联菜单' }, |
| | | { value: 'download', text: '下载' }, |
| | | { value: 'other', text: '其他' } |
| | | ] |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (cell.marks && cell.marks.length === 0) { |
| | | cell.marks = null |
| | | } |
| | | |
| | | return true |
| | | }) |
| | | |
| | |
| | | col.linkThdMenu = '' |
| | | } |
| | | |
| | | if (col.marks && col.marks.length === 0) { |
| | | col.marks = null |
| | | } |
| | | |
| | | return true |
| | | }) |
| | | } |
| | |
| | | // return |
| | | // } |
| | | |
| | | if (/^http.+(.txt|.doc|.docx|.pdf|.xlsx|.xls|.zip|.rar|.ppt)$/i.test(url)) { |
| | | let d = document.createElement('a') |
| | | d.href = url |
| | | d.setAttribute('download', 'download') |
| | | d.setAttribute('target', '_blank') |
| | | document.body.appendChild(d) |
| | | d.click() |
| | | d.remove() |
| | | } else { |
| | | if (card.joint === 'true') { |
| | | let Id = '' |
| | | |
| | | if (cards.subtype === 'propcard' && cardCell) { |
| | |
| | | Id = data[cards.setting.primaryKey] || '' |
| | | } |
| | | |
| | | if (card.joint === 'true') { |
| | | let con = '?' |
| | | |
| | | if (/\?/ig.test(url)) { |
| | |
| | | } |
| | | |
| | | window.open(url) |
| | | } |
| | | } |
| | | |
| | | getColor = (marks) => { |
| | |
| | | className = mark.signType |
| | | } |
| | | |
| | | if (card.linkType === 'download') { |
| | | let url = '' |
| | | |
| | | if (card.link === 'static') { |
| | | url = card.linkurl |
| | | } else { |
| | | url = data[card.linkurl] |
| | | } |
| | | |
| | | if (/^http.+(.txt|.doc|.docx|.pdf|.xlsx|.xls|.zip|.rar)$/i.test(url)) { |
| | | if (/pdf$/i.test(url)) { |
| | | val = <><img src="/media/pdf.png" className="file-image" alt=""/> {val}</> |
| | | } else if (/(.doc|.docx)$/i.test(url)) { |
| | | val = <><img src="/media/word.png" className="file-image" alt=""/> {val}</> |
| | | } else if (/(.xlsx|.xls)$/i.test(url)) { |
| | | val = <><img src="/media/excel.png" className="file-image" alt=""/> {val}</> |
| | | } else if (/(.zip|.rar)$/i.test(url)) { |
| | | val = <><img src="/media/rar.png" className="file-image" alt=""/> {val}</> |
| | | } else { |
| | | val = <><img src="/media/txt.png" className="file-image" alt=""/> {val}</> |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (card.link || (card.anchors && card.anchors.length > 0)) { |
| | | _style.cursor = 'pointer' |
| | | } |
| | |
| | | .ant-btn { |
| | | padding: 0; |
| | | } |
| | | .file-image { |
| | | max-height: 100%; |
| | | vertical-align: top; |
| | | margin-right: 2px; |
| | | } |
| | | .ant-typography { |
| | | margin: 0; |
| | | padding: 0; |
| | |
| | | item.blur = true |
| | | } |
| | | |
| | | if (item.marks && item.marks.length === 0) { |
| | | item.marks = '' |
| | | } |
| | | |
| | | if (item.field) { |
| | | orderfields[item.uuid] = item.field |
| | | } else if (item.sortField) { |
| | |
| | | item.type = 'text' |
| | | } |
| | | |
| | | if (item.marks && item.marks.length === 0) { |
| | | item.marks = '' |
| | | } |
| | | |
| | | if (item.editable === 'true') { |
| | | setting.hasSubmit = setting.commit !== 'change' |
| | | item.$ctrl = setting.commit === 'change' |
| | |
| | | col.linkThdMenu = '' |
| | | } |
| | | |
| | | if (col.marks && col.marks.length === 0) { |
| | | col.marks = null |
| | | } |
| | | |
| | | return true |
| | | }) |
| | | } |
| | |
| | | cell.style.verticalAlign = 'top' |
| | | } |
| | | |
| | | if (cell.marks && cell.marks.length === 0) { |
| | | cell.marks = null |
| | | } |
| | | |
| | | if (['text', 'number', 'formula'].includes(cell.eleType)) { |
| | | if (!cell.height) { |
| | | cell.innerHeight = 'auto' |
| | |
| | | col.linkThdMenu = '' |
| | | } |
| | | |
| | | if (col.marks && col.marks.length === 0) { |
| | | col.marks = null |
| | | } |
| | | |
| | | return true |
| | | }) |
| | | } |
| | |
| | | cell.style.verticalAlign = 'top' |
| | | } |
| | | |
| | | if (cell.marks && cell.marks.length === 0) { |
| | | cell.marks = null |
| | | } |
| | | |
| | | if (['text', 'number', 'formula'].includes(cell.eleType)) { |
| | | if (!cell.height) { |
| | | cell.innerHeight = 'auto' |
| | |
| | | item.IsSort = 'false' |
| | | } |
| | | |
| | | if (item.marks && item.marks.length === 0) { |
| | | item.marks = null |
| | | } |
| | | |
| | | return true |
| | | }) |
| | | } |
| | |
| | | cell.style.verticalAlign = 'top' |
| | | } |
| | | |
| | | if (cell.marks && cell.marks.length === 0) { |
| | | cell.marks = null |
| | | } |
| | | |
| | | if (['text', 'number', 'formula'].includes(cell.eleType)) { |
| | | cell.innerHeight = cell.innerHeight || 'auto' |
| | | cell.alignItems = cell.height > 1 ? cell.alignItems : '' |