index.js 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  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. detailData: {},
  92. type: ''
  93. }
  94. },
  95. methods: {
  96. showDetail(item) {
  97. this.title = item.typeName
  98. this.type = item.type
  99. this.detailData = {}
  100. var vm = this
  101. if (item.type == 1) {
  102. } else {
  103. var params = {
  104. id: item.id,
  105. screenId: this.detailInfo.screenId,
  106. type: item.type
  107. }
  108. httpRequest.get('doctor/twoCancers/count/tableDetail', { data: params }).then(function (res) {
  109. vm.detailData = {
  110. value: [
  111. {
  112. ...res.obj.entity
  113. }
  114. ]
  115. }
  116. vm.formDialogVisible = true
  117. console.log(vm.detailData, 'reskkkkkkkkkkkkkkkk')
  118. })
  119. }
  120. },
  121. getMore() {
  122. this.moreFlag = !this.moreFlag
  123. if (this.moreFlag) {
  124. this.nodeList.splice(8, 10)
  125. } else {
  126. this.nodeList = [...this.nodeList, ...this.nodeList2]
  127. }
  128. },
  129. getNation() {
  130. var vm = this
  131. statisticAPI.getNationDict().then(function (res) {
  132. vm.nationDict = res.data
  133. vm.nationDict.forEach(function (item) {
  134. if (item.NATION_CODE == vm.followInfo.nation) {
  135. vm.nationName = item.NATION_NAME
  136. }
  137. })
  138. })
  139. },
  140. setLeftHeights() {
  141. this.$nextTick(() => {
  142. this.events.forEach((event, index) => {
  143. const rightContent = document.getElementById('right-' + index)
  144. const leftContent = document.getElementById('left-' + index)
  145. if (rightContent && leftContent) {
  146. leftContent.style.height = rightContent.offsetHeight + 'px'
  147. }
  148. })
  149. })
  150. },
  151. recordBack() {
  152. this.$emit('back')
  153. EventBus.$emit('copd-reset-select')
  154. },
  155. getDealRecord(val) {
  156. this.serviceNode = val
  157. var vm = this
  158. vm.loading = true
  159. var params = {
  160. patient: vm.patient,
  161. type: vm.serviceNode
  162. }
  163. httpRequest.get('doctor/twoCancers/count/serviceRecord', { data: params }).then(function (res) {
  164. vm.events = res.obj.records
  165. vm.detailInfo = res.obj
  166. vm.loading = false
  167. })
  168. },
  169. getYearList() {
  170. for (var i = 0; i < 6; i++) {
  171. var year = new Date().getFullYear() - i
  172. this.yearList.push({ label: year, value: year })
  173. }
  174. this.yearList.push({ label: '自定义', value: 'customize' })
  175. },
  176. getTypeName(type) {
  177. return this.nodeList.find(function (item) {
  178. return item.value == type
  179. })?.label
  180. }
  181. },
  182. mounted() {
  183. var vm = this
  184. this.getDealRecord()
  185. this.getYearList()
  186. }
  187. })