From 2d58a3ea2ab0ae0f148ba176240b3ccba933222a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 20 十二月 2023 17:28:30 +0800 Subject: [PATCH] 2023-12-20 --- src/templates/zshare/editTable/index.jsx | 71 +++++++++++-- src/templates/zshare/verifycard/index.jsx | 153 ++++++++++++++++++++--------- src/menu/components/table/edit-table/columns/editColumn/index.scss | 2 src/tabviews/custom/index.jsx | 6 src/views/billprint/index.jsx | 17 ++- src/menu/components/table/base-table/columns/editColumn/index.scss | 2 src/menu/components/table/normal-table/columns/editColumn/index.scss | 2 src/menu/components/card/cardcellcomponent/elementform/index.scss | 2 src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx | 10 + src/templates/zshare/editTable/index.scss | 7 + src/templates/zshare/verifycard/index.scss | 8 + src/assets/css/main.scss | 6 - src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx | 3 13 files changed, 206 insertions(+), 83 deletions(-) diff --git a/src/assets/css/main.scss b/src/assets/css/main.scss index cce812c..f18da84 100644 --- a/src/assets/css/main.scss +++ b/src/assets/css/main.scss @@ -230,12 +230,6 @@ .ant-modal.ant-modal-confirm { top: 38vh; } -.ant-modal.ant-modal-confirm.ant-modal-confirm-info { - top: 100px; - .ant-modal-body { - padding: 24px; - } -} .ant-popover { z-index: 1070!important; diff --git a/src/menu/components/card/cardcellcomponent/elementform/index.scss b/src/menu/components/card/cardcellcomponent/elementform/index.scss index 45788e3..aaa2c39 100644 --- a/src/menu/components/card/cardcellcomponent/elementform/index.scss +++ b/src/menu/components/card/cardcellcomponent/elementform/index.scss @@ -43,7 +43,7 @@ .ant-popover-inner-content { div { max-width: 750px; - word-break: break-all; + word-break: normal; } } } \ No newline at end of file diff --git a/src/menu/components/table/base-table/columns/editColumn/index.scss b/src/menu/components/table/base-table/columns/editColumn/index.scss index e653f84..d0a30f3 100644 --- a/src/menu/components/table/base-table/columns/editColumn/index.scss +++ b/src/menu/components/table/base-table/columns/editColumn/index.scss @@ -34,7 +34,7 @@ .ant-popover-inner-content { div { max-width: 750px; - word-break: break-all; + word-break: normal; } } } diff --git a/src/menu/components/table/edit-table/columns/editColumn/index.scss b/src/menu/components/table/edit-table/columns/editColumn/index.scss index 82b274d..f2127e8 100644 --- a/src/menu/components/table/edit-table/columns/editColumn/index.scss +++ b/src/menu/components/table/edit-table/columns/editColumn/index.scss @@ -57,7 +57,7 @@ .ant-popover-inner-content { div { max-width: 750px; - word-break: break-all; + word-break: normal; } } } \ No newline at end of file diff --git a/src/menu/components/table/normal-table/columns/editColumn/index.scss b/src/menu/components/table/normal-table/columns/editColumn/index.scss index e653f84..d0a30f3 100644 --- a/src/menu/components/table/normal-table/columns/editColumn/index.scss +++ b/src/menu/components/table/normal-table/columns/editColumn/index.scss @@ -34,7 +34,7 @@ .ant-popover-inner-content { div { max-width: 750px; - word-break: break-all; + word-break: normal; } } } diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx index 5af3787..6a4a21b 100644 --- a/src/tabviews/custom/index.jsx +++ b/src/tabviews/custom/index.jsx @@ -249,7 +249,7 @@ let initInters = [] - config.interfaces = this.formatInterSetting(config.interfaces, regs, MenuID, 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') let params = [] @@ -1175,7 +1175,7 @@ } // 鏍煎紡鍖栭粯璁よ缃� - formatInterSetting = (inters, regs, MenuID, initInters) => { + formatInterSetting = (inters, regs, MenuID, initInters, MenuName) => { if (!inters) return [] let initlimit = false @@ -1233,7 +1233,7 @@ }) delete inter.scripts - inter.setting.$name = '鍏叡鏁版嵁婧�-' + inter.setting.name + inter.setting.$name = (MenuName || '') + '-鍏叡鏁版嵁婧�-' + inter.setting.name inter.setting.execute = inter.setting.execute !== 'false' if (!inter.setting.execute) { diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx index 7b073fc..aa4e7b5 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx @@ -59,6 +59,7 @@ width: '15%', editable: true, inputType: 'select', + keyCol: true, options: [ { value: 'Nvarchar(10)', text: 'Nvarchar(10)' }, { value: 'Nvarchar(20)', text: 'Nvarchar(20)' }, @@ -114,7 +115,10 @@ required: false, inputType: 'number', unlimit: true, - editable: true + editable: true, + keyVals: ['Int', 'Decimal(18,0)', 'Decimal(18,2)', 'Decimal(18,4)', 'Decimal(18,6)'], + render: (text, record) => /^Decimal/ig.test(record.type) || /^int/ig.test(record.type) ? text : '' + }, { title: '鏈�澶у��', @@ -123,7 +127,9 @@ required: false, inputType: 'number', unlimit: true, - editable: true + editable: true, + keyVals: ['Int', 'Decimal(18,0)', 'Decimal(18,2)', 'Decimal(18,4)', 'Decimal(18,6)'], + render: (text, record) => /^Decimal/ig.test(record.type) || /^int/ig.test(record.type) ? text : '' } ], uniqueColumns: [ diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx index 2afb057..58d7051 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx @@ -67,6 +67,7 @@ inputType: 'select', editable: true, required: false, + keyCol: true, width: '12%', render: (text) => { if (text === 'image') { @@ -89,6 +90,7 @@ inputType: 'radio', editable: true, required: false, + keyVals: ['number'], width: '12%', render: (text, record) => { if (record.type !== 'number') return '' @@ -112,6 +114,7 @@ max: 18, editable: true, required: false, + keyVals: ['number'], width: '12%', render: (text, record) => record.type === 'number' ? text : '' }, diff --git a/src/templates/zshare/editTable/index.jsx b/src/templates/zshare/editTable/index.jsx index 7383cea..fcc5e6d 100644 --- a/src/templates/zshare/editTable/index.jsx +++ b/src/templates/zshare/editTable/index.jsx @@ -3,7 +3,7 @@ import { is, fromJS } from 'immutable' import { DndProvider, DragSource, DropTarget } from 'react-dnd' import { Table, Input, InputNumber, Popconfirm, Switch, Form, Select, Radio, Cascader, notification, message, Modal, Typography } from 'antd' -import { CopyOutlined, EditOutlined, DeleteOutlined, SwapOutlined, PlusOutlined } from '@ant-design/icons' +import { CopyOutlined, EditOutlined, DeleteOutlined, SwapOutlined, PlusOutlined, ConsoleSqlOutlined } from '@ant-design/icons' import Utils from '@/utils/utils.js' import ColorSketch from '@/mob/colorsketch' @@ -123,7 +123,7 @@ class EditableCell extends Component { getInput = (form) => { - const { inputType, options, min, max, unlimit, allowClear } = this.props + const { inputType, options, min, max, unlimit, allowClear, typeChange } = this.props if (inputType === 'number' && unlimit) { return <InputNumber onPressEnter={() => this.getValue(form)} /> @@ -137,7 +137,7 @@ return <CusSwitch /> } else if (inputType === 'select') { return ( - <Select> + <Select onChange={typeChange}> {options.map((item, i) => (<Select.Option key={i} value={item.field || item.value}> {item.label || item.text} </Select.Option>))} </Select> ) @@ -176,11 +176,18 @@ renderCell = (form) => { const { getFieldDecorator } = form - const { editing, dataIndex, title, record, children, className, required, inputType, rules } = this.props + const { editing, pass, dataIndex, title, record, children, className, required, inputType, rules } = this.props + if (!editing) { + return ( + <td className={className}> + {children} + </td> + ) + } return ( <td className={className}> - {editing ? ( + {pass ? ( <Form.Item style={{ margin: 0 }}> {getFieldDecorator(dataIndex, { rules: [ @@ -194,7 +201,7 @@ })(this.getInput(form))} </Form.Item> ) : ( - children + null )} </td> ) @@ -218,7 +225,9 @@ data: [], editingKey: '', editLineId: '', - columns: [] + columns: [], + keyCol: null, + keyVal: '' } UNSAFE_componentWillMount () { @@ -226,6 +235,7 @@ let columns = fromJS(this.props.columns).toJS() let operation = null let extra = null + let keyCol = null if (actions) { actions.forEach(item => { @@ -237,9 +247,17 @@ if (actions && (actions.includes('edit') || actions.includes('copy') || actions.includes('del'))) { let _operation = null + let render = null columns = columns.filter(item => { if (item.dataIndex === 'operation') { _operation = item + } + if (item.keyCol) { + keyCol = item.dataIndex + } + if (item.dataIndex === 'sqlRender') { + render = item.render + return false } return item.dataIndex !== 'operation' }) @@ -271,7 +289,7 @@ </div> ) : ( <div className={'edit-operation-btn' + (editingKey !== '' ? ' disabled' : '')} style={{minWidth: '110px', whiteSpace: 'nowrap'}}> - {actions.includes('edit') ? <span className="primary" title="缂栬緫" onClick={() => {editingKey === '' && this.edit(record.uuid)}}><EditOutlined /></span> : null} + {actions.includes('edit') ? <span className="primary" title="缂栬緫" onClick={() => {editingKey === '' && this.edit(record)}}><EditOutlined /></span> : null} {extra ? <span className="status" title={extra[2]} onClick={() => {editingKey === '' && this.handleStatus(record, extra[1])}}><SwapOutlined /></span> : null} {actions.includes('status') ? <span className="status" title="鏄惁鍚敤" onClick={() => {editingKey === '' && this.handleStatus(record, 'status')}}><SwapOutlined /></span> : null} {actions.includes('copy') ? <span className="copy" title="澶嶅埗" onClick={() => {editingKey === '' && this.copy(record)}}><CopyOutlined /></span> : null} @@ -279,10 +297,11 @@ overlayClassName="popover-confirm" title="纭畾鍒犻櫎鍚�?" onConfirm={() => this.handleDelete(record.uuid) - }> + }> <span className="danger"><DeleteOutlined /></span> </Popconfirm> : null} {actions.includes('del') && editingKey !== '' ? <span className="danger"><DeleteOutlined /></span> : null} + {actions.includes('sql') ? <span className="primary" title="SQL" onClick={() => {editingKey === '' && this.showSql(record, render)}}><ConsoleSqlOutlined /></span> : null} </div> ) } @@ -298,7 +317,8 @@ this.setState({ data: data || [], operation, - columns + columns, + keyCol }) } @@ -338,6 +358,20 @@ return } MKEmitter.removeListener('editLineId', this.getEditLineId) + } + + showSql = (record, render) => { + let list = render(record) + + if (list) { + Modal.info({ + title: '', + width: 500, + className: 'sql-example', + icon: null, + content: list.map((n, index) => <div key={index} dangerouslySetInnerHTML={{ __html: n }}></div>) + }) + } } getEditLineId = (id) => { @@ -719,8 +753,14 @@ }) } - edit(uuid) { - this.setState({ editingKey: uuid }) + edit(record) { + const { keyCol } = this.state + + this.setState({ editingKey: record.uuid, keyVal: keyCol ? record[keyCol] : '' }) + } + + typeChange = (val) => { + this.setState({ keyVal: val }) } moveRow = (dragIndex, hoverIndex) => { @@ -771,7 +811,7 @@ render() { const { actions, indexShow, searchKey } = this.props - const { editLineId } = this.state + const { editLineId, keyVal } = this.state let components = { body: { @@ -792,7 +832,7 @@ } if (!col.editable) return col - + return { ...col, onCell: record => ({ @@ -806,9 +846,12 @@ unlimit: col.unlimit, required: col.required !== false ? true : false, allowClear: col.allowClear === true, + keyCol: col.keyCol === true, title: col.title, editing: this.isEditing(record), + pass: col.keyVals ? col.keyVals.includes(keyVal) : true, onSave: this.onSave, + typeChange: this.typeChange, }), } }) diff --git a/src/templates/zshare/editTable/index.scss b/src/templates/zshare/editTable/index.scss index 564dc79..76e6bfd 100644 --- a/src/templates/zshare/editTable/index.scss +++ b/src/templates/zshare/editTable/index.scss @@ -127,3 +127,10 @@ } } +.ant-modal.ant-modal-confirm.ant-modal-confirm-info.sql-example { + top: 100px; + .ant-modal-body { + padding: 24px; + } +} + diff --git a/src/templates/zshare/verifycard/index.jsx b/src/templates/zshare/verifycard/index.jsx index 7a22f60..8fb0906 100644 --- a/src/templates/zshare/verifycard/index.jsx +++ b/src/templates/zshare/verifycard/index.jsx @@ -2,7 +2,7 @@ import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' import { Form, Tabs, Row, Col, Button, Popconfirm, notification, Modal, message, InputNumber, Typography } from 'antd' -import { CheckCircleOutlined, StopOutlined, EditOutlined, SwapOutlined, DeleteOutlined, ExclamationOutlined } from '@ant-design/icons' +import { CheckCircleOutlined, StopOutlined, EditOutlined, SwapOutlined, DeleteOutlined, ExclamationOutlined, ConsoleSqlOutlined } from '@ant-design/icons' import Toast from 'antd-mobile/es/components/toast' import Dialog from 'antd-mobile/es/components/dialog' import moment from 'moment' @@ -114,6 +114,34 @@ <CheckCircleOutlined style={{marginLeft: '5px'}}/> </div> ) + }, + { + dataIndex: 'sqlRender', + render: (record) => { + let _fieldValue = [] + let _value = [] + let _labels = record.fieldlabel.split(',') + + record.field.split(',').forEach((_field, index) => { + let _key = _field.toLowerCase() + _fieldValue.push(`${_key}=${_key === 'bid' ? '@BID@' : ''}`) + _value.push(`${_labels[index] || ''}锛歺xx`) + }) + + let _verifyType = '' + if (record.verifyType === 'logic') { + _verifyType = ' and deleted=0' + } + + let sql = `select @tbid='', @ErrorCode='',@retmsg='' + select @tbid='X' from ${this.props.card.sql} where ${_fieldValue.join(' and ')}${_verifyType} + If @tbid!='' + Begin + select @ErrorCode='${record.errorCode}',@retmsg='${_value.join(', ')} 宸插瓨鍦�' + goto aaa + end` + return sql.split(/\n\s{10}/ig).map(n => n.replace(/^\s{2}/ig, ' ')) + } } ], onceUniqueColumns: [ @@ -151,6 +179,27 @@ </div> ) }, + { + dataIndex: 'sqlRender', + render: (record) => { + let primaryKey = 'id' + + if (this.props.config && this.props.config.setting && this.props.config.setting.primaryKey) { + primaryKey = this.props.config.setting.primaryKey + } + + let sql = `Set @tbid='' + Select top 1 @tbid='X' from (select distinct ${record.field},1 as n from (鏁版嵁婧�) tb inner join (select ID from dbo.SplitComma(@ID@)) sp on tb.${primaryKey}=sp.ID ) a having sum(n)>1 + + If @tbid!='' + Begin + Set @ErrorCode='E' Set @retmsg='${record.fieldlabel} 鍊间笉鍞竴' + goto aaa + end` + + return sql.split(/\n\s{10}/ig).map(n => n.replace(/^\s{2}/ig, ' ')) + } + } ], contrastColumns: [ { @@ -163,7 +212,7 @@ { title: '杩愮畻绗�', dataIndex: 'operator', - width: '14%', + width: '13%', editable: true, inputType: 'select', options: [ @@ -187,14 +236,14 @@ { title: '鎻愮ず淇℃伅', dataIndex: 'errmsg', - width: '14%', + width: '13%', inputType: 'input', editable: true }, { title: '鎶ラ敊缂栫爜', dataIndex: 'errorCode', - width: '14%', + width: '13%', editable: true, inputType: 'select', options: [ @@ -224,6 +273,18 @@ <CheckCircleOutlined style={{marginLeft: '5px'}}/> </div> ) + }, + { + dataIndex: 'sqlRender', + render: (record) => { + let sql = `If ${record.frontfield} ${record.operator} ${record.backfield} + Begin + select @ErrorCode='${record.errorCode}',@retmsg='${record.errmsg}' + goto aaa + end` + + return sql.split(/\n\s{10}/ig).map(n => n.replace(/^\s{2}/ig, ' ')) + } } ], customColumns: [ @@ -530,7 +591,7 @@ }> <span className="operation-btn" style={{color: '#ff4d4f'}}><DeleteOutlined /></span> </Popconfirm> - {/* <span className="operation-btn" title="SQL" onClick={() => this.orderSql(record)} style={{color: '#1890ff'}}><ConsoleSqlOutlined /></span> */} + <span className="operation-btn" title="SQL" onClick={() => this.orderSql(record)} style={{color: '#1890ff'}}><ConsoleSqlOutlined /></span> </div>) } ] @@ -1135,50 +1196,44 @@ }) } - // orderSql = (record) => { - // let _ModularDetailCode = '' - // let _lpline = '' - // if (record.TypeCharOne === 'Lp') { - // if (record.linkField.toLowerCase() === 'bid') { - // _lpline = `set @ModularDetailCode= 'Lp'+ right('${record.mark || this.props.card.uuid}'+@BID@,48)` - // } else { - // _lpline = `set @ModularDetailCode= 'Lp'+ right('${record.mark || this.props.card.uuid}'+@${record.linkField.toLowerCase()},48)` - // } - // _ModularDetailCode = '@ModularDetailCode' - // } else if (record.TypeCharOne === 'BN') { - // _ModularDetailCode = `'${record.TypeCharOne}'` - // } else { - // _ModularDetailCode = `'${record.ModularDetailCode}'` - // } + orderSql = (record) => { + let _ModularDetailCode = '' + let _lpline = '' + if (record.TypeCharOne === 'Lp') { + if (record.linkField.toLowerCase() === 'bid') { + _lpline = `set @ModularDetailCode= 'Lp'+ right('${record.mark || this.props.card.uuid}'+@BID@,48)` + } else { + _lpline = `set @ModularDetailCode= 'Lp'+ right('${record.mark || this.props.card.uuid}'+@${record.linkField.toLowerCase()},48)` + } + _ModularDetailCode = '@ModularDetailCode' + } else if (record.TypeCharOne === 'BN') { + _ModularDetailCode = `'${record.TypeCharOne}'` + } else { + _ModularDetailCode = `'${record.ModularDetailCode}'` + } - // let sql = `select @BillCode='', @${record.field}='', @ModularDetailCode='' - // ${_lpline} - // exec s_get_BillCode - // @ModularDetailCode=${_ModularDetailCode}, - // @Type=${record.Type}, - // @TypeCharOne='${record.TypeCharOne}', - // @TypeCharTwo ='${record.TypeCharTwo}', - // @BillCode =@BillCode output, - // @ErrorCode =@ErrorCode output, - // @retmsg=@retmsg output - // if @ErrorCode!='' - // goto aaa - // set @${record.field}=@BillCode` + let sql = `select @BillCode='', @${record.field}='', @ModularDetailCode='' + ${_lpline} + exec s_get_BillCode + @ModularDetailCode=${_ModularDetailCode}, + @Type=${record.Type}, + @TypeCharOne='${record.TypeCharOne}', + @TypeCharTwo ='${record.TypeCharTwo}', + @BillCode =@BillCode output, + @ErrorCode =@ErrorCode output, + @retmsg=@retmsg output + if @ErrorCode!='' + goto aaa + set @${record.field}=@BillCode` - // Modal.info({ - // title: '', - // width: 500, - // icon: null, - // content: sql.split(/\n\s{4}/ig).map((n, index) => <div key={index} dangerouslySetInnerHTML={{ __html: n.replace(/\s/ig, ' ') }} style={{whiteSpace: 'nowrap'}}></div>) - // }) - // // let oInput = document.createElement('input') - // // oInput.value = sql - // // document.body.appendChild(oInput) - // // oInput.select() - // // document.execCommand('Copy') - // // document.body.removeChild(oInput) - // // message.success('澶嶅埗鎴愬姛銆�') - // } + Modal.info({ + title: '', + width: 500, + className: 'sql-example', + icon: null, + content: sql.split(/\n\s{4}/ig).map((n, index) => <div key={index} dangerouslySetInnerHTML={{ __html: n.replace(/\s/ig, ' ') }} style={{whiteSpace: 'nowrap'}}></div>) + }) + } uniqueChange = (values) => { let verify = fromJS(this.state.verify).toJS() @@ -1649,7 +1704,7 @@ </span> } key="contrasts"> <ContrastForm contrastChange={this.contrastChange}/> - <EditTable actions={['edit', 'move', 'copy', 'del', 'status']} type="contrastverify" data={verify.contrasts} columns={contrastColumns} onChange={(contrasts) => this.setState({verify: {...verify, contrasts}})}/> + <EditTable actions={['edit', 'move', 'copy', 'del', 'status', 'sql']} type="contrastverify" data={verify.contrasts} columns={contrastColumns} onChange={(contrasts) => this.setState({verify: {...verify, contrasts}})}/> </TabPane> : null} {verifyInter === 'system' ? <TabPane tab={ <span> @@ -1695,7 +1750,7 @@ fields={card.Ot !== 'requiredOnce' ? uniqueFields : columnsFields} uniqueChange={this.uniqueChange} /> - <EditTable actions={['edit', 'move', 'del', 'status']} data={verify.uniques} columns={card.Ot !== 'requiredOnce' ? uniqueColumns : onceUniqueColumns} onChange={this.changeUniques}/> + <EditTable actions={['edit', 'move', 'del', 'status', 'sql']} data={verify.uniques} columns={card.Ot !== 'requiredOnce' ? uniqueColumns : onceUniqueColumns} onChange={this.changeUniques}/> </TabPane> : null} {verifyInter === 'system' ? <TabPane tab={ <span> diff --git a/src/templates/zshare/verifycard/index.scss b/src/templates/zshare/verifycard/index.scss index 6ee9eb2..a8a721e 100644 --- a/src/templates/zshare/verifycard/index.scss +++ b/src/templates/zshare/verifycard/index.scss @@ -106,6 +106,14 @@ } } +.ant-modal.ant-modal-confirm.ant-modal-confirm-info.sql-example { + top: 100px; + .ant-modal-body { + padding: 24px; + } +} + + @media screen and (max-width: 1500px) { .mk-verify-tabs { .ant-tabs-nav .ant-tabs-tab { diff --git a/src/views/billprint/index.jsx b/src/views/billprint/index.jsx index 0c287de..fd83600 100644 --- a/src/views/billprint/index.jsx +++ b/src/views/billprint/index.jsx @@ -325,7 +325,7 @@ let initInters = [] - this.formatInterSetting(config.interfaces, regs, initInters, params, BID) + this.formatInterSetting(config.interfaces, regs, initInters, params, BID, config.MenuName) config.components = config.components.map(component => { if (component.action) { @@ -341,6 +341,8 @@ component.$searches = [] } component.data = [] // 鍒濆鍖栨暟鎹负绌� + + component.$menuname = (config.MenuName || '') + '-' + (component.name || '') if (component.subtype === 'tablecard') { // 鍏煎 component.type = 'card' @@ -466,6 +468,7 @@ component.setting.arr_field = component.columns ? component.columns.map(col => col.field).join(',') : '' component.setting.laypage = false // 鏄惁鍒嗛〉锛岃浆涓篵oolean 缁熶竴鏍煎紡 + component.setting.$name = component.$menuname if (component.format === 'object') { component.setting.$top = true @@ -539,7 +542,7 @@ return component }) - _pars = this.getFormatParam(_pars) + _pars = this.getFormatParam(_pars, config.MenuName) if (_pars) { _pars.componentId = 'union' @@ -640,7 +643,7 @@ return cell } - formatInterSetting = (inters, regs, initInters, params, BID) => { + formatInterSetting = (inters, regs, initInters, params, BID, MenuName) => { if (!inters) return [] let delay = 15 @@ -652,6 +655,7 @@ inter.setting.supModule = '' inter.setting.arr_field = inter.columns.map(col => col.field).join(',') + inter.setting.$name = (MenuName || '') + '-鍏叡鏁版嵁婧�-' + inter.setting.name if (inter.setting.interType !== 'system') { let param = UtilsDM.getQueryDataParams(inter.setting, [], inter.setting.order || '', 1, 1000, BID) @@ -683,7 +687,6 @@ }) delete inter.scripts - inter.setting.$name = '鍏叡鏁版嵁婧�-' + inter.setting.name inter.setting.execute = inter.setting.execute !== 'false' inter.setting.laypage = false inter.setting.$top = true @@ -771,7 +774,7 @@ } } - getFormatParam = (params) => { + getFormatParam = (params, MenuName) => { const { BID } = this.state if (!params || params.length === 0) return '' @@ -841,6 +844,10 @@ fullName: fullName } + if (MenuName) { + param.menuname = MenuName + } + param.LText = Utils.formatOptions(param.LText) param.LText_field = Utils.formatOptions(param.LText_field) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') -- Gitblit v1.8.0