| | |
| | | MKEmitter.emit('modifyTabs', menu) |
| | | } else { |
| | | setTimeout(() => { |
| | | this.openTab(times) |
| | | this.openTab(menu, times) |
| | | }, 200) |
| | | } |
| | | } |
| | |
| | | this.props.updateStatus(setting) |
| | | } |
| | | |
| | | addProcess = () => { |
| | | let _sql = this.props.form.getFieldValue('dataresource') |
| | | |
| | | _sql = _sql + `\n/* select a.*,case when isnull(w.remark,'')='' then a.remark else w.remark end as remark_w,case when isnull(w.statusname,'')='' then a.statusname else w.statusname end as statusname_w,w.status as status_w from 数据源 a left join (select * from s_my_works_flow where works_flow_code='流程编码' and deleted=0) w on a.id=w.works_flow_id where isnull(w.status,0)=0 */` |
| | | |
| | | this.props.form.setFieldsValue({ |
| | | dataresource: _sql |
| | | }) |
| | | } |
| | | |
| | | render() { |
| | | const { columns, config } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {setting.interType === 'system' ? <Col span={24} className="data-source" style={{paddingLeft: '7px'}}> |
| | | {window.GLOB.process ? <span className="process-btn" onClick={this.addProcess}>工作流</span> : null} |
| | | <Form.Item labelCol={{xs: { span: 24 }, sm: { span: 2 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 22 }} } label={ |
| | | <Tooltip placement="topLeft" title={`使用系统函数时,需填写数据源。注:数据权限替换符 $@ -> /* 或 ''、 @$ -> */ 或 ''。`}> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | |
| | | width: 89.5%; |
| | | } |
| | | } |
| | | |
| | | .process-btn { |
| | | position: absolute; |
| | | top: -22px; |
| | | font-size: 12px; |
| | | right: 15px; |
| | | color: #1890ff; |
| | | cursor: pointer; |
| | | } |
| | | } |
| | |
| | | </Form.Item> |
| | | </Col> : null} |
| | | <Col span={24}></Col> |
| | | {window.GLOB.process ? <Col span={8}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="bottomLeft" title="在菜单开启工作流时有效。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | 工作流 |
| | | </Tooltip> |
| | | }> |
| | | <Radio.Group value={verify.workFlow} onChange={(e) => {this.onOptionChange(e.target.value, 'workFlow')}}> |
| | | <Radio value="true">开启</Radio> |
| | | <Radio value="false">不开启</Radio> |
| | | </Radio.Group> |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {window.GLOB.process && verify.workFlow === 'true' ? <Col span={8}> |
| | | <Form.Item label="类型"> |
| | | <Radio.Group value={verify.flowType} onChange={(e) => {this.onOptionChange(e.target.value, 'flowType')}}> |
| | | <Radio value="start">发起</Radio> |
| | | <Radio value="approval">审批</Radio> |
| | | <Radio value="reject">驳回</Radio> |
| | | </Radio.Group> |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {window.GLOB.process && verify.workFlow === 'true' ? <Col span={8}> |
| | | <Form.Item label="默认sql(工作流)"> |
| | | <Radio.Group value={verify.flowSql} onChange={(e) => {this.onOptionChange(e.target.value, 'flowSql')}}> |
| | | <Radio value="true">执行</Radio> |
| | | <Radio value="false">不执行</Radio> |
| | | </Radio.Group> |
| | | </Form.Item> |
| | | </Col> : null} |
| | | <Col span={24}></Col> |
| | | <Col span={8}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="bottomLeft" title={'请在服务器完成公众号配置。'}> |
| | |
| | | } |
| | | |
| | | selectScript = (value, option) => { |
| | | // const { flowType } = this.props |
| | | |
| | | if (!value || !option) return |
| | | |
| | | let _sql = this.props.form.getFieldValue('sql') |
| | |
| | | _sql = _sql + ` |
| | | |
| | | ` |
| | | } |
| | | |
| | | if (value === 'flowSql') { |
| | | value = `insert into s_my_works_flow ( works_flow_id,works_flow_code,works_flow_param,work_group,works_flow_detail_id,work_grade,bid,createuserid,CreateUser,CreateStaff) |
| | | select @ID@,'流程编码','下一步要用到的参数串','职员分组','流程节点id','职员等级',@bid@,@UserID@,@UserName,@FullName` |
| | | } |
| | | |
| | | _sql = _sql.replace(/\s{6}$/, '') |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { usefulfields, systemScripts, btn, type } = this.props |
| | | const { usefulfields, systemScripts, btn, type, workFlow } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | | const { editItem, skip } = this.state |
| | | const formItemLayout = { |
| | |
| | | getPopupContainer={() => document.getElementById('verify-custom-scripts' + _type)} |
| | | > |
| | | <Select.Option key="default" value={this.props.defaultsql}>默认sql</Select.Option> |
| | | {window.GLOB.process && workFlow === 'true' ? <Select.Option key="flow" value="flowSql">默认sql(工作流)</Select.Option> : null} |
| | | <Select.Option key="debugger" value={`z_debug: select @ErrorCode='E',@retmsg='测试断点' goto aaa`}> |
| | | 测试断点 |
| | | </Select.Option> |
| | |
| | | _verify.scripts = _verify.scripts || [] |
| | | _verify.cbScripts = _verify.cbScripts || [] |
| | | |
| | | if (window.GLOB.process) { |
| | | _verify.workFlow = _verify.workFlow || 'false' |
| | | _verify.flowType = _verify.flowType || 'approval' |
| | | _verify.flowSql = _verify.flowSql || 'true' |
| | | } else { |
| | | delete _verify.workFlow |
| | | delete _verify.flowType |
| | | delete _verify.flowSql |
| | | } |
| | | |
| | | if (appType === 'mob') { |
| | | _verify.printEnable = 'false' |
| | | _verify.printTempId = '' |
| | |
| | | <CustomScript |
| | | btn={this.props.card} |
| | | initsql={this.state.initsql} |
| | | workFlow={verify.workFlow} |
| | | flowType={verify.flowType} |
| | | customScripts={verify.scripts} |
| | | defaultsql={this.state.defaultsql} |
| | | usefulfields={this.state.usefulfields} |
| | |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | const { config } = this.props |
| | | |
| | | if (sessionStorage.getItem('thdMenuList') && sessionStorage.getItem('fstMenuList')) { |
| | | this.setMenus() |
| | | } else { |
| | | this.getMenus() |
| | | } |
| | | |
| | | window.GLOB.process = config.process === 'true' |
| | | } |
| | | |
| | | setMenus = () => { |
| | |
| | | if (typeof(value) !== 'number') { |
| | | value = '' |
| | | } |
| | | } else if (key === 'process') { |
| | | window.GLOB.process = value === 'true' |
| | | } |
| | | this.props.updateConfig({...config, [key]: value}) |
| | | } |
| | |
| | | </Col> : null} |
| | | <Col span={24}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="开启后可在按钮及数据源设置流程参数。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | 工作流 |
| | | </Tooltip> |
| | | }> |
| | | {getFieldDecorator('process', { |
| | | initialValue: config.process || 'false' |
| | | })( |
| | | <Radio.Group onChange={(e) => {this.selectChange('process', e.target.value)}}> |
| | | <Radio value="true">使用</Radio> |
| | | <Radio value="false">不使用</Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="数据加载时的遮罩是否显示。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | 加载遮罩 |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { Form, Row, Col, Input, Select, notification, Switch } from 'antd' |
| | | import { Form, Row, Col, Input, Select, notification, Switch, Radio } from 'antd' |
| | | |
| | | import Api from '@/api' |
| | | import './index.scss' |
| | |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | const { config } = this.props |
| | | |
| | | if (sessionStorage.getItem('thdMenuList') && sessionStorage.getItem('fstMenuList')) { |
| | | this.setMenus() |
| | | } else { |
| | | this.getMenus() |
| | | } |
| | | |
| | | window.GLOB.process = config.process === 'true' |
| | | } |
| | | |
| | | setMenus = () => { |
| | |
| | | this.props.form.setFieldsValue({parentId: _id}) |
| | | this.props.updateConfig({...config, fstMenuId: value, parentId: _id}) |
| | | }) |
| | | } else if (key === 'parentId') { |
| | | this.props.updateConfig({...config, parentId: value}) |
| | | } else if (key === 'OpenType') { |
| | | this.props.updateConfig({...config, OpenType: value}) |
| | | } else if (key === 'hidden') { |
| | | this.props.updateConfig({...config, hidden: value}) |
| | | } else { |
| | | if (key === 'process') { |
| | | window.GLOB.process = value === 'true' |
| | | } |
| | | |
| | | this.props.updateConfig({...config, [key]: value}) |
| | | } |
| | | } |
| | | |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item label="工作流"> |
| | | {getFieldDecorator('process', { |
| | | initialValue: config.process || 'false' |
| | | })( |
| | | <Radio.Group onChange={(e) => {this.selectChange('process', e.target.value)}}> |
| | | <Radio value="true">使用</Radio> |
| | | <Radio value="false">不使用</Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item label={'隐藏菜单'}> |
| | | <Switch checkedChildren={'是'} checked={config.hidden === 'true'} unCheckedChildren={'否'} onChange={(value) => { |
| | | this.selectChange('hidden', value + '') |