| | |
| | | var appPort = 'admin/index.html' |
| | | if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) { |
| | | appPort = 'mob/index.html' |
| | | } else { |
| | | if (config.defaultApp) { |
| | | appPort = 'pc/' |
| | | } |
| | | } else if (config.defaultApp) { |
| | | appPort = 'pc/index.html' |
| | | } |
| | | window.location.replace(url + appPort) |
| | | } |
| | |
| | | interType: null, // 接口类型:内部、外部 |
| | | funcType: null, // 功能类型 |
| | | procMode: null, // 参数方式 |
| | | pageTemplate: null, |
| | | Ot: null, |
| | | requireOptions: [{ |
| | | value: 'notRequired', |
| | |
| | | let _opentype = card.OpenType // 打开方式 |
| | | let _intertype = card.intertype || 'system' // 接口类型 |
| | | let _funcType = card.funcType || '' // 功能按钮默认类型 |
| | | let _procMode = card.procMode || 'system' // 参数请求方式 |
| | | let _Ot = card.Ot || 'requiredSgl' // 参数请求方式 |
| | | let _procMode = card.procMode || 'system' |
| | | let _Ot = card.Ot || 'requiredSgl' |
| | | let _pageTemplate = card.pageTemplate || '' |
| | | |
| | | let _options = this.getOptions(_opentype, _intertype, _funcType, card.pageTemplate, _procMode, _Ot) |
| | | let _options = this.getOptions(_opentype, _intertype, _funcType, _pageTemplate, _procMode, _Ot) |
| | | |
| | | this.setState({ |
| | | Ot: _Ot, |
| | |
| | | interType: _intertype, |
| | | procMode: _procMode, |
| | | funcType: _funcType, |
| | | pageTemplate: _pageTemplate, |
| | | formlist: this.props.formlist.map(item => { |
| | | if (item.key === 'class') { |
| | | item.options = btnCustomClasses |
| | |
| | | } else if (item.key === 'Ot') { |
| | | if (type === 'card') { |
| | | item.options = this.state.requireOptions.filter(op => ['notRequired', 'requiredSgl'].includes(op.value)) |
| | | } else if (card.pageTemplate === 'pay') { // 行级按钮、支付按钮,只能选单行 |
| | | } else if (_pageTemplate === 'pay') { // 行级按钮、支付按钮,只能选单行 |
| | | item.options = this.state.requireOptions.filter(op => ['requiredSgl'].includes(op.value)) |
| | | } else if (['innerpage', 'tab', 'popview', 'excelIn'].includes(_opentype)) { |
| | | item.options = this.state.requireOptions.filter(op => ['notRequired', 'requiredSgl'].includes(op.value)) |
| | |
| | | */ |
| | | optionChange = (key, value) => { |
| | | const { card, type } = this.props |
| | | const { openType, procMode, Ot } = this.state |
| | | const { openType, procMode, Ot, pageTemplate } = this.state |
| | | |
| | | if (key === 'OpenType') { |
| | | let _options = this.getOptions(value, 'system', this.state.funcType, card.pageTemplate, 'system', Ot) |
| | | let _options = this.getOptions(value, 'system', this.state.funcType, '', 'system', Ot) |
| | | |
| | | let _fieldval = {} |
| | | |
| | | let _formlist = this.state.formlist.map(item => { |
| | | item.hidden = !_options.includes(item.key) |
| | | |
| | |
| | | item.options = this.state.insertUpdateOptions |
| | | } |
| | | _fieldval.sqlType = '' |
| | | } else if (item.key === 'pageTemplate') { |
| | | item.initVal = '' |
| | | } |
| | | |
| | | return item |
| | |
| | | openType: value, |
| | | intertype: 'system', |
| | | procMode: 'system', |
| | | pageTemplate: '', |
| | | formlist: _formlist |
| | | }, () => { |
| | | if (value === 'excelIn') { |
| | |
| | | this.props.form.setFieldsValue(_fieldval) |
| | | }) |
| | | } else if (key === 'funcType') { |
| | | let _options = this.getOptions(openType, this.state.interType, value, card.pageTemplate, procMode, Ot) |
| | | let _options = this.getOptions(openType, this.state.interType, value, pageTemplate, procMode, Ot) |
| | | let _fieldval = {} |
| | | |
| | | this.setState({ |
| | |
| | | let _options = this.getOptions(openType, this.state.interType, this.state.funcType, value, procMode, Ot) |
| | | |
| | | this.setState({ |
| | | pageTemplate: value, |
| | | formlist: this.state.formlist.map(item => { |
| | | item.hidden = !_options.includes(item.key) |
| | | |
| | |
| | | this.props.form.setFieldsValue(_fieldval) |
| | | }) |
| | | } else if (key === 'intertype') { |
| | | let _options = this.getOptions(openType, value, this.state.funcType, '', procMode, Ot) |
| | | let _options = this.getOptions(openType, value, this.state.funcType, pageTemplate, procMode, Ot) |
| | | |
| | | this.setState({ |
| | | interType: value, |
| | |
| | | }) |
| | | }) |
| | | } else if (key === 'procMode') { |
| | | let _options = this.getOptions(openType, this.state.interType, this.state.funcType, '', value, Ot) |
| | | let _options = this.getOptions(openType, this.state.interType, this.state.funcType, pageTemplate, value, Ot) |
| | | |
| | | this.setState({ |
| | | procMode: value, |
| | |
| | | }) |
| | | }) |
| | | } else if (key === 'Ot') { |
| | | let _options = this.getOptions(openType, this.state.interType, this.state.funcType, '', procMode, value) |
| | | let _options = this.getOptions(openType, this.state.interType, this.state.funcType, pageTemplate, procMode, value) |
| | | |
| | | this.setState({ |
| | | Ot: value, |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'select') { // 下拉搜索 |
| | | } else if (item.type === 'select') { |
| | | fields.push( |
| | | <Col span={12} key={index}> |
| | | <Form.Item label={item.tooltip ? |
| | |
| | | })( |
| | | <Select |
| | | showSearch |
| | | filterOption={(input, option) => option.props.children[2].toLowerCase().indexOf(input.toLowerCase()) >= 0} |
| | | allowClear={item.allowClear === true} |
| | | filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} |
| | | onChange={(value) => {this.optionChange(item.key, value)}} |
| | | getPopupContainer={() => document.getElementById('winter')} |
| | | > |
| | | {item.options.map((option, index) => |
| | | <Select.Option id={index} key={option.value || option.field} value={option.value || option.field}> |
| | | {option.text || option.label} |
| | | <Select.Option key={index} value={(option.value || option.field)}> |
| | | {(option.text || option.label)} |
| | | </Select.Option> |
| | | )} |
| | | </Select> |
| | |
| | | forbid: !isApp, |
| | | options: appMenus |
| | | }, |
| | | // { |
| | | // type: 'select', |
| | | // key: 'copyMenuId', |
| | | // label: '复制菜单', |
| | | // initVal: card.copyMenuId || '', |
| | | // required: false, |
| | | // options: appMenus |
| | | // }, |
| | | { |
| | | type: 'textarea', |
| | | key: 'url', |
| | |
| | | tooltip: '禁用控制字段,可根据数据控制按钮是否禁用。', |
| | | initVal: card.controlField || '', |
| | | required: false, |
| | | options: [{label: '无', field: ''}, ...columns] |
| | | allowClear: true, |
| | | options: columns |
| | | }, |
| | | { |
| | | type: 'text', |
| | |
| | | key: 'openmenu', |
| | | label: '打开菜单', |
| | | tooltip: '执行成功后需要打开的菜单。', |
| | | initVal: card.openmenu, |
| | | initVal: card.openmenu || '', |
| | | forbid: appType !== 'pc' && appType !== 'mob', |
| | | required: false, |
| | | options: [{value: '', text: '无'}, ...appMenus] |
| | | allowClear: true, |
| | | options: appMenus |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | /** |
| | | * @description 获取显示列表单配置信息 |
| | | * @param {object} card // 搜索条件对象 |
| | | * @param {Array} menulist // 菜单列表-用于字段透视 |
| | | */ |
| | | export function getColumnForm (card, menulist = [], fields = []) { |
| | | export function getColumnForm (card, fields = []) { |
| | | let appType = sessionStorage.getItem('appType') |
| | | let roleList = sessionStorage.getItem('sysRoles') |
| | | if (roleList) { |
| | |
| | | } |
| | | } else { |
| | | roleList = [] |
| | | } |
| | | |
| | | let menulist = [] |
| | | |
| | | if (appType === 'pc') { |
| | | menulist = sessionStorage.getItem('appMenus') |
| | | } else if (!appType) { |
| | | menulist = sessionStorage.getItem('fstMenuList') |
| | | } |
| | | |
| | | if (menulist) { |
| | | try { |
| | | menulist = JSON.parse(menulist) |
| | | } catch { |
| | | menulist = [] |
| | | } |
| | | } else { |
| | | menulist = [] |
| | | } |
| | | |
| | | let options = [{ |
| | |
| | | forbidden: appType === 'mob' |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | | type: appType === 'pc' ? 'select' : 'cascader', |
| | | key: 'linkmenu', |
| | | label: Formdict['model.menu'], |
| | | initVal: card.linkmenu || [], |
| | | initVal: card.linkmenu || (appType === 'pc' ? '' : []), |
| | | required: true, |
| | | options: menulist, |
| | | forbidden: appType === 'mob' |
| | |
| | | forbidden: appType === 'mob' |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'open', |
| | | label: '打开方式', |
| | | initVal: card.open || 'blank', |
| | | required: false, |
| | | forbid: appType !== 'pc', |
| | | options: [ |
| | | { value: 'blank', text: '新窗口' }, |
| | | { value: 'self', text: '当前窗口' } |
| | | ] |
| | | }, |
| | | { |
| | | type: 'multiselect', |
| | | key: 'blacklist', |
| | | label: Formdict['header.form.blacklist'], |
| | |
| | | } |
| | | |
| | | editColumn = (column) => { |
| | | let menulist = sessionStorage.getItem('fstMenuList') |
| | | if (menulist) { |
| | | try { |
| | | menulist = JSON.parse(menulist) |
| | | } catch { |
| | | menulist = [] |
| | | } |
| | | } else { |
| | | menulist = [] |
| | | } |
| | | |
| | | let formlist = getColumnForm(column, menulist, this.props.fields) |
| | | let formlist = getColumnForm(column, this.props.fields) |
| | | let _options = fromJS(columnTypeOptions[column.type]).toJS() |
| | | if (column.type === 'text' || column.type === 'number') { |
| | | if (column.perspective === 'linkmenu') { |
| | | _options.push('linkmenu', 'linkfields') |
| | | _options.push('linkmenu', 'linkfields', 'open') |
| | | } else if (column.perspective === 'linkurl') { |
| | | _options.push('linkurl', 'linkfields') |
| | | _options.push('linkurl', 'linkfields', 'open') |
| | | } |
| | | } |
| | | |
| | |
| | | let _options = fromJS(columnTypeOptions[this.state.type]).toJS() |
| | | |
| | | if (value === 'linkmenu') { |
| | | _options.push('linkmenu', 'linkfields') |
| | | _options.push('linkmenu', 'linkfields', 'open') |
| | | } else if (value === 'linkurl') { |
| | | _options.push('linkurl', 'linkfields') |
| | | _options.push('linkurl', 'linkfields', 'open') |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'select') { // 下拉搜索 |
| | | } else if (item.type === 'select') { |
| | | fields.push( |
| | | <Col span={12} key={index}> |
| | | <Form.Item label={item.label}> |
| | |
| | | getPopupContainer={() => document.getElementById('columnwinter')} |
| | | > |
| | | {item.options.map((option, index) => |
| | | <Select.Option key={`${option.value || option.field}${index}`} datatype={option.datatype || ''} value={option.value || option.field}> |
| | | {option.text || option.label} |
| | | <Select.Option key={index} datatype={option.datatype || ''} value={(option.value || option.field || option.MenuID)}> |
| | | {(option.text || option.label || option.MenuName)} |
| | | </Select.Option> |
| | | )} |
| | | </Select> |
| | |
| | | } |
| | | }) |
| | | |
| | | let style = {} |
| | | if (setting.paddingLeft) { |
| | | style.paddingLeft = setting.paddingLeft |
| | | } |
| | | if (setting.paddingRight) { |
| | | style.paddingRight = setting.paddingRight |
| | | } |
| | | |
| | | return ( |
| | | <div ref={drop} className="ant-row modal-fields-row mob-form" > |
| | | <div ref={drop} className="ant-row modal-fields-row mob-form" style={style}> |
| | | {cards.map(card => { |
| | | return <Card |
| | | id={card.uuid} |
| | |
| | | paddingTop = '56.25%' |
| | | } |
| | | |
| | | let style = {} |
| | | |
| | | if (borderColor) { |
| | | style.borderColor = borderColor |
| | | } |
| | | let style = borderColor ? {borderColor} : {} |
| | | let _style = backgroundColor ? {backgroundColor} : null |
| | | |
| | | if (!options || options.length === 0) { |
| | | return null |
| | |
| | | if (!fields || fields.length === 0) { |
| | | return null |
| | | } |
| | | if (backgroundColor) { |
| | | style.backgroundColor = backgroundColor |
| | | } |
| | | |
| | | return options.map(item => { |
| | | let _active = false |
| | | if (multiple === 'true' && selectKeys.includes(item.$value)) { |
| | |
| | | } |
| | | |
| | | return <Col span={width} key={item.key}> |
| | | <div className={'card-cell ' + (_active ? 'active' : '')} style={style} onClick={() => this.changeCard(item)}> |
| | | <div className={'card-cell' + (_active ? ' active' : '') + (_style ? ' bg-control' : '')} style={style} onClick={() => this.changeCard(item)}> |
| | | <div className="bg-mask" style={_style}></div> |
| | | {fields.map(col => { |
| | | return <span key={col.key} style={{color: col.color, fontSize: col.fontSize + 'px', height: col.fontSize * 1.5 + 'px', textAlign: col.align}}>{item[col.field]}</span> |
| | | })} |
| | |
| | | margin-bottom: 12px; |
| | | line-height: 1.5; |
| | | cursor: pointer; |
| | | transition: all 0.3s; |
| | | span { |
| | | display: block; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | position: relative; |
| | | z-index: 1; |
| | | } |
| | | transition: all 0.3s; |
| | | .bg-mask { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | opacity: 0.5; |
| | | border-radius: 4px; |
| | | background-color: transparent; |
| | | transition: opacity 0.3s; |
| | | } |
| | | } |
| | | .card-cell.active { |
| | | .card-cell:not(.bg-control).active { |
| | | border-color: #1890ff; |
| | | background: #1890ff; |
| | | span { |
| | | color: #ffffff!important; |
| | | } |
| | | } |
| | | .card-cell.bg-control.active { |
| | | .bg-mask { |
| | | opacity: 1; |
| | | } |
| | | } |
| | | .card-pic-cell { |
| | |
| | | box-shadow: 0px 0px 4px #1890ff; |
| | | } |
| | | |
| | | .card-cell.active::after { |
| | | .card-cell:not(.bg-control).active::after { |
| | | content: ' '; |
| | | position: absolute; |
| | | display: table; |
| | |
| | | } |
| | | } |
| | | .check-card-form-box:not(.readonly) { |
| | | .card-cell:hover { |
| | | .card-cell:not(.bg-control):hover { |
| | | border-color: #1890ff; |
| | | background: #1890ff; |
| | | span { |
| | | color: #ffffff!important; |
| | | } |
| | | } |
| | | .card-cell.bg-control:not(.active):hover { |
| | | .bg-mask { |
| | | opacity: 0.7; |
| | | } |
| | | } |
| | | .card-pic-cell:hover { |
| | | border-color: #1890ff; |
| | | box-shadow: 0px 0px 4px #1890ff; |
| | |
| | | } |
| | | |
| | | if (display !== 'picture') { |
| | | if (backgroundColor) { |
| | | style.backgroundColor = backgroundColor |
| | | } |
| | | let _style = backgroundColor ? {backgroundColor} : null |
| | | |
| | | if (!options || options.length === 0) { |
| | | return <Col span={width}> |
| | | <div className="card-cell" style={style}> |
| | | <div className="bg-mask" style={_style}></div> |
| | | {fields ? fields.map(col => { |
| | | return <span key={col.key} style={{color: col.color, fontSize: col.fontSize + 'px', height: col.fontSize * 1.5 + 'px', textAlign: col.align}}>{col.field}</span> |
| | | }) : null} |
| | |
| | | return options.map(item => { |
| | | return <Col span={width} key={item.key}> |
| | | <div className="card-cell" style={style}> |
| | | <div className="bg-mask" style={_style}></div> |
| | | {fields.map(col => { |
| | | return <span key={col.key} style={{color: col.color, fontSize: col.fontSize + 'px', height: col.fontSize * 1.5 + 'px', textAlign: col.align}}>{item[col.field]}</span> |
| | | })} |
| | |
| | | .check-card-edit-box { |
| | | line-height: 1.5; |
| | | .card-cell { |
| | | position: relative; |
| | | border: 1px solid #bcbcbc; |
| | | border-radius: 4px; |
| | | padding: 6px; |
| | |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | position: relative; |
| | | z-index: 1; |
| | | } |
| | | .bg-mask { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | opacity: 0.5; |
| | | border-radius: 4px; |
| | | background-color: transparent; |
| | | } |
| | | } |
| | | .card-pic-cell { |
| | |
| | | import PropTypes from 'prop-types' |
| | | import { Form, Row, Col, Input, Radio, InputNumber, Select, Tooltip, Icon } from 'antd' |
| | | import { formRule } from '@/utils/option.js' |
| | | import StyleInput from '@/menu/stylecontroller/styleInput' |
| | | import './index.scss' |
| | | |
| | | class SettingForm extends Component { |
| | |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {appType === 'mob' ? <Col span={12}> |
| | | <Form.Item label="左边距"> |
| | | {getFieldDecorator('paddingLeft', { |
| | | initialValue: config.setting.paddingLeft || '10px' |
| | | })( |
| | | <StyleInput options={['px', '%']} /> |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {appType === 'mob' ? <Col span={12}> |
| | | <Form.Item label="右边距"> |
| | | {getFieldDecorator('paddingRight', { |
| | | initialValue: config.setting.paddingRight || '10px' |
| | | })( |
| | | <StyleInput options={['px', '%']} /> |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | </Row> |
| | | </Form> |
| | | ) |
| | |
| | | key: 'backgroundColor', |
| | | label: '背景色', |
| | | initVal: card.backgroundColor || '', |
| | | tooltip: '设置背景色后,选中效果由背景颜色控制。', |
| | | required: false |
| | | }, |
| | | { |
| | |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'hidelabel', |
| | | label: '隐藏名称', |
| | | initVal: card.hidelabel || 'false', |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'readonly', |
| | | label: Formdict['header.form.readonly'], |
| | | initVal: card.readonly || 'false', |
| | |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'hidelabel', |
| | | label: '隐藏名称', |
| | | initVal: card.hidelabel || 'false', |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | }] |
| | | }, |
| | | { |
| | | type: 'color', |
| | | key: 'backgroundColor', |
| | | label: '背景色', |
| | | initVal: card.backgroundColor || '', |
| | | tooltip: '设置背景色后,选中效果由背景颜色控制。', |
| | | required: false |
| | | }, |
| | | { |
| | |
| | | _options.push('dataSource', 'cardValField', 'fields', 'orderBy', 'orderType', 'database', 'backgroundColor') |
| | | } |
| | | } |
| | | |
| | | if (sessionStorage.getItem('appType') === 'mob') { |
| | | _options.push('hidelabel') |
| | | } |
| | | } else if (type === 'fileupload') { |
| | | if (compress === 'true') { |
| | | _options.push('limit', 'rduri', 'proRduri') |
| | |
| | | <div> |
| | | <Button type="link" onClick={() => this.deleteSubApp(record)} style={{color: '#ff4d4f'}}>删除</Button> |
| | | <Button type="link" onClick={() => this.jumpApp(record)}>编辑应用</Button> |
| | | <Paragraph style={{display: 'inline-block', margin: 0}} copyable={{ text: `${base_url}${record.typename === 'pad' ? 'mob' : record.typename}/index.html#/index/${this.state.selectApp.kei_no}/${record.lang}` }}></Paragraph> |
| | | <Paragraph style={{display: 'inline-block', margin: 0}} copyable={{ text: `${base_url}${record.typename === 'pad' ? 'mob' : record.typename}/index.html#/index/${this.state.selectApp.kei_no}/${record.typename !== 'pc' ? record.typename + '/' : ''}${record.lang}` }}></Paragraph> |
| | | </div> |
| | | ) |
| | | }, |
| | |
| | | _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | _param.secretkey = Utils.encrypt('', _param.timestamp) |
| | | |
| | | let appMenuParam = null |
| | | if (item.type === 'navbar') { |
| | | appMenuParam = { |
| | | func: 's_appmenus_addupt', |
| | | exec_type: 'y' |
| | | } |
| | | // let appMenuParam = null |
| | | // if (item.type === 'navbar') { |
| | | // appMenuParam = { |
| | | // func: 's_appmenus_addupt', |
| | | // exec_type: 'y' |
| | | // } |
| | | |
| | | appMenuParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | appMenuParam.secretkey = Utils.encrypt('', _param.timestamp) |
| | | // appMenuParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | // appMenuParam.secretkey = Utils.encrypt('', _param.timestamp) |
| | | |
| | | let LText = [] |
| | | let app_param = [] |
| | | let kei_no = sessionStorage.getItem('kei_no') |
| | | let userid = sessionStorage.getItem('CloudUserID') || '' |
| | | // let LText = [] |
| | | // let app_param = [] |
| | | // let kei_no = sessionStorage.getItem('kei_no') |
| | | // let userid = sessionStorage.getItem('CloudUserID') || '' |
| | | |
| | | item.menus.forEach((fst, findex) => { |
| | | // LText.push(`select '${fst.MenuID}','${fst.name}','','0','${sessionStorage.getItem('appId')}','0','${(findex + 1) * 10}','10','','${userid}','${window.GLOB.appkey}','${fst.MenuNo || ''}','${kei_no}','pc'`) |
| | | LText.push(`select '${fst.MenuID}','${fst.name}','','0','0','0','${(findex + 1) * 10}','10','','${userid}','${window.GLOB.appkey}','${fst.MenuNo || ''}','${kei_no}','pc'`) |
| | | app_param.push(`select '${window.GLOB.appkey}','${fst.MenuID}','${userid}','${(findex + 1) * 10}','','${fst.name}','${fst.MenuNo || ''}','0','10','${kei_no}','pc'`) |
| | | if (fst.property === 'classify' && fst.sublist.length > 0) { |
| | | fst.sublist.forEach(scd => { |
| | | LText.push(`select '${scd.MenuID}','${scd.name}','','0','${fst.MenuID}','0','${(findex + 1) * 10}','20','','${userid}','${window.GLOB.appkey}','${scd.MenuNo || ''}','${kei_no}','pc'`) |
| | | app_param.push(`select '${window.GLOB.appkey}','${scd.MenuID}','${userid}','${(findex + 1) * 10}','','${scd.name}','${scd.MenuNo || ''}','${fst.MenuID}','20','${kei_no}','pc'`) |
| | | // item.menus.forEach((fst, findex) => { |
| | | // // LText.push(`select '${fst.MenuID}','${fst.name}','','0','${sessionStorage.getItem('appId')}','0','${(findex + 1) * 10}','10','','${userid}','${window.GLOB.appkey}','${fst.MenuNo || ''}','${kei_no}','pc'`) |
| | | // LText.push(`select '${fst.MenuID}','${fst.name}','','0','0','0','${(findex + 1) * 10}','10','','${userid}','${window.GLOB.appkey}','${fst.MenuNo || ''}','${kei_no}','pc'`) |
| | | // app_param.push(`select '${window.GLOB.appkey}','${fst.MenuID}','${userid}','${(findex + 1) * 10}','','${fst.name}','${fst.MenuNo || ''}','0','10','${kei_no}','pc'`) |
| | | // if (fst.property === 'classify' && fst.sublist.length > 0) { |
| | | // fst.sublist.forEach(scd => { |
| | | // LText.push(`select '${scd.MenuID}','${scd.name}','','0','${fst.MenuID}','0','${(findex + 1) * 10}','20','','${userid}','${window.GLOB.appkey}','${scd.MenuNo || ''}','${kei_no}','pc'`) |
| | | // app_param.push(`select '${window.GLOB.appkey}','${scd.MenuID}','${userid}','${(findex + 1) * 10}','','${scd.name}','${scd.MenuNo || ''}','${fst.MenuID}','20','${kei_no}','pc'`) |
| | | |
| | | if (scd.property === 'classify' && scd.sublist.length > 0) { |
| | | scd.sublist.forEach(thd => { |
| | | LText.push(`select '${thd.MenuID}','${thd.name}','','0','${scd.MenuID}','0','${(findex + 1) * 10}','20','','${userid}','${window.GLOB.appkey}','${thd.MenuNo || ''}','${kei_no}','pc'`) |
| | | app_param.push(`select '${window.GLOB.appkey}','${thd.MenuID}','${userid}','${(findex + 1) * 10}','','${thd.name}','${thd.MenuNo || ''}','${scd.MenuID}','20','${kei_no}','pc'`) |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | appMenuParam.LText = Utils.formatOptions(LText.join(' union ')) |
| | | appMenuParam.LText1 = Utils.formatOptions(app_param.join(' union ')) |
| | | } |
| | | // if (scd.property === 'classify' && scd.sublist.length > 0) { |
| | | // scd.sublist.forEach(thd => { |
| | | // LText.push(`select '${thd.MenuID}','${thd.name}','','0','${scd.MenuID}','0','${(findex + 1) * 10}','20','','${userid}','${window.GLOB.appkey}','${thd.MenuNo || ''}','${kei_no}','pc'`) |
| | | // app_param.push(`select '${window.GLOB.appkey}','${thd.MenuID}','${userid}','${(findex + 1) * 10}','','${thd.name}','${thd.MenuNo || ''}','${scd.MenuID}','20','${kei_no}','pc'`) |
| | | // }) |
| | | // } |
| | | // }) |
| | | // } |
| | | // }) |
| | | // appMenuParam.LText = Utils.formatOptions(LText.join(' union ')) |
| | | // appMenuParam.LText1 = Utils.formatOptions(app_param.join(' union ')) |
| | | // } |
| | | |
| | | if (appMenuParam) { |
| | | Api.getSystemConfig(appMenuParam).then(_res => { |
| | | if (!_res.status) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: _res.message, |
| | | duration: 5 |
| | | }) |
| | | this.setState({ menuloading: false }) |
| | | return |
| | | } |
| | | // if (appMenuParam) { |
| | | // Api.getSystemConfig(appMenuParam).then(_res => { |
| | | // if (!_res.status) { |
| | | // notification.warning({ |
| | | // top: 92, |
| | | // message: _res.message, |
| | | // duration: 5 |
| | | // }) |
| | | // this.setState({ menuloading: false }) |
| | | // return |
| | | // } |
| | | |
| | | Api.getSystemConfig(_param).then(res => { |
| | | if (!res.status) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: res.message, |
| | | duration: 5 |
| | | }) |
| | | this.setState({ menuloading: false }) |
| | | return |
| | | } |
| | | // Api.getSystemConfig(_param).then(res => { |
| | | // if (!res.status) { |
| | | // notification.warning({ |
| | | // top: 92, |
| | | // message: res.message, |
| | | // duration: 5 |
| | | // }) |
| | | // this.setState({ menuloading: false }) |
| | | // return |
| | | // } |
| | | |
| | | new_open_edition[item.uuid] = res.open_edition || '' |
| | | // new_open_edition[item.uuid] = res.open_edition || '' |
| | | |
| | | resolve() |
| | | }) |
| | | }) |
| | | } else { |
| | | // resolve() |
| | | // }) |
| | | // }) |
| | | // } else { |
| | | Api.getSystemConfig(_param).then(res => { |
| | | if (!res.status) { |
| | | notification.warning({ |
| | |
| | | new_open_edition[item.uuid] = res.open_edition || '' |
| | | resolve() |
| | | }) |
| | | } |
| | | // } |
| | | }) |
| | | }) |
| | | Promise.all(deffers).then(() => { |
| | | let appViewList = sessionStorage.getItem('appViewList') |
| | | appViewList = JSON.parse(appViewList) |
| | | let _length = appViewList.length |
| | | let _appViewList = fromJS(appViewList).toJS() |
| | | let appIndeList = appViewList.map(item => item.keys_id).join(',') |
| | | |
| | | |
| | | config.components = config.components.map(item => { |
| | | if (item.type === 'navbar') { |
| | |
| | | keys_type: 'navbar', |
| | | remark: item.name |
| | | }) |
| | | } else { |
| | | appViewList = appViewList.map(view => { |
| | | if (view.keys_id === item.uuid) { |
| | | view.remark = item.name |
| | | } |
| | | return view |
| | | }) |
| | | } |
| | | } |
| | | return item |
| | | }) |
| | | |
| | | if (appViewList.length > _length) { |
| | | if (!is(fromJS(appViewList), fromJS(_appViewList))) { |
| | | let param = { |
| | | func: 's_kei_link_keyids_addupt', |
| | | BID: sessionStorage.getItem('appId'), |
| | |
| | | _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | _param.secretkey = Utils.encrypt('', _param.timestamp) |
| | | |
| | | let appMenuParam = null |
| | | if (item.type === 'navbar') { |
| | | appMenuParam = { |
| | | func: 's_appmenus_addupt', |
| | | exec_type: 'y' |
| | | } |
| | | // let appMenuParam = null |
| | | // if (item.type === 'navbar') { |
| | | // appMenuParam = { |
| | | // func: 's_appmenus_addupt', |
| | | // exec_type: 'y' |
| | | // } |
| | | |
| | | appMenuParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | appMenuParam.secretkey = Utils.encrypt('', _param.timestamp) |
| | | // appMenuParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | // appMenuParam.secretkey = Utils.encrypt('', _param.timestamp) |
| | | |
| | | let LText = [] |
| | | let app_param = [] |
| | | let kei_no = sessionStorage.getItem('kei_no') |
| | | let userid = sessionStorage.getItem('CloudUserID') || '' |
| | | // let LText = [] |
| | | // let app_param = [] |
| | | // let kei_no = sessionStorage.getItem('kei_no') |
| | | // let userid = sessionStorage.getItem('CloudUserID') || '' |
| | | |
| | | item.menus.forEach((fst, findex) => { |
| | | // LText.push(`select '${fst.MenuID}','${fst.name}','','0','${sessionStorage.getItem('appId')}','0','${(findex + 1) * 10}','10','','${userid}','${window.GLOB.appkey}','${fst.MenuNo || ''}','${kei_no}','pc'`) |
| | | LText.push(`select '${fst.MenuID}','${fst.name}','','0','0','0','${(findex + 1) * 10}','10','','${userid}','${window.GLOB.appkey}','${fst.MenuNo || ''}','${kei_no}','pc'`) |
| | | app_param.push(`select '${window.GLOB.appkey}','${fst.MenuID}','${userid}','${(findex + 1) * 10}','','${fst.name}','${fst.MenuNo || ''}','0','10','${kei_no}','pc'`) |
| | | if (fst.property === 'classify' && fst.sublist.length > 0) { |
| | | fst.sublist.forEach(scd => { |
| | | LText.push(`select '${scd.MenuID}','${scd.name}','','0','${fst.MenuID}','0','${(findex + 1) * 10}','20','','${userid}','${window.GLOB.appkey}','${scd.MenuNo || ''}','${kei_no}','pc'`) |
| | | app_param.push(`select '${window.GLOB.appkey}','${scd.MenuID}','${userid}','${(findex + 1) * 10}','','${scd.name}','${scd.MenuNo || ''}','${fst.MenuID}','20','${kei_no}','pc'`) |
| | | // item.menus.forEach((fst, findex) => { |
| | | // // LText.push(`select '${fst.MenuID}','${fst.name}','','0','${sessionStorage.getItem('appId')}','0','${(findex + 1) * 10}','10','','${userid}','${window.GLOB.appkey}','${fst.MenuNo || ''}','${kei_no}','pc'`) |
| | | // LText.push(`select '${fst.MenuID}','${fst.name}','','0','0','0','${(findex + 1) * 10}','10','','${userid}','${window.GLOB.appkey}','${fst.MenuNo || ''}','${kei_no}','pc'`) |
| | | // app_param.push(`select '${window.GLOB.appkey}','${fst.MenuID}','${userid}','${(findex + 1) * 10}','','${fst.name}','${fst.MenuNo || ''}','0','10','${kei_no}','pc'`) |
| | | // if (fst.property === 'classify' && fst.sublist.length > 0) { |
| | | // fst.sublist.forEach(scd => { |
| | | // LText.push(`select '${scd.MenuID}','${scd.name}','','0','${fst.MenuID}','0','${(findex + 1) * 10}','20','','${userid}','${window.GLOB.appkey}','${scd.MenuNo || ''}','${kei_no}','pc'`) |
| | | // app_param.push(`select '${window.GLOB.appkey}','${scd.MenuID}','${userid}','${(findex + 1) * 10}','','${scd.name}','${scd.MenuNo || ''}','${fst.MenuID}','20','${kei_no}','pc'`) |
| | | |
| | | if (scd.property === 'classify' && scd.sublist.length > 0) { |
| | | scd.sublist.forEach(thd => { |
| | | LText.push(`select '${thd.MenuID}','${thd.name}','','0','${scd.MenuID}','0','${(findex + 1) * 10}','20','','${userid}','${window.GLOB.appkey}','${thd.MenuNo || ''}','${kei_no}','pc'`) |
| | | app_param.push(`select '${window.GLOB.appkey}','${thd.MenuID}','${userid}','${(findex + 1) * 10}','','${thd.name}','${thd.MenuNo || ''}','${scd.MenuID}','20','${kei_no}','pc'`) |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | appMenuParam.LText = Utils.formatOptions(LText.join(' union ')) |
| | | appMenuParam.LText1 = Utils.formatOptions(app_param.join(' union ')) |
| | | } |
| | | // if (scd.property === 'classify' && scd.sublist.length > 0) { |
| | | // scd.sublist.forEach(thd => { |
| | | // LText.push(`select '${thd.MenuID}','${thd.name}','','0','${scd.MenuID}','0','${(findex + 1) * 10}','20','','${userid}','${window.GLOB.appkey}','${thd.MenuNo || ''}','${kei_no}','pc'`) |
| | | // app_param.push(`select '${window.GLOB.appkey}','${thd.MenuID}','${userid}','${(findex + 1) * 10}','','${thd.name}','${thd.MenuNo || ''}','${scd.MenuID}','20','${kei_no}','pc'`) |
| | | // }) |
| | | // } |
| | | // }) |
| | | // } |
| | | // }) |
| | | // appMenuParam.LText = Utils.formatOptions(LText.join(' union ')) |
| | | // appMenuParam.LText1 = Utils.formatOptions(app_param.join(' union ')) |
| | | // } |
| | | |
| | | if (appMenuParam) { |
| | | Api.getSystemConfig(appMenuParam).then(_res => { |
| | | if (!_res.status) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: _res.message, |
| | | duration: 5 |
| | | }) |
| | | this.setState({ menuloading: false }) |
| | | return |
| | | } |
| | | // if (appMenuParam) { |
| | | // Api.getSystemConfig(appMenuParam).then(_res => { |
| | | // if (!_res.status) { |
| | | // notification.warning({ |
| | | // top: 92, |
| | | // message: _res.message, |
| | | // duration: 5 |
| | | // }) |
| | | // this.setState({ menuloading: false }) |
| | | // return |
| | | // } |
| | | |
| | | Api.getSystemConfig(_param).then(res => { |
| | | if (!res.status) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: res.message, |
| | | duration: 5 |
| | | }) |
| | | this.setState({ menuloading: false }) |
| | | return |
| | | } |
| | | // Api.getSystemConfig(_param).then(res => { |
| | | // if (!res.status) { |
| | | // notification.warning({ |
| | | // top: 92, |
| | | // message: res.message, |
| | | // duration: 5 |
| | | // }) |
| | | // this.setState({ menuloading: false }) |
| | | // return |
| | | // } |
| | | |
| | | new_open_edition[item.uuid] = res.open_edition || '' |
| | | // new_open_edition[item.uuid] = res.open_edition || '' |
| | | |
| | | resolve() |
| | | }) |
| | | }) |
| | | } else { |
| | | // resolve() |
| | | // }) |
| | | // }) |
| | | // } else { |
| | | Api.getSystemConfig(_param).then(res => { |
| | | if (!res.status) { |
| | | notification.warning({ |
| | |
| | | new_open_edition[item.uuid] = res.open_edition || '' |
| | | resolve() |
| | | }) |
| | | } |
| | | // } |
| | | }) |
| | | }) |
| | | Promise.all(deffers).then(() => { |
| | | let appViewList = sessionStorage.getItem('appViewList') |
| | | appViewList = JSON.parse(appViewList) |
| | | let _length = appViewList.length |
| | | let _appViewList = fromJS(appViewList).toJS() |
| | | let appIndeList = appViewList.map(item => item.keys_id).join(',') |
| | | |
| | | |
| | | config.components = config.components.map(item => { |
| | | if (item.type === 'navbar') { |
| | |
| | | keys_type: 'navbar', |
| | | remark: item.name |
| | | }) |
| | | } else { |
| | | appViewList = appViewList.map(view => { |
| | | if (view.keys_id === item.uuid) { |
| | | view.remark = item.name |
| | | } |
| | | return view |
| | | }) |
| | | } |
| | | } |
| | | return item |
| | | }) |
| | | |
| | | if (appViewList.length > _length) { |
| | | if (!is(fromJS(appViewList), fromJS(_appViewList))) { |
| | | let kparam = { |
| | | func: 's_kei_link_keyids_addupt', |
| | | BID: sessionStorage.getItem('appId'), |