index.js 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. var template = ''
  2. $.ajax('../../../component/statistics/LascBreastPathologyInspectEntityList/index.html', {
  3. data: {},
  4. dataType: 'html',
  5. cache: false,
  6. timeout: 60000,
  7. async: false,
  8. error: function (res) {},
  9. success: function (res) {
  10. template = res
  11. }
  12. })
  13. Vue.component('lasc-breast-pathology-inspect-entity-list', {
  14. template: template,
  15. props: [],
  16. data: function () {
  17. return {
  18. isShowPicker: false,
  19. columns: ['非对称性腺体增厚', '乳头凹陷', '腋窝淋巴结肿大', '副乳腺', '乳腺切除术后'],
  20. pickType: '',
  21. curItem: '',
  22. readonly: true,
  23. orgColumns: ['', '厦门市妇幼保健院', '厦门市第一医院', '厦门市中山医院', '厦门市中医院', '复旦中山厦门医院', '厦门医学院附属第二医院', '其他(请说明)'],
  24. isShowDatePicker: false,
  25. isShowOrgsPicker: false,
  26. activeDateField: '',
  27. date: '',
  28. form: {
  29. screenId: '', //两癌筛查id
  30. receivePathologicalExamination: '2', //是否接收乳腺临床检查1拒绝2接收
  31. pathologicalExamTime: '',
  32. refusePathologicalExaminationReason: '医嘱取消',
  33. breastPathologyRefusalReason: [],
  34. breastPathologyRefusalReasonContent: '',
  35. list: [],
  36. id: ''
  37. },
  38. data: {
  39. value: [
  40. {
  41. id: 191,
  42. screenId: '808080f6837851d6018378ae0ddf0002',
  43. name: '乳腺病理学检查-20221026',
  44. refusePathologicalExaminationReason: '医嘱取消',
  45. leftPathologicalBiopsyMethod: '1',
  46. leftPathologicalConclusion: '5',
  47. leftPathologicalMalignanciesType: '3',
  48. leftPathologicalMalignanciesOtherType: '',
  49. rightPathologicalBiopsyMethod: '1',
  50. rightPathologicalConclusion: '5',
  51. rightPathologicalMalignanciesType: '1',
  52. rightPathologicalMalignanciesOtherType: '',
  53. breastCancerTreatmentResult: '1',
  54. pathologicalExaminationDiagnosisOrg: '厦门市中医院',
  55. pathologicalExaminationDiagnosisOrgType: null,
  56. pathologicalExaminationFollowupUser: '黄琴',
  57. pathologicalExaminationFollowupTime: '2022-10-26',
  58. doctor: null,
  59. inspectOrgCode: '3502110100',
  60. inspectUserCode: '361aef4891de492cb0e6a47cf9fe31f3',
  61. followupOrg: null,
  62. followupOrgCode: null,
  63. receivePathologicalExamination: '2',
  64. breastPathologyRefusalReason: null,
  65. breastPathologyRefusalReasonContent: null,
  66. pathologicalExamTime: null
  67. }
  68. ]
  69. }
  70. }
  71. },
  72. methods: {
  73. getPathologicalExaminationDiagnosisOrg: function (name) {
  74. if (name) {
  75. return _.contains(this.orgColumns, name) ? name : this.orgColumns[7]
  76. }
  77. return ''
  78. },
  79. difference: function (field, excludes) {
  80. return _.difference(field, excludes)
  81. }
  82. },
  83. created() {
  84. var vm = this
  85. if (this.data.value && this.data.value.length && this.data.value[0].id) {
  86. var first = this.data.value[0]
  87. this.form.screenId = first.screenId
  88. this.form.id = first.id ? first.id : ''
  89. this.form.receivePathologicalExamination = first.receivePathologicalExamination
  90. this.form.refusePathologicalExaminationReason = first.refusePathologicalExaminationReason
  91. this.form.breastPathologyRefusalReason = first.breastPathologyRefusalReason ? first.breastPathologyRefusalReason.split(',') : []
  92. this.form.breastPathologyRefusalReasonContent = first.breastPathologyRefusalReasonContent
  93. this.form.pathologicalExamTime = first.pathologicalExamTime
  94. var formData = JSON.parse(JSON.stringify(this.data.value))
  95. formData.forEach(function (v) {
  96. var left = { boxShow: false, name: '左乳' },
  97. right = { boxShow: false, name: '右乳' }
  98. for (var k in v) {
  99. if (k.indexOf('right') === 0) {
  100. right[k] = v[k]
  101. if (k == 'rightPathologicalBiopsyMethod') {
  102. right[k] = right[k] ? right[k].split(',') : []
  103. }
  104. if (k == 'rightPathologicalMalignanciesType') {
  105. right[k] = right[k] ? right[k].split(',') : []
  106. }
  107. } else if (k.indexOf('left') === 0) {
  108. left['right' + k.substring(4)] = v[k]
  109. if (k == 'leftPathologicalBiopsyMethod') {
  110. left['right' + k.substring(4)] = left['right' + k.substring(4)] ? left['right' + k.substring(4)].split(',') : ''
  111. }
  112. if (k == 'leftPathologicalMalignanciesType') {
  113. left['right' + k.substring(4)] = left['right' + k.substring(4)] ? left['right' + k.substring(4)].split(',') : ''
  114. }
  115. }
  116. }
  117. v.breastList = [right, left]
  118. v.pathologicalExaminationDiagnosisOrgPick = vm.getPathologicalExaminationDiagnosisOrg(v.pathologicalExaminationDiagnosisOrg)
  119. })
  120. this.form.list = formData
  121. }
  122. }
  123. })