Bläddra i källkod

fix: iotcard bug

fix: iotcard bug
hear 3 år sedan
förälder
incheckning
bc51168b48

+ 4 - 4
config/proxy.ts

@@ -9,14 +9,14 @@
 export default {
   dev: {
     '/api': {
-      target: 'http://192.168.32.28:8844/',
-      ws: 'ws://192.168.32.28:8844/',
+      // target: 'http://192.168.32.28:8844/',
+      // ws: 'ws://192.168.32.28:8844/',
       // 开发环境
       // target: 'http://120.79.18.123:8844/',
       // ws: 'ws://120.79.18.123:8844/',
       // 测试环境
-      // target: 'http://120.77.179.54:8844/',
-      // ws: 'ws://120.77.179.54:8844/',
+      target: 'http://120.77.179.54:8844/',
+      ws: 'ws://120.77.179.54:8844/',
       // target: 'http://192.168.32.65:8844/',
       // ws: 'ws://192.168.32.65:8844/',
       //v2环境

BIN
public/images/iot-card/iotcard-home.png


+ 5 - 1
src/pages/iot-card/Home/index.tsx

@@ -210,7 +210,11 @@ export default () => {
           />
         </Col>
         <Col span={24}>
-          <Body title={'平台架构图'} english={'PLATFORM ARCHITECTURE DIAGRAM'} />
+          <Body
+            title={'平台架构图'}
+            english={'PLATFORM ARCHITECTURE DIAGRAM'}
+            url={require('/public/images/iot-card/iotcard-home.png')}
+          />
         </Col>
       </Row>
     </PageContainer>

+ 2 - 1
src/pages/iot-card/Platform/Detail/index.tsx

@@ -367,8 +367,9 @@ const Detail = observer(() => {
     const res: any = params.id === ':id' ? await service.save(data) : await service.update(data);
     if (res.status === 200) {
       onlyMessage('保存成功');
+      history.back();
     }
-    console.log(data);
+    // console.log(data);
   };
 
   useEffect(() => {

+ 1 - 1
src/pages/iot-card/Platform/index.tsx

@@ -137,7 +137,7 @@ const Platform = () => {
             },
           }}
         >
-          {record.state === 'enabled' ? <StopOutlined /> : <PlayCircleOutlined />}
+          {record.state.value === 'enabled' ? <StopOutlined /> : <PlayCircleOutlined />}
         </PermissionButton>,
         <PermissionButton
           isPermission={permission.delete}

+ 12 - 7
src/pages/iot-card/Recharge/detail.tsx

@@ -1,4 +1,3 @@
-import { Ellipsis } from '@/components';
 import { Modal, Descriptions } from 'antd';
 import moment from 'moment';
 
@@ -16,21 +15,27 @@ const Detail = (props: Props) => {
       visible
       onCancel={props.close}
       onOk={props.close}
-      width="600px"
+      width="1000px"
     >
-      <Descriptions bordered column={2}>
+      <Descriptions
+        bordered
+        column={2}
+        contentStyle={{ minWidth: 300 }}
+        labelStyle={{ minWidth: 120 }}
+      >
         <Descriptions.Item label="充值金额">{data.chargeMoney}</Descriptions.Item>
         <Descriptions.Item label="账户id">{data?.rechargeId}</Descriptions.Item>
         <Descriptions.Item label="平台对接">{data.configName}</Descriptions.Item>
         <Descriptions.Item label="订单号">{data.orderNumber}</Descriptions.Item>
         <Descriptions.Item label="支付方式">{data.paymentType}</Descriptions.Item>
         <Descriptions.Item label="支付URL">
-          {/* {data.url ? data.url : ''} */}
-          <Ellipsis
+          <div style={{ height: 100, overflow: 'auto' }}>{data.url ? data.url : ''}</div>
+
+          {/* <Ellipsis
             title={data.url ? data.url : ''}
             tooltip={{ placement: 'topLeft' }}
-            maxWidth={'90%'}
-          />
+            maxWidth={'100%'}
+          /> */}
         </Descriptions.Item>
         <Descriptions.Item label="订单时间">
           {data.createTime ? moment(data.createTime).format('YYYY-MM-DD HH:mm:ss') : '-'}

+ 1 - 0
src/pages/iot-card/Recharge/topUp.tsx

@@ -127,6 +127,7 @@ const TopUp = (props: Props) => {
             },
             'x-component-props': {
               placeholder: '请输入充值金额',
+              precision: 2,
             },
 
             'x-validator': [

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

@@ -360,7 +360,7 @@ const Save = (props: Props) => {
         props.close();
       }}
       onOk={() => {
-        if (props.data.id && props.data.typeId === 'rdb') {
+        if ((props.data.id && props.data.typeId === 'rdb') || !props.data.id) {
           handleSave();
         } else {
           onlyMessage('该类型数据库不可以编辑', 'warning');