diff --git a/src/views/DataAnalysis.vue b/src/views/DataAnalysis.vue
index b7aa140..3141eaa 100644
--- a/src/views/DataAnalysis.vue
+++ b/src/views/DataAnalysis.vue
@@ -4,10 +4,14 @@
+
+
+
+
具体用户分析
+
+
+
我是学生
我是老师
我是管理员
@@ -116,6 +119,20 @@ export default {
school_id: [
{required: true, message: '请输入学校id', trigger: 'blur'}
],
+ email: [
+ {required: true, message: '请输入邮箱', trigger: 'blur'},
+ {
+ type: 'string',
+ message: '邮箱格式不正确',
+ trigger: 'blur',
+ transform(value) {
+ if (!/^\w+((-\w+)|(\.\w+))*@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value)) {
+ return true
+ } else {
+ }
+ }
+ }
+ ],
},
pictures: [
'https://www.nudt.edu.cn/images/2020-09/315f04ae3e4e4e488db721ba151f0fcc.jpg',
@@ -165,39 +182,38 @@ export default {
},
submitFormRegister() {
const _this = this
+ console.log(this.ruleForm_register.email)
if (this.ruleForm_register.type === '') {
this.$message({
message: '请填写您的职业!',
type: 'warning'
});
return false;
- }
- if (this.ruleForm_register.password !== this.ruleForm_register.check_password) {
+ } else if (this.ruleForm_register.password !== this.ruleForm_register.check_password) {
this.$message({
message: '两次密码不一致!',
type: 'warning'
});
return false;
+ } else {
+ axios.get('http://localhost:8181/userDetail/checkValuable/' + this.ruleForm_register.username + '/' + this.ruleForm_register.school_id + '/' + this.ruleForm_register.name).then(function (resp) {
+ if (resp.data !== 'success') {
+ _this.$message.error(resp.data + '重复,请登录!');
+ return false;
+ } else {
+ axios.post('http://localhost:8181/userDetail/saveUAD', _this.ruleForm_register).then(function (resp) {
+ if (resp.data === 'success') {
+ _this.$message({
+ message: '保存成功,已提交到管理员,批准后通过邮件通知,请等待管理员批准',
+ type: 'success'
+ })
+ } else {
+ _this.$message.error('保存失败')
+ }
+ })
+ }
+ })
}
-
- axios.get('http://localhost:8181/userDetail/checkValuable/' + this.ruleForm_register.username + '/' + this.ruleForm_register.school_id + '/' + this.ruleForm_register.name).then(function (resp) {
- if (resp.data !== 'success') {
- _this.$message.error(resp.data + '重复,请登录!');
- return false;
- }
-
- })
- axios.post('http://localhost:8181/userDetail/saveUAD', _this.ruleForm_register).then(function (resp) {
- if (resp.data === 'success') {
- _this.$message({
- message: '保存成功,已提交到管理员,请等待管理员批准',
- type: 'success'
- })
- } else {
- _this.$message.error('保存失败')
- }
- })
-
}
},
created() {
diff --git a/src/views/OneStuChart.vue b/src/views/OneStuChart.vue
index b257843..83baa6e 100644
--- a/src/views/OneStuChart.vue
+++ b/src/views/OneStuChart.vue
@@ -1,9 +1,9 @@
-
-
-
-
+
+
+
+
@@ -27,6 +27,22 @@ export default {
textAlign: 'center' //整体(包括 text 和 subtext)的水平对齐 auto, left, right, center
},
};
+ this.chartExtend_place = {
+ title: {
+ text: '外出地点情况',
+ x: 'middle', //在图片中的x轴位置 left, right, middle
+ y: 'bottom', //在图片中的y轴位置 top, bottom
+ textAlign: 'center' //整体(包括 text 和 subtext)的水平对齐 auto, left, right, center
+ },
+ };
+ this.chartExtend_reason = {
+ title: {
+ text: '外出理由情况',
+ x: 'middle', //在图片中的x轴位置 left, right, middle
+ y: 'bottom', //在图片中的y轴位置 top, bottom
+ textAlign: 'center' //整体(包括 text 和 subtext)的水平对齐 auto, left, right, center
+ },
+ };
return {
student_id: '',
dialogFormVisible: false,
@@ -38,6 +54,14 @@ export default {
columns: ["日期", "预计离开人数", "预计返回人数", "实际离开人数", "实际返回人数"],
rows: []
},
+ chartData_place: {
+ columns: ["place", "value"],
+ rows: []
+ },
+ chartData_reason: {
+ columns: ["reason", "value"],
+ rows: []
+ },
}
},
methods: {
@@ -49,6 +73,18 @@ export default {
axios.get('http://localhost:8181/dataAnalysis/DATime/' + _this.student_id + '/D').then(function (resp) {
_this.chartData_D.rows = resp.data;
})
+ axios.get('http://localhost:8181/dataAnalysis/place/' + _this.student_id).then(function (resp) {
+ for (let i = 0; i < resp.data.length; i++) {
+ resp.data[i]["value"] = Number(resp.data[i]["value"])
+ }
+ _this.chartData_place.rows = resp.data;
+ })
+ axios.get('http://localhost:8181/dataAnalysis/reason/' + _this.student_id).then(function (resp) {
+ for (let i = 0; i < resp.data.length; i++) {
+ resp.data[i]["value"] = Number(resp.data[i]["value"])
+ }
+ _this.chartData_reason.rows = resp.data;
+ })
},
closeDialog() {
this.chartData.rows = []
diff --git a/src/views/StudentAnalysis.vue b/src/views/StudentAnalysis.vue
index df35935..a7edd72 100644
--- a/src/views/StudentAnalysis.vue
+++ b/src/views/StudentAnalysis.vue
@@ -2,9 +2,12 @@
+
+
+
@@ -32,6 +35,23 @@ export default {
y: 'bottom', //在图片中的y轴位置 top, bottom
textAlign: 'center' //整体(包括 text 和 subtext)的水平对齐 auto, left, right, center
},
+
+ };
+ this.chartExtend_place = {
+ title: {
+ text: '外出地点情况',
+ x: 'middle', //在图片中的x轴位置 left, right, middle
+ y: 'bottom', //在图片中的y轴位置 top, bottom
+ textAlign: 'center' //整体(包括 text 和 subtext)的水平对齐 auto, left, right, center
+ },
+ };
+ this.chartExtend_reason = {
+ title: {
+ text: '外出理由情况',
+ x: 'middle', //在图片中的x轴位置 left, right, middle
+ y: 'bottom', //在图片中的y轴位置 top, bottom
+ textAlign: 'center' //整体(包括 text 和 subtext)的水平对齐 auto, left, right, center
+ },
};
return {
chartData_H: {
@@ -42,6 +62,14 @@ export default {
columns: ["日期", "预计离开人数", "预计返回人数", "实际离开人数", "实际返回人数"],
rows: []
},
+ chartData_place: {
+ columns: ["place", "value"],
+ rows: []
+ },
+ chartData_reason: {
+ columns: ["reason", "value"],
+ rows: []
+ },
}
},
methods: {},
@@ -66,6 +94,20 @@ export default {
axios.get('http://localhost:8181/dataAnalysis/DATime/' + id + '/D').then(function (resp) {
_this.chartData_D.rows = resp.data;
})
+ axios.get('http://localhost:8181/dataAnalysis/place/' + id).then(function (resp) {
+
+ for (let i = 0; i < resp.data.length; i++) {
+ resp.data[i]["value"] = Number(resp.data[i]["value"])
+ }
+ _this.chartData_place.rows = resp.data;
+ console.log(_this.chartData_place)
+ })
+ axios.get('http://localhost:8181/dataAnalysis/reason/' + id).then(function (resp) {
+ for (let i = 0; i < resp.data.length; i++) {
+ resp.data[i]["value"] = Number(resp.data[i]["value"])
+ }
+ _this.chartData_reason.rows = resp.data;
+ })
}
}