From ecbe0dc46ce2b8f607b9afd063104adeb7f10fe8 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 30 三月 2021 15:19:31 +0800 Subject: [PATCH] 2021-03-30 --- src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx | 26 ++++++++++++++++++-------- 1 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx b/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx index 2029b4d..0e2884c 100644 --- a/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx +++ b/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx @@ -13,7 +13,6 @@ static propTpyes = { dict: PropTypes.object, // 瀛楀吀椤� menu: PropTypes.object, // 鑿滃崟淇℃伅 - permFuncField: PropTypes.any, // 瀛樺偍杩囩▼鍙敤寮�濮嬪瓧绗� setting: PropTypes.object, // 鏁版嵁婧愰厤缃� inputSubmit: PropTypes.func // 瑙﹀彂鎻愪氦 } @@ -25,14 +24,25 @@ } UNSAFE_componentWillMount () { - const { setting, permFuncField } = this.props + const { setting } = this.props + let usefulFields = sessionStorage.getItem('permFuncField') let tooltip = null let rules = [] - if (permFuncField && permFuncField.length > 0) { - tooltip = '寮�澶村彲鐢ㄥ瓧绗︼細' + permFuncField.join(', ') - let str = '^(' + permFuncField.join('|') + ')' + if (usefulFields) { + try { + usefulFields = JSON.parse(usefulFields) + } catch { + usefulFields = [] + } + } else { + usefulFields = [] + } + + if (usefulFields.length > 0) { + tooltip = '寮�澶村彲鐢ㄥ瓧绗︼細' + usefulFields.join(', ') + let str = '^(' + usefulFields.join('|') + ')' let _patten = new RegExp(str + formRule.func.innerPattern + '$', 'g') rules.push({ @@ -123,7 +133,7 @@ } param.LText = Utils.formatOptions(param.LText) - param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' + param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(param.LText, param.timestamp) Api.getLocalConfig(param) @@ -408,7 +418,7 @@ </Col> <Col span={12}> <Form.Item label={ - <Tooltip placement="topLeft" title={'鐖剁骇瀛楁鍊间笌椤剁骇鏍囪瘑锛堥粯璁ゅ�间负绌猴級鐩稿悓鏃讹紝瑙嗕负椤剁骇鑺傜偣銆�'}> + <Tooltip placement="topLeft" title={'鐖剁骇瀛楁鍊间笌椤剁骇鏍囪瘑鐩稿悓鏃讹紝瑙嗕负椤剁骇鑺傜偣銆�'}> <Icon type="question-circle" /> 椤剁骇鏍囪瘑 </Tooltip> @@ -426,7 +436,7 @@ </Col> <Col span={12}> <Form.Item label={ - <Tooltip placement="topLeft" title={'姣忚鍒嗕负24浠斤紝鏍戝舰姣斾緥鍙缃负2-12锛堟渶澶�50%锛�'}> + <Tooltip placement="topLeft" title={'鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒楋紝鏍戝舰姣斾緥鍙缃负2-12锛堟渶澶�50%锛�'}> <Icon type="question-circle" /> 瀹藉害 </Tooltip> -- Gitblit v1.8.0