Quellcode durchsuchen

Merge xyh

fix: bug#6030、6021、5978、5923、5902
XieYongHong vor 3 Jahren
Ursprung
Commit
8b121bc5cf

+ 3 - 5
src/components/ProTableCard/CardItems/device.tsx

@@ -71,7 +71,7 @@ export const ExtraDeviceCard = (props: DeviceCardProps) => {
           <div className={'card-item-content-flex'}>
             <div className={'flex-auto'}>
               <label>ID</label>
-              <Ellipsis title={props.id || ''} titleClassName={'ellipsis'} />
+              <Ellipsis title={props.id || ''} />
               {/*<div className={'ellipsis'}>*/}
               {/*  <Tooltip title={props.id}>{props.id || ''}</Tooltip>*/}
               {/*</div>*/}
@@ -79,7 +79,7 @@ export const ExtraDeviceCard = (props: DeviceCardProps) => {
             {props.cardType === 'bind' ? (
               <div className={'flex-auto'}>
                 <label>说明</label>
-                <Ellipsis title={props.describe || ''} titleClassName={'ellipsis'} />
+                <Ellipsis title={props.describe || ''} />
                 {/*<Tooltip title={props.describe}>*/}
                 {/*  <div className={'ellipsis'}>{props.describe}</div>*/}
                 {/*</Tooltip>*/}
@@ -89,7 +89,6 @@ export const ExtraDeviceCard = (props: DeviceCardProps) => {
                 <label>资产权限</label>
                 <Ellipsis
                   title={handlePermissionsMap(props.grantedPermissions)}
-                  titleClassName={'ellipsis'}
                 />
                 {/*<div className={'ellipsis'}>*/}
                 {/*  <Tooltip title={handlePermissionsMap(props.grantedPermissions)}>*/}
@@ -136,13 +135,12 @@ export default (props: DeviceCardProps) => {
               <label>设备类型</label>
               <Ellipsis
                 title={props.deviceType ? props.deviceType.text : ''}
-                titleClassName={'ellipsis'}
               />
               {/*<div className={'ellipsis'}>{props.deviceType ? props.deviceType.text : ''}</div>*/}
             </div>
             <div>
               <label>产品名称</label>
-              <Ellipsis title={props.productName} titleClassName={'ellipsis'} />
+              <Ellipsis title={props.productName} />
               {/*<div className={'ellipsis'}>{props.productName || ''}</div>*/}
             </div>
           </div>

+ 4 - 4
src/components/ProTableCard/CardItems/mediaDevice.tsx

@@ -39,22 +39,22 @@ export default (props: ProductCardProps) => {
           <div className={'card-item-content'}>
             <div>
               <label>厂商</label>
-              <Ellipsis title={props?.manufacturer} titleClassName={'ellipsis'} />
+              <Ellipsis title={props?.manufacturer} />
               {/*<div className={'ellipsis'}>{props.manufacturer || ''}</div>*/}
             </div>
             <div>
               <label>通道数量</label>
-              <Ellipsis title={props?.channelNumber} titleClassName={'ellipsis'} />
+              <Ellipsis title={props?.channelNumber} />
               {/*<div className={'ellipsis'}>{props.channelNumber || 0}</div>*/}
             </div>
             <div>
               <label>型号</label>
-              <Ellipsis title={props?.model} titleClassName={'ellipsis'} />
+              <Ellipsis title={props?.model} />
               {/*<div className={'ellipsis'}>{props.model || ''}</div>*/}
             </div>
             <div>
               <label>接入方式</label>
-              <Ellipsis title={props?.provider} titleClassName={'ellipsis'} />
+              <Ellipsis title={props?.provider} />
               {/*<div className={'ellipsis'}>{props.provider || ''}</div>*/}
             </div>
           </div>

+ 1 - 1
src/components/ProTableCard/CardItems/networkCard.tsx

@@ -72,7 +72,7 @@ export default (props: NoticeCardProps) => {
           <div className={'card-item-content'}>
             <div>
               <label>类型</label>
-              <Ellipsis title={props?.type} titleClassName={'ellipsis'} />
+              <Ellipsis title={props?.type} />
               {/*<div className={'ellipsis'}>*/}
               {/*  <Tooltip title={props?.type}>{props.type}</Tooltip>*/}
               {/*</div>*/}

+ 1 - 2
src/components/ProTableCard/CardItems/noticeConfig.tsx

@@ -31,13 +31,12 @@ export default (props: NoticeCardProps) => {
               <label>通知方式</label>
               <Ellipsis
                 title={typeList[props.type][props.provider] || '暂无'}
-                titleClassName={'ellipsis'}
               />
               {/*<div className={'ellipsis'}>{typeList[props.type][props.provider] || '暂无'}</div>*/}
             </div>
             <div>
               <label>说明</label>
-              <Ellipsis title={props.description} titleClassName={'ellipsis'} />
+              <Ellipsis title={props.description} />
               {/*<div className={'ellipsis'}>*/}
               {/*  <Tooltip placement="topLeft" title={props.description}>*/}
               {/*    {props.description}*/}

+ 4 - 5
src/components/ProTableCard/CardItems/product.tsx

@@ -81,19 +81,18 @@ export const ExtraProductCard = (props: ProductCardProps) => {
           <div className={'card-item-content-flex'}>
             <div className={'flex-auto'}>
               <label>ID</label>
-              <Ellipsis title={props.id || ''} titleClassName={'ellipsis'} />
+              <Ellipsis title={props.id || ''} />
             </div>
             {props.cardType === 'bind' ? (
               <div className={'flex-auto'}>
                 <label>说明</label>
-                <Ellipsis title={props.describe} titleClassName={'ellipsis'} />
+                <Ellipsis title={props.describe} />
               </div>
             ) : (
               <div className={'flex-auto'}>
                 <label>资产权限</label>
                 <Ellipsis
                   title={handlePermissionsMap(props.grantedPermissions)}
-                  titleClassName={'ellipsis'}
                 />
               </div>
             )}
@@ -136,11 +135,11 @@ export default (props: ProductCardProps) => {
           <div className={'card-item-content'}>
             <div>
               <label>设备类型</label>
-              <Ellipsis title={props?.deviceType?.text} titleClassName={'ellipsis'} />
+              <Ellipsis title={props?.deviceType?.text} />
             </div>
             <div>
               <label>接入方式</label>
-              <Ellipsis title={props.protocolName || '未接入'} titleClassName={'ellipsis'} />
+              <Ellipsis title={props.protocolName || '未接入'} />
             </div>
           </div>
         </div>

+ 3 - 1
src/global.less

@@ -137,7 +137,9 @@ input[type='text'],
 input[type='password'],
 input[type='number'],
 input[type='tel'] {
-  box-shadow: inset 0 0 0 100vw white !important;
+  &:not([disabled]) {
+    box-shadow: inset 0 0 0 100vw white !important;
+  }
 }
 
 //引导遮罩

+ 1 - 1
src/pages/media/Device/Channel/index.tsx

@@ -139,7 +139,7 @@ export default () => {
       }),
       valueType: 'option',
       align: 'center',
-      width: 120,
+      width: 200,
       render: (_, record) => [
         <Tooltip
           key="edit"

+ 2 - 2
src/pages/media/Home/service.tsx

@@ -5,8 +5,8 @@ import type { DeviceItem } from '@/pages/media/Device/typings';
 class Service extends BaseService<DeviceItem> {
   deviceCount = (data?: any) => request(`${this.uri}/_count`, { methods: 'GET', params: data });
 
-  channelCount = (data?: any) =>
-    request(`${this.uri}/channel/_count`, { method: 'GET', params: data });
+  channelCount = (data: any = {}) =>
+    request(`${this.uri}/channel/_count`, { method: 'POST', data: data });
 }
 
 export default Service;

+ 3 - 0
src/pages/notice/Template/Detail/doc/DingTalkRebot.tsx

@@ -14,6 +14,9 @@ const DingTalkRebot = () => {
       <div>
         通知模板结合通知配置为告警消息通知提供支撑。通知模板只能调用同一类型的通知配置服务。
       </div>
+      <div>
+        使用钉钉群机器人消息通知时需在钉钉开发平台中创建好对应的机器人,再到钉钉客户端在对应的群众绑定智能机器人。
+      </div>
       <h1>2.模板配置说明</h1>
       <div>
         <h2> 1、绑定配置</h2>

+ 11 - 13
src/pages/rule-engine/Scene/Save/trigger/index.tsx

@@ -224,19 +224,17 @@ export default observer((props: TriggerProps) => {
           </Col>
         )}
         <Col span={6}>
-          {operatorOptions && (
-            <Form.Item
-              name={['trigger', 'device', 'operation', 'operator']}
-              initialValue={undefined}
-              rules={[{ required: true, message: '请选择触发类型' }]}
-            >
-              <Select
-                placeholder={'请选择触发类型'}
-                options={operatorOptions}
-                style={{ width: '100%' }}
-              />
-            </Form.Item>
-          )}
+          <Form.Item
+            name={['trigger', 'device', 'operation', 'operator']}
+            initialValue={undefined}
+            rules={[{ required: true, message: '请选择触发类型' }]}
+          >
+            <Select
+              placeholder={'请选择触发类型'}
+              options={operatorOptions}
+              style={{ width: '100%' }}
+            />
+          </Form.Item>
         </Col>
       </Row>
       {FormModel.trigger?.device?.operation?.operator === OperatorEnum.invokeFunction ||

+ 4 - 2
src/pages/system/Department/Assets/permissionModal.tsx

@@ -33,7 +33,9 @@ const Permission = forwardRef((props: PerModalProps, ref) => {
 
   const form = createForm({
     validateFirst: true,
-    initialValues: {},
+    initialValues: {
+      permission: ['read']
+    },
   });
 
   /**
@@ -48,6 +50,7 @@ const Permission = forwardRef((props: PerModalProps, ref) => {
 
   const saveData = async () => {
     const formData: any = await form.submit();
+    console.log(formData)
     service
       .bind(props.type, [
         {
@@ -85,7 +88,6 @@ const Permission = forwardRef((props: PerModalProps, ref) => {
           { label: '删除', value: 'delete' },
         ],
         required: true,
-        'x-value': ['read'],
       },
     },
   };

Datei-Diff unterdrückt, da er zu groß ist
+ 294 - 283
src/pages/system/Menu/Setting/baseMenu.ts


+ 12 - 9
src/pages/system/Permission/index.tsx

@@ -232,15 +232,18 @@ const Permission: React.FC = observer(() => {
             title: '确认删除',
             disabled: !!record.status,
             onConfirm: async () => {
-              if (record.status) {
-                await service.remove(record.id);
-                onlyMessage(
-                  intl.formatMessage({
-                    id: 'pages.data.option.success',
-                    defaultMessage: '操作成功!',
-                  }),
-                );
-                actionRef.current?.reload();
+              if (!record.status) {
+                await service.remove(record.id).then((res: any) => {
+                  if (res.status === 200) {
+                    onlyMessage(
+                      intl.formatMessage({
+                        id: 'pages.data.option.success',
+                        defaultMessage: '操作成功!',
+                      }),
+                    );
+                    actionRef.current?.reload();
+                  }
+                })
               }
             },
           }}

+ 12 - 9
src/pages/system/Role/index.tsx

@@ -111,15 +111,18 @@ const Role: React.FC = observer(() => {
               id: 'pages.system.role.option.delete',
               defaultMessage: '确定要删除吗',
             }),
-            onConfirm: async () => {
-              await service.remove(record.id);
-              onlyMessage(
-                intl.formatMessage({
-                  id: 'pages.data.option.success',
-                  defaultMessage: '操作成功!',
-                }),
-              );
-              actionRef.current?.reload();
+            onConfirm: () => {
+              service.remove(record.id).then((res: any) => {
+                if (res.status === 200) {
+                  onlyMessage(
+                    intl.formatMessage({
+                      id: 'pages.data.option.success',
+                      defaultMessage: '操作成功!',
+                    }),
+                  );
+                  actionRef.current?.reload();
+                }
+              })
             },
           }}
           tooltip={{