756 lines
42 KiB
Plaintext
756 lines
42 KiB
Plaintext
<%@ page contentType="text/html;charset=UTF-8" %>
|
||
<%@ include file="/webpage/include/taglib.jsp" %>
|
||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||
<html>
|
||
<head>
|
||
<title>执行任务</title>
|
||
<meta name="decorator" content="default"/>
|
||
<%-- 引入layui的css--%>
|
||
<%-- <link rel="stylesheet" href="${ctxStatic}/layui/css/layui.css">--%>
|
||
<link rel="stylesheet" href="${ctxStatic}/layui-v2.4.5/layui/css/layui.css" media="all">
|
||
<script src="${ctxStatic}/jquery/jquery-1.8.3.js"></script>
|
||
|
||
|
||
|
||
</head>
|
||
<style type="text/css">
|
||
.xline {
|
||
border-bottom: solid 2px #7A378B;
|
||
height: 5px;
|
||
}
|
||
|
||
</style>
|
||
|
||
<body>
|
||
<div class="wrapper wrapper-content" style="width: 100%;margin: auto auto">
|
||
<%-- <div class="ibox" style="height: 100%">
|
||
<div id="local">您现在的位置:<a style="color: #007bff;" href="${ctx}/assessment/task/home">任务列表</a> >
|
||
<a style="color: #007bff;" href="${ctx}/assessment/task/detail?taskId=${subtask.standardTaskId}">指标树</a> >
|
||
<a style="color: #007bff;" href="#">考核执行</a>
|
||
</div>
|
||
</div>--%>
|
||
|
||
<%--
|
||
<a href="javascript:history.back();">向上一页</a>
|
||
--%>
|
||
|
||
|
||
<table id="contentTable"
|
||
class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
|
||
<tbody style="font-size: large">
|
||
<tr>
|
||
<th>指标名称:</th>
|
||
<td><input type="text" name="" value="${subtask.acIndex.name}" readonly class="layui-input"/></td>
|
||
<th>机构名称:</th>
|
||
<td><input type="text" name="" value="${office.name}" readonly class="layui-input"/></td>
|
||
<th>考核人:</th>
|
||
<td><input type="text" name="" value="${user.name}" readonly class="layui-input"/></td>
|
||
<th>考核时间:</th>
|
||
<td><input type="text" name="" value="2019-6-6" readonly class="layui-input"/></td>
|
||
</tr>
|
||
<c:forEach items="${newSubtaskList}" var="newSubtask">
|
||
<c:if test="${newSubtask.acIndex.isFinal == 2}">
|
||
<%--不是终结节点--%>
|
||
<tr>
|
||
<th>${newSubtask.acIndex.level - 1}级指标说明:</th>
|
||
<td colspan="7">${newSubtask.acIndex.description}
|
||
(总分:${newSubtask.acIndex.score})得分:${newSubtask.finalScore}</td>
|
||
</tr>
|
||
</c:if>
|
||
<c:if test="${newSubtask.acIndex.isFinal == 1}">
|
||
<%--是终结节点--%>
|
||
<c:if test="${newSubtask.acIndex.method eq '1'}">
|
||
<%--如果是直接考核--%>
|
||
<tr>
|
||
<th>${newSubtask.acIndex.level - 1}级指标说明:</th>
|
||
<td colspan="7">${newSubtask.acIndex.description}(总分:${newSubtask.acIndex.score})得分:${newSubtask.finalScore}</td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="7">
|
||
直接考核
|
||
<c:choose>
|
||
<c:when test="${newSubtask.directYesNo eq 'y' || newSubtask.directYesNo eq 'n'}">
|
||
<c:if test="${newSubtask.directYesNo eq 'y'}">
|
||
合格 <input type="radio" class="optionsRadios" name="${newSubtask.id}" value="y" checked/>
|
||
不合格 <input type="radio" class="optionsRadios" name="${newSubtask.id}" value="n" />
|
||
打分: <input type="text" style="width: 60px;" oninput="removeRoListener('${newSubtask.id}')" name="${newSubtask.id}score" value="" />
|
||
</c:if>
|
||
<c:if test="${newSubtask.directYesNo eq 'n'}">
|
||
合格 <input type="radio" class="optionsRadios" name="${newSubtask.id}" value="y"/>
|
||
不合格 <input type="radio" class="optionsRadios" name="${newSubtask.id}" value="n" checked/>
|
||
打分: <input type="text" style="width: 60px;" oninput="removeRoListener('${newSubtask.id}')" name="${newSubtask.id}score" value="" />
|
||
</c:if>
|
||
</c:when>
|
||
<c:otherwise>
|
||
合格 <input type="radio" class="optionsRadios" name="${newSubtask.id}" value="y"/>
|
||
不合格 <input type="radio" class="optionsRadios" name="${newSubtask.id}" value="n" />
|
||
打分: <input type="text" style="width: 60px;" oninput="removeRoListener('${newSubtask.id}')" name="${newSubtask.id}score" value="${newSubtask.directYesNo}" />
|
||
|
||
</c:otherwise>
|
||
</c:choose>
|
||
</td>
|
||
<td>
|
||
<button class="layui-btn"
|
||
onclick="dataSubmit('1','${newSubtask.id}','${newSubtask.acIndex.score}','${newSubtask.acIndex.method}')"
|
||
style="margin-left: 20%">保存
|
||
</button>
|
||
</td>
|
||
</tr>
|
||
</c:if>
|
||
|
||
<c:if test="${newSubtask.acIndex.method eq '2'}">
|
||
<%--如果是系统获取--%>
|
||
<tr>
|
||
<th>${newSubtask.acIndex.level - 1}级指标说明:</th>
|
||
<td colspan="7">${newSubtask.acIndex.description}(总分:${newSubtask.acIndex.score})得分:${newSubtask.finalScore}</td>
|
||
</tr>
|
||
<c:choose>
|
||
<c:when test="${newSubtask.directAssessment}">
|
||
<tr>
|
||
<td colspan="7">
|
||
系统获取考核
|
||
<c:choose>
|
||
<c:when test="${newSubtask.directYesNo eq 'y' || newSubtask.directYesNo eq 'n'}">
|
||
<c:if test="${newSubtask.directYesNo eq 'y'}">
|
||
合格 <input type="radio" class="optionsRadios" name="${newSubtask.id}" value="y" checked/>
|
||
不合格 <input type="radio" class="optionsRadios" name="${newSubtask.id}" value="n" />
|
||
打分: <input type="text" style="width: 60px;" oninput="removeRoListener('${newSubtask.id}')" name="${newSubtask.id}score" value="" />
|
||
</c:if>
|
||
<c:if test="${newSubtask.directYesNo eq 'n'}">
|
||
合格 <input type="radio" class="optionsRadios" name="${newSubtask.id}" value="y"/>
|
||
不合格 <input type="radio" class="optionsRadios" name="${newSubtask.id}" value="n" checked/>
|
||
打分: <input type="text" style="width: 60px;" oninput="removeRoListener('${newSubtask.id}')" name="${newSubtask.id}score" value="" />
|
||
</c:if>
|
||
</c:when>
|
||
<c:otherwise>
|
||
合格 <input type="radio" class="optionsRadios" name="${newSubtask.id}" value="y"/>
|
||
不合格 <input type="radio" class="optionsRadios" name="${newSubtask.id}" value="n" />
|
||
打分: <input type="text" style="width: 60px;" oninput="removeRoListener('${newSubtask.id}')" name="${newSubtask.id}score" value="${newSubtask.directYesNo}" />
|
||
|
||
</c:otherwise>
|
||
</c:choose>
|
||
</td>
|
||
<td>
|
||
<button class="layui-btn"
|
||
onclick="dataSubmit('1','${newSubtask.id}','${newSubtask.acIndex.score}','${newSubtask.acIndex.method}')"
|
||
style="margin-left: 20%">保存
|
||
</button>
|
||
</td>
|
||
</tr>
|
||
</c:when>
|
||
<c:otherwise>
|
||
<%--公式start--%>
|
||
<c:forEach items="${newSubtask.formulas}" var="formula" varStatus="status">
|
||
<tr>
|
||
<th><font color="#6495ed">指标公式: </font></th>
|
||
<td colspan="7">
|
||
<c:choose>
|
||
<c:when test="${formula.formulaType eq '1002'}">
|
||
if(${fn:escapeXml(formula.formulaLeft)})then(${fn:escapeXml(formula.formulaRight)}) <font color="#32cd32">${fn:escapeXml(formula.formulaValue)}</font>
|
||
</c:when>
|
||
<c:otherwise>
|
||
${formula.formulaLeft}${fn:escapeXml(formula.formulaCenter)}${formula.formulaRight} <font color="#32cd32">${formula.formulaValue}</font>
|
||
</c:otherwise>
|
||
</c:choose>
|
||
</td>
|
||
</tr>
|
||
<c:if test="${newSubtask.formulas.size() == status.index+1}">
|
||
<tr>
|
||
<th><font color="#6495ed">公式变量输入: </font></th>
|
||
<td colspan="6" id="${newSubtask.id}">
|
||
<c:forEach items="${formula.params}" var="par" varStatus="parStatus">
|
||
<c:if test="${par.varType eq '4'}">
|
||
${par.varName}: <input type="text" style="width: 60px;" name="${par.id}" value="${par.varValue}" />
|
||
</c:if>
|
||
</c:forEach>
|
||
<c:if test="${newSubtask.remarks eq '1'}">
|
||
<font color="red">变量值需要输入,输入后点击保存提交即可!</font>
|
||
</c:if>
|
||
<c:if test="${newSubtask.remarks ne '1'}">
|
||
<font color="red">变量值根据系统后台获取,直接点击保存提交即可!</font>
|
||
</c:if>
|
||
</td>
|
||
<td>
|
||
<button class="layui-btn"
|
||
onclick="dataSubmit('2','${newSubtask.id}','${newSubtask.acIndex.score}','${newSubtask.acIndex.method}')"
|
||
style="margin-left: 20%">保存
|
||
</button>
|
||
</td>
|
||
</tr>
|
||
</c:if>
|
||
</c:forEach>
|
||
<%--公式end--%>
|
||
</c:otherwise>
|
||
</c:choose>
|
||
|
||
</c:if>
|
||
<c:if test="${newSubtask.acIndex.method eq '3'}">
|
||
<%--如果是机构文件提交--%>
|
||
<tr>
|
||
<th>${newSubtask.acIndex.level - 1}级指标说明:</th>
|
||
<td colspan="6">${newSubtask.acIndex.description}(总分:${newSubtask.acIndex.score})得分:${newSubtask.finalScore}</td>
|
||
<td>
|
||
<button class="layui-btn"
|
||
onclick="fileDownByTargerIdTest('${ctx}/assessmentCriterion/methods/files/filesDownform?subtaskId=${newSubtask.id}')"
|
||
style="margin-left: 20%">检查文件
|
||
</button>
|
||
</td>
|
||
</tr>
|
||
<c:choose>
|
||
<c:when test="${newSubtask.directAssessment}">
|
||
<tr>
|
||
<td colspan="7">
|
||
机构提交考核
|
||
<c:choose>
|
||
<c:when test="${newSubtask.directYesNo eq 'y' || newSubtask.directYesNo eq 'n'}">
|
||
<c:if test="${newSubtask.directYesNo eq 'y'}">
|
||
合格 <input type="radio" class="optionsRadios" name="${newSubtask.id}" value="y" checked/>
|
||
不合格 <input type="radio" class="optionsRadios" name="${newSubtask.id}" value="n" />
|
||
打分: <input type="text" style="width: 60px;" oninput="removeRoListener('${newSubtask.id}')" name="${newSubtask.id}score" value="" />
|
||
</c:if>
|
||
<c:if test="${newSubtask.directYesNo eq 'n'}">
|
||
合格 <input type="radio" class="optionsRadios" name="${newSubtask.id}" value="y"/>
|
||
不合格 <input type="radio" class="optionsRadios" name="${newSubtask.id}" value="n" checked/>
|
||
打分: <input type="text" style="width: 60px;" oninput="removeRoListener('${newSubtask.id}')" name="${newSubtask.id}score" value="" />
|
||
</c:if>
|
||
</c:when>
|
||
<c:otherwise>
|
||
合格 <input type="radio" class="optionsRadios" name="${newSubtask.id}" value="y"/>
|
||
不合格 <input type="radio" class="optionsRadios" name="${newSubtask.id}" value="n" />
|
||
打分: <input type="text" style="width: 60px;" oninput="removeRoListener('${newSubtask.id}')" name="${newSubtask.id}score" value="${newSubtask.directYesNo}" />
|
||
|
||
</c:otherwise>
|
||
</c:choose>
|
||
</td>
|
||
<td>
|
||
<button class="layui-btn"
|
||
onclick="dataSubmit('1','${newSubtask.id}','${newSubtask.acIndex.score}','${newSubtask.acIndex.method}')"
|
||
style="margin-left: 20%">保存
|
||
</button>
|
||
</td>
|
||
</tr>
|
||
</c:when>
|
||
<c:otherwise>
|
||
<%--机构提交的公式展示开始--%>
|
||
<c:forEach items="${newSubtask.formulas}" var="formula" varStatus="status">
|
||
<tr>
|
||
<th><font color="#6495ed">指标公式: </font></th>
|
||
<td colspan="7">
|
||
<c:choose>
|
||
<c:when test="${formula.formulaType eq '1002'}">
|
||
if(${fn:escapeXml(formula.formulaLeft)})then(${fn:escapeXml(formula.formulaRight)}) <font color="#32cd32">${fn:escapeXml(formula.formulaValue)}</font>
|
||
</c:when>
|
||
<c:otherwise>
|
||
${formula.formulaLeft}${fn:escapeXml(formula.formulaCenter)}${formula.formulaRight} <font color="#32cd32">${formula.formulaValue}</font>
|
||
</c:otherwise>
|
||
</c:choose>
|
||
</td>
|
||
</tr>
|
||
<c:if test="${newSubtask.formulas.size() == status.index+1}">
|
||
<tr>
|
||
<th><font color="#6495ed">公式变量输入: </font></th>
|
||
<td colspan="6" id="${newSubtask.id}">
|
||
<c:forEach items="${formula.params}" var="par" varStatus="parStatus">
|
||
<c:if test="${par.varType eq '4'}">
|
||
${par.varName}: <input type="text" style="width: 60px;" name="${par.id}" value="${par.varValue}" />
|
||
</c:if>
|
||
</c:forEach>
|
||
<c:if test="${newSubtask.remarks eq '1'}">
|
||
<font color="red">变量值需要输入,输入后点击保存提交即可!</font>
|
||
</c:if>
|
||
<c:if test="${newSubtask.remarks ne '1'}">
|
||
<font color="red">变量值根据系统后台获取,直接点击保存提交即可!</font>
|
||
</c:if>
|
||
</td>
|
||
<td>
|
||
<button class="layui-btn"
|
||
onclick="dataSubmit('2','${newSubtask.id}','${newSubtask.acIndex.score}','${newSubtask.acIndex.method}')"
|
||
style="margin-left: 20%">保存
|
||
</button>
|
||
</td>
|
||
</tr>
|
||
</c:if>
|
||
|
||
</c:forEach>
|
||
<%--机构提交的公式展示结束--%>
|
||
</c:otherwise>
|
||
</c:choose>
|
||
|
||
</c:if>
|
||
<c:if test="${newSubtask.acIndex.method eq '4'}">
|
||
<%--如果是问卷考核--%>
|
||
<tr>
|
||
<th>${newSubtask.acIndex.level - 1}级指标说明:</th>
|
||
<%--如果有文件提交--%>
|
||
<c:choose>
|
||
<c:when test="${newSubtask.fileSubmit}">
|
||
<td colspan="6">${newSubtask.acIndex.description}(总分:${newSubtask.acIndex.score})得分:${newSubtask.finalScore}</td>
|
||
<td>
|
||
<button class="layui-btn"
|
||
onclick="fileDownByTargerIdTest('${ctx}/assessmentCriterion/methods/files/filesDownform?subtaskId=${newSubtask.id}')"
|
||
style="margin-left: 20%">检查文件
|
||
</button>
|
||
</td>
|
||
</c:when>
|
||
<c:otherwise>
|
||
<td colspan="7">${newSubtask.acIndex.description}(总分:${newSubtask.acIndex.score})得分:${newSubtask.finalScore}</td>
|
||
</c:otherwise>
|
||
</c:choose>
|
||
</tr>
|
||
<c:choose>
|
||
<c:when test="${newSubtask.directAssessment}">
|
||
<tr>
|
||
<td colspan="7">
|
||
问卷考核
|
||
<c:choose>
|
||
<c:when test="${newSubtask.directYesNo eq 'y' || newSubtask.directYesNo eq 'n'}">
|
||
<c:if test="${newSubtask.directYesNo eq 'y'}">
|
||
合格 <input type="radio" class="optionsRadios" name="${newSubtask.id}" value="y" checked/>
|
||
不合格 <input type="radio" class="optionsRadios" name="${newSubtask.id}" value="n" />
|
||
打分: <input type="text" style="width: 60px;" oninput="removeRoListener('${newSubtask.id}')" name="${newSubtask.id}score" value="" />
|
||
</c:if>
|
||
<c:if test="${newSubtask.directYesNo eq 'n'}">
|
||
合格 <input type="radio" class="optionsRadios" name="${newSubtask.id}" value="y"/>
|
||
不合格 <input type="radio" class="optionsRadios" name="${newSubtask.id}" value="n" checked/>
|
||
打分: <input type="text" style="width: 60px;" oninput="removeRoListener('${newSubtask.id}')" name="${newSubtask.id}score" value="" />
|
||
</c:if>
|
||
</c:when>
|
||
<c:otherwise>
|
||
合格 <input type="radio" class="optionsRadios" name="${newSubtask.id}" value="y"/>
|
||
不合格 <input type="radio" class="optionsRadios" name="${newSubtask.id}" value="n" />
|
||
打分: <input type="text" style="width: 60px;" oninput="removeRoListener('${newSubtask.id}')" name="${newSubtask.id}score" value="${newSubtask.directYesNo}" />
|
||
|
||
</c:otherwise>
|
||
</c:choose>
|
||
</td>
|
||
<td>
|
||
<button class="layui-btn"
|
||
onclick="dataSubmit('1','${newSubtask.id}','${newSubtask.acIndex.score}','${newSubtask.acIndex.method}')"
|
||
style="margin-left: 20%">保存
|
||
</button>
|
||
</td>
|
||
</tr>
|
||
|
||
</c:when>
|
||
<c:otherwise>
|
||
<%--问卷的公式展示开始--%>
|
||
<c:forEach items="${newSubtask.formulas}" var="formula" varStatus="status">
|
||
<tr>
|
||
<th><font color="#6495ed">指标公式: </font></th>
|
||
<td colspan="7">
|
||
<c:choose>
|
||
<c:when test="${formula.formulaType eq '1002'}">
|
||
if(${fn:escapeXml(formula.formulaLeft)})then(${fn:escapeXml(formula.formulaRight)}) <font color="#32cd32">${fn:escapeXml(formula.formulaValue)}</font>
|
||
</c:when>
|
||
<c:otherwise>
|
||
${formula.formulaLeft}${fn:escapeXml(formula.formulaCenter)}${formula.formulaRight} <font color="#32cd32">${formula.formulaValue}</font>
|
||
</c:otherwise>
|
||
</c:choose>
|
||
</td>
|
||
</tr>
|
||
<c:if test="${newSubtask.formulas.size() == status.index+1}">
|
||
<tr>
|
||
<th><font color="#6495ed">公式变量输入: </font></th>
|
||
<td colspan="7" id="${newSubtask.id}">
|
||
<c:forEach items="${formula.params}" var="par" varStatus="parStatus">
|
||
<c:if test="${par.varType eq '4'}">
|
||
${par.varName}: <input type="text" style="width: 60px;" name="${par.id}" value="${par.varValue}" />
|
||
</c:if>
|
||
<c:if test="${par.varType eq '1'}">
|
||
<font color="#32cd32"> 问卷变量:${par.varName}值为${par.varValue} </font>
|
||
</c:if>
|
||
</c:forEach>
|
||
<c:if test="${newSubtask.remarks eq '1'}">
|
||
<font color="red">变量值需要输入,输入后点击保存提交即可!</font>
|
||
</c:if>
|
||
<c:if test="${newSubtask.remarks ne '1'}">
|
||
<font color="red">变量值根据系统后台获取,直接点击保存提交即可!</font>
|
||
</c:if>
|
||
</td>
|
||
<%--<td>
|
||
<button class="layui-btn" onclick="dataSubmit('${newSubtask.id}','${newSubtask.acIndex.score}','${newSubtask.acIndex.method}')" style="margin-left: 20%">保存</button>
|
||
</td>--%>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="7">
|
||
<button class="layui-btn"
|
||
onclick="fileDownByTargerId('${ctx}/assessment/task/questionnaireHome?subtaskId='+'${newSubtask.id}')"
|
||
style="margin-left: 5%">问卷调查
|
||
</button>
|
||
<font color="red">问卷调查完成,直接点击保存提交即可!</font>
|
||
</td>
|
||
<td>
|
||
<button class="layui-btn"
|
||
onclick="dataSubmit('2','${newSubtask.id}','${newSubtask.acIndex.score}','${newSubtask.acIndex.method}')"
|
||
style="margin-left: 20%">保存
|
||
</button>
|
||
</td>
|
||
</tr>
|
||
</c:if>
|
||
</c:forEach>
|
||
<%--问卷的公式展示结束--%>
|
||
</c:otherwise>
|
||
</c:choose>
|
||
</c:if>
|
||
<tr>
|
||
<th>问题反馈:</th>
|
||
<td colspan="6">
|
||
<textarea id="${newSubtask.id}feedback" htmlEscape="false" rows="2" maxlength="2000"
|
||
class="form-control">${newSubtask.feedback} </textarea>
|
||
</td>
|
||
|
||
|
||
<%-- <div id="hidden1" lay-filter="hidden1" style="display: none">
|
||
<table id="department_result" lay-filter="department_result"></table>
|
||
</div>--%>
|
||
<td>
|
||
<button type="button" class="layui-btn" onclick="wo()" id="dname" style="margin-left: 20%">
|
||
选择问题字典
|
||
</button>
|
||
</td>
|
||
</tr>
|
||
</c:if>
|
||
<tr>
|
||
<td colspan="8">
|
||
<hr style="border: 1px dashed #a0a0a0" width="100%" color=#987cb9 size="3"/>
|
||
|
||
</td>
|
||
</tr>
|
||
</c:forEach>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
|
||
<%--<div>
|
||
<button class="layui-btn" onclick="dataSubmit('${newSubtask.id}','${newSubtask.acIndex.score}','${newSubtask.acIndex.method}')" style="margin-left: 46%">全部提交</button>
|
||
</div>--%>
|
||
<script type="text/javascript" src="${ctxStatic}/layui-v2.4.5/layui/layui.js"></script>
|
||
<script type="text/javascript">
|
||
function wo() {
|
||
layer.open({
|
||
title: "选择问题字典",
|
||
type:2,
|
||
area: ['50%', '50%'],
|
||
maxmin: true, //开启最大化最小化按钮
|
||
content: '${ctx}/sys/dict/wenti',
|
||
btn: ['确定', '关闭'],
|
||
yes: function(index,layero){
|
||
/* var body = layer.getChildFrame('body', index);//获取子页面内容
|
||
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
||
var data=iframeWin.layui.table.checkStatus('userTable').data;
|
||
alert(data)*/
|
||
/* var iframeWindow = window['layui-layer-iframe '+ index]
|
||
var data = iframeWindow.layui.table.checkStatus('userTable').data
|
||
alert("ddd")*/
|
||
/*alert(data)*/
|
||
var iframeWindow = window[layero.find('iframe')[0]['name']];
|
||
|
||
var params = iframeWindow.layui.table.checkStatus('testReload').data;
|
||
|
||
var wenti="";
|
||
for (i=0;i<params.length;i++){
|
||
|
||
wenti+=params[i].description+";";
|
||
}
|
||
console.log(wenti)
|
||
document.getElementsByTagName('textarea')[0].value=wenti;
|
||
wenti="";
|
||
|
||
|
||
console.log(params.length)
|
||
layer.close(index);
|
||
|
||
}
|
||
|
||
|
||
|
||
|
||
});
|
||
}
|
||
|
||
/* layui.use(['table', 'layer'], function () {
|
||
var table = layui.table;
|
||
var layer = layui.layer;*/
|
||
|
||
//渲染数据表格
|
||
/* var tableIns = table.render({
|
||
elem: '#userTable' //渲染的目标对象
|
||
, id: 'testReload'
|
||
, title: '用户数据表'//数据导出来的标题
|
||
, height: '500'
|
||
, cellMinWidth: 200 //设置列的最小默认宽度
|
||
, page: true //是否启用分页
|
||
, cols: [[ //列表数据
|
||
{checkbox: true}
|
||
,{field: 'description', title: '问题反馈列表'}
|
||
]]
|
||
})
|
||
|
||
|
||
table.reload('testReload', {
|
||
url: '${ctx}/sys/dict/queryAllProblem',
|
||
page: {
|
||
curr: 1 //重新从第 1 页开始
|
||
}
|
||
});*/
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/* })*/
|
||
|
||
|
||
/* layui.use(['table', 'layer'], function () {
|
||
/!* // part 1: 为全局变量赋值
|
||
$ = layui.$,
|
||
admin = layui.admin,
|
||
table = layui.table,
|
||
layer = layui.layer,
|
||
laydate = layui.laydate,
|
||
form = layui.form;
|
||
|
||
// part 2: 让layui渲染页面
|
||
table.render(department_result_table_options); // 渲染页面上的table. table中 的数据是通过 ajax 请求从后台获取。
|
||
|
||
// part 3: 让 layui 为页面的元素绑定事件处理函数
|
||
table.on('tool(department_result)', department_tool_event_handler); // 为页面上的table上的tool绑定事件处理函数
|
||
|
||
// part 4: 为输入框绑定光标聚焦事件的触发该函数,
|
||
$('#dname').click(depart_input_focus_handler);*!/
|
||
});*/
|
||
|
||
|
||
/*
|
||
layui.use(['table', 'layer'], function () {
|
||
var table = layui.table;
|
||
var layer = layui.layer;
|
||
|
||
|
||
|
||
})*/
|
||
|
||
|
||
//页面上隐藏的用于弹层的所有客户的列表的相关设置
|
||
/* var department_result_table_options = {
|
||
elem: '#department_result'
|
||
,url: context_path + '/api/department'
|
||
,method : 'get'
|
||
,response : {
|
||
statusName : 'code'
|
||
,statusCode : 200
|
||
,msgName : 'msg'
|
||
,countName : 'count'
|
||
,dataName : 'data'
|
||
}
|
||
,title : '部门列表'
|
||
,cols : [ [
|
||
{ field : 'deptno', title : '部门编号', width : 100}
|
||
,{ field : 'dname', title : '部门名称', width : 150 }
|
||
,{ field : 'loc', title : '所在地', width : 150 }
|
||
,{ fixed : 'right', title : '操作', toolbar : '#hidden1-table-tool', width : 80 } ] ]
|
||
};*/
|
||
|
||
/*function depart_input_focus_handler() {
|
||
layer.open({
|
||
type : 1
|
||
, area : [ '600px', '450px' ]
|
||
, content : $('#hidden1')
|
||
, success : function () {
|
||
// 重新加载表格中的数据
|
||
table.reload('department_result', department_result_table_options);
|
||
$('#hidden1').css('display', 'block');
|
||
}
|
||
});
|
||
}*/
|
||
|
||
|
||
$(document).ready(function () {
|
||
/* //获取radio对象 radio每组的name不能重复!!
|
||
var radioObj = $('.optionsRadios');
|
||
//for循环遍历radio对象,比较radio对象中的value
|
||
for(var i=0; i<radioObj.length;i++){
|
||
if(radioObj[i].value == "y" ||radioObj[i].value == "n"){
|
||
radioObj[i].checked = true;
|
||
}
|
||
}*/
|
||
});
|
||
|
||
|
||
/**
|
||
* 跳转文件下载页面
|
||
* */
|
||
function fileDownByTargerIdTest(url) {
|
||
top.layer.open({
|
||
type: 2,
|
||
area: ['40%', '70%'],
|
||
title: "文件预览",
|
||
maxmin: true, //开启最大化最小化按钮
|
||
content: url,
|
||
btn: ['关闭'],
|
||
cancel: function (index) {
|
||
}
|
||
});
|
||
}
|
||
|
||
//问卷
|
||
function fileDownByTargerId(url) {
|
||
top.layer.open({
|
||
type: 2,
|
||
area: ['100%', '100%'],
|
||
title: "问卷调查",
|
||
maxmin: true, //开启最大化最小化按钮
|
||
content: url,
|
||
btn: ['关闭'],
|
||
cancel: function (index) {
|
||
}
|
||
});
|
||
}
|
||
|
||
/**
|
||
* 单条指标打分提交
|
||
* 同步所有父级得分 以及提交状态
|
||
* 根据method考核方式类型区分提交方式。
|
||
* isOne 如果是1就都是直接考核
|
||
* */
|
||
function dataSubmit(isOne, subtaskId, indexScore, method) {
|
||
var feedback = $("#" + subtaskId + "feedback").val();
|
||
var directYesNo = "";
|
||
var score = "";
|
||
var postData;
|
||
var yseNo = $("input[name='" + subtaskId + "']:checked").val();
|
||
//1直接评分 2公式评分
|
||
var isDirectASS = "";
|
||
if (isOne == "1") {
|
||
isDirectASS = "1";
|
||
if (yseNo == null || yseNo == '') {
|
||
score = $("input[name='" + subtaskId + "score']").val();
|
||
directYesNo = score;
|
||
if (score == null || score == "") {
|
||
alert("请打分!");
|
||
return;
|
||
}
|
||
} else {
|
||
if ($("input[name='" + subtaskId + "score']").val() != null && $("input[name='" + subtaskId + "score']").val() != '') {
|
||
alert("请只选中一项!");
|
||
return;
|
||
}
|
||
if (yseNo == "y") {
|
||
score = indexScore;
|
||
directYesNo = "y";
|
||
} else if (yseNo == "n") {
|
||
score = 0;
|
||
directYesNo = "n";
|
||
}
|
||
}
|
||
} else {
|
||
if (method == "1") //直接考核
|
||
{
|
||
isDirectASS = "1";
|
||
if (yseNo == null || yseNo == '') {
|
||
score = $("input[name='" + subtaskId + "score']").val();
|
||
directYesNo = score;
|
||
if (score == null || score == "") {
|
||
alert("请打分!");
|
||
return;
|
||
}
|
||
} else {
|
||
if ($("input[name='" + subtaskId + "score']").val() != null && $("input[name='" + subtaskId + "score']").val() != '') {
|
||
alert("请只选中一项!");
|
||
return;
|
||
}
|
||
if (yseNo == "y") {
|
||
score = indexScore;
|
||
directYesNo = "y";
|
||
} else if (yseNo == "n") {
|
||
score = 0;
|
||
directYesNo = "n";
|
||
}
|
||
}
|
||
} else if (method == "2" || method == "3" || method == "4") { //系统考核 机构提交 都是公式提交。
|
||
isDirectASS = "2";
|
||
var list = document.getElementById("" + subtaskId + "").getElementsByTagName("input");//查询td下的所有input标签
|
||
var array = []; //定义一个对象数据 存放每一个input的键值对(input中“name”为key,“value”为value)
|
||
for (var i = 0; i < list.length && list[i]; i++) //对表单中所有的input进行遍历
|
||
{
|
||
//判断不是空的 input,进行表单提交
|
||
if (list[i].value != "" && list[i].value != null) {
|
||
var key = list[i].name;
|
||
var value = list[i].value;
|
||
var s = new ObjData(key, value); //创建键值对象
|
||
array.push(s); //把对象放入对象数组中
|
||
} else {
|
||
top.layer.alert("请填写所有公式变量值!");
|
||
}
|
||
}
|
||
// console.log(array);
|
||
postData = JSON.stringify(array);
|
||
|
||
} else if (method == "4") {//问卷考核
|
||
|
||
} else {
|
||
top.layer.alert("考核方式报错 ! 原因传值不对!");
|
||
}
|
||
}
|
||
|
||
|
||
$.ajax({
|
||
async: false,
|
||
url: "${ctx}/assessment/task/updateStatusAndScore",
|
||
data: {
|
||
"id": subtaskId,
|
||
"finalScore": score,
|
||
"directYesNo": directYesNo,
|
||
"postData": postData,
|
||
"isDirectASS": isDirectASS,
|
||
"feedback": feedback
|
||
},
|
||
dataType: "json",
|
||
success: function (data) {
|
||
// console.log(data);
|
||
if (data.success) {
|
||
/*location.reload();
|
||
alert("保存成功!");*/
|
||
top.layer.msg(
|
||
data.msg,
|
||
{time: 1000},
|
||
function () {
|
||
location.reload();
|
||
}
|
||
)
|
||
} else {
|
||
top.layer.alert(data.msg);
|
||
}
|
||
}
|
||
});
|
||
}
|
||
|
||
/**
|
||
* 选中输入框 则移除单选框check
|
||
* @param roNameId
|
||
*/
|
||
function removeRoListener(roNameId) {
|
||
$("input:radio[name='" + roNameId + "']").attr("checked", false);
|
||
}
|
||
|
||
/**
|
||
* 定义 键值对象
|
||
* @param key
|
||
* @param value
|
||
* @constructor
|
||
*/
|
||
function ObjData(key, value) {
|
||
this.Key = key;
|
||
this.Value = value;
|
||
}
|
||
</script>
|
||
|
||
</body>
|
||
</html> |