Commit b03d09f647270e947aff2eae84ecbf8900e932c0
1 parent
66b1e01e
fix: 修复超级管理员定时任务查看任务详细服务端报错(现在修改为post请求)
Showing
2 changed files
with
13 additions
and
9 deletions
| @@ -64,16 +64,18 @@ export const postRunSchedueConfigManage = (id) => { | @@ -64,16 +64,18 @@ export const postRunSchedueConfigManage = (id) => { | ||
| 64 | }; | 64 | }; |
| 65 | 65 | ||
| 66 | // 查询cron表达式近5次的执行时间 | 66 | // 查询cron表达式近5次的执行时间 |
| 67 | -export const schedueQueryCornTimeApi = (corn) => { | ||
| 68 | - return defHttp.get({ | ||
| 69 | - url: ReportManagerApi.QUERY_CORN_API + corn, | 67 | +export const schedueQueryCornTimeApi = (data) => { |
| 68 | + return defHttp.post({ | ||
| 69 | + url: ReportManagerApi.QUERY_CORN_API, | ||
| 70 | + data, | ||
| 70 | }); | 71 | }); |
| 71 | }; | 72 | }; |
| 72 | 73 | ||
| 73 | // 检查cron表达式是否有效 | 74 | // 检查cron表达式是否有效 |
| 74 | -export const schedueCheckCornApi = (corn) => { | ||
| 75 | - return defHttp.get({ | ||
| 76 | - url: ReportManagerApi.CHECK_CORN_API + corn, | 75 | +export const schedueCheckCornApi = (data) => { |
| 76 | + return defHttp.post({ | ||
| 77 | + url: ReportManagerApi.CHECK_CORN_API, | ||
| 78 | + data, | ||
| 77 | }); | 79 | }); |
| 78 | }; | 80 | }; |
| 79 | 81 |
| @@ -33,10 +33,12 @@ | @@ -33,10 +33,12 @@ | ||
| 33 | column: 3, | 33 | column: 3, |
| 34 | }); | 34 | }); |
| 35 | const [register] = useModalInner(async (data) => { | 35 | const [register] = useModalInner(async (data) => { |
| 36 | - console.log(data.record.cronExpression); | ||
| 37 | - const resuCheck = await schedueCheckCornApi(encodeURIComponent(data.record.cronExpression)); | 36 | + const cronStr = { |
| 37 | + cron: data.record?.cronExpression, | ||
| 38 | + }; | ||
| 39 | + const resuCheck = await schedueCheckCornApi(cronStr); | ||
| 38 | if (resuCheck) { | 40 | if (resuCheck) { |
| 39 | - const resu = await schedueQueryCornTimeApi(encodeURIComponent(data.record.cronExpression)); | 41 | + const resu = await schedueQueryCornTimeApi(cronStr); |
| 40 | timeData.value = resu.data; | 42 | timeData.value = resu.data; |
| 41 | } | 43 | } |
| 42 | nextTick(() => { | 44 | nextTick(() => { |