Commit 296f7c47fc36b62a586df74b6385e9614b3fc74d

Authored by 梁保满
1 parent 1b9bae95

集团管理员接口调整

src/views/analysis/index.vue
@@ -77,7 +77,7 @@ @@ -77,7 +77,7 @@
77 align="center" 77 align="center"
78 v-for="(item, index) in dataList" 78 v-for="(item, index) in dataList"
79 :key="index" 79 :key="index"
80 - :label="item.schoolName" 80 + :label="item.schoolName||item.gradeName"
81 > 81 >
82 <template> 82 <template>
83 <el-table-column 83 <el-table-column
@@ -219,13 +219,13 @@ export default { @@ -219,13 +219,13 @@ export default {
219 query[key] = this.query[key]; 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 const Contrast = 229 const Contrast =
230 this.role != "ROLE_JITUAN" 230 this.role != "ROLE_JITUAN"
231 ? this.$request.gradeContrast 231 ? this.$request.gradeContrast
src/views/device/index.vue
@@ -499,6 +499,7 @@ export default { @@ -499,6 +499,7 @@ export default {
499 diaAnswerEqu: false, 499 diaAnswerEqu: false,
500 gradeList: [], 500 gradeList: [],
501 gradeListAll: [], 501 gradeListAll: [],
  502 + schoolAll:[],
502 props: { multiple: true, checkStrictly: true }, 503 props: { multiple: true, checkStrictly: true },
503 type: 1, 504 type: 1,
504 query: { 505 query: {
@@ -558,6 +559,7 @@ export default { @@ -558,6 +559,7 @@ export default {
558 this.stationReport(); 559 this.stationReport();
559 this._QueryGradeList(); 560 this._QueryGradeList();
560 this._QueryData(); 561 this._QueryData();
  562 + this.showSchool()
561 }, 563 },
562 methods: { 564 methods: {
563 edit() {}, 565 edit() {},
@@ -612,6 +614,24 @@ export default { @@ -612,6 +614,24 @@ export default {
612 this.page = page; 614 this.page = page;
613 this._QueryData(false); 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 async autoUpDate(id) { 635 async autoUpDate(id) {
616 if (!this.selectionTabIds.length && !id) { 636 if (!this.selectionTabIds.length && !id) {
617 this.$message.warning("请选择授课端~"); 637 this.$message.warning("请选择授课端~");
@@ -721,6 +741,7 @@ export default { @@ -721,6 +741,7 @@ export default {
721 }) || []; 741 }) || [];
722 return gradeList; 742 return gradeList;
723 }) || []; 743 }) || [];
  744 + this.gradeList = [...this.schoolAll,...this.gradeList]
724 } 745 }
725 } 746 }
726 } else { 747 } else {
@@ -744,11 +765,11 @@ export default { @@ -744,11 +765,11 @@ export default {
744 : item.onlineStatus == 0 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 } else { 773 } else {
753 this.$message.error(info); 774 this.$message.error(info);
754 } 775 }
@@ -780,7 +801,7 @@ export default { @@ -780,7 +801,7 @@ export default {
780 rate: item.rate, 801 rate: item.rate,
781 }; 802 };
782 }) || []; 803 }) || [];
783 - this.total = data.total || 0; 804 + // this.total = data.total || 0;
784 } else { 805 } else {
785 this.$message.error(info); 806 this.$message.error(info);
786 } 807 }
@@ -857,6 +878,7 @@ export default { @@ -857,6 +878,7 @@ export default {
857 this.loading = false; 878 this.loading = false;
858 if (status == 0) { 879 if (status == 0) {
859 this.tableData = data?.list || []; 880 this.tableData = data?.list || [];
  881 + this.total = data.count
860 } else { 882 } else {
861 this.$message.error(info); 883 this.$message.error(info);
862 } 884 }
src/views/setUp/account.vue
@@ -337,6 +337,7 @@ export default { @@ -337,6 +337,7 @@ export default {
337 tenantRoleList: [], 337 tenantRoleList: [],
338 regionList: [], 338 regionList: [],
339 schoolList: [], 339 schoolList: [],
  340 + schoolAll:[],
340 props: { multiple: true, checkStrictly: true }, 341 props: { multiple: true, checkStrictly: true },
341 roleList: [], 342 roleList: [],
342 query: { 343 query: {
@@ -392,6 +393,7 @@ export default { @@ -392,6 +393,7 @@ export default {
392 if (this.role == "ROLE_JITUAN") { 393 if (this.role == "ROLE_JITUAN") {
393 this._TenantRoleList(); 394 this._TenantRoleList();
394 this._RegionList(); 395 this._RegionList();
  396 + this.showSchool()
395 } else { 397 } else {
396 this._RoleList(); 398 this._RoleList();
397 } 399 }
@@ -491,6 +493,24 @@ export default { @@ -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 async updateUser(obj, type) { 514 async updateUser(obj, type) {
495 let query = { 515 let query = {
496 userId: obj.id, 516 userId: obj.id,
@@ -549,6 +569,7 @@ export default { @@ -549,6 +569,7 @@ export default {
549 children: children, 569 children: children,
550 }; 570 };
551 }); 571 });
  572 + this.schoolList = [...this.schoolAll,...this.schoolList]
552 } else { 573 } else {
553 this.$message.error(info); 574 this.$message.error(info);
554 } 575 }
src/views/setUp/conglomerate.vue
@@ -325,9 +325,9 @@ export default { @@ -325,9 +325,9 @@ export default {
325 }, 325 },
326 addSchool() { 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 this.diaSchool = true; 331 this.diaSchool = true;
332 }, 332 },
333 setRegion(obj) { 333 setRegion(obj) {
@@ -404,8 +404,10 @@ export default { @@ -404,8 +404,10 @@ export default {
404 this.$refs["formSchool"].validate(async (valid) => { 404 this.$refs["formSchool"].validate(async (valid) => {
405 // 验证通过:保存 405 // 验证通过:保存
406 if (valid) { 406 if (valid) {
  407 + let query = {...this.formSchool}
  408 + query.sections = query.sections.join(',')
407 const { data, status, info } = await this.$request.saveSchool({ 409 const { data, status, info } = await this.$request.saveSchool({
408 - ...this.formSchool, 410 + ...query,
409 }); 411 });
410 if (status === 0) { 412 if (status === 0) {
411 this.$message.success(info); 413 this.$message.success(info);