| | |
| | | |
| | | changeMenu = (record) => { |
| | | let MenuId = record.menu |
| | | if (MenuId === 'IM') { |
| | | if (!sessionStorage.getItem('instantMessage')) return |
| | | |
| | | let param = { |
| | | MenuID: sessionStorage.getItem('instantMessage'), |
| | | copyMenuId: '', |
| | | type: 'view' |
| | | } |
| | | |
| | | param = window.btoa(window.encodeURIComponent(JSON.stringify(param))) |
| | | |
| | | MKEmitter.emit('changeEditMenu', {routerUrl: '/imdesign/' + param}) |
| | | } else { |
| | | MKEmitter.emit('changeEditMenu', { ...record, MenuID: MenuId}) |
| | | } |
| | | MKEmitter.emit('changeEditMenu', { ...record, MenuID: MenuId}) |
| | | } |
| | | |
| | | isEditing = record => record.uuid === this.state.editingKey |
| | |
| | | } else { |
| | | appMenus = [] |
| | | } |
| | | // if (appType === 'mob') { |
| | | // appMenus.push({value: 'sign', text: '签名(系统页)'}) |
| | | // } |
| | | appMenus.push({value: 'goback', text: '返回(上一页)'}) |
| | | } |
| | | |
| | |
| | | const { card, appType } = this.state |
| | | |
| | | if (card.setting.click === 'menu' && card.setting.menu) { |
| | | if (['IM'].includes(card.setting.menu)) { |
| | | if (!sessionStorage.getItem('instantMessage')) return |
| | | |
| | | let param = { |
| | | MenuID: sessionStorage.getItem('instantMessage'), |
| | | copyMenuId: '', |
| | | type: 'view' |
| | | } |
| | | |
| | | param = window.btoa(window.encodeURIComponent(JSON.stringify(param))) |
| | | |
| | | MKEmitter.emit('changeEditMenu', {routerUrl: '/imdesign/' + param}) |
| | | } else { |
| | | MKEmitter.emit('changeEditMenu', {MenuID: card.setting.menu}) |
| | | } |
| | | MKEmitter.emit('changeEditMenu', {MenuID: card.setting.menu}) |
| | | } else if (card.setting.click === 'menus' && card.menus && card.menus.length > 0 && cards.subtype === 'datacard' && appType) { |
| | | this.setState({visible: true}) |
| | | } |
| | | } |
| | | |
| | | changeMenu = (MenuId) => { |
| | | if (MenuId === 'IM') { |
| | | if (!sessionStorage.getItem('instantMessage')) return |
| | | |
| | | let param = { |
| | | MenuID: sessionStorage.getItem('instantMessage'), |
| | | copyMenuId: '', |
| | | type: 'view' |
| | | } |
| | | |
| | | param = window.btoa(window.encodeURIComponent(JSON.stringify(param))) |
| | | |
| | | MKEmitter.emit('changeEditMenu', {routerUrl: '/imdesign/' + param}) |
| | | } else { |
| | | MKEmitter.emit('changeEditMenu', {MenuID: MenuId}) |
| | | } |
| | | MKEmitter.emit('changeEditMenu', {MenuID: MenuId}) |
| | | } |
| | | |
| | | render() { |
| | |
| | | } else { |
| | | menulist = [] |
| | | } |
| | | if (appType === 'mob' && (subtype === 'datacard' || subtype === 'propcard') && cardType !== 'extendCard') { // 数据卡可打开即时通信 |
| | | menulist.push({ |
| | | value: 'IM', label: '即时通信(系统页)' |
| | | }) |
| | | } |
| | | // if (appType === 'mob' && (subtype === 'datacard' || subtype === 'propcard') && cardType !== 'extendCard') { // 数据卡可打开即时通信 |
| | | // menulist.push({ |
| | | // value: 'IM', label: '即时通信(系统页)' |
| | | // }) |
| | | // } |
| | | } else { |
| | | menulist = sessionStorage.getItem('fstMenuList') |
| | | if (menulist) { |
| | |
| | | } else { |
| | | appMenus = [] |
| | | } |
| | | // if (appType === 'mob') { |
| | | // appMenus.push({value: 'sign', text: '签名(系统页)'}) |
| | | // } |
| | | appMenus.push({value: 'goback', text: '返回(上一页)'}) |
| | | } else { |
| | | menulist = sessionStorage.getItem('fstMenuList') |
| | |
| | | extendName: 'MenuNo', |
| | | options: [ |
| | | ...menulist, |
| | | // {value: 'IM', label: '即时通信(系统页)'}, |
| | | {value: 'AIService', label: '智能客服(系统页)'} |
| | | ] |
| | | }, |
| | |
| | | option.props.extend.toLowerCase().indexOf(input.toLowerCase()) >= 0} |
| | | > |
| | | {appMenus.map(item => (<Select.Option key={item.MenuID} extend={item.MenuNo || ''} value={item.MenuID}>{item.MenuName}</Select.Option>))} |
| | | {/* <Select.Option key="IM" value="IM">即时通信(系统页)</Select.Option> */} |
| | | <Select.Option key="AIService" extend={''} value="AIService">智能客服(系统页)</Select.Option> |
| | | </Select> |
| | | )} |
| | |
| | | } |
| | | |
| | | cell.userbind = _param.userbind || '' |
| | | cell.instantMessage = _param.instantMessage || '' |
| | | } |
| | | |
| | | if (cell.user_binding !== 'true') { |
| | |
| | | sublist = sublist.map(item => { |
| | | if (item.typename !== 'pc') { |
| | | item.userbind = md5(selectApp.kei_no + item.typename + item.lang).replace(/^.{8}/, 'userbind') |
| | | item.instantMessage = md5(selectApp.kei_no + item.typename + item.lang).replace(/^.{14}/, 'instantmessage') |
| | | } |
| | | return item |
| | | }) |
| | |
| | | selectApp.sublist = selectApp.sublist.map(item => { |
| | | if (item.typename !== 'pc') { |
| | | item.userbind = md5(selectApp.kei_no + item.typename + item.lang).replace(/^.{8}/, 'userbind') |
| | | item.instantMessage = md5(selectApp.kei_no + item.typename + item.lang).replace(/^.{14}/, 'instantmessage') |
| | | } |
| | | return item |
| | | }) |
| | |
| | | } |
| | | if (item.userbind) { |
| | | _par.userbind = item.userbind |
| | | } |
| | | if (item.instantMessage) { |
| | | _par.instantMessage = item.instantMessage |
| | | } |
| | | if (item.apptype) { |
| | | _par.apptype = item.apptype |
| | |
| | | sublist = sublist.map(item => { |
| | | if (item.typename !== 'pc') { |
| | | item.userbind = md5(selectApp.kei_no + item.typename + item.lang).replace(/^.{8}/, 'userbind') |
| | | item.instantMessage = md5(selectApp.kei_no + item.typename + item.lang).replace(/^.{14}/, 'instantmessage') |
| | | } |
| | | return item |
| | | }) |
| | |
| | | if (result.status) { |
| | | let menus = [] |
| | | result.menus.forEach(item => { |
| | | if (zhApp.userbind === item.MenuID || zhApp.instantMessage === item.MenuID) return |
| | | if (zhApp.userbind === item.MenuID) return |
| | | |
| | | menus.push(item) |
| | | }) |
| | |
| | | sessionStorage.setItem('sysBgColor', param.sysBgColor || '#ffffff') |
| | | sessionStorage.setItem('direction', param.direction || 'vertical') |
| | | sessionStorage.setItem('userbind', param.userbind || '') |
| | | sessionStorage.setItem('instantMessage', param.instantMessage || '') |
| | | |
| | | if (param.applangList) { |
| | | sessionStorage.setItem('applangList', param.applangList) |
| | |
| | | // if (sessionStorage.getItem('userbind')) { |
| | | // appIndeList = appIndeList + ',' + sessionStorage.getItem('userbind') |
| | | // } |
| | | if (sessionStorage.getItem('instantMessage')) { |
| | | appIndeList = appIndeList + ',' + sessionStorage.getItem('instantMessage') |
| | | } |
| | | |
| | | let menus = res.menus.filter(item => appIndeList.indexOf(item.MenuID) === -1) |
| | | menus = menus.map(item => { |
| | |
| | | Api.getCloudConfig(param).then(result => { |
| | | if (result.status) { |
| | | let ub = app.user_binding === 'true' && app.userbind ? false : true |
| | | let im = app.instantMessage ? false : true |
| | | |
| | | let menus = result.menus.map(item => { |
| | | item.nodes = '' |
| | |
| | | item.type = pageParam.type |
| | | } |
| | | |
| | | if (item.type === 'navbar' || item.type === 'im') { |
| | | if (item.type === 'navbar') { |
| | | item.backend = 'level1' |
| | | } |
| | | |
| | | if (pageParam.version !== '1.0') { |
| | | item.nodes = '' |
| | | } else if (pageParam.login || pageParam.pass) { |
| | | item.nodes = '' |
| | | } else if (pageParam.type === 'im') { |
| | | item.nodes = '' |
| | | } |
| | | } catch (e) { |
| | |
| | | item.extra = true |
| | | ub = true |
| | | } |
| | | if (app.instantMessage === item.MenuID) { |
| | | item.extra = true |
| | | im = true |
| | | } |
| | | |
| | | return item |
| | | }) |
| | | |
| | | if (!im) { |
| | | menus.push({nodes: '', type: 'none', backend: 'level1', extra: true, MenuID: app.instantMessage, MenuName: '即时通信'}) |
| | | } |
| | | if (!ub) { |
| | | menus.push({nodes: '', type: 'none', backend: 'level1', extra: true, MenuID: app.userbind, MenuName: '用户绑定'}) |
| | | } |
| | |
| | | item.nodes = '' |
| | | } else if (pageParam.login || pageParam.pass) { |
| | | item.nodes = '' |
| | | } else if (pageParam.type === 'im') { |
| | | item.nodes = '' |
| | | } |
| | | } catch (e) { |
| | | item.nodes = '' |
| | |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | if (app.instantMessage && item.MenuID === app.instantMessage) { |
| | | route = 'imdesign' |
| | | } |
| | | |
| | | window.open(window.location.href.replace(/#.+/ig, `#/${route}/${window.btoa(window.encodeURIComponent(JSON.stringify({...app, MenuID: item.MenuID, type: 'app'})))}`)) |