提交 054ca458 编写于 作者: W weizhiqiang

获取当前登陆用户所属的学校列表

上级 e86f9712
...@@ -9,23 +9,16 @@ layui.config({ ...@@ -9,23 +9,16 @@ layui.config({
var index = parent.layer.getFrameIndex(window.name); var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$, var $ = layui.$,
form = layui.form; form = layui.form;
//初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, // 加载年级
pagination: false, initGrade();
template: getFileContent('tpl/template/select-option-must.tpl'), // 加载学期
ajaxSendLoadBefore: function(hdb){}, initSemester();
ajaxSendAfter:function(json){ });
form.render('select');
//加载年级
initGrade();
//加载学期
initSemester();
}
});
//学校监听事件 //学校监听事件
form.on('select(schoolId)', function(data){ form.on('select(schoolId)', function(data){
if(isNull(data.value) || data.value === '请选择'){ if(isNull(data.value) || data.value === '请选择'){
......
...@@ -22,22 +22,16 @@ layui.config({ ...@@ -22,22 +22,16 @@ layui.config({
type: 'year', type: 'year',
max: 'date' max: 'date'
}); });
//初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, // 加载年级
pagination: false, initGradeId();
template: getFileContent('tpl/template/select-option-must.tpl'), initTable();
ajaxSendAfter: function(json){
form.render('select');
//加载年级
initGradeId();
initTable();
}
}); });
form.on('select(schoolId)', function(data){ form.on('select(schoolId)', function(data){
//加载年级 //加载年级
initGradeId(); initGradeId();
...@@ -85,21 +79,12 @@ layui.config({ ...@@ -85,21 +79,12 @@ layui.config({
} }
function initTable(){ function initTable(){
var params = {
surveyName: $("#surveyName").val(),
surveyState: $("#surveyState").val(),
gradeId: $("#gradeId").val(),
schoolId: $("#schoolId").val(),
year: $("#year").val(),
subjectId: $("#subjectId").val()
};
table.render({ table.render({
id: 'messageTable', id: 'messageTable',
elem: '#messageTable', elem: '#messageTable',
method: 'post', method: 'post',
url: schoolBasePath + 'exam001', url: schoolBasePath + 'exam001',
where: params, where: getTableParams(),
even:true, even:true,
page: true, page: true,
limits: getLimits(), limits: getLimits(),
...@@ -309,28 +294,23 @@ layui.config({ ...@@ -309,28 +294,23 @@ layui.config({
}); });
function loadTable(){ function loadTable(){
var params = { table.reload("messageTable", {where: getTableParams()});
surveyName: $("#surveyName").val(),
surveyState: $("#surveyState").val(),
gradeId: $("#gradeId").val(),
schoolId: $("#schoolId").val(),
year: $("#year").val(),
subjectId: $("#subjectId").val()
};
table.reload("messageTable", {where: params});
} }
function refreshTable(){ function refreshTable(){
var params = { table.reload("messageTable", {page: {curr: 1}, where: getTableParams()});
surveyName: $("#surveyName").val(),
surveyState: $("#surveyState").val(),
gradeId: $("#gradeId").val(),
schoolId: $("#schoolId").val(),
year: $("#year").val(),
subjectId: $("#subjectId").val()
};
table.reload("messageTable", {page: {curr: 1}, where: params});
} }
function getTableParams() {
return {
surveyName: $("#surveyName").val(),
surveyState: $("#surveyState").val(),
gradeId: $("#gradeId").val(),
schoolId: $("#schoolId").val(),
year: $("#year").val(),
subjectId: $("#subjectId").val()
};
}
exports('examDesignList', {}); exports('examDesignList', {});
}); });
...@@ -24,22 +24,16 @@ layui.config({ ...@@ -24,22 +24,16 @@ layui.config({
type: 'year', type: 'year',
max: 'date' max: 'date'
}); });
//初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, // 加载年级
pagination: false, initGradeId();
template: getFileContent('tpl/template/select-option-must.tpl'), initTable();
ajaxSendAfter: function(json){
form.render('select');
//加载年级
initGradeId();
initTable();
}
}); });
form.on('select(schoolId)', function(data){ form.on('select(schoolId)', function(data){
//加载年级 //加载年级
initGradeId(); initGradeId();
...@@ -87,21 +81,12 @@ layui.config({ ...@@ -87,21 +81,12 @@ layui.config({
} }
function initTable(){ function initTable(){
var params = {
surveyName: $("#surveyName").val(),
surveyState: $("#surveyState").val(),
gradeId: $("#gradeId").val(),
schoolId: $("#schoolId").val(),
year: $("#year").val(),
subjectId: $("#subjectId").val()
};
table.render({ table.render({
id: 'messageTable', id: 'messageTable',
elem: '#messageTable', elem: '#messageTable',
method: 'post', method: 'post',
url: schoolBasePath + 'exam001-my', url: schoolBasePath + 'exam001-my',
where: params, where: getTableParams(),
even:true, even:true,
page: true, page: true,
limits: getLimits(), limits: getLimits(),
...@@ -312,28 +297,23 @@ layui.config({ ...@@ -312,28 +297,23 @@ layui.config({
}); });
function loadTable(){ function loadTable(){
var params = { table.reload("messageTable", {where: getTableParams()});
surveyName: $("#surveyName").val(),
surveyState: $("#surveyState").val(),
gradeId: $("#gradeId").val(),
schoolId: $("#schoolId").val(),
year: $("#year").val(),
subjectId: $("#subjectId").val()
};
table.reload("messageTable", {where: params});
} }
function refreshTable(){ function refreshTable(){
var params = { table.reload("messageTable", {page: {curr: 1}, where: getTableParams()});
surveyName: $("#surveyName").val(),
surveyState: $("#surveyState").val(),
gradeId: $("#gradeId").val(),
schoolId: $("#schoolId").val(),
year: $("#year").val(),
subjectId: $("#subjectId").val()
};
table.reload("messageTable", {page: {curr: 1}, where: params});
} }
function getTableParams() {
return {
surveyName: $("#surveyName").val(),
surveyState: $("#surveyState").val(),
gradeId: $("#gradeId").val(),
schoolId: $("#schoolId").val(),
year: $("#year").val(),
subjectId: $("#subjectId").val()
};
}
exports('examDesignMyList', {}); exports('examDesignMyList', {});
}); });
...@@ -21,26 +21,19 @@ layui.config({ ...@@ -21,26 +21,19 @@ layui.config({
// tab当前下标 // tab当前下标
var tabIndex = 0; var tabIndex = 0;
var fileUrl = ""; var fileUrl = "";
// 初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, loadData();
pagination: false, });
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(json){
form.render('select');
loadData();
}
});
// 学校监听事件 // 学校监听事件
form.on('select(schoolId)', function(data){ form.on('select(schoolId)', function(data){
if(isNull(data.value) || data.value === '请选择'){ if (isNull(data.value) || data.value === '请选择') {
$("#schoolId").html(""); $("#schoolId").html("");
form.render('select'); form.render('select');
}else{ } else {
// 加载年级 // 加载年级
initGrade(); initGrade();
} }
......
...@@ -22,20 +22,13 @@ layui.config({ ...@@ -22,20 +22,13 @@ layui.config({
// tab当前下标 // tab当前下标
var tabIndex = 0; var tabIndex = 0;
var fileUrl = ""; var fileUrl = "";
// 初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, loadData();
pagination: false, });
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(json){
form.render('select');
loadData();
}
});
// 学校监听事件 // 学校监听事件
form.on('select(schoolId)', function(data){ form.on('select(schoolId)', function(data){
if(isNull(data.value) || data.value === '请选择'){ if(isNull(data.value) || data.value === '请选择'){
......
...@@ -22,20 +22,13 @@ layui.config({ ...@@ -22,20 +22,13 @@ layui.config({
// tab当前下标 // tab当前下标
var tabIndex = 0; var tabIndex = 0;
var fileUrl = ""; var fileUrl = "";
// 初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, loadData();
pagination: false, });
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(json){
form.render('select');
loadData();
}
});
// 学校监听事件 // 学校监听事件
form.on('select(schoolId)', function(data){ form.on('select(schoolId)', function(data){
if(isNull(data.value) || data.value === '请选择'){ if(isNull(data.value) || data.value === '请选择'){
......
...@@ -22,26 +22,19 @@ layui.config({ ...@@ -22,26 +22,19 @@ layui.config({
// tab当前下标 // tab当前下标
var tabIndex = 0; var tabIndex = 0;
var fileUrl = ""; var fileUrl = "";
// 初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, loadData();
pagination: false, });
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(json){
form.render('select');
loadData();
}
});
// 学校监听事件 // 学校监听事件
form.on('select(schoolId)', function(data){ form.on('select(schoolId)', function(data){
if(isNull(data.value) || data.value === '请选择'){ if (isNull(data.value) || data.value === '请选择') {
$("#schoolId").html(""); $("#schoolId").html("");
form.render('select'); form.render('select');
}else{ } else {
// 加载年级 // 加载年级
initGrade(); initGrade();
} }
......
...@@ -22,20 +22,13 @@ layui.config({ ...@@ -22,20 +22,13 @@ layui.config({
// tab当前下标 // tab当前下标
var tabIndex = 0; var tabIndex = 0;
var fileUrl = ""; var fileUrl = "";
// 初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, loadData();
pagination: false, });
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(json){
form.render('select');
loadData();
}
});
// 学校监听事件 // 学校监听事件
form.on('select(schoolId)', function(data){ form.on('select(schoolId)', function(data){
if(isNull(data.value) || data.value === '请选择'){ if(isNull(data.value) || data.value === '请选择'){
......
...@@ -21,26 +21,19 @@ layui.config({ ...@@ -21,26 +21,19 @@ layui.config({
// tab当前下标 // tab当前下标
var tabIndex = 0; var tabIndex = 0;
var fileUrl = ""; var fileUrl = "";
// 初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, loadData();
pagination: false, });
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(json){
form.render('select');
loadData();
}
});
// 学校监听事件 // 学校监听事件
form.on('select(schoolId)', function(data){ form.on('select(schoolId)', function(data){
if(isNull(data.value) || data.value === '请选择'){ if (isNull(data.value) || data.value === '请选择') {
$("#schoolId").html(""); $("#schoolId").html("");
form.render('select'); form.render('select');
}else{ } else {
// 加载年级 // 加载年级
initGrade(); initGrade();
} }
......
...@@ -21,20 +21,13 @@ layui.config({ ...@@ -21,20 +21,13 @@ layui.config({
// tab当前下标 // tab当前下标
var tabIndex = 0; var tabIndex = 0;
var fileUrl = ""; var fileUrl = "";
// 初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, loadData();
pagination: false, });
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(json){
form.render('select');
loadData();
}
});
// 学校监听事件 // 学校监听事件
form.on('select(schoolId)', function(data){ form.on('select(schoolId)', function(data){
if(isNull(data.value) || data.value === '请选择'){ if(isNull(data.value) || data.value === '请选择'){
......
...@@ -21,20 +21,13 @@ layui.config({ ...@@ -21,20 +21,13 @@ layui.config({
// tab当前下标 // tab当前下标
var tabIndex = 0; var tabIndex = 0;
var fileUrl = ""; var fileUrl = "";
// 初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, loadData();
pagination: false, });
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(json){
form.render('select');
loadData();
}
});
// 学校监听事件 // 学校监听事件
form.on('select(schoolId)', function(data){ form.on('select(schoolId)', function(data){
if(isNull(data.value) || data.value === '请选择'){ if(isNull(data.value) || data.value === '请选择'){
......
...@@ -21,20 +21,13 @@ layui.config({ ...@@ -21,20 +21,13 @@ layui.config({
// tab当前下标 // tab当前下标
var tabIndex = 0; var tabIndex = 0;
var fileUrl = ""; var fileUrl = "";
// 初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, loadData();
pagination: false, });
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(json){
form.render('select');
loadData();
}
});
// 学校监听事件 // 学校监听事件
form.on('select(schoolId)', function(data){ form.on('select(schoolId)', function(data){
if(isNull(data.value) || data.value === '请选择'){ if(isNull(data.value) || data.value === '请选择'){
......
...@@ -21,22 +21,16 @@ layui.config({ ...@@ -21,22 +21,16 @@ layui.config({
// 设置提示信息 // 设置提示信息
var s = "试题选择规则:1.多选;2.包含所有公开试题以及个人的私有试题。如没有查到要选择的试题,请检查试题信息是否满足当前规则。"; var s = "试题选择规则:1.多选;2.包含所有公开试题以及个人的私有试题。如没有查到要选择的试题,请检查试题信息是否满足当前规则。";
$("#showInfo").html(s); $("#showInfo").html(s);
// 初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, // 加载年级
pagination: false, initGradeId();
template: getFileContent('tpl/template/select-option-must.tpl'), initTable();
ajaxSendAfter: function(json){
form.render('select');
// 加载年级
initGradeId();
initTable();
}
}); });
form.on('select(schoolId)', function(data){ form.on('select(schoolId)', function(data){
// 加载年级 // 加载年级
initGradeId(); initGradeId();
......
...@@ -7,31 +7,22 @@ layui.config({ ...@@ -7,31 +7,22 @@ layui.config({
}).extend({ }).extend({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { }).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor(); winui.renderColor();
var $ = layui.$, var $ = layui.$,
form = layui.form, form = layui.form,
table = layui.table; table = layui.table;
var gradeId = ""; var gradeId = "";
var subjectId = ""; var subjectId = "";
// 初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, // 加载年级
pagination: false, initGradeId();
template: getFileContent('tpl/template/select-option-must.tpl'), initTable();
ajaxSendAfter: function(json){
form.render('select');
//加载年级
initGradeId();
initTable();
}
}); });
form.on('select(schoolId)', function(data){ form.on('select(schoolId)', function(data){
// 加载年级 // 加载年级
initGradeId(); initGradeId();
...@@ -113,11 +104,9 @@ layui.config({ ...@@ -113,11 +104,9 @@ layui.config({
details(data); details(data);
} }
}); });
form.render(); form.render();
form.on('submit(formSearch)', function (data) { form.on('submit(formSearch)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
refreshTable(); refreshTable();
} }
......
...@@ -7,9 +7,7 @@ layui.config({ ...@@ -7,9 +7,7 @@ layui.config({
}).extend({ }).extend({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { }).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor(); winui.renderColor();
var $ = layui.$, var $ = layui.$,
form = layui.form, form = layui.form,
table = layui.table; table = layui.table;
...@@ -24,23 +22,16 @@ layui.config({ ...@@ -24,23 +22,16 @@ layui.config({
authBtn('1595035432596'); // 矩阵多选题权限 authBtn('1595035432596'); // 矩阵多选题权限
authBtn('1595035473610'); // 矩阵评分题权限 authBtn('1595035473610'); // 矩阵评分题权限
authBtn('1595035491337'); // 矩阵填空题权限 authBtn('1595035491337'); // 矩阵填空题权限
// 初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, // 加载年级
pagination: false, initGradeId();
template: getFileContent('tpl/template/select-option-must.tpl'), initTable();
ajaxSendAfter: function(json){
form.render('select');
// 加载年级
initGradeId();
initTable();
}
}); });
form.on('select(schoolId)', function(data) {
form.on('select(schoolId)', function(data){
// 加载年级 // 加载年级
initGradeId(); initGradeId();
}); });
......
...@@ -21,20 +21,13 @@ layui.config({ ...@@ -21,20 +21,13 @@ layui.config({
// tab当前下标 // tab当前下标
var tabIndex = 0; var tabIndex = 0;
var fileUrl = ""; var fileUrl = "";
// 初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, loadData();
pagination: false, });
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(json){
form.render('select');
loadData();
}
});
// 学校监听事件 // 学校监听事件
form.on('select(schoolId)', function(data){ form.on('select(schoolId)', function(data){
if(isNull(data.value) || data.value === '请选择'){ if(isNull(data.value) || data.value === '请选择'){
......
...@@ -8,7 +8,6 @@ layui.config({ ...@@ -8,7 +8,6 @@ layui.config({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate'], function (exports) { }).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate'], function (exports) {
winui.renderColor(); winui.renderColor();
var $ = layui.$, var $ = layui.$,
form = layui.form, form = layui.form,
table = layui.table, table = layui.table,
...@@ -19,22 +18,15 @@ layui.config({ ...@@ -19,22 +18,15 @@ layui.config({
type: 'year', type: 'year',
max: 'date' max: 'date'
}); });
//初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, // 加载年级
pagination: false, initGradeId();
template: getFileContent('tpl/template/select-option-must.tpl'), initTable();
ajaxSendAfter: function(json){
form.render('select');
//加载年级
initGradeId();
initTable();
}
}); });
form.on('select(schoolId)', function(data){ form.on('select(schoolId)', function(data){
//加载年级 //加载年级
initGradeId(); initGradeId();
...@@ -57,7 +49,6 @@ layui.config({ ...@@ -57,7 +49,6 @@ layui.config({
} }
function initTable(){ function initTable(){
table.render({ table.render({
id: 'messageTable', id: 'messageTable',
elem: '#messageTable', elem: '#messageTable',
......
...@@ -8,26 +8,19 @@ layui.config({ ...@@ -8,26 +8,19 @@ layui.config({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { }).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor(); winui.renderColor();
var $ = layui.$, var $ = layui.$,
form = layui.form, form = layui.form,
table = layui.table; table = layui.table;
//初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, // 加载年级
pagination: false, initGradeId();
template: getFileContent('tpl/template/select-option-must.tpl'), initTable();
ajaxSendAfter: function(json){
form.render('select');
//加载年级
initGradeId();
initTable();
}
}); });
form.on('select(schoolId)', function(data){ form.on('select(schoolId)', function(data){
//加载年级 //加载年级
initGradeId(); initGradeId();
......
...@@ -19,22 +19,16 @@ layui.config({ ...@@ -19,22 +19,16 @@ layui.config({
type: 'year', type: 'year',
max: 'date' max: 'date'
}); });
//初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, // 加载年级
pagination: false, initGradeId();
template: getFileContent('tpl/template/select-option-must.tpl'), initTable();
ajaxSendAfter: function(json){
form.render('select');
//加载年级
initGradeId();
initTable();
}
}); });
form.on('select(schoolId)', function(data){ form.on('select(schoolId)', function(data){
//加载年级 //加载年级
initGradeId(); initGradeId();
......
...@@ -12,28 +12,21 @@ layui.config({ ...@@ -12,28 +12,21 @@ layui.config({
form = layui.form; form = layui.form;
var ue = ueEditorUtil.initEditor('container'); var ue = ueEditorUtil.initEditor('container');
//初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, // 加载年级
pagination: false, initGrade();
template: getFileContent('tpl/template/select-option-must.tpl'), });
ajaxSendLoadBefore: function(hdb){}, // 学校监听事件
ajaxSendAfter:function(json){
form.render('select');
//加载年级
initGrade();
}
});
//学校监听事件
form.on('select(schoolId)', function(data){ form.on('select(schoolId)', function(data){
if(isNull(data.value) || data.value === '请选择'){ if(isNull(data.value) || data.value === '请选择'){
$("#schoolId").html(""); $("#schoolId").html("");
form.render('select'); form.render('select');
}else{ }else{
//加载年级 // 加载年级
initGrade(); initGrade();
} }
}); });
......
...@@ -7,7 +7,6 @@ layui.config({ ...@@ -7,7 +7,6 @@ layui.config({
}).define(['window', 'table', 'jquery', 'winui', 'form', 'tableCheckBoxUtil'], function (exports) { }).define(['window', 'table', 'jquery', 'winui', 'form', 'tableCheckBoxUtil'], function (exports) {
winui.renderColor(); winui.renderColor();
var index = parent.layer.getFrameIndex(window.name); var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$, var $ = layui.$,
form = layui.form, form = layui.form,
table = layui.table, table = layui.table,
...@@ -30,22 +29,15 @@ layui.config({ ...@@ -30,22 +29,15 @@ layui.config({
} }
s += '如没有查到要选择的知识点,请检查知识点信息是否满足当前规则。'; s += '如没有查到要选择的知识点,请检查知识点信息是否满足当前规则。';
$("#showInfo").html(s); $("#showInfo").html(s);
//初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, // 加载年级
pagination: false, initGradeId();
template: getFileContent('tpl/template/select-option-must.tpl'), initTable();
ajaxSendAfter: function(json){
form.render('select');
//加载年级
initGradeId();
initTable();
}
}); });
form.on('select(schoolId)', function(data){ form.on('select(schoolId)', function(data){
//加载年级 //加载年级
initGradeId(); initGradeId();
...@@ -110,8 +102,7 @@ layui.config({ ...@@ -110,8 +102,7 @@ layui.config({
fieldName: 'id' fieldName: 'id'
}); });
} }
table.render({ table.render({
id: 'messageTable', id: 'messageTable',
elem: '#messageTable', elem: '#messageTable',
...@@ -190,10 +181,8 @@ layui.config({ ...@@ -190,10 +181,8 @@ layui.config({
}}); }});
}); });
form.render(); form.render();
form.on('submit(formSearch)', function (data) { form.on('submit(formSearch)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
refreshTable(); refreshTable();
} }
......
...@@ -7,31 +7,23 @@ layui.config({ ...@@ -7,31 +7,23 @@ layui.config({
}).extend({ }).extend({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { }).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor(); winui.renderColor();
var $ = layui.$, var $ = layui.$,
form = layui.form, form = layui.form,
table = layui.table; table = layui.table;
var gradeId = ""; var gradeId = "";
var subjectId = ""; var subjectId = "";
// 初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, // 加载年级
pagination: false, initGradeId();
template: getFileContent('tpl/template/select-option-must.tpl'), initTable();
ajaxSendAfter: function(json){
form.render('select');
//加载年级
initGradeId();
initTable();
}
}); });
form.on('select(schoolId)', function(data){ form.on('select(schoolId)', function(data){
// 加载年级 // 加载年级
initGradeId(); initGradeId();
...@@ -72,7 +64,6 @@ layui.config({ ...@@ -72,7 +64,6 @@ layui.config({
} }
function initTable(){ function initTable(){
// 表格渲染
table.render({ table.render({
id: 'messageTable', id: 'messageTable',
elem: '#messageTable', elem: '#messageTable',
...@@ -106,10 +97,8 @@ layui.config({ ...@@ -106,10 +97,8 @@ layui.config({
} }
}); });
form.render(); form.render();
form.on('submit(formSearch)', function (data) { form.on('submit(formSearch)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
refreshTable(); refreshTable();
} }
......
...@@ -18,45 +18,38 @@ layui.config({ ...@@ -18,45 +18,38 @@ layui.config({
template: $("#editTemplate").html(), template: $("#editTemplate").html(),
ajaxSendAfter:function(json){ ajaxSendAfter:function(json){
$("input:radio[name=typeState][value=" + json.bean.type + "]").attr("checked", true); $("input:radio[name=typeState][value=" + json.bean.type + "]").attr("checked", true);
//初始化学校 // 获取当前登陆用户所属的学校列表
schoolUtil.queryMyBelongSchoolList(function (data) {
$("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), data));
$("#schoolId").val(json.bean.schoolId);
form.render("select");
});
//年级
showGrid({ showGrid({
id: "schoolId", id: "gradeId",
url: schoolBasePath + "schoolmation008", url: schoolBasePath + "grademation006",
params: {}, params: {schoolId: $("#schoolId").val()},
pagination: false, pagination: false,
template: getFileContent('tpl/template/select-option-must.tpl'), template: getFileContent('tpl/template/select-option.tpl'),
ajaxSendLoadBefore: function(hdb){}, ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(data){ ajaxSendAfter:function(data){
$("#schoolId").val(json.bean.schoolId); $("#gradeId").val(json.bean.gradeId);
form.render('select'); form.render('select');
//年级 //科目
showGrid({ showGrid({
id: "gradeId", id: "subjectId",
url: schoolBasePath + "grademation006", url: schoolBasePath + "schoolsubjectmation007",
params: {schoolId: $("#schoolId").val()}, params: {gradeId: $("#gradeId").val()},
pagination: false, pagination: false,
template: getFileContent('tpl/template/select-option.tpl'), template: getFileContent('tpl/template/select-option.tpl'),
ajaxSendLoadBefore: function(hdb){}, ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(data){ ajaxSendAfter:function(data){
$("#gradeId").val(json.bean.gradeId); $("#subjectId").val(json.bean.subjectId);
form.render('select'); form.render('select');
//科目 }
showGrid({ });
id: "subjectId", }
url: schoolBasePath + "schoolsubjectmation007", });
params: {gradeId: $("#gradeId").val()},
pagination: false,
template: getFileContent('tpl/template/select-option.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(data){
$("#subjectId").val(json.bean.subjectId);
form.render('select');
}
});
}
});
}
});
//学校监听事件 //学校监听事件
form.on('select(schoolId)', function(data){ form.on('select(schoolId)', function(data){
if(isNull(data.value) || data.value === '请选择'){ if(isNull(data.value) || data.value === '请选择'){
...@@ -130,12 +123,12 @@ layui.config({ ...@@ -130,12 +123,12 @@ layui.config({
winui.window.msg('请填写内容', {icon: 2,time: 2000}); winui.window.msg('请填写内容', {icon: 2,time: 2000});
return false; return false;
} }
AjaxPostUtil.request({url:schoolBasePath + "knowledgepoints005", params: params, type: 'json', callback: function(json){ AjaxPostUtil.request({url: schoolBasePath + "knowledgepoints005", params: params, type: 'json', callback: function(json) {
if(json.returnCode == 0){ if (json.returnCode == 0) {
parent.layer.close(index); parent.layer.close(index);
parent.refreshCode = '0'; parent.refreshCode = '0';
}else{ } else {
winui.window.msg(json.returnMessage, {icon: 2,time: 2000}); winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}}); }});
} }
......
...@@ -8,34 +8,26 @@ layui.config({ ...@@ -8,34 +8,26 @@ layui.config({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { }).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor(); winui.renderColor();
var $ = layui.$, var $ = layui.$,
form = layui.form, form = layui.form,
table = layui.table; table = layui.table;
authBtn('1589084814532'); authBtn('1589084814532');
//初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, // 加载年级
pagination: false, initGradeId();
template: getFileContent('tpl/template/select-option-must.tpl'), initTable();
ajaxSendAfter: function(json){
form.render('select');
//加载年级
initGradeId();
initTable();
}
}); });
form.on('select(schoolId)', function(data){ form.on('select(schoolId)', function(data){
//加载年级 // 加载年级
initGradeId(); initGradeId();
}); });
//所属年级 // 所属年级
function initGradeId(){ function initGradeId(){
showGrid({ showGrid({
id: "gradeId", id: "gradeId",
...@@ -77,7 +69,6 @@ layui.config({ ...@@ -77,7 +69,6 @@ layui.config({
} }
function initTable(){ function initTable(){
table.render({ table.render({
id: 'messageTable', id: 'messageTable',
elem: '#messageTable', elem: '#messageTable',
...@@ -122,11 +113,9 @@ layui.config({ ...@@ -122,11 +113,9 @@ layui.config({
details(data); details(data);
} }
}); });
form.render(); form.render();
form.on('submit(formSearch)', function (data) { form.on('submit(formSearch)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
refreshTable(); refreshTable();
} }
...@@ -209,7 +198,7 @@ layui.config({ ...@@ -209,7 +198,7 @@ layui.config({
table.reload("messageTable", {page: {curr: 1}, where: getTablePatams()}); table.reload("messageTable", {page: {curr: 1}, where: getTablePatams()});
} }
function getTablePatams(){ function getTablePatams() {
return { return {
title: $("#title").val(), title: $("#title").val(),
schoolId: $("#schoolId").val(), schoolId: $("#schoolId").val(),
......
...@@ -5,29 +5,20 @@ layui.config({ ...@@ -5,29 +5,20 @@ layui.config({
}).extend({ }).extend({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate'], function (exports) { }).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate'], function (exports) {
winui.renderColor(); winui.renderColor();
var $ = layui.$, var $ = layui.$,
form = layui.form, form = layui.form,
table = layui.table, table = layui.table,
laydate = layui.laydate; laydate = layui.laydate;
//初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, initTable();
pagination: false, });
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(json){
initTable();
}
});
function initTable(){ function initTable(){
showGrid({ showGrid({
id: "showTemplate", id: "showTemplate",
url: schoolBasePath + "schooltimesetting001", url: schoolBasePath + "schooltimesetting001",
...@@ -35,7 +26,6 @@ layui.config({ ...@@ -35,7 +26,6 @@ layui.config({
pagination: false, pagination: false,
template: $("#timeSettingTemplate").html(), template: $("#timeSettingTemplate").html(),
ajaxSendLoadBefore: function(hdb, json) { ajaxSendLoadBefore: function(hdb, json) {
}, },
ajaxSendAfter: function(json) { ajaxSendAfter: function(json) {
$.each(json.bean.timeList, function(i, item){ $.each(json.bean.timeList, function(i, item){
...@@ -57,7 +47,7 @@ layui.config({ ...@@ -57,7 +47,7 @@ layui.config({
form.render(); form.render();
} }
//保存 // 保存
$("body").on("click", "#saveBtn", function(){ $("body").on("click", "#saveBtn", function(){
var array = new Array(); var array = new Array();
$('.timeRange').each(function(){ $('.timeRange').each(function(){
...@@ -83,7 +73,6 @@ layui.config({ ...@@ -83,7 +73,6 @@ layui.config({
}}); }});
}); });
$("body").on("click", "#formSearch", function(){ $("body").on("click", "#formSearch", function(){
initTable(); initTable();
}); });
......
...@@ -9,20 +9,13 @@ layui.config({ ...@@ -9,20 +9,13 @@ layui.config({
layui.use(['form'], function (form) { layui.use(['form'], function (form) {
var index = parent.layer.getFrameIndex(window.name); var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$; var $ = layui.$;
//初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, });
pagination: false,
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(json){
form.render("select");
}
});
matchingLanguage(); matchingLanguage();
form.render(); form.render();
form.on('submit(formAddBean)', function (data) { form.on('submit(formAddBean)', function (data) {
......
...@@ -17,21 +17,13 @@ layui.config({ ...@@ -17,21 +17,13 @@ layui.config({
pagination: false, pagination: false,
template: getFileContent('tpl/schoolbodymind/schoolbodymindeditTemplate.tpl'), template: getFileContent('tpl/schoolbodymind/schoolbodymindeditTemplate.tpl'),
ajaxSendAfter:function(json){ ajaxSendAfter:function(json){
// 获取当前登陆用户所属的学校列表
//初始化学校 schoolUtil.queryMyBelongSchoolList(function (data) {
showGrid({ $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), data));
id: "schoolId", $("#schoolId").val(json.bean.schoolId);
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, });
pagination: false,
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(data){
$("#schoolId").val(json.bean.schoolId);
form.render("select");
}
});
matchingLanguage(); matchingLanguage();
form.on('submit(formEditBean)', function (data) { form.on('submit(formEditBean)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
......
...@@ -7,34 +7,26 @@ layui.config({ ...@@ -7,34 +7,26 @@ layui.config({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { }).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor(); winui.renderColor();
var $ = layui.$, var $ = layui.$,
form = layui.form, form = layui.form,
table = layui.table; table = layui.table;
authBtn('1586089582685'); authBtn('1586089582685');
//初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, initTable();
pagination: false, });
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(json){
initTable();
}
});
function initTable(){ function initTable(){
table.render({ table.render({
id: 'messageTable', id: 'messageTable',
elem: '#messageTable', elem: '#messageTable',
method: 'post', method: 'post',
url: schoolBasePath + 'schoolbodymind001', url: schoolBasePath + 'schoolbodymind001',
where: {name: $("#typeName").val(), schoolId: $("#schoolId").val()}, where: getTableParams(),
even: true, even: true,
page: true, page: true,
limits: getLimits(), limits: getLimits(),
...@@ -63,8 +55,7 @@ layui.config({ ...@@ -63,8 +55,7 @@ layui.config({
} }
form.render(); form.render();
$("body").on("click", "#formSearch", function(){ $("body").on("click", "#formSearch", function(){
refreshTable(); refreshTable();
}); });
...@@ -126,13 +117,20 @@ layui.config({ ...@@ -126,13 +117,20 @@ layui.config({
loadTable(); loadTable();
}); });
function loadTable(){ function loadTable() {
table.reload("messageTable", {where:{name:$("#typeName").val(), schoolId: $("#schoolId").val()}}); table.reload("messageTable", {where: getTableParams()});
} }
function refreshTable(){ function refreshTable() {
table.reload("messageTable", {page: {curr: 1}, where:{name:$("#typeName").val(), schoolId: $("#schoolId").val()}}); table.reload("messageTable", {page: {curr: 1}, where: getTableParams()});
} }
function getTableParams() {
return {
name: $("#typeName").val(),
schoolId: $("#schoolId").val()
};
}
exports('schoolbodymindlist', {}); exports('schoolbodymindlist', {});
}); });
...@@ -27,24 +27,15 @@ layui.config({ ...@@ -27,24 +27,15 @@ layui.config({
matchingLanguage(); matchingLanguage();
form.render(); form.render();
//所属学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, // 加载年级
pagination: false, initGradeId();
template: getFileContent('tpl/template/select-option-must.tpl'), // 加载教学楼
ajaxSendLoadBefore: function(hdb){ initFloorId();
}, });
ajaxSendAfter:function(json){
form.render('select');
//加载年级
initGradeId();
//加载教学楼
initFloorId();
}
});
form.on('select(schoolId)', function(data){ form.on('select(schoolId)', function(data){
//加载年级 //加载年级
initGradeId(); initGradeId();
......
...@@ -8,7 +8,6 @@ layui.config({ ...@@ -8,7 +8,6 @@ layui.config({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate'], function (exports) { }).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate'], function (exports) {
winui.renderColor(); winui.renderColor();
var $ = layui.$, var $ = layui.$,
form = layui.form, form = layui.form,
table = layui.table, table = layui.table,
...@@ -21,28 +20,21 @@ layui.config({ ...@@ -21,28 +20,21 @@ layui.config({
type: 'year', type: 'year',
max: 'date' max: 'date'
}); });
//初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, // 加载年级
pagination: false, initGradeId();
template: getFileContent('tpl/template/select-option-must.tpl'), initTable();
ajaxSendAfter: function(json){
form.render('select');
//加载年级
initGradeId();
initTable();
}
}); });
form.on('select(schoolId)', function(data){ form.on('select(schoolId)', function(data){
//加载年级 // 加载年级
initGradeId(); initGradeId();
}); });
//所属年级 // 所属年级
function initGradeId(){ function initGradeId(){
showGrid({ showGrid({
id: "gradeId", id: "gradeId",
......
...@@ -9,42 +9,34 @@ layui.config({ ...@@ -9,42 +9,34 @@ layui.config({
layui.use(['form'], function (form) { layui.use(['form'], function (form) {
var index = parent.layer.getFrameIndex(window.name); var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$; var $ = layui.$;
//初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, });
pagination: false,
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(json){
form.render("select");
}
});
matchingLanguage(); matchingLanguage();
form.render(); form.render();
form.on('submit(formAddBean)', function (data) { form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
var params = { var params = {
name: $("#typeName").val(), name: $("#typeName").val(),
schoolId: $("#schoolId").val() schoolId: $("#schoolId").val()
}; };
AjaxPostUtil.request({url:schoolBasePath + "schoolfamilysituation002", params:params, type: 'json', callback: function(json){ AjaxPostUtil.request({url: schoolBasePath + "schoolfamilysituation002", params: params, type: 'json', callback: function(json) {
if(json.returnCode == 0){ if (json.returnCode == 0) {
parent.layer.close(index); parent.layer.close(index);
parent.refreshCode = '0'; parent.refreshCode = '0';
}else{ } else {
winui.window.msg(json.returnMessage, {icon: 2,time: 2000}); winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}}); }});
} }
return false; return false;
}); });
$("body").on("click", "#cancle", function(){ $("body").on("click", "#cancle", function() {
parent.layer.close(index); parent.layer.close(index);
}); });
}); });
......
...@@ -17,21 +17,13 @@ layui.config({ ...@@ -17,21 +17,13 @@ layui.config({
pagination: false, pagination: false,
template: getFileContent('tpl/schoolfamilysituation/schoolfamilysituationeditTemplate.tpl'), template: getFileContent('tpl/schoolfamilysituation/schoolfamilysituationeditTemplate.tpl'),
ajaxSendAfter:function(json){ ajaxSendAfter:function(json){
// 获取当前登陆用户所属的学校列表
//初始化学校 schoolUtil.queryMyBelongSchoolList(function (data) {
showGrid({ $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), data));
id: "schoolId", $("#schoolId").val(json.bean.schoolId);
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, });
pagination: false,
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(data){
$("#schoolId").val(json.bean.schoolId);
form.render("select");
}
});
matchingLanguage(); matchingLanguage();
form.on('submit(formEditBean)', function (data) { form.on('submit(formEditBean)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
......
...@@ -7,34 +7,26 @@ layui.config({ ...@@ -7,34 +7,26 @@ layui.config({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { }).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor(); winui.renderColor();
var $ = layui.$, var $ = layui.$,
form = layui.form, form = layui.form,
table = layui.table; table = layui.table;
authBtn('1586140517768'); authBtn('1586140517768');
//初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, initTable();
pagination: false, });
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(json){
initTable();
}
});
function initTable(){ function initTable(){
table.render({ table.render({
id: 'messageTable', id: 'messageTable',
elem: '#messageTable', elem: '#messageTable',
method: 'post', method: 'post',
url: schoolBasePath + 'schoolfamilysituation001', url: schoolBasePath + 'schoolfamilysituation001',
where: {name: $("#typeName").val(), schoolId: $("#schoolId").val()}, where: getTableParams(),
even: true, even: true,
page: true, page: true,
limits: getLimits(), limits: getLimits(),
...@@ -63,8 +55,6 @@ layui.config({ ...@@ -63,8 +55,6 @@ layui.config({
} }
form.render(); form.render();
$("body").on("click", "#formSearch", function(){ $("body").on("click", "#formSearch", function(){
refreshTable(); refreshTable();
}); });
...@@ -120,18 +110,25 @@ layui.config({ ...@@ -120,18 +110,25 @@ layui.config({
}); });
} }
//刷新数据 // 刷新数据
$("body").on("click", "#reloadTable", function(){ $("body").on("click", "#reloadTable", function(){
loadTable(); loadTable();
}); });
function loadTable(){ function loadTable(){
table.reload("messageTable", {where:{name:$("#typeName").val(), schoolId: $("#schoolId").val()}}); table.reload("messageTable", {where: getTableParams()});
} }
function refreshTable(){ function refreshTable(){
table.reload("messageTable", {page: {curr: 1}, where:{name:$("#typeName").val(), schoolId: $("#schoolId").val()}}); table.reload("messageTable", {page: {curr: 1}, where: getTableParams()});
} }
function getTableParams() {
return {
name: $("#typeName").val(),
schoolId: $("#schoolId").val()
};
}
exports('schoolfamilysituationlist', {}); exports('schoolfamilysituationlist', {});
}); });
...@@ -9,24 +9,16 @@ layui.config({ ...@@ -9,24 +9,16 @@ layui.config({
layui.use(['form'], function (form) { layui.use(['form'], function (form) {
var index = parent.layer.getFrameIndex(window.name); var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$; var $ = layui.$;
//初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, });
pagination: false,
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(json){
form.render("select");
}
});
matchingLanguage(); matchingLanguage();
form.render(); form.render();
form.on('submit(formAddBean)', function (data) { form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
var params = { var params = {
name: $("#typeName").val(), name: $("#typeName").val(),
......
...@@ -17,21 +17,13 @@ layui.config({ ...@@ -17,21 +17,13 @@ layui.config({
pagination: false, pagination: false,
template: getFileContent('tpl/schoolfloormation/schoolfloormationeditTemplate.tpl'), template: getFileContent('tpl/schoolfloormation/schoolfloormationeditTemplate.tpl'),
ajaxSendAfter:function(json){ ajaxSendAfter:function(json){
// 获取当前登陆用户所属的学校列表
//初始化学校 schoolUtil.queryMyBelongSchoolList(function (data) {
showGrid({ $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), data));
id: "schoolId", $("#schoolId").val(json.bean.schoolId);
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, });
pagination: false,
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(data){
$("#schoolId").val(json.bean.schoolId);
form.render("select");
}
});
matchingLanguage(); matchingLanguage();
form.on('submit(formEditBean)', function (data) { form.on('submit(formEditBean)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
......
...@@ -7,33 +7,26 @@ layui.config({ ...@@ -7,33 +7,26 @@ layui.config({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { }).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor(); winui.renderColor();
var $ = layui.$, var $ = layui.$,
form = layui.form, form = layui.form,
table = layui.table; table = layui.table;
authBtn('1586146946646'); authBtn('1586146946646');
//初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, initTable();
pagination: false, });
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(json){
initTable();
}
});
function initTable(){ function initTable(){
table.render({ table.render({
id: 'messageTable', id: 'messageTable',
elem: '#messageTable', elem: '#messageTable',
method: 'post', method: 'post',
url: schoolBasePath + 'schoolfloormation001', url: schoolBasePath + 'schoolfloormation001',
where: {name: $("#typeName").val(), schoolId: $("#schoolId").val()}, where: getTableParams(),
even: true, even: true,
page: true, page: true,
limits: getLimits(), limits: getLimits(),
...@@ -62,8 +55,7 @@ layui.config({ ...@@ -62,8 +55,7 @@ layui.config({
} }
form.render(); form.render();
$("body").on("click", "#formSearch", function(){ $("body").on("click", "#formSearch", function(){
refreshTable(); refreshTable();
}); });
...@@ -125,12 +117,19 @@ layui.config({ ...@@ -125,12 +117,19 @@ layui.config({
}); });
function loadTable(){ function loadTable(){
table.reload("messageTable", {where:{name:$("#typeName").val(), schoolId: $("#schoolId").val()}}); table.reload("messageTable", {where: getTableParams()});
} }
function refreshTable(){ function refreshTable(){
table.reload("messageTable", {page: {curr: 1}, where:{name:$("#typeName").val(), schoolId: $("#schoolId").val()}}); table.reload("messageTable", {page: {curr: 1}, where: getTableParams()});
} }
function getTableParams() {
return {
name: $("#typeName").val(),
schoolId: $("#schoolId").val()
};
}
exports('schoolfloormationlist', {}); exports('schoolfloormationlist', {});
}); });
...@@ -8,33 +8,24 @@ layui.config({ ...@@ -8,33 +8,24 @@ layui.config({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'opTable', 'jquery', 'winui', 'form'], function (exports) { }).define(['window', 'opTable', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor(); winui.renderColor();
var $ = layui.$, var $ = layui.$,
form = layui.form; form = layui.form;
var opTable; var opTable;
//初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, initTable();
pagination: false, });
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(json){
initTable();
}
});
function initTable(){ function initTable(){
opTable = layui.opTable.render({ opTable = layui.opTable.render({
id: 'messageTable', id: 'messageTable',
elem: '#messageTable', elem: '#messageTable',
method: 'post', method: 'post',
url: schoolBasePath + 'schoolgradesubject001', url: schoolBasePath + 'schoolgradesubject001',
where: {gradeName:$("#gradeName").val(), schoolId:$("#schoolId").val()}, where: getTableParams(),
even: true, even: true,
page: true, page: true,
limits: [8, 16, 24, 32, 40, 48, 56], limits: [8, 16, 24, 32, 40, 48, 56],
...@@ -80,8 +71,7 @@ layui.config({ ...@@ -80,8 +71,7 @@ layui.config({
form.render(); form.render();
} }
$("body").on("click", "#formSearch", function(){ $("body").on("click", "#formSearch", function(){
refreshTable(); refreshTable();
}); });
...@@ -109,12 +99,19 @@ layui.config({ ...@@ -109,12 +99,19 @@ layui.config({
}); });
function loadTable(){ function loadTable(){
layui.table.reload("messageTable", {where:{gradeName:$("#gradeName").val(), schoolId:$("#schoolId").val()}}); layui.table.reload("messageTable", {where: getTableParams()});
} }
function refreshTable(){ function refreshTable(){
layui.table.reload("messageTable", {page: {curr: 1}, where:{gradeName:$("#gradeName").val(), schoolId:$("#schoolId").val()}}); layui.table.reload("messageTable", {page: {curr: 1}, where: getTableParams()});
} }
function getTableParams() {
return {
gradeName: $("#gradeName").val(),
schoolId: $("#schoolId").val()
};
}
exports('schoolgradeSublist', {}); exports('schoolgradeSublist', {});
}); });
...@@ -15,21 +15,13 @@ layui.config({ ...@@ -15,21 +15,13 @@ layui.config({
matchingLanguage(); matchingLanguage();
form.render(); form.render();
//加载所属学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "OverAllSchool", $("#OverAllSchool").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, loadParentGrade();
pagination: false, });
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(json){
loadParentGrade();
form.render('select');
}
});
form.on('select(OverAllSchool)', function(data){ form.on('select(OverAllSchool)', function(data){
loadParentGrade(); loadParentGrade();
}); });
...@@ -65,7 +57,6 @@ layui.config({ ...@@ -65,7 +57,6 @@ layui.config({
}); });
form.on('submit(formAddBean)', function (data) { form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
var pId = '0'; var pId = '0';
var yearN = 0; var yearN = 0;
......
...@@ -8,28 +8,20 @@ layui.config({ ...@@ -8,28 +8,20 @@ layui.config({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'treeGrid', 'jquery', 'winui', 'form'], function (exports) { }).define(['window', 'treeGrid', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor(); winui.renderColor();
var $ = layui.$, var $ = layui.$,
form = layui.form, form = layui.form,
treeGrid = layui.treeGrid; treeGrid = layui.treeGrid;
authBtn('1586314893391'); authBtn('1586314893391');
//初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, initTable();
pagination: false, });
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendAfter: function(json){
form.render('select');
initTable();
}
})
function initTable(){ function initTable(){
treeGrid.render({ treeGrid.render({
id: 'messageTable', id: 'messageTable',
elem: '#messageTable', elem: '#messageTable',
...@@ -37,7 +29,7 @@ layui.config({ ...@@ -37,7 +29,7 @@ layui.config({
idField: 'id', idField: 'id',
url: schoolBasePath + 'grademation001', url: schoolBasePath + 'grademation001',
cellMinWidth: 100, cellMinWidth: 100,
where:{gradeName: $("#gradeName").val(), schoolId: $("#schoolId").val()}, where: getTableParams(),
treeId: 'id',//树形id字段名称 treeId: 'id',//树形id字段名称
treeUpId: 'pId',//树形父id字段名称 treeUpId: 'pId',//树形父id字段名称
treeShowName: 'gradeName',//以树形式显示的字段 treeShowName: 'gradeName',//以树形式显示的字段
...@@ -71,9 +63,7 @@ layui.config({ ...@@ -71,9 +63,7 @@ layui.config({
form.render(); form.render();
} }
form.on('submit(formSearch)', function (data) { form.on('submit(formSearch)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
loadTable(); loadTable();
} }
...@@ -160,8 +150,15 @@ layui.config({ ...@@ -160,8 +150,15 @@ layui.config({
} }
function loadTable(){ function loadTable(){
treeGrid.query("messageTable", {where:{gradeName: $("#gradeName").val(), schoolId: $("#schoolId").val()}}); treeGrid.query("messageTable", {where: getTableParams()});
} }
function getTableParams() {
return {
gradeName: $("#gradeName").val(),
schoolId: $("#schoolId").val()
};
}
exports('schoolgrademationlist', {}); exports('schoolgrademationlist', {});
}); });
...@@ -9,24 +9,16 @@ layui.config({ ...@@ -9,24 +9,16 @@ layui.config({
layui.use(['form'], function (form) { layui.use(['form'], function (form) {
var index = parent.layer.getFrameIndex(window.name); var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$; var $ = layui.$;
//初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, });
pagination: false,
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(json){
form.render("select");
}
});
matchingLanguage(); matchingLanguage();
form.render(); form.render();
form.on('submit(formAddBean)', function (data) { form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
var params = { var params = {
name: $("#typeName").val(), name: $("#typeName").val(),
......
...@@ -17,21 +17,12 @@ layui.config({ ...@@ -17,21 +17,12 @@ layui.config({
pagination: false, pagination: false,
template: getFileContent('tpl/schoolsemester/schoolsemestereditTemplate.tpl'), template: getFileContent('tpl/schoolsemester/schoolsemestereditTemplate.tpl'),
ajaxSendAfter:function(json){ ajaxSendAfter:function(json){
// 获取当前登陆用户所属的学校列表
//初始化学校 schoolUtil.queryMyBelongSchoolList(function (data) {
showGrid({ $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), data));
id: "schoolId", $("#schoolId").val(json.bean.schoolId);
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, });
pagination: false,
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(data){
$("#schoolId").val(json.bean.schoolId);
form.render("select");
}
});
matchingLanguage(); matchingLanguage();
form.on('submit(formEditBean)', function (data) { form.on('submit(formEditBean)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
......
...@@ -7,34 +7,26 @@ layui.config({ ...@@ -7,34 +7,26 @@ layui.config({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { }).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor(); winui.renderColor();
var $ = layui.$, var $ = layui.$,
form = layui.form, form = layui.form,
table = layui.table; table = layui.table;
authBtn('1586148450500'); authBtn('1586148450500');
//初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, initTable();
pagination: false, });
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(json){
initTable();
}
});
function initTable(){ function initTable(){
table.render({ table.render({
id: 'messageTable', id: 'messageTable',
elem: '#messageTable', elem: '#messageTable',
method: 'post', method: 'post',
url: schoolBasePath + 'schoolsemester001', url: schoolBasePath + 'schoolsemester001',
where: {name: $("#typeName").val(), schoolId: $("#schoolId").val()}, where: getTableParams(),
even: true, even: true,
page: true, page: true,
limits: getLimits(), limits: getLimits(),
...@@ -63,8 +55,7 @@ layui.config({ ...@@ -63,8 +55,7 @@ layui.config({
} }
form.render(); form.render();
$("body").on("click", "#formSearch", function(){ $("body").on("click", "#formSearch", function(){
refreshTable(); refreshTable();
}); });
...@@ -126,12 +117,19 @@ layui.config({ ...@@ -126,12 +117,19 @@ layui.config({
}); });
function loadTable(){ function loadTable(){
table.reload("messageTable", {where:{name:$("#typeName").val(), schoolId: $("#schoolId").val()}}); table.reload("messageTable", {where: getTableParams()});
} }
function refreshTable(){ function refreshTable(){
table.reload("messageTable", {page: {curr: 1}, where:{name:$("#typeName").val(), schoolId: $("#schoolId").val()}}); table.reload("messageTable", {page: {curr: 1}, where: getTableParams()});
} }
function getTableParams() {
return {
name: $("#typeName").val(),
schoolId: $("#schoolId").val()
};
}
exports('schoolsemesterlist', {}); exports('schoolsemesterlist', {});
}); });
...@@ -8,24 +8,17 @@ layui.config({ ...@@ -8,24 +8,17 @@ layui.config({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { }).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor(); winui.renderColor();
var $ = layui.$, var $ = layui.$,
form = layui.form, form = layui.form,
table = layui.table; table = layui.table;
//初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, // 加载年级
pagination: false, initGradeId();
template: getFileContent('tpl/template/select-option-must.tpl'), initTable();
ajaxSendAfter: function(json){
form.render('select');
//加载年级
initGradeId();
initTable();
}
}); });
//学校监听事件 //学校监听事件
form.on('select(schoolId)', function(data){ form.on('select(schoolId)', function(data){
...@@ -50,13 +43,12 @@ layui.config({ ...@@ -50,13 +43,12 @@ layui.config({
} }
function initTable(){ function initTable(){
table.render({ table.render({
id: 'messageTable', id: 'messageTable',
elem: '#messageTable', elem: '#messageTable',
method: 'post', method: 'post',
url: schoolBasePath + 'studentmation003', url: schoolBasePath + 'studentmation003',
where:{gradeId: $("#gradeId").val(), schoolId: $("#schoolId").val(), studentName: $("#studentName").val()}, where: getTableParams(),
even: true, even: true,
page: true, page: true,
limits: [8, 16, 24, 32, 40, 48, 56], limits: [8, 16, 24, 32, 40, 48, 56],
...@@ -94,7 +86,6 @@ layui.config({ ...@@ -94,7 +86,6 @@ layui.config({
form.render(); form.render();
} }
$("body").on("click", "#formSearch", function(){ $("body").on("click", "#formSearch", function(){
refreshTable(); refreshTable();
}); });
...@@ -135,12 +126,20 @@ layui.config({ ...@@ -135,12 +126,20 @@ layui.config({
}); });
function loadTable(){ function loadTable(){
table.reload("messageTable", {where:{gradeId: $("#gradeId").val(), schoolId: $("#schoolId").val(), studentName: $("#studentName").val()}}); table.reload("messageTable", {where: getTableParams()});
} }
function refreshTable(){ function refreshTable(){
table.reload("messageTable", {page: {curr: 1}, where:{gradeId: $("#gradeId").val(), schoolId: $("#schoolId").val(), studentName: $("#studentName").val()}}); table.reload("messageTable", {page: {curr: 1}, where: getTableParams()});
} }
function getTableParams() {
return {
gradeId: $("#gradeId").val(),
schoolId: $("#schoolId").val(),
studentName: $("#studentName").val()
};
}
exports('schoolNotInClassStudentInSchooLlist', {}); exports('schoolNotInClassStudentInSchooLlist', {});
}); });
...@@ -41,36 +41,28 @@ layui.config({ ...@@ -41,36 +41,28 @@ layui.config({
matchingLanguage(); matchingLanguage();
form.render(); form.render();
//所属学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, // 加载年级
pagination: false, initGradeId();
template: getFileContent('tpl/template/select-option-must.tpl'), // 加载交通方式
ajaxSendLoadBefore: function(hdb){ initTransportationId();
}, // 加载家庭情况
ajaxSendAfter:function(json){ initHomeSituationId();
form.render('select'); // 加载身心障碍
//加载年级 initBodyMindId();
initGradeId(); });
//加载交通方式 // 学校监听事件
initTransportationId();
//加载家庭情况
initHomeSituationId();
//加载身心障碍
initBodyMindId();
}
});
//学校监听事件
form.on('select(schoolId)', function(data){ form.on('select(schoolId)', function(data){
//加载年级 // 加载年级
initGradeId(); initGradeId();
//加载交通方式 // 加载交通方式
initTransportationId(); initTransportationId();
//加载家庭情况 // 加载家庭情况
initHomeSituationId(); initHomeSituationId();
//加载身心障碍 // 加载身心障碍
initBodyMindId(); initBodyMindId();
}); });
...@@ -178,7 +170,6 @@ layui.config({ ...@@ -178,7 +170,6 @@ layui.config({
} }
form.on('submit(formAddBean)', function (data) { form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
var userPhoto = $("#userPhoto").find("input[type='hidden'][name='upload']").attr("oldurl"); var userPhoto = $("#userPhoto").find("input[type='hidden'][name='upload']").attr("oldurl");
var params = { var params = {
......
...@@ -8,30 +8,23 @@ layui.config({ ...@@ -8,30 +8,23 @@ layui.config({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { }).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor(); winui.renderColor();
var $ = layui.$, var $ = layui.$,
form = layui.form, form = layui.form,
table = layui.table; table = layui.table;
authBtn('1595157157794'); authBtn('1595157157794');
//初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, // 加载年级
pagination: false, initGradeId();
template: getFileContent('tpl/template/select-option-must.tpl'), initTable();
ajaxSendAfter: function(json){
form.render('select');
//加载年级
initGradeId();
initTable();
}
}); });
//学校监听事件 // 学校监听事件
form.on('select(schoolId)', function(data){ form.on('select(schoolId)', function(data){
//加载年级 // 加载年级
initGradeId(); initGradeId();
}); });
...@@ -126,7 +119,6 @@ layui.config({ ...@@ -126,7 +119,6 @@ layui.config({
form.render(); form.render();
} }
$("body").on("click", "#formSearch", function(){ $("body").on("click", "#formSearch", function(){
refreshTable(); refreshTable();
}); });
...@@ -183,7 +175,7 @@ layui.config({ ...@@ -183,7 +175,7 @@ layui.config({
table.reload("messageTable", {page: {curr: 1}, where: getTableParams()}); table.reload("messageTable", {page: {curr: 1}, where: getTableParams()});
} }
function getTableParams(){ function getTableParams() {
return { return {
gradeId: $("#gradeId").val(), gradeId: $("#gradeId").val(),
schoolId: $("#schoolId").val(), schoolId: $("#schoolId").val(),
......
...@@ -10,20 +10,13 @@ layui.config({ ...@@ -10,20 +10,13 @@ layui.config({
var index = parent.layer.getFrameIndex(window.name); var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$, var $ = layui.$,
textool = layui.textool; textool = layui.textool;
//初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, });
pagination: false,
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(json){
form.render("select");
}
});
textool.init({ textool.init({
eleId: 'desc', eleId: 'desc',
maxlength: 500, maxlength: 500,
......
...@@ -24,21 +24,14 @@ layui.config({ ...@@ -24,21 +24,14 @@ layui.config({
maxlength: 500, maxlength: 500,
tools: ['count', 'copy', 'reset'] tools: ['count', 'copy', 'reset']
}); });
//初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (data) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), data));
url: schoolBasePath + "schoolmation008", $("#schoolId").val(json.bean.schoolId);
params: {}, form.render("select");
pagination: false, });
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(data){
$("#schoolId").val(json.bean.schoolId);
form.render("select");
}
});
matchingLanguage(); matchingLanguage();
form.on('submit(formEditBean)', function (data) { form.on('submit(formEditBean)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
......
...@@ -12,20 +12,14 @@ layui.config({ ...@@ -12,20 +12,14 @@ layui.config({
table = layui.table; table = layui.table;
authBtn('1586094186431'); authBtn('1586094186431');
// 初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, initTable();
pagination: false, });
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(json){
initTable();
}
});
function initTable(){ function initTable(){
table.render({ table.render({
id: 'messageTable', id: 'messageTable',
...@@ -127,7 +121,7 @@ layui.config({ ...@@ -127,7 +121,7 @@ layui.config({
form.render(); form.render();
form.on('submit(formSearch)', function (data) { form.on('submit(formSearch)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
refreshTable(); table.reload("messageTable", {page: {curr: 1}, where: getTableParams()});
} }
return false; return false;
}); });
...@@ -140,10 +134,6 @@ layui.config({ ...@@ -140,10 +134,6 @@ layui.config({
function loadTable(){ function loadTable(){
table.reload("messageTable", {where: getTableParams()}); table.reload("messageTable", {where: getTableParams()});
} }
function refreshTable(){
table.reload("messageTable", {page: {curr: 1}, where: getTableParams()});
}
function getTableParams(){ function getTableParams(){
return { return {
......
...@@ -11,19 +11,13 @@ layui.config({ ...@@ -11,19 +11,13 @@ layui.config({
var $ = layui.$, var $ = layui.$,
form = layui.form, form = layui.form,
table = layui.table; table = layui.table;
// 初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, initTable();
pagination: false, });
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(json){
initTable();
}
});
// 学校教师列表 // 学校教师列表
function initTable(){ function initTable(){
......
...@@ -48,20 +48,14 @@ layui.config({ ...@@ -48,20 +48,14 @@ layui.config({
} }
s += '如没有查到要选择的人员,请检查人员信息是否满足当前规则。'; s += '如没有查到要选择的人员,请检查人员信息是否满足当前规则。';
$("#showInfo").html(s); $("#showInfo").html(s);
//初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, initTable();
pagination: false, });
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(json){
initTable();
}
});
function initTable(){ function initTable(){
if(checkType == '2'){ if(checkType == '2'){
//初始化值 //初始化值
...@@ -80,8 +74,7 @@ layui.config({ ...@@ -80,8 +74,7 @@ layui.config({
fieldName: 'staffId' fieldName: 'staffId'
}); });
} }
table.render({ table.render({
id: 'messageTable', id: 'messageTable',
elem: '#messageTable', elem: '#messageTable',
...@@ -140,8 +133,7 @@ layui.config({ ...@@ -140,8 +133,7 @@ layui.config({
form.render(); form.render();
}) })
}else{ }else{
//多选 //多选 设置选中
//设置选中
tableCheckBoxUtil.checkedDefault({ tableCheckBoxUtil.checkedDefault({
gridId: 'messageTable', gridId: 'messageTable',
fieldName: 'staffId' fieldName: 'staffId'
...@@ -154,15 +146,7 @@ layui.config({ ...@@ -154,15 +146,7 @@ layui.config({
var data = obj.data; var data = obj.data;
var layEvent = obj.event; var layEvent = obj.event;
if (layEvent === 'userPhoto') { //头像预览 if (layEvent === 'userPhoto') { //头像预览
layer.open({ systemCommonUtil.showPicImg(systemCommonUtil.getFilePath(data.userPhoto));
type:1,
title:false,
closeBtn:0,
skin: 'demo-class',
shadeClose:true,
content:'<img src="' + fileBasePath + data.userPhoto + '" style="max-height:600px;max-width:100%;">',
scrollbar:false
});
} }
}); });
......
...@@ -7,35 +7,25 @@ layui.config({ ...@@ -7,35 +7,25 @@ layui.config({
}).extend({ }).extend({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'opTable', 'jquery', 'winui', 'form'], function (exports) { }).define(['window', 'opTable', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor(); winui.renderColor();
var $ = layui.$, var $ = layui.$,
form = layui.form; form = layui.form;
var opTable; var opTable;
//初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, initTable();
pagination: false, });
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(json){
initTable();
}
});
function initTable(){ function initTable(){
opTable = layui.opTable.render({ opTable = layui.opTable.render({
id: 'messageTable', id: 'messageTable',
elem: '#messageTable', elem: '#messageTable',
method: 'post', method: 'post',
url: schoolBasePath + 'schoolteachersubject001', url: schoolBasePath + 'schoolteachersubject001',
where: {userName:$("#userName").val(), userSex:$("#userSex").val(), userIdCard:$("#userIdCard").val(), schoolId:$("#schoolId").val()}, where: getTableParams(),
even: true, even: true,
page: true, page: true,
limits: [8, 16, 24, 32, 40, 48, 56], limits: [8, 16, 24, 32, 40, 48, 56],
...@@ -116,7 +106,6 @@ layui.config({ ...@@ -116,7 +106,6 @@ layui.config({
form.render(); form.render();
} }
$("body").on("click", "#formSearch", function(){ $("body").on("click", "#formSearch", function(){
refreshTable(); refreshTable();
}); });
...@@ -156,12 +145,21 @@ layui.config({ ...@@ -156,12 +145,21 @@ layui.config({
}); });
function loadTable(){ function loadTable(){
layui.table.reload("messageTable", {where:{userName:$("#userName").val(), userSex:$("#userSex").val(), userIdCard:$("#userIdCard").val(), schoolId:$("#schoolId").val()}}); layui.table.reload("messageTable", {where: getTableParams()});
} }
function refreshTable(){ function refreshTable(){
layui.table.reload("messageTable", {page: {curr: 1}, where:{userName:$("#userName").val(), userSex:$("#userSex").val(), userIdCard:$("#userIdCard").val(), schoolId:$("#schoolId").val()}}); layui.table.reload("messageTable", {page: {curr: 1}, where: getTableParams()});
} }
function getTableParams() {
return {
userName: $("#userName").val(),
userSex: $("#userSex").val(),
userIdCard: $("#userIdCard").val(),
schoolId: $("#schoolId").val()
};
}
exports('schoolteacherSublist', {}); exports('schoolteacherSublist', {});
}); });
...@@ -9,20 +9,13 @@ layui.config({ ...@@ -9,20 +9,13 @@ layui.config({
layui.use(['form'], function (form) { layui.use(['form'], function (form) {
var index = parent.layer.getFrameIndex(window.name); var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$; var $ = layui.$;
//初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, });
pagination: false,
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(json){
form.render("select");
}
});
matchingLanguage(); matchingLanguage();
form.render(); form.render();
form.on('submit(formAddBean)', function (data) { form.on('submit(formAddBean)', function (data) {
......
...@@ -17,21 +17,13 @@ layui.config({ ...@@ -17,21 +17,13 @@ layui.config({
pagination: false, pagination: false,
template: getFileContent('tpl/schooltransportation/schooltransportationeditTemplate.tpl'), template: getFileContent('tpl/schooltransportation/schooltransportationeditTemplate.tpl'),
ajaxSendAfter:function(json){ ajaxSendAfter:function(json){
// 获取当前登陆用户所属的学校列表
//初始化学校 schoolUtil.queryMyBelongSchoolList(function (data) {
showGrid({ $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), data));
id: "schoolId", $("#schoolId").val(json.bean.schoolId);
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, });
pagination: false,
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(data){
$("#schoolId").val(json.bean.schoolId);
form.render("select");
}
});
matchingLanguage(); matchingLanguage();
form.on('submit(formEditBean)', function (data) { form.on('submit(formEditBean)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
......
...@@ -7,33 +7,26 @@ layui.config({ ...@@ -7,33 +7,26 @@ layui.config({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { }).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor(); winui.renderColor();
var $ = layui.$, var $ = layui.$,
form = layui.form, form = layui.form,
table = layui.table; table = layui.table;
authBtn('1586100637525'); authBtn('1586100637525');
//初始化学校 // 获取当前登陆用户所属的学校列表
showGrid({ schoolUtil.queryMyBelongSchoolList(function (json) {
id: "schoolId", $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
url: schoolBasePath + "schoolmation008", form.render("select");
params: {}, initTable();
pagination: false, });
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(json){
initTable();
}
});
function initTable(){ function initTable(){
table.render({ table.render({
id: 'messageTable', id: 'messageTable',
elem: '#messageTable', elem: '#messageTable',
method: 'post', method: 'post',
url: schoolBasePath + 'schooltransportation001', url: schoolBasePath + 'schooltransportation001',
where: {name: $("#typeName").val(), schoolId: $("#schoolId").val()}, where: getTableParams(),
even: true, even: true,
page: true, page: true,
limits: getLimits(), limits: getLimits(),
...@@ -62,8 +55,6 @@ layui.config({ ...@@ -62,8 +55,6 @@ layui.config({
} }
form.render(); form.render();
$("body").on("click", "#formSearch", function(){ $("body").on("click", "#formSearch", function(){
refreshTable(); refreshTable();
}); });
...@@ -125,12 +116,19 @@ layui.config({ ...@@ -125,12 +116,19 @@ layui.config({
}); });
function loadTable(){ function loadTable(){
table.reload("messageTable", {where:{name:$("#typeName").val(), schoolId: $("#schoolId").val()}}); table.reload("messageTable", {where: getTableParams()});
} }
function refreshTable(){ function refreshTable(){
table.reload("messageTable", {page: {curr: 1}, where:{name:$("#typeName").val(), schoolId: $("#schoolId").val()}}); table.reload("messageTable", {page: {curr: 1}, where: getTableParams()});
} }
function getTableParams() {
return {
name: $("#typeName").val(),
schoolId: $("#schoolId").val()
};
}
exports('schooltransportationlist', {}); exports('schooltransportationlist', {});
}); });
...@@ -32,6 +32,7 @@ var customerJS = { ...@@ -32,6 +32,7 @@ var customerJS = {
"organizationUtil": "../../assets/lib/layui/customer/organizationUtil.js", // 组织机构相关工具类 "organizationUtil": "../../assets/lib/layui/customer/organizationUtil.js", // 组织机构相关工具类
"threeUtil": "../../assets/lib/layui/customer/threeUtil.js", // 3D编辑器相关工具类 "threeUtil": "../../assets/lib/layui/customer/threeUtil.js", // 3D编辑器相关工具类
"reportModelTypeUtil": "../../assets/lib/layui/customer/reportModelTypeUtil.js", // 模型分类工具类 "reportModelTypeUtil": "../../assets/lib/layui/customer/reportModelTypeUtil.js", // 模型分类工具类
"schoolUtil": "../../assets/lib/layui/customer/schoolUtil.js", // 学校模块工具类
}; };
//系统基础信息 //系统基础信息
......
// 学校模块相关工具类
var schoolUtil = {
/**
* 获取当前登陆用户所属的学校列表
*
* @param callback 回执函数
*/
queryMyBelongSchoolList: function (callback) {
AjaxPostUtil.request({url: schoolBasePath + "schoolmation008", params: {}, type: 'json', method: "POST", callback: function(json) {
if (json.returnCode == 0) {
if (typeof(callback) == "function") {
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}, async: false});
},
};
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册