diff --git a/src/api/apis/setUp.js b/src/api/apis/apis.js index f4ce1f5..12936b3 100644 --- a/src/api/apis/setUp.js +++ b/src/api/apis/apis.js @@ -1,9 +1,17 @@ import service from "../axios" -import setUpUrls from "../urls/setUp" +import setUpUrls from "../urls/apis" export default { // 学校管理员首页数据 + teacherIndex(data) { + return service({ + url: setUpUrls.teacherIndex, + method: 'POST', + data + }) + }, + // 学校管理员首页数据 schoolIndex(data) { return service({ url: setUpUrls.schoolIndex, diff --git a/src/api/apis/device.js b/src/api/apis/device.js deleted file mode 100644 index 342a504..0000000 --- a/src/api/apis/device.js +++ /dev/null @@ -1,39 +0,0 @@ - -import service from "../axios" -import deviceUrls from "../urls/device" - -export default { - // 下载设备模板 - downDevice(data) { - return service({ - url: deviceUrls.downDevice, - method: 'POST', - data - }) - }, - // 设备列表 - fetchDeviceList(data) { - return service({ - url: deviceUrls.deviceList, - method: 'POST', - data - }) - }, - // autoUpDate - autoUpDate(data) { - return service({ - url: deviceUrls.autoUpDate, - method: 'POST', - data - }) - }, - // 设备列表 - stopUpdate(data) { - return service({ - url: deviceUrls.stopUpdate, - method: 'POST', - data - }) - }, - -} diff --git a/src/api/urls/setUp.js b/src/api/urls/apis.js index a478a49..12a3ebf 100644 --- a/src/api/urls/setUp.js +++ b/src/api/urls/apis.js @@ -1,5 +1,7 @@ export default { + // 授课老师首页数据 + teacherIndex: "/api_html/teaching/index", // 学校管理员首页数据 schoolIndex: "/api_html/school/manager/index", // 查询角色列表 diff --git a/src/api/urls/device.js b/src/api/urls/device.js deleted file mode 100644 index 8aebc5d..0000000 --- a/src/api/urls/device.js +++ /dev/null @@ -1,13 +0,0 @@ - -export default { - // 设备文件上传 - upLoadDevice: "/web/upLoadDevice", - // 设备模板下载 - downDevice: "/web/downDevice", - // 设备列表 - deviceList: "/web/deviceList", - // 自动更新 - autoUpDate: "/web/autoUpDate", - // 关闭自动更新 - stopUpdate: "/web/stopUpdate", -} diff --git a/src/assets/images/zan.png b/src/assets/images/zan.png new file mode 100644 index 0000000..dc69109 --- /dev/null +++ b/src/assets/images/zan.png diff --git a/src/views/down/client.vue b/src/views/down/client.vue index 2c99891..434e6b8 100644 --- a/src/views/down/client.vue +++ b/src/views/down/client.vue @@ -1,13 +1,359 @@ - \ No newline at end of file diff --git a/src/views/down/index.vue b/src/views/down/index.vue index a906de2..5802ab5 100644 --- a/src/views/down/index.vue +++ b/src/views/down/index.vue @@ -1,21 +1,61 @@ - \ No newline at end of file diff --git a/src/views/index/mainIndex.vue b/src/views/index/mainIndex.vue index 225f2d7..79e6d38 100644 --- a/src/views/index/mainIndex.vue +++ b/src/views/index/mainIndex.vue @@ -71,19 +71,19 @@

备题组卷

-

管理32套答题卡。

+

管理{{schoolInfo.paperCount}}套答题卡。

学生画像

-

共分析532名学生成绩。

+

共分析{{schoolInfo.imagesCount}}名学生成绩。

随堂问报表

-

对41套随堂问答题记录分析。

+

对{{schoolInfo.classPeriodCount}}套随堂问答题记录分析。

即时测报表

-

对28套即时测答题记录分析。

+

对{{schoolInfo.examCount}}套即时测答题记录分析。

@@ -116,6 +116,8 @@ export default { }) if(this.type == "ROLE_XUEXIAO"){ this.schoolIndex() + }else if(this.type == "ROLE_JIAOSHI" || this.type == "ROLE_BANZHUREN"){ + this.teacherIndex() } }, methods: { @@ -127,6 +129,14 @@ export default { path: path, }); }, + async teacherIndex() { + const { data, status, info } = await this.$request.teacherIndex(); + if (status === 0) { + this.schoolInfo = { ...data }; + } else { + this.$message.error(info); + } + }, async schoolIndex() { const { data, status, info } = await this.$request.schoolIndex(); if (status === 0) { diff --git a/src/views/setUp/school.vue b/src/views/setUp/school.vue index deb083e..9e6d4e7 100644 --- a/src/views/setUp/school.vue +++ b/src/views/setUp/school.vue @@ -19,7 +19,7 @@
- +
+ + + + + {{ item.name }} + + + + + + + + + + + +
@@ -131,9 +179,10 @@ export default { }, data() { return { + loading: false, url: "xxx", diaUp: false, - loading: false, + diaSchool: false, school: { schoolName: "长水实验中学", managePwd: "123456", @@ -143,6 +192,25 @@ export default { tenantName: "长水集团", }, tableData: [], + formSchool: { + sections: "", + managePwd: "", + contactPerson: "", + contactPhone: "", + }, + rulesSchool: { + sections: [{ required: true, message: "请选择学段", trigger: "blur" }], + managePwd: [ + { required: true, message: "请填写管理密码", trigger: "blur" }, + ], + }, + sectionsList: [ + { id: "1", name: "小学" }, + { id: "2", name: "初中" }, + { id: "3", name: "高中" }, + { id: "4", name: "大学" }, + { id: "7", name: "高补" }, + ], }; }, created() { @@ -151,6 +219,31 @@ export default { }, methods: { setGrade(obj) {}, + async editSchool() { + if (!this.formSchool.sections.length) { + this.$message.error("请选择学段!"); + return; + } + if (!this.formSchool.managePwd) { + this.$message.error("请填写密码!"); + return; + } + if (this.loading) { + return; + } + this.loading = true; + let form = {...this.formSchool} + form.sections = this.formSchool.sections.join(',') + const { data, status, info } = await this.$request.updateSchool({...form}); + this.loading = false; + if (status === 0) { + this.$message.success("修改成功~"); + this.diaSchool = false; + this._QueryDataSchool(); + } else { + this.$message.error(info); + } + }, async _QueryDataSchool() { this.loading = true; const { data, status, info } = await this.$request.schoolDetail(); @@ -158,6 +251,10 @@ export default { console.log(status); if (status === 0) { this.school = { ...data }; + for (let key in this.formSchool) { + this.formSchool[key] = data[key] || ""; + } + this.formSchool.sections = this.formSchool.sections.split(","); } else { this.$message.error(info); } @@ -245,9 +342,9 @@ export default { border-radius: 10px; box-shadow: 1px 1px 3px #888; cursor: pointer; - transition: all .5s; - &:hover{ - transform: translate(-2px,-5px); + transition: all 0.5s; + &:hover { + transform: translate(-2px, -5px); box-shadow: 5px 5px 10px #888; } } @@ -274,4 +371,7 @@ export default { } } } +.form-box { + margin: 0 20px; +} \ No newline at end of file diff --git a/src/views/setUp/student.vue b/src/views/setUp/student.vue index 4c037e5..a98ef2b 100644 --- a/src/views/setUp/student.vue +++ b/src/views/setUp/student.vue @@ -2,7 +2,7 @@