| | |
| | | |
| | | import Utils from '@/utils/utils.js' |
| | | import CodeMirror from '@/templates/zshare/codemirror' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import './index.scss' |
| | | |
| | | class CustomForm extends Component { |
| | |
| | | editItem: null, |
| | | loading: false |
| | | }) |
| | | |
| | | MKEmitter.emit('editLineId', values.uuid) |
| | | |
| | | this.props.form.setFieldsValue({ |
| | | sql: ' ' |
| | | }) |
| | |
| | | |
| | | fields.push('jskey') |
| | | |
| | | let _sql = `Declare @${btn.sheet} table (${columns.map(item => item.Column + ' ' + item.type).join(',')},jskey nvarchar(50) ) |
| | | let _dec = columns.map(item => item.Column + ' ' + item.type).join(',') |
| | | |
| | | if (_dec) { |
| | | _dec += ',' |
| | | } |
| | | |
| | | let _sql = `Declare @${btn.sheet} table (${_dec}jskey nvarchar(50) ) |
| | | Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50),@ErrorCode nvarchar(50), @retmsg nvarchar(4000),@tbid Nvarchar(512) |
| | | Select @ErrorCode='', @retmsg='' |
| | | ` |
| | |
| | | import ColumnForm from './columnform' |
| | | import CustomScript from './customscript' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import './index.scss' |
| | | |
| | | const { TabPane } = Tabs |
| | |
| | | verify.scripts.push(values) |
| | | } |
| | | |
| | | MKEmitter.emit('editLineId', values.uuid) |
| | | |
| | | this.setState({ |
| | | verify: verify |
| | | }) |
| | |
| | | import Api from '@/api' |
| | | import CodeMirror from '@/templates/zshare/codemirror' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import './index.scss' |
| | | |
| | | const { Paragraph } = Typography |
| | |
| | | editItem: null |
| | | }) |
| | | |
| | | MKEmitter.emit('editLineId', values.uuid) |
| | | |
| | | this.props.scriptsUpdate(_scripts) |
| | | this.props.form.setFieldsValue({ |
| | | sql: '' |
| | |
| | | import CusSwitch from './cusSwitch' |
| | | import zhCN from '@/locales/zh-CN/model.js' |
| | | import enUS from '@/locales/en-US/model.js' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import './index.scss' |
| | | |
| | | const MkEditIcon = asyncComponent(() => import('@/components/mkIcon')) |
| | |
| | | data: [], |
| | | editingKey: '', |
| | | visible: false, |
| | | editLineId: '', |
| | | columns: [] |
| | | } |
| | | |
| | |
| | | this.setState({columns}) |
| | | } |
| | | } |
| | | } |
| | | |
| | | componentDidMount () { |
| | | MKEmitter.addListener('editLineId', this.getEditLineId) |
| | | } |
| | | |
| | | componentWillUnmount () { |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | MKEmitter.removeListener('editLineId', this.getEditLineId) |
| | | } |
| | | |
| | | getEditLineId = (id) => { |
| | | this.setState({ editLineId: id }) |
| | | } |
| | | |
| | | isEditing = record => record.uuid === this.state.editingKey |
| | |
| | | |
| | | render() { |
| | | const { actions, indexShow } = this.props |
| | | const { editLineId } = this.state |
| | | |
| | | let components = { |
| | | body: { |
| | |
| | | components={components} |
| | | dataSource={data} |
| | | columns={columns} |
| | | rowClassName="editable-row" |
| | | rowClassName={record => !editLineId || editLineId !== record.uuid ? 'editable-row' : 'editable-row active'} |
| | | pagination={false} |
| | | onRow={(record, index) => ({ |
| | | index, |
| | |
| | | padding: 0px; |
| | | } |
| | | } |
| | | .editable-row.active { |
| | | td { |
| | | background-color: #bae7ff!important; |
| | | } |
| | | } |
| | | .mk-index { |
| | | text-align: center; |
| | | white-space: nowrap; |
| | |
| | | import VoucherForm from './voucherform' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import { updateForm } from '@/utils/utils-update.js' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import './index.scss' |
| | | |
| | | const { TabPane } = Tabs |
| | |
| | | verify.scripts.push(values) |
| | | } |
| | | |
| | | MKEmitter.emit('editLineId', values.uuid) |
| | | |
| | | this.setState({ verify }) |
| | | } |
| | | |