diff --git a/src/api/system/route.js b/src/api/system/route.js index a29a469..cbc79d2 100644 --- a/src/api/system/route.js +++ b/src/api/system/route.js @@ -40,7 +40,7 @@ export function getDistinctProjectCodes(query) { return request({ url: '/system/route/getDistinctProjectCodes', // 后端接口 URL,确保正确 method: 'get', - params: {query} // 将查询关键字传递给后端 + params: { query } // 将查询关键字传递给后端 }) .then((response) => { return response; // 返回数据部分 @@ -55,7 +55,7 @@ export function getProcessInfoList(query) { return request({ url: '/system/route/getProcessInfoList', // 后端接口 URL,确保正确 method: 'get', - params: {query} // 将查询关键字传递给后端 + params: { query } // 将查询关键字传递给后端 }) .then((response) => { return response; // 返回数据部分 @@ -66,6 +66,23 @@ export function getProcessInfoList(query) { }); } +export function onSave(list) { + return request({ + url: '/system/route/addRoute', + method: 'post', + data: list, + }) + .then((response) => { + + return response; + }) + .catch((error) => { + console.error('Error saving route:', error); + throw error; + }); +} + + // 删除工艺路线 export function delRoute(id) { return request({ diff --git a/src/api/system/stockData.js b/src/api/system/stockData.js index 255c469..04f431c 100644 --- a/src/api/system/stockData.js +++ b/src/api/system/stockData.js @@ -42,3 +42,9 @@ export function delStockData(id) { method: 'delete' }) } +export function generateDoc() { + return request({ + url: '/system/stockData/generateDoc', // 这个路径应该和你的后端接口路径一致 + method: 'post' + }); +} diff --git a/src/assets/js/drag.js b/src/assets/js/drag.js index 60f9e73..c6ce98f 100644 --- a/src/assets/js/drag.js +++ b/src/assets/js/drag.js @@ -3,14 +3,19 @@ import clonedeep from "lodash.clonedeep"; const tableDrag = { bind(el, binding) { + // 这里是定义了一个对象只接收value和arg const { value, arg } = binding; + // 如果没有获取到元素节点 if (!el) { return; } + // 定义对象,如果没有的话为空 const { elementSeletor, onEnd, ...config } = arg || {}; + // 三元表达式判断元素节点是否为空,不为空则选择到el中指定的节点 const bindEls = elementSeletor ? el.querySelector(elementSeletor) : el; + // 创建 el.sortable = sortable.create(bindEls, { - animation: 150, + animation: 150,//动画时长设置 ms ghostClass: "blue-background-class", ...config, handle: ".handle", diff --git a/src/views/system/details/index.vue b/src/views/system/details/index.vue index c4c4744..5ab8d7a 100644 --- a/src/views/system/details/index.vue +++ b/src/views/system/details/index.vue @@ -145,7 +145,7 @@ + :data="detailsList" border @selection-change="handleSelectionChange"> diff --git a/src/views/system/route/index.vue b/src/views/system/route/index.vue index 67607a6..3d27138 100644 --- a/src/views/system/route/index.vue +++ b/src/views/system/route/index.vue @@ -100,7 +100,7 @@ + placeholder="请输入令号" clearable :loading="loading"> @@ -109,87 +109,83 @@ 重置 - + 新增 + v-hasPermi="['system:route:add']">新增 修改 + v-hasPermi="['system:route:edit']">修改 删除 + v-hasPermi="['system:route:remove']">删除 导出 + v-hasPermi="['system:route:export']">导出 导入工艺 + v-hasPermi="['system:details:import']">导入工艺 推送工艺 + v-hasPermi="['system:details:import']">推送工艺 更新计划时间 + v-hasPermi="['system:details:import']">更新计划时间 生成PDF + v-hasPermi="['system:details:import']">生成PDF - - + + - + @@ -199,20 +195,20 @@ scope.row.routeDescription }} --> - - - - + + + + - - + + - + - + - + - - + + + + + + - - - - + + + +