软测单独项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

116 lines
3.3 KiB

layui.config({
base: './'
}).extend({
selectM: '../../layui/layui_extends/selectM',
}).use(['element', 'layer', 'table','upload'], function () {
var layer = parent.layer === undefined ? layui.layer : top.layer,
$ = layui.jquery,
element = layui.element,
table = layui.table,
upload = layui.upload;
var OrgId = $.getUrlVar("OrgId2");
var month = $.getUrlVar("month");
var subjectids = [];
$.ajax({
type: "post",
//url: "../../ashx/ZYTSubjectHandler.ashx",
url: "../../ashx/ZYTScoreHandler.ashx",
async: false,
data: {
//Action: "TSubjectList",
Action: "GetOrgSubject",
OrgId: OrgId,
extendone: '1'
},
dataType: "json",
success: function (result) {
result.data.forEach(function (item) {
subjectids.push(item.SUBJECTID);
});
}
});
$.ajax({
type: "post",
url: "../../ashx/ZYTScoreHandler.ashx",
data: {
Action: "GetORGMonth",
OrgId: OrgId,
subjectid: subjectids.toString(),
month: month
},
dataType: "json",
success: function (result) {
var tbData = result.data.tbData;
var colArr = result.data.colArr;
var colslist = [
{
title: '序号',
width: 80,
align: "center",
type: 'number',
templet: '#xuhao'
},
{
field: 'USERS_NAME',
title: '姓名',
minWidth: 100,
align: "center"
},
{
field: 'Sex',
title: '性别',
minWidth: 100,
align: "center"
},
{
field: 'TIM',
title: '出生年月',
minWidth: 100,
align: "center"
},
{
field: 'Age',
title: '年龄',
minWidth: 100,
align: "center"
},
{
field: 'Job',
title: '职务',
minWidth: 100,
align: "center"
}
];
colArr.forEach(function (subitem) {
var colsitem = {
field: subitem.subid,
title: subitem.subname,
minWidth: 200,
align: "center"
}
colslist.push(colsitem);
});
colslist.push({
field: 'Average',
title: '平均分',
minWidth: 200,
align: "center"
});
table.render({
elem: '#taskTable',
data: tbData,
cellMinWidth: 95,
page: true,
height: "full-1",
limits: [10, 15, 20, 25],
limit: 15,
id: "ttaskListTable",
cols: [colslist]
});
}
});
});