diff --git a/src/assets/css/base.css b/src/assets/css/base.css index 5c24e48..38d1e5b 100644 --- a/src/assets/css/base.css +++ b/src/assets/css/base.css @@ -20,6 +20,15 @@ a { text-decoration: none; } +input[type="number"] { + -moz-appearance: textfield; +} +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + -webkit-appearance: none; + margin: 0; +} + /* element-style */ .el-button--default { color: #667ffd; @@ -31,7 +40,7 @@ a { border-color: #667ffd; } -.el-radio__input.is-checked+.el-radio__label { +.el-radio__input.is-checked + .el-radio__label { color: #667ffd; } @@ -41,5 +50,5 @@ a { } .el-message-box .el-button--default { - color: #fff + color: #fff; } diff --git a/src/store/index.js b/src/store/index.js index bd601ba..caf1f87 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -4,6 +4,7 @@ import Cookies from "js-cookie"; import layoutStore from "./modules/layout/index"; import { defaultRouter } from "@/router/index"; import { encryptLoginPassword } from "@/utils"; +import { Message } from "element-ui"; import request from "@/api/index"; import router from "@/router/index"; @@ -69,25 +70,41 @@ const store = new Vuex.Store({ let response = res; if (response.status == 0) { const userInfo = { ...response.data }; - userInfo.showRoleName = response.data.permissions[0]?.roleName; - commit("setToken", "isLogin"); - commit("setInfo", { ...userInfo }); - commit("setRouters", [...userInfo.permissions[0]?.authorityRouter]); - state.addRouters.forEach((res) => { - router.addRoute(res); - }); - router.addRoute({ - path: "*", - redirect: "/404", - hidden: true, - children: [], - }); - console.log(Cookies.get("ZT_YIJIAO_TOKEN")); - if (params.url) { - window.location.href = params.url; + if (userInfo.permissions && userInfo.permissions.length) { + userInfo.showRoleName = response.data.permissions[0]?.roleName; + commit("setToken", "isLogin"); + commit("setInfo", { ...userInfo }); + commit("setRouters", [ + ...userInfo.permissions[0]?.authorityRouter, + ]); + state.addRouters.forEach((res) => { + router.addRoute(res); + }); + router.addRoute({ + path: "*", + redirect: "/404", + hidden: true, + children: [], + }); + console.log(Cookies.get("ZT_YIJIAO_TOKEN")); + if (params.url) { + window.location.href = params.url; + } else { + router.push({ path: "/" }); + } } else { - router.push({ path: "/" }); + Message({ + message: "该账号暂无权限,请联系管理员~", + type: "error", + duration: 3 * 1000, + }); } + } else { + Message({ + message: response.info, + type: "error", + duration: 3 * 1000, + }); } }) .catch(() => {}); @@ -98,7 +115,7 @@ const store = new Vuex.Store({ let authorityRouterObj = userInfo.permissions.filter((item) => { return item.role == role; }); - userInfo.showRoleName = authorityRouterObj[0]?.roleName + userInfo.showRoleName = authorityRouterObj[0]?.roleName; commit("setInfo", userInfo); commit("setRouters", [...authorityRouterObj[0]?.authorityRouter]); state.addRouters.forEach((res) => { diff --git a/src/views/down/client.vue b/src/views/down/client.vue index 8e6bada..e7e69d6 100644 --- a/src/views/down/client.vue +++ b/src/views/down/client.vue @@ -56,7 +56,7 @@
- + 老师选择 秒 + > @@ -179,11 +180,11 @@ >个 - + 题号
题型
分数
-
部分分值
+
漏选得分
选项设置
操作
@@ -172,7 +172,7 @@
@@ -203,7 +203,7 @@ :max="subQuestions.score" :step="0.5" v-model="subQuestions.partScore" - label="部分分值" + label="漏选得分" >
@@ -260,7 +260,7 @@
@@ -365,6 +365,7 @@
题号
题型
分数
+
漏选得分
选项设置
  • +
    +

    --

    + +

    --

    @@ -509,7 +524,7 @@ export default { gradeName: "", subjectName: "", examsDuration: 90, - sharingType: 1, + sharingType: 0, questionList: [], }, formRules: { @@ -801,7 +816,8 @@ export default { tag: this.answerTypeName, }); if (status == 0) { - this._TypeList(); + await this._TypeList(); + this.form.tagId = data || ""; this.dialogVisible = false; this.answerTypeName = ""; this.$message.success("添加成功"); @@ -853,7 +869,7 @@ export default { }; }) || []; if (this.type != 2) { - this.form.tagId = this.answerTypeList[0].id || ""; + this.form.tagId = this.answerTypeList[0]?.id || ""; } } else { this.$message.error(info); diff --git a/src/views/examinationPaper/index.vue b/src/views/examinationPaper/index.vue index 0e71d6c..2058357 100644 --- a/src/views/examinationPaper/index.vue +++ b/src/views/examinationPaper/index.vue @@ -5,15 +5,9 @@ 备题组卷 @@ -255,9 +249,9 @@ export default { break; } }, - changePage(page){ - this.page = page - this._QueryData(this.query.title) + changePage(page) { + this.page = page; + this._QueryData(this.query.title); }, async saveShare() { //修改分享范围 @@ -270,6 +264,7 @@ export default { this.shareForm.sharingType = 1; this.dialogVisible = false; this.$message.success(info); + this._QueryData(this.query.title == ""); } else { this.$message.error(info); } diff --git a/src/views/setUp/account.vue b/src/views/setUp/account.vue index 8ed8c5f..470361a 100644 --- a/src/views/setUp/account.vue +++ b/src/views/setUp/account.vue @@ -84,7 +84,7 @@

    - + - + - + @@ -142,7 +142,7 @@ - + @@ -296,6 +296,7 @@ export default { if (status === 0) { this.$message.success("删除成功"); this.studentList.splice(index, 1); + this._QueryClass() } else { this.$message.error(info); } @@ -322,6 +323,7 @@ export default { if (status === 0) { this.$message.success(info); this.diaStu = false; + this._QueryClass() this._QueryData(); } else { this.$message.error(info); @@ -340,6 +342,8 @@ export default { } else if (type == 3) { this.query.studentName = ""; this.query.studentCode = ""; + }else{ + query = this.query } this.loading = true; const { data, status, info } = await this.$request.studentList({ diff --git a/src/views/setUp/teacher.vue b/src/views/setUp/teacher.vue index facd31c..f14ca84 100644 --- a/src/views/setUp/teacher.vue +++ b/src/views/setUp/teacher.vue @@ -48,6 +48,7 @@ placeholder="请输入老师姓名" v-model="query.teacherName" class="input-with-select" + maxlength="30" @keyup.enter.native="_QueryData(2)" > @@ -578,13 +580,22 @@ export default { this.query.teacherName = ""; this.query.phone = ""; } else if (type == 2) { + if(this.query.teacherName == ""){ + this.$message.warning('请输入老师姓名') + return + } query.teacherName = this.query.teacherName; this.query.gradeName = ""; this.query.phone = ""; } else if (type == 3) { + if(this.query.phone == ""){ + this.$message.warning('请输入老师手机') + return + } query.phone = this.query.phone; this.query.teacherName = ""; this.query.gradeName = ""; + } else if (type == 10) { query = { ...this.query }; }