|
@@ -418,7 +418,7 @@ function delCourseType(course, courseId, userid) {
|
|
];
|
|
];
|
|
_userdata.unshift(_mysqlLabor[0], _mysqlLabor[1], "delete_courseType");
|
|
_userdata.unshift(_mysqlLabor[0], _mysqlLabor[1], "delete_courseType");
|
|
mysql.usselect(_userdata, function(ret) {
|
|
mysql.usselect(_userdata, function(ret) {
|
|
- console.log(ret);
|
|
|
|
|
|
+ // console.log(ret);
|
|
});
|
|
});
|
|
|
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
@@ -443,7 +443,7 @@ function addCourseType(userid, course, _courseId) {
|
|
];
|
|
];
|
|
_userdata.unshift(_mysqlLabor[0], _mysqlLabor[1], "add_courseType");
|
|
_userdata.unshift(_mysqlLabor[0], _mysqlLabor[1], "add_courseType");
|
|
mysql.usselect(_userdata, function(ret) {
|
|
mysql.usselect(_userdata, function(ret) {
|
|
- console.log(ret);
|
|
|
|
|
|
+ // console.log(ret);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -582,7 +582,7 @@ router.route('/updateWorkNew4').all((req, res, next) => {
|
|
} else {
|
|
} else {
|
|
_unitJson[_unitIndex] = _chapters[_unitIndex]
|
|
_unitJson[_unitIndex] = _chapters[_unitIndex]
|
|
}
|
|
}
|
|
- console.log(_unitJson);
|
|
|
|
|
|
+ // console.log(_unitJson);
|
|
let p2 = [req.body[0].cid, JSON.stringify(_unitJson).replaceAll(/%/g, "%25")];
|
|
let p2 = [req.body[0].cid, JSON.stringify(_unitJson).replaceAll(/%/g, "%25")];
|
|
p2.unshift(_mysqlLabor[0], _mysqlLabor[1], "update_teacher_work_new4"); //執行存儲過程
|
|
p2.unshift(_mysqlLabor[0], _mysqlLabor[1], "update_teacher_work_new4"); //執行存儲過程
|
|
mysql.usselect(p2, function(ret) {
|
|
mysql.usselect(p2, function(ret) {
|
|
@@ -600,7 +600,7 @@ router.route('/deleteWork').all((req, res, next) => {
|
|
p.unshift(_mysqlLabor[0], _mysqlLabor[1], "select_course_detail"); //執行存儲過程
|
|
p.unshift(_mysqlLabor[0], _mysqlLabor[1], "select_course_detail"); //執行存儲過程
|
|
mysql.usselect(p, function(ret) {
|
|
mysql.usselect(p, function(ret) {
|
|
let _chapid = req.body[0].chapid;
|
|
let _chapid = req.body[0].chapid;
|
|
- console.log(_chapid);
|
|
|
|
|
|
+ // console.log(_chapid);
|
|
let _chapters = JSON.parse(req.body[0].chapters);
|
|
let _chapters = JSON.parse(req.body[0].chapters);
|
|
let _unitJson = JSON.parse(ret[0][0].chapters)
|
|
let _unitJson = JSON.parse(ret[0][0].chapters)
|
|
let _unitJson2 = []
|
|
let _unitJson2 = []
|
|
@@ -612,7 +612,7 @@ router.route('/deleteWork').all((req, res, next) => {
|
|
// break;
|
|
// break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- console.log(_unitJson2);
|
|
|
|
|
|
+ // console.log(_unitJson2);
|
|
let p2 = [req.body[0].cid, JSON.stringify(_unitJson2).replaceAll(/%/g, "%25")];
|
|
let p2 = [req.body[0].cid, JSON.stringify(_unitJson2).replaceAll(/%/g, "%25")];
|
|
p2.unshift(_mysqlLabor[0], _mysqlLabor[1], "update_teacher_work_new4"); //執行存儲過程
|
|
p2.unshift(_mysqlLabor[0], _mysqlLabor[1], "update_teacher_work_new4"); //執行存儲過程
|
|
mysql.usselect(p2, function(ret) {
|
|
mysql.usselect(p2, function(ret) {
|
|
@@ -629,7 +629,7 @@ router.route('/restoreWork').all((req, res, next) => {
|
|
p.unshift(_mysqlLabor[0], _mysqlLabor[1], "select_course_detail"); //執行存儲過程
|
|
p.unshift(_mysqlLabor[0], _mysqlLabor[1], "select_course_detail"); //執行存儲過程
|
|
mysql.usselect(p, function(ret) {
|
|
mysql.usselect(p, function(ret) {
|
|
let _chapid = req.body[0].chapid;
|
|
let _chapid = req.body[0].chapid;
|
|
- console.log(_chapid);
|
|
|
|
|
|
+ // console.log(_chapid);
|
|
let _chapters = JSON.parse(req.body[0].chapters);
|
|
let _chapters = JSON.parse(req.body[0].chapters);
|
|
let _unitJson = JSON.parse(ret[0][0].chapters)
|
|
let _unitJson = JSON.parse(ret[0][0].chapters)
|
|
let _unitJson2 = []
|
|
let _unitJson2 = []
|
|
@@ -648,7 +648,7 @@ router.route('/restoreWork').all((req, res, next) => {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
_unitJson2.splice(chpaindex, 0, _chapters[chpaindex])
|
|
_unitJson2.splice(chpaindex, 0, _chapters[chpaindex])
|
|
- console.log(_unitJson2);
|
|
|
|
|
|
+ // console.log(_unitJson2);
|
|
let p2 = [req.body[0].cid, JSON.stringify(_unitJson2).replaceAll(/%/g, "%25")];
|
|
let p2 = [req.body[0].cid, JSON.stringify(_unitJson2).replaceAll(/%/g, "%25")];
|
|
p2.unshift(_mysqlLabor[0], _mysqlLabor[1], "update_teacher_work_new4"); //執行存儲過程
|
|
p2.unshift(_mysqlLabor[0], _mysqlLabor[1], "update_teacher_work_new4"); //執行存儲過程
|
|
mysql.usselect(p2, function(ret) {
|
|
mysql.usselect(p2, function(ret) {
|