MaternalChildHome.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. <template>
  2. <div class="layout_container">
  3. <header>
  4. <MaternalDetailsHeader :huanZheXinXi="huanZheXinXi"></MaternalDetailsHeader>
  5. </header>
  6. <div class="layout_main">
  7. <CyTabs height="100%" v-model="tabsName">
  8. <CyTabPane :name="0" label="孕产妇保健">
  9. <CyTabs
  10. height="100%"
  11. v-model="childTabsName"
  12. @change="handleChildTabsChange"
  13. >
  14. <CyTabPane
  15. v-for="(item, index) in tabList"
  16. :key="index"
  17. :name="index"
  18. :label="item.label"
  19. >
  20. <iframe
  21. v-if="
  22. item.module && item.module !== '' && childTabsName === index
  23. "
  24. ref="Iframe"
  25. :src="url"
  26. width="100%"
  27. height="100%"
  28. frameborder="0"
  29. allowfullscreen
  30. @load="iframeLoad"
  31. ></iframe>
  32. <div v-if="item.label === '早孕登记'">
  33. <EarlyPregnancyRegistration></EarlyPregnancyRegistration>
  34. </div>
  35. <div v-if="item.label === '病史询问'">
  36. <MedicalHistoryTaking></MedicalHistoryTaking>
  37. </div>
  38. <div v-if="item.label === '孕妇分娩'">
  39. <IntrapartumManagement></IntrapartumManagement>
  40. </div>
  41. <div v-if="item.label === '产后访视'">
  42. <PostpartumHousecall></PostpartumHousecall>
  43. </div>
  44. </CyTabPane>
  45. <!-- <CyTabPane :name="0" label="早孕登记">
  46. &lt;!&ndash; <iframe&ndash;&gt;
  47. &lt;!&ndash; :src="url"&ndash;&gt;
  48. &lt;!&ndash; width="100%"&ndash;&gt;
  49. &lt;!&ndash; height="600px"&ndash;&gt;
  50. &lt;!&ndash; frameborder="0"&ndash;&gt;
  51. &lt;!&ndash; allowfullscreen&ndash;&gt;
  52. &lt;!&ndash; ></iframe>&ndash;&gt;
  53. </CyTabPane>
  54. <CyTabPane :name="1" label="孕妇建卡">
  55. <iframe
  56. ref="Iframe"
  57. :src="url"
  58. width="100%"
  59. height="100%"
  60. frameborder="0"
  61. allowfullscreen
  62. ></iframe>
  63. </CyTabPane>
  64. <CyTabPane :name="2" label="病史询问"></CyTabPane>
  65. <CyTabPane :name="3" label="产前检查"></CyTabPane>
  66. <CyTabPane :name="4" label="实验室检查"></CyTabPane>
  67. <CyTabPane :name="5" label="检查项目"></CyTabPane>
  68. <CyTabPane :name="6" label="孕妇高危因素"></CyTabPane>
  69. <CyTabPane :name="7" label="孕妇高危跟踪"></CyTabPane>
  70. <CyTabPane :name="8" label="双向转诊"></CyTabPane>
  71. <CyTabPane :name="9" label="孕妇分娩"></CyTabPane>
  72. <CyTabPane :name="10" label="儿童建卡(新生儿登记)"></CyTabPane>
  73. <CyTabPane :name="11" label="产后访视"></CyTabPane>
  74. <CyTabPane :name="12" label="产后42天检查"></CyTabPane>
  75. <CyTabPane :name="13" label="全流程">
  76. <iframe
  77. ref="Iframe"
  78. :src="url"
  79. width="100%"
  80. height="100%"
  81. frameborder="0"
  82. allowfullscreen
  83. ></iframe>
  84. </CyTabPane>-->
  85. </CyTabs>
  86. </CyTabPane>
  87. <CyTabPane :name="1" label="生育技术服务">
  88. <CyTabs height="100%" v-model="childTabsName1">
  89. <CyTabPane :name="0" label="计生基本信息"></CyTabPane>
  90. <CyTabPane :name="1" label="计生门诊病历"></CyTabPane>
  91. <CyTabPane :name="2" label="计生手术记录"></CyTabPane>
  92. <CyTabPane :name="3" label="实验室检查"></CyTabPane>
  93. <CyTabPane :name="4" label="检查项目"></CyTabPane>
  94. <CyTabPane :name="5" label="术后随访"></CyTabPane>
  95. </CyTabs>
  96. </CyTabPane>
  97. </CyTabs>
  98. </div>
  99. </div>
  100. </template>
  101. <script setup>
  102. import CyTabs from "@/components/cy/tabs/src/CyTabs";
  103. import CyTabPane from "@/components/cy/tabs/src/CyTabPane.vue";
  104. import {ref} from "vue";
  105. import {FYSystemUrl} from "@/config/index.js";
  106. import {
  107. huanZheXinXi,
  108. onChangePatient,
  109. youWuXuanZheHuanZhe,
  110. yzMitt,
  111. } from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
  112. import {getBirthdayFromIdCard, getAgeFromIdCard} from "@/utils/index.js";
  113. import MedicalHistoryTaking from "@/views/hospitalization/zhu-yuan-yi-sheng/maternal-child/MedicalHistoryTaking.vue";
  114. import PostpartumHousecall from "@/views/hospitalization/zhu-yuan-yi-sheng/maternal-child/PostpartumHousecall.vue";
  115. import MaternalDetailsHeader from "@/views/hospitalization/zhu-yuan-yi-sheng/maternal-child/MaternalDetailsHeader.vue";
  116. import EarlyPregnancyRegistration
  117. from "@/views/hospitalization/zhu-yuan-yi-sheng/maternal-child/EarlyPregnancyRegistration.vue";
  118. import IntrapartumManagement from "@/views/hospitalization/zhu-yuan-yi-sheng/maternal-child/IntrapartumManagement.vue";
  119. const tabsName = ref(0);
  120. const childTabsName = ref(0);
  121. const childTabsName1 = ref(0);
  122. const url = ref("");
  123. const tabList = ref([
  124. {
  125. label: "早孕登记",
  126. module: "",
  127. },
  128. {
  129. label: "孕妇建卡",
  130. module: "M102",
  131. },
  132. {
  133. label: "病史询问",
  134. module: "",
  135. },
  136. {
  137. label: "初次检查",
  138. module: "M109",
  139. },
  140. // {
  141. // label: "实验室检查",
  142. // module: "",
  143. // },
  144. // {
  145. // label: "检查项目",
  146. // module: "",
  147. // },
  148. // {
  149. // label: "孕妇高危因素",
  150. // module: "M120",
  151. // },
  152. // {
  153. // label: "孕妇高危跟踪",
  154. // module: "",
  155. // },
  156. // {
  157. // label: "双向转诊",
  158. // module: "M148",
  159. // },
  160. {
  161. label: "孕妇分娩",
  162. module: "",
  163. },
  164. {
  165. label: "儿童建卡(新生儿登记)",
  166. module: "",
  167. },
  168. {
  169. label: "产后访视",
  170. module: "",
  171. },
  172. {
  173. label: "产后42天检查",
  174. module: "M139",
  175. },
  176. {
  177. label: "全流程",
  178. module: "M103",
  179. },
  180. ]);
  181. const iframeLoad = () => {
  182. console.log("iframeLoad----------------");
  183. };
  184. const dianJiChaXunFuYou = () => {
  185. console.log("huanZheXinXi-----------", huanZheXinXi.value);
  186. handleChildTabsChange(childTabsName.value);
  187. };
  188. const handleChildTabsChange = val => {
  189. console.log("handleChildTabsChange-----", tabsName.value, "---", val);
  190. url.value = "";
  191. if (tabsName.value === 0) {
  192. console.log("tabList.value-----------------", tabList.value);
  193. console.log("tabList.value[val]----------1--------", tabList.value[val]);
  194. if (tabList.value[val]?.module) {
  195. if (huanZheXinXi?.value.patNo) {
  196. let data = {
  197. healthNo: "",
  198. patientNo: huanZheXinXi?.value.patNo,
  199. hospitalNo: "",
  200. outpatientNo: huanZheXinXi?.value.mzNo
  201. ? huanZheXinXi?.value.mzNo
  202. : "",
  203. name: huanZheXinXi?.value.name,
  204. cardType: "01",
  205. cardNo: huanZheXinXi?.value.socialNo
  206. ? huanZheXinXi?.value.socialNo
  207. : "",
  208. birthday: getBirthdayFromIdCard(huanZheXinXi?.value.socialNo),
  209. age: getAgeFromIdCard(huanZheXinXi?.value.socialNo),
  210. tel: huanZheXinXi?.value.homeTel ? huanZheXinXi?.value.homeTel : "",
  211. workOrgan: "",
  212. lmp: "",
  213. };
  214. const utf8Bytes = encodeURIComponent(JSON.stringify(data)).replace(
  215. /%([0-9A-F]{2})/g,
  216. (_, hex) => {
  217. return String.fromCharCode(parseInt(hex, 16));
  218. }
  219. );
  220. console.log("tabList.value", val, tabList.value[val]);
  221. url.value =
  222. FYSystemUrl + tabList.value[val].module + "&data=" + btoa(utf8Bytes);
  223. console.log("url---------", url.value);
  224. window.open(FYSystemUrl + tabList.value[val].module + '&data=' + btoa(utf8Bytes), "_blank");
  225. } else {
  226. console.log("没有患者信息--------");
  227. }
  228. } else {
  229. console.log("no module------------");
  230. }
  231. // if (val === 0) {
  232. // // url.value = 'http://192.168.100.140:18080/mchis-web/main.html#/indextabs/ycfbjadd/yfjkadd'
  233. // } else if (val === 1) {
  234. // console.log("huanZheXinXi--------", huanZheXinXi?.value);
  235. // if (huanZheXinXi?.value.patNo) {
  236. // let data = {
  237. // healthNo: "",
  238. // patientNo: huanZheXinXi?.value.patNo,
  239. // hospitalNo: "",
  240. // outpatientNo: huanZheXinXi?.value.mzNo
  241. // ? huanZheXinXi?.value.mzNo
  242. // : "",
  243. // name: huanZheXinXi?.value.name,
  244. // cardType: "01",
  245. // cardNo: huanZheXinXi?.value.socialNo
  246. // ? huanZheXinXi?.value.socialNo
  247. // : "",
  248. // birthday: getBirthdayFromIdCard(huanZheXinXi?.value.socialNo),
  249. // age: getAgeFromIdCard(huanZheXinXi?.value.socialNo),
  250. // tel: huanZheXinXi?.value.homeTel ? huanZheXinXi?.value.homeTel : "",
  251. // workOrgan: "",
  252. // lmp: "",
  253. // };
  254. // const utf8Bytes = encodeURIComponent(JSON.stringify(data)).replace(
  255. // /%([0-9A-F]{2})/g,
  256. // (_, hex) => {
  257. // return String.fromCharCode(parseInt(hex, 16));
  258. // }
  259. // );
  260. // console.log(
  261. // "-----url-----",
  262. // FYSystemUrl + "M102&data=" + btoa(utf8Bytes)
  263. // );
  264. // url.value = FYSystemUrl + "M102&data=" + btoa(utf8Bytes);
  265. // // window.open( FYSystemUrl + 'M102&data=' + btoa(utf8Bytes), "_blank");
  266. // }
  267. // } else if (val === 13) {
  268. // if (huanZheXinXi?.value.patNo) {
  269. // let data = {
  270. // healthNo: "",
  271. // patientNo: huanZheXinXi?.value.patNo,
  272. // hospitalNo: "",
  273. // outpatientNo: huanZheXinXi?.value.mzNo
  274. // ? huanZheXinXi?.value.mzNo
  275. // : "",
  276. // name: huanZheXinXi?.value.name,
  277. // cardType: "01",
  278. // cardNo: huanZheXinXi?.value.socialNo
  279. // ? huanZheXinXi?.value.socialNo
  280. // : "",
  281. // birthday: getBirthdayFromIdCard(huanZheXinXi?.value.socialNo),
  282. // age: getAgeFromIdCard(huanZheXinXi?.value.socialNo),
  283. // tel: huanZheXinXi?.value.homeTel ? huanZheXinXi?.value.homeTel : "",
  284. // workOrgan: "",
  285. // lmp: "",
  286. // };
  287. // const utf8Bytes = encodeURIComponent(JSON.stringify(data)).replace(
  288. // /%([0-9A-F]{2})/g,
  289. // (_, hex) => {
  290. // return String.fromCharCode(parseInt(hex, 16));
  291. // }
  292. // );
  293. // console.log(
  294. // "-----url-----",
  295. // FYSystemUrl + "M103&data=" + btoa(utf8Bytes)
  296. // );
  297. // url.value = FYSystemUrl + "M103&data=" + btoa(utf8Bytes);
  298. // // window.open( FYSystemUrl + 'M102&data=' + btoa(utf8Bytes), "_blank");
  299. // }
  300. // }
  301. } else if (tabsName.value === 1) {
  302. }
  303. onMounted(() => {
  304. });
  305. };
  306. onChangePatient(dianJiChaXunFuYou);
  307. </script>
  308. <style lang="scss" scoped>
  309. .layout_container {
  310. font-family: "Helvetica Neue", "Helvetica", "PingFang SC", "Microsoft YaHei",
  311. "Noto Sans CJK SC", "WenQuanYi Micro Hei", "Arial", "sans-serif";
  312. }
  313. </style>