From 70ca590b964fb4ef9a4f40fbe44e77795b88ec5e Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 29 二月 2024 22:26:48 +0800 Subject: [PATCH] 2024-02-29 --- src/tabviews/custom/components/table/edit-table/normalTable/index.scss | 77 +++++------------- src/tabviews/custom/components/share/normalTable/index.jsx | 38 ++++----- src/templates/zshare/verifycard/baseform/index.jsx | 14 +++ src/tabviews/custom/components/share/normalTable/index.scss | 77 +++++------------- 4 files changed, 73 insertions(+), 133 deletions(-) diff --git a/src/tabviews/custom/components/share/normalTable/index.jsx b/src/tabviews/custom/components/share/normalTable/index.jsx index 2b00baa..69244ec 100644 --- a/src/tabviews/custom/components/share/normalTable/index.jsx +++ b/src/tabviews/custom/components/share/normalTable/index.jsx @@ -110,7 +110,7 @@ let { col, config, record, className, style, triggerLink, ...resProps } = this.props if (!col) return (<td {...resProps} className={className} style={style}/>) - + if (col.type === 'text') { let content = '' if (record[col.field] !== undefined) { @@ -162,16 +162,14 @@ resProps.rowSpan = record['$$' + col.field] } - if (!record.$disabled && (col.linkThdMenu || col.linkurl)) { - content = ( - <div> - <div className="link-menu" onDoubleClick={(e) => triggerLink(e, col, record)}></div> - {content} - </div> - ) - } - resProps.children = content + + if (!record.$disabled && (col.linkThdMenu || col.linkurl)) { + style = style || {} + style.cursor = 'pointer' + + return (<td {...resProps} className={className} onDoubleClick={() => triggerLink(col, record)} style={style}/>) + } } else if (col.type === 'number') { let content = '' try { @@ -235,16 +233,14 @@ resProps.rowSpan = record['$$' + col.field] } - if (!record.$disabled && (col.linkThdMenu || col.linkurl)) { - content = ( - <div> - <div className="link-menu" onDoubleClick={(e) => triggerLink(e, col, record)}></div> - {content} - </div> - ) - } - resProps.children = content + + if (!record.$disabled && (col.linkThdMenu || col.linkurl)) { + style = style || {} + style.cursor = 'pointer' + + return (<td {...resProps} className={className} onDoubleClick={() => triggerLink(col, record)} style={style}/>) + } } else if (col.type === 'picture') { let photos = '' if (record[col.field]) { @@ -795,9 +791,7 @@ } // 瀛楁閫忚 - triggerLink = (e, item, record) => { - e.stopPropagation() - + triggerLink = (item, record) => { let __param = { $searchkey: item.field, $searchval: record[item.field] || '', diff --git a/src/tabviews/custom/components/share/normalTable/index.scss b/src/tabviews/custom/components/share/normalTable/index.scss index 41dce81..6dbd534 100644 --- a/src/tabviews/custom/components/share/normalTable/index.scss +++ b/src/tabviews/custom/components/share/normalTable/index.scss @@ -116,68 +116,35 @@ display: none; } } - .action-col { - .ant-btn > .anticon + span { - margin-left: 3px; - } - button { - border: 0; - background-color: transparent; - color: #1890ff; - box-shadow: none; - padding: 0 5px; - .anticon-loading { - display: none; - } - } - > div { - margin: 0 3px; - } - > button { - margin: 0 3px; - } - .ant-btn.ant-btn-loading:not(.ant-btn-circle):not(.ant-btn-circle-outline):not(.ant-btn-icon-only) { - padding-left: 0px; - } - } } .ant-table-tbody > tr > td[rowspan] { vertical-align: middle; } - .ant-table-tbody > tr > td.ant-table-column-has-actions { - .content { - position: relative; - z-index: 1; - word-wrap: break-word; - word-break: break-word; - } - } + // .ant-table-tbody > tr > td.ant-table-column-has-actions { + // .content { + // position: relative; + // z-index: 1; + // word-wrap: break-word; + // word-break: break-word; + // } + // } .ant-table-tbody > tr > td { position: relative; - .link-menu { - position: absolute; - top: 0px; - left: 0px; - right: 0px; - bottom: 0px; - opacity: 0; - cursor: pointer; - } } - .ant-table-tbody > tr > td .content { - p { - margin-bottom: 2px; - } - span { - display: inline-block; - margin-right: 5px; - } - } - .ant-table-tbody > tr > td .button { - .ant-btn { - margin-bottom: 10px; - } - } + // .ant-table-tbody > tr > td .content { + // p { + // margin-bottom: 2px; + // } + // span { + // display: inline-block; + // margin-right: 5px; + // } + // } + // .ant-table-tbody > tr > td .button { + // .ant-btn { + // margin-bottom: 10px; + // } + // } } } // .ant-table-body::-webkit-scrollbar { diff --git a/src/tabviews/custom/components/table/edit-table/normalTable/index.scss b/src/tabviews/custom/components/table/edit-table/normalTable/index.scss index 1f2fb54..a3362b3 100644 --- a/src/tabviews/custom/components/table/edit-table/normalTable/index.scss +++ b/src/tabviews/custom/components/table/edit-table/normalTable/index.scss @@ -70,68 +70,35 @@ color: inherit; overflow: hidden; } - .action-col { - .ant-btn > .anticon + span { - margin-left: 3px; - } - button { - border: 0; - background-color: transparent; - color: #1890ff; - box-shadow: none; - padding: 0 5px; - .anticon-loading { - display: none; - } - } - > div { - margin: 0 3px; - } - > button { - margin: 0 3px; - } - .ant-btn.ant-btn-loading:not(.ant-btn-circle):not(.ant-btn-circle-outline):not(.ant-btn-icon-only) { - padding-left: 0px; - } - } } .ant-table-tbody > tr > td[rowspan] { vertical-align: middle; } - .ant-table-tbody > tr > td.ant-table-column-has-actions { - .content { - position: relative; - z-index: 1; - word-wrap: break-word; - word-break: break-word; - } - } + // .ant-table-tbody > tr > td.ant-table-column-has-actions { + // .content { + // position: relative; + // z-index: 1; + // word-wrap: break-word; + // word-break: break-word; + // } + // } .ant-table-tbody > tr > td { position: relative; - .link-menu { - position: absolute; - top: 0px; - left: 0px; - right: 0px; - bottom: 0px; - opacity: 0; - cursor: pointer; - } } - .ant-table-tbody > tr > td .content { - p { - margin-bottom: 2px; - } - span { - display: inline-block; - margin-right: 5px; - } - } - .ant-table-tbody > tr > td .button { - .ant-btn { - margin-bottom: 10px; - } - } + // .ant-table-tbody > tr > td .content { + // p { + // margin-bottom: 2px; + // } + // span { + // display: inline-block; + // margin-right: 5px; + // } + // } + // .ant-table-tbody > tr > td .button { + // .ant-btn { + // margin-bottom: 10px; + // } + // } } } diff --git a/src/templates/zshare/verifycard/baseform/index.jsx b/src/templates/zshare/verifycard/baseform/index.jsx index c408e74..44e887b 100644 --- a/src/templates/zshare/verifycard/baseform/index.jsx +++ b/src/templates/zshare/verifycard/baseform/index.jsx @@ -507,7 +507,19 @@ </Form.Item> </Col> : null} {verify.printEnable === 'true' ? <Col span={8}> - <Form.Item label="鎵撳嵃妯℃澘" required> + <Form.Item label="鎵撳嵃妯℃澘" required help={(() => { + if (verify.printTempId) { + return <span onClick={() => { + sessionStorage.setItem('mk-print-temp', verify.printTempId) + window.open('#/hs') + + setTimeout(() => { + sessionStorage.removeItem('mk-print-temp') + }, 50) + }} style={{color: '#1890ff', cursor: 'pointer', fontSize: '13px'}}>#鏌ョ湅妯℃澘</span> + } + return null + })()}> <MkPrintTemps value={verify.printTempId} onChange={this.onPrintIdChange}/> </Form.Item> </Col> : null} -- Gitblit v1.8.0