From 5706228a119361a22618f4565bb21c274584a6a3 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 18 四月 2022 09:48:23 +0800 Subject: [PATCH] 2022-04-18 --- public/options.json | 14 +- src/views/rolemanage/index.jsx | 14 +- src/views/appmanage/index.jsx | 28 +++ src/views/pcdesign/index.jsx | 50 ++++--- src/views/mobdesign/menuform/index.jsx | 74 +++++++++-- src/views/appmanage/submutilform/index.jsx | 158 ++++++++++++++------------ src/menu/components/card/balcony/options.jsx | 8 + 7 files changed, 216 insertions(+), 130 deletions(-) diff --git a/public/options.json b/public/options.json index f5f2215..fa76f1c 100644 --- a/public/options.json +++ b/public/options.json @@ -1,18 +1,18 @@ { - "appId": "202108312122504607B107A83F55B40C98CCF", - "appkey": "20210831212235413F287EC3BF489424496C8", + "appId": "201912040924165801464FF1788654BC5AC73", + "appkey": "20191106103859640976D6E924E464D029CF0", "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars", "systemType": "", "externalDatabase": "false", "lineColor": "", "filter": "false", - "defaultApp": "mkindustry", + "defaultApp": "mk", "defaultLang": "zh-CN", "WXAppID": "", "debugger": false, - "licenseKey": "7EFE13KIKLILIJB64C12", - "probation": "2021-12-31", + "licenseKey": "", + "probation": "", "keepPassword": "true", - "host": "http://demo.mk9h.cn", - "service": "erp_new/" + "host": "http://qingqiumarket.cn", + "service": "MKWMS/" } \ No newline at end of file diff --git a/src/menu/components/card/balcony/options.jsx b/src/menu/components/card/balcony/options.jsx index 905f045..77696ba 100644 --- a/src/menu/components/card/balcony/options.jsx +++ b/src/menu/components/card/balcony/options.jsx @@ -1,3 +1,4 @@ +import React from 'react' import { fromJS } from 'immutable' import MenuUtils from '@/utils/utils-custom.js' @@ -57,7 +58,12 @@ field: 'linkType', label: '鍙楁帶绫诲瀷', initval: wrap.linkType || 'static', - tooltip: '缁勪欢涓庡叾浠栫粍浠朵箣闂寸殑鎺у埗绫诲瀷锛岀嫭绔嬬被鍨嬭〃绀轰笌鍏朵粬缁勪欢娌℃湁鍏宠仈锛屽悓姝ョ被鍨嬩腑鍏紡涓庢寜閽瘮杈冪壒娈婏紝鎿嶄綔鏁版嵁涓哄叾鍚屾缁勪欢鐨勬暟鎹��', + tooltip: <div> + <div>缁勪欢涓庡叾浠栫粍浠朵箣闂寸殑鎺у埗绫诲瀷: </div> + <div>1銆佺嫭绔嬭〃绀轰笌鍏朵粬缁勪欢娌℃湁鍏宠仈銆�</div> + <div>2銆佸悓姝ョ被鍨嬩腑鍏紡銆佹寜閽互鍙婂叏閫夊厓绱犳瘮杈冪壒娈婏紝鎿嶄綔鏁版嵁涓哄叾鍚屾缁勪欢鐨勬暟鎹��</div> + <div>3銆佷笂绾х被鍨嬮渶娣诲姞褰撳墠缁勪欢鐨勪笂绾х粍浠讹紝骞跺彲璁剧疆褰撳墠缁勪欢涓哄缁堟樉绀猴紝杩樻槸鍙湁鍦ㄤ笂绾х粍浠堕�夎鍚庢墠鏄剧ず銆�</div> + </div>, required: false, options: [ {value: 'static', label: '鐙珛'}, diff --git a/src/views/appmanage/index.jsx b/src/views/appmanage/index.jsx index f5dc40d..bfff01d 100644 --- a/src/views/appmanage/index.jsx +++ b/src/views/appmanage/index.jsx @@ -474,6 +474,11 @@ cell.statusBarColor = _param.statusBarColor || 'black' cell.sysBgColor = _param.sysBgColor || '#ffffff' cell.adapter = _param.adapter || '' + cell.share = _param.share || 'false' // 鍒嗕韩 + cell.share_des = _param.share_des || '' // 鍒嗕韩鎻忚堪 + cell.share_url = _param.share_url || '' // 鍒嗕韩鍥剧墖 + cell.share_link = _param.share_link || '' // 鍒嗕韩閾炬帴 + if (cell.adapter && (cell.adapter === 'true' || cell.adapter === 'false')) { cell.adapter = '' } @@ -484,6 +489,9 @@ if (cell.user_binding !== 'true') { cell.user_binding = 'false' + } + if (cell.share !== 'true') { + cell.share = 'false' } if (!cell.adapter && cell.apptype) { @@ -649,7 +657,7 @@ }) // 瀛愬簲鐢↖D銆乼ypename銆佸簲鐢↖D銆丆loudUserID銆乤ppkey銆乴ogin_types(鏄惁闇�瑕佺櫥褰曪紝宸插純鐢�)銆乴ink_type(鏄惁浣跨敤鐭繛鎺ワ紝宸插純鐢�)銆乺ole_type(鏄惁浣跨敤瑙掕壊绠$悊)銆乴ang銆乧ss(鐨偆)銆乼itle(鏍囬)銆乫avicon(鍥炬爣)銆乽ser_binding(鐢ㄦ埛缁戝畾)銆乻ms_id(鐭俊妯℃澘ID)銆佽嚜瀹氫箟 - param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || 'false'}','','${window.btoa(window.encodeURIComponent(JSON.stringify({userbind: item.userbind || '', instantMessage: item.instantMessage || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', sysBgColor: item.sysBgColor || '#ffffff', adapter: item.adapter || ''})))}'`) + param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || 'false'}','','${window.btoa(window.encodeURIComponent(JSON.stringify({userbind: item.userbind || '', instantMessage: item.instantMessage || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', sysBgColor: item.sysBgColor || '#ffffff', adapter: item.adapter || '', share: item.share || '', share_des: item.share_des || '', share_url: item.share_url || '', share_link: item.share_link || ''})))}'`) param.LText = param.LText.join(' union all ') param.LText = Utils.formatOptions(param.LText) @@ -894,7 +902,7 @@ return item }) - param.LText = selectApp.sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || 'false'}','','${window.btoa(window.encodeURIComponent(JSON.stringify({userbind: item.userbind || '', instantMessage: item.instantMessage || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', sysBgColor: item.sysBgColor || '#ffffff', adapter: item.adapter || ''})))}'`) + param.LText = selectApp.sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || 'false'}','','${window.btoa(window.encodeURIComponent(JSON.stringify({userbind: item.userbind || '', instantMessage: item.instantMessage || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', sysBgColor: item.sysBgColor || '#ffffff', adapter: item.adapter || '', share: item.share || '', share_des: item.share_des || '', share_url: item.share_url || '', share_link: item.share_link || ''})))}'`) param.LText = param.LText.join(' union all ') param.LText = Utils.formatOptions(param.LText) } @@ -987,7 +995,7 @@ return item }) - param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || 'false'}','','${window.btoa(window.encodeURIComponent(JSON.stringify({userbind: item.userbind || '', instantMessage: item.instantMessage || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', sysBgColor: item.sysBgColor || '#ffffff', adapter: item.adapter || ''})))}'`) + param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || 'false'}','','${window.btoa(window.encodeURIComponent(JSON.stringify({userbind: item.userbind || '', instantMessage: item.instantMessage || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', sysBgColor: item.sysBgColor || '#ffffff', adapter: item.adapter || '', share: item.share || '', share_des: item.share_des || '', share_url: item.share_url || '', share_link: item.share_link || ''})))}'`) param.LText = param.LText.join(' union all ') param.LText = Utils.formatOptions(param.LText) @@ -1106,8 +1114,12 @@ let color = skinStyle[item.css] ? skinStyle[item.css].color : '#e8e8e8' let binding = '' if (item.user_binding === 'true') { - binding = '闇�瑕�' + binding = '鐢ㄦ埛缁戝畾' } + if (item.share === 'true') { + binding = binding ? binding + '銆佸垎浜�' : '鍒嗕韩' + } + return ( <div className="sub-app" key={index} style={{borderColor: color}}> <Row> @@ -1143,11 +1155,17 @@ </Col> <Col span={12}> <div className="app-item"> - {binding ? <div className="label"> + {/* {binding ? <div className="label"> <Tooltip placement="topLeft" title="寰俊鍏紬鍙风櫥褰曟椂锛岀郴缁熺敤鎴蜂笌寰俊鐢ㄦ埛鐨勭粦瀹氭柟寮忋��"> <QuestionCircleOutlined className="mk-form-tip" /> 鐢ㄦ埛缁戝畾: </Tooltip> + </div> : null} */} + {binding ? <div className="label"> + <Tooltip placement="topLeft" title="寰俊鍏紬鍙锋垨灏忕▼搴忎腑锛岀粦瀹氱郴缁熺敤鎴枫�佽嚜瀹氫箟鍒嗕韩绛夊姛鑳姐��"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鎵╁睍鍔熻兘: + </Tooltip> </div> : null} <div className="content">{binding}</div> </div> diff --git a/src/views/appmanage/submutilform/index.jsx b/src/views/appmanage/submutilform/index.jsx index ef32089..8f21434 100644 --- a/src/views/appmanage/submutilform/index.jsx +++ b/src/views/appmanage/submutilform/index.jsx @@ -16,19 +16,29 @@ inputSubmit: PropTypes.func // input鍥炶溅鎻愪氦 } - state = {typename: 'mob', adapters: []} + state = {typename: 'mob', adapters: [], exts: []} UNSAFE_componentWillMount() { const { card } = this.props let adapters = [] + let exts = [] let typename = 'mob' if (card) { typename = card.typename || 'mob' adapters = card.adapter ? card.adapter.split(',') : [] + + if (typename !== 'pc') { + if (card.user_binding === 'true') { + exts.push('user_binding') + } + if (card.share === 'true') { + exts.push('share') + } + } } - this.setState({typename, adapters}) + this.setState({typename, adapters, exts}) } /** @@ -38,31 +48,25 @@ return new Promise(resolve => { this.props.form.validateFieldsAndScroll((err, values) => { if (!err) { - // values.user_binding = values.user_binding ? values.user_binding.join(',') : '' values.adapter = values.adapter ? values.adapter.join(',') : '' - // if (values.user_binding.indexOf('sms_vcode') > -1 && !values.sms_id) { - // notification.warning({ - // top: 92, - // message: '鎵嬫満鍙风粦瀹氭椂锛岄渶瑕佺煭淇℃ā鏉匡紒', - // duration: 5 - // }) - // return - // } + + if (values.exts) { + values.user_binding = values.exts.includes('user_binding') ? 'true' : 'false' + values.share = values.exts.includes('share') ? 'true' : 'false' + delete values.exts + } + resolve(values) } }) }) } - // onChange = (vals) => { - // this.setState({user_binding: vals}) - // } - onAdapterChange = (vals) => { + if (!vals.includes('weixin') && !vals.includes('wxmini')) { + this.setState({exts: []}) + } this.setState({adapters: vals}) - // if (!vals.includes('weixin') && !vals.includes('wxmini')) { - // this.setState({user_binding: []}) - // } } /** @@ -76,7 +80,7 @@ render() { const { card, type } = this.props const { getFieldDecorator } = this.props.form - const { typename, adapters } = this.state + const { typename, adapters, exts } = this.state const formItemLayout = { labelCol: { xs: { span: 24 }, @@ -166,6 +170,23 @@ </Form.Item> </Col> : null} {typename !== 'pc' && (adapters.includes('weixin') || adapters.includes('wxmini')) ? <Col span={12}> + <Form.Item label={ + <Tooltip placement="topLeft" title="鍦ㄥ叕浼楀彿鎴栧皬绋嬪簭涓紝鍙坊鍔犵粦瀹氱郴缁熺敤鎴枫�佽嚜瀹氫箟鍒嗕韩绛夊姛鑳斤紝鑷畾涔夊垎浜缃悗锛屽綋鍓嶅瓙搴旂敤灏嗛粯璁や娇鐢ㄦ鍒嗕韩閾炬帴銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鎵╁睍鍔熻兘 + </Tooltip> + }> + {getFieldDecorator('exts', { + initialValue: exts + })( + <Checkbox.Group onChange={(vals) => this.setState({exts: vals})}> + <Checkbox value="user_binding">鐢ㄦ埛缁戝畾</Checkbox> + <Checkbox value="share">鍒嗕韩</Checkbox> + </Checkbox.Group> + )} + </Form.Item> + </Col> : null} + {/* {typename !== 'pc' && (adapters.includes('weixin') || adapters.includes('wxmini')) ? <Col span={12}> <Form.Item label="鐢ㄦ埛缁戝畾"> {getFieldDecorator('user_binding', { initialValue: card ? card.user_binding : 'false' @@ -174,42 +195,59 @@ <Radio value="true">闇�瑕�</Radio> <Radio value="false">涓嶉渶瑕�</Radio> </Radio.Group> - // <Checkbox.Group onChange={this.onChange}> - // <Checkbox value="uname_pwd">璐﹀彿</Checkbox> - // <Checkbox value="sms_vcode">鎵嬫満鐭俊</Checkbox> - // </Checkbox.Group> - )} - </Form.Item> - </Col> : null} - {/* {typename !== 'pc' && user_binding.includes('sms_vcode') ? <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="鐭俊妯℃澘鍙湪 浜戠郴缁�->搴旂敤鏈嶅姟->寮�鍙戣�呬腑蹇�->鐭俊妯℃澘 澶勬坊鍔犮��"> - <QuestionCircleOutlined className="mk-form-tip" /> - 鐭俊妯℃澘 - </Tooltip> - }> - {getFieldDecorator('sms_id', { - initialValue: card ? card.sms_id || '' : '', - rules: [{ - required: true, - message: '浣跨敤鎵嬫満鐭俊鏃惰閫夋嫨鐭俊妯℃澘!' - }] - })( - <Select allowClear> - {msgs.map(option => - <Select.Option key={option.ID} value={option.ID}>{option.SignName + ' - ' + option.TemplateCode}</Select.Option> - )} - </Select> )} </Form.Item> </Col> : null} */} <Col span={12}> - <Form.Item label="鏍囬"> + <Form.Item label={ + exts.includes('share') ? + <Tooltip placement="topLeft" title="瀛愬簲鐢ㄥ強鍒嗕韩鏃剁殑鏍囬銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鏍囬 + </Tooltip> : '鏍囬' + }> {getFieldDecorator('title', { - initialValue: card ? card.title || '' : '' + initialValue: card ? card.title || '' : '', + rules: exts.includes('share') ? [{ + required: true, + message: '璇峰~鍐欐爣棰�!' + }] : [] })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />)} </Form.Item> </Col> + {exts.includes('share') ? <Col span={12}> + <Form.Item label={ + <Tooltip placement="topLeft" title="鍒嗕韩鏃剁殑鎻忚堪淇℃伅銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鍒嗕韩鎻忚堪 + </Tooltip> + }> + {getFieldDecorator('share_des', { + initialValue: card ? card.share_des || '' : '' + })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />)} + </Form.Item> + </Col> : null} + {exts.includes('share') ? <Col span={12}> + <Form.Item label="鍒嗕韩鍥剧墖"> + {getFieldDecorator('share_url', { + initialValue: card ? card.share_url : '' + })( + <SourceComponent type="picture" placement="right"/> + )} + </Form.Item> + </Col> : null} + {exts.includes('share') ? <Col span={12}> + <Form.Item label="鍒嗕韩閾炬帴"> + {getFieldDecorator('share_link', { + initialValue: card ? card.share_link || 'main' : 'main' + })( + <Radio.Group> + <Radio value="main">搴旂敤鍏ュ彛</Radio> + <Radio value="view">椤甸潰閾炬帴</Radio> + </Radio.Group> + )} + </Form.Item> + </Col> : null} <Col span={12}> <Form.Item label="缃戠珯澶村儚"> {getFieldDecorator('favicon', { @@ -219,32 +257,6 @@ )} </Form.Item> </Col> - {/* {typename !== 'pc' && user_binding.length > 0 ? <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="浣跨敤寰俊鎺堟潈鐧诲綍鏃讹紝缁戝畾鐢ㄦ埛椤甸潰鐨勭増鏉冨0鏄庯紝娉細鍙坊鍔爃tml鏍囩銆�"> - <QuestionCircleOutlined className="mk-form-tip" /> - 鐗堟潈 - </Tooltip> - }> - {getFieldDecorator('copyright', { - initialValue: card ? card.copyright || '' : '' - })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />)} - </Form.Item> - </Col> : null} - {typename !== 'pc' && user_binding.length > 0 ? <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="浣跨敤寰俊鎺堟潈鐧诲綍鏃讹紝缁戝畾鐢ㄦ埛椤甸潰鐨凩OGO銆�"> - <QuestionCircleOutlined className="mk-form-tip" /> - LOGO - </Tooltip> - }> - {getFieldDecorator('logo', { - initialValue: card ? card.logo : '' - })( - <SourceComponent type="picture" placement="right"/> - )} - </Form.Item> - </Col> : null} */} {typename !== 'pc' && adapters.includes('app') ? <Col span={12}> <Form.Item label={ <Tooltip placement="topLeft" title="鍦ㄤ娇鐢ㄦ槑绉戜簯APP鏃讹紝椤甸潰鐨勫垏鎹㈡ā寮忋�傛敞锛氳嫻鏋淎PP鏆備笉鏀寔H5妯″紡銆�"> diff --git a/src/views/mobdesign/menuform/index.jsx b/src/views/mobdesign/menuform/index.jsx index 4478d02..38fb28c 100644 --- a/src/views/mobdesign/menuform/index.jsx +++ b/src/views/mobdesign/menuform/index.jsx @@ -25,21 +25,24 @@ selectChange = (key, value) => { const { config } = this.props - if (key === 'cacheUseful') { - this.props.updateConfig({...config, cacheUseful: value}) - } else if (key === 'timeUnit') { - this.props.updateConfig({...config, timeUnit: value}) - } else if (key === 'advertUrl') { - this.props.updateConfig({...config, advertUrl: value}) - } else if (key === 'advertTime') { - this.props.updateConfig({...config, advertTime: value}) - } else if (key === 'pullRefresh') { - this.props.updateConfig({...config, pullRefresh: value}) - } else if (key === 'statusBarbgColor') { - this.props.updateConfig({...config, statusBarbgColor: value}) - } else if (key === 'permission') { - this.props.updateConfig({...config, permission: value}) - } + this.props.updateConfig({...config, [key]: value}) + // if (key === 'cacheUseful') { + // this.props.updateConfig({...config, cacheUseful: value}) + // } else if (key === 'timeUnit') { + // this.props.updateConfig({...config, timeUnit: value}) + // } else if (key === 'advertUrl') { + // this.props.updateConfig({...config, advertUrl: value}) + // } else if (key === 'advertTime') { + // this.props.updateConfig({...config, advertTime: value}) + // } else if (key === 'pullRefresh') { + // this.props.updateConfig({...config, pullRefresh: value}) + // } else if (key === 'statusBarbgColor') { + // this.props.updateConfig({...config, statusBarbgColor: value}) + // } else if (key === 'permission') { + // this.props.updateConfig({...config, permission: value}) + // } else if (key === 'share') { + // this.props.updateConfig({...config, share: value}) + // } } // 鑿滃崟鍚嶇О @@ -240,6 +243,47 @@ )} </Form.Item> </Col> : null} + {adapters.includes('weixin') || adapters.includes('wxmini') ? <Col span={24}> + <Form.Item label="鍒嗕韩"> + {getFieldDecorator('share', { + initialValue: config.share || 'default' + })( + <Radio.Group onChange={(e) => {this.selectChange('share', e.target.value)}}> + <Radio value="default">榛樿</Radio> + <Radio value="custom">鑷畾涔�</Radio> + </Radio.Group> + )} + </Form.Item> + </Col> : null} + {config.share === 'custom' && (adapters.includes('weixin') || adapters.includes('wxmini')) ? <Col span={24}> + <Form.Item label="鍒嗕韩鏍囬"> + {getFieldDecorator('share_title', { + initialValue: config.share_title || '', + rules: [ + { + required: true, + message: '璇疯緭鍏ュ垎浜爣棰�!' + } + ] + })(<Input placeholder="" autoComplete="off" onChange={(e) => {this.selectChange('share_title', e.target.value)}}/>)} + </Form.Item> + </Col> : null} + {config.share === 'custom' && (adapters.includes('weixin') || adapters.includes('wxmini')) ? <Col span={24}> + <Form.Item label="鍒嗕韩鎻忚堪"> + {getFieldDecorator('share_des', { + initialValue: config.share_des || '' + })(<Input placeholder="" autoComplete="off" onChange={(e) => {this.selectChange('share_des', e.target.value)}}/>)} + </Form.Item> + </Col> : null} + {config.share === 'custom' && (adapters.includes('weixin') || adapters.includes('wxmini')) ? <Col span={24}> + <Form.Item label="鍒嗕韩鍥剧墖"> + {getFieldDecorator('share_url', { + initialValue: config.share_url || '' + })( + <SourceComponent type="picture" placement="right" onChange={(val) => {this.selectChange('share_url', val)}}/> + )} + </Form.Item> + </Col> : null} <Col span={24}> <Form.Item label="澶囨敞"> {getFieldDecorator('Remark', { diff --git a/src/views/pcdesign/index.jsx b/src/views/pcdesign/index.jsx index 9628aa8..0e2fecd 100644 --- a/src/views/pcdesign/index.jsx +++ b/src/views/pcdesign/index.jsx @@ -248,7 +248,7 @@ let homeId = MenuID || '' let appViewList = [] - if (!homeId && res.data && res.data.length > 0) { + if (res.data && res.data.length > 0) { appViewList = res.data appViewList.forEach(item => { if (item.keys_type === 'index') { @@ -1144,30 +1144,34 @@ title: item.name, children: [] } - - roles.children = item.menus.map(fst => { - if (fst.property === 'classify' && fst.sublist.length > 0) { - return { - key: fst.MenuID, - title: fst.name, - children: fst.sublist.map(scd => { - if (scd.property === 'classify' && scd.sublist.length > 0) { - return { - key: scd.MenuID, - title: scd.name, - children: scd.sublist.map(thd => { - return { key: thd.MenuID, title: thd.name } - }) + + if (item.wrap.permission === 'true') { + roles.children = item.menus.map(fst => { + if (fst.property === 'classify' && fst.sublist.length > 0) { + return { + key: fst.MenuID, + title: fst.name, + children: fst.sublist.map(scd => { + if (scd.property === 'classify' && scd.sublist.length > 0) { + return { + key: scd.MenuID, + title: scd.name, + children: scd.sublist.map(thd => { + return { key: thd.MenuID, title: thd.name } + }) + } + } else { + return { key: scd.MenuID, title: scd.name } } - } else { - return { key: scd.MenuID, title: scd.name } - } - }) + }) + } + } else { + return { key: fst.MenuID, title: fst.name } } - } else { - return { key: fst.MenuID, title: fst.name } - } - }) + }) + } else { + roles.pass = true + } let _param = { func: 'sPC_TrdMenu_AddUpt', diff --git a/src/views/rolemanage/index.jsx b/src/views/rolemanage/index.jsx index 1b0eda4..e4df34d 100644 --- a/src/views/rolemanage/index.jsx +++ b/src/views/rolemanage/index.jsx @@ -133,14 +133,15 @@ let pageParam = JSON.parse(window.decodeURIComponent(window.atob(item.menus_rolelist))) item.nodes = pageParam + if (pageParam.type) { + item.type = pageParam.type + } + if (pageParam.version !== '1.0') { item.nodes = '' } else if (pageParam.login || pageParam.pass) { item.nodes = '' - } else if (pageParam.type === 'navbar') { - item.type = 'navbar' } else if (pageParam.type === 'im') { - item.type = 'im' item.nodes = '' } } catch (e) { @@ -513,14 +514,15 @@ let pageParam = JSON.parse(window.decodeURIComponent(window.atob(item.menus_rolelist))) item.nodes = pageParam + if (pageParam.type) { + item.type = pageParam.type + } + if (pageParam.version !== '1.0') { item.nodes = '' } else if (pageParam.login || pageParam.pass) { item.nodes = '' - } else if (pageParam.type === 'navbar') { - item.type = 'navbar' } else if (pageParam.type === 'im') { - item.type = 'im' item.nodes = '' } } catch (e) { -- Gitblit v1.8.0