|
|
@@ -28,19 +28,19 @@
|
|
|
:src="require('@/assets/img/my/header.png')"
|
|
|
/>
|
|
|
<div class="user-name">
|
|
|
- {{ getShowUserName() }}
|
|
|
+ {{ getShowUserName() }}
|
|
|
</div>
|
|
|
<!-- <div style="line-height: 11vw;" v-if="subUserActions && subUserActions.length>0">
|
|
|
- <van-popover v-model="showPopover" placement="left-end" trigger="click"
|
|
|
- :actions="subUserActions"
|
|
|
- @select="onSelect">
|
|
|
+ <van-popover v-model="showPopover" placement="left-end" trigger="click"
|
|
|
+ :actions="subUserActions"
|
|
|
+ @select="onSelect">
|
|
|
<template #reference>
|
|
|
<van-button size="mini" icon="exchange" round type="info">切换机构</van-button>
|
|
|
</template>
|
|
|
</van-popover>
|
|
|
</div> -->
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
</div>
|
|
|
<div class="top-card-line" style="display: flex;">
|
|
|
<div style="-webkit-box-flex: 1;-webkit-flex: 1;flex: 1;">
|
|
|
@@ -55,13 +55,36 @@
|
|
|
</p>
|
|
|
</div>
|
|
|
<div v-if="subUserActions && subUserActions.length>0">
|
|
|
- <van-popover v-model="showPopover" placement="left-end" trigger="click" class="xxxx"
|
|
|
- :actions="subUserActions"
|
|
|
- @select="onSelect">
|
|
|
+
|
|
|
+ <van-dialog v-model="showPopover" title="切换机构" width="95%" @confirm="onSelect" show-cancel-button>
|
|
|
+ <van-row class="rowclss">
|
|
|
+ <van-col span="24">
|
|
|
+ <van-radio-group v-model="peoplesId">
|
|
|
+ <van-cell-group>
|
|
|
+ <van-cell v-for="item in subUserActions" clickable :key="item.subUserId" :name="item.subUserId">
|
|
|
+ <template #title>
|
|
|
+ <span :class="item.haveUnDoTask ? 'custom-required-indicator' : 'custom-no-indicator'">
|
|
|
+ {{item.text}}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ <template #right-icon>
|
|
|
+ <van-radio :name="item.subUserId" />
|
|
|
+ </template>
|
|
|
+ </van-cell>
|
|
|
+
|
|
|
+ </van-cell-group>
|
|
|
+ </van-radio-group >
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ </van-dialog>
|
|
|
+ <van-button size="mini" round icon="exchange" type="default" @click="showDailog">切换机构</van-button>
|
|
|
+<!-- <van-popover v-model="showPopover" placement="left-end" trigger="click" class="xxxx"
|
|
|
+ :actions="subUserActions"
|
|
|
+ @select="onSelect">
|
|
|
<template #reference>
|
|
|
<van-button size="mini" round icon="exchange" type="default">切换机构</van-button>
|
|
|
</template>
|
|
|
- </van-popover>
|
|
|
+ </van-popover>-->
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="top-card-line">
|
|
|
@@ -78,7 +101,7 @@
|
|
|
<div style="height: 2vw;"></div>
|
|
|
</div>
|
|
|
<div class="card-footer"></div>
|
|
|
-
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -88,13 +111,14 @@
|
|
|
data() {
|
|
|
return {
|
|
|
showPopover:false,
|
|
|
+ peoplesId:null,
|
|
|
subUserActions: [],
|
|
|
}
|
|
|
},
|
|
|
created(){
|
|
|
},
|
|
|
mounted(){
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
watch:{
|
|
|
subUserList:{
|
|
|
@@ -111,6 +135,9 @@
|
|
|
...mapGetters(['userName', 'orgName','roleList', 'orgId','subUserList','masterUserName','masterUserId']),
|
|
|
},
|
|
|
methods: {
|
|
|
+ showDailog(){
|
|
|
+ this.showPopover=true;
|
|
|
+ },
|
|
|
getShowUserName()
|
|
|
{
|
|
|
// console.log("getShowUserName",this.masterUserName ,this.masterUserId)
|
|
|
@@ -124,14 +151,14 @@
|
|
|
}
|
|
|
},
|
|
|
initSubUserActions(){
|
|
|
- console.log("initSubUserActions",this.subUserList)
|
|
|
+ console.log("initSubUserActions",this.subUserList)
|
|
|
if(this.subUserList && this.subUserList.length>0)
|
|
|
{
|
|
|
this.getSubUserUnDoTaskList();
|
|
|
}
|
|
|
},
|
|
|
clickSwitchUser(subUserId)
|
|
|
- {
|
|
|
+ {
|
|
|
switchUser(subUserId).then(res => {
|
|
|
// console.log(res, 'res')
|
|
|
sessionStorage.clear();
|
|
|
@@ -147,7 +174,7 @@
|
|
|
onSelect(action)
|
|
|
{
|
|
|
// console.log("onSelect",action,action.text);
|
|
|
- this.clickSwitchUser(action.subUserId);
|
|
|
+ this.clickSwitchUser(this.peoplesId);
|
|
|
},
|
|
|
getSubUserUnDoTaskList()
|
|
|
{
|
|
|
@@ -157,7 +184,7 @@
|
|
|
return {userId:i.subUserId,orgId:i.subUserOrgId};
|
|
|
} );
|
|
|
userUnDoList(users).then(res => {
|
|
|
-
|
|
|
+
|
|
|
// console.log("initSubUserActions2",this.subUserList)
|
|
|
this.subUserActions=[];
|
|
|
this.subUserList.forEach(sUser => {
|
|
|
@@ -168,15 +195,15 @@
|
|
|
{
|
|
|
haveUnDoTask=true;
|
|
|
}
|
|
|
- }
|
|
|
- // let tempText= `${sUser.subUserOrgName}`;
|
|
|
- let tempAction={ text: sUser.subUserOrgName,subUserId:sUser.subUserId};
|
|
|
+ }
|
|
|
+ // let tempText= `${sUser.subUserOrgName}`;
|
|
|
+ let tempAction={ text: sUser.subUserOrgName,subUserId:sUser.subUserId,haveUnDoTask:haveUnDoTask};
|
|
|
if(haveUnDoTask)
|
|
|
{
|
|
|
tempAction={className:"haveUnDoTask",...tempAction};
|
|
|
}
|
|
|
this.subUserActions.push(tempAction)
|
|
|
-
|
|
|
+
|
|
|
});
|
|
|
// console.log("xxx",this.subUserActions)
|
|
|
})
|
|
|
@@ -188,7 +215,7 @@
|
|
|
this.$router.replace('/login');
|
|
|
this.$toast('退出登录');
|
|
|
})
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
@@ -199,11 +226,11 @@
|
|
|
flex:none !important;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.haveUnDoTask
|
|
|
{
|
|
|
.van-popover__action-text::before{
|
|
|
- content: "";
|
|
|
+ content: "";
|
|
|
width:10px;
|
|
|
height:10px;
|
|
|
background-color: red;
|
|
|
@@ -213,9 +240,9 @@
|
|
|
}
|
|
|
}
|
|
|
</style>
|
|
|
-<style scoped lang="scss">
|
|
|
-
|
|
|
-
|
|
|
+<style scoped lang="scss">
|
|
|
+
|
|
|
+
|
|
|
.card-footer{
|
|
|
height: 3vw;
|
|
|
}
|
|
|
@@ -292,4 +319,36 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .rowclss {
|
|
|
+ // height: 1050px;
|
|
|
+ max-height: calc(80vh - 180px);
|
|
|
+ min-height: 200px;
|
|
|
+ // height: calc(100vh - 490px);
|
|
|
+ overflow: scroll;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ .custom-required-indicator::before {
|
|
|
+ content: '';
|
|
|
+ display: inline-block;
|
|
|
+ width: 10px;
|
|
|
+ height: 10px;
|
|
|
+ margin-right: 4px;
|
|
|
+ background-color: red;
|
|
|
+ border-radius: 50%;
|
|
|
+ vertical-align: middle;
|
|
|
+ }
|
|
|
+ .custom-no-indicator::before {
|
|
|
+ content: '';
|
|
|
+ display: inline-block;
|
|
|
+ width: 6px;
|
|
|
+ height: 6px;
|
|
|
+ margin-right: 4px;
|
|
|
+ background-color: #ffffff;
|
|
|
+ border-radius: 50%;
|
|
|
+ vertical-align: middle;
|
|
|
+ }
|
|
|
+ ::v-deep .van-dialog{
|
|
|
+ top: 50% !important;
|
|
|
+ }
|
|
|
</style>
|