index.js 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. var template = ''
  2. var docInfo = JSON.parse(window.localStorage.getItem('docInfo'))
  3. $.ajax('../../../component/statistics/LascCervicalFinalDiagnosisEntity/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('lasc-cervical-final-diagnosis-entity', {
  15. props: ['data'],
  16. data: function () {
  17. return {
  18. readonlyTwo: 1,
  19. readonly: true,
  20. isShowPicker: false,
  21. pathologicalShowDatePicker: false,
  22. columns: [],
  23. pickType: '',
  24. curItem: '',
  25. pathologicalCurItem: '',
  26. pathologicalPickType: '',
  27. pathologicalDate: '',
  28. isShowDatePicker: false,
  29. activeDateField: '',
  30. date: '',
  31. form: {
  32. screenId: '', //两癌筛查id
  33. finalDiagnosisResult: '1', //最后诊断
  34. finalDiagnosisAbnormal: [], //最后诊断 - 异常内容
  35. finalDiagnosisMalignantTumors: '', //最后诊断 - 异常内容 - 其他恶性肿瘤说明
  36. finalDiagnosisOtherAbnormal: '', //最后诊断 - 异常内容 - 其他异常描述
  37. finalDiagnosisOrg: docInfo.hospitalName, //检查机构
  38. finalDiagnosisUser: docInfo.name, //检查人员
  39. finalDiagnosisTime: '', //检查时间
  40. cervicalLesionsFollowStatus: '', //宫颈病变随访情况
  41. cervicalLesionsTreatment: '', //宫颈病变接受治疗
  42. cervicalLesionsUnbehandeltReason: '', //宫颈病变接受治疗 - 未接收治疗原因
  43. cervicalLesionsTreatmentMethod: '', //治疗方法
  44. cervicalLesionsTreatmentOther: '', //治疗方法 - 其他
  45. followUpOrg: '', //治疗机构
  46. followUpTime: '', //治疗日期
  47. acceptPathologicalExamination: '', //接受组织病理学检查
  48. refusePathologicalExaminationReason: '', //未接受检查的原因
  49. refusePathologicalExaminationReasonOther: '', // 未接受检查的其他原因
  50. pathologicalExaminationResult: [], //组织病理学检查结果
  51. pathologicalExaminationAbnormalOther: '', //组织病理学其他描述
  52. pathologicalExaminationOrg: docInfo.hospitalName, // 检查机构
  53. pathologicalExaminationUser: docInfo.name, //检查人员
  54. pathologicalExaminationTime: '' //检查时间
  55. }
  56. }
  57. },
  58. template: template,
  59. mounted() {
  60. if(this.data&&this.data.value&&this.data.value.length!=0){
  61. var form = JSON.parse(JSON.stringify(this.data.value[0]))
  62. console.log(form, 'formformform111111111111111')
  63. if (!this.readonly) {
  64. this.form = {
  65. screenId: '', //两癌筛查id
  66. finalDiagnosisResult: '', //最后诊断
  67. finalDiagnosisAbnormal: [], //最后诊断 - 异常内容
  68. finalDiagnosisMalignantTumors: '', //最后诊断 - 异常内容 - 其他恶性肿瘤说明
  69. finalDiagnosisOtherAbnormal: '', //最后诊断 - 异常内容 - 其他异常描述
  70. finalDiagnosisOrg: '', //检查机构
  71. finalDiagnosisUser: '', //检查人员
  72. finalDiagnosisTime: '', //检查时间
  73. cervicalLesionsFollowStatus: '', //宫颈病变随访情况
  74. cervicalLesionsTreatment: '', //宫颈病变接受治疗
  75. cervicalLesionsUnbehandeltReason: '', //宫颈病变接受治疗 - 未接收治疗原因
  76. cervicalLesionsTreatmentMethod: '', //治疗方法
  77. cervicalLesionsTreatmentOther: '', //治疗方法 - 其他
  78. followUpOrg: '', //治疗机构
  79. followUpTime: '', //治疗日期
  80. acceptPathologicalExamination: '', //接受组织病理学检查
  81. refusePathologicalExaminationReason: '', //未接受检查的原因
  82. refusePathologicalExaminationReasonOther: '', // 未接受检查的其他原因
  83. pathologicalExaminationResult: [], //组织病理学检查结果
  84. pathologicalExaminationAbnormalOther: '', //组织病理学其他描述
  85. pathologicalExaminationOrg: '', // 检查机构
  86. pathologicalExaminationUser: '', //检查人员
  87. pathologicalExaminationTime: '' //检查时间
  88. }
  89. } else {
  90. console.log(form, 'formformform')
  91. form.finalDiagnosisAbnormal = (form.finalDiagnosisAbnormal && form.finalDiagnosisAbnormal.split(',')) || []
  92. form.pathologicalExaminationResult = (form.pathologicalExaminationResult && form.pathologicalExaminationResult.split(',')) || []
  93. this.form = _.assign(this.form, form)
  94. this.form.screenId = this.data.screenId
  95. console.log('1111111111111111',this.form)
  96. }
  97. }
  98. },
  99. watch:{
  100. 'data':{
  101. handler(newVal,oldVal){
  102. if(this.data&&this.data.value&&this.data.value.length!=0){
  103. var form = JSON.parse(JSON.stringify(this.data.value[0]))
  104. console.log(form, 'formformform111111111111111')
  105. if (!this.readonly) {
  106. this.form = {
  107. screenId: '', //两癌筛查id
  108. finalDiagnosisResult: '', //最后诊断
  109. finalDiagnosisAbnormal: [], //最后诊断 - 异常内容
  110. finalDiagnosisMalignantTumors: '', //最后诊断 - 异常内容 - 其他恶性肿瘤说明
  111. finalDiagnosisOtherAbnormal: '', //最后诊断 - 异常内容 - 其他异常描述
  112. finalDiagnosisOrg: '', //检查机构
  113. finalDiagnosisUser: '', //检查人员
  114. finalDiagnosisTime: '', //检查时间
  115. cervicalLesionsFollowStatus: '', //宫颈病变随访情况
  116. cervicalLesionsTreatment: '', //宫颈病变接受治疗
  117. cervicalLesionsUnbehandeltReason: '', //宫颈病变接受治疗 - 未接收治疗原因
  118. cervicalLesionsTreatmentMethod: '', //治疗方法
  119. cervicalLesionsTreatmentOther: '', //治疗方法 - 其他
  120. followUpOrg: '', //治疗机构
  121. followUpTime: '', //治疗日期
  122. acceptPathologicalExamination: '', //接受组织病理学检查
  123. refusePathologicalExaminationReason: '', //未接受检查的原因
  124. refusePathologicalExaminationReasonOther: '', // 未接受检查的其他原因
  125. pathologicalExaminationResult: [], //组织病理学检查结果
  126. pathologicalExaminationAbnormalOther: '', //组织病理学其他描述
  127. pathologicalExaminationOrg: '', // 检查机构
  128. pathologicalExaminationUser: '', //检查人员
  129. pathologicalExaminationTime: '' //检查时间
  130. }
  131. } else {
  132. console.log(form, 'formformform')
  133. form.finalDiagnosisAbnormal = (form.finalDiagnosisAbnormal && form.finalDiagnosisAbnormal.split(',')) || []
  134. form.pathologicalExaminationResult = (form.pathologicalExaminationResult && form.pathologicalExaminationResult.split(',')) || []
  135. this.form = _.assign(this.form, form)
  136. this.form.screenId = this.data.screenId
  137. console.log('1111111111111111',this.form)
  138. }
  139. }
  140. },
  141. deep:true
  142. }
  143. },
  144. methods: {}
  145. })