| | |
| | | return Promise.reject(response.data) |
| | | } else { |
| | | if (response.data.ErrCode === 'E') { |
| | | if (/死锁/.test(response.data.message)) { |
| | | response.data.message = window.GLOB.dict['server_busy'] || '服务器繁忙,请稍后重试!' |
| | | if (/死锁|尚未从池中获取连接/.test(response.data.message)) { |
| | | response.data.message = (window.GLOB.dict['server_busy'] || '服务器繁忙,请稍后重试!') + (/死锁/.test(response.data.message) ? '01' : '02') |
| | | response.data.ErrMesg = response.data.message |
| | | } else if (/无法打开登录所请求的数据库|在与\s*SQL\s+Server\s*建立连接时出现/.test(response.data.message)) { |
| | | response.data.message = '服务器链接不可用,请关闭浏览器重新打开!' |
| | |
| | | } |
| | | |
| | | /** |
| | | * @description 老系统登录 |
| | | */ |
| | | loginAndRedirect (param) { |
| | | return axios({ |
| | | url: document.location.origin + '/zh-CN/Home/LoginAndRedirect', |
| | | method: 'post', |
| | | data: qs.stringify(param) |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * @description 微信业务请求 原接口 'wxpay/getaccesstoken' |
| | | */ |
| | | // wxAccessToken (appId, domain = '') { |
| | |
| | | GLOB.appkey = config.mainkey |
| | | } |
| | | |
| | | let lang = localStorage.getItem(window.location.href.split('#')[0] + 'lang') || GLOB.defLang || 'zh-CN' |
| | | let lang = sessionStorage.getItem('lang') || localStorage.getItem(window.location.href.split('#')[0] + 'lang') || GLOB.defLang || 'zh-CN' |
| | | sessionStorage.setItem('lang', lang) |
| | | |
| | | GLOB.sysSign = GLOB.service + 'admin/' + lang + '/' |
| | |
| | | 'mk-rect', |
| | | { |
| | | inherit: 'rect', |
| | | width: 66, |
| | | height: 36, |
| | | width: 100, |
| | | height: 32, |
| | | attrs: { |
| | | body: { |
| | | strokeWidth: 1, |
| | |
| | | 'mk-polygon', |
| | | { |
| | | inherit: 'polygon', |
| | | width: 66, |
| | | height: 36, |
| | | width: 100, |
| | | height: 32, |
| | | attrs: { |
| | | body: { |
| | | strokeWidth: 1, |
| | |
| | | 'mk-circle', |
| | | { |
| | | inherit: 'circle', |
| | | width: 36, |
| | | height: 36, |
| | | width: 40, |
| | | height: 40, |
| | | attrs: { |
| | | body: { |
| | | strokeWidth: 1, |
| | |
| | | 'mk-ellipse', |
| | | { |
| | | inherit: 'ellipse', |
| | | width: 66, |
| | | height: 36, |
| | | width: 100, |
| | | height: 32, |
| | | attrs: { |
| | | body: { |
| | | strokeWidth: 1, |
| | |
| | | 'mk-star', |
| | | { |
| | | inherit: 'polygon', |
| | | width: 36, |
| | | height: 36, |
| | | width: 40, |
| | | height: 40, |
| | | points: '100,10 40,198 190,78 10,78 160,198', |
| | | attrs: { |
| | | body: { |
| | |
| | | 'mk-text', |
| | | { |
| | | inherit: 'rect', |
| | | width: 66, |
| | | height: 36, |
| | | width: 100, |
| | | height: 50, |
| | | attrs: { |
| | | body: { |
| | | strokeWidth: 0, |
| | |
| | | 'mk-rect', |
| | | { |
| | | inherit: 'rect', |
| | | width: 66, |
| | | height: 40, |
| | | width: 100, |
| | | height: 32, |
| | | attrs: { |
| | | body: { |
| | | strokeWidth: 1, |
| | |
| | | 'mk-polygon', |
| | | { |
| | | inherit: 'polygon', |
| | | width: 66, |
| | | height: 40, |
| | | width: 100, |
| | | height: 32, |
| | | attrs: { |
| | | body: { |
| | | strokeWidth: 1, |
| | |
| | | 'mk-paral', |
| | | { |
| | | inherit: 'polygon', |
| | | width: 66, |
| | | height: 40, |
| | | width: 100, |
| | | height: 32, |
| | | attrs: { |
| | | body: { |
| | | strokeWidth: 1, |
| | |
| | | 'mk-ellipse', |
| | | { |
| | | inherit: 'ellipse', |
| | | width: 66, |
| | | height: 40, |
| | | width: 100, |
| | | height: 32, |
| | | attrs: { |
| | | body: { |
| | | strokeWidth: 1, |
| | |
| | | 'mk-text', |
| | | { |
| | | inherit: 'text-block', |
| | | width: 66, |
| | | height: 40, |
| | | width: 100, |
| | | height: 50, |
| | | text: '文本域', |
| | | attrs: { |
| | | body: { |
| | |
| | | const stencil = new Stencil({ |
| | | title: '流程图', |
| | | target: graph, |
| | | stencilGraphWidth: 180, |
| | | stencilGraphWidth: 230, |
| | | stencilGraphHeight: 180, |
| | | groups: [ |
| | | { |
| | | title: '通用节点', |
| | | name: 'group1', |
| | | graphHeight: 240 |
| | | graphHeight: 150 |
| | | }, |
| | | { |
| | | title: '自定义', |
| | | name: 'group2', |
| | | graphHeight: 150, |
| | | graphHeight: 300, |
| | | layoutOptions: { |
| | | rowHeight: 70 |
| | | } |
| | |
| | | ], |
| | | layoutOptions: { |
| | | columns: 2, |
| | | columnWidth: 80, |
| | | columnWidth: 110, |
| | | rowHeight: 55 |
| | | } |
| | | }) |
| | |
| | | mkdata: {status: 0, statusName: '未提交'}, |
| | | attrs: { |
| | | body: { |
| | | rx: 20, |
| | | ry: 26, |
| | | fill: '#52c41a', |
| | | stroke: '#52c41a' |
| | | rx: 0, |
| | | ry: 0, |
| | | fill: '#000000', |
| | | stroke: '#000000' |
| | | }, |
| | | text: { |
| | | fill: '#ffffff', |
| | |
| | | } |
| | | } |
| | | }) |
| | | const r2 = graph.createNode({ |
| | | shape: 'mk-rect', |
| | | attrs: { |
| | | body: { |
| | | rx: 20, |
| | | ry: 26, |
| | | fill: '#e6f4ff', |
| | | stroke: '#1890ff' |
| | | }, |
| | | text: { |
| | | text: '过程' |
| | | } |
| | | } |
| | | }) |
| | | const r3 = graph.createNode({ |
| | | shape: 'mk-rect', |
| | | attrs: { |
| | | body: { |
| | | rx: 6, |
| | | ry: 6, |
| | | fill: '#fff7e6', |
| | | stroke: '#fa8c16' |
| | | }, |
| | | text: { |
| | | text: '可选过程' |
| | | } |
| | | } |
| | | }) |
| | | |
| | | const r4 = graph.createNode({ |
| | | shape: 'mk-rect', |
| | | attrs: { |
| | | body: { |
| | | rx: 0, |
| | | ry: 0, |
| | | fill: '#fff7e6', |
| | | stroke: '#fa8c16' |
| | | fill: '#ffffff', |
| | | stroke: '#757575' |
| | | }, |
| | | text: { |
| | | fill: '#000000', |
| | | text: '节点' |
| | | } |
| | | } |
| | | }) |
| | | |
| | | const r5 = graph.createNode({ |
| | | shape: 'mk-polygon', |
| | | attrs: { |
| | | body: { |
| | | refPoints: '0,10 10,0 20,10 10,20', |
| | | fill: '#f9f0ff', |
| | | stroke: '#722ed1' |
| | | fill: '#ffffff', |
| | | stroke: '#757575' |
| | | }, |
| | | text: { |
| | | fill: '#000000', |
| | | text: '决策' |
| | | } |
| | | } |
| | | }) |
| | | const r6 = graph.createNode({ |
| | | shape: 'mk-paral', |
| | | attrs: { |
| | | body: { |
| | | refPoints: '10,0 40,0 30,20 0,20', |
| | | fill: '#e6fffb', |
| | | stroke: '#13c2c2' |
| | | }, |
| | | text: { |
| | | text: '数据' |
| | | } |
| | | } |
| | | }) |
| | | const r7 = graph.createNode({ |
| | | shape: 'mk-circle', |
| | | attrs: { |
| | | body: { |
| | | fill: '#e6f4ff', |
| | | stroke: '#1890ff' |
| | | }, |
| | | text: { |
| | | text: '连接' |
| | | } |
| | | } |
| | | }) |
| | |
| | | mkdata: {status: 888, statusName: '已完成'}, |
| | | attrs: { |
| | | body: { |
| | | rx: 20, |
| | | ry: 26, |
| | | fill: '#fa8c16', |
| | | stroke: '#fa8c16' |
| | | rx: 0, |
| | | ry: 0, |
| | | fill: '#000000', |
| | | stroke: '#000000' |
| | | }, |
| | | text: { |
| | | fill: '#ffffff', |
| | |
| | | } |
| | | }) |
| | | |
| | | stencil.load([r1, r2, r3, r4, r5, r6, r7, r8], 'group1') |
| | | stencil.load([r1, r4, r5, r8], 'group1') |
| | | |
| | | const r2 = graph.createNode({ |
| | | shape: 'mk-rect', |
| | | attrs: { |
| | | body: { |
| | | rx: 20, |
| | | ry: 26, |
| | | fill: '#ffffff', |
| | | stroke: '#757575' |
| | | }, |
| | | text: { |
| | | fill: '#000000', |
| | | text: '过程' |
| | | } |
| | | } |
| | | }) |
| | | const r3 = graph.createNode({ |
| | | shape: 'mk-rect', |
| | | attrs: { |
| | | body: { |
| | | rx: 6, |
| | | ry: 6, |
| | | fill: '#ffffff', |
| | | stroke: '#757575' |
| | | }, |
| | | text: { |
| | | fill: '#000000', |
| | | text: '可选过程' |
| | | } |
| | | } |
| | | }) |
| | | const r6 = graph.createNode({ |
| | | shape: 'mk-paral', |
| | | attrs: { |
| | | body: { |
| | | refPoints: '10,0 40,0 30,20 0,20', |
| | | fill: '#ffffff', |
| | | stroke: '#757575' |
| | | }, |
| | | text: { |
| | | fill: '#000000', |
| | | text: '数据' |
| | | } |
| | | } |
| | | }) |
| | | const r7 = graph.createNode({ |
| | | shape: 'mk-circle', |
| | | attrs: { |
| | | body: { |
| | | fill: '#ffffff', |
| | | stroke: '#757575' |
| | | }, |
| | | text: { |
| | | fill: '#000000', |
| | | text: '连接' |
| | | } |
| | | } |
| | | }) |
| | | |
| | | const p1 = graph.createNode({ |
| | | shape: 'mk-ellipse', |
| | |
| | | shape: 'mk-text' |
| | | }) |
| | | |
| | | stencil.load([p1, p2, p3], 'group2') |
| | | stencil.load([r2, r3, r6, r7, p1, p2, p3], 'group2') |
| | | |
| | | if (this.cells.length > 0) { |
| | | let cells = [] |
| | |
| | | const stencil = new Stencil({ |
| | | title: '流程图', |
| | | target: graph, |
| | | stencilGraphWidth: 180, |
| | | stencilGraphWidth: 230, |
| | | stencilGraphHeight: 180, |
| | | groups: [ |
| | | { |
| | |
| | | ], |
| | | layoutOptions: { |
| | | columns: 2, |
| | | columnWidth: 80, |
| | | columnWidth: 110, |
| | | rowHeight: 55 |
| | | } |
| | | }) |
| | |
| | | display: flex; |
| | | |
| | | .mk-stencil { |
| | | width: 180px; |
| | | min-width: 180px; |
| | | width: 240px; |
| | | min-width: 240px; |
| | | height: 100%; |
| | | position: relative; |
| | | z-index: 2; |
| | |
| | | let sup_data = [] |
| | | let voucherMap = new Map() |
| | | let supMap = new Map() |
| | | let extract = localStorage.getItem(window.GLOB.host + '_voucher_extract') |
| | | let extract = localStorage.getItem(window.GLOB.sysSign + '_voucher_extract') |
| | | extract = extract ? JSON.parse(extract) : [] |
| | | |
| | | data.forEach(item => { |
| | |
| | | if (extract.length > 20) { |
| | | extract.length = 20 |
| | | } |
| | | localStorage.setItem(window.GLOB.host + '_voucher_extract', JSON.stringify(extract)) |
| | | localStorage.setItem(window.GLOB.sysSign + '_voucher_extract', JSON.stringify(extract)) |
| | | } |
| | | |
| | | voucherMap.forEach(item => { |
| | |
| | | extra = <PlusOutlined onClick={this.plusLine}/> |
| | | |
| | | if (editing) { |
| | | let options = localStorage.getItem(window.GLOB.host + '_voucher_extract') |
| | | let options = localStorage.getItem(window.GLOB.sysSign + '_voucher_extract') |
| | | options = options ? JSON.parse(options) : [] |
| | | |
| | | children = <AutoComplete |
| | |
| | | |
| | | let param = { |
| | | func: 's_rolemenu_get_Menulist', |
| | | RoleID: selectRoleId |
| | | RoleID: selectRoleId, |
| | | version: 1 |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | RoleID: selectRoleId, |
| | | TypeCharOne: selectApp.kei_no, |
| | | typename: selectSubApp.typename, |
| | | lang: selectSubApp.lang |
| | | lang: selectSubApp.lang, |
| | | version: 1 |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | editable: true, |
| | | options: [], |
| | | width: '25%', |
| | | render: (text, record) => { |
| | | render: (text) => { |
| | | if (!text) return '' |
| | | return text[0] + '+' + shortkeycode[text[1]] |
| | | } |
| | |
| | | title: window.GLOB.dict['operation'] || '操作', |
| | | dataIndex: 'operation', |
| | | width: '140px', |
| | | render: (text, record) => { |
| | | render: (_, record) => { |
| | | const { editingKey } = this.state |
| | | const editable = this.isEditing(record) |
| | | return editable ? ( |
| | |
| | | <EditableContext.Consumer> |
| | | {form => ( |
| | | <span onClick={() => this.save(form, record.uuid)} style={{ marginRight: 8 , color: '#1890ff', cursor: 'pointer'}}> |
| | | 保存 |
| | | {window.GLOB.dict['save'] || '保存'} |
| | | </span> |
| | | )} |
| | | </EditableContext.Consumer> |
| | | <span style={{ color: '#1890ff', cursor: 'pointer'}} onClick={() => this.cancel(record.uuid)}>取消</span> |
| | | <span style={{ color: '#1890ff', cursor: 'pointer'}} onClick={() => this.cancel(record.uuid)}>{window.GLOB.dict['cancel'] || '取消'}</span> |
| | | </div> |
| | | ) : ( |
| | | <div className={'edit-operation-btn' + (editingKey !== '' ? ' disabled' : '')} style={{minWidth: '110px'}}> |
| | |
| | | }], |
| | | printTypeColumns: [ |
| | | { |
| | | title: '打印类型', |
| | | title: window.GLOB.dict['print_type'] || '打印类型', |
| | | dataIndex: 'Text', |
| | | width: '26.1%' |
| | | }, |
| | |
| | | title: window.GLOB.dict['operation'] || '操作', |
| | | dataIndex: 'operation', |
| | | width: '153px', |
| | | render: (text, record) => { |
| | | render: (_, record) => { |
| | | const { editingKey } = this.state |
| | | const editable = this.isEditing(record) |
| | | return editable ? ( |
| | |
| | | <EditableContext.Consumer> |
| | | {form => ( |
| | | <span onClick={() => this.save(form, record.uuid, record.parentId)} style={{ marginRight: 8 , color: '#1890ff', cursor: 'pointer'}}> |
| | | 保存 |
| | | {window.GLOB.dict['save'] || '保存'} |
| | | </span> |
| | | )} |
| | | </EditableContext.Consumer> |
| | | <span style={{ color: '#1890ff', cursor: 'pointer'}} onClick={() => this.cancel(record.uuid)}>取消</span> |
| | | <span style={{ color: '#1890ff', cursor: 'pointer'}} onClick={() => this.cancel(record.uuid)}>{window.GLOB.dict['cancel'] || '取消'}</span> |
| | | </div> |
| | | ) : ( |
| | | <div className={'edit-operation-btn' + (editingKey !== '' ? ' disabled' : '')} style={{minWidth: '110px'}}> |
| | |
| | | |
| | | return ( |
| | | <> |
| | | <Form {...formItemLayout} className={`mk-search-wrap mk-float-${setting.float} mk-order-${setting.order}`} style={setting.style}> |
| | | <Form {...formItemLayout} className={`mk-search-wrap mk-float-${setting.float} mk-order-${setting.order || 'none'}`} style={setting.style}> |
| | | <Row gutter={24}>{this.getFields()}</Row> |
| | | {advanceValues.length && (setting.advanceType !== 'pulldown' || (setting.advanceType === 'pulldown' && !visible)) ? <Row gutter={24}> |
| | | <div className="advanced-list"> |
| | |
| | | } |
| | | } |
| | | |
| | | let iframe = sessionStorage.getItem('iframe') |
| | | if (iframe) { |
| | | sessionStorage.removeItem('iframe') |
| | | this.props.history.replace(iframe.replace(/@loginuid@/, res.LoginUID)) |
| | | if (['20210626201522493D7AD7591D7A547278685', '20210626201956190740F1DF384914A3CA9EF'].includes(window.GLOB.appkey) && process.env.NODE_ENV === 'production' && param.username !== 'IF_DMS_APP') { |
| | | let _param = { |
| | | UserName: param.username, |
| | | Password: param.password, |
| | | BasePath: '/' |
| | | } |
| | | Api.loginAndRedirect(_param).then(result => { |
| | | if (result.IsError) { |
| | | this.setState({ |
| | | isDisabled: false |
| | | }) |
| | | message.warning('登录失败,用户名或密码错误!') |
| | | } else { |
| | | let lang = sessionStorage.getItem('lang') !== 'en-US' ? '/zh-CN' : '/en-US' |
| | | window.location.replace(document.location.origin + lang + '/Home/Index') |
| | | } |
| | | }) |
| | | } else { |
| | | this.props.history.replace('/main') |
| | | let iframe = sessionStorage.getItem('iframe') |
| | | if (iframe) { |
| | | sessionStorage.removeItem('iframe') |
| | | this.props.history.replace(iframe.replace(/@loginuid@/, res.LoginUID)) |
| | | } else { |
| | | this.props.history.replace('/main') |
| | | } |
| | | } |
| | | } else if (res.ErrCode === 'Need_Get_Appkey' && window.GLOB.sysType === 'SSO') { |
| | | message.warning('应用尚未创建,请向云端同步应用!') |
| | |
| | | } |
| | | |
| | | // positecgroup |
| | | // if (res.users_upt === 'true' && window.GLOB.systemType === 'production') { |
| | | // Api.genericInterface({ |
| | | // func: 's_Get_local_u_deleted', |
| | | // users_upt_date: res.users_upt_date, |
| | | // userid: result.UserID, |
| | | // LoginUID: result.LoginUID |
| | | // }).then(localres => { |
| | | // if (!localres.status) return |
| | | // Api.getSystemConfig({ |
| | | // func: 's_get_sso_u_create', |
| | | // user_ids: localres.user_ids, |
| | | // user_ids_local: localres.user_ids_local, |
| | | // users_upt_date: localres.users_upt_date, |
| | | // userid: result.UserID, |
| | | // LoginUID: result.LoginUID |
| | | // }).then(ssores => { |
| | | // if (!ssores.status) return |
| | | // Api.genericInterface({ |
| | | // func: 's_get_local_u_create', |
| | | // user_ids_local: ssores.user_ids_local, |
| | | // userid: result.UserID, |
| | | // LoginUID: result.LoginUID |
| | | // }) |
| | | // }) |
| | | // }) |
| | | // } |
| | | if (['20210626201522493D7AD7591D7A547278685', '20210626201956190740F1DF384914A3CA9EF'].includes(window.GLOB.appkey) && res.users_upt === 'true' && window.GLOB.systemType === 'production') { |
| | | Api.genericInterface({ |
| | | func: 's_Get_local_u_deleted', |
| | | users_upt_date: res.users_upt_date, |
| | | userid: result.UserID, |
| | | LoginUID: result.LoginUID |
| | | }).then(localres => { |
| | | if (!localres.status) return |
| | | Api.getSystemConfig({ |
| | | func: 's_get_sso_u_create', |
| | | user_ids: localres.user_ids, |
| | | user_ids_local: localres.user_ids_local, |
| | | users_upt_date: localres.users_upt_date, |
| | | userid: result.UserID, |
| | | LoginUID: result.LoginUID |
| | | }).then(ssores => { |
| | | if (!ssores.status) return |
| | | Api.genericInterface({ |
| | | func: 's_get_local_u_create', |
| | | user_ids_local: ssores.user_ids_local, |
| | | userid: result.UserID, |
| | | LoginUID: result.LoginUID |
| | | }) |
| | | }) |
| | | }) |
| | | } |
| | | } else { |
| | | message.warning(res.message) |
| | | } |