|
@@ -62,17 +62,23 @@ const Configuration = () => {
|
|
|
{
|
|
{
|
|
|
title: '关联场景联动',
|
|
title: '关联场景联动',
|
|
|
dataIndex: 'sceneName',
|
|
dataIndex: 'sceneName',
|
|
|
|
|
+ width: 160,
|
|
|
render: (text: any, record: any) => (
|
|
render: (text: any, record: any) => (
|
|
|
<PermissionButton
|
|
<PermissionButton
|
|
|
type={'link'}
|
|
type={'link'}
|
|
|
isPermission={!!getMenuPathByCode(MENUS_CODE['rule-engine/Scene'])}
|
|
isPermission={!!getMenuPathByCode(MENUS_CODE['rule-engine/Scene'])}
|
|
|
- style={{ padding: 0, height: 'auto' }}
|
|
|
|
|
|
|
+ style={{ padding: 0, height: 'auto', width: '100%' }}
|
|
|
|
|
+ tooltip={{
|
|
|
|
|
+ title: !!getMenuPathByCode(MENUS_CODE['rule-engine/Scene'])
|
|
|
|
|
+ ? text
|
|
|
|
|
+ : '没有权限,请联系管理员',
|
|
|
|
|
+ }}
|
|
|
onClick={() => {
|
|
onClick={() => {
|
|
|
const url = getMenuPathByCode('rule-engine/Scene/Save');
|
|
const url = getMenuPathByCode('rule-engine/Scene/Save');
|
|
|
history.push(`${url}?id=${record.sceneId}`);
|
|
history.push(`${url}?id=${record.sceneId}`);
|
|
|
}}
|
|
}}
|
|
|
>
|
|
>
|
|
|
- {text}
|
|
|
|
|
|
|
+ <span className="ellipsis">{text}</span>
|
|
|
</PermissionButton>
|
|
</PermissionButton>
|
|
|
),
|
|
),
|
|
|
},
|
|
},
|
|
@@ -86,6 +92,7 @@ const Configuration = () => {
|
|
|
{
|
|
{
|
|
|
title: '说明',
|
|
title: '说明',
|
|
|
dataIndex: 'description',
|
|
dataIndex: 'description',
|
|
|
|
|
+ ellipsis: true,
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '操作',
|
|
title: '操作',
|
|
@@ -143,12 +150,11 @@ const Configuration = () => {
|
|
|
key="action"
|
|
key="action"
|
|
|
style={{ padding: 0 }}
|
|
style={{ padding: 0 }}
|
|
|
popConfirm={{
|
|
popConfirm={{
|
|
|
- title: intl.formatMessage({
|
|
|
|
|
- id: `pages.data.option.${
|
|
|
|
|
- record.state?.value !== 'disabled' ? 'disabled' : 'disabled'
|
|
|
|
|
- }.tips`,
|
|
|
|
|
- defaultMessage: `确认${record.state?.value !== 'disabled' ? '禁用' : '启用'}?`,
|
|
|
|
|
- }),
|
|
|
|
|
|
|
+ title: `${
|
|
|
|
|
+ record.state?.value !== 'disabled'
|
|
|
|
|
+ ? '禁用告警不会影响关联的场景状态,确定要禁用吗'
|
|
|
|
|
+ : '确认启用'
|
|
|
|
|
+ }?`,
|
|
|
onConfirm: async () => {
|
|
onConfirm: async () => {
|
|
|
if (record.state?.value === 'disabled') {
|
|
if (record.state?.value === 'disabled') {
|
|
|
await service._enable(record.id);
|
|
await service._enable(record.id);
|
|
@@ -174,7 +180,7 @@ const Configuration = () => {
|
|
|
}}
|
|
}}
|
|
|
type="link"
|
|
type="link"
|
|
|
>
|
|
>
|
|
|
- {record.state?.value === 'disabled' ? <CloseCircleOutlined /> : <PlayCircleOutlined />}
|
|
|
|
|
|
|
+ {record.state?.value === 'disabled' ? <PlayCircleOutlined /> : <CloseCircleOutlined />}
|
|
|
</PermissionButton>,
|
|
</PermissionButton>,
|
|
|
<PermissionButton
|
|
<PermissionButton
|
|
|
type="link"
|
|
type="link"
|
|
@@ -274,12 +280,11 @@ const Configuration = () => {
|
|
|
isPermission={permission.action}
|
|
isPermission={permission.action}
|
|
|
style={{ padding: 0 }}
|
|
style={{ padding: 0 }}
|
|
|
popConfirm={{
|
|
popConfirm={{
|
|
|
- title: intl.formatMessage({
|
|
|
|
|
- id: `pages.data.option.${
|
|
|
|
|
- record.state?.value !== 'disabled' ? 'disabled' : 'enabled'
|
|
|
|
|
- }.tips`,
|
|
|
|
|
- defaultMessage: `确认${record.state?.value !== 'disabled' ? '禁用' : '启用'}?`,
|
|
|
|
|
- }),
|
|
|
|
|
|
|
+ title: `${
|
|
|
|
|
+ record.state?.value !== 'disabled'
|
|
|
|
|
+ ? '禁用告警不会影响关联的场景状态,确定要禁用吗'
|
|
|
|
|
+ : '确认启用'
|
|
|
|
|
+ }?`,
|
|
|
onConfirm: async () => {
|
|
onConfirm: async () => {
|
|
|
if (record.state?.value === 'disabled') {
|
|
if (record.state?.value === 'disabled') {
|
|
|
await service._enable(record.id);
|
|
await service._enable(record.id);
|