<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/WEB-INF/struts-tags.tld"%>
<s:set name="context_path" value="#request.get('javax.servlet.forward.context_path')" />
<html>
<head>
<link rel="stylesheet" type="text/css" href="/js/extjs/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="/js/extjs/css/ext-ext.css" />
<link rel="stylesheet" type="text/css" href="/js/extjs/css/whatyExtjs.css" />
<link rel="stylesheet" type="text/css" href="/js/extjs/pub/Multiselect.css" />
<script type="text/javascript" src="<s:property value="#context_path" />/projects/tyxl/pub/js/jquery-1.4.2.js"></script>
<script type="text/javascript" src="/js/extjs/pub/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="/js/extjs/pub/ext-all.js"></script>
<script type="text/javascript" src="/js/extjs/pub/ext-lang-zh_CN.js"></script>
<script type="text/javascript" src="/js/extjs/pub/whatyExtjs.js"></script>
<script type="text/javascript" src="/js/extjs/pub/Multiselect.js"></script>
<script type="text/javascript" src="/entity/manager/js/check.js"></script>
<script type="text/javascript" src="/js/string_utils.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body{
margin:auto;
padding:auto;
width:1200px;
font-family: "宋体";
font-size: 12px;
line-height:20px;
background-color:#F4FFFB;
behavior:url(css/hover.htc);
}
table{
empty-cells: show;
text-align:center;
border: 1px solid #89bfa7;
}
.head td{
border-collapse: separate;
text-align : center;
background-color: #bfe5d5 ;
}
.intd1{
border-width: 0px 0px 1px 0px;
}
.intd2{
border-width: 1px 1px 0px 0px;
}
.intd3{
border-width: 1px 0px 0px 1px;
}
table tr td{
border: 1px solid #89bfa7;
text-algin:center;
}
.sel{
border: 1px solid #89bfa7;
width:200px;
}
.dialog {
text-align: left;
width: 540px;
height:570px;
border: 5px solid #89bfa7;
position: absolute;
display: none;
z-index: 101;
background-color:#F4FFFB;
}
.d1{
float:left;
width:200px;
height:400px;
border: 2px solid #89bfa7
}
.d{
float:left;
width:60px;
height:400px;
}
.d2{
overflow-x:auto;
overflow-y:auto;
float:left;
width:200px;
height:400px;
border: 2px solid #89bfa7
}
.dialog .title {
background-color: #bfe5d5;
padding: 5px;
font-weight: bold
}
.dialog .title img {
float: right
}
.dialog .content {
background-color:#F4FFFB;
padding: 25px;
height: 400px
}
.mask {
width: 100%;
height: 100%;
background-color: #000;
position: absolute;
top: 0px;
left: 0px;
filter: alpha(opacity = 30);
display: none;
z-index: 100
}
#tiDiv{
text-align:center;
}
#bodyDiv{
text-align: center;
}
#tit_tab{
margin:0px 0px 0px 180px;
text-alien:center;
border:0px;
}
#tit_tab td{
text-alien:center;
border:0px;
}
.overColor {
background-color: #eeeeee;
}
.outColor {
background-color: #111111;
}
.evenBackground {
background-color: #ffffff;
}
.oddBackground {
background-color: #F4FFFB;
}
</style>
<script type="text/javascript">
Ext.onReady(function(){
var feeTypeCombo =new Ext.form.ComboBox({
store: new Ext.data.JsonStore({
fields: ['id', 'name'],
id: 'id',
data:<s:action name='myList' namespace='/test' executeResult='true' ><s:param name='sql'>select id,name from pe_semester</s:param></s:action>,
autoLoad:true,
root:'models'
}),
hiddenName: 'semesterId',
displayField:'name',
valueField: 'id' ,
typeAhead: true,
mode: 'local',
triggerAction: 'all',
emptyText:'选择学年学期',
applyTo: 'semester',
editable: true,
forceSelection: true,
selectOnFocus: true
});
var feeTypeCombo =new Ext.form.ComboBox({
store: new Ext.data.JsonStore({
fields: ['id', 'name'],
id: 'id',
data:<s:action name='myList' namespace='/test' executeResult='true' ><s:param name='sql'>select id,name from pe_site</s:param></s:action>,
autoLoad:true,
root:'models'
}),
hiddenName: 'siteId',
displayField:'name',
valueField: 'id' ,
typeAhead: true,
mode: 'local',
triggerAction: 'all',
emptyText:'选择站点',
applyTo: 'site',
editable: true,
forceSelection: true,
selectOnFocus:true
});
});
</script>
<script>
function doSearch(){
var flag = true;
var siteId=document.getElementById('siteId').value;
var site=document.getElementById('site').value;
var semesterId=document.getElementById('semesterId').value;
var semester=document.getElementById('semester').value;
if(siteId=='' && semesterId==''){
alert("请选择检索信息");
flag=false;
}
if(flag){
document.searchForm.action="/entity/courseScheduleInfo/courseScheduleInfo_getOpencoursePlan.action?siteId="+siteId+"&semesterId="+semesterId;
document.searchForm.submit();
}
}
function doSearchAll(){
document.searchForm.action="/entity/courseScheduleInfo/courseScheduleInfo_getOpencoursePlanAll.action";
document.searchForm.submit();
}
function doSubmit(){
var r=confirm("确定要提交此进度?");
var a=document.getElementById('subA');
if (!r) {
a.href="javascript:void(0);"
}
}
function showDialog() {//让新增的三个文本框所在div居中显示
var objW = $(window);//获取当前窗体
var objC = $(".dialog");//获取对话框
var brsW = objW.width();
var brsH = objW.height();
var sclL = objW.scrollLeft();//获取当前window中的行向滚动条据左侧距离
var sclT = objW.scrollTop();//获取当前window中的纵向滚动条据上方距离
var curW = objC.width();
var curH = objC.height();
var left = sclL + (brsW - curW) / 2;//对话框居中的左边框距离
var top = sclT + (brsH - curH) / 2;//对话框居中的上边框的距离
objC.css({
"left" : left,
"top" : top
});
}
function DsetIntTea(i){
//alert(i)
document.getElementById("planId").value=i;
showDialog();
$("#caozuo2").show();
$("#caozuo1").show();
$(".dialog").show();
}
function getIntTea(i){
document.getElementById("planId").value=i;
showDialog();
$("#caozuo2").hide();
$("#caozuo1").hide();
$(".dialog").show();
}
</script>
<script type="text/javascript">
$(function(){
initUi();
$("#sub_btn").click(function(){
var items=$("#isForm").serialize();//序列化表单
//alert(items);
var count = $("#count").val();
$.ajax({
url:"/entity/courseScheduleInfo/courseScheduleInfo_updateCourseScheduleInfo.action?count="+count,
type:"post",
dataType:"text",
data:items,
success:function(data){
if(data.indexOf("success")>=0){//保存成功!
alert("保存操作成功!")
}else{
alert("保存操作失败!");
}
}
})
})
$("#for_back").click(function(){
});
$("#search_btn1").click(function(){
})
$("#imgClose").click(function(){
$(".dialog").hide();
})
//显示网络教师列表
$("#showIntTea_btn").click(function(){
var planId=$("#planId").val();
$.ajax({
url:"/entity/courseScheduleInfo/courseScheduleInfo_getCourseTeacher.action?prTchOpencoursePlanId="+planId,
data:null,
dateType:"text",
type:"post",
success:function(result){
var teacher=eval("("+result+")");
var showDivs = "";
if (teacher.length>0){
for ( var i = 0; i < teacher.length; i++) {
if(teacher[i].teacherId=="000"){
alert("该执行计划暂时未设置网络教师");
} else{
var showDiv="<div class='sel'><input type='checkbox' name='flagbox1' value='"+teacher[i].teacherName+"'> "+teacher[i].teacherName+"</div>"
showDivs = showDivs + showDiv;
}
}
$("#shouTeacher").html(showDivs);
} else {
alert("该执行计划暂时未设置网络教师");
}
},
error : function(result) {
alert("获取网络教师失败");
}
});
});
//查询网络教师
$("#DserText").change(function(){
var planId=$("#planId").val();
var Dvar=$("#DserText").val();
$.ajax({
url:"/entity/courseScheduleInfo/courseScheduleInfo_searchTeacherD.action?Dvar="+encodeURI(Dvar),
data:null,
dateType:"text",
type:"post",
success:function(result){
var teacher=eval("("+result+")");
var showDivs = "";
if (teacher.length>0){
for ( var i = 0; i < teacher.length; i++) {
if(teacher[i].teacherId=="000"){
} else{
var showDiv="<div class='sel'><input type='checkbox' name='flagbox2' value='"+teacher[i].teacherName+"'> "+teacher[i].teacherName+"</div>"
showDivs = showDivs + showDiv;
}
}
$("#resultDiv").html(showDivs);
}
},
error : function(result) {
alert("查询失败");
}
});
});
//添加网络教师
$("#add_btn").click(function(){
var planId=$("#planId").val();
var length=$(":checkbox[name='flagbox2']:checked").length;
if(length<=0){
alert("请选择要添加的项!");
return;
}
var addTeas="";
$(":checkbox[name='flagbox2']:checked").each(function(){
addTeas=addTeas+$(this).val()+" ";
});
$.ajax({
url:"/entity/courseScheduleInfo/courseScheduleInfo_addCourseTeachers.action?prTchOpencoursePlanId="+planId+"&teacherNames="+encodeURI(addTeas)+"&random=" + new Date().getTime(),
type:"post",
dataType:"text",
data:null,
success:function(msg){
var msgArr=msg.split("\r");
if (msgArr[0].indexOf('成功') > 0){
var tea= msgArr[0].split(",");
for (var i=0;i<tea.length-1;i++){
var addTeachers="<div class='sel'><input type='checkbox' name='flagbox1' value='"+tea[i]+"'> "+tea[i]+"</div>"
$("#shouTeacher").append(addTeachers);
}
alert(msg);
} else {
alert(msg);
}
} ,
error : function(){
alert("操作失败");
}
});
});
//同上保存操作
$("#saveIntTea_btn").click(function(){
var planId=$("#planId").val();
var length=$(":checkbox[name='flagbox1']:checked").length;
if(length<=0){
alert("请选择要添加的项!");
return;
}
var addTeas="";
$(":checkbox[name='flagbox1']:checked").each(function(){
addTeas=addTeas+$(this).val()+" ";
});
$.ajax({
url:"/entity/courseScheduleInfo/courseScheduleInfo_addCourseTeachers.action?prTchOpencoursePlanId="+planId+"&teacherNames="+encodeURI(addTeas),
type:"post",
dataType:"text",
data:null,
success:function(msg){
alert(msg);
} ,
error : function(){
alert("操作失败");
}
});
});
//删除操作
$("#del_btn").click(function(){
var planId=$("#planId").val();
var length=$(":checkbox[name='flagbox1']:checked").length;
if(length<=0){
alert("请选择要删除的项!");
return;
}
var addTeas="";
$(":checkbox[name='flagbox1']:checked").each(function(){
addTeas=addTeas+$(this).val()+" ";
});
$.ajax({
url:"/entity/courseScheduleInfo/courseScheduleInfo_delCourseTeachers.action?prTchOpencoursePlanId="+planId+"&teacherNames="+encodeURI(addTeas),
type:"post",
dataType:"text",
data:null,
success:function(msg){
if (msg.indexOf('成功') > 0){
$(":checkbox[name='flagbox1']:checked").parent().remove();
alert(msg);
} else {
alert(msg);
}
} ,
error : function(){
alert("操作失败");
}
});
});
//实现全选和反选操作
$("#checkAll").click(function(){
if($(this).is(":checked")){
$(":checkbox[name='flagbox1']:not(#checkAll)").each(function(){
$(this).attr("checked",true);
});
}else{
$(":checkbox[name='flagbox1']:not(#checkAll)").each(function(){
$(this).removeAttr("checked");
});
}
});
});
function initUi(){
$("#content_tab tr:even").addClass("evenBackground");
$("#content_tab tr:odd").addClass("oddBackground");
$("#content_tab tr:even").mouseover(function() {//鼠标一上去的事件
$(this).removeClass("evenBackground").addClass("overColor");
}).mouseout(function() {
$(this).removeClass("overColor").addClass("evenBackground");
});
$("#content_tab tr:odd").mouseover(function() {//鼠标一上去的事件
$(this).removeClass("oddBackground").addClass("overColor");
}).mouseout(function() {
$(this).removeClass("overColor").addClass("oddBackground");
});
}
</script>
<title>广州医科大学远程教育平台</title>
</head>
<body>
<div id="tiDiv">
<b>教学任务管理</b>
<hr/>
<form id="searchForm" name="searchForm">
<table id='tit_tab'>
<tr><td width="95px">学年学期:</td><td width="230px"><input type="text" id="semester" size="30" name="semester" value="<s:property value='semesterId'/>"/></td>
<td width="95px">承担单位:</td><td width="230px"><input type="text" id="site" size="30" name="site" value="<s:property value='siteId'/>" /></td>
<td><input type="button" name="sea_btn" id="search_btn" onclick="doSearch()" value="检索"/></td>
<td><input type="button" name="searchAll_btn" id="searchAll_btn" onclick="doSearchAll()" value="显示全部"/></td></tr>
</table>
</form>
</div>
<div id="bodyDiv">
<table cellspacing=0px id='content_tab'>
<tr class='head' >
<td class='td1' width=30px>序号</td><td class='td1' width=200px>课程</td><td width=50px>学分</td><td width=150px>类别</td><td width=50px>总学时</td><td width=50px>上课班号</td><td width=150px>上课班级名称</td><td
width=200px>网络教师</td><td width=250px></td>
</tr>
<s:iterator value="coursePlanList" status="stuts" >
<tr>
<td><s:property value="${stuts.index+1}"/> </td>
<td>[<s:property value="peTchCourse.code"/>]<s:property value="peTchCourse.name"/> </td>
<td><s:property value="peTchCourse.credit"/> </td>
<td>
<s:set name="courseType" value="getCourseType(id)"/>
<s:property value="#courseType" escape="false" />
</td>
<td><s:property value="prTchProgramCourse.periodTotal"/> </td>
<td><s:property value="peClass.code"/> </td>
<td><s:property value="peClass.name"/> </td>
<td>
<s:if test="#attr.user_session.userLoginType=='1b'">
<s:if test="enumConstByFlagCheckPlan.code in {1,2,4,6,8}">
<a href="javascript:void(0);" onclick="getIntTea('<s:property value='id'/>')">查看网络教师</a>
<!-- <input type="button" value="查看网络教师" onclick="getIntTea('<s:property value='id'/>')"/> -->
</s:if><s:else>
<a href="javascript:void(0);" onclick="DsetIntTea('<s:property value='id'/>')">设置网络教师</a>
<!-- <input type="button" value="设置网络教师" onclick="DsetIntTea('<s:property value='id'/>')"/> -->
</s:else>
</s:if>
<s:else>
<a href="javascript:void(0);" onclick="getIntTea('<s:property value='id'/>')">查看网络教师</a>
</s:else>
</td>
<s:if test="#attr.user_session.userLoginType=='1b'">
<td>
<s:if test="enumConstByFlagCheckPlan.code in {1,2,4,6,8}">
<a href='<s:property value="#context_path"/>/entity/courseScheduleInfo/courseScheduleInfo_getShenPiShu.action?prTchOpencoursePlanId=<s:property value="#request.coursePlanList[${stuts.index}].id"/>&readFlag=0' target="_blank">查看审批书</a>|
</s:if>
<s:else>
<a href='<s:property value="#context_path"/>/entity/courseScheduleInfo/courseScheduleInfo_getShenPiShu.action?prTchOpencoursePlanId=<s:property value="#request.coursePlanList[${stuts.index}].id"/>'
target="_blank">录入审批书</a>|
</s:else>
<s:if test="enumConstByFlagCheckPlan.code in {1,2,4,6,8}">
<a href='<s:property value="#context_path"/>/entity/courseScheduleInfo/courseScheduleInfo_getScheduleInfoForCheck.action?prTchOpencoursePlanId=<s:property value="#request.coursePlanList[${stuts.index}].id"/>&readFlag=0'>查看进度表</a>|
</s:if>
<s:else>
<a href='<s:property value="#context_path"/>/entity/courseScheduleInfo/courseScheduleInfo_getCourseScheduleInfo.action?prTchOpencoursePlanId=<s:property value="#request.coursePlanList[${stuts.index}].id"/>'>录入进度表</a>|
</s:else>
<s:if test="enumConstByFlagCheckPlan.code in {1,2,4,6,8}">
已提交|
</s:if>
<s:else>
<a href='<s:property value="#context_path"/>/entity/courseScheduleInfo/courseScheduleInfo_submitCoursePlan.action?prTchOpencoursePlanId=<s:property value="#request.coursePlanList[${stuts.index}].id"/>&readFlag=0'
id="subA" onclick="doSubmit()">提交</a>|
</s:else>
<a href="">打印</a>
</td>
</s:if>
<s:if test="#attr.user_session.userLoginType=='1c'">
<td>
<s:if test="enumConstByFlagCheckPlan.code==1">
<a href='<s:property value="#context_path"/>/entity/courseScheduleInfo/courseScheduleInfo_getScheduleInfoForCheck.action?prTchOpencoursePlanId=<s:property value="#request.coursePlanList[${stuts.index}].id"/>'>审核进度</a>
</s:if><s:elseif test="enumConstByFlagCheckPlan.code==2">审核通过|</s:elseif><s:elseif test="enumConstByFlagCheckPlan.code==3">审核不通过|</s:elseif>
<s:if test="#attr.user_session.userLoginType!='1b'">
<a href='<s:property value="#context_path"/>/entity/courseScheduleInfo/courseScheduleInfo_getScheduleInfoForCheck.action?prTchOpencoursePlanId=<s:property value="#request.coursePlanList[${stuts.index}].id"/>&readFlag=0'>查看进度表</a>
</s:if>
</td>
</s:if>
<s:elseif test="#attr.user_session.userLoginType=='1d'">
<td>
<s:if test="enumConstByFlagCheckPlan.code==2">
<a href='<s:property value="#context_path"/>/entity/courseScheduleInfo/courseScheduleInfo_getScheduleInfoForCheck.action?prTchOpencoursePlanId=<s:property value="#request.coursePlanList[${stuts.index}].id"/>'>审核进度</a>
</s:if><s:elseif test="enumConstByFlagCheckPlan.code==4">审核通过|</s:elseif><s:elseif test="enumConstByFlagCheckPlan.code==5">审核不通过|</s:elseif>
<s:if test="#attr.user_session.userLoginType!='1b'">
<a href='<s:property value="#context_path"/>/entity/courseScheduleInfo/courseScheduleInfo_getScheduleInfoForCheck.action?prTchOpencoursePlanId=<s:property value="#request.coursePlanList[${stuts.index}].id"/>&readFlag=0'>查看进度表</a>
</s:if>
</td>
</s:elseif>
<s:elseif test="#attr.user_session.userLoginType=='1e'">
<td>
<s:if test="enumConstByFlagCheckPlan.code==4">
<a href='<s:property value="#context_path"/>/entity/courseScheduleInfo/courseScheduleInfo_getScheduleInfoForCheck.action?prTchOpencoursePlanId=<s:property value="#request.coursePlanList[${stuts.index}].id"/>'>审核进度</a>
</s:if><s:elseif test="enumConstByFlagCheckPlan.code==6">审核通过|</s:elseif><s:elseif test="enumConstByFlagCheckPlan.code==7">审核不通过|</s:elseif>
<s:if test="#attr.user_session.userLoginType!='1b'">
<a href='<s:property value="#context_path"/>/entity/courseScheduleInfo/courseScheduleInfo_getScheduleInfoForCheck.action?prTchOpencoursePlanId=<s:property value="#request.coursePlanList[${stuts.index}].id"/>&readFlag=0'>查看进度表</a>
</s:if>
</td>
</s:elseif>
<s:elseif test="#attr.user_session.userLoginType=='1f'">
<td>
<s:if test="enumConstByFlagCheckPlan.code==6">
<a href='<s:property value="#context_path"/>/entity/courseScheduleInfo/courseScheduleInfo_getScheduleInfoForCheck.action?prTchOpencoursePlanId=<s:property value="#request.coursePlanList[${stuts.index}].id"/>'>审核进度</a>
</s:if><s:elseif test="enumConstByFlagCheckPlan.code==8">审核通过|</s:elseif><s:elseif test="enumConstByFlagCheckPlan.code==9">审核不通过|</s:elseif>
<s:if test="#attr.user_session.userLoginType!='1b'">
<a href='<s:property value="#context_path"/>/entity/courseScheduleInfo/courseScheduleInfo_getScheduleInfoForCheck.action?prTchOpencoursePlanId=<s:property value="#request.coursePlanList[${stuts.index}].id"/>&readFlag=0'>查看进度表</a>
</s:if>
</td>
</s:elseif>
<s:elseif test="#attr.user_session.userLoginType=='1a'">
<td>
<s:if test="enumConstByFlagCheckPlan.code==8">
<a href='<s:property value="#context_path"/>/entity/courseScheduleInfo/courseScheduleInfo_getScheduleInfoForCheck.action?prTchOpencoursePlanId=<s:property value="#request.coursePlanList[${stuts.index}].id"/>&readFlag=0'>查看进度表</a>
</s:if>
</td>
</s:elseif>
</tr>
</s:iterator>
</table>
<br/>
<!-- 遮罩层 -->
<div class="dialog">
<div class="title">
<div id="close"><image src="<s:property value="#context_path" />/entity/student/images3/close.png" alt="点击关闭" id="imgClose" ></image>设置网络教师</div>
</div>
<div class="content">
<div><input type="button" value="显示网络教师" id="showIntTea_btn"/></div><br/><div class="checkDiv" style="margin-left:0px;"><input type="checkbox" id="checkAll"/> 全选</div>
<div class="d1" id="shouTeacher"> </div>
<div class="d">
<div id="caozuo1" class="caozuo">
<br /><br /><br /><br /><br /><br />
<input type="button" value="<添加" id="add_btn"/><br /><br /><br />
<input type="button" value="删除>" id="del_btn"/></div>
</div>
<div class="d2" id="d2">
<div style="margin-left:20px">请输入教师姓名查询:<input type="text" id="DserText" size="16"/></div>
<div id="resultDiv"> </div>
</div>
<div id="caozuo2"><input type="button" value="添加选中教师" id="saveIntTea_btn"/></div>
</div>
</div>
<input type="hidden" value="" id="planId"/>
</div>
</body>
</html>