Commit 296f7c47fc36b62a586df74b6385e9614b3fc74d

Authored by 梁保满
1 parent 1b9bae95

集团管理员接口调整

src/views/analysis/index.vue
... ... @@ -77,7 +77,7 @@
77 77 align="center"
78 78 v-for="(item, index) in dataList"
79 79 :key="index"
80   - :label="item.schoolName"
  80 + :label="item.schoolName||item.gradeName"
81 81 >
82 82 <template>
83 83 <el-table-column
... ... @@ -219,13 +219,13 @@ export default {
219 219 query[key] = this.query[key];
220 220 }
221 221 }
222   - if (this.role == "ROLE_JITUAN") {
223   - if (this.query.regionId == "") {
224   - this.type = 1;
225   - } else {
226   - this.type = 2;
227   - }
228   - }
  222 + // if (this.role == "ROLE_JITUAN") {
  223 + // if (this.query.regionId == "") {
  224 + // this.type = 1;
  225 + // } else {
  226 + // this.type = 2;
  227 + // }
  228 + // }
229 229 const Contrast =
230 230 this.role != "ROLE_JITUAN"
231 231 ? this.$request.gradeContrast
... ...
src/views/device/index.vue
... ... @@ -499,6 +499,7 @@ export default {
499 499 diaAnswerEqu: false,
500 500 gradeList: [],
501 501 gradeListAll: [],
  502 + schoolAll:[],
502 503 props: { multiple: true, checkStrictly: true },
503 504 type: 1,
504 505 query: {
... ... @@ -558,6 +559,7 @@ export default {
558 559 this.stationReport();
559 560 this._QueryGradeList();
560 561 this._QueryData();
  562 + this.showSchool()
561 563 },
562 564 methods: {
563 565 edit() {},
... ... @@ -612,6 +614,24 @@ export default {
612 614 this.page = page;
613 615 this._QueryData(false);
614 616 },
  617 + async showSchool() {
  618 + const { data, status, info } = await this.$request.schoolList();
  619 + if (status === 0) {
  620 + this.schoolAll= [{
  621 + value:0,
  622 + label:"全部",
  623 + children:data.list?.map(item=>{
  624 + return {
  625 + value:item.id,
  626 + label:item.schoolName,
  627 + }
  628 + })
  629 + }]
  630 + this.gradeList = [...this.schoolAll,...this.gradeList]
  631 + } else {
  632 + this.$message.error(info);
  633 + }
  634 + },
615 635 async autoUpDate(id) {
616 636 if (!this.selectionTabIds.length && !id) {
617 637 this.$message.warning("请选择授课端~");
... ... @@ -721,6 +741,7 @@ export default {
721 741 }) || [];
722 742 return gradeList;
723 743 }) || [];
  744 + this.gradeList = [...this.schoolAll,...this.gradeList]
724 745 }
725 746 }
726 747 } else {
... ... @@ -744,11 +765,11 @@ export default {
744 765 : item.onlineStatus == 0
745 766 ? "离线"
746 767 : "异常",
747   - value: item.rate,
748   - count: item.count,
  768 + value: item.total,
  769 + rate: item.rate,
749 770 };
750 771 }) || [];
751   - this.total = data.total || 0;
  772 + // this.total = data.total || 0;
752 773 } else {
753 774 this.$message.error(info);
754 775 }
... ... @@ -780,7 +801,7 @@ export default {
780 801 rate: item.rate,
781 802 };
782 803 }) || [];
783   - this.total = data.total || 0;
  804 + // this.total = data.total || 0;
784 805 } else {
785 806 this.$message.error(info);
786 807 }
... ... @@ -857,6 +878,7 @@ export default {
857 878 this.loading = false;
858 879 if (status == 0) {
859 880 this.tableData = data?.list || [];
  881 + this.total = data.count
860 882 } else {
861 883 this.$message.error(info);
862 884 }
... ...
src/views/setUp/account.vue
... ... @@ -337,6 +337,7 @@ export default {
337 337 tenantRoleList: [],
338 338 regionList: [],
339 339 schoolList: [],
  340 + schoolAll:[],
340 341 props: { multiple: true, checkStrictly: true },
341 342 roleList: [],
342 343 query: {
... ... @@ -392,6 +393,7 @@ export default {
392 393 if (this.role == "ROLE_JITUAN") {
393 394 this._TenantRoleList();
394 395 this._RegionList();
  396 + this.showSchool()
395 397 } else {
396 398 this._RoleList();
397 399 }
... ... @@ -491,6 +493,24 @@ export default {
491 493 }
492 494 });
493 495 },
  496 + async showSchool() {
  497 + const { data, status, info } = await this.$request.schoolList();
  498 + if (status === 0) {
  499 + this.schoolAll= [{
  500 + value:0,
  501 + label:"全部",
  502 + children:data.list?.map(item=>{
  503 + return {
  504 + value:item.id,
  505 + label:item.schoolName,
  506 + }
  507 + })
  508 + }]
  509 + this.schoolList = [...this.schoolAll,...this.schoolList]
  510 + } else {
  511 + this.$message.error(info);
  512 + }
  513 + },
494 514 async updateUser(obj, type) {
495 515 let query = {
496 516 userId: obj.id,
... ... @@ -549,6 +569,7 @@ export default {
549 569 children: children,
550 570 };
551 571 });
  572 + this.schoolList = [...this.schoolAll,...this.schoolList]
552 573 } else {
553 574 this.$message.error(info);
554 575 }
... ...
src/views/setUp/conglomerate.vue
... ... @@ -325,9 +325,9 @@ export default {
325 325 },
326 326 addSchool() {
327 327 //添加学校
328   - this.formSchool.name = "";
329   - this.formSchool.grade = [];
330   - this.formSchool.quyu = "";
  328 + this.formSchool.schoolName = "";
  329 + this.formSchool.sections = [];
  330 + this.formSchool.regionId = "";
331 331 this.diaSchool = true;
332 332 },
333 333 setRegion(obj) {
... ... @@ -404,8 +404,10 @@ export default {
404 404 this.$refs["formSchool"].validate(async (valid) => {
405 405 // 验证通过:保存
406 406 if (valid) {
  407 + let query = {...this.formSchool}
  408 + query.sections = query.sections.join(',')
407 409 const { data, status, info } = await this.$request.saveSchool({
408   - ...this.formSchool,
  410 + ...query,
409 411 });
410 412 if (status === 0) {
411 413 this.$message.success(info);
... ...