Merge branch 'master' into bms
| | |
| | | } |
| | | |
| | | /** |
| | | * @description 清空函数 |
| | | */ |
| | | static clearFuncs (sysType) { |
| | | if (sysType !== 'local' || window.GLOB.systemType !== '') return |
| | | if (window.GLOB.WebSql) { |
| | | window.GLOB.WebSql.transaction(tx => { |
| | | tx.executeSql('DELETE FROM FUNCS') |
| | | |
| | | tx.executeSql(`UPDATE VERSIONS SET createDate='1970-01-01 14:59:09.000' where CDefine1='funcs'`) |
| | | }) |
| | | } else if (window.GLOB.IndexDB) { |
| | | let objectStore = window.GLOB.IndexDB.transaction(['funcs'], 'readwrite').objectStore('funcs') |
| | | objectStore.clear() |
| | | |
| | | let funcStore = window.GLOB.IndexDB.transaction(['version'], 'readwrite').objectStore('version') |
| | | funcStore.put({id: 'funcs', version: '1.0', createDate: '1970-01-01 14:59:09.000'}) |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @description 获取websql中保存信息版本 |
| | | */ |
| | | static getWebSqlVersion () { |
| | |
| | | CacheUtils.updateWebSqlversion('1.00', curTime) |
| | | CacheUtils.clearIndexDBConfig() |
| | | CacheUtils.updateIndexDBversion({version: '1.00', createDate: curTime}) |
| | | CacheUtils.clearFuncs(options.sysType) |
| | | } |
| | | |
| | | /** |
| | |
| | | param.lang = param.lang || sessionStorage.getItem('lang') || '' |
| | | param.SessionUid = localStorage.getItem('SessionUid') || '' |
| | | param.LoginUID = param.LoginUID || sessionStorage.getItem('LoginUID') || '' |
| | | param.appkey = window.GLOB.appkey || '' |
| | | param.appkey = param.appkey || window.GLOB.appkey |
| | | |
| | | let url = '/webapi/dostars' |
| | | if (sessionStorage.getItem('isEditState') === 'true' && options.cloudServiceApi) { // 编辑状态,且存在云端地址 |
| | |
| | | if (!window.GLOB.WebSql && !window.GLOB.IndexDB) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '升级失败,请刷新页面重试!', |
| | | message: '更新失败,请刷新页面重试!', |
| | | duration: 2 |
| | | }) |
| | | resolve() |
| | |
| | | setTimeout(() => { |
| | | notification.success({ |
| | | top: 92, |
| | | message: '升级成功!', |
| | | message: '更新成功!', |
| | | duration: 2 |
| | | }) |
| | | resolve() |
| | |
| | | {/* 按钮使用系统存储过程时,验证信息模态框 */} |
| | | <Modal |
| | | wrapClassName="model-table-action-verify-modal" |
| | | title={'验证信息'} |
| | | title={(card && card.label ? card.label + ' - ' : '') + '验证信息'} |
| | | visible={profVisible} |
| | | width={'75vw'} |
| | | maskClosable={false} |
| | |
| | | {/* 按钮使用系统存储过程时,验证信息模态框 */} |
| | | <Modal |
| | | wrapClassName="model-table-action-verify-modal" |
| | | title={'验证信息'} |
| | | title={(card && card.label ? card.label + ' - ' : '') + '验证信息'} |
| | | visible={profVisible} |
| | | width={'75vw'} |
| | | maskClosable={false} |
| | |
| | | |
| | | let formItem = null |
| | | if (card.type === 'text' || card.type === 'number') { |
| | | formItem = (<div className="am-list-item"><div className="am-list-line"><div className="am-input-label">{card.label}</div><div className={'am-input-control ' + card.cursor}>{card.initval}</div>{card.scan && card.scan !== 'false' ? <div className="am-list-extra"><Icon type="scan" /></div> : null}</div></div>) |
| | | formItem = (<div className={'am-list-item ' + (card.place || '')}><div className="am-list-line"><div className="am-input-label">{card.label}</div><div className={'am-input-control ' + card.cursor}>{card.initval ? card.initval : <span style={{color: '#bcbcbc'}}>{card.placeholder || ''}</span> }</div>{card.scan && card.scan !== 'false' ? <div className="am-list-extra"><Icon type="scan" /></div> : null}</div></div>) |
| | | } else if (card.type === 'number') { |
| | | formItem = (<div className="am-list-item"><div className="am-list-line"><div className="am-input-label">{card.label}</div><div className={'am-input-control ' + card.cursor}>{card.initval}</div></div></div>) |
| | | } else if (card.type === 'select' || card.type === 'link') { |
| | |
| | | } |
| | | } |
| | | } |
| | | .am-list-item.up_down { |
| | | height: auto; |
| | | .am-list-line { |
| | | display: block; |
| | | .am-input-label { |
| | | width: auto; |
| | | line-height: 32px; |
| | | } |
| | | .am-input-control { |
| | | height: 40px; |
| | | line-height: 24px; |
| | | } |
| | | .am-list-extra { |
| | | display: none; |
| | | } |
| | | } |
| | | } |
| | | .am-list-item.check-card { |
| | | height: auto; |
| | | .am-list-line { |
| | |
| | | .menu-sign { |
| | | text-align: center; |
| | | .anticon { |
| | | border-radius: 50%; |
| | | border-radius: 15%; |
| | | } |
| | | img { |
| | | border-radius: 50%; |
| | | border-radius: 15%; |
| | | } |
| | | } |
| | | } |
| | |
| | | padding: card.setting.padding, |
| | | background: card.setting.background, |
| | | color: card.setting.color, |
| | | borderRadius: card.setting.borderRadius || '50%' |
| | | borderRadius: card.setting.borderRadius || '15%' |
| | | }} type={card.setting.icon}/> |
| | | </div> : <div className="menu-sign"> |
| | | <img style={{width: card.setting.imgWidth, height: card.setting.imgWidth, borderRadius: card.setting.borderRadius || '50%'}} src={card.setting.url} alt=""/> |
| | | <img style={{width: card.setting.imgWidth, height: card.setting.imgWidth, borderRadius: card.setting.borderRadius || '15%'}} src={card.setting.url} alt=""/> |
| | | </div>} |
| | | <div className="menu-name">{card.setting.name}</div> |
| | | </div> |
| | |
| | | type: 'styleInput', |
| | | field: 'borderRadius', |
| | | label: '圆角', |
| | | initval: setting.borderRadius || '50%', |
| | | initval: setting.borderRadius || '15%', |
| | | required: false |
| | | }, |
| | | { |
| | |
| | | } |
| | | }) |
| | | } |
| | | console.log(config) |
| | | |
| | | this.setState({ |
| | | loadingview: false, |
| | |
| | | let fields = [] |
| | | |
| | | config.fields.forEach(f => { |
| | | if (f.field && ['select', 'link', 'text', 'number'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') { |
| | | if (f.field && ['select', 'link', 'text', 'number', 'textarea'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') { |
| | | fields.push(f) |
| | | } |
| | | }) |
| | |
| | | copycard.focus = true |
| | | |
| | | copycard.originCard = card |
| | | copycard.originCard.appkey = window.GLOB.appkey |
| | | |
| | | if (copycard.OpenType === 'popview') { // 待完善 |
| | | copycard.linkTab = '' |
| | |
| | | |
| | | return Api.getSystemConfig({ |
| | | func: 'sPC_Get_LongParam', |
| | | MenuID: card.originCard.uuid |
| | | MenuID: card.originCard.uuid, |
| | | appkey: card.originCard.appkey || '' |
| | | }) |
| | | }).then(result => { // 复制按钮配置信息,保存至新添加按钮 |
| | | if (result === 'save' || result === 'subtab') return result |
| | |
| | | |
| | | return Api.getSystemConfig({ |
| | | func: 'sPC_Get_LongParam', |
| | | MenuID: card.originCard.linkTab |
| | | MenuID: card.originCard.linkTab, |
| | | appkey: card.originCard.appkey || '' |
| | | }) |
| | | }).then(result => { // 标签复制 |
| | | if (result === 'save') return result |
| | |
| | | {/* 按钮使用系统存储过程时,验证信息模态框 */} |
| | | <Modal |
| | | wrapClassName="model-table-action-verify-modal" |
| | | title={'验证信息'} |
| | | title={(card && card.label ? card.label + ' - ' : '') + '验证信息'} |
| | | visible={profVisible} |
| | | width={'75vw'} |
| | | maskClosable={false} |
| | |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'place', |
| | | label: '排列', |
| | | initVal: card.place || 'left_right', |
| | | tooltip: '提示文字与输入框的位置关系。注:上下排列是会禁用扫码功能。', |
| | | forbid: appType !== 'mob', |
| | | options: [{ |
| | | value: 'left_right', |
| | | text: '左右' |
| | | }, { |
| | | value: 'up_down', |
| | | text: '上下' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'count', |
| | | label: '计数功能', |
| | | initVal: card.count || 'false', |
| | |
| | | const DataTable = asyncComponent(() => import('./datatable')) |
| | | |
| | | const modalTypeOptions = { |
| | | text: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'regular', 'interception', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'scan', 'splitline', 'placeholder'], |
| | | number: ['initval', 'readonly', 'hidden', 'decimal', 'min', 'max', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'splitline'], |
| | | text: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'regular', 'interception', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'scan', 'splitline', 'placeholder', 'place'], |
| | | number: ['initval', 'readonly', 'hidden', 'decimal', 'min', 'max', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'splitline', 'place'], |
| | | select: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'setAll', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter', 'splitline', 'dropdown'], |
| | | checkbox: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'arrange'], |
| | | radio: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'setAll', 'emptyText', 'splitline', 'arrange'], |
| | |
| | | error = `组件《${item.name}》未设置数据源!` |
| | | } else if (!item.setting.primaryKey) { |
| | | error = `组件《${item.name}》未设置主键!` |
| | | } else if (!item.setting.supModule) { |
| | | } else if (!item.setting.supModule && item.type !== 'balcony') { |
| | | error = `组件《${item.name}》未设置上级组件!` |
| | | } |
| | | } |
| | |
| | | error = `组件《${item.name}》未设置数据源!` |
| | | } else if (!item.setting.primaryKey) { |
| | | error = `组件《${item.name}》未设置主键!` |
| | | } else if (!item.setting.supModule && item.type !== 'navbar') { |
| | | } else if (!item.setting.supModule && item.type !== 'navbar' && item.type !== 'balcony') { |
| | | error = `组件《${item.name}》未设置上级组件!` |
| | | } |
| | | } |
| | |
| | | error = `组件《${item.name}》未设置数据源!` |
| | | } else if (!item.setting.primaryKey) { |
| | | error = `组件《${item.name}》未设置主键!` |
| | | } else if (!item.setting.supModule) { |
| | | } else if (!item.setting.supModule && item.type !== 'balcony') { |
| | | error = `组件《${item.name}》未设置上级组件!` |
| | | } |
| | | } |