@@ -6,16 +6,16 @@ | |||
// webapi: 'http://112.230.201.53:31173/', | |||
// web:"http://112.230.201.53/:8081/"//web地址,用于配置logo | |||
//}; | |||
var config = { | |||
webapi: 'http://localhost:8080/', | |||
web: "http://localhost:8082/"//web地址,用于配置logo | |||
}; | |||
// var config = { | |||
// webapi: 'http://localhost:31173/', | |||
// web: "http://localhost:20472/"//web地址,用于配置logo | |||
// webapi: 'http://localhost:8080/', | |||
// web: "http://localhost:8048/"//web地址,用于配置logo | |||
// }; | |||
var config = { | |||
webapi: 'http://localhost:31173/', | |||
web: "http://localhost:20472/"//web地址,用于配置logo | |||
}; | |||
// var config = { | |||
// webapi: 'http://123.57.209.16:31173/', | |||
// web: "http://123.57.209.16:31175/"//web地址,用于配置logo | |||
@@ -0,0 +1,76 @@ | |||
.box{ | |||
height: 100%; | |||
width: 100%; | |||
background: url(images/content.png); | |||
background-repeat: no-repeat; | |||
background-size: 100% 100%; | |||
/* position: relative; */ | |||
} | |||
.answertotalContent{ | |||
position: relative; | |||
background-color: #FFFFFF; | |||
height: 70%; | |||
top: 25%; | |||
width: 93%; | |||
margin: 0 auto; | |||
border-radius: 10px; | |||
} | |||
.answertotalTopic{ | |||
width: 175px; | |||
height: 175px; | |||
box-shadow: #e8e7e7 0px 0px 4px 2px ; | |||
border-radius: 50%; | |||
position: relative; | |||
top: 35%; | |||
left: 50%; | |||
transform: translate(-50%,-50%); | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
} | |||
.answertotaScore{ | |||
width: 145px; | |||
height: 145px; | |||
border: 3px solid #f5e285; | |||
border-radius: 50%; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
flex-direction:column; | |||
} | |||
.answertotaScore span{ | |||
color: #b0afaf; | |||
font-size: 15px; | |||
} | |||
.answertotaScore p{ | |||
color: #404040; | |||
font-size: 35px; | |||
font-weight: 800; | |||
} | |||
.answertotalLookButton{ | |||
width: 80%; | |||
float: none; | |||
position: absolute; | |||
bottom: 0%; | |||
left: 50%; | |||
transform: translate(-50%,-50%); | |||
} | |||
.answertotalLookButton p{ | |||
background-color: #e1bb53; | |||
margin: 0 auto; | |||
color: #FFFFFF; | |||
border-radius: 25px; | |||
font-size: 18px; | |||
color: #FFFFFF; | |||
width: 80%; | |||
height: 36px; | |||
text-align: center; | |||
line-height: 36px; | |||
margin-bottom: 10px; | |||
} | |||
.answertotalLookButton p:last-child{ | |||
border: 1px solid #e1bb53; | |||
background-color: #FFFFFF; | |||
color: #e1bb53; | |||
} |
@@ -0,0 +1,22 @@ | |||
<div class="box"> | |||
<div class="answertotalContent"> | |||
<div class="progress"> | |||
<!-- <div class="shade"></div> | |||
<p></p> | |||
<b>6</b> --> | |||
</div> | |||
<div class="answertotalTopic"> | |||
<div class="answertotaScore"> | |||
<span>评价总分</span> | |||
<p id="cpageTitle"></p> | |||
</div> | |||
</div> | |||
<div class="answertotalLookButton"> | |||
<p class="confirm" >确认分数,并保存</p> | |||
<p class="backs"> | |||
返回重测 | |||
</p> | |||
</div> | |||
</div> | |||
</div> |
@@ -0,0 +1,62 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-12-26 16:33 | |||
* 描 述:党员评价 | |||
*/ | |||
(function() { | |||
var page = { | |||
isScroll: false, | |||
init: function($page,param) { | |||
//console.log(param); | |||
$page.find('#cpageTitle').text(param.sumScore); | |||
//param.data | |||
$page.find('.confirm').on('tap', function() { | |||
//提交 | |||
learun.layer.confirm('确定保存吗?', function( | |||
_index) { | |||
if (_index === '1') { | |||
learun.layer.loading(true,'正在保存'); | |||
learun.httppost(config.webapi +'learun/adms/evaluatingindicator/savelist', | |||
{strEntity:JSON.stringify(param.data)}, (data) => { | |||
learun.layer.loading(false); | |||
if (data) { | |||
// learun.nav.closeCurrent(); | |||
// var prepage = learun.nav.getpage( | |||
// 'partyevaluatzp' | |||
// ); | |||
// prepage.grid.reload(); | |||
learun.nav.go({ | |||
path: 'SucceedXZ', | |||
title: '党员评价', | |||
isBack: true, | |||
isHead: true, | |||
}); | |||
} | |||
}); | |||
} | |||
}, 'Learun智慧校园提示', ['取消', '确定']); | |||
}); | |||
$page.find('.backs').on('tap', function() { | |||
// learun.nav.closeCurrent(); | |||
// location.reload(); | |||
learun.nav.go({ | |||
path: 'PartyevaluatQuestionsXZ', | |||
title: '党员评价', | |||
isBack: true, | |||
isHead: true, | |||
}); | |||
}); | |||
}, | |||
beforedestroy: function(pageinfo) { | |||
return true; // false 就不关闭 | |||
}, | |||
// destroy: function(pageinfo) {}, | |||
// reload: function($page, pageinfo) {} | |||
}; | |||
return page; | |||
})(); |
@@ -8,7 +8,7 @@ | |||
<div class="answertotalTopic"> | |||
<div class="answertotaScore"> | |||
<span>评价总分</span> | |||
<p id="cpageTitle">33.9</p> | |||
<p id="cpageTitle"></p> | |||
</div> | |||
</div> | |||
@@ -40,7 +40,7 @@ | |||
}); | |||
$page.find('.backs').on('tap', function() { | |||
// learun.nav.closeCurrent(); | |||
//location.reload(); | |||
// location.reload(); | |||
learun.nav.go({ | |||
path: 'PartyevaluatQuestionsZP', | |||
title: '党员评价', | |||
@@ -52,9 +52,9 @@ | |||
}); | |||
}, | |||
// beforedestroy: function(pageinfo) { | |||
// return true; // false 就不关闭 | |||
// }, | |||
beforedestroy: function(pageinfo) { | |||
return true; // false 就不关闭 | |||
}, | |||
// destroy: function(pageinfo) {}, | |||
// reload: function($page, pageinfo) {} | |||
}; | |||
@@ -0,0 +1,5 @@ | |||
<div class="box"> | |||
<div class="button"> | |||
开始评价 | |||
</div> | |||
</div> |
@@ -0,0 +1,29 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-12-26 16:33 | |||
* 描 述:党员评价 | |||
*/ | |||
(function() { | |||
var ScoreYear=''; | |||
var ScoreQuarter=''; | |||
var page = { | |||
isScroll: false, | |||
init: function($page, param) { | |||
Id = param.Id; | |||
$page.find('.button').on('tap', function() { | |||
learun.nav.go({ | |||
path: 'PartyevaluateTopicXZ',//'partyevaluate/partyevaluatetopic', | |||
title: '党员评价', | |||
isBack: true, | |||
isHead: true, | |||
param: { Id: Id} | |||
}); | |||
// 关闭当前页 | |||
//learun.nav.closeCurrent(); | |||
}); | |||
} | |||
}; | |||
return page; | |||
})(); |
@@ -0,0 +1,272 @@ | |||
* { | |||
padding: 0; | |||
margin: 0; | |||
} | |||
ul, | |||
ol, | |||
li { | |||
list-style: none; | |||
padding: 0; | |||
margin: 0; | |||
} | |||
html, | |||
body { | |||
height: 100%; | |||
width: 100%; | |||
} | |||
.box { | |||
height: 100%; | |||
width: 100%; | |||
background: url(images/content.png); | |||
background-repeat: no-repeat; | |||
background-size: 100% 100%; | |||
/* position: relative; */ | |||
} | |||
.contents { | |||
position: relative; | |||
top: 150px; | |||
width: 93%; | |||
margin: 0 auto; | |||
/* background: blue; */ | |||
} | |||
.progress { | |||
height: 32.5px; | |||
position: relative; | |||
} | |||
.progress p { | |||
height: 7.5px; | |||
width: 100%; | |||
background-color: #EFEFEF; | |||
position: absolute; | |||
top: 50%; | |||
left: 50%; | |||
transform: translate(-50%, -50%); | |||
opacity: .3; | |||
} | |||
.progress .shade { | |||
height: 12.5px; | |||
width: 10%; | |||
position: absolute; | |||
top: 50%; | |||
left: 0%; | |||
transform: translate(0%, -50%); | |||
background: url(../../images/jd.png); | |||
background-size: 100% 100%; | |||
border-radius: 50px; | |||
} | |||
.progress b { | |||
position: absolute; | |||
width: 47.5px; | |||
height: 30px; | |||
border-top-left-radius: 50px; | |||
border-bottom-left-radius: 50px; | |||
background-color: #f4df81; | |||
background-image: linear-gradient(#f4df81, #d19f31); | |||
top: 0; | |||
right: -3.7%; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
color: #FFFFFF; | |||
font-size: 18px; | |||
} | |||
.topic { | |||
position: relative; | |||
background-color: #FFFFFF; | |||
border-radius: 25px; | |||
margin-top: 35px; | |||
} | |||
.title>div { | |||
height: 37.5px; | |||
width: 75%; | |||
margin: 0 auto; | |||
background: #FFFFFF; | |||
border-radius: 20px; | |||
line-height: 37.5px; | |||
font-size: 12px; | |||
color: #404040; | |||
text-align: center; | |||
font-weight: 800; | |||
position: absolute; | |||
top: -4%; | |||
left: 52%; | |||
transform: translate(-50%, 0%); | |||
box-shadow: #d6d4d4 0px 6px 20px 5px; //边框阴影 | |||
/* padding:0 50px; */ | |||
} | |||
.title>div span { | |||
color: #a6a6a6; | |||
} | |||
.title>p { | |||
background-color: #FFFFFF; | |||
height: 57.5px; | |||
width: 57.5px; | |||
border-radius: 50%; | |||
position: absolute; | |||
top: -7%; | |||
left: 35px; | |||
z-index: 90; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
box-shadow: #d6d4d4 0px 6px 20px 5px; //边框阴影 | |||
} | |||
.title>p span { | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
height: 40px; | |||
width: 40px; | |||
border: 6px solid #e17465; | |||
border-radius: 50%; | |||
font-size: 20px; | |||
} | |||
.topicCon { | |||
padding-top: 45px; | |||
margin-bottom: 10px; | |||
/* border-bottom: 1px solid #efefef; */ | |||
padding: 0 25px; | |||
padding-top: 50px; | |||
} | |||
.topicCon h1 { | |||
font-size: 18px; | |||
color: #404040; | |||
} | |||
.topicCon p { | |||
font-size: 14px; | |||
color: #404040; | |||
line-height: 2; | |||
} | |||
.topicCon ul { | |||
background: #efefef; | |||
border-radius: 8px; | |||
padding: 15px; | |||
margin-top: 20px; | |||
} | |||
.topicCon ul li b { | |||
font-size: 12px; | |||
color: #404040; | |||
font-weight: 800; | |||
margin-right: 10px; | |||
} | |||
.topicCon ul li span { | |||
font-size: 14px; | |||
color: #404040; | |||
} | |||
.topicCon ul p { | |||
font-size: 12px; | |||
color: #404040; | |||
} | |||
.footer { | |||
border-top: 2px solid #efefef; | |||
padding: 25px; | |||
} | |||
.footer ol { | |||
border: 1px solid #c8c8c8; | |||
border-radius: 8px; | |||
display: flex; | |||
justify-content: flex-start; | |||
align-items: center; | |||
height: 40px; | |||
color: #404040; | |||
font-size: 12px; | |||
margin-bottom: 20px; | |||
} | |||
.footer ol li { | |||
height: 25px; | |||
width: 100%; | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
} | |||
.footer ol li span { | |||
color: #be1211; | |||
} | |||
.footer ol li:first-child { | |||
width: 30%; | |||
border-right: 1px solid #c8c8c8; | |||
} | |||
.footer ol li input { | |||
width: 100%; | |||
height: 20px; | |||
border: none; | |||
font-size: 16px; | |||
text-align: center; | |||
outline: none; | |||
padding: 0; | |||
margin: 0; | |||
} | |||
.buttons { | |||
display: flex; | |||
justify-content: space-around; | |||
align-items: center; | |||
height: 40px; | |||
margin-top: 17.5px; | |||
} | |||
.buttons p { | |||
border: 2px solid #e1bb53; | |||
border-radius: 25px; | |||
font-size: 18px; | |||
color: #FFFFFF; | |||
width: 40%; | |||
height: 36px; | |||
display: flex; | |||
justify-content: space-around; | |||
align-items: center; | |||
color: #e1bb53; | |||
flex: 1; | |||
} | |||
.buttons p:hover { | |||
background-color: #e1bb53; | |||
color: #FFFFFF; | |||
} | |||
.lookButton p { | |||
background-color: #e1bb53; | |||
margin: 0 auto; | |||
color: #FFFFFF; | |||
border-radius: 25px; | |||
font-size: 18px; | |||
color: #FFFFFF; | |||
width: 80%; | |||
height: 36px; | |||
text-align: center; | |||
line-height: 36px; | |||
display: none; | |||
} | |||
.homebuttom { | |||
background-color: #e1bb53; | |||
color: #FFFFFF !important; | |||
} |
@@ -0,0 +1,37 @@ | |||
<div class="box"> | |||
<div class="contents"> | |||
<div class="progress"> | |||
<div class="shade"></div> | |||
<p></p> | |||
<b></b> | |||
</div> | |||
<div class="topic"> | |||
<div class="title"> | |||
<!-- <p><span></span></p> | |||
<div>一. 工作业绩 <span> ( 20分 ) </span></div> --> | |||
</div> | |||
<div class="topicCon"> | |||
<!-- <h1>优质完成任务。</h1> | |||
<p>潜心教育培训,落实立德树人根本任务,按时保质保量完成本职各项工作任务。</p> | |||
<ul> | |||
<li><b>评分标准</b><span>(保留小数点最后一位)</span></li> | |||
<p>若有参加封建迷信活动,工作中表现出信心不足、精神萎靡不振的现象,此项不得分。精神萎靡不振的现象精神萎靡不振的现象</p> | |||
</ul> --> | |||
</div> | |||
<div class="footer"> | |||
<ol> | |||
<!-- <li>分值:<span class="scorenum">7</span>分</li> | |||
<li><input type="text" class="inputvalue" id="inputvalue"></li> --> | |||
</ol> | |||
<div class="buttons"> | |||
<p class="last">上一题</p> | |||
<div style="width: 10px;"></div> | |||
<p class="next">下一题</p> | |||
</div> | |||
<div class="lookButton"> | |||
<p>查看总分</p> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> |
@@ -0,0 +1,256 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-12-26 16:33 | |||
* 描 述:党员评价 | |||
*/ | |||
(function() { | |||
var data = []; | |||
var Id=''; | |||
// 总数量 | |||
var total = 0; | |||
// var data = [ | |||
// { | |||
// Assessment:'一,通知公告', | |||
// scorePre:'80', | |||
// ConductRequirements:'优质完成任务', | |||
// CRRemark:'潜心教育培训,落实立德树人根本任务,按时保质保量完成本职各项工作任务', | |||
// gradetitle:'评分标准', | |||
// gradenum:'保留小数点最后一位', | |||
// ScoringCriteria:'若有参加封建迷信活动,工作中表现出信心不足、精神萎靡不振的现象,此项不得分。精神萎靡不振的现象精神萎靡不振的现象', | |||
// MaxScore:'20' | |||
// }, | |||
// { | |||
// title:'二,专职22专访', | |||
// scorePre:'100', | |||
// subhead:'访问222人员', | |||
// subheadcon:'悉心照料,耐心疏导', | |||
// gradetitle:'评分2222标准', | |||
// gradenum:'保留整数', | |||
// gradecon:'此项不得分。精神萎靡不振的现象精神萎靡不振的现象', | |||
// scorenum:'10' | |||
// }, | |||
// { | |||
// title:'三,红头33文件', | |||
// scorePre:'30', | |||
// subhead:'优质任333务', | |||
// subheadcon:'潜心教育培训,落实立德树人根本任务,按时保质保量完成本职各项工作任务', | |||
// gradetitle:'结果判定', | |||
// gradenum:'无需结果', | |||
// gradecon:'精神萎靡不振的现象精神萎靡不振的现象', | |||
// scorenum:'40' | |||
// } | |||
// ]; | |||
var page = { | |||
isScroll: false, | |||
init: function($page, param) { | |||
Id = param.Id; | |||
var valList = [] | |||
learun.httpgetnosy(config.webapi + 'learun/adms/evaluatingindicator/getevaluationdataforxz', {Id:Id,Assessed:learun.storage.get('logininfo').account}, (res) => { | |||
$page.find('.lr-badge').text('0'); | |||
if (res) { | |||
res.forEach((item)=>{ | |||
valList.push(item.Score) | |||
}) | |||
console.log(res); | |||
data=res; | |||
loadData(data[0],1); | |||
// $page.find('.lr-badge').text(data.records); | |||
// callback(data.rows, parseInt(data.records)); | |||
} | |||
else { | |||
callback([], 0); | |||
} | |||
}); | |||
// 当前题目 | |||
var num = 1 | |||
total = data.length; | |||
$(".progress b").text(total); | |||
// 单个宽度 | |||
var mom = 100 / total | |||
if (num <= 1) { | |||
$(".last").hide() | |||
$(".next").addClass("homebuttom") | |||
} else { | |||
$(".buttons").hide() | |||
$(".lookButton p").show() | |||
} | |||
$(".title p span").text(num) | |||
// 最大分数值 | |||
var scorenum = data[num-1].MaxScore | |||
//console.log("scorenum",scorenum) | |||
// 题目数量 | |||
$page.find('.next').on('tap', function() { | |||
$(".next").removeClass("homebuttom") | |||
$(".next").css({ | |||
'background': '#e1bb53', | |||
'color': '#FFFFFF' | |||
}) | |||
$(".last").css({ | |||
'background': '#FFFFFF', | |||
'color': '#e1bb53' | |||
}) | |||
var val = $(".inputvalue").val() | |||
//console.log("val",val) | |||
//console.log("scorenum22222",scorenum) | |||
//console.log("scorenum999",(val - 0)<= (scorenum - 0)) | |||
if (val != "") { | |||
if (Number(val)<= Number(scorenum)) { | |||
if (num <= total) { | |||
// 点击下一题 要把当前题目的分数给了对应下标的数组 | |||
valList[num-1] = val; | |||
data[num-1].Score=val; | |||
// 进入下一题 题目下标++ | |||
num++ | |||
loadData(data[num-1],num) | |||
// 清空输入框 | |||
$(".inputvalue").val(valList[num-1]) | |||
var ws = num * mom | |||
$(".shade").width(ws + '%') | |||
$(".title p span").text(num) | |||
if (num > 1) { | |||
$(".last").show() | |||
} | |||
if(num==total){ | |||
$(".buttons").hide() | |||
$(".lookButton p").show() | |||
} | |||
} | |||
} else { | |||
learun.layer.toast("分数不能大于最大值"); | |||
} | |||
} else { | |||
learun.layer.toast("分数不能为空"); | |||
} | |||
}); | |||
$page.find('.last').on('tap', function() { | |||
$(".last").css({ | |||
'background': '#e1bb53', | |||
'color': '#FFFFFF' | |||
}) | |||
$(".next").css({ | |||
'background': '#FFFFFF', | |||
'color': '#e1bb53' | |||
}) | |||
if (num => 1) { | |||
$(".last").show() | |||
if (num <= total - 1) { | |||
--num | |||
var ws = num * mom | |||
$(".shade").width(ws + '%') | |||
$(".title p span").text(num) | |||
if (num <= 1) { | |||
$(".last").hide() | |||
$(".next").addClass("homebuttom") | |||
$(".next").css({ | |||
'background': '#e1bb53', | |||
'color': '#FFFFFF' | |||
}) | |||
} | |||
loadData(data[num-1],num) | |||
// 点击上一题 从分数数组中取到上一题的分数 并且赋给输入框 num为当前题目序号 对应下标应-1 | |||
//console.log(num,'num') | |||
$(".inputvalue").val(valList[num-1]) | |||
} | |||
} else { | |||
num = 1 | |||
$(".last").hide() | |||
} | |||
}); | |||
// 查看总分 | |||
$page.find('.lookButton').on('tap', function() { | |||
var val = $(".inputvalue").val() | |||
if(val !=''){ | |||
if(Number(val)<= Number(scorenum)){ | |||
valList[valList.length-1] = val; | |||
data[valList.length-1].Score=val; | |||
// 计算数组和 | |||
function sum(arr) { | |||
var s = 0; | |||
for (var i=arr.length-1; i>=0; i--) { | |||
s += Number(arr[i]); | |||
} | |||
return s; | |||
} | |||
learun.nav.closeCurrent(); | |||
learun.nav.go({ | |||
path: 'AnswerTotalXZ', | |||
title: '党员评价', | |||
isBack: true, | |||
isHead: true, | |||
param: {sumScore:sum(valList),data:data}, | |||
type: 'right' | |||
}); | |||
}else{ | |||
learun.layer.toast("分数不能大于最大值"); | |||
} | |||
}else{ | |||
learun.layer.toast("分数不能为空"); | |||
} | |||
// learun.nav.getpage('partyevaluate'); | |||
// learun.nav.getpage(); | |||
// learun.nav.close('partyevaluate/partyevaluatetopic'); | |||
// learun.nav.getpage('partyevaluate/partyevaluatetopic); | |||
}); | |||
}, | |||
// beforedestroy: function(pageinfo) { | |||
// return true; // false 就不关闭 | |||
// }, | |||
// destroy: function(pageinfo) {}, | |||
// reload: function($page, pageinfo) {} | |||
}; | |||
function loadData(data,num){ | |||
console.log("数据",data) | |||
// valList | |||
var titleCon = '' | |||
titleCon+='<p>'+'<span>'+num+'</span>'+'</p>'+'<div>'+data.Assessment+'<span>'+'('+data.scorePre+'分)'+'</span>'+'</div>' | |||
$(".title").html(titleCon) | |||
var topicCon ="" | |||
topicCon +='<h1>'+data.ConductRequirements+'</h1>'+ | |||
'<p>'+data.CRRemark+'</p>'+ | |||
'<ul>'+ | |||
'<li>'+ | |||
'<b>'+data.gradetitle+'</b>'+ | |||
'<span>'+data.gradenum+'</span>'+ | |||
'</li>'+ | |||
'<p>'+data.ScoringCriteria+'</p>' | |||
'</ul>' | |||
$(".topicCon").html(topicCon); | |||
console.log('data.Score',data.Score); | |||
var footerCon = ''; | |||
footerCon+='<li>'+'分值:'+ | |||
'<span calss="scorenum">'+ data.MaxScore +'</span>'+ | |||
'</li>'+ | |||
'<li>'+'<input type="text" class="inputvalue" id="inputvalue" value="'+ data.Score +'">'+'</li>' | |||
$(".footer ol").html(footerCon) | |||
} | |||
return page; | |||
})(); |
@@ -9,7 +9,7 @@ | |||
var ScoreYear=''; | |||
var ScoreQuarter=''; | |||
// 总数量 | |||
var total = 0; | |||
var total = 0; | |||
// var data = [ | |||
// { | |||
@@ -50,12 +50,17 @@ | |||
init: function($page, param) { | |||
ScoreYear = param.ScoreYear; | |||
ScoreQuarter = param.ScoreQuarter; | |||
var valList = [] | |||
learun.httpgetnosy(config.webapi + 'learun/adms/evaluatingindicator/getevaluationlistforzp', {ScoreYear:ScoreYear,ScoreQuarter:ScoreQuarter,BeAssessed:learun.storage.get('logininfo').account}, (res) => { | |||
$page.find('.lr-badge').text('0'); | |||
if (res) { | |||
//console.log('res',res); | |||
res.forEach((item)=>{ | |||
valList.push(item.Score) | |||
}) | |||
data=res; | |||
loadData(data[0],1); | |||
// $page.find('.lr-badge').text(data.records); | |||
@@ -64,8 +69,8 @@ | |||
else { | |||
callback([], 0); | |||
} | |||
}); | |||
//return; | |||
}); | |||
// 当前题目 | |||
var num = 1 | |||
@@ -85,7 +90,7 @@ | |||
var scorenum = data[num-1].MaxScore | |||
console.log("scorenum",scorenum) | |||
// 题目数量 | |||
var valList = new Array(total).fill('') | |||
$page.find('.next').on('tap', function() { | |||
@@ -188,7 +193,7 @@ | |||
} | |||
return s; | |||
} | |||
// learun.nav.closeCurrent(); | |||
learun.nav.closeCurrent(); | |||
learun.nav.go({ | |||
path: 'AnswerTotalZP', | |||
title: '党员评价', | |||
@@ -222,6 +227,7 @@ | |||
function loadData(data,num){ | |||
console.log("数据",data) | |||
// valList | |||
var titleCon = '' | |||
titleCon+='<p>'+'<span>'+num+'</span>'+'</p>'+'<div>'+data.Assessment+'<span>'+'('+data.scorePre+'分)'+'</span>'+'</div>' | |||
@@ -0,0 +1,84 @@ | |||
.box { | |||
height: 100%; | |||
width: 100%; | |||
background: url(images/content.png); | |||
background-repeat: no-repeat; | |||
background-size: 100% 100%; | |||
/* position: relative; */ | |||
} | |||
.succeedcontent { | |||
position: relative; | |||
background-color: #FFFFFF; | |||
height: 70%; | |||
top: 20%; | |||
width: 93%; | |||
margin: 0 auto; | |||
border-radius: 10px; | |||
} | |||
.succeedtopic { | |||
height: 250px; | |||
} | |||
.succeedscore { | |||
width: 175px; | |||
height: 175px; | |||
background: url(images/succeed.png); | |||
background-repeat: no-repeat; | |||
background-size: 100% 100%; | |||
position: relative; | |||
top: 58%; | |||
left: 50%; | |||
transform: translate(-50%, -50%); | |||
} | |||
.texts { | |||
height: 30px; | |||
/* background-color: red; */ | |||
text-align: center; | |||
} | |||
.succeedlookButton { | |||
width: 80%; | |||
float: none; | |||
position: absolute; | |||
bottom: 0%; | |||
left: 50%; | |||
transform: translate(-50%, -50%); | |||
} | |||
.succeedlookButton p { | |||
background-color: #e1bb53; | |||
margin: 0 auto; | |||
color: #FFFFFF; | |||
border-radius: 25px; | |||
font-size: 18px; | |||
color: #FFFFFF; | |||
width: 80%; | |||
height: 36px; | |||
text-align: center; | |||
line-height: 36px; | |||
margin-bottom: 10px; | |||
} | |||
.backList{ | |||
width: 80%; | |||
float: none; | |||
position: absolute; | |||
bottom: 15%; | |||
left: 50%; | |||
transform: translate(-50%,-50%); | |||
background-color: #e1bb53; | |||
margin: 0 auto; | |||
color: #FFFFFF; | |||
border-radius: 25px; | |||
font-size: 18px; | |||
color: #FFFFFF; | |||
width: 80%; | |||
height: 36px; | |||
text-align: center; | |||
line-height: 36px; | |||
margin-bottom: 10px; | |||
} | |||
@@ -0,0 +1,14 @@ | |||
<div class="box"> | |||
<div class="succeedcontent"> | |||
<div class="succeedtopic"> | |||
<div class="succeedscore"> | |||
</div> | |||
</div> | |||
<p class="texts">提交成功</p> | |||
<p class="backList">返回列表</p> | |||
<!-- <div class="succeedlookButton"> | |||
<p>提交</p> | |||
</div> --> | |||
</div> | |||
</div> |
@@ -0,0 +1,32 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-12-26 16:33 | |||
* 描 述:党员评价 | |||
*/ | |||
(function() { | |||
var page = { | |||
isScroll: false, | |||
init: function($page,param) { | |||
$page.find('.backList').on('tap', function() { | |||
// learun.nav.closeCurrent(); | |||
// location.reload(); | |||
learun.nav.go({ | |||
path: 'partyevaluatxz', | |||
title: '党员评价', | |||
isBack: false, | |||
isHead: true, | |||
}); | |||
}); | |||
}, | |||
beforedestroy: function(pageinfo) { | |||
return true; // false 就不关闭 | |||
}, | |||
// destroy: function(pageinfo) {}, | |||
// reload: function($page, pageinfo) {} | |||
}; | |||
return page; | |||
})(); |
@@ -61,3 +61,24 @@ | |||
line-height: 36px; | |||
margin-bottom: 10px; | |||
} | |||
.backList{ | |||
width: 80%; | |||
float: none; | |||
position: absolute; | |||
bottom: 15%; | |||
left: 50%; | |||
transform: translate(-50%,-50%); | |||
background-color: #e1bb53; | |||
margin: 0 auto; | |||
color: #FFFFFF; | |||
border-radius: 25px; | |||
font-size: 18px; | |||
color: #FFFFFF; | |||
width: 80%; | |||
height: 36px; | |||
text-align: center; | |||
line-height: 36px; | |||
margin-bottom: 10px; | |||
} | |||
@@ -6,6 +6,7 @@ | |||
</div> | |||
<p class="texts">提交成功</p> | |||
<p class="backList">返回列表</p> | |||
<!-- <div class="succeedlookButton"> | |||
<p>提交</p> | |||
</div> --> | |||
@@ -0,0 +1,32 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-12-26 16:33 | |||
* 描 述:党员评价 | |||
*/ | |||
(function() { | |||
var page = { | |||
isScroll: false, | |||
init: function($page,param) { | |||
$page.find('.backList').on('tap', function() { | |||
// learun.nav.closeCurrent(); | |||
// location.reload(); | |||
learun.nav.go({ | |||
path: 'partyevaluatzp', | |||
title: '党员评价', | |||
isBack: false, | |||
isHead: true, | |||
}); | |||
}); | |||
}, | |||
beforedestroy: function(pageinfo) { | |||
return true; // false 就不关闭 | |||
}, | |||
// destroy: function(pageinfo) {}, | |||
// reload: function($page, pageinfo) {} | |||
}; | |||
return page; | |||
})(); |
@@ -74,6 +74,7 @@ | |||
learun.httpget(config.webapi + 'learun/adms/evaluatingindicator/GetEvaluationListForXZ', _postParam, (data) => { | |||
$page.find('.lr-badge').text('0'); | |||
if (data) { | |||
//console.log('data',data); | |||
$page.find('.lr-badge').text(data.records); | |||
callback(data.rows, parseInt(data.records)); | |||
} | |||
@@ -106,7 +107,7 @@ | |||
_$item.append($('<p class="lr-ellipsis"><span>党员编号:</span></p>').dataFormatter({ value: _item.empno })); | |||
_$item.append($('<p class="lr-ellipsis"><span>年度:</span></p>').dataFormatter({ value: _item.ScoreYear })); | |||
_$item.append($('<p class="lr-ellipsis"><span>季度:</span></p>').dataFormatter({ value: _item.ScoreQuarter })); | |||
_$item.append($('<p class="lr-ellipsis"><span>分值:</span></p>').dataFormatter({ value: _item.Scorexz })); | |||
_$item.append($('<p class="lr-ellipsis"><span>分值:</span></p>').dataFormatter({ value: _item.Score })); | |||
_$item.append($('<p class="lr-ellipsis"><span>状态:</span></p>').dataFormatter({ value: statusname })); | |||
return ''; | |||
}, | |||
@@ -117,7 +118,7 @@ | |||
var status=item.Status; | |||
if(status == '-1') | |||
{ | |||
learun.layer.toast("当前项目未打分,请先评价!"); | |||
learun.layer.toast("当前项目未打分,请先打分!"); | |||
return; | |||
} | |||
else if(status != '0') | |||
@@ -128,7 +129,7 @@ | |||
learun.layer.confirm('确定要提交该项数据吗?', function (_index) { | |||
if (_index === '1') { | |||
learun.layer.loading(true, '正在提交...'); | |||
learun.httppost(config.webapi + 'learun/adms/evaluatingindicator/submitevaluationforzp', {Assessed:item.BeAssessed,Status:1}, (data) => { | |||
learun.httppost(config.webapi + 'learun/adms/evaluatingindicator/submitevaluationforxz', {Id:item.Id,Status:1}, (data) => { | |||
if (data) {// 提交数据成功 | |||
page.grid.reload(); | |||
} | |||
@@ -138,11 +139,18 @@ | |||
}, '智慧校园提示', ['取消', '确定']); | |||
}, | |||
btnPJClick: function (item, $item, $page) {// 左滑按钮点击事件 | |||
learun.layer.confirm('确定要打分吗?', function (_index) { | |||
if (_index === '1') { | |||
} | |||
}, '智慧校园提示', ['取消', '确定']); | |||
var status=item.Status; | |||
if(status == '1') | |||
{ | |||
learun.layer.toast("当前项目已提交!"); | |||
return; | |||
} | |||
learun.nav.closeCurrent(); | |||
learun.nav.go({ | |||
path: 'PartyevaluatQuestionsXZ', | |||
title: '党员评价', | |||
type: 'right', | |||
param: { Id: item.Id }}); | |||
}, | |||
rowBtns: [ | |||
'<a class="lr-btn-blue">提交</a>', | |||
@@ -136,7 +136,18 @@ | |||
}, '智慧校园提示', ['取消', '确定']); | |||
}, | |||
btnPJClick: function (item, $item, $page) {// 左滑按钮点击事件 | |||
learun.nav.go({ path: 'PartyevaluatQuestionsZP', title: '党员评价', type: 'right', param: { ScoreYear: item.ScoreYear ,ScoreQuarter:item.ScoreQuarter} }); | |||
var status=item.Status; | |||
if(status == '1') | |||
{ | |||
learun.layer.toast("当前项目已提交!"); | |||
return; | |||
} | |||
learun.nav.closeCurrent(); | |||
learun.nav.go({ | |||
path: 'PartyevaluatQuestionsZP', | |||
title: '党员评价', | |||
type: 'right', | |||
param: { ScoreYear: item.ScoreYear ,ScoreQuarter:item.ScoreQuarter} }); | |||
// learun.layer.confirm('确定要自评打分吗?', function (_index) { | |||
// if (_index === '1') { | |||
// learun.nav.go({ path: 'partyevaluate', title: '党员自评', type: 'right' }); | |||
@@ -134,6 +134,20 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||
} | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 提交/去审核 | |||
/// </summary> | |||
/// <param name="MainId"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult UpdateStatusForZP(string MainId, string Status) | |||
{ | |||
dT_EvaluationDataIBLL.UpdateStatusForZPByMId(MainId, Status); | |||
return Success("操作成功!"); | |||
} | |||
#endregion | |||
} | |||
@@ -41,8 +41,10 @@ | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
@*<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a>*@ | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a>*@ | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 提交</a> | |||
<a id="lr_nocheck" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 去审</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
@@ -7,6 +7,7 @@ | |||
var refreshGirdData; | |||
var MainId = request('MainId'); | |||
var ScoreType = request('ScoreType'); | |||
var Assessed = ''; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
@@ -61,13 +62,37 @@ var bootstrap = function ($, learun) { | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/DT_EvaluationData/DeleteForm', { keyValue: keyValue}, function () { | |||
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/DT_EvaluationData/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//提交 | |||
$('#lr_submit').on('click', function () { | |||
learun.layerConfirm('是否确认提交!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/PersonnelManagement/DT_EvaluationData/UpdateStatusForZP', { MainId: MainId, Status: '1' }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
}); | |||
//去审 | |||
$('#lr_nocheck').on('click', function () { | |||
learun.layerConfirm('是否确认去审!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/PersonnelManagement/DT_EvaluationData/UpdateStatusForZP', { MainId: MainId, Status: '0' }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
@@ -105,31 +130,44 @@ var bootstrap = function ($, learun) { | |||
// } | |||
// }); | |||
// }}, | |||
{ label: "打分人", name: "Assessed", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op,$cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'PartyMember', | |||
key: value, | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['name']); | |||
} | |||
}); | |||
}}, | |||
{ label: "分值", name: "Score", width: 100, align: "left"}, | |||
//{ label: "打分人", name: "Assessed", width: 100, align: "left", | |||
// formatterAsync: function (callback, value, row, op,$cell) { | |||
// learun.clientdata.getAsync('custmerData', { | |||
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'PartyMember', | |||
// key: value, | |||
// keyId: 'id', | |||
// callback: function (_data) { | |||
// callback(_data['name']); | |||
// } | |||
// }); | |||
// }}, | |||
{ label: "总分", name: "MaxScore", width: 100, align: "left" }, | |||
{ label: "分值", name: "Score", width: 100, align: "left" }, | |||
{ | |||
label: "类型", name: "ScoreType", width: 100, align: "left", | |||
formatter: function(value, row) { | |||
if (value == '1') { | |||
return '党员自评'; | |||
} | |||
else if (value == '2') { | |||
return '党小组长评'; | |||
label: "状态", name: "Status", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == '-1') { | |||
return "<span class=\"label label-default\">未打分</span>"; | |||
} else if (cellvalue == '0') { | |||
return "<span class=\"label label-primary\">草稿</span>"; | |||
} else if (cellvalue == '1') { | |||
return "<span class=\"label label-success\">已提交</span>"; | |||
} | |||
} | |||
}, | |||
//{ | |||
// label: "类型", name: "ScoreType", width: 100, align: "left", | |||
// formatter: function(value, row) { | |||
// if (value == '1') { | |||
// return '党员自评'; | |||
// } | |||
// else if (value == '2') { | |||
// return '党小组长评'; | |||
// } | |||
// } | |||
//}, | |||
], | |||
mainId:'Id', | |||
mainId: 'Id', | |||
isPage: true, | |||
sidx: 'ScoreType ASC,Assessed ASC,EOrder Asc', | |||
}); | |||
@@ -139,7 +177,7 @@ var bootstrap = function ($, learun) { | |||
param = param || {}; | |||
param.MainId = MainId; | |||
param.ScoreType = ScoreType; | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
@@ -176,26 +176,28 @@ | |||
success: function (res) { | |||
if (res.code == 200) { | |||
if (source == "noLogin") { | |||
window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/SSOSystem/Index"; | |||
window.location.href = "/SSOSystem/Index"; | |||
// window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/SSOSystem/Index"; | |||
} else if (source == "DragNoLogin") { | |||
window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/SSOSystem/DragModelOne"; | |||
window.location.href = "/SSOSystem/DragModelOne"; | |||
// window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/SSOSystem/DragModelOne"; | |||
} else { | |||
if (res.data.pwd == true) { | |||
if (res.data.pwdtip == true) { | |||
window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwdpwdtip=true"; | |||
//window.location.href = "/Home/Index?pwdpwdtip=true"; | |||
//window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwdpwdtip=true"; | |||
window.location.href = "/Home/Index?pwdpwdtip=true"; | |||
} else { | |||
window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwd=true"; | |||
//window.location.href = "/Home/Index?pwd=true"; | |||
//window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwd=true"; | |||
window.location.href = "/Home/Index?pwd=true"; | |||
} | |||
} | |||
else { | |||
if (res.data.pwdtip == true) { | |||
window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwdtip=true"; | |||
//window.location.href = "/Home/Index?pwdtip=true"; | |||
//window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwdtip=true"; | |||
window.location.href = "/Home/Index?pwdtip=true"; | |||
} else { | |||
window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index"; | |||
//window.location.href = "/Home/Index"; | |||
//window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index"; | |||
window.location.href = "/Home/Index"; | |||
} | |||
//window.location.href = "/Home/Index"; | |||
} | |||
@@ -167,6 +167,7 @@ | |||
<Content Include="packages.config" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile1.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile2.pubxml" /> | |||
<None Include="Web.Debug.config"> | |||
<DependentUpon>Web.config</DependentUpon> | |||
</None> | |||
@@ -33,7 +33,7 @@ namespace Learun.Application.WebApi.Modules | |||
//党小组长评分 获取评分题目 | |||
Get["/getevaluationdataforxz"] = GetEvaluationDataForXZ; | |||
//党小组长评分 提交/审核 | |||
Get["/submitevaluationforxz"] = SubmitEvaluationForXZ; | |||
Post["/submitevaluationforxz"] = SubmitEvaluationForXZ; | |||
//党员自评/小组长评分 提交 保存 | |||
Post["/savelist"] = SaveList; | |||
@@ -173,9 +173,6 @@ namespace Learun.Application.WebApi.Modules | |||
page = parameter.pagination.page, | |||
records = parameter.pagination.records | |||
}; | |||
////党员ID | |||
//string Assessed = this.GetReqData(); | |||
//var list = dT_EvaluationDataMainIBLL.GetEvaluationListForXZ(Assessed); | |||
return Success(jsonData); | |||
} | |||
@@ -0,0 +1,18 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<!-- | |||
此文件由 Web 项目的发布/打包过程使用。可以通过编辑此 MSBuild 文件 | |||
自定义此过程的行为。为了解与此相关的更多内容,请访问 https://go.microsoft.com/fwlink/?LinkID=208121。 | |||
--> | |||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
<PropertyGroup> | |||
<WebPublishMethod>FileSystem</WebPublishMethod> | |||
<PublishProvider>FileSystem</PublishProvider> | |||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> | |||
<LastUsedPlatform>Any CPU</LastUsedPlatform> | |||
<SiteUrlToLaunchAfterPublish /> | |||
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish> | |||
<ExcludeApp_Data>False</ExcludeApp_Data> | |||
<publishUrl>bin\Release\Publish</publishUrl> | |||
<DeleteExistingFiles>True</DeleteExistingFiles> | |||
</PropertyGroup> | |||
</Project> |
@@ -246,6 +246,25 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
} | |||
} | |||
public void UpdateStatusForZPByMId(string MainId, string Status) | |||
{ | |||
try | |||
{ | |||
dT_EvaluationDataService.UpdateStatusForZPByMId(MainId, Status); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 下发评价 | |||
/// </summary> | |||
@@ -48,7 +48,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, DT_EvaluationDataEntity entity); | |||
string SaveList(List<DT_EvaluationDataEntity> list); | |||
void UpdateStatusForZPByMId(string MainId, string Status); | |||
/// <summary> | |||
/// 下发评价 | |||
/// </summary> | |||
@@ -34,7 +34,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.*, | |||
e.Assessment as Assessment,e.ConductRequirements as ConductRequirements | |||
e.Assessment as Assessment,e.ConductRequirements as ConductRequirements,e.MaxScore | |||
"); | |||
strSql.Append(" FROM DT_EvaluationData t "); | |||
strSql.Append(" left join DT_EvaluatingIndicator e on t.EvaluatingIndicatorId=e.Id "); | |||
@@ -186,12 +186,16 @@ on k.Assessment=e.Assessment | |||
try | |||
{ | |||
var data = this.BaseRepository("CollegeMIS").FindEntity<DT_EvaluationDataEntity>(x => x.Id == Id); | |||
var sql = $@"select e.Assessment,e.ConductRequirements,t.* from DT_EvaluationData t | |||
join DT_EvaluatingIndicator e on t.EvaluatingIndicatorId=e.Id | |||
where t.MainId='{data.MainId}' and t.ScoreType='2' | |||
and t.Assessed = '{Assessed}' | |||
order by t.EOrder"; | |||
return this.BaseRepository("CollegeMIS").FindList<DT_EvaluationDataEntity>(sql); | |||
var sql = @"select t.Id,t.MainId,t.EvaluatingIndicatorId,t.Assessed,isnull(t.Score,0) as Score,t.ScoreType, | |||
k.scorePre,'评分标准' as gradetitle,'保留小数点后一位' as gradenum, | |||
m.BeAssessed,m.ScoreYear,m.ScoreQuarter,e.Assessment,e.ConductRequirements,e.CRRemark,e.MaxScore,e.ScoringCriteria | |||
FROM DT_EvaluationData t join DT_EvaluatingIndicator e on t.EvaluatingIndicatorId=e.Id | |||
join DT_EvaluationDataMain m on t.MainId=m.Id | |||
left join (select Assessment,sum(MaxScore) as scorePre from DT_EvaluatingIndicator group by Assessment ) k | |||
on k.Assessment=e.Assessment | |||
where 1=1 "; | |||
sql += $@" and t.MainId='{data.MainId}' and t.ScoreType='2' and t.Assessed = '{Assessed}'"; | |||
return this.BaseRepository("CollegeMIS").FindList<DT_EvaluationDataEntity>(sql).OrderBy(t => t.EOrder); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -315,23 +319,24 @@ where t.MainId='{data.MainId}' and t.ScoreType='2' | |||
var db = this.BaseRepository("CollegeMIS"); | |||
try | |||
{ | |||
var entity = db.FindEntity<DT_EvaluationDataEntity>(Id); | |||
db.BeginTrans(); | |||
var entity = db.FindEntity<DT_EvaluationDataEntity>(Id); | |||
string sql = | |||
$"update DT_EvaluationData set Status='{Status}' where ScoreType=3 and Id='{Id}'"; | |||
db.ExecuteBySql(sql); | |||
if (Status == 2) | |||
if (Status == 1) | |||
{ | |||
//审核通过,修改主表分数 | |||
if (db.FindList<DT_EvaluationDataEntity>(x => | |||
x.MainId == entity.MainId && x.ScoreType == 3 && | |||
x.PartyMemberGroupId == entity.PartyMemberGroupId && x.Id != Id && x.Status != 2).Count() == | |||
x.MainId == entity.MainId && x.ScoreType == 3 && x.Id != Id && x.Status == -1).Count() == | |||
0) | |||
{ | |||
db.ExecuteBySql($@" update DT_EvaluationDataMain t set t.ScoreXZ=(select Sum(Score) from DT_EvaluationData where ScoreType=3 and MainId='{entity.MainId}')/(select count(1) from DT_EvaluationData where ScoreType=3 and MainId='{entity.MainId}') | |||
where t.Id='{Id}'"); | |||
sql = | |||
$@" update DT_EvaluationDataMain t set t.ScoreXZ=(select Sum(Score) from DT_EvaluationData where ScoreType=3 and MainId='{entity.MainId}')/(select count(1) from DT_EvaluationData where ScoreType=3 and MainId='{entity.MainId}') | |||
where t.Id='{entity.MainId}'"; | |||
db.ExecuteBySql(sql); | |||
} | |||
} | |||
@@ -392,6 +397,7 @@ where t.MainId='{data.MainId}' and t.ScoreType='2' | |||
public string SaveList(List<DT_EvaluationDataEntity> list) | |||
{ | |||
var db = this.BaseRepository("CollegeMIS"); | |||
var entity = new DT_EvaluationDataEntity(); | |||
try | |||
{ | |||
string str = ""; | |||
@@ -402,7 +408,7 @@ where t.MainId='{data.MainId}' and t.ScoreType='2' | |||
FROM DT_EvaluationData t join DT_EvaluatingIndicator e on t.EvaluatingIndicatorId=e.Id | |||
join DT_EvaluationDataMain m on t.MainId=m.Id | |||
where t.Id='{model.Id}'"; | |||
var entity = db.FindList<DT_EvaluationDataEntity>(sql_get).FirstOrDefault(); | |||
entity = db.FindList<DT_EvaluationDataEntity>(sql_get).FirstOrDefault(); | |||
if (entity != null) | |||
{ | |||
if (model.Score > entity.MaxScore) | |||
@@ -423,7 +429,7 @@ join DT_EvaluationDataMain m on t.MainId=m.Id | |||
if (list.Count > 0) | |||
{ | |||
var entity = list.FirstOrDefault(); | |||
//var entity = list.FirstOrDefault(); | |||
var Assessed = entity.Assessed; | |||
var type = entity.ScoreType; | |||
//党员自评 | |||
@@ -437,7 +443,7 @@ join DT_EvaluationDataMain m on t.MainId=m.Id | |||
else if (type == 2) | |||
{ | |||
//党小组长评 | |||
if (db.FindList<DT_EvaluationDataEntity>(x => x.ScoreType == 3 && x.Assessed == Assessed).Count() <= | |||
if (db.FindList<DT_EvaluationDataEntity>(x => x.ScoreType == 3 && x.Assessed == Assessed && x.MainId == entity.MainId).Count() <= | |||
0) | |||
{ | |||
db.ExecuteBySql( | |||
@@ -446,9 +452,19 @@ join DT_EvaluationDataMain m on t.MainId=m.Id | |||
} | |||
else | |||
{ | |||
db.ExecuteBySql($@" update DT_EvaluationData set Score={list.Sum(x => x.Score)} | |||
where Assessed='{Assessed}' and ScoreType=3 and PartyMemberGroupId='{entity.PartyMemberGroupId}' and MainId='{entity.MainId}'"); | |||
db.ExecuteBySql($@" update DT_EvaluationData set Score={list.Sum(x => x.Score)},Status=0 | |||
where Assessed='{Assessed}' and ScoreType=3 and MainId='{entity.MainId}'"); | |||
} | |||
//修改主表小组评分 | |||
var mainList = db.FindList<DT_EvaluationDataEntity>(x => x.ScoreType == 3 && x.MainId == entity.MainId); | |||
if (mainList.Where(x => x.Status == -1 && x.Assessed == entity.Assessed).Count() == 0) | |||
{ | |||
var sumScore = mainList.Where(x => x.Assessed != entity.Assessed).Sum(x => x.Score) + list.Sum(x => x.Score); | |||
db.ExecuteBySql($@" update DT_EvaluationDataMain set ScoreXZ={sumScore / mainList.Count()} | |||
where Id='{entity.MainId}'"); | |||
} | |||
} | |||
} | |||
@@ -469,6 +485,27 @@ join DT_EvaluationDataMain m on t.MainId=m.Id | |||
} | |||
} | |||
public void UpdateStatusForZPByMId(string MainId, string Status) | |||
{ | |||
try | |||
{ | |||
string sql = $"update DT_EvaluationData set Status='{Status}' where MainId = '{MainId}' and ScoreType = 1 "; | |||
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 下发评价 | |||
/// </summary> | |||
@@ -108,8 +108,8 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
[NotMapped] | |||
public string empname { get; set; } | |||
[NotMapped] | |||
public string Scorexz { get; set; } | |||
public decimal? Score { get; set; } | |||
#endregion | |||
} | |||
} | |||
@@ -117,7 +117,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
{ | |||
try | |||
{ | |||
string sql = $@" select p.empno,p.empname,t.*,m.Scorexz,m.ScoreYear,m.ScoreQuarter | |||
string sql = $@" select p.empno,p.empname,t.*,m.ScoreXZ,m.ScoreYear,m.ScoreQuarter | |||
from DT_EvaluationData t | |||
join DT_EvaluationDataMain m on t.MainId=m.Id | |||
left join EmpInfo p on p.EmpNo=m.BeAssessed | |||