Commit c2460294f6fc394feeea49b3dd459a71ab07e1ef
1 parent
21dfdeae
平台管理员接口联调
Showing
16 changed files
with
323 additions
and
295 deletions
src/api/apis/apis.js
@@ -1162,4 +1162,44 @@ export default { | @@ -1162,4 +1162,44 @@ export default { | ||
1162 | data | 1162 | data |
1163 | }); | 1163 | }); |
1164 | }, | 1164 | }, |
1165 | + //基站统计数据 | ||
1166 | + pStationReport(data) { | ||
1167 | + return service({ | ||
1168 | + url: setUpUrls.pStationReport, | ||
1169 | + method: "POST", | ||
1170 | + data | ||
1171 | + }); | ||
1172 | + }, | ||
1173 | + //答题器统计数据 | ||
1174 | + pKeyboardReport(data) { | ||
1175 | + return service({ | ||
1176 | + url: setUpUrls.pKeyboardReport, | ||
1177 | + method: "POST", | ||
1178 | + data | ||
1179 | + }); | ||
1180 | + }, | ||
1181 | + //查询设备列表 | ||
1182 | + pDeviceList(data) { | ||
1183 | + return service({ | ||
1184 | + url: setUpUrls.pDeviceList, | ||
1185 | + method: "POST", | ||
1186 | + data | ||
1187 | + }); | ||
1188 | + }, | ||
1189 | + //查询设备详情 | ||
1190 | + pDeviceDetail(data) { | ||
1191 | + return service({ | ||
1192 | + url: setUpUrls.pDeviceDetail, | ||
1193 | + method: "POST", | ||
1194 | + data | ||
1195 | + }); | ||
1196 | + }, | ||
1197 | + //查询设备日志列表 | ||
1198 | + pDeviceLogList(data) { | ||
1199 | + return service({ | ||
1200 | + url: setUpUrls.pDeviceLogList, | ||
1201 | + method: "POST", | ||
1202 | + data | ||
1203 | + }); | ||
1204 | + }, | ||
1165 | }; | 1205 | }; |
src/api/urls/apis.js
@@ -296,6 +296,18 @@ export default { | @@ -296,6 +296,18 @@ export default { | ||
296 | versionPage:"/api_html/system/versionPage", | 296 | versionPage:"/api_html/system/versionPage", |
297 | // 新增授课端版本 | 297 | // 新增授课端版本 |
298 | addVersion:"/api_html/system/addVersion", | 298 | addVersion:"/api_html/system/addVersion", |
299 | + // 基站统计数据 | ||
300 | + pStationReport:"/api_html/system/stationReport", | ||
301 | + // 答题器统计数据 | ||
302 | + pKeyboardReport:"/api_html/system/keyboardReport", | ||
303 | + // 查询设备列表 | ||
304 | + pDeviceList:"/api_html/system/deviceList", | ||
305 | + // 查询设备详情 | ||
306 | + pDeviceDetail:"/api_html/system/deviceDetail", | ||
307 | + // 查询设备日志列表 | ||
308 | + pDeviceLogList:"/api_html/system/deviceLogList", | ||
299 | // 文件上传 | 309 | // 文件上传 |
300 | uploadApp:"/file/uploadApp", | 310 | uploadApp:"/file/uploadApp", |
311 | + // 文件上传 | ||
312 | + uploadImg:"/file/uploadImg", | ||
301 | } | 313 | } |
src/router/permission.js
@@ -18,28 +18,7 @@ router.beforeEach((to, from, next) => { | @@ -18,28 +18,7 @@ router.beforeEach((to, from, next) => { | ||
18 | return item.roleName == userInfo.showRoleName; | 18 | return item.roleName == userInfo.showRoleName; |
19 | }); | 19 | }); |
20 | console.log([...authorityRouterObj[0]?.authorityRouter]) | 20 | console.log([...authorityRouterObj[0]?.authorityRouter]) |
21 | - // store.commit("setRouters", [...authorityRouterObj[0]?.authorityRouter]); | ||
22 | - | ||
23 | - //start 开发用,测试删除 | ||
24 | - store.commit("setRouters", [ | ||
25 | - "setUpStudent", | ||
26 | - "examinationPaper", | ||
27 | - "examinationPaperAdd", | ||
28 | - "examinationPaperEdit", | ||
29 | - "examinationPaperRecycle", | ||
30 | - "ask", | ||
31 | - "askAnalysis", | ||
32 | - "test", | ||
33 | - "testAnalysis", | ||
34 | - "portrait", | ||
35 | - "dataSync", | ||
36 | - "down", | ||
37 | - "account", | ||
38 | - "device", | ||
39 | - "clientVersion" | ||
40 | - ]); | ||
41 | - //end | ||
42 | - | 21 | + store.commit("setRouters", [...authorityRouterObj[0]?.authorityRouter]); |
43 | store.commit("setInfo", { ...userInfo }); | 22 | store.commit("setInfo", { ...userInfo }); |
44 | store.getters.addRouters.forEach((res) => { | 23 | store.getters.addRouters.forEach((res) => { |
45 | router.addRoute(res); | 24 | router.addRoute(res); |
src/store/index.js
@@ -81,34 +81,11 @@ const store = new Vuex.Store({ | @@ -81,34 +81,11 @@ const store = new Vuex.Store({ | ||
81 | if (userInfo.permissions && userInfo.permissions.length) { | 81 | if (userInfo.permissions && userInfo.permissions.length) { |
82 | userInfo.showRoleName = response.data.permissions[0]?.roleName; | 82 | userInfo.showRoleName = response.data.permissions[0]?.roleName; |
83 | userInfo.showRole = response.data.permissions[0]?.role; | 83 | userInfo.showRole = response.data.permissions[0]?.role; |
84 | - // 开发用,测试删除 | ||
85 | - // userInfo.showRole = "ROLE_PERSONAL"; | ||
86 | commit("setToken", "isLogin"); | 84 | commit("setToken", "isLogin"); |
87 | commit("setInfo", { ...userInfo }); | 85 | commit("setInfo", { ...userInfo }); |
88 | commit("setRouters", [ | 86 | commit("setRouters", [ |
89 | ...userInfo.permissions[0]?.authorityRouter, | 87 | ...userInfo.permissions[0]?.authorityRouter, |
90 | ]); | 88 | ]); |
91 | - //start 开发用,测试删除 | ||
92 | - // commit("setRouters", [ | ||
93 | - // "setUpStudent", | ||
94 | - // "examinationPaper", | ||
95 | - // "examinationPaperAdd", | ||
96 | - // "examinationPaperEdit", | ||
97 | - // "examinationPaperRecycle", | ||
98 | - // "ask", | ||
99 | - // "askAnalysis", | ||
100 | - // "test", | ||
101 | - // "testAnalysis", | ||
102 | - // "portrait", | ||
103 | - // "dataSync", | ||
104 | - // "down", | ||
105 | - | ||
106 | - // "account", | ||
107 | - // "device", | ||
108 | - // "clientVersion" | ||
109 | - // ]); | ||
110 | - //end | ||
111 | - | ||
112 | state.addRouters.forEach((res) => { | 89 | state.addRouters.forEach((res) => { |
113 | router.addRoute(res); | 90 | router.addRoute(res); |
114 | }); | 91 | }); |
src/views/admin/account/index.vue
@@ -129,7 +129,7 @@ | @@ -129,7 +129,7 @@ | ||
129 | <el-dropdown-item :command="1">{{ | 129 | <el-dropdown-item :command="1">{{ |
130 | `${scoped.row.available == 0 ? "禁用" : "启用"}` | 130 | `${scoped.row.available == 0 ? "禁用" : "启用"}` |
131 | }}</el-dropdown-item> | 131 | }}</el-dropdown-item> |
132 | - <el-dropdown-item :command="2">删除</el-dropdown-item> | 132 | + <!-- <el-dropdown-item :command="2">删除</el-dropdown-item> --> |
133 | </el-dropdown-menu> | 133 | </el-dropdown-menu> |
134 | </el-dropdown> | 134 | </el-dropdown> |
135 | </template> | 135 | </template> |
@@ -165,7 +165,7 @@ | @@ -165,7 +165,7 @@ | ||
165 | </el-input> | 165 | </el-input> |
166 | </el-col> | 166 | </el-col> |
167 | </el-form-item> | 167 | </el-form-item> |
168 | - <el-form-item label="密码:" prop="password"> | 168 | + <!-- <el-form-item label="密码:" prop="password"> |
169 | <el-col :span="12"> | 169 | <el-col :span="12"> |
170 | <el-input | 170 | <el-input |
171 | placeholder="请输入密码" | 171 | placeholder="请输入密码" |
@@ -174,7 +174,7 @@ | @@ -174,7 +174,7 @@ | ||
174 | > | 174 | > |
175 | </el-input> | 175 | </el-input> |
176 | </el-col> | 176 | </el-col> |
177 | - </el-form-item> | 177 | + </el-form-item> --> |
178 | <el-form-item label="联系人姓名:" prop="contactPerson"> | 178 | <el-form-item label="联系人姓名:" prop="contactPerson"> |
179 | <el-col :span="12"> | 179 | <el-col :span="12"> |
180 | <el-input | 180 | <el-input |
@@ -295,7 +295,7 @@ export default { | @@ -295,7 +295,7 @@ export default { | ||
295 | diaCount: false, | 295 | diaCount: false, |
296 | props: { multiple: true, checkStrictly: true }, | 296 | props: { multiple: true, checkStrictly: true }, |
297 | query: { | 297 | query: { |
298 | - type: "", | 298 | + versionType: "", |
299 | available: "", | 299 | available: "", |
300 | loginName: "", | 300 | loginName: "", |
301 | }, | 301 | }, |
@@ -304,15 +304,15 @@ export default { | @@ -304,15 +304,15 @@ export default { | ||
304 | page: 1, | 304 | page: 1, |
305 | size: 20, | 305 | size: 20, |
306 | formCount: { | 306 | formCount: { |
307 | + userId: "", | ||
307 | loginName: "", | 308 | loginName: "", |
308 | - type: "", | ||
309 | tenantName: "", | 309 | tenantName: "", |
310 | contactPerson: "", | 310 | contactPerson: "", |
311 | contactPhone: "", | 311 | contactPhone: "", |
312 | }, | 312 | }, |
313 | ruleCount: { | 313 | ruleCount: { |
314 | loginName: [{ required: true, message: "请输入账号", trigger: "blur" }], | 314 | loginName: [{ required: true, message: "请输入账号", trigger: "blur" }], |
315 | - password: [{ required: true, message: "请输入密码", trigger: "blur" }], | 315 | + // password: [{ required: true, message: "请输入密码", trigger: "blur" }], |
316 | contactPhone: [ | 316 | contactPhone: [ |
317 | { required: true, message: "请输入联系电话", trigger: "blur" }, | 317 | { required: true, message: "请输入联系电话", trigger: "blur" }, |
318 | ], | 318 | ], |
@@ -342,7 +342,7 @@ export default { | @@ -342,7 +342,7 @@ export default { | ||
342 | }; | 342 | }; |
343 | }, | 343 | }, |
344 | created() { | 344 | created() { |
345 | - // _QueryData(); | 345 | + this._QueryData(); |
346 | }, | 346 | }, |
347 | methods: { | 347 | methods: { |
348 | openAddDia() { | 348 | openAddDia() { |
@@ -359,7 +359,7 @@ export default { | @@ -359,7 +359,7 @@ export default { | ||
359 | this.$refs.formAddCount.validate(async (valid) => { | 359 | this.$refs.formAddCount.validate(async (valid) => { |
360 | if (valid) { | 360 | if (valid) { |
361 | let params = { ...this.formAddCount }; | 361 | let params = { ...this.formAddCount }; |
362 | - const { data, status, info } = await this.$request.addUser({ | 362 | + const { data, status, info } = await this.$request.addTenant({ |
363 | ...params, | 363 | ...params, |
364 | }); | 364 | }); |
365 | if (status === 0) { | 365 | if (status === 0) { |
@@ -377,7 +377,11 @@ export default { | @@ -377,7 +377,11 @@ export default { | ||
377 | }, | 377 | }, |
378 | setCount(obj) { | 378 | setCount(obj) { |
379 | //修改账号 | 379 | //修改账号 |
380 | - this.formCount = { ...obj }; | 380 | + this.formCount.userId = obj.id; |
381 | + this.formCount.loginName = obj.loginName; | ||
382 | + this.formCount.tenantName = obj.tenantName; | ||
383 | + this.formCount.contactPerson = obj.realName; | ||
384 | + this.formCount.contactPhone = obj.phone; | ||
381 | this.diaCount = true; | 385 | this.diaCount = true; |
382 | }, | 386 | }, |
383 | handleDropdownClick(value, item) { | 387 | handleDropdownClick(value, item) { |
@@ -405,8 +409,8 @@ export default { | @@ -405,8 +409,8 @@ export default { | ||
405 | this.$refs.formCount.validate(async (valid) => { | 409 | this.$refs.formCount.validate(async (valid) => { |
406 | if (valid) { | 410 | if (valid) { |
407 | let params = { ...this.formCount }; | 411 | let params = { ...this.formCount }; |
408 | - params.password = encryptLoginPassword(params.password); | ||
409 | - const { data, status, info } = await this.$request.tenantUpdateUser({ | 412 | + // params.password = encryptLoginPassword(params.password); |
413 | + const { data, status, info } = await this.$request.updateTenant({ | ||
410 | type: 3, | 414 | type: 3, |
411 | ...params, | 415 | ...params, |
412 | }); | 416 | }); |
@@ -429,7 +433,7 @@ export default { | @@ -429,7 +433,7 @@ export default { | ||
429 | if (type == 1) { | 433 | if (type == 1) { |
430 | query.available = obj.available == 0 ? 1 : 0; | 434 | query.available = obj.available == 0 ? 1 : 0; |
431 | } | 435 | } |
432 | - const { data, status, info } = await this.$request.tenantUpdateUser({ | 436 | + const { data, status, info } = await this.$request.updateTenant({ |
433 | userId: obj.id, | 437 | userId: obj.id, |
434 | type: type, | 438 | type: type, |
435 | ...query, | 439 | ...query, |
@@ -444,7 +448,7 @@ export default { | @@ -444,7 +448,7 @@ export default { | ||
444 | async _QueryData() { | 448 | async _QueryData() { |
445 | let query = { ...this.query }; | 449 | let query = { ...this.query }; |
446 | if (query.loginName) { | 450 | if (query.loginName) { |
447 | - delete query.type; | 451 | + delete query.versionType; |
448 | delete query.available; | 452 | delete query.available; |
449 | } | 453 | } |
450 | this.loading = true; | 454 | this.loading = true; |
src/views/admin/clientVersion/index.vue
@@ -150,11 +150,7 @@ export default { | @@ -150,11 +150,7 @@ export default { | ||
150 | url: "/file/uploadApp", | 150 | url: "/file/uploadApp", |
151 | loading: false, | 151 | loading: false, |
152 | diaAdd: false, | 152 | diaAdd: false, |
153 | - tableData: [ | ||
154 | - { | ||
155 | - schoolName: "111", | ||
156 | - }, | ||
157 | - ], | 153 | + tableData: [], |
158 | formAdd: { | 154 | formAdd: { |
159 | versionName: "", | 155 | versionName: "", |
160 | versionNumber: "", | 156 | versionNumber: "", |
@@ -186,7 +182,7 @@ export default { | @@ -186,7 +182,7 @@ export default { | ||
186 | }; | 182 | }; |
187 | }, | 183 | }, |
188 | created() { | 184 | created() { |
189 | - // this._QueryData(); | 185 | + this._QueryData(); |
190 | }, | 186 | }, |
191 | methods: { | 187 | methods: { |
192 | openAddDia() { | 188 | openAddDia() { |
src/views/admin/device/index.vue
@@ -20,29 +20,24 @@ | @@ -20,29 +20,24 @@ | ||
20 | <p class="p2">基站数量</p> | 20 | <p class="p2">基站数量</p> |
21 | </div> | 21 | </div> |
22 | <div class="chart"> | 22 | <div class="chart"> |
23 | - <pie-chart | ||
24 | - id="pieChart" | ||
25 | - :params="chartData" | ||
26 | - ></pie-chart> | 23 | + <pie-chart id="pieChart" :params="chartData"></pie-chart> |
27 | </div> | 24 | </div> |
28 | </div> | 25 | </div> |
29 | <div class="table-box"> | 26 | <div class="table-box"> |
30 | <div class="answer-header"> | 27 | <div class="answer-header"> |
31 | <div class="sel-box"> | 28 | <div class="sel-box"> |
32 | - <el-select | ||
33 | - class="sel" | ||
34 | - v-model="query.school" | ||
35 | - placeholder="选择学校" | ||
36 | - @change="_QueryData(true)" | 29 | + <el-input |
30 | + placeholder="请输入租户" | ||
31 | + v-model="query.schoolName" | ||
32 | + class="input-with-select" | ||
33 | + @keyup.enter.native="_QueryData(true)" | ||
37 | > | 34 | > |
38 | - <el-option | ||
39 | - v-for="item in schoolList" | ||
40 | - :key="item.value" | ||
41 | - :label="item.label" | ||
42 | - :value="item.value" | ||
43 | - > | ||
44 | - </el-option> | ||
45 | - </el-select> | 35 | + <el-button |
36 | + slot="append" | ||
37 | + icon="el-icon-search" | ||
38 | + @click="_QueryData(true)" | ||
39 | + ></el-button> | ||
40 | + </el-input> | ||
46 | <el-input | 41 | <el-input |
47 | placeholder="请输入租户" | 42 | placeholder="请输入租户" |
48 | v-model="query.sn" | 43 | v-model="query.sn" |
@@ -140,7 +135,7 @@ | @@ -140,7 +135,7 @@ | ||
140 | <div class="table-box"> | 135 | <div class="table-box"> |
141 | <div class="answer-header"> | 136 | <div class="answer-header"> |
142 | <div class="sel-box"> | 137 | <div class="sel-box"> |
143 | - <el-select | 138 | + <el-select |
144 | class="sel" | 139 | class="sel" |
145 | v-model="query.school" | 140 | v-model="query.school" |
146 | placeholder="选择学校" | 141 | placeholder="选择学校" |
@@ -243,8 +238,6 @@ | @@ -243,8 +238,6 @@ | ||
243 | </div> | 238 | </div> |
244 | </div> | 239 | </div> |
245 | </div> | 240 | </div> |
246 | - | ||
247 | - | ||
248 | </div> | 241 | </div> |
249 | </template> | 242 | </template> |
250 | 243 | ||
@@ -262,10 +255,9 @@ export default { | @@ -262,10 +255,9 @@ export default { | ||
262 | this.page = 1; | 255 | this.page = 1; |
263 | this.total = 0; | 256 | this.total = 0; |
264 | this.count = 0; | 257 | this.count = 0; |
265 | - this.query.classId = []; | ||
266 | this.query.onlineStatus = ""; | 258 | this.query.onlineStatus = ""; |
267 | - this.query.sn = ""; | ||
268 | - this.query.type = ""; | 259 | + this.query.schoolName = ""; |
260 | + this.query.loginName = ""; | ||
269 | if (val == 1) { | 261 | if (val == 1) { |
270 | this.stationReport(); | 262 | this.stationReport(); |
271 | } else if (val == 2) { | 263 | } else if (val == 2) { |
@@ -281,8 +273,9 @@ export default { | @@ -281,8 +273,9 @@ export default { | ||
281 | schoolList: [], | 273 | schoolList: [], |
282 | type: 1, | 274 | type: 1, |
283 | query: { | 275 | query: { |
284 | - school: [], | ||
285 | - zuhu: "", | 276 | + schoolName: "", |
277 | + loginName: "", | ||
278 | + onlineStatus: "", | ||
286 | }, | 279 | }, |
287 | tableData: [], | 280 | tableData: [], |
288 | total: 0, | 281 | total: 0, |
@@ -295,8 +288,8 @@ export default { | @@ -295,8 +288,8 @@ export default { | ||
295 | }, | 288 | }, |
296 | created() { | 289 | created() { |
297 | this.code = localStorage.getItem("csCode") || ""; | 290 | this.code = localStorage.getItem("csCode") || ""; |
298 | - // this.stationReport(); | ||
299 | - // this._QueryData(); | 291 | + this.stationReport(); |
292 | + this._QueryData(); | ||
300 | }, | 293 | }, |
301 | activated() { | 294 | activated() { |
302 | const that = this; | 295 | const that = this; |
@@ -305,10 +298,10 @@ export default { | @@ -305,10 +298,10 @@ export default { | ||
305 | that.page = 1; | 298 | that.page = 1; |
306 | that.total = 0; | 299 | that.total = 0; |
307 | that.count = 0; | 300 | that.count = 0; |
308 | - that.query.school = ""; | ||
309 | - that.query.zuhu = ""; | ||
310 | - // that.stationReport(); | ||
311 | - // that._QueryData(); | 301 | + that.query.schoolName = ""; |
302 | + that.query.loginName = ""; | ||
303 | + that.stationReport(); | ||
304 | + that._QueryData(); | ||
312 | }); | 305 | }); |
313 | }, | 306 | }, |
314 | methods: { | 307 | methods: { |
@@ -327,7 +320,7 @@ export default { | @@ -327,7 +320,7 @@ export default { | ||
327 | }, | 320 | }, |
328 | // 基站统计数据 | 321 | // 基站统计数据 |
329 | async stationReport() { | 322 | async stationReport() { |
330 | - const { data, status, info } = await this.$request.stationReport(); | 323 | + const { data, status, info } = await this.$request.pStationReport(); |
331 | if (status === 0) { | 324 | if (status === 0) { |
332 | this.chartData = | 325 | this.chartData = |
333 | data.list?.map((item) => { | 326 | data.list?.map((item) => { |
@@ -349,7 +342,7 @@ export default { | @@ -349,7 +342,7 @@ export default { | ||
349 | }, | 342 | }, |
350 | // 答题器统计数据 | 343 | // 答题器统计数据 |
351 | async keyboardReport() { | 344 | async keyboardReport() { |
352 | - const { data, status, info } = await this.$request.keyboardReport(); | 345 | + const { data, status, info } = await this.$request.pKeyboardReport(); |
353 | if (status === 0) { | 346 | if (status === 0) { |
354 | this.chartData2 = | 347 | this.chartData2 = |
355 | data.list?.map((item) => { | 348 | data.list?.map((item) => { |
@@ -375,71 +368,21 @@ export default { | @@ -375,71 +368,21 @@ export default { | ||
375 | this.$message.error(info); | 368 | this.$message.error(info); |
376 | } | 369 | } |
377 | }, | 370 | }, |
378 | - setQuery() { | ||
379 | - //整理传参 | ||
380 | - let query = {}; | ||
381 | - if (this.query.sn) { | ||
382 | - query.sn = this.query.sn; | ||
383 | - } else { | ||
384 | - if (this.type == 1) { | ||
385 | - this.query.onlineStatus !== "" | ||
386 | - ? (query.onlineStatus = this.query.onlineStatus) | ||
387 | - : ""; | ||
388 | - } else if (this.type == 2) { | ||
389 | - this.query.type !== "" ? (query.type = this.query.type) : ""; | ||
390 | - } | ||
391 | - query.regionIds = []; | ||
392 | - query.schoolIds = []; | ||
393 | - query.gradeNames = []; | ||
394 | - query.classIds = []; | ||
395 | - this.query.classId?.map((item) => { | ||
396 | - if (item.length == 1) { | ||
397 | - if (!query.regionIds.includes(item[0])) { | ||
398 | - query.regionIds.push(item[0]); | ||
399 | - } | ||
400 | - } else if (item.length == 2) { | ||
401 | - if (!query.schoolIds.includes(item[1])) { | ||
402 | - query.schoolIds.push(item[1]); | ||
403 | - } | ||
404 | - query.regionIds.includes(item[0]) | ||
405 | - ? query.regionIds.remove(item[0]) | ||
406 | - : ""; | ||
407 | - } else if (item.length == 3) { | ||
408 | - if (!query.schoolIds.includes(item[1])) { | ||
409 | - query.schoolIds.push(item[1]); | ||
410 | - } | ||
411 | - if (!query.gradeNames.includes(item[2])) { | ||
412 | - query.gradeNames.push(item[2]); | ||
413 | - } | ||
414 | - query.regionIds.includes(item[0]) | ||
415 | - ? query.regionIds.remove(item[0]) | ||
416 | - : ""; | ||
417 | - } else if (item.length == 4) { | ||
418 | - if (!query.classIds.includes(item[3])) { | ||
419 | - query.classIds.push(item[3]); | ||
420 | - } | ||
421 | - query.regionIds.includes(item[0]) | ||
422 | - ? query.regionIds.remove(item[0]) | ||
423 | - : ""; | ||
424 | - query.schoolIds.includes(item[1]) | ||
425 | - ? query.schoolIds.remove(item[1]) | ||
426 | - : ""; | ||
427 | - query.gradeNames.includes(item[2]) | ||
428 | - ? query.gradeNames.remove(item[2]) | ||
429 | - : ""; | ||
430 | - } | ||
431 | - }); | ||
432 | - | ||
433 | - delete query.classId; | ||
434 | - } | ||
435 | - return query; | ||
436 | - }, | ||
437 | // 设备列表信息 | 371 | // 设备列表信息 |
438 | async _QueryData(isRef) { | 372 | async _QueryData(isRef) { |
439 | this.loading = true; | 373 | this.loading = true; |
440 | - let query = {...this.query}; | ||
441 | - if(query.zuhu){ | ||
442 | - delete query.school | 374 | + let query = {}; |
375 | + for (let key in this.query) { | ||
376 | + if (this.query[key]) { | ||
377 | + query[key] = this.query[key]; | ||
378 | + } | ||
379 | + } | ||
380 | + if (query.loginName) { | ||
381 | + delete query.schoolName; | ||
382 | + delete query.onlineStatus; | ||
383 | + } else if (query.schoolName) { | ||
384 | + delete query.loginName; | ||
385 | + delete query.onlineStatus; | ||
443 | } | 386 | } |
444 | if (isRef) { | 387 | if (isRef) { |
445 | this.page = 1; | 388 | this.page = 1; |
@@ -465,12 +408,6 @@ export default { | @@ -465,12 +408,6 @@ export default { | ||
465 | this.total = data.count; | 408 | this.total = data.count; |
466 | this.$nextTick(function () { | 409 | this.$nextTick(function () { |
467 | this.$refs.main.scrollTop = 0; | 410 | this.$refs.main.scrollTop = 0; |
468 | - if (this.query.classId.length) { | ||
469 | - this.selectionTabIds = this.tableData.map((item) => { | ||
470 | - this.$refs.multipleTable.toggleRowSelection(item); | ||
471 | - return item.id; | ||
472 | - }); | ||
473 | - } | ||
474 | }); | 411 | }); |
475 | } else { | 412 | } else { |
476 | this.$message.error(info); | 413 | this.$message.error(info); |
src/views/layout/header/header.vue
@@ -39,7 +39,6 @@ | @@ -39,7 +39,6 @@ | ||
39 | <img :src="avatar" /> | 39 | <img :src="avatar" /> |
40 | <div class="txt"> | 40 | <div class="txt"> |
41 | <p>{{ `${this.$store.getters.info.name}` }}</p> | 41 | <p>{{ `${this.$store.getters.info.name}` }}</p> |
42 | - <p>管理员</p> | ||
43 | </div> | 42 | </div> |
44 | </div> | 43 | </div> |
45 | </li> | 44 | </li> |
@@ -130,6 +129,11 @@ export default { | @@ -130,6 +129,11 @@ export default { | ||
130 | 2000, | 129 | 2000, |
131 | { leading: true, trailing: false } | 130 | { leading: true, trailing: false } |
132 | ), | 131 | ), |
132 | + linkToUserInfo() { | ||
133 | + this.$router.push({ | ||
134 | + path:'/userInfo' | ||
135 | + }) | ||
136 | + }, | ||
133 | collapse() { | 137 | collapse() { |
134 | this.isCollapse = !this.isCollapse; | 138 | this.isCollapse = !this.isCollapse; |
135 | this.$store.dispatch("collapse"); | 139 | this.$store.dispatch("collapse"); |
src/views/personal/examinationPaper/add.vue
@@ -865,7 +865,7 @@ | @@ -865,7 +865,7 @@ | ||
865 | </el-select> | 865 | </el-select> |
866 | </el-form-item> | 866 | </el-form-item> |
867 | <el-form-item label="知识点:"> | 867 | <el-form-item label="知识点:"> |
868 | - <el-select v-model="stem.tag" placeholder="选择知识点"> | 868 | + <el-select v-model="stem.tag" multiple placeholder="选择知识点"> |
869 | <el-option label="生字积累" :value="0"></el-option> | 869 | <el-option label="生字积累" :value="0"></el-option> |
870 | <el-option label="字词运用" :value="1"></el-option> | 870 | <el-option label="字词运用" :value="1"></el-option> |
871 | <el-option label="阅读理解" :value="2"></el-option> | 871 | <el-option label="阅读理解" :value="2"></el-option> |
@@ -929,7 +929,7 @@ export default { | @@ -929,7 +929,7 @@ export default { | ||
929 | stem: { | 929 | stem: { |
930 | src: "", //题干图片地址 | 930 | src: "", //题干图片地址 |
931 | type: 0, //题目难度 | 931 | type: 0, //题目难度 |
932 | - tag: 0, //知识点 | 932 | + tag: [], //知识点 |
933 | }, | 933 | }, |
934 | type: 1, //1-创建,2-复制答题卡 | 934 | type: 1, //1-创建,2-复制答题卡 |
935 | dialogVisible: false, //测验类型设置弹窗 | 935 | dialogVisible: false, //测验类型设置弹窗 |
src/views/personal/examinationPaper/edit.vue
@@ -144,7 +144,7 @@ | @@ -144,7 +144,7 @@ | ||
144 | circle | 144 | circle |
145 | size="small" | 145 | size="small" |
146 | icon="el-icon-tickets" | 146 | icon="el-icon-tickets" |
147 | - @click="openStem(subQuestions,1)" | 147 | + @click="openStem(subQuestions, 1)" |
148 | ></el-button> | 148 | ></el-button> |
149 | </el-tooltip> | 149 | </el-tooltip> |
150 | <el-tooltip effect="dark" content="题目打标" placement="top"> | 150 | <el-tooltip effect="dark" content="题目打标" placement="top"> |
@@ -153,7 +153,7 @@ | @@ -153,7 +153,7 @@ | ||
153 | circle | 153 | circle |
154 | size="small" | 154 | size="small" |
155 | icon="el-icon-price-tag" | 155 | icon="el-icon-price-tag" |
156 | - @click="openTag(subQuestions)" | 156 | + @click="openTag(subQuestions)" |
157 | ></el-button> | 157 | ></el-button> |
158 | </el-tooltip> | 158 | </el-tooltip> |
159 | <el-tooltip | 159 | <el-tooltip |
@@ -166,7 +166,7 @@ | @@ -166,7 +166,7 @@ | ||
166 | circle | 166 | circle |
167 | size="small" | 167 | size="small" |
168 | icon="el-icon-upload" | 168 | icon="el-icon-upload" |
169 | - @click="openStem(subQuestions,2)" | 169 | + @click="openStem(subQuestions, 2)" |
170 | ></el-button> | 170 | ></el-button> |
171 | </el-tooltip> | 171 | </el-tooltip> |
172 | </div> | 172 | </div> |
@@ -270,6 +270,35 @@ | @@ -270,6 +270,35 @@ | ||
270 | </template> | 270 | </template> |
271 | </p> | 271 | </p> |
272 | </div> | 272 | </div> |
273 | + <div class="qs-set"> | ||
274 | + <el-tooltip effect="dark" content="上传提干" placement="top"> | ||
275 | + <el-button | ||
276 | + type="primary" | ||
277 | + circle | ||
278 | + size="small" | ||
279 | + icon="el-icon-tickets" | ||
280 | + @click="openStem(subQuestions, 1)" | ||
281 | + ></el-button> | ||
282 | + </el-tooltip> | ||
283 | + <el-tooltip effect="dark" content="题目打标" placement="top"> | ||
284 | + <el-button | ||
285 | + type="primary" | ||
286 | + circle | ||
287 | + size="small" | ||
288 | + icon="el-icon-price-tag" | ||
289 | + @click="openTag(subQuestions)" | ||
290 | + ></el-button> | ||
291 | + </el-tooltip> | ||
292 | + <el-tooltip effect="dark" content="上传题目解析" placement="top"> | ||
293 | + <el-button | ||
294 | + type="primary" | ||
295 | + circle | ||
296 | + size="small" | ||
297 | + icon="el-icon-upload" | ||
298 | + @click="openStem(subQuestions, 2)" | ||
299 | + ></el-button> | ||
300 | + </el-tooltip> | ||
301 | + </div> | ||
273 | </div> | 302 | </div> |
274 | </li> | 303 | </li> |
275 | </ul> | 304 | </ul> |
@@ -336,7 +365,7 @@ | @@ -336,7 +365,7 @@ | ||
336 | >,</span | 365 | >,</span |
337 | > | 366 | > |
338 | </template> | 367 | </template> |
339 | - <template v-if="formAns.qusType == 2" class="answer-box"> | 368 | + <template v-if="formAns.qusType == 2"> |
340 | <span | 369 | <span |
341 | class="answer-s active" | 370 | class="answer-s active" |
342 | v-for="option in formAns.answerOptions.split(',')" | 371 | v-for="option in formAns.answerOptions.split(',')" |
@@ -362,19 +391,25 @@ | @@ -362,19 +391,25 @@ | ||
362 | <el-button @click="diaSetAns = false">取 消</el-button> | 391 | <el-button @click="diaSetAns = false">取 消</el-button> |
363 | </div> | 392 | </div> |
364 | </el-dialog> | 393 | </el-dialog> |
365 | - <el-dialog :title="upLoadType==1?'上传题干':'上传题目解析'" :visible.sync="dialogStem" width="500"> | 394 | + <el-dialog |
395 | + :title="upLoadType == 1 ? '上传题干' : '上传题目解析'" | ||
396 | + :visible.sync="dialogStem" | ||
397 | + width="500" | ||
398 | + > | ||
366 | <div> | 399 | <div> |
367 | <img class="stem-pic" :src="stem.src" alt="" /> | 400 | <img class="stem-pic" :src="stem.src" alt="" /> |
368 | <el-upload | 401 | <el-upload |
369 | class="upload-demo" | 402 | class="upload-demo" |
370 | - action="https://jsonplaceholder.typicode.com/posts/" | 403 | + action="/file/uploadImg" |
371 | :limit="1" | 404 | :limit="1" |
372 | :with-credentials="true" | 405 | :with-credentials="true" |
373 | :on-success="upSuccess" | 406 | :on-success="upSuccess" |
374 | :on-error="upError" | 407 | :on-error="upError" |
375 | accept="image/*" | 408 | accept="image/*" |
376 | > | 409 | > |
377 | - <el-button size="small" type="primary">{{stem.src?"重新上传":"选择照片"}}</el-button> | 410 | + <el-button size="small" type="primary">{{ |
411 | + stem.src ? "重新上传" : "选择照片" | ||
412 | + }}</el-button> | ||
378 | </el-upload> | 413 | </el-upload> |
379 | </div> | 414 | </div> |
380 | <div slot="footer"> | 415 | <div slot="footer"> |
@@ -383,29 +418,27 @@ | @@ -383,29 +418,27 @@ | ||
383 | </el-dialog> | 418 | </el-dialog> |
384 | <el-dialog title="题目打标" :visible.sync="dialogTag" width="500"> | 419 | <el-dialog title="题目打标" :visible.sync="dialogTag" width="500"> |
385 | <div> | 420 | <div> |
386 | - <el-form ref="form" :model="stem" label-width="160px"> | ||
387 | - <el-form-item label="题目难度:"> | ||
388 | - <el-select v-model="stem.type" placeholder="选择题目难度"> | ||
389 | - <el-option label="简单" :value="0"></el-option> | ||
390 | - <el-option label="正常" :value="1"></el-option> | ||
391 | - <el-option label="困难" :value="2"></el-option> | ||
392 | - </el-select> | ||
393 | - </el-form-item> | ||
394 | - <el-form-item label="知识点:"> | ||
395 | - <el-select v-model="stem.tag" placeholder="选择知识点"> | ||
396 | - <el-option label="生字积累" :value="0"></el-option> | ||
397 | - <el-option label="字词运用" :value="1"></el-option> | ||
398 | - <el-option label="阅读理解" :value="2"></el-option> | ||
399 | - <el-option label="作文" :value="2"></el-option> | ||
400 | - </el-select> | ||
401 | - </el-form-item> | 421 | + <el-form ref="form" :model="stem" label-width="160px"> |
422 | + <el-form-item label="题目难度:"> | ||
423 | + <el-select v-model="stem.type" placeholder="选择题目难度"> | ||
424 | + <el-option label="简单" :value="0"></el-option> | ||
425 | + <el-option label="正常" :value="1"></el-option> | ||
426 | + <el-option label="困难" :value="2"></el-option> | ||
427 | + </el-select> | ||
428 | + </el-form-item> | ||
429 | + <el-form-item label="知识点:"> | ||
430 | + <el-select v-model="stem.tag" multiple placeholder="选择知识点"> | ||
431 | + <el-option label="生字积累" :value="0"></el-option> | ||
432 | + <el-option label="字词运用" :value="1"></el-option> | ||
433 | + <el-option label="阅读理解" :value="2"></el-option> | ||
434 | + <el-option label="作文" :value="2"></el-option> | ||
435 | + </el-select> | ||
436 | + </el-form-item> | ||
402 | </el-form> | 437 | </el-form> |
403 | </div> | 438 | </div> |
404 | <div slot="footer"> | 439 | <div slot="footer"> |
405 | <el-button @click="dialogTag = false">取 消</el-button> | 440 | <el-button @click="dialogTag = false">取 消</el-button> |
406 | - <el-button type="primary" @click="dialogTag = false" | ||
407 | - >确 定</el-button | ||
408 | - > | 441 | + <el-button type="primary" @click="dialogTag = false">确 定</el-button> |
409 | </div> | 442 | </div> |
410 | </el-dialog> | 443 | </el-dialog> |
411 | </div> | 444 | </div> |
@@ -419,11 +452,11 @@ export default { | @@ -419,11 +452,11 @@ export default { | ||
419 | return { | 452 | return { |
420 | dialogStem: false, | 453 | dialogStem: false, |
421 | dialogTag: false, | 454 | dialogTag: false, |
422 | - upLoadType:1, | 455 | + upLoadType: 1, |
423 | stem: { | 456 | stem: { |
424 | src: "", //题干图片地址 | 457 | src: "", //题干图片地址 |
425 | type: 0, //题目难度 | 458 | type: 0, //题目难度 |
426 | - tag: 0, //知识点 | 459 | + tag: [], //知识点 |
427 | }, | 460 | }, |
428 | title: "", | 461 | title: "", |
429 | type: 1, | 462 | type: 1, |
@@ -475,8 +508,8 @@ export default { | @@ -475,8 +508,8 @@ export default { | ||
475 | this._QueryDetail(); | 508 | this._QueryDetail(); |
476 | }, | 509 | }, |
477 | methods: { | 510 | methods: { |
478 | - openStem(obj,type) { | ||
479 | - this.upLoadType = type | 511 | + openStem(obj, type) { |
512 | + this.upLoadType = type; | ||
480 | this.stem = { ...this.stem, obj }; | 513 | this.stem = { ...this.stem, obj }; |
481 | this.dialogStem = true; | 514 | this.dialogStem = true; |
482 | }, | 515 | }, |
@@ -1081,7 +1114,7 @@ export default { | @@ -1081,7 +1114,7 @@ export default { | ||
1081 | } | 1114 | } |
1082 | } | 1115 | } |
1083 | } | 1116 | } |
1084 | -.upload-demo{ | 1117 | +.upload-demo { |
1085 | text-align: center; | 1118 | text-align: center; |
1086 | } | 1119 | } |
1087 | .stem-pic { | 1120 | .stem-pic { |
src/views/personal/setUp/student.vue
@@ -83,7 +83,6 @@ | @@ -83,7 +83,6 @@ | ||
83 | <el-dialog title="添加学生" :visible.sync="diaStu" width="400"> | 83 | <el-dialog title="添加学生" :visible.sync="diaStu" width="400"> |
84 | <el-form | 84 | <el-form |
85 | ref="formBox" | 85 | ref="formBox" |
86 | - class="form-box" | ||
87 | :model="formStu" | 86 | :model="formStu" |
88 | :rules="rulesStu" | 87 | :rules="rulesStu" |
89 | label-width="160px" | 88 | label-width="160px" |
@@ -148,15 +147,32 @@ | @@ -148,15 +147,32 @@ | ||
148 | <el-input maxlength="30" v-model.trim="formClass.className" /> | 147 | <el-input maxlength="30" v-model.trim="formClass.className" /> |
149 | </el-col> | 148 | </el-col> |
150 | </el-form-item> | 149 | </el-form-item> |
151 | - <el-form-item label="入学年份:" prop="intoSchoolYear"> | ||
152 | - <el-col :span="10"> | ||
153 | - <el-date-picker | ||
154 | - v-model="formClass.intoSchoolYear" | ||
155 | - type="year" | ||
156 | - value-format="yyyy" | ||
157 | - placeholder="选择年" | 150 | + <el-form-item label="科目:" prop="subjectNames"> |
151 | + <div class="subject-box" :class="showAll ? 'active' : ''"> | ||
152 | + <span class="showAll" @click="showAll = !showAll">{{ | ||
153 | + showAll ? "收起" : "更多..." | ||
154 | + }}</span> | ||
155 | + <el-checkbox-group v-model="formClass.subjectNames"> | ||
156 | + <el-checkbox | ||
157 | + v-for="item in subjectList" | ||
158 | + :label="item" | ||
159 | + :key="item" | ||
160 | + >{{ item }}</el-checkbox | ||
161 | + > | ||
162 | + </el-checkbox-group> | ||
163 | + </div> | ||
164 | + <el-col :span="8"> | ||
165 | + <el-input | ||
166 | + placeholder="添加科目" | ||
167 | + v-model.trim="subjectName" | ||
168 | + maxlength="30" | ||
158 | > | 169 | > |
159 | - </el-date-picker> | 170 | + <i |
171 | + slot="suffix" | ||
172 | + class="el-input__icon el-icon-plus" | ||
173 | + @click="addSubjectName" | ||
174 | + ></i> | ||
175 | + </el-input> | ||
160 | </el-col> | 176 | </el-col> |
161 | </el-form-item> | 177 | </el-form-item> |
162 | </el-form> | 178 | </el-form> |
@@ -192,15 +208,16 @@ import { downloadFile, getBlob } from "@/utils"; | @@ -192,15 +208,16 @@ import { downloadFile, getBlob } from "@/utils"; | ||
192 | export default { | 208 | export default { |
193 | data() { | 209 | data() { |
194 | return { | 210 | return { |
195 | - diaUp: false, | ||
196 | - url: "/api_html/school/manager/importStudentClicker", | ||
197 | - diaStu: false, | ||
198 | - diaClass: false, | ||
199 | loading: false, | 211 | loading: false, |
212 | + diaUp: false,//导入弹窗 | ||
213 | + url: "/api_html/school/manager/importStudentClicker", | ||
214 | + diaStu: false,//添加学生 | ||
215 | + diaClass: false,//添加-修改班级 | ||
216 | + showAll: false, //修改年级科目显示 | ||
200 | query: { | 217 | query: { |
201 | classId: "", | 218 | classId: "", |
202 | }, | 219 | }, |
203 | - formStu: { | 220 | + formStu: {//添加学生信息 |
204 | className: "", | 221 | className: "", |
205 | studentName: "", | 222 | studentName: "", |
206 | studentCode: "", | 223 | studentCode: "", |
@@ -216,29 +233,32 @@ export default { | @@ -216,29 +233,32 @@ export default { | ||
216 | { required: true, message: "请输入学生长学号", trigger: "blur" }, | 233 | { required: true, message: "请输入学生长学号", trigger: "blur" }, |
217 | ], | 234 | ], |
218 | }, | 235 | }, |
219 | - formClass: { | 236 | + formClass: {//添加班级信息 |
220 | classId: "", | 237 | classId: "", |
221 | className: "", | 238 | className: "", |
222 | - intoSchoolYear: "", | 239 | + subjectNames: [], |
223 | }, | 240 | }, |
224 | rulesClass: { | 241 | rulesClass: { |
225 | className: [ | 242 | className: [ |
226 | { required: true, message: "请输入班级名称", trigger: "blur" }, | 243 | { required: true, message: "请输入班级名称", trigger: "blur" }, |
227 | ], | 244 | ], |
228 | }, | 245 | }, |
229 | - classList: [], | ||
230 | - studentList: [], | 246 | + classList: [],//班级列表 |
247 | + studentList: [],//学生列表 | ||
248 | + subjectList: [],//科目列表 | ||
249 | + subjectName: "",//添加科目名称 | ||
231 | }; | 250 | }; |
232 | }, | 251 | }, |
233 | async created() { | 252 | async created() { |
234 | // await this._QueryClass(); | 253 | // await this._QueryClass(); |
254 | + // this._QuerySubject(); | ||
235 | // this._QueryData(); | 255 | // this._QueryData(); |
236 | }, | 256 | }, |
237 | methods: { | 257 | methods: { |
238 | addClass() { | 258 | addClass() { |
239 | this.formClass.classId = ""; | 259 | this.formClass.classId = ""; |
240 | this.formClass.className = ""; | 260 | this.formClass.className = ""; |
241 | - this.formClass.intoSchoolYear = ""; | 261 | + this.formClass.subjectNames = []; |
242 | this.diaClass = true; | 262 | this.diaClass = true; |
243 | }, | 263 | }, |
244 | openAddDia() { | 264 | openAddDia() { |
@@ -257,16 +277,28 @@ export default { | @@ -257,16 +277,28 @@ export default { | ||
257 | setClass(obj) { | 277 | setClass(obj) { |
258 | this.formClass.classId = obj.id; | 278 | this.formClass.classId = obj.id; |
259 | this.formClass.className = obj.className; | 279 | this.formClass.className = obj.className; |
260 | - this.formClass.intoSchoolYear = obj.intoSchoolYear + ""; | 280 | + this.formClass.subjectNames = obj.subjectNames; |
261 | this.diaClass = true; | 281 | this.diaClass = true; |
262 | }, | 282 | }, |
283 | + addSubjectName() { | ||
284 | + if (!this.subjectName) { | ||
285 | + this.$message.warning("请填写科目名称"); | ||
286 | + return; | ||
287 | + } else if (this.subjectList.includes(this.subjectName)) { | ||
288 | + this.$message.warning("科目已存在,请重新填写~"); | ||
289 | + return; | ||
290 | + } | ||
291 | + this.subjectList.push(this.subjectName); | ||
292 | + this.formClass.subjectNames.push(this.subjectName); | ||
293 | + this.subjectName = ""; | ||
294 | + }, | ||
263 | saveClass() { | 295 | saveClass() { |
264 | this.$refs.formClass.validate(async (valid) => { | 296 | this.$refs.formClass.validate(async (valid) => { |
265 | if (valid) { | 297 | if (valid) { |
266 | const { data, status, info } = await this.$request.updateClass({ | 298 | const { data, status, info } = await this.$request.updateClass({ |
267 | classId: this.formClass.classId, | 299 | classId: this.formClass.classId, |
268 | className: this.formClass.className, | 300 | className: this.formClass.className, |
269 | - intoSchoolYear: this.formClass.intoSchoolYear, | 301 | + subjectNames: this.formClass.subjectNames, |
270 | }); | 302 | }); |
271 | if (status === 0) { | 303 | if (status === 0) { |
272 | this.$message.success("修改成功"); | 304 | this.$message.success("修改成功"); |
@@ -315,6 +347,14 @@ export default { | @@ -315,6 +347,14 @@ export default { | ||
315 | this.diaUp = false; | 347 | this.diaUp = false; |
316 | this._QueryData(); | 348 | this._QueryData(); |
317 | }, | 349 | }, |
350 | + async _QuerySubject() { | ||
351 | + const { data, status, info } = await this.$request.pSubjectList(); | ||
352 | + if (status === 0) { | ||
353 | + this.subjectList = [...data.subjectNames] || []; | ||
354 | + } else { | ||
355 | + this.$message.error(info); | ||
356 | + } | ||
357 | + }, | ||
318 | async downExcel() { | 358 | async downExcel() { |
319 | this.loadingDown = true; | 359 | this.loadingDown = true; |
320 | let { data, info, status } = | 360 | let { data, info, status } = |
@@ -523,4 +563,34 @@ export default { | @@ -523,4 +563,34 @@ export default { | ||
523 | } | 563 | } |
524 | } | 564 | } |
525 | } | 565 | } |
566 | +.form-box { | ||
567 | + .subject-box { | ||
568 | + padding-right:50px; | ||
569 | + max-height: 90px; | ||
570 | + overflow: hidden; | ||
571 | + position: relative; | ||
572 | + &.active { | ||
573 | + max-height: auto; | ||
574 | + overflow: auto; | ||
575 | + } | ||
576 | + .showAll { | ||
577 | + position: absolute; | ||
578 | + bottom: 0; | ||
579 | + right: 10px; | ||
580 | + font-size: 12px; | ||
581 | + color: #7f7f7f; | ||
582 | + cursor: pointer; | ||
583 | + padding: 2px; | ||
584 | + &:hover { | ||
585 | + color: #667ffd; | ||
586 | + } | ||
587 | + } | ||
588 | + } | ||
589 | + .el-icon-plus { | ||
590 | + cursor: pointer; | ||
591 | + &:hover { | ||
592 | + color: #667ffd; | ||
593 | + } | ||
594 | + } | ||
595 | +} | ||
526 | </style> | 596 | </style> |
527 | \ No newline at end of file | 597 | \ No newline at end of file |
src/views/standard/setUp/school.vue
@@ -230,7 +230,7 @@ export default { | @@ -230,7 +230,7 @@ export default { | ||
230 | }, | 230 | }, |
231 | data() { | 231 | data() { |
232 | return { | 232 | return { |
233 | - code: "", | 233 | + code: "",//长水跳转标志 |
234 | loading: false, | 234 | loading: false, |
235 | url: "xxx", | 235 | url: "xxx", |
236 | diaUp: false, | 236 | diaUp: false, |
@@ -246,7 +246,7 @@ export default { | @@ -246,7 +246,7 @@ export default { | ||
246 | tenantName: "", | 246 | tenantName: "", |
247 | }, | 247 | }, |
248 | tableData: [], | 248 | tableData: [], |
249 | - formSchool: { | 249 | + formSchool: {//修改学校 |
250 | sections: "", | 250 | sections: "", |
251 | managePwd: "", | 251 | managePwd: "", |
252 | contactPerson: "", | 252 | contactPerson: "", |
@@ -264,7 +264,7 @@ export default { | @@ -264,7 +264,7 @@ export default { | ||
264 | }, | 264 | }, |
265 | ], | 265 | ], |
266 | }, | 266 | }, |
267 | - formGrade: { | 267 | + formGrade: {//修改年级 |
268 | gradeName: "", | 268 | gradeName: "", |
269 | subjectNames: [], | 269 | subjectNames: [], |
270 | classList: [], | 270 | classList: [], |
@@ -297,14 +297,14 @@ export default { | @@ -297,14 +297,14 @@ export default { | ||
297 | this._QueryDataSchool(); | 297 | this._QueryDataSchool(); |
298 | this._QueryDataGrade(); | 298 | this._QueryDataGrade(); |
299 | }, | 299 | }, |
300 | - setGrade(obj) { | 300 | + setGrade(obj) {//打开年级设置 |
301 | this.formGrade.subjectNames = obj.subjectNames; | 301 | this.formGrade.subjectNames = obj.subjectNames; |
302 | this.formGrade.classList = obj.classList; | 302 | this.formGrade.classList = obj.classList; |
303 | this.formGrade.gradeName = obj.gradeName; | 303 | this.formGrade.gradeName = obj.gradeName; |
304 | this.showAll = false; | 304 | this.showAll = false; |
305 | this.diaGrade = true; | 305 | this.diaGrade = true; |
306 | }, | 306 | }, |
307 | - addSubjectName() { | 307 | + addSubjectName() {//添加科目 |
308 | if (!this.subjectName) { | 308 | if (!this.subjectName) { |
309 | this.$message.warning("请填写科目名称"); | 309 | this.$message.warning("请填写科目名称"); |
310 | return; | 310 | return; |
@@ -316,7 +316,7 @@ export default { | @@ -316,7 +316,7 @@ export default { | ||
316 | this.formGrade.subjectNames.push(this.subjectName); | 316 | this.formGrade.subjectNames.push(this.subjectName); |
317 | this.subjectName = ""; | 317 | this.subjectName = ""; |
318 | }, | 318 | }, |
319 | - editSchool() { | 319 | + editSchool() {//保存修改学校信息 |
320 | if (!this.formSchool.sections.length) { | 320 | if (!this.formSchool.sections.length) { |
321 | this.$message.error("请选择学段!"); | 321 | this.$message.error("请选择学段!"); |
322 | return; | 322 | return; |
@@ -349,7 +349,7 @@ export default { | @@ -349,7 +349,7 @@ export default { | ||
349 | } | 349 | } |
350 | }); | 350 | }); |
351 | }, | 351 | }, |
352 | - async editGrade() { | 352 | + async editGrade() {//保存修改年级信息 |
353 | if (!this.formGrade.subjectNames.length) { | 353 | if (!this.formGrade.subjectNames.length) { |
354 | this.$message.error("请选择科目!"); | 354 | this.$message.error("请选择科目!"); |
355 | return; | 355 | return; |
@@ -371,7 +371,7 @@ export default { | @@ -371,7 +371,7 @@ export default { | ||
371 | this.$message.error(info); | 371 | this.$message.error(info); |
372 | } | 372 | } |
373 | }, | 373 | }, |
374 | - async _QueryDataSchool() { | 374 | + async _QueryDataSchool() {//学校详情 |
375 | this.loading = true; | 375 | this.loading = true; |
376 | const { data, status, info } = await this.$request.schoolDetail(); | 376 | const { data, status, info } = await this.$request.schoolDetail(); |
377 | this.loading = false; | 377 | this.loading = false; |
src/views/standard/test/analysis.vue
@@ -513,19 +513,6 @@ export default { | @@ -513,19 +513,6 @@ export default { | ||
513 | this.page = page; | 513 | this.page = page; |
514 | this.examQuestionReport(); | 514 | this.examQuestionReport(); |
515 | }, | 515 | }, |
516 | - async downExcel() { | ||
517 | - let data = await this.$request.subjectiveScoreTemplate({ | ||
518 | - examId: this.id, | ||
519 | - }); | ||
520 | - if (data && !data.code) { | ||
521 | - let blob = new Blob([data], { | ||
522 | - type: "application/vnd.ms-excel;charset=utf-8", | ||
523 | - }); | ||
524 | - downloadFile(`主观题模版.xlsx`, blob); | ||
525 | - } else { | ||
526 | - this.$message.error(data.info); | ||
527 | - } | ||
528 | - }, | ||
529 | async _QueryData() { | 516 | async _QueryData() { |
530 | this.examDetail(); | 517 | this.examDetail(); |
531 | this.examStudentReport(); | 518 | this.examStudentReport(); |
@@ -679,6 +666,19 @@ export default { | @@ -679,6 +666,19 @@ export default { | ||
679 | this.$message.error("下载失败"); | 666 | this.$message.error("下载失败"); |
680 | } | 667 | } |
681 | }, | 668 | }, |
669 | + async downExcel() { | ||
670 | + let data = await this.$request.subjectiveScoreTemplate({ | ||
671 | + examId: this.id, | ||
672 | + }); | ||
673 | + if (data && !data.code) { | ||
674 | + let blob = new Blob([data], { | ||
675 | + type: "application/vnd.ms-excel;charset=utf-8", | ||
676 | + }); | ||
677 | + downloadFile(`主观题模版.xlsx`, blob); | ||
678 | + } else { | ||
679 | + this.$message.error(data.info); | ||
680 | + } | ||
681 | + }, | ||
682 | }, | 682 | }, |
683 | }; | 683 | }; |
684 | </script> | 684 | </script> |
src/views/standard/test/editAnswer.vue
@@ -285,7 +285,7 @@ | @@ -285,7 +285,7 @@ | ||
285 | >,</span | 285 | >,</span |
286 | > | 286 | > |
287 | </template> | 287 | </template> |
288 | - <template v-if="formAns.qusType == 2" class="answer-box"> | 288 | + <template v-if="formAns.qusType == 2"> |
289 | <span | 289 | <span |
290 | class="answer-s active" | 290 | class="answer-s active" |
291 | v-for="option in formAns.answerOptions.split(',')" | 291 | v-for="option in formAns.answerOptions.split(',')" |
@@ -373,7 +373,7 @@ export default { | @@ -373,7 +373,7 @@ export default { | ||
373 | } | 373 | } |
374 | return tit; | 374 | return tit; |
375 | }, | 375 | }, |
376 | - setBigNum(num) { | 376 | + setBigNum(num) {//转题号格式 |
377 | let txt = ""; | 377 | let txt = ""; |
378 | let bigNum = [ | 378 | let bigNum = [ |
379 | "一", | 379 | "一", |
@@ -401,28 +401,6 @@ export default { | @@ -401,28 +401,6 @@ export default { | ||
401 | 401 | ||
402 | return txt; | 402 | return txt; |
403 | }, | 403 | }, |
404 | - // keydownAnswer(event) { | ||
405 | - // //快速答案设置禁止输入 | ||
406 | - // if ( | ||
407 | - // event.key == "Meta" || | ||
408 | - // event.key == "CapsLock" || | ||
409 | - // event.key == "Shift" || | ||
410 | - // event.key == "Enter" || | ||
411 | - // event.key == "Alt" || | ||
412 | - // event.key == "Backspace" || | ||
413 | - // event.key == "Delete" || | ||
414 | - // event.key == "ArrowUp" || | ||
415 | - // event.key == "ArrowDown" || | ||
416 | - // event.key == "ArrowLeft" || | ||
417 | - // event.key == "v" || | ||
418 | - // event.key == "V" || | ||
419 | - // event.key == "ArrowRight" | ||
420 | - // ) { | ||
421 | - // return; | ||
422 | - // } else { | ||
423 | - // event.returnValue = ""; | ||
424 | - // } | ||
425 | - // }, | ||
426 | keydownAnswer(event, type) { | 404 | keydownAnswer(event, type) { |
427 | let answerA = "ABCDEFG"; | 405 | let answerA = "ABCDEFG"; |
428 | let answer_a = "abcdefg"; | 406 | let answer_a = "abcdefg"; |
@@ -450,7 +428,7 @@ export default { | @@ -450,7 +428,7 @@ export default { | ||
450 | event.returnValue = ""; | 428 | event.returnValue = ""; |
451 | } | 429 | } |
452 | }, | 430 | }, |
453 | - setAllAnswer(event, type) { | 431 | + setAllAnswer(event, type) {//批量设置答案输入格式化答案 |
454 | let str = this.formAns.answerList; | 432 | let str = this.formAns.answerList; |
455 | let str2 = checkAnswer( | 433 | let str2 = checkAnswer( |
456 | str, | 434 | str, |
@@ -460,7 +438,7 @@ export default { | @@ -460,7 +438,7 @@ export default { | ||
460 | ); | 438 | ); |
461 | this.formAns.answerList = str2; | 439 | this.formAns.answerList = str2; |
462 | }, | 440 | }, |
463 | - setAnswer(type, ans) { | 441 | + setAnswer(type, ans) {//答案显示格式 |
464 | let txt = ""; | 442 | let txt = ""; |
465 | if (type == 2) { | 443 | if (type == 2) { |
466 | txt = ans; | 444 | txt = ans; |
@@ -471,7 +449,7 @@ export default { | @@ -471,7 +449,7 @@ export default { | ||
471 | } | 449 | } |
472 | return txt; | 450 | return txt; |
473 | }, | 451 | }, |
474 | - insertTxtAndSetcursor(answerList, str) { | 452 | + insertTxtAndSetcursor(answerList, str) {//调整重新设置答案后的光标位置 |
475 | let element = this.$refs.formAnsIpt.$el.children[0]; // 获取到指定标签 | 453 | let element = this.$refs.formAnsIpt.$el.children[0]; // 获取到指定标签 |
476 | let startPos = element.selectionStart; // 获取光标开始的位置 | 454 | let startPos = element.selectionStart; // 获取光标开始的位置 |
477 | if (startPos === undefined) { | 455 | if (startPos === undefined) { |
@@ -487,8 +465,7 @@ export default { | @@ -487,8 +465,7 @@ export default { | ||
487 | }; | 465 | }; |
488 | } | 466 | } |
489 | }, | 467 | }, |
490 | - setMultiple(obj, answer) { | ||
491 | - //多选答案设置 | 468 | + setMultiple(obj, answer) { //多选答案设置 |
492 | let resault = this.insertTxtAndSetcursor(obj.answerList || "", answer); | 469 | let resault = this.insertTxtAndSetcursor(obj.answerList || "", answer); |
493 | obj.answerList = resault.text; | 470 | obj.answerList = resault.text; |
494 | let str = obj.answerList; | 471 | let str = obj.answerList; |
@@ -502,8 +479,7 @@ export default { | @@ -502,8 +479,7 @@ export default { | ||
502 | this.$refs.formAnsIpt.$el.children[0].focus(); | 479 | this.$refs.formAnsIpt.$el.children[0].focus(); |
503 | this.$refs.formAnsIpt.$el.children[0].selectionStart = resault.startPos; | 480 | this.$refs.formAnsIpt.$el.children[0].selectionStart = resault.startPos; |
504 | }, | 481 | }, |
505 | - changAnswer(sub, option) { | ||
506 | - //设置多选答案 | 482 | + changAnswer(sub, option) {//设置多选答案 |
507 | let str = new RegExp(option, "g"); | 483 | let str = new RegExp(option, "g"); |
508 | if (sub.correctAnswer?.includes(option)) { | 484 | if (sub.correctAnswer?.includes(option)) { |
509 | sub.correctAnswer = sub.correctAnswer.replace(str, ""); | 485 | sub.correctAnswer = sub.correctAnswer.replace(str, ""); |
@@ -513,12 +489,11 @@ export default { | @@ -513,12 +489,11 @@ export default { | ||
513 | sub.correctAnswer = arrs.sort().join(""); | 489 | sub.correctAnswer = arrs.sort().join(""); |
514 | } | 490 | } |
515 | }, | 491 | }, |
516 | - setFormAns(indexs, index) { | ||
517 | - //初始化要修改的答案 | 492 | + setFormAns(indexs, index) {//初始化要修改的答案 |
518 | if (this.questionList[0].subQuestions) { | 493 | if (this.questionList[0].subQuestions) { |
519 | this.formAns = { ...this.questionList[index].subQuestions[indexs] }; | 494 | this.formAns = { ...this.questionList[index].subQuestions[indexs] }; |
520 | this.formAns.listIndex = index; | 495 | this.formAns.listIndex = index; |
521 | - let startIndex = (this.formAns.index+1) - this.formAns.subNum;//批量设置大难开始位置 | 496 | + let startIndex = (this.formAns.index+1) - this.formAns.subNum;//批量设置答案开始位置 |
522 | let answerList = ""; | 497 | let answerList = ""; |
523 | this.questionList[index].subQuestions.map((item, subIdx) => { | 498 | this.questionList[index].subQuestions.map((item, subIdx) => { |
524 | if (subIdx >= startIndex) { | 499 | if (subIdx >= startIndex) { |
src/views/standard/test/index.vue
@@ -530,7 +530,7 @@ export default { | @@ -530,7 +530,7 @@ export default { | ||
530 | }); | 530 | }); |
531 | }, | 531 | }, |
532 | methods: { | 532 | methods: { |
533 | - changeSub(val) { | 533 | + changeSub(val) {//科目改变触发事件 |
534 | let sub; | 534 | let sub; |
535 | if (val && val.length) { | 535 | if (val && val.length) { |
536 | let leng = val.length - 1; | 536 | let leng = val.length - 1; |
@@ -552,14 +552,14 @@ export default { | @@ -552,14 +552,14 @@ export default { | ||
552 | }, | 552 | }, |
553 | }); | 553 | }); |
554 | }, | 554 | }, |
555 | - uploadSJ(obj) { | 555 | + uploadSJ(obj) {//导入开关 |
556 | this.examId = obj.id; | 556 | this.examId = obj.id; |
557 | this.diaUp = true; | 557 | this.diaUp = true; |
558 | }, | 558 | }, |
559 | cancel() { | 559 | cancel() { |
560 | this.dialogVisible = false; | 560 | this.dialogVisible = false; |
561 | }, | 561 | }, |
562 | - saveSuccess() { | 562 | + saveSuccess() {//修改答案回调 |
563 | this.dialogVisible = false; | 563 | this.dialogVisible = false; |
564 | this._QueryData(); | 564 | this._QueryData(); |
565 | }, | 565 | }, |
@@ -657,21 +657,6 @@ export default { | @@ -657,21 +657,6 @@ export default { | ||
657 | this.page = 1; | 657 | this.page = 1; |
658 | this._QueryData(); | 658 | this._QueryData(); |
659 | }, | 659 | }, |
660 | - async downExcel() { | ||
661 | - this.loadingDown = true; | ||
662 | - let data = await this.$request.subjectiveScoreTemplate({ | ||
663 | - examId: this.examId, | ||
664 | - }); | ||
665 | - this.loadingDown = false; | ||
666 | - if (data && !data.code) { | ||
667 | - let blob = new Blob([data], { | ||
668 | - type: "application/vnd.ms-excel;charset=utf-8", | ||
669 | - }); | ||
670 | - downloadFile(`主观题模版.xlsx`, blob); | ||
671 | - } else { | ||
672 | - this.$message.error(data.info); | ||
673 | - } | ||
674 | - }, | ||
675 | async changClazz() { | 660 | async changClazz() { |
676 | this.page = 1; | 661 | this.page = 1; |
677 | await this._QuerySubjectList(); | 662 | await this._QuerySubjectList(); |
@@ -863,7 +848,7 @@ export default { | @@ -863,7 +848,7 @@ export default { | ||
863 | this.$message.error(info); | 848 | this.$message.error(info); |
864 | } | 849 | } |
865 | }, | 850 | }, |
866 | - async downExl() { | 851 | + async downExl() {//报表到处 |
867 | if (this.exportLoading == true) return; | 852 | if (this.exportLoading == true) return; |
868 | let query = {}; | 853 | let query = {}; |
869 | for (let key in this.query) { | 854 | for (let key in this.query) { |
@@ -907,6 +892,21 @@ export default { | @@ -907,6 +892,21 @@ export default { | ||
907 | this.$message.error("下载失败"); | 892 | this.$message.error("下载失败"); |
908 | } | 893 | } |
909 | }, | 894 | }, |
895 | + async downExcel() {//模板下载 | ||
896 | + this.loadingDown = true; | ||
897 | + let data = await this.$request.subjectiveScoreTemplate({ | ||
898 | + examId: this.examId, | ||
899 | + }); | ||
900 | + this.loadingDown = false; | ||
901 | + if (data && !data.code) { | ||
902 | + let blob = new Blob([data], { | ||
903 | + type: "application/vnd.ms-excel;charset=utf-8", | ||
904 | + }); | ||
905 | + downloadFile(`主观题模版.xlsx`, blob); | ||
906 | + } else { | ||
907 | + this.$message.error(data.info); | ||
908 | + } | ||
909 | + }, | ||
910 | }, | 910 | }, |
911 | }; | 911 | }; |
912 | </script> | 912 | </script> |
vue.config.js
@@ -22,7 +22,8 @@ module.exports = { | @@ -22,7 +22,8 @@ module.exports = { | ||
22 | }, | 22 | }, |
23 | proxy: { | 23 | proxy: { |
24 | "/": { | 24 | "/": { |
25 | - target:"http://47.104.214.8", | 25 | + // target:"http://47.104.214.8", |
26 | + target:"http://121.40.127.171", | ||
26 | changeOrigin: true, | 27 | changeOrigin: true, |
27 | ws:true, | 28 | ws:true, |
28 | }, | 29 | }, |