Commit 75efecd6 authored by 彭俊龙's avatar 彭俊龙

feat:自动化工单方案测试提交

parent b12e70c7
Pipeline #96683 failed with stages
...@@ -37,6 +37,15 @@ import styles from './index.less'; ...@@ -37,6 +37,15 @@ import styles from './index.less';
import * as go from 'gojs'; import * as go from 'gojs';
import { isObject } from 'lodash'; import { isObject } from 'lodash';
import { FormRender } from 'panda-xform'; import { FormRender } from 'panda-xform';
const convertKeysToLowercase = (obj) => {
return Object.fromEntries(
Object.entries(obj).map(([key, value]) => {
const newKey = key.charAt(0).toLowerCase() + key.slice(1);
return [newKey, value];
})
);
};
const days = moment().daysInMonth(); const days = moment().daysInMonth();
const allDays = [...Array.from({ length: days + 1 }, (_, i) => i + 1)]; const allDays = [...Array.from({ length: days + 1 }, (_, i) => i + 1)];
const weeks = ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期天']; const weeks = ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期天'];
...@@ -145,7 +154,7 @@ const CaseModify = props => { ...@@ -145,7 +154,7 @@ const CaseModify = props => {
if (visible) { if (visible) {
getEventFlow(); getEventFlow();
if (mode === 'edit' && flowConfigDetail) { if (mode === 'edit' && flowConfigDetail) {
dealPostData(flowConfigDetail); dealPostData(flowConfigDetail);//编辑模式数据回填
} }
// else { // else {
// init(); // init();
...@@ -184,6 +193,7 @@ const CaseModify = props => { ...@@ -184,6 +193,7 @@ const CaseModify = props => {
let res; let res;
if (TriggerMethod === '定时触发') { if (TriggerMethod === '定时触发') {
setShowForm(ScheduledConfig.Values.length > 0); setShowForm(ScheduledConfig.Values.length > 0);
postData.current.scheduledConfig.values = ScheduledConfig.Values.map(v=> convertKeysToLowercase(v))
getBizMetaData(detail); getBizMetaData(detail);
res = await GetConditionConfigFlowNode({ flowId: FlowId }); res = await GetConditionConfigFlowNode({ flowId: FlowId });
} else { } else {
...@@ -353,8 +363,9 @@ const CaseModify = props => { ...@@ -353,8 +363,9 @@ const CaseModify = props => {
const getEventFlow = async () => { const getEventFlow = async () => {
const { code, data, msg } = await GetSubEventFlows(); const { code, data, msg } = await GetSubEventFlows();
if (code === 0) { if (code === 0) {
flowData.current = data; const d = data.filter(v=> v.CreateMode === 1);
const list = data.map(v => { flowData.current =d
const list = d.map(v => {
return { value: v.SubFlowId, label: `${v.FlowName}(${v.EventName})` }; return { value: v.SubFlowId, label: `${v.FlowName}(${v.EventName})` };
}); });
setFlowList(list); setFlowList(list);
...@@ -1225,7 +1236,7 @@ const CaseModify = props => { ...@@ -1225,7 +1236,7 @@ const CaseModify = props => {
agentConfig.dayOfWeek = weekValues.map(v => weeks.indexOf(v) + 1).join(','); agentConfig.dayOfWeek = weekValues.map(v => weeks.indexOf(v) + 1).join(',');
} }
} }
console.log(postData.current.scheduledConfig.values, 'postData.current.scheduledConfig.values')
postData.current.scheduledConfig = { postData.current.scheduledConfig = {
agentConfig, agentConfig,
userIds: configInfo.userIds, userIds: configInfo.userIds,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment