index.js 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. var template = ''
  2. $.ajax('../../../component/statistics/LascCervicalColposcopyFollowup/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-cervical-colposcopy-followup', {
  14. props: ['data'],
  15. data: function () {
  16. return {
  17. readonlyTwo: 1,
  18. readonly: true,
  19. pickType: '',
  20. curItem: '',
  21. isShowDatePicker: false,
  22. date: '',
  23. minDate: moment().add(-100, 'year').toDate(),
  24. form: {
  25. screenId: '', //两癌筛查id
  26. list: []
  27. }
  28. }
  29. },
  30. template: template,
  31. watch:{
  32. data:{
  33. handler(newVal,oldVal){
  34. var vm = this
  35. if (this.data.value && this.data.value.length) {
  36. var form = JSON.parse(JSON.stringify(this.data.value))
  37. if (vm.isStrEmpty(form[0].examineStatus)) {
  38. this.form.list = _.map(form, function (v) {
  39. return _.assign(vm.getDefItem(), v)
  40. })
  41. } else {
  42. _.each(form, function (m) {
  43. m.examineCauseResultAbnormal = m.examineCauseResultAbnormal.split(',')
  44. })
  45. this.form.list = form
  46. }
  47. }
  48. },
  49. deep:true
  50. }
  51. },
  52. created: function () {
  53. },
  54. methods: {
  55. getDefItem: function (noDefault) {
  56. var tmp = {
  57. screenId: this.form.screenId,
  58. examineStatus: '', //阴道镜检查情况
  59. costStatus: '', //阴道镜检查费用情况
  60. examineTimeStatus: '', //阴道镜检查时间
  61. examineTime: '', //请选择阴道镜检查时间
  62. colposcopyOrgStatus: '', //阴道镜检查机构
  63. colposcopyOrg: '', //请输入阴道镜检查机构 暂时不用
  64. colposcopyOrgName: '', //请输入阴道镜检查机构
  65. tentativeDiagnosis: '', //阴道镜检查初步诊断
  66. tentativeDiagnosisAbnormal: '', //阴道镜检查初步诊断异常
  67. tentativeDiagnosisAbnormalExplain: '', //阴道镜检查初步诊断异常-其他
  68. pathologyExamine: '', //是否需组织病理检查
  69. acceptExamine: '', //接受组织病理学检查
  70. notExamineCause: '', //组织病理学检查-未接受检查的原因
  71. notExamineCauseExplain: '', //组织病理学检查-未接受检查的原因-其他
  72. examineCauseResult: '', //组织病理学检查结果
  73. examineCauseResultAbnormal: [], //组织病理学检查结果异常
  74. examineCauseResultAbnormalExplain: '', //组织病理学检查结果异常-其他
  75. colposcopyTime: '', //计划行阴道镜检查时间
  76. notExamineCauseOther: '', //阴道镜检查情况-未接受检查的原因
  77. notExamineCauseOtherCause: '', //阴道镜检查情况-未接受检查的原因-其他
  78. orgName: '', //随访机构
  79. org: '', //随访机构
  80. doctorName: '', //随访人员
  81. doctor: '', //随访人员
  82. followupTime: '' //随访时间
  83. }
  84. if (!noDefault) {
  85. tmp.orgName = docInfo.hospitalName
  86. tmp.org = docInfo.hospital
  87. tmp.doctorName = docInfo.name
  88. tmp.doctor = docInfo.code
  89. tmp.followupTime = moment().format('YYYY-MM-DD')
  90. }
  91. return tmp
  92. },
  93. isStrEmpty: function (str) {
  94. return typeof str === 'undefined' || str === null || str === ''
  95. }
  96. }
  97. })