From a8507cc8c42d17d4fb854594dbf1e084d61912ac Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 18 十月 2022 12:44:22 +0800 Subject: [PATCH] 2022-10-18 --- src/templates/sharecomponent/actioncomponent/index.jsx | 31 ++++++++++--------------------- 1 files changed, 10 insertions(+), 21 deletions(-) diff --git a/src/templates/sharecomponent/actioncomponent/index.jsx b/src/templates/sharecomponent/actioncomponent/index.jsx index 026695c..4253f4d 100644 --- a/src/templates/sharecomponent/actioncomponent/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/index.jsx @@ -6,8 +6,6 @@ import Api from '@/api' import Utils, { FuncUtils } from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import { getActionForm } from '@/templates/zshare/formconfig' import asyncSpinComponent from '@/utils/asyncSpinComponent' @@ -37,7 +35,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, card: null, // 缂栬緫涓厓绱� formlist: null, // 琛ㄥ崟淇℃伅 actionlist: null, // 鎸夐挳缁� @@ -426,7 +423,7 @@ Align: 'center', IsSort: 'false', uuid: Utils.getuuid(), - label: this.state.dict['model.operation'], + label: '鎿嶄綔', type: 'action', style: 'button', show: 'horizontal', @@ -626,11 +623,10 @@ */ deleteElement = (card) => { const { config } = this.props - const { dict } = this.state let _this = this confirm({ - content: dict['model.confirm'] + dict['model.delete'] + ` - ${card.label} 锛焋, + content: `纭畾鍒犻櫎 - ${card.label} 锛焋, onOk() { let _actionlist = fromJS(_this.state.actionlist).toJS() @@ -647,7 +643,7 @@ Align: 'center', IsSort: 'false', uuid: Utils.getuuid(), - label: this.state.dict['model.operation'], + label: '鎿嶄綔', type: 'action', style: 'button', show: 'horizontal', @@ -865,14 +861,12 @@ getVerify = (card) => { const { config } = this.props - const { dict } = this.state if (!card) return null if (['pop', 'prompt', 'exec'].includes(card.OpenType)) { return <VerifyCard card={card} - dict={dict} config={config} columns={config.columns} wrappedComponentRef={(inst) => this.verifyRef = inst} @@ -880,28 +874,24 @@ } else if (card.OpenType === 'excelIn') { return <VerifyExcelIn card={card} - dict={dict} columns={config.columns} wrappedComponentRef={(inst) => this.verifyRef = inst} /> } else if (card.OpenType === 'excelOut') { return <VerifyExcelOut card={card} - dict={dict} config={config} wrappedComponentRef={(inst) => this.verifyRef = inst} /> } else if (card.OpenType === 'funcbutton' && card.funcType === 'print') { return <VerifyPrint card={card} - dict={dict} columns={config.columns} wrappedComponentRef={(inst) => this.verifyRef = inst} /> } else if (card.OpenType === 'funcbutton' && card.funcType === 'megvii') { return <VerifyMegvii card={card} - dict={dict} columns={config.columns} wrappedComponentRef={(inst) => this.verifyRef = inst} /> @@ -910,7 +900,7 @@ render() { const { config } = this.props - const { actionlist, visible, card, dict, copying, profVisible, record } = this.state + const { actionlist, visible, card, copying, profVisible, record } = this.state return ( <div className="model-table-action-list" style={config.charts && config.charts.length > 1 ? {paddingTop: 25} : null}> @@ -925,22 +915,21 @@ /> {/* 缂栬緫鎸夐挳锛氬鍒躲�佺紪杈� */} <Modal - title={dict['model.action'] + '-' + (card && card.copyType === 'action' ? dict['model.copy'] : dict['model.edit'])} + title={'鎸夐挳-' + (card && card.copyType === 'action' ? '澶嶅埗' : '缂栬緫')} wrapClassName="model-table-action-edit-modal" visible={visible} width={920} maskClosable={false} onCancel={this.editModalCancel} footer={[ - record && ['pop', 'exec', 'prompt'].includes(record.OpenType) && record.intertype === 'system' ? <CreateInterface key="interface" dict={dict} ref="btnCreatInterface" trigger={this.btnCreatInterface}/> : null, - record && record.intertype === 'inner' ? <CreateFunc key="create" dict={dict} ref="btnCreatFunc" trigger={this.creatFunc}/> : null, - <Button key="cancel" onClick={this.editModalCancel}>{dict['model.cancel']}</Button>, - <Button key="confirm" type="primary" loading={copying} onClick={this.handleSubmit}>{dict['model.confirm']}</Button> + record && ['pop', 'exec', 'prompt'].includes(record.OpenType) && record.intertype === 'system' ? <CreateInterface key="interface" ref="btnCreatInterface" trigger={this.btnCreatInterface}/> : null, + record && record.intertype === 'inner' ? <CreateFunc key="create" ref="btnCreatFunc" trigger={this.creatFunc}/> : null, + <Button key="cancel" onClick={this.editModalCancel}>鍙栨秷</Button>, + <Button key="confirm" type="primary" loading={copying} onClick={this.handleSubmit}>纭畾</Button> ]} destroyOnClose > <ActionForm - dict={dict} card={card} formlist={this.state.formlist} inputSubmit={this.handleSubmit} @@ -955,7 +944,7 @@ visible={profVisible} width={'90vw'} maskClosable={false} - okText={dict['model.submit']} + okText="鎻愪氦" onOk={this.verifySubmit} onCancel={() => { if (this.verifyRef.handleCancel) { -- Gitblit v1.8.0