index.js 5.4 KB

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