diff --git a/src/api/apis/apis.js b/src/api/apis/apis.js index d768ca8..922436b 100644 --- a/src/api/apis/apis.js +++ b/src/api/apis/apis.js @@ -1162,4 +1162,44 @@ export default { data }); }, + //基站统计数据 + pStationReport(data) { + return service({ + url: setUpUrls.pStationReport, + method: "POST", + data + }); + }, + //答题器统计数据 + pKeyboardReport(data) { + return service({ + url: setUpUrls.pKeyboardReport, + method: "POST", + data + }); + }, + //查询设备列表 + pDeviceList(data) { + return service({ + url: setUpUrls.pDeviceList, + method: "POST", + data + }); + }, + //查询设备详情 + pDeviceDetail(data) { + return service({ + url: setUpUrls.pDeviceDetail, + method: "POST", + data + }); + }, + //查询设备日志列表 + pDeviceLogList(data) { + return service({ + url: setUpUrls.pDeviceLogList, + method: "POST", + data + }); + }, }; diff --git a/src/api/urls/apis.js b/src/api/urls/apis.js index fe30a69..e813a90 100644 --- a/src/api/urls/apis.js +++ b/src/api/urls/apis.js @@ -296,6 +296,18 @@ export default { versionPage:"/api_html/system/versionPage", // 新增授课端版本 addVersion:"/api_html/system/addVersion", + // 基站统计数据 + pStationReport:"/api_html/system/stationReport", + // 答题器统计数据 + pKeyboardReport:"/api_html/system/keyboardReport", + // 查询设备列表 + pDeviceList:"/api_html/system/deviceList", + // 查询设备详情 + pDeviceDetail:"/api_html/system/deviceDetail", + // 查询设备日志列表 + pDeviceLogList:"/api_html/system/deviceLogList", // 文件上传 uploadApp:"/file/uploadApp", + // 文件上传 + uploadImg:"/file/uploadImg", } diff --git a/src/router/permission.js b/src/router/permission.js index 271a6af..a3d6618 100644 --- a/src/router/permission.js +++ b/src/router/permission.js @@ -18,28 +18,7 @@ router.beforeEach((to, from, next) => { return item.roleName == userInfo.showRoleName; }); console.log([...authorityRouterObj[0]?.authorityRouter]) - // store.commit("setRouters", [...authorityRouterObj[0]?.authorityRouter]); - - //start 开发用,测试删除 - store.commit("setRouters", [ - "setUpStudent", - "examinationPaper", - "examinationPaperAdd", - "examinationPaperEdit", - "examinationPaperRecycle", - "ask", - "askAnalysis", - "test", - "testAnalysis", - "portrait", - "dataSync", - "down", - "account", - "device", - "clientVersion" - ]); - //end - + store.commit("setRouters", [...authorityRouterObj[0]?.authorityRouter]); store.commit("setInfo", { ...userInfo }); store.getters.addRouters.forEach((res) => { router.addRoute(res); diff --git a/src/store/index.js b/src/store/index.js index 6b2cb19..7bef70d 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -81,34 +81,11 @@ const store = new Vuex.Store({ if (userInfo.permissions && userInfo.permissions.length) { userInfo.showRoleName = response.data.permissions[0]?.roleName; userInfo.showRole = response.data.permissions[0]?.role; - // 开发用,测试删除 - // userInfo.showRole = "ROLE_PERSONAL"; commit("setToken", "isLogin"); commit("setInfo", { ...userInfo }); commit("setRouters", [ ...userInfo.permissions[0]?.authorityRouter, ]); - //start 开发用,测试删除 - // commit("setRouters", [ - // "setUpStudent", - // "examinationPaper", - // "examinationPaperAdd", - // "examinationPaperEdit", - // "examinationPaperRecycle", - // "ask", - // "askAnalysis", - // "test", - // "testAnalysis", - // "portrait", - // "dataSync", - // "down", - - // "account", - // "device", - // "clientVersion" - // ]); - //end - state.addRouters.forEach((res) => { router.addRoute(res); }); diff --git a/src/views/admin/account/index.vue b/src/views/admin/account/index.vue index 95d52d2..d954441 100644 --- a/src/views/admin/account/index.vue +++ b/src/views/admin/account/index.vue @@ -129,7 +129,7 @@ {{ `${scoped.row.available == 0 ? "禁用" : "启用"}` }} - 删除 + @@ -165,7 +165,7 @@ - + { if (valid) { let params = { ...this.formAddCount }; - const { data, status, info } = await this.$request.addUser({ + const { data, status, info } = await this.$request.addTenant({ ...params, }); if (status === 0) { @@ -377,7 +377,11 @@ export default { }, setCount(obj) { //修改账号 - this.formCount = { ...obj }; + this.formCount.userId = obj.id; + this.formCount.loginName = obj.loginName; + this.formCount.tenantName = obj.tenantName; + this.formCount.contactPerson = obj.realName; + this.formCount.contactPhone = obj.phone; this.diaCount = true; }, handleDropdownClick(value, item) { @@ -405,8 +409,8 @@ export default { this.$refs.formCount.validate(async (valid) => { if (valid) { let params = { ...this.formCount }; - params.password = encryptLoginPassword(params.password); - const { data, status, info } = await this.$request.tenantUpdateUser({ + // params.password = encryptLoginPassword(params.password); + const { data, status, info } = await this.$request.updateTenant({ type: 3, ...params, }); @@ -429,7 +433,7 @@ export default { if (type == 1) { query.available = obj.available == 0 ? 1 : 0; } - const { data, status, info } = await this.$request.tenantUpdateUser({ + const { data, status, info } = await this.$request.updateTenant({ userId: obj.id, type: type, ...query, @@ -444,7 +448,7 @@ export default { async _QueryData() { let query = { ...this.query }; if (query.loginName) { - delete query.type; + delete query.versionType; delete query.available; } this.loading = true; diff --git a/src/views/admin/clientVersion/index.vue b/src/views/admin/clientVersion/index.vue index a722087..3443838 100644 --- a/src/views/admin/clientVersion/index.vue +++ b/src/views/admin/clientVersion/index.vue @@ -150,11 +150,7 @@ export default { url: "/file/uploadApp", loading: false, diaAdd: false, - tableData: [ - { - schoolName: "111", - }, - ], + tableData: [], formAdd: { versionName: "", versionNumber: "", @@ -186,7 +182,7 @@ export default { }; }, created() { - // this._QueryData(); + this._QueryData(); }, methods: { openAddDia() { diff --git a/src/views/admin/device/index.vue b/src/views/admin/device/index.vue index ceb95ab..5762de9 100644 --- a/src/views/admin/device/index.vue +++ b/src/views/admin/device/index.vue @@ -20,29 +20,24 @@

