480 lines
30 KiB
Plaintext
480 lines
30 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"/>
|
||
</head>
|
||
|
||
<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/taskViewHome">任务列表</a> >
|
||
<a style="color: #007bff;" href="${ctx}/assessment/task/viewDetail?taskId=${subtask.standardTaskId}">指标树</a> >
|
||
<a style="color: #007bff;" href="#">考核执行</a>
|
||
</div>
|
||
</div>
|
||
<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>
|
||
|
||
</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>
|
||
</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(${formula.formulaLeft})then(${formula.formulaRight}) <font color="#32cd32">${formula.formulaValue}</font>
|
||
</c:when>
|
||
<c:otherwise>
|
||
${formula.formulaLeft}${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: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>
|
||
|
||
</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>
|
||
|
||
</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(${formula.formulaLeft})then(${formula.formulaRight}) <font color="#32cd32">${formula.formulaValue}</font>
|
||
</c:when>
|
||
<c:otherwise>
|
||
${formula.formulaLeft}${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: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>
|
||
|
||
</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.directAssessment}得分:${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>
|
||
|
||
</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(${formula.formulaLeft})then(${formula.formulaRight}) <font color="#32cd32">${formula.formulaValue}</font>
|
||
</c:when>
|
||
<c:otherwise>
|
||
${formula.formulaLeft}${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: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="8">
|
||
<button class="layui-btn" onclick="fileDownByTargerId('${ctx}/assessment/task/questionnaireHomeLook?subtaskId='+'${newSubtask.id}')" style="margin-left: 5%">问卷调查查看</button>
|
||
<font color="red">问卷调查完成,直接点击保存提交即可!</font>
|
||
</td>
|
||
|
||
</tr>
|
||
</c:if>
|
||
</c:forEach>
|
||
<%--问卷的公式展示结束--%>
|
||
</c:otherwise>
|
||
</c:choose>
|
||
</c:if>
|
||
<tr>
|
||
<th>问题反馈: </th>
|
||
<td colspan="7">
|
||
<textarea id="${newSubtask.id}feedback" htmlEscape="false" rows="2" readonly ="readonly" maxlength="2000" class="form-control">${newSubtask.feedback} </textarea>
|
||
</td>
|
||
</tr>
|
||
</c:if>
|
||
</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">
|
||
$(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: ['20%', '60%'],
|
||
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考核方式类型区分提交方式。
|
||
* */
|
||
function dataSubmit(subtaskId,indexScore,method)
|
||
{
|
||
var directYesNo="";
|
||
var score="";
|
||
var postData ;
|
||
var yseNo=$("input[name='"+subtaskId+"']:checked").val();
|
||
if(method=="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"){ //系统考核 机构提交 都是公式提交。
|
||
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},
|
||
dataType: "json",
|
||
success: function (data) {
|
||
console.log(data);
|
||
if(data.success){
|
||
top.layer.alert(data.msg);
|
||
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> |