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

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

parent b12e70c7
Pipeline #96683 failed with stages
......@@ -37,6 +37,15 @@ import styles from './index.less';
import * as go from 'gojs';
import { isObject } from 'lodash';
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 allDays = [...Array.from({ length: days + 1 }, (_, i) => i + 1)];
const weeks = ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期天'];
......@@ -145,7 +154,7 @@ const CaseModify = props => {
if (visible) {
getEventFlow();
if (mode === 'edit' && flowConfigDetail) {
dealPostData(flowConfigDetail);
dealPostData(flowConfigDetail);//编辑模式数据回填
}
// else {
// init();
......@@ -184,6 +193,7 @@ const CaseModify = props => {
let res;
if (TriggerMethod === '定时触发') {
setShowForm(ScheduledConfig.Values.length > 0);
postData.current.scheduledConfig.values = ScheduledConfig.Values.map(v=> convertKeysToLowercase(v))
getBizMetaData(detail);
res = await GetConditionConfigFlowNode({ flowId: FlowId });
} else {
......@@ -353,8 +363,9 @@ const CaseModify = props => {
const getEventFlow = async () => {
const { code, data, msg } = await GetSubEventFlows();
if (code === 0) {
flowData.current = data;
const list = data.map(v => {
const d = data.filter(v=> v.CreateMode === 1);
flowData.current =d
const list = d.map(v => {
return { value: v.SubFlowId, label: `${v.FlowName}(${v.EventName})` };
});
setFlowList(list);
......@@ -1225,7 +1236,7 @@ const CaseModify = props => {
agentConfig.dayOfWeek = weekValues.map(v => weeks.indexOf(v) + 1).join(',');
}
}
console.log(postData.current.scheduledConfig.values, 'postData.current.scheduledConfig.values')
postData.current.scheduledConfig = {
agentConfig,
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