index.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. <template>
  2. <div class="p-2 m-4 round-md">
  3. <DescCard
  4. id="1"
  5. icon="icon-xt-add_default"
  6. title="透析测量"
  7. type="touxi"
  8. :data="descData"
  9. :right="descRight"
  10. />
  11. <div class="my-2">
  12. <SimpleCard id="1" title="透析测量" type="touxi">
  13. <template #headRight>
  14. <div> <XTForm :form-data="formData" /> </div>
  15. </template>
  16. </SimpleCard>
  17. </div>
  18. <div class="flex justify-between">
  19. <XTCard class="m-2" :data="cardData1" @item-click="cellCard" />
  20. </div>
  21. <div class="flex justify-between">
  22. <XTCard class="m-2" :data="cardData" @item-click="cellCard" />
  23. </div>
  24. </div>
  25. </template>
  26. <script setup lang="ts">
  27. import { XTCard, SimpleCard } from '@/components/XTCard/index';
  28. import DescCard from '@/components/XTCard/src/DescCard.vue';
  29. import { ColorEnum } from '@/enums/colorEnum';
  30. import { XTForm } from '/@/components/XTForm/index';
  31. const descData = [
  32. {
  33. label: '诊断名称/病史/状态',
  34. value: '乙肝 / 2022-01-19 ~',
  35. tags: [{ id: '12', label: '活动中', type: 'error' }],
  36. },
  37. {
  38. label: '备注',
  39. value: '药物治疗或其他治疗',
  40. },
  41. {
  42. label: '测试',
  43. value: '药物治疗或其他治疗',
  44. },
  45. {
  46. label: '诊断名称/病史/状态备份',
  47. value: '结核 / 2022-02-10 ~ 20',
  48. tags: [
  49. { id: '1', label: '未活动', type: 'muted' },
  50. { id: '2', label: '未活动1', type: 'primary' },
  51. ],
  52. },
  53. ];
  54. const descRight = {
  55. show: true,
  56. date: '2023-04-23',
  57. doctor: '张医生',
  58. edit: true,
  59. delete: true,
  60. };
  61. // formdata
  62. const formData = [
  63. {
  64. name: 'text',
  65. componentType: 'Select',
  66. placeholder: '请选择',
  67. width: 150,
  68. defaultValue: '1',
  69. dicts: [
  70. { label: '全部', value: '1' },
  71. { label: '未称量', value: '2', prefixColor: '#1BC1B3' },
  72. { label: '待确认', value: '3', prefixColor: '#854AFF' },
  73. { label: '可打印', value: '4', prefixColor: '#1BC1B3' },
  74. { label: '完成', value: '5', prefixColor: '#854AFF' },
  75. ],
  76. },
  77. {
  78. name: 'text22',
  79. componentType: 'Select',
  80. placeholder: '请选择',
  81. width: 150,
  82. defaultValue: '1',
  83. dicts: [
  84. { label: '第一班', value: '1' },
  85. { label: '第二班', value: '2' },
  86. { label: '第三班', value: '3' },
  87. ],
  88. },
  89. {
  90. name: 'text1',
  91. componentType: 'Input',
  92. placeholder: '请输入',
  93. prefix: 'icon-xt-search',
  94. width: 200,
  95. },
  96. {
  97. name: 'text233',
  98. componentType: 'RangePicker',
  99. placeholder: '请输入',
  100. format: 'YYYY-MM-DD',
  101. valueFormat: 'YYYY-MM-DD',
  102. },
  103. ];
  104. // card 标签组
  105. const cardData = [
  106. {
  107. groupKey: '123',
  108. groupTit: '待确认/测试/待核对',
  109. groupMode: 'default',
  110. groupValue: [
  111. { value: 10, color: ColorEnum.BLUE, background: ColorEnum.BLUE_BG },
  112. { value: 1, color: ColorEnum.MUTED, background: ColorEnum.MUTED_BG },
  113. { value: 4, color: ColorEnum.PRIMARY, background: ColorEnum.PRIMARY_BG },
  114. ],
  115. groupValueShow: true,
  116. groupData: [
  117. {
  118. id: '1',
  119. type: '1',
  120. borderLeftColor: ColorEnum.BLUE,
  121. ward: 'A区',
  122. bed: '99',
  123. cure: 'HDF/AVF',
  124. name: '范了饭饭饭',
  125. age: 20,
  126. gender: '1',
  127. infoShow: true,
  128. info: [
  129. { label: '时间', value: '4:00', span: 12 },
  130. { label: '超滤量', value: '2.1', suffix: 'kg', span: 12 },
  131. { label: '血流量', value: '300', span: 12 },
  132. { label: '透析器', value: 'fx60', span: 12 },
  133. { label: '抗凝剂', value: '低分子肝素1配上低分子肝素2', span: 24 },
  134. ],
  135. way: [
  136. { label: '下机', type: '0' },
  137. { label: '医嘱执行', type: '1', badge: 12 },
  138. { label: '记录并发症', type: '2', badge: 2 },
  139. { label: '交叉核对', type: '3' },
  140. ],
  141. },
  142. {
  143. id: '12',
  144. type: '2',
  145. borderLeftColor: ColorEnum.PRIMARY,
  146. ward: 'C区',
  147. bed: '99',
  148. cure: 'HDF/AVF',
  149. name: '范了饭饭饭',
  150. age: 20,
  151. gender: '1',
  152. infoShow: true,
  153. info: [
  154. { label: '时间', value: '4:00', span: 12 },
  155. { label: '超滤量', value: '2.1', suffix: 'kg', span: 12 },
  156. { label: '血流量', value: '300', span: 12 },
  157. { label: '透析器', value: 'fx60', span: 12 },
  158. { label: '抗凝剂', value: '低分子肝素1配上低分子肝素2', span: 24 },
  159. ],
  160. way: [
  161. { label: '下机', type: '0' },
  162. { label: '医嘱执行', type: '1', badge: 12 },
  163. { label: '记录并发症', type: '2', badge: 2 },
  164. { label: '交叉核对', type: '3' },
  165. ],
  166. },
  167. {
  168. id: '3',
  169. type: '3',
  170. borderLeftColor: ColorEnum.MUTED,
  171. ward: 'C区',
  172. bed: '99',
  173. cure: 'HDF/AVF',
  174. name: '范了饭饭饭',
  175. age: 20,
  176. gender: '1',
  177. infoShow: true,
  178. info: [
  179. { label: '时间', value: '4:00', span: 12 },
  180. { label: '超滤量', value: '2.1', suffix: 'kg', span: 12 },
  181. { label: '血流量', value: '300', span: 12 },
  182. { label: '透析器', value: 'fx60', span: 12 },
  183. { label: '抗凝剂', value: '低分子肝素1配上低分子肝素2', span: 24 },
  184. ],
  185. way: [
  186. { label: '下机', type: '0' },
  187. { label: '医嘱执行', type: '1', badge: 12 },
  188. { label: '记录并发症', type: '2', badge: 2 },
  189. { label: '交叉核对', type: '3' },
  190. ],
  191. },
  192. ],
  193. },
  194. ];
  195. const cardData1 = [
  196. {
  197. groupKey: '123',
  198. groupTit: '待确认/测试',
  199. groupMode: 'simple',
  200. groupValue: [
  201. { value: 10, color: ColorEnum.BLUE, background: ColorEnum.BLUE_BG },
  202. { value: 1, color: ColorEnum.MUTED, background: ColorEnum.MUTED_BG },
  203. ],
  204. groupValueShow: true,
  205. groupData: [
  206. {
  207. id: '1',
  208. type: '1',
  209. borderLeftColor: ColorEnum.BLUE,
  210. ward: 'A区',
  211. bed: '99',
  212. cure: 'HDF/AVF',
  213. name: '范了饭饭饭',
  214. age: 20,
  215. gender: '1',
  216. infoShow: false,
  217. way: [
  218. { label: '透前称量', type: '2' },
  219. { label: '确认配方', type: '3' },
  220. ],
  221. },
  222. ],
  223. },
  224. ];
  225. function cellCard(data) {
  226. console.log('🚀 ~ file: index.vue:106 ~ cellCard ~ data:', data);
  227. }
  228. </script>
  229. <style lang="less" scoped>
  230. // ::v-deep(.ant-input) {
  231. // border-color: #fff;
  232. // border-radius: 10px;
  233. // }
  234. // ::v-deep(.ant-input-affix-wrapper) {
  235. // border-color: #fff;
  236. // border-radius: 10px;
  237. // }
  238. // ::v-deep(.ant-picker) {
  239. // border-color: #fff;
  240. // border-radius: 10px;
  241. // }
  242. ::v-deep(.ant-form-item-control-input) {
  243. border-color: #fff;
  244. background-color: transparent;
  245. }
  246. ::v-deep(.ant-select:not(.ant-select-customize-input) .ant-select-selector) {
  247. border-color: #fff;
  248. border-radius: 18px;
  249. }
  250. ::v-deep(.ant-input) {
  251. border-color: #fff;
  252. border-radius: 18px;
  253. }
  254. ::v-deep(.ant-input-affix-wrapper) {
  255. border-color: #fff;
  256. border-radius: 18px;
  257. }
  258. ::v-deep(.ant-picker) {
  259. border-color: #fff;
  260. border-radius: 18px;
  261. }
  262. ::v-deep(.ant-select-selector) {
  263. border-color: #fff;
  264. border-radius: 18px;
  265. }
  266. </style>