From 67036fb0ed31d77ca33b660ce5f9f47c29ae65c0 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 03 三月 2024 11:47:46 +0800 Subject: [PATCH] 2024-03-03 --- src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx | 15 +++++ src/menu/components/table/base-table/columns/editColumn/index.jsx | 10 +++ src/templates/zshare/verifycard/callbackcustomscript/index.jsx | 11 ++- src/menu/datasource/verifycard/customscript/index.jsx | 2 src/templates/zshare/verifycard/customscript/index.jsx | 2 src/menu/components/table/base-table/columns/editColumn/formconfig.jsx | 15 +++++ src/tabviews/custom/components/table/edit-table/normalTable/index.jsx | 8 ++ src/menu/components/table/normal-table/columns/editColumn/index.jsx | 10 +++ src/tabviews/custom/components/share/normalTable/index.jsx | 15 +++++ src/tabviews/zshare/topSearch/index.scss | 3 + src/tabviews/zshare/topSearch/advanceform/index.scss | 3 + src/tabviews/zshare/actionList/normalbutton/index.jsx | 4 src/menu/components/table/edit-table/columns/editColumn/index.jsx | 11 ++- src/menu/components/search/main-search/index.scss | 3 + src/templates/sharecomponent/searchcomponent/index.scss | 3 + src/utils/utils.js | 16 ++-- src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx | 2 17 files changed, 110 insertions(+), 23 deletions(-) diff --git a/src/menu/components/search/main-search/index.scss b/src/menu/components/search/main-search/index.scss index 0ad138c..656580b 100644 --- a/src/menu/components/search/main-search/index.scss +++ b/src/menu/components/search/main-search/index.scss @@ -84,6 +84,9 @@ width: 100%; } } + label[title=" "]::after, label[title=" "]::after { + display: none; + } .page-card.advanced { .ant-form-item-label label { color: orange; diff --git a/src/menu/components/table/base-table/columns/editColumn/formconfig.jsx b/src/menu/components/table/base-table/columns/editColumn/formconfig.jsx index 44db9f8..5636097 100644 --- a/src/menu/components/table/base-table/columns/editColumn/formconfig.jsx +++ b/src/menu/components/table/base-table/columns/editColumn/formconfig.jsx @@ -460,6 +460,21 @@ required: true }, { + type: 'radio', + key: 'noValue', + label: '绌哄��', + initVal: card.noValue || 'show', + tooltip: '鏁板�间负 0 鎴栨椂闂村皬浜� 1949-10-02 鏃讹紝鏄惁鏄剧ず', + required: false, + options: [{ + value: 'show', + text: '鏄剧ず' + }, { + value: 'hide', + text: '闅愯棌' + }] + }, + { type: 'multiselect', key: 'blacklist', label: '榛戝悕鍗�', diff --git a/src/menu/components/table/base-table/columns/editColumn/index.jsx b/src/menu/components/table/base-table/columns/editColumn/index.jsx index e4494c0..8af9c30 100644 --- a/src/menu/components/table/base-table/columns/editColumn/index.jsx +++ b/src/menu/components/table/base-table/columns/editColumn/index.jsx @@ -101,6 +101,14 @@ _options.push('sortField') } + if (this.record.Hide !== 'true') { + if (['number', 'formula'].includes(this.record.type)) { + _options.push('noValue') + } else if (this.record.type === 'text' && ['YYYY-MM-DD', 'YYYY-MM-DD HH:mm:ss'].includes(this.record.textFormat)) { + _options.push('noValue') + } + } + return _options } @@ -177,7 +185,7 @@ } } else if (key === 'format' && value === 'percent') { this.props.form.setFieldsValue({postfix: '%'}) - } else if (['perspective', 'eval', 'IsSort'].includes(key)) { + } else if (['perspective', 'eval', 'IsSort', 'textFormat'].includes(key)) { let _options = this.getOptions() this.setState({ diff --git a/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx b/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx index 5a1a212..c34c943 100644 --- a/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx +++ b/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx @@ -743,7 +743,7 @@ key: 'noValue', label: '绌哄��', initVal: card.noValue || 'show', - tooltip: '褰撳�间负0鏃舵槸鍚︽樉绀�', + tooltip: '鏁板�间负 0 鎴栨椂闂村皬浜� 1949-10-02 鏃讹紝鏄惁鏄剧ず', required: false, options: [{ value: 'show', diff --git a/src/menu/components/table/edit-table/columns/editColumn/index.jsx b/src/menu/components/table/edit-table/columns/editColumn/index.jsx index 038dee7..fd16488 100644 --- a/src/menu/components/table/edit-table/columns/editColumn/index.jsx +++ b/src/menu/components/table/edit-table/columns/editColumn/index.jsx @@ -99,8 +99,13 @@ } else if (this.record.type === 'custom' && this.record.IsSort === 'true') { _options.push('sortField') } - if (['number', 'formula'].includes(this.record.type) && this.record.Hide !== 'true') { - _options.push('noValue') + + if (this.record.Hide !== 'true') { + if (['number', 'formula'].includes(this.record.type)) { + _options.push('noValue') + } else if (this.record.type === 'text' && ['YYYY-MM-DD', 'YYYY-MM-DD HH:mm:ss'].includes(this.record.textFormat)) { + _options.push('noValue') + } } return _options @@ -232,7 +237,7 @@ return item }) }) - } else if (['editable', 'editType', 'resourceType', 'ctrlField', 'eval', 'Hide', 'IsSort'].includes(key)) { + } else if (['editable', 'editType', 'resourceType', 'ctrlField', 'eval', 'Hide', 'IsSort', 'textFormat'].includes(key)) { let _options = this.getOptions() this.setState({ diff --git a/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx b/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx index b535832..b50848d 100644 --- a/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx +++ b/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx @@ -436,6 +436,21 @@ required: true }, { + type: 'radio', + key: 'noValue', + label: '绌哄��', + initVal: card.noValue || 'show', + tooltip: '鏁板�间负 0 鎴栨椂闂村皬浜� 1949-10-02 鏃讹紝鏄惁鏄剧ず', + required: false, + options: [{ + value: 'show', + text: '鏄剧ず' + }, { + value: 'hide', + text: '闅愯棌' + }] + }, + { type: 'multiselect', key: 'blacklist', label: '榛戝悕鍗�', diff --git a/src/menu/components/table/normal-table/columns/editColumn/index.jsx b/src/menu/components/table/normal-table/columns/editColumn/index.jsx index e2900f5..bb4f805 100644 --- a/src/menu/components/table/normal-table/columns/editColumn/index.jsx +++ b/src/menu/components/table/normal-table/columns/editColumn/index.jsx @@ -99,6 +99,14 @@ _options.push('sortField') } + if (this.record.Hide !== 'true') { + if (['number', 'formula'].includes(this.record.type)) { + _options.push('noValue') + } else if (this.record.type === 'text' && ['YYYY-MM-DD', 'YYYY-MM-DD HH:mm:ss'].includes(this.record.textFormat)) { + _options.push('noValue') + } + } + return _options } @@ -178,7 +186,7 @@ } } else if (key === 'format' && value === 'percent') { this.props.form.setFieldsValue({postfix: '%'}) - } else if (['perspective', 'eval', 'IsSort'].includes(key)) { + } else if (['perspective', 'eval', 'IsSort', 'textFormat'].includes(key)) { let _options = this.getOptions() this.setState({ diff --git a/src/menu/datasource/verifycard/customscript/index.jsx b/src/menu/datasource/verifycard/customscript/index.jsx index 7c60348..489c1f6 100644 --- a/src/menu/datasource/verifycard/customscript/index.jsx +++ b/src/menu/datasource/verifycard/customscript/index.jsx @@ -243,7 +243,7 @@ </Col> <Col span={24}> <Form.Item label="鍙敤瀛楁" className="field-able"> - <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, LoginUID, SessionUid, UserID, Appkey, time_id, typename</span></Tooltip>, + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, LoginUID, SessionUid, UserID, Appkey, time_id, typename, datam</span></Tooltip>, <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞惰祴鍊笺��'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address</span></Tooltip>, <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鎺掑簭銆佸垎椤典互鍙婃悳绱㈡潯浠跺彉閲忥紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆備娇鐢ˊpageSize@鎴朄orderBy@浠h〃鑷畾涔夊垎椤碉紝鎬绘暟璇蜂互mk_total杩斿洖銆�'}>orderBy, pageSize, pageIndex{usefulFields ? ', ' + usefulFields : ''}{type === 'calendar' ? ', mk_year' : ''}</Tooltip> <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'url鍙橀噺锛岃鎸夌収@xxx@鏍煎紡浣跨敤銆�'}>{urlFields ? ', ' : ''}<span style={{color: '#13c2c2'}}>{urlFields}</span></Tooltip> diff --git a/src/tabviews/custom/components/share/normalTable/index.jsx b/src/tabviews/custom/components/share/normalTable/index.jsx index 69244ec..66f8c96 100644 --- a/src/tabviews/custom/components/share/normalTable/index.jsx +++ b/src/tabviews/custom/components/share/normalTable/index.jsx @@ -126,6 +126,10 @@ content = <span>{col.prefix || ''}<Encrypts value={content} />{col.postfix || ''}</span> } + if (col.noValue === 'hide' && content < '1949-10-02') { + content = '' + } + if (col.textFormat !== 'encryption') { content = (col.prefix || '') + content + (col.postfix || '') } @@ -175,6 +179,9 @@ try { content = parseFloat(record[col.field]) if (isNaN(content)) { + content = '' + } + if (col.noValue === 'hide' && content === 0) { content = '' } } catch (e) { @@ -348,6 +355,10 @@ // eslint-disable-next-line let func = new Function('data', col.formula) content = func([record]) + + if (col.noValue === 'hide' && content === 0) { + content = '' + } } catch (e) { console.warn(e) content = '' @@ -361,6 +372,10 @@ try { // eslint-disable-next-line content = eval(content) + + if (col.noValue === 'hide' && content === 0) { + content = '' + } } catch (e) { console.info(content) console.warn(e) diff --git a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx index ee270d7..4bcdb13 100644 --- a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx +++ b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx @@ -767,6 +767,10 @@ content = <span>{col.prefix || ''}<Encrypts value={content} />{col.postfix || ''}</span> } + if (col.noValue === 'hide' && content < '1949-10-02') { + content = '' + } + if (col.textFormat !== 'encryption') { content = (col.prefix || '') + content + (col.postfix || '') } @@ -1107,6 +1111,10 @@ content = <span>{col.prefix || ''}<Encrypts value={content} />{col.postfix || ''}</span> } + if (col.noValue === 'hide' && content < '1949-10-02') { + content = '' + } + if (col.textFormat !== 'encryption') { content = (col.prefix || '') + content + (col.postfix || '') } diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index 30a56a1..8bf447f 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -1721,9 +1721,9 @@ sql = sql.replace(/@typename@/ig, `'admin'`) if (sessionStorage.getItem('dataM') === 'true') { // 鏁版嵁鏉冮檺 - sql = sql.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'') + sql = sql.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, `'Y'`) } else { - sql = sql.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'') + sql = sql.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, `''`) } if (window.GLOB.debugger === true) { diff --git a/src/tabviews/zshare/topSearch/advanceform/index.scss b/src/tabviews/zshare/topSearch/advanceform/index.scss index b3cdf80..fa9af70 100644 --- a/src/tabviews/zshare/topSearch/advanceform/index.scss +++ b/src/tabviews/zshare/topSearch/advanceform/index.scss @@ -22,6 +22,9 @@ .ant-form-item-label { text-overflow: ellipsis; } + label[title=" "]::after, label[title=" "]::after { + display: none; + } .daterange .ant-calendar-picker-input { padding: 4px 20px 4px 5px; font-size: 13px; diff --git a/src/tabviews/zshare/topSearch/index.scss b/src/tabviews/zshare/topSearch/index.scss index 3444190..9d96cca 100644 --- a/src/tabviews/zshare/topSearch/index.scss +++ b/src/tabviews/zshare/topSearch/index.scss @@ -24,6 +24,9 @@ .ant-form-item-label { text-overflow: ellipsis; } + label[title=" "]::after, label[title=" "]::after { + display: none; + } .daterange .ant-calendar-picker-input { padding: 4px 20px 4px 5px; font-size: 13px; diff --git a/src/templates/sharecomponent/searchcomponent/index.scss b/src/templates/sharecomponent/searchcomponent/index.scss index f568c19..b82e0a3 100644 --- a/src/templates/sharecomponent/searchcomponent/index.scss +++ b/src/templates/sharecomponent/searchcomponent/index.scss @@ -50,6 +50,9 @@ .ant-form-item-label { float: left; } + label[title=" "]::after, label[title=" "]::after { + display: none; + } .ant-form-item-control-wrapper { float: left; .ant-select { diff --git a/src/templates/zshare/verifycard/callbackcustomscript/index.jsx b/src/templates/zshare/verifycard/callbackcustomscript/index.jsx index bad06ba..0a4ed75 100644 --- a/src/templates/zshare/verifycard/callbackcustomscript/index.jsx +++ b/src/templates/zshare/verifycard/callbackcustomscript/index.jsx @@ -115,6 +115,7 @@ // 鏁版嵁鏉冮檺 sql = sql.replace(/@\$|\$@/ig, '').replace(/\$check@|@check\$/ig, '') + sql = sql.replace(/@datam@/ig, `''`) sql = sql.replace(/@typename@/ig, `'debug'`) if (skip) { @@ -207,18 +208,18 @@ <Form {...formItemLayout} className="verify-form verify-custom-callback-scripts" id="verify-custom-callback-scripts"> <Row gutter={24}> {!type ? <Col span={8}> - <Form.Item label={'琛ㄥ悕'} style={{whiteSpace: 'nowrap', margin: 0}}> + <Form.Item label="琛ㄥ悕" style={{whiteSpace: 'nowrap', margin: 0}}> {btn.cbTable} </Form.Item> </Col> : null} {!type ? <Col span={10}> - <Form.Item label={'鎶ラ敊瀛楁'} style={{margin: 0, whiteSpace: 'nowrap'}}> + <Form.Item label="鎶ラ敊瀛楁" style={{margin: 0, whiteSpace: 'nowrap'}}> ErrorCode锛堝鍔犲悗缂�NT琛ㄧず鏁版嵁涓嶅洖婊氾紝濡侲NT銆丯NT銆丗NT銆丯MNT銆丆NT銆�-2NT锛�, retmsg </Form.Item> </Col> : null} {!type ? <Col span={24} className="sqlfield"> - <Form.Item label={'鍙敤瀛楁'}> - <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, time_id, typename</span></Tooltip>, + <Form.Item label="鍙敤瀛楁"> + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, time_id, typename, datam</span></Tooltip>, <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞惰祴鍊笺��'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address, mk_deleted</span></Tooltip>, <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞跺湪鍗曞彿鐢熸垚鎴栧垱寤哄嚟璇佹椂浣跨敤銆�'}><span style={{color: '#13c2c2'}}>BillCode, BVoucher, FIBVoucherDate, FiYear, ModularDetailCode</span></Tooltip> {usefulfields ? <span>, {usefulfields}</span> : ''} @@ -242,7 +243,7 @@ </Form.Item> </Col> : null} {!type ? <Col span={8}> - <Form.Item label={'蹇嵎娣诲姞'} style={{marginBottom: 0}}> + <Form.Item label="蹇嵎娣诲姞" style={{marginBottom: 0}}> <Select allowClear showSearch diff --git a/src/templates/zshare/verifycard/customscript/index.jsx b/src/templates/zshare/verifycard/customscript/index.jsx index b0e413a..187ea23 100644 --- a/src/templates/zshare/verifycard/customscript/index.jsx +++ b/src/templates/zshare/verifycard/customscript/index.jsx @@ -309,7 +309,7 @@ </Col> : null} {!_type ? <Col span={24} className="sqlfield"> <Form.Item label={'鍙敤瀛楁'}> - <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, time_id, typename</span></Tooltip>, + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, time_id, typename, datam</span></Tooltip>, <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞惰祴鍊笺��'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address, mk_deleted</span></Tooltip>, <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞跺湪鍗曞彿鐢熸垚鎴栧垱寤哄嚟璇佹椂浣跨敤銆�'}><span style={{color: '#13c2c2'}}>BillCode, BVoucher, FIBVoucherDate, FiYear, ModularDetailCode</span></Tooltip> {usefulfields ? <span>, {usefulfields}</span> : ''} diff --git a/src/utils/utils.js b/src/utils/utils.js index cc96970..a904374 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -726,9 +726,9 @@ if (item.type === 'date') { if (!item.value) { if (['>=', '>'].includes(item.match)) { - item.value = '1970-01-01 00:00:00.000' + item.value = '1900-01-01 00:00:00.000' } else if (['<=', '<'].includes(item.match)) { - item.value = '2050-01-01 00:00:00.000' + item.value = '3000-01-01 00:00:00.000' } } else if (search.precision === 'day') { if (['>=', '>'].includes(item.match)) { @@ -749,8 +749,8 @@ if (item.match === '=') { options.push(item) } else { - let _startval = item.value ? moment(item.value, 'YYYY-MM').startOf('month').format('YYYY-MM-DD') + ' 00:00:00.000' : '1970-01-01 00:00:00.000' - let _endval = item.value ? moment(item.value, 'YYYY-MM').endOf('month').add(1, 'days').format('YYYY-MM-DD') + ' 00:00:00.000' : '2050-01-01 00:00:00.000' + let _startval = item.value ? moment(item.value, 'YYYY-MM').startOf('month').format('YYYY-MM-DD') + ' 00:00:00.000' : '1900-01-01 00:00:00.000' + let _endval = item.value ? moment(item.value, 'YYYY-MM').endOf('month').add(1, 'days').format('YYYY-MM-DD') + ' 00:00:00.000' : '3000-01-01 00:00:00.000' let copy = JSON.parse(JSON.stringify(item)) copy.key = copy.key + '1' @@ -773,8 +773,8 @@ options.push(item) options.push(copy) } else if (item.type === 'dateweek') { - let _startval = item.value ? moment(item.value, 'YYYY-MM-DD').startOf('week').format('YYYY-MM-DD') + ' 00:00:00.000' : '1970-01-01 00:00:00.000' - let _endval = item.value ? moment(item.value, 'YYYY-MM-DD').endOf('week').add(1, 'days').format('YYYY-MM-DD') + ' 00:00:00.000' : '2050-01-01 00:00:00.000' + let _startval = item.value ? moment(item.value, 'YYYY-MM-DD').startOf('week').format('YYYY-MM-DD') + ' 00:00:00.000' : '1900-01-01 00:00:00.000' + let _endval = item.value ? moment(item.value, 'YYYY-MM-DD').endOf('week').add(1, 'days').format('YYYY-MM-DD') + ' 00:00:00.000' : '3000-01-01 00:00:00.000' let copy = JSON.parse(JSON.stringify(item)) copy.key = copy.key + '1' @@ -785,8 +785,8 @@ options.push(item) options.push(copy) } else if (item.type === 'daterange') { - let _startval = '1970-01-01 00:00:00.000' - let _endval = '2050-01-01 00:00:00.000' + let _startval = '1900-01-01 00:00:00.000' + let _endval = '3000-01-01 00:00:00.000' if (item.value) { let val = item.value.split(',') -- Gitblit v1.8.0