| | |
| | | { |
| | | "appId": "201912040924165801464FF1788654BC5AC73", |
| | | "appkey": "20191106103859640976D6E924E464D029CF0", |
| | | "appId": "202108312122504607B107A83F55B40C98CCF", |
| | | "appkey": "20210831212235413F287EC3BF489424496C8", |
| | | "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars", |
| | | "systemType": "", |
| | | "externalDatabase": "", |
| | | "lineColor": "", |
| | | "filter": "false", |
| | | "defaultApp": "mk", |
| | | "defaultApp": "mkindustry", |
| | | "defaultLang": "zh-CN", |
| | | "WXAppID": "wx4d8a34c8d4494872", |
| | | "WXAppID": "", |
| | | "WXminiAppID": "", |
| | | "WXNotice": "true", |
| | | "WXNotice": "false", |
| | | "nginx": "true", |
| | | "debugger": false, |
| | | "licenseKey": "", |
| | |
| | | "transfer": "false", |
| | | "keepPassword": "true", |
| | | "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"], |
| | | "host": "http://qingqiumarket.cn", |
| | | "service": "MKWMS/" |
| | | "host": "http://demo.mk9h.cn", |
| | | "service": "erp_new/" |
| | | } |
| | |
| | | import CryptoJS from 'crypto-js' |
| | | import jsSHA from 'jssha' |
| | | import moment from 'moment' |
| | | |
| | | import Utils from '@/utils/utils.js' |
| | | import CacheUtils from './cacheutils' |
| | | import options from '@/store/options.js' |
| | | |
| | | window.GLOB.IndexDB = null |
| | | window.GLOB.OuterToken = {} |
| | |
| | | Password: '', |
| | | check_code: checkcode, |
| | | way_no: 'sms_vcode', |
| | | systemType: options.sysType, |
| | | systemType: window.GLOB.sysType, |
| | | login_city: sessionStorage.getItem('city') || '', |
| | | login_id_address: sessionStorage.getItem('ipAddress') || '', |
| | | kei_id: window.btoa(window.encodeURIComponent(window.GLOB.host)), |
| | |
| | | let url = '/webapi/dologon' |
| | | if (isCloud) { |
| | | param.debug = 'Y' |
| | | if (options.cloudServiceApi) { |
| | | param.rduri = options.cloudServiceApi.replace(/\/webapi(.*)/, '/webapi/dologon') |
| | | if (window.GLOB.cloudServiceApi) { |
| | | param.rduri = window.GLOB.cloudServiceApi.replace(/\/webapi(.*)/, '/webapi/dologon') |
| | | } |
| | | } else if (window.GLOB.mainSystemApi) { |
| | | if (options.sysType !== 'cloud' && window.GLOB.systemType !== 'production') { |
| | | if (window.GLOB.sysType !== 'cloud' && window.GLOB.systemType !== 'production') { |
| | | param.linkurl = window.GLOB.linkurl |
| | | } |
| | | param.rduri = window.GLOB.mainSystemApi.replace(/\/webapi(.*)/, '/webapi/dologon') |
| | |
| | | let param = { |
| | | // func: 'webapi_login', |
| | | UserName: username, |
| | | systemType: options.sysType, |
| | | systemType: window.GLOB.sysType, |
| | | Type: 'S', |
| | | login_city: sessionStorage.getItem('city') || '', |
| | | login_id_address: sessionStorage.getItem('ipAddress') || '', |
| | |
| | | |
| | | if (isCloud) { |
| | | param.debug = 'Y' |
| | | if (options.cloudServiceApi) { |
| | | param.rduri = options.cloudServiceApi.replace(/\/webapi(.*)/, '/webapi/dologon') |
| | | if (window.GLOB.cloudServiceApi) { |
| | | param.rduri = window.GLOB.cloudServiceApi.replace(/\/webapi(.*)/, '/webapi/dologon') |
| | | } |
| | | } else if (window.GLOB.mainSystemApi) { |
| | | if (options.sysType !== 'cloud' && window.GLOB.systemType !== 'production') { |
| | | if (window.GLOB.sysType !== 'cloud' && window.GLOB.systemType !== 'production') { |
| | | param.linkurl = window.GLOB.linkurl |
| | | } |
| | | param.rduri = window.GLOB.mainSystemApi.replace(/\/webapi(.*)/, '/webapi/dologon') |
| | |
| | | |
| | | param = this.encryptParam(param) |
| | | |
| | | let url = options.cloudServiceApi ? options.cloudServiceApi : '/webapi/dostars' |
| | | let url = window.GLOB.cloudServiceApi ? window.GLOB.cloudServiceApi : '/webapi/dostars' |
| | | if (param.func) { |
| | | url = url + '/' + param.func |
| | | } |
| | |
| | | param.LoginUID = param.LoginUID || sessionStorage.getItem('LoginUID') || '' |
| | | param.appkey = param.appkey || window.GLOB.appkey |
| | | |
| | | let url = '/webapi/dostarst' |
| | | // if (window.GLOB.mkHS && options.cloudServiceApi) { // HS下,且存在云端地址 |
| | | // url = options.cloudServiceApi |
| | | // param.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | // param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | // } else if (window.GLOB.mainSystemApi) { |
| | | // if (!window.GLOB.transfer) { |
| | | // url = window.GLOB.mainSystemApi |
| | | // } else { |
| | | // param.rduri = window.GLOB.mainSystemApi |
| | | // } |
| | | // } |
| | | let url = '/webapi/dostars' |
| | | if (window.GLOB.mkHS && window.GLOB.cloudServiceApi) { // HS下,且存在云端地址 |
| | | url = window.GLOB.cloudServiceApi |
| | | param.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } else if (window.GLOB.mainSystemApi) { |
| | | if (!window.GLOB.transfer) { |
| | | url = window.GLOB.mainSystemApi |
| | | } else { |
| | | param.rduri = window.GLOB.mainSystemApi |
| | | } |
| | | } |
| | | |
| | | param = this.encryptParam(param) |
| | | |
| | |
| | | |
| | | let url = '/webapi/dostars' |
| | | if (window.GLOB.mkHS) { // HS下,单点登录服务器为云端 |
| | | if (options.cloudServiceApi) { // 存在云端地址时,使用云端系统参数 |
| | | url = options.cloudServiceApi |
| | | if (window.GLOB.cloudServiceApi) { // 存在云端地址时,使用云端系统参数 |
| | | url = window.GLOB.cloudServiceApi |
| | | param.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } |
| | |
| | | } else { |
| | | let _param = { |
| | | UserName: token.username, |
| | | systemType: options.sysType, |
| | | systemType: window.GLOB.sysType, |
| | | login_city: sessionStorage.getItem('city') || '', |
| | | device_id: token.appkey || '', |
| | | timestamp: moment().format('YYYY-MM-DD HH:mm:ss'), |
| | |
| | | |
| | | import asyncComponent from '@/utils/asyncLoadComponent' |
| | | import NotFount from '@/components/404' |
| | | import options from '@/store/options.js' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import Api from '@/api' |
| | | import './index.scss' |
| | |
| | | const { tabview } = this.state |
| | | window.GLOB.CacheMap = new Map() |
| | | |
| | | if (options.sysType === 'local' && window.GLOB.systemType !== 'production') { |
| | | if (window.GLOB.sysType === 'local' && window.GLOB.systemType !== 'production') { |
| | | let roledefer = new Promise(resolve => { |
| | | Api.getSystemConfig({ |
| | | func: 's_Get_TrdMenu_Role', |
| | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import Api from '@/api' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import options from '@/store/options.js' |
| | | import Utils from '@/utils/utils.js' |
| | | import avatar from '@/assets/img/avatar.jpg' |
| | | import './index.scss' |
| | |
| | | |
| | | getRolesMenu () { |
| | | // 获取主菜单参数 |
| | | let _param = {func: 's_get_pc_menus', systemType: options.sysType} |
| | | let _param = {func: 's_get_pc_menus', systemType: window.GLOB.sysType} |
| | | _param.pro_sys = window.GLOB.systemType === 'production' ? 'Y' : '' |
| | | |
| | | Api.getSystemConfig(_param).then(result => { |
| | |
| | | const { menulist, thdMenuList } = this.getMenulist(result) |
| | | |
| | | let systems = [] |
| | | if ((options.sysType === 'local' || options.sysType === 'SSO') && result.sys_list) { |
| | | if ((window.GLOB.sysType === 'local' || window.GLOB.sysType === 'SSO') && result.sys_list) { |
| | | systems = result.sys_list |
| | | |
| | | if (options.sysType === 'local' && window.GLOB.systemType !== 'production' && systems.length > 10) { |
| | | if (window.GLOB.sysType === 'local' && window.GLOB.systemType !== 'production' && systems.length > 10) { |
| | | systems.length = 10 |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | gotoDoc = () => { |
| | | if (options.sysType === 'local' && window.GLOB.mainSystemApi) { |
| | | if (window.GLOB.sysType === 'local' && window.GLOB.mainSystemApi) { |
| | | let ssodomain = window.GLOB.mainSystemApi.replace('/webapi/dostars', '') |
| | | let url = `${ssodomain}/doc/index.html#?appkey=${window.GLOB.appkey}&LoginUID=${sessionStorage.getItem('LoginUID')}` |
| | | window.open(url) |
| | | } else if (options.sysType === 'SSO' || options.sysType === 'cloud') { |
| | | } else if (window.GLOB.sysType === 'SSO' || window.GLOB.sysType === 'cloud') { |
| | | window.open(`${window.location.href.replace(/\/admin(.*)|\/index.html(.*)|\/#(.*)/ig, '')}/doc/index.html#?appkey=${window.GLOB.appkey}&LoginUID=${sessionStorage.getItem('LoginUID')}`) |
| | | } |
| | | } |
| | |
| | | |
| | | import asyncComponent from '@/utils/asyncLoadComponent' |
| | | import NotFount from '@/components/404' |
| | | import options from '@/store/options.js' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import Api from '@/api' |
| | | import './index.scss' |
| | |
| | | e.stopPropagation() |
| | | window.GLOB.CacheMap = new Map() |
| | | |
| | | if (options.sysType === 'local' && window.GLOB.systemType !== 'production') { |
| | | if (window.GLOB.sysType === 'local' && window.GLOB.systemType !== 'production') { |
| | | let roledefer = new Promise(resolve => { |
| | | Api.getSystemConfig({ |
| | | func: 's_Get_TrdMenu_Role', |
| | |
| | | } |
| | | } |
| | | |
| | | if (options.cdomain && options.sysType !== 'cloud') { |
| | | options.cloudServiceApi = options.cdomain + '/webapi/dostars' |
| | | } |
| | | |
| | | let GLOB = {} |
| | | GLOB.appId = config.appId || '' |
| | | GLOB.lineColor = config.lineColor || '' |
| | |
| | | GLOB.WXNotice = config.WXNotice + '' === 'true' |
| | | GLOB.accessToken = {} |
| | | GLOB.mkHS = false |
| | | GLOB.navBar = 'shutter' // 默认为百叶窗 |
| | | |
| | | GLOB.sysType = options.sysType |
| | | if (GLOB.sysType !== 'cloud') { |
| | | GLOB.cloudServiceApi = options.cdomain + '/webapi/dostars' |
| | | } |
| | | |
| | | if (sessionStorage.getItem('externalDatabase')) { |
| | | GLOB.externalDatabase = `[${sessionStorage.getItem('externalDatabase')}]..` |
| | |
| | | } |
| | | |
| | | // 只有业务系统才可以设置为正式系统 |
| | | if (options.sysType === 'local' && (config.systemType === 'official' || config.systemType === 'production')) { |
| | | if (GLOB.sysType === 'local' && (config.systemType === 'official' || config.systemType === 'production')) { |
| | | GLOB.systemType = 'production' |
| | | if (config.probation && /^20\d{2}-\d{2}-\d{2}$/.test(config.probation) && new Date(config.probation).getTime() > new Date().getTime()) { |
| | | GLOB.probation = true |
| | |
| | | document.getElementById('root').innerHTML = '<div style="text-align: center; font-size: 30px; margin-top: 40vh;">正式系统不可使用 http://cloud.mk9h.cn 做为单点地址,请联系管理员!</div>' |
| | | return |
| | | } |
| | | } else if (options.sysType === 'local') { |
| | | } else if (GLOB.sysType === 'local') { |
| | | GLOB.probation = true |
| | | GLOB.systemType = '' |
| | | |
| | |
| | | GLOB.mainSystemApi = '' |
| | | } |
| | | |
| | | GLOB.debugger = options.sysType === 'local' && GLOB.systemType !== 'production' |
| | | GLOB.debugger = GLOB.sysType === 'local' && GLOB.systemType !== 'production' |
| | | |
| | | if (/#\/hs$/.test(window.location.href)) { // hs下不打印脚本 |
| | | GLOB.debugger = false |
| | | } |
| | | |
| | | if (options.sysType !== 'cloud') { |
| | | if (GLOB.sysType !== 'cloud') { |
| | | if (config.appkey === options.cakey) { |
| | | document.getElementById('root').innerHTML = '<div style="text-align: center; font-size: 30px; margin-top: 40vh;">不可使用云端appkey,请联系管理员!</div>' |
| | | return |
| | | } |
| | | } |
| | | |
| | | if (options.sysType === 'cloud') { // cloud不可设置单点服务器地址,云端appkey为系统设置 |
| | | if (GLOB.sysType === 'cloud') { // cloud不可设置单点服务器地址,云端appkey为系统设置 |
| | | GLOB.appkey = options.cakey |
| | | GLOB.appId = options.caId |
| | | GLOB.WXNotice = false |
| | | } else if (options.sysType === 'SSO') { // sso不可设置单点服务器地址 |
| | | } else if (GLOB.sysType === 'SSO') { // sso不可设置单点服务器地址 |
| | | GLOB.appkey = config.appkey |
| | | } else if (options.sysType === 'local') { // 业务系统 |
| | | } else if (GLOB.sysType === 'local') { // 业务系统 |
| | | GLOB.appkey = config.appkey |
| | | if (GLOB.systemType === 'production') { |
| | | let systemApi = config.mainSystemApi |
| | |
| | | |
| | | let _href = window.location.href.split('#')[0] |
| | | let _systemMsg = localStorage.getItem(_href + 'system') |
| | | |
| | | GLOB.navBar = 'shutter' // 默认为百叶窗 |
| | | let className = 'mk-blue-black' |
| | | |
| | | if (_systemMsg) { |
| | |
| | | writable: false, |
| | | value: GLOB.linkurl |
| | | }) |
| | | Object.defineProperty(GLOB, 'sysType', { |
| | | writable: false, |
| | | value: GLOB.sysType |
| | | }) |
| | | Object.defineProperty(GLOB, 'cloudServiceApi', { |
| | | writable: false, |
| | | value: GLOB.cloudServiceApi || '' |
| | | }) |
| | | Object.defineProperty(window, 'GLOB', { |
| | | writable: false, |
| | | value: GLOB |
| | |
| | | |
| | | import Api from '@/api' |
| | | import Utils from '@/utils/utils.js' |
| | | import options from '@/store/options.js' |
| | | import UserForm from './settingform' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import './index.scss' |
| | |
| | | Base64Img: canvas.toDataURL('image/png') // 获取生成的图片 |
| | | } |
| | | |
| | | if (options.cloudServiceApi) { |
| | | param.rduri = options.cloudServiceApi |
| | | if (window.GLOB.cloudServiceApi) { |
| | | param.rduri = window.GLOB.cloudServiceApi |
| | | param.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } |
| | |
| | | import moment from 'moment' |
| | | |
| | | import Api from '@/api' |
| | | import options from '@/store/options.js' |
| | | import Utils from '@/utils/utils.js' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import { queryTableSql } from '@/utils/option.js' |
| | |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 云端数据验证 |
| | | |
| | | if (options.cloudServiceApi) { // 且存在云端地址 |
| | | param.rduri = options.cloudServiceApi |
| | | if (window.GLOB.cloudServiceApi) { // 且存在云端地址 |
| | | param.rduri = window.GLOB.cloudServiceApi |
| | | param.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } |
| | |
| | | import moment from 'moment' |
| | | |
| | | import Api from '@/api' |
| | | import options from '@/store/options.js' |
| | | import Utils from '@/utils/utils.js' |
| | | import SettingForm from './settingform' |
| | | import { queryTableSql } from '@/utils/option.js' |
| | |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 云端数据验证 |
| | | |
| | | if (options.cloudServiceApi) { // 且存在云端地址 |
| | | param.rduri = options.cloudServiceApi |
| | | if (window.GLOB.cloudServiceApi) { // 且存在云端地址 |
| | | param.rduri = window.GLOB.cloudServiceApi |
| | | param.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } |
| | |
| | | } |
| | | } else { |
| | | let param = {func: 'sPC_Get_FieldName', TBName: res.table} |
| | | if (options.cloudServiceApi) { // 且存在云端地址 |
| | | param.rduri = options.cloudServiceApi |
| | | if (window.GLOB.cloudServiceApi) { // 且存在云端地址 |
| | | param.rduri = window.GLOB.cloudServiceApi |
| | | param.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } |
| | |
| | | node: null, |
| | | loading: false, |
| | | status: 0, |
| | | flowname: '', |
| | | orgs: [] |
| | | } |
| | | |
| | |
| | | |
| | | this.setState({ |
| | | status: item.status || 0, |
| | | flowname: item.works_flow_name, |
| | | loading: false |
| | | }) |
| | | |
| | |
| | | const r1 = graph.createNode({ |
| | | shape: 'mk-rect', |
| | | mknode: 'start', |
| | | mkdata: {status: 0, statusName: '开始'}, |
| | | mkdata: {status: 0, statusName: '未提交'}, |
| | | attrs: { |
| | | body: { |
| | | rx: 20, |
| | |
| | | const r8 = graph.createNode({ |
| | | shape: 'mk-rect', |
| | | mknode: 'end', |
| | | mkdata: {status: '', statusName: '结束'}, |
| | | mkdata: {status: 888, statusName: '已完成'}, |
| | | attrs: { |
| | | body: { |
| | | rx: 20, |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { loading, config, node, orgs, status } = this.state |
| | | const { loading, config, node, orgs, status, flowname } = this.state |
| | | |
| | | let style = {...config.style} |
| | | |
| | |
| | | <QuestionCircleOutlined /> |
| | | </Tooltip> |
| | | </div> |
| | | <div className="flow-name">{flowname}</div> |
| | | <div className="right-tool"> |
| | | <Tooltip title="启用/停用"> |
| | | <Switch size="small" style={{marginRight: '10px'}} checked={status === 10} onChange={this.changeStatus} /> |
| | |
| | | background-size: cover; |
| | | |
| | | .mk-toolbar { |
| | | position: relative; |
| | | width: 100%; |
| | | height: 40px; |
| | | border-bottom: 1px solid #dfe3e8; |
| | |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | .flow-name { |
| | | position: absolute; |
| | | left: 50%; |
| | | top: 6px; |
| | | font-size: 16px; |
| | | color: rgba(0, 0, 0, 0.85); |
| | | transform: translateX(-50%); |
| | | } |
| | | .right-tool { |
| | | float: right; |
| | | line-height: 40px; |
| | |
| | | } |
| | | } |
| | | .member-transfer { |
| | | .mk-tree { |
| | | display: inline-block!important; |
| | | .circle { |
| | | position: relative; |
| | | top: 1px; |
| | | right: 4px; |
| | | display: inline-block!important; |
| | | width: 12px; |
| | | height: 12px; |
| | | background: #1890ff; |
| | | border-radius: 50%; |
| | | } |
| | | .green.circle { |
| | | background: #52c41a; |
| | | } |
| | | } |
| | | .ant-transfer-list:first-child { |
| | | width: 60%; |
| | | } |
| | |
| | | targetKeys={targetKeys} |
| | | dataSource={transferDataSource} |
| | | className="member-transfer" |
| | | titles={['全部人员', '已选']} |
| | | titles={[<span className="mk-tree"><span className="circle"></span>组织机构</span>, <span className="mk-tree"><span className="circle green"></span>已选</span>]} |
| | | render={item => item.title} |
| | | showSelectAll={false} |
| | | > |
| | |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {nodetype === 'node' ? <Col span={12}> |
| | | {nodetype === 'edge' ? <Col span={12}> |
| | | <Form.Item label="设置审批人"> |
| | | {getFieldDecorator('approver', { |
| | | initialValue: data.approver || 'member' |
| | |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {nodetype === 'node' ? <Col span={12}> |
| | | {nodetype === 'edge' ? <Col span={12}> |
| | | <Form.Item label="审批方式"> |
| | | {getFieldDecorator('approvalMethod', { |
| | | initialValue: data.approvalMethod || 'countersign' |
| | |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | <Col span={12}> |
| | | {nodetype === 'edge' || nodetype === 'node' ? <Col span={12}> |
| | | <Form.Item label="审批人"> |
| | | {getFieldDecorator('members', { |
| | | initialValue: data.members || [], |
| | |
| | | <MemberForm orgs={orgs} title="审批人"/> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | </Col> : null} |
| | | {nodetype === 'edge' || nodetype === 'node' ? <Col span={12}> |
| | | <Form.Item label="抄送人"> |
| | | {getFieldDecorator('copys', { |
| | | initialValue: data.copys || [] |
| | |
| | | <MemberForm orgs={orgs} title="抄送人"/> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | </Col> : null} |
| | | <Col span={24}> |
| | | <Form.Item label="备注"> |
| | | {getFieldDecorator('remark', { |
| | |
| | | import md5 from 'md5' |
| | | |
| | | import Api from '@/api' |
| | | import options from '@/store/options.js' |
| | | import Utils from '@/utils/utils.js' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import './index.scss' |
| | |
| | | } |
| | | |
| | | getAppList = () => { |
| | | if (options.sysType !== 'local') return |
| | | if (window.GLOB.sysType !== 'local') return |
| | | |
| | | let param = { |
| | | func: 's_get_kei' |
| | |
| | | render() { |
| | | const { activeKey, filterRoleList, applist, selectApp, selectSubApp, loading, loadingTree, loadingAppTree, primarykey, menuTrees, appTrees, checkedKeys, appCheckedKeys, menuOpenKeys, selectMenuTrees, selectAppTrees, selectRoleId, selectMenuOpenKeys, selectAppOpenKeys, submitloading, appOpenKeys } = this.state |
| | | |
| | | let ismanage = options.sysType !== 'local' |
| | | let ismanage = window.GLOB.sysType !== 'local' |
| | | |
| | | return ( |
| | | <div className={'rolemanage' + (ismanage ? ' manager' : '')}> |
| | |
| | | |
| | | import ExcelIn from './excelin' |
| | | import Utils, { getExcelInSql } from '@/utils/utils.js' |
| | | import options from '@/store/options.js' |
| | | import Api from '@/api' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import MkIcon from '@/components/mk-icon' |
| | |
| | | _outParam = fromJS(res).toJS() |
| | | |
| | | if (window.GLOB.mkHS) { |
| | | if (btn.sysInterface === 'true' && options.cloudServiceApi) { |
| | | param.rduri = options.cloudServiceApi |
| | | if (btn.sysInterface === 'true' && window.GLOB.cloudServiceApi) { |
| | | param.rduri = window.GLOB.cloudServiceApi |
| | | param.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } else if (btn.sysInterface !== 'true') { |
| | |
| | | import * as XLSX from 'sheetjs-style' |
| | | |
| | | import Utils from '@/utils/utils.js' |
| | | import options from '@/store/options.js' |
| | | import Api from '@/api' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import MkIcon from '@/components/mk-icon' |
| | |
| | | let param = this.getExcelCustomParam(viewParam.orderBy, viewParam.search) |
| | | |
| | | if (window.GLOB.mkHS) { |
| | | if (btn.sysInterface === 'true' && options.cloudServiceApi) { |
| | | param.rduri = options.cloudServiceApi |
| | | if (btn.sysInterface === 'true' && window.GLOB.cloudServiceApi) { |
| | | param.rduri = window.GLOB.cloudServiceApi |
| | | param.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } else if (btn.sysInterface !== 'true') { |
| | |
| | | delete res.status |
| | | |
| | | if (window.GLOB.mkHS) { |
| | | if (btn.sysInterface === 'true' && options.cloudServiceApi) { |
| | | res.rduri = options.cloudServiceApi |
| | | if (btn.sysInterface === 'true' && window.GLOB.cloudServiceApi) { |
| | | res.rduri = window.GLOB.cloudServiceApi |
| | | res.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | res.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } else if (btn.sysInterface !== 'true') { |
| | |
| | | delete res.status |
| | | |
| | | if (window.GLOB.mkHS) { |
| | | if (btn.sysInterface === 'true' && options.cloudServiceApi) { |
| | | res.rduri = options.cloudServiceApi |
| | | if (btn.sysInterface === 'true' && window.GLOB.cloudServiceApi) { |
| | | res.rduri = window.GLOB.cloudServiceApi |
| | | res.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | res.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } else if (btn.sysInterface !== 'true') { |
| | |
| | | param = this.getExcelCustomParam(viewParam.orderBy, viewParam.search, true, pageIndex, pageSize) |
| | | |
| | | if (window.GLOB.mkHS) { |
| | | if (btn.sysInterface === 'true' && options.cloudServiceApi) { |
| | | param.rduri = options.cloudServiceApi |
| | | if (btn.sysInterface === 'true' && window.GLOB.cloudServiceApi) { |
| | | param.rduri = window.GLOB.cloudServiceApi |
| | | param.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } else if (btn.sysInterface !== 'true') { |
| | |
| | | param.custom_script = param.custom_script.replace(/@typename@/ig, `'admin'`) |
| | | |
| | | // 测试系统打印查询语句 |
| | | if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { |
| | | if (window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud')) { |
| | | param.custom_script && console.info(`${LText ? '' : '/*不执行默认sql*/\n'}${param.custom_script}`) |
| | | LText && console.info(LText) |
| | | } |
| | |
| | | |
| | | import Api from '@/api' |
| | | import Utils, { getSysDefaultSql } from '@/utils/utils.js' |
| | | import options from '@/store/options.js' |
| | | import asyncSpinComponent from '@/utils/asyncSpinComponent' |
| | | import { updateForm } from '@/utils/utils-update.js' |
| | | import MKEmitter from '@/utils/events.js' |
| | |
| | | sql = sql.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`) |
| | | sql = sql.replace(/@typename@/ig, `'admin'`) |
| | | |
| | | if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { |
| | | if (window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud')) { |
| | | console.info(sql.replace(/\n\s{8}/ig, '\n')) |
| | | } |
| | | |
| | |
| | | Sort: index + 1 |
| | | })) |
| | | |
| | | if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { |
| | | if (window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud')) { |
| | | let sql = [...lineMap.values()].map(item => (` |
| | | ${item.insert} |
| | | ${item.selects.join(` union all |
| | |
| | | if (window.GLOB.mainSystemApi) { |
| | | result.rduri = window.GLOB.mainSystemApi |
| | | } |
| | | } else if (btn.sysInterface === 'true' && options.cloudServiceApi) { |
| | | result.rduri = options.cloudServiceApi |
| | | } else if (btn.sysInterface === 'true' && window.GLOB.cloudServiceApi) { |
| | | result.rduri = window.GLOB.cloudServiceApi |
| | | result.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | result.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } else if (btn.sysInterface !== 'true') { |
| | |
| | | |
| | | let domain1 = '' |
| | | let domain2 = '' |
| | | if (['8IFltwzyKcu15iA8fqSyb6m-pMa88a3ZTu0No3vDHgo', 'LOB-bbt9jVncGh7IOAUdESh1Sgzcbt62UwOqSqcK9ok'].includes(verify.wxTemplateId) && options.sysType !== 'cloud') { |
| | | if (['8IFltwzyKcu15iA8fqSyb6m-pMa88a3ZTu0No3vDHgo', 'LOB-bbt9jVncGh7IOAUdESh1Sgzcbt62UwOqSqcK9ok'].includes(verify.wxTemplateId) && window.GLOB.sysType !== 'cloud') { |
| | | domain1 = 'https://cloud.mk9h.cn/' |
| | | domain2 = 'https://cloud.mk9h.cn:8443/' |
| | | } |
| | |
| | | |
| | | import Api from '@/api' |
| | | import Utils from '@/utils/utils.js' |
| | | import options from '@/store/options.js' |
| | | import asyncSpinComponent from '@/utils/asyncSpinComponent' |
| | | import { updateForm } from '@/utils/utils-update.js' |
| | | import MKEmitter from '@/utils/events.js' |
| | |
| | | } |
| | | |
| | | // 测试系统打印查询语句 |
| | | if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { |
| | | if (window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud')) { |
| | | _customScript && console.info(`${btn.logLabel ? `/*${btn.logLabel} 自定义脚本*/\n` : ''}${LText ? '' : '/*不执行默认sql*/\n'}${_customScript}`) |
| | | LText && console.info(`${btn.logLabel ? `/*${btn.logLabel} 数据源*/\n` : ''}` + LText.replace(/\n\s{8}/ig, '\n')) |
| | | } |
| | |
| | | _outParam = JSON.parse(JSON.stringify(res)) |
| | | |
| | | if (window.GLOB.mkHS) { |
| | | if (btn.sysInterface === 'true' && options.cloudServiceApi) { |
| | | res.rduri = options.cloudServiceApi |
| | | if (btn.sysInterface === 'true' && window.GLOB.cloudServiceApi) { |
| | | res.rduri = window.GLOB.cloudServiceApi |
| | | res.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | res.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } else if (btn.sysInterface !== 'true') { |
| | |
| | | import moment from 'moment' |
| | | |
| | | import Api from '@/api' |
| | | import options from '@/store/options.js' |
| | | import { formRule } from '@/utils/option.js' |
| | | import Utils from '@/utils/utils.js' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | |
| | | } |
| | | |
| | | if (deForms.length > 0) { |
| | | if (!window.GLOB.mkHS && options.sysType === 'local' && window.GLOB.systemType !== 'production') { |
| | | if (!window.GLOB.mkHS && window.GLOB.sysType === 'local' && window.GLOB.systemType !== 'production') { |
| | | this.improveSimpleActionForm(deForms) |
| | | } else { |
| | | this.improveActionForm(deForms) |
| | |
| | | let mainItems = [] // 云端或单点数据 |
| | | let localItems = [] // 本地数据 |
| | | let cache = action.setting.cache !== 'false' |
| | | let debug = window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud') |
| | | let debug = window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud') |
| | | |
| | | let _sql = `Declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20) select @mk_departmentcode='${sessionStorage.getItem('departmentcode') || ''}',@mk_organization='${sessionStorage.getItem('organization') || ''}',@mk_user_type='${sessionStorage.getItem('mk_user_type') || ''}'\n` |
| | | let _sso = _sql |
| | |
| | | |
| | | if (window.GLOB.mkHS) { // 云端数据验证 |
| | | mainparam.open_key = Utils.encryptOpenKey(mainparam.secretkey, mainparam.timestamp) |
| | | if (options.cloudServiceApi) { |
| | | mainparam.rduri = options.cloudServiceApi |
| | | if (window.GLOB.cloudServiceApi) { |
| | | mainparam.rduri = window.GLOB.cloudServiceApi |
| | | mainparam.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | mainparam.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } |
| | |
| | | */ |
| | | improveSimpleActionForm = (deForms) => { |
| | | let cache = this.props.action.setting.cache !== 'false' |
| | | let debug = window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud') |
| | | let debug = window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud') |
| | | let _sql = `Declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20) select @mk_departmentcode='${sessionStorage.getItem('departmentcode') || ''}',@mk_organization='${sessionStorage.getItem('organization') || ''}',@mk_user_type='${sessionStorage.getItem('mk_user_type') || ''}'\n` |
| | | |
| | | let deffers = deForms.map((form, index) => { |
| | |
| | | |
| | | import Api from '@/api' |
| | | import Utils from '@/utils/utils.js' |
| | | import options from '@/store/options.js' |
| | | |
| | | import './index.scss' |
| | | |
| | |
| | | const { debug, visible, data } = this.state |
| | | |
| | | return ( |
| | | <div className={'page-message-wrap ' + (debug && options.sysType !== 'cloud' ? 'exist' : '')}> |
| | | {debug && options.sysType !== 'cloud' ? <Button |
| | | <div className={'page-message-wrap ' + (debug && window.GLOB.sysType !== 'cloud' ? 'exist' : '')}> |
| | | {debug && window.GLOB.sysType !== 'cloud' ? <Button |
| | | icon="copy" |
| | | shape="circle" |
| | | className="page-message" |
| | |
| | | import Api from '@/api' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import { updateSubTable } from '@/utils/utils-update.js' |
| | | import options from '@/store/options.js' |
| | | import asyncComponent from '@/utils/asyncSpinComponent' |
| | | import './index.scss' |
| | | |
| | |
| | | |
| | | return ( |
| | | <div className="page-setting-wrap"> |
| | | {options.sysType === 'local' ? <Button |
| | | {window.GLOB.sysType === 'local' ? <Button |
| | | icon="setting" |
| | | shape="circle" |
| | | className="page-setting" |
| | |
| | | import Api from '@/api' |
| | | import G6 from "@antv/g6" |
| | | import Utils from '@/utils/utils.js' |
| | | import options from '@/store/options.js' |
| | | import './index.scss' |
| | | |
| | | const { Search } = Input |
| | |
| | | const { visible, loading, empty, debug } = this.state |
| | | |
| | | return ( |
| | | <div className={'page-message-wrap ' + (debug && options.sysType !== 'cloud' ? 'exist' : '')}> |
| | | {debug && options.sysType !== 'cloud' ? <Button |
| | | <div className={'page-message-wrap ' + (debug && window.GLOB.sysType !== 'cloud' ? 'exist' : '')}> |
| | | {debug && window.GLOB.sysType !== 'cloud' ? <Button |
| | | icon="fork" |
| | | shape="circle" |
| | | className="page-message" |
| | |
| | | import md5 from 'md5' |
| | | |
| | | import Api from '@/api' |
| | | import options from '@/store/options.js' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import asyncSpinComponent from '@/utils/asyncSpinComponent' |
| | | import Utils from '@/utils/utils.js' |
| | |
| | | if (item.resourceType === '1' && item.dataSource) { |
| | | let _option = Utils.getSelectQueryOptions(item) |
| | | |
| | | if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { |
| | | if (window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud')) { |
| | | console.info(_option.sql) |
| | | } |
| | | |
| | | // 测试系统单个请求 |
| | | if (!window.GLOB.mkHS && options.sysType === 'local' && !window.GLOB.systemType) { |
| | | if (!window.GLOB.mkHS && window.GLOB.sysType === 'local' && !window.GLOB.systemType) { |
| | | deForms.push({ |
| | | ...item, |
| | | arr_field: _option.field, |
| | |
| | | advanceValues, |
| | | searchlist: _list |
| | | }, () => { |
| | | if (!window.GLOB.mkHS && options.sysType === 'local' && window.GLOB.systemType !== 'production') { |
| | | if (!window.GLOB.mkHS && window.GLOB.sysType === 'local' && window.GLOB.systemType !== 'production') { |
| | | this.improveSimpleSearch(deForms) |
| | | } else if (mainItems.length > 0 || localItems.length > 0) { |
| | | this.improveSearch(mainItems, localItems) |
| | |
| | | |
| | | if (window.GLOB.mkHS) { // 云端数据验证 |
| | | mainparam.open_key = Utils.encryptOpenKey(mainparam.secretkey, mainparam.timestamp) |
| | | if (options.cloudServiceApi) { |
| | | mainparam.rduri = options.cloudServiceApi |
| | | if (window.GLOB.cloudServiceApi) { |
| | | mainparam.rduri = window.GLOB.cloudServiceApi |
| | | mainparam.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | mainparam.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } |
| | |
| | | import moment from 'moment' |
| | | |
| | | import Api from '@/api' |
| | | import options from '@/store/options.js' |
| | | import Utils from '@/utils/utils.js' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import { queryTableSql } from '@/utils/option.js' |
| | |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 云端数据验证 |
| | | |
| | | if (options.cloudServiceApi) { // 且存在云端地址 |
| | | param.rduri = options.cloudServiceApi |
| | | if (window.GLOB.cloudServiceApi) { // 且存在云端地址 |
| | | param.rduri = window.GLOB.cloudServiceApi |
| | | param.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } |
| | |
| | | let deffers = this.state.selectedTables.map((item, i) => { |
| | | return new Promise(resolve => { |
| | | let param = {func: 'sPC_Get_FieldName', TBName: item.TbName} |
| | | if (options.cloudServiceApi) { // 且存在云端地址 |
| | | param.rduri = options.cloudServiceApi |
| | | if (window.GLOB.cloudServiceApi) { // 且存在云端地址 |
| | | param.rduri = window.GLOB.cloudServiceApi |
| | | param.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } |
| | |
| | | |
| | | import MutilForm from './mutilform' |
| | | import Utils from '@/utils/utils.js' |
| | | import options from '@/store/options.js' |
| | | import { updateForm } from '@/utils/utils-update.js' |
| | | import Api from '@/api' |
| | | import './index.scss' |
| | |
| | | Ltexttableparam: '', |
| | | Ltext: '', |
| | | menuType: menu.type, |
| | | systemType: options.sysType |
| | | systemType: window.GLOB.sysType |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | |
| | | import Api from '@/api' |
| | | import Utils from '@/utils/utils.js' |
| | | import options from '@/store/options.js' |
| | | import BaseForm from './baseform' |
| | | import UniqueForm from './uniqueform' |
| | | import ContrastForm from './contrastform' |
| | |
| | | mutilparam.secretkey = Utils.encrypt(mutilparam.LText, mutilparam.timestamp) |
| | | mutilparam.open_key = Utils.encryptOpenKey(mutilparam.secretkey, mutilparam.timestamp) |
| | | |
| | | if (options.cloudServiceApi) { // 云端请求 |
| | | mutilparam.rduri = options.cloudServiceApi |
| | | if (window.GLOB.cloudServiceApi) { // 云端请求 |
| | | mutilparam.rduri = window.GLOB.cloudServiceApi |
| | | mutilparam.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | mutilparam.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } |
| | |
| | | import md5 from 'md5' |
| | | import moment from 'moment' |
| | | import options from '@/store/options.js' |
| | | import Utils from './utils.js' |
| | | |
| | | export default class DataUtils { |
| | |
| | | param.func = setting.innerFunc |
| | | } else { |
| | | if (window.GLOB.mkHS) { |
| | | if (setting.sysInterface === 'true' && options.cloudServiceApi) { |
| | | param.rduri = options.cloudServiceApi |
| | | if (setting.sysInterface === 'true' && window.GLOB.cloudServiceApi) { |
| | | param.rduri = window.GLOB.cloudServiceApi |
| | | param.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } else if (setting.sysInterface !== 'true') { |
| | |
| | | } |
| | | |
| | | // 测试系统打印查询语句 |
| | | if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { |
| | | if (window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud')) { |
| | | _customScript && console.info(`${setting.$name ? `/*${setting.$name} 自定义脚本*/\n` : ''}${LText ? '' : '/*不执行默认sql*/\n'}${_customScript}`) |
| | | LText && console.info(`${setting.$name ? `/*${setting.$name} 数据源*/\n` : ''}` + LText.replace(/\n\s{8}/ig, '\n')) |
| | | } |
| | |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | | |
| | | // special HS自定义函数查询 |
| | | if (setting.tableName === 's_custom_script' && options.cloudServiceApi) { |
| | | param.rduri = options.cloudServiceApi |
| | | if (setting.tableName === 's_custom_script' && window.GLOB.cloudServiceApi) { |
| | | param.rduri = window.GLOB.cloudServiceApi |
| | | param.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } |
| | |
| | | } |
| | | |
| | | // 测试系统打印查询语句 |
| | | if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { |
| | | if (window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud')) { |
| | | _customScript && console.info(`${setting.$name ? `/*${setting.$name} 自定义脚本 统计查询*/\n` : ''}${LText ? '' : '/*不执行默认sql*/\n'}${_customScript}`) |
| | | LText && console.info(`${setting.$name ? `/*${setting.$name} 数据源 统计查询*/\n` : ''}` + LText.replace(/\n\s{8}/ig, '\n')) |
| | | } |
| | |
| | | _script = _script.replace(/@typename@/ig, `'admin'`) |
| | | |
| | | // 测试系统打印查询语句 |
| | | if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { |
| | | if (window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud')) { |
| | | _script && console.info(`${item.$name ? `/*${item.$name} 自定义脚本(同步查询)*/\n` : ''}${_sql ? '' : '/*不执行默认sql*/\n'}${_script}`) |
| | | _sql && console.info(`${item.$name ? `/*${item.$name} 数据源(同步查询)*/\n` : ''}` + _sql) |
| | | } |
| | |
| | | import moment from 'moment' |
| | | import md5 from 'md5' |
| | | import options from '@/store/options.js' |
| | | |
| | | const formatKeys = [ |
| | | { key: 'select', value: ' msltk ' }, |
| | |
| | | |
| | | let baseurl = '' |
| | | |
| | | if (options.cloudServiceApi) { |
| | | baseurl = options.cloudServiceApi.replace(/webapi(.*)$/, '') |
| | | if (window.GLOB.cloudServiceApi) { |
| | | baseurl = window.GLOB.cloudServiceApi.replace(/webapi(.*)$/, '') |
| | | } else { |
| | | baseurl = window.GLOB.baseurl |
| | | } |
| | |
| | | _sqlBottom = _sqlBottom.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'') |
| | | } |
| | | |
| | | if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { |
| | | if (window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud')) { |
| | | let fsql = ` |
| | | ${_sql} |
| | | ${_sqlInsert} |
| | |
| | | _sqlBottom = _sqlBottom.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'') |
| | | } |
| | | |
| | | if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { |
| | | if (window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud')) { |
| | | let fsql = ` |
| | | ${_sql} |
| | | ${_sqlInsert} |
| | |
| | | _sql = _sql.replace(/@datam@/ig, '\'\'') |
| | | } |
| | | |
| | | if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { |
| | | if (window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud')) { |
| | | // _sql = _sql.replace(/\n\s{8}/ig, '\n') |
| | | console.info(_sql) |
| | | } |
| | |
| | | |
| | | import Api from '@/api' |
| | | import Utils from '@/utils/utils.js' |
| | | import options, { styles } from '@/store/options.js' |
| | | import { styles } from '@/store/options.js' |
| | | import UtilsDM from '@/utils/utils-datamanage.js' |
| | | import NotFount from '@/components/404' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | |
| | | } |
| | | |
| | | // 测试系统打印查询语句 |
| | | if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { |
| | | if (window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud')) { |
| | | _customScript && console.info(`${_dataresource ? '' : '/*不执行默认sql*/\n'}${_customScript}`) |
| | | _dataresource && console.info(_dataresource) |
| | | } |
| | |
| | | logout |
| | | } from '@/store/action' |
| | | import Api from '@/api' |
| | | import options from '@/store/options.js' |
| | | import Utils from '@/utils/utils.js' |
| | | import avatar from '@/assets/img/avatar.jpg' |
| | | import MainLogo from '@/assets/img/main-logo.png' |
| | |
| | | // 获取主菜单 |
| | | let _param = { |
| | | func: 's_get_pc_menus', |
| | | systemType: options.sysType, |
| | | systemType: window.GLOB.sysType, |
| | | pro_sys: window.GLOB.systemType === 'production' ? 'Y' : '', |
| | | debug: 'Y' |
| | | } |
| | |
| | | } |
| | | |
| | | gotoDoc = () => { |
| | | if (options.sysType === 'local' && window.GLOB.mainSystemApi) { |
| | | if (window.GLOB.sysType === 'local' && window.GLOB.mainSystemApi) { |
| | | let ssodomain = window.GLOB.mainSystemApi.replace('/webapi/dostars', '') |
| | | let url = `${ssodomain}/doc/index.html#?appkey=${window.GLOB.appkey}&LoginUID=${sessionStorage.getItem('LoginUID')}` |
| | | window.open(url) |
| | | } else if (options.sysType === 'SSO' || options.sysType === 'cloud') { |
| | | } else if (window.GLOB.sysType === 'SSO' || window.GLOB.sysType === 'cloud') { |
| | | window.open(`${window.location.href.replace(/\/index.html(.*)|\/#(.*)/ig, '')}/doc/index.html#?appkey=${window.GLOB.appkey}&LoginUID=${sessionStorage.getItem('LoginUID')}`) |
| | | } |
| | | } |
| | |
| | | <Switch size="small" style={{marginLeft: '7px'}} disabled={!!editLevel} checked={true} onChange={this.changeEditState} /> |
| | | </Menu.Item> |
| | | <Menu.Item key="doc" onClick={this.gotoDoc}>文档中心</Menu.Item> |
| | | {options.sysType !== 'cloud' ? <Menu.Item style={{padding: 0}} key="verup"> |
| | | {window.GLOB.sysType !== 'cloud' ? <Menu.Item style={{padding: 0}} key="verup"> |
| | | <VersionsUp /> |
| | | </Menu.Item> : null} |
| | | <Menu.Item key="logout" onClick={this.logout}>退出</Menu.Item> |
| | |
| | | import moment from 'moment' |
| | | |
| | | import Api from '@/api' |
| | | import options from '@/store/options.js' |
| | | import Utils from '@/utils/utils.js' |
| | | import './index.scss' |
| | | |
| | |
| | | } |
| | | |
| | | let edition_int = '' |
| | | if (options.sysType === 'SSO') { |
| | | if (window.GLOB.sysType === 'SSO') { |
| | | edition_int = result.edition_int_sso |
| | | } else if (options.sysType === 'local' && window.GLOB.systemType !== 'production') { |
| | | } else if (window.GLOB.sysType === 'local' && window.GLOB.systemType !== 'production') { |
| | | edition_int = result.edition_int_local |
| | | } else { |
| | | if (result.edition_int_sso < result.edition_int_local) { |
| | |
| | | return |
| | | } |
| | | |
| | | let sysType = options.sysType.toLowerCase() |
| | | let sysType = window.GLOB.sysType.toLowerCase() |
| | | |
| | | if (window.GLOB.systemType === 'production' || sysType !== 'local') { |
| | | sysType = '' |
| | |
| | | import Api from '@/api' |
| | | import Utils from '@/utils/utils.js' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import options, { styles } from '@/store/options.js' |
| | | import { styles } from '@/store/options.js' |
| | | import zhCN from '@/locales/zh-CN/login.js' |
| | | import enUS from '@/locales/en-US/login.js' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | |
| | | } else { |
| | | this.props.history.replace('/main') |
| | | } |
| | | } else if (res.ErrCode === 'Need_Get_Appkey' && options.sysType === 'SSO') { |
| | | } else if (res.ErrCode === 'Need_Get_Appkey' && window.GLOB.sysType === 'SSO') { |
| | | message.warning('应用尚未创建,请向云端同步应用!') |
| | | |
| | | this.setState({ |
| | |
| | | } else { |
| | | this.props.history.replace('/main') |
| | | } |
| | | } else if (res.ErrCode === 'Need_Get_Appkey' && options.sysType === 'SSO') { |
| | | } else if (res.ErrCode === 'Need_Get_Appkey' && window.GLOB.sysType === 'SSO') { |
| | | message.warning('应用尚未创建,请向云端同步应用!') |
| | | |
| | | this.setState({ |
| | |
| | | } else { |
| | | this.props.history.replace('/main') |
| | | } |
| | | } else if (res.ErrCode === 'Need_Get_Appkey' && options.sysType === 'SSO') { |
| | | } else if (res.ErrCode === 'Need_Get_Appkey' && window.GLOB.sysType === 'SSO') { |
| | | message.warning('应用尚未创建,请向云端同步应用!') |
| | | |
| | | this.setState({ |
| | |
| | | } |
| | | |
| | | if (!window.GLOB.licenseKey && (index === -1 || index > 5)) { |
| | | let _appId = window.GLOB.appId |
| | | |
| | | if (options.sysType === 'cloud') { // 云端使用系统配置appid |
| | | _appId = options.caId |
| | | } |
| | | |
| | | let str = md5('MK19' + _appId + timeStamp) |
| | | let str = md5('MK19' + window.GLOB.appId + timeStamp) |
| | | let _rduri = window.atob('aHR0cHM6Ly9lcGMubWs5aC5$mkjbi93ZWJhcGkvZG9zdGFycw=='.replace(/\$mk/ig, '')) |
| | | let _func = window.atob('c0VtcG93ZXJDbG91$mkZF9HZXRfTGlua1VybA=='.replace(/\$mk/ig, '')) |
| | | let _id = window.atob('YmgwYmFwYWJ0ZDQ1ZXBz$mkZ3JhNzlzZWdiY2g2YzFpYms='.replace(/\$mk/ig, '')) |
| | | |
| | | let param = { |
| | | func: _func, |
| | | AppID: _appId, |
| | | AppID: window.GLOB.appId, |
| | | TimeStamp: timeStamp, |
| | | appkey: window.GLOB.appkey, |
| | | userid: _id, |
| | |
| | | if (!res) return |
| | | |
| | | if (res.status) { |
| | | if (options.sysType === 'local' && window.GLOB.systemType !== 'production') { |
| | | if (window.GLOB.sysType === 'local' && window.GLOB.systemType !== 'production') { |
| | | if (md5(('mk' + window.GLOB.appkey + res.sys_datetime + res.member_type + res.registry_date).toLowerCase()) !== res.secret_key) { |
| | | Modal.warning({ |
| | | title: '密钥错误,请联系管理员!', |
| | |
| | | func: 's_get_app_from_cloud', |
| | | UserName: '', |
| | | Password: '', |
| | | systemType: options.sysType, |
| | | systemType: window.GLOB.sysType, |
| | | Type: 'X', |
| | | debug: 'Y' |
| | | } |
| | | |
| | | param.appkey = window.GLOB.appkey || '' |
| | | |
| | | if (options.cloudServiceApi) { |
| | | param.rduri = options.cloudServiceApi.replace('dostars', 'dostar') |
| | | if (window.GLOB.cloudServiceApi) { |
| | | param.rduri = window.GLOB.cloudServiceApi.replace('dostars', 'dostar') |
| | | } |
| | | |
| | | this.logincloudRef.handleConfirm().then(result => { |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { langList } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | | const { activeKey, verdisabled, delay, loginWays, remember, scanId, timeout, hasScan, users } = this.state |
| | | const wayLabels = {app_scan: '扫码登录', uname_pwd: '账号登录', sms_vcode: '短信登录'} |
| | |
| | | initialValue: remember, |
| | | })(<Checkbox onChange={this.rememberChange}>{this.props.dict['login.remember']}</Checkbox>)} |
| | | </Form.Item> : <div style={{height: '30px', float: 'left'}}></div>} |
| | | {this.props.langList && this.props.langList.length > 0 ? <Form.Item className="minline right"> |
| | | {langList && langList.length > 0 ? <Form.Item className="minline right"> |
| | | {getFieldDecorator('lang', { |
| | | initialValue: this.props.lang, |
| | | })( |
| | |
| | | onChange={(value) => {this.changelang(value)}} |
| | | getPopupContainer={() => document.getElementById('login-form')} |
| | | > |
| | | {this.props.langList.map((item, index) => { |
| | | {langList.map((item, index) => { |
| | | return <Select.Option key={index} value={item.Lang}>{item.LangName}</Select.Option> |
| | | })} |
| | | </Select> |
| | |
| | | {this.props.dict['login.submit']} |
| | | </Button> |
| | | </Form.Item> |
| | | {options.sysType === 'cloud' && options.cdomain.indexOf('mk9h') > -1 ? <Form.Item className="register-line"> |
| | | {window.GLOB.sysType === 'cloud' && options.cdomain.indexOf('mk9h') > -1 ? <Form.Item className="register-line"> |
| | | <a href="http://www.minkesoft.com/signup" target="_blank" rel="noopener noreferrer" className="register">注册</a> |
| | | <a href="http://www.minkesoft.com/forgotPwd" target="_blank" rel="noopener noreferrer" className="forgot">忘记密码?</a> |
| | | </Form.Item> : null} |
| | |
| | | /> |
| | | )} |
| | | </Form.Item> |
| | | {this.props.langList && this.props.langList.length > 0 ? <Form.Item className="minline right"> |
| | | {langList && langList.length > 0 ? <Form.Item className="minline right"> |
| | | {getFieldDecorator('lang', { |
| | | initialValue: this.props.lang, |
| | | })( |
| | |
| | | onChange={(value) => {this.changelang(value)}} |
| | | getPopupContainer={() => document.getElementById('login-form')} |
| | | > |
| | | {this.props.langList.map((item, index) => { |
| | | {langList.map((item, index) => { |
| | | return <Select.Option key={index} value={item.Lang}>{item.LangName}</Select.Option> |
| | | })} |
| | | </Select> |
| | |
| | | {this.props.dict['login.submit']} |
| | | </Button> |
| | | </Form.Item> |
| | | {options.sysType === 'cloud' && options.cdomain.indexOf('mk9h') > -1 ? <Form.Item className="register-line"> |
| | | {window.GLOB.sysType === 'cloud' && options.cdomain.indexOf('mk9h') > -1 ? <Form.Item className="register-line"> |
| | | <a href="http://www.minkesoft.com/signup" target="_blank" rel="noopener noreferrer" className="register">注册</a> |
| | | <a href="http://www.minkesoft.com/forgotPwd" target="_blank" rel="noopener noreferrer" className="forgot">忘记密码?</a> |
| | | </Form.Item> : null} |
| | |
| | | import { QuestionCircleOutlined } from '@ant-design/icons' |
| | | |
| | | import Api from '@/api' |
| | | import options from '@/store/options.js' |
| | | // import './index.scss' |
| | | |
| | | class CustomMenuForm extends Component { |
| | |
| | | } |
| | | |
| | | getMenus = () => { |
| | | Api.getCloudConfig({func: 's_get_pc_menus', systemType: options.sysType, debug: 'Y'}).then(result => { |
| | | Api.getCloudConfig({func: 's_get_pc_menus', systemType: window.GLOB.sysType, debug: 'Y'}).then(result => { |
| | | if (result.status) { |
| | | let thdMenuList = [] |
| | | let menulist = result.fst_menu.map(fst => { |
| | |
| | | import md5 from 'md5' |
| | | |
| | | import Api from '@/api' |
| | | import options from '@/store/options.js' |
| | | import Utils, { setGLOBFuncs } from '@/utils/utils.js' |
| | | import antdZhCN from 'antd/es/locale/zh_CN' |
| | | import MKEmitter from '@/utils/events.js' |
| | |
| | | Base64Img: canvas.toDataURL('image/png') // 获取生成的图片 |
| | | } |
| | | |
| | | if (options.cloudServiceApi) { |
| | | param.rduri = options.cloudServiceApi |
| | | if (window.GLOB.cloudServiceApi) { |
| | | param.rduri = window.GLOB.cloudServiceApi |
| | | param.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } |
| | |
| | | import { QuestionCircleOutlined } from '@ant-design/icons' |
| | | |
| | | import Api from '@/api' |
| | | import options from '@/store/options.js' |
| | | import './index.scss' |
| | | |
| | | const { TextArea } = Input |
| | |
| | | getMenus = () => { |
| | | const { MenuId, config } = this.props |
| | | |
| | | Api.getCloudConfig({func: 's_get_pc_menus', systemType: options.sysType, debug: 'Y'}).then(result => { |
| | | Api.getCloudConfig({func: 's_get_pc_menus', systemType: window.GLOB.sysType, debug: 'Y'}).then(result => { |
| | | if (result.status) { |
| | | let thdMenu = null |
| | | let thdMenuList = [] |
| | |
| | | qrurl, |
| | | imgurl |
| | | } from './option.js' |
| | | import options from '@/store/options.js' |
| | | import Utils from '@/utils/utils.js' |
| | | import printCtrl from './print.js' |
| | | import Api from '@/api' |
| | |
| | | Base64Img: res |
| | | } |
| | | |
| | | if (options.cloudServiceApi) { |
| | | param.rduri = options.cloudServiceApi |
| | | if (window.GLOB.cloudServiceApi) { |
| | | param.rduri = window.GLOB.cloudServiceApi |
| | | param.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } |
| | |
| | | import { FolderOutlined } from '@ant-design/icons' |
| | | |
| | | import { SySMenuList } from './config' |
| | | import options from '@/store/options.js' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import './index.scss' |
| | | |
| | |
| | | menulist = menulist.filter(menu => menu.children.length > 0) |
| | | } else { |
| | | menulist.forEach(menu => { |
| | | menu.children = menu.children.filter(item => !item.systems || item.systems.includes(options.sysType)) |
| | | menu.children = menu.children.filter(item => !item.systems || item.systems.includes(window.GLOB.sysType)) |
| | | }) |
| | | |
| | | menulist = menulist.filter(menu => menu.children.length > 0) |
| | |
| | | import { Form, Row, Col, Input, Select, notification, Switch } from 'antd' |
| | | |
| | | import Api from '@/api' |
| | | import options from '@/store/options.js' |
| | | import './index.scss' |
| | | |
| | | const { TextArea } = Input |
| | |
| | | getMenus = () => { |
| | | const { MenuId, config } = this.props |
| | | |
| | | Api.getCloudConfig({func: 's_get_pc_menus', systemType: options.sysType, debug: 'Y'}).then(result => { |
| | | Api.getCloudConfig({func: 's_get_pc_menus', systemType: window.GLOB.sysType, debug: 'Y'}).then(result => { |
| | | if (result.status) { |
| | | let thdMenu = null |
| | | let thdMenuList = [] |