| | |
| | | .mk-form-split-line { |
| | | color: $color6; |
| | | } |
| | | .system-color { |
| | | color: $color6; |
| | | } |
| | | } |
| | | |
| | | body.hidden-split-line #root { // 去除登录页分割线 |
| | |
| | | |
| | | getOptions = (_opentype, _intertype, _funcType, _pageTemplate, _procMode, _Ot) => { |
| | | let _options = actionTypeOptions[_opentype] ? fromJS(actionTypeOptions[_opentype]).toJS() : [] // 选项列表 |
| | | |
| | | |
| | | if (_opentype === 'innerpage') { // 新页面,可选模板(自定义时,可填入外部链接) |
| | | if (_pageTemplate === 'custom') { |
| | | _options.push('url', 'joint') |
| | |
| | | } |
| | | |
| | | this.setState({ |
| | | funcType: value, |
| | | formlist: this.state.formlist.map(item => { |
| | | item.hidden = !_options.includes(item.key) |
| | | |
| | |
| | | MKEmitter.emit('changeStyle', [col.uuid], ['font', 'padding'], col.style || {}) |
| | | } |
| | | |
| | | changeSubmitStyle = () => { |
| | | const { config } = this.props |
| | | |
| | | MKEmitter.emit('changeStyle', [config.uuid, 'submit'], ['font', 'background', 'border', 'margin', 'padding'], config.submit.style || {}) |
| | | } |
| | | |
| | | getStyle = (comIds, style) => { |
| | | const { config } = this.props |
| | | const { editStyleCard } = this.state |
| | | |
| | | if (!editStyleCard || comIds[0] !== editStyleCard.uuid || comIds.length !== 1) return |
| | | if (comIds.length === 2 && comIds[0] === config.uuid && comIds[1] === 'submit') { |
| | | let submit = {...config.submit, style} |
| | | |
| | | this.props.updatecolumn({...config, submit: submit}) |
| | | |
| | | return |
| | | } |
| | | if (comIds.length !== 1 || !editStyleCard || comIds[0] !== editStyleCard.uuid) return |
| | | |
| | | let _card = {...editStyleCard, style} |
| | | |
| | |
| | | const { config } = this.props |
| | | |
| | | this.verifyRef.handleConfirm().then(res => { |
| | | res.style = config.submit.style || {} |
| | | this.setState({ |
| | | visible: false |
| | | }, () => { |
| | |
| | | } |
| | | |
| | | const columns = this.state.columns.map((col, index) => { |
| | | let title = col.label |
| | | if (col.editable === 'true') { |
| | | title = <span>{col.label}<Icon style={{position: 'absolute', bottom: 0, right: 0, color: '#1890ff'}} type="edit" /></span> |
| | | } |
| | | return { |
| | | title: col.label, |
| | | title: title, |
| | | dataIndex: col.uuid, |
| | | align: col.Align, |
| | | sorter: col.IsSort === 'true', |
| | |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <Icon className="edit" title="编辑" type="edit" onClick={() => this.setState({visible: true})} /> |
| | | <Icon className="style" title="调整样式" onClick={this.changeSubmitStyle} type="font-colors" /> |
| | | </div> |
| | | } trigger="hover"> |
| | | <Button style={{height: '24px', marginRight: '10px', backgroundColor: '#1890ff'}} onDoubleClick={() => this.setState({visible: true})} type="primary">提交</Button> |
| | | <Button className="submit-btn" style={config.submit.style} onDoubleClick={() => this.setState({visible: true})} type="primary">提交</Button> |
| | | </Popover> |
| | | <Icon title="复制显示列" type="copy" onClick={this.copycolumn} /> |
| | | <MarkColumn columns={fields} type="line" marks={lineMarks} onSubmit={this.updateLineMarks} /> |
| | |
| | | > |
| | | <TableVerify |
| | | card={config.submit} |
| | | setting={config.setting} |
| | | dict={dict} |
| | | cols={config.cols} |
| | | columns={config.columns} |
| | |
| | | color: inherit; |
| | | font-size: inherit; |
| | | } |
| | | .submit-btn { |
| | | height: 24px; |
| | | margin-right: 10px; |
| | | background-color: #1890ff; |
| | | border-width: 0; |
| | | } |
| | | .ant-table-thead > tr > th .ant-table-header-column .ant-table-column-sorters > .ant-table-column-title { |
| | | position: unset; |
| | | } |
| | | .ant-table-body { |
| | | overflow-x: auto; |
| | | tr { |
| | |
| | | <Select |
| | | showSearch |
| | | filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} |
| | | onChange={this.selectScript} |
| | | onSelect={this.selectScript} |
| | | getPopupContainer={() => document.getElementById('verify-excelin-custom-scripts')} |
| | | > |
| | | <Select.Option key="default" value={'default'}> |
| | |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | | const { columns, cols, card } = this.props |
| | | const { columns, cols, card, setting } = this.props |
| | | let _verify = fromJS(card).toJS() |
| | | _verify.sheet = _verify.sheet || setting.tableName |
| | | |
| | | let fieldLabel = {} |
| | | let _columns = [] |
| | |
| | | sm: { span: 16 } |
| | | } |
| | | } |
| | | let isPop = sessionStorage.getItem('editMenuType') === 'popview' |
| | | |
| | | return ( |
| | | <div id="verify-excel-box-tab"> |
| | |
| | | </Radio.Group> |
| | | </Form.Item> |
| | | </Col> |
| | | {isPop ? <Col span={8}> |
| | | <Form.Item label={'成功后'}> |
| | | <Radio.Group style={{whiteSpace: 'nowrap'}} value={verify.closetab || 'false'} onChange={(e) => this.onOptionChange(e.target.value, 'closetab')}> |
| | | <Radio value="false">标签不关闭</Radio> |
| | | <Radio value="true">标签关闭</Radio> |
| | | </Radio.Group> |
| | | </Form.Item> |
| | | </Col> : null} |
| | | </Row> |
| | | </Form> |
| | | </TabPane> |
| | |
| | | getStyle = (comIds, style) => { |
| | | const { card } = this.state |
| | | |
| | | if (comIds[0] !== card.uuid) return |
| | | if (comIds[0] !== card.uuid || comIds.length !== 1) return |
| | | |
| | | let _card = {} |
| | | if (comIds.length === 1) { |
| | | _card = {...card, style} |
| | | } else { |
| | | return |
| | | } |
| | | let _card = {...card, style} |
| | | |
| | | this.setState({ |
| | | card: _card |
| | |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'number', |
| | | field: 'width', |
| | | label: '宽度', |
| | | initval: wrap.width || 24, |
| | | tooltip: '栅格布局,每行等分为24列。', |
| | | min: 1, |
| | | max: 24, |
| | | precision: 0, |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'number', |
| | | field: 'height', |
| | | label: '高度', |
| | | initval: wrap.height || '', |
| | | tooltip: '表格高度,空值时高度自适应。', |
| | | min: 10, |
| | | max: 3000, |
| | | precision: 0, |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'bordered', |
| | | label: '边框', |
| | |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'delable', |
| | | label: '可删除', |
| | | initval: wrap.delable || 'true', |
| | | required: false, |
| | | options: [ |
| | | {value: 'true', label: '是'}, |
| | | {value: 'false', label: '否'}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'editable', |
| | | label: '初始化', |
| | | initval: wrap.editable || 'false', |
| | | required: false, |
| | | options: [ |
| | | {value: 'true', label: '可编辑'}, |
| | | {value: 'false', label: '不可编辑'}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'color', |
| | | field: 'borderColor', |
| | | label: '边框颜色', |
| | |
| | | }, |
| | | { |
| | | type: 'number', |
| | | field: 'width', |
| | | label: '宽度', |
| | | initval: wrap.width || 24, |
| | | tooltip: '栅格布局,每行等分为24列。', |
| | | min: 1, |
| | | max: 24, |
| | | precision: 0, |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'number', |
| | | field: 'fontSize', |
| | | label: '字体大小', |
| | | initval: wrap.fontSize || 14, |
| | | min: 12, |
| | | max: 30, |
| | | precision: 0, |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'number', |
| | | field: 'height', |
| | | label: '高度', |
| | | initval: wrap.height || '', |
| | | tooltip: '表格高度,空值时高度自适应。', |
| | | min: 10, |
| | | max: 3000, |
| | | precision: 0, |
| | | required: false |
| | | }, |
| | |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'number', |
| | | field: 'width', |
| | | label: '宽度', |
| | | initval: wrap.width || 24, |
| | | tooltip: '栅格布局,每行等分为24列。', |
| | | min: 1, |
| | | max: 24, |
| | | precision: 0, |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'number', |
| | | field: 'height', |
| | | label: '高度', |
| | | initval: wrap.height || '', |
| | | tooltip: '表格高度,空值时高度自适应。', |
| | | min: 10, |
| | | max: 3000, |
| | | precision: 0, |
| | | required: false, |
| | | forbid: appType === 'mob' |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'tableType', |
| | | label: '表格属性', |
| | |
| | | }, |
| | | { |
| | | type: 'number', |
| | | field: 'width', |
| | | label: '宽度', |
| | | initval: wrap.width || 24, |
| | | tooltip: '栅格布局,每行等分为24列。', |
| | | min: 1, |
| | | max: 24, |
| | | precision: 0, |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'number', |
| | | field: 'fontSize', |
| | | label: '字体大小', |
| | | initval: wrap.fontSize || 14, |
| | |
| | | max: 30, |
| | | precision: 0, |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'number', |
| | | field: 'height', |
| | | label: '高度', |
| | | initval: wrap.height || '', |
| | | tooltip: '表格高度,空值时高度自适应。', |
| | | min: 10, |
| | | max: 3000, |
| | | precision: 0, |
| | | required: false, |
| | | forbid: appType === 'mob' |
| | | }, |
| | | { |
| | | type: 'number', |
| | |
| | | _columns.push(config.gridBtn) |
| | | } |
| | | |
| | | if (config.setting.selected === 'init' && config.setting.onload === 'false') { |
| | | config.setting.selected = 'false' |
| | | } |
| | | |
| | | this.setState({ |
| | | loadingview: false, |
| | | absFields, |
| | |
| | | start = pageSize * (pageIndex - 1) + 1 |
| | | } |
| | | |
| | | if (setting.selected !== 'false') { |
| | | setTimeout(() => { |
| | | MKEmitter.emit('mkTableCheckTopLine', this.props.MenuID) |
| | | }, 200) |
| | | if (setting.selected === 'init') { |
| | | this.setState({setting: {...setting, selected: 'false'}}) |
| | | } |
| | | } |
| | | |
| | | this.setState({ |
| | | data: result.data.map((item, index) => { |
| | | if (absFields.length) { |
| | |
| | | height: 24px; |
| | | color: #ffffff; |
| | | background-color: #1890ff; |
| | | border-width: 0; |
| | | } |
| | | .custom-control { |
| | | position: absolute; |
| | |
| | | background-color: #1890ff; |
| | | margin-right: 15px; |
| | | margin-bottom: 2px; |
| | | border-width: 0; |
| | | } |
| | | } |
| | | .ant-collapse { |
| | |
| | | |
| | | tdFocus = (id) => { |
| | | const { col, record } = this.props |
| | | |
| | | if (id !== col.uuid + record.$Index) return |
| | | this.focus() |
| | | } |
| | |
| | | fields: [], |
| | | pickup: false, // 收起未选择项 |
| | | orderfields: {}, // 排序id与field转换 |
| | | loading: false |
| | | loading: false, |
| | | editable: 'false' |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | |
| | | if (item.type !== 'action') { |
| | | let _copy = fromJS(_item).toJS() |
| | | _copy.sorter = false |
| | | |
| | | if (item.editable === 'true') { |
| | | _copy.title = <span>{item.label}<Icon className="system-color" style={{position: 'absolute', bottom: 0, right: 0}} type="edit" /></span> |
| | | } |
| | | edColumns.push(_copy) |
| | | } |
| | | _columns.push(_item) |
| | | }) |
| | | |
| | | edColumns.push({ |
| | | align: 'center', |
| | | dataIndex: 'mkoperation', |
| | | title: '操作', |
| | | sorter: false, |
| | | width: 100, |
| | | onCell: record => ({ |
| | | record, |
| | | col: {type: 'operation', tableId: tableId}, |
| | | if (setting.delable !== 'false') { |
| | | edColumns.push({ |
| | | align: 'center', |
| | | dataIndex: 'mkoperation', |
| | | title: '操作', |
| | | sorter: false, |
| | | width: 100, |
| | | onCell: record => ({ |
| | | record, |
| | | col: {type: 'operation', tableId: tableId}, |
| | | }) |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | if (setting.borderColor) { // 边框颜色 |
| | | let style = `#${tableId} table, #${tableId} tr, #${tableId} th, #${tableId} td {border-color: ${setting.borderColor}}` |
| | |
| | | edColumns, |
| | | tableId, |
| | | orderfields, |
| | | initEditLine |
| | | initEditLine, |
| | | editable: setting.editable |
| | | }) |
| | | } |
| | | |
| | |
| | | |
| | | componentDidMount () { |
| | | const { fields, columns } = this.props |
| | | const { data, editable } = this.state |
| | | |
| | | let _fields = [] |
| | | |
| | |
| | | this.setState({ |
| | | fields: _fields, |
| | | }) |
| | | |
| | | if (editable === 'true' && data && data.length > 0) { |
| | | setTimeout(() => { |
| | | this.pickupChange() |
| | | }, 200) |
| | | } |
| | | |
| | | MKEmitter.addListener('nextLine', this.nextLine) |
| | | MKEmitter.addListener('delRecord', this.delRecord) |
| | |
| | | UNSAFE_componentWillReceiveProps(nextProps) { |
| | | if (!is(fromJS(this.props.data), fromJS(nextProps.data))) { |
| | | this.setState({data: nextProps.data || []}) |
| | | if (this.state.editable === 'true') { |
| | | setTimeout(() => { |
| | | this.pickupChange() |
| | | }, 200) |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | loading: false |
| | | }) |
| | | |
| | | if (submit.closetab === 'true') { |
| | | MKEmitter.emit('popclose') |
| | | } |
| | | if (submit.execSuccess !== 'never') { |
| | | this.repick() |
| | | MKEmitter.emit('refreshByButtonResult', submit.$menuId, submit.execSuccess, submit) |
| | |
| | | data: [], |
| | | edData: [], |
| | | pickup, |
| | | loading: false |
| | | loading: false, |
| | | editable: 'false' |
| | | }, () => { |
| | | this.setState({ |
| | | data: data, |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { setting, statFValue, lineMarks } = this.props |
| | | const { setting, statFValue, lineMarks, submit } = this.props |
| | | const { pickup, tableId, data, edData, columns, edColumns, loading } = this.state |
| | | |
| | | const components = { |
| | |
| | | return ( |
| | | <div className={`edit-custom-table ${pickup ? 'editable' : ''} ${setting.tableHeader || ''} ${height ? 'fixed-height' : ''} ${setting.mode || ''}`} id={tableId}> |
| | | <Switch title="编辑" className="main-pickup" checkedChildren="开" unCheckedChildren="关" checked={pickup} onChange={this.pickupChange} /> |
| | | {pickup ? <Button onClick={() => setTimeout(() => {this.checkData()}, 10)} loading={loading} className="submit-table" type="link">提交</Button> : null} |
| | | {pickup ? <Button style={submit.style} onClick={() => setTimeout(() => {this.checkData()}, 10)} loading={loading} className="submit-table" type="link">提交</Button> : null} |
| | | <Table |
| | | components={components} |
| | | style={setting.style} |
| | |
| | | }) |
| | | } |
| | | |
| | | if (config.setting.selected === 'init' && config.setting.onload === 'false') { |
| | | config.setting.selected = 'false' |
| | | } |
| | | |
| | | this.setState({ |
| | | loadingview: false, |
| | | chartId, |
| | |
| | | start = pageSize * (pageIndex - 1) + 1 |
| | | } |
| | | |
| | | if (setting.selected !== 'false') { |
| | | setTimeout(() => { |
| | | MKEmitter.emit('mkTableCheckTopLine', this.props.MenuID) |
| | | }, 200) |
| | | if (setting.selected === 'init') { |
| | | this.setState({setting: {...setting, selected: 'false'}}) |
| | | } |
| | | } |
| | | |
| | | this.setState({ |
| | | data: result.data.map((item, index) => { |
| | | if (absFields.length) { |
| | |
| | | }) |
| | | } |
| | | |
| | | if (config.setting.selected === 'init' && config.setting.onload === 'false') { |
| | | config.setting.selected = 'false' |
| | | } |
| | | |
| | | this.setState({ |
| | | loadingview: false, |
| | | chartId, |
| | |
| | | start = pageSize * (pageIndex - 1) + 1 |
| | | } |
| | | |
| | | if (setting.selected !== 'false') { |
| | | setTimeout(() => { |
| | | MKEmitter.emit('mkTableCheckTopLine', this.props.MenuID) |
| | | }, 200) |
| | | if (setting.selected === 'init') { |
| | | this.setState({setting: {...setting, selected: 'false'}}) |
| | | } |
| | | } |
| | | |
| | | this.setState({ |
| | | data: result.data.map((item, index) => { |
| | | if (absFields.length) { |
| | |
| | | } |
| | | |
| | | componentDidMount () { |
| | | MKEmitter.addListener('popclose', this.popclose) |
| | | MKEmitter.addListener('triggerBtnId', this.actionTrigger) |
| | | MKEmitter.addListener('openNewTab', this.openNewTab) |
| | | MKEmitter.addListener('refreshPopButton', this.refreshPopButton) |
| | |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | MKEmitter.removeListener('popclose', this.popclose) |
| | | MKEmitter.removeListener('openNewTab', this.openNewTab) |
| | | MKEmitter.removeListener('triggerBtnId', this.actionTrigger) |
| | | MKEmitter.removeListener('refreshPopButton', this.refreshPopButton) |
| | |
| | | BID={popData ? primaryId : this.props.BID} |
| | | BData={popData || this.props.BData} |
| | | /> : null} |
| | | {btn.$view === 'CustomPage' ? <CustomPage Tab={btn} MenuID={btn.uuid} param={{$BID: (popData ? primaryId : this.props.BID), ...(popData || this.props.BData || {})}} /> : null} |
| | | {btn.$view === 'CustomPage' ? <CustomPage Tab={btn} MenuName={btn.label} MenuID={btn.uuid} param={{$BID: (popData ? primaryId : this.props.BID), ...(popData || this.props.BData || {})}} /> : null} |
| | | <div className="close-drawer"> |
| | | <Button onClick={this.popclose}> |
| | | 关闭 |
| | |
| | | |
| | | componentDidMount () { |
| | | MKEmitter.addListener('resetTable', this.resetTable) |
| | | MKEmitter.addListener('mkTableCheckTopLine', this.mkTableCheckTopLine) |
| | | } |
| | | |
| | | /** |
| | |
| | | return |
| | | } |
| | | MKEmitter.removeListener('resetTable', this.resetTable) |
| | | MKEmitter.removeListener('mkTableCheckTopLine', this.mkTableCheckTopLine) |
| | | } |
| | | |
| | | mkTableCheckTopLine = (id) => { |
| | | if (id !== this.props.MenuID) return |
| | | |
| | | if (this.props.data.length > 0) { |
| | | this.changeRow(null, 0) |
| | | } |
| | | } |
| | | |
| | | // 字段透视 |
| | |
| | | <Select |
| | | showSearch |
| | | filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} |
| | | onChange={this.selectScript} |
| | | onSelect={this.selectScript} |
| | | getPopupContainer={() => document.getElementById('verify-excelin-custom-scripts')} |
| | | > |
| | | <Select.Option key="default" value={'default'}> |
| | |
| | | interType: 'system', |
| | | procMode: 'script', |
| | | requestMode: 'system', |
| | | tableType: '', |
| | | funcTooltip: '', |
| | | funcRules: [] |
| | | } |
| | |
| | | interType: setting.interType || 'system', |
| | | procMode: setting.procMode || 'script', |
| | | requestMode: setting.requestMode || 'system', |
| | | tableType: setting.tableType, |
| | | funcTooltip: tooltip, |
| | | funcRules: rules |
| | | }) |
| | |
| | | render() { |
| | | const { setting, dict, menu, config, columns } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | | const { interType, funcRules, funcTooltip, procMode, requestMode } = this.state |
| | | const { interType, funcRules, funcTooltip, procMode, requestMode, tableType } = this.state |
| | | |
| | | const formItemLayout = { |
| | | labelCol: { |
| | |
| | | {getFieldDecorator('tableType', { |
| | | initialValue: setting.tableType |
| | | })( |
| | | <Radio.Group> |
| | | <Radio.Group onChange={(e) => this.setState({tableType: e.target.value})}> |
| | | <Radio value="">不可选</Radio> |
| | | <Radio value="radio">单选</Radio> |
| | | <Radio value="checkbox">多选</Radio> |
| | |
| | | </Radio.Group>)} |
| | | </Form.Item> |
| | | </Col> |
| | | {tableType !== '' ? <Col span={12}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="在启用无人值守功能时无效。"> |
| | | <Icon type="question-circle" /> |
| | | 首行选中 |
| | | </Tooltip> |
| | | }> |
| | | {getFieldDecorator('selected', { |
| | | initialValue: setting.selected || 'false' |
| | | })( |
| | | <Radio.Group> |
| | | <Radio value="false">无</Radio> |
| | | <Radio value="init">初始化</Radio> |
| | | <Radio value="always">数据加载</Radio> |
| | | </Radio.Group>)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | <Col span={12}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="高级搜索弹窗的宽度,注:当宽度值小于100时表示占窗口的百分比,大于100时表示宽度的绝对值。"> |
| | |
| | | <Form.Item label={'快捷添加'} style={{marginBottom: 0}}> |
| | | <Select |
| | | showSearch |
| | | allowClear |
| | | filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} |
| | | onChange={this.selectScript} |
| | | onSelect={this.selectScript} |
| | | getPopupContainer={() => document.getElementById('verify-custom-scripts')} |
| | | > |
| | | <Select.Option key="default" value={this.props.defaultsql}>默认sql</Select.Option> |
| | |
| | | uuids.push(act.uuid) |
| | | }) |
| | | |
| | | if (card.type === 'card' || item.type === 'carousel' || (card.type === 'table' && card.subtype === 'tablecard')) { |
| | | card.subcards.forEach(_card => { |
| | | if (item.type === 'card' || item.type === 'carousel' || (item.type === 'table' && item.subtype === 'tablecard')) { |
| | | item.subcards.forEach(_card => { |
| | | _card.elements && _card.elements.forEach(cell => { |
| | | if (cell.eleType !== 'button') return |
| | | if (appType === 'pc' && cell.OpenType !== 'popview') return |
| | |
| | | uuids.push(cell.uuid) |
| | | }) |
| | | }) |
| | | } else if (card.type === 'table' && card.subtype === 'normaltable') { |
| | | card.cols && card.cols.forEach(col => { |
| | | } else if (item.type === 'table' && (item.subtype === 'normaltable' || item.subtype === 'editable')) { |
| | | item.cols && item.cols.forEach(col => { |
| | | if (col.type !== 'action') return |
| | | col.elements && col.elements.forEach(cell => { |
| | | if (appType === 'pc' && cell.OpenType !== 'popview') return |
| | |
| | | uuids.push(cell.uuid) |
| | | }) |
| | | }) |
| | | } else if (card.type === 'balcony') { |
| | | card.elements && card.elements.forEach(cell => { |
| | | } else if (item.type === 'balcony') { |
| | | item.elements && item.elements.forEach(cell => { |
| | | if (appType === 'pc' && cell.OpenType !== 'popview') return |
| | | |
| | | uuids.push(cell.uuid) |
| | |
| | | return cell |
| | | }) |
| | | } |
| | | } else if (item.type === 'table' && item.subtype === 'normaltable' && item.cols) { |
| | | } else if (item.type === 'table' && (item.subtype === 'normaltable' || item.subtype === 'editable') && item.cols) { |
| | | let loopCol = (col) => { |
| | | col.subcols = col.subcols.map(c => { |
| | | c.uuid = this.getuuid() |
| | |
| | | |
| | | return col |
| | | } |
| | | |
| | | let _uuids = {} |
| | | item.cols = item.cols.map(col => { |
| | | col.uuid = this.getuuid() |
| | | let uuid = this.getuuid() |
| | | |
| | | _uuids[col.uuid] = uuid |
| | | col.uuid = uuid |
| | | |
| | | if (col.type === 'colspan' && col.subcols) { |
| | | col = loopCol(col) |
| | |
| | | } |
| | | return col |
| | | }) |
| | | |
| | | if (item.subtype === 'editable') { |
| | | item.cols = item.cols.map(col => { |
| | | if (col.editable === 'true' && col.enter && _uuids[col.enter]) { |
| | | col.enter = _uuids[col.enter] |
| | | } |
| | | return col |
| | | }) |
| | | } |
| | | } |
| | | |
| | | if (item.btnlog) { |
| | |
| | | return cell |
| | | }) |
| | | } |
| | | } else if (item.type === 'table' && item.subtype === 'normaltable' && item.cols) { |
| | | } else if (item.type === 'table' && (item.subtype === 'normaltable' || item.subtype === 'editable') && item.cols) { |
| | | let loopCol = (col) => { |
| | | col.subcols = col.subcols.map(c => { |
| | | c.uuid = this.getuuid() |
| | |
| | | return col |
| | | } |
| | | |
| | | let _uuids = {} |
| | | item.cols = item.cols.map(col => { |
| | | col.uuid = this.getuuid() |
| | | let uuid = this.getuuid() |
| | | |
| | | _uuids[col.uuid] = uuid |
| | | col.uuid = uuid |
| | | |
| | | if (col.type === 'colspan' && col.subcols) { |
| | | col = loopCol(col) |
| | |
| | | } |
| | | return col |
| | | }) |
| | | |
| | | if (item.subtype === 'editable') { |
| | | item.cols = item.cols.map(col => { |
| | | if (col.editable === 'true' && col.enter && _uuids[col.enter]) { |
| | | col.enter = _uuids[col.enter] |
| | | } |
| | | return col |
| | | }) |
| | | } |
| | | } else if (item.type === 'form') { |
| | | item.subcards = item.subcards.map(cell => { |
| | | cell.uuid = this.getuuid() |
| | |
| | | value: trd.MenuID, |
| | | label: trd.MenuName, |
| | | type: 'CommonTable', |
| | | disabled: trd.MenuID === MenuId |
| | | // disabled: trd.MenuID === MenuId |
| | | disabled: false |
| | | } |
| | | |
| | | if (MenuId === trd.MenuID) { |