中英文切换
This commit is contained in:
@@ -247,22 +247,22 @@ export default function StationManage() {
|
||||
const columns = [
|
||||
{ title: t('systemSetting.siteName'), dataIndex: 'siteName' },
|
||||
{
|
||||
title: '所属组织',
|
||||
title: t('systemSetting.belongingOrg'),
|
||||
dataIndex: 'orgId',
|
||||
render: (orgId) => {
|
||||
const org = orgList.find(item => item.id == orgId);
|
||||
return org ? org.orgName : '—';
|
||||
}
|
||||
},
|
||||
{ title: '地址', dataIndex: 'address' },
|
||||
{ title: t('systemSetting.s14'), dataIndex: 'address' },
|
||||
{
|
||||
title: t('roles.actions'),
|
||||
width: 400,
|
||||
render: (_, record) => (
|
||||
<Space wrap size="small">
|
||||
<Button icon={<EditOutlined />} onClick={() => handleEdit(record)}>{t('roles.edit')}</Button>
|
||||
<Button icon={<BgColorsOutlined />} onClick={() => handleOpenArea(record)}>分区设置</Button>
|
||||
<Button onClick={() => handleOpenMap(record)}>边界绘制</Button>
|
||||
<Button icon={<BgColorsOutlined />} onClick={() => handleOpenArea(record)}>{t('systemSetting.settingsFixed2')}</Button>
|
||||
<Button onClick={() => handleOpenMap(record)}>{t('systemSetting.s110')}</Button>
|
||||
<Popconfirm title={t('common.confirmDelete')} onConfirm={() => handleDelete(record.id)}>
|
||||
<Button danger>roles.delete</Button>
|
||||
</Popconfirm>
|
||||
@@ -283,7 +283,7 @@ export default function StationManage() {
|
||||
{!userInfo?.orgId && (
|
||||
<div style={{ marginBottom: 16, display: 'flex', alignItems: 'center', gap: 16 }}>
|
||||
<Select
|
||||
placeholder="请选择组织筛选"
|
||||
placeholder={t('systemSetting.fixed2PleaseSelectOrg')}
|
||||
style={{ width: 220 }}
|
||||
value={selectedOrgId}
|
||||
onChange={handleOrgChange}
|
||||
@@ -296,9 +296,7 @@ export default function StationManage() {
|
||||
))}
|
||||
</Select>
|
||||
<Button onClick={handleReset}>{t('common.reset')}</Button>
|
||||
<Button type="primary" icon={<PlusOutlined />} onClick={handleAdd}>
|
||||
新增场站
|
||||
</Button>
|
||||
<Button type="primary" icon={<PlusOutlined />} onClick={handleAdd}>{t('systemSetting.fixed2AddNew2')}</Button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -311,7 +309,7 @@ export default function StationManage() {
|
||||
pageSize: pagination.pageSize,
|
||||
total: pagination.total,
|
||||
showSizeChanger: true,
|
||||
showTotal: (total) => `共 ${total} 条`
|
||||
showTotal: (total) => `${t('common.total')} ${total} ${t('common.items')}`
|
||||
}}
|
||||
onChange={handleTableChange}
|
||||
bordered
|
||||
@@ -336,8 +334,8 @@ export default function StationManage() {
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item name="orgId" label="所属组织" rules={[{ required: true }]}>
|
||||
<Select placeholder="请选择所属组织" allowClear>
|
||||
<Form.Item name="orgId" label={t('systemSetting.belongingOrg')} rules={[{ required: true }]}>
|
||||
<Select placeholder={t('systemSetting.fixed2PleaseSelectFixed2BelongingOrgFixed2')} allowClear>
|
||||
{orgList.map(item => (
|
||||
<Option key={item.id} value={item.id}>
|
||||
{item.orgName}
|
||||
@@ -361,31 +359,31 @@ export default function StationManage() {
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
<Form.Item name="address" label="详细地址">
|
||||
<Input placeholder="地址" />
|
||||
<Form.Item name="address" label={t('systemSetting.s13')}>
|
||||
<Input placeholder={t('systemSetting.s14')} />
|
||||
</Form.Item>
|
||||
|
||||
<Divider orientation="left">消息推送配置</Divider>
|
||||
<Divider orientation="left">{t('systemSetting.s3')}</Divider>
|
||||
|
||||
<Row gutter={16}>
|
||||
<Col span={6}>
|
||||
<Form.Item name="dingTalkPush" label="钉钉告警推送" valuePropName="checked">
|
||||
<Switch checkedChildren="开启" unCheckedChildren={t('common.close')} />
|
||||
<Form.Item name="dingTalkPush" label={t('systemSetting.alert')} valuePropName="checked">
|
||||
<Switch checkedChildren={t('systemSetting.s16')} unCheckedChildren={t('common.close')} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={6}>
|
||||
<Form.Item name="dingTalkOrderPush" label="钉钉工单推送" valuePropName="checked">
|
||||
<Switch checkedChildren="开启" unCheckedChildren={t('common.close')} />
|
||||
<Form.Item name="dingTalkOrderPush" label={t('systemSetting.s17')} valuePropName="checked">
|
||||
<Switch checkedChildren={t('systemSetting.s16')} unCheckedChildren={t('common.close')} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={6}>
|
||||
<Form.Item name="emailPush" label="邮件推送" valuePropName="checked">
|
||||
<Switch checkedChildren="开启" unCheckedChildren={t('common.close')} />
|
||||
<Form.Item name="emailPush" label={t('systemSetting.fixed2Email')} valuePropName="checked">
|
||||
<Switch checkedChildren={t('systemSetting.s16')} unCheckedChildren={t('common.close')} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={6}>
|
||||
<Form.Item name="alertPush" label="告警弹窗推送" valuePropName="checked">
|
||||
<Switch checkedChildren="开启" unCheckedChildren={t('common.close')} />
|
||||
<Form.Item name="alertPush" label={t('systemSetting.fixed2Alert2')} valuePropName="checked">
|
||||
<Switch checkedChildren={t('systemSetting.s16')} unCheckedChildren={t('common.close')} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Row>
|
||||
@@ -396,23 +394,23 @@ export default function StationManage() {
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
name="dingTalkToken"
|
||||
label="钉钉机器人Token"
|
||||
label={t('systemSetting.robotToken')}
|
||||
rules={[
|
||||
{ required: true, message: '开启钉钉推送时必须填写Token' }
|
||||
{ required: true, message: t('systemSetting.token') }
|
||||
]}
|
||||
>
|
||||
<Input placeholder="请输入钉钉机器人Webhook Token" />
|
||||
<Input placeholder={t('systemSetting.fixed2PleaseEnterRobotWebhookToken')} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
name="dingTalkSecret"
|
||||
label="钉钉加密密钥"
|
||||
label={t('systemSetting.s22')}
|
||||
rules={[
|
||||
{ required: true, message: '开启钉钉推送时必须填写加密密钥' }
|
||||
{ required: true, message: t('systemSetting.s28') }
|
||||
]}
|
||||
>
|
||||
<Input placeholder="钉钉机器人加签密钥" />
|
||||
<Input placeholder={t('systemSetting.robot')} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Row>
|
||||
@@ -430,7 +428,7 @@ export default function StationManage() {
|
||||
|
||||
{/* 分区弹窗 */}
|
||||
<Modal
|
||||
title={`【${currentStation?.siteName}】分区设置`}
|
||||
title={t('systemSetting.stationRegionSettingsTitle', { siteName: currentStation?.siteName })}
|
||||
open={areaVisible}
|
||||
width={650}
|
||||
onCancel={() => setAreaVisible(false)}
|
||||
@@ -439,20 +437,20 @@ export default function StationManage() {
|
||||
<Form form={regionForm} layout="vertical" style={{ marginBottom: 16 }}>
|
||||
<Row gutter={16}>
|
||||
<Col span={12}>
|
||||
<Form.Item name="regionName" label="分区名称" rules={[{ required: true }]}>
|
||||
<Form.Item name="regionName" label={t('systemSetting.nameFixed22')} rules={[{ required: true }]}>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item name="regionCode" label="分区编码" rules={[{ required: true }]}>
|
||||
<Form.Item name="regionCode" label={t('systemSetting.s25')} rules={[{ required: true }]}>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row gutter={16}>
|
||||
<Col span={12}>
|
||||
<Form.Item name="type" label="分区类型">
|
||||
<Select><Option value="清扫区">清扫区</Option><Option value="巡检区">巡检区</Option></Select>
|
||||
<Form.Item name="type" label={t('systemSetting.typeFixed2')}>
|
||||
<Select><Option value="清扫区">{t('systemSetting.s4')}</Option><Option value="巡检区">{t('systemSetting.fixed2Inspection')}</Option></Select>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
@@ -462,7 +460,7 @@ export default function StationManage() {
|
||||
</Col>
|
||||
</Row>
|
||||
<Form.Item name="remark" label={t('roles.remark')}><Input.TextArea rows={2} /></Form.Item>
|
||||
<Button type="primary" onClick={handleSaveRegion}>保存分区</Button>
|
||||
<Button type="primary" onClick={handleSaveRegion}>{t('systemSetting.fixed2Save2')}</Button>
|
||||
</Form>
|
||||
|
||||
<Table
|
||||
@@ -471,8 +469,8 @@ export default function StationManage() {
|
||||
pagination={false}
|
||||
bordered
|
||||
columns={[
|
||||
{ title: '分区名称', dataIndex: 'regionName' },
|
||||
{ title: '编码', dataIndex: 'regionCode' },
|
||||
{ title: t('systemSetting.nameFixed22'), dataIndex: 'regionName' },
|
||||
{ title: t('systemSetting.s29'), dataIndex: 'regionCode' },
|
||||
{ title: t('common.type'), dataIndex: 'type' },
|
||||
{
|
||||
title: t('roles.status'), render: r => r.status === 1 ? t('common.enable') : t('roles.stopped')
|
||||
@@ -492,17 +490,15 @@ export default function StationManage() {
|
||||
|
||||
{/* 地图绘制弹窗 */}
|
||||
<Modal
|
||||
title={`【${currentStation?.siteName}】边界绘制`}
|
||||
title={t('systemSetting.stationBoundaryDrawingTitle', { siteName: currentStation?.siteName })}
|
||||
open={mapVisible}
|
||||
width={800}
|
||||
onCancel={() => setMapVisible(false)}
|
||||
footer={null}
|
||||
>
|
||||
<div style={{ height: 400, background: '#f5f5f5', borderRadius: 8, display: 'flex', alignItems: 'center', justifyContent: 'center', flexDirection: 'column' }}>
|
||||
地图区域绘制(可自行接入高德/百度地图)
|
||||
<Space style={{ marginTop: 20 }}>
|
||||
<Button type="primary">开始绘制</Button>
|
||||
<Button>保存边界</Button>
|
||||
<div style={{ height: 400, background: '#f5f5f5', borderRadius: 8, display: 'flex', alignItems: 'center', justifyContent: 'center', flexDirection: 'column' }}>{t('systemSetting.area')}<Space style={{ marginTop: 20 }}>
|
||||
<Button type="primary">{t('systemSetting.s8')}</Button>
|
||||
<Button>{t('systemSetting.fixed2Save')}</Button>
|
||||
</Space>
|
||||
</div>
|
||||
</Modal>
|
||||
|
||||
Reference in New Issue
Block a user