| | |
| | | |
| | | // 替换 数据校验部分代码 |
| | | |
| | | String needCheckCurrentData = "var _currentData = vc.component."+data.getString("templateCode")+"Info.infos[vc.component."+data.getString("templateCode")+"Info.index];\n" + |
| | | " if( _currentData == null || _currentData == undefined){\n" + |
| | | " vc.message(\"请选择或填写必选信息\");\n" + |
| | | " return ;\n" + |
| | | " }"; |
| | | |
| | | if(data.getBoolean("needAffirm")){ |
| | | fileContext = fileContext.replace("@@needCheckCurrentData@@", ""); |
| | | }else{ |
| | | fileContext = fileContext.replace("@@needCheckCurrentData@@", needCheckCurrentData); |
| | | } |
| | | |
| | | |
| | | String writePath = this.getClass().getResource("/").getPath() |
| | | + "out/relationship/component/" + data.getString("package") + "/" + data.getString("templateCode") + "/" + data.getString("templateCode") + ".js"; |
| | |
| | | ifCode.append("" + |
| | | " if(!hasKey("+vcName+", \"" + flowObj.getString("flowKey") + "\")){\n" + |
| | | " "+vcName+".put(\"" + flowObj.getString("flowKey") + "\", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_" + flowObj.getString("flowKey") + "));\n" + |
| | | " "+vcName+".put(\"userId\", context.getRequestCurrentHeaders().get(CommonConstant.HTTP_USER_ID));\n" + |
| | | " businesses.add(add" + toUpperCaseFirstOne(flowObj.getString("businessName")) + "("+vcName+", context));\n" + |
| | | " }\n"); |
| | | |