Commit c16e731b authored by 王国存's avatar 王国存

处理合并冲突

parents 68e0bc81 8aaf3574
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<JetCodeStyleSettings>
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings>
<codeStyleSettings language="JAVA">
<option name="SPACE_BEFORE_ANOTATION_PARAMETER_LIST" value="true" />
<option name="SPACE_WITHIN_ANNOTATION_PARENTHESES" value="true" />
</codeStyleSettings>
<codeStyleSettings language="kotlin">
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</codeStyleSettings>
</code_scheme>
</component>
\ No newline at end of file
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>
\ No newline at end of file
......@@ -11,6 +11,7 @@
</annotationProcessing>
<bytecodeTargetLevel>
<module name="rootTwo" target="1.7" />
<module name="Tianruan" target="1.8" />
</bytecodeTargetLevel>
</component>
</project>
\ No newline at end of file
......@@ -10,7 +10,7 @@
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/classes" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
......@@ -209,6 +209,15 @@ public class GoToCtrl {
return "/education/questionnaire_information";
}
@RequestMapping({"/education/questionnaire_Administration_list"})
public String getEducationQuestionnaire_Administration_list(HttpServletRequest request) {
// String recordId = request.getParameter("recordId");
// request.setAttribute("recordId", recordId);
// String processStatus = request.getParameter("processStatus");
// request.setAttribute("processStatus", processStatus);
return "/education/questionnaire_Administration_list";
}
@RequestMapping({"/education/questionnaire_Information_list"})
public String getEducationQuestionnaire_information_list(HttpServletRequest request) {
String recordId = request.getParameter("recordId");
......@@ -218,6 +227,7 @@ public class GoToCtrl {
return "/education/questionnaire_Information_list";
}
@RequestMapping({"/space/questionnaire_information"})
public String getSpaceQuestionnaire_information(HttpServletRequest request) {
return "/space/questionnaire_information";
......
......@@ -6,6 +6,7 @@ import com.alibaba.excel.write.metadata.style.WriteCellStyle;
import com.alibaba.excel.write.metadata.style.WriteFont;
import com.alibaba.excel.write.style.HorizontalCellStyleStrategy;
import com.alibaba.excel.write.style.column.SimpleColumnWidthStyleStrategy;
//import com.tiptimes.ctrl.ExcelFillCellMergeStrategy;
import com.tiptimes.ctrl.ExcelFillCellMergeStrategy;
import com.tiptimes.dao.QuestionnaireDao;
import com.tiptimes.model.Answer;
......
......@@ -21,7 +21,7 @@
class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory"
p:host-name="localhost"
p:port="6379"
p:use-pool="true"
p:use-pool="true" p:password="12345"
p:database="8" />
<bean id="stringRedisSerializer"
......
......@@ -143,7 +143,6 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.
</div>
</div>
</div>
</div>
</div>
</div>
......
......@@ -137,6 +137,7 @@
</ul></li>
<li><a href="#" data-toggle="tooltip" data-placement="right" title="站内信息管理"><i class="fa fa-envelope"></i>
<span class="nav-label">站内信管理</span><span class="fa arrow"></span>
</a>
<ul class="nav nav-second-level">
<li><a class="J_menuItem" href="<%=request.getContextPath()%>/goto/education/sitesInfromation_new">新建消息</a></li>
<li><a class="J_menuItem" href="<%=request.getContextPath()%>/goto/education/sitesInformation_collection">收件箱</a></li>
......@@ -159,18 +160,20 @@
<li><a class="J_menuItem"
href="<%=request.getContextPath()%>/goto/education/action_log">行为查询</a></li>
</ul></li>
<li><a class="J_menuItem" href="<%=request.getContextPath()%>/goto/education/notice" data-index="0" data-toggle="tooltip" data-placement="right" title="公示公告"> <i class="fa fa-commenting"></i> <span class="nav-label">公示公告</span></a></li>
<li>
<a class="J_menuItem"
href="<%=request.getContextPath()%>/goto/education/questionnaire_Information_list"
data-index="0"
data-toggle="tooltip"
data-placement="right"
title="问卷管理">
<i class="fa fa-commenting"></i>
<span class="nav-label">评估数据管理</span>
<li><a href="#" data-toggle="tooltip" data-placement="right" title="绩效评估"> <i class="fa fa fa-commenting"></i><span
class="nav-label">绩效评估</span> <span class="fa arrow"></span>
</a>
</li>
<ul class="nav nav-second-level">
<li><a class="J_menuItem"
href="<%=request.getContextPath()%>/goto/education/questionnaire_Information_list">2021年天津市高校众创空间绩效评估</a></li>
<li><a class="J_menuItem"
href="<%=request.getContextPath()%>/goto/education/questionnaire_Administration_list">天津市高校众创空间绩效汇总</a></li>
</ul></li>
<%-- <li><a class="J_menuItem" href="<%=request.getContextPath()%>/goto/education/space_change_password" data-index="0"> <i class="fa fa-rotate-left"></i> <span class="nav-label">修改密码</span></a></li>
<li><a class="J_menuItem" href="<%=request.getContextPath()%>/user/Logout" data-index="0"> <i class="fa fa-power-off"></i> <span class="nav-label">安全退出</span></a></li> --%>
</ul>
......
<%@ page language="java" contentType="text/html" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/"; %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<title>众创空间</title>
<link rel="shortcut icon" href="favicon.ico">
<link href="<%=request.getContextPath()%>/res/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
<link href="<%=request.getContextPath()%>/res/css/font-awesome.css?v=4.4.0" rel="stylesheet">
<link href="<%=request.getContextPath()%>/res/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
<link href="<%=request.getContextPath()%>/res/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
<link href="<%=request.getContextPath()%>/res/css/animate.css" rel="stylesheet">
<link href="<%=request.getContextPath()%>/res/css/style.css?v=4.1.0" rel="stylesheet">
<link href="<%=request.getContextPath()%>/res/js/plugins/highlight/highlight.css" rel="stylesheet">
</head>
<body>
<script type="text/javascript">
var webroot = '<%=request.getContextPath()%>/';
var class_id = '<%=(String)request.getParameter("class_id")%>';
var className = '<%=(String)request.getParameter("className")%>';
</script>
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<span style="font-size: 24px;">绩效汇总<span id="material_class_title"></span></span>
<div class="ibox-content">
<div class="form-inline pull-right ">
<input type="text" id="title" class="form-control" placeholder="众创空间"/>
<button style="margin-top: 5px" class=" btn btn-sm btn-primary m-t-n-xs"
onclick="search();">搜 索
</button>
<a onclick="reform_DIV_Export()">
<button style="margin-top: 5px" class=" btn btn-sm btn-primary m-t-n-xs">导 出</button>
</a>
</div>
</div>
<br>
<br>
<table id="hidden-table-score" width="100%"
class="table table-striped table-bordered table-hover dataTables-example">
<thead>
<tr id="table-head">
<td>序号</td>
<td>众创空间名称</td>
<td>基础指标得分</td>
<td>引导指标得分</td>
<td>奖励指标得分</td>
<td>
<div style="text-align: left;">
<div style="display: inline-block;padding-bottom: 22px;margin-right: 10px">
合计得分
</div>
<div style="display: inline-block;padding-top: 18px">
<div onclick="sortAsc()"
style=" width: 0px;height: 0px; border-bottom: 9px solid black;border-left: 10px solid transparent; border-right: 10px solid transparent;">
</div>
<div style="height: 18px"></div>
<div onclick="sortDesc()"
style=" width: 0px;height: 0px; border-top: 9px solid black;border-left: 10px solid transparent; border-right: 10px solid transparent;">
</div>
</div>
</div>
</td>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- 全局js -->
<script src="<%=request.getContextPath()%>/res/js/jquery.min.js?v=2.1.4"></script>
<script src="<%=request.getContextPath()%>/res/js/bootstrap.min.js?v=3.3.6"></script>
<script src="<%=request.getContextPath()%>/res/js/plugins/jeditable/jquery.jeditable.js"></script>
<script src="<%=request.getContextPath()%>/res/js/plugins/highlight/highlight.js"></script>
<script src="<%=request.getContextPath()%>/res/js/plugins/sweetalert/sweetalert.min.js"></script>
<!-- layer javascript -->
<script src="<%=request.getContextPath()%>/res/js/plugins/layer/layer.min.js"></script>
<!-- Data Tables -->
<%--<script src="<%=request.getContextPath()%>/res/js/plugins/dataTables/jquery.dataTables.js"></script>--%>
<script src="<%=request.getContextPath()%>/res/js/plugins/dataTables/dataTables.bootstrap.js"></script>
<!-- 自定义js -->
<script src="<%=request.getContextPath()%>/res/js/education/questionnaire_Administration_list.js"></script>
</body>
</html>
......@@ -14,7 +14,7 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.
<link href="<%=request.getContextPath()%>/res/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
<link href="<%=request.getContextPath()%>/res/css/font-awesome.css?v=4.4.0" rel="stylesheet">
<link href="<%=request.getContextPath()%>/res/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
<link href="<%=request.getContextPath()%>/res/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
<link href="<%=request.getContextPath()%>/res/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
<link href="<%=request.getContextPath()%>/res/css/animate.css" rel="stylesheet">
<link href="<%=request.getContextPath()%>/res/css/style.css?v=4.1.0" rel="stylesheet">
<link href="<%=request.getContextPath()%>/res/js/plugins/highlight/highlight.css" rel="stylesheet">
......@@ -48,11 +48,9 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.
</select>
<input type="text" id="title" class="form-control" placeholder="众创空间" />
<button style="margin-top: 5px" class=" btn btn-sm btn-primary m-t-n-xs" onclick="search();">搜 索</button>
<button style="margin-top: 5px" class=" btn btn-sm btn-primary m-t-n-xs" onclick="">导 出</button>
</div>
<table id="hidden-table-info" width="100%" class="table table-striped table-bordered table-hover dataTables-example"></table>
</table>
</div>
</div>
</div>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -4034,6 +4034,20 @@ code {
min-height: 48px;
}
.ibox-titlesun {
-moz-border-bottom-colors: none;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
background-color: #ffffff;
-webkit-border-image: none;
border-width: 4px 0px 0;
color: inherit;
margin-bottom: 0;
padding: 14px 15px 7px;
min-height: 48px;
}
.ibox-content {
background-color: #ffffff;
color: inherit;
......@@ -4099,7 +4113,7 @@ table.table-mail tr td {
margin: 0 0 7px;
padding: 0;
text-overflow: ellipsis;
float: left;
/*float: left;*/
}
.ibox-title .label {
......@@ -4109,7 +4123,7 @@ table.table-mail tr td {
.ibox-tools {
display: inline-block;
float: right;
/*float: left;*/
margin-top: 0;
position: relative;
padding: 0;
......
$(function () {
getTableData()
})
//降序排列
function sortDesc() {
var sorting='desc'
if ($("#title").val().length > 50) {
swal("失败!",'输入字符过多!', "error")
} else {
$.ajax({
url: webroot + "questionnaire/selectPerformanceSummaryList",
method: "GET",
datatype: "json",
data: {
"optinName": $("#title").val(),
"sorting":sorting
},
success: (res) => {
$("tbody").empty()
for (let i = 0; i < res.data.performanceSummaryList.length; i++) {
$("tbody").append(
"<tr>" +
"<td>" + (i + 1) + "</td>" +
"<td>" + res.data.performanceSummaryList[i].optinName + "</td>" +
"<td>" + res.data.performanceSummaryList[i].basicIndicators + "</td>" +
"<td>" + res.data.performanceSummaryList[i].guideIndicators + "</td>" +
"<td>" + res.data.performanceSummaryList[i].rewardIndicators + "</td>" +
"<td>" + res.data.performanceSummaryList[i].totalScore + "</td>" +
"</tr>"
)
}
},
error: () => {
swal("失败!",'网络有问题,稍后再试', "error")
}
})
}
}
//升序排列
function sortAsc() {
var sorting='asc'
if ($("#title").val().length > 50) {
swal("失败!",'输入字符过多', "error")
} else {
$.ajax({
url:webroot + "questionnaire/selectPerformanceSummaryList",
method: "GET",
datatype: "json",
data: {
"optinName": $("#title").val(),
"sorting":sorting
},
success: (res) => {
$("tbody").empty()
for (let i = 0; i < res.data.performanceSummaryList.length; i++) {
$("tbody").append(
"<tr>" +
"<td>" + (i + 1) + "</td>" +
"<td>" + res.data.performanceSummaryList[i].optinName + "</td>" +
"<td>" + res.data.performanceSummaryList[i].basicIndicators + "</td>" +
"<td>" + res.data.performanceSummaryList[i].guideIndicators + "</td>" +
"<td>" + res.data.performanceSummaryList[i].rewardIndicators + "</td>" +
"<td>" + res.data.performanceSummaryList[i].totalScore + "</td>" +
"</tr>"
)
}
},
error: () => {
swal("失败!",'网络有问题,稍后再试', "error")
}
})
}
}
//导出汇总文件
function reform_DIV_Export() {
$.ajax({
url: webroot + "questionnaire/exportPerformanceSummary",
method: "GET",
responseType: "blob",
success: (res) => {
window.location.href = webroot+"questionnaire/exportPerformanceSummary"
},
error: () => {
swal("失败!",'网络有问题,稍后再试', "error")
}
})
}
//搜索标题内容
function search() {
if ($("#title").val().length > 50) {
swal("失败!",'输入字符过多', "error")
} else {
getTableData()
}
}
//获取列表详细信息
function getTableData() {
$.ajax({
url: webroot + "questionnaire/selectPerformanceSummaryList",
method: "GET",
datatype: "json",
data:{
"optinName": $("#title").val(),
},
success: (res) => {
$("tbody").empty()
for (let i = 0; i < res.data.performanceSummaryList.length; i++) {
$("tbody").append(
"<tr>" +
"<td>" + (i + 1) + "</td>" +
"<td>" + res.data.performanceSummaryList[i].optinName + "</td>" +
"<td>" + res.data.performanceSummaryList[i].basicIndicators + "</td>" +
"<td>" + res.data.performanceSummaryList[i].guideIndicators + "</td>" +
"<td>" + res.data.performanceSummaryList[i].rewardIndicators + "</td>" +
"<td>" + res.data.performanceSummaryList[i].totalScore + "</td>" +
"</tr>"
)
}
},
error: () => {
swal("失败!",'网络有问题,稍后再试', "error")
}
})
}
\ No newline at end of file
......@@ -9,6 +9,10 @@ function search() {
var processStatus = $("#processStatus").val();
searchMessage(title,processStatus);
}
function sort() {
}
function searchMessage(title, status) {
if (title !== null && title !== '' && status !== null && status !== ''){
var url=webroot+"questionnaire/selectRecordList?questionnaireUuid=1&createBy="+title+"&processStatus="+status;
......@@ -23,6 +27,19 @@ function searchMessage(title, status) {
$('#hidden-table-info').DataTable().ajax.url( url).load();
}
function reform_DIV_Show(id) {
console.log(1);
if (id == "0") {
$("#Reform_DIV_name").val("");
$("#Reform_DIV_account").val("");
$("#Reform_DIV_password").val("");
$("#Reform_DIV_password2").val("");
$("#material_img").val(webroot + "res/image/team.jpg");
$("#img").attr('src', webroot + "res/image/team.jpg");
}
$('#reform_DIV').modal('show');
}
function testListApi() {
var url=webroot+"questionnaire/selectRecordList?questionnaireUuid=1";
$(document).ready(function() {
......
......@@ -17,13 +17,14 @@ $(function () {
StatusCheck();
})
var ocarina = self.setInterval("timeCircleSave()",600000);
var ocarina = self.setInterval("timeCircleSave()", 600000);
var oTable;
var processStatus = 0
// 问卷状态自检
function StatusCheck() {
if (processStatus === 2){
if (processStatus === 2) {
$('#rejectLabel').show();
$('#rejectReason').show();
} else {
......@@ -34,181 +35,180 @@ function StatusCheck() {
// 验证、填数据用列表
var option_list = [
{ num: 1, name: '1.基本信息', table: '', max: 0 },
{ num: 2, name: '2.众创空间场地情况', table: '', max: 0 },
{ num: 3, name: '3.是否租赁场地', table: '', max: 0 },
{ num: 4, name: '4.众创空间配备专职工作人员情况', table: 'professionalEmploy', max: 20 },
{ num: 5, name: '5.入孵企业情况', table: 'incubates', max: 80 },
{ num: 6, name: '6.新增就业情况', table: 'newPost', max: 80 },
{ num: 7, name: '7.开设创新创业课程情况', table: 'newCourse', max: 20 },
{ num: 8, name: '8.签约创业导师情况', table: 'newTeacher', max: 40 },
{ num: 9, name: '9.组织双创活动情况', table: 'activity', max: 13 },
{ num: 10, name: '10.参赛情况', table: 'competition', max: 5 },
{ num: 11, name: '11.2021年创新创业工作经费', table: '', max: 0 },
{ num: 12, name: '12.申报成功高校众创空间联盟发布的创新创业研究课题信息', table: 'twelve', max: 2 },
{ num: 13, name: '13.在孵企业销售收入或累计合同额情况(表1)', table: 'thirteen', max: 80 },
{ num: 14, name: '13.本评估周期实现股权或债权融资情况(表2)', table: 'borrow', max: 10 },
{ num: 15, name: '14.主办或承办市级及以上级别路演、双创周活动', table: 'fourteen', max: 10 },
{ num: 16, name: '15.在孵企业在OTC高校板挂牌情况', table: 'fifteen', max: 8 },
{ num: 17, name: '16.在孵企业新增知识产权(包括专利、软著等)', table: 'sixteen', max: 80 },
{ num: 18, name: '17.获得“互联网+”大赛全国赛事奖项情况', table: 'seventeen', max: 20 },
{ num: 19, name: '18.获得创客马拉松大赛及市教委组织的其他双创大赛奖项情况', table: 'eighteen', max: 20 },
{ num: 20, name: '19.入选天津市创业拔尖项目情况', table: 'nineteen', max: 3 },
{ num: 21, name: '20.是否为国家级备案众创空间', table: '' },
{ num: 22, name: '21.是否为国家创业孵化示范基地', table: '' },
{num: 1, name: '1.基本信息', table: '', max: 0},
{num: 2, name: '2.众创空间场地情况', table: '', max: 0},
{num: 3, name: '3.是否租赁场地', table: '', max: 0},
{num: 4, name: '4.众创空间配备专职工作人员情况', table: 'professionalEmploy', max: 20},
{num: 5, name: '5.入孵企业情况', table: 'incubates', max: 80},
{num: 6, name: '6.新增就业情况', table: 'newPost', max: 80},
{num: 7, name: '7.开设创新创业课程情况', table: 'newCourse', max: 20},
{num: 8, name: '8.签约创业导师情况', table: 'newTeacher', max: 40},
{num: 9, name: '9.组织双创活动情况', table: 'activity', max: 13},
{num: 10, name: '10.参赛情况', table: 'competition', max: 5},
{num: 11, name: '11.2021年创新创业工作经费', table: '', max: 0},
{num: 12, name: '12.申报成功高校众创空间联盟发布的创新创业研究课题信息', table: 'twelve', max: 2},
{num: 13, name: '13.在孵企业销售收入或累计合同额情况(表1)', table: 'thirteen', max: 80},
{num: 14, name: '13.本评估周期实现股权或债权融资情况(表2)', table: 'borrow', max: 10},
{num: 15, name: '14.主办或承办市级及以上级别路演、双创周活动', table: 'fourteen', max: 10},
{num: 16, name: '15.在孵企业在OTC高校板挂牌情况', table: 'fifteen', max: 8},
{num: 17, name: '16.在孵企业新增知识产权(包括专利、软著等)', table: 'sixteen', max: 80},
{num: 18, name: '17.获得“互联网+”大赛全国赛事奖项情况', table: 'seventeen', max: 20},
{num: 19, name: '18.获得创客马拉松大赛及市教委组织的其他双创大赛奖项情况', table: 'eighteen', max: 20},
{num: 20, name: '19.入选天津市创业拔尖项目情况', table: 'nineteen', max: 3},
{num: 21, name: '20.是否为国家级备案众创空间', table: ''},
{num: 22, name: '21.是否为国家创业孵化示范基地', table: ''},
];
var broList = [
{ option: '1', num: 1},
{ option: '2', num: 1},
{ option: '3', num: 1},
{ option: '4', num: 1},
{ option: '5', num: 2},
{ option: '6', num: 2},
{ option: '7', num: 3},
{ option: '8', num: 3},
{ option: '9', num: 4},
{ option: '10', num: 4},
{ option: '11', num: 4},
{ option: '12', num: 4},
{ option: '13', num: 4},
{ option: '14', num: 4},
{ option: '15', num: 4},
{ option: '16', num: 5},
{ option: '17', num: 5},
{ option: '18', num: 5},
{ option: '19', num: 5},
{ option: '20', num: 5},
{ option: '21', num: 6},
{ option: '22', num: 6},
{ option: '23', num: 6},
{ option: '24', num: 6},
{ option: '25', num: 7},
{ option: '26', num: 7},
{ option: '27', num: 7},
{ option: '28', num: 7},
{ option: '29', num: 7},
{ option: '30', num: 7},
{ option: '31', num: 7},
{ option: '32', num: 7},
{ option: '35', num: 8},
{ option: '36', num: 8},
{ option: '37', num: 8},
{ option: '38', num: 8},
{ option: '39', num: 8},
{ option: '40', num: 8},
{ option: '41', num: 8},
{ option: '42', num: 8},
{ option: '43', num: 8},
{ option: '44', num: 8},
{ option: '45', num: 8},
{ option: '46', num: 8},
{ option: '47', num: 8},
{ option: '48', num: 8},
{ option: '49', num: 8},
{ option: '50', num: 8},
{ option: '51', num: 8},
{ option: '52', num: 9},
{ option: '53', num: 9},
{ option: '54', num: 9},
{ option: '55', num: 9},
{ option: '56', num: 9},
{ option: '57', num: 10},
{ option: '58', num: 10},
{ option: '59', num: 10},
{ option: '60', num: 11},
{ option: '61', num: 11}
{option: '1', num: 1},
{option: '2', num: 1},
{option: '3', num: 1},
{option: '4', num: 1},
{option: '5', num: 2},
{option: '6', num: 2},
{option: '7', num: 3},
{option: '8', num: 3},
{option: '9', num: 4},
{option: '10', num: 4},
{option: '11', num: 4},
{option: '12', num: 4},
{option: '13', num: 4},
{option: '14', num: 4},
{option: '15', num: 4},
{option: '16', num: 5},
{option: '17', num: 5},
{option: '18', num: 5},
{option: '19', num: 5},
{option: '20', num: 5},
{option: '21', num: 6},
{option: '22', num: 6},
{option: '23', num: 6},
{option: '24', num: 6},
{option: '25', num: 7},
{option: '26', num: 7},
{option: '27', num: 7},
{option: '28', num: 7},
{option: '29', num: 7},
{option: '30', num: 7},
{option: '31', num: 7},
{option: '32', num: 7},
{option: '35', num: 8},
{option: '36', num: 8},
{option: '37', num: 8},
{option: '38', num: 8},
{option: '39', num: 8},
{option: '40', num: 8},
{option: '41', num: 8},
{option: '42', num: 8},
{option: '43', num: 8},
{option: '44', num: 8},
{option: '45', num: 8},
{option: '46', num: 8},
{option: '47', num: 8},
{option: '48', num: 8},
{option: '49', num: 8},
{option: '50', num: 8},
{option: '51', num: 8},
{option: '52', num: 9},
{option: '53', num: 9},
{option: '54', num: 9},
{option: '55', num: 9},
{option: '56', num: 9},
{option: '57', num: 10},
{option: '58', num: 10},
{option: '59', num: 10},
{option: '60', num: 11},
{option: '61', num: 11}
];
var tableOptionsList = [
{ option: '9', num: 4},
{ option: '10', num: 4},
{ option: '11', num: 4},
{ option: '12', num: 4},
{ option: '13', num: 4},
{ option: '14', num: 4},
{ option: '16', num: 5},
{ option: '17', num: 5},
{ option: '18', num: 5},
{ option: '19', num: 5},
{ option: '20', num: 5},
{ option: '21', num: 6},
{ option: '22', num: 6},
{ option: '23', num: 6},
{ option: '24', num: 6},
{ option: '25', num: 7},
{ option: '26', num: 7},
{ option: '27', num: 7},
{ option: '28', num: 7},
{ option: '29', num: 7},
{ option: '30', num: 7},
{ option: '31', num: 7},
{ option: '32', num: 7},
{ option: '33', num: 7},
{ option: '34', num: 7},
{ option: '35', num: 8},
{ option: '36', num: 8},
{ option: '37', num: 8},
{ option: '38', num: 8},
{ option: '39', num: 8},
{ option: '40', num: 8},
{ option: '41', num: 8},
{ option: '42', num: 8},
{ option: '43', num: 8},
{ option: '44', num: 8},
{ option: '45', num: 8},
{ option: '46', num: 8},
{ option: '47', num: 8},
{ option: '48', num: 8},
{ option: '49', num: 8},
{ option: '50', num: 8},
{ option: '51', num: 8},
{ option: '52', num: 9},
{ option: '53', num: 9},
{ option: '54', num: 9},
{ option: '55', num: 9},
{ option: '56', num: 9},
{ option: '57', num: 10},
{ option: '58', num: 10},
{ option: '59', num: 10},
{ option: '62', num: 12},
{ option: '63', num: 12},
{ option: '64', num: 12},
{ option: '65', num: 13},
{ option: '66', num: 13},
{ option: '67', num: 13},
{ option: '68', num: 14},
{ option: '69', num: 14},
{ option: '70', num: 14},
{ option: '71', num: 14},
{ option: '72', num: 15},
{ option: '73', num: 15},
{ option: '74', num: 15},
{ option: '75', num: 16},
{ option: '76', num: 16},
{ option: '77', num: 17},
{ option: '78', num: 17},
{ option: '79', num: 17},
{ option: '80', num: 17},
{ option: '81', num: 17},
{ option: '82', num: 18},
{ option: '83', num: 18},
{ option: '84', num: 18},
{ option: '85', num: 18},
{ option: '86', num: 18},
{ option: '87', num: 19},
{ option: '88', num: 19},
{ option: '89', num: 19},
{ option: '90', num: 19},
{ option: '91', num: 19},
{ option: '92', num: 19},
{ option: '93', num: 20},
{ option: '94', num: 20},
{ option: '95', num: 20},
{ option: '96', num: 20}
{option: '9', num: 4},
{option: '10', num: 4},
{option: '11', num: 4},
{option: '12', num: 4},
{option: '13', num: 4},
{option: '14', num: 4},
{option: '16', num: 5},
{option: '17', num: 5},
{option: '18', num: 5},
{option: '19', num: 5},
{option: '20', num: 5},
{option: '21', num: 6},
{option: '22', num: 6},
{option: '23', num: 6},
{option: '24', num: 6},
{option: '25', num: 7},
{option: '26', num: 7},
{option: '27', num: 7},
{option: '28', num: 7},
{option: '29', num: 7},
{option: '30', num: 7},
{option: '31', num: 7},
{option: '32', num: 7},
{option: '33', num: 7},
{option: '34', num: 7},
{option: '35', num: 8},
{option: '36', num: 8},
{option: '37', num: 8},
{option: '38', num: 8},
{option: '39', num: 8},
{option: '40', num: 8},
{option: '41', num: 8},
{option: '42', num: 8},
{option: '43', num: 8},
{option: '44', num: 8},
{option: '45', num: 8},
{option: '46', num: 8},
{option: '47', num: 8},
{option: '48', num: 8},
{option: '49', num: 8},
{option: '50', num: 8},
{option: '51', num: 8},
{option: '52', num: 9},
{option: '53', num: 9},
{option: '54', num: 9},
{option: '55', num: 9},
{option: '56', num: 9},
{option: '57', num: 10},
{option: '58', num: 10},
{option: '59', num: 10},
{option: '62', num: 12},
{option: '63', num: 12},
{option: '64', num: 12},
{option: '65', num: 13},
{option: '66', num: 13},
{option: '67', num: 13},
{option: '68', num: 14},
{option: '69', num: 14},
{option: '70', num: 14},
{option: '71', num: 14},
{option: '72', num: 15},
{option: '73', num: 15},
{option: '74', num: 15},
{option: '75', num: 16},
{option: '76', num: 16},
{option: '77', num: 17},
{option: '78', num: 17},
{option: '79', num: 17},
{option: '80', num: 17},
{option: '81', num: 17},
{option: '82', num: 18},
{option: '83', num: 18},
{option: '84', num: 18},
{option: '85', num: 18},
{option: '86', num: 18},
{option: '87', num: 19},
{option: '88', num: 19},
{option: '89', num: 19},
{option: '90', num: 19},
{option: '91', num: 19},
{option: '92', num: 19},
{option: '93', num: 20},
{option: '94', num: 20},
{option: '95', num: 20},
{option: '96', num: 20}
];
// validate标记
var validateFlag = true
......@@ -218,14 +218,14 @@ function toValidate() {
$('input[name*="option_"]').each(function () {
if (!$(this).val() || $(this).val() == '') {
var tempOption = $(this).attr('name').replace('option_', '');
if($(this.parentNode).parent("tr").prevAll().length + 1 > 1){
if ($(this.parentNode).parent("tr").prevAll().length + 1 > 1) {
return true;
} else {
broList.forEach(item =>{
broList.forEach(item => {
if (tempOption === item.option) {
var itemName = '';
option_list.forEach(i => {
if (item.num === i.num){
if (item.num === i.num) {
itemName = i.name
return false;
}
......@@ -244,14 +244,14 @@ function toValidate() {
$('select[name*="option_"]').each(function () {
if (!$(this).val() || $(this).val() == '') {
var tempOption = $(this).attr('name').replace('option_', '');
if($(this.parentNode).parent("tr").prevAll().length + 1 > 1){
if ($(this.parentNode).parent("tr").prevAll().length + 1 > 1) {
return true;
} else {
broList.forEach(item =>{
broList.forEach(item => {
if (tempOption === item.option) {
var itemName = '';
option_list.forEach(i => {
if (item.num === i.num){
if (item.num === i.num) {
itemName = i.name
return false;
}
......@@ -276,17 +276,17 @@ function toValidate() {
return;
}
if (file_list_2.length<1 && old_file_list_2.length<1){
if (file_list_2.length < 1 && old_file_list_2.length < 1) {
validateFlag = false
swal("失败!", '11.由财务部门出具的相关证明照片或PDF格式文件' + ' 存在未填项', "error");
return;
}
if (file_list.length<1 && old_file_list.length<1){
if (file_list.length < 1 && old_file_list.length < 1) {
validateFlag = false
swal("失败!", '4.填写《关于众创空间运营情况的相关说明》' + ' 存在未填项', "error");
return;
}
if (tempImgList.length<1){
if (tempImgList.length < 1) {
validateFlag = false
swal("失败!", '3.每块场地实景照片1张' + ' 存在未填项', "error");
return;
......@@ -294,7 +294,7 @@ function toValidate() {
}
// 问卷全部数据
var formData=[];
var formData = [];
// 各表格序号-总方法
function all_order() {
......@@ -319,103 +319,118 @@ function all_order() {
// 各表格序号计数方法
function employ_order() {
var i = 1;
$(".professionalEmploy_num").each(function(){
$(".professionalEmploy_num").each(function () {
$(this).html(i++);
})
}
function incubates_order() {
var i = 1;
$(".incubates_num").each(function(){
$(".incubates_num").each(function () {
$(this).html(i++);
})
}
function newPost_order() {
var i = 1;
$(".newPost_num").each(function(){
$(".newPost_num").each(function () {
$(this).html(i++);
})
}
function newCourse_order() {
var i = 1;
$(".newCourse-num").each(function(){
$(".newCourse-num").each(function () {
$(this).html(i++);
})
}
function newTeacher_order() {
var i = 1;
$(".newTeacher-num").each(function(){
$(".newTeacher-num").each(function () {
$(this).html(i++);
})
}
function activity_order() {
var i = 1;
$(".activity-num").each(function(){
$(".activity-num").each(function () {
$(this).html(i++);
})
}
function competition_order() {
var i = 1;
$(".competition-num").each(function(){
$(".competition-num").each(function () {
$(this).html(i++);
})
}
function twelve_order() {
var i = 1;
$(".twelve-num").each(function(){
$(".twelve-num").each(function () {
$(this).html(i++);
})
}
function thirteen_order() {
var i = 1;
$(".thirteen-num").each(function(){
$(".thirteen-num").each(function () {
$(this).html(i++);
})
}
function borrow_order() {
var i = 1;
$(".borrow-num").each(function(){
$(".borrow-num").each(function () {
$(this).html(i++);
})
}
function fourteen_order() {
var i = 1;
$(".fourteen-num").each(function(){
$(".fourteen-num").each(function () {
$(this).html(i++);
})
}
function fifteen_order() {
var i = 1;
$(".fifteen-num").each(function(){
$(".fifteen-num").each(function () {
$(this).html(i++);
})
}
function sixteen_order() {
var i = 1;
$(".sixteen-num").each(function(){
$(".sixteen-num").each(function () {
$(this).html(i++);
})
}
function seventeen_order() {
var i = 1;
$(".seventeen-num").each(function(){
$(".seventeen-num").each(function () {
$(this).html(i++);
})
}
function eighteen_order() {
var i = 1;
$(".eighteen-num").each(function(){
$(".eighteen-num").each(function () {
$(this).html(i++);
})
}
function nineteen_order() {
var i = 1;
$(".nineteen-num").each(function(){
$(".nineteen-num").each(function () {
$(this).html(i++);
})
}
// 获取表格当前行数
function countTable(table, standard, max){
function countTable(table, standard, max) {
var tableNameText = '.'.concat(table)
var firstRowText = table.concat('-1')
var tempTable = $(tableNameText);
......@@ -423,7 +438,7 @@ function countTable(table, standard, max){
return;
}
var intialNum = tempTable.find("tr").length - 1
for(;intialNum < standard;){
for (; intialNum < standard;) {
if (tempTable.find("tr").length - 1 < standard) {
fun(tableNameText, firstRowText, max);
intialNum++
......@@ -433,7 +448,7 @@ function countTable(table, standard, max){
}
// 表格加行方法
function fun(table, row1, max){
function fun(table, row1, max) {
//增加一行,克隆第一个对象
var $tempRow = $('#' + row1);
var tempTable = $(table);
......@@ -447,7 +462,7 @@ function fun(table, row1, max){
}
// 表格删除当前行方法
function del($td, limit){
function del($td, limit) {
//移除最后一行,并且保留前两行
var $tr;
$tr = $($td.parentNode).parent();
......@@ -458,49 +473,50 @@ function del($td, limit){
}
// 下载多文件
function downloadMultiFiles(optionId){
function downloadMultiFiles(optionId) {
//虚拟iframe实现无刷新下载文件 get传参
var url=webroot+"questionnaire/downZipByFileId?optionId="+optionId+"&questionnaireUuid=1";
var url = webroot + "questionnaire/downZipByFileId?optionId=" + optionId + "&questionnaireUuid=1";
var downloadFrame = $('#downloadFrame');
if(downloadFrame.length == 0){
if (downloadFrame.length == 0) {
downloadFrame = $('<iframe id="downloadFrame" src="" style="display:none"></iframe>');
$('body').append(downloadFrame);
}
downloadFrame.attr('src',url);
downloadFrame.attr('src', url);
}
var imgCount = 0;
var tempImgList = new Array();
// 上传多图片
function upImg(){
if (tempImgList.length >= 7){
function upImg() {
if (tempImgList.length >= 7) {
swal("失败!", '场地实景照片最多上传7张', "error")
} else {
$("#projectPlanbookFile_file_div").empty();
$("#projectPlanbookFile_file_div").html('<input type="file" id="projectPlanbookFile_file" name="mainfile" class="form-control" >');
$( '#projectPlanbookFile_file' ).prettyFile();
$('#projectPlanbookFile_file').prettyFile();
$("#projectPlanbookFile_DIV").modal('show');
}
}
function projectPlanbookFile_update(){
if(fileChangeNo("projectPlanbookFile_file")==true){
if(imgFileChange("projectPlanbookFile_file")==false){
function projectPlanbookFile_update() {
if (fileChangeNo("projectPlanbookFile_file") == true) {
if (imgFileChange("projectPlanbookFile_file") == false) {
return;
}
$("#projectPlanbookFile_DIV_ZZSC").show();
$("#projectPlanbookFile_DIV_SC").hide();
$.ajaxFileUpload({
url: webroot+'File/uploadImg',
secureuri:false,
url: webroot + 'File/uploadImg',
secureuri: false,
dataType: 'json',
fileElementId : ["projectPlanbookFile_file"],
success: function (data){//上传成功
fileElementId: ["projectPlanbookFile_file"],
success: function (data) {//上传成功
imgCount++;
$("#projectPlanbookFile_DIV_ZZSC").hide();
$("#projectPlanbookFile_DIV_SC").show();
if(data.return==false){
if (data.return == false) {
//alert("只支持jpg、png、gif格式");
swal("失败!", "只支持jpg、png、gif格式", "error");
return;
......@@ -516,7 +532,7 @@ function projectPlanbookFile_update(){
// picHtml = picHtml + "<br>";
// $("#demo1").prepend(picHtml);
// }
var tempOb ={
var tempOb = {
optionsId: 8,
value: data.date,
group: imgCount
......@@ -528,10 +544,10 @@ function projectPlanbookFile_update(){
$('#projectPlanbookFile_DIV').modal('hide');
$("#projectPlanbookFile_file_div").empty();
$("#projectPlanbookFile_file_div").html('<input type="file" id="projectPlanbookFile_file" name="mainfile" class="form-control" >');
$( '#projectPlanbookFile_file' ).prettyFile();
$('#projectPlanbookFile_file').prettyFile();
}
});
}else{
} else {
// alert("请先选择上传文件");
swal("失败!", "请先选择上传文件", "error");
}
......@@ -539,23 +555,23 @@ function projectPlanbookFile_update(){
function img_DIV_List_Show() {
var prehtml = "";
for(var file_i in tempImgList) {
for (var file_i in tempImgList) {
prehtml += "<div>";
prehtml += "<div class=\"col-sm-8\">";
prehtml += '<img src="'+tempImgList[file_i].value+'" width="150px" height="100px" />';
prehtml += "<label onclick=\"previews('"+tempImgList[file_i].value+"')\">预览</label>";
prehtml += "<label onclick=\"file_DIV_delete_8('"+tempImgList[file_i].group+"')\" style='margin-left: 15px'>删除</label>";
prehtml += '<img src="' + tempImgList[file_i].value + '" width="150px" height="100px" />';
prehtml += "<label onclick=\"previews('" + tempImgList[file_i].value + "')\">预览</label>";
prehtml += "<label onclick=\"file_DIV_delete_8('" + tempImgList[file_i].group + "')\" style='margin-left: 15px'>删除</label>";
prehtml += "</div>";
prehtml += "</div>";
}
$("#file_DIV_List_Show_8").html(prehtml);
}
function file_DIV_delete_8(group){
if(group != ""){
for(var file_i in tempImgList){
if(tempImgList[file_i].group == group){
tempImgList.splice(file_i,1);
function file_DIV_delete_8(group) {
if (group != "") {
for (var file_i in tempImgList) {
if (tempImgList[file_i].group == group) {
tempImgList.splice(file_i, 1);
break;
}
}
......@@ -576,19 +592,18 @@ function file_DIV_delete_8(group){
// });
// 获取暂存数据
function getSaveData() {
var param = {
questionnaireUuid: 1
}
$.ajax({
type : "POST",
url : webroot+"questionnaire/selectDetails?questionnaireUuid=1",
async:false,
contentType:'application/json;charset=UTF-8',
success : function(result) {
if(result.result==false){
type: "POST",
url: webroot + "questionnaire/selectDetails?questionnaireUuid=1",
async: false,
contentType: 'application/json;charset=UTF-8',
success: function (result) {
if (result.result == false) {
//alert(result.msg);
swal("失败!", result.msg, "error");
return;
......@@ -602,13 +617,13 @@ function getSaveData() {
if (item.optionsId == tempOption) {
if (item.group > 1) {
tableOptionsList.forEach(i => {
if (tempOption === i.option){
if (tempOption === i.option) {
option_list.forEach(opt => {
if (i.num === opt.num){
if (i.num === opt.num) {
countTable(opt.table, item.group, opt.max);
var tempName = $(this).attr('name')
$("[name="+tempName+"]").each(function () {
if($(this.parentNode).parent("tr").prevAll().length + 1 === item.group){
$("[name=" + tempName + "]").each(function () {
if ($(this.parentNode).parent("tr").prevAll().length + 1 === item.group) {
$(this).val(item.value)
return false;
}
......@@ -617,8 +632,7 @@ function getSaveData() {
})
}
})
}
else if ($(this.parentNode).parent("tr").prevAll().length + 1 === 1){
} else if ($(this.parentNode).parent("tr").prevAll().length + 1 === 1) {
$(this).val(item.value)
}
}
......@@ -626,25 +640,25 @@ function getSaveData() {
})
});
result.data.answerList.forEach(item => {
if (item.optionsId === 97 && item.value === "是"){
$("#radio_1").prop("checked",true);
if (item.optionsId === 97 && item.value === "是") {
$("#radio_1").prop("checked", true);
} else if (item.optionsId === 97) {
$("#radio_2").prop("checked",true);
$("#radio_2").prop("checked", true);
}
if (item.optionsId === 98 && item.value === "是"){
$("#radio_3").prop("checked",true);
if (item.optionsId === 98 && item.value === "是") {
$("#radio_3").prop("checked", true);
} else if (item.optionsId === 98) {
$("#radio_4").prop("checked",true);
$("#radio_4").prop("checked", true);
}
if (item.optionsId === 8){
if (item.optionsId === 8) {
tempImgList.push(item);
}
if (item.optionsId === 15){
if (item.optionsId === 15) {
$('#download_15').show();
$('#label_15').show();
old_file_list.push(item);
}
if (item.optionsId === 61){
if (item.optionsId === 61) {
$('#download_61').show();
$('#label_61').show();
old_file_list_2.push(item);
......@@ -657,7 +671,7 @@ function getSaveData() {
});
}
function saveQuestionnaire(type, isAuto){
function saveQuestionnaire(type, isAuto) {
var writePeople = ''
var phoneNumber = ''
formData = [];
......@@ -673,7 +687,7 @@ function saveQuestionnaire(type, isAuto){
phoneNumber = $(this).val();
}
if ($(this.parentNode).parent("tr").prevAll().length + 1) {
if ($(this.parentNode).parent("tr").prevAll().length > 0){
if ($(this.parentNode).parent("tr").prevAll().length > 0) {
tempObj['group'] = $(this.parentNode).parent("tr").prevAll().length + 1;
} else {
tempObj['group'] = 1;
......@@ -690,7 +704,7 @@ function saveQuestionnaire(type, isAuto){
var tempObj = {};
tempObj['optionsId'] = $(this).attr('name').replace('option_', '');
if ($(this.parentNode).parent("tr").prevAll().length + 1) {
if ($(this.parentNode).parent("tr").prevAll().length > 0){
if ($(this.parentNode).parent("tr").prevAll().length > 0) {
tempObj['group'] = $(this.parentNode).parent("tr").prevAll().length + 1;
} else {
tempObj['group'] = 1;
......@@ -717,12 +731,12 @@ function saveQuestionnaire(type, isAuto){
formData.push(tempObj2);
}
if (file_list.length<1){
for(var ofile_id in old_file_list){
if (file_list.length < 1) {
for (var ofile_id in old_file_list) {
formData.push(old_file_list[ofile_id])
}
} else {
for(var file_i in file_list){
for (var file_i in file_list) {
var fileObj1 = {}
fileObj1['optionsId'] = 15;
fileObj1['group'] = file_i;
......@@ -731,12 +745,12 @@ function saveQuestionnaire(type, isAuto){
}
}
if (file_list_2.length<1){
for(var ofile_id2 in old_file_list_2){
if (file_list_2.length < 1) {
for (var ofile_id2 in old_file_list_2) {
formData.push(old_file_list_2[ofile_id2])
}
} else {
for(var file_id in file_list_2){
for (var file_id in file_list_2) {
var fileObj2 = {}
fileObj2['optionsId'] = 61;
fileObj2['group'] = file_id;
......@@ -745,7 +759,7 @@ function saveQuestionnaire(type, isAuto){
}
}
for (var i in tempImgList){
for (var i in tempImgList) {
var fileObjImg = {}
fileObjImg['optionsId'] = 8;
fileObjImg['group'] = i;
......@@ -762,25 +776,25 @@ function saveQuestionnaire(type, isAuto){
};
$.ajax({
type : "POST",
url : webroot+"questionnaire/save",
data : JSON.stringify(param),
async:false,
contentType:'application/json;charset=UTF-8',
success : function(result) {
if(result.result==true){
type: "POST",
url: webroot + "questionnaire/save",
data: JSON.stringify(param),
async: false,
contentType: 'application/json;charset=UTF-8',
success: function (result) {
if (result.result == true) {
if (isAuto === 1) {
if(type === 0){
if (type === 0) {
layer.msg('已自动暂存');
}
} else {
if(type === 0){
if (type === 0) {
swal("成功!", "暂存成功!", "success");
} else {
swal("成功!", "上报成功!", "success");
}
}
}else{
} else {
swal("失败!", result.msg, "error");
}
}
......@@ -792,10 +806,11 @@ function timeCircleSave() {
saveQuestionnaire(0, 1);
}
// 上报
function submitQuestionnaire() {
toValidate();
if (validateFlag){
if (validateFlag) {
saveQuestionnaire(1);
}
}
......@@ -807,17 +822,17 @@ function previews(url) {
// 保存上次上传文件
var old_file_list=new Array();
var old_file_list_2=new Array();
var old_file_list = new Array();
var old_file_list_2 = new Array();
// 多文件上传
var file_list=new Array();
var file_list_update_id=1;
var file_list = new Array();
var file_list_update_id = 1;
var file_list_2=new Array();
var file_list_update_id_2=1;
var file_list_2 = new Array();
var file_list_update_id_2 = 1;
function file_class(id,fileId,fileName) {
function file_class(id, fileId, fileName) {
var file_i = new Object;
file_i.id = id;
file_i.fileId = fileId;
......@@ -828,62 +843,62 @@ function file_class(id,fileId,fileName) {
// 到底是哪个上传
var upload_option = 0
function file_DIV_Show(fileID, option){
function file_DIV_Show(fileID, option) {
upload_option = option
if (upload_option === 15){
if (upload_option === 15) {
if (file_list.length >= 10) {
swal("失败!",'《关于众创空间运营情况的相关说明》附件最多上传10个文件!', "error");
swal("失败!", '《关于众创空间运营情况的相关说明》附件最多上传10个文件!', "error");
return;
} else {
$('#uploadTip').html('支持格式: .png、 .jpg、 .gif、 .bmp、 .doc、 .docx、 .pdf、 .xls、 .xlsx、 .ppt、 .pptx、 .txt、 .sav、 .caj')
}
} else if (upload_option === 61){
if (file_list_2.length >= 10){
swal("失败!",'《关于众创空间运营情况的相关说明》附件最多上传10个文件!', "error");
} else if (upload_option === 61) {
if (file_list_2.length >= 10) {
swal("失败!", '《关于众创空间运营情况的相关说明》附件最多上传10个文件!', "error");
return;
} else {
$('#uploadTip').html('支持格式: .jpg、 .gif、 .pdf')
}
}
if(fileID == "0"){
if (fileID == "0") {
$("#theFile_file_div").empty();
$("#theFile_file_div").html('<input type="file" id="theFile_file" name="mainfile" class="form-control" >');
$( '#theFile_file' ).prettyFile();
$('#theFile_file').prettyFile();
}
$('#theFile_DIV').modal('show');
}
function file_update(){
if (upload_option === 15 ){
if(option15validate("theFile_file")==false){
function file_update() {
if (upload_option === 15) {
if (option15validate("theFile_file") == false) {
return;
}
} else if (upload_option === 61){
if(option61validate("theFile_file")==false){
} else if (upload_option === 61) {
if (option61validate("theFile_file") == false) {
return;
}
}
$("#theFile_DIV_ZZSC").show();
$("#theFile_DIV_SC").hide();
$.ajaxFileUpload({
url: webroot+'File/upload',
secureuri:false,
url: webroot + 'File/upload',
secureuri: false,
dataType: 'json',
fileElementId : ["theFile_file"],
success: function (data){//上传成功
fileElementId: ["theFile_file"],
success: function (data) {//上传成功
$("#theFile_DIV_ZZSC").hide();
$("#theFile_DIV_SC").show();
var fileId=data.fileID;
var fileId = data.fileID;
var id = file_list_update_id;
var fileName = data.fileName;
if (upload_option === 15){
if (upload_option === 15) {
file_list_update_id++;
var file_class_i = file_class(id,fileId,fileName);
var file_class_i = file_class(id, fileId, fileName);
file_list.push(file_class_i);
} else if (upload_option === 61){
} else if (upload_option === 61) {
file_list_update_id_2++;
var file_class_i_2 = file_class(id,fileId,fileName);
var file_class_i_2 = file_class(id, fileId, fileName);
file_list_2.push(file_class_i_2);
}
file_DIV_List_Show();
......@@ -892,22 +907,23 @@ function file_update(){
});
}
function file_DIV_delete(id){
if(id != ""){
for(var file_i in file_list){
if(file_list[file_i].id == id){
file_list.splice(file_i,1);
function file_DIV_delete(id) {
if (id != "") {
for (var file_i in file_list) {
if (file_list[file_i].id == id) {
file_list.splice(file_i, 1);
break;
}
}
}
file_DIV_List_Show();
}
function file_DIV_delete_61(id){
if(id != ""){
for(var file_i in file_list_2){
if(file_list_2[file_i].id == id){
file_list_2.splice(file_i,1);
function file_DIV_delete_61(id) {
if (id != "") {
for (var file_i in file_list_2) {
if (file_list_2[file_i].id == id) {
file_list_2.splice(file_i, 1);
break;
}
}
......@@ -915,28 +931,28 @@ function file_DIV_delete_61(id){
file_DIV_List_Show();
}
function file_DIV_List_Show(option){
var html= "";
if (upload_option === 15){
for(var file_i in file_list){
function file_DIV_List_Show(option) {
var html = "";
if (upload_option === 15) {
for (var file_i in file_list) {
html += "<div>";
html += "<div class=\"col-sm-8\">";
html += "<label >文件名称:"+file_list[file_i].fileName+"</label>";
html += "<label >文件名称:" + file_list[file_i].fileName + "</label>";
html += "</div>";
html += "<div class=\"col-sm-3\">";
html += "<label class=\"project_information_class_hover\" onclick=\"file_DIV_delete('"+file_list[file_i].id+"')\">删除</label>";
html += "<label class=\"project_information_class_hover\" onclick=\"file_DIV_delete('" + file_list[file_i].id + "')\">删除</label>";
html += "</div>";
html += "</div>";
}
$("#file_DIV_List_Show_15").html(html);
} else if (upload_option === 61){
for(var i in file_list_2){
} else if (upload_option === 61) {
for (var i in file_list_2) {
html += "<div>";
html += "<div class=\"col-sm-8\">";
html += "<label >文件名称:"+file_list_2[i].fileName+"</label>";
html += "<label >文件名称:" + file_list_2[i].fileName + "</label>";
html += "</div>";
html += "<div class=\"col-sm-3\">";
html += "<label class=\"project_information_class_hover\" onclick=\"file_DIV_delete_61('"+file_list_2[i].id+"')\">删除</label>";
html += "<label class=\"project_information_class_hover\" onclick=\"file_DIV_delete_61('" + file_list_2[i].id + "')\">删除</label>";
html += "</div>";
html += "</div>";
}
......@@ -944,3 +960,130 @@ function file_DIV_List_Show(option){
}
}
//synchronizeUpperAndLowerFormContents
//表格数据回显同步上下表单内容
$(function () {
//获取上方填写内容对象
$("#basicindicators1,#basicindicators2,#basicindicators3,#basicindicators4,#basicindicators5,#basicindicators6,#basicindicators7,#basicindicators8,#basicindicators9").mouseout(function () {
//克隆元素到下方实现回显同步
//同步基础指标1和引导指标1引导指标2
var guidingindicators1 = $("#basicindicators1").clone(false)
//置空防止元素重复
$("#guidingindicators1").empty()
//写入同步元素
$("#guidingindicators1").append(guidingindicators1)
//获取select标签值 写入新元素
$("#guidingindicators1 select").val($("#basicindicators1 select").val())
//隐藏操作按钮
$("#guidingindicators1 #remove1-1").hide()
$("#guidingindicators1 #remove1-2").hide()
//移除name属性 防止提交
$("#guidingindicators1 [name]").removeAttr("name")
//将输入框和选择框置为不可操作
$("#guidingindicators1 input").attr("disabled","disabled")
$("#guidingindicators1 select").attr("disabled","disabled")
//引导指标2
var guidingindicators2 = $("#basicindicators1").clone(false)
$("#guidingindicators2").empty()
$("#guidingindicators2").append(guidingindicators2)
$("#guidingindicators2 select").val($("#basicindicators1 select").val())
$("#guidingindicators2 #remove1-1").hide()
$("#guidingindicators2 #remove1-2").hide()
$("#guidingindicators2 [name]").removeAttr("name")
$("#guidingindicators2 input").attr("disabled","disabled")
$("#guidingindicators2 select").attr("disabled","disabled")
//引导指标3
var guidingindicators3 = $("#basicindicators3").clone(false)
$("#guidingindicators3").empty()
$("#guidingindicators3").append(guidingindicators3)
//获取标签多个值
var dataListguide3 = []
$("#basicindicators3 select").each(function (index, element) {
dataListguide3.push(element.value)
})
$("#guidingindicators3 select").each(function (index, element) {
element.value = dataListguide3[index]
})
$("#guidingindicators3 #remove3-1").hide()
$("#guidingindicators3 #remove3-2").hide()
$("#guidingindicators3 [name]").removeAttr("name")
$("#guidingindicators3 input").attr("disabled","disabled")
$("#guidingindicators3 select").attr("disabled","disabled")
//引导指标4
var guidingindicators4 = $("#basicindicators3").clone(false)
$("#guidingindicators4").empty()
$("#guidingindicators4").append(guidingindicators4)
//获取标签多个值
var dataListguide4 = []
$("#basicindicators3 select").each(function (index, element) {
dataListguide4.push(element.value)
})
$("#guidingindicators4 select").each(function (index, element) {
element.value = dataListguide4[index]
})
$("#guidingindicators4 #remove3-1").hide()
$("#guidingindicators4 #remove3-2").hide()
$("#guidingindicators4 [name]").removeAttr("name")
$("#guidingindicators4 input").attr("disabled","disabled")
$("#guidingindicators4 select").attr("disabled","disabled")
//引导指标5
var guidingindicators5 = $("#basicindicators4").clone(false)
$("#guidingindicators5").empty()
$("#guidingindicators5").append(guidingindicators5)
//获取标签多个值
var dataListguide5 = []
$("#basicindicators4 select").each(function (index, element) {
dataListguide5.push(element.value)
})
$("#guidingindicators5 select").each(function (index, element) {
element.value = dataListguide5[index]
})
$("#guidingindicators5 #remove4-1").hide()
$("#guidingindicators5 #remove4-2").hide()
$("#guidingindicators5 [name]").removeAttr("name")
$("#guidingindicators5 input").attr("disabled","disabled")
$("#guidingindicators5 select").attr("disabled","disabled")
//引导指标7
var guidingindicators7 = $("#basicindicators6").clone(false)
$("#guidingindicators7").empty()
$("#guidingindicators7").append(guidingindicators7)
//获取标签多个值
var dataListguide7 = []
$("#basicindicators6 select").each(function (index, element) {
dataListguide7.push(element.value)
})
$("#guidingindicators7 select").each(function (index, element) {
element.value = dataListguide7[index]
})
$("#guidingindicators7 #remove6-1").hide()
$("#guidingindicators7 #remove6-2").hide()
$("#guidingindicators7 [name]").removeAttr("name")
$("#guidingindicators7 input").attr("disabled","disabled")
$("#guidingindicators7 select").attr("disabled","disabled")
//引导指标8
var guidingindicators8 = $("#basicindicators7").clone(false)
$("#guidingindicators8").empty()
$("#guidingindicators8").append(guidingindicators8)
//获取标签多个值
var dataListguide8 = []
$("#basicindicators7 select").each(function (index, element) {
dataListguide8.push(element.value)
})
$("#guidingindicators8 select").each(function (index, element) {
element.value = dataListguide8[index]
})
$("#guidingindicators8 #remove7-1").hide()
$("#guidingindicators8 #remove7-2").hide()
$("#guidingindicators8 [name]").removeAttr("name")
$("#guidingindicators8 input").attr("disabled","disabled")
$("#guidingindicators8 select").attr("disabled","disabled")
})
})
\ No newline at end of file
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