| | |
| | | conditionInput.append("<div class=\"form-group\">\n" + |
| | | " <input type=\"text\" placeholder=\"请输入" + tmpCond.getString("name") + "\" v-model=\"" + data.getString("templateCode") + "ManageInfo.conditions." + tmpCond.getString("code") + "\" class=\" form-control\">\n" + |
| | | " </div>"); |
| | | } else if ("select".equals(tmpCond.getString("inputType"))){ |
| | | |
| | | String[] selectValues = tmpCond.getString("selectValue").split(","); |
| | | String[] selectValueNames = tmpCond.getString("selectValueName").split(","); |
| | | |
| | | |
| | | String option = ""; |
| | | for (int valueIndex = 0; valueIndex < selectValues.length; valueIndex++) { |
| | | |
| | | String value = selectValues[valueIndex]; |
| | | |
| | | option += "<option value=\"" + value + "\">" + selectValueNames[valueIndex] + "</option>\n"; |
| | | |
| | | } |
| | | |
| | | conditionInput.append("<select class=\"custom-select\" v-model=\"" + data.getString("templateCode") + "ManageInfo.conditions." + tmpCond.getString("code") +"\">\n" + |
| | | " <option selected value=\"\">请选择" + tmpCond.getString("name") + "</option>\n" + |
| | | " " +option+ |
| | | " </select>" |
| | | ); |
| | | |
| | | } |
| | | |
| | | conditionInput.append(" </div>"); |
| | |
| | | fileContext = fileContext.replace("@@vcCreate@@", vcCreate.toString()); |
| | | |
| | | if (tmpConditions.size() > 3) { |
| | | fileContext = fileContext.replace("@@moreCondition@@", "<button type=\"button\" class=\"btn btn-link btn-sm\" style=\"margin-right:10px;\" v-on:click=\"_moreCondition()\">更多</button>"); |
| | | fileContext = fileContext.replace("@@moreCondition@@", "<button type=\"button\" class=\"btn btn-link btn-sm\" style=\"margin-right:10px;\" v-on:click=\"_moreCondition()\">{{"+ data.getString("templateCode") +"ManageInfo.moreCondition == true?'隐藏':'更多'}}</button>"); |
| | | } else { |
| | | fileContext = fileContext.replace("@@moreCondition@@", ""); |
| | | |