Jelajahi Sumber

fix: 点位查询排序

100011797 3 tahun lalu
induk
melakukan
ed154bf190

+ 6 - 10
src/pages/device/Instance/Detail/Running/Property/FileComponent/index.tsx

@@ -116,18 +116,14 @@ const FileComponent = (props: Props) => {
         data?.valueType?.fileType === 'base64' ||
         data?.valueType?.fileType === 'Binary(二进制)'
       ) {
-        // if(data?.valueType?.fileType === 'base64') {
-        //   console.log(value?.formatValue.split(',')[0])
-        // }
-        // if(data?.valueType?.fileType === 'Binary(二进制)') {
-        //
-        // }
         return (
           <div className={props.type === 'card' ? styles.cardValue : styles.otherValue}>
-            <Tooltip placement="topLeft" title={String(value?.formatValue)}>
-              {String(value?.formatValue)}
-            </Tooltip>
-            {/*<img src={value?.formatValue} />*/}
+            <img
+              src={value?.formatValue}
+              onError={(e: any) => {
+                e.target.src = imgMap.get('other');
+              }}
+            />
           </div>
         );
       } else {

+ 1 - 1
src/pages/link/DataCollect/components/Point/index.tsx

@@ -122,7 +122,7 @@ const PointCard = observer((props: PointCardProps) => {
             terms: [{ column: 'collectorId', value: props.data?.id }],
           },
         ],
-        sorts: [{ name: 'createTime', order: 'desc' }],
+        sorts: [{ name: 'id', order: 'desc' }],
       })
       .then((resp) => {
         if (resp.status === 200) {

+ 12 - 12
src/pages/system/DataSource/Save/index.tsx

@@ -112,10 +112,10 @@ const Save = (props: Props) => {
               placeholder: '请输入r2bdc或者jdbc连接地址,示例:r2dbc:mysql://127.0.0.1:3306/test',
             },
             'x-validator': [
-              // {
-              //   max: 64,
-              //   message: '最多可输入64个字符',
-              // },
+              {
+                format: 'url',
+                message: '请输入正确的URL',
+              },
               {
                 required: true,
                 message: '请输入URL',
@@ -144,10 +144,10 @@ const Save = (props: Props) => {
               placeholder: '请输入管理地址,示例:http://localhost:15672',
             },
             'x-validator': [
-              // {
-              //   max: 64,
-              //   message: '最多可输入64个字符',
-              // },
+              {
+                format: 'url',
+                message: '请输入正确的管理地址',
+              },
               {
                 required: true,
                 message: '请输入管理地址',
@@ -176,10 +176,10 @@ const Save = (props: Props) => {
               placeholder: '请输入链接地址,示例:localhost:5672',
             },
             'x-validator': [
-              // {
-              //   max: 64,
-              //   message: '最多可输入64个字符',
-              // },
+              {
+                format: 'url',
+                message: '请输入正确的链接地址',
+              },
               {
                 required: true,
                 message: '请输入链接地址',