|
@@ -587,6 +587,14 @@ router.route("/updateClass").get((req, res, next) => {
|
|
|
var json = queryString(req.url);
|
|
var json = queryString(req.url);
|
|
|
getmysql2(req, res, "updateClass", json["id"], json["n"], json["oid"]);
|
|
getmysql2(req, res, "updateClass", json["id"], json["n"], json["oid"]);
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+/* 修改班级 修1 */
|
|
|
|
|
+router.route("/updateClassNew").get((req, res, next) => {
|
|
|
|
|
+ var json = queryString(req.url);
|
|
|
|
|
+ getmysql2(req, res, "updateClassNew", json["id"], json["n"],json["pid"], json["oid"]);
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
// 修改教研室 修1
|
|
// 修改教研室 修1
|
|
|
router.route("/updateTeacherOffice").get((req, res, next) => {
|
|
router.route("/updateTeacherOffice").get((req, res, next) => {
|
|
|
var json = queryString(req.url);
|
|
var json = queryString(req.url);
|
|
@@ -624,6 +632,12 @@ router.route("/selectGrade").all((req, res, next) => {
|
|
|
getmysql(req, res, "selectGrade", json["cu"], json["oid"], json["cn"], json["page"], 10);
|
|
getmysql(req, res, "selectGrade", json["cu"], json["oid"], json["cn"], json["page"], 10);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+/* 新学生管理查询年级 */
|
|
|
|
|
+router.route("/selectGradenewyym").all((req, res, next) => {
|
|
|
|
|
+ var json = queryString(req.url);
|
|
|
|
|
+ getmysql(req, res, "selectGradenewyym", json["cu"], json["oid"]);
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
/* 删除1班级 */
|
|
/* 删除1班级 */
|
|
|
router.route("/deleteClass").all((req, res, next) => {
|
|
router.route("/deleteClass").all((req, res, next) => {
|
|
|
var json = queryString(req.url);
|
|
var json = queryString(req.url);
|
|
@@ -1644,6 +1658,84 @@ router.route("/selectStudentManage").all((req, res, next) => {
|
|
|
json["num"]
|
|
json["num"]
|
|
|
);
|
|
);
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+// 查询自主学习学习任务 yym
|
|
|
|
|
+router.route("/get_cocostudytest").all((req, res, next) => {
|
|
|
|
|
+ var json = queryString(req.url);
|
|
|
|
|
+ getmysql(
|
|
|
|
|
+ req,
|
|
|
|
|
+ res,
|
|
|
|
|
+ "get_cocostudytest",
|
|
|
|
|
+ json["uid"],
|
|
|
|
|
+ json["cid"],
|
|
|
|
|
+ json["type"],
|
|
|
|
|
+ json["sea"],
|
|
|
|
|
+ json["state"],
|
|
|
|
|
+ json["page"],
|
|
|
|
|
+ json["pagesize"]
|
|
|
|
|
+ );
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
|
|
+// 自主学习查询题目 yym
|
|
|
|
|
+router.route("/getCocostudyTestData").all((req, res, next) => {
|
|
|
|
|
+ var json = queryString(req.url);
|
|
|
|
|
+ getmysql(
|
|
|
|
|
+ req,
|
|
|
|
|
+ res,
|
|
|
|
|
+ "getCocostudyTestData",
|
|
|
|
|
+ json["uid"],
|
|
|
|
|
+ json["tid"]
|
|
|
|
|
+ );
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
|
|
+// 查询错题 yym
|
|
|
|
|
+router.route("/selectcocostudyminbook").all((req, res, next) => {
|
|
|
|
|
+ var json = queryString(req.url);
|
|
|
|
|
+ getmysql(
|
|
|
|
|
+ req,
|
|
|
|
|
+ res,
|
|
|
|
|
+ "selectcocostudyminbook",
|
|
|
|
|
+ json["uid"],
|
|
|
|
|
+ json["sid"],
|
|
|
|
|
+ json["keyword"],
|
|
|
|
|
+ json["mastered"],
|
|
|
|
|
+ json["page"],
|
|
|
|
|
+ json["pageSize"],
|
|
|
|
|
+ );
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
|
|
+// 自主学习查询所有本表单所有批改数据 yym
|
|
|
|
|
+router.route("/selectcocostudyallsco").all((req, res, next) => {
|
|
|
|
|
+ var json = queryString(req.url);
|
|
|
|
|
+ getmysql(
|
|
|
|
|
+ req,
|
|
|
|
|
+ res,
|
|
|
|
|
+ "selectcocostudyallsco",
|
|
|
|
|
+ json["uid"],
|
|
|
|
|
+ json["tid"]
|
|
|
|
|
+ );
|
|
|
|
|
+});
|
|
|
|
|
+// 自主学习提交错题本 yym
|
|
|
|
|
+router.route("/addcocostudyminbook").all((req, res, next) => {
|
|
|
|
|
+ postmysql(req, res, "addcocostudyminbook");
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
|
|
+// 自主学习移除错题 yym
|
|
|
|
|
+router.route("/removecocostudyminbook").all((req, res, next) => {
|
|
|
|
|
+ postmysql(req, res, "removecocostudyminbook");
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
|
|
+// 自主学习提交答案 yym
|
|
|
|
|
+router.route("/updateCocostudyTestData").all((req, res, next) => {
|
|
|
|
|
+ postmysql(req, res, "updateCocostudyTestData");
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+// 自主学习批改作业 yym
|
|
|
|
|
+router.route("/updateCocostudysco").all((req, res, next) => {
|
|
|
|
|
+ postmysql(req, res, "updateCocostudysco");
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
// 新学生管理查询学生带排序 yym
|
|
// 新学生管理查询学生带排序 yym
|
|
|
router.route("/selectStudentManagesrt").all((req, res, next) => {
|
|
router.route("/selectStudentManagesrt").all((req, res, next) => {
|
|
|
var json = queryString(req.url);
|
|
var json = queryString(req.url);
|
|
@@ -6638,6 +6730,11 @@ router.route("/addClassgra").all((req, res, next) => {
|
|
|
postmysql(req, res, "addClassgra");
|
|
postmysql(req, res, "addClassgra");
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+//添加班级 yym
|
|
|
|
|
+router.route("/addClassgraNew").all((req, res, next) => {
|
|
|
|
|
+ postmysql(req, res, "addClassgraNew");
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
//禁用启用社区 yym
|
|
//禁用启用社区 yym
|
|
|
router.route("/updateCyOP").all((req, res, next) => {
|
|
router.route("/updateCyOP").all((req, res, next) => {
|
|
|
postmysql(req, res, "updateCyOP");
|
|
postmysql(req, res, "updateCyOP");
|
|
@@ -6649,6 +6746,20 @@ router.route("/selectliyuanByIc2SZ").all((req, res, next) => {
|
|
|
getmysql(req, res, "selectliyuanByIc2SZ", json["code"], json["oid"],json["orgL"]);
|
|
getmysql(req, res, "selectliyuanByIc2SZ", json["code"], json["oid"],json["orgL"]);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+// 笔架山获取拔尖人才课程 yym
|
|
|
|
|
+router.route("/selectPersonCourseList").all((req, res, next) => {
|
|
|
|
|
+ var json = queryString(req.url);
|
|
|
|
|
+ getmysql(
|
|
|
|
|
+ req,
|
|
|
|
|
+ res,
|
|
|
|
|
+ "selectPersonCourseList",
|
|
|
|
|
+ json["oid"],
|
|
|
|
|
+ json["inp"],
|
|
|
|
|
+ json["page"],
|
|
|
|
|
+ json["num"]
|
|
|
|
|
+ );
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
// 新学生管理 获取年级与班级 yym
|
|
// 新学生管理 获取年级与班级 yym
|
|
|
router.route("/selectGradeNew").all((req, res, next) => {
|
|
router.route("/selectGradeNew").all((req, res, next) => {
|
|
|
var json = queryString(req.url);
|
|
var json = queryString(req.url);
|
|
@@ -6966,6 +7077,63 @@ router.route("/batchRegistrationMoreCopy").post(function(req, res, next) {
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+//批量添加学生 新学生管理批量添加修改学生账号
|
|
|
|
|
+router.route("/batchRegistrationMoreCopyNew").post(function(req, res, next) {
|
|
|
|
|
+ let users = req.body[0];
|
|
|
|
|
+ let arr = JSON.parse(decodeURIComponent(req.body[0].arr));
|
|
|
|
|
+ for (let i = 0; i < arr.length; i++) {
|
|
|
|
|
+ let _username = encodeURIComponent(arr[i].name);
|
|
|
|
|
+ let _mail = encodeURIComponent(arr[i].mail)
|
|
|
|
|
+ let _password = users.password || "Coco1234";
|
|
|
|
|
+ let _alias = encodeURIComponent(arr[i].name)
|
|
|
|
|
+ let _oid = users.oid;
|
|
|
|
|
+ let _ph = encodeURIComponent(arr[i].phone ? arr[i].phone : "")
|
|
|
|
|
+ let _class = encodeURIComponent(arr[i].class)
|
|
|
|
|
+ let _sId = encodeURIComponent(arr[i].sId)
|
|
|
|
|
+ //加密密碼
|
|
|
|
|
+ _password = bcrypt.hashSync(_password, bcrypt.genSaltSync(10));
|
|
|
|
|
+ //生成激活碼
|
|
|
|
|
+ let _hashstr = new Date().getTime() + "";
|
|
|
|
|
+ let _digest = crypto
|
|
|
|
|
+ .createHash("sha256")
|
|
|
|
|
+ .update(_hashstr, "utf8")
|
|
|
|
|
+ .digest("hex");
|
|
|
|
|
+ //用戶數據
|
|
|
|
|
+ let _userdata = [
|
|
|
|
|
+ _mail,
|
|
|
|
|
+ _password,
|
|
|
|
|
+ _alias,
|
|
|
|
|
+ "",
|
|
|
|
|
+ 1, //0老师 1学生
|
|
|
|
|
+ _username,
|
|
|
|
|
+ "",
|
|
|
|
|
+ generateAPIKey(_username),
|
|
|
|
|
+ _digest,
|
|
|
|
|
+ "",
|
|
|
|
|
+ _username,
|
|
|
|
|
+ _sId,
|
|
|
|
|
+ 2, //1老师 2学生
|
|
|
|
|
+ _oid,
|
|
|
|
|
+ _ph,
|
|
|
|
|
+ _class,
|
|
|
|
|
+ "",
|
|
|
|
|
+ "0",
|
|
|
|
|
+ ];
|
|
|
|
|
+ //參數拼接,註冊
|
|
|
|
|
+ _userdata.unshift(_mysqluser[0], _mysqluser[1], "pbl_add_batchregisterNew");
|
|
|
|
|
+ //用戶註冊處理
|
|
|
|
|
+ mysql.usselect(_userdata, function(ret) {
|
|
|
|
|
+ let _pbluserdata = [ ret[1][0].uid ];
|
|
|
|
|
+ _pbluserdata.unshift(_mysqlLabor[0], _mysqlLabor[1], "updateAccountList");
|
|
|
|
|
+ mysql.usselect(_pbluserdata, function(ret) {
|
|
|
|
|
+ res.end(JSON.stringify({ success: 1 }));
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -9859,6 +10027,64 @@ router.route("/select_course_personalization_student").all((req,res,next)=>{
|
|
|
getmysql(req, res, "select_course_personalization_student",json["uid"],json['cid']);
|
|
getmysql(req, res, "select_course_personalization_student",json["uid"],json['cid']);
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+//qgt workPage修改settings
|
|
|
|
|
+router.route("/update_workPage_setting").all((req,res,next)=>{
|
|
|
|
|
+ postmysql(req, res, "update_workPage_setting");
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+//qgt workPage修改json
|
|
|
|
|
+router.route("/updata_workPage_json").all((req,res,next)=>{
|
|
|
|
|
+ postmysql(req, res, "updata_workPage_json");
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+//qgt ppt课程-插入/修改ppt分析
|
|
|
|
|
+router.route("/insert_pptAnalysis").all((req,res,next)=>{
|
|
|
|
|
+ postmysql(req, res, "insert_pptAnalysis");
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+//qgt ppt课程-通过pid查询ppt分析
|
|
|
|
|
+router.route("/select_pptAnalysisByPid").all((req,res,next)=>{
|
|
|
|
|
+ var json = queryString(req.url);
|
|
|
|
|
+ getmysql(req, res, "select_pptAnalysisByPid",json["pid"]);
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+//qgt 自主学习-添加测验
|
|
|
|
|
+router.route("/insert_cocoStudyTest").all((req,res,next)=>{
|
|
|
|
|
+ postmysql(req, res, "insert_cocoStudyTest");
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+//qgt 自主学习-查询测验
|
|
|
|
|
+router.route("/select_cocoStudyTest").all((req,res,next)=>{
|
|
|
|
|
+ var json = queryString(req.url);
|
|
|
|
|
+ getmysql(req, res, "select_cocoStudyTest",json["uid"],json["grade"],json["subject"]);
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+//qgt 自主学习-查询单个测验
|
|
|
|
|
+router.route("/select_cocoStudyTest_ById").all((req,res,next)=>{
|
|
|
|
|
+ var json = queryString(req.url);
|
|
|
|
|
+ getmysql(req, res, "select_cocoStudyTest_ById",json["uid"],json["id"]);
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+//qgt 自主学习-修改测验的题目
|
|
|
|
|
+router.route("/update_cocoStudyTest_testJsonById").all((req,res,next)=>{
|
|
|
|
|
+ postmysql(req, res, "update_cocoStudyTest_testJsonById");
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+//qgt 自主学习-修改测验的json
|
|
|
|
|
+router.route("/update_cocoStudyTest_jsonById").all((req,res,next)=>{
|
|
|
|
|
+ postmysql(req, res, "update_cocoStudyTest_jsonById");
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+//qgt 自主学习-修改测验的配置
|
|
|
|
|
+router.route("/update_cocoStudyTest_settingById").all((req,res,next)=>{
|
|
|
|
|
+ postmysql(req, res, "update_cocoStudyTest_settingById");
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+//qgt 自主学习-获取已经做题的学生
|
|
|
|
|
+router.route("/select_cocoStudtWork_studentById").all((req,res,next)=>{
|
|
|
|
|
+ var json = queryString(req.url);
|
|
|
|
|
+ getmysql(req, res, "select_cocoStudtWork_studentById",json["uid"],json["id"]);
|
|
|
|
|
+})
|
|
|
|
|
|
|
|
|
|
|
|
|
//教师管理 查看填写范围的教师权限
|
|
//教师管理 查看填写范围的教师权限
|