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

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

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