authorizeIndex.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <template>
  2. <view class="container">
  3. <view class="content">
  4. <view class="public_tip">
  5. <view class="public_tip_box displayFlexRow">
  6. <image class="tips_icon" :src="iconUrl.spot_left" />
  7. <text class="colorCustom">温馨提示</text>
  8. <image class="tips_icon" :src="iconUrl.spot_right" />
  9. </view>
  10. <view class="public_tip_text">1.普通授权服务:系统默认只对个别基础服务进行授权操作。 2、人脸核身出示,接受查验,凭绿码方可进入院区。针对老年人等不使用、</view>
  11. <view class="public_tip_text">2.高级授权服务:开启高级授权服务,使用者将可 使用您的信息进行就诊业务操作,以及查阅您的全 部隐私档案数据,开启高级授权,需</view>
  12. <view class="public_tip_text">3.解除绑定:将把您的档案信息及授权服务,从对方亲情成员列表中移除。</view>
  13. </view>
  14. <view class="textTip">
  15. 您当前已授权{{authorizeList.length}}个亲情成员业务操作,业务授权开启后,亲情成员可为您处理门诊挂号、充值缴费、检查预约、报告查询等
  16. </view>
  17. <view class="authoList">
  18. <view class="authoBox" v-for="(item, index) in authorizeList" :key="index">
  19. <view class="authoBox_info">
  20. <view class="authoBox_infoName">姓名:{{item.member.memberName}}</view>
  21. <view class="authoBox_infoTxt">手机号:{{item.member.mobile}}</view>
  22. <view class="authoBox_infoTxt">身份证:{{item.member.idCardNo}}</view>
  23. <!-- 占位 -->
  24. <view class="authoBox_infoBlank"></view>
  25. <view class="authoBox_infoTxt"> 绑定时间:{{item.createTime}}</view>
  26. <view class="authoBox_infoTxt">授权方式:{{item.bindModeCodeName}}</view>
  27. <view class="authoBox_infoTag displayFlexLeft">
  28. <view class="tag">
  29. <text class="bg backgroundCustom "></text>
  30. <text class="text colorCustom">{{item.relationCodeName}}</text>
  31. </view>
  32. </view>
  33. </view>
  34. <view class="authoBox_operate displayFlexBetween">
  35. <view class="colorCustom_F08" v-if="item.memberAccountAuth.seniorOpen == 1">已开启高级授权</view>
  36. <view v-if="item.memberAccountAuth.seniorOpen == 0">已授权<text class="colorCustom_F08">{{getAuthNum(item.memberAccountAuth)}}</text>项业务服务操作</view>
  37. <view class=" displayFlexLeft ">
  38. <view class="authoBox_operateBtn border border" @click="unbind(item)">解除绑定</view>
  39. <view class="authoBox_operateBtn backgroundCustom ml16" @click="jmpDetails(item)">授权管理</view>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. <view v-if="authorizeList.length == 0">
  45. <noData value="暂无数据"></noData>
  46. </view>
  47. </view>
  48. </view>
  49. </template>
  50. <script lang="ts" setup>
  51. import { ref } from 'vue';
  52. import { onShow } from '@dcloudio/uni-app';
  53. import { queryAccountAuthList as queryAccountAuthListApi, backstageDelUserMember_V3 } from '@/pagesPersonal/service/patientManagement';
  54. import { common } from '@/utils';
  55. import icon from '@/utils/icon';
  56. import noData from '@/pages/st1/components/noData/noData.vue';
  57. const app = getApp();
  58. const iconUrl = ref(icon)
  59. const myInfo = ref<any>({});
  60. const authorizeList = ref<any[]>([]);
  61. onShow(() => {
  62. myInfo.value = app.globalData.myInfo || {};
  63. queryAccountAuthList();
  64. });
  65. // 查询我的授权列表
  66. const queryAccountAuthList = async () => {
  67. let { resData } = await queryAccountAuthListApi({
  68. openId: uni.getStorageSync('openid'),
  69. memberId: myInfo.value.memberId,
  70. store: {
  71. baseMemberEncryptionStore: myInfo.value.baseMemberEncryptionStore,
  72. },
  73. accountSn: myInfo.value.accountSn,
  74. });
  75. authorizeList.value = resData || [];
  76. };
  77. // 跳转授权管理
  78. const jmpDetails = (item: any) => {
  79. common.goToUrl(`/pagesPersonal/st1/business/authorizeMangement/authorizeDetails/authorizeDetails?authorizeInfo=${encodeURIComponent(JSON.stringify(item))}`);
  80. };
  81. // 解除绑定
  82. const unbind = async (item: any) => {
  83. common.showModal(`解除对【${item.member.memberName}】绑定后,亲友成员将无法再看到绑定的就诊人信息!`, async () => {
  84. let { resData } = await backstageDelUserMember_V3({
  85. accountSn: item.memberAccountAuth.accountSn,
  86. memberId: item.memberAccountAuth.memberId,
  87. });
  88. if (resData.RespCode == '10000') {
  89. common.showModal('解除成功', () => {
  90. queryAccountAuthList();
  91. });
  92. }
  93. }, { title: "温馨提示", cancelText: '返回' });
  94. };
  95. // 授权业务数量
  96. const getAuthNum = (item: any) => {
  97. let authNum = 0;
  98. // 授权业务字段名称
  99. let authList = ['bookOpen', 'chargeOpen'];
  100. for (let i = 0; i < authList.length; i++) {
  101. authNum = item[authList[i]] == 1 ? authNum + 1 : authNum;
  102. }
  103. return authNum;
  104. };
  105. </script>
  106. <style lang="scss" scoped>
  107. .public_tip {
  108. border-radius: 24upx;
  109. background: white;
  110. margin: 30upx;
  111. }
  112. .public_tip .tips_icon {
  113. width: 75upx;
  114. height: 23upx;
  115. }
  116. .public_tip .public_tip_box {
  117. margin-bottom: 48upx;
  118. }
  119. .public_tip .public_tip_box text {
  120. font-size: 32upx;
  121. font-weight: bold;
  122. padding: 0 24upx;
  123. box-sizing: border-box;
  124. color: #222326;
  125. }
  126. .public_tip .public_tip_text {
  127. font-size: 28upx;
  128. color: #62626D;
  129. padding-bottom: 28upx;
  130. line-height: 44upx;
  131. }
  132. .public_tip .public_tip_text:last-child {
  133. padding-bottom: 0;
  134. }
  135. .textTip{
  136. font-size: 28upx;
  137. color: #898999;
  138. line-height: 40upx;
  139. text-align: justify;
  140. font-style: normal;
  141. text-transform: none;
  142. margin: 30upx;
  143. }
  144. .authoBox{
  145. border-radius: 24upx;
  146. background: white;
  147. margin: 30upx;
  148. padding: 30upx;
  149. }
  150. .authoBox_info{
  151. position: relative;
  152. background: #F7F7F9;
  153. border-radius: 10upx;
  154. border-radius: 10upx;
  155. padding: 19upx;
  156. }
  157. .authoBox_info .authoBox_infoName{
  158. font-weight: bold;
  159. font-size: 30upx;
  160. color: #212326;
  161. margin: 20upx 0 30upx;
  162. }
  163. .authoBox_info .authoBox_infoTxt{
  164. font-size: 28upx;
  165. color: #4D4D53;
  166. margin-bottom: 19upx;
  167. }
  168. .authoBox_infoBlank{
  169. height: 40upx;
  170. }
  171. .authoBox_info .authoBox_infoTag{
  172. position: absolute;
  173. right: 30upx;
  174. top: 38upx;
  175. }
  176. .authoBox_info .authoBox_infoTag .tag{
  177. padding: 4upx 8upx;
  178. font-size: 22upx;
  179. margin-left: 8upx;
  180. position: relative;
  181. }
  182. .authoBox_info .authoBox_infoTag .tag .bg{
  183. opacity: .1;
  184. width: 100%;
  185. height: 100%;
  186. position: absolute;
  187. top: 0;
  188. left: 0;
  189. }
  190. .authoBox_operate{
  191. font-weight: bold;
  192. font-size: 28upx;
  193. color: #212326;
  194. margin: 30upx 0 4upx;
  195. }
  196. .authoBox_operateBtn{
  197. width: 137upx;
  198. height: 60upx;
  199. line-height: 60upx;
  200. text-align: center;
  201. font-size: 26upx;
  202. font-weight: initial;
  203. border-radius: 30upx;
  204. color: var(--dominantColor);
  205. }
  206. .ml16{
  207. margin-left: 16upx;
  208. }
  209. </style>