| | |
| | | import Api from '@/api' |
| | | import Utils from '@/utils/utils.js' |
| | | import options from '@/store/options.js' |
| | | import zhCN from '@/locales/zh-CN/comtable.js' |
| | | import enUS from '@/locales/en-US/comtable.js' |
| | | import zhCN from '@/locales/zh-CN/model.js' |
| | | import enUS from '@/locales/en-US/model.js' |
| | | import { getSearchForm, getActionForm, getColumnForm } from '@/templates/zshare/formconfig' |
| | | import { queryTableSql } from '@/utils/option.js' |
| | | |
| | |
| | | handleAction = (card, type) => { |
| | | let ableField = this.props.permFuncField.join(', ') |
| | | let functip = <div> |
| | | <p style={{marginBottom: '5px'}}>{this.state.dict['header.modal.func.innerface'].replace('@ableField', ableField)}</p> |
| | | <p>{this.state.dict['header.modal.func.outface']}</p> |
| | | <p style={{marginBottom: '5px'}}>{this.state.dict['model.tooltip.func.innerface'].replace('@ableField', ableField)}</p> |
| | | <p>{this.state.dict['model.tooltip.func.outface']}</p> |
| | | </div> |
| | | |
| | | this.setState({ |
| | |
| | | |
| | | this.menuformRef.handleConfirm().then(res => { |
| | | this.actionFormRef.handleConfirm().then(result => { |
| | | if (!['pop', 'exec', 'prompt'].includes(result.OpenType) || result.funcType || result.intertype !== 'inner' || result.innerFunc ) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '打开方式为 弹窗(表单)、提示框或直接执行,且使用系统函数时,才可以创建接口!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | let _menu = { |
| | | type: 'main', |
| | | MenuID: menu.MenuID, |
| | |
| | | |
| | | confirm({ |
| | | content: `确定删除<<${element.card.label}>>吗?`, |
| | | okText: this.state.dict['header.confirm'], |
| | | okText: this.state.dict['model.confirm'], |
| | | cancelText: this.state.dict['header.cancel'], |
| | | onOk() { |
| | | let _config = null |
| | |
| | | if (config.isAdd) { |
| | | confirm({ |
| | | content: '菜单尚未提交,确定放弃保存吗?', |
| | | okText: this.state.dict['header.confirm'], |
| | | okText: this.state.dict['model.confirm'], |
| | | cancelText: this.state.dict['header.cancel'], |
| | | onOk() { |
| | | _this.props.handleView() |
| | |
| | | }) |
| | | } |
| | | |
| | | const textmatch = { // 选择text时匹配规则 |
| | | text: 'like', |
| | | number: 'like', |
| | | datetime: 'like', |
| | | date: 'like' |
| | | } |
| | | const selectmatch = { // 选择select时匹配规则 |
| | | text: '=', |
| | | number: '=', |
| | | datetime: '=', |
| | | date: '=' |
| | | } |
| | | const datematch = { // 选择dateRange时匹配规则 |
| | | text: 'between', |
| | | number: 'between', |
| | | datetime: 'between', |
| | | date: 'between' |
| | | } |
| | | |
| | | // 获取已选字段集合 |
| | | let cards = this.refs.searchcard.state.selectCards |
| | | |
| | |
| | | |
| | | if (cell.type !== item.type) { // 数据类型修改 |
| | | if (cell.type === 'select') { |
| | | item.match = selectmatch[cell.datatype] |
| | | item.match = '=' |
| | | } else if (cell.type === 'daterange') { |
| | | item.match = datematch[cell.datatype] |
| | | item.match = 'between' |
| | | } else { |
| | | cell.type = 'text' |
| | | item.match = textmatch[cell.datatype] |
| | | item.match = 'like' |
| | | } |
| | | |
| | | item.type = cell.type |
| | |
| | | _columns.forEach(item => { |
| | | let _match = '' |
| | | if (item.type === 'select') { |
| | | _match = selectmatch[item.datatype] |
| | | _match = '=' |
| | | } else if (item.type === 'daterange') { |
| | | _match = datematch[item.datatype] |
| | | _match = 'between' |
| | | } else { |
| | | _match = textmatch[item.datatype] |
| | | _match = 'like' |
| | | } |
| | | |
| | | let newcard = { |
| | |
| | | |
| | | confirm({ |
| | | content: `确定新建标签组吗?`, |
| | | okText: this.state.dict['header.confirm'], |
| | | okText: this.state.dict['model.confirm'], |
| | | cancelText: this.state.dict['header.cancel'], |
| | | onOk() { |
| | | let newgroup = 'tabs' + Utils.getuuid() |
| | |
| | | |
| | | confirm({ |
| | | content: `确定删除标签组吗?`, |
| | | okText: this.state.dict['header.confirm'], |
| | | okText: this.state.dict['model.confirm'], |
| | | cancelText: this.state.dict['header.cancel'], |
| | | onOk() { |
| | | |
| | |
| | | hasbtncrtinter ? <CreateInterface key="interface" dict={this.state.dict} ref="btnCreatInterface" trigger={this.btnCreatInterface}/> : null, |
| | | modaltype === 'actionEdit' ? <CreateFunc key="create" dict={this.state.dict} ref="btnCreatFunc" trigger={this.creatFunc}/> : null, |
| | | <Button key="cancel" onClick={this.editModalCancel}>{this.state.dict['header.cancel']}</Button>, |
| | | <Button key="confirm" type="primary" onClick={this.handleSubmit}>{this.state.dict['header.confirm']}</Button> |
| | | <Button key="confirm" type="primary" onClick={this.handleSubmit}>{this.state.dict['model.confirm']}</Button> |
| | | ]} |
| | | destroyOnClose |
| | | > |
| | |
| | | {/* 根据字段名添加显示列及搜索条件 */} |
| | | <Modal |
| | | wrapClassName="common-table-fields-modal" |
| | | title={this.state.dict['header.edit']} |
| | | title={this.state.dict['model.edit']} |
| | | visible={this.state.tableVisible} |
| | | width={'65vw'} |
| | | maskClosable={false} |
| | |
| | | </Modal> |
| | | {/* 设置全局配置及列表数据源 */} |
| | | <Modal |
| | | title={this.state.dict['header.edit']} |
| | | title={this.state.dict['model.edit']} |
| | | visible={this.state.settingVisible} |
| | | width={750} |
| | | maskClosable={false} |
| | |
| | | <CreateInterface key="interface" dict={this.state.dict} ref="tableCreatInterface" trigger={this.tableCreatInterface}/>, |
| | | <CreateFunc key="create" dict={this.state.dict} ref="tableCreatFunc" trigger={this.tableCreatFunc}/>, |
| | | <Button key="cancel" onClick={() => { this.setState({ settingVisible: false }) }}>{this.state.dict['header.cancel']}</Button>, |
| | | <Button key="confirm" type="primary" loading={this.state.sqlVerifing} onClick={this.settingSave}>{this.state.dict['header.confirm']}</Button> |
| | | <Button key="confirm" type="primary" loading={this.state.sqlVerifing} onClick={this.settingSave}>{this.state.dict['model.confirm']}</Button> |
| | | ]} |
| | | destroyOnClose |
| | | > |