| | |
| | | const TableNodes = asyncComponent(() => import('@/menu/tablenodes')) |
| | | const BgController = asyncComponent(() => import('@/pc/bgcontroller')) |
| | | const ReplaceField = asyncComponent(() => import('@/menu/replaceField')) |
| | | const NormalCss = asyncComponent(() => import('@/menu/normalCss')) |
| | | const SysInterface = asyncComponent(() => import('@/menu/sysinterface')) |
| | | const Quotecomponent = asyncComponent(() => import('@/pc/quotecomponent')) |
| | | const PasteController = asyncComponent(() => import('@/menu/pastecontroller')) |
| | |
| | | MKEmitter.addListener('changeEditMenu', this.changeEditMenu) |
| | | setTimeout(() => { |
| | | this.getAppPictures() |
| | | this.getSmStemp() |
| | | this.getRoleFields() |
| | | setGLOBFuncs() |
| | | }, 1000) |
| | |
| | | return false |
| | | } |
| | | return true |
| | | } |
| | | |
| | | getSmStemp = () => { |
| | | if (!sessionStorage.getItem('msgTemplate')) { |
| | | let _sql = `select ID,TemplateCode,SignName+'_'+describe as SignName from (select * from bd_msn_sms_temp where deleted=0 and status=20 ) a |
| | | inner join (select openid from sapp where id='${window.GLOB.appkey}') b |
| | | on a.openid=b.openid` |
| | | |
| | | _sql = Utils.formatOptions(_sql) |
| | | |
| | | let param = { |
| | | func: 'sPC_Get_SelectedList', |
| | | LText: _sql, |
| | | obj_name: 'data', |
| | | arr_field: 'ID,TemplateCode,SignName' |
| | | } |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 云端数据验证 |
| | | |
| | | Api.getSystemConfig(param).then(res => { |
| | | let msgs = [] |
| | | if (!res.status) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: res.message, |
| | | duration: 5 |
| | | }) |
| | | } else if (res.data) { |
| | | msgs = res.data |
| | | } |
| | | sessionStorage.setItem('msgTemplate', JSON.stringify(msgs)) |
| | | }) |
| | | } |
| | | } |
| | | |
| | | changeEditMenu = (menu) => { |
| | |
| | | } |
| | | } |
| | | } else { |
| | | let uuids = {} // 重置公共数据源 |
| | | let commonId = Utils.getuuid() |
| | | if (config.interfaces && config.interfaces.length > 0) { |
| | | config.interfaces = config.interfaces.map(inter => { |
| | | uuids[inter.uuid] = this.getuuid() |
| | | inter.uuid = uuids[inter.uuid] |
| | | inter.uuid = md5(commonId + inter.uuid) |
| | | return inter |
| | | }) |
| | | } |
| | | |
| | | config.components = MenuUtils.resetConfig(config.components, uuids, urlParam.clearMenu) |
| | | config.components = MenuUtils.resetConfig(config.components, commonId, urlParam.clearMenu) |
| | | |
| | | if (config.version !== 2.0) { |
| | | config.components = this.collectTB(config.components) |
| | |
| | | }) |
| | | item.subcards.forEach(card => { |
| | | card.elements && card.elements.forEach(cell => { |
| | | if (cell.eleType !== 'button' || cell.hidden === 'true') return |
| | | |
| | | m.children.push({ |
| | | key: cell.uuid, |
| | | title: cell.label, |
| | | }) |
| | | }) |
| | | |
| | | if (item.subtype !== 'dualdatacard') return |
| | | |
| | | card.backElements && card.backElements.forEach(cell => { |
| | | if (cell.eleType !== 'button' || cell.hidden === 'true') return |
| | | |
| | | m.children.push({ |
| | |
| | | } |
| | | |
| | | resolve(result) |
| | | }) |
| | | }, this.netError) |
| | | } else { |
| | | resolve(res) |
| | | } |
| | | } else { |
| | | resolve(res) |
| | | } |
| | | }) |
| | | }, this.netError) |
| | | } |
| | | } |
| | | }).then(res => { // 页面保存 |
| | |
| | | duration: 5 |
| | | }) |
| | | } |
| | | }) |
| | | }, this.netError) |
| | | }, 300 + (+sessionStorage.getItem('mkDelay'))) |
| | | } |
| | | |
| | | netError = (error) => { |
| | | this.setState({ |
| | | menuloading: false |
| | | }) |
| | | if (!error) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '保存失败,请检查网络是否正常。', |
| | | duration: 5 |
| | | }) |
| | | } |
| | | } |
| | | |
| | | getRoleFields = () => { |
| | |
| | | {config ? <TableComponent config={config} updatetable={this.updateConfig}/> : null} |
| | | {config ? <Paragraph style={{padding: '15px 0px 0px 18px'}} copyable={{ text: MenuId }}>菜单ID</Paragraph> : null} |
| | | {config ? <Paragraph style={{padding: '10px 0px 0px 18px'}} copyable={{ text: `${window.GLOB.baseurl}mob/index.html#/index/${sessionStorage.getItem('kei_no')}/${sessionStorage.getItem('typename')}/${sessionStorage.getItem('lang')}/${MenuId}/@BID@` }}>菜单链接</Paragraph> : null} |
| | | {config ? <NormalCss config={config} updateConfig={this.updateConfig}/> : null} |
| | | </Panel> |
| | | {/* 组件添加 */} |
| | | <Panel header="组件" className="component" key="component"> |
| | |
| | | <Panel header="元素" key="element"> |
| | | <Modulecell /> |
| | | </Panel> |
| | | <Panel header={'页面样式'} key="background"> |
| | | <Panel header="页面样式" key="background"> |
| | | {config ? <BgController config={config} updateConfig={this.updateConfig} /> : null} |
| | | </Panel> |
| | | </Collapse> |