export-sh.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>测试报告</title>
  8. <style>
  9. * {
  10. margin: 0;
  11. padding: 0;
  12. }
  13. .resultReport {
  14. width: 727px;
  15. margin: 0 auto;
  16. }
  17. .head {
  18. width: 727px;
  19. height: 88px;
  20. margin: 0 auto;
  21. }
  22. .head .title {
  23. width: 251px;
  24. line-height: 48px;
  25. font-size: 22px;
  26. font-family: PingFang SC;
  27. font-weight: bold;
  28. color: #000;
  29. text-align: center;
  30. margin: 0 auto;
  31. }
  32. .content {
  33. box-sizing: border-box;
  34. width: 730px;
  35. padding: 15px 30px 40px;
  36. background: #ffffff;
  37. margin: 0 auto;
  38. }
  39. .base_info {
  40. /*box-sizing: border-box;*/
  41. width: 100%;
  42. height: 30px;
  43. text-align: left;
  44. font-size: 14px;
  45. font-weight: bold;
  46. color: #000;
  47. border-bottom: 1px solid #8c939d;
  48. }
  49. .base_info p {
  50. width: 100%;
  51. height: 100%;
  52. line-height: 30px;
  53. text-align: left;
  54. /*padding-bottom: 5px;*/
  55. }
  56. .user_info {
  57. width: 100%;
  58. height: 30px;
  59. font-size: 14px;
  60. font-family: PingFang SC;
  61. /*font-weight: 500;*/
  62. color: #000;
  63. border-bottom: 1px solid #8c939d;
  64. display: flex;
  65. flex-direction: row;
  66. justify-content: flex-start;
  67. align-items: center;
  68. margin-top: 20px;
  69. }
  70. .user_info_item {
  71. text-align: left;
  72. /*padding-bottom: 5px;*/
  73. }
  74. .user_info_item_second {
  75. margin: 0 150px;
  76. }
  77. .user_info_item span:first-child {
  78. font-weight: bold;
  79. color: #000;
  80. margin-right: 10px;
  81. }
  82. .test_content {
  83. width: 100%;
  84. margin-top: 30px;
  85. }
  86. .test_result_first,
  87. .test_result_second {
  88. width: 100%;
  89. }
  90. .test_result_first_title,
  91. .test_result_second_title {
  92. width: 100%;
  93. height: 30px;
  94. text-align: left;
  95. font-size: 14px;
  96. font-weight: bold;
  97. color: #000;
  98. }
  99. .table_content {
  100. width: 100%;
  101. }
  102. .table_content table {
  103. width: 100%;
  104. border-left: 1px solid #000;
  105. border-top: 1px solid #000;
  106. margin: 0;
  107. padding: 0;
  108. border-spacing: unset;
  109. }
  110. .table_content table th {
  111. background: #e4e4e4;
  112. }
  113. .table_content table th,
  114. .table_content table td {
  115. border-right: 1px solid #000;
  116. border-bottom: 1px solid #000;
  117. width: 50%;
  118. line-height: 35px;
  119. text-align: left;
  120. font-size: 14px;
  121. }
  122. .table_content table tr td:first-child {
  123. font-weight: bold;
  124. }
  125. .desc_content {
  126. width: 100%;
  127. margin-top: 30px;
  128. }
  129. .desc_content_item {
  130. width: 100%;
  131. margin-bottom: 20px;
  132. }
  133. .desc_content_list {
  134. width: 100%;
  135. line-height: 22px;
  136. text-align: left;
  137. font-size: 14px;
  138. margin-bottom: 10px;
  139. }
  140. .desc_content_list span:first-child {
  141. font-weight: bold;
  142. }
  143. .pl {
  144. padding-left: 10px;
  145. }
  146. .mr {
  147. margin-right: 10px;
  148. }
  149. .footer {
  150. width: 100%;
  151. margin: 50px 0 20px;
  152. font-size: 14px;
  153. font-family: PingFang SC;
  154. box-sizing: border-box;
  155. padding: 0 30px;
  156. }
  157. .footer_info {
  158. width: 100%;
  159. border-bottom: 1px solid #8c939d;
  160. padding: 10px 0 50px;
  161. text-align: right;
  162. }
  163. .footer_info_title {
  164. font-weight: bold;
  165. }
  166. .footer_info_title span {
  167. color: #666666;
  168. font-weight: 500;
  169. margin: 0 10px 0 0;
  170. }
  171. .footer_info_sign {
  172. margin-top: 16px;
  173. font-size: 14px;
  174. font-weight: bold;
  175. color: #000;
  176. }
  177. .footer_desc {
  178. text-align: center;
  179. margin-top: 10px;
  180. }
  181. </style>
  182. <!-- <script src="./js/echarts.js"></script>-->
  183. <script src="./js/vue@2"></script>
  184. <!-- 引入样式 -->
  185. <link rel="stylesheet" href="./css/index.css">
  186. <!-- 引入组件库 -->
  187. <script src="./js/index.js"></script>
  188. </head>
  189. <body>
  190. <div class="resultReport" id="app">
  191. <div class="head">
  192. <div class="title">三河市儿童医院</div>
  193. <div class="title">{{testResult.subject.type == '0' ? '量表评估报告单' : '认知评估报告单'}}</div>
  194. </div>
  195. <div class="content">
  196. <div class="base_info">
  197. <p><span>【基本信息】</span><span style="margin-left: 10px;">{{testResult.name}}</span></p>
  198. </div>
  199. <div class="user_info">
  200. <div class="user_info_item user_info_item_first">
  201. <span>姓名:</span><span>{{testResult.userEntity.petName}}</span>
  202. </div>
  203. <div class="user_info_item user_info_item_second"><span>性别:</span><span>{{testResult.userEntity.gender
  204. == 0 ? '男' : '女'}}</span></div>
  205. <div class="user_info_item user_info_item_third">
  206. <span>出生日期:</span><span>{{testResult.userEntity.birthday}}</span>
  207. </div>
  208. </div>
  209. <div class="test_content">
  210. <div v-if="showTable" class="test_result_first">
  211. <p class="test_result_first_title">【测试结果】</p>
  212. <div class="table_content">
  213. <table>
  214. <tr>
  215. <th class="pl">项目</th>
  216. <th class="pl">结果</th>
  217. </tr>
  218. <tr v-for="(item ,index) in tableContext" :key="index">
  219. <td class="pl">{{ item.name }}</td>
  220. <td class="pl">{{ item.value[0] }}</td>
  221. </tr>
  222. </table>
  223. </div>
  224. </div>
  225. <div v-else class="test_result_second">
  226. <p class="test_result_second_title">【测试结果】</p>
  227. <div class="table_content">
  228. <table>
  229. <tr>
  230. <th class="pl">项目</th>
  231. <th class="pl">结果</th>
  232. </tr>
  233. <tr v-for="(item ,index) in result" :key="index">
  234. <td class="pl">{{ item.name }}</td>
  235. <td class="pl">{{ item.score }}</td>
  236. </tr>
  237. </table>
  238. </div>
  239. <div class="desc_content">
  240. <div class="desc_content_item" v-for="(item ,index) in result" :key="index">
  241. <div class="desc_content_list">
  242. <span class="desc_content_item_title">【维度名称】</span>
  243. <span class="desc_content_item_desc">{{ item.name }}</span>
  244. </div>
  245. <div class="desc_content_list">
  246. <span class="desc_content_item_title mr">得&ensp;&ensp;&ensp;&ensp;分:</span>
  247. <span class="desc_content_item_desc">{{ item.score }}</span>
  248. </div>
  249. <div v-if="item.symptom && item.symptom != '无'" class="desc_content_list">
  250. <span class="desc_content_item_title mr">症&ensp;&ensp;&ensp;&ensp;状:</span>
  251. <span class="desc_content_item_desc">{{ item.symptom }}</span>
  252. </div>
  253. <div v-if="item.improvementSuggestions && item.improvementSuggestions != '无'"
  254. class="desc_content_list">
  255. <span class="desc_content_item_title mr">维度说明:</span>
  256. <span class="desc_content_item_desc"> {{ item.improvementSuggestions }}</span>
  257. </div>
  258. <div v-if="item.nameExplain && item.nameExplain != '无'" class="desc_content_list">
  259. <span class="desc_content_item_title mr">维度解读:</span>
  260. <span class="desc_content_item_desc">{{ item.nameExplain }}</span>
  261. </div>
  262. <div v-if="item.suggestion && item.suggestion != '无'" class="desc_content_list">
  263. <span class="desc_content_item_title mr">建&ensp;&ensp;&ensp;&ensp;议:</span>
  264. <span class="desc_content_item_desc">{{ item.suggestion }}</span>
  265. </div>
  266. </div>
  267. </div>
  268. </div>
  269. </div>
  270. </div>
  271. <div class="footer">
  272. <div class="footer_info">
  273. <p class="footer_info_title">
  274. 测试者:<span>{{testResult.userEntity.petName}}</span>日期:<span>{{testResult.reportTime}}</span></p>
  275. <p class="footer_info_sign">儿童行为发育评定室</p>
  276. </div>
  277. <div class="footer_desc">注:评估结果仅供临床参考,需结合具体情况综合判断。</div>
  278. </div>
  279. </div>
  280. <!-- <script src="./js/vue@2"></script>-->
  281. <script>
  282. var app = new Vue({
  283. el: '#app',
  284. data() {
  285. return {
  286. id: "",
  287. userName: "",
  288. testDetail:ReplaceData,
  289. testResult: {},
  290. tableContext: [], //旧数据结构
  291. result: [], //新数据结构
  292. showTable: false, //显示旧数据还是新数据
  293. };
  294. },
  295. created() {
  296. this.getDetail();
  297. },
  298. computed: {
  299. },
  300. mounted() { },
  301. methods: {
  302. getDetail() {
  303. debugger
  304. this.testResult = this.testDetail;
  305. console.log(this.testResult, '数据')
  306. this.tableContext = this.testResult?.tableContext ? this.testResult.tableContext : [];
  307. this.showTable = this.testResult?.tableContext ? true : false;
  308. this.result = this.testResult?.result ? this.testResult.result : [];
  309. },
  310. }
  311. })
  312. </script>
  313. </body>
  314. </html>