Commit 1010689c authored by 皮倩雯's avatar 皮倩雯

fix: '工单流程配置新增暂存按钮别名bug修复'

parent 8badf38c
Pipeline #77321 passed with stages
......@@ -1049,9 +1049,11 @@ const FlowChart = props => {
// currentNode.current = list;
let flowNodeBackfillConfigs = currentNode.current.FlowNodeBackfillConfigs;
currentNode.current.FlowNodeBackfillConfigs = jsonData(flowNodeBackfillConfigs);
let data =
currentNode.current.ButAliasNameConfig &&
JSON.parse(currentNode.current.ButAliasNameConfig).saveButAliasName;
let data = isJSON(currentNode.current.ButAliasNameConfig);
console.log(data);
debugger;
// currentNode.current.ButAliasNameConfig &&
// JSON.parse(currentNode.current.ButAliasNameConfig.toString()).saveButAliasName;
if (currentNode.current.ButAliasNameConfig) {
if (!data) {
let butAliasNameConfig = JSON.stringify({
......@@ -1098,6 +1100,13 @@ const FlowChart = props => {
);
};
const isJSON = str => {
if (str.indexOf('{') !== -1) {
return true;
}
return false;
};
const jsonData = val => {
let listArr = [];
val.map((item, index) => {
......@@ -1302,7 +1311,12 @@ const FlowChart = props => {
console.log(diagramObj.nodeDataArray);
diagramObj.nodeDataArray.map(i => {
i.FlowNodeBackfillConfigs = jsonData(i.FlowNodeBackfillConfigs);
let data = i.ButAliasNameConfig && JSON.parse(i.ButAliasNameConfig).saveButAliasName;
let data = isJSON(i.ButAliasNameConfig);
console.log(data);
debugger;
// let data =
// i.ButAliasNameConfig &&
// JSON.parse(i.ButAliasNameConfig.toString()).saveButAliasName;
if (i.ButAliasNameConfig) {
if (!data) {
let butAliasNameConfig = JSON.stringify({
......
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