acupointEdit.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813
  1. <template>
  2. <view class="page">
  3. <!-- 自定义导航栏 -->
  4. <view class="status-bar" :style="{height: statusBarHeight + 'px'}"></view>
  5. <view class="nav-bar">
  6. <view class="nav-back" @click="goBack">
  7. <image src="/static/public/back.png" mode="aspectFill" class="back-icon"></image>
  8. </view>
  9. <text class="nav-title">穴位定位</text>
  10. <view class="nav-right">
  11. <text class="nav-count">{{acupointList.length}}穴位</text>
  12. </view>
  13. </view>
  14. <!-- 人体模型 + 穴位标注 -->
  15. <scroll-view class="body-scroll" :scroll-y="!isLandscape" :show-scrollbar="false" :scroll-top="scrollTop" @scroll="onScroll" scroll-with-animation>
  16. <view class="body-content">
  17. <view class="body-wrapper">
  18. <!-- 中线参考 -->
  19. <view class="midline"></view>
  20. <!-- 人体背部剪影 -->
  21. <image
  22. src="/static/device/body-back-silhouette.svg"
  23. mode="aspectFit"
  24. class="body-img"
  25. @load="onImageLoad"
  26. ></image>
  27. <!-- 穴位点 -->
  28. <view
  29. v-for="(point, index) in positionedAcupoints"
  30. :key="point.id"
  31. class="acupoint-dot"
  32. :class="{
  33. 'acupoint-active': selectedIndex === index
  34. }"
  35. :style="{
  36. left: point.screenX + 'px',
  37. top: point.screenY + 'px'
  38. }"
  39. @click="onAcupointTap(index)"
  40. >
  41. <view class="dot-inner"></view>
  42. </view>
  43. </view>
  44. </view>
  45. </scroll-view>
  46. <!-- 穴位列表 -->
  47. <view class="list-section">
  48. <view class="list-header">
  49. <text class="list-title">穴位清单</text>
  50. </view>
  51. <scroll-view class="list-scroll" :scroll-y="!isLandscape" :show-scrollbar="false">
  52. <view class="list-grid">
  53. <view
  54. v-for="(point, index) in acupointList"
  55. :key="point.id"
  56. class="list-item"
  57. :class="{
  58. 'list-item-active': selectedIndex === index,
  59. 'list-item-full': point.isSingle
  60. }"
  61. @click="onListItemTap(index)"
  62. >
  63. <view class="item-index" :class="{'item-index-active': selectedIndex === index}">
  64. <text class="index-text">{{index + 1}}</text>
  65. </view>
  66. <text class="item-name">{{point.acupointName}}</text>
  67. </view>
  68. </view>
  69. </scroll-view>
  70. </view>
  71. <!-- 编辑弹窗 -->
  72. <view class="popup-mask" v-if="showPopup" @click="closePopup">
  73. <view class="popup-content" @click.stop>
  74. <view class="popup-header">
  75. <text class="popup-title">编辑穴位参数</text>
  76. <text class="popup-acupoint-name">{{ currentEditAcupoint?.acupointName }}</text>
  77. </view>
  78. <view class="popup-body">
  79. <!-- 侧别 -->
  80. <view class="form-group">
  81. <text class="form-label">侧别</text>
  82. <view class="tags-row">
  83. <view
  84. class="tag-item"
  85. v-for="item in sideOptions"
  86. :key="item"
  87. :class="{'tag-item-active': editForm.side === item}"
  88. @click="editForm.side = item"
  89. >
  90. {{item}}
  91. </view>
  92. </view>
  93. </view>
  94. <!-- 手法 -->
  95. <view class="form-group">
  96. <text class="form-label">手法选择</text>
  97. <view class="tags-row">
  98. <view
  99. class="tag-item"
  100. v-for="item in methodOptions"
  101. :key="item"
  102. :class="{'tag-item-active': editForm.method === item}"
  103. @click="editForm.method = item"
  104. >
  105. {{item}}
  106. </view>
  107. </view>
  108. </view>
  109. <!-- 温度与时间 -->
  110. <view class="form-row-2">
  111. <view class="form-group half-width">
  112. <text class="form-label">温度 (°C)</text>
  113. <view class="stepper">
  114. <view class="stepper-btn" @click="editForm.temperature > 30 && editForm.temperature--">-</view>
  115. <input class="stepper-input" type="number" v-model="editForm.temperature" />
  116. <view class="stepper-btn" @click="editForm.temperature < 60 && editForm.temperature++">+</view>
  117. </view>
  118. </view>
  119. <view class="form-group half-width">
  120. <text class="form-label">时间 (分钟)</text>
  121. <view class="stepper">
  122. <view class="stepper-btn" @click="editForm.duration > 1 && editForm.duration--">-</view>
  123. <input class="stepper-input" type="number" v-model="editForm.duration" />
  124. <view class="stepper-btn" @click="editForm.duration < 60 && editForm.duration++">+</view>
  125. </view>
  126. </view>
  127. </view>
  128. </view>
  129. <view class="popup-footer">
  130. <view class="btn btn-cancel" @click="closePopup">取消</view>
  131. <view class="btn btn-confirm" @click="saveEdit">确定</view>
  132. </view>
  133. </view>
  134. </view>
  135. <!-- 加载提示 -->
  136. <view class="loading-mask" v-if="loading">
  137. <view class="loading-card">
  138. <view class="loading-spinner"></view>
  139. <text class="loading-text">加载中...</text>
  140. </view>
  141. </view>
  142. </view>
  143. </template>
  144. <script>
  145. import { getBackAcupoints } from '@/utils/api/acupoint.js'
  146. export default {
  147. data() {
  148. return {
  149. isLandscape: false,
  150. statusBarHeight: 44,
  151. loading: false,
  152. acupointList: [],
  153. selectedIndex: -1,
  154. imageReady: false,
  155. // SVG viewBox: 0 0 300 400, 一体式实心剪影
  156. containerWidth: 345,
  157. containerHeight: 460,
  158. // 大椎穴(0,0)在容器中的位置
  159. // 颈根/斜方肌起点(C7)在SVG中 y=78 -> 按比例放大1.15倍
  160. originX: 172.5,
  161. originY: 89.7,
  162. // 毫米到像素缩放比
  163. // 0.5 * 1.15 = 0.575
  164. mmToPixel: 0.575,
  165. // 弹窗表单
  166. showPopup: false,
  167. editForm: {
  168. side: '',
  169. method: '温和灸',
  170. temperature: 45,
  171. duration: 15
  172. },
  173. sideOptions: ['双侧', '中心', '左侧', '右侧'],
  174. methodOptions: ['温和灸', '雀啄灸', '回旋灸'],
  175. scrollTop: 0,
  176. oldScrollTop: 0
  177. }
  178. },
  179. computed: {
  180. /** 当前正在编辑的穴位 */
  181. currentEditAcupoint() {
  182. if (this.selectedIndex >= 0 && this.acupointList[this.selectedIndex]) {
  183. return this.acupointList[this.selectedIndex]
  184. }
  185. return null
  186. },
  187. /** 计算屏幕坐标后的穴位列表 */
  188. positionedAcupoints() {
  189. if (!this.imageReady || this.acupointList.length === 0) return []
  190. return this.acupointList.map(point => {
  191. // coordinateX: 向右为正 (mm), coordinateY: 向下为正 (mm)
  192. // 大椎穴为(0,0)原点
  193. const screenX = this.originX + (point.coordinateX * this.mmToPixel)
  194. const screenY = this.originY + (point.coordinateY * this.mmToPixel)
  195. return {
  196. ...point,
  197. screenX: Math.max(8, Math.min(this.containerWidth - 8, screenX)),
  198. screenY: Math.max(8, Math.min(this.containerHeight - 8, screenY))
  199. }
  200. })
  201. }
  202. },
  203. onLoad() {
  204. const sysInfo = uni.getSystemInfoSync()
  205. this.statusBarHeight = sysInfo.statusBarHeight || 44
  206. this.checkOrientation(sysInfo)
  207. this.loadAcupoints()
  208. },
  209. onResize(res) {
  210. this.checkOrientation(res.size || uni.getSystemInfoSync())
  211. },
  212. methods: {
  213. checkOrientation(size) {
  214. if (size && size.windowWidth && size.windowHeight) {
  215. this.isLandscape = size.windowWidth > size.windowHeight
  216. }
  217. },
  218. goBack() {
  219. uni.navigateBack()
  220. },
  221. onScroll(e) {
  222. this.oldScrollTop = e.detail.scrollTop
  223. },
  224. /** 图片加载完成 */
  225. onImageLoad() {
  226. this.imageReady = true
  227. },
  228. /** 加载穴位数据 */
  229. async loadAcupoints() {
  230. this.loading = true
  231. try {
  232. const data = await getBackAcupoints(4)
  233. if (Array.isArray(data)) {
  234. // 按名称分组并计算平均 Y 坐标,以处理对称穴位
  235. const nameMap = new Map()
  236. data.forEach(point => {
  237. if (!nameMap.has(point.acupointName)) {
  238. nameMap.set(point.acupointName, {
  239. name: point.acupointName,
  240. points: [],
  241. sumY: 0
  242. })
  243. }
  244. const group = nameMap.get(point.acupointName)
  245. group.points.push(point)
  246. group.sumY += point.coordinateY
  247. })
  248. const groups = Array.from(nameMap.values())
  249. groups.forEach(group => {
  250. group.avgY = group.sumY / group.points.length
  251. // 同名穴位按 X 坐标从左到右排序
  252. group.points.sort((a, b) => a.coordinateX - b.coordinateX)
  253. })
  254. // 组之间按平均 Y 坐标从上到下排序
  255. groups.sort((a, b) => a.avgY - b.avgY)
  256. // 重新打平为一维数组,并标记是否为单穴(用于占满整行)
  257. const sortedData = []
  258. groups.forEach(group => {
  259. const isSingle = group.points.length === 1
  260. group.points.forEach(p => {
  261. p.isSingle = isSingle
  262. })
  263. sortedData.push(...group.points)
  264. })
  265. this.acupointList = sortedData
  266. } else {
  267. this.acupointList = []
  268. }
  269. } catch (e) {
  270. console.error('加载穴位数据失败:', e)
  271. uni.showToast({ title: '穴位数据加载失败', icon: 'none' })
  272. this.acupointList = []
  273. } finally {
  274. this.loading = false
  275. // 确保图片加载后穴位可显示
  276. this.$nextTick(() => {
  277. if (!this.imageReady) {
  278. this.imageReady = true
  279. }
  280. })
  281. }
  282. },
  283. /** 点击穴位点 */
  284. onAcupointTap(index) {
  285. this.openPopup(index)
  286. },
  287. /** 点击列表项 */
  288. onListItemTap(index) {
  289. this.openPopup(index)
  290. },
  291. /** 打开编辑弹窗 */
  292. openPopup(index) {
  293. this.selectedIndex = index
  294. const point = this.acupointList[index]
  295. // 初始化表单数据
  296. this.editForm = {
  297. side: point.customSide || this.sideLabel(point.acupointSide) || '中心',
  298. method: point.method || '温和灸',
  299. temperature: point.temperature || 45,
  300. duration: point.duration || 15
  301. }
  302. this.showPopup = true
  303. this.scrollToAcupoint()
  304. },
  305. /** 滚动到选中的穴位 */
  306. scrollToAcupoint() {
  307. this.$nextTick(() => {
  308. const query = uni.createSelectorQuery().in(this)
  309. query.select('.body-scroll').boundingClientRect()
  310. query.select('.acupoint-active').boundingClientRect()
  311. query.exec(res => {
  312. const scrollRes = res[0]
  313. const dotRes = res[1]
  314. if (scrollRes && dotRes) {
  315. const relativeTop = dotRes.top - scrollRes.top
  316. const offset = relativeTop - (scrollRes.height / 2) + (dotRes.height / 2)
  317. if (Math.abs(offset) > 5) {
  318. let newScrollTop = this.oldScrollTop + offset
  319. if (newScrollTop < 0) newScrollTop = 0
  320. this.scrollTop = this.oldScrollTop
  321. this.$nextTick(() => {
  322. this.scrollTop = newScrollTop
  323. })
  324. }
  325. }
  326. })
  327. })
  328. },
  329. /** 关闭弹窗 */
  330. closePopup() {
  331. this.showPopup = false
  332. },
  333. /** 保存编辑结果 */
  334. saveEdit() {
  335. if (this.selectedIndex >= 0) {
  336. const point = this.acupointList[this.selectedIndex]
  337. // 更新穴位列表中的对应数据(使用Vue的响应式需要特殊处理,但这里我们直接改属性,若无法触发视图更新可用$set或splice,但简单修改通常有效)
  338. point.customSide = this.editForm.side
  339. point.method = this.editForm.method
  340. point.temperature = this.editForm.temperature
  341. point.duration = this.editForm.duration
  342. }
  343. this.closePopup()
  344. },
  345. /** 侧别标签 */
  346. sideLabel(side) {
  347. const map = { left: '左侧', right: '右侧', center: '中心' }
  348. return map[side] || side
  349. },
  350. /** 置信度标签 */
  351. confidenceLabel(confidence) {
  352. const map = { high: '高', medium: '中', low: '低' }
  353. return map[confidence] || confidence
  354. }
  355. }
  356. }
  357. </script>
  358. <style scoped>
  359. /* 隐藏滚动条 */
  360. ::-webkit-scrollbar {
  361. display: none;
  362. width: 0 !important;
  363. height: 0 !important;
  364. -webkit-appearance: none;
  365. background: transparent;
  366. }
  367. .page {
  368. display: flex;
  369. flex-direction: column;
  370. height: 100vh;
  371. overflow: hidden;
  372. background: linear-gradient(to bottom, #389588, rgba(56,149,136,0.3) 40%, #F8F8F8 60%);
  373. }
  374. .status-bar {
  375. background-color: transparent;
  376. }
  377. /* 导航栏 */
  378. .nav-bar {
  379. display: flex;
  380. flex-direction: row;
  381. justify-content: space-between;
  382. align-items: center;
  383. height: 44px;
  384. padding: 0 15px;
  385. }
  386. .nav-back {
  387. width: 25px;
  388. height: 25px;
  389. display: flex;
  390. justify-content: center;
  391. align-items: center;
  392. }
  393. .back-icon {
  394. width: 25px;
  395. height: 25px;
  396. }
  397. .nav-title {
  398. font-size: 16px;
  399. font-weight: bold;
  400. color: #FFFFFF;
  401. }
  402. .nav-right {
  403. width: 60px;
  404. display: flex;
  405. justify-content: flex-end;
  406. }
  407. .nav-count {
  408. font-size: 12px;
  409. color: rgba(255,255,255,0.8);
  410. }
  411. /* 人体模型容器 */
  412. .body-scroll {
  413. flex: 1;
  414. min-height: 0;
  415. width: 100%;
  416. }
  417. .body-content {
  418. display: flex;
  419. justify-content: center;
  420. align-items: flex-start; /* 改为顶部对齐,防止高度不足时头部被居中截断 */
  421. padding: 20px 10px; /* 增加顶部间距,保护头部不贴边 */
  422. min-height: 100%;
  423. box-sizing: border-box;
  424. }
  425. .body-wrapper {
  426. position: relative;
  427. width: 345px;
  428. height: 460px;
  429. margin: auto 0; /* 空间充足时保持垂直居中,空间不足时贴顶 */
  430. /* Removed bubble-like styling to keep it clean */
  431. }
  432. /* 中线 */
  433. .midline {
  434. position: absolute;
  435. left: 50%;
  436. top: 60px;
  437. bottom: 20px;
  438. width: 1px;
  439. background: transparent;
  440. border-left: 1px dashed rgba(255, 255, 255, 0.4);
  441. z-index: 2;
  442. pointer-events: none;
  443. }
  444. .body-img {
  445. position: relative;
  446. width: 345px;
  447. height: 460px;
  448. z-index: 3;
  449. /* Added a soft drop shadow to make the human shape stand out nicely */
  450. filter: drop-shadow(0px 15px 25px rgba(0, 0, 0, 0.12));
  451. }
  452. /* 穴位点 */
  453. .acupoint-dot {
  454. position: absolute;
  455. width: 30px;
  456. height: 30px;
  457. margin-left: -15px;
  458. margin-top: -15px;
  459. display: flex;
  460. justify-content: center;
  461. align-items: center;
  462. z-index: 10;
  463. }
  464. .dot-inner {
  465. width: 8px;
  466. height: 8px;
  467. border-radius: 50%;
  468. background: #FFFFFF;
  469. border: 1.5px solid #389588;
  470. box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  471. transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  472. z-index: 1;
  473. }
  474. /* 选中态 */
  475. .acupoint-active .dot-inner {
  476. width: 14px;
  477. height: 14px;
  478. background: #F65252;
  479. border: 2px solid #FFFFFF;
  480. box-shadow: 0 4px 12px rgba(246, 82, 82, 0.4);
  481. transform: scale(1.1);
  482. }
  483. /* 穴位列表 */
  484. .list-section {
  485. background: #FFFFFF;
  486. border-radius: 28px 28px 0 0;
  487. padding: 20px 12px 0;
  488. max-height: 40vh;
  489. display: flex;
  490. flex-direction: column;
  491. box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.06);
  492. box-sizing: border-box;
  493. }
  494. .list-header {
  495. display: flex;
  496. flex-direction: column;
  497. align-items: center;
  498. margin-bottom: 16px;
  499. }
  500. .list-title {
  501. font-size: 15px;
  502. color: #333333;
  503. font-weight: 600;
  504. }
  505. .list-scroll {
  506. flex: 1;
  507. overflow-y: auto;
  508. }
  509. .list-grid {
  510. display: flex;
  511. flex-direction: row;
  512. flex-wrap: wrap;
  513. gap: 10px;
  514. padding: 4px 8px 20px 8px;
  515. box-sizing: border-box;
  516. }
  517. .list-item {
  518. display: flex;
  519. flex-direction: row;
  520. align-items: center;
  521. padding: 10px 12px;
  522. border-radius: 12px;
  523. background: #F8FAFA;
  524. border: 1px solid rgba(56, 149, 136, 0.05);
  525. transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  526. width: calc(50% - 5px);
  527. box-sizing: border-box;
  528. }
  529. .list-item-active {
  530. background: rgba(56, 149, 136, 0.08);
  531. border-color: rgba(56, 149, 136, 0.3);
  532. box-shadow: 0 4px 12px rgba(56, 149, 136, 0.1);
  533. transform: scale(1);
  534. }
  535. .list-item-full {
  536. margin-right: 50%;
  537. }
  538. .item-index {
  539. width: 24px;
  540. height: 24px;
  541. border-radius: 8px;
  542. background: rgba(56, 149, 136, 0.1);
  543. display: flex;
  544. justify-content: center;
  545. align-items: center;
  546. margin-right: 8px;
  547. transition: all 0.25s;
  548. flex-shrink: 0;
  549. }
  550. .item-index-active {
  551. background: rgba(246, 82, 82, 0.1);
  552. }
  553. .index-text {
  554. font-size: 11px;
  555. font-weight: 600;
  556. color: #389588;
  557. }
  558. .item-index-active .index-text {
  559. color: #F65252;
  560. }
  561. .item-name {
  562. font-size: 13px;
  563. color: #545F71;
  564. font-weight: 500;
  565. line-height: 1.3;
  566. overflow: hidden;
  567. text-overflow: ellipsis;
  568. white-space: nowrap;
  569. }
  570. /* 加载遮罩 */
  571. .loading-mask {
  572. position: fixed;
  573. top: 0;
  574. left: 0;
  575. right: 0;
  576. bottom: 0;
  577. background: rgba(0, 0, 0, 0.4);
  578. display: flex;
  579. justify-content: center;
  580. align-items: center;
  581. z-index: 100;
  582. }
  583. .loading-card {
  584. display: flex;
  585. flex-direction: column;
  586. align-items: center;
  587. background: #FFFFFF;
  588. border-radius: 16px;
  589. padding: 28px 36px;
  590. box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  591. }
  592. @keyframes spin {
  593. 0% { transform: rotate(0deg); }
  594. 100% { transform: rotate(360deg); }
  595. }
  596. .loading-spinner {
  597. width: 32px;
  598. height: 32px;
  599. border: 2px solid #EEF1F4;
  600. border-top-color: #389588;
  601. border-radius: 50%;
  602. animation: spin 0.8s linear infinite;
  603. margin-bottom: 14px;
  604. }
  605. .loading-text {
  606. color: #545F71;
  607. font-size: 13px;
  608. font-weight: 500;
  609. }
  610. /* 弹窗样式 */
  611. .popup-mask {
  612. position: fixed;
  613. top: 0;
  614. left: 0;
  615. right: 0;
  616. bottom: 0;
  617. background: rgba(0, 0, 0, 0.5);
  618. z-index: 200;
  619. display: flex;
  620. justify-content: center;
  621. align-items: center;
  622. animation: fadeIn 0.3s ease;
  623. }
  624. @keyframes fadeIn {
  625. from { opacity: 0; }
  626. to { opacity: 1; }
  627. }
  628. .popup-content {
  629. width: 320px;
  630. background: #FFFFFF;
  631. border-radius: 20px;
  632. overflow: hidden;
  633. box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  634. animation: slideUp 0.3s ease;
  635. }
  636. @keyframes slideUp {
  637. from { transform: translateY(20px); opacity: 0; }
  638. to { transform: translateY(0); opacity: 1; }
  639. }
  640. .popup-header {
  641. padding: 20px 24px 16px;
  642. border-bottom: 1px solid #F0F2F5;
  643. display: flex;
  644. justify-content: space-between;
  645. align-items: center;
  646. }
  647. .popup-title {
  648. font-size: 16px;
  649. font-weight: 600;
  650. color: #333333;
  651. }
  652. .popup-acupoint-name {
  653. font-size: 15px;
  654. color: #389588;
  655. font-weight: 600;
  656. background: rgba(56, 149, 136, 0.1);
  657. padding: 4px 10px;
  658. border-radius: 6px;
  659. }
  660. .popup-body {
  661. padding: 20px 24px;
  662. }
  663. .form-group {
  664. margin-bottom: 20px;
  665. }
  666. .form-group:last-child {
  667. margin-bottom: 0;
  668. }
  669. .form-row-2 {
  670. display: flex;
  671. justify-content: space-between;
  672. gap: 16px;
  673. }
  674. .half-width {
  675. flex: 1;
  676. }
  677. .form-label {
  678. font-size: 13px;
  679. color: #545F71;
  680. margin-bottom: 10px;
  681. display: block;
  682. font-weight: 500;
  683. }
  684. .tags-row {
  685. display: flex;
  686. flex-wrap: wrap;
  687. gap: 10px;
  688. }
  689. .tag-item {
  690. padding: 8px 14px;
  691. background: #F4F6F8;
  692. border-radius: 8px;
  693. font-size: 13px;
  694. color: #545F71;
  695. border: 1px solid transparent;
  696. transition: all 0.2s;
  697. }
  698. .tag-item-active {
  699. background: rgba(56, 149, 136, 0.1);
  700. color: #389588;
  701. border-color: #389588;
  702. font-weight: 500;
  703. }
  704. .stepper {
  705. display: flex;
  706. align-items: center;
  707. background: #F4F6F8;
  708. border-radius: 8px;
  709. overflow: hidden;
  710. }
  711. .stepper-btn {
  712. width: 36px;
  713. height: 36px;
  714. display: flex;
  715. justify-content: center;
  716. align-items: center;
  717. font-size: 18px;
  718. color: #545F71;
  719. background: #EEF1F4;
  720. }
  721. .stepper-btn:active {
  722. background: #E2E6EA;
  723. }
  724. .stepper-input {
  725. flex: 1;
  726. height: 36px;
  727. text-align: center;
  728. font-size: 14px;
  729. color: #333333;
  730. font-weight: 500;
  731. }
  732. .popup-footer {
  733. display: flex;
  734. border-top: 1px solid #F0F2F5;
  735. }
  736. .btn {
  737. flex: 1;
  738. height: 50px;
  739. display: flex;
  740. justify-content: center;
  741. align-items: center;
  742. font-size: 15px;
  743. font-weight: 500;
  744. }
  745. .btn-cancel {
  746. color: #9BA5B7;
  747. background: #FFFFFF;
  748. }
  749. .btn-confirm {
  750. color: #FFFFFF;
  751. background: #389588;
  752. }
  753. /* 参数展示 */
  754. .item-params {
  755. display: flex;
  756. align-items: center;
  757. }
  758. .param-text {
  759. font-size: 11px;
  760. color: #389588;
  761. background: rgba(56, 149, 136, 0.1);
  762. padding: 2px 6px;
  763. border-radius: 4px;
  764. }
  765. </style>