graphics.vue 62 KB

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