Commit 25f5709d authored by 胡斌's avatar 胡斌

Merge remote-tracking branch 'origin/moly'

parents eb583153 6f6f5639
......@@ -28,6 +28,8 @@ public class ModelParameter implements Serializable{
private Long taskId;//任务表ID
private Long ifSystemDefault;//是否系统默认
private String parameterCode; /// 参数编码 by molinyi
@Id
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="ModelParameterSequence")
@SequenceGenerator(name = "ModelParameterSequence", sequenceName = "fxjm_model_parameter_info_t_seq", allocationSize=1)
......@@ -73,4 +75,12 @@ public class ModelParameter implements Serializable{
public void setIfSystemDefault(Long ifSystemDefault) {
this.ifSystemDefault = ifSystemDefault;
}
public String getParameterCode() {
return parameterCode;
}
public void setParameterCode(String parameterCode) {
this.parameterCode = parameterCode;
}
}
......@@ -27,6 +27,11 @@ public interface ModelParameterDao extends JpaSpecificationExecutor<ModelParamet
@Modifying
@Query("update ModelParameter mp set mp.parameterName=:parameterName,mp.parameterValue=:parameterValue, mp.parameterDataType=:parameterDataType where mp.parameterId =:parameterId")
void updateParamByParameterId(@Param("parameterName")String parameterName,@Param("parameterValue")String parameterValue,@Param("parameterDataType")String parameterDataType,@Param("parameterId")Long parameterId);
//根据参数ID更新参数信息 by molinyi
@Modifying
@Query("update ModelParameter mp set mp.parameterName=:parameterName,mp.parameterCode=:parameterCode,mp.parameterValue=:parameterValue, mp.parameterDataType=:parameterDataType where mp.parameterId =:parameterId")
void updateParamByParameterId(@Param("parameterName")String parameterName,@Param("parameterCode")String parameterCode,@Param("parameterValue")String parameterValue,@Param("parameterDataType")String parameterDataType,@Param("parameterId")Long parameterId);
//根据数据模型ID查找参数d
List<ModelParameter> findByDataModelId(Long dataModelId);
......
......@@ -30,6 +30,11 @@ public class ModelParameterService {
public void updateParameterByParameterId(String parameterName,String parameterValue,String parameterDataType,Long parameterId){
modelParameterDao.updateParamByParameterId(parameterName, parameterValue, parameterDataType, parameterId);
}
//根据参数ID更新参数
@Transactional(readOnly=false)
public void updateParameterByParameterId(String parameterName,String parameterCode,String parameterValue,String parameterDataType,Long parameterId){
modelParameterDao.updateParamByParameterId(parameterName, parameterCode,parameterValue, parameterDataType, parameterId);
}
//根据参数ID删除一条参数信息
@Transactional(readOnly=false)
......
......@@ -48,250 +48,274 @@ import com.hp.cmsz.web.PageURLController;
/**
* 模型维护的控制类
*
* @author Zhang Wei
*
* @author Zhang Wei
*
*/
@Controller
@RequestMapping(value="/ModelManage/ModelMaintain")
public class ModelMaintainController {
@Autowired
private DataModelTypeDao dataModelTypeDao;
@Autowired
private DeployedServerDao deployedServerDao;
@Autowired
private DataTypeDao dataTypeDao;
@Autowired
private ModelParameterDao modelParameterDao;
@Autowired
private DataModelDao dataModelDao;
@Autowired
private ModelParameterService modelParameterService;
@Autowired
private SystemParameterDao systemParameterDao;
@Autowired
private CmszOperationLogService cmszOperationLogService;
@RequestMapping(value = "")
@Autowired
private DataModelTypeDao dataModelTypeDao;
@Autowired
private DeployedServerDao deployedServerDao;
@Autowired
private DataTypeDao dataTypeDao;
@Autowired
private ModelParameterDao modelParameterDao;
@Autowired
private DataModelDao dataModelDao;
@Autowired
private ModelParameterService modelParameterService;
@Autowired
private SystemParameterDao systemParameterDao;
@Autowired
private CmszOperationLogService cmszOperationLogService;
@RequestMapping(value = "")
public String modelMaintainHome(Map model){
List<DataModelType> dataModelTypeList = (List<DataModelType>)dataModelTypeDao.findAll();
List<DeployedServer>deployedServerList = (List<DeployedServer>) deployedServerDao.findAll();
List<DataType> dataTypeList =(List<DataType>) dataTypeDao.findAll();
model.put("dataModelTypeList", dataModelTypeList);
model.put("deployedServerList", deployedServerList);
model.put("dataTypeList", dataTypeList);
return PageURLController.ModelMaintain;
}
private List<Long> dataModelIdList = new ArrayList<Long>();
//新增模型参数
@RequestMapping(value = "/createModelParam*", method = RequestMethod.GET)
@ResponseBody
public void createModelParam(
@RequestParam(value="paramName") String paramName,
@RequestParam(value="paramValue") String paramValue,
@RequestParam(value="paramType") String paramType,
HttpServletResponse response,HttpServletRequest request) {
List<DataModelType> dataModelTypeList = (List<DataModelType>)dataModelTypeDao.findAll();
List<DeployedServer>deployedServerList = (List<DeployedServer>) deployedServerDao.findAll();
List<DataType> dataTypeList =(List<DataType>) dataTypeDao.findAll();
model.put("dataModelTypeList", dataModelTypeList);
model.put("deployedServerList", deployedServerList);
model.put("dataTypeList", dataTypeList);
return PageURLController.ModelMaintain;
}
private List<Long> dataModelIdList = new ArrayList<Long>();
//新增模型参数
@RequestMapping(value = "/createModelParam*", method = RequestMethod.GET)
@ResponseBody
public void createModelParam(
@RequestParam(value="paramName") String paramName,
@RequestParam(value="paramValue") String paramValue,
@RequestParam(value="paramType") String paramType,
HttpServletResponse response,HttpServletRequest request) {
/*paramName=java.net.URLDecoder.decode(paramName, "UTF-8");//一次解码
paramValue=java.net.URLDecoder.decode(paramValue, "UTF-8");//一次解码
paramType=java.net.URLDecoder.decode(paramType, "UTF-8");//一次解码
*/
ModelParameter modelParameter = new ModelParameter();
if(!paramName.trim().equals("")){modelParameter.setParameterName(paramName);}
if(!paramValue.trim().equals("")){modelParameter.setParameterValue(paramValue);}
if(!paramType.trim().equals("")){modelParameter.setParameterDataType(paramType);}
modelParameter.setIfSystemDefault(0L);
modelParameterDao.save(modelParameter);
Long dataModelId = modelParameter.getParameterId();
dataModelIdList.add(dataModelId);
}
//新增数据模型
@RequestMapping(value = "/saveModelDataForm", method = RequestMethod.POST)
public String saveModelDataForm(HttpServletResponse response,HttpServletRequest request) throws ParseException{
String modelSavePath = systemParameterDao.findByParameterName("MODEL_SCRIPT_FILE_DIR").get(0).getParameterValue();
String dataModelName = "";
String modelDesc = "";
String ruleDefinition = "";
String evaluationMethod = "";
String evaluationStandard = "";
String modelType = "";
String deployedServer = "";
String modelStatus = "";
//String cycleMinutes = "";
String modelExeScriptName = "";
String kpiTypeId = "";
String businessEndTime = "";
String businessStartTime = "";
Date publishTime = new Date();
Date updateTime = new Date();
DataModel dataModel = new DataModel();
try{
if(ServletFileUpload.isMultipartContent(request)){
DiskFileItemFactory disk = new DiskFileItemFactory();
disk.setSizeThreshold(20*1024);
disk.setRepository(disk.getRepository());
ServletFileUpload up = new ServletFileUpload(disk);
List list = up.parseRequest(request);
Iterator i = list.iterator();
while(i.hasNext()){
FileItem fm = (FileItem) i.next();
if(fm.isFormField()){
String formName = fm.getFieldName();
String tempName = fm.getString("UTF-8");
if(formName.equals("dataModelName")){
dataModelName = tempName;
}else if(formName.equals("modelDesc")){
modelDesc = tempName;
}else if(formName.equals("ruleDefinition")){
ruleDefinition = tempName;
}else if(formName.equals("evaluationMethod")){
evaluationMethod = tempName;
}else if(formName.equals("evaluationStandard")){
evaluationStandard = tempName;
}else if(formName.equals("modelType")){
modelType = tempName;
}else if(formName.equals("deployedServer")){
deployedServer = tempName;
}else if(formName.equals("modelStatus")){
modelStatus = tempName;
}else if(formName.equals("kpiTypeId")){
kpiTypeId = tempName;
}/*else if(formName.equals("cycleMinutes")){
*/
ModelParameter modelParameter = new ModelParameter();
if(!paramName.trim().equals("")){modelParameter.setParameterName(paramName);}
if(!paramValue.trim().equals("")){modelParameter.setParameterValue(paramValue);}
if(!paramType.trim().equals("")){modelParameter.setParameterDataType(paramType);}
modelParameter.setIfSystemDefault(0L);
modelParameterDao.save(modelParameter);
Long dataModelId = modelParameter.getParameterId();
dataModelIdList.add(dataModelId);
}
//新增模型参数 add by molinyi
@RequestMapping(value = "/createModelParams", method = RequestMethod.GET)
@ResponseBody
public void createModelParams(
@RequestParam(value="paramName") String paramName,
@RequestParam(value="paramCode") String paramCode,
@RequestParam(value="paramValue") String paramValue,
@RequestParam(value="paramType") String paramType,
HttpServletResponse response,HttpServletRequest request) {
ModelParameter modelParameter = new ModelParameter();
if(!paramName.trim().equals("")){modelParameter.setParameterName(paramName);}
if(!paramCode.trim().equals("")){modelParameter.setParameterCode(paramCode);}
if(!paramValue.trim().equals("")){modelParameter.setParameterValue(paramValue);}
if(!paramType.trim().equals("")){modelParameter.setParameterDataType(paramType);}
modelParameter.setIfSystemDefault(0L);
modelParameterDao.save(modelParameter);
Long dataModelId = modelParameter.getParameterId();
dataModelIdList.add(dataModelId);
}
//新增数据模型
@RequestMapping(value = "/saveModelDataForm", method = RequestMethod.POST)
public String saveModelDataForm(HttpServletResponse response,HttpServletRequest request) throws ParseException{
String modelSavePath = systemParameterDao.findByParameterName("MODEL_SCRIPT_FILE_DIR").get(0).getParameterValue();
String dataModelName = "";
String modelDesc = "";
String ruleDefinition = "";
String evaluationMethod = "";
String evaluationStandard = "";
String modelType = "";
String deployedServer = "";
String modelStatus = "";
//String cycleMinutes = "";
String modelExeScriptName = "";
String kpiTypeId = "";
String businessEndTime = "";
String businessStartTime = "";
Date publishTime = new Date();
Date updateTime = new Date();
DataModel dataModel = new DataModel();
try{
if(ServletFileUpload.isMultipartContent(request)){
DiskFileItemFactory disk = new DiskFileItemFactory();
disk.setSizeThreshold(20*1024);
disk.setRepository(disk.getRepository());
ServletFileUpload up = new ServletFileUpload(disk);
List list = up.parseRequest(request);
Iterator i = list.iterator();
while(i.hasNext()){
FileItem fm = (FileItem) i.next();
if(fm.isFormField()){
String formName = fm.getFieldName();
String tempName = fm.getString("UTF-8");
if(formName.equals("dataModelName")){
dataModelName = tempName;
}else if(formName.equals("modelDesc")){
modelDesc = tempName;
}else if(formName.equals("ruleDefinition")){
ruleDefinition = tempName;
}else if(formName.equals("evaluationMethod")){
evaluationMethod = tempName;
}else if(formName.equals("evaluationStandard")){
evaluationStandard = tempName;
}else if(formName.equals("modelType")){
modelType = tempName;
}else if(formName.equals("deployedServer")){
deployedServer = tempName;
}else if(formName.equals("modelStatus")){
modelStatus = tempName;
}else if(formName.equals("kpiTypeId")){
kpiTypeId = tempName;
}/*else if(formName.equals("cycleMinutes")){
cycleMinutes = tempName;
}*/else if(formName.equals("businessStartTime")){
businessStartTime = tempName;
}else if(formName.equals("businessEndTime")){
businessEndTime = tempName;
}
}else{
String fullFilePath = fm.getName();
int startIndex=fullFilePath.lastIndexOf("\\");
if(startIndex!=-1){
modelExeScriptName = fullFilePath.substring(startIndex+1);
}else{
modelExeScriptName = fullFilePath;
}
if(!modelExeScriptName.trim().equals("")){
dataModel.setModelScriptName(modelExeScriptName);
File file = new File(modelSavePath,modelExeScriptName);
if(!file.exists()){
fm.write(file);
}
}
}
}
}
}catch(Exception e){
e.printStackTrace();
}
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
SimpleDateFormat batchFormat = new SimpleDateFormat("yyyyMMdd000001");
dataModel.setBatchNo(Long.parseLong(batchFormat.format(sd.parse(businessStartTime))));
dataModel.setDataModelName(dataModelName);
if(!modelDesc.trim().equals("")){dataModel.setModelDesc(modelDesc);}
if(!ruleDefinition.trim().equals("")){dataModel.setRuleDefinition(ruleDefinition);}
if(!evaluationMethod.trim().equals("")){dataModel.setEvaluationMethod(evaluationMethod);}
if(!evaluationStandard.trim().equals("")){dataModel.setEvaluationStandard(evaluationStandard);}
if(!modelType.trim().equals("")){dataModel.setDataModelTypeId(Long.parseLong(modelType));}
if(!deployedServer.trim().equals("")){dataModel.setServerId(Long.parseLong(deployedServer));}
if(!modelStatus.trim().equals("")){dataModel.setModelStatus(Long.parseLong(modelStatus));}
if(!kpiTypeId.trim().equals("")){dataModel.setKpiTypeId(Long.parseLong(kpiTypeId));}
businessStartTime = tempName;
}else if(formName.equals("businessEndTime")){
businessEndTime = tempName;
}
}else{
String fullFilePath = fm.getName();
int startIndex=fullFilePath.lastIndexOf("\\");
if(startIndex!=-1){
modelExeScriptName = fullFilePath.substring(startIndex+1);
}else{
modelExeScriptName = fullFilePath;
}
if(!modelExeScriptName.trim().equals("")){
dataModel.setModelScriptName(modelExeScriptName);
File file = new File(modelSavePath,modelExeScriptName);
if(!file.exists()){
fm.write(file);
}
}
}
}
}
}catch(Exception e){
e.printStackTrace();
}
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
SimpleDateFormat batchFormat = new SimpleDateFormat("yyyyMMdd000001");
dataModel.setBatchNo(Long.parseLong(batchFormat.format(sd.parse(businessStartTime))));
dataModel.setDataModelName(dataModelName);
if(!modelDesc.trim().equals("")){dataModel.setModelDesc(modelDesc);}
if(!ruleDefinition.trim().equals("")){dataModel.setRuleDefinition(ruleDefinition);}
if(!evaluationMethod.trim().equals("")){dataModel.setEvaluationMethod(evaluationMethod);}
if(!evaluationStandard.trim().equals("")){dataModel.setEvaluationStandard(evaluationStandard);}
if(!modelType.trim().equals("")){dataModel.setDataModelTypeId(Long.parseLong(modelType));}
if(!deployedServer.trim().equals("")){dataModel.setServerId(Long.parseLong(deployedServer));}
if(!modelStatus.trim().equals("")){dataModel.setModelStatus(Long.parseLong(modelStatus));}
if(!kpiTypeId.trim().equals("")){dataModel.setKpiTypeId(Long.parseLong(kpiTypeId));}
/*if(!cycleMinutes.trim().equals("")){dataModel.setCycleMinutes(Long.parseLong(cycleMinutes));}*/
dataModel.setModelPublishTime(publishTime);
dataModel.setModelUpdateTime(updateTime);
dataModel.setBusinessStartTime(sd.parse(businessStartTime));
dataModel.setBusinessEndTime(sd.parse(businessEndTime));
dataModelDao.save(dataModel);
cmszOperationLogService.createLog("增加","新建数据模型","fxjm_data_model_info_t. DATA_MODEL_ID="+dataModel.getDataModelId().toString());
Long dataModelId = dataModel.getDataModelId();
if(!dataModelIdList.isEmpty()){
modelParameterService.updateParameterByParameterIds(dataModelId, dataModelIdList);
dataModelIdList.clear();
}
List<DeployedServer> deployedServerList = deployedServerDao.findByServerId(Long.parseLong(deployedServer));
if(!deployedServerList.isEmpty()){
if(deployedServerList.get(0).getIfWebserver().equals("0")){
dataModel.setModelPublishTime(publishTime);
dataModel.setModelUpdateTime(updateTime);
dataModel.setBusinessStartTime(sd.parse(businessStartTime));
dataModel.setBusinessEndTime(sd.parse(businessEndTime));
dataModelDao.save(dataModel);
cmszOperationLogService.createLog("增加","新建数据模型","fxjm_data_model_info_t. DATA_MODEL_ID="+dataModel.getDataModelId().toString());
Long dataModelId = dataModel.getDataModelId();
if(!dataModelIdList.isEmpty()){
modelParameterService.updateParameterByParameterIds(dataModelId, dataModelIdList);
dataModelIdList.clear();
}
List<DeployedServer> deployedServerList = deployedServerDao.findByServerId(Long.parseLong(deployedServer));
if(!deployedServerList.isEmpty()){
if(deployedServerList.get(0).getIfWebserver().equals("0")){
String ftpServer = deployedServerList.get(0).getServerIpAddress();
String ftpUser = deployedServerList.get(0).getFtpUser();
String ftpPwd = deployedServerList.get(0).getFtpPassword();
String ftpServer = deployedServerList.get(0).getServerIpAddress();
String ftpUser = deployedServerList.get(0).getFtpUser();
String ftpPwd = deployedServerList.get(0).getFtpPassword();
String ftpFilePath = modelSavePath;
String ftpFileName = modelExeScriptName;
FileInputStream ftpFileInput = null;
try {
ftpFileInput = new FileInputStream(new File(modelSavePath,ftpFileName));
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
//创建FTP
FTPClient ftpClient = new FTPClient();
ftpClient.setDefaultTimeout(1 * 1000);
ftpClient.setDataTimeout(1 * 1000);
try {
//连接ftp
ftpClient.connect(ftpServer);
//使用用户名和密码登陆
if(ftpClient.login(ftpUser, ftpPwd)){
//变更到文件存储目录
ftpClient.changeWorkingDirectory(ftpFilePath);
//保存文件
ftpClient.storeFile(ftpFileName, ftpFileInput);
}
//关闭
ftpFileInput.close();
ftpClient.logout();
ftpClient.disconnect();
String ftpFilePath = modelSavePath;
String ftpFileName = modelExeScriptName;
FileInputStream ftpFileInput = null;
try {
ftpFileInput = new FileInputStream(new File(modelSavePath,ftpFileName));
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
//创建FTP
FTPClient ftpClient = new FTPClient();
ftpClient.setDefaultTimeout(1 * 1000);
ftpClient.setDataTimeout(1 * 1000);
try {
//连接ftp
ftpClient.connect(ftpServer);
//使用用户名和密码登陆
if(ftpClient.login(ftpUser, ftpPwd)){
//变更到文件存储目录
ftpClient.changeWorkingDirectory(ftpFilePath);
//保存文件
ftpClient.storeFile(ftpFileName, ftpFileInput);
}
//关闭
ftpFileInput.close();
ftpClient.logout();
ftpClient.disconnect();
// File oldFile = new File(modelSavePath,ftpFileName);
// if(oldFile.isFile() && oldFile.exists()){
// oldFile.delete();
// }
} catch (SocketException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}finally{
if(ftpClient.isConnected()){
try{
ftpClient.disconnect();
}catch(IOException ioe){
ioe.printStackTrace();
}
}
}
}
}
return "redirect:/ModelManage/ModelResult";
}
//判断模型名称是否已存在
@RequestMapping(value = "/select_modelName/{modelName}" ,method=RequestMethod.GET)
public void select_modelName(@PathVariable("modelName")String modelName,HttpServletResponse response,HttpServletRequest request) throws UnsupportedEncodingException{
Long modelNumber = dataModelDao.getNumOfDataModelByDataModelName(modelName);
Gson gson = new Gson();
response.setContentType("text/Xml;chartset=gbk");
PrintWriter out = null;
try {
out = response.getWriter();
out.print(gson.toJson(modelNumber));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
} catch (SocketException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}finally{
if(ftpClient.isConnected()){
try{
ftpClient.disconnect();
}catch(IOException ioe){
ioe.printStackTrace();
}
}
}
}
}
return "redirect:/ModelManage/ModelResult";
}
//判断模型名称是否已存在
@RequestMapping(value = "/select_modelName/{modelName}" ,method=RequestMethod.GET)
public void select_modelName(@PathVariable("modelName")String modelName,HttpServletResponse response,HttpServletRequest request) throws UnsupportedEncodingException{
Long modelNumber = dataModelDao.getNumOfDataModelByDataModelName(modelName);
Gson gson = new Gson();
response.setContentType("text/Xml;chartset=gbk");
PrintWriter out = null;
try {
out = response.getWriter();
out.print(gson.toJson(modelNumber));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
......@@ -158,7 +158,34 @@ public class ModelParameterConfigurationController {
}
}
//修改参数信息 by molinyi
@RequestMapping(value = "/UpdateParameter",method=RequestMethod.GET)
@ResponseBody
public void updateParameters(
@RequestParam(value="paramName",defaultValue="") String paramName,
@RequestParam(value="paramCode",defaultValue="") String paramCode,
@RequestParam(value="paramValue",defaultValue="") String paramValue,
@RequestParam(value="paramType",defaultValue="") String paramType,
@RequestParam(value="paramId",defaultValue="") String paramId,
@RequestParam(value="dataModelId",defaultValue="") String dataModelId){
if(paramId.trim().equals("")){
ModelParameter modelParameter = new ModelParameter();
modelParameter.setDataModelId(Long.parseLong(dataModelId));
modelParameter.setParameterName(paramName);
modelParameter.setParameterCode(paramCode);
modelParameter.setParameterValue(paramValue);
modelParameter.setParameterDataType(paramType);
modelParameter.setIfSystemDefault(0L);
modelParameterDao.save(modelParameter);
}else{
// modelParameterService.updateParameterByParameterId(paramName, paramValue, paramType, Long.parseLong(paramId.split(":")[1]));
modelParameterService.updateParameterByParameterId(paramName,paramCode, paramValue, paramType, Long.parseLong(paramId.split(":")[1]));
}
}
//修改数据模型
@RequestMapping(value = "/updateDataModelForm",method=RequestMethod.POST)
public String updateDataModelForm(HttpServletResponse response,HttpServletRequest request) throws NumberFormatException, ParseException{
......
......@@ -15,6 +15,7 @@ import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServletRequest;
......@@ -95,8 +96,28 @@ public class AssociateDiagosisDetailController {
return "";
}
@RequestMapping("")
public String lis(Map model, ServletRequest request, HttpSession session)
throws UnsupportedEncodingException, ParseException {
List<Province> provinceList =(List<Province>) provinceDao.findProvince();
model.put("provinceList", provinceList);
return PageURLController.AssociateDiagosisDetail;
}
@RequestMapping("/tableList")
@ResponseBody
public String tableList(){
return "";
}
@RequestMapping("/aaa")
public String list(Map model, ServletRequest request, HttpSession session)
throws UnsupportedEncodingException, ParseException {
......
......@@ -91,8 +91,14 @@
<tr><td>业务开始时间(<font color="red">必填</font>):</td><td><input id="businessStartTime" name="businessStartTime" class="form-control" type="text" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'businessEndTime\')}'})"> </td></tr>
<tr><td>已添加参数:</td>
<td><table class="table table-hover table-striped" id="displayParam">
<thead>
<tr><th>参数名</th><th>参数值</th><th>参数类型</th><th><a href="javascript:deleteAllTr()">删除所有参数</a></th></tr>
<thead class='col-md-15'>
<tr>
<th class="col-3 text-center">参数名</th>
<th class="col-3 text-center">参数编码</th>
<th class="col-3 text-center">参数值</th>
<th class="col-3 text-center">参数类型</th>
<th class="col-3 text-center"><a href="javascript:deleteAllTr()">删除所有参数</a></th>
</tr>
</thead>
<tbody id="addTr"></tbody>
</table></td></tr>
......@@ -103,6 +109,7 @@
</c:forEach>
</select></td></tr>
<tr><td>参数名:</td><td><input type="text" class="form-control" name="paramName" id="paramName"/></td></tr>
<tr><td>参数编码:</td><td><input type="text" class="form-control" name="paramCode" id="paramCode"/></td></tr>
<tr><td>参数值:</td><td id="addParamVal"></td></tr>
<tr><td></td>
<td><button type="button" id="addParam" class="btn btn-primary">添加参数</button></td></tr>
......@@ -194,11 +201,13 @@
$("#addTr").find("tr").removeClass("orange-tr");
$(elementTag).parents("tr").eq(0).addClass("orange-tr");
var paramName = $(elementTag).parents("tr").find("td").eq(0).html();
var paramValue = $(elementTag).parents("tr").find("td").eq(1).html();
var paramType = $(elementTag).parents("tr").find("td").eq(2).html();
var paramCode = $(elementTag).parents("tr").find("td").eq(1).html();
var paramValue = $(elementTag).parents("tr").find("td").eq(2).html();
var paramType = $(elementTag).parents("tr").find("td").eq(3).html();
$("#paramDataType option[value='"+paramType+"']").attr("selected","selected");
$("#paramDataType").change();
$("#paramName").val(paramName);
$("#paramCode").val(paramCode);
$("#paramValue").val(paramValue);
}
......@@ -207,19 +216,24 @@
var paramDataType = $("#paramDataType").val();
var paramName = $.trim($("#paramName").val());
var paramValue = $("#paramValue").val();
var paramCode = $.trim($("#paramCode").val());
if(paramName==""){
$.alert("参数名不能为空");
}else{
}else if(paramCode == ""){
$.alert("参数编码不能为空");
}else{
if($("#addTr").find("tr.orange-tr").html()==null){
var addRow = $("<tr><td>"+paramName+"</td><td>"+paramValue+"</td><td>"+paramDataType+"</td><td><a href='javascript:;' title='' onclick='deleteRow(this)'>删除</a>&nbsp;&nbsp;<a href='javascript:;' onclick='updateRow(this)'>修改</a></td></tr>");
var addRow = $("<tr><td>"+paramName+"</td><td>"+paramCode+"</td><td>"+paramValue+"</td><td>"+paramDataType+"</td><td><a href='javascript:;' title='' onclick='deleteRow(this)'>删除</a><a href='javascript:;' onclick='updateRow(this)'>修改</a></td></tr>");
$("#addTr").append(addRow);
$("#paramName").attr("value","");
$("#paramValue").attr("value","");
$("#paramCode").attr("value","");
}else{
var findTr = $("#addTr").find("tr.orange-tr");
$(findTr).find("td").eq(0).html(paramName);
$(findTr).find("td").eq(1).html(paramValue);
$(findTr).find("td").eq(2).html(paramDataType);
$(findTr).find("td").eq(1).html(paramCode);
$(findTr).find("td").eq(2).html(paramValue);
$(findTr).find("td").eq(3).html(paramDataType);
$("#addTr").find("tr").removeClass();
$("#addParam").text("添加参数");
}
......@@ -247,89 +261,91 @@
}else if($("#businessEndTime").val()==""){
$.alert("业务结束时间不能为空");
}else{
if($.trim($("#paramName").val())!=""){
$.dialog({
title: "提醒",
content: "有参数尚未添加,确定提交",
ok: function(){
$("#modelSubmit").attr("disabled",true);
var i = $("#addTr").find("tr").size();
if(i==0){
var createForm=$("#modelMaintainForm");
createForm.attr("action","${ctx}/ModelManage/ModelMaintain/saveModelDataForm");
createForm.submit();
createForm.attr("action","#");
}else{
$("#addTr").find("tr").each(function(){
//alert($(this).find("td").eq(0).html());
var paramName = $(this).find("td").eq(0).html();
var paramValue = $(this).find("td").eq(1).html();
var paramType = $(this).find("td").eq(2).html();
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/ModelManage/ModelMaintain/createModelParam?paramName="+encodeURIComponent(paramName)+"&paramValue="+encodeURIComponent(paramValue)+"&paramType="+encodeURIComponent(paramType),
dataType : "text",
async: false,
beforeSend: function(data) {},
success: function(){
i--;
if(i==0){
var createForm=$("#modelMaintainForm");
createForm.attr("action","${ctx}/ModelManage/ModelMaintain/saveModelDataForm");
createForm.submit();
createForm.attr("action","#");
}
}
});
});
}
},
okValue: "确定",
cancel: function(){},
cancelValue: "取消",
});
}
else{
$("#modelSubmit").attr("disabled",true);
var i = $("#addTr").find("tr").size();
if(i==0){
var createForm=$("#modelMaintainForm");
createForm.attr("action","${ctx}/ModelManage/ModelMaintain/saveModelDataForm");
createForm.submit();
createForm.attr("action","#");
}else{
$("#addTr").find("tr").each(function(){
//alert($(this).find("td").eq(0).html());
var paramName = $(this).find("td").eq(0).html();
var paramValue = $(this).find("td").eq(1).html();
var paramType = $(this).find("td").eq(2).html();
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/ModelManage/ModelMaintain/createModelParam?paramName="+encodeURIComponent(paramName)+"&paramValue="+encodeURIComponent(paramValue)+"&paramType="+encodeURIComponent(paramType),
dataType : "text",
async: false,
beforeSend: function(data) {},
success: function(){
i--;
if(i==0){
var createForm=$("#modelMaintainForm");
createForm.attr("action","${ctx}/ModelManage/ModelMaintain/saveModelDataForm");
createForm.submit();
createForm.attr("action","#");
}
}
});
});
}
if($.trim($("#paramName").val())!=""){
$.dialog({
title: "提醒",
content: "有参数尚未添加,确定提交",
ok: function(){
$("#modelSubmit").attr("disabled",true);
var i = $("#addTr").find("tr").size();
if(i==0){
var createForm=$("#modelMaintainForm");
createForm.attr("action","${ctx}/ModelManage/ModelMaintain/saveModelDataForm");
createForm.submit();
createForm.attr("action","#");
}else{
$("#addTr").find("tr").each(function(){
//alert($(this).find("td").eq(0).html());
var paramName = $(this).find("td").eq(0).html();
var paramCode = $(this).find("td").eq(1).html();
var paramValue = $(this).find("td").eq(2).html();
var paramType = $(this).find("td").eq(3).html();
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/ModelManage/ModelMaintain/createModelParams?paramName="+encodeURIComponent(paramCode)+"&paramCode="+encodeURIComponent(paramName)+"&paramValue="+encodeURIComponent(paramValue)+"&paramType="+encodeURIComponent(paramType),
dataType : "text",
async: false,
beforeSend: function(data) {},
success: function(){
i--;
if(i==0){
var createForm=$("#modelMaintainForm");
createForm.attr("action","${ctx}/ModelManage/ModelMaintain/saveModelDataForm");
createForm.submit();
createForm.attr("action","#");
}
}
});
});
}
},
okValue: "确定",
cancel: function(){},
cancelValue: "取消",
});
}else{
$("#modelSubmit").attr("disabled",true);
var i = $("#addTr").find("tr").size();
if(i==0){
var createForm=$("#modelMaintainForm");
createForm.attr("action","${ctx}/ModelManage/ModelMaintain/saveModelDataForm");
createForm.submit();
createForm.attr("action","#");
}else{
$("#addTr").find("tr").each(function(){
//alert($(this).find("td").eq(0).html());
var paramName = $(this).find("td").eq(0).html();
var paramCode = $(this).find("td").eq(1).html();
var paramValue = $(this).find("td").eq(2).html();
var paramType = $(this).find("td").eq(3).html();
$.ajax({
type : "GET",
contentType : "application/json",
/*url: "${ctx}/ModelManage/ModelMaintain/createModelParam?paramName="+encodeURIComponent(paramName)+"&paramValue="+encodeURIComponent(paramValue)+"&paramType="+encodeURIComponent(paramType),*/
url: "${ctx}/ModelManage/ModelMaintain/createModelParams?paramName="+encodeURIComponent(paramCode)+"&paramCode="+encodeURIComponent(paramName)+"&paramValue="+encodeURIComponent(paramValue)+"&paramType="+encodeURIComponent(paramType),
dataType : "text",
async: false,
beforeSend: function(data) {},
success: function(){
i--;
if(i==0){
var createForm=$("#modelMaintainForm");
createForm.attr("action","${ctx}/ModelManage/ModelMaintain/saveModelDataForm");
createForm.submit();
createForm.attr("action","#");
}
}
});
});
}
}
}
}
});
});
$("#modelBack").click(function(){
location.href="${ctx}/ModelManage/ModelResult";
......
......@@ -93,16 +93,32 @@
<tr><td>业务开始时间(<font color="red">必填</font>):</td><td><input id="businessStartTime" name="businessStartTime" class="form-control" type="text" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'businessEndTime\')}'})"> </td></tr>
<tr><td>业务结束时间(<font color="red">必填</font>):</td><td><input type="text" class="form-control" id="businessEndTime" name="businessEndTime" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'businessStartTime\')}'})" /></td></tr>
<tr><td>参数:</td>
<td><table class="table table-hover table-striped" id="displayParam">
<thead>
<tr><th>参数名</th><th>参数值</th><th>参数类型</th><th><a href="javascript:deleteAllTr()">删除所有参数</a></th></tr>
</thead>
<tbody id="addTr">
<c:forEach var="modelParameterList" items="${modelParameterList}">
<tr><td>${modelParameterList.parameterName}</td><td>${modelParameterList.parameterValue}</td><td>${modelParameterList.parameterDataType}</td><td><a href="javascript:;" title="参数ID:${modelParameterList.parameterId}" onclick="deleteRow(this,'${modelParameterList.parameterId}')">删除</a>&nbsp;&nbsp;<a href="javascript:;" onclick="updateRow(this)">修改</a></td></tr>
</c:forEach>
</tbody>
</table></td></tr>
<td>
<table class="table table-hover table-striped" id="displayParam">
<thead class='col-md-15'>
<tr class="row mx-0">
<th class="col-3 text-center">参数名</th>
<th class="col-3 text-center">参数编码</th>
<th class="col-3 text-center">参数值</th>
<th class="col-3 text-center">参数类型</th>
<th class="col-3 text-center"><a href="javascript:deleteAllTr()">删除所有参数</a></th>
</tr>
</thead>
<tbody id="addTr" class='col-md-15'>
<c:forEach var="modelParameterList" items="${modelParameterList}">
<tr class='row mx-0'>
<td class='col-3'>${modelParameterList.parameterCode}</td>
<td class='col-3'>${modelParameterList.parameterName}</td>
<td class='col-3'>${modelParameterList.parameterValue}</td>
<td class='col-3'>${modelParameterList.parameterDataType}</td>
<td class='col-3'>
<a href="javascript:;" title="参数ID:${modelParameterList.parameterId}" onclick="deleteRow(this,'${modelParameterList.parameterId}')">删除</a><a href="javascript:;" onclick="updateRow(this)">修改</a>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</td></tr>
<tr><td>参数数据类型:</td>
<td><select class="form-control" id="paramDataType" name="paramDataType">
<c:forEach var="dataTypes" items="${dataTypeList}">
......@@ -110,6 +126,7 @@
</c:forEach>
</select></td></tr>
<tr><td>参数名:</td><td><input type="text" class="form-control" name="paramName" id="paramName"/></td></tr>
<tr><td>参数编码:</td><td><input type="text" class="form-control" name="paramCode" id="paramCode"/></td></tr>
<tr><td>参数值:</td><td id="addParamVal"><input type="text" class="form-control" name="paramValue" id="paramValue" onkeyup="(this.v=function(){this.value=this.value.replace(/[^0-9]+/,'');}).call(this)" onblur="this.v();" /></td></tr>
<tr><td></td><td>
<button type="button" id="addParam" class="btn btn-primary">添加参数</button></td></tr>
......@@ -214,11 +231,13 @@
$("#addTr").find("tr").removeClass("orange-tr");
$(elementTag).parents("tr").eq(0).addClass("orange-tr");
var paramName = $(elementTag).parents("tr").find("td").eq(0).html();
var paramValue = $(elementTag).parents("tr").find("td").eq(1).html();
var paramType = $(elementTag).parents("tr").find("td").eq(2).html();
var paramCode = $(elementTag).parents("tr").find("td").eq(1).html();
var paramValue = $(elementTag).parents("tr").find("td").eq(2).html();
var paramType = $(elementTag).parents("tr").find("td").eq(3).html();
$("#paramDataType option[value='"+paramType+"']").attr("selected","selected");
$("#paramDataType").change();
$("#paramName").val(paramName);
$("#paramCode").val(paramCode);
$("#paramValue").val(paramValue);
}
......@@ -261,22 +280,28 @@
var paramDataType = $("#paramDataType").val();
var paramName = $.trim($("#paramName").val());
var paramValue = $("#paramValue").val();
var paramCode = $.trim($("#paramCode").val());
if(paramName==""){
$.alert("参数名不能为空");
}else{
}else if(paramCode == ""){
$.alert("参数编码不能为空");
}else{
if($("#addTr").find("tr.orange-tr").html()==null){
var addRow = $("<tr><td>"+paramName+"</td><td>"+paramValue+"</td><td>"+paramDataType+"</td><td><a href='javascript:;' title='' onclick='deleteRow(this,\"\")'>删除</a>&nbsp;&nbsp;<a href='javascript:;' onclick='updateRow(this)'>修改</a></td></tr>");
var addRow = $("<tr class='row mx-0'><td class='col-3'>"+paramName+"</td><td class='col-3'>"+paramCode+"</td><td class='col-3'>"+paramValue+"</td><td class='col-3'>"+paramDataType+"</td><td class='col-3'><a href='javascript:;' title='' onclick='deleteRow(this,\"\")'>删除</a><a href='javascript:;' onclick='updateRow(this)'>修改</a></td></tr>");
$("#addTr").append(addRow);
$("#paramName").attr("value","");
$("#paramCode").attr("value","");
$("#paramValue").attr("value","");
}else{
var findTr = $("#addTr").find("tr.orange-tr");
$(findTr).find("td").eq(0).html(paramName);
$(findTr).find("td").eq(1).html(paramValue);
$(findTr).find("td").eq(2).html(paramDataType);
$(findTr).find("td").eq(1).html(paramCode);
$(findTr).find("td").eq(2).html(paramValue);
$(findTr).find("td").eq(3).html(paramDataType);
$("#addTr").find("tr").removeClass();
$("#addParam").text("添加参数");
$("#paramName").attr("value","");
$("#paramCode").attr("value","");
$("#paramValue").attr("value","");
}
}
......@@ -298,7 +323,7 @@
}else if($("#businessEndTime").val()==""){
$.alert("业务结束时间不能为空");
}else{
if($.trim($("#paramName").val())!=""){
if($.trim($("#paramName").val())!=""){//如果 参数填写框 存在未填写的 数据
$.dialog({
title: "提醒",
content: "有参数尚未添加,确定提交",
......@@ -311,55 +336,60 @@
form.attr("action","#");
}else{
$("#addTr").find("tr").each(function(){
var paramName = $(this).find("td").eq(0).html();
var paramValue = $(this).find("td").eq(1).html();
var paramType = $(this).find("td").eq(2).html();
var paramId = $(this).find("td").find("a").attr("title");
if(paramId!=""){
$.ajax({
type : "GET",
contentType : "application/json",
url:"${ctx}/ModelManage/ModelParameterConfiguration/updateParameter?paramName="+encodeURIComponent(paramName)+"&paramValue="+encodeURIComponent(paramValue)+"&paramType="+encodeURIComponent(paramType)+"&paramId="+paramId,
dataType : "text",
async: false,
beforeSend: function(data){},
success:function(){
i--;
if(i==0){
var form = $("#modelUpdateForm");
form.attr("action","${ctx}/ModelManage/ModelParameterConfiguration/updateDataModelForm");
form.submit();
form.attr("action","#");
}
}
});
}else{
$.ajax({
type : "GET",
contentType : "application/json",
url:"${ctx}/ModelManage/ModelParameterConfiguration/updateParameter?dataModelId="+getDataModelId+"&paramName="+encodeURIComponent(paramName)+"&paramValue="+encodeURIComponent(paramValue)+"&paramType="+encodeURIComponent(paramType),
dataType : "text",
beforeSend: function(data){ },
success:function(){
i--;
if(i==0){
var form = $("#modelUpdateForm");
form.attr("action","${ctx}/ModelManage/ModelParameterConfiguration/updateDataModelForm");
form.submit();
form.attr("action","#");
}
}
});
}
});
}
var paramName = $(this).find("td").eq(0).html();
var paramCode = $(this).find("td").eq(1).html();
var paramValue = $(this).find("td").eq(2).html();
var paramType = $(this).find("td").eq(3).html();
var paramId = $(this).find("td").find("a").attr("title");
if(paramId!=""){//不是新增参数
$.ajax({
type : "GET",
contentType : "application/json",
//url:"${ctx}/ModelManage/ModelParameterConfiguration/updateParameter?paramName="+encodeURIComponent(paramName)+"&paramValue="+encodeURIComponent(paramValue)+"&paramType="+encodeURIComponent(paramType)+"&paramId="+paramId,
url:"${ctx}/ModelManage/ModelParameterConfiguration/UpdateParameter?paramName="+encodeURIComponent(paramCode)+"&paramCode="+encodeURIComponent(paramName)+"&paramValue="+encodeURIComponent(paramValue)+"&paramType="+encodeURIComponent(paramType)+"&paramId="+paramId,
dataType : "text",
async: false,
beforeSend: function(data){},
success:function(){
i--;
if(i==0){
var form = $("#modelUpdateForm");
form.attr("action","${ctx}/ModelManage/ModelParameterConfiguration/updateDataModelForm");
form.submit();
form.attr("action","#");
}
}
});
}
else{//是新增参数
$.ajax({
type : "GET",
contentType : "application/json",
//url:"${ctx}/ModelManage/ModelParameterConfiguration/updateParameter?dataModelId="+getDataModelId+"&paramName="+encodeURIComponent(paramName)+"&paramValue="+encodeURIComponent(paramValue)+"&paramType="+encodeURIComponent(paramType),
url:"${ctx}/ModelManage/ModelParameterConfiguration/UpdateParameter?dataModelId="+getDataModelId+"&paramName="+encodeURIComponent(paramCode)+"&paramCode="+encodeURIComponent(paramName)+"&paramValue="+encodeURIComponent(paramValue)+"&paramType="+encodeURIComponent(paramType),
dataType : "text",
beforeSend: function(data){ },
success:function(){
i--;
if(i==0){
var form = $("#modelUpdateForm");
form.attr("action","${ctx}/ModelManage/ModelParameterConfiguration/updateDataModelForm");
form.submit();
form.attr("action","#");
}
}
});
}
});
}
},
okValue: "确定",
cancel:function(){},
cancelValue: "取消"
});
}else{
}else{//如果 参数填写框 不存在未填写的 数据
var i = $("#addTr").find("tr").size();
if(0==i){
var form = $("#modelUpdateForm");
......@@ -367,16 +397,19 @@
form.submit();
form.attr("action","#");
}else{
$("#addTr").find("tr").each(function(){
$("#addTr").find("tr").each(function(){
var paramName = $(this).find("td").eq(0).html();
var paramValue = $(this).find("td").eq(1).html();
var paramType = $(this).find("td").eq(2).html();
var paramCode = $(this).find("td").eq(1).html();
var paramValue = $(this).find("td").eq(2).html();
var paramType = $(this).find("td").eq(3).html();
var paramId = $(this).find("td").find("a").attr("title");
if(paramId!=""){
if(paramId!=""){//不是新增参数
$.ajax({
type : "GET",
contentType : "application/json",
url:"${ctx}/ModelManage/ModelParameterConfiguration/updateParameter?paramName="+encodeURIComponent(paramName)+"&paramValue="+encodeURIComponent(paramValue)+"&paramType="+encodeURIComponent(paramType)+"&paramId="+paramId,
//url:"${ctx}/ModelManage/ModelParameterConfiguration/updateParameter?paramName="+encodeURIComponent(paramName)+"&paramValue="+encodeURIComponent(paramValue)+"&paramType="+encodeURIComponent(paramType)+"&paramId="+paramId,
//url:"${ctx}/ModelManage/ModelParameterConfiguration/UpdateParameter?paramName="+encodeURIComponent(paramName)+"&paramValue="+encodeURIComponent(paramValue)+"&paramType="+encodeURIComponent(paramType)+"&paramId="+paramId,
url:"${ctx}/ModelManage/ModelParameterConfiguration/UpdateParameter?paramName="+encodeURIComponent(paramCode)+"&paramCode="+encodeURIComponent(paramName)+"&paramValue="+encodeURIComponent(paramValue)+"&paramType="+encodeURIComponent(paramType)+"&paramId="+paramId,
dataType : "text",
async: false,
beforeSend: function(data){},
......@@ -389,12 +422,14 @@
form.attr("action","#");
}
}
});
}else{
});
}else{//是新增参数
$.ajax({
type : "GET",
contentType : "application/json",
url:"${ctx}/ModelManage/ModelParameterConfiguration/updateParameter?dataModelId="+getDataModelId+"&paramName="+encodeURIComponent(paramName)+"&paramValue="+encodeURIComponent(paramValue)+"&paramType="+encodeURIComponent(paramType),
//url:"${ctx}/ModelManage/ModelParameterConfiguration/updateParameter?dataModelId="+getDataModelId+"&paramName="+encodeURIComponent(paramName)+"&paramValue="+encodeURIComponent(paramValue)+"&paramType="+encodeURIComponent(paramType),
//url:"${ctx}/ModelManage/ModelParameterConfiguration/UpdateParameter?dataModelId="+getDataModelId+"&paramName="+encodeURIComponent(paramName)+"&paramValue="+encodeURIComponent(paramValue)+"&paramType="+encodeURIComponent(paramType),
url:"${ctx}/ModelManage/ModelParameterConfiguration/UpdateParameter?dataModelId="+getDataModelId+"&paramName="+encodeURIComponent(paramCode)+"&paramCode="+encodeURIComponent(paramName)+"&paramValue="+encodeURIComponent(paramValue)+"&paramType="+encodeURIComponent(paramType),
dataType : "text",
beforeSend: function(data){ },
success:function(){
......
......@@ -263,11 +263,14 @@
function lookParm(dataModelId,dataModelTitle){
$.dialog({
title:"数据模型标题:"+dataModelTitle,
content:"<div id='paramList'>"+
"<div class='col-xs-12'><div class='panel panel-default'><div class='panel-heading'>参数列表</div><div class='panel-body'> <table class='table table-hover table-striped'> <thead> <tr> <th width='20%'>参数ID号</th> <th width='35%'>参数名</th> <th width='20%'>参数值</th> <th width='25%'>参数类型</th> </tr> </thead> <tbody> </tbody> </table> </div> </div> </div>"+
"</div>",
/*content:"<div id='paramList'>"+
"<div class='col-xs-12'><div class='panel panel-default'><div class='panel-heading'>参数列表</div><div class='panel-body'> <table class='table table-hover table-striped' width='500'> <thead class='col-md-12'> <tr class='row mx-0'> <th width='40%'>参数ID号</th> <th width='35%'>参数名</th><th width='35%'>参数编码</th> <th width='20%'>参数值</th> <th width='25%'>参数类型</th> </tr> </thead> <tbody> </tbody> </table> </div> </div> </div>"+
"</div>",*/
content:"<div id='paramList'>"+
"<div class='col-xs-12'><div class='panel panel-default'><div class='panel-heading'>参数列表</div><div class='panel-body'> <table class='table table-striped text-center ' > <thead class='col-md-15'> <tr class='row mx-0'> <th class='col-3 text-center'>参数ID号</th> <th class='col-3 text-center'>参数名</th><th class='col-3 text-center'>参数编码</th> <th class='col-3 text-center'>参数值</th> <th class='col-3 text-center'>参数类型</th> </tr> </thead> <tbody class='col-md-15'> </tbody> </table> </div> </div> </div>"+
"</div>",
lock:true,
width:800,
width:700,
initialize:function(){
$.ajax({
type : 'GET',
......@@ -289,10 +292,11 @@
if(data[i].parameterValue=="undefined" || data[i].parameterValue==null || data[i].parameterValue==""){
data[i].parameterValue="";
}
paramTbody.append($("<tr></tr>").append("<td>"+data[i].parameterId+"</td>")
.append("<td>"+data[i].parameterName+"</td>")
.append("<td>"+data[i].parameterValue+"</td>")
.append("<td>"+data[i].parameterDataType+"</td>"));
paramTbody.append($("<tr class='row mx-0'></tr>").append("<td class='col-3'>"+data[i].parameterId+"</td>")
.append("<td class='col-3'>"+data[i].parameterCode+"</td>")
.append("<td class='col-3'>"+data[i].parameterName+"</td>")
.append("<td class='col-3'>"+data[i].parameterValue+"</td>")
.append("<td class='col-3'>"+data[i].parameterDataType+"</td>"));
}
}
}
......
......@@ -570,7 +570,7 @@ table_pagging.prototype = {
}
function radioChoose(clickObj){
alert();
var obj = eval("(" + jsonData + ")");
//alert(obj);
if(clickObj.checked){
......
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