191 lines
8.1 KiB
Plaintext
191 lines
8.1 KiB
Plaintext
<%@ page contentType="text/html;charset=UTF-8" %>
|
||
<%@ include file="/webpage/include/taglib.jsp"%>
|
||
<html>
|
||
<head>
|
||
<title>区域管理</title>
|
||
<meta name="decorator" content="default"/>
|
||
<link rel="stylesheet" href="${ctxStatic}/layui-v2.4.5/layui/css/layui.css" media="all">
|
||
<script src="${ctxStatic}/layui-v2.4.5/layui/layui.js"></script>
|
||
<script>
|
||
$(document).ready(function(){
|
||
validateForm = $("#inputForm").validate({
|
||
submitHandler: function(form){
|
||
loading('正在提交,请稍等...');
|
||
form.submit();
|
||
},
|
||
errorContainer: "#messageBox",
|
||
errorPlacement: function(error, element) {
|
||
$("#messageBox").text("输入有误,请先更正。");
|
||
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
|
||
error.appendTo(element.parent().parent());
|
||
} else {
|
||
error.insertAfter(element);
|
||
}
|
||
}
|
||
});
|
||
});
|
||
var validateForm;
|
||
function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
|
||
if(validateForm.form()){
|
||
$("#inputForm").submit();
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
var fileI = $(".remarks").length+1;
|
||
$(function(){
|
||
$("#addFile").click(function(){
|
||
$(this).parent().parent().before("<tr class='file'>\n" +
|
||
"\t\t\t\t <td class=\"width-15 active\"><label class=\"pull-right\">非指定文件上传</label></td>\n" +
|
||
"\t\t\t\t <td class=\"width-35\">\n" +
|
||
"\t\t\t\t\t <input type=\"file\" class=\"form-control\" name=\"files\"> </input >\n" +
|
||
"\t\t\t\t </td>\n" +
|
||
"\t\t\t </tr><tr class='remarks'>\n" +
|
||
"\t\t\t\t <td class=\"width-15 active\"><label class=\"pull-right\">非指定文件备注:</label></td>\n" +
|
||
"\t\t\t\t <td class=\"width-35\">\n" +
|
||
"\t\t\t\t\t <input type=\"text\" name=\"remark\" value=\"\" maxlength=\"64\" class=\"form-control\" />\n" +
|
||
"\t\t\t\t " +
|
||
|
||
"<input type='button' id ='delete"+fileI+"' value = '删除' onclick='deleteDiv("+fileI+");'> " +
|
||
|
||
"</td>\n" +
|
||
"\t\t\t </tr>");
|
||
fileI++;
|
||
});
|
||
});
|
||
function deleteDiv(i) {
|
||
var $tr = $("#delete"+i).parent().parent();
|
||
$tr.prev("tr").remove();
|
||
$tr.remove();
|
||
$(".file").each(function (index) {
|
||
var n = index + 1;
|
||
// $(this).find("td:first").text("非指定文件"+n+"上传");
|
||
$(this).find("td:last input").attr("name","files");
|
||
})
|
||
|
||
$(".remarks").each(function (index) {
|
||
var n = index + 1;
|
||
// $(this).find("td:first").text("非指定文件"+n+"备注");
|
||
$(this).find("td:last input").attr("name","remark");
|
||
})
|
||
}
|
||
</script>
|
||
</head>
|
||
<body>
|
||
<form:form id="inputForm" modelAttribute="subtask" action="${ctx}/assessment/assessed/submitNonDesignated" enctype="multipart/form-data" method="post" class="form-horizontal">
|
||
<input type="hidden" name="id" value="${subtask.id}"/>
|
||
<table class="table table-bordered table-condensed dataTables-example dataTable no-footer">
|
||
<tbody>
|
||
<tr>
|
||
<td class="width-15 active"><label class="pull-right">机构名称:</label></td>
|
||
<td class="width-35">
|
||
<form:input path="office.name" htmlEscape="false" maxlength="64" class="form-control" readonly="true"/>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="width-15 active"><label class="pull-right">指标名称:</label></td>
|
||
<td class="width-35">
|
||
<form:textarea path="acIndex.name" htmlEscape="false" rows="4" maxlength="2000" class="form-control" readonly="true"/>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="width-15 active"><label class="pull-right">开始时间:</label></td>
|
||
<td class="width-35">
|
||
<input id="startTime" name="startTime" type="text" maxlength="20" class="laydate-icon form-control layer-date"
|
||
value="<fmt:formatDate value="${subtask.startTime}" pattern="yyyy-MM-dd HH:mm:ss"/>" readonly="true"/>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="width-15 active"><label class="pull-right">截止时间:</label></td>
|
||
<td class="width-35">
|
||
<input id="endTime" name="endTime" type="text" maxlength="20" class="laydate-icon form-control layer-date"
|
||
value="<fmt:formatDate value="${subtask.endTime}" pattern="yyyy-MM-dd HH:mm:ss"/>" readonly="true"/>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="width-15 active"><label class="pull-right">提交状态:</label></td>
|
||
<td class="width-35">
|
||
<input type="text" name="status" value="${fns:getDictLabel(subtask.fileSubmitStatus,"file_submit_status","未提交")}" htmlEscape="false" maxlength="64" class="form-control" readonly="true"/>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="width-15 active"><label class="pull-right">剩余时间:</label></td>
|
||
<td class="width-35" id="time" style="color:red;font-size: large"></td>
|
||
</tr>
|
||
|
||
<c:forEach items="${list}" var="file" varStatus="var" >
|
||
<tr>
|
||
<td class="width-15 active"><label class="pull-right">非指定文件上传</label></td>
|
||
<td class="width-35">
|
||
<%--
|
||
<input type="file" class="form-control" name="files"></input>
|
||
--%>
|
||
|
||
<a href="#" onclick="viewFileByUser('${ctx}/assessment/assessed/viewFileByUser?id=${file.id}')" ><font color="#1e90ff">${file.fileTitle}</font></a>
|
||
<%-- <span class="layui-inline layui-upload-choose">${file.fileTitle}</span>--%>
|
||
|
||
</td>
|
||
</tr>
|
||
|
||
|
||
|
||
<tr>
|
||
<td class="width-15 active"><label class="pull-right">非指定文件备注:</label></td>
|
||
<td class="width-35">
|
||
<input type="text" name="remarks" value="${file.remarks}" maxlength="64" class="form-control" readonly="true"/>
|
||
</td>
|
||
</tr>
|
||
</c:forEach>
|
||
<tr>
|
||
<td colspan="5" style="text-align: center"><button type="button" class="layui-btn layui-btn-normal" id="addFile">新增文件上传</button></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
</form:form>
|
||
<script type="text/javascript">
|
||
//文件预览
|
||
function viewFileByUser(url){
|
||
|
||
top.layer.open({
|
||
type: 2,
|
||
area: ['80%', '80%'],
|
||
title: "文件预览",
|
||
//maxmin: true,
|
||
content: url,
|
||
btn: ['关闭'],
|
||
cancel: function (index) {
|
||
}
|
||
});
|
||
}
|
||
|
||
//带天数的倒计时
|
||
function countDown(times){
|
||
var timer=null;
|
||
timer=setInterval(function(){
|
||
var day=0,
|
||
hour=0,
|
||
minute=0,
|
||
second=0;//时间默认值
|
||
if(times > 0){
|
||
day = Math.floor(times / (60 * 60 * 24));
|
||
hour = Math.floor(times / (60 * 60)) - (day * 24);
|
||
minute = Math.floor(times / 60) - (day * 24 * 60) - (hour * 60);
|
||
second = Math.floor(times) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);
|
||
}
|
||
if (day <= 9) day = '0' + day;
|
||
if (hour <= 9) hour = '0' + hour;
|
||
if (minute <= 9) minute = '0' + minute;
|
||
if (second <= 9) second = '0' + second;
|
||
/*$("#time").text(minute+"分钟:"+second+"秒");*/
|
||
$("#time").text(day+"天:"+hour+"小时:"+minute+"分钟:"+second+"秒");
|
||
times--;
|
||
},1000);
|
||
if(times<=0){
|
||
clearInterval(timer);
|
||
}
|
||
}
|
||
countDown('${second}');
|
||
</script>
|
||
</body>
|
||
</html> |