| | |
| | | } else { |
| | | param.linkurl = window.GLOB.linkurl |
| | | } |
| | | } else if (binding_type === 'cloud') { // 登录云端 |
| | | delete param.rduri |
| | | url = window.atob('aHR0cHM6Ly9jbG91$mkZC5tazloLmNu'.replace('$mk', '')) + '/webapi/dologon/s_visitor_login' |
| | | } |
| | | |
| | | param.LText = md5(window.btoa(_SessionUid + param.timestamp + (param.linkurl || ''))) |
| | |
| | | if (card.errors.length === 0) { |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_ac |
| | | delete card.$c_sc |
| | | delete card.$c_el |
| | | |
| | | this.setState({ |
| | | card: card |
| | | }) |
| | |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_ac |
| | | delete card.$c_sc |
| | | |
| | | this.setState({ |
| | | card: card |
| | | }) |
| | |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_ac |
| | | delete card.$c_sc |
| | | |
| | | this.setState({ |
| | | card: card |
| | | }) |
| | |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_ac |
| | | delete card.$c_sc |
| | | |
| | | this.setState({ |
| | | card: card |
| | | }) |
| | |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_ac |
| | | delete card.$c_sc |
| | | |
| | | this.setState({ |
| | | card: card |
| | | }) |
| | |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_ac |
| | | delete card.$c_sc |
| | | |
| | | this.setState({ |
| | | card: card |
| | | }) |
| | |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_ac |
| | | delete card.$c_sc |
| | | |
| | | this.setState({ |
| | | card: card |
| | | }) |
| | |
| | | if (card.errors.length === 0) { |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | |
| | | if (!card.plot.valueField) { |
| | | card.errors.push({ level: 0, detail: '图表信息尚未设置!'}) |
| | |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_ac |
| | | |
| | | let columns = card.columns.map(c => c.field) |
| | | if (!card.plot.Xaxis) { |
| | | card.errors.push({ level: 0, detail: '坐标轴尚未设置!'}) |
| | |
| | | if (card.errors.length === 0) { |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | |
| | | let columns = card.columns.map(c => c.field) |
| | | if (!card.plot.valueField) { |
| | |
| | | if (card.errors.length === 0) { |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | |
| | | if (!card.plot.Xaxis) { |
| | | card.errors.push({ level: 0, detail: '名称字段尚未设置!'}) |
| | |
| | | if (card.errors.length === 0) { |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_ac |
| | | |
| | | if (!card.plot.Xaxis) { |
| | | card.errors.push({ level: 0, detail: '坐标轴尚未设置!'}) |
| | |
| | | if (card.errors.length === 0) { |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | |
| | | this.setState({ |
| | | card: card |
| | |
| | | card.errors = checkComponent(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | |
| | | this.setState({ |
| | | card: card |
| | | }) |
| | |
| | | } |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | |
| | | this.setState({ |
| | | card: card |
| | | }) |
| | |
| | | card.width = card.wrap.width |
| | | card.name = card.wrap.name |
| | | card.errors = [] |
| | | let idCtrl = false |
| | | |
| | | card.$c_fc = true |
| | | if (card.wrap.datatype === 'dynamic') { |
| | | let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : '' |
| | | if (supModule === 'empty') { |
| | | supModule = '' |
| | | } |
| | | |
| | | card.$c_ds = true |
| | | card.errors = checkComponent(card) |
| | | |
| | | if (card.errors.length === 0) { |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | card.subcards.forEach(item => { |
| | | if (item.subButton.intertype === 'system' && !item.subButton.sqlType) { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮请设置操作类型`}) |
| | | } |
| | | if (item.subButton.verify && !item.subButton.output) { |
| | | if (item.subButton.verify.noteEnable === 'true') { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值短信发送无效!`}) |
| | | } else if (item.subButton.verify.emailEnable === 'true') { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值邮件发送无效!`}) |
| | | } |
| | | } |
| | | item.fields.forEach(m => { |
| | | if (m.dataSource && /@ID@/ig.test(m.dataSource)) { |
| | | idCtrl = true |
| | | } |
| | | if (m.type === 'linkMain' && !supModule) { |
| | | card.errors.push({ level: 1, detail: `请检查关联主表“${m.label}”是否有效`}) |
| | | } |
| | | }) |
| | | }) |
| | | } else { |
| | | let supModule = '' |
| | | if (card.wrap.datatype === 'static') { |
| | | supModule = card.wrap.supModule ? card.wrap.supModule[card.wrap.supModule.length - 1] : '' |
| | | } |
| | | |
| | | card.$tables = getTables(card) |
| | | |
| | | card.subcards.forEach(item => { |
| | | if (item.subButton.intertype === 'system' && !item.subButton.sqlType) { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮请设置操作类型`}) |
| | | } |
| | | if (item.subButton.verify && !item.subButton.output) { |
| | | if (item.subButton.verify.noteEnable === 'true') { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值短信发送无效!`}) |
| | | } else if (item.subButton.verify.emailEnable === 'true') { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值邮件发送无效!`}) |
| | | } |
| | | } |
| | | item.fields.forEach(m => { |
| | | if (m.dataSource && /@ID@/ig.test(m.dataSource)) { |
| | | idCtrl = true |
| | | } |
| | | if (m.type === 'linkMain' && !supModule && card.wrap.datatype === 'static') { |
| | | card.errors.push({ level: 1, detail: `请检查关联主表“${m.label}”是否有效`}) |
| | | } |
| | | }) |
| | | }) |
| | | delete card.$c_ds |
| | | } |
| | | |
| | | card.idCtrl = idCtrl |
| | | card.errors = checkComponent(card) |
| | | card.$tables = getTables(card) |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_fc |
| | | |
| | | this.setState({ |
| | | card: card |
| | |
| | | card.width = card.wrap.width |
| | | card.name = card.wrap.name |
| | | card.errors = [] |
| | | let idCtrl = false |
| | | |
| | | card.$c_fc = true |
| | | if (card.wrap.datatype === 'dynamic') { |
| | | let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : '' |
| | | if (supModule === 'empty') { |
| | | supModule = '' |
| | | } |
| | | |
| | | card.$c_ds = true |
| | | card.errors = checkComponent(card) |
| | | |
| | | if (card.errors.length === 0) { |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | card.subcards.forEach(item => { |
| | | if (item.subButton.intertype === 'system' && !item.subButton.sqlType) { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮请设置操作类型`}) |
| | | } |
| | | if (item.subButton.verify && !item.subButton.output) { |
| | | if (item.subButton.verify.noteEnable === 'true') { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值短信发送无效!`}) |
| | | } else if (item.subButton.verify.emailEnable === 'true') { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值邮件发送无效!`}) |
| | | } |
| | | } |
| | | item.fields.forEach(m => { |
| | | if (m.dataSource && /@ID@/ig.test(m.dataSource)) { |
| | | idCtrl = true |
| | | } |
| | | if (m.type === 'linkMain' && !supModule) { |
| | | card.errors.push({ level: 1, detail: `请检查分组“${item.setting.title}”中关联主表“${m.label}”是否有效`}) |
| | | } |
| | | }) |
| | | }) |
| | | } else { |
| | | let supModule = '' |
| | | if (card.wrap.datatype === 'static') { |
| | | supModule = card.wrap.supModule ? card.wrap.supModule[card.wrap.supModule.length - 1] : '' |
| | | } |
| | | |
| | | card.$tables = getTables(card) |
| | | |
| | | card.subcards.forEach(item => { |
| | | if (item.subButton.intertype === 'system' && !item.subButton.sqlType) { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮请设置操作类型`}) |
| | | } |
| | | if (item.subButton.verify && !item.subButton.output) { |
| | | if (item.subButton.verify.noteEnable === 'true') { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值短信发送无效!`}) |
| | | } else if (item.subButton.verify.emailEnable === 'true') { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值邮件发送无效!`}) |
| | | } |
| | | } |
| | | item.fields.forEach(m => { |
| | | if (m.dataSource && /@ID@/ig.test(m.dataSource)) { |
| | | idCtrl = true |
| | | } |
| | | if (m.type === 'linkMain' && !supModule && card.wrap.datatype === 'static') { |
| | | card.errors.push({ level: 1, detail: `请检查分组“${item.setting.title}”中关联主表“${m.label}”是否有效`}) |
| | | } |
| | | }) |
| | | }) |
| | | delete card.$c_ds |
| | | } |
| | | |
| | | card.idCtrl = idCtrl |
| | | card.errors = checkComponent(card) |
| | | card.$tables = getTables(card) |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_fc |
| | | |
| | | this.setState({ |
| | | card: card |
| | |
| | | card.width = card.wrap.width |
| | | card.name = card.wrap.name |
| | | card.errors = [] |
| | | let idCtrl = false |
| | | |
| | | |
| | | card.$c_fc = true |
| | | if (card.wrap.datatype === 'dynamic') { |
| | | let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : '' |
| | | if (supModule === 'empty') { |
| | | supModule = '' |
| | | } |
| | | |
| | | card.$c_ds = true |
| | | card.errors = checkComponent(card) |
| | | |
| | | if (card.errors.length === 0) { |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | card.subcards.forEach(item => { |
| | | if (item.subButton.intertype === 'system' && !item.subButton.sqlType) { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮请设置操作类型`}) |
| | | } |
| | | if (item.subButton.verify && !item.subButton.output) { |
| | | if (item.subButton.verify.noteEnable === 'true') { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值短信发送无效!`}) |
| | | } else if (item.subButton.verify.emailEnable === 'true') { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值邮件发送无效!`}) |
| | | } |
| | | } |
| | | item.fields.forEach(m => { |
| | | if (m.dataSource && /@ID@/ig.test(m.dataSource)) { |
| | | idCtrl = true |
| | | } |
| | | if (m.type === 'linkMain' && !supModule) { |
| | | card.errors.push({ level: 1, detail: `请检查分组“${item.setting.title}”中关联主表“${m.label}”是否有效`}) |
| | | } |
| | | }) |
| | | }) |
| | | } else { |
| | | let supModule = '' |
| | | if (card.wrap.datatype === 'static') { |
| | | supModule = card.wrap.supModule ? card.wrap.supModule[card.wrap.supModule.length - 1] : '' |
| | | } |
| | | |
| | | card.$tables = getTables(card) |
| | | |
| | | card.subcards.forEach(item => { |
| | | if (item.subButton.intertype === 'system' && !item.subButton.sqlType) { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮请设置操作类型`}) |
| | | } |
| | | if (item.subButton.verify && !item.subButton.output) { |
| | | if (item.subButton.verify.noteEnable === 'true') { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值短信发送无效!`}) |
| | | } else if (item.subButton.verify.emailEnable === 'true') { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值邮件发送无效!`}) |
| | | } |
| | | } |
| | | item.fields.forEach(m => { |
| | | if (m.dataSource && /@ID@/ig.test(m.dataSource)) { |
| | | idCtrl = true |
| | | } |
| | | if (m.type === 'linkMain' && !supModule && card.wrap.datatype === 'static') { |
| | | card.errors.push({ level: 1, detail: `请检查分组“${item.setting.title}”中关联主表“${m.label}”是否有效`}) |
| | | } |
| | | }) |
| | | }) |
| | | delete card.$c_ds |
| | | } |
| | | |
| | | card.idCtrl = idCtrl |
| | | card.errors = checkComponent(card) |
| | | card.$tables = getTables(card) |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_fc |
| | | |
| | | this.setState({ |
| | | card: card |
| | |
| | | card.$tables = getTables(card) |
| | | } |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | |
| | | this.setState({ |
| | | card: card |
| | |
| | | card.$c_ds = card.wrap.datatype === 'dynamic' |
| | | card.errors = checkComponent(card) |
| | | |
| | | delete card.$c_ds |
| | | |
| | | if (card.errors.length === 0) { |
| | | if (card.buyer.setting.interType === 'system' && card.buyer.setting.execute !== 'false' && !card.buyer.setting.dataresource) { |
| | | card.errors.push({ level: 0, detail: '-购买方 未设置数据源!'}) |
| | |
| | | if (card.errors.length === 0) { |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_ac |
| | | delete card.$c_cl |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | if (card.errors.length === 0) { |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_ac |
| | | delete card.$c_cl |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | if (card.errors.length === 0) { |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_ac |
| | | delete card.$c_cl |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | if (card.errors.length === 0) { |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_sc |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_ac |
| | | |
| | | if (!card.wrap.parentField || !card.wrap.valueField || !card.wrap.labelField) { |
| | | card.errors.push({ level: 0, detail: '未设置基本信息!'}) |
| | | } else { |
| | |
| | | import React, { Component } from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { fromJS } from 'immutable' |
| | | import { Modal, Button, Drawer, Tooltip } from 'antd' |
| | | import { Modal, Button, Tooltip, Table } from 'antd' |
| | | import { ClockCircleOutlined, CheckCircleOutlined, CloseCircleOutlined, LoadingOutlined } from '@ant-design/icons' |
| | | |
| | | import Api from '@/api' |
| | |
| | | successIds: [], |
| | | errorIds: [], |
| | | errorMsg: {}, |
| | | execId: '' |
| | | execId: '', |
| | | columns: [ |
| | | { |
| | | title: '组件名', |
| | | dataIndex: 'name', |
| | | width: '25%' |
| | | }, |
| | | { |
| | | title: '名称', |
| | | dataIndex: 'label', |
| | | width: '25%' |
| | | }, |
| | | { |
| | | title: '上级', |
| | | dataIndex: 'supName', |
| | | width: '20%', |
| | | render: (_, record) => { |
| | | if (record.supName) { |
| | | return `${record.supName}-${record.tabName}` |
| | | } |
| | | return '' |
| | | } |
| | | }, |
| | | { |
| | | title: '状态', |
| | | dataIndex: 'status', |
| | | align: 'center', |
| | | width: '15%', |
| | | render: (_, record) => { |
| | | let status = <ClockCircleOutlined /> |
| | | |
| | | if (this.state.successIds.includes(record.uuid)) { |
| | | status = <CheckCircleOutlined /> |
| | | } else if (this.state.errorIds.includes(record.uuid)) { |
| | | if (this.state.errorMsg[record.uuid]) { |
| | | status = <Tooltip placement="topLeft" title={this.state.errorMsg[record.uuid]}> |
| | | <CloseCircleOutlined /> |
| | | </Tooltip> |
| | | } else { |
| | | status = <CloseCircleOutlined /> |
| | | } |
| | | } else if (record.uuid === this.state.execId) { |
| | | status = <LoadingOutlined /> |
| | | } |
| | | return status |
| | | } |
| | | }, |
| | | { |
| | | title: 'DeepSeek', |
| | | dataIndex: 'DeepSeek', |
| | | align: 'center', |
| | | width: '15%', |
| | | render: (_, record) => { |
| | | return <span className="anticon anticon-deepseek" onClick={() => { |
| | | if (record.sql) { |
| | | sessionStorage.setItem('deepseek_sql', record.sql) |
| | | } |
| | | window.open('#/ai') |
| | | }}> |
| | | <svg viewBox="0 0 1391 1024" width="1.5em" height="1.5em" fill="currentColor"> |
| | | <path d="M1361.92 83.136c-14.272-7.04-20.416 6.272-28.736 12.992-2.816 2.24-5.248 5.12-7.68 7.68-20.8 22.336-45.056 36.864-76.8 35.136-46.464-2.56-86.08 12.032-121.152 47.616-7.552-43.904-32.256-70.08-69.888-86.912-19.712-8.768-39.68-17.472-53.376-36.48-9.664-13.44-12.288-28.48-17.216-43.264-3.008-8.96-6.08-18.112-16.32-19.712-11.2-1.728-15.552 7.68-19.968 15.424-17.536 32.128-24.32 67.52-23.68 103.296 1.6 80.448 35.52 144.576 103.04 190.144 7.68 5.312 9.6 10.56 7.168 18.176-4.608 15.68-10.048 30.976-14.912 46.592-3.072 10.112-7.68 12.352-18.304 8a308.224 308.224 0 0 1-97.28-66.176c-48-46.4-91.392-97.664-145.472-137.792a655.36 655.36 0 0 0-38.528-26.432c-55.232-53.76 7.232-97.792 21.632-103.04 15.104-5.376 5.312-24.128-43.52-23.936C652.032 24.704 607.36 41.024 550.4 62.72a156.8 156.8 0 0 1-26.048 7.68 542.016 542.016 0 0 0-161.408-5.696c-105.6 11.904-189.888 61.824-251.904 147.2C36.608 314.24 19.072 430.848 40.512 552.32c22.528 128 87.808 234.048 188.16 316.992 104 85.888 223.808 128 360.512 120 82.944-4.864 175.424-16 279.68-104.32 26.368 13.056 53.888 18.24 99.712 22.272 35.2 3.328 69.184-1.792 95.424-7.232 41.216-8.704 38.4-46.848 23.424-53.888-120.576-56.32-94.208-33.408-118.272-51.84 61.376-72.768 153.792-148.224 189.952-392.768 2.816-19.392 0.384-31.552 0-47.36-0.256-9.536 1.92-13.312 12.8-14.4a231.04 231.04 0 0 0 86.592-26.56c78.272-42.88 109.696-113.024 117.184-197.184 1.088-12.928-0.256-26.24-13.76-32.96z m-681.408 757.76c-116.928-92.096-173.696-122.368-197.12-120.96-21.888 1.152-17.984 26.304-13.184 42.624 5.12 16.128 11.648 27.328 20.8 41.408 6.464 9.408 10.752 23.424-6.272 33.92-37.76 23.424-103.232-7.872-106.24-9.472-76.288-44.8-140.032-104.192-184.96-185.344-43.264-78.08-68.48-161.92-72.576-251.328-1.152-21.632 5.184-29.312 26.688-33.152a265.6 265.6 0 0 1 85.696-2.24c119.296 17.472 220.928 71.04 306.048 155.52 48.768 48.32 85.504 105.92 123.392 162.176 40.256 59.776 83.648 116.672 138.88 163.392 19.392 16.32 35.072 28.8 49.92 37.952-44.928 5.056-119.872 6.08-171.008-34.496z m56.064-361.024a17.152 17.152 0 1 1 2.752 9.6 16.896 16.896 0 0 1-2.752-9.664z m174.08 89.472a102.72 102.72 0 0 1-33.024 8.96 70.528 70.528 0 0 1-44.736-14.272c-15.296-12.8-26.176-19.968-30.848-42.496a99.264 99.264 0 0 1 0.832-32.96c4.032-18.368-0.384-30.08-13.248-40.768-10.624-8.768-23.872-11.072-38.592-11.072a31.168 31.168 0 0 1-14.272-4.416c-6.144-3.072-11.136-10.752-6.336-20.16 1.536-3.008 8.96-10.304 10.752-11.712 19.84-11.328 42.88-7.68 64.192 0.896 19.712 8.064 34.56 22.848 56 43.776 21.952 25.28 25.792 32.384 38.4 51.328 9.856 14.848 18.816 30.208 24.96 47.616 3.776 10.88-1.152 19.776-14.08 25.28z"></path> |
| | | </svg> |
| | | </span> |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | |
| | | sqlList = [] |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { visible, sqlList, status, successIds, errorIds, execId, errorMsg } = this.state |
| | | const { visible, status, columns, sqlList } = this.state |
| | | |
| | | return ( |
| | | <> |
| | | <Button className="mk-border-yellow" icon="bug" onClick={this.trigger}>调试</Button> |
| | | <Drawer |
| | | <Button className="mk-border-yellow" icon="bug" onClick={this.trigger}>DeepSeek调试</Button> |
| | | <Modal |
| | | className="debug-modal" |
| | | width={600} |
| | | title="DeepSeek调试" |
| | | width="60vw" |
| | | visible={visible} |
| | | closable={false} |
| | | placement="left" |
| | | centered={true} |
| | | footer={null} |
| | | destroyOnClose |
| | | > |
| | | <div className="mk-sql-wrap"> |
| | | <div className="body"> |
| | | {sqlList.map(item => { |
| | | let other = '' |
| | | if (item.supName) { |
| | | other = `上级:${item.supName}-${item.tabName}` |
| | | } |
| | | |
| | | let status = <ClockCircleOutlined /> |
| | | |
| | | if (successIds.includes(item.uuid)) { |
| | | status = <CheckCircleOutlined /> |
| | | } else if (errorIds.includes(item.uuid)) { |
| | | if (errorMsg[item.uuid]) { |
| | | status = <Tooltip placement="topLeft" title={errorMsg[item.uuid]}> |
| | | <CloseCircleOutlined /> |
| | | </Tooltip> |
| | | } else { |
| | | status = <CloseCircleOutlined /> |
| | | } |
| | | } else if (item.uuid === execId) { |
| | | status = <LoadingOutlined /> |
| | | } |
| | | |
| | | return <div className="sql-item" key={item.uuid}> |
| | | <div className="sql-1" title={item.name}><div>{item.name}</div></div> |
| | | <div className="sql-2" title={item.label}><div>{item.label}</div></div> |
| | | <div className="sql-3" title={other}><div>{other}</div></div> |
| | | <div className="sql-4">{status}</div> |
| | | </div> |
| | | })} |
| | | </div> |
| | | <div className="mk-sql-wrap mk-scrollbar"> |
| | | <Table |
| | | bordered |
| | | rowKey="uuid" |
| | | dataSource={sqlList} |
| | | columns={columns} |
| | | pagination={false} |
| | | /> |
| | | </div> |
| | | <div className="mk-footer"> |
| | | {status === 'error' ? <Button key="skip" className="mk-border-green" onClick={this.roopSql}> |
| | |
| | | 关闭 |
| | | </Button> |
| | | </div> |
| | | </Drawer> |
| | | </Modal> |
| | | </> |
| | | ) |
| | | } |
| | |
| | | .debug-modal { |
| | | .ant-drawer-body { |
| | | .ant-modal-body { |
| | | position: relative; |
| | | height: 100vh; |
| | | padding: 0 0 50px 0; |
| | | overflow: hidden; |
| | | color: rgba(0, 0, 0, 0.85); |
| | | |
| | | .mk-sql-wrap { |
| | | padding: 10px; |
| | | max-height: calc(100vh - 150px); |
| | | min-height: 50vh; |
| | | padding: 15px 20px; |
| | | |
| | | .sql-item { |
| | | display: flex; |
| | | min-height: 30px; |
| | | |
| | | .sql-1, .sql-2 { |
| | | flex: 1; |
| | | width: 25%; |
| | | max-width: 25%; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | div { |
| | | overflow: hidden; |
| | | word-break: break-word; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | } |
| | | } |
| | | .sql-3 { |
| | | flex: 1; |
| | | width: 30%; |
| | | max-width: 30%; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | div { |
| | | overflow: hidden; |
| | | word-break: break-word; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | } |
| | | } |
| | | .sql-4 { |
| | | flex: 1; |
| | | width: 20%; |
| | | max-width: 20%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | |
| | | .anticon { |
| | | font-size: 16px; |
| | | } |
| | | .anticon-clock-circle { |
| | | color: #c8c8c8; |
| | | } |
| | | .anticon-check-circle { |
| | | color: #26C281; |
| | | } |
| | | .anticon-close-circle { |
| | | color: red; |
| | | } |
| | | .anticon-loading { |
| | | color: orange; |
| | | } |
| | | } |
| | | .ant-table-thead > tr > th, .ant-table-tbody > tr > td { |
| | | padding: 12px; |
| | | } |
| | | .header { |
| | | border-bottom: 1px solid #e8e8e8; |
| | | .anticon { |
| | | font-size: 16px; |
| | | } |
| | | .body { |
| | | max-height: calc(100vh - 60px); |
| | | overflow-y: auto; |
| | | .anticon-clock-circle { |
| | | color: #c8c8c8; |
| | | } |
| | | } |
| | | |
| | | .mk-sql-wrap .body::-webkit-scrollbar { |
| | | width: 7px; |
| | | } |
| | | .mk-sql-wrap .body::-webkit-scrollbar-thumb { |
| | | border-radius: 5px; |
| | | box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13); |
| | | background: rgba(0, 0, 0, 0.13); |
| | | } |
| | | .mk-sql-wrap .body::-webkit-scrollbar-track { |
| | | box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05); |
| | | border-radius: 3px; |
| | | border: 1px solid rgba(0, 0, 0, 0.07); |
| | | background: rgba(0, 0, 0, 0); |
| | | .anticon-check-circle { |
| | | color: #26C281; |
| | | } |
| | | .anticon-close-circle { |
| | | color: red; |
| | | } |
| | | .anticon-loading { |
| | | color: orange; |
| | | } |
| | | .anticon-deepseek { |
| | | cursor: pointer; |
| | | color: #1890ff; |
| | | } |
| | | } |
| | | } |
| | | .mk-footer { |
| | | position: absolute; |
| | | bottom: 0px; |
| | | width: 100%; |
| | | height: 45px; |
| | | height: 50px; |
| | | line-height: 50px; |
| | | border-top: 1px solid #e8e8e8; |
| | | text-align: right; |
| | |
| | | exec = () => { |
| | | let config = fromJS(this.props.config).toJS() |
| | | |
| | | let resetForm = (m) => { |
| | | if (m.field) { |
| | | m.field = m.field.toLowerCase() |
| | | } |
| | | if (m.type === 'split' && m.splitctrl) { |
| | | m.splitctrl = m.splitctrl.toLowerCase() |
| | | } |
| | | if (m.tabField) { |
| | | m.tabField = m.tabField.toLowerCase() |
| | | } |
| | | if (m.linkField) { |
| | | m.linkField = m.linkField.toLowerCase() |
| | | } |
| | | if (m.supField) { |
| | | m.supField = m.supField.toLowerCase() |
| | | } |
| | | if (m.phoneField) { |
| | | m.phoneField = m.phoneField.toLowerCase() |
| | | } |
| | | if (m.linkSubField) { |
| | | m.linkSubField = m.linkSubField.map(n => n.toLowerCase()) |
| | | m.linkSubField = Array.from(new Set(m.linkSubField)) |
| | | } |
| | | } |
| | | let resetMark = (m) => { |
| | | m.marks = m.marks.map(n => { |
| | | if (n.field && Array.isArray(n.field)) { |
| | | if (n.field[1] === 'static') { |
| | | n.field[0] = n.field[0] === '$Index' ? n.field[0] : n.field[0].toLowerCase() |
| | | } else { |
| | | n.field = n.field.map(p => p === '$Index' ? p : p.toLowerCase()) |
| | | } |
| | | } |
| | | |
| | | return n |
| | | }) |
| | | } |
| | | let resetElement = (m) => { |
| | | if (m.datatype === 'dynamic' && m.field) { |
| | | if (m.field) { |
| | | m.field = m.field.toLowerCase() |
| | | } |
| | | if (m.posterField) { |
| | |
| | | m.linkurl = m.linkurl.toLowerCase() |
| | | } |
| | | if (m.modal && m.modal.fields) { |
| | | if (m.modal.setting && m.modal.setting.focus) { |
| | | m.modal.setting.focus = m.modal.setting.focus.toLowerCase() |
| | | } |
| | | m.modal.fields = m.modal.fields.map(col => { |
| | | if (col.field) { |
| | | col.field = col.field.toLowerCase() |
| | | } |
| | | if (col.type === 'split' && col.splitctrl) { |
| | | col.splitctrl = col.splitctrl.toLowerCase() |
| | | } |
| | | resetForm(col) |
| | | return col |
| | | }) |
| | | } |
| | |
| | | return col |
| | | }) |
| | | } |
| | | if (m.verify.billcodes) { |
| | | m.verify.billcodes = m.verify.billcodes.map(col => { |
| | | if (col.field) { |
| | | col.field = col.field.toLowerCase() |
| | | } |
| | | if (col.linkField && col.linkField !== 'BID') { |
| | | col.linkField = col.linkField.toLowerCase() |
| | | } |
| | | return col |
| | | }) |
| | | } |
| | | |
| | | if (m.verify.accountfield && m.verify.accountfield !== 'BID') { |
| | | m.verify.accountfield = m.verify.accountfield.toLowerCase() |
| | | } |
| | |
| | | if (m.controlField) { |
| | | m.controlField = m.controlField.toLowerCase() |
| | | } |
| | | |
| | | if (m.marks && m.marks.length) { |
| | | resetMark(m) |
| | | } |
| | | if (m.config && m.config.components) { |
| | | m.config.components = _replace(m.config.components) |
| | | } |
| | |
| | | let _replace = (components) => { |
| | | return components.map(item => { |
| | | if (item.type === 'tabs') { |
| | | if (item.setting) { |
| | | if (item.setting.controlField) { |
| | | item.setting.controlField = item.setting.controlField.toLowerCase() |
| | | } |
| | | if (item.setting.selectField) { |
| | | item.setting.selectField = item.setting.selectField.toLowerCase() |
| | | } |
| | | } |
| | | item.subtabs.forEach(tab => { |
| | | tab.components = _replace(tab.components) |
| | | }) |
| | |
| | | if (col.field) { |
| | | col.field = col.field.toLowerCase() |
| | | } |
| | | if (col.dateShift) { |
| | | col.dateShift = col.dateShift.toLowerCase() |
| | | } |
| | | return col |
| | | }) |
| | | } |
| | |
| | | |
| | | if (item.subcards) { |
| | | item.subcards.forEach(card => { |
| | | if (card.setting && card.setting.controlField) { |
| | | card.setting.controlField = card.setting.controlField.toLowerCase() |
| | | if (card.setting) { |
| | | if (card.setting.controlField) { |
| | | card.setting.controlField = card.setting.controlField.toLowerCase() |
| | | } |
| | | if (card.setting.bgField) { |
| | | card.setting.bgField = card.setting.bgField.toLowerCase() |
| | | } |
| | | if (card.setting.menuType) { |
| | | card.setting.menuType = card.setting.menuType.toLowerCase() |
| | | } |
| | | } |
| | | if (card.elements) { |
| | | card.elements = card.elements.map(m => { |
| | |
| | | |
| | | if (card.fields) { |
| | | card.fields = card.fields.map(m => { |
| | | if (m.field) { |
| | | m.field = m.field.toLowerCase() |
| | | } |
| | | if (m.type === 'split' && m.splitctrl) { |
| | | m.splitctrl = m.splitctrl.toLowerCase() |
| | | } |
| | | resetForm(m) |
| | | return m |
| | | }) |
| | | } |
| | | if (card.subButton) { |
| | | resetElement(card.subButton) |
| | | |
| | | if (card.subButton.resetForms) { |
| | | card.subButton.resetForms = card.subButton.resetForms.map(n => n.toLowerCase()) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | |
| | | if (item.plot.gender) { |
| | | item.plot.gender = item.plot.gender.toLowerCase() |
| | | } |
| | | if (item.plot.menuType) { |
| | | item.plot.menuType = item.plot.menuType.toLowerCase() |
| | | } |
| | | if (item.Yaxis) { |
| | | if (Array.isArray(item.Yaxis)) { |
| | | item.Yaxis = item.Yaxis.map(m => { |
| | |
| | | let _update = (cols) => { |
| | | return cols.map(col => { |
| | | if (col.type === 'custom' && col.elements) { |
| | | if (col.sortField) { |
| | | col.sortField = col.sortField.toLowerCase() |
| | | } |
| | | col.elements = col.elements.map(m => { |
| | | resetElement(m) |
| | | return m |
| | | }) |
| | | } else if (col.type === 'colspan') { |
| | | col.subcols = _update(col.subcols) |
| | | } else if (col.field) { |
| | | col.field = col.field.toLowerCase() |
| | | } else { |
| | | if (col.field) { |
| | | col.field = col.field.toLowerCase() |
| | | |
| | | if (col.editable === 'true') { |
| | | if (col.linkSubField) { |
| | | col.linkSubField = col.linkSubField.map(n => n.toLowerCase()) |
| | | col.linkSubField = Array.from(new Set(col.linkSubField)) |
| | | } |
| | | if (col.clearField) { |
| | | col.clearField = col.clearField.toLowerCase() |
| | | } |
| | | if (col.ctrlField) { |
| | | col.ctrlField = col.ctrlField.toLowerCase() |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (col.marks && col.marks.length) { |
| | | resetMark(col) |
| | | } |
| | | } |
| | | |
| | | return col |
| | |
| | | } |
| | | |
| | | item.cols = _update(item.cols) |
| | | |
| | | if (item.lineMarks) { |
| | | item.lineMarks = item.lineMarks.map(n => { |
| | | if (n.field && Array.isArray(n.field)) { |
| | | if (n.field[1] === 'static') { |
| | | n.field[0] = n.field[0] === '$Index' ? n.field[0] : n.field[0].toLowerCase() |
| | | } else { |
| | | n.field = n.field.map(p => p === '$Index' ? p : p.toLowerCase()) |
| | | } |
| | | } |
| | | |
| | | return n |
| | | }) |
| | | } |
| | | } |
| | | |
| | | if (item.subMenus) { |
| | | item.subMenus = item.subMenus.map(m => { |
| | | if (m.setting && m.setting.tip) { |
| | | m.setting.tip = m.setting.tip.toLowerCase() |
| | | } |
| | | return m |
| | | }) |
| | | } |
| | | |
| | | if (item.wrap) { |
| | | if (item.wrap.field) { |
| | | item.wrap.field = item.wrap.field.toLowerCase() |
| | | } |
| | | if (item.wrap.tipField) { |
| | | item.wrap.tipField = item.wrap.tipField.toLowerCase() |
| | | } |
| | |
| | | if (item.wrap.link) { |
| | | item.wrap.link = item.wrap.link.toLowerCase() |
| | | } |
| | | if (item.wrap.linkField) { |
| | | item.wrap.linkField = item.wrap.linkField.toLowerCase() |
| | | } |
| | | if (item.wrap.focus) { |
| | | item.wrap.focus = item.wrap.focus.toLowerCase() |
| | | } |
| | | if (item.wrap.refocus) { |
| | | item.wrap.refocus = item.wrap.refocus.toLowerCase() |
| | | } |
| | | if (item.wrap.statusControl) { |
| | | item.wrap.statusControl = item.wrap.statusControl.toLowerCase() |
| | | } |
| | | if (item.wrap.timeField) { |
| | | item.wrap.timeField = item.wrap.timeField.toLowerCase() |
| | | } |
| | | if (item.wrap.endField) { |
| | | item.wrap.endField = item.wrap.endField.toLowerCase() |
| | | } |
| | | if (item.wrap.remarkField) { |
| | | item.wrap.remarkField = item.wrap.remarkField.toLowerCase() |
| | | } |
| | | if (item.wrap.colorField) { |
| | | item.wrap.colorField = item.wrap.colorField.toLowerCase() |
| | | } |
| | | if (item.wrap.menuType) { |
| | | item.wrap.menuType = item.wrap.menuType.toLowerCase() |
| | | } |
| | | |
| | | if (item.type === 'timeline') { |
| | | if (item.wrap.label) { |
| | | item.wrap.label = item.wrap.label.toLowerCase() |
| | | } |
| | | if (item.wrap.node) { |
| | | item.wrap.node = item.wrap.node.toLowerCase() |
| | | } |
| | | } |
| | | } |
| | | |
| | | return item |
| | |
| | | const SystemProc = asyncLoadComponent(() => import('@/views/systemproc')) |
| | | // const SystemCheck = asyncLoadComponent(() => import('@/views/syscheck')) |
| | | const MkIframe = asyncLoadComponent(() => import('@/views/mkiframe')) |
| | | const MkAi = asyncLoadComponent(() => import('@/views/mkai')) |
| | | |
| | | const routers = [ |
| | | {path: '/login', name: 'login', component: Login}, |
| | |
| | | {path: '/view/:menuId', name: 'iframe', component: MkIframe}, |
| | | {path: '/view/:menuId/:bid', name: 'iframe', component: MkIframe}, |
| | | {path: '/interface', name: 'interface', component: Interface}, |
| | | {path: '/ai', name: 'ai', component: MkAi}, |
| | | // {path: '/syscheck', name: 'syscheck', component: SystemCheck} |
| | | ] |
| | | |
| | |
| | | const FlowFloat = asyncComponent(() => import('@/tabviews/zshare/flowFloat')) |
| | | const SettingComponent = asyncComponent(() => import('@/tabviews/zshare/settingcomponent')) |
| | | const TableNodes = asyncComponent(() => import('@/tabviews/zshare/tablenodes')) |
| | | const DeepSeek = asyncComponent(() => import('@/tabviews/zshare/deepseek')) |
| | | const AutoMatic = asyncComponent(() => import('@/tabviews/zshare/automatic')) |
| | | const DebugTable = asyncComponent(() => import('@/tabviews/debugtable')) |
| | | |
| | |
| | | {config.process === 'true' ? <FlowFloat config={config}/> : null} |
| | | <SettingComponent config={config} shortcuts={shortcuts || []}/> |
| | | <TableNodes config={config} /> |
| | | <DeepSeek/> |
| | | </div> |
| | | </div> |
| | | ) |
| | |
| | | const DebugTable = asyncComponent(() => import('@/tabviews/debugtable')) |
| | | const FlowFloat = asyncComponent(() => import('@/tabviews/zshare/flowFloat')) |
| | | const TableNodes = asyncComponent(() => import('@/tabviews/zshare/tablenodes')) |
| | | const DeepSeek = asyncComponent(() => import('@/tabviews/zshare/deepseek')) |
| | | const MkInterfaces = asyncComponent(() => import('@/tabviews/custom/components/interfaces')) |
| | | |
| | | class CustomPage extends Component { |
| | |
| | | {config.process === 'true' ? <FlowFloat config={config}/> : null} |
| | | <SettingComponent config={config} shortcuts={shortcuts || []}/> |
| | | <TableNodes config={config} /> |
| | | <DeepSeek/> |
| | | </div> |
| | | </div> |
| | | ) |
New file |
| | |
| | | import React, { Component } from 'react' |
| | | import { Button, Tooltip } from 'antd' |
| | | |
| | | // import './index.scss' |
| | | |
| | | class DeekSeek extends Component { |
| | | state = { |
| | | ds: !window.GLOB.mkHS && localStorage.getItem(window.GLOB.sysSign + 'ds') === 'true' |
| | | } |
| | | |
| | | trigger = () => { |
| | | const { ds } = this.state |
| | | |
| | | if (!ds) return |
| | | |
| | | window.open('#/ai') |
| | | } |
| | | |
| | | |
| | | render() { |
| | | const { ds } = this.state |
| | | |
| | | if (!ds) return null |
| | | |
| | | return ( |
| | | <div className="tool-wrap"> |
| | | <Tooltip placement="left" title="DeepSeek"> |
| | | <Button shape="circle" onClick={this.trigger}> |
| | | <span className="anticon"> |
| | | <svg viewBox="0 0 1024 1024" width="1.5em" height="1.5em" fill="currentColor"> |
| | | <path d="M207.402667 834.133333c-43.349333-43.306667-49.066667-117.333333-13.354667-210.133333a595.626667 595.626667 0 0 1 51.413333-100.906667l1.450667-2.304-1.408-2.304a596.906667 596.906667 0 0 1-51.456-100.906666c-35.669333-92.8-29.994667-166.826667 13.354667-210.176 23.893333-23.893333 58.197333-36.693333 99.626666-36.693334 60.8 0 135.168 27.136 211.498667 74.922667l2.261333 1.450667 2.261334-1.450667C599.466667 197.845333 673.749333 170.666667 734.549333 170.666667c41.472 0 75.776 12.8 99.626667 36.693333 43.264 43.306667 48.981333 117.418667 13.312 210.176-13.866667 35.2-31.104 68.992-51.456 100.906667l-1.450667 2.304 1.450667 2.261333c21.333333 34.133333 38.826667 68.096 51.413333 100.906667 35.712 92.8 30.037333 166.869333-13.226666 210.176-23.893333 23.893333-58.24 36.736-99.669334 36.736-60.8 0-135.168-27.178667-211.498666-74.965334l-2.304-1.365333-2.261334 1.408c-76.373333 47.786667-150.698667 74.965333-211.498666 74.965333-41.472 0-75.776-12.8-99.626667-36.693333l0.042667-0.042667z m581.589333-187.690666a498.090667 498.090667 0 0 0-30.293333-63.658667l-3.2-5.632-3.925334 5.12a941.866667 941.866667 0 0 1-169.301333 169.301333l-5.12 3.968 5.632 3.157334c55.808 31.317333 109.226667 49.578667 151.722667 49.578666 24.021333 0 42.922667-5.888 55.381333-18.346666 12.8-12.8 18.602667-33.024 18.261333-57.429334-0.341333-24.533333-6.784-53.930667-19.157333-86.058666z m-270.72 70.4l2.474667 1.792 2.474666-1.792a848.256 848.256 0 0 0 194.176-193.578667l1.834667-2.474667-1.834667-2.474666a841.898667 841.898667 0 0 0-194.176-193.621334l-2.474666-1.706666-2.474667 1.792a848.341333 848.341333 0 0 0-194.218667 193.536l-1.792 2.474666 1.792 2.517334a861.354667 861.354667 0 0 0 89.344 104.832 842.24 842.24 0 0 0 104.874667 88.746666v-0.042666z m271.616-465.152c-12.501333-12.501333-31.402667-18.389333-55.381333-18.389334-42.581333 0-95.914667 18.304-151.722667 49.621334l-5.632 3.157333 5.12 3.925333a936.021333 936.021333 0 0 1 169.301333 169.301334l3.925334 5.12 3.157333-5.632c12.032-21.504 22.357333-42.837333 30.336-63.658667 12.373333-32.128 18.858667-61.525333 19.2-86.058667 0.298667-24.405333-5.504-44.586667-18.304-57.386666zM252.458667 395.136c8.618667 21.930667 18.773333 43.221333 30.378666 63.701333l3.157334 5.546667 3.925333-5.077333a936.106667 936.106667 0 0 1 169.301333-169.301334l5.12-3.925333-5.632-3.157333c-55.808-31.36-109.184-49.621333-151.722666-49.621334-24.021333 0-42.922667 5.888-55.381334 18.346667-12.8 12.842667-18.602667 33.024-18.261333 57.429333 0.298667 24.533333 6.826667 53.930667 19.114667 86.058667z m0 251.306667c-12.373333 32.128-18.773333 61.525333-19.114667 86.058666-0.341333 24.405333 5.418667 44.586667 18.261333 57.386667 12.501333 12.501333 31.402667 18.389333 55.381334 18.389333 42.538667 0 95.872-18.261333 151.722666-49.578666l5.589334-3.157334-5.12-3.968a936.106667 936.106667 0 0 1-169.258667-169.301333l-3.968-5.12-3.157333 5.632c-11.562667 20.48-21.674667 41.770667-30.293334 63.658667z"></path><path d="M550.869333 593.493333a78.634667 78.634667 0 0 1-108.8-72.704 78.72 78.72 0 1 1 108.8 72.704z"></path> |
| | | </svg> |
| | | </span> |
| | | </Button> |
| | | </Tooltip> |
| | | </div> |
| | | ) |
| | | } |
| | | } |
| | | |
| | | export default DeekSeek |
| | |
| | | <Select.Option value="Decimal(18,2)"> Decimal(18,2) </Select.Option> |
| | | <Select.Option value="Decimal(18,4)"> Decimal(18,4) </Select.Option> |
| | | <Select.Option value="Decimal(18,6)"> Decimal(18,6) </Select.Option> |
| | | <Select.Option value="Decimal(18,8)"> Decimal(18,8) </Select.Option> |
| | | <Select.Option value="Decimal(18,10)"> Decimal(18,10) </Select.Option> |
| | | <Select.Option value="date"> date </Select.Option> |
| | | <Select.Option value="datetime"> datetime </Select.Option> |
| | | </Select> |
| | |
| | | { value: 'Decimal(18,2)', text: 'Decimal(18,2)' }, |
| | | { value: 'Decimal(18,4)', text: 'Decimal(18,4)' }, |
| | | { value: 'Decimal(18,6)', text: 'Decimal(18,6)' }, |
| | | { value: 'Decimal(18,8)', text: 'Decimal(18,8)' }, |
| | | { value: 'Decimal(18,10)', text: 'Decimal(18,10)' }, |
| | | { value: 'date', text: 'date' }, |
| | | { value: 'datetime', text: 'datetime' } |
| | | ] |
| | |
| | | return |
| | | } |
| | | |
| | | if (card.intertype === 'system' && verify.dataType !== 'custom' && verify.columns.length > 0 && config.$c_ds && config.setting.interType === 'system' && config.columns && config.columns.length > 0) { |
| | | let ds = true |
| | | if (config.wrap && config.wrap.datatype && ['static', 'public'].includes(config.wrap.datatype)) { |
| | | ds = false |
| | | } |
| | | |
| | | if (card.intertype === 'system' && verify.dataType !== 'custom' && verify.columns.length > 0 && ds && config.setting.interType === 'system' && config.columns && config.columns.length > 0) { |
| | | let cols = [] |
| | | let columns = config.columns.map(c => c.field) |
| | | |
| | |
| | | if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { |
| | | if (!cell.modal || cell.modal.fields.length === 0) { |
| | | errors.push({ level: 0, detail: `按钮“${cell.label}”中表单尚未添加`}) |
| | | } else if (cell.OpenType === 'pop') { |
| | | let forms = [] |
| | | cell.modal.fields.forEach(n => { |
| | | if (n.type === 'funcvar' && n.field) { |
| | | forms.push(n.field) |
| | | } |
| | | }) |
| | | if (cell.verify && cell.verify.billcodes && cell.verify.billcodes.length > 0) { |
| | | let bills = cell.verify.billcodes.filter(item => item.status !== 'false').map(item => item.field) |
| | | bills.forEach(n => { |
| | | if (!forms.includes(n)) { |
| | | errors.push({ level: 0, detail: `按钮“${cell.label}”中单号生成的函数变量“${n}”不存在`}) |
| | | } |
| | | }) |
| | | forms = forms.filter(n => !bills.includes(n)) |
| | | } |
| | | if (forms.length) { |
| | | errors.push({ level: 0, detail: `按钮“${cell.label}”中函数变量表单“${forms.join(',')}”尚未使用`}) |
| | | } |
| | | } |
| | | } else if (cell.OpenType === 'excelIn') { |
| | | if (!cell.verify || !cell.verify.sheet || !cell.verify.columns || cell.verify.columns.length === 0) { |
| | |
| | | } |
| | | } |
| | | |
| | | if (card.$c_fc) { |
| | | let idCtrl = false |
| | | let supModule = '' |
| | | |
| | | if (card.wrap.datatype === 'dynamic') { |
| | | supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : '' |
| | | if (supModule === 'empty') { |
| | | supModule = '' |
| | | } |
| | | } else { |
| | | if (card.wrap.datatype === 'static') { |
| | | supModule = card.wrap.supModule ? card.wrap.supModule[card.wrap.supModule.length - 1] : '' |
| | | } else { |
| | | supModule = null |
| | | } |
| | | } |
| | | |
| | | card.subcards.forEach(item => { |
| | | if (item.subButton.intertype === 'system' && !item.subButton.sqlType) { |
| | | errors.push({ level: 0, detail: `${item.subButton.label} 按钮请设置操作类型`}) |
| | | } |
| | | if (item.subButton.verify && !item.subButton.output) { |
| | | if (item.subButton.verify.noteEnable === 'true') { |
| | | errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值短信发送无效!`}) |
| | | } else if (item.subButton.verify.emailEnable === 'true') { |
| | | errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值邮件发送无效!`}) |
| | | } |
| | | } |
| | | |
| | | let forms = [] |
| | | item.fields.forEach(m => { |
| | | if (m.type === 'funcvar' && m.field) { |
| | | forms.push(m.field) |
| | | } |
| | | if (m.dataSource && /@ID@/ig.test(m.dataSource)) { |
| | | idCtrl = true |
| | | } |
| | | if (m.type === 'linkMain' && !supModule && supModule !== null) { |
| | | if (item.setting && item.setting.title) { |
| | | errors.push({ level: 1, detail: `请检查分组“${item.setting.title}”中关联主表“${m.label}”是否有效`}) |
| | | } else { |
| | | errors.push({ level: 1, detail: `请检查关联主表“${m.label}”是否有效`}) |
| | | } |
| | | } |
| | | }) |
| | | |
| | | if (item.subButton.verify && item.subButton.verify.billcodes && item.subButton.verify.billcodes.length > 0) { |
| | | let bills = item.subButton.verify.billcodes.filter(item => item.status !== 'false').map(item => item.field) |
| | | bills.forEach(n => { |
| | | if (!forms.includes(n)) { |
| | | errors.push({ level: 0, detail: `按钮“${item.subButton.label}”中单号生成的函数变量“${n}”不存在`}) |
| | | } |
| | | }) |
| | | forms = forms.filter(n => !bills.includes(n)) |
| | | } |
| | | if (forms.length) { |
| | | if (item.setting && item.setting.title) { |
| | | errors.push({ level: 0, detail: `分组“${item.setting.title}”中函数变量表单“${forms.join(',')}”尚未使用`}) |
| | | } else { |
| | | errors.push({ level: 0, detail: `函数变量表单“${forms.join(',')}”尚未使用`}) |
| | | } |
| | | } |
| | | }) |
| | | |
| | | card.idCtrl = idCtrl |
| | | } |
| | | |
| | | return errors |
| | | } |
| | | |
| | |
| | | localStorage.setItem(_addressUrl, 'true') |
| | | this.queryAddress() |
| | | } |
| | | if (res.deekseek !== 'true') { |
| | | localStorage.removeItem(window.GLOB.sysSign + 'ds') |
| | | } else { |
| | | localStorage.setItem(window.GLOB.sysSign + 'ds', 'true') |
| | | } |
| | | } else if (res.ErrCode === 'N') { |
| | | localStorage.removeItem(_authUrl) |
| | | this.setState({ |
| | |
| | | <ReplaceField config={config} updateConfig={this.resetConfig}/> |
| | | <LowerField config={config} updateConfig={this.resetConfig}/> |
| | | <PictureController/> |
| | | <Button onClick={() => window.open('#/ai')}>DeepSeek</Button> |
| | | </div>} trigger={['hover']}> |
| | | <div className="mk-button-more">更多<DownOutlined/></div> |
| | | </Dropdown> : null} |
| | |
| | | border-bottom: 1px solid #e8e8e8; |
| | | height: 45px; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | overflow-y: hidden; |
| | | overflow-x: auto; |
| | | z-index: 10; |
| | | |
| | | button { |
| | |
| | | height: 24px; |
| | | } |
| | | } |
| | | |
| | | .mk-opeartion-list::-webkit-scrollbar { |
| | | display: none; |
| | | } |
| | | } |
| | | .menu-view.saving { |
| | | .anticon-tool { |
New file |
| | |
| | | import React, { Component } from 'react' |
| | | import { Spin, notification } from 'antd' |
| | | |
| | | import Api from '@/api' |
| | | |
| | | import './index.scss' |
| | | |
| | | class MkAi extends Component { |
| | | state = { |
| | | url: window.atob('aHR0cHM6Ly9jbG91$mkZC5tazloLmNu'.replace('$mk', '')) + '/webapi/dostars', |
| | | loading: true, |
| | | UserID: '', |
| | | LoginUID: '', |
| | | sql: '' |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | | if (sessionStorage.getItem('UserID')) { |
| | | this.login() |
| | | } |
| | | } |
| | | |
| | | componentDidMount() { |
| | | if (!sessionStorage.getItem('UserID')) { |
| | | this.props.history.replace('/login') |
| | | return |
| | | } |
| | | } |
| | | |
| | | login = () => { |
| | | window.GLOB.transfer = false |
| | | Api.getTouristMsg('cloud').then(res => { |
| | | if (res.status) { |
| | | this.setState({ |
| | | UserID: res.UserID, |
| | | LoginUID: res.LoginUID, |
| | | sql: sessionStorage.getItem('deepseek_sql') || '' |
| | | }, () => { |
| | | sessionStorage.removeItem('deepseek_sql') |
| | | this.getList() |
| | | }) |
| | | } else { |
| | | sessionStorage.clear() |
| | | this.props.history.replace('/login') |
| | | window.location.reload() |
| | | } |
| | | }) |
| | | } |
| | | |
| | | getList = () => { |
| | | const { UserID, LoginUID } = this.state |
| | | |
| | | Api.genericInterface({ |
| | | func: 's_get_deepseek_list', |
| | | rduri: window.atob('aHR0cHM6Ly9jbG91$mkZC5tazloLmNu'.replace('$mk', '')) + '/webapi/dostars', |
| | | userid: UserID, |
| | | LoginUID: LoginUID, |
| | | u_id: sessionStorage.getItem('UserID') |
| | | }).then(result => { |
| | | this.setState({loading: false}) |
| | | |
| | | if (!result.status) { |
| | | notification.error({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 10 |
| | | }) |
| | | } else { |
| | | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | render () { |
| | | const { loading } = this.state |
| | | |
| | | return ( |
| | | <div className="mk-deepseek-wrap"> |
| | | {loading ? <Spin size="large" /> : null} |
| | | </div> |
| | | ) |
| | | } |
| | | } |
| | | |
| | | export default MkAi |
New file |
| | |
| | | .mk-deepseek-wrap { |
| | | .ant-spin { |
| | | position: absolute; |
| | | z-index: 2; |
| | | top: 30vh; |
| | | left: calc(50% - 16px); |
| | | } |
| | | } |
| | |
| | | {config ? <Dropdown placement="bottomCenter" overlay={<div className="mk-opeartion-dropdown-wrap"> |
| | | <ReplaceField config={config} updateConfig={this.resetConfig}/> |
| | | <LowerField config={config} updateConfig={this.resetConfig}/> |
| | | <Button onClick={() => window.open('#/ai')}>DeepSeek</Button> |
| | | </div>} trigger={['hover']}> |
| | | <div className="mk-button-more">更多<DownOutlined/></div> |
| | | </Dropdown> : null} |