From b69b5f6329ca5f87932436b7a6c1ddfc3377e10f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 16 五月 2024 10:56:41 +0800 Subject: [PATCH] 2024-05-16 --- src/tabviews/zshare/actionList/popupbutton/index.jsx | 15 src/tabviews/zshare/normalTable/index.jsx | 38 src/menu/components/card/cardcellcomponent/elementform/index.jsx | 98 +--- src/menu/components/card/balcony/options.jsx | 1 src/tabviews/zshare/actionList/excelInbutton/index.jsx | 50 +- src/tabviews/custom/popview/index.jsx | 33 src/menu/components/table/normal-table/columns/editColumn/index.jsx | 61 - src/tabviews/basetable/index.jsx | 21 src/tabviews/zshare/actionList/newpagebutton/index.jsx | 40 + src/tabviews/zshare/actionList/normalbutton/index.jsx | 8 src/menu/components/table/edit-table/columns/editColumn/index.jsx | 22 src/tabviews/zshare/actionList/changeuserbutton/index.jsx | 7 src/menu/components/form/formaction/formconfig.jsx | 2 src/tabviews/custom/components/card/cardcellList/index.jsx | 55 + src/tabviews/custom/components/card/prop-card/index.jsx | 12 src/tabviews/zshare/actionList/funczip/index.jsx | 15 src/menu/components/card/data-card/options.jsx | 13 src/menu/components/share/actioncomponent/formconfig.jsx | 40 - src/tabviews/custom/components/table/normal-table/index.jsx | 14 src/tabviews/zshare/actionList/funcMegvii/index.jsx | 31 src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.scss | 11 src/tabviews/zshare/mutilform/index.jsx | 12 src/tabviews/custom/components/chart/antv-X6/index.jsx | 12 src/menu/components/chart/antv-G6/chartcompile/formconfig.jsx | 12 src/menu/components/share/actioncomponent/actionform/index.jsx | 8 src/tabviews/custom/components/carousel/prop-card/index.jsx | 26 + src/tabviews/custom/index.jsx | 35 src/menu/debug/index.jsx | 8 src/menu/components/card/cardcomponent/options.jsx | 5 src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx | 27 - src/tabviews/custom/components/chart/antv-bar-line/index.jsx | 28 src/menu/components/card/doublecardcomponent/options.jsx | 15 src/tabviews/custom/components/card/double-data-card/index.jsx | 16 src/menu/components/form/formaction/actionform/index.jsx | 48 - src/tabviews/custom/components/chart/antv-G6/index.jsx | 28 src/tabviews/custom/components/card/cardItem/index.jsx | 47 +- src/menu/components/table/base-table/columns/editColumn/formconfig.jsx | 26 - src/tabviews/zshare/actionList/exceloutbutton/index.jsx | 24 src/views/design/sidemenu/thdmenuform/index.jsx | 2 src/menu/components/card/cardsimplecomponent/options.jsx | 20 src/tabviews/custom/components/table/edit-table/index.jsx | 14 src/tabviews/custom/components/share/normalTable/index.jsx | 51 +- src/tabviews/custom/components/chart/antv-X6/nodeupdate/memberform.jsx | 2 src/utils/utils.js | 8 src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.jsx | 4 src/tabviews/custom/components/card/table-card/index.jsx | 27 src/menu/components/card/balcony/index.jsx | 2 src/tabviews/zshare/actionList/tabbutton/index.jsx | 17 src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx | 14 src/menu/components/table/base-table/columns/editColumn/index.jsx | 61 - src/components/normalform/modalform/index.jsx | 9 src/tabviews/custom/components/carousel/cardItem/index.jsx | 27 src/tabviews/zshare/actionList/printbutton/index.jsx | 7 src/menu/components/card/cardcellcomponent/formconfig.jsx | 42 - src/tabviews/custom/components/card/balcony/index.jsx | 24 + 55 files changed, 596 insertions(+), 699 deletions(-) diff --git a/src/components/normalform/modalform/index.jsx b/src/components/normalform/modalform/index.jsx index 1623373..8a7599f 100644 --- a/src/components/normalform/modalform/index.jsx +++ b/src/components/normalform/modalform/index.jsx @@ -280,7 +280,14 @@ if (item.hidden || item.forbid) return let content = null - let label = item.tooltip ? <Tooltip placement="topLeft" title={item.tooltip}><QuestionCircleOutlined className="mk-form-tip" />{item.label}</Tooltip> : item.label + let label = item.label + if (item.tooltip) { + if (item.toolWidth) { + label = <Tooltip placement="topLeft" overlayStyle={{maxWidth: item.toolWidth}} title={<div onClick={(e) => e.stopPropagation()}>{item.tooltip}</div>}><QuestionCircleOutlined className="mk-form-tip" />{item.label}</Tooltip> + } else { + label = <Tooltip placement="topLeft" title={<div onClick={(e) => e.stopPropagation()}>{item.tooltip}</div>}><QuestionCircleOutlined className="mk-form-tip" />{item.label}</Tooltip> + } + } if (item.type === 'text') { content = (<MKEInput config={item} onChange={(val, defer) => !defer && this.recordChange({[item.field]: val}, item)} onSubmit={this.props.inputSubmit} />) diff --git a/src/menu/components/card/balcony/index.jsx b/src/menu/components/card/balcony/index.jsx index 4f030d2..516c514 100644 --- a/src/menu/components/card/balcony/index.jsx +++ b/src/menu/components/card/balcony/index.jsx @@ -283,7 +283,7 @@ <div className="mk-popover-control"> <PlusOutlined className="plus" title="娣诲姞鍏冪礌" onClick={this.addElement} /> <PlusSquareOutlined className="plus" title="娣诲姞鎸夐挳" onClick={this.addButton} /> - <NormalForm title="娴姩鍗¤缃�" width={850} update={this.updateWrap} getForms={this.getWrapForms}> + <NormalForm title="娴姩鍗¤缃�" width={900} update={this.updateWrap} getForms={this.getWrapForms}> <EditOutlined style={{color: '#1890ff'}} title="缂栬緫"/> </NormalForm> <CopyComponent type="balcony" card={card}/> diff --git a/src/menu/components/card/balcony/options.jsx b/src/menu/components/card/balcony/options.jsx index cfd50f8..c73bf93 100644 --- a/src/menu/components/card/balcony/options.jsx +++ b/src/menu/components/card/balcony/options.jsx @@ -113,6 +113,7 @@ <div>2銆佸悓姝ョ被鍨嬩腑鍏紡銆佹寜閽互鍙婂叏閫夊厓绱犳瘮杈冪壒娈婏紝鎿嶄綔鏁版嵁涓哄叾鍚屾缁勪欢鐨勬暟鎹��</div> <div>3銆佷笂绾х被鍨嬮渶娣诲姞褰撳墠缁勪欢鐨勪笂绾х粍浠讹紝骞跺彲璁剧疆褰撳墠缁勪欢涓哄缁堟樉绀猴紝杩樻槸鍙湁鍦ㄤ笂绾х粍浠堕�夎鍚庢墠鏄剧ず銆�</div> </div>, + toolWidth: 400, required: false, options: [ {value: 'static', label: '鐙珛'}, diff --git a/src/menu/components/card/cardcellcomponent/elementform/index.jsx b/src/menu/components/card/cardcellcomponent/elementform/index.jsx index efc66b8..992eff8 100644 --- a/src/menu/components/card/cardcellcomponent/elementform/index.jsx +++ b/src/menu/components/card/cardcellcomponent/elementform/index.jsx @@ -194,14 +194,14 @@ if (['text', 'picture'].includes(this.record.eleType) && this.record.link) { _options.push('linkType') if (this.record.linkType === 'linkmenu') { - _options.push('open', 'joint') + _options.push('open') if (this.record.link === 'static') { _options.push('linkmenu') } else { _options.push('linkurl') } } else if (this.record.linkType === 'other') { - _options.push('linkurl', 'joint', 'open') + _options.push('linkurl', 'open') } else { _options.push('linkurl') } @@ -400,11 +400,21 @@ this.state.formlist.forEach((item, index) => { if (item.hidden || item.forbid) return + let label = item.label + if (item.tooltip) { + if (item.toolWidth) { + label = <Tooltip placement="topLeft" overlayStyle={{maxWidth: item.toolWidth}} title={<div onClick={(e) => e.stopPropagation()}>{item.tooltip}</div>}><QuestionCircleOutlined className="mk-form-tip" />{item.label}</Tooltip> + } else { + label = <Tooltip placement="topLeft" title={<div onClick={(e) => e.stopPropagation()}>{item.tooltip}</div>}><QuestionCircleOutlined className="mk-form-tip" />{item.label}</Tooltip> + } + } + if (item.type === 'text') { + let rules = item.rules || [] if (item.options && item.options.length > 0) { fields.push( <Col span={12} key={index}> - <Form.Item label={item.label}> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal || '', rules: [ @@ -437,12 +447,7 @@ } else { fields.push( <Col span={12} key={index}> - <Form.Item label={item.tooltip ? - <Tooltip placement="topLeft" title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal || '', rules: [ @@ -453,7 +458,8 @@ { max: formRule.input.max, message: formRule.input.message - } + }, + ...rules ] })(<Input placeholder="" autoComplete="off" disabled={item.readonly} onPressEnter={this.handleSubmit} />)} </Form.Item> @@ -463,12 +469,7 @@ } else if (item.type === 'textarea') { fields.push( <Col span={24} className="textarea" key={index}> - <Form.Item label={item.tooltip ? - <Tooltip placement="topLeft" title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal || '', rules: [ @@ -485,12 +486,7 @@ if (item.help) { fields.push( <Col span={12} key={index}> - <Form.Item help={item.help} label={item.tooltip ? - <Tooltip placement="topLeft" title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item help={item.help} label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal, rules: [{ @@ -504,12 +500,7 @@ } else { fields.push( <Col span={12} key={index}> - <Form.Item label={item.tooltip ? - <Tooltip placement="topLeft" title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal, rules: [{ @@ -524,12 +515,7 @@ } else if (item.type === 'select') { // 涓嬫媺鎼滅储 fields.push( <Col span={12} key={index}> - <Form.Item label={item.tooltip ? - <Tooltip placement="topLeft" title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal || '', rules: [{ @@ -557,12 +543,7 @@ } else if (item.type === 'icon') { fields.push( <Col span={12} key={index}> - <Form.Item label={item.tooltip ? - <Tooltip placement="topLeft" title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal || '', rules: [{ @@ -578,12 +559,7 @@ } else if (item.type === 'radio') { fields.push( <Col span={12} key={index}> - <Form.Item label={item.tooltip ? - <Tooltip placement="topLeft" title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal, rules: [{ @@ -605,7 +581,7 @@ } else if (item.type === 'color') { fields.push( <Col span={12} key={index} className="color-form"> - <Form.Item label={item.label}> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal, rules: [ @@ -628,12 +604,7 @@ fields.push( <Col span={12} key={index}> - <Form.Item label={item.tooltip ? - <Tooltip placement="topLeft" title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal, rules: [ @@ -651,12 +622,7 @@ } else if (item.type === 'cascader') { fields.push( <Col span={12} key={index}> - <Form.Item label={item.tooltip ? - <Tooltip placement="topLeft" overlayClassName={item.tooltipClass} title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal || [], rules: [ @@ -674,12 +640,7 @@ } else if (item.type === 'table') { fields.push( <Col span={24} key={index} className="textarea"> - <Form.Item label={ - item.tooltip ? <Tooltip placement="topLeft" title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal || '', rules: [ @@ -697,12 +658,7 @@ } else if (item.type === 'codemirror') { fields.push( <Col span={24} key={index} className="textarea"> - <Form.Item label={ - <Tooltip placement="topLeft" overlayStyle={{width: 500, maxWidth: 500}} title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal || '', rules: [ diff --git a/src/menu/components/card/cardcellcomponent/formconfig.jsx b/src/menu/components/card/cardcellcomponent/formconfig.jsx index 61c27e7..7b651e9 100644 --- a/src/menu/components/card/cardcellcomponent/formconfig.jsx +++ b/src/menu/components/card/cardcellcomponent/formconfig.jsx @@ -128,14 +128,13 @@ } let fields = [] - if (cards.subtype === 'propcard' && cards.wrap.datatype === 'static') { + let isStatic = (cards.subtype === 'propcard' || cards.type === 'balcony') && cards.wrap.datatype === 'static' + if (isStatic) { if (cards.wrap.supModule && cards.wrap.supModule.length) { let cell = MenuUtils.getComponent(cards.wrap.supModule[cards.wrap.supModule.length - 1]) if (cell && cell.columns) { fields = cell.columns.map(col => ({ value: col.field })) } - } else { - fields = cards.columns.map(col => ({ value: col.field })) } } @@ -172,12 +171,17 @@ ] }, { - type: cards.subtype === 'propcard' && cards.wrap.datatype === 'static' ? 'text' : 'select', + type: isStatic ? 'text' : 'select', key: 'field', label: '瀛楁', initVal: card.field || '', + tooltip: isStatic ? '鍙粦瀹氫笂绾х粍浠跺瓧娈碉紝涓嶅瓨鍦ㄤ笂绾х粍浠舵椂鍙粦瀹歶rl鍙傛暟瀛楁銆�' : '', required: true, - options: fields + options: fields, + rules: [{ + pattern: /^[\u4E00-\u9FA50-9a-zA-Z_-]*$/ig, + message: '瀛楁鍚嶅彧鍏佽鍖呭惈鏁板瓧銆佸瓧姣嶃�佹眽瀛椾互鍙奯-' + }] }, { type: 'icon', @@ -256,7 +260,7 @@ required: true }, { - type: cards.subtype === 'propcard' && cards.wrap.datatype === 'static' ? 'text' : 'select', + type: isStatic ? 'text' : 'select', key: 'posterField', label: '棰勮鍦板潃', initVal: card.posterField || '', @@ -475,7 +479,7 @@ required: false }, { - type: cards.subtype === 'propcard' && cards.wrap.datatype === 'static' ? 'text' : 'select', + type: isStatic ? 'text' : 'select', key: 'bgImage', label: '鍔ㄦ�佽儗鏅�', initVal: card.bgImage || '', @@ -641,6 +645,7 @@ key: 'linkmenu', label: '鍏宠仈鑿滃崟', initVal: card.linkmenu || '', + tooltip: '琛屼俊鎭紙瀛楁闆嗕腑鍓�40涓暱搴︿笉瓒呰繃256鐨勫瓧娈碉級灏嗕紶閫掕嚦姝よ彍鍗曪紝鍙湪url鍙橀噺銆佽〃鍗曪紙鍏宠仈涓昏〃锛夈�侀潤鎬佸睘鎬у崱銆佹诞鍔ㄥ崱涓娇鐢ㄣ��', required: true, options: appMenus || [], forbid: !['pc', 'mob'].includes(appType) @@ -650,17 +655,19 @@ key: 'linkmenu', label: '鍏宠仈鑿滃崟', initVal: card.linkmenu || [], + tooltip: '琛屼俊鎭皢浼犻�掕嚦姝よ彍鍗曪紝鍙湪url鍙橀噺銆佽〃鍗曪紙鍏宠仈涓昏〃锛夈�侀潤鎬佸睘鎬у崱銆佹诞鍔ㄥ崱涓娇鐢ㄣ��', required: true, options: menulist, forbid: ['pc', 'mob'].includes(appType) }, { - type: cards.subtype === 'propcard' && cards.wrap.datatype === 'static' ? 'text' : 'select', - defType: cards.subtype === 'propcard' && cards.wrap.datatype === 'static' ? 'text' : 'select', + type: isStatic ? 'text' : 'select', + defType: isStatic ? 'text' : 'select', key: 'linkurl', label: '閾炬帴鍦板潃', initVal: card.linkurl || '', - tooltip: ['pc', 'mob'].includes(appType) ? '褰撻摼鎺ョ被鍨嬩负鈥滃叾浠栤�濓紝涓旈摼鎺ュ湴鍧�浠menuid@寮�澶存椂锛屽叾鍚庡唴瀹瑰皢琚涓鸿彍鍗旾D銆�' : '', + tooltip: '鍦ㄩ摼鎺ヤ腑浠***@褰㈠紡鎷兼帴鐨勫瓧娈碉紙瀛楁鏉ユ簮浜庡瓧娈甸泦涓紝姝ゅ id銆乤ppkey銆乽serid銆丩oginUID 涓虹郴缁熷瓧娈碉級锛岃烦杞椂灏嗘浛鎹负瀵瑰簲鍊硷紝渚嬪锛歨ttp://sso.mk9h.cn/doc/index.html?appkey=@appkey@&LoginUID=@LoginUID@锛屽叾涓璦ppkey涓嶭oginUID灏嗚鏇挎崲銆�' + (['pc', 'mob'].includes(appType) ? '褰撻摼鎺ョ被鍨嬩负鈥滃叾浠栤�濓紝涓旈摼鎺ュ湴鍧�浠menuid@寮�澶存椂锛屽叾鍚庡唴瀹瑰皢琚涓鸿彍鍗旾D銆�' : ''), + toolWidth: 350, required: true, options: fields }, @@ -678,25 +685,12 @@ ] }, { - type: 'radio', - key: 'joint', - label: '鎷兼帴鍙傛暟', - initVal: card.joint || 'true', - required: false, - options: [{ - value: 'true', - text: '鏄�' - }, { - value: 'false', - text: '鍚�' - }] - }, - { type: 'codemirror', key: 'formula', label: '鍏紡', initVal: card.formula || '', tooltip: '鎵ц鏃朵細浣跨敤鏌ヨ鍒扮殑鏁版嵁鏇挎崲鐩稿簲鐨勫瓧娈碉紝灞曠ず鑾峰緱鐨勭粨鏋滐紝鍦ㄤ笉浣跨敤瑙f瀽鏃舵崲琛岀鎴栫┖鏍间細鏇挎崲涓洪〉闈㈠厓绱犮�傚彲浣跨敤JS鐨勪竴浜涜娉曪紝濡傦細涓夊厓琛ㄨ揪寮� @field1@ > @field2@ ? 0 : 1锛汳ath瀵硅薄锛屽彇缁濆鍊� Math.abs(@field@)銆佸洓鑸嶄簲鍏� Math.round(@field@)绛夈�傛敞锛氫細鏇挎崲鍏紡涓殑@username@銆丂fullName@銆丂bid@銆�', + toolWidth: 450, placeholder: '渚嬪锛欯price@ * @number@', required: true }, diff --git a/src/menu/components/card/cardcomponent/options.jsx b/src/menu/components/card/cardcomponent/options.jsx index e4f29d3..28d5b82 100644 --- a/src/menu/components/card/cardcomponent/options.jsx +++ b/src/menu/components/card/cardcomponent/options.jsx @@ -149,7 +149,7 @@ {field: 'menu', values: ['menu']}, {field: 'linkurl', values: ['link']}, {field: 'open', values: ['menu', 'link', 'menus']}, - {field: 'joint', values: ['menu', 'link', 'menus', 'miniprogram']}, + {field: 'joint', values: ['miniprogram']}, {field: 'linkbtn', values: ['button']}, {field: 'clickType', values: ['button']}, {field: 'menuType', values: ['menus']}, @@ -171,6 +171,7 @@ field: 'menu', label: '鍏宠仈鑿滃崟', initval: setting.menu || (appType ? '' : []), + tooltip: `琛屼俊鎭�${appType ? '锛堝瓧娈甸泦涓墠40涓暱搴︿笉瓒呰繃256鐨勫瓧娈碉級' : ''}灏嗕紶閫掕嚦姝よ彍鍗曪紝鍙湪url鍙橀噺銆佽〃鍗曪紙鍏宠仈涓昏〃锛夈�侀潤鎬佸睘鎬у崱銆佹诞鍔ㄥ崱涓娇鐢ㄣ�俙, required: true, extendName: 'MenuNo', options: menulist, @@ -180,6 +181,8 @@ field: 'linkurl', label: '閾炬帴', initval: setting.linkurl || '', + tooltip: '鍦ㄩ摼鎺ヤ腑浠***@褰㈠紡鎷兼帴鐨勫瓧娈碉紙瀛楁鏉ユ簮浜庡瓧娈甸泦涓紝姝ゅ id銆乤ppkey銆乽serid銆丩oginUID 涓虹郴缁熷瓧娈碉級锛岃烦杞椂灏嗘浛鎹负瀵瑰簲鍊硷紝渚嬪锛歨ttp://sso.mk9h.cn/doc/index.html?appkey=@appkey@&LoginUID=@LoginUID@锛屽叾涓璦ppkey涓嶭oginUID灏嗚鏇挎崲銆�', + toolWidth: 350, required: true, options: [], span: 24 diff --git a/src/menu/components/card/cardsimplecomponent/options.jsx b/src/menu/components/card/cardsimplecomponent/options.jsx index 9e177e7..b23531a 100644 --- a/src/menu/components/card/cardsimplecomponent/options.jsx +++ b/src/menu/components/card/cardsimplecomponent/options.jsx @@ -97,20 +97,8 @@ {field: 'menu', values: ['menu']}, {field: 'linkurl', values: ['link']}, {field: 'open', values: ['menu', 'link']}, - {field: 'joint', values: ['menu', 'link']}, {field: 'linkbtn', values: ['button']}, ] - }, - { - type: 'radio', - field: 'joint', - label: '鍙傛暟鎷兼帴', - initval: setting.joint || 'true', - required: false, - options: [ - {value: 'true', label: '鏄�'}, - {value: 'false', label: '鍚�'}, - ], }, { type: 'radio', @@ -129,6 +117,7 @@ field: 'menu', label: '鍏宠仈鑿滃崟', initval: setting.menu || (appType ? '' : []), + tooltip: `琛屼俊鎭�${appType ? '锛堝瓧娈甸泦涓墠40涓暱搴︿笉瓒呰繃256鐨勫瓧娈碉級' : ''}灏嗕紶閫掕嚦姝よ彍鍗曪紝鍙湪url鍙橀噺銆佽〃鍗曪紙鍏宠仈涓昏〃锛夈�侀潤鎬佸睘鎬у崱銆佹诞鍔ㄥ崱涓娇鐢ㄣ�俙, required: true, extendName: 'MenuNo', options: appType ? appmenulist : menulist, @@ -138,6 +127,8 @@ field: 'linkurl', label: '閾炬帴', initval: setting.linkurl || '', + tooltip: '鍦ㄩ摼鎺ヤ腑浠***@褰㈠紡鎷兼帴鐨勫瓧娈碉紙瀛楁鏉ユ簮浜庡瓧娈甸泦涓紝姝ゅ id銆乤ppkey銆乽serid銆丩oginUID 涓虹郴缁熷瓧娈碉級锛岃烦杞椂灏嗘浛鎹负瀵瑰簲鍊硷紝渚嬪锛歨ttp://sso.mk9h.cn/doc/index.html?appkey=@appkey@&LoginUID=@LoginUID@锛屽叾涓璦ppkey涓嶭oginUID灏嗚鏇挎崲銆�', + toolWidth: 350, required: true, options: [], span: 24 @@ -245,7 +236,7 @@ {field: 'menu', values: ['menu']}, {field: 'linkurl', values: ['link']}, {field: 'open', values: ['menu', 'link']}, - {field: 'joint', values: ['menu', 'link', 'miniprogram']}, + {field: 'joint', values: ['miniprogram']}, {field: 'miniAppId', values: ['miniprogram']}, {field: 'miniPath', values: ['miniprogram']}, ] @@ -255,6 +246,7 @@ field: 'menu', label: '鍏宠仈鑿滃崟', initval: setting.menu || (appType ? '' : []), + tooltip: `琛屼俊鎭�${appType ? '锛堝瓧娈甸泦涓墠40涓暱搴︿笉瓒呰繃256鐨勫瓧娈碉級' : ''}灏嗕紶閫掕嚦姝よ彍鍗曪紝鍙湪url鍙橀噺銆佽〃鍗曪紙鍏宠仈涓昏〃锛夈�侀潤鎬佸睘鎬у崱銆佹诞鍔ㄥ崱涓娇鐢ㄣ�俙, required: true, extendName: 'MenuNo', options: appType ? appmenulist : menulist, @@ -302,6 +294,8 @@ field: 'linkurl', label: '閾炬帴', initval: setting.linkurl || '', + tooltip: '鍦ㄩ摼鎺ヤ腑浠***@褰㈠紡鎷兼帴鐨勫瓧娈碉紙瀛楁鏉ユ簮浜庡瓧娈甸泦涓紝姝ゅ id銆乤ppkey銆乽serid銆丩oginUID 涓虹郴缁熷瓧娈碉級锛岃烦杞椂灏嗘浛鎹负瀵瑰簲鍊硷紝渚嬪锛歨ttp://sso.mk9h.cn/doc/index.html?appkey=@appkey@&LoginUID=@LoginUID@锛屽叾涓璦ppkey涓嶭oginUID灏嗚鏇挎崲銆�', + toolWidth: 350, required: true, options: [], span: 24 diff --git a/src/menu/components/card/data-card/options.jsx b/src/menu/components/card/data-card/options.jsx index 2c480ad..91f71f7 100644 --- a/src/menu/components/card/data-card/options.jsx +++ b/src/menu/components/card/data-card/options.jsx @@ -513,7 +513,6 @@ ], controlFields: [ {field: 'jumpField', values: ['menu', 'link']}, - {field: 'joint', values: ['menu', 'link']}, {field: 'open', values: ['menu', 'link']}, {field: 'menu', values: ['menu']}, {field: 'link', values: ['link']}, @@ -547,18 +546,6 @@ tooltip: '璺宠浆閾炬帴涓烘煡璇㈡暟鎹殑杩斿洖鍊笺��', required: true, options: columns, - forbid: subtype !== 'propcard' || appType !== 'mob' - }, - { - type: 'radio', - field: 'joint', - label: '鍙傛暟鎷兼帴', - initval: wrap.joint || 'true', - required: false, - options: [ - {value: 'true', label: '鏄�'}, - {value: 'false', label: '鍚�'}, - ], forbid: subtype !== 'propcard' || appType !== 'mob' }, { diff --git a/src/menu/components/card/doublecardcomponent/options.jsx b/src/menu/components/card/doublecardcomponent/options.jsx index 7100e7e..e47a287 100644 --- a/src/menu/components/card/doublecardcomponent/options.jsx +++ b/src/menu/components/card/doublecardcomponent/options.jsx @@ -109,7 +109,6 @@ {field: 'menu', values: ['menu']}, {field: 'linkurl', values: ['link']}, {field: 'open', values: ['menu', 'link']}, - {field: 'joint', values: ['menu', 'link']}, {field: 'linkbtn', values: ['button']}, {field: 'clickType', values: ['button', 'unfold']}, ] @@ -119,6 +118,7 @@ field: 'menu', label: '鍏宠仈鑿滃崟', initval: setting.menu || (appType ? '' : []), + tooltip: `琛屼俊鎭�${appType ? '锛堝瓧娈甸泦涓墠40涓暱搴︿笉瓒呰繃256鐨勫瓧娈碉級' : ''}灏嗕紶閫掕嚦姝よ彍鍗曪紝鍙湪url鍙橀噺銆佽〃鍗曪紙鍏宠仈涓昏〃锛夈�侀潤鎬佸睘鎬у崱銆佹诞鍔ㄥ崱涓娇鐢ㄣ�俙, required: true, extendName: 'MenuNo', options: menulist, @@ -128,6 +128,8 @@ field: 'linkurl', label: '閾炬帴', initval: setting.linkurl || '', + tooltip: '鍦ㄩ摼鎺ヤ腑浠***@褰㈠紡鎷兼帴鐨勫瓧娈碉紙瀛楁鏉ユ簮浜庡瓧娈甸泦涓紝姝ゅ id銆乤ppkey銆乽serid銆丩oginUID 涓虹郴缁熷瓧娈碉級锛岃烦杞椂灏嗘浛鎹负瀵瑰簲鍊硷紝渚嬪锛歨ttp://sso.mk9h.cn/doc/index.html?appkey=@appkey@&LoginUID=@LoginUID@锛屽叾涓璦ppkey涓嶭oginUID灏嗚鏇挎崲銆�', + toolWidth: 350, required: true, options: [], span: 24 @@ -143,17 +145,6 @@ {value: 'self', label: appType !== 'mob' ? '褰撳墠绐楀彛' : '褰撳墠椤甸潰'}, ], forbid: appType !== 'pc' && appType !== 'mob' - }, - { - type: 'radio', - field: 'joint', - label: '鍙傛暟鎷兼帴', - initval: setting.joint || 'true', - required: false, - options: [ - {value: 'true', label: '鏄�'}, - {value: 'false', label: '鍚�'}, - ], }, { type: 'select', diff --git a/src/menu/components/chart/antv-G6/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-G6/chartcompile/formconfig.jsx index 2292bc0..3c67d5d 100644 --- a/src/menu/components/chart/antv-G6/chartcompile/formconfig.jsx +++ b/src/menu/components/chart/antv-G6/chartcompile/formconfig.jsx @@ -129,7 +129,6 @@ {field: 'menus', values: ['menus']}, {field: 'menuType', values: ['menus']}, {field: 'open', values: ['menu', 'menus']}, - {field: 'joint', values: ['menu', 'menus']}, ] }, { @@ -160,17 +159,6 @@ {value: 'self', label: '褰撳墠绐楀彛'}, ], forbid: appType !== 'pc' - }, - { - type: 'radio', - field: 'joint', - label: '鍙傛暟鎷兼帴', - initval: card.joint || 'true', - required: false, - options: [ - {value: 'true', label: '鏄�'}, - {value: 'false', label: '鍚�'}, - ], }, { type: 'table', diff --git a/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx index 7946f54..a808760 100644 --- a/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx +++ b/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx @@ -128,7 +128,6 @@ controlFields: [ {field: 'menu', values: ['menu']}, {field: 'open', values: ['menu', 'menus']}, - {field: 'joint', values: ['menu', 'menus']}, {field: 'menuType', values: ['menus']}, {field: 'menus', values: ['menus']}, ] @@ -165,19 +164,6 @@ {value: 'self', label: '褰撳墠绐楀彛'}, ], forbid: appType !== 'pc' || card.chartType !== 'bar', - hidden: card.click !== 'menu' && card.click !== 'menus' - }, - { - type: 'radio', - field: 'joint', - label: '鍙傛暟鎷兼帴', - initval: card.joint || 'true', - required: false, - options: [ - {value: 'true', label: '鏄�'}, - {value: 'false', label: '鍚�'}, - ], - forbid: appType === 'mob' || card.chartType !== 'bar', hidden: card.click !== 'menu' && card.click !== 'menus' }, { diff --git a/src/menu/components/form/formaction/actionform/index.jsx b/src/menu/components/form/formaction/actionform/index.jsx index 58a9db3..33ebafb 100644 --- a/src/menu/components/form/formaction/actionform/index.jsx +++ b/src/menu/components/form/formaction/actionform/index.jsx @@ -176,6 +176,15 @@ this.state.formlist.forEach((item, index) => { if (item.hidden || item.forbid) return + let label = item.label + if (item.tooltip) { + if (item.toolWidth) { + label = <Tooltip placement="topLeft" overlayStyle={{maxWidth: item.toolWidth}} title={<div onClick={(e) => e.stopPropagation()}>{item.tooltip}</div>}><QuestionCircleOutlined className="mk-form-tip" />{item.label}</Tooltip> + } else { + label = <Tooltip placement="topLeft" title={<div onClick={(e) => e.stopPropagation()}>{item.tooltip}</div>}><QuestionCircleOutlined className="mk-form-tip" />{item.label}</Tooltip> + } + } + if (item.type === 'text') { let _rules = [] if (item.key === 'innerFunc') { @@ -222,12 +231,7 @@ } fields.push( <Col span={12} key={index}> - <Form.Item label={item.tooltip ? - <Tooltip placement="topLeft" overlayClassName={item.tooltipClass} title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal || '', rules: [ @@ -244,7 +248,7 @@ } else if (item.type === 'tip') { fields.push( <Col span={12} key={index}> - <Form.Item label={item.label}> + <Form.Item label={label}> {item.initVal} </Form.Item> </Col> @@ -252,12 +256,7 @@ } else if (item.type === 'number') { fields.push( <Col span={12} key={index}> - <Form.Item label={item.tooltip ? - <Tooltip placement="topLeft" overlayClassName={item.tooltipClass} title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal, rules: [ @@ -273,12 +272,7 @@ } else if (item.type === 'select') { // 涓嬫媺鎼滅储 fields.push( <Col span={12} key={index}> - <Form.Item help={item.help || null} label={item.tooltip ? - <Tooltip placement="topLeft" overlayClassName={item.tooltipClass} title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item help={item.help || null} label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal || '', rules: [ @@ -309,12 +303,7 @@ } else if (item.type === 'radio') { fields.push( <Col span={12} key={index}> - <Form.Item label={item.tooltip ? - <Tooltip placement="topLeft" overlayClassName={item.tooltipClass} title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal, rules: [ @@ -340,7 +329,7 @@ } else if (item.type === 'textarea') { fields.push( <Col span={24} key={index}> - <Form.Item label={item.label} className="textarea"> + <Form.Item label={label} className="textarea"> {getFieldDecorator(item.key, { initialValue: item.initVal, rules: [ @@ -356,12 +345,7 @@ } else if (item.type === 'cascader') { fields.push( <Col span={12} key={index}> - <Form.Item label={item.tooltip ? - <Tooltip placement="topLeft" overlayClassName={item.tooltipClass} title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal || [], rules: [ diff --git a/src/menu/components/form/formaction/formconfig.jsx b/src/menu/components/form/formaction/formconfig.jsx index bfc2018..e3bc348 100644 --- a/src/menu/components/form/formaction/formconfig.jsx +++ b/src/menu/components/form/formaction/formconfig.jsx @@ -254,7 +254,7 @@ initVal: card.innerFunc || '', tooltip: functip, fields: usefulFields, - tooltipClass: 'middle', + toolWidth: 350, required: true, readonly: false }, diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx index 736388d..c00ec97 100644 --- a/src/menu/components/share/actioncomponent/actionform/index.jsx +++ b/src/menu/components/share/actioncomponent/actionform/index.jsx @@ -425,13 +425,9 @@ reOptions.Ot = requireOptions.filter(op => ['notRequired', 'requiredSgl'].includes(op.value)) if (this.record.pageTemplate === 'custom') { - shows.push('url', 'proUrl', 'joint', 'open') + shows.push('url', 'proUrl', 'open') } else if (this.record.pageTemplate === 'linkpage') { shows.push('linkmenu', 'open') - - if (Ot === 'requiredSgl') { - shows.push('joint') - } reRequired.linkmenu = true reTooltip.linkmenu = '' @@ -517,7 +513,7 @@ } reOptions.Ot = requireOptions.filter(op => ['requiredSgl'].includes(op.value)) } else if (_funcType === 'refund') { - shows.push('Ot', 'execSuccess', 'execError', 'syncComponent', 'openmenu') + shows.push('Ot', 'execSuccess', 'execError', 'syncComponent', 'openmenu', 'tipTitle') reOptions.Ot = requireOptions.filter(op => ['requiredSgl'].includes(op.value)) } else if (_funcType === 'shareLink') { shows.push('shortUrl', 'shareUrl', 'shareProUrl', 'shareTip') diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx index d4ba95f..8b93c3b 100644 --- a/src/menu/components/share/actioncomponent/formconfig.jsx +++ b/src/menu/components/share/actioncomponent/formconfig.jsx @@ -532,7 +532,8 @@ key: 'url', label: '椤甸潰鍦板潃', initVal: card.url || '', - tooltip: appType === '' ? '鍦板潃鏍煎紡涓猴細http://******/admin/index.html#/iframe/menuId/loginuid/BID 浼氭墦寮�鏍囩椤点�傛敞锛氫娇鐢ˊloginuid@鏃惰嚜鍔ㄦ浛鎹负褰撳墠绯荤粺鐨刲oginuid锛涢�夋嫨鍗曡涓旀嫾鎺ュ弬鏁版椂浼氭嫾鎺ID銆�' : '', + tooltip: '鍦ㄩ摼鎺ヤ腑浠***@褰㈠紡鎷兼帴鐨勫瓧娈碉紙瀛楁鏉ユ簮浜庡瓧娈甸泦涓紝姝ゅ id銆乤ppkey銆乽serid銆丩oginUID 涓虹郴缁熷瓧娈碉級锛岃烦杞椂灏嗘浛鎹负瀵瑰簲鍊硷紝渚嬪锛歨ttp://sso.mk9h.cn/doc/index.html?appkey=@appkey@&LoginUID=@LoginUID@锛屽叾涓璦ppkey涓嶭oginUID灏嗚鏇挎崲銆�' + (appType === '' ? '鍦板潃鏍煎紡涓猴細******/admin/index.html#/iframe/menuId/@loginuid@ 浼氭墦寮�鏍囩椤点��' : ''), + toolWidth: 350, required: true }, { @@ -540,7 +541,8 @@ key: 'proUrl', label: '姝e紡鍦板潃', initVal: card.proUrl || '', - tooltip: appType === '' ? '鍦板潃鏍煎紡涓猴細http://******/admin/index.html#/iframe/menuId/loginuid/BID 浼氭墦寮�鏍囩椤点�傛敞锛氫娇鐢ˊloginuid@鏃惰嚜鍔ㄦ浛鎹负褰撳墠绯荤粺鐨刲oginuid锛涢�夋嫨鍗曡涓旀嫾鎺ュ弬鏁版椂浼氭嫾鎺ID銆�' : '', + tooltip: '鍦ㄩ摼鎺ヤ腑浠***@褰㈠紡鎷兼帴鐨勫瓧娈碉紙瀛楁鏉ユ簮浜庡瓧娈甸泦涓紝姝ゅ id銆乤ppkey銆乽serid銆丩oginUID 涓虹郴缁熷瓧娈碉級锛岃烦杞椂灏嗘浛鎹负瀵瑰簲鍊硷紝渚嬪锛歨ttp://sso.mk9h.cn/doc/index.html?appkey=@appkey@&LoginUID=@LoginUID@锛屽叾涓璦ppkey涓嶭oginUID灏嗚鏇挎崲銆�' + (appType === '' ? '鍦板潃鏍煎紡涓猴細******/admin/index.html#/iframe/menuId/@loginuid@ 浼氭墦寮�鏍囩椤点��' : ''), + toolWidth: 350, required: false }, { @@ -959,20 +961,6 @@ }, { value: 'system', text: '绯荤粺' - }] - }, - { - type: 'radio', - key: 'joint', - label: '鎷兼帴鍙傛暟', - initVal: card.joint || 'true', - required: false, - options: [{ - value: 'true', - text: '鏄�' - }, { - value: 'false', - text: '鍚�' }] }, { @@ -1897,7 +1885,8 @@ key: 'url', label: '椤甸潰鍦板潃', initVal: card.url || '', - tooltip: '鍦板潃鏍煎紡涓猴細http://******/admin/index.html#/iframe/menuId/loginuid/BID 浼氭墦寮�鏍囩椤点�傛敞锛氫娇鐢ˊloginuid@鏃惰嚜鍔ㄦ浛鎹负褰撳墠绯荤粺鐨刲oginuid锛涢�夋嫨鍗曡涓旀嫾鎺ュ弬鏁版椂浼氭嫾鎺ID銆�', + tooltip: '鍦ㄩ摼鎺ヤ腑浠***@褰㈠紡鎷兼帴鐨勫瓧娈碉紙瀛楁鏉ユ簮浜庡瓧娈甸泦涓紝姝ゅ id銆乤ppkey銆乽serid銆丩oginUID 涓虹郴缁熷瓧娈碉級锛岃烦杞椂灏嗘浛鎹负瀵瑰簲鍊硷紝渚嬪锛歨ttp://sso.mk9h.cn/doc/index.html?appkey=@appkey@&LoginUID=@LoginUID@锛屽叾涓璦ppkey涓嶭oginUID灏嗚鏇挎崲銆傚湴鍧�鏍煎紡涓猴細******/admin/index.html#/iframe/menuId/@loginuid@ 浼氭墦寮�鏍囩椤点��', + toolWidth: 350, required: true }, { @@ -1905,7 +1894,8 @@ key: 'proUrl', label: '姝e紡鍦板潃', initVal: card.proUrl || '', - tooltip: '鍦板潃鏍煎紡涓猴細http://******/admin/index.html#/iframe/menuId/loginuid/BID 浼氭墦寮�鏍囩椤点�傛敞锛氫娇鐢ˊloginuid@鏃惰嚜鍔ㄦ浛鎹负褰撳墠绯荤粺鐨刲oginuid锛涢�夋嫨鍗曡涓旀嫾鎺ュ弬鏁版椂浼氭嫾鎺ID銆�', + tooltip: '鍦ㄩ摼鎺ヤ腑浠***@褰㈠紡鎷兼帴鐨勫瓧娈碉紙瀛楁鏉ユ簮浜庡瓧娈甸泦涓紝姝ゅ id銆乤ppkey銆乽serid銆丩oginUID 涓虹郴缁熷瓧娈碉級锛岃烦杞椂灏嗘浛鎹负瀵瑰簲鍊硷紝渚嬪锛歨ttp://sso.mk9h.cn/doc/index.html?appkey=@appkey@&LoginUID=@LoginUID@锛屽叾涓璦ppkey涓嶭oginUID灏嗚鏇挎崲銆傚湴鍧�鏍煎紡涓猴細******/admin/index.html#/iframe/menuId/@loginuid@ 浼氭墦寮�鏍囩椤点��', + toolWidth: 350, required: false }, { @@ -2273,20 +2263,6 @@ initVal: card.class, required: false, options: btnClasses - }, - { - type: 'radio', - key: 'joint', - label: '鎷兼帴鍙傛暟', - initVal: card.joint || 'true', - required: false, - options: [{ - value: 'true', - text: '鏄�' - }, { - value: 'false', - text: '鍚�' - }] }, { type: 'text', 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 5636097..cd62ff5 100644 --- a/src/menu/components/table/base-table/columns/editColumn/formconfig.jsx +++ b/src/menu/components/table/base-table/columns/editColumn/formconfig.jsx @@ -103,6 +103,8 @@ key: 'nameField', label: '鍚嶇О瀛楁', initVal: card.nameField || '', + tooltip: '鍚嶇О瀛楁涓洪摼鎺ュ湪鐣岄潰涓樉绀虹殑鍐呭锛屽湪閾炬帴涓互@***@褰㈠紡鎷兼帴鐨勫瓧娈碉紙瀛楁鏉ユ簮浜庡瓧娈甸泦涓紝姝ゅ id銆乤ppkey銆乽serid銆丩oginUID 涓虹郴缁熷瓧娈碉級锛岃烦杞椂灏嗘浛鎹负瀵瑰簲鍊硷紝渚嬪锛歨ttp://sso.mk9h.cn/doc/index.html?appkey=@appkey@&LoginUID=@LoginUID@锛屽叾涓璦ppkey涓嶭oginUID灏嗚鏇挎崲銆�', + toolWidth: 350, required: false, rules: [{ max: 100, @@ -118,20 +120,6 @@ label: '鍒楀', initVal: card.Width || 120, required: true - }, - { - type: 'radio', - key: 'joint', - label: '鎷兼帴鍙傛暟', - initVal: card.joint || 'true', - required: true, - options: [{ - value: 'true', - text: '鏄�' - }, { - value: 'false', - text: '鍚�' - }] }, { type: 'radio', @@ -440,15 +428,9 @@ key: 'linkurl', label: '閾炬帴鍦板潃', initVal: card.linkurl || '', + tooltip: '鍦ㄩ摼鎺ヤ腑浠***@褰㈠紡鎷兼帴鐨勫瓧娈碉紙瀛楁鏉ユ簮浜庡瓧娈甸泦涓紝姝ゅ id銆乤ppkey銆乽serid銆丩oginUID 涓虹郴缁熷瓧娈碉級锛岃烦杞椂灏嗘浛鎹负瀵瑰簲鍊硷紝渚嬪锛歨ttp://sso.mk9h.cn/doc/index.html?appkey=@appkey@&LoginUID=@LoginUID@锛屽叾涓璦ppkey涓嶭oginUID灏嗚鏇挎崲銆�', + toolWidth: 350, required: true - }, - { - type: 'multiselect', - key: 'linkfields', - label: '鍏宠仈瀛楁', - initVal: card.linkfields || [], - required: false, - options: fields, }, { type: 'textarea', 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 3377f09..dac43a3 100644 --- a/src/menu/components/table/base-table/columns/editColumn/index.jsx +++ b/src/menu/components/table/base-table/columns/editColumn/index.jsx @@ -11,7 +11,7 @@ const columnTypeOptions = { text: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'textFormat', 'fieldlength', 'blacklist', 'perspective', 'rowspan'], number: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'decimal', 'format', 'prefix', 'postfix', 'blacklist', 'perspective', 'sum', 'rowspan'], - link: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'joint', 'Width', 'fieldlength', 'blacklist', 'nameField'], + link: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'fieldlength', 'blacklist', 'nameField'], textarea: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'fieldlength', 'prefix', 'postfix', 'blacklist'], picture: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'fieldlength', 'blacklist', 'scale', 'lenWidRadio', 'backgroundSize', 'span', 'lostTip'], video: ['label', 'field', 'type', 'Align', 'Hide', 'startTime', 'Width', 'fieldlength', 'blacklist', 'aspectRatio'], @@ -93,7 +93,7 @@ if (this.record.perspective === 'linkmenu') { _options.push('linkmenu', 'open') } else if (this.record.perspective === 'linkurl') { - _options.push('linkurl', 'linkfields', 'open') + _options.push('linkurl', 'open') } } else if (this.record.type === 'formula' && this.record.eval === 'true') { _options.push('decimal') @@ -209,15 +209,19 @@ formlist.forEach((item, index) => { if (item.hidden || item.forbid) return + let label = item.label + if (item.tooltip) { + if (item.toolWidth) { + label = <Tooltip placement="topLeft" overlayStyle={{maxWidth: item.toolWidth}} title={<div onClick={(e) => e.stopPropagation()}>{item.tooltip}</div>}><QuestionCircleOutlined className="mk-form-tip" />{item.label}</Tooltip> + } else { + label = <Tooltip placement="topLeft" title={<div onClick={(e) => e.stopPropagation()}>{item.tooltip}</div>}><QuestionCircleOutlined className="mk-form-tip" />{item.label}</Tooltip> + } + } + if (item.type === 'text') { fields.push( <Col span={12} key={index}> - <Form.Item label={item.tooltip ? - <Tooltip placement="topLeft" title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal || '', rules: [ @@ -234,12 +238,7 @@ } else if (item.type === 'number') { fields.push( <Col span={12} key={index}> - <Form.Item label={item.tooltip ? - <Tooltip placement="topLeft" title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal, rules: [ @@ -256,7 +255,7 @@ } else if (item.type === 'select') { fields.push( <Col span={12} key={index}> - <Form.Item label={item.label}> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal || '', rules: [ @@ -285,12 +284,7 @@ } else if (item.type === 'radio') { fields.push( <Col span={12} key={index}> - <Form.Item label={item.tooltip ? - <Tooltip placement="topLeft" title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal, rules: [ @@ -312,12 +306,7 @@ } else if (item.type === 'checkbox') { fields.push( <Col span={12} key={index}> - <Form.Item label={item.tooltip ? - <Tooltip placement="topLeft" title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal })( @@ -331,7 +320,7 @@ } else if (item.type === 'multiselect') { // 澶氶�� fields.push( <Col span={12} key={index}> - <Form.Item label={item.label}> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal || [] })( @@ -351,7 +340,7 @@ } else if (item.type === 'cascader') { // 澶氶�� fields.push( <Col span={12} key={index}> - <Form.Item label={item.label}> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal || [], rules: [ @@ -374,12 +363,7 @@ if (item.key === 'formula') { fields.push( <Col span={24} className="textarea" key={index}> - <Form.Item label={item.tooltip ? - <Tooltip placement="topLeft" title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal || '', rules: [ @@ -398,12 +382,7 @@ } else { fields.push( <Col span={24} key={index} className="textarea"> - <Form.Item label={item.tooltip ? - <Tooltip placement="topLeft" title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal || '', rules: [ 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 c531a1f..716a8c8 100644 --- a/src/menu/components/table/edit-table/columns/editColumn/index.jsx +++ b/src/menu/components/table/edit-table/columns/editColumn/index.jsx @@ -318,6 +318,14 @@ let content = null let extra = null let initVal = item.initVal || '' + let label = item.label + if (item.tooltip) { + if (item.toolWidth) { + label = <Tooltip placement="topLeft" overlayStyle={{maxWidth: item.toolWidth}} title={<div onClick={(e) => e.stopPropagation()}>{item.tooltip}</div>}><QuestionCircleOutlined className="mk-form-tip" />{item.label}</Tooltip> + } else { + label = <Tooltip placement="topLeft" title={<div onClick={(e) => e.stopPropagation()}>{item.tooltip}</div>}><QuestionCircleOutlined className="mk-form-tip" />{item.label}</Tooltip> + } + } if (item.type === 'text') { rules = [ @@ -392,12 +400,7 @@ if (item.key === 'formula') { fields.push( <Col span={span} key={index}> - <Form.Item className={className} extra={extra} label={item.tooltip ? - <Tooltip placement="topLeft" title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item className={className} extra={extra} label={label}> {getFieldDecorator(item.key, { initialValue: initVal, rules: rules @@ -454,12 +457,7 @@ fields.push( <Col span={span} key={index}> - <Form.Item className={className} extra={extra} label={item.tooltip ? - <Tooltip placement="topLeft" title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item className={className} extra={extra} label={label}> {getFieldDecorator(item.key, { initialValue: initVal, rules: rules 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 bf962a6..6ad02d3 100644 --- a/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx +++ b/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx @@ -105,6 +105,8 @@ key: 'nameField', label: '鍚嶇О瀛楁', initVal: card.nameField || '', + tooltip: '鍚嶇О瀛楁涓洪摼鎺ュ湪鐣岄潰涓樉绀虹殑鍐呭锛屽湪閾炬帴涓互@***@褰㈠紡鎷兼帴鐨勫瓧娈碉紙瀛楁鏉ユ簮浜庡瓧娈甸泦涓紝姝ゅ id銆乤ppkey銆乽serid銆丩oginUID 涓虹郴缁熷瓧娈碉級锛岃烦杞椂灏嗘浛鎹负瀵瑰簲鍊硷紝渚嬪锛歨ttp://sso.mk9h.cn/doc/index.html?appkey=@appkey@&LoginUID=@LoginUID@锛屽叾涓璦ppkey涓嶭oginUID灏嗚鏇挎崲銆�', + toolWidth: 350, required: false, options: [{uuid: 'empty', field: '', label: '绌�'}, ...fields] }, @@ -117,20 +119,6 @@ label: '鍒楀', initVal: card.Width || 120, required: true - }, - { - type: 'radio', - key: 'joint', - label: '鎷兼帴鍙傛暟', - initVal: card.joint || 'true', - required: true, - options: [{ - value: 'true', - text: '鏄�' - }, { - value: 'false', - text: '鍚�' - }] }, { type: 'radio', @@ -498,16 +486,9 @@ key: 'linkurl', label: '閾炬帴鍦板潃', initVal: card.linkurl || '', + tooltip: '鍦ㄩ摼鎺ヤ腑浠***@褰㈠紡鎷兼帴鐨勫瓧娈碉紙瀛楁鏉ユ簮浜庡瓧娈甸泦涓紝姝ゅ id銆乤ppkey銆乽serid銆丩oginUID 涓虹郴缁熷瓧娈碉級锛岃烦杞椂灏嗘浛鎹负瀵瑰簲鍊硷紝渚嬪锛歨ttp://sso.mk9h.cn/doc/index.html?appkey=@appkey@&LoginUID=@LoginUID@锛屽叾涓璦ppkey涓嶭oginUID灏嗚鏇挎崲銆�', + toolWidth: 350, required: true, - forbid: appType === 'mob' - }, - { - type: 'multiselect', - key: 'linkfields', - label: '鍏宠仈瀛楁', - initVal: card.linkfields || [], - required: false, - options: fields, forbid: appType === 'mob' }, { 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 afa1f03..5f3d09c 100644 --- a/src/menu/components/table/normal-table/columns/editColumn/index.jsx +++ b/src/menu/components/table/normal-table/columns/editColumn/index.jsx @@ -12,7 +12,7 @@ const columnTypeOptions = { text: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'textFormat', 'blacklist', 'perspective', 'rowspan'], number: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'decimal', 'format', 'prefix', 'postfix', 'blacklist', 'perspective', 'sum', 'rowspan'], - link: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'joint', 'Width', 'blacklist', 'nameField'], + link: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'blacklist', 'nameField'], textarea: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'blacklist'], picture: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'blacklist', 'scale', 'lenWidRadio', 'backgroundSize', 'span', 'lostTip'], video: ['label', 'field', 'type', 'Align', 'Hide', 'startTime', 'Width', 'blacklist', 'aspectRatio'], @@ -92,7 +92,7 @@ if (this.record.perspective === 'linkmenu') { _options.push('linkmenu', 'open') } else if (this.record.perspective === 'linkurl') { - _options.push('linkurl', 'linkfields', 'open') + _options.push('linkurl', 'open') } } else if (this.record.type === 'formula' && this.record.eval === 'true') { _options.push('decimal') @@ -217,6 +217,15 @@ formlist.forEach((item, index) => { if (item.hidden || item.forbid) return + let label = item.label + if (item.tooltip) { + if (item.toolWidth) { + label = <Tooltip placement="topLeft" overlayStyle={{maxWidth: item.toolWidth}} title={<div onClick={(e) => e.stopPropagation()}>{item.tooltip}</div>}><QuestionCircleOutlined className="mk-form-tip" />{item.label}</Tooltip> + } else { + label = <Tooltip placement="topLeft" title={<div onClick={(e) => e.stopPropagation()}>{item.tooltip}</div>}><QuestionCircleOutlined className="mk-form-tip" />{item.label}</Tooltip> + } + } + if (item.type === 'text') { let rules = item.rules || [] if (item.key !== 'linkurl') { @@ -227,12 +236,7 @@ } fields.push( <Col span={12} key={index}> - <Form.Item label={item.tooltip ? - <Tooltip placement="topLeft" title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal || '', rules: [ @@ -249,12 +253,7 @@ } else if (item.type === 'number') { fields.push( <Col span={12} key={index}> - <Form.Item label={item.tooltip ? - <Tooltip placement="topLeft" title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal, rules: [ @@ -271,7 +270,7 @@ } else if (item.type === 'select') { fields.push( <Col span={12} key={index}> - <Form.Item label={item.label}> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal || '', rules: [ @@ -300,12 +299,7 @@ } else if (item.type === 'radio') { fields.push( <Col span={12} key={index}> - <Form.Item label={item.tooltip ? - <Tooltip placement="topLeft" title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal, rules: [ @@ -327,12 +321,7 @@ } else if (item.type === 'checkbox') { fields.push( <Col span={12} key={index}> - <Form.Item label={item.tooltip ? - <Tooltip placement="topLeft" title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal })( @@ -346,7 +335,7 @@ } else if (item.type === 'multiselect') { // 澶氶�� fields.push( <Col span={12} key={index}> - <Form.Item label={item.label}> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal || [] })( @@ -366,7 +355,7 @@ } else if (item.type === 'cascader') { fields.push( <Col span={12} key={index}> - <Form.Item label={item.label}> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal || [], rules: [ @@ -389,12 +378,7 @@ if (item.key === 'formula') { fields.push( <Col span={24} className="textarea" key={index}> - <Form.Item label={item.tooltip ? - <Tooltip placement="topLeft" title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal || '', rules: [ @@ -413,12 +397,7 @@ } else { fields.push( <Col span={24} key={index} className="textarea"> - <Form.Item label={item.tooltip ? - <Tooltip placement="topLeft" title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal || '', rules: [ diff --git a/src/menu/debug/index.jsx b/src/menu/debug/index.jsx index 8304b9d..09c2038 100644 --- a/src/menu/debug/index.jsx +++ b/src/menu/debug/index.jsx @@ -1324,6 +1324,10 @@ ` } } + + if (_backCustomScript) { + _sql += _backCustomScript + } _sql = _sql.replace(/@start_type@/ig, `'寮�濮�'`) _sql = _sql.replace(/@check_type@/ig, `'瀹℃牳'`) @@ -1339,9 +1343,7 @@ _sql = _sql.replace(/@statusname@/ig, `'${statusName}'`) _sql = _sql.replace(/@work_group@/ig, `'mk'`) _sql = _sql.replace(/@work_grade@/ig, `'0'`) - } - - if (_backCustomScript) { + } else if (_backCustomScript) { _sql += _backCustomScript } diff --git a/src/tabviews/basetable/index.jsx b/src/tabviews/basetable/index.jsx index c6204fb..a8c9ff9 100644 --- a/src/tabviews/basetable/index.jsx +++ b/src/tabviews/basetable/index.jsx @@ -45,7 +45,7 @@ * @description 鑾峰彇椤甸潰閰嶇疆淇℃伅 */ async loadconfig () { - const { MenuID, MenuName } = this.props + const { MenuID, MenuName, param } = this.props let _param = { func: 'sPC_Get_LongParam', @@ -161,9 +161,18 @@ // 鏉冮檺杩囨护 let roleId = sessionStorage.getItem('role_id') || '' // 瑙掕壊ID let skip = window.GLOB.mkHS - let param = this.props.param || {} // url鍙傛暟 + let urlparam = {} // url鍙傛暟 + if (param) { + Object.keys(param).forEach(key => { + if (/^\$/.test(key)) { + urlparam[key] = param[key] + } else { + urlparam[key.toLowerCase()] = param[key] + } + }) + } - window.GLOB.CacheData.set(MenuID, param) + window.GLOB.CacheData.set(MenuID, urlparam) let userName = sessionStorage.getItem('User_Name') || '' let fullName = sessionStorage.getItem('Full_Name') || '' @@ -181,7 +190,7 @@ } if (config.urlFields) { config.urlFields.forEach(field => { - let val = `'${param[field] || ''}'` + let val = `'${urlparam[field.toLowerCase()] || ''}'` regs.push({ reg: new RegExp('@' + field + '@', 'ig'), value: val @@ -193,7 +202,7 @@ regs.push({ reg: /@works_flow_code@/ig, value: `'${config.flow_code}'` }) } - config.components = this.filterComponent(config.components, roleId, window.GLOB.mkActions, skip, param, MenuID, config.MenuName, config.process === 'true') + config.components = this.filterComponent(config.components, roleId, window.GLOB.mkActions, skip, urlparam, MenuID, config.MenuName, config.process === 'true') let autoMatic = null if (config.autoMatic && config.autoMatic.enable === 'true') { @@ -224,7 +233,7 @@ } }) - let BID = param.$BID || '' + let BID = urlparam.$BID || '' config.components = this.formatSetting(config.components, regs) diff --git a/src/tabviews/custom/components/card/balcony/index.jsx b/src/tabviews/custom/components/card/balcony/index.jsx index 830ba46..3b9b8f7 100644 --- a/src/tabviews/custom/components/card/balcony/index.jsx +++ b/src/tabviews/custom/components/card/balcony/index.jsx @@ -71,12 +71,26 @@ _data = window.GLOB.CacheData.get(_config.wrap.publicId) _data = fromJS(_data).toJS() } + } else { + _config.elements.forEach(item => { + if (item.eleType === 'button') return + if (item.datatype === 'dynamic' && item.field) { + item.field = item.field.toLowerCase() + } + }) } _data.$$BID = BID || '' _data.$$BData = BData || '' if (_config.setting.primaryKey) { _data.$$uuid = _data[_config.setting.primaryKey] || '' + } + + if (_config.wrap.datatype === 'static' && BData) { + Object.keys(BData).forEach(key => { + if (/\$/.test(key)) return + _data[key.toLowerCase()] = BData[key] + }) } if (!_config.style.position) { @@ -359,8 +373,16 @@ } if (config.wrap.datatype === 'static') { + let _data = {$$BID: BID || '', $$BData: BData, $$empty: true, $$time: new Date().getTime()} + if (BData) { + Object.keys(BData).forEach(key => { + if (/\$/.test(key)) return + _data[key.toLowerCase()] = BData[key] + }) + } + this.setState({ - data: {$$BID: BID || '', $$BData: BData, $$empty: true, $$time: new Date().getTime()}, + data: _data }) return } else if (config.setting.supModule && !BID) { // BID 涓嶅瓨鍦ㄦ椂锛屼笉鍋氭煡璇� diff --git a/src/tabviews/custom/components/card/cardItem/index.jsx b/src/tabviews/custom/components/card/cardItem/index.jsx index aa25ec8..84b441d 100644 --- a/src/tabviews/custom/components/card/cardItem/index.jsx +++ b/src/tabviews/custom/components/card/cardItem/index.jsx @@ -53,18 +53,14 @@ MenuID: menu.MenuID, MenuName: menu.MenuName, type: menu.tabType, - param: {} + param: {$BID: data.$$uuid || ''} } - if (card.setting.joint === 'true') { - newtab.param.$BID = data.$$uuid || '' - - Object.keys(data).forEach(key => { - if (/^\$/.test(key)) return - if (key === 'children') return - newtab.param[key] = data[key] - }) - } + Object.keys(data).forEach(key => { + if (/^\$/.test(key)) return + if (key === 'children') return + newtab.param[key] = data[key] + }) MKEmitter.emit('modifyTabs', newtab, true) } else if (card.setting.click === 'menu') { @@ -83,17 +79,13 @@ if (!menu) return - menu.param = {} - - if (card.setting.joint === 'true') { - menu.param.$BID = data.$$uuid || '' + menu.param = {$BID: data.$$uuid || ''} - Object.keys(data).forEach(key => { - if (/^\$/.test(key)) return - if (key === 'children') return - menu.param[key] = data[key] - }) - } + Object.keys(data).forEach(key => { + if (/^\$/.test(key)) return + if (key === 'children') return + menu.param[key] = data[key] + }) MKEmitter.emit('modifyTabs', menu, true) } else if (card.setting.click === 'link') { @@ -107,6 +99,17 @@ } src = src + `${con}id=${data.$$uuid || ''}&appkey=${window.GLOB.appkey}&userid=${sessionStorage.getItem('UserID')}&LoginUID=${sessionStorage.getItem('LoginUID') || ''}` + } else if (/@/.test(src)) { + src = src.replace(/@id@/ig, data.$$uuid || '') + src = src.replace(/@appkey@/ig, window.GLOB.appkey) + src = src.replace(/@userid@/ig, sessionStorage.getItem('UserID')) + src = src.replace(/@LoginUID@/ig, sessionStorage.getItem('LoginUID')) + + Object.keys(data).forEach(key => { + if (/^\$/.test(key)) return + let reg = new RegExp('@' + key + '@', 'ig') + src = src.replace(reg, data[key]) + }) } window.open(src) @@ -114,7 +117,7 @@ if (data.$$type === 'extendCard') { MKEmitter.emit('triggerBtnId', card.setting.linkbtn, data.$$selectedData || []) } else if (cards.subtype === 'datacard') { - MKEmitter.emit('triggerBtnId', card.setting.linkbtn, [data], 'linkbtn') + MKEmitter.emit('triggerBtnId', card.setting.linkbtn, [data], 'linkbtn', (data.$$uuid || '') + (data.$Index || '')) } else { MKEmitter.emit('triggerBtnId', card.setting.linkbtn, data.$$empty ? [] : [data]) } @@ -132,7 +135,7 @@ if (data.$$type === 'extendCard') { MKEmitter.emit('triggerBtnId', card.setting.linkbtn, data.$$selectedData || []) } else if (cards.subtype === 'datacard') { - MKEmitter.emit('triggerBtnId', card.setting.linkbtn, [data], 'linkbtn') + MKEmitter.emit('triggerBtnId', card.setting.linkbtn, [data], 'linkbtn', (data.$$uuid || '') + (data.$Index || '')) } else { MKEmitter.emit('triggerBtnId', card.setting.linkbtn, data.$$empty ? [] : [data]) } diff --git a/src/tabviews/custom/components/card/cardcellList/index.jsx b/src/tabviews/custom/components/card/cardcellList/index.jsx index d092bd8..dee005b 100644 --- a/src/tabviews/custom/components/card/cardcellList/index.jsx +++ b/src/tabviews/custom/components/card/cardcellList/index.jsx @@ -106,7 +106,7 @@ if (card.linkType === 'linkmenu') { if (card.linkThdMenu) { let __param = { - $BID: data.$$uuid + $BID: data.$$uuid || '' } if (card.field) { @@ -114,16 +114,11 @@ __param.$searchval = data[card.field] || '' } - if (card.joint === 'true' && card.linkThdMenu.urlFields) { - let lower = {} - Object.keys(data).forEach(key => { - lower[key.toLowerCase()] = data[key] - }) - - card.linkThdMenu.urlFields.split(',').forEach(field => { - __param[field] = lower[field.toLowerCase()] || '' - }) - } + Object.keys(data).forEach(key => { + if (/^\$/.test(key)) return + if (key === 'children') return + __param[key] = data[key] + }) let tabmenu = card.linkThdMenu @@ -240,15 +235,13 @@ d.click() d.remove() } else { + let Id = data.$$uuid || '' + + if (cards.subtype === 'propcard' && cardCell) { + Id = cardCell.setting.primaryId || '' + } + if (card.joint === 'true') { - let Id = '' - - if (cards.subtype === 'propcard' && cardCell) { - Id = cardCell.setting.primaryId || '' - } else { - Id = data[cards.setting.primaryKey] || '' - } - let con = '?' if (/\?/ig.test(url)) { @@ -256,6 +249,17 @@ } url = url + `${con}id=${Id}&appkey=${window.GLOB.appkey}&userid=${sessionStorage.getItem('UserID')}&LoginUID=${sessionStorage.getItem('LoginUID') || ''}` + } else if (/@/.test(url)) { + url = url.replace(/@id@/ig, Id) + url = url.replace(/@appkey@/ig, window.GLOB.appkey) + url = url.replace(/@userid@/ig, sessionStorage.getItem('UserID')) + url = url.replace(/@LoginUID@/ig, sessionStorage.getItem('LoginUID')) + + Object.keys(data).forEach(key => { + if (/^\$/.test(key)) return + let reg = new RegExp('@' + key + '@', 'ig') + url = url.replace(reg, data[key]) + }) } window.open(url) @@ -1156,12 +1160,14 @@ } let MkButton = null + let lid = (data.$$uuid || '') + (data.$Index || '') if (['exec', 'prompt', 'pop', 'form'].includes(card.OpenType)) { MkButton = <NormalButton btn={card} name={name} BID={data.$$BID} + LID={lid} BData={data.$$BData || ''} disabled={_disabled} setting={cards.setting} @@ -1172,6 +1178,7 @@ MkButton = <ExcelInButton btn={card} BID={data.$$BID} + LID={lid} BData={data.$$BData || ''} disabled={_disabled} setting={cards.setting} @@ -1181,6 +1188,7 @@ MkButton = <ExcelOutButton btn={card} BID={data.$$BID} + LID={lid} BData={data.$$BData || ''} disabled={_disabled} setting={cards.setting} @@ -1191,6 +1199,7 @@ btn={card} name={name} BID={data.$$BID} + LID={lid} BData={data.$$BData || ''} disabled={_disabled} setting={cards.setting} @@ -1201,6 +1210,7 @@ btn={card} name={name} BID={data.$$BID} + LID={lid} BData={data.$$BData || ''} disabled={_disabled} selectedData={_data} @@ -1210,6 +1220,7 @@ btn={card} name={name} BID={data.$$BID} + LID={lid} BData={data.$$BData || ''} disabled={_disabled} selectedData={_data} @@ -1219,6 +1230,7 @@ MkButton = <ChangeUserButton btn={card} BID={data.$$BID} + LID={lid} BData={data.$$BData || ''} disabled={_disabled} setting={cards.setting} @@ -1228,6 +1240,7 @@ MkButton = <PrintButton btn={card} BID={data.$$BID} + LID={lid} BData={data.$$BData || ''} disabled={_disabled} setting={cards.setting} @@ -1238,6 +1251,7 @@ MkButton = <FuncMegvii btn={card} BID={data.$$BID} + LID={lid} disabled={_disabled} setting={cards.setting} selectedData={_data} @@ -1246,6 +1260,7 @@ MkButton = <FuncZip btn={card} BID={data.$$BID} + LID={lid} BData={data.$$BData || ''} disabled={_disabled} setting={cards.setting} @@ -1254,10 +1269,12 @@ } else if (card.funcType === 'expPdf') { MkButton = <ExportPdf btn={card} + LID={lid} /> } else if (card.funcType === 'shareLink') { MkButton = <ShareLink BID={data.$$BID} + LID={lid} btn={card} selectedData={_data} /> diff --git a/src/tabviews/custom/components/card/double-data-card/index.jsx b/src/tabviews/custom/components/card/double-data-card/index.jsx index 6cb8d86..4f56e58 100644 --- a/src/tabviews/custom/components/card/double-data-card/index.jsx +++ b/src/tabviews/custom/components/card/double-data-card/index.jsx @@ -1058,17 +1058,13 @@ if (!menu) return - menu.param = {} + menu.param = {$BID: item.$$uuid || ''} - if (card.setting.joint === 'true') { - menu.param.$BID = item.$$uuid || '' - - Object.keys(item).forEach(key => { - if (/^\$/.test(key)) return - if (key === 'children') return - menu.param[key] = item[key] - }) - } + Object.keys(item).forEach(key => { + if (/^\$/.test(key)) return + if (key === 'children') return + menu.param[key] = item[key] + }) MKEmitter.emit('modifyTabs', menu, true) } diff --git a/src/tabviews/custom/components/card/prop-card/index.jsx b/src/tabviews/custom/components/card/prop-card/index.jsx index a7f4188..cda84d4 100644 --- a/src/tabviews/custom/components/card/prop-card/index.jsx +++ b/src/tabviews/custom/components/card/prop-card/index.jsx @@ -72,6 +72,14 @@ this.loaded = true } else if (_config.wrap.datatype === 'static') { this.loaded = true + _config.subcards.forEach(card => { + card.elements.forEach(ele => { + if (ele.eleType === 'button') return + if (ele.datatype === 'dynamic' && ele.field) { + ele.field = ele.field.toLowerCase() + } + }) + }) } _data.$$BID = BID || '' @@ -80,7 +88,7 @@ if (_config.wrap.datatype === 'static' && BData) { Object.keys(BData).forEach(key => { if (/\$/.test(key)) return - _data[key] = BData[key] + _data[key.toLowerCase()] = BData[key] }) } @@ -506,7 +514,7 @@ if (BData) { Object.keys(BData).forEach(key => { if (/\$/.test(key)) return - _data[key] = BData[key] + _data[key.toLowerCase()] = BData[key] }) } diff --git a/src/tabviews/custom/components/card/table-card/index.jsx b/src/tabviews/custom/components/card/table-card/index.jsx index f605597..5251e62 100644 --- a/src/tabviews/custom/components/card/table-card/index.jsx +++ b/src/tabviews/custom/components/card/table-card/index.jsx @@ -466,16 +466,12 @@ if (!menu) return - menu.param = {} + menu.param = {$BID: data.$$uuid || ''} - if (card.setting.joint === 'true') { - menu.param.$BID = data.$$uuid || '' - - Object.keys(data).forEach(key => { - if (/^\$/.test(key)) return - menu.param[key] = data[key] - }) - } + Object.keys(data).forEach(key => { + if (/^\$/.test(key)) return + menu.param[key] = data[key] + }) MKEmitter.emit('modifyTabs', menu, true) } else if (card.setting.click === 'link') { @@ -489,11 +485,22 @@ } src = src + `${con}id=${data.$$uuid || ''}&appkey=${window.GLOB.appkey}&userid=${sessionStorage.getItem('UserID')}&LoginUID=${sessionStorage.getItem('LoginUID') || ''}` + } else if (/@/.test(src)) { + src = src.replace(/@id@/ig, data.$$uuid || '') + src = src.replace(/@appkey@/ig, window.GLOB.appkey) + src = src.replace(/@userid@/ig, sessionStorage.getItem('UserID')) + src = src.replace(/@LoginUID@/ig, sessionStorage.getItem('LoginUID')) + + Object.keys(data).forEach(key => { + if (/^\$/.test(key)) return + let reg = new RegExp('@' + key + '@', 'ig') + src = src.replace(reg, data[key]) + }) } window.open(src) } else if (card.setting.click === 'button' && card.setting.linkbtn) { - MKEmitter.emit('triggerBtnId', card.setting.linkbtn, [data], 'linkbtn') + MKEmitter.emit('triggerBtnId', card.setting.linkbtn, [data], 'linkbtn', (data.$$uuid || '') + (data.$Index || '')) } } diff --git a/src/tabviews/custom/components/carousel/cardItem/index.jsx b/src/tabviews/custom/components/carousel/cardItem/index.jsx index 1ed6197..9b0d0d8 100644 --- a/src/tabviews/custom/components/carousel/cardItem/index.jsx +++ b/src/tabviews/custom/components/carousel/cardItem/index.jsx @@ -57,16 +57,12 @@ if (!menu) return - menu.param = {} + menu.param = {$BID: data.$$uuid || ''} - if (card.setting.joint === 'true') { - menu.param.$BID = data.$$uuid || '' - - Object.keys(data).forEach(key => { - if (/^\$/.test(key)) return - menu.param[key] = data[key] - }) - } + Object.keys(data).forEach(key => { + if (/^\$/.test(key)) return + menu.param[key] = data[key] + }) MKEmitter.emit('modifyTabs', menu, true) } else if (card.setting.click === 'link') { @@ -80,12 +76,23 @@ } src = src + `${con}id=${data.$$uuid || ''}&appkey=${window.GLOB.appkey}&userid=${sessionStorage.getItem('UserID')}&LoginUID=${sessionStorage.getItem('LoginUID') || ''}` + } else if (/@/.test(src)) { + src = src.replace(/@id@/ig, data.$$uuid || '') + src = src.replace(/@appkey@/ig, window.GLOB.appkey) + src = src.replace(/@userid@/ig, sessionStorage.getItem('UserID')) + src = src.replace(/@LoginUID@/ig, sessionStorage.getItem('LoginUID')) + + Object.keys(data).forEach(key => { + if (/^\$/.test(key)) return + let reg = new RegExp('@' + key + '@', 'ig') + src = src.replace(reg, data[key]) + }) } window.open(src) } else if (card.setting.click === 'button' && card.setting.linkbtn) { if (cards.subtype === 'datacard') { - MKEmitter.emit('triggerBtnId', card.setting.linkbtn, [data], 'linkbtn') + MKEmitter.emit('triggerBtnId', card.setting.linkbtn, [data], 'linkbtn', (data.$$uuid || '') + (data.$Index || '')) } else { MKEmitter.emit('triggerBtnId', card.setting.linkbtn, data.$$empty ? [] : [data]) } diff --git a/src/tabviews/custom/components/carousel/prop-card/index.jsx b/src/tabviews/custom/components/carousel/prop-card/index.jsx index e42ca31..efa162d 100644 --- a/src/tabviews/custom/components/carousel/prop-card/index.jsx +++ b/src/tabviews/custom/components/carousel/prop-card/index.jsx @@ -66,11 +66,27 @@ window.GLOB.SyncData.delete(_config.dataName) } + } else { + _config.subcards.forEach(card => { + card.elements.forEach(ele => { + if (ele.eleType === 'button') return + if (ele.datatype === 'dynamic' && ele.field) { + ele.field = ele.field.toLowerCase() + } + }) + }) } _data.$$uuid = _data[_config.setting.primaryKey] || '' _data.$$BID = BID || '' _data.$$BData = BData || '' + + if (_config.wrap.datatype === 'static' && BData) { + Object.keys(BData).forEach(key => { + if (/\$/.test(key)) return + _data[key.toLowerCase()] = BData[key] + }) + } if (!_config.wrap.height) { // 鍏煎 _config.wrap.height = _config.style.height || '300px' @@ -319,8 +335,16 @@ const { config, BID, BData } = this.state if (config.wrap.datatype === 'static') { + let _data = {$$BID: BID || '', $$BData: BData, $$empty: true} + if (BData) { + Object.keys(BData).forEach(key => { + if (/\$/.test(key)) return + _data[key.toLowerCase()] = BData[key] + }) + } + this.setState({ - data: {$$BID: BID || '', $$BData: BData, $$empty: true} + data: _data }) return } else if (config.setting.supModule && !BID) { // BID 涓嶅瓨鍦ㄦ椂锛屼笉鍋氭煡璇� diff --git a/src/tabviews/custom/components/chart/antv-G6/index.jsx b/src/tabviews/custom/components/chart/antv-G6/index.jsx index c7dd705..fef955f 100644 --- a/src/tabviews/custom/components/chart/antv-G6/index.jsx +++ b/src/tabviews/custom/components/chart/antv-G6/index.jsx @@ -1621,17 +1621,13 @@ MenuName: menu.MenuName, MenuNo: menu.MenuNo || '', type: menu.tabType, - param: {} + param: {$BID: data.$$uuid || ''} } - if (plot.joint === 'true') { - newtab.param.$BID = data.$$uuid || '' - - Object.keys(data).forEach(key => { - if (/^\$/.test(key)) return - newtab.param[key] = data[key] - }) - } + Object.keys(data).forEach(key => { + if (/^\$/.test(key)) return + newtab.param[key] = data[key] + }) MKEmitter.emit('modifyTabs', newtab, true) } else if (plot.click === 'menu') { @@ -1652,16 +1648,12 @@ if (!menu) return - menu.param = {} + menu.param = {$BID: data.$$uuid || ''} - if (plot.joint === 'true') { - menu.param.$BID = data.$$uuid || '' - - Object.keys(data).forEach(key => { - if (/^\$/.test(key)) return - menu.param[key] = data[key] - }) - } + Object.keys(data).forEach(key => { + if (/^\$/.test(key)) return + menu.param[key] = data[key] + }) MKEmitter.emit('modifyTabs', menu, true) } else { diff --git a/src/tabviews/custom/components/chart/antv-X6/index.jsx b/src/tabviews/custom/components/chart/antv-X6/index.jsx index 83d89e4..ad2f38a 100644 --- a/src/tabviews/custom/components/chart/antv-X6/index.jsx +++ b/src/tabviews/custom/components/chart/antv-X6/index.jsx @@ -1894,6 +1894,16 @@ } } + delCell = () => { + const { node } = this.state + + let cell = this.mkGraph.getCellById(node.id) + + this.mkGraph.removeCells([cell]) + + this.setState({node: null}) + } + changeProps = (value, key) => { const { node } = this.state @@ -2345,7 +2355,7 @@ <div id={config.uuid + 'container'} className="mk-container"></div> <div className="mk-node-edit"> <div className="header">璁剧疆</div> - {!node ? <div className="empty">鏈�変腑</div> : <NodeUpdate node={node} orgs={orgs} onChange={this.changeProps}/>} + {!node ? <div className="empty">鏈�変腑</div> : <NodeUpdate node={node} orgs={orgs} onChange={this.changeProps} onDel={this.delCell}/>} </div> </div> </div> diff --git a/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.jsx b/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.jsx index db2ae2f..3c0f69a 100644 --- a/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.jsx +++ b/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.jsx @@ -2,7 +2,7 @@ import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' import { Form, Row, Col, Input, Select, Radio, InputNumber, Modal } from 'antd' -import { FormOutlined } from '@ant-design/icons' +import { FormOutlined, DeleteOutlined } from '@ant-design/icons' import ColorSketch from '@/tabviews/zshare/mutilform/mkColor' import NodeForm from './nodeform' @@ -494,7 +494,7 @@ } else if (item.type === 'other') { fields.push( <Col span={24} key={index}> - <span className="split-line">{item.label}锛�<FormOutlined onClick={() => {this.setState({visible: true})}}/></span> + <span className="split-line">{item.label}:<FormOutlined onClick={() => {this.setState({visible: true})}}/><DeleteOutlined onClick={() => this.props.onDel()}/></span> {mkdata ? <div className="mk-data"> <div>鐘舵�侊細{mkdata.status}<span style={{float: 'right'}}>{mkdata.statusName}</span></div> {mknode.shape !== 'edge' && !mknode.mknode ? <div>鏍囪锛歿mkdata.sign || ''}</div> : null} diff --git a/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.scss b/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.scss index f8b1118..1c59391 100644 --- a/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.scss +++ b/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.scss @@ -7,6 +7,16 @@ margin: 5px 12px 10px; padding-bottom: 2px; font-size: 13px; + + >.anticon-delete { + padding: 0 5px; + float: right; + color: #f5222d; + line-height: 22px; + } + >.anticon-form { + padding: 0 5px; + } } .mk-data { font-size: 13px; @@ -127,6 +137,7 @@ } .member-input { display: inline-block; + cursor: pointer; width: 100%; height: 32px; padding: 4px 11px; diff --git a/src/tabviews/custom/components/chart/antv-X6/nodeupdate/memberform.jsx b/src/tabviews/custom/components/chart/antv-X6/nodeupdate/memberform.jsx index 0d89461..1304c3d 100644 --- a/src/tabviews/custom/components/chart/antv-X6/nodeupdate/memberform.jsx +++ b/src/tabviews/custom/components/chart/antv-X6/nodeupdate/memberform.jsx @@ -175,7 +175,7 @@ return ( <> - <div className="member-input">{value.length > 0 ? value.length + '浜�' : ''}<FormOutlined onClick={this.trigger} /></div> + <div className="member-input" onClick={this.trigger}>{value.length > 0 ? value.length + '浜�' : ''}<FormOutlined /></div> <Modal wrapClassName="member-modal" title="閫夋嫨浜哄憳" diff --git a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx index db28367..ae2dfce 100644 --- a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx +++ b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx @@ -1848,17 +1848,13 @@ MenuName: menu.MenuName, MenuNo: menu.MenuNo || '', type: menu.tabType, - param: {} + param: {$BID: data.$$uuid || ''} } - if (plot.joint === 'true') { - newtab.param.$BID = data.$$uuid || '' - - Object.keys(data).forEach(key => { - if (/^\$/.test(key)) return - newtab.param[key] = data[key] - }) - } + Object.keys(data).forEach(key => { + if (/^\$/.test(key)) return + newtab.param[key] = data[key] + }) MKEmitter.emit('modifyTabs', newtab, true) } else if (plot.click === 'menu') { @@ -1877,16 +1873,12 @@ if (!menu) return - menu.param = {} + menu.param = {$BID: data.$$uuid || ''} - if (plot.joint === 'true') { - menu.param.$BID = data.$$uuid || '' - - Object.keys(data).forEach(key => { - if (/^\$/.test(key)) return - menu.param[key] = data[key] - }) - } + Object.keys(data).forEach(key => { + if (/^\$/.test(key)) return + menu.param[key] = data[key] + }) MKEmitter.emit('modifyTabs', menu, true) } else { diff --git a/src/tabviews/custom/components/share/normalTable/index.jsx b/src/tabviews/custom/components/share/normalTable/index.jsx index f2f8eb5..a468ec1 100644 --- a/src/tabviews/custom/components/share/normalTable/index.jsx +++ b/src/tabviews/custom/components/share/normalTable/index.jsx @@ -34,21 +34,11 @@ __param.$searchkey = item.field.toLowerCase() __param.$searchval = record[item.field] || '' } - - if (item.linkThdMenu.urlFields) { - let lower = {} - Object.keys(record).forEach(key => { - lower[key.toLowerCase()] = record[key] - }) - item.linkThdMenu.urlFields.split(',').forEach(field => { - __param[field] = lower[field.toLowerCase()] || '' - }) - } else if (item.linkfields && item.linkfields.length > 0) { - item.linkfields.forEach(field => { - __param[field] = record[field] || '' - }) - } + Object.keys(record).forEach(key => { + if (/^\$/.test(key)) return + __param[key] = record[key] + }) let tabmenu = item.linkThdMenu @@ -58,20 +48,18 @@ } else if (item.linkurl) { let src = item.linkurl - let con = '?' + if (/@/.test(src)) { + src = src.replace(/@id@/ig, record.$$uuid) + src = src.replace(/@appkey@/ig, window.GLOB.appkey) + src = src.replace(/@userid@/ig, sessionStorage.getItem('UserID')) + src = src.replace(/@LoginUID@/ig, sessionStorage.getItem('LoginUID')) - if (/\?/ig.test(src)) { - con = '&' - } - - if (item.linkfields && item.linkfields.length > 0) { - item.linkfields.forEach(field => { - if (field.toLowerCase() === 'id') return - con += `${field}=${record[field] || ''}&` + Object.keys(record).forEach(key => { + if (/^\$/.test(key)) return + let reg = new RegExp('@' + key + '@', 'ig') + src = src.replace(reg, record[key]) }) } - - src = src + `${con}id=${record.$$uuid}&appkey=${window.GLOB.appkey}&userid=${sessionStorage.getItem('UserID')}&LoginUID=${sessionStorage.getItem('LoginUID') || ''}` window.open(src) } @@ -384,6 +372,17 @@ } else { _href += '?' + _param } + } else if (/@/.test(_href)) { + _href = _href.replace(/@id@/ig, record.$$uuid || '') + _href = _href.replace(/@appkey@/ig, window.GLOB.appkey) + _href = _href.replace(/@userid@/ig, sessionStorage.getItem('UserID')) + _href = _href.replace(/@LoginUID@/ig, sessionStorage.getItem('LoginUID')) + + Object.keys(record).forEach(key => { + if (/^\$/.test(key)) return + let reg = new RegExp('@' + key + '@', 'ig') + _href = _href.replace(reg, record[key]) + }) } if (col.blur) { @@ -1113,7 +1112,7 @@ if (!setting.doubleClick) return if (record.$disabled) return - MKEmitter.emit('triggerBtnId', setting.doubleClick, [record], 'linkbtn') + MKEmitter.emit('triggerBtnId', setting.doubleClick, [record], 'linkbtn', (record.$$uuid || '') + (record.$Index || '')) } render() { diff --git a/src/tabviews/custom/components/table/edit-table/index.jsx b/src/tabviews/custom/components/table/edit-table/index.jsx index 524645a..ffd5efc 100644 --- a/src/tabviews/custom/components/table/edit-table/index.jsx +++ b/src/tabviews/custom/components/table/edit-table/index.jsx @@ -338,8 +338,18 @@ if (col.supField) { names = [] - if (BData && BData[col.supField]) { - names = BData[col.supField].split(',') + let val = '' + if (BData) { + let field = col.supField.toLowerCase() + Object.keys(BData).forEach(key => { + if (key.toLowerCase() === field) { + val = BData[key] + '' + } + }) + } + + if (val) { + names = val.split(',') if (names.length > fields.length) { names.length = fields.length diff --git a/src/tabviews/custom/components/table/normal-table/index.jsx b/src/tabviews/custom/components/table/normal-table/index.jsx index fe39799..fd31261 100644 --- a/src/tabviews/custom/components/table/normal-table/index.jsx +++ b/src/tabviews/custom/components/table/normal-table/index.jsx @@ -432,8 +432,18 @@ if (col.supField) { names = [] - if (BData && BData[col.supField]) { - names = BData[col.supField].split(',') + let val = '' + if (BData) { + let field = col.supField.toLowerCase() + Object.keys(BData).forEach(key => { + if (key.toLowerCase() === field) { + val = BData[key] + '' + } + }) + } + + if (val) { + names = val.split(',') if (names.length > fields.length) { names.length = fields.length diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx index 8e44c3f..b56749d 100644 --- a/src/tabviews/custom/index.jsx +++ b/src/tabviews/custom/index.jsx @@ -77,7 +77,7 @@ * @description 鑾峰彇椤甸潰閰嶇疆淇℃伅 */ async loadconfig () { - const { MenuID, MenuName } = this.props + const { MenuID, MenuName, param } = this.props let _param = { func: 'sPC_Get_LongParam', @@ -205,9 +205,18 @@ let roleId = sessionStorage.getItem('role_id') || '' // 瑙掕壊ID let balMap = new Map() let skip = config.permission === 'false' || window.GLOB.mkHS - let param = this.props.param || {} // url鍙傛暟 + let urlparam = {} // url鍙傛暟 + if (param) { + Object.keys(param).forEach(key => { + if (/^\$/.test(key)) { + urlparam[key] = param[key] + } else { + urlparam[key.toLowerCase()] = param[key] + } + }) + } - window.GLOB.CacheData.set(MenuID, param) + window.GLOB.CacheData.set(MenuID, urlparam) let userName = sessionStorage.getItem('User_Name') || '' let fullName = sessionStorage.getItem('Full_Name') || '' @@ -225,7 +234,7 @@ } if (config.urlFields) { config.urlFields.forEach(field => { - let val = `'${param[field] || ''}'` + let val = `'${urlparam[field.toLowerCase()] || ''}'` regs.push({ reg: new RegExp('@' + field + '@', 'ig'), value: val @@ -252,10 +261,10 @@ let initInters = [] config.interfaces = this.formatInterSetting(config.interfaces, regs, MenuID, initInters, config.MenuName) - config.components = this.filterComponent(config.components, roleId, window.GLOB.mkActions, balMap, skip, param, MenuID, config.interfaces, config.$cache, config.$time, config.MenuName, MenuID, MenuID, config.process === 'true') + config.components = this.filterComponent(config.components, roleId, window.GLOB.mkActions, balMap, skip, urlparam, MenuID, config.interfaces, config.$cache, config.$time, config.MenuName, MenuID, MenuID, config.process === 'true') let params = [] - let BID = param.$BID || '' + let BID = urlparam.$BID || '' let inherit = {} if (config.cacheUseful === 'true') { // 缂撳瓨缁ф壙 @@ -451,12 +460,7 @@ if (item.setting.supModule === 'preview') { item.setting.supModule = '' - let val = '' - Object.keys(urlparam).forEach(key => { - if (key.toLowerCase() === item.setting.controlField) { - val = urlparam[key] - } - }) + let val = urlparam[item.setting.controlField] || '' item.subtabs = item.subtabs.filter(tab => { if (tab.$pass) return true @@ -469,12 +473,7 @@ if (item.setting.selectField) { item.setting.selectField = item.setting.selectField.toLowerCase() - let val = '' - Object.keys(urlparam).forEach(key => { - if (key.toLowerCase() === item.setting.selectField) { - val = urlparam[key] - } - }) + let val = urlparam[item.setting.selectField] || '' let activeKey = '' diff --git a/src/tabviews/custom/popview/index.jsx b/src/tabviews/custom/popview/index.jsx index f813ecc..4213bf9 100644 --- a/src/tabviews/custom/popview/index.jsx +++ b/src/tabviews/custom/popview/index.jsx @@ -62,7 +62,7 @@ * @description 鑾峰彇椤甸潰閰嶇疆淇℃伅 */ async loadconfig () { - const { Tab } = this.props + const { Tab, param } = this.props let config = Tab.config || '' @@ -106,9 +106,18 @@ // 鏉冮檺杩囨护 let roleId = sessionStorage.getItem('role_id') || '' // 瑙掕壊ID let balMap = new Map() - let param = this.props.param || {} // url鍙傛暟 + let urlparam = {} // url鍙傛暟 + if (param) { + Object.keys(param).forEach(key => { + if (/^\$/.test(key)) { + urlparam[key] = param[key] + } else { + urlparam[key.toLowerCase()] = param[key] + } + }) + } - window.GLOB.CacheData.set(Tab.uuid, param) + window.GLOB.CacheData.set(Tab.uuid, urlparam) let userName = sessionStorage.getItem('User_Name') || '' let fullName = sessionStorage.getItem('Full_Name') || '' @@ -130,7 +139,7 @@ regs.push({ reg: /@works_flow_code@/ig, value: `'${flow.flow_code || ''}'` }) } - config.components = this.filterComponent(config.components, roleId, balMap, param, Tab, Tab.uuid, Tab.uuid) + config.components = this.filterComponent(config.components, roleId, balMap, urlparam, Tab, Tab.uuid, Tab.uuid) // 鑾峰彇涓绘悳绱㈡潯浠� config.components.forEach(component => { @@ -144,7 +153,7 @@ }) let params = [] - let BID = param.$BID || '' + let BID = urlparam.$BID || '' config.components = this.formatSetting(config.components, params, regs, balMap) @@ -227,12 +236,7 @@ if (item.setting.supModule === 'preview') { item.setting.supModule = '' - let val = '' - Object.keys(urlparam).forEach(key => { - if (key.toLowerCase() === item.setting.controlField) { - val = urlparam[key] - } - }) + let val = urlparam[item.setting.controlField] || '' item.subtabs = item.subtabs.filter(tab => { if (tab.$pass) return true @@ -245,12 +249,7 @@ if (item.setting.selectField) { item.setting.selectField = item.setting.selectField.toLowerCase() - let val = '' - Object.keys(urlparam).forEach(key => { - if (key.toLowerCase() === item.setting.selectField) { - val = urlparam[key] - } - }) + let val = urlparam[item.setting.selectField] || '' let activeKey = '' diff --git a/src/tabviews/zshare/actionList/changeuserbutton/index.jsx b/src/tabviews/zshare/actionList/changeuserbutton/index.jsx index 72cef08..06cb05f 100644 --- a/src/tabviews/zshare/actionList/changeuserbutton/index.jsx +++ b/src/tabviews/zshare/actionList/changeuserbutton/index.jsx @@ -102,12 +102,13 @@ /** * @description 瑙﹀彂鎸夐挳鎿嶄綔 */ - actionTrigger = (triggerId, record, type) => { - const { setting, selectedData, btn, MenuID } = this.props + actionTrigger = (triggerId, record, type, lid) => { + const { setting, selectedData, btn, MenuID, LID } = this.props const { loading, disabled } = this.state if (loading || disabled) return if (triggerId && btn.uuid !== triggerId) return + if (type === 'linkbtn' && !btn.$toolbtn && LID !== lid) return if (btn.funcType === 'closetab') { MKEmitter.emit('closeTabView', MenuID || btn.$MenuID) @@ -115,8 +116,6 @@ if (btn.refreshTab && btn.refreshTab.length > 0) { MKEmitter.emit('reloadMenuView', btn.refreshTab[btn.refreshTab.length - 1], 'table') } - return - } else if (type === 'linkbtn' && !btn.$toolbtn && !is(fromJS(selectedData || []), fromJS(record))) { return } diff --git a/src/tabviews/zshare/actionList/excelInbutton/index.jsx b/src/tabviews/zshare/actionList/excelInbutton/index.jsx index 4d9919b..ab1cc80 100644 --- a/src/tabviews/zshare/actionList/excelInbutton/index.jsx +++ b/src/tabviews/zshare/actionList/excelInbutton/index.jsx @@ -106,12 +106,15 @@ /** * @description 瑙﹀彂鎸夐挳鎿嶄綔 */ - actionTrigger = (triggerId, record, type) => { - const { setting, BID, btn, selectedData } = this.props + actionTrigger = (triggerId, record, type, lid) => { + const { setting, BID, btn, selectedData, LID } = this.props const { loading, disabled } = this.state if (loading || disabled) return if (triggerId && btn.uuid !== triggerId) return + if (type === 'linkbtn' && !btn.$toolbtn && LID !== lid) return + + let data = record || selectedData || [] if (setting.supModule && !BID) { notification.warning({ @@ -119,44 +122,35 @@ message: '闇�瑕佷笂绾т富閿�硷紒', duration: 5 }) - return - } else if (type === 'linkbtn' && !btn.$toolbtn && !is(fromJS(selectedData || []), fromJS(record))) { - return - } - - let data = record || selectedData || [] - - if (btn.Ot === 'requiredSgl' && data.length !== 1) { + } else if (btn.Ot === 'requiredSgl' && data.length !== 1) { // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁 notification.warning({ top: 92, message: '璇烽�夋嫨鍗曡鏁版嵁锛�', duration: 5 }) - return } else if (!btn.verify || !btn.verify.sheet || !btn.verify.columns || btn.verify.columns.length === 0) { notification.warning({ top: 92, message: 'excel瀵煎叆楠岃瘉淇℃伅鏈缃紒', duration: 5 }) - return - } - - let primaryId = '' // 瀵煎叆鏃惰Id - if (btn.Ot === 'requiredSgl' && setting.primaryKey) { - primaryId = data[0][setting.primaryKey] || '' - } - - this.setState({ - selines: data, - primaryId: primaryId - }, () => { - this.refs.excelIn.exceltrigger() - }) - - if (window.GLOB.systemType === 'production') { - MKEmitter.emit('queryTrigger', {menuId: btn.uuid, name: '瀵煎叆Excel'}) + } else { + let primaryId = '' // 瀵煎叆鏃惰Id + if (btn.Ot === 'requiredSgl' && setting.primaryKey) { + primaryId = data[0][setting.primaryKey] || '' + } + + this.setState({ + selines: data, + primaryId: primaryId + }, () => { + this.refs.excelIn.exceltrigger() + }) + + if (window.GLOB.systemType === 'production') { + MKEmitter.emit('queryTrigger', {menuId: btn.uuid, name: '瀵煎叆Excel'}) + } } } diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx index 43ef2df..0317ad6 100644 --- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx +++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx @@ -90,12 +90,13 @@ /** * @description 瑙﹀彂鎸夐挳鎿嶄綔 */ - actionTrigger = (triggerId, record, type) => { - const { setting, BID, btn } = this.props + actionTrigger = (triggerId, _, type, lid) => { + const { setting, BID, btn, LID } = this.props const { loading, disabled } = this.state if (loading || disabled) return if (triggerId && btn.uuid !== triggerId) return + if (type === 'linkbtn' && !btn.$toolbtn && LID !== lid) return if (setting.supModule && !BID) { notification.warning({ @@ -103,30 +104,23 @@ message: '闇�瑕佷笂绾т富閿�硷紒', duration: 5 }) - return - } else if (type === 'linkbtn' && !btn.$toolbtn && !is(fromJS(this.props.selectedData || []), fromJS(record))) { - return - } - - if (btn.errorType === 'error1') { + } else if (btn.errorType === 'error1') { notification.warning({ top: 92, message: '璇疯缃鍑哄垪锛�', duration: 5 }) - return } else if (btn.errorType === 'error2') { notification.warning({ top: 92, message: '鎸夐挳闇�鑷畾涔夊鍑烘暟鎹簮锛�', duration: 5 }) - return - } - - MKEmitter.emit('queryModuleParam', btn.$menuId, this.triggerExcelout) - if (window.GLOB.systemType === 'production') { - MKEmitter.emit('queryTrigger', {menuId: btn.uuid, name: '瀵煎嚭Excel'}) + } else { + MKEmitter.emit('queryModuleParam', btn.$menuId, this.triggerExcelout) + if (window.GLOB.systemType === 'production') { + MKEmitter.emit('queryTrigger', {menuId: btn.uuid, name: '瀵煎嚭Excel'}) + } } } diff --git a/src/tabviews/zshare/actionList/funcMegvii/index.jsx b/src/tabviews/zshare/actionList/funcMegvii/index.jsx index 43a80d7..652dc2a 100644 --- a/src/tabviews/zshare/actionList/funcMegvii/index.jsx +++ b/src/tabviews/zshare/actionList/funcMegvii/index.jsx @@ -108,12 +108,16 @@ /** * @description 瑙﹀彂鎸夐挳鎿嶄綔 */ - actionTrigger = (triggerId, record, type) => { - const { BID, btn, selectedData, setting } = this.props + actionTrigger = (triggerId, record, type, lid) => { + const { BID, btn, selectedData, setting, LID } = this.props const { loading, disabled } = this.state if (loading || disabled) return if (triggerId && btn.uuid !== triggerId) return + if (type === 'linkbtn' && !btn.$toolbtn && LID !== lid) return + + let data = record || selectedData || [] + // let data = fromJS(mockdata.data).toJS() if (setting.supModule && !BID) { notification.warning({ @@ -121,29 +125,20 @@ message: '闇�瑕佷笂绾т富閿�硷紒', duration: 5 }) - return - } else if (type === 'linkbtn' && !btn.$toolbtn && !is(fromJS(selectedData || []), fromJS(record))) { - return - } - - let data = record || selectedData || [] - // let data = fromJS(mockdata.data).toJS() - - if (data.length === 0) { + } else if (data.length === 0) { // 闇�瑕侀�夋嫨琛屾椂锛屾牎楠屾暟鎹� notification.warning({ top: 92, message: '璇烽�夋嫨琛岋紒', duration: 5 }) - return + } else { + this.setState({ + loading: true, + lines: data + }) + this.getIpList() } - - this.setState({ - loading: true, - lines: data - }) - this.getIpList() } getIpList = () => { diff --git a/src/tabviews/zshare/actionList/funczip/index.jsx b/src/tabviews/zshare/actionList/funczip/index.jsx index a54b3fc..5181920 100644 --- a/src/tabviews/zshare/actionList/funczip/index.jsx +++ b/src/tabviews/zshare/actionList/funczip/index.jsx @@ -99,12 +99,15 @@ /** * @description 瑙﹀彂鎸夐挳鎿嶄綔 */ - actionTrigger = (triggerId, record, type) => { - const { BID, btn, selectedData, setting } = this.props + actionTrigger = (triggerId, record, type, lid) => { + const { BID, btn, selectedData, setting, LID } = this.props const { loading, disabled } = this.state if (loading || disabled) return if (triggerId && btn.uuid !== triggerId) return + if (type === 'linkbtn' && !btn.$toolbtn && LID !== lid) return + + let data = record || selectedData || [] if (setting.supModule && !BID) { notification.warning({ @@ -113,13 +116,7 @@ duration: 5 }) return - } else if (type === 'linkbtn' && !btn.$toolbtn && !is(fromJS(selectedData || []), fromJS(record))) { - return - } - - let data = record || selectedData || [] - - if (btn.Ot !== 'notRequired' && data.length === 0) { + } else if (btn.Ot !== 'notRequired' && data.length === 0) { notification.warning({ top: 92, message: '璇烽�夋嫨琛岋紒', diff --git a/src/tabviews/zshare/actionList/newpagebutton/index.jsx b/src/tabviews/zshare/actionList/newpagebutton/index.jsx index ea3a5d9..5a78f3e 100644 --- a/src/tabviews/zshare/actionList/newpagebutton/index.jsx +++ b/src/tabviews/zshare/actionList/newpagebutton/index.jsx @@ -100,16 +100,13 @@ /** * @description 瑙﹀彂鎸夐挳鎿嶄綔 */ - actionTrigger = (triggerId, record, type) => { - const { btn, selectedData, BID } = this.props + actionTrigger = (triggerId, record, type, lid) => { + const { btn, selectedData, BID, LID } = this.props const { disabled } = this.state if (disabled) return if (triggerId && btn.uuid !== triggerId) return - - if (type === 'linkbtn' && !btn.$toolbtn && !is(fromJS(selectedData || []), fromJS(record))) { - return - } + if (type === 'linkbtn' && !btn.$toolbtn && LID !== lid) return let data = record || selectedData || [] @@ -270,10 +267,7 @@ if (/#\/iframe\//.test(url)) { url = url.replace(/@loginuid@/ig, sessionStorage.getItem('LoginUID')) - - if (btn.joint === 'true' && Id) { - url = url + '/' + Id - } + url = url + '/' + Id let menu = { MenuID: btn.uuid, @@ -287,16 +281,26 @@ return } - let con = '?' - - if (/\?/ig.test(url)) { - con = '&' - } - if (btn.joint === 'true') { + let con = '?' + + if (/\?/ig.test(url)) { + con = '&' + } url = url + `${con}id=${Id}&appkey=${window.GLOB.appkey}&userid=${sessionStorage.getItem('UserID')}&LoginUID=${sessionStorage.getItem('LoginUID') || ''}` - } else if (Id) { - url = url + `${con}id=${Id}` + } else if (/@/.test(url)) { + url = url.replace(/@id@/ig, Id) + url = url.replace(/@appkey@/ig, window.GLOB.appkey) + url = url.replace(/@userid@/ig, sessionStorage.getItem('UserID')) + url = url.replace(/@LoginUID@/ig, sessionStorage.getItem('LoginUID')) + + if (btn.Ot === 'requiredSgl' && data[0]) { + Object.keys(data[0]).forEach(key => { + if (/^\$/.test(key)) return + let reg = new RegExp('@' + key + '@', 'ig') + url = url.replace(reg, data[0][key]) + }) + } } window.open(url) diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index d34f3eb..d4f7524 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -204,8 +204,8 @@ /** * @description 瑙﹀彂鎸夐挳鎿嶄綔 */ - actionTrigger = (triggerId, record, type, callback) => { - const { btn, selectedData } = this.props + actionTrigger = (triggerId, record, type, lid, callback) => { + const { btn, selectedData, LID } = this.props const { loading, disabled } = this.state if (type === 'preButton') { @@ -219,7 +219,7 @@ if (loading || disabled) return if (triggerId && btn.uuid !== triggerId) return - if (type === 'linkbtn' && !btn.$toolbtn && !is(fromJS(selectedData || []), fromJS(record))) return + if (type === 'linkbtn' && !btn.$toolbtn && LID !== lid) return if (btn.OpenType === 'form' && btn.formType === 'count_line') return this.setState({autoMatic: type === 'autoMatic'}) @@ -1093,7 +1093,7 @@ let node = document.getElementById('button' + btnId) if (node) { - MKEmitter.emit('triggerBtnId', btnId, null, 'preButton', (res) => { + MKEmitter.emit('triggerBtnId', btnId, null, 'preButton', null, (res) => { if (!res) { this.setState({loading: false}) resolve() diff --git a/src/tabviews/zshare/actionList/popupbutton/index.jsx b/src/tabviews/zshare/actionList/popupbutton/index.jsx index df029ca..dce034b 100644 --- a/src/tabviews/zshare/actionList/popupbutton/index.jsx +++ b/src/tabviews/zshare/actionList/popupbutton/index.jsx @@ -141,12 +141,15 @@ /** * @description 瑙﹀彂鎸夐挳鎿嶄綔 */ - actionTrigger = (triggerId, record, type) => { - const { setting, BID, btn, selectedData } = this.props + actionTrigger = (triggerId, record, type, lid) => { + const { setting, BID, btn, selectedData, LID } = this.props const { loading, disabled } = this.state if (loading || disabled) return if (triggerId && btn.uuid !== triggerId) return + if (type === 'linkbtn' && !btn.$toolbtn && LID !== lid) return + + let data = record || selectedData || [] if (setting.supModule && !BID) { notification.warning({ @@ -155,13 +158,7 @@ duration: 5 }) return - } else if (type === 'linkbtn' && !btn.$toolbtn && !is(fromJS(selectedData || []), fromJS(record))) { - return - } - - let data = record || selectedData || [] - - if (btn.Ot === 'requiredSgl' && data.length !== 1) { + } else if (btn.Ot === 'requiredSgl' && data.length !== 1) { // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁 notification.warning({ top: 92, diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx index 1e8c326..8373813 100644 --- a/src/tabviews/zshare/actionList/printbutton/index.jsx +++ b/src/tabviews/zshare/actionList/printbutton/index.jsx @@ -130,12 +130,13 @@ /** * @description 瑙﹀彂鎸夐挳鎿嶄綔 */ - actionTrigger = (triggerId, record, type) => { - const { BID, btn, selectedData, setting } = this.props + actionTrigger = (triggerId, record, type, lid) => { + const { BID, btn, selectedData, setting, LID } = this.props const { loading, disabled } = this.state if (loading || disabled) return if (triggerId && btn.uuid !== triggerId) return + if (type === 'linkbtn' && !btn.$toolbtn && LID !== lid) return if (setting.supModule && !BID) { notification.warning({ @@ -143,8 +144,6 @@ message: '闇�瑕佷笂绾т富閿�硷紒', duration: 5 }) - return - } else if (type === 'linkbtn' && !btn.$toolbtn && !is(fromJS(selectedData || []), fromJS(record))) { return } diff --git a/src/tabviews/zshare/actionList/tabbutton/index.jsx b/src/tabviews/zshare/actionList/tabbutton/index.jsx index 4b767da..d96f206 100644 --- a/src/tabviews/zshare/actionList/tabbutton/index.jsx +++ b/src/tabviews/zshare/actionList/tabbutton/index.jsx @@ -100,16 +100,13 @@ /** * @description 瑙﹀彂鎸夐挳鎿嶄綔 */ - actionTrigger = (triggerId, record, type) => { - const { btn, selectedData, BID } = this.props + actionTrigger = (triggerId, record, type, lid) => { + const { btn, selectedData, BID, LID } = this.props const { disabled } = this.state if (disabled || btn.multiMenus) return if (triggerId && btn.uuid !== triggerId) return - - if (type === 'linkbtn' && !btn.$toolbtn && !is(fromJS(selectedData || []), fromJS(record))) { - return - } + if (type === 'linkbtn' && !btn.$toolbtn && LID !== lid) return let data = record || selectedData || [] @@ -196,6 +193,14 @@ return } + if (btn.Ot === 'requiredSgl' || btn.Ot === 'requiredOnce') { + Object.keys(data[0]).forEach(key => { + if (/^\$/.test(key)) return + if (key === 'children') return + menu.param[key] = data[0][key] + }) + } + newtab = menu } diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx index 309cff6..f3de88e 100644 --- a/src/tabviews/zshare/mutilform/index.jsx +++ b/src/tabviews/zshare/mutilform/index.jsx @@ -617,7 +617,11 @@ item.supInitVal = '' if (fieldMap.has(item.linkField)) { - item.supInitVal = fieldMap.get(item.linkField).initval || '' + let supitem = fieldMap.get(item.linkField) + item.supInitVal = supitem.initval || '' + if (supitem.$first) { + item.$resetSup = true + } } else if (data.hasOwnProperty(item.linkField.toLowerCase())) { item.supInitVal = data[item.linkField.toLowerCase()] } @@ -1087,7 +1091,11 @@ // if (item.type === 'link') { if (item.linkField) { - item.options = item.oriOptions.filter(option => option.ParentID === item.supInitVal || option.value === '') + let supInitVal = item.supInitVal + if (item.$resetSup) { + supInitVal = this.record[item.linkField] + } + item.options = item.oriOptions.filter(option => option.ParentID === supInitVal || option.value === '') // } else if (['select', 'radio', 'checkbox', 'checkcard', 'multiselect'].includes(item.type)) { } else { item.options = item.oriOptions diff --git a/src/tabviews/zshare/normalTable/index.jsx b/src/tabviews/zshare/normalTable/index.jsx index f9187b3..8439a3a 100644 --- a/src/tabviews/zshare/normalTable/index.jsx +++ b/src/tabviews/zshare/normalTable/index.jsx @@ -342,23 +342,22 @@ // 瀛楁閫忚 triggerLink = (e, item, record) => { e.stopPropagation() - - let __param = { - $BID: record.$$uuid - } - - if (item.field) { - __param.$searchkey = item.field.toLowerCase() - __param.$searchval = record[item.field] || '' - } - - if (item.linkfields && item.linkfields.length > 0) { - item.linkfields.forEach(field => { - __param[field] = record[field] || '' - }) - } - + if (item.linkThdMenu) { + let __param = { + $BID: record.$$uuid + } + + if (item.field) { + __param.$searchkey = item.field.toLowerCase() + __param.$searchval = record[item.field] || '' + } + + Object.keys(record).forEach(key => { + if (/^\$/.test(key)) return + __param[key] = record[key] + }) + let tabmenu = item.linkThdMenu tabmenu.param = __param @@ -741,6 +740,7 @@ </div> ) } else if (item.type === 'action') { + let lid = (record.$$uuid || '') + (record.$Index || '') return ( <div className="action-col"> {item.operations.map(btn => { @@ -750,6 +750,7 @@ key={btn.uuid} btn={btn} BID={record.$$BID} + LID={lid} disabled={record.$disabled} selectedData={[record]} BData={this.props.BData} @@ -763,6 +764,7 @@ key={btn.uuid} btn={btn} BID={record.$$BID} + LID={lid} disabled={record.$disabled} selectedData={[record]} BData={this.props.BData} @@ -777,6 +779,7 @@ disabled={record.$disabled} selectedData={[record]} BID={record.$$BID} + LID={lid} BData={this.props.BData} MenuID={this.props.MenuID} /> @@ -787,6 +790,7 @@ key={btn.uuid} btn={btn} BID={record.$$BID} + LID={lid} disabled={record.$disabled} selectedData={[record]} BData={this.props.BData} @@ -1212,7 +1216,7 @@ if (!setting.doubleClick) return if (record.$disabled) return - MKEmitter.emit('triggerBtnId', setting.doubleClick, [record], 'linkbtn') + MKEmitter.emit('triggerBtnId', setting.doubleClick, [record], 'linkbtn', (record.$$uuid || '') + (record.$Index || '')) } render() { diff --git a/src/utils/utils.js b/src/utils/utils.js index 39c4796..9d92c76 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -2485,6 +2485,10 @@ } } + if (_backCustomScript) { + _sql += _backCustomScript + } + _sql = _sql.replace(/@works_flow_sign@/ig, `'${sign}'`) _sql = _sql.replace(/@check_userids@/ig, `'${checkIds.join(',')}'`) @@ -2509,9 +2513,7 @@ _sql = _sql.replace(/@statusname@/ig, `'${statusName}'`) _sql = _sql.replace(/@work_group@/ig, `'${sessionStorage.getItem('work_group') || ''}'`) _sql = _sql.replace(/@work_grade@/ig, `'${work_grade}'`) - } - - if (_backCustomScript) { + } else if (_backCustomScript) { _sql += _backCustomScript } diff --git a/src/views/design/sidemenu/thdmenuform/index.jsx b/src/views/design/sidemenu/thdmenuform/index.jsx index cb8f0da..08ba9d6 100644 --- a/src/views/design/sidemenu/thdmenuform/index.jsx +++ b/src/views/design/sidemenu/thdmenuform/index.jsx @@ -147,7 +147,7 @@ </Col> {menu.Template === 'NewPage' ? <Col span={22}> <Form.Item label={ - <Tooltip overlayStyle={{minWidth: 500}} placement="topLeft" title={<div onClick={(e) => e.stopPropagation()}>浣跨敤鍚屼竴鍗曠偣绯荤粺涓嬬殑鍏朵粬涓氬姟绯荤粺锛岄摼鎺ユ牸寮忎负锛歨ttp://<span style={{color: 'orange'}}>******</span>/admin/index.html#/iframe/<span style={{color: 'orange'}}>menuId</span>/<span style={{color: 'orange'}}>loginuid</span>/<span style={{color: 'orange'}}>BID</span>銆傛敞锛�******涓哄煙鍚�+铏氭嫙鐩綍锛沵enuId涓鸿彍鍗旾D锛沴oginuid涓虹櫥褰曚俊鎭紙浣跨敤@loginuid@鏃惰嚜鍔ㄦ浛鎹负褰撳墠绯荤粺鐨刲oginuid锛夛紱BID鏄悜鑿滃崟涓殑浼犲弬锛屽彲涓虹┖銆�</div>}><QuestionCircleOutlined className="mk-form-tip" />閾炬帴鍦板潃</Tooltip> + <Tooltip overlayStyle={{minWidth: 500}} placement="topLeft" title={<div onClick={(e) => e.stopPropagation()}>浣跨敤鍚屼竴鍗曠偣绯荤粺涓嬬殑鍏朵粬涓氬姟绯荤粺锛岄摼鎺ユ牸寮忎负锛歨ttp://<span style={{color: 'orange'}}>******</span>/admin/index.html#/iframe/<span style={{color: 'orange'}}>menuId</span>/<span style={{color: 'orange'}}>@loginuid@</span>/<span style={{color: 'orange'}}>BID</span>銆傛敞锛�******涓哄煙鍚�+铏氭嫙鐩綍锛沵enuId涓鸿彍鍗旾D锛汙loginuid@涓虹櫥褰曚俊鎭紙绯荤粺鑷姩鏇挎崲锛夛紱BID鏄悜鑿滃崟涓殑浼犲弬锛屽彲涓虹┖銆�</div>}><QuestionCircleOutlined className="mk-form-tip" />閾炬帴鍦板潃</Tooltip> }> {getFieldDecorator('url', { initialValue: menu.url || '', -- Gitblit v1.8.0