YiLiaoJiGoDetailDialog.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <template>
  2. <div class="case_detail_container">
  3. <div class="dialog_container_header">
  4. <div class="dialog_container_header_title">详情</div>
  5. <div class="img_close" @click="handleClose">
  6. <img src="@/assets/img/弹窗关闭.png" alt="close" />
  7. </div>
  8. </div>
  9. <el-scrollbar class="scroll-box" :class="{'open_scroll-box':!expendFlag}">
  10. <div class="case_detail_body">
  11. <template v-for="(item, index) in displayItems" :key="index">
  12. <div>
  13. <div class="title" :class="{ spacing: item.spacing }">
  14. {{ item.label }}
  15. <span :class="item.spacing ? 'symbol2' : 'symbol'">:</span>
  16. </div>
  17. <span v-if="!item.isButton">{{ item.value }}</span>
  18. <div v-else class="btn">{{ item.value }}</div>
  19. </div>
  20. </template>
  21. </div>
  22. <!-- 折叠/展开按钮 -->
  23. <div class="collapse-box">
  24. <div class="icon-box" :class="{ 'up-icon': expendFlag }" @click="toggleShow"></div>
  25. <span class="text-box" @click="toggleShow">{{ !expendFlag ? '展开' : '收起' }}</span>
  26. </div>
  27. </el-scrollbar>
  28. </div>
  29. </template>
  30. <script setup>
  31. import { ref, watch, computed, reactive, toRefs, onBeforeMount, onMounted } from 'vue'
  32. import { useDialogStore } from '@/store/dialog'
  33. let dialogStore = useDialogStore()
  34. const expendFlag = ref(false)
  35. // 数据源
  36. const items = ref([
  37. { label: '机构名称', value: '第三社区医院卫生服务中心'},
  38. { label: '联系人姓名', value: '赵医生' },
  39. { label: '联系人电话', value: '021-64781051' },
  40. { label: '医护人员数量', value: '169' },
  41. { label: '救护车数量', value: '3' },
  42. { label: '地址', value: '上海市闵行区七宝镇富强街94号' },
  43. { label: '机构描述', value: '上海市闵行区七宝第三社区医院卫生服务中心始建于1958年,地处闵行区七宝镇富强街94号,2018年成功创建“上海市中医药特色示范社区卫生服务中心”,2019年10月成功挂牌为“上海市中医药大学附属社区卫生服务中心”,是一所全民所有制事业单位、综合性医院、上海市医保定点医院、上海市社区卫生综合改革、上海市示范社区卫生服务中心。中心下设1个航华分中心,国际、华林、万科、农南、静安新城、惠明苑、明心谷、皇都、航华三村、航华四村10个社区卫生服务站和20个家庭医生工作室。年门诊人次约100万,核定住院床位225张,其中舒缓疗护病床10张,康复联合病房床位11张,目前实际开放床位82张,在建家庭病床300余张。在职职工469人,其中专业技术人员411人,具有高级职称20人,中级职称250人,硕士研究生24人,本科学历284人,大专以上学历共438人。现有家庭医生65人,其中高级职称占1.54%,中级职称占93.85%,本科及以上学历占90.77%。' },
  44. ])
  45. // 计算属性:根据状态切换显示数据
  46. const displayItems = computed(() => (expendFlag.value ? items.value : items.value.slice(0, 5)))
  47. // 切换折叠/展开
  48. const toggleShow = () => {
  49. expendFlag.value = !expendFlag.value
  50. }
  51. // 关闭弹窗
  52. const handleClose = () => {
  53. dialogStore.yiLiaoJiGoDetailDialogOpen=false
  54. }
  55. </script>
  56. <style lang="scss" scoped>
  57. .case_detail_container {
  58. width: 327px;
  59. max-height: 510px;
  60. position: absolute;
  61. right: -342px;
  62. top: 0px;
  63. background: url(@/assets/img/大面板.png) no-repeat;
  64. overflow: hidden;
  65. }
  66. .dialog_container_header {
  67. display: flex;
  68. align-items: center;
  69. justify-content: space-between;
  70. height: 55px;
  71. width: 100%;
  72. padding: 0 20px;
  73. box-sizing: border-box;
  74. font-family: Alimama ShuHeiTi;
  75. font-weight: bold;
  76. font-size: 24px;
  77. color: rgba(255, 255, 255, 0);
  78. background: linear-gradient(0deg, #8b9bb5 0%, #d7e4fc 20.01953125%, #ffffff 87.3291015625%, #6b84b0 99.5849609375%);
  79. -webkit-background-clip: text;
  80. }
  81. .scroll-box {
  82. height: 410px;
  83. }
  84. .open_scroll-box{
  85. height: 210px;
  86. }
  87. .case_detail_body {
  88. width: 100%;
  89. // height: calc(100% - 55px);
  90. padding: 10px 0 0px 20px;
  91. box-sizing: border-box;
  92. > div {
  93. display: flex;
  94. // align-items: center;
  95. align-items: start;
  96. font-family: Alibaba PuHuiTi;
  97. font-weight: 500;
  98. font-size: 16px;
  99. color: #ffffff;
  100. line-height: 28px;
  101. // 标题部分
  102. .title {
  103. width: 80px; // 固定宽度
  104. display: flex;
  105. align-items: center;
  106. position: relative;
  107. white-space: nowrap;
  108. justify-content: space-between;
  109. // 两个字自动填充空格
  110. &.spacing {
  111. width: 69px;
  112. letter-spacing: 14px; // 控制字间距,保持等距
  113. }
  114. .symbol {
  115. position: absolute;
  116. top: 0px;
  117. right: -5px;
  118. }
  119. .symbol2 {
  120. position: absolute;
  121. top: 0px;
  122. right: -19px;
  123. }
  124. }
  125. // 内容区域
  126. span,
  127. .btn {
  128. // flex: 1;
  129. // text-align: left;
  130. margin-left: 11px;
  131. }
  132. // 按钮样式
  133. .btn {
  134. background: url('@/assets/img/按钮-短.png') no-repeat;
  135. background-size: 100% 100%;
  136. width: 84px;
  137. height: 24px;
  138. display: flex;
  139. justify-content: center;
  140. align-items: center;
  141. color: #fff;
  142. font-size: 14px;
  143. cursor: pointer;
  144. }
  145. }
  146. }
  147. .collapse-box {
  148. display: flex;
  149. justify-content: center;
  150. align-items: center;
  151. width: 100%;
  152. height: 50px;
  153. .icon-box {
  154. width: 20px;
  155. height: 20px;
  156. background-image: url('@/assets/img/a-shouqi1 1@2x.png');
  157. background-size: 100% 100%;
  158. transform: rotate(-90deg);
  159. cursor: pointer;
  160. }
  161. .up-icon {
  162. transform: rotate(90deg);
  163. }
  164. .text-box {
  165. margin-left: 5px;
  166. font-family: Alibaba PuHuiTi;
  167. font-weight: normal;
  168. font-size: 18px;
  169. color: #04fafe;
  170. letter-spacing: 1px;
  171. text-shadow: 0px 6px 6px rgba(0, 0, 0, 0.25);
  172. text-align: left;
  173. font-style: normal;
  174. text-transform: none;
  175. }
  176. }
  177. </style>