123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235 |
- <template>
- <view class="main">
- <view class="one">
- <view class="one_1">群组成员({{total||0}})</view>
- <view class="one_2">
- <view class="list" v-for="(item, index) in personList" :key="index" @tap="toChat(item)">
- <view class="url">
- <image class="image"
- :src="item.icon&&item.icon.length>0?item.icon[0].url:config.user_url[0].url" mode="">
- </image>
- </view>
- <view class="name textOne">{{item.name||'暂无姓名'}}</view>
- </view>
- </view>
- <view class="one_3">
- <view class="more" @tap="toMore">查看更多群成员 <text class="iconfont icon-dayuhao"></text></view>
- </view>
- </view>
- <view class="two">
- <view class="two_1">医生信息</view>
- <view class="two_2">
- <image class="image"
- :src="doctorInfo.icon&&doctorInfo.icon.length>0?doctorInfo.icon[0].url:config.user_url[0].url"
- mode="">
- </image>
- <view class="name textOver">姓名:{{doctorInfo.name||'暂无'}}</view>
- <view class="other">
- <view class="other_1 textOne">
- <text>手机号:</text>{{doctorInfo.mobile||'暂无'}}
- </view>
- <view class="other_1 textOne">
- <text>医院名称:</text>{{doctorInfo.hos_name||'暂无'}}
- </view>
- <view class="other_1 textOne">
- <text>科室名称:</text>{{doctorInfo.dept_name||'暂无'}}
- </view>
- <view class="other_1 textOne">
- <text>职称:</text>{{doctorInfo.post||'暂无'}}
- </view>
- <view class="other_1 textOne">
- <text>职务:</text>{{doctorInfo.title||'暂无'}}
- </view>
- <view class="other_1 textOne">
- <text>简介:</text>{{doctorInfo.content||'暂无'}}
- </view>
- </view>
- </view>
- </view>
- <view class="thr">
- <view class="thr_1">群简介</view>
- <view class="thr_2">{{info.content||'暂无'}}</view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- id: '',
- config: {},
- info: {},
- // 群成员
- personList: [],
- doctorInfo: {},
- total: 0,
- skip: 0,
- limit: 20,
- }
- },
- onLoad: async function(e) {
- const that = this;
- that.$set(that, `id`, e && e.id || '');
- uni.setNavigationBarTitle({
- title: e && e.title || '群组'
- });
- await that.searchConfig();
- await that.search();
- },
- methods: {
- searchConfig() {
- const that = this;
- try {
- const res = uni.getStorageSync('config');
- if (res) that.$set(that, `config`, res);
- } catch (e) {}
- },
- async search() {
- const that = this;
- if (that.id) {
- const res = await that.$api(`/group/${that.id}`, 'GET', {})
- if (res.errcode == '0') {
- that.$set(that, `info`, res.data)
- that.$set(that, `total`, res.data.patients.length)
- that.$set(that, `doctorInfo`, res.data.doctor)
- } else {
- uni.showToast({
- title: res.errmsg,
- icon: 'none'
- });
- }
- // 群成员
- let info = {
- skip: that.skip,
- limit: that.limit,
- groupId: that.id
- }
- const arr = await that.$api(`/group/getPaitentList`, 'GET', {
- ...info
- })
- if (arr.errcode == '0') {
- that.$set(that, `personList`, arr.data)
- } else {
- uni.showToast({
- title: arr.errmsg,
- icon: 'none'
- });
- }
- }
- },
- // 聊天
- toChat(item) {
- console.log(item);
- },
- // 查看更多成员
- toMore() {
- console.log('查看更多成员');
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .main {
- padding: 2vw;
- background-color: var(--f9Color);
- .one {
- background-color: var(--mainColor);
- .one_1 {
- text-align: center;
- padding: 2vw 0;
- font-size: var(--font16Size);
- font-weight: bold;
- }
- .one_2 {
- display: flex;
- flex-wrap: wrap;
- .list {
- display: flex;
- flex-direction: column;
- align-items: center;
- width: 15vw;
- margin: 2vw;
- .image {
- width: 15vw;
- height: 15vw;
- border-radius: 2vw;
- }
- .name {
- margin: 1vw 0 0 0;
- font-size: var(--font12Size);
- color: var(--f85Color);
- }
- }
- }
- .one_3 {
- .more {
- text-align: center;
- padding: 4vw;
- font-size: var(--font14Size);
- color: var(--f69Color);
- }
- }
- }
- .two {
- padding: 2vw;
- margin: 2vw 0;
- background-color: var(--mainColor);
- .two_1 {
- font-size: var(--font16Size);
- font-weight: bold;
- }
- .two_2 {
- padding: 2vw 0;
- .image {
- width: 20vw;
- height: 20vw;
- border-radius: 2vw;
- }
- .name {
- font-size: var(--font14Size);
- font-weight: bold;
- }
- .other {
- font-size: var(--font14Size);
- color: var(--f69Color);
- .other_1 {
- margin: 1vw 0 0 0;
- }
- }
- }
- }
- .thr {
- padding: 2vw;
- margin: 2vw 0;
- background-color: var(--mainColor);
- .thr_1 {
- font-size: var(--font16Size);
- font-weight: bold;
- }
- .thr_2 {
- padding: 2vw 0;
- font-size: var(--font14Size);
- color: var(--f69Color);
- }
- }
- }
- </style>
|