Commit d599f5e87427f77894fdcb9e97e7b2340b8a521a

Authored by xp.Huang
2 parents c1dfef0f e89ff79c

Merge branch 'ft' into 'main_dev'

fix: 修复超级管理员定时任务查看任务详细服务端报错(现在修改为post请求)

See merge request yunteng/thingskit-front!715
... ... @@ -64,16 +64,18 @@ export const postRunSchedueConfigManage = (id) => {
64 64 };
65 65
66 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 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 33 column: 3,
34 34 });
35 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 40 if (resuCheck) {
39   - const resu = await schedueQueryCornTimeApi(encodeURIComponent(data.record.cronExpression));
  41 + const resu = await schedueQueryCornTimeApi(cronStr);
40 42 timeData.value = resu.data;
41 43 }
42 44 nextTick(() => {
... ...