From 34e7681fd12b1c4e4994d3bea1a553870e10bc50 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 11 三月 2023 17:58:54 +0800 Subject: [PATCH] 2023-03-11 --- src/views/pcdesign/index.jsx | 108 +++++++++++------------------------------------------- 1 files changed, 22 insertions(+), 86 deletions(-) diff --git a/src/views/pcdesign/index.jsx b/src/views/pcdesign/index.jsx index 15ac6d8..c524734 100644 --- a/src/views/pcdesign/index.jsx +++ b/src/views/pcdesign/index.jsx @@ -39,6 +39,7 @@ const PasteController = asyncComponent(() => import('@/menu/pastecontroller')) const StyleController = asyncComponent(() => import('@/menu/stylecontroller')) const ReplaceField = asyncComponent(() => import('@/menu/replaceField')) +const NormalCss = asyncComponent(() => import('@/menu/normalCss')) const SysInterface = asyncComponent(() => import('@/menu/sysinterface')) const UrlFieldComponent = asyncComponent(() => import('@/menu/urlfieldcomponent')) const PictureController = asyncComponent(() => import('@/menu/picturecontroller')) @@ -132,7 +133,6 @@ setTimeout(() => { this.getAppPictures() - this.getSmStemp() this.getRoleFields() setGLOBFuncs() }, 1000) @@ -312,83 +312,6 @@ this.props.history.replace('/pcdesign/' + window.btoa(window.encodeURIComponent(JSON.stringify({MenuID: MenuID || homeId, type: 'view'})))) } }) - } - - 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)) - } - }) - } - - if (!sessionStorage.getItem('printTemps')) { - let _sql = `select ID,Images,PrintTempNO+PrintTempName as PN from sPrintTemplate - where appkey= @appkey@ and Deleted=0 and typechartwo='web_print' - union select ID,Images,a.PrintTempNO+PrintTempName as PN - from (select * from sPrintTemplate where appkey= '' and Deleted=0 and typechartwo='web_print') a - left join (select PrintTempNO from sPrintTemplate where appkey= @appkey@ and Deleted=0 ) b - on a.PrintTempNO=b.PrintTempNO - left join (select Srcid from sPrintTemplate_Log where appkey='' and apicode= @appkey@ and Deleted=0 ) c - on a.ID=c.Srcid where b.PrintTempNO is null and c.Srcid is null` - - let param = { - func: 'sPC_Get_SelectedList', - LText: Utils.formatOptions(_sql), - obj_name: 'data', - arr_field: 'PN,ID,Images' - } - - 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 => { - if (res.status) { - let temps = res.data.map(temp => { - return { - value: temp.ID, - text: temp.PN - } - }) - - sessionStorage.setItem('printTemps', JSON.stringify(temps)) - } else { - notification.warning({ - top: 92, - message: res.message, - duration: 5 - }) - } - }) - } } getAppPictures = () => { @@ -775,15 +698,14 @@ } } } 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) @@ -1373,14 +1295,14 @@ } resolve(result) - }) + }, this.netError) } else { resolve(res) } } else { resolve(res) } - }) + }, this.netError) } } }).then(res => { // 椤甸潰淇濆瓨 @@ -1418,8 +1340,21 @@ duration: 5 }) } - }) + }, this.netError) }, 300 + (+sessionStorage.getItem('mkDelay'))) + } + + netError = (error) => { + this.setState({ + menuloading: false + }) + if (!error) { + notification.warning({ + top: 92, + message: '淇濆瓨澶辫触锛岃妫�鏌ョ綉缁滄槸鍚︽甯搞��', + duration: 5 + }) + } } getRoleFields = () => { @@ -1707,6 +1642,7 @@ {/* 琛ㄥ悕娣诲姞 */} {config ? <TableComponent config={config} updatetable={this.updateConfig}/> : null} {config ? <Paragraph style={{padding: '15px 0px 0px 18px'}} copyable={{ text: MenuId }}>鑿滃崟ID</Paragraph> : null} + {config ? <NormalCss config={config} updateConfig={this.updateConfig}/> : null} </Panel> {/* 缁勪欢娣诲姞 */} <Panel header="缁勪欢" key="component"> @@ -1715,7 +1651,7 @@ <Panel header="鍏冪礌" key="element"> <Modulecell /> </Panel> - <Panel header={'椤甸潰鏍峰紡'} key="background"> + <Panel header="椤甸潰鏍峰紡" key="background"> {config ? <BgController config={config} updateConfig={this.updateConfig} /> : null} </Panel> </Collapse> -- Gitblit v1.8.0