基站数量

- +
- - - - + +
-
- -
@@ -262,10 +255,9 @@ export default { this.page = 1; this.total = 0; this.count = 0; - this.query.classId = []; this.query.onlineStatus = ""; - this.query.sn = ""; - this.query.type = ""; + this.query.schoolName = ""; + this.query.loginName = ""; if (val == 1) { this.stationReport(); } else if (val == 2) { @@ -281,8 +273,9 @@ export default { schoolList: [], type: 1, query: { - school: [], - zuhu: "", + schoolName: "", + loginName: "", + onlineStatus: "", }, tableData: [], total: 0, @@ -295,8 +288,8 @@ export default { }, created() { this.code = localStorage.getItem("csCode") || ""; - // this.stationReport(); - // this._QueryData(); + this.stationReport(); + this._QueryData(); }, activated() { const that = this; @@ -305,10 +298,10 @@ export default { that.page = 1; that.total = 0; that.count = 0; - that.query.school = ""; - that.query.zuhu = ""; - // that.stationReport(); - // that._QueryData(); + that.query.schoolName = ""; + that.query.loginName = ""; + that.stationReport(); + that._QueryData(); }); }, methods: { @@ -327,7 +320,7 @@ export default { }, // 基站统计数据 async stationReport() { - const { data, status, info } = await this.$request.stationReport(); + const { data, status, info } = await this.$request.pStationReport(); if (status === 0) { this.chartData = data.list?.map((item) => { @@ -349,7 +342,7 @@ export default { }, // 答题器统计数据 async keyboardReport() { - const { data, status, info } = await this.$request.keyboardReport(); + const { data, status, info } = await this.$request.pKeyboardReport(); if (status === 0) { this.chartData2 = data.list?.map((item) => { @@ -375,71 +368,21 @@ export default { this.$message.error(info); } }, - setQuery() { - //整理传参 - let query = {}; - if (this.query.sn) { - query.sn = this.query.sn; - } else { - if (this.type == 1) { - this.query.onlineStatus !== "" - ? (query.onlineStatus = this.query.onlineStatus) - : ""; - } else if (this.type == 2) { - this.query.type !== "" ? (query.type = this.query.type) : ""; - } - query.regionIds = []; - query.schoolIds = []; - query.gradeNames = []; - query.classIds = []; - this.query.classId?.map((item) => { - if (item.length == 1) { - if (!query.regionIds.includes(item[0])) { - query.regionIds.push(item[0]); - } - } else if (item.length == 2) { - if (!query.schoolIds.includes(item[1])) { - query.schoolIds.push(item[1]); - } - query.regionIds.includes(item[0]) - ? query.regionIds.remove(item[0]) - : ""; - } else if (item.length == 3) { - if (!query.schoolIds.includes(item[1])) { - query.schoolIds.push(item[1]); - } - if (!query.gradeNames.includes(item[2])) { - query.gradeNames.push(item[2]); - } - query.regionIds.includes(item[0]) - ? query.regionIds.remove(item[0]) - : ""; - } else if (item.length == 4) { - if (!query.classIds.includes(item[3])) { - query.classIds.push(item[3]); - } - query.regionIds.includes(item[0]) - ? query.regionIds.remove(item[0]) - : ""; - query.schoolIds.includes(item[1]) - ? query.schoolIds.remove(item[1]) - : ""; - query.gradeNames.includes(item[2]) - ? query.gradeNames.remove(item[2]) - : ""; - } - }); - - delete query.classId; - } - return query; - }, // 设备列表信息 async _QueryData(isRef) { this.loading = true; - let query = {...this.query}; - if(query.zuhu){ - delete query.school + let query = {}; + for (let key in this.query) { + if (this.query[key]) { + query[key] = this.query[key]; + } + } + if (query.loginName) { + delete query.schoolName; + delete query.onlineStatus; + } else if (query.schoolName) { + delete query.loginName; + delete query.onlineStatus; } if (isRef) { this.page = 1; @@ -465,12 +408,6 @@ export default { this.total = data.count; this.$nextTick(function () { this.$refs.main.scrollTop = 0; - if (this.query.classId.length) { - this.selectionTabIds = this.tableData.map((item) => { - this.$refs.multipleTable.toggleRowSelection(item); - return item.id; - }); - } }); } else { this.$message.error(info); diff --git a/src/views/layout/header/header.vue b/src/views/layout/header/header.vue index fda0e1f..68fa70c 100644 --- a/src/views/layout/header/header.vue +++ b/src/views/layout/header/header.vue @@ -39,7 +39,6 @@

{{ `${this.$store.getters.info.name}` }}

-

管理员

@@ -130,6 +129,11 @@ export default { 2000, { leading: true, trailing: false } ), + linkToUserInfo() { + this.$router.push({ + path:'/userInfo' + }) + }, collapse() { this.isCollapse = !this.isCollapse; this.$store.dispatch("collapse"); diff --git a/src/views/personal/examinationPaper/add.vue b/src/views/personal/examinationPaper/add.vue index 3cacce6..e650686 100644 --- a/src/views/personal/examinationPaper/add.vue +++ b/src/views/personal/examinationPaper/add.vue @@ -865,7 +865,7 @@ - + @@ -929,7 +929,7 @@ export default { stem: { src: "", //题干图片地址 type: 0, //题目难度 - tag: 0, //知识点 + tag: [], //知识点 }, type: 1, //1-创建,2-复制答题卡 dialogVisible: false, //测验类型设置弹窗 diff --git a/src/views/personal/examinationPaper/edit.vue b/src/views/personal/examinationPaper/edit.vue index d7a48b6..deaafce 100644 --- a/src/views/personal/examinationPaper/edit.vue +++ b/src/views/personal/examinationPaper/edit.vue @@ -144,7 +144,7 @@ circle size="small" icon="el-icon-tickets" - @click="openStem(subQuestions,1)" + @click="openStem(subQuestions, 1)" > @@ -153,7 +153,7 @@ circle size="small" icon="el-icon-price-tag" - @click="openTag(subQuestions)" + @click="openTag(subQuestions)" >
@@ -270,6 +270,35 @@

+
+ + + + + + + + + +
@@ -336,7 +365,7 @@ >, -