|
@@ -6499,6 +6499,55 @@ router.route("/getDataBoardStudentCourseNew").all((req, res, next) => {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
+//数据看板-学生数据
|
|
|
+router.route("/getDataBoardStudentNew").all((req, res, next) => {
|
|
|
+ let p = Object.values(req.body[0]);
|
|
|
+ let d = Object.values(req.body[0]);
|
|
|
+ console.log(p)
|
|
|
+ p.unshift(_mysqlLabor[0], _mysqlLabor[1], 'getDataBoard');
|
|
|
+ mysql.usselect(p, function(ret) {
|
|
|
+ if(!ret[0].length){
|
|
|
+ let p2 = [d[0], d[1]];
|
|
|
+ p2.unshift(_mysqlLabor[0], _mysqlLabor[1], 'selectDataBoardStudentNew');
|
|
|
+ mysql.usselect(p2, function(ret) {
|
|
|
+ res.end(JSON.stringify(ret));
|
|
|
+ let p3 = [d[0], d[1],encodeURIComponent(JSON.stringify(ret)),'5'];
|
|
|
+ p3.unshift(_mysqlLabor[0], _mysqlLabor[1], 'addDataBoard');
|
|
|
+ mysql.usselect(p3, function(ret) {})
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ console.log(1);
|
|
|
+ res.end(ret[0][0].json);
|
|
|
+ }
|
|
|
+ // res.end(JSON.stringify(ret));
|
|
|
+ });
|
|
|
+});
|
|
|
+
|
|
|
+
|
|
|
+//数据看板-教师数据
|
|
|
+router.route("/getDataBoardTeacherNew").all((req, res, next) => {
|
|
|
+ let p = Object.values(req.body[0]);
|
|
|
+ let d = Object.values(req.body[0]);
|
|
|
+ console.log(p)
|
|
|
+ p.unshift(_mysqlLabor[0], _mysqlLabor[1], 'getDataBoard');
|
|
|
+ mysql.usselect(p, function(ret) {
|
|
|
+ if(!ret[0].length){
|
|
|
+ let p2 = [d[0], d[1]];
|
|
|
+ p2.unshift(_mysqlLabor[0], _mysqlLabor[1], 'selectDataBoardTeacherNew');
|
|
|
+ mysql.usselect(p2, function(ret) {
|
|
|
+ res.end(JSON.stringify(ret));
|
|
|
+ let p3 = [d[0], d[1],encodeURIComponent(JSON.stringify(ret)),'4'];
|
|
|
+ p3.unshift(_mysqlLabor[0], _mysqlLabor[1], 'addDataBoard');
|
|
|
+ mysql.usselect(p3, function(ret) {})
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ console.log(1);
|
|
|
+ res.end(ret[0][0].json);
|
|
|
+ }
|
|
|
+ // res.end(JSON.stringify(ret));
|
|
|
+ });
|
|
|
+});
|
|
|
+
|
|
|
|
|
|
//数据看板-查询项目数据长度
|
|
|
router.route("/getCourseLength").all((req, res, next) => {
|