Commit 3af890d3 authored by 彭俊龙's avatar 彭俊龙

feat:自动化工单测试优化

parent 9c3f424f
Pipeline #96680 canceled with stages
......@@ -36,7 +36,7 @@ import imgStart from '@/assets/images/workFlow/nodeStart.png';
import styles from './index.less';
import * as go from 'gojs';
import { isObject } from 'lodash';
import { FormRender } from 'panda-xform';
// import { FormRender } from 'panda-xform';
const days = moment().daysInMonth();
const allDays = [...Array.from({ length: days + 1 }, (_, i) => i + 1)];
const weeks = ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期天'];
......@@ -183,7 +183,7 @@ const CaseModify = props => {
{
let res;
if (TriggerMethod === '定时触发') {
setShowForm(ScheduledConfig.Values.length > 0);
getBizMetaData(detail);
res = await GetConditionConfigFlowNode({ flowId: FlowId });
} else {
......@@ -381,6 +381,7 @@ const CaseModify = props => {
};
const getBizMetaData = async detail => {
if (!flowCenterData.length) return;
const {
ID,
......@@ -397,13 +398,14 @@ const CaseModify = props => {
ConditionConfig,
} = detail;
let paramObj = flowCenterData.find(v => v.flowName === FlowName && v.eventName === EventName);
console.log(paramObj, EventName,FlowName, 'paramObjparamObj')
if (paramObj) {
paramObj = {
...paramObj,
userId: 1,
};
const vals = ScheduledConfig.Values
setShowForm(vals.length > 0);
const { code, data, msg } = await GetBizMetaData(paramObj);
const { formJson, values } = data[0];
const jsonObj = JSON.parse(formJson)
......@@ -421,6 +423,9 @@ const CaseModify = props => {
formJsonRef.current = jsonObj
setSchemaValues({ values: formValues, formJson: jsonObj });
}else{
formJsonRef.current = null
setSchemaValues({ values: [], formJson: {} });
}
};
......@@ -836,6 +841,7 @@ const CaseModify = props => {
setNodeNames(nodeNames);
if (configInfo.triggerType == '定时触发') {
const d = flowData.current.find(v=> v.SubFlowId == flowId);
console.log(flowData.current, d, 'wwwwww')
if(d){
const { FlowName, EventName } = d
getBizMetaData({
......@@ -1626,21 +1632,9 @@ const CaseModify = props => {
}
const onOpen = ()=>{
//前段已保存的表单数据
// const vals = postData.current.scheduledConfig.values;
// if(vals.length > 0){
// const formvals = schemaValues.values(v=> {
// const val = vals.find(x=> x.fieldName === v.fieldName)
// if(val){
// return {
// ...v,
// fieldValue: val.fieldValue
// }
// }
// return v
// })
// setSchemaValues({ ...schemaValues, values: formvals })
// }
if(Object.keys(schemaValues.formJson).length === 0){
message.warn('未获取到表单配置')
}
setFormVisible(true)
}
......@@ -1811,7 +1805,7 @@ const CaseModify = props => {
<Input
placeholder="请输入规则名称"
onChange={e => saveRuleInfo(e, 'ruleName', v.id)}
value={v.ruleName}
value={v.ruleName}
style={{ flex: '1' }}
/>
</div>
......@@ -2048,7 +2042,7 @@ const CaseModify = props => {
onOk={onOK}
destroyOnClose
>
<FormRender schemaValues={schemaValues} ref={formRef} />
{/* <FormRender schemaValues={schemaValues} ref={formRef} /> */}
</Modal>
<RuleConfig
RuleContent={ruleContent.current}
......
......@@ -191,7 +191,7 @@ const AutoCase = props => {
const getFlowCenterData = async () => {
const { code, data, msg } = await GetFlowCenterData({
userID: 1,
//userID: 1,
systemType: '业务系统',
isFilterOrderMode: 0,
isInternal: 0
......
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