|
@@ -55,7 +55,7 @@
|
|
|
<dataBoardNew :oid="schId" :org="schOrg" :userid="userinfo.userid"/>
|
|
|
</div>
|
|
|
<div class="Con" v-if="isActive === 2">
|
|
|
- <AschoolFeature :schId="schId" :schOrg="schOrg"></AschoolFeature>
|
|
|
+ <AschoolFeature :schId="groupoId" :schOrg="grouporgCopy"></AschoolFeature>
|
|
|
</div>
|
|
|
<div class="Con" v-if="isActive === 3">
|
|
|
<AquickEntrance :key="isActive"></AquickEntrance>
|
|
@@ -112,7 +112,11 @@ export default {
|
|
|
isIndex2:'',
|
|
|
schId:'',
|
|
|
schOrg:'',
|
|
|
- schList:[]
|
|
|
+ schList:[],
|
|
|
+ groupoId:'',
|
|
|
+ grouporg:'',
|
|
|
+ grouporgCopy:'',
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -120,7 +124,19 @@ export default {
|
|
|
console.log('val',val);
|
|
|
this.schId = val.oid
|
|
|
this.schOrg = val.org
|
|
|
-
|
|
|
+ // 这是为了获取集团特色总览数据的org
|
|
|
+ // this.isActive == 2 是为了使this.groupoId = '',不然学校只有一个校区的时候修改总览就会出现错误(会把校区的给修改了)
|
|
|
+ if(!val.org && this.isActive == 2){
|
|
|
+ console.log('555');
|
|
|
+
|
|
|
+ this.grouporgCopy = this.grouporg
|
|
|
+ this.groupoId = ''
|
|
|
+ }else{
|
|
|
+ console.log('666');
|
|
|
+
|
|
|
+ this.grouporgCopy = val.org
|
|
|
+ this.groupoId = val.oid
|
|
|
+ }
|
|
|
},
|
|
|
...mapActions({
|
|
|
logout: 'user/logout'
|
|
@@ -167,8 +183,11 @@ export default {
|
|
|
.post(API_CONFIG.baseUrl, params)
|
|
|
.then((res) => {
|
|
|
console.log('res',res);
|
|
|
+ // console.log('JSON.parse(res.data[0][0].json)',JSON.parse(res.data[0][0].json));
|
|
|
+
|
|
|
if (res.data != 0) {
|
|
|
let data = JSON.parse(res.data[0][0].json).admin.school.list
|
|
|
+ this.grouporg = res.data[0][0].id
|
|
|
this.schList = data
|
|
|
}
|
|
|
|
|
@@ -180,6 +199,17 @@ export default {
|
|
|
},
|
|
|
// 导航栏切换
|
|
|
setActive(Index) {
|
|
|
+ if(!this.schOrg && this.userinfo.org && Index == 2){
|
|
|
+ console.log('555');
|
|
|
+
|
|
|
+ this.grouporgCopy = this.grouporg
|
|
|
+ this.groupoId = ''
|
|
|
+ }else{
|
|
|
+ console.log('666');
|
|
|
+
|
|
|
+ this.grouporgCopy = this.schOrg
|
|
|
+ this.groupoId = this.schId
|
|
|
+ }
|
|
|
this.isActive = Index;
|
|
|
}
|
|
|
},
|
|
@@ -195,17 +225,24 @@ export default {
|
|
|
&& this.fromL.admin.school.list[0].children
|
|
|
&& this.fromL.admin.school.list[0].children.length) {
|
|
|
console.log('111');
|
|
|
- this.schList = this.fromL.admin.school.list
|
|
|
+ // this.schList = this.fromL.admin.school.list
|
|
|
this.schId = this.fromL.admin.school.list[0].children[0].schoolid
|
|
|
+ this.groupoId = this.fromL.admin.school.list[0].children[0].schoolid
|
|
|
this.schOrg = this.fromL.admin.school.list[0].children[0].orgid
|
|
|
+ this.grouporgCopy = this.fromL.admin.school.list[0].children[0].orgid
|
|
|
+
|
|
|
}else{
|
|
|
console.log('222');
|
|
|
this.schId = this.userinfo.organizeid
|
|
|
+ this.groupoId = this.userinfo.organizeid
|
|
|
this.schOrg = this.userinfo.org
|
|
|
+ this.grouporgCopy = this.userinfo.org
|
|
|
}
|
|
|
|
|
|
- // 查询组织pid
|
|
|
- if (this.userinfo.org && !this.fromL.admin.school.list.length) {
|
|
|
+ // 查询组织pid 和为了获取集团特色总览数据的org
|
|
|
+
|
|
|
+ // bar侧边栏的数据只有组织才有,如果获取的是学校的json,则不会有bar
|
|
|
+ if (this.userinfo.org) {
|
|
|
this.getSchoolList()
|
|
|
}
|
|
|
|