index.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. // 两癌筛查居民档案-服务记录
  2. var template = ''
  3. $.ajax('../../../component/statistics/CopdServiceRecordPatient/index.html', {
  4. data: {},
  5. dataType: 'html',
  6. cache: false,
  7. timeout: 60000,
  8. async: false,
  9. error: function (res) {},
  10. success: function (res) {
  11. template = res
  12. }
  13. })
  14. Vue.component('Copd-service-record-patient', {
  15. template: template,
  16. props: ['patient'],
  17. data() {
  18. return {
  19. dialog: false,
  20. loading: false,
  21. formDialogVisible: false,
  22. page: 1,
  23. size: 999,
  24. title: '',
  25. idcardTypeName: '',
  26. followInfo: {},
  27. events: [
  28. { date: '2023年' },
  29. { title: 'Event 1', date: '05-11 17:00:01', description: 'Description for event 1' },
  30. { date: '2024年', description: 'Description for event 2' },
  31. { date: '2025年', description: 'Description for event 3' },
  32. { date: '2026年', description: 'Description for event 4' },
  33. { title: 'Event 5', date: '2027年', description: 'Description for event 5' }
  34. ],
  35. marriageArr: [],
  36. backTypeName: '',
  37. diagnosticBasisName: '',
  38. marriageName: '',
  39. symptom: '',
  40. symptomsArr: [],
  41. followupArr: [],
  42. followup: '',
  43. idCardTypeArr: [],
  44. firstAreaArr: [],
  45. firstAreaName: '',
  46. isLiveArr: [],
  47. orgLevelArr: [],
  48. orGlevelName: '',
  49. occupationArr: [],
  50. occupation: '',
  51. smokeArr: [],
  52. drinkArr: [],
  53. archivesArr: [],
  54. diseaseConversion: '',
  55. conversionArr: [],
  56. firstVisitTypeArr: [],
  57. educationalArr: [],
  58. educational: '',
  59. nationDict: [],
  60. nationName: '',
  61. communityArr: [],
  62. yearList: [{ label: '全部年份', value: '' }],
  63. nodeList: [
  64. { label: '全部节点', value: '' },
  65. { label: '居民预约', value: 1 },
  66. { label: '乳腺临床检查', value: 2 },
  67. { label: '辅助检查-乳腺超声', value: 3 },
  68. { label: '辅助检查-乳腺钼靶', value: 4 },
  69. { label: '乳腺病理学检查', value: 5 },
  70. { label: '乳腺外科门诊', value: 6 },
  71. { label: '乳腺癌治疗信息', value: 7 }
  72. ],
  73. nodeList2: [
  74. { label: '社区随访', value: 8 },
  75. { label: '妇科检查', value: 9 },
  76. { label: 'HPV', value: 10 },
  77. { label: '宫颈细胞学检查', value: 11 },
  78. { label: '初筛结果临床评估', value: 12 },
  79. { label: '阴道镜检查', value: 13 },
  80. { label: '阴道镜检查随访', value: 14 },
  81. { label: '组织病理学检查', value: 15 },
  82. { label: '组织病理学检查随访', value: 16 },
  83. { label: '最后诊断', value: 17 }
  84. ],
  85. serviceYear: '',
  86. customizeYear: [],
  87. serviceNode: '',
  88. changeModule: 1,
  89. moreFlag: true,
  90. detailInfo: {}
  91. }
  92. },
  93. methods: {
  94. getMore() {
  95. this.moreFlag = !this.moreFlag
  96. if (this.moreFlag) {
  97. this.nodeList.splice(8, 10)
  98. } else {
  99. this.nodeList = [...this.nodeList, ...this.nodeList2]
  100. }
  101. },
  102. getNation() {
  103. var vm = this
  104. statisticAPI.getNationDict().then(function (res) {
  105. vm.nationDict = res.data
  106. vm.nationDict.forEach(function (item) {
  107. if (item.NATION_CODE == vm.followInfo.nation) {
  108. vm.nationName = item.NATION_NAME
  109. }
  110. })
  111. })
  112. },
  113. setLeftHeights() {
  114. this.$nextTick(() => {
  115. this.events.forEach((event, index) => {
  116. const rightContent = document.getElementById('right-' + index)
  117. const leftContent = document.getElementById('left-' + index)
  118. if (rightContent && leftContent) {
  119. leftContent.style.height = rightContent.offsetHeight + 'px'
  120. }
  121. })
  122. })
  123. },
  124. recordBack() {
  125. this.$emit('back')
  126. EventBus.$emit('copd-reset-select')
  127. },
  128. getDealRecord(val) {
  129. this.serviceNode = val
  130. var vm = this
  131. vm.loading = true
  132. var params = {
  133. patient: vm.patient,
  134. type: vm.serviceNode
  135. }
  136. httpRequest.get('doctor/twoCancers/count/serviceRecord', { data: params }).then(function (res) {
  137. vm.events = res.obj.records
  138. vm.detailInfo = res.obj
  139. vm.loading = false
  140. })
  141. },
  142. getYearList() {
  143. for (var i = 0; i < 6; i++) {
  144. var year = new Date().getFullYear() - i
  145. this.yearList.push({ label: year, value: year })
  146. }
  147. this.yearList.push({ label: '自定义', value: 'customize' })
  148. },
  149. getTypeName(type) {
  150. return this.nodeList.find(function (item) {
  151. return item.value == type
  152. })?.label
  153. }
  154. },
  155. mounted() {
  156. var vm = this
  157. this.getDealRecord()
  158. this.getYearList()
  159. }
  160. })