提交 c68018f9 编写于 作者: doc_wei's avatar doc_wei

调查问卷设置静态js操作完成

上级 7a673fc2
因为 它太大了无法显示 source diff 。你可以改为 查看blob
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_DISABLED_BUILDER" value="org.eclipse.wst.jsdt.core.javascriptValidator"/>
<mapAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
</launchConfiguration>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_DISABLED_BUILDER" value="org.eclipse.wst.validation.validationbuilder"/>
<mapAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
</launchConfiguration>
......@@ -6,8 +6,13 @@
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
<value>&lt;project&gt;/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
......@@ -21,8 +26,13 @@
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
<value>&lt;project&gt;/.externalToolBuilders/org.eclipse.wst.validation.validationbuilder.launch</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
......
......@@ -64,4 +64,20 @@ public class DwSurveyDirectoryController {
dwSurveyDirectoryService.queryDwSurveyDirectoryMationById(inputObject, outputObject);
}
/**
*
* @Title: queryDwSurveyMationById
* @Description: 获取调查问卷信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping("/post/DwSurveyDirectoryController/queryDwSurveyMationById")
@ResponseBody
public void queryDwSurveyMationById(InputObject inputObject, OutputObject outputObject) throws Exception{
dwSurveyDirectoryService.queryDwSurveyMationById(inputObject, outputObject);
}
}
......@@ -11,4 +11,6 @@ public interface DwSurveyDirectoryService {
public void queryDwSurveyDirectoryMationById(InputObject inputObject, OutputObject outputObject) throws Exception;
public void queryDwSurveyMationById(InputObject inputObject, OutputObject outputObject) throws Exception;
}
......@@ -138,5 +138,23 @@ public class DwSurveyDirectoryServiceImpl implements DwSurveyDirectoryService{
question.put("questionLogic", questionLogic);
return question;
}
/**
*
* @Title: queryDwSurveyMationById
* @Description: 获取调查问卷信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public void queryDwSurveyMationById(InputObject inputObject, OutputObject outputObject) throws Exception {
Map<String, Object> map = inputObject.getParams();
Map<String, Object> surveyMation = dwSurveyDirectoryDao.querySurveyMationById(map);//获取问卷信息
outputObject.setBean(surveyMation);
outputObject.settotal(1);
}
}
......@@ -283,9 +283,15 @@
a.mail_only mailOnly,
a.rule,
a.rule_code ruleCode,
a.refresh,
a.survey_tag surveyTag,
a.view_answer viewAnswer,
a.visibility
a.visibility,
a.yn_end_num ynEndNum,
a.end_num endNum,
a.yn_end_time ynEndTime,
a.end_time endTime,
a.view_answer viewAnswer
FROM
dw_survey_directory a
WHERE a.id = #{id}
......
......@@ -17,6 +17,9 @@
<url id="dwsurveydirectory003" path="/post/DwSurveyDirectoryController/queryDwSurveyDirectoryMationById" val="获取调查问卷题目信息" allUse="1">
<property id="rowId" name="id" ref="required" var="问卷id"/>
</url>
<url id="dwsurveydirectory004" path="/post/DwSurveyDirectoryController/queryDwSurveyMationById" val="获取调查问卷信息" allUse="1">
<property id="rowId" name="id" ref="required" var="问卷id"/>
</url>
<!-- 问卷调查结束 -->
</controller>
\ No newline at end of file
......@@ -8,26 +8,81 @@ layui.config({
var $ = layui.$,
form = layui.form;
console.log(parent.parent.rowId);
form.render();
form.on('submit(formAddBean)', function (data) {
//表单验证
if (winui.verifyForm(data.elem)) {
var params = {
surveyName: $("#surveyName").val(),
};
// AjaxPostUtil.request({url:reqBasePath + "dwsurveydirectory002", params:params, type:'json', callback:function(json){
// if(json.returnCode == 0){
// parent.layer.close(index);
// parent.refreshCode = '0';
// }else{
// top.winui.window.msg(json.returnMessage, {icon: 2,time: 2000});
// }
// }});
}
return false;
showGrid({
id: "showForm",
url: reqBasePath + "dwsurveydirectory004",
params: {rowId: parent.parent.rowId},
pagination: false,
template: getFileContent('tpl/dwsurveydesign/designSurveyOpTemplates.tpl'),
ajaxSendLoadBefore: function(hdb){
hdb.registerHelper('compare1', function(v1, v2, options) {
if(v1 == v2){
return "checked";
}else{
return "";
}
});
hdb.registerHelper('compare2', function(v1, v2, options) {
if(v1 != v2){
return "readonly";
}else{
return "";
}
});
},
ajaxSendAfter:function(json){
form.render('checkbox');
form.render();
form.on('checkbox(rule)', function (data) {
var check = data.elem.checked;
if(check){//选中
$("#ruleCode").attr("readonly", false);
}else{
$("#ruleCode").val("");
$("#ruleCode").attr("readonly", true);
}
});
form.on('checkbox(ynEndNum)', function (data) {
var check = data.elem.checked;
if(check){//选中
$("#endNum").attr("readonly", false);
}else{
$("#endNum").val("");
$("#endNum").attr("readonly", true);
}
});
form.on('checkbox(ynEndTime)', function (data) {
var check = data.elem.checked;
if(check){//选中
$("#endTime").attr("readonly", false);
}else{
$("#endTime").val("");
$("#endTime").attr("readonly", true);
}
});
form.on('submit(formAddBean)', function (data) {
//表单验证
if (winui.verifyForm(data.elem)) {
var params = {
surveyName: $("#surveyName").val(),
};
// AjaxPostUtil.request({url:reqBasePath + "dwsurveydirectory002", params:params, type:'json', callback:function(json){
// if(json.returnCode == 0){
// parent.layer.close(index);
// parent.refreshCode = '0';
// }else{
// top.winui.window.msg(json.returnMessage, {icon: 2,time: 2000});
// }
// }});
}
return false;
});
}
});
//取消
......
......@@ -10,34 +10,7 @@
<body>
<div style="padding-top:20px;">
<form class="layui-form" action="" id="showForm" autocomplete="off">
<div class="layui-form-item">
<div class="p_DialogContent">
<input type="hidden" name="svyAttrSaveTag" value="1">
<div class="p_DialogContentTitle">回答限制</div>
<div class="p_DialogContentRoot">
<div class="p_DialogContentItem"><label><input type="checkbox" name="effective" value="4"> 每台电脑或手机只能答一次</label></div>
<div class="p_DialogContentItem"><label><input type="checkbox" name="effectiveIp" value="1"> 每个IP只能答一次</label></div>
<div class="p_DialogContentItem"><label><input type="checkbox" name="rule" value="3"> 启用访问密码</label> &nbsp;&nbsp;&nbsp;设置密码:
<input type="text" size="10" name="ruleCode" class="inputSytle_1">
</div>
<div class="p_DialogContentItem"><label><input type="checkbox" name="refresh" value="1"> 有重复回答启用验证码</label></div>
<div class="p_DialogContentItem" style="display: none;"><label><input type="checkbox" name="mailOnly" value="1"> 只有邮件邀请唯一链接的受访者可回答</label></div>
</div>
</div>
<div class="p_DialogContent">
<div class="p_DialogContentTitle">何时结束</div>
<div class="p_DialogContentRoot">
<div class="p_DialogContentItem"><label><input type="checkbox" name="ynEndNum" value="1"> 收集到&nbsp;<input type="text" size="12" class="inputSytle_1" name="endNum">&nbsp;份答卷时结束</label></div>
<div class="p_DialogContentItem"><label><input type="checkbox" name="ynEndTime" value="1">&nbsp;<input type="text" size="20" class="inputSytle_1 Wdate" onfocus="WdatePicker({minDate:'%y-%M-{%d+1}',dateFmt:'yyyy-MM-dd HH:mm:ss'})" name="endTime">&nbsp;时结束 </label></div>
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-input-block">
<button class="winui-btn" id="cancle">取消</button>
<button class="winui-btn" lay-submit lay-filter="formAddBean">保存</button>
</div>
</div>
</form>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
......
{{#bean}}
<div class="layui-form-item">
<div class="p_DialogContent">
<input type="hidden" name="svyAttrSaveTag" value="1">
<div class="p_DialogContentTitle">回答限制</div>
<div class="p_DialogContentRoot">
<div class="p_DialogContentItem">
<input type="checkbox" name="effective" {{#compare1 effective '4'}}{{/compare1}} value="4" lay-filter="effective" />每台电脑或手机只能答一次
</div>
<div class="p_DialogContentItem">
<input type="checkbox" name="effectiveIp" {{#compare1 effectiveIp '1'}}{{/compare1}} value="1" lay-filter="effectiveIp" />每个IP只能答一次
</div>
<div class="p_DialogContentItem">
<input type="checkbox" name="rule" {{#compare1 rule '3'}}{{/compare1}} value="3" lay-filter="rule" />启用访问密码&nbsp;&nbsp;&nbsp;设置密码:
<input type="text" size="10" id="ruleCode" name="ruleCode" class="inputSytle_1" value="{{ruleCode}}" {{#compare2 rule '3'}}{{/compare2}}>
</div>
<div class="p_DialogContentItem">
<input type="checkbox" name="refresh" {{#compare1 refresh '1'}}{{/compare1}} value="1" lay-filter="refresh" />有重复回答启用验证码
</div>
</div>
</div>
<div class="p_DialogContent">
<div class="p_DialogContentTitle">结束限制</div>
<div class="p_DialogContentRoot">
<div class="p_DialogContentItem">
<input type="checkbox" name="ynEndNum" {{#compare1 ynEndNum '1'}}{{/compare1}} value="1" lay-filter="ynEndNum" /> 收集到&nbsp;
<input type="text" size="12" class="inputSytle_1" id="endNum" name="endNum" value="{{endNum}}" {{#compare2 ynEndNum '1'}}{{/compare2}}>&nbsp;份答卷时结束
</div>
<div class="p_DialogContentItem">
<input type="checkbox" name="ynEndTime" {{#compare1 ynEndTime '1'}}{{/compare1}} value="1" lay-filter="ynEndTime" />&nbsp;
<input type="text" size="20" class="inputSytle_1" id="endTime" name="endTime" value="{{endTime}}" {{#compare2 ynEndTime '1'}}{{/compare2}}>&nbsp;时结束
</div>
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-input-block">
<button class="winui-btn" id="cancle">取消</button>
<button class="winui-btn" lay-submit lay-filter="formAddBean">保存</button>
</div>
</div>
{{/bean}}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册