diff --git a/frontend/src/api/modules/project-management/commonScript.ts b/frontend/src/api/modules/project-management/commonScript.ts index bd0df6b7b1..f98795dc5f 100644 --- a/frontend/src/api/modules/project-management/commonScript.ts +++ b/frontend/src/api/modules/project-management/commonScript.ts @@ -13,6 +13,7 @@ import { GetFormApiImportUrl, GetInsertCommonScriptPageUrl, TestScriptUrl, + UpdateCommonScriptStatusUrl, UpdateCommonScriptUrl, } from '@/api/requrls/project-management/commonScript'; @@ -24,7 +25,7 @@ import type { CommonScriptItem, TestScriptType, } from '@/models/projectManagement/commonScript'; -import { CustomFuncColumnOptionItem } from '@/models/projectManagement/commonScript'; +import { CustomFuncColumnOptionItem, updateCommonScriptStatus } from '@/models/projectManagement/commonScript'; // 获取公共脚本列表 export function getCommonScriptPage(data: TableQueryParams) { @@ -42,6 +43,12 @@ export function addOrUpdateCommonScriptReq(data: AddOrUpdateCommonScript) { export function updateCommonScript(data: AddOrUpdateCommonScript) { return MSR.post({ url: UpdateCommonScriptUrl, data }); } + +// 更新公共脚本状态 +export function updateStatusCommonScript(data: updateCommonScriptStatus) { + return MSR.post({ url: UpdateCommonScriptStatusUrl, data }); +} + // 获取公共脚本详情 export function getCommonScriptDetail(id: string) { return MSR.get({ url: `${GetCommonScriptDetailUrl}/${id}` }); diff --git a/frontend/src/api/requrls/project-management/commonScript.ts b/frontend/src/api/requrls/project-management/commonScript.ts index 808d75f4f7..6115f652a5 100644 --- a/frontend/src/api/requrls/project-management/commonScript.ts +++ b/frontend/src/api/requrls/project-management/commonScript.ts @@ -4,6 +4,8 @@ export const GetCommonScriptPageUrl = '/project/custom/func/page'; export const AddCommonScriptUrl = '/project/custom/func/add'; // 更新公共脚本 export const UpdateCommonScriptUrl = '/project/custom/func/update'; +// 更新公共脚本状态 +export const UpdateCommonScriptStatusUrl = '/project/custom/func/status'; // 获取公共脚本详情 export const GetCommonScriptDetailUrl = '/project/custom/func/detail'; // 删除公共脚本 diff --git a/frontend/src/components/business/ms-common-script/insertCommonScript.vue b/frontend/src/components/business/ms-common-script/insertCommonScript.vue index bf0585963c..073183eb2d 100644 --- a/frontend/src/components/business/ms-common-script/insertCommonScript.vue +++ b/frontend/src/components/business/ms-common-script/insertCommonScript.vue @@ -75,10 +75,58 @@ +