report-detail.vue 76 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229
  1. <template>
  2. <view class="page">
  3. <!-- native navigation bar used, no custom header -->
  4. <scroll-view class="content" scroll-y>
  5. <!-- 报告头 -->
  6. <view class="report-head" v-if="headInfo">
  7. <view class="head-name">{{ headInfo.personName || headInfo.childName || '健康报告' }}</view>
  8. <view class="head-meta">
  9. <text class="type-badge">{{ typeLabel }}</text>
  10. <text class="head-date">{{ headInfo.reportDateText || '' }}</text>
  11. </view>
  12. </view>
  13. <!-- view mode -->
  14. <view v-if="pageMode==='view'">
  15. <report-blocks-renderer v-if="blocks && blocks.length > 0" :blocks="blocks" @help="onBlockHelp" />
  16. <view class="empty-hint" v-else>暂无报告内容</view>
  17. <view class="edit-btn" v-if="isGutFlora && pageMode==='view'">
  18. <view class="nav-edit" @tap="enterEditMode"><text>{{ backendBlocksExist ? '编辑' : '查看完整数据 ›' }}</text></view>
  19. </view>
  20. </view>
  21. <!-- draft/edit mode (full form) -->
  22. <view v-else>
  23. <!-- 解析中状态(仅 draft 模式,从上传页跳转后自动解析) -->
  24. <view class="parsing-banner" v-if="parsing">
  25. <view class="parsing-spinner"></view>
  26. <view class="parsing-content">
  27. <text class="parsing-main-text">AI 正在解析您的报告</text>
  28. <text class="parsing-sub-text" :key="parsingStep">{{ parsingText }}</text>
  29. </view>
  30. </view>
  31. <view class="tip-banner">
  32. <text class="tip-icon">✅</text>
  33. <text class="tip-text">{{ pageMode === 'draft' ? '请核对以下解析内容,可修改后确认入库' : '请核对报告内容,可修改后保存' }}</text>
  34. </view>
  35. <!-- 匹配可信度(仅 draft 模式) -->
  36. <view class="confidence-card" v-if="confidenceLevelClass">
  37. <view class="confidence-header">
  38. <text class="confidence-label">匹配可信度</text>
  39. <text class="confidence-badge" :class="'badge-' + confidenceLevelClass">{{ confidenceLevelText }}</text>
  40. </view>
  41. <view class="confidence-bar-track">
  42. <view class="confidence-bar-fill" :class="'fill-' + confidenceLevelClass" :style="'width:' + confidencePercent + '%'"></view>
  43. </view>
  44. <text class="confidence-desc">{{ confidenceDesc }}</text>
  45. </view>
  46. <view class="form-section">
  47. <!-- 基本信息 -->
  48. <view class="card">
  49. <view class="card-title">基本信息</view>
  50. <view class="field-row member-select-row" @click="toggleMemberPanel">
  51. <text class="field-label">被检测人</text>
  52. <text class="field-value" :class="{ 'binding-required': needBind && !selectedMemberObj }">{{ memberDisplayText }}</text>
  53. <text class="member-select-arrow">{{ selectedMemberObj ? '修改 ›' : '选择 ›' }}</text>
  54. </view>
  55. <!-- 被检测人选择面板(内联展开) -->
  56. <view class="member-panel" v-if="showMemberPanel">
  57. <!-- 候选匹配列表(按置信度排序) -->
  58. <view class="candidate-section" v-if="candidates.length > 0">
  59. <text class="candidate-section-hint">以下成员与报告信息匹配,请选择:</text>
  60. <view
  61. class="candidate-item"
  62. v-for="(cand, idx) in candidates"
  63. :key="idx"
  64. :class="{ 'candidate-selected': selectedMemberId === (cand.id || cand.userId) }"
  65. @click="selectAndClose(cand)"
  66. >
  67. <view class="candidate-left">
  68. <text class="candidate-avatar">{{ (cand.nickname || cand.name || '?').substring(0, 1) }}</text>
  69. <view class="candidate-info">
  70. <text class="candidate-name">{{ cand.nickname || cand.name || '未知' }}</text>
  71. <text class="candidate-detail" v-if="cand.gender || cand.age">{{ genderText(cand.gender) }}{{ cand.age ? ' · ' + cand.age + '岁' : '' }}</text>
  72. <text class="candidate-fields" v-if="cand.matchFields">匹配: {{ cand.matchFields }}</text>
  73. </view>
  74. </view>
  75. <view class="candidate-right">
  76. <view class="score-bar-track">
  77. <view class="score-bar-fill" :style="'width:' + (cand.similarityScore * 100) + '%'"></view>
  78. </view>
  79. <text class="score-text">{{ Math.round(cand.similarityScore * 100) }}%</text>
  80. </view>
  81. </view>
  82. </view>
  83. <!-- 全量家庭成员列表(始终显示,候选区已展示的成员去重) -->
  84. <view class="member-list" v-if="familyMembers.length > 0">
  85. <text class="member-list-hint" v-if="candidates.length > 0">全部成员({{ otherMembers.length }} 人)</text>
  86. <view
  87. class="member-item"
  88. v-for="(member, mIdx) in otherMembers"
  89. :key="mIdx"
  90. :class="{ 'member-selected': selectedMemberId === (member.userId || member.id) }"
  91. @click="selectAndClose(member)"
  92. >
  93. <text class="member-avatar">{{ (member.nickname || '?').substring(0, 1) }}</text>
  94. <text class="member-name">{{ member.nickname || '未知' }}</text>
  95. </view>
  96. </view>
  97. <!-- 不绑定成员(仅编辑模式:解绑当前报告,不纳入家庭维度计算) -->
  98. <view class="member-item unbind-member" v-if="pageMode === 'edit'" @click="unbindMember">
  99. <text class="member-avatar unbind-avatar">✕</text>
  100. <text class="member-name">不绑定成员</text>
  101. </view>
  102. <!-- 新建成员入口 -->
  103. <view class="create-member-entry" @click="toggleAutoCreate">
  104. <text class="create-member-icon">+</text>
  105. <text class="create-member-text">{{ showAutoCreateForm ? '收起新建表单' : '不在列表中?新建家庭成员' }}</text>
  106. </view>
  107. <!-- 新建成员表单(面板内嵌) -->
  108. <view class="auto-create-inline" v-if="showAutoCreateForm">
  109. <view class="form-item">
  110. <text class="form-item-label">姓名</text>
  111. <input class="form-item-input" v-model="newMember.name" placeholder="请输入姓名" />
  112. </view>
  113. <view class="form-item">
  114. <text class="form-item-label">性别</text>
  115. <view class="gender-selector">
  116. <text class="gender-option" :class="{ 'gender-selected': newMember.gender === 'male' }" @click="newMember.gender = 'male'">男</text>
  117. <text class="gender-option" :class="{ 'gender-selected': newMember.gender === 'female' }" @click="newMember.gender = 'female'">女</text>
  118. </view>
  119. </view>
  120. <view class="form-item">
  121. <text class="form-item-label">年龄</text>
  122. <input class="form-item-input" type="number" v-model="newMember.age" placeholder="请输入年龄" />
  123. </view>
  124. <view class="btn-create-submit" :class="{ 'btn-disabled': creatingMember }" @click="doAutoCreate">
  125. <text v-if="creatingMember">创建中...</text>
  126. <text v-else>确认创建</text>
  127. </view>
  128. </view>
  129. </view>
  130. <view class="field-row" v-if="extractedGender">
  131. <text class="field-label">性别</text>
  132. <text class="field-value">{{ extractedGender === 'male' ? '男' : extractedGender === 'female' ? '女' : extractedGender }}</text>
  133. </view>
  134. <view class="field-row" v-if="extractedAge">
  135. <text class="field-label">年龄</text>
  136. <text class="field-value">{{ extractedAge }}</text>
  137. </view>
  138. <view class="field-row" v-if="payload.summary && payload.type !== 'tongue'">
  139. <text class="field-label">综合评分</text>
  140. <input class="field-input" type="number" v-model="payload.summary.overallScore" />
  141. </view>
  142. <view class="field-row" v-if="payload.summary">
  143. <text class="field-label">报告日期</text>
  144. <input class="field-input" type="text" v-model="payload.summary.reportDate" placeholder="如: 2025-06-15" />
  145. </view>
  146. <view class="field-row" v-if="payload.summary && payload.type !== 'tongue'">
  147. <text class="field-label">报告摘要</text>
  148. <textarea class="field-textarea" v-model="payload.summary.summary" maxlength="500" />
  149. </view>
  150. </view>
  151. <!-- 舌诊指标(只读展示) -->
  152. <view class="card" v-if="payload.type === 'tongue' && payload.indicators && payload.indicators.length">
  153. <view class="card-title">舌象指标</view>
  154. <view class="tongue-indicator-grid">
  155. <view class="tongue-ind-item" v-for="(ind, idx) in payload.indicators" :key="idx">
  156. <text class="tongue-ind-label">{{ indicatorLabel(ind.code) }}</text>
  157. <text class="tongue-ind-value">{{ ind.value }}</text>
  158. </view>
  159. </view>
  160. <view class="tongue-summary" v-if="payload.summary && payload.summary.overallAssessment">
  161. <text class="tongue-summary-title">综合评估</text>
  162. <text class="tongue-summary-text">{{ payload.summary.overallAssessment }}</text>
  163. </view>
  164. </view>
  165. <!-- 健康指标(舌诊时隐藏,使用上方舌象指标卡片) -->
  166. <view class="card" v-if="payload.type !== 'tongue' && payload.indicators && payload.indicators.length">
  167. <view class="card-title">
  168. <text>健康指标</text>
  169. <text class="title-count">共 {{ payload.indicators.length }} 项</text>
  170. <text class="title-abnormal" v-if="totalAbnormalCount > 0">,{{ totalAbnormalCount }} 项异常</text>
  171. <view class="card-title-actions">
  172. <text class="expand-all-btn" @click="toggleAllGroups(true)">全部展开</text>
  173. <text class="expand-all-btn" @click="toggleAllGroups(false)">全部折叠</text>
  174. </view>
  175. </view>
  176. <!-- 按指标类型分组折叠 -->
  177. <view class="indicator-group" v-for="(group, gIdx) in indicatorGroups" :key="gIdx">
  178. <view class="indicator-group-header" @click="toggleGroup(gIdx)">
  179. <view class="indicator-group-header-left">
  180. <text class="indicator-group-arrow" :class="{ 'arrow-open': groupExpandList[gIdx] }">›</text>
  181. <text class="indicator-group-name">{{ group.category }}</text>
  182. </view>
  183. <view class="indicator-group-header-right">
  184. <text class="indicator-group-abnormal" v-if="group.abnormalCount > 0">{{ group.abnormalCount }} 项异常</text>
  185. <text class="indicator-group-count">{{ group.items.length }} 项</text>
  186. </view>
  187. </view>
  188. <view class="indicator-group-body" v-if="groupExpandList[gIdx]">
  189. <view class="indicator-item" v-for="(ind, idx) in group.items" :key="idx">
  190. <view class="ind-header">
  191. <text class="ind-help-btn" @click.stop="showHelp(ind)">?</text>
  192. <input class="ind-name" :class="'ind-name-' + _cssClass(ind.status)" v-model="ind.indicatorName" />
  193. <input class="ind-value" :class="'ind-value-' + _cssClass(ind.status)" v-model="ind.indicatorValue" />
  194. </view>
  195. <view class="ind-detail" v-if="ind.unit || ind.refRange">
  196. <text class="ind-ref" v-if="ind.refRange">参考: {{ ind.refRange }}</text>
  197. <text class="ind-unit" v-if="ind.unit">{{ ind.unit }}</text>
  198. </view>
  199. <view class="ind-symptoms" v-if="ind.symptoms">
  200. <text class="ind-symptom-label">症状:</text>
  201. <input class="ind-symptom-input" v-model="ind.symptoms" />
  202. </view>
  203. </view>
  204. </view>
  205. </view>
  206. </view>
  207. <!-- 肠道菌群 -->
  208. <view class="card" v-if="payload.gutFlora && payload.gutFlora.length">
  209. <view class="card-title collapsible-title" @click="toggleCollapse('gutFlora')">
  210. <text>肠道菌群 ({{ payload.gutFlora.length }})</text>
  211. <text class="collapse-arrow" :class="{ 'arrow-open': collapseState.gutFlora }">›</text>
  212. </view>
  213. <view v-if="collapseState.gutFlora">
  214. <view class="flora-item" v-for="(flora, idx) in payload.gutFlora" :key="idx">
  215. <input class="flora-name" v-model="payload.gutFlora[idx].name" />
  216. <input class="flora-abundance" type="digit" v-model="payload.gutFlora[idx].abundance" />
  217. <view class="status-tag" :class="'status-' + _cssClass(flora.status)">
  218. {{ statusText(flora.status) }}
  219. </view>
  220. </view>
  221. </view>
  222. </view>
  223. <!-- 疾病风险 -->
  224. <view class="card" v-if="payload.diseaseRisks && payload.diseaseRisks.length">
  225. <view class="card-title collapsible-title" @click="toggleCollapse('diseaseRisk')">
  226. <text>疾病风险 ({{ payload.diseaseRisks.length }})</text>
  227. <text class="collapse-arrow" :class="{ 'arrow-open': collapseState.diseaseRisk }">›</text>
  228. </view>
  229. <view v-if="collapseState.diseaseRisk">
  230. <view class="risk-item" v-for="(risk, idx) in payload.diseaseRisks" :key="idx">
  231. <input class="risk-name" v-model="payload.diseaseRisks[idx].diseaseName" />
  232. <view class="risk-level" :class="'risk-' + (risk.riskLevel || 'low')">
  233. {{ riskLevelText(risk.riskLevel) }}
  234. </view>
  235. </view>
  236. </view>
  237. </view>
  238. <!-- 益生菌种 -->
  239. <view class="card" v-if="payload.probioticSpecies && payload.probioticSpecies.length">
  240. <view class="card-title collapsible-title" @click="toggleCollapse('probiotic')">
  241. <text>益生菌种 ({{ payload.probioticSpecies.length }})</text>
  242. <text class="collapse-arrow" :class="{ 'arrow-open': collapseState.probiotic }">›</text>
  243. </view>
  244. <view v-if="collapseState.probiotic">
  245. <view class="flora-item" v-for="(flora, idx) in payload.probioticSpecies" :key="idx">
  246. <input class="flora-name" v-model="payload.probioticSpecies[idx].name" />
  247. <input class="flora-abundance" type="digit" v-model="payload.probioticSpecies[idx].abundance" />
  248. <view class="status-tag" :class="'status-' + _cssClass(flora.status)">
  249. {{ statusText(flora.status) }}
  250. </view>
  251. </view>
  252. </view>
  253. </view>
  254. <!-- Taxonomy 分类(纲/目/科/属/种) -->
  255. <view class="card" v-if="hasTaxonomyData()">
  256. <view class="card-title collapsible-title" @click="toggleCollapse('taxonomy')">
  257. <text>菌群分类组成 ({{ taxonomyTotalCount }})</text>
  258. <text class="collapse-arrow" :class="{ 'arrow-open': collapseState.taxonomy }">›</text>
  259. </view>
  260. <view v-if="collapseState.taxonomy">
  261. <view class="taxonomy-group" v-if="payload.taxonomyClass && payload.taxonomyClass.length">
  262. <text class="taxonomy-group-label">菌纲 (Class)</text>
  263. <view class="flora-item" v-for="(flora, idx) in payload.taxonomyClass" :key="getTaxonomyKey('c', idx)">
  264. <input class="flora-name" v-model="payload.taxonomyClass[idx].name" />
  265. <input class="flora-abundance" type="digit" v-model="payload.taxonomyClass[idx].abundance" />
  266. </view>
  267. </view>
  268. <view class="taxonomy-group" v-if="payload.taxonomyOrder && payload.taxonomyOrder.length">
  269. <text class="taxonomy-group-label">菌目 (Order)</text>
  270. <view class="flora-item" v-for="(flora, idx) in payload.taxonomyOrder" :key="getTaxonomyKey('o', idx)">
  271. <input class="flora-name" v-model="payload.taxonomyOrder[idx].name" />
  272. <input class="flora-abundance" type="digit" v-model="payload.taxonomyOrder[idx].abundance" />
  273. </view>
  274. </view>
  275. <view class="taxonomy-group" v-if="payload.taxonomyFamily && payload.taxonomyFamily.length">
  276. <text class="taxonomy-group-label">菌科 (Family)</text>
  277. <view class="flora-item" v-for="(flora, idx) in payload.taxonomyFamily" :key="getTaxonomyKey('f', idx)">
  278. <input class="flora-name" v-model="payload.taxonomyFamily[idx].name" />
  279. <input class="flora-abundance" type="digit" v-model="payload.taxonomyFamily[idx].abundance" />
  280. </view>
  281. </view>
  282. <view class="taxonomy-group" v-if="payload.taxonomyGenus && payload.taxonomyGenus.length">
  283. <text class="taxonomy-group-label">菌属 (Genus)</text>
  284. <view class="flora-item" v-for="(flora, idx) in payload.taxonomyGenus" :key="getTaxonomyKey('g', idx)">
  285. <input class="flora-name" v-model="payload.taxonomyGenus[idx].name" />
  286. <input class="flora-abundance" type="digit" v-model="payload.taxonomyGenus[idx].abundance" />
  287. </view>
  288. </view>
  289. <view class="taxonomy-group" v-if="payload.taxonomySpecies && payload.taxonomySpecies.length">
  290. <text class="taxonomy-group-label">菌种 (Species)</text>
  291. <view class="flora-item" v-for="(flora, idx) in payload.taxonomySpecies" :key="getTaxonomyKey('s', idx)">
  292. <input class="flora-name" v-model="payload.taxonomySpecies[idx].name" />
  293. <input class="flora-abundance" type="digit" v-model="payload.taxonomySpecies[idx].abundance" />
  294. </view>
  295. </view>
  296. </view>
  297. </view>
  298. <!-- 病原菌 -->
  299. <view class="card" v-if="hasPathogenData()">
  300. <view class="card-title collapsible-title" @click="toggleCollapse('pathogen')">
  301. <text>病原菌 ({{ pathogenTotalCount }})</text>
  302. <text class="collapse-arrow" :class="{ 'arrow-open': collapseState.pathogen }">›</text>
  303. </view>
  304. <view v-if="collapseState.pathogen">
  305. <view class="pathogen-group" v-if="payload.pathogenGenus && payload.pathogenGenus.length">
  306. <text class="pathogen-group-label">病原菌属</text>
  307. <view class="flora-item" v-for="(flora, idx) in payload.pathogenGenus" :key="getTaxonomyKey('pg', idx)">
  308. <input class="flora-name" v-model="payload.pathogenGenus[idx].name" />
  309. <input class="flora-abundance" type="digit" v-model="payload.pathogenGenus[idx].abundance" />
  310. <view class="status-tag" :class="'status-' + _cssClass(flora.status)">
  311. {{ statusText(flora.status) }}
  312. </view>
  313. </view>
  314. </view>
  315. <view class="pathogen-group" v-if="payload.pathogenDetection && payload.pathogenDetection.length">
  316. <text class="pathogen-group-label">病原菌检出</text>
  317. <view class="flora-item" v-for="(flora, idx) in payload.pathogenDetection" :key="getTaxonomyKey('pd', idx)">
  318. <input class="flora-name" v-model="payload.pathogenDetection[idx].name" />
  319. <input class="flora-abundance" type="digit" v-model="payload.pathogenDetection[idx].abundance" />
  320. <view class="status-tag" :class="'status-' + _cssClass(flora.status)">
  321. {{ statusText(flora.status) }}
  322. </view>
  323. </view>
  324. </view>
  325. </view>
  326. </view>
  327. <!-- 操作按钮(draft: 放弃/确认入库; edit: 取消/保存) -->
  328. <view class="action-row">
  329. <view class="btn-discard" @click="handleLeftAction">
  330. <text>{{ pageMode === 'draft' ? '放弃' : '取消' }}</text>
  331. </view>
  332. <view class="btn-confirm" :class="{ 'btn-disabled': pageMode === 'draft' && !canConfirm }" @click="handleRightAction">
  333. <text v-if="pageMode === 'draft' && confirming">确认中...</text>
  334. <text v-else>{{ pageMode === 'draft' ? '确认入库' : '保存' }}</text>
  335. </view>
  336. </view>
  337. </view>
  338. <view class="bottom-spacer"></view>
  339. </view>
  340. </scroll-view>
  341. <!-- 指标帮助弹窗(置于 scroll-view 外,position:fixed 覆盖视口) -->
  342. <view class="help-overlay" v-if="showHelpPopup" @click="closeHelp">
  343. <view class="help-popup" @click.stop>
  344. <view class="help-popup-header">
  345. <text class="help-popup-title">{{ helpData.name }}</text>
  346. <text class="help-popup-close" @click="closeHelp">✕</text>
  347. </view>
  348. <view class="help-popup-body">
  349. <view class="help-row">
  350. <text class="help-label">当前值</text>
  351. <text class="help-value">{{ helpData.value }}</text>
  352. </view>
  353. <view class="help-row" v-if="helpData.refRange">
  354. <text class="help-label">参考范围</text>
  355. <text class="help-value">{{ helpData.refRange }}</text>
  356. </view>
  357. <view class="help-row">
  358. <text class="help-label">状态</text>
  359. <text class="help-value" :class="'help-status-' + _cssClass(helpData.status)">{{ statusText(helpData.status) }}</text>
  360. </view>
  361. <view class="help-desc" v-if="helpData.description">
  362. <text class="help-desc-label">说明</text>
  363. <text class="help-desc-text">{{ helpData.description }}</text>
  364. </view>
  365. <view class="help-desc" v-else>
  366. <text class="help-desc-label">说明</text>
  367. <text class="help-desc-text">{{ getDefaultDescription(helpData.name, helpData.status) }}</text>
  368. </view>
  369. </view>
  370. </view>
  371. </view>
  372. <!-- 报告反馈入口(仅查看模式) -->
  373. <view class="feedback-entry" v-if="pageMode==='view' && reportId" @tap="openFeedback">
  374. <text class="feedback-entry-icon">💬</text>
  375. <text class="feedback-entry-text">对报告有疑问或建议</text>
  376. <text class="feedback-entry-arrow">›</text>
  377. </view>
  378. <feedback-popup :visible="feedbackVisible" :report-id="reportId" @close="closeFeedback" />
  379. </view>
  380. </template>
  381. <script>
  382. import ReportBlocksRenderer from '../../components/report-blocks-renderer.vue'
  383. import FeedbackPopup from '@/pages/health/components/feedback-popup.vue'
  384. import { getReportDetail, getDanReportDetail, getReportPayload, editHealthReport, parseReportDraft, confirmReportPreview, discardReportDraft, confirmTongue, discardTongue, getFamilyMemberList, addFamilyMember, queryIndicatorKnowledge, queryBacteriaKnowledge } from '../../utils/api.js'
  385. import { parseDate } from '../../utils/format.js'
  386. export default {
  387. components: { ReportBlocksRenderer, FeedbackPopup },
  388. data() {
  389. return {
  390. reportType: 'gut_flora',
  391. reportId: null,
  392. draftId: null,
  393. memberId: null,
  394. familyId: null,
  395. blocks: [],
  396. backendBlocksExist: false,
  397. headInfo: null,
  398. pageMode: 'view', // view / draft / edit
  399. directEdit: false, // 是否从列表 mode=edit 直入编辑模式(取消时返回上一页)
  400. parsing: false,
  401. parsingText: '正在检测报告类型...',
  402. parsingStep: 0,
  403. parsingTimer: null,
  404. confirming: false,
  405. payload: {
  406. type: 'gut_flora',
  407. reportFormat: '',
  408. summary: {},
  409. indicators: [],
  410. gutFlora: [],
  411. diseaseRisks: [],
  412. foods: [],
  413. probioticSpecies: [],
  414. taxonomyClass: [],
  415. taxonomyOrder: [],
  416. taxonomyFamily: [],
  417. taxonomyGenus: [],
  418. taxonomySpecies: [],
  419. pathogenGenus: [],
  420. pathogenDetection: []
  421. },
  422. extractedName: '',
  423. extractedGender: '',
  424. extractedAge: '',
  425. matchedMemberId: null,
  426. needBind: false,
  427. selectedMemberId: null,
  428. selectedMemberObj: null,
  429. familyMembers: [],
  430. matchConfidence: null,
  431. matchLabel: '',
  432. candidates: [],
  433. showMemberPanel: false,
  434. showAutoCreateForm: false,
  435. newMember: { name: '', gender: 'male', age: '' },
  436. creatingMember: false,
  437. createdMemberId: null,
  438. groupExpandList: [],
  439. collapseState: { gutFlora: false, diseaseRisk: false, probiotic: false, taxonomy: false, pathogen: false },
  440. showHelpPopup: false,
  441. helpData: {},
  442. _kbCache: {},
  443. feedbackVisible: false
  444. }
  445. },
  446. computed: {
  447. typeLabel() {
  448. var map = { gut_flora: '肠道菌群报告', dan: 'DAN测评报告', physical_exam: '体检报告', tongue: '舌诊报告' }
  449. return map[this.reportType] || '健康报告'
  450. },
  451. isGutFlora() {
  452. return this.reportType === 'gut_flora'
  453. },
  454. hasPayloadData() {
  455. var p = this.payload
  456. return p && ((p.indicators && p.indicators.length > 0) || (p.diseaseRisks && p.diseaseRisks.length > 0) || (p.gutFlora && p.gutFlora.length > 0))
  457. },
  458. totalAbnormalCount() {
  459. var list = this.payload.indicators || []
  460. var count = 0
  461. for (var i = 0; i < list.length; i++) {
  462. if (this.isAbnormalStatus(list[i].status)) count++
  463. }
  464. return count
  465. },
  466. indicatorGroups() {
  467. var groups = []
  468. var orderMap = {}
  469. var list = this.payload.indicators || []
  470. for (var i = 0; i < list.length; i++) {
  471. var ind = list[i]
  472. var cat = ind.category || '其他指标'
  473. var gIdx = orderMap[cat]
  474. if (gIdx === undefined) {
  475. gIdx = groups.length
  476. orderMap[cat] = gIdx
  477. groups.push({ category: cat, items: [], abnormalCount: 0 })
  478. }
  479. groups[gIdx].items.push(ind)
  480. if (this.isAbnormalStatus(ind.status)) groups[gIdx].abnormalCount++
  481. }
  482. return groups
  483. },
  484. memberDisplayText() {
  485. if (this.selectedMemberObj) return this.selectedMemberObj.nickname || this.selectedMemberObj.name || '已选择'
  486. if (this.extractedName) return this.extractedName + (this.needBind ? '(待绑定)' : '')
  487. return '未选择'
  488. },
  489. /** 全量成员减去候选区已展示的成员,避免重复 */
  490. otherMembers() {
  491. var candIds = {}
  492. for (var i = 0; i < this.candidates.length; i++) {
  493. var c = this.candidates[i]
  494. var cid = c.id || c.userId
  495. if (cid !== null && cid !== undefined) candIds[cid] = true
  496. }
  497. var list = []
  498. for (var j = 0; j < this.familyMembers.length; j++) {
  499. var m = this.familyMembers[j]
  500. var mid = m.userId || m.id
  501. if (mid !== null && mid !== undefined && candIds[mid]) continue
  502. list.push(m)
  503. }
  504. return list
  505. },
  506. canConfirm() {
  507. if (this.parsing) return false
  508. if (this.needBind && !this.selectedMemberId && !this.createdMemberId) return false
  509. return this.draftId && !this.confirming
  510. },
  511. confidenceLevelClass() {
  512. var c = this.matchConfidence
  513. if (c === null || c === undefined) return ''
  514. if (c >= 0.8) return 'high'
  515. if (c >= 0.6) return 'medium'
  516. return 'low'
  517. },
  518. confidenceLevelText() {
  519. var cls = this.confidenceLevelClass
  520. if (cls === 'high') return '高'
  521. if (cls === 'medium') return '中'
  522. if (cls === 'low') return '低'
  523. return ''
  524. },
  525. confidencePercent() {
  526. var c = this.matchConfidence
  527. if (c === null || c === undefined) return 0
  528. return Math.round(c * 100)
  529. },
  530. confidenceDesc() {
  531. var cls = this.confidenceLevelClass
  532. if (cls === 'high') return '报告信息与档案高度匹配,可信度较高。'
  533. if (cls === 'medium') return '报告信息与档案部分匹配,请仔细核对被检测人。'
  534. if (cls === 'low') return '报告信息与档案匹配度较低,建议手动选择被检测人。'
  535. return ''
  536. },
  537. taxonomyTotalCount() {
  538. var lists = [this.payload.taxonomyClass, this.payload.taxonomyOrder, this.payload.taxonomyFamily, this.payload.taxonomyGenus, this.payload.taxonomySpecies]
  539. var total = 0
  540. for (var i = 0; i < lists.length; i++) {
  541. if (lists[i] && lists[i].length) total += lists[i].length
  542. }
  543. return total
  544. },
  545. pathogenTotalCount() {
  546. var lists = [this.payload.pathogenGenus, this.payload.pathogenDetection]
  547. var total = 0
  548. for (var i = 0; i < lists.length; i++) {
  549. if (lists[i] && lists[i].length) total += lists[i].length
  550. }
  551. return total
  552. }
  553. },
  554. onLoad(options) {
  555. this.reportType = options.reportType || 'gut_flora'
  556. this.reportId = options.reportId ? parseInt(options.reportId) : null
  557. this.draftId = options.draftId ? parseInt(options.draftId) : null
  558. this.memberId = options.memberId ? parseInt(options.memberId) : null
  559. this.familyId = options.familyId ? parseInt(options.familyId) : null
  560. if (this.draftId) {
  561. this.pageMode = 'draft'
  562. this.parseByDraftId()
  563. } else if (this.reportId) {
  564. // 列表直入编辑模式:跳过查看过渡页(仅肠道菌群报告支持编辑)
  565. if (options.mode === 'edit' && this.reportType === 'gut_flora') {
  566. this.pageMode = 'edit'
  567. this.directEdit = true
  568. }
  569. this.loadData()
  570. }
  571. },
  572. methods: {
  573. // ===== 报告反馈(原「快速分析」入口已合并,反馈由 AI 解答) =====
  574. openFeedback: function() {
  575. this.feedbackVisible = true
  576. },
  577. closeFeedback: function() {
  578. this.feedbackVisible = false
  579. },
  580. loadData() {
  581. var self = this
  582. uni.showLoading({ title: '加载中...' })
  583. var fn = self.reportType === 'dan' ? getDanReportDetail : getReportDetail
  584. fn(self.reportId).then(function(res) {
  585. uni.hideLoading()
  586. if (res.code === 200) {
  587. var report = res.data.report || res.data
  588. var head = {}
  589. head.personName = report.personName || report.childName || ''
  590. head.childName = report.childName || ''
  591. head.reportDateText = report.reportDate ? parseDate(report.reportDate) : ''
  592. self.headInfo = head
  593. var backendBlocks = (res.data && res.data.blocks) || report.blocks || []
  594. if (res.data.payload) {
  595. self.payload = Object.assign({}, self.defaultPayload(), res.data.payload)
  596. }
  597. // 报告来源格式优先取 payload,兜底取 report 实体字段
  598. if (!self.payload.reportFormat && report.reportFormat) {
  599. self.payload.reportFormat = report.reportFormat
  600. }
  601. // 后端无 blocks 时从 payload 自动组装
  602. var cleanBlocks = self.stripFoodBlocks(backendBlocks)
  603. if (cleanBlocks.length > 0) {
  604. self.blocks = cleanBlocks
  605. self.backendBlocksExist = true
  606. } else if (self.hasPayloadData) {
  607. self.blocks = self.stripFoodBlocks(self.assembleBlocksFromPayload())
  608. self.backendBlocksExist = false
  609. } else {
  610. self.blocks = []
  611. self.backendBlocksExist = false
  612. }
  613. self.needBind = !!report.needBind
  614. self.selectedMemberId = report.subjectId || null
  615. } else {
  616. uni.showToast({ title: res.message || '加载失败', icon: 'none' })
  617. }
  618. }).catch(function() {
  619. uni.hideLoading()
  620. uni.showToast({ title: '加载异常', icon: 'none' })
  621. })
  622. },
  623. defaultPayload() {
  624. return {
  625. type: 'gut_flora',
  626. reportFormat: '',
  627. summary: {},
  628. indicators: [],
  629. gutFlora: [],
  630. diseaseRisks: [],
  631. foods: [],
  632. probioticSpecies: [],
  633. taxonomyClass: [],
  634. taxonomyOrder: [],
  635. taxonomyFamily: [],
  636. taxonomyGenus: [],
  637. taxonomySpecies: [],
  638. pathogenGenus: [],
  639. pathogenDetection: []
  640. }
  641. },
  642. enterEditMode: function() {
  643. var self = this
  644. self.pageMode = 'edit'
  645. self.directEdit = false
  646. self.showMemberPanel = false
  647. // 按需加载 payload(编辑回填)
  648. if (self.reportId && self.reportType !== 'dan') {
  649. uni.showLoading({ title: '加载编辑数据...' })
  650. getReportPayload(self.reportId).then(function(res) {
  651. uni.hideLoading()
  652. if (res.code === 200 && res.data && res.data.payload) {
  653. self.payload = Object.assign({}, self.defaultPayload(), res.data.payload)
  654. }
  655. }).catch(function() {
  656. uni.hideLoading()
  657. })
  658. }
  659. },
  660. cancelEdit() {
  661. // 从列表 mode=edit 直入编辑模式时,取消等同返回上一页(报告卡片/报告列表)
  662. if (this.directEdit) {
  663. uni.navigateBack()
  664. return
  665. }
  666. this.pageMode = 'view'
  667. this.showMemberPanel = false
  668. this.showAutoCreateForm = false
  669. this.showHelpPopup = false
  670. this.loadData()
  671. },
  672. parseByDraftId() {
  673. var self = this
  674. self.parsing = true
  675. self.parsingStep = 0
  676. self.parsingText = '正在检测报告类型,识别报告来源...'
  677. // 循环切换文案,让用户知道系统在工作
  678. var messages = [
  679. '正在检测报告类型,识别报告来源...',
  680. 'AI 大模型正在深度分析报告内容...',
  681. '提取关键指标,请稍候...'
  682. ]
  683. self.parsingTimer = setInterval(function() {
  684. self.parsingStep = (self.parsingStep + 1) % messages.length
  685. self.parsingText = messages[self.parsingStep]
  686. }, 2500)
  687. // 调用 parse-report-preview,需要文件路径;从 upload 页传来的 draftId 需要重新获取文件路径
  688. // 这里使用后端解析接口:先上传文件,然后解析
  689. // 由于只传了 draftId,回调服务器已有的草稿进行解析
  690. // 使用上传接口模式:需要文件路径
  691. // 这里通过 draftId 请求后端确认,后端会使用已存储的文件进行解析
  692. // 兼容模式:直接请求确认,由后端决定如何解析
  693. parseReportDraft(self.draftId).then(function(res) {
  694. self.parsing = false
  695. if (self.parsingTimer) { clearInterval(self.parsingTimer); self.parsingTimer = null }
  696. if (res.code === 200) {
  697. self.applyParseResult(res.data)
  698. } else {
  699. uni.showToast({ title: res.message || '解析失败', icon: 'none' })
  700. }
  701. }).catch(function() {
  702. self.parsing = false
  703. if (self.parsingTimer) { clearInterval(self.parsingTimer); self.parsingTimer = null }
  704. uni.showToast({ title: '解析异常', icon: 'none' })
  705. })
  706. },
  707. applyParseResult(detail) {
  708. console.log('[报告入库] applyParseResult', detail)
  709. var self = this
  710. self.payload = detail.payload || self.defaultPayload()
  711. self.extractedName = detail.extractedName || ''
  712. self.extractedGender = detail.extractedGender || ''
  713. self.extractedAge = detail.extractedAge || ''
  714. self.matchConfidence = detail.matchConfidence !== undefined && detail.matchConfidence !== null ? detail.matchConfidence : null
  715. self.matchLabel = detail.matchLabel || ''
  716. self.matchedMemberId = detail.matchedMemberId || null
  717. self.needBind = !!detail.needBind
  718. self.candidates = detail.candidates || []
  719. self.loadFamilyMembers()
  720. console.log('[报告入库] applyParseResult 后状态', {
  721. needBind: self.needBind,
  722. matchedMemberId: self.matchedMemberId,
  723. candidates: self.candidates.length,
  724. selectedMemberId: self.selectedMemberId,
  725. canConfirm: self.canConfirm
  726. })
  727. if (!self.needBind) {
  728. self.selectedMemberId = self.matchedMemberId
  729. }
  730. var best = self.candidates[0]
  731. if (best && (best.id || best.userId)) {
  732. self.selectedMemberId = best.id || best.userId
  733. self.selectedMemberObj = best
  734. }
  735. // 如果需要绑定且有候选成员,默认自动选中第一个
  736. if (self.needBind && !self.selectedMemberId && self.candidates.length > 0) {
  737. setTimeout(function() {
  738. self.toggleMemberPanel()
  739. uni.showToast({ title: '请确认被检测人', icon: 'none' })
  740. }, 300)
  741. }
  742. console.log('[报告入库] applyParseResult 最终状态', {
  743. selectedMemberId: self.selectedMemberId,
  744. canConfirm: self.canConfirm
  745. })
  746. },
  747. loadFamilyMembers() {
  748. var self = this
  749. getFamilyMemberList({ visibleOnly: true }).then(function(res) {
  750. if (res.code === 200) {
  751. self.familyMembers = res.data || []
  752. }
  753. }).catch(function() {})
  754. },
  755. toggleMemberPanel() {
  756. this.showMemberPanel = !this.showMemberPanel
  757. if (this.showMemberPanel && this.familyMembers.length === 0) {
  758. this.loadFamilyMembers()
  759. }
  760. },
  761. selectAndClose(member) {
  762. this.selectedMemberId = member.id || member.userId
  763. this.selectedMemberObj = member
  764. this.createdMemberId = null
  765. this.needBind = false
  766. this.showMemberPanel = false
  767. this.showAutoCreateForm = false
  768. },
  769. // 解绑:不绑定任何成员(报告不纳入家庭/用户维度计算)
  770. unbindMember() {
  771. this.selectedMemberId = null
  772. this.selectedMemberObj = null
  773. this.createdMemberId = null
  774. this.needBind = false
  775. this.showMemberPanel = false
  776. this.showAutoCreateForm = false
  777. },
  778. genderText(g) {
  779. if (g === 'male') return '男'
  780. if (g === 'female') return '女'
  781. return g || ''
  782. },
  783. toggleAutoCreate() {
  784. this.showAutoCreateForm = !this.showAutoCreateForm
  785. },
  786. doAutoCreate() {
  787. var self = this
  788. if (!self.newMember.name) {
  789. uni.showToast({ title: '请填写姓名', icon: 'none' })
  790. return
  791. }
  792. self.creatingMember = true
  793. addFamilyMember({
  794. name: self.newMember.name,
  795. gender: self.newMember.gender,
  796. age: self.newMember.age ? parseInt(self.newMember.age) : null
  797. }).then(function(res) {
  798. self.creatingMember = false
  799. if (res.code === 200) {
  800. var member = res.data || {}
  801. self.selectedMemberId = member.id || member.userId
  802. self.selectedMemberObj = member
  803. self.createdMemberId = self.selectedMemberId
  804. self.needBind = false
  805. self.showMemberPanel = false
  806. self.showAutoCreateForm = false
  807. self.loadFamilyMembers()
  808. uni.showToast({ title: '创建成功', icon: 'success' })
  809. } else {
  810. uni.showToast({ title: res.message || '创建失败', icon: 'none' })
  811. }
  812. }).catch(function() {
  813. self.creatingMember = false
  814. uni.showToast({ title: '创建异常', icon: 'none' })
  815. })
  816. },
  817. toggleGroup(idx) {
  818. this.groupExpandList[idx] = !this.groupExpandList[idx]
  819. },
  820. toggleCollapse(key) {
  821. this.collapseState[key] = !this.collapseState[key]
  822. },
  823. toggleAllGroups(open) {
  824. var groups = this.indicatorGroups
  825. var list = []
  826. for (var i = 0; i < groups.length; i++) list.push(!!open)
  827. this.groupExpandList = list
  828. },
  829. _cssClass(status) {
  830. var s = (status || '').toString()
  831. if (s === 'high' || s === '偏高') return 'high'
  832. if (s === 'low' || s === '偏低') return 'low'
  833. if (s === '缺乏' || s === '不足' || s === 'deficient' || s === 'insufficient') return 'deficient'
  834. if (s === 'abnormal' || s === '异常') return 'abnormal'
  835. if (s === 'warning' || s === '注意' || s === '需注意') return 'warning'
  836. if (s === 'high-risk' || s === '高风险') return 'high-risk'
  837. if (s === 'low-risk' || s === '低风险') return 'low-risk'
  838. if (s === 'not-detected' || s === '未检出') return 'not-detected'
  839. return 'normal'
  840. },
  841. statusText(status) {
  842. var s = (status || '').toString()
  843. if (s === 'high' || s === '偏高') return '偏高'
  844. if (s === 'low' || s === '偏低') return '偏低'
  845. if (s === '缺乏' || s === 'deficient') return '缺乏'
  846. if (s === '不足' || s === 'insufficient') return '不足'
  847. if (s === 'abnormal' || s === '异常') return '异常'
  848. if (s === 'warning' || s === '注意' || s === '需注意') return '需注意'
  849. if (s === 'high-risk' || s === '高风险') return '高风险'
  850. if (s === 'low-risk' || s === '低风险') return '低风险'
  851. if (s === 'not-detected' || s === '未检出') return '未检出'
  852. if (s === 'normal') return '正常'
  853. return '正常'
  854. },
  855. // 与 report-confirm 保持一致的白名单:仅明确异常/需关注的状态计入异常数,
  856. // 未知状态文本(解析器自由提取)一律视为正常,避免"样式正常却计入异常"的矛盾。
  857. isAbnormalStatus(status) {
  858. if (!status) return false
  859. var abnormalMap = { 'high': 1, 'low': 1, 'abnormal': 1, '偏高': 1, '偏低': 1, '异常': 1, '缺乏': 1, '不足': 1, '注意': 1, '高风险': 1 }
  860. return !!abnormalMap[String(status).trim()]
  861. },
  862. showHelp(ind) {
  863. this.helpData = {
  864. name: ind.indicatorName || ind.name || '',
  865. value: ind.indicatorValue || ind.value || '',
  866. refRange: ind.refRange || '',
  867. status: ind.status || 'normal',
  868. description: ind.description || ''
  869. }
  870. this.showHelpPopup = true
  871. },
  872. /** blocks renderer ? 按钮点击 — 按需查询知识库(页面级缓存) */
  873. onBlockHelp: function(item, blockType) {
  874. var self = this
  875. var name = item.name || ''
  876. if (!name) return
  877. var cacheKey = blockType + ':' + name
  878. if (self._kbCache[cacheKey]) {
  879. self.helpData = self._kbCache[cacheKey]
  880. self.showHelpPopup = true
  881. return
  882. }
  883. uni.showLoading({ title: '加载说明...' })
  884. var queryFn = blockType === 'bacteria' ? queryBacteriaKnowledge : queryIndicatorKnowledge
  885. queryFn(name).then(function(res) {
  886. uni.hideLoading()
  887. if (res.code === 200 && res.data) {
  888. var v3 = res.data
  889. var high = v3['偏高影响'] || ''
  890. var low = v3['偏低影响'] || ''
  891. var suggestion = v3['调整建议'] || ''
  892. var desc = ''
  893. if (high) desc += '偏高影响:' + high + '\n'
  894. if (low) desc += '偏低影响:' + low
  895. if (suggestion) desc += (desc ? '\n' : '') + '调整建议:' + suggestion
  896. self.helpData = {
  897. name: v3['名称'] || name,
  898. value: item.value || '',
  899. refRange: item.refRange || '',
  900. status: item.status || 'normal',
  901. description: desc || v3['说明'] || self.getDefaultDescription(name, item.status)
  902. }
  903. } else {
  904. self.helpData = {
  905. name: name,
  906. value: item.value || '',
  907. refRange: item.refRange || '',
  908. status: item.status || 'normal',
  909. description: self.getDefaultDescription(name, item.status)
  910. }
  911. }
  912. self._kbCache[cacheKey] = self.helpData
  913. self.showHelpPopup = true
  914. }).catch(function() {
  915. uni.hideLoading()
  916. self.helpData = {
  917. name: name,
  918. value: item.value || '',
  919. refRange: item.refRange || '',
  920. status: item.status || 'normal',
  921. description: self.getDefaultDescription(name, item.status)
  922. }
  923. self.showHelpPopup = true
  924. })
  925. },
  926. closeHelp() {
  927. this.showHelpPopup = false
  928. },
  929. getDefaultDescription(name, status) {
  930. if (!status || status === 'normal') return '该指标处于正常范围内,无需特别关注。'
  931. if (status === 'high' || status === '偏高') return '该指标偏高,建议咨询专业医生或营养师进行进一步评估。'
  932. if (status === 'low' || status === '偏低') return '该指标偏低,建议咨询专业医生或营养师进行进一步评估。'
  933. if (status === '缺乏' || status === '不足') return '该指标不足,建议通过饮食或补充剂适当补充。'
  934. if (status === 'abnormal') return '该指标异常,建议咨询专业医生进行详细检查。'
  935. if (status === '注意') return '该指标需要关注,建议定期监测并咨询专业人士。'
  936. return '请参考专业医生的建议进行解读。'
  937. },
  938. riskLevelText(level) {
  939. if (level === 'high') return '高风险'
  940. if (level === 'medium' || level === 'moderate') return '中风险'
  941. return '低风险'
  942. },
  943. indicatorLabel(code) {
  944. var map = { tongueColor: '舌色', tongueShape: '舌形', tongueCoating: '舌苔', tongueMoisture: '润燥' }
  945. return map[code] || code || ''
  946. },
  947. getTaxonomyKey(prefix, idx) {
  948. return prefix + '_' + idx
  949. },
  950. hasTaxonomyData() {
  951. return !!(this.payload.taxonomyClass && this.payload.taxonomyClass.length) ||
  952. !!(this.payload.taxonomyOrder && this.payload.taxonomyOrder.length) ||
  953. !!(this.payload.taxonomyFamily && this.payload.taxonomyFamily.length) ||
  954. !!(this.payload.taxonomyGenus && this.payload.taxonomyGenus.length) ||
  955. !!(this.payload.taxonomySpecies && this.payload.taxonomySpecies.length)
  956. },
  957. hasPathogenData() {
  958. return !!(this.payload.pathogenGenus && this.payload.pathogenGenus.length) ||
  959. !!(this.payload.pathogenDetection && this.payload.pathogenDetection.length)
  960. },
  961. handleLeftAction() {
  962. if (this.pageMode === 'draft') this.doDiscard()
  963. else this.cancelEdit()
  964. },
  965. handleRightAction() {
  966. if (this.pageMode === 'draft') {
  967. console.log('[报告入库] 点击确认按钮', {
  968. pageMode: this.pageMode,
  969. draftId: this.draftId,
  970. confirming: this.confirming,
  971. canConfirm: this.canConfirm,
  972. selectedMemberId: this.selectedMemberId,
  973. needBind: this.needBind,
  974. matchedMemberId: this.matchedMemberId,
  975. memberId: this.memberId,
  976. payloadType: this.payload.type,
  977. indicatorsCount: (this.payload.indicators || []).length
  978. })
  979. // 如果需要绑定但没有选择会员,先弹出会员选择面板
  980. if (this.needBind && !this.selectedMemberId && !this.createdMemberId) {
  981. uni.showToast({ title: '请先选择被检测人', icon: 'none' })
  982. this.toggleMemberPanel()
  983. return
  984. }
  985. this.doConfirm()
  986. } else this.saveEdit()
  987. },
  988. doDiscard() {
  989. var self = this
  990. uni.showModal({
  991. title: '提示',
  992. content: '确定放弃该报告草稿吗?',
  993. success: function(res) {
  994. if (!res.confirm) return
  995. var discardFn = self.payload.type === 'tongue' ? discardTongue : discardReportDraft
  996. discardFn(self.draftId).then(function(res2) {
  997. if (res2.code === 200) {
  998. uni.showToast({ title: '已放弃', icon: 'success' })
  999. setTimeout(function() { uni.navigateBack() }, 600)
  1000. } else {
  1001. uni.showToast({ title: res2.message || '操作失败', icon: 'none' })
  1002. }
  1003. })
  1004. }
  1005. })
  1006. },
  1007. doConfirm() {
  1008. console.log('[报告入库] doConfirm 开始', { canConfirm: this.canConfirm, draftId: this.draftId })
  1009. if (!this.canConfirm) {
  1010. console.warn('[报告入库] canConfirm 为 false,跳过执行')
  1011. return
  1012. }
  1013. var self = this
  1014. self.confirming = true
  1015. uni.showLoading({ title: '确认入库并生成方案...' })
  1016. var postData = { draftId: self.draftId, payload: self.payload }
  1017. if (self.selectedMemberId) postData.subjectId = self.selectedMemberId
  1018. else if (self.createdMemberId) postData.subjectId = self.createdMemberId
  1019. else if (self.matchedMemberId) postData.subjectId = self.matchedMemberId
  1020. else if (self.memberId) postData.subjectId = self.memberId
  1021. console.log('[报告入库] 准备调用 API', postData)
  1022. var confirmFn = self.payload.type === 'tongue' ? confirmTongue : confirmReportPreview
  1023. confirmFn(postData).then(function(res) {
  1024. console.log('[报告入库] API 响应', res)
  1025. uni.hideLoading()
  1026. self.confirming = false
  1027. if (res.code === 200) {
  1028. var data = res.data || {}
  1029. var reportId = data.reportId || (data.report && data.report.id)
  1030. if (reportId && self.payload.type !== 'tongue') {
  1031. setTimeout(function() {
  1032. uni.redirectTo({ url: '/pages/health/report-detail?reportType=' + (self.payload.type || 'gut_flora') + '&reportId=' + reportId })
  1033. uni.showToast({ title: '入库成功', icon: 'success' })
  1034. }, 600)
  1035. } else {
  1036. setTimeout(function() {
  1037. uni.navigateBack()
  1038. uni.showToast({ title: '入库成功', icon: 'success' })
  1039. }, 600)
  1040. }
  1041. } else {
  1042. uni.showToast({ title: res.message || '确认失败', icon: 'none' })
  1043. }
  1044. }).catch(function() {
  1045. uni.hideLoading()
  1046. self.confirming = false
  1047. uni.showToast({ title: '确认异常', icon: 'none' })
  1048. })
  1049. },
  1050. saveEdit() {
  1051. var self = this
  1052. if (!self.reportId) return
  1053. uni.showLoading({ title: '保存中...' })
  1054. // 未选择成员 → 传 null 表示解绑(不纳入任何用户/家庭维度计算)
  1055. // 注意:不传 0(0 会被后端当作无成员处理但语义不明,null 明确解绑)
  1056. var subjectId = self.selectedMemberId || self.createdMemberId || null
  1057. editHealthReport(self.reportId, self.payload, subjectId).then(function(res) {
  1058. uni.hideLoading()
  1059. if (res.code === 200) {
  1060. uni.showToast({ title: '已保存', icon: 'success' })
  1061. self.pageMode = 'view'
  1062. self.groupExpandList = []
  1063. self.loadData()
  1064. } else {
  1065. uni.showToast({ title: res.message || '保存失败', icon: 'none' })
  1066. }
  1067. }).catch(function() {
  1068. uni.hideLoading()
  1069. uni.showToast({ title: '保存异常', icon: 'none' })
  1070. })
  1071. },
  1072. /** 从 blocks 中过滤掉"食物推荐/饮食推荐"块(报告详情不展示饮食推荐) */
  1073. stripFoodBlocks: function(blocks) {
  1074. var list = blocks || []
  1075. var result = []
  1076. for (var i = 0; i < list.length; i++) {
  1077. var b = list[i]
  1078. var t = (b && b.title) || ''
  1079. if (t.indexOf('食物推荐') >= 0 || t.indexOf('饮食推荐') >= 0) continue
  1080. result.push(b)
  1081. }
  1082. return result
  1083. },
  1084. /** 从 payload 数据自动组装展示块(后端无 blocks 时使用) */
  1085. assembleBlocksFromPayload: function() {
  1086. var blocks = []
  1087. var p = this.payload
  1088. if (!p) return blocks
  1089. // 1. 评分圆环块(北京/谷禾报告评分体系不同:北京用 GMHI 指数,谷禾用健康总分)
  1090. var scoreItems = []
  1091. var isBeijing = p.reportFormat === 'beijing'
  1092. if (p.summary) {
  1093. if (isBeijing) {
  1094. // 北京菌群报告:GMHI 肠道微生物健康指数为主评分
  1095. this._addScoreItem(scoreItems, 'GMHI 肠道微生物健康指数', p.summary.overallScore != null ? p.summary.overallScore : p.summary.gmhiIndex)
  1096. this._addScoreItem(scoreItems, '菌群健康', p.summary.gutHealthScore)
  1097. if (p.summary.gutBalanceScore != null) { this._addSubScore(scoreItems, '菌群健康', '平衡', p.summary.gutBalanceScore) }
  1098. if (p.summary.gutDiversityScore != null) { this._addSubScore(scoreItems, '菌群健康', '多样性', p.summary.gutDiversityScore) }
  1099. if (p.summary.beneficialBacteriaScore != null) { this._addSubScore(scoreItems, '菌群健康', '有益菌', p.summary.beneficialBacteriaScore) }
  1100. if (p.summary.coreSpeciesScore != null) { this._addSubScore(scoreItems, '菌群健康', '核心菌属', p.summary.coreSpeciesScore) }
  1101. } else {
  1102. // 谷禾/其它报告:健康总分 + 细分维度
  1103. this._addScoreItem(scoreItems, '综合', p.summary.overallScore)
  1104. this._addScoreItem(scoreItems, '菌群健康', p.summary.gutHealthScore)
  1105. this._addScoreItem(scoreItems, '慢病控制', p.summary.chronicDiseaseScore)
  1106. // 子项
  1107. if (p.summary.nutritionScore != null) { this._addSubScore(scoreItems, '综合', '营养均衡', p.summary.nutritionScore) }
  1108. if (p.summary.gutBalanceScore != null) { this._addSubScore(scoreItems, '菌群健康', '平衡', p.summary.gutBalanceScore) }
  1109. if (p.summary.gutDiversityScore != null) { this._addSubScore(scoreItems, '菌群健康', '多样性', p.summary.gutDiversityScore) }
  1110. if (p.summary.beneficialBacteriaScore != null) { this._addSubScore(scoreItems, '菌群健康', '有益菌', p.summary.beneficialBacteriaScore) }
  1111. if (p.summary.harmfulBacteriaScore != null) { this._addSubScore(scoreItems, '菌群健康', '有害菌', p.summary.harmfulBacteriaScore) }
  1112. if (p.summary.coreSpeciesScore != null) { this._addSubScore(scoreItems, '菌群健康', '核心菌属', p.summary.coreSpeciesScore) }
  1113. }
  1114. // 肠道年龄/肠型(两种格式均有或部分有)
  1115. if (p.summary.gutAge) { this._addScoreItem(scoreItems, '肠道年龄', p.summary.gutAge) }
  1116. if (p.summary.gutType) { this._addScoreItem(scoreItems, '肠型', p.summary.gutType) }
  1117. }
  1118. if (scoreItems.length > 0) {
  1119. blocks.push({ type: 'score', title: isBeijing ? '肠道微生物健康指数' : '健康评分', items: scoreItems })
  1120. }
  1121. // 2. 疾病风险分组块
  1122. var risks = p.diseaseRisks || []
  1123. if (risks.length > 0) {
  1124. var important = []
  1125. var normal = []
  1126. for (var ri = 0; ri < risks.length; ri++) {
  1127. var r = risks[ri]
  1128. var level = r.riskLevel || ''
  1129. var item = { name: r.diseaseName || '', value: r.riskValue || '', level: level }
  1130. if (level === '需注意' || level === '注意' || level === '高风险' || level === '异常') {
  1131. important.push(item)
  1132. } else {
  1133. normal.push(item)
  1134. }
  1135. }
  1136. if (important.length > 0) blocks.push({ type: 'risk_group', title: '重要风险', items: important })
  1137. if (normal.length > 0) blocks.push({ type: 'risk_group', title: '其它风险', items: normal })
  1138. }
  1139. // 3. 指标分组块
  1140. var inds = p.indicators || []
  1141. if (inds.length > 0) {
  1142. var byCat = {}
  1143. var byCatAbnormal = {}
  1144. for (var ii = 0; ii < inds.length; ii++) {
  1145. var ind = inds[ii]
  1146. var cat = ind.category || '其他指标'
  1147. if (!byCat[cat]) byCat[cat] = []
  1148. if (byCatAbnormal[cat] === undefined) byCatAbnormal[cat] = 0
  1149. byCat[cat].push({
  1150. name: ind.indicatorName || ind.name || '',
  1151. value: ind.indicatorValue || ind.value || '',
  1152. unit: ind.unit || '',
  1153. refRange: ind.refRange || '',
  1154. status: ind.status || ''
  1155. })
  1156. if (this.isAbnormalStatus(ind.status)) byCatAbnormal[cat]++
  1157. }
  1158. var catKeys = Object.keys(byCat)
  1159. for (var ck = 0; ck < catKeys.length; ck++) {
  1160. blocks.push({
  1161. type: 'indicator',
  1162. title: catKeys[ck],
  1163. items: byCat[catKeys[ck]],
  1164. abnormalCount: byCatAbnormal[catKeys[ck]] || 0
  1165. })
  1166. }
  1167. }
  1168. // 4. 菌种列表块
  1169. var floraItems = []
  1170. // 肠道菌群
  1171. var gf = p.gutFlora || []
  1172. for (var fi = 0; fi < gf.length; fi++) {
  1173. var f = gf[fi]
  1174. floraItems.push({
  1175. name: f.name || f.bacteriaName || '',
  1176. value: f.abundance != null ? f.abundance : (f.bacteriaValue || ''),
  1177. range: f.normalRange || '',
  1178. status: f.populationLevel || f.level || f.status || ''
  1179. })
  1180. }
  1181. // 病原菌
  1182. var pg = p.pathogenGenus || []
  1183. for (var pi = 0; pi < pg.length; pi++) {
  1184. var pgi = pg[pi]
  1185. floraItems.push({
  1186. name: pgi.name || pgi.bacteriaName || '',
  1187. value: pgi.abundance != null ? pgi.abundance : (pgi.bacteriaValue || ''),
  1188. range: pgi.normalRange || '',
  1189. status: pgi.populationLevel || pgi.level || pgi.status || ''
  1190. })
  1191. }
  1192. var pd = p.pathogenDetection || []
  1193. for (var pdi = 0; pdi < pd.length; pdi++) {
  1194. var pdiItem = pd[pdi]
  1195. floraItems.push({
  1196. name: pdiItem.name || pdiItem.bacteriaName || '',
  1197. value: pdiItem.abundance != null ? pdiItem.abundance : (pdiItem.bacteriaValue || ''),
  1198. range: pdiItem.normalRange || '',
  1199. status: pdiItem.populationLevel || pdiItem.level || pdiItem.status || ''
  1200. })
  1201. }
  1202. if (floraItems.length > 0) {
  1203. blocks.push({
  1204. type: 'list', title: '菌种详情',
  1205. columns: [{ key: 'name', label: '菌种' }, { key: 'value', label: '数值' }, { key: 'range', label: '正常范围' }, { key: 'status', label: '状态' }],
  1206. items: floraItems
  1207. })
  1208. }
  1209. // 5. 益生菌种列表
  1210. var ps = p.probioticSpecies || []
  1211. if (ps.length > 0) {
  1212. var psItems = []
  1213. for (var psi = 0; psi < ps.length; psi++) {
  1214. var psiItem = ps[psi]
  1215. psItems.push({
  1216. name: psiItem.name || psiItem.bacteriaName || '',
  1217. value: psiItem.abundance != null ? psiItem.abundance : (psiItem.bacteriaValue || ''),
  1218. range: psiItem.normalRange || '',
  1219. status: psiItem.populationLevel || psiItem.level || psiItem.status || ''
  1220. })
  1221. }
  1222. blocks.push({
  1223. type: 'list', title: '益生菌种',
  1224. columns: [{ key: 'name', label: '菌种' }, { key: 'value', label: '数值' }, { key: 'range', label: '正常范围' }, { key: 'status', label: '状态' }],
  1225. items: psItems
  1226. })
  1227. }
  1228. // 6. 分类学列表(纲/目/科/属/种)
  1229. var taxLabels = [
  1230. { key: 'taxonomyClass', label: '菌纲 (Class)' },
  1231. { key: 'taxonomyOrder', label: '菌目 (Order)' },
  1232. { key: 'taxonomyFamily', label: '菌科 (Family)' },
  1233. { key: 'taxonomyGenus', label: '菌属 (Genus)' },
  1234. { key: 'taxonomySpecies', label: '菌种 (Species)' }
  1235. ]
  1236. for (var tli = 0; tli < taxLabels.length; tli++) {
  1237. var tl = taxLabels[tli]
  1238. var taxList = p[tl.key] || []
  1239. if (taxList.length > 0) {
  1240. var taxItems = []
  1241. for (var txi = 0; txi < taxList.length; txi++) {
  1242. var tx = taxList[txi]
  1243. taxItems.push({ name: tx.name || '', value: tx.abundance != null ? tx.abundance : '' })
  1244. }
  1245. blocks.push({
  1246. type: 'list', title: tl.label,
  1247. columns: [{ key: 'name', label: '名称' }, { key: 'value', label: '丰度' }],
  1248. items: taxItems
  1249. })
  1250. }
  1251. }
  1252. return blocks
  1253. },
  1254. _addScoreItem: function(items, label, value) {
  1255. if (value == null || value === '') return
  1256. items.push({ label: label, value: value, max: 100 })
  1257. },
  1258. _addSubScore: function(items, parentLabel, label, value) {
  1259. if (value == null) return
  1260. items.push({ parentLabel: parentLabel, label: label, value: value, max: 100 })
  1261. }
  1262. },
  1263. onUnload: function() {
  1264. if (this.parsingTimer) { clearInterval(this.parsingTimer); this.parsingTimer = null }
  1265. }
  1266. }
  1267. </script>
  1268. <style scoped>
  1269. .page {
  1270. min-height: 100vh;
  1271. background: #f8f8f8;
  1272. }
  1273. .content {
  1274. height: calc(100vh - 100rpx);
  1275. padding: 20rpx 30rpx;
  1276. box-sizing: border-box;
  1277. }
  1278. .report-head {
  1279. margin: 20rpx 0;
  1280. padding: 24rpx;
  1281. background: #fff;
  1282. border-radius: 16rpx;
  1283. }
  1284. .head-name {
  1285. font-size: 36rpx;
  1286. font-weight: 600;
  1287. color: #333;
  1288. }
  1289. .head-meta {
  1290. display: flex;
  1291. align-items: center;
  1292. gap: 12rpx;
  1293. margin-top: 10rpx;
  1294. }
  1295. .type-badge {
  1296. font-size: 22rpx;
  1297. color: #4a90d9;
  1298. background: #eef4ff;
  1299. padding: 4rpx 14rpx;
  1300. border-radius: 8rpx;
  1301. }
  1302. .head-date {
  1303. font-size: 24rpx;
  1304. color: #999;
  1305. }
  1306. .empty-hint {
  1307. text-align: center;
  1308. color: #999;
  1309. font-size: 26rpx;
  1310. padding: 60rpx 0;
  1311. }
  1312. .edit-btn {
  1313. margin: 30rpx 0;
  1314. display: flex;
  1315. justify-content: center;
  1316. }
  1317. .nav-edit {
  1318. background: #4a90d9;
  1319. color: #fff;
  1320. padding: 16rpx 60rpx;
  1321. border-radius: 40rpx;
  1322. font-size: 28rpx;
  1323. }
  1324. .title-count {
  1325. font-size: 24rpx;
  1326. font-weight: normal;
  1327. color: #94A3B8;
  1328. margin-left: 8rpx;
  1329. }
  1330. .title-abnormal {
  1331. font-size: 24rpx;
  1332. font-weight: normal;
  1333. color: #C62828;
  1334. }
  1335. .card-title-actions {
  1336. margin-left: auto;
  1337. display: flex;
  1338. flex-direction: row;
  1339. gap: 16rpx;
  1340. }
  1341. .expand-all-btn {
  1342. font-size: 22rpx;
  1343. color: #5B9BD5;
  1344. padding: 4rpx 12rpx;
  1345. border: 2rpx solid #5B9BD5;
  1346. border-radius: 20rpx;
  1347. }
  1348. .expand-all-btn:active { opacity: 0.7; }
  1349. /* 卡片折叠标题(肠道菌群/疾病风险/益生菌种/分类组成/病原菌) */
  1350. .card-title.collapsible-title {
  1351. display: flex;
  1352. flex-direction: row;
  1353. align-items: center;
  1354. justify-content: space-between;
  1355. cursor: pointer;
  1356. user-select: none;
  1357. }
  1358. .card-title.collapsible-title:active { opacity: 0.7; }
  1359. .collapse-arrow {
  1360. font-size: 30rpx;
  1361. color: #94A3B8;
  1362. margin-left: 12rpx;
  1363. transform: rotate(0deg);
  1364. transition: transform 0.2s ease;
  1365. flex-shrink: 0;
  1366. }
  1367. .collapse-arrow.arrow-open {
  1368. transform: rotate(90deg);
  1369. }
  1370. /* ===== 鎸囨爣鍒嗙粍鎶樺彔 ===== */
  1371. .indicator-group {
  1372. border: 2rpx solid #E8EDF2;
  1373. border-radius: 12rpx;
  1374. margin-bottom: 12rpx;
  1375. overflow: hidden;
  1376. }
  1377. .indicator-group-header {
  1378. display: flex;
  1379. flex-direction: row;
  1380. align-items: center;
  1381. justify-content: space-between;
  1382. padding: 20rpx 16rpx;
  1383. background: #F1F5F9;
  1384. }
  1385. .indicator-group-header:active { opacity: 0.8; }
  1386. .indicator-group-header-left {
  1387. display: flex;
  1388. flex-direction: row;
  1389. align-items: center;
  1390. flex: 1;
  1391. min-width: 0;
  1392. }
  1393. .indicator-group-arrow {
  1394. font-size: 30rpx;
  1395. color: #94A3B8;
  1396. margin-right: 12rpx;
  1397. transform: rotate(0deg);
  1398. transition: transform 0.2s ease;
  1399. flex-shrink: 0;
  1400. }
  1401. .indicator-group-arrow.arrow-open {
  1402. transform: rotate(90deg);
  1403. }
  1404. .indicator-group-name {
  1405. font-size: 26rpx;
  1406. color: #333;
  1407. font-weight: 600;
  1408. flex: 1;
  1409. min-width: 0;
  1410. white-space: nowrap;
  1411. overflow: hidden;
  1412. text-overflow: ellipsis;
  1413. }
  1414. .indicator-group-header-right {
  1415. display: flex;
  1416. flex-direction: row;
  1417. align-items: center;
  1418. gap: 12rpx;
  1419. flex-shrink: 0;
  1420. margin-left: 12rpx;
  1421. }
  1422. .indicator-group-need {
  1423. font-size: 20rpx;
  1424. color: #E65100;
  1425. background: #FFF3E0;
  1426. padding: 4rpx 12rpx;
  1427. border-radius: 20rpx;
  1428. font-weight: 500;
  1429. }
  1430. .indicator-group-count {
  1431. font-size: 22rpx;
  1432. color: #94A3B8;
  1433. }
  1434. .indicator-group-abnormal {
  1435. font-size: 22rpx;
  1436. color: #C62828;
  1437. font-weight: 500;
  1438. margin-right: 8rpx;
  1439. }
  1440. .indicator-group-body {
  1441. padding: 16rpx;
  1442. }
  1443. .field-row {
  1444. display: flex;
  1445. flex-direction: row;
  1446. align-items: center;
  1447. margin-bottom: 16rpx;
  1448. }
  1449. .field-label {
  1450. font-size: 26rpx;
  1451. color: #666;
  1452. width: 160rpx;
  1453. flex-shrink: 0;
  1454. }
  1455. .field-value {
  1456. font-size: 26rpx;
  1457. color: #333;
  1458. font-weight: 500;
  1459. flex: 1;
  1460. }
  1461. .field-value.binding-required {
  1462. color: #E65100;
  1463. }
  1464. .member-select-row {
  1465. cursor: pointer;
  1466. }
  1467. .member-select-row:active {
  1468. opacity: 0.7;
  1469. }
  1470. .member-select-arrow {
  1471. font-size: 24rpx;
  1472. color: #5B9BD5;
  1473. margin-left: 12rpx;
  1474. flex-shrink: 0;
  1475. }
  1476. .member-panel {
  1477. background: #F8FAFB;
  1478. border-radius: 12rpx;
  1479. padding: 16rpx;
  1480. margin: 8rpx 0 16rpx;
  1481. }
  1482. .auto-create-inline {
  1483. margin-top: 16rpx;
  1484. padding-top: 16rpx;
  1485. border-top: 2rpx solid #E3F2FD;
  1486. }
  1487. .field-input {
  1488. flex: 1;
  1489. font-size: 26rpx;
  1490. color: #333;
  1491. padding: 8rpx 16rpx;
  1492. background: #F5F7FA;
  1493. border-radius: 8rpx;
  1494. }
  1495. .field-textarea {
  1496. width: 100%;
  1497. min-height: 120rpx;
  1498. font-size: 26rpx;
  1499. color: #333;
  1500. padding: 16rpx;
  1501. background: #F5F7FA;
  1502. border-radius: 12rpx;
  1503. box-sizing: border-box;
  1504. margin-top: 8rpx;
  1505. }
  1506. .member-list {
  1507. display: flex;
  1508. flex-direction: row;
  1509. flex-wrap: wrap;
  1510. gap: 16rpx;
  1511. }
  1512. .member-list-hint {
  1513. width: 100%;
  1514. font-size: 24rpx;
  1515. color: #999;
  1516. margin-bottom: 8rpx;
  1517. }
  1518. .member-item {
  1519. display: flex;
  1520. flex-direction: column;
  1521. align-items: center;
  1522. padding: 20rpx 24rpx;
  1523. background: #F5F7FA;
  1524. border-radius: 16rpx;
  1525. border: 2rpx solid transparent;
  1526. min-width: 120rpx;
  1527. }
  1528. .member-selected {
  1529. background: #E3F2FD;
  1530. border-color: #5B9BD5;
  1531. }
  1532. .member-avatar {
  1533. width: 64rpx;
  1534. height: 64rpx;
  1535. border-radius: 50%;
  1536. background: #5B9BD5;
  1537. color: #fff;
  1538. font-size: 28rpx;
  1539. font-weight: bold;
  1540. text-align: center;
  1541. line-height: 64rpx;
  1542. margin-bottom: 8rpx;
  1543. }
  1544. .member-name { font-size: 24rpx; color: #333; }
  1545. .indicator-item {
  1546. background: #F8FAFB;
  1547. border-radius: 12rpx;
  1548. padding: 16rpx;
  1549. margin-bottom: 12rpx;
  1550. }
  1551. .ind-header {
  1552. display: flex;
  1553. flex-direction: row;
  1554. align-items: center;
  1555. gap: 12rpx;
  1556. }
  1557. .ind-name {
  1558. flex: 1;
  1559. font-size: 26rpx;
  1560. color: #333;
  1561. font-weight: 500;
  1562. padding: 4rpx 8rpx;
  1563. background: #fff;
  1564. border-radius: 6rpx;
  1565. }
  1566. .ind-value {
  1567. width: 160rpx;
  1568. font-size: 26rpx;
  1569. color: #1565C0;
  1570. font-weight: bold;
  1571. text-align: right;
  1572. padding: 4rpx 8rpx;
  1573. background: #fff;
  1574. border-radius: 6rpx;
  1575. }
  1576. .ind-detail {
  1577. display: flex;
  1578. flex-direction: row;
  1579. margin-top: 8rpx;
  1580. gap: 16rpx;
  1581. }
  1582. .ind-ref { font-size: 22rpx; color: #94A3B8; }
  1583. .ind-unit { font-size: 22rpx; color: #64748B; }
  1584. .ind-symptoms {
  1585. display: flex;
  1586. flex-direction: row;
  1587. align-items: center;
  1588. margin-top: 8rpx;
  1589. gap: 8rpx;
  1590. }
  1591. .ind-symptom-label { font-size: 22rpx; color: #94A3B8; flex-shrink: 0; }
  1592. .ind-symptom-input {
  1593. flex: 1;
  1594. font-size: 22rpx;
  1595. color: #333;
  1596. padding: 4rpx 8rpx;
  1597. background: #fff;
  1598. border-radius: 6rpx;
  1599. }
  1600. .status-tag {
  1601. display: inline-block;
  1602. font-size: 20rpx;
  1603. padding: 4rpx 12rpx;
  1604. border-radius: 8rpx;
  1605. font-weight: 500;
  1606. }
  1607. .status-normal { background: #E8F5E9; color: #2E7D32; }
  1608. .status-high { background: #FFF3E0; color: #E65100; }
  1609. .status-low { background: #E3F2FD; color: #1565C0; }
  1610. .status-abnormal { background: #FFEBEE; color: #C62828; }
  1611. /* ===== 鎸囨爣甯姪鎸夐挳 ===== */
  1612. .ind-help-btn {
  1613. width: 36rpx;
  1614. height: 36rpx;
  1615. border-radius: 50%;
  1616. background: #E2E8F0;
  1617. color: #64748B;
  1618. font-size: 24rpx;
  1619. font-weight: bold;
  1620. text-align: center;
  1621. line-height: 36rpx;
  1622. flex-shrink: 0;
  1623. }
  1624. .ind-help-btn:active {
  1625. background: #CBD5E1;
  1626. }
  1627. /* ===== 鎸囨爣杈撳叆妗嗛鑹茬姸鎬?===== */
  1628. .ind-name-normal, .ind-value-normal {
  1629. background: #fff;
  1630. }
  1631. .ind-name-high, .ind-value-high,
  1632. .ind-name-low, .ind-value-low,
  1633. .ind-name-abnormal, .ind-value-abnormal,
  1634. .ind-name-deficient, .ind-value-deficient,
  1635. .ind-name-insufficient, .ind-value-insufficient,
  1636. .ind-name-warning, .ind-value-warning,
  1637. .ind-name-high-risk, .ind-value-high-risk,
  1638. .ind-name-low-risk, .ind-value-low-risk,
  1639. .ind-name-not-detected, .ind-value-not-detected {
  1640. background: #FFF0F0;
  1641. color: #C62828;
  1642. }
  1643. /* ===== 鎸囨爣甯姪寮圭獥 ===== */
  1644. .help-overlay {
  1645. position: fixed;
  1646. top: 0;
  1647. left: 0;
  1648. right: 0;
  1649. bottom: 0;
  1650. background: rgba(0,0,0,0.4);
  1651. z-index: 999;
  1652. display: flex;
  1653. align-items: center;
  1654. justify-content: center;
  1655. }
  1656. .help-popup {
  1657. width: 580rpx;
  1658. max-height: 70vh;
  1659. background: #fff;
  1660. border-radius: 24rpx;
  1661. overflow: hidden;
  1662. }
  1663. .help-popup-header {
  1664. display: flex;
  1665. flex-direction: row;
  1666. align-items: center;
  1667. justify-content: space-between;
  1668. padding: 28rpx 30rpx;
  1669. border-bottom: 2rpx solid #F0F0F0;
  1670. }
  1671. .help-popup-title {
  1672. font-size: 30rpx;
  1673. font-weight: bold;
  1674. color: #333;
  1675. flex: 1;
  1676. }
  1677. .help-popup-close {
  1678. font-size: 32rpx;
  1679. color: #999;
  1680. padding: 8rpx;
  1681. }
  1682. .help-popup-body {
  1683. padding: 24rpx 30rpx;
  1684. }
  1685. .help-row {
  1686. display: flex;
  1687. flex-direction: row;
  1688. align-items: center;
  1689. margin-bottom: 16rpx;
  1690. }
  1691. .help-label {
  1692. font-size: 26rpx;
  1693. color: #94A3B8;
  1694. width: 140rpx;
  1695. flex-shrink: 0;
  1696. }
  1697. .help-value {
  1698. font-size: 28rpx;
  1699. color: #333;
  1700. font-weight: 500;
  1701. flex: 1;
  1702. }
  1703. .help-status-normal { color: #2E7D32; }
  1704. .help-status-high { color: #C62828; }
  1705. .help-status-low { color: #1565C0; }
  1706. .help-status-abnormal { color: #C62828; }
  1707. .help-desc {
  1708. margin-top: 8rpx;
  1709. padding: 20rpx;
  1710. background: #F8FAFB;
  1711. border-radius: 12rpx;
  1712. }
  1713. .help-desc-label {
  1714. display: block;
  1715. font-size: 24rpx;
  1716. color: #94A3B8;
  1717. margin-bottom: 8rpx;
  1718. }
  1719. .help-desc-text {
  1720. display: block;
  1721. font-size: 26rpx;
  1722. color: #333;
  1723. line-height: 1.6;
  1724. }
  1725. .flora-item {
  1726. display: flex;
  1727. flex-direction: row;
  1728. align-items: center;
  1729. gap: 12rpx;
  1730. padding: 12rpx 16rpx;
  1731. background: #F8FAFB;
  1732. border-radius: 10rpx;
  1733. margin-bottom: 8rpx;
  1734. }
  1735. .flora-name {
  1736. flex: 1;
  1737. font-size: 26rpx;
  1738. color: #333;
  1739. padding: 4rpx 8rpx;
  1740. background: #fff;
  1741. border-radius: 6rpx;
  1742. }
  1743. .flora-abundance {
  1744. width: 140rpx;
  1745. font-size: 26rpx;
  1746. color: #1565C0;
  1747. text-align: right;
  1748. padding: 4rpx 8rpx;
  1749. background: #fff;
  1750. border-radius: 6rpx;
  1751. }
  1752. .taxonomy-group {
  1753. margin-bottom: 16rpx;
  1754. }
  1755. .taxonomy-group:last-child {
  1756. margin-bottom: 0;
  1757. }
  1758. .taxonomy-group-label {
  1759. display: block;
  1760. font-size: 24rpx;
  1761. font-weight: 500;
  1762. color: #666;
  1763. padding: 8rpx 4rpx 6rpx;
  1764. }
  1765. .pathogen-group {
  1766. margin-bottom: 16rpx;
  1767. }
  1768. .pathogen-group:last-child {
  1769. margin-bottom: 0;
  1770. }
  1771. .pathogen-group-label {
  1772. display: block;
  1773. font-size: 24rpx;
  1774. font-weight: 500;
  1775. color: #D32F2F;
  1776. padding: 8rpx 4rpx 6rpx;
  1777. }
  1778. .risk-item {
  1779. display: flex;
  1780. flex-direction: row;
  1781. align-items: center;
  1782. gap: 12rpx;
  1783. padding: 12rpx 16rpx;
  1784. background: #F8FAFB;
  1785. border-radius: 10rpx;
  1786. margin-bottom: 8rpx;
  1787. }
  1788. .risk-name {
  1789. flex: 1;
  1790. font-size: 26rpx;
  1791. color: #333;
  1792. padding: 4rpx 8rpx;
  1793. background: #fff;
  1794. border-radius: 6rpx;
  1795. }
  1796. .risk-level {
  1797. font-size: 22rpx;
  1798. font-weight: 500;
  1799. padding: 4rpx 12rpx;
  1800. border-radius: 8rpx;
  1801. }
  1802. .risk-low { background: #E8F5E9; color: #2E7D32; }
  1803. .risk-medium, .risk-moderate { background: #FFF3E0; color: #E65100; }
  1804. .risk-high { background: #FFEBEE; color: #C62828; }
  1805. .food-item {
  1806. display: flex;
  1807. }
  1808. .action-row {
  1809. display: flex;
  1810. flex-direction: row;
  1811. gap: 20rpx;
  1812. margin-top: 10rpx;
  1813. margin-bottom: 20rpx;
  1814. }
  1815. .btn-discard {
  1816. flex: 1;
  1817. background: #fff;
  1818. border: 2rpx solid #EF4444;
  1819. color: #EF4444;
  1820. font-size: 28rpx;
  1821. font-weight: bold;
  1822. text-align: center;
  1823. padding: 24rpx;
  1824. border-radius: 16rpx;
  1825. }
  1826. .btn-discard:active { opacity: 0.7; }
  1827. .btn-confirm {
  1828. flex: 2;
  1829. background: linear-gradient(135deg, #5B9BD5, #3A7CC4);
  1830. color: #fff;
  1831. font-size: 28rpx;
  1832. font-weight: bold;
  1833. text-align: center;
  1834. padding: 24rpx;
  1835. border-radius: 16rpx;
  1836. }
  1837. .btn-confirm:active { opacity: 0.85; }
  1838. .btn-disabled { opacity: 0.5; }
  1839. .bottom-spacer { height: 80rpx; }
  1840. /* ===== Phase 2: 鍖归厤鍙俊搴?===== */
  1841. .confidence-card {
  1842. margin: 0 30rpx 20rpx;
  1843. background: #fff;
  1844. border-radius: 16rpx;
  1845. padding: 24rpx;
  1846. box-shadow: 0 2rpx 6rpx rgba(0,0,0,0.04);
  1847. }
  1848. .confidence-header {
  1849. display: flex;
  1850. flex-direction: row;
  1851. align-items: center;
  1852. justify-content: space-between;
  1853. margin-bottom: 16rpx;
  1854. }
  1855. .confidence-label {
  1856. font-size: 26rpx;
  1857. color: #333;
  1858. font-weight: 500;
  1859. }
  1860. .confidence-badge {
  1861. font-size: 22rpx;
  1862. font-weight: bold;
  1863. padding: 4rpx 16rpx;
  1864. border-radius: 20rpx;
  1865. }
  1866. .badge-high { background: #E8F5E9; color: #2E7D32; }
  1867. .badge-medium { background: #FFF8E1; color: #F57F17; }
  1868. .badge-low { background: #FFF3E0; color: #E65100; }
  1869. .badge-none { background: #FFEBEE; color: #C62828; }
  1870. .confidence-bar-track {
  1871. height: 12rpx;
  1872. background: #E2E8F0;
  1873. border-radius: 6rpx;
  1874. overflow: hidden;
  1875. margin-bottom: 12rpx;
  1876. }
  1877. .confidence-bar-fill {
  1878. height: 100%;
  1879. border-radius: 6rpx;
  1880. transition: width 0.3s ease;
  1881. }
  1882. .fill-high { background: linear-gradient(90deg, #66BB6A, #43A047); }
  1883. .fill-medium { background: linear-gradient(90deg, #FFD54F, #FFC107); }
  1884. .fill-low { background: linear-gradient(90deg, #FF8A65, #FF5722); }
  1885. .fill-none { background: linear-gradient(90deg, #EF9A9A, #E53935); }
  1886. .confidence-desc {
  1887. font-size: 22rpx;
  1888. color: #94A3B8;
  1889. line-height: 1.4;
  1890. }
  1891. /* ===== Phase 2: 鍊欓€夋垚鍛樺垪琛?===== */
  1892. .candidate-section {
  1893. margin-bottom: 16rpx;
  1894. }
  1895. .candidate-section-hint {
  1896. display: block;
  1897. font-size: 24rpx;
  1898. color: #64748B;
  1899. margin-bottom: 12rpx;
  1900. }
  1901. .candidate-item {
  1902. display: flex;
  1903. flex-direction: row;
  1904. align-items: center;
  1905. justify-content: space-between;
  1906. padding: 16rpx;
  1907. background: #F8FAFB;
  1908. border-radius: 12rpx;
  1909. margin-bottom: 10rpx;
  1910. border: 2rpx solid transparent;
  1911. }
  1912. .candidate-item:active { opacity: 0.8; }
  1913. .candidate-selected {
  1914. background: #E3F2FD;
  1915. border-color: #5B9BD5;
  1916. }
  1917. .candidate-left {
  1918. display: flex;
  1919. flex-direction: row;
  1920. align-items: center;
  1921. flex: 1;
  1922. min-width: 0;
  1923. }
  1924. .candidate-avatar {
  1925. width: 56rpx;
  1926. height: 56rpx;
  1927. border-radius: 50%;
  1928. background: #5B9BD5;
  1929. color: #fff;
  1930. font-size: 24rpx;
  1931. font-weight: bold;
  1932. text-align: center;
  1933. line-height: 56rpx;
  1934. margin-right: 16rpx;
  1935. flex-shrink: 0;
  1936. }
  1937. .candidate-info {
  1938. flex: 1;
  1939. min-width: 0;
  1940. }
  1941. .candidate-name {
  1942. font-size: 26rpx;
  1943. color: #333;
  1944. font-weight: 500;
  1945. display: block;
  1946. }
  1947. .candidate-detail {
  1948. font-size: 22rpx;
  1949. color: #94A3B8;
  1950. display: block;
  1951. }
  1952. .candidate-fields {
  1953. font-size: 20rpx;
  1954. color: #5B9BD5;
  1955. display: block;
  1956. margin-top: 2rpx;
  1957. }
  1958. .candidate-right {
  1959. display: flex;
  1960. flex-direction: row;
  1961. align-items: center;
  1962. gap: 12rpx;
  1963. flex-shrink: 0;
  1964. margin-left: 16rpx;
  1965. }
  1966. .score-bar-track {
  1967. width: 80rpx;
  1968. height: 10rpx;
  1969. background: #E2E8F0;
  1970. border-radius: 5rpx;
  1971. overflow: hidden;
  1972. }
  1973. .score-bar-fill {
  1974. height: 100%;
  1975. background: linear-gradient(90deg, #5B9BD5, #3A7CC4);
  1976. border-radius: 5rpx;
  1977. }
  1978. .score-text {
  1979. font-size: 24rpx;
  1980. color: #1565C0;
  1981. font-weight: bold;
  1982. min-width: 48rpx;
  1983. text-align: right;
  1984. }
  1985. /* ===== Phase 2: 鏂板缓鎴愬憳鍏ュ彛 ===== */
  1986. .create-member-entry {
  1987. display: flex;
  1988. flex-direction: row;
  1989. align-items: center;
  1990. justify-content: center;
  1991. padding: 20rpx;
  1992. border: 2rpx dashed #CBD5E1;
  1993. border-radius: 12rpx;
  1994. margin-top: 8rpx;
  1995. }
  1996. .create-member-entry:active { background: #F1F5F9; }
  1997. .create-member-icon {
  1998. font-size: 28rpx;
  1999. color: #5B9BD5;
  2000. font-weight: bold;
  2001. margin-right: 8rpx;
  2002. }
  2003. .create-member-text {
  2004. font-size: 24rpx;
  2005. color: #5B9BD5;
  2006. }
  2007. /* ===== Phase 2: 鏂板缓鎴愬憳琛ㄥ崟锛堥潰鏉垮唴宓岋級 ===== */
  2008. .form-item {
  2009. display: flex;
  2010. flex-direction: row;
  2011. align-items: center;
  2012. margin-bottom: 20rpx;
  2013. }
  2014. .form-item-label {
  2015. font-size: 26rpx;
  2016. color: #333;
  2017. width: 100rpx;
  2018. flex-shrink: 0;
  2019. }
  2020. .form-item-input {
  2021. flex: 1;
  2022. font-size: 26rpx;
  2023. color: #333;
  2024. padding: 12rpx 16rpx;
  2025. background: #F5F7FA;
  2026. border-radius: 10rpx;
  2027. }
  2028. .gender-selector {
  2029. display: flex;
  2030. flex-direction: row;
  2031. gap: 16rpx;
  2032. }
  2033. .gender-option {
  2034. font-size: 26rpx;
  2035. color: #333;
  2036. padding: 12rpx 32rpx;
  2037. background: #F5F7FA;
  2038. border-radius: 10rpx;
  2039. border: 2rpx solid transparent;
  2040. }
  2041. .gender-option:active { opacity: 0.7; }
  2042. .gender-selected {
  2043. background: #E3F2FD;
  2044. border-color: #5B9BD5;
  2045. color: #1565C0;
  2046. }
  2047. .btn-create-submit {
  2048. background: linear-gradient(135deg, #5B9BD5, #3A7CC4);
  2049. color: #fff;
  2050. font-size: 28rpx;
  2051. font-weight: bold;
  2052. text-align: center;
  2053. padding: 22rpx;
  2054. border-radius: 14rpx;
  2055. margin-top: 10rpx;
  2056. }
  2057. .btn-create-submit:active { opacity: 0.85; }
  2058. /* ===== 鑸岃瘖鎸囨爣 ===== */
  2059. .tongue-indicator-grid {
  2060. display: flex;
  2061. flex-direction: row;
  2062. flex-wrap: wrap;
  2063. gap: 12rpx;
  2064. }
  2065. .tongue-ind-item {
  2066. width: calc(50% - 6rpx);
  2067. background: #F8FAFC;
  2068. border-radius: 16rpx;
  2069. padding: 20rpx 24rpx;
  2070. box-sizing: border-box;
  2071. }
  2072. .tongue-ind-label {
  2073. display: block;
  2074. font-size: 24rpx;
  2075. color: #94A3B8;
  2076. margin-bottom: 8rpx;
  2077. }
  2078. .tongue-ind-value {
  2079. display: block;
  2080. font-size: 28rpx;
  2081. color: #1E293B;
  2082. font-weight: 500;
  2083. }
  2084. .tongue-summary {
  2085. margin-top: 20rpx;
  2086. padding: 20rpx 24rpx;
  2087. background: #FFF8E1;
  2088. border-radius: 16rpx;
  2089. }
  2090. .tongue-summary-title {
  2091. font-size: 24rpx;
  2092. color: #F59E0B;
  2093. font-weight: 600;
  2094. display: block;
  2095. margin-bottom: 8rpx;
  2096. }
  2097. .tongue-summary-text {
  2098. font-size: 26rpx;
  2099. color: #333;
  2100. line-height: 1.6;
  2101. }
  2102. .tip-banner,
  2103. .parsing-banner,
  2104. .confidence-card {
  2105. margin-left: 0;
  2106. margin-right: 0;
  2107. }
  2108. .form-section {
  2109. margin-left: 0;
  2110. margin-right: 0;
  2111. }
  2112. /* 解析中 banner */
  2113. .parsing-banner {
  2114. display: flex;
  2115. align-items: center;
  2116. background: linear-gradient(135deg, #FFF7ED, #FFF0E0);
  2117. border: 1rpx solid #FFD4A8;
  2118. border-radius: 20rpx;
  2119. padding: 28rpx 32rpx;
  2120. margin-bottom: 20rpx;
  2121. }
  2122. .parsing-spinner {
  2123. width: 48rpx;
  2124. height: 48rpx;
  2125. border: 4rpx solid #FFD4A8;
  2126. border-top-color: #FF8C42;
  2127. border-radius: 50%;
  2128. flex-shrink: 0;
  2129. animation: parsing-spin 0.8s linear infinite;
  2130. }
  2131. @keyframes parsing-spin {
  2132. to { transform: rotate(360deg); }
  2133. }
  2134. .parsing-content {
  2135. display: flex;
  2136. flex-direction: column;
  2137. margin-left: 20rpx;
  2138. flex: 1;
  2139. }
  2140. .parsing-main-text {
  2141. font-size: 28rpx;
  2142. font-weight: 600;
  2143. color: #D97706;
  2144. line-height: 1.5;
  2145. }
  2146. .parsing-sub-text {
  2147. font-size: 24rpx;
  2148. color: #92400E;
  2149. line-height: 1.5;
  2150. margin-top: 6rpx;
  2151. opacity: 0.8;
  2152. }
  2153. /* ===== 报告反馈入口 ===== */
  2154. .feedback-entry {
  2155. position: fixed;
  2156. right: 30rpx;
  2157. bottom: 60rpx;
  2158. display: flex;
  2159. flex-direction: row;
  2160. align-items: center;
  2161. background: linear-gradient(135deg, #5B9BD5, #3B82F6);
  2162. border-radius: 44rpx;
  2163. padding: 18rpx 30rpx;
  2164. box-shadow: 0 4rpx 16rpx rgba(59, 130, 246, 0.4);
  2165. z-index: 90;
  2166. }
  2167. .feedback-entry-icon { font-size: 32rpx; margin-right: 10rpx; }
  2168. .feedback-entry-text { font-size: 28rpx; color: #fff; font-weight: 500; }
  2169. .feedback-entry-arrow { font-size: 30rpx; color: #fff; margin-left: 6rpx; }
  2170. .feedback-entry:active { opacity: 0.85; }
  2171. </style>