graphics.vue 61 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023
  1. <template>
  2. <div class="table_wrap">
  3. <div
  4. :key="'comKey' + comKey"
  5. class="container"
  6. :style="{
  7. marginTop: containerStyle.marginTop,
  8. }"
  9. >
  10. <svg width="100%" height="100%"></svg>
  11. </div>
  12. <table class="temperatureChart">
  13. <caption>
  14. <p style="font-size: 20px; font-weight: bold">
  15. {{ env.VITE_HOSPITAL_NAME }}
  16. </p>
  17. <p style="font-size: 20px; font-weight: bold">体温单</p>
  18. <p style="position: relative; text-align: left">
  19. <span class="tbale-label">&nbsp;&nbsp;姓名:</span
  20. ><span style="display: inline-block; width: 75px; text-align: left">{{
  21. info.name
  22. }}</span>
  23. <span class="tbale-label">年龄:</span>
  24. <span style="display: inline-block; width: 60px; text-align: left">{{
  25. info.age + "岁"
  26. }}</span>
  27. <span class="tbale-label">性别:</span>
  28. <span style="display: inline-block; width: 60px; text-align: left">{{
  29. info.sexName
  30. }}</span>
  31. <span class="tbale-label">入院日期:</span>
  32. <span style="display: inline-block; width: 100px; text-align: left">{{
  33. info.admissDate
  34. }}</span>
  35. <span class="tbale-label">科室:</span>
  36. <span style="display: inline-block; width: 65px; text-align: left">{{
  37. info.admissWardName
  38. }}</span>
  39. <span class="tbale-label">床号:</span>
  40. <span style="display: inline-block; width: 60px; text-align: left">{{
  41. info.bedNo
  42. }}</span>
  43. <span class="tbale-label">住院号:</span>
  44. <span style="display: inline-block; width: 100px; text-align: left">{{
  45. info.inpatientNo
  46. }}</span>
  47. </p>
  48. </caption>
  49. <thead></thead>
  50. <tbody>
  51. <tr>
  52. <td
  53. ref="topTd"
  54. :colspan="index === 0 ? 8 : 6"
  55. :class="[index && 'redLineTd', !index && 'table-just']"
  56. v-for="(item, index) in inHospitalTime"
  57. :key="index + '|indays'"
  58. >
  59. {{
  60. index === 0
  61. ? "日&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;期"
  62. : item
  63. }}
  64. </td>
  65. </tr>
  66. <tr>
  67. <td
  68. :colspan="index === 0 ? 8 : 6"
  69. :class="[index && 'redLineTd', !index && 'table-just']"
  70. v-for="(item, index) in inHospitalDays"
  71. :key="index + '|inHospitalDays'"
  72. >
  73. {{ index === 0 ? "住院天数" : item }}
  74. </td>
  75. </tr>
  76. <tr>
  77. <td
  78. :colspan="index === 0 ? 8 : 6"
  79. :class="[index && 'redLineTd', !index && 'table-just']"
  80. v-for="(item, index) in surgeryDays"
  81. :key="index + '|surgeryDays'"
  82. >
  83. {{ index === 0 ? "手术后天数" : item }}
  84. </td>
  85. </tr>
  86. <tr>
  87. <td class="table-just" rowspan="2" colspan="8">
  88. 时&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;间
  89. </td>
  90. </tr>
  91. <!-- 已屏蔽,保留以备后用 - 旧的时间显示代码 -->
  92. <tr>
  93. <!-- <td class="focusText">3</td>
  94. <td>7</td>
  95. <td>11</td>
  96. <td>15</td>
  97. <td class="focusText">19</td>
  98. <td class="focusText redLineTd">23</td>
  99. <td class="focusText">3</td>
  100. <td>7</td>
  101. <td>11</td>
  102. <td>15</td>
  103. <td class="focusText">19</td>
  104. <td class="focusText redLineTd">23</td>
  105. <td class="focusText">3</td>
  106. <td>7</td>
  107. <td>11</td>
  108. <td>15</td>
  109. <td class="focusText">19</td>
  110. <td class="focusText redLineTd">23</td>
  111. <td class="focusText">3</td>
  112. <td>7</td>
  113. <td>11</td>
  114. <td>15</td>
  115. <td class="focusText">19</td>
  116. <td class="focusText redLineTd">23</td>
  117. <td class="focusText">3</td>
  118. <td>7</td>
  119. <td>11</td>
  120. <td>15</td>
  121. <td class="focusText">19</td>
  122. <td class="focusText redLineTd">23</td>
  123. <td class="focusText">3</td>
  124. <td>7</td>
  125. <td>11</td>
  126. <td>15</td>
  127. <td class="focusText">19</td>
  128. <td class="focusText redLineTd">23</td>
  129. <td class="focusText">3</td>
  130. <td>7</td>
  131. <td>11</td>
  132. <td>15</td>
  133. <td class="focusText">19</td>
  134. <td class="focusText">23</td> -->
  135. <td class="focusText">2</td>
  136. <td>6</td>
  137. <td>10</td>
  138. <td>14</td>
  139. <td class="focusText">18</td>
  140. <td class="focusText redLineTd">22</td>
  141. <td class="focusText">2</td>
  142. <td>6</td>
  143. <td>10</td>
  144. <td>14</td>
  145. <td class="focusText">18</td>
  146. <td class="focusText redLineTd">22</td>
  147. <td class="focusText">2</td>
  148. <td>6</td>
  149. <td>10</td>
  150. <td>14</td>
  151. <td class="focusText">18</td>
  152. <td class="focusText redLineTd">22</td>
  153. <td class="focusText">2</td>
  154. <td>6</td>
  155. <td>10</td>
  156. <td>14</td>
  157. <td class="focusText">18</td>
  158. <td class="focusText redLineTd">22</td>
  159. <td class="focusText">2</td>
  160. <td>6</td>
  161. <td>10</td>
  162. <td>14</td>
  163. <td class="focusText">18</td>
  164. <td class="focusText redLineTd">22</td>
  165. <td class="focusText">2</td>
  166. <td>6</td>
  167. <td>10</td>
  168. <td>14</td>
  169. <td class="focusText">18</td>
  170. <td class="focusText redLineTd">22</td>
  171. <td class="focusText">2</td>
  172. <td>6</td>
  173. <td>10</td>
  174. <td>14</td>
  175. <td class="focusText">18</td>
  176. <td class="focusText">22</td>
  177. </tr>
  178. <!-- <record></record> -->
  179. <tr class="recorde temperature_mark">
  180. <td colspan="2" rowspan="45" style="border-right: 1px solid white">
  181. <div :style="{ marginTop: legendStyle.marginTop, height: '31px' }">
  182. <p style="width: 35px">
  183. <span>口表•</span>
  184. <span style="color: blue">腋表x</span>
  185. <span>肛表o</span>
  186. <span style="color: red">脉搏•</span>
  187. <span style="color: red">心率o</span>
  188. </p>
  189. <p></p>
  190. </div>
  191. </td>
  192. <td colspan="3" rowspan="45">
  193. <div style="color: red" class="num_wrapper">
  194. <p :style="{ marginTop: pulseScaleStyle.titleMarginTop, textAlign: 'right' }">脉搏次/分</p>
  195. <p :style="{ marginTop: pulseScaleStyle.firstRowMarginTop }">180</p>
  196. <p :style="{ marginTop: pulseScaleStyle.normalRowMarginTop }">160</p>
  197. <p :style="{ marginTop: pulseScaleStyle.normalRowMarginTop }">140</p>
  198. <p :style="{ marginTop: pulseScaleStyle.normalRowMarginTop }">120</p>
  199. <p :style="{ marginTop: pulseScaleStyle.normalRowMarginTop }">100</p>
  200. <p :style="{ marginTop: pulseScaleStyle.normalRowMarginTop }">80</p>
  201. <p :style="{ marginTop: pulseScaleStyle.lastRowMarginTop }">60</p>
  202. <p :style="{ marginTop: pulseScaleStyle.lastRowMarginTop }">40</p>
  203. </div>
  204. </td>
  205. <td colspan="3" rowspan="45">
  206. <div style="color: blue" class="num_wrapper">
  207. <p :style="{ marginTop: temperatureScaleStyle.titleMarginTop }">体温<br />x</p>
  208. <p :style="{ marginTop: temperatureScaleStyle.firstRowMarginTop }">41</p>
  209. <p :style="{ marginTop: temperatureScaleStyle.normalRowMarginTop }">40</p>
  210. <p :style="{ marginTop: temperatureScaleStyle.normalRowMarginTop }">39</p>
  211. <p :style="{ marginTop: temperatureScaleStyle.normalRowMarginTop }">38</p>
  212. <p :style="{ marginTop: temperatureScaleStyle.normalRowMarginTop }">37</p>
  213. <p :style="{ marginTop: temperatureScaleStyle.normalRowMarginTop }">36</p>
  214. <p :style="{ marginTop: temperatureScaleStyle.lastRowMarginTop }">35</p>
  215. <p :style="{ marginTop: temperatureScaleStyle.lastRowMarginTop }">34</p>
  216. </div>
  217. </td>
  218. <td
  219. v-for="(item, y) in tdList"
  220. :key="y + 'td0'"
  221. :class="[y % 6 === 5 && y != tdList.length && 'redLineTd']"
  222. >
  223. <div class="recorde-text" :style="recordeTextStyle">{{ getSymbolTextArr(y) }}</div>
  224. </td>
  225. </tr>
  226. <tr
  227. class="recorde"
  228. v-for="(tr, index) in [0, 0, 0]"
  229. :key="index + 'tr1'"
  230. >
  231. <td
  232. v-for="(item, y) in tdList"
  233. :key="y + 'td1'"
  234. :class="[y % 6 === 5 && y != tdList.length && 'redLineTd']"
  235. ></td>
  236. </tr>
  237. <tr class="recorde">
  238. <template v-for="(item, index) of tdList">
  239. <td
  240. :key="index + 'td2'"
  241. v-if="index % 6 === 5 && index != tdList.length"
  242. style="
  243. border-right: 1px solid #ff6e71;
  244. border-bottom: 1px solid #7e7eff;
  245. "
  246. ></td>
  247. <td
  248. :key="index + 'td2'"
  249. v-else
  250. style="border-bottom: 1px solid #7e7eff"
  251. ></td>
  252. </template>
  253. </tr>
  254. <tr
  255. class="recorde"
  256. v-for="(tr, index) in [0, 0, 0, 0]"
  257. :key="index + 'tr2'"
  258. >
  259. <td
  260. v-for="(item, y) in tdList"
  261. :key="y + 'td3'"
  262. :class="[y % 6 === 5 && y != tdList.length && 'redLineTd']"
  263. ></td>
  264. </tr>
  265. <tr class="recorde">
  266. <template v-for="(item, index) of tdList">
  267. <td
  268. :key="index + 'td4'"
  269. v-if="index % 6 === 5 && index != tdList.length"
  270. style="
  271. border-right: 1px solid #ff6e71;
  272. border-bottom: 1px solid #7e7eff;
  273. "
  274. ></td>
  275. <td
  276. :key="index + 'td4'"
  277. v-else
  278. style="border-bottom: 1px solid #7e7eff"
  279. ></td>
  280. </template>
  281. </tr>
  282. <tr
  283. class="recorde"
  284. v-for="(tr, index) in [0, 0, 0, 0]"
  285. :key="index + 'tr3'"
  286. >
  287. <td
  288. v-for="(item, y) in tdList"
  289. :key="y + 'td5'"
  290. :class="[y % 6 === 5 && y != tdList.length && 'redLineTd']"
  291. ></td>
  292. </tr>
  293. <tr class="recorde">
  294. <template v-for="(item, index) of tdList">
  295. <td
  296. :key="index + 'td6'"
  297. v-if="index % 6 === 5 && index != tdList.length"
  298. style="
  299. border-right: 1px solid #ff6e71;
  300. border-bottom: 1px solid #7e7eff;
  301. "
  302. ></td>
  303. <td
  304. :key="index + 'td6'"
  305. v-else
  306. style="border-bottom: 1px solid #7e7eff"
  307. ></td>
  308. </template>
  309. </tr>
  310. <tr
  311. class="recorde"
  312. v-for="(tr, index) in [0, 0, 0, 0]"
  313. :key="index + 'tr4'"
  314. >
  315. <td
  316. v-for="(item, y) in tdList"
  317. :key="y + 'td7'"
  318. :class="[y % 6 === 5 && y != tdList.length && 'redLineTd']"
  319. ></td>
  320. </tr>
  321. <tr class="recorde">
  322. <template v-for="(item, index) of tdList">
  323. <td
  324. :key="index + 'td8'"
  325. v-if="index % 6 === 5 && index != tdList.length"
  326. style="
  327. border-right: 1px solid #ff6e71;
  328. border-bottom: 1px solid #7e7eff;
  329. "
  330. ></td>
  331. <td
  332. :key="index + 'td8'"
  333. v-else
  334. style="border-bottom: 1px solid #7e7eff"
  335. ></td>
  336. </template>
  337. </tr>
  338. <tr
  339. class="recorde"
  340. v-for="(tr, index) in [0, 0, 0, 0]"
  341. :key="index + 'tr5'"
  342. >
  343. <td
  344. v-for="(item, y) in tdList"
  345. :key="y + 'td9'"
  346. :class="[y % 6 === 5 && y != tdList.length && 'redLineTd']"
  347. ></td>
  348. </tr>
  349. <tr class="recorde">
  350. <template v-for="(item, index) of tdList">
  351. <td
  352. :key="index + 'td10'"
  353. v-if="index % 6 === 5 && index != tdList.length"
  354. style="
  355. border-right: 1px solid #ff6e71;
  356. border-bottom: 1px solid #ff0000;
  357. "
  358. ></td>
  359. <td
  360. :key="index + 'td10'"
  361. v-else
  362. style="border-bottom: 1px solid #ff0000"
  363. ></td>
  364. </template>
  365. </tr>
  366. <tr
  367. class="recorde"
  368. v-for="(tr, index) in [0, 0, 0, 0]"
  369. :key="index + 'tr6'"
  370. >
  371. <td
  372. v-for="(item, y) in tdList"
  373. :key="y + 'td11'"
  374. :class="[y % 6 === 5 && y != tdList.length && 'redLineTd']"
  375. ></td>
  376. </tr>
  377. <tr class="recorde">
  378. <template v-for="(item, index) of tdList">
  379. <td
  380. :key="index + 'td11'"
  381. v-if="index % 6 === 5 && index != tdList.length"
  382. style="
  383. border-right: 1px solid #ff6e71;
  384. border-bottom: 1px solid #7e7eff;
  385. "
  386. ></td>
  387. <td
  388. :key="index + 'td11'"
  389. v-else
  390. style="border-bottom: 1px solid #7e7eff"
  391. ></td>
  392. </template>
  393. </tr>
  394. <tr
  395. class="recorde"
  396. v-for="(tr, index) in [0, 0, 0, 0]"
  397. :key="index + 'tr7'"
  398. >
  399. <td
  400. v-for="(item, y) in tdList"
  401. :key="y"
  402. :class="[y % 6 === 5 && y != tdList.length && 'redLineTd']"
  403. ></td>
  404. </tr>
  405. <tr class="recorde">
  406. <template v-for="(item, index) of tdList">
  407. <td
  408. :key="index + 'td12'"
  409. v-if="index % 6 === 5 && index != tdList.length"
  410. style="
  411. border-right: 1px solid #ff6e71;
  412. border-bottom: 1px solid #7e7eff;
  413. "
  414. ></td>
  415. <td
  416. :key="index + 'td12'"
  417. v-else
  418. style="border-bottom: 1px solid #7e7eff"
  419. ></td>
  420. </template>
  421. </tr>
  422. <tr
  423. class="recorde"
  424. v-for="(tr, index) in [0, 0, 0, 0]"
  425. :key="index + 'tr8'"
  426. >
  427. <td
  428. v-for="(item, y) in tdList"
  429. :key="y + 'td13'"
  430. :class="[y % 6 === 5 && y != tdList.length && 'redLineTd']"
  431. ></td>
  432. </tr>
  433. <tr class="recorde">
  434. <template v-for="(item, index) of tdList">
  435. <td
  436. :key="index + 'td14'"
  437. v-if="index % 6 === 5 && index != tdList.length"
  438. style="
  439. border-right: 1px solid #ff6e71;
  440. border-bottom: 1px solid #7e7eff;
  441. "
  442. ></td>
  443. <td
  444. :key="index + 'td14'"
  445. v-else
  446. style="border-bottom: 1px solid #7e7eff"
  447. ></td>
  448. </template>
  449. </tr>
  450. <tr
  451. class="recorde"
  452. v-for="(tr, index) in [0, 0, 0, 0, 0]"
  453. :key="index + 'tr9'"
  454. >
  455. <td
  456. v-for="(item, y) in tdList"
  457. :key="y + 'td15'"
  458. :class="[y % 6 === 5 && y != tdList.length && 'redLineTd']"
  459. ></td>
  460. </tr>
  461. <tr></tr>
  462. <tr>
  463. <td
  464. :colspan="index === 0 ? 8 : 1"
  465. v-for="(item, index) in array42"
  466. :class="[index && 'redLineTd']"
  467. :key="index + '|098'"
  468. >
  469. {{
  470. index === 0
  471. ? "呼吸(次/分)"
  472. : typesViewData["098"] && typesViewData["098"][index - 1]
  473. }}
  474. </td>
  475. </tr>
  476. <tr>
  477. <td
  478. :colspan="index === 0 ? 8 : 1"
  479. v-for="(item, index) in array42"
  480. :class="[index && 'redLineTd']"
  481. :key="index + '|099'"
  482. >
  483. {{
  484. index === 0
  485. ? "疼痛强度"
  486. : typesViewData["099"] && typesViewData["099"][index - 1]
  487. }}
  488. </td>
  489. </tr>
  490. <tr>
  491. <td
  492. :colspan="index === 0 ? 8 : 6"
  493. v-for="(item, index) in [0, 1, 2, 3, 4, 5, 6, 7]"
  494. :class="[index && 'redLineTd']"
  495. :key="index + '|005'"
  496. >
  497. {{
  498. index === 0
  499. ? "大便(次/日)"
  500. : typesViewData["005"] && typesViewData["005"][index - 1]
  501. }}
  502. </td>
  503. </tr>
  504. <tr>
  505. <td
  506. :colspan="index === 0 ? 8 : 6"
  507. v-for="(item, index) in [0, 1, 2, 3, 4, 5, 6, 7]"
  508. :class="[index && 'redLineTd']"
  509. :key="index + '|004'"
  510. >
  511. {{
  512. index === 0
  513. ? "小便(ml)"
  514. : typesViewData["004"] && typesViewData["004"][index - 1]
  515. }}
  516. </td>
  517. </tr>
  518. <tr>
  519. <td
  520. :colspan="index === 0 ? 8 : 6"
  521. v-for="(item, index) in [0, 1, 2, 3, 4, 5, 6, 7]"
  522. :class="[index && 'redLineTd']"
  523. :key="index + '|008'"
  524. >
  525. {{
  526. index === 0
  527. ? "血压(mmHg)"
  528. : typesViewData["008"] && typesViewData["008"][index - 1]
  529. }}
  530. </td>
  531. </tr>
  532. <tr>
  533. <td
  534. :colspan="index === 0 ? 8 : 6"
  535. v-for="(item, index) in [0, 1, 2, 3, 4, 5, 6, 7]"
  536. :class="[index && 'redLineTd']"
  537. :key="index + '|030'"
  538. >
  539. {{
  540. index === 0
  541. ? "身高(cm)"
  542. : typesViewData["030"] && typesViewData["030"][index - 1]
  543. }}
  544. </td>
  545. </tr>
  546. <tr>
  547. <td
  548. :colspan="index === 0 ? 8 : 6"
  549. v-for="(item, index) in [0, 1, 2, 3, 4, 5, 6, 7]"
  550. :class="[index && 'redLineTd']"
  551. :key="index + '|009'"
  552. >
  553. {{
  554. index === 0
  555. ? "体重(kg)"
  556. : typesViewData["009"] && typesViewData["009"][index - 1]
  557. }}
  558. </td>
  559. </tr>
  560. <tr>
  561. <td
  562. :colspan="index === 0 ? 8 : 6"
  563. v-for="(item, index) in [0, 1, 2, 3, 4, 5, 6, 7]"
  564. :class="[index && 'redLineTd']"
  565. :key="index + '|006'"
  566. >
  567. {{
  568. index === 0
  569. ? "入量"
  570. : typesViewData["006"] && typesViewData["006"][index - 1]
  571. }}
  572. </td>
  573. </tr>
  574. <tr>
  575. <td
  576. :colspan="index === 0 ? 8 : 6"
  577. v-for="(item, index) in [0, 1, 2, 3, 4, 5, 6, 7]"
  578. :class="[index && 'redLineTd']"
  579. :key="index + '|011'"
  580. >
  581. {{
  582. index === 0
  583. ? "出量"
  584. : typesViewData["011"] && typesViewData["011"][index - 1]
  585. }}
  586. </td>
  587. </tr>
  588. <tr>
  589. <td
  590. :colspan="index === 0 ? 8 : 6"
  591. v-for="(item, index) in [0, 1, 2, 3, 4, 5, 6, 7]"
  592. :class="[index && 'redLineTd']"
  593. :key="index + '|010'"
  594. >
  595. {{
  596. index === 0
  597. ? "过敏药物"
  598. : typesViewData["010"] && typesViewData["010"][index - 1]
  599. }}
  600. </td>
  601. </tr>
  602. <!-- 皮试结果第一行 -->
  603. <tr>
  604. <td
  605. :colspan="index === 0 ? 8 : 6"
  606. v-for="(item, index) in [0, 1, 2, 3, 4, 5, 6, 7]"
  607. :class="[index && 'redLineTd']"
  608. :key="index + '|031'"
  609. >
  610. {{
  611. index === 0
  612. ? "皮试结果1"
  613. : typesViewData["031"] && typesViewData["031"][index - 1]
  614. }}
  615. </td>
  616. </tr>
  617. <!-- 皮试结果第二行 -->
  618. <tr>
  619. <td
  620. :colspan="index === 0 ? 8 : 6"
  621. v-for="(item, index) in [0, 1, 2, 3, 4, 5, 6, 7]"
  622. :class="[index && 'redLineTd']"
  623. :key="index + '|032'"
  624. >
  625. {{
  626. index === 0
  627. ? "皮试结果2"
  628. : typesViewData["032"] && typesViewData["032"][index - 1]
  629. }}
  630. </td>
  631. </tr>
  632. <!-- 皮试结果第三行 -->
  633. <tr>
  634. <td
  635. :colspan="index === 0 ? 8 : 6"
  636. v-for="(item, index) in [0, 1, 2, 3, 4, 5, 6, 7]"
  637. :class="[index && 'redLineTd']"
  638. :key="index + '|033'"
  639. >
  640. {{
  641. index === 0
  642. ? "皮试结果3"
  643. : typesViewData["033"] && typesViewData["033"][index - 1]
  644. }}
  645. </td>
  646. </tr>
  647. <!-- 皮试结果第四行 -->
  648. <tr>
  649. <td
  650. :colspan="index === 0 ? 8 : 6"
  651. v-for="(item, index) in [0, 1, 2, 3, 4, 5, 6, 7]"
  652. :class="[index && 'redLineTd']"
  653. :key="index + '|034'"
  654. >
  655. {{
  656. index === 0
  657. ? "皮试结果4"
  658. : typesViewData["034"] && typesViewData["034"][index - 1]
  659. }}
  660. </td>
  661. </tr>
  662. </tbody>
  663. </table>
  664. <div style="text-align: center">
  665. <div style="font-size: 20px; font-weight: bold">
  666. {{ `第${info.pageNo}页` }}
  667. </div>
  668. </div>
  669. </div>
  670. </template>
  671. <script>
  672. import * as d3 from "d3";
  673. import dayjs from "dayjs";
  674. import { getKeyMap, SectionToChinese } from "./utils";
  675. import {
  676. getChartData,
  677. getAllPatintInfo,
  678. } from "@/api/medical-advice/nursing-manage";
  679. import { getFormatDatetime } from "@/utils/date";
  680. import env from "../../../utils/setting";
  681. export default {
  682. props: {
  683. patientInfo: Object,
  684. queryParam: Object,
  685. },
  686. data() {
  687. return {
  688. marginTop: 0,
  689. keyMap: getKeyMap(),
  690. info: {
  691. age: 0,
  692. beginDate: "",
  693. inpatientNo: "",
  694. hospDate: 0,
  695. admissDate: "",
  696. bedNo: "",
  697. inDate: 0,
  698. inDiagName: null,
  699. name: "",
  700. admissWardName: "",
  701. sexName: "",
  702. pageNo: "1",
  703. operaDays: [],
  704. admissDateTime: null, // 完整的入院时间
  705. },
  706. xyList: [],
  707. typesInfo: [],
  708. coolingMarkers: [],
  709. typesViewData: {},
  710. breathData: [],
  711. tdList: new Array(42).fill(0),
  712. comKey: 1,
  713. symbolTextArr: [],
  714. array42: [],
  715. // 动态样式
  716. recordeTextStyle: {
  717. width: '12px',
  718. height: '10px',
  719. color: '#ff0000',
  720. fontSize: '8px',
  721. position: 'relative',
  722. top: '-1px',
  723. lineHeight: '14px'
  724. },
  725. // 动态刻度样式
  726. pulseScaleStyle: {
  727. titleMarginTop: '0px',
  728. firstRowMarginTop: '32px',
  729. normalRowMarginTop: '55px',
  730. lastRowMarginTop: '56px'
  731. },
  732. temperatureScaleStyle: {
  733. titleMarginTop: '0px',
  734. firstRowMarginTop: '32px',
  735. normalRowMarginTop: '55px',
  736. lastRowMarginTop: '56px'
  737. },
  738. legendStyle: {
  739. marginTop: '476px'
  740. },
  741. containerStyle: {
  742. marginTop: '-12px'
  743. }
  744. };
  745. },
  746. computed: {
  747. env() {
  748. return env;
  749. },
  750. // 日期
  751. inHospitalTime() {
  752. const initday = dayjs(this.info.beginDate);
  753. return [
  754. null, // 文案天
  755. initday.format("YYYY-MM-DD"),
  756. initday.add(1, "day").format("MM-DD"),
  757. initday.add(2, "day").format("MM-DD"),
  758. initday.add(3, "day").format("MM-DD"),
  759. initday.add(4, "day").format("MM-DD"),
  760. initday.add(5, "day").format("MM-DD"),
  761. initday.add(6, "day").format("MM-DD"),
  762. ];
  763. },
  764. // 住院天数
  765. inHospitalDays() {
  766. const initday = this.info.hospDays || 0;
  767. return [
  768. null, // 文案天
  769. initday + 1,
  770. initday + 2,
  771. initday + 3,
  772. initday + 4,
  773. initday + 5,
  774. initday + 6,
  775. initday + 7,
  776. ];
  777. },
  778. // 手术天数
  779. surgeryDays() {
  780. const initday = this.info.operaDays;
  781. if (initday.length <= 0) {
  782. return new Array(8).fill(null);
  783. } else {
  784. return initday;
  785. }
  786. },
  787. },
  788. mounted() {
  789. for (let i = 0; i < 43; i++) {
  790. this.array42.push(i);
  791. }
  792. this.initData();
  793. // 计算默认marginTop
  794. const topTdHeight = this.$refs.topTd[0].getBoundingClientRect().height;
  795. const defaultMarginTop = (Math.round(topTdHeight) - 18) * 10 + 28;
  796. this.marginTop = defaultMarginTop;
  797. console.log('=== mounted调试信息 ===');
  798. console.log('topTd元素高度:', topTdHeight);
  799. console.log('计算过程:', `(${Math.round(topTdHeight)} - 18) * 10 + 28 = ${defaultMarginTop}`);
  800. console.log('最终marginTop:', this.marginTop);
  801. console.log('========================');
  802. // 根据分辨率设置样式
  803. this.setStyleByResolution();
  804. // setTimeout(() => {
  805. // this.$emit('done')
  806. // })
  807. },
  808. methods: {
  809. SectionToChinese,
  810. // 将时间转换为中文格式
  811. convertTimeToChinese(hour, minute) {
  812. // 参考 Java 版本的 numberToChinese 方法,创建专门的时间转换函数
  813. const numberToChinese = (number) => {
  814. if (number === 0) return "零";
  815. if (number === 1) return "一";
  816. if (number === 2) return "二";
  817. if (number === 3) return "三";
  818. if (number === 4) return "四";
  819. if (number === 5) return "五";
  820. if (number === 6) return "六";
  821. if (number === 7) return "七";
  822. if (number === 8) return "八";
  823. if (number === 9) return "九";
  824. if (number === 10) return "十";
  825. if (number === 11) return "十一";
  826. if (number === 12) return "十二";
  827. if (number === 13) return "十三";
  828. if (number === 14) return "十四";
  829. if (number === 15) return "十五";
  830. if (number === 16) return "十六";
  831. if (number === 17) return "十七";
  832. if (number === 18) return "十八";
  833. if (number === 19) return "十九";
  834. if (number === 20) return "二十";
  835. if (number === 21) return "二十一";
  836. if (number === 22) return "二十二";
  837. if (number === 23) return "二十三";
  838. if (number === 24) return "二十四";
  839. if (number === 25) return "二十五";
  840. if (number === 26) return "二十六";
  841. if (number === 27) return "二十七";
  842. if (number === 28) return "二十八";
  843. if (number === 29) return "二十九";
  844. if (number === 30) return "三十";
  845. if (number === 31) return "三十一";
  846. if (number === 32) return "三十二";
  847. if (number === 33) return "三十三";
  848. if (number === 34) return "三十四";
  849. if (number === 35) return "三十五";
  850. if (number === 36) return "三十六";
  851. if (number === 37) return "三十七";
  852. if (number === 38) return "三十八";
  853. if (number === 39) return "三十九";
  854. if (number === 40) return "四十";
  855. if (number === 41) return "四十一";
  856. if (number === 42) return "四十二";
  857. if (number === 43) return "四十三";
  858. if (number === 44) return "四十四";
  859. if (number === 45) return "四十五";
  860. if (number === 46) return "四十六";
  861. if (number === 47) return "四十七";
  862. if (number === 48) return "四十八";
  863. if (number === 49) return "四十九";
  864. if (number === 50) return "五十";
  865. if (number === 51) return "五十一";
  866. if (number === 52) return "五十二";
  867. if (number === 53) return "五十三";
  868. if (number === 54) return "五十四";
  869. if (number === 55) return "五十五";
  870. if (number === 56) return "五十六";
  871. if (number === 57) return "五十七";
  872. if (number === 58) return "五十八";
  873. if (number === 59) return "五十九";
  874. // 对于其他数字,使用通用的转换逻辑
  875. if (number < 10) {
  876. return numberToChinese(number);
  877. } else if (number < 20) {
  878. return "十" + (number === 10 ? "" : numberToChinese(number - 10));
  879. } else if (number < 60) {
  880. const tens = Math.floor(number / 10);
  881. const ones = number % 10;
  882. let tensStr = "";
  883. switch (tens) {
  884. case 2: tensStr = "二十"; break;
  885. case 3: tensStr = "三十"; break;
  886. case 4: tensStr = "四十"; break;
  887. case 5: tensStr = "五十"; break;
  888. }
  889. return tensStr + (ones === 0 ? "" : numberToChinese(ones));
  890. }
  891. return String(number);
  892. };
  893. const hourStr = numberToChinese(hour);
  894. const minuteStr = numberToChinese(minute);
  895. // 处理分钟为0的情况
  896. if (minute === 0) {
  897. return `${hourStr}时`;
  898. }
  899. // 处理分钟小于10的情况,需要加"零"
  900. if (minute < 10) {
  901. return `${hourStr}时零${minuteStr}分`;
  902. }
  903. return `${hourStr}时${minuteStr}分`;
  904. },
  905. // 生成入院标识文字
  906. generateAdmissionText(admissionDateTime) {
  907. if (!admissionDateTime) return "";
  908. const date = new Date(admissionDateTime);
  909. const hour = date.getHours();
  910. const minute = date.getMinutes();
  911. return `入院${this.convertTimeToChinese(hour, minute)}`;
  912. },
  913. // 获取入院时间应该显示的时间段索引
  914. getAdmissionTimeSlot(admissionDateTime) {
  915. if (!admissionDateTime) return -1;
  916. const date = new Date(admissionDateTime);
  917. const hour = date.getHours();
  918. const minute = date.getMinutes();
  919. const second = date.getSeconds();
  920. // 将时间转换为分钟数,便于精确计算
  921. const totalMinutes = hour * 60 + minute + second / 60;
  922. // 标准时间点:02:00, 06:00, 10:00, 14:00, 18:00, 22:00
  923. const standardMinutes = [2 * 60, 6 * 60, 10 * 60, 14 * 60, 18 * 60, 22 * 60];
  924. // 计算到每个标准时间点的距离,选择最近的
  925. let minDistance = Infinity;
  926. let closestIndex = -1;
  927. for (let i = 0; i < standardMinutes.length; i++) {
  928. const standardMinute = standardMinutes[i];
  929. let distance;
  930. // 计算距离,考虑跨天的情况
  931. if (Math.abs(totalMinutes - standardMinute) <= 12 * 60) {
  932. // 同一天内或相邻天的情况
  933. distance = Math.abs(totalMinutes - standardMinute);
  934. } else {
  935. // 跨天的情况,需要计算最短距离
  936. if (totalMinutes > standardMinute) {
  937. // 例如:23点到02点
  938. distance = Math.min(totalMinutes - standardMinute, (24 * 60 - totalMinutes) + standardMinute);
  939. } else {
  940. // 例如:1点到22点
  941. distance = Math.min(standardMinute - totalMinutes, (24 * 60 - standardMinute) + totalMinutes);
  942. }
  943. }
  944. // 更新最小距离和对应的索引
  945. if (distance < minDistance) {
  946. minDistance = distance;
  947. closestIndex = i;
  948. }
  949. }
  950. return closestIndex;
  951. },
  952. getSymbolTextArr(index) {
  953. // 检查是否是入院时间对应的位置
  954. if (this.info.admissDateTime) {
  955. // 计算入院时间对应的日期索引
  956. const admissionDate = new Date(this.info.admissDateTime);
  957. const currentDate = dayjs(this.info.beginDate).add(Math.floor(index / 6), 'day');
  958. // 判断是否是入院当天
  959. if (dayjs(admissionDate).format('YYYY-MM-DD') === currentDate.format('YYYY-MM-DD')) {
  960. // 判断是否是入院时间段
  961. const admissionSlot = this.getAdmissionTimeSlot(this.info.admissDateTime);
  962. if (admissionSlot === (index % 6)) {
  963. return this.generateAdmissionText(this.info.admissDateTime);
  964. }
  965. }
  966. }
  967. // 原有的特殊标注文字逻辑
  968. const current = this.symbolTextArr.find(i => i.x === index);
  969. if (current) {
  970. return current.y;
  971. } else {
  972. return "";
  973. }
  974. },
  975. temperatureConverter(c) {
  976. const value = (c * 9) / 5 + 32;
  977. return value.toFixed(1);
  978. },
  979. initData() {
  980. // this.info = dataModel.grParamBOS
  981. this.info.pageNo = this.queryParam.week;
  982. this.info.beginDate = this.queryParam.startRecTime;
  983. this.info.hospDays = (Number(this.queryParam.week) - 1) * 7;
  984. // this.rowsInfo = dataModel.rows || []
  985. // this.typesInfo = dataModel.types || []
  986. let param = {
  987. inpatientNo: this.patientInfo.inpatientNo,
  988. admissTimes: this.patientInfo.admissTimes,
  989. week: this.queryParam.week,
  990. startRecTime: this.queryParam.startRecTime,
  991. endRecTime: this.queryParam.endRecTime,
  992. mbFlag: this.queryParam.checkBoxFlag.mbFlag,
  993. hxFlag: this.queryParam.checkBoxFlag.hxFlag,
  994. xyFlag: this.queryParam.checkBoxFlag.xyFlag,
  995. wcyRqFlag: this.queryParam.checkBoxFlag.wcyRqFlag,
  996. };
  997. getAllPatintInfo({
  998. inpatientNo: this.patientInfo.inpatientNo,
  999. admissTimes: this.patientInfo.admissTimes,
  1000. }).then(res => {
  1001. this.info.name = res.name;
  1002. this.info.age = res.age || "";
  1003. this.info.sexName = res.sexName;
  1004. this.info.bedNo = res.bedNo;
  1005. this.info.inpatientNo = res.inpatientNo;
  1006. this.info.admissWardName = res.admissWardName;
  1007. this.info.admissDate = getFormatDatetime(res.admissDate, "YYYY-MM-DD");
  1008. // 保存完整的入院时间用于生成入院标识
  1009. this.info.admissDateTime = res.admissDate;
  1010. });
  1011. getChartData(param).then(res => {
  1012. this.rowsInfo = res.rows;
  1013. this.typesInfo = res.types;
  1014. this.coolingMarkers = res.coolingMarkers || [];
  1015. this.info.operaDays = res.operaDays;
  1016. this.init();
  1017. });
  1018. },
  1019. init() {
  1020. //800 758
  1021. var width = 690;
  1022. var height = 682;
  1023. // SVG画布边缘与图表内容的距离
  1024. var padding = { top: 50, right: 0, bottom: 50, left: 50 };
  1025. // 创建一个分组用来组合要画的图表元素
  1026. var main = d3
  1027. .select(".container svg")
  1028. .append("g")
  1029. .classed("main", true)
  1030. .attr("transform", "translate(" + 80 + "," + 80 + ")");
  1031. // 模拟数据 体温
  1032. var dataset = getTypeData("003", this.rowsInfo);
  1033. var datasetAnus = getTypeData("015", this.rowsInfo);
  1034. var datasetHeartrate = getTypeData("014", this.rowsInfo);
  1035. var datasetPulse = getTypeData("002", this.rowsInfo);
  1036. var symbolTextArr = getTypeData("012", this.rowsInfo, false);
  1037. this.symbolTextArr = symbolTextArr;
  1038. // 口表【黑实圆】
  1039. var datasetPain = getTypeData("001", this.rowsInfo);
  1040. this.breathData = datasetPain;
  1041. // const circleNode = document.createElement('circle')
  1042. // circleNode.setAttribute('cx', '179.2439024390244')
  1043. // circleNode.setAttribute('cy', '582')
  1044. // circleNode.setAttribute('r', '4')
  1045. // circleNode.setAttribute('stroke', '#000000')
  1046. // circleNode.setAttribute('stroke-width', '1')
  1047. // circleNode.setAttribute('fill', '#FFFFFF')
  1048. // document.querySelector('.main').appendChild(circleNode)
  1049. // 创建x轴的比例尺(线性比例尺)
  1050. var xScale = d3
  1051. .scaleLinear()
  1052. .domain([0, 41])
  1053. .range([9, width - padding.left - padding.right + 75]);
  1054. // 创建y轴的比例尺(线性比例尺)
  1055. /* var yScale = d3.scale.linear()
  1056. .domain([0, d3.max(dataset,function(d) {
  1057. return d.y;
  1058. })])
  1059. .range([height - padding.top - padding.bottom, 0]); */
  1060. // 体温
  1061. var yScale = d3
  1062. .scaleLinear()
  1063. .domain([33, 42])
  1064. .range([height - padding.top - padding.bottom, -56]);
  1065. // 脉搏
  1066. var yScale1 = d3
  1067. .scaleLinear()
  1068. .domain([20, 200])
  1069. .range([height - padding.top - padding.bottom, -55]);
  1070. // 呼吸
  1071. var yScale2 = d3
  1072. .scaleLinear()
  1073. .domain([0, 40])
  1074. .range([height - padding.top + 22, -55]);
  1075. // 创建x轴
  1076. var xAxis = d3.axisBottom().scale(xScale);
  1077. // 创建y轴
  1078. var yAxis = d3.axisLeft().scale(yScale);
  1079. var yAxis1 = d3.axisLeft().scale(yScale1);
  1080. var yAxis2 = d3.axisLeft().scale(yScale2);
  1081. // 添加SVG元素并与x轴进行“绑定”
  1082. main
  1083. .append("g")
  1084. .attr("class", "axis")
  1085. .attr(
  1086. "transform",
  1087. "translate(0," + (height - padding.top - padding.bottom) + ")"
  1088. )
  1089. .call(xAxis);
  1090. // 添加SVG元素并与y轴进行“绑定”
  1091. main.append("g").attr("class", "axis").call(yAxis);
  1092. main.append("g").attr("class", "axis").call(yAxis1);
  1093. main.append("g").attr("class", "axis").call(yAxis2);
  1094. // 添加折线
  1095. var line = d3
  1096. .line()
  1097. .x(function (d) {
  1098. return xScale(d.x);
  1099. })
  1100. .y(function (d) {
  1101. return yScale(d.y);
  1102. });
  1103. var line1 = d3
  1104. .line()
  1105. .x(function (d) {
  1106. return xScale(d.x);
  1107. })
  1108. .y(function (d) {
  1109. return yScale1(d.y);
  1110. });
  1111. var line2 = d3
  1112. .line()
  1113. .x(function (d) {
  1114. return xScale(d.x);
  1115. })
  1116. .y(function (d) {
  1117. return yScale(d.y);
  1118. });
  1119. // .interpolate('linear')
  1120. // 选择线条的类型
  1121. // 添加path元素,并通过line()计算出值来赋值
  1122. main
  1123. .append("path")
  1124. .attr("class", "line tiwenline")
  1125. .attr("d", line(dataset));
  1126. main.append("path").attr("class", "line").attr("d", line(datasetAnus));
  1127. main.append("path").attr("class", "line").attr("d", line2(datasetPain));
  1128. main
  1129. .append("path")
  1130. .attr("class", "line redColor")
  1131. .attr("d", line1(datasetHeartrate));
  1132. main
  1133. .append("path")
  1134. .attr("class", "line redColor")
  1135. .attr("d", line1(datasetPulse));
  1136. // main.append('path').attr('class', 'line').attr('d', line3(dataset))
  1137. // 添加点
  1138. /* 黑实圆--start */
  1139. // main
  1140. // .selectAll('rect')
  1141. // .data(dataset_mouth)
  1142. // .enter()
  1143. // .append('circle')
  1144. // .attr('cx', function (d) {
  1145. // return xScale(d.x)
  1146. // })
  1147. // .attr('cy', function (d) {
  1148. // return yScale(d.y)
  1149. // })
  1150. // .attr('r', 4)
  1151. // .attr('fill', function (d, i) {
  1152. // return 'black'
  1153. // })
  1154. /* 黑实圆--end */
  1155. /* 黑空圆--start */
  1156. main
  1157. .selectAll("rect")
  1158. .data(datasetAnus)
  1159. .enter()
  1160. .append("circle")
  1161. .attr("cx", function (d) {
  1162. return xScale(d.x);
  1163. })
  1164. .attr("cy", function (d) {
  1165. return yScale(d.y);
  1166. })
  1167. .attr("r", 4)
  1168. .attr("stroke", "#000000")
  1169. .attr("stroke-width", 1)
  1170. .attr("fill", "#FFFFFF");
  1171. /* 黑空圆--end */
  1172. /* 红空圆--start */
  1173. main
  1174. .selectAll("rect")
  1175. .data(datasetHeartrate)
  1176. .enter()
  1177. .append("circle")
  1178. .attr("cx", function (d) {
  1179. return xScale(d.x);
  1180. })
  1181. .attr("cy", function (d) {
  1182. return yScale1(d.y);
  1183. })
  1184. .attr("r", 4)
  1185. .attr("stroke", "#EE0000")
  1186. .attr("stroke-width", 1)
  1187. .attr("fill", "#FFFFFF");
  1188. /* 红空圆--end */
  1189. /* 红实圆--start */
  1190. main
  1191. .selectAll("rect")
  1192. .data(datasetPulse)
  1193. .enter()
  1194. .append("circle")
  1195. .attr("cx", function (d) {
  1196. return xScale(d.x);
  1197. })
  1198. .attr("cy", function (d) {
  1199. return yScale1(d.y);
  1200. })
  1201. .attr("r", 4)
  1202. .attr("fill", "#EE0000");
  1203. // .on('mouseover', function (d) {
  1204. // // (1)取得提示显示的位置
  1205. // var xPosition = parseFloat(d3.select(this).attr('cx')) + 698
  1206. // var yPosition = parseFloat(d3.select(this).attr('cy')) + 24
  1207. //
  1208. // // (2)创建提示条SVG
  1209. // d3.select('.container svg')
  1210. // .append('text')
  1211. // .attr('id', 'tooltip') // 设置id便于移除提示
  1212. // .attr('x', xPosition)
  1213. // .attr('y', yPosition)
  1214. // .attr('text-anchor', 'middle')
  1215. // .attr('font-family', 'sans-setif')
  1216. // .attr('font-size', '11px')
  1217. // .attr('font-weight', 'bold')
  1218. // .attr('fill', 'white')
  1219. // .text(d.value)
  1220. // })
  1221. // (3)移除提示条SVG
  1222. /* 红实圆--end */
  1223. /* 黑实圆--start */
  1224. main
  1225. .selectAll("rect")
  1226. .data(datasetPain)
  1227. .enter()
  1228. .append("circle")
  1229. .attr("cx", function (d) {
  1230. return xScale(d.x);
  1231. })
  1232. .attr("cy", function (d) {
  1233. return yScale(d.y);
  1234. })
  1235. .attr("r", 4)
  1236. .attr("stroke", "#000000")
  1237. .attr("fill", "#000000");
  1238. /* 黑实圆--end */
  1239. this.drawx(main, dataset, xScale, yScale);
  1240. this.drawCoolingMarkers(main, xScale, yScale);
  1241. this.initTypes();
  1242. // this.hoverEvent(main)
  1243. },
  1244. drawCoolingMarkers(main, xScale, yScale) {
  1245. if (!this.coolingMarkers || this.coolingMarkers.length === 0) return;
  1246. const group = {};
  1247. this.coolingMarkers.forEach(m => {
  1248. if (!m) return;
  1249. const idx = Number(m.index);
  1250. const before = m.before != null ? Number(m.before) : null;
  1251. const after = m.after != null ? Number(m.after) : null;
  1252. if (!Number.isFinite(idx) || before === null || after === null) return;
  1253. if (!group[idx]) group[idx] = [];
  1254. group[idx].push({ before, after });
  1255. });
  1256. const step = 2; // 同格多标记时的水平偏移像素
  1257. Object.keys(group).forEach(k => {
  1258. const idx = Number(k);
  1259. const arr = group[k];
  1260. const n = arr.length;
  1261. const start = -Math.floor((n - 1) / 2) * step;
  1262. arr.forEach((m, i) => {
  1263. const x = xScale(idx) + (n > 1 ? start + i * step : 0);
  1264. const yTop = yScale(Number(m.before));
  1265. const yBottom = yScale(Number(m.after));
  1266. if (!Number.isFinite(yTop) || !Number.isFinite(yBottom)) return;
  1267. // 竖向红色虚线
  1268. main
  1269. .append("line")
  1270. .attr("x1", x)
  1271. .attr("y1", yTop)
  1272. .attr("x2", x)
  1273. .attr("y2", yBottom)
  1274. .attr("stroke", "#ff0000")
  1275. .attr("stroke-width", 1)
  1276. .attr("stroke-dasharray", "5 5");
  1277. // 底部小圆圈
  1278. main
  1279. .append("circle")
  1280. .attr("cx", x)
  1281. .attr("cy", yBottom)
  1282. .attr("r", 3)
  1283. .attr("stroke", "#ff0000")
  1284. .attr("stroke-width", 1)
  1285. .attr("fill", "none");
  1286. });
  1287. });
  1288. },
  1289. drawx(main, dataset, xScale, yScale) {
  1290. /* 【叉形】--start */
  1291. main
  1292. .selectAll("rect")
  1293. .data(dataset)
  1294. .enter()
  1295. .append("line")
  1296. .attr("x1", function (d) {
  1297. return xScale(d.x) - 4;
  1298. })
  1299. .attr("y1", function (d) {
  1300. return yScale(d.y) - 4;
  1301. })
  1302. .attr("x2", function (d) {
  1303. return xScale(d.x) + 4;
  1304. })
  1305. .attr("y2", function (d) {
  1306. return yScale(d.y) + 4;
  1307. })
  1308. .attr("stroke", function (d, i) {
  1309. return "blue";
  1310. });
  1311. main
  1312. .selectAll("rect")
  1313. .data(dataset)
  1314. .enter()
  1315. .append("line")
  1316. .attr("x1", function (d) {
  1317. return xScale(d.x) + 4;
  1318. })
  1319. .attr("y1", function (d) {
  1320. return yScale(d.y) - 4;
  1321. })
  1322. .attr("x2", function (d) {
  1323. return xScale(d.x) - 4;
  1324. })
  1325. .attr("y2", function (d) {
  1326. return yScale(d.y) + 4;
  1327. })
  1328. .attr("stroke", function (d, i) {
  1329. return "blue";
  1330. });
  1331. /* 体温【叉形】--end */
  1332. },
  1333. hoverEvent(main) {
  1334. ///* 鼠标悬停直线--start
  1335. // var dataset_line = [{x: 0,y: 0}]
  1336. // main.selectAll('rect')
  1337. // .data(dataset_line)
  1338. // .enter()
  1339. // .append('line')
  1340. // .attr({
  1341. // 'x1':100,'y1':-56,
  1342. // 'x2':100,'y2':582
  1343. // })
  1344. // .attr('stroke', function(d, i) {
  1345. // return 'black';
  1346. // });
  1347. // 鼠标悬停直线--end */
  1348. document.querySelector(".lineColor").style.stroke = "red";
  1349. const recordeNode = document.createElement("div");
  1350. recordeNode.setAttribute("class", "recorde-text");
  1351. document.querySelector(".recorde td").append(recordeNode);
  1352. const allTrtd = document.querySelectorAll(".temperatureChart tr td");
  1353. [...allTrtd].map(ele => {
  1354. ele.setAttribute("title", ele.innerText);
  1355. });
  1356. /* 鼠标悬停提示框 */
  1357. var tooltip = d3
  1358. .select("body")
  1359. .append("div")
  1360. .attr("class", "tooltip")
  1361. .style("opacity", 0.0);
  1362. main
  1363. .on("mouseover", function (d) {
  1364. /*
  1365. 鼠标移入时,
  1366. (1)通过 selection.html() 来更改提示框的文字
  1367. (2)通过更改样式 left 和 top 来设定提示框的位置
  1368. (3)设定提示框的透明度为1.0(完全不透明)
  1369. */
  1370. tooltip
  1371. .html("呼吸:19次/分<br/>录入信息:2017-11-02<br/>姓名:张三")
  1372. .style("left", d3.event.pageX + "px")
  1373. .style("top", d3.event.pageY + 20 + "px")
  1374. .style("opacity", 1.0);
  1375. })
  1376. .on("mousemove", function (d) {
  1377. /* 鼠标移动时,更改样式 left 和 top 来改变提示框的位置 */
  1378. tooltip
  1379. .style("left", d3.event.pageX + "px")
  1380. .style("top", d3.event.pageY + 20 + "px");
  1381. })
  1382. .on("mouseout", function (d) {
  1383. /* 鼠标移出时,将透明度设定为0.0(完全透明) */
  1384. tooltip.style("opacity", 0.0);
  1385. });
  1386. },
  1387. initTypes() {
  1388. const keyMap = {};
  1389. this.typesInfo.map(item => {
  1390. const key = item.typeCode;
  1391. if (keyMap[key]) {
  1392. keyMap[key].push(item.typeValue);
  1393. } else {
  1394. keyMap[key] = [item.typeValue];
  1395. }
  1396. });
  1397. this.typesViewData = keyMap;
  1398. },
  1399. // 根据分辨率设置样式
  1400. setStyleByResolution() {
  1401. const screenWidth = window.screen.width;
  1402. const screenHeight = window.screen.height;
  1403. console.log('=== 调试信息 ===');
  1404. console.log('屏幕分辨率:', screenWidth + 'x' + screenHeight);
  1405. console.log('浏览器缩放比例:', window.devicePixelRatio);
  1406. console.log('实际窗口尺寸:', window.innerWidth + 'x' + window.innerHeight);
  1407. console.log('计算的marginTop:', this.marginTop);
  1408. console.log('topTd元素高度:', this.$refs.topTd ? this.$refs.topTd[0].getBoundingClientRect().height : '未获取到');
  1409. // DPI相关调试信息
  1410. console.log('=== DPI调试信息 ===');
  1411. console.log('devicePixelRatio (设备像素比):', window.devicePixelRatio);
  1412. console.log('CSS像素与物理像素比例:', 1 / window.devicePixelRatio);
  1413. console.log('屏幕物理尺寸 (英寸):', {
  1414. width: screenWidth / (96 * window.devicePixelRatio),
  1415. height: screenHeight / (96 * window.devicePixelRatio)
  1416. });
  1417. console.log('估算DPI:', {
  1418. horizontal: Math.round(screenWidth / (screenWidth / (96 * window.devicePixelRatio))),
  1419. vertical: Math.round(screenHeight / (screenHeight / (96 * window.devicePixelRatio)))
  1420. });
  1421. console.log('================');
  1422. // 默认样式(当前分辨率)
  1423. let style = {
  1424. width: '12px',
  1425. height: '10px',
  1426. color: '#ff0000',
  1427. fontSize: '8px',
  1428. position: 'relative',
  1429. top: '-1px',
  1430. lineHeight: '14px'
  1431. };
  1432. // 可以根据不同分辨率设置不同样式
  1433. // 例如:1920x1080
  1434. if (screenWidth === 1920 && screenHeight === 1080) {
  1435. style = {
  1436. width: '12px',
  1437. height: '10px',
  1438. color: '#ff0000',
  1439. fontSize: '8px',
  1440. position: 'relative',
  1441. top: '-1px',
  1442. lineHeight: '14px'
  1443. };
  1444. }
  1445. // 例如:1366x768
  1446. else if (screenWidth === 1366 && screenHeight === 768) {
  1447. style = {
  1448. width: '12px',
  1449. height: '10px',
  1450. color: '#ff0000',
  1451. fontSize: '8px',
  1452. position: 'relative',
  1453. top: '-1px',
  1454. lineHeight: '14px'
  1455. };
  1456. }
  1457. // 例如:1536x864
  1458. else if (screenWidth === 1536 && screenHeight === 864) {
  1459. style = {
  1460. width: '12px',
  1461. height: '10px',
  1462. color: '#ff0000',
  1463. fontSize: '8px',
  1464. position: 'relative',
  1465. top: '-1px',
  1466. lineHeight: '14px'
  1467. };
  1468. }
  1469. // 例如:1360x768
  1470. else if (screenWidth === 1360 && screenHeight === 768) {
  1471. style = {
  1472. width: '12px',
  1473. height: '10px',
  1474. color: '#ff0000',
  1475. fontSize: '8px',
  1476. position: 'relative',
  1477. top: '-1px',
  1478. lineHeight: '14px'
  1479. };
  1480. }
  1481. // // 例如:1440x900
  1482. // else if (screenWidth === 1440 && screenHeight === 900) {
  1483. // style = {
  1484. // width: '12px',
  1485. // height: '10px',
  1486. // color: '#ff0000',
  1487. // fontSize: '8px',
  1488. // position: 'relative',
  1489. // top: '-1px',
  1490. // lineHeight: '14px'
  1491. // };
  1492. // }
  1493. // 其他分辨率使用默认样式
  1494. else {
  1495. style = {
  1496. width: '12px',
  1497. height: '10px',
  1498. color: '#ff0000',
  1499. fontSize: '8px',
  1500. position: 'relative',
  1501. top: '-1px',
  1502. lineHeight: '14px'
  1503. };
  1504. }
  1505. this.recordeTextStyle = style;
  1506. // 设置刻度样式
  1507. this.setScaleStyles(screenWidth, screenHeight);
  1508. },
  1509. // 设置刻度样式
  1510. setScaleStyles(screenWidth, screenHeight) {
  1511. // 默认刻度样式
  1512. let pulseStyle = {
  1513. titleMarginTop: '0px',
  1514. firstRowMarginTop: '32px',
  1515. normalRowMarginTop: '55px',
  1516. lastRowMarginTop: '56px'
  1517. };
  1518. let temperatureStyle = {
  1519. titleMarginTop: '0px',
  1520. firstRowMarginTop: '32px',
  1521. normalRowMarginTop: '55px',
  1522. lastRowMarginTop: '56px'
  1523. };
  1524. let legendStyle = {
  1525. marginTop: '476px'
  1526. };
  1527. let containerStyle = {
  1528. marginTop: '-12px'
  1529. };
  1530. // 可以根据不同分辨率设置不同样式
  1531. // 例如:1920x1080
  1532. if (screenWidth === 1920 && screenHeight === 1080) {
  1533. if(this.marginTop > 0) {//marginTop:48
  1534. pulseStyle = {
  1535. titleMarginTop: '0px',
  1536. firstRowMarginTop: '32px',
  1537. normalRowMarginTop: '55px',
  1538. lastRowMarginTop: '56px'
  1539. };
  1540. temperatureStyle = {
  1541. titleMarginTop: '0px',
  1542. firstRowMarginTop: '32px',
  1543. normalRowMarginTop: '55px',
  1544. lastRowMarginTop: '56px'
  1545. };
  1546. legendStyle = {
  1547. marginTop: '476px'
  1548. };
  1549. if(window.devicePixelRatio > 1) {
  1550. containerStyle = {
  1551. marginTop: this.marginTop + 'px',
  1552. };
  1553. }else {
  1554. containerStyle = {
  1555. marginTop: (this.marginTop + 14) + 'px',
  1556. };
  1557. }
  1558. }else {//marginTop:-2
  1559. pulseStyle = {
  1560. titleMarginTop: '0px',
  1561. firstRowMarginTop: '44px',
  1562. normalRowMarginTop: '61px',
  1563. lastRowMarginTop: '61px'
  1564. };
  1565. temperatureStyle = {
  1566. titleMarginTop: '0px',
  1567. firstRowMarginTop: '44px',
  1568. normalRowMarginTop: '61px',
  1569. lastRowMarginTop: '61px'
  1570. };
  1571. legendStyle = {
  1572. marginTop: '476px'
  1573. };
  1574. containerStyle = {
  1575. marginTop: '22px'
  1576. };
  1577. }
  1578. }
  1579. // 例如:1366x768
  1580. else if (screenWidth === 1366 && screenHeight === 768) {
  1581. pulseStyle = {
  1582. titleMarginTop: '0px',
  1583. firstRowMarginTop: '32px',
  1584. normalRowMarginTop: '55px',
  1585. lastRowMarginTop: '56px'
  1586. };
  1587. temperatureStyle = {
  1588. titleMarginTop: '0px',
  1589. firstRowMarginTop: '32px',
  1590. normalRowMarginTop: '55px',
  1591. lastRowMarginTop: '56px'
  1592. };
  1593. legendStyle = {
  1594. marginTop: '476px'
  1595. };
  1596. if(this.marginTop > 38) {
  1597. if(this.marginTop < 58) {
  1598. containerStyle = {
  1599. marginTop: (this.marginTop + 15) + 'px',
  1600. };
  1601. }else {
  1602. if(window.devicePixelRatio < 1) {
  1603. containerStyle = {
  1604. marginTop: (this.marginTop + 5) + 'px',
  1605. };
  1606. }
  1607. }
  1608. console.log("this.marginTop > 38",containerStyle.marginTop)
  1609. }else {
  1610. if(window.devicePixelRatio < 1) {
  1611. if(this.marginTop > 18) {
  1612. containerStyle = {
  1613. marginTop: (this.marginTop + 10 + 14) + 'px',
  1614. };
  1615. }else {
  1616. containerStyle = {
  1617. marginTop: (this.marginTop + 10 + 28) + 'px',
  1618. };
  1619. }
  1620. }else {
  1621. containerStyle = {
  1622. marginTop: (this.marginTop + 10) + 'px',
  1623. };
  1624. }
  1625. console.log("this.marginTop <= 38",containerStyle.marginTop)
  1626. }
  1627. console.log("this.marginTop0000000000000000000000",this.marginTop)
  1628. console.log("marginTop.containerStyle",containerStyle.marginTop)
  1629. }
  1630. // 例如:1536x864
  1631. else if (screenWidth === 1536 && screenHeight === 864) {
  1632. pulseStyle = {
  1633. titleMarginTop: '0px',
  1634. firstRowMarginTop: '40px',
  1635. normalRowMarginTop: '60px',
  1636. lastRowMarginTop: '60px'
  1637. };
  1638. temperatureStyle = {
  1639. titleMarginTop: '0px',
  1640. firstRowMarginTop: '40px',
  1641. normalRowMarginTop: '60px',
  1642. lastRowMarginTop: '60px'
  1643. };
  1644. legendStyle = {
  1645. marginTop: '476px'
  1646. };
  1647. containerStyle = {
  1648. marginTop: '23px'
  1649. };
  1650. }
  1651. // 例如:1360x768
  1652. else if (screenWidth === 1360 && screenHeight === 768) {
  1653. pulseStyle = {
  1654. titleMarginTop: '0px',
  1655. firstRowMarginTop: '44px',
  1656. normalRowMarginTop: '61px',
  1657. lastRowMarginTop: '61px'
  1658. };
  1659. temperatureStyle = {
  1660. titleMarginTop: '0px',
  1661. firstRowMarginTop: '44px',
  1662. normalRowMarginTop: '61px',
  1663. lastRowMarginTop: '61px'
  1664. };
  1665. legendStyle = {
  1666. marginTop: '476px'
  1667. };
  1668. containerStyle = {
  1669. marginTop: '22px'
  1670. };
  1671. }
  1672. // 例如:1440x900
  1673. else if (screenWidth === 1440 && screenHeight === 900) {
  1674. if(this.marginTop > 38) {
  1675. if(this.marginTop < 58) {
  1676. pulseStyle = {
  1677. titleMarginTop: '0px',
  1678. firstRowMarginTop: '32px',
  1679. normalRowMarginTop: '55px',
  1680. lastRowMarginTop: '56px'
  1681. };
  1682. temperatureStyle = {
  1683. titleMarginTop: '0px',
  1684. firstRowMarginTop: '32px',
  1685. normalRowMarginTop: '55px',
  1686. lastRowMarginTop: '56px'
  1687. };
  1688. legendStyle = {
  1689. marginTop: '476px'
  1690. };
  1691. containerStyle = {
  1692. marginTop: (this.marginTop + 14) + 'px',
  1693. };
  1694. }else {
  1695. pulseStyle = {
  1696. titleMarginTop: '0px',
  1697. firstRowMarginTop: '32px',
  1698. normalRowMarginTop: '55px',
  1699. lastRowMarginTop: '56px'
  1700. };
  1701. temperatureStyle = {
  1702. titleMarginTop: '0px',
  1703. firstRowMarginTop: '32px',
  1704. normalRowMarginTop: '55px',
  1705. lastRowMarginTop: '56px'
  1706. };
  1707. legendStyle = {
  1708. marginTop: '476px'
  1709. };
  1710. containerStyle = {
  1711. marginTop: this.marginTop + 'px',
  1712. };
  1713. }
  1714. }else {
  1715. if(window.devicePixelRatio < 1) {
  1716. pulseStyle = {
  1717. titleMarginTop: '0px',
  1718. firstRowMarginTop: '32px',
  1719. normalRowMarginTop: '55px',
  1720. lastRowMarginTop: '56px'
  1721. };
  1722. temperatureStyle = {
  1723. titleMarginTop: '0px',
  1724. firstRowMarginTop: '32px',
  1725. normalRowMarginTop: '55px',
  1726. lastRowMarginTop: '56px'
  1727. };
  1728. legendStyle = {
  1729. marginTop: '476px'
  1730. };
  1731. containerStyle = {
  1732. marginTop: (this.marginTop + 7) + 'px',
  1733. };
  1734. }else {
  1735. pulseStyle = {
  1736. titleMarginTop: '0px',
  1737. firstRowMarginTop: '32px',
  1738. normalRowMarginTop: '55px',
  1739. lastRowMarginTop: '56px'
  1740. };
  1741. temperatureStyle = {
  1742. titleMarginTop: '0px',
  1743. firstRowMarginTop: '32px',
  1744. normalRowMarginTop: '55px',
  1745. lastRowMarginTop: '56px'
  1746. };
  1747. legendStyle = {
  1748. marginTop: '476px'
  1749. };
  1750. containerStyle = {
  1751. marginTop: this.marginTop + 'px',
  1752. };
  1753. }
  1754. }
  1755. }
  1756. // 其他分辨率使用默认样式
  1757. else {
  1758. pulseStyle = {
  1759. titleMarginTop: '0px',
  1760. firstRowMarginTop: '32px',
  1761. normalRowMarginTop: '55px',
  1762. lastRowMarginTop: '56px'
  1763. };
  1764. temperatureStyle = {
  1765. titleMarginTop: '0px',
  1766. firstRowMarginTop: '32px',
  1767. normalRowMarginTop: '55px',
  1768. lastRowMarginTop: '56px'
  1769. };
  1770. legendStyle = {
  1771. marginTop: '476px'
  1772. };
  1773. containerStyle = {
  1774. marginTop: this.marginTop + 'px',
  1775. };
  1776. }
  1777. console.log("this.marginTop11111111111111111111",this.marginTop)
  1778. this.pulseScaleStyle = pulseStyle;
  1779. this.temperatureScaleStyle = temperatureStyle;
  1780. this.legendStyle = legendStyle;
  1781. this.containerStyle = containerStyle;
  1782. },
  1783. },
  1784. };
  1785. function getTypeData(type, allData = [], isNumber = true) {
  1786. return allData
  1787. .map((rowBOSItem, index) => {
  1788. const rowBOS = rowBOSItem.rowBOS;
  1789. const cur =
  1790. rowBOS.find(item => {
  1791. return item.typeCode === type;
  1792. }) || {};
  1793. return { x: index, y: (isNumber ? +cur.typeValue : cur.typeValue) || "" };
  1794. })
  1795. .filter(item => {
  1796. return item.y !== "";
  1797. });
  1798. }
  1799. </script>
  1800. <style scoped>
  1801. .table_wrap {
  1802. line-height: normal;
  1803. }
  1804. table {
  1805. font-weight: normal;
  1806. border-collapse: collapse;
  1807. font-size: 8px;
  1808. text-align: center;
  1809. width: 100%;
  1810. table-layout: fixed;
  1811. border: 2px #2f4f4f solid;
  1812. }
  1813. td {
  1814. border: 1px solid #ccc;
  1815. width: 12px;
  1816. height: 11px;
  1817. }
  1818. .redLineTd {
  1819. border-right: 1px solid #ff6e71;
  1820. }
  1821. .recorde-text {
  1822. /* 样式现在通过动态计算设置 */
  1823. color: #ff0000;
  1824. position: relative;
  1825. }
  1826. .table_wrap {
  1827. position: relative;
  1828. margin: 0 auto;
  1829. width: 835px;
  1830. }
  1831. .container {
  1832. /* 高度最好动态计算,不然很容易错位*/
  1833. margin: 30px auto;
  1834. margin-top: 28px;
  1835. width: 805px;
  1836. height: 758px;
  1837. position: absolute;
  1838. top: 142px;
  1839. left: 28px;
  1840. }
  1841. .temperature_mark td p {
  1842. position: relative;
  1843. top: 0;
  1844. margin-top: 58px;
  1845. }
  1846. .num_wrapper {
  1847. width: 35px;
  1848. height: 636px;
  1849. position: relative;
  1850. }
  1851. .pain_wrapper {
  1852. position: absolute;
  1853. width: 100%;
  1854. height: 70px;
  1855. right: 0;
  1856. bottom: -3px;
  1857. border: 1px solid #ccc;
  1858. }
  1859. .zeroline {
  1860. fill: none;
  1861. stroke: red;
  1862. stroke-width: 0.5px;
  1863. stroke-dasharray: 5 5;
  1864. }
  1865. .zerolinetext {
  1866. fill: red;
  1867. }
  1868. .overlay {
  1869. fill: none;
  1870. stroke: none;
  1871. pointer-events: all;
  1872. }
  1873. .tooltip {
  1874. font-family: "宋体";
  1875. font-size: 10px;
  1876. line-height: 16px;
  1877. color: #736269;
  1878. width: auto;
  1879. height: auto;
  1880. padding: 4px;
  1881. position: absolute;
  1882. text-align: left;
  1883. border: 1px solid #736269;
  1884. background-color: #e7e9f3;
  1885. border-radius: 2px;
  1886. background: linear-gradient(#fefdff, #e5e5f1);
  1887. /* 标准的语法(必须放在最后) */
  1888. }
  1889. </style>
  1890. <style>
  1891. .table_wrap {
  1892. font-family: "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  1893. }
  1894. .table_wrap .tick,
  1895. .table_wrap .domain {
  1896. display: none;
  1897. }
  1898. .table_wrap .tbale-label {
  1899. font-weight: 700;
  1900. }
  1901. .table_wrap .focusLine {
  1902. fill: none;
  1903. stroke: red;
  1904. stroke-width: 0.5px;
  1905. }
  1906. .table_wrap .focusText {
  1907. color: red;
  1908. }
  1909. .table_wrap .breath_td_odd {
  1910. vertical-align: top;
  1911. font-size: 10px;
  1912. }
  1913. .table_wrap .breath_td_even {
  1914. vertical-align: bottom;
  1915. font-size: 10px;
  1916. }
  1917. .table_wrap .line {
  1918. fill: none;
  1919. stroke: black;
  1920. stroke-width: 2px;
  1921. }
  1922. .table_wrap .line.tiwenline {
  1923. stroke: blue;
  1924. fill: none;
  1925. }
  1926. .table_wrap .line.redColor {
  1927. stroke: red;
  1928. fill: none;
  1929. }
  1930. .table_wrap .axis path,
  1931. .table_wrap .axis line,
  1932. .table_wrap .line {
  1933. stroke: #000;
  1934. fill: none;
  1935. }
  1936. .table_wrap .legend {
  1937. display: flex;
  1938. }
  1939. .table_wrap .legend .legend-text {
  1940. display: flex;
  1941. }
  1942. .table_wrap .legend .legend-item {
  1943. margin-right: 20px;
  1944. }
  1945. </style>