焊接日报

This commit is contained in:
2026-06-11 09:43:42 +08:00
parent 2c8af0f2e0
commit 06781c69e1
14 changed files with 713 additions and 24 deletions
+3 -1
View File
@@ -22,6 +22,7 @@ export const defaultApps = [{
name: '试压管理',
icon: 'shiyabao',
menuId: '55976B16-2C33-406E-B514-2FE42D031071',
path: '/pipe/pressure/index',
prefix: 'nbd-icon',
selected: false
},
@@ -29,6 +30,7 @@ export const defaultApps = [{
name: '包装管理',
icon: 'baozhuangguanli',
menuId: "25DED954-10C9-47CC-99F2-C44FDE9E0A81",
path: "/pipe/packaging/list",
prefix: 'nbd-icon',
selected: false
},
@@ -46,4 +48,4 @@ export const defaultApps = [{
prefix: 'nbd-icon',
selected: false
}
]
]
+22 -2
View File
@@ -137,11 +137,31 @@ export function request(options) {
}
// GET 快捷方法
export function get(url, params = {}) {
export const get = (url, params = {}) => {
return request({ url, method: 'GET', data: params })
}
// POST 快捷方法
export function post(url, data = {}) {
export const post = (url, data = {}) => {
return request({ url, method: 'POST', data })
}
export const getUrlParam = (url, name) => {
if (!url || !name) return null;
// 构造正则:匹配 ?name= 或 &name= 后面的值
// [?&] : 匹配起始分隔符
// ${name}: 匹配具体的参数名
// = : 匹配等号
// ([^&]*) : 捕获组,匹配直到下一个 & 或字符串结束的内容
const regex = new RegExp(`[?&]${name}=([^&]*)`, 'i'); // 'i' 表示忽略大小写
const match = url.match(regex);
if (match && match[1]) {
return decodeURIComponent(match[1]);
}
return null;
};
+7
View File
@@ -0,0 +1,7 @@
import {getUrlParam} from './request'
export const scanToSkipUrl = (str)=>{
// 焊接日报跳转
if(str.includes('weldjoint')){
return `/pipe/weld/daily_paper?id=${getUrlParam(str,"id")}`
}
}