From f4668da448f7b7bd668db657e39e91d5d5d9dccc Mon Sep 17 00:00:00 2001 From: haha Date: Sun, 7 Jul 2024 21:08:04 +0800 Subject: [PATCH] update code --- src/api/operator/index.js | 64 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 src/api/operator/index.js diff --git a/src/api/operator/index.js b/src/api/operator/index.js new file mode 100644 index 0000000..60f8203 --- /dev/null +++ b/src/api/operator/index.js @@ -0,0 +1,64 @@ +import request from "@/utils/request"; +//获取算子列表 +const list=(data)=>{ + return request({ + url: `/operators`, + method: "get", + params:data + }); +} +//新增算子 +const add=(data)=>{ + return request({ + url: `/operators`, + method: "post", + data:data + }); +} +//获取算子程序列表 +const getPrograms=(data)=>{ + return request({ + url: `/operators/programs`, + method: "get", + params:data + }); +} +//新增算子程序文件 +const addPrograms=(data)=>{ + return request({ + url: `/operators/programs`, + method: "post", + data:data + }); +} +//删除算子程序文件 +const deletePrograms=(id)=>{ + return request({ + url: `/operators/programs/${id}`, + method: "delete" + }); +} +//删除算子 +const deleteOperator=(id)=>{ + return request({ + url: `/operators/${id}`, + method: "delete" + }); +} +//获取算子详情 +const findOne=(id)=>{ + return request({ + url: `/operators/${id}`, + method: "get" + }); +} + +export default { + list, + add, + getPrograms, + addPrograms, + deletePrograms, + deleteOperator, + findOne +} \ No newline at end of file