feat(test-platform): AI生成用例、业务技能配置与计划执行优化

- 用例管理增加 AI 生成用例 Tab、文档来源与技能/规则多选生成
- 新增业务技能与业务规则配置页及 API
- 计划执行列表展示模块路径与名称,移除 Jenkins URL 列

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
qiaoxinjiu
2026-05-18 10:01:35 +08:00
parent 6e9673f7dd
commit dca942bc8f
11 changed files with 3236 additions and 58 deletions

View File

@@ -41,7 +41,7 @@ export function normalizeUploadPathSlashes(url) {
/**
* 静态资源Bug 上传图)访问根,不含末尾 /
* - 开发环境默认 http://localhost:5010(与后端文件服务常见端口一致)
* - 开发环境默认 http://localhost:8881(与后端文件服务常见端口一致)
* - 可在 index.html 里设置 window.__BUG_UPLOAD_ORIGIN__ 覆盖
* - 打包时可配置 VUE_APP_BUG_UPLOAD_ORIGIN需在 webpack DefinePlugin 中注入)
*/
@@ -56,14 +56,14 @@ export function getBugUploadStaticOrigin() {
} catch (e) { /* ignore */ }
try {
if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'development') {
return 'http://localhost:5010'
return 'http://localhost:8881'
}
} catch (e2) { /* ignore */ }
return ''
}
/**
* 浏览器实际加载图片用的地址:/uploads/... 在开发环境走 5010 端口
* 浏览器实际加载图片用的地址:/uploads/... 在开发环境走 8881 端口
* 存库仍可为接口返回的完整 URL仅展示/预览时改写
*/
export function rewriteBugImageUrlForAccess(url) {
@@ -155,7 +155,7 @@ export function isStepsLikelyHtml(s) {
return /<\s*(p|div|br|img|span|ul|ol|li|h[1-6]|table|strong|em)\b/i.test(String(s || '').trim())
}
/** 将 HTML 中 img 的 src 改写为可访问地址(开发环境 /uploads → 5010 */
/** 将 HTML 中 img 的 src 改写为可访问地址(开发环境 /uploads → 8881 */
export function rewriteImgSrcsInHtml(html) {
return String(html || '').replace(/(<img\b[^>]*\bsrc\s*=\s*)(["'])([^"']*)\2/gi, function (_m, pre, q, src) {
const fixed = rewriteBugImageUrlForAccess(normalizeUploadPathSlashes(src))