index.js 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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. currentInfo: {},
  52. smokeArr: [],
  53. drinkArr: [],
  54. archivesArr: [],
  55. diseaseConversion: '',
  56. conversionArr: [],
  57. firstVisitTypeArr: [],
  58. educationalArr: [],
  59. educational: '',
  60. nationDict: [],
  61. nationName: '',
  62. communityArr: [],
  63. yearList: [{ label: '全部年份', value: '' }],
  64. nodeList: [
  65. { label: '全部节点', value: '' },
  66. { label: '居民预约', value: 1 },
  67. { label: '乳腺临床检查', value: 2 },
  68. { label: '辅助检查-乳腺超声', value: 3 },
  69. { label: '辅助检查-乳腺钼靶', value: 4 },
  70. { label: '乳腺病理学检查', value: 5 },
  71. { label: '乳腺外科门诊', value: 6 },
  72. { label: '乳腺癌治疗信息', value: 7 }
  73. ],
  74. nodeList2: [
  75. { label: '社区随访', value: 8 },
  76. { label: '妇科检查', value: 9 },
  77. { label: 'HPV', value: 10 },
  78. { label: '宫颈细胞学检查', value: 11 },
  79. { label: '初筛结果临床评估', value: 12 },
  80. { label: '阴道镜检查', value: 13 },
  81. { label: '阴道镜检查随访', value: 14 },
  82. { label: '组织病理学检查', value: 15 },
  83. { label: '组织病理学检查随访', value: 16 },
  84. { label: '最后诊断', value: 17 }
  85. ],
  86. serviceYear: '',
  87. customizeYear: [],
  88. serviceNode: '',
  89. changeModule: 1,
  90. moreFlag: true,
  91. detailInfo: {},
  92. detailData: {},
  93. type: '',
  94. readonly: ''
  95. }
  96. },
  97. watch: {
  98. formDialogVisible: function (val) {
  99. if (!val) {
  100. this.detailData = {}
  101. }
  102. }
  103. },
  104. methods: {
  105. showDetail(item) {
  106. this.title = item.typeName
  107. this.type = item.type
  108. this.detailData = {}
  109. var vm = this
  110. if (item.type == 1) {
  111. this.currentInfo = {
  112. id: this.detailInfo.screenId
  113. }
  114. this.readonly = true
  115. vm.formDialogVisible = true
  116. } else {
  117. var params = {
  118. id: item.id,
  119. screenId: this.detailInfo.screenId,
  120. type: item.type
  121. }
  122. httpRequest.get('doctor/twoCancers/count/tableDetail', { data: params }).then(function (res) {
  123. vm.detailData = {
  124. value: [
  125. {
  126. ...res.obj.entity
  127. }
  128. ]
  129. }
  130. vm.formDialogVisible = true
  131. })
  132. }
  133. },
  134. getMore() {
  135. this.moreFlag = !this.moreFlag
  136. if (this.moreFlag) {
  137. this.nodeList.splice(8, 10)
  138. } else {
  139. this.nodeList = [...this.nodeList, ...this.nodeList2]
  140. }
  141. },
  142. getNation() {
  143. var vm = this
  144. statisticAPI.getNationDict().then(function (res) {
  145. vm.nationDict = res.data
  146. vm.nationDict.forEach(function (item) {
  147. if (item.NATION_CODE == vm.followInfo.nation) {
  148. vm.nationName = item.NATION_NAME
  149. }
  150. })
  151. })
  152. },
  153. setLeftHeights() {
  154. this.$nextTick(() => {
  155. this.events.forEach((event, index) => {
  156. const rightContent = document.getElementById('right-' + index)
  157. const leftContent = document.getElementById('left-' + index)
  158. if (rightContent && leftContent) {
  159. leftContent.style.height = rightContent.offsetHeight + 'px'
  160. }
  161. })
  162. })
  163. },
  164. recordBack() {
  165. this.$emit('back')
  166. EventBus.$emit('copd-reset-select')
  167. },
  168. getDealRecord(val) {
  169. this.serviceNode = val
  170. var vm = this
  171. vm.loading = true
  172. var params = {
  173. patient: vm.patient,
  174. type: vm.serviceNode
  175. }
  176. httpRequest.get('doctor/twoCancers/count/serviceRecord', { data: params }).then(function (res) {
  177. if(res.status==200){
  178. vm.events = res.obj.records
  179. if(!vm.serviceNode){
  180. vm.detailInfo = res.obj
  181. }
  182. }else{
  183. alert(vm.message)
  184. }
  185. vm.loading = false
  186. })
  187. },
  188. getYearList() {
  189. for (var i = 0; i < 6; i++) {
  190. var year = new Date().getFullYear() - i
  191. this.yearList.push({ label: year, value: year })
  192. }
  193. this.yearList.push({ label: '自定义', value: 'customize' })
  194. },
  195. getTypeName(type) {
  196. return this.nodeList.find(function (item) {
  197. return item.value == type
  198. })?.label
  199. }
  200. },
  201. mounted() {
  202. var vm = this
  203. this.getDealRecord('')
  204. this.getYearList()
  205. }
  206. })