applyList.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  1. <template>
  2. <div class="apply-list">
  3. <div class="list-wrap">
  4. <div class="list-item" v-for="(item, index) in 10" :key="index">
  5. <div class="item-info">
  6. <div class="tree-icon">
  7. <img class="tree-img" src="@/assets/images/foster-home/tree-item.png" alt="" />
  8. <div class="tree-type-name-tag">白糖罂</div>
  9. </div>
  10. <div class="item-center">
  11. <div class="center-t">
  12. BTY-A25
  13. <span class="type-tag">综合:94分</span>
  14. <span class="type-tag">生态:92分</span>
  15. </div>
  16. <div class="center-item p-t-2 age-line">
  17. <div class="age-wrap">
  18. <div class="has-age">
  19. <div class="age">树龄:<span class="unit">5年</span></div>
  20. </div>
  21. <div class="sort-line"></div>
  22. </div>
  23. 单价:<span class="unit">{{item.status === 0 ? "--" : item.price||12}}元/斤</span>
  24. </div>
  25. <div class="center-item">截至分配时间:<span>2025.05.15</span></div>
  26. </div>
  27. </div>
  28. <div class="apply-wrap" v-show="ROLE == 1">
  29. <div class="apply-item" v-for="(item, index) in 2" :key="index">
  30. <div class="apply-users">
  31. <div class="user-item">
  32. <el-avatar :size="32" src="https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png" />
  33. <div class="user-name">华国伟</div>
  34. </div>
  35. <div class="user-item">
  36. <el-avatar :size="32" src="https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png" />
  37. <div class="user-name">华国伟</div>
  38. </div>
  39. <div class="user-item">
  40. <el-avatar :size="32" src="https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png" />
  41. <div class="user-name">华国伟</div>
  42. </div>
  43. </div>
  44. <div class="apply-time">2025.03.29</div>
  45. <div class="apply-btn">
  46. 确认分配
  47. </div>
  48. </div>
  49. </div>
  50. <!-- 团长 -->
  51. <div class="team-wrap" v-show="ROLE == 2">
  52. <div class="team-box">
  53. <div class="team-apply">
  54. <div class="apply-total">已分配给15人</div>
  55. <div class="apply-tooltip">
  56. <el-tooltip
  57. class="box-item"
  58. effect="dark"
  59. content="Top Center prompts info"
  60. placement="top"
  61. >
  62. <template #content>
  63. <div class="user-wrap">
  64. <div class="user-detail" v-for="(owner, oI) in owners" :key="oI">
  65. {{ owner.userName }}
  66. <span v-show="oI<owners.length-1">/</span>
  67. </div>
  68. </div>
  69. </template>
  70. <div class="tooltip-user-item">
  71. <div class="user-detail" v-for="(owner, oI) in owners" :key="oI">
  72. {{ owner.userName }}
  73. <span v-show="oI<owners.length-1">/</span>
  74. </div>
  75. </div>
  76. </el-tooltip>
  77. </div>
  78. </div>
  79. <div class="progress-wrap" v-show="ROLE==2 && item.status !== 2">
  80. 剩余可购:
  81. <el-progress :percentage="60" color="#FFD887"><span class="progress-text"><span class="over">150</span>/215斤</span></el-progress>
  82. </div>
  83. </div>
  84. <div class="team-users apply-wrap">
  85. <div class="apply-item" v-for="(item, index) in 2" :key="index">
  86. <div class="apply-users">
  87. <div class="user-item">
  88. <el-avatar :size="32" src="https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png" />
  89. </div>
  90. <div class="team-info">
  91. <div class="team-name">华国伟</div>
  92. <div class="team-time">3/25<span>10:08:32</span></div>
  93. </div>
  94. </div>
  95. <div class="apply-time">购买<span class="main-unit">15斤</span></div>
  96. <div class="apply-btn">
  97. 确认分配
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. </template>
  106. <script setup>
  107. import { onMounted, ref } from "vue";
  108. import { useStore } from "vuex";
  109. let store = useStore();
  110. const owners = ref([{userName: "王丽丽", value: 50}, {userName: "张山", value: 30}, {userName: "刘珊珊", value: 30}, {userName: "张山2", value: 30}, {userName: "刘珊珊2", value: 30}])
  111. const ROLE = store.state.home.userRole;
  112. onMounted(() => {console.log('ROLE', ROLE);});
  113. </script>
  114. <style lang="scss" scoped>
  115. .apply-list {
  116. height: 100%;
  117. overflow: auto;
  118. .type-tag {
  119. color: #ffd489;
  120. background: rgba(255, 212, 137, 0.06);
  121. padding: 2px 4px;
  122. font-size: 10px;
  123. margin-left: 4px;
  124. border-radius: 4px;
  125. }
  126. .list-wrap {
  127. .list-item {
  128. background: rgba(255, 255, 255, 0.08);
  129. padding: 8px 10px;
  130. border-radius: 5px;
  131. .item-info {
  132. display: flex;
  133. justify-content: space-between;
  134. align-items: center;
  135. }
  136. .tree-icon {
  137. position: relative;
  138. .tree-type-name-tag {
  139. position: absolute;
  140. left: 0;
  141. bottom: 0;
  142. background: rgba(0, 0, 0, 0.6);
  143. border-radius: 0 5px 5px 0;
  144. font-size: 10px;
  145. width: 100%;
  146. text-align: center;
  147. padding: 1px;
  148. backdrop-filter: blur(2px);
  149. }
  150. .tree-img {
  151. width: 63px;
  152. height: 63px;
  153. border-radius: 5px;
  154. object-fit: cover;
  155. }
  156. }
  157. .item-center {
  158. flex: 1;
  159. padding: 0 12px;
  160. color: #fff;
  161. .center-t {
  162. font-size: 14px;
  163. }
  164. .center-item {
  165. color: #6c6c6c;
  166. font-size: 12px;
  167. padding-top: 2px;
  168. span {
  169. color: #fff;
  170. }
  171. }
  172. .age-line {
  173. display: flex;
  174. align-items: center;
  175. .age-wrap {
  176. display: flex;
  177. align-items: center;
  178. .sort-line {
  179. margin: 0 10px;
  180. height: 10px;
  181. width: 1px;
  182. background: #6C6C6C;
  183. }
  184. }
  185. }
  186. }
  187. }
  188. .list-item + .list-item {
  189. margin-top: 8px;
  190. }
  191. }
  192. .unit {
  193. padding-left: 5px;
  194. color: #fff;
  195. }
  196. .apply-wrap {
  197. padding-top: 12px;
  198. .apply-item {
  199. display: flex;
  200. align-items: center;
  201. justify-content: space-between;
  202. background: rgba(255, 255, 255, 0.04);
  203. .apply-users {
  204. display: flex;
  205. .user-item {
  206. .user-name {
  207. color: #fff;
  208. font-size: 14px;
  209. }
  210. }
  211. .user-item + .user-item {
  212. padding-left: 6px;
  213. }
  214. }
  215. .apply-time {
  216. flex: 1;
  217. text-align: center;
  218. font-size: 14px;
  219. color: #999999;
  220. .main-unit {
  221. color: #FFD489;
  222. }
  223. }
  224. .apply-btn {
  225. padding: 4px 7px;
  226. border: 1px solid #FFD489;
  227. border-radius: 20px;
  228. color: #FFD489;
  229. font-size: 12px;
  230. cursor: pointer;
  231. }
  232. }
  233. .apply-item + .apply-item {
  234. margin-top: 8px;
  235. }
  236. &.team-users {
  237. margin-top: 8px;
  238. background: rgba(255, 255, 255, 0.04);
  239. border-radius: 8px;
  240. .apply-item {
  241. background: none;
  242. padding: 6px 8px;
  243. }
  244. .apply-users {
  245. .team-info {
  246. padding-left: 8px;
  247. .team-name {
  248. color: #fff;
  249. font-size: 14px;
  250. }
  251. .team-time {
  252. color: #999999;
  253. font-size: 12px;
  254. }
  255. }
  256. }
  257. }
  258. }
  259. .p-t-2 {
  260. padding-top: 2px;
  261. }
  262. .team-wrap {
  263. padding-top: 12px;
  264. .team-box {
  265. padding: 5px 12px;
  266. background: rgba(255, 255, 255, 0.04);
  267. }
  268. .team-apply {
  269. display: flex;
  270. align-items: center;
  271. .apply-total {
  272. color: #F2D677;
  273. font-size: 14px;
  274. padding-right: 10px;
  275. }
  276. .apply-tooltip {
  277. padding: 0px 10px;
  278. border-radius: 20px;
  279. background: #3B3B3B;
  280. .tooltip-user-item {
  281. display: inline-block;
  282. font-size: 12px;
  283. color: #F2D677;
  284. max-width: 182px;
  285. white-space: nowrap;
  286. overflow: hidden;
  287. text-overflow: ellipsis;
  288. height: 26px;
  289. line-height: 30px;
  290. }
  291. .user-detail {
  292. display: inline-block;
  293. }
  294. }
  295. }
  296. .progress-wrap {
  297. padding-top: 8px;
  298. display: flex;
  299. align-items: center;
  300. font-size: 12px;
  301. .user-item {
  302. display: flex;
  303. align-items: center;
  304. }
  305. .progress-text {
  306. font-size: 12px;
  307. color: #999999;
  308. .over {
  309. color: #FFD489;
  310. }
  311. }
  312. ::v-deep {
  313. .el-progress-bar__outer {
  314. width: 160px;
  315. background: rgba(242, 243, 245, 0.23);
  316. }
  317. }
  318. }
  319. }
  320. }
  321. .user-wrap {
  322. display: flex;
  323. }
  324. </style>