From 22931018c5ffe478951a75ef0609c74fbfec50ad Mon Sep 17 00:00:00 2001
From: zhaoy <137053305@qq.com>
Date: Mon, 22 Jan 2024 16:56:47 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E5=8F=91=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../device/devicepush/components/PushFrom.jsx | 57 +++++++++++++++++--
src/pages/device/devicepush/index.jsx | 2 +-
src/pages/device/devicepush/services.js | 5 ++
3 files changed, 57 insertions(+), 7 deletions(-)
diff --git a/src/pages/device/devicepush/components/PushFrom.jsx b/src/pages/device/devicepush/components/PushFrom.jsx
index d189f35..5558776 100644
--- a/src/pages/device/devicepush/components/PushFrom.jsx
+++ b/src/pages/device/devicepush/components/PushFrom.jsx
@@ -1,20 +1,65 @@
-import React from 'react';
-import { Modal, Form, Input, Button, Select,InputNumber,TreeSelect } from 'antd';
-
+import React, { useState, useEffect,useRef } from 'react';
+import { Modal, Row, Col, Checkbox, Select} from 'antd';
+import {
+ GetDeviceList,
+} from '../services';
const PushFrom = (props) => {
- const { Option, OptGroup } = Select;
+ const [deviceData, setdeviceData] = useState([]);
+ useEffect(() => {
+ console.log(props.values)
+ GetDeviceList().then((r)=>{
+ var data=r.data.map(x=>{
+ return {value:x.id,label:x.name}
+ })
+ setdeviceData(data)
+ })
+ },[props.values])
+ const handleChange=()=>{
+
+ }
+ const onChangedata=()=>{
+
+ }
return (
{
+ }}
onCancel={() => {
props.onCancel();
}}
destroyOnClose
>
+
+
+ 选择设备:
+
+
+
+
+
+
+ 选择数据:
+
+ 商品【选择商品】
+ 物料 【选择物料】
+ 工艺【选择工艺】
+ 配方【选择配方】
+
+
+
);
};
diff --git a/src/pages/device/devicepush/index.jsx b/src/pages/device/devicepush/index.jsx
index 6b41914..c7503fc 100644
--- a/src/pages/device/devicepush/index.jsx
+++ b/src/pages/device/devicepush/index.jsx
@@ -157,7 +157,7 @@ const DevicePush = () => {
handleModalVisible(true);
}}
>
- 新建
+ 下发数据
,
]}
request={async (params) => {
diff --git a/src/pages/device/devicepush/services.js b/src/pages/device/devicepush/services.js
index a7a5151..3d4c3fe 100644
--- a/src/pages/device/devicepush/services.js
+++ b/src/pages/device/devicepush/services.js
@@ -23,3 +23,8 @@ export async function GetDevicePushRecodePage(data) {
data: data,
});
}
+ export async function GetDeviceList() {
+ return request(`/saasbase/api/device/list`, {
+ method: 'GET',
+ });
+ }