MessageBody.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <template>
  2. <div class="body-container">
  3. <CardItem v-for="item in moke_data" :key="item.id" :name="item.name" :img_src="item.img_src" :height="200">
  4. <template #description> {{ item.desc }}> </template>
  5. <template #settings>
  6. <a-switch v-model="item.online">
  7. <template #checked> 上线 </template>
  8. <template #unchecked> 下线 </template>
  9. </a-switch>
  10. </template>
  11. <template #labels v-if="item.has_label">
  12. <div class="label-btn">
  13. <icon-subscribe />
  14. <div>添加标签</div>
  15. </div>
  16. </template>
  17. <template #bottom>
  18. <div class="bottom">
  19. <div class="user"><icon-user /> 创建用户:{{ item.user }}</div>
  20. <div class="tools">
  21. <icon-more :style="{ fontSize: '20px' }" />
  22. </div>
  23. </div>
  24. </template>
  25. </CardItem>
  26. </div>
  27. </template>
  28. <script setup>
  29. import { ref } from 'vue';
  30. import CardItem from '../../views/manage-common/CardItem.vue';
  31. import intelligentFrame1 from '../../assets/image/management/intelligent-frame1.png';
  32. import intelligentFrame2 from '../../assets/image/management/intelligent-frame2.png';
  33. import intelligentFrame3 from '../../assets/image/management/intelligent-frame3.png';
  34. import intelligentFrame4 from '../../assets/image/management/intelligent-frame4.png';
  35. import intelligentFrame5 from '../../assets/image/management/intelligent-frame5.png';
  36. import intelligentFrame6 from '../../assets/image/management/intelligent-frame6.png';
  37. import intelligentFrame7 from '../../assets/image/management/intelligent-frame7.png';
  38. import intelligentFrame8 from '../../assets/image/management/intelligent-frame8.png';
  39. const moke_data = ref([
  40. {
  41. id: 1,
  42. name: '智能问答',
  43. img_src: intelligentFrame1,
  44. desc: '极目新闻记者了解到,这些患者都有一些共同的习惯:经常把未吃完的食物放在桌上敞着',
  45. user: 'admin',
  46. online: false,
  47. has_label: false
  48. },
  49. {
  50. id: 2,
  51. name: '智能客服',
  52. img_src: intelligentFrame2,
  53. desc: '极目新闻记者了解到,这些患者都有一些共同的习惯:经常把未吃完的食物放在桌上敞着',
  54. user: 'admin',
  55. online: false,
  56. has_label: true
  57. },
  58. {
  59. id: 3,
  60. name: '继题组卷',
  61. img_src: intelligentFrame3,
  62. desc: '极目新闻记者了解到,这些患者都有一些共同的习惯:经常把未吃完的食物放在桌上敞着',
  63. user: 'admin',
  64. online: true,
  65. has_label: false
  66. },
  67. {
  68. id: 4,
  69. name: '小数绘图',
  70. img_src: intelligentFrame4,
  71. desc: '极目新闻记者了解到,这些患者都有一些共同的习惯:经常把未吃完的食物放在桌上敞着',
  72. user: 'admin',
  73. online: true,
  74. has_label: true
  75. },
  76. {
  77. id: 5,
  78. name: '材据分析',
  79. img_src: intelligentFrame5,
  80. desc: '极目新闻记者了解到,这些患者都有一些共同的习惯:经常把未吃完的食物放在桌上敞着',
  81. user: 'admin',
  82. online: true,
  83. has_label: false
  84. },
  85. {
  86. id: 6,
  87. name: '报告自动生成 ',
  88. img_src: intelligentFrame6,
  89. desc: '极目新闻记者了解到,这些患者都有一些共同的习惯:经常把未吃完的食物放在桌上敞着',
  90. user: 'admin',
  91. online: true,
  92. has_label: false
  93. },
  94. {
  95. id: 7,
  96. name: '文档创作',
  97. img_src: intelligentFrame7,
  98. desc: '极目新闻记者了解到,这些患者都有一些共同的习惯:经常把未吃完的食物放在桌上敞着',
  99. user: 'admin',
  100. online: false,
  101. has_label: true
  102. },
  103. {
  104. id: 8,
  105. name: '设备检测',
  106. img_src: intelligentFrame8,
  107. desc: '极目新闻记者了解到,这些患者都有一些共同的习惯:经常把未吃完的食物放在桌上敞着',
  108. user: 'admin',
  109. online: true,
  110. has_label: true
  111. }
  112. ]);
  113. </script>
  114. <style scoped lang="css">
  115. .body-container {
  116. display: flex;
  117. flex-direction: row;
  118. flex-wrap: wrap;
  119. align-content: flex-start;
  120. gap: 20px;
  121. overflow: auto;
  122. height: calc(100% - 80px);
  123. }
  124. .label-btn {
  125. display: flex;
  126. gap: 10px;
  127. padding: 8px 16px;
  128. background-color: var(--color-neutral-3);
  129. font-size: 12px;
  130. cursor: pointer;
  131. }
  132. .bottom {
  133. display: flex;
  134. justify-content: space-between;
  135. align-items: center;
  136. }
  137. </style>