From 5112216be8becd8e7a787cd73a6cc32947a6e8ea Mon Sep 17 00:00:00 2001 From: gwbvipvip Date: Sat, 24 Feb 2024 17:42:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/device/deviceVesion/index.jsx | 72 ------------------------- 1 file changed, 72 deletions(-) diff --git a/src/pages/device/deviceVesion/index.jsx b/src/pages/device/deviceVesion/index.jsx index d2bcf8a..79a9e11 100644 --- a/src/pages/device/deviceVesion/index.jsx +++ b/src/pages/device/deviceVesion/index.jsx @@ -74,78 +74,6 @@ const GoodsTypeManage = () => { } }; -//添加 -const handleAdd = async (fields) => { - try { - fields.productUrl=currentImage?.materialPath[0]; - message.loading('正在添加', key); - await AddDeviceVesion(JSON.stringify(fields)).then((r) => { - message.destroy(key); - if (r.data) { - message.success('添加成功'); - actionRef.current?.reloadAndRest?.(); - return true; - } else { - message.error('添加失败'); - return false; - } - }); - } catch (error) { - message.error('添加失败请重试!'); - return false; - } -}; - - -//修改 -const handleUpdate = async (fields) => { - try { - fields.productUrl=currentImage?.materialPath[0]; - debugger - message.loading('正在修改', key); - message.destroy(key); - await UpdateDeviceVesion(JSON.stringify(fields)).then((r) => { - message.destroy(key); - if (r.data) { - message.success('修改成功',); - actionRef.current?.reloadAndRest?.(); - return true; - } else { - message.success('修改失败'); - return false; - } - }); - } catch (error) { - message.error('修改失败请重试!'); - return false; - } -}; - - -//删除 -const handleRemove = async (selectedRows) => { - try { - message.loading('正在删除'); - let ids = []; - selectedRows.forEach((item) => { - ids.push(item.id); - }); - await DelDeviceVesion(ids).then((r) => { - if (r.data) { - message.success('删除成功'); - actionRef.current?.reloadAndRest?.(); - return true; - } else { - message.error(r.errors); - return false; - } - }); - } catch (error) { - message.error('删除失败请重试!'); - return false; - } -}; - const columns = [ { title: '主键',