index.js 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. created: function () {
  32. var vm = this
  33. if (this.data.value && this.data.value.length) {
  34. var form = JSON.parse(JSON.stringify(this.data.value))
  35. if (vm.isStrEmpty(form[0].examineStatus)) {
  36. this.form.list = _.map(form, function (v) {
  37. return _.assign(vm.getDefItem(), v)
  38. })
  39. } else {
  40. _.each(form, function (m) {
  41. m.examineCauseResultAbnormal = m.examineCauseResultAbnormal.split(',')
  42. })
  43. this.form.list = form
  44. }
  45. }
  46. },
  47. methods: {
  48. getDefItem: function (noDefault) {
  49. var tmp = {
  50. screenId: this.form.screenId,
  51. examineStatus: '', //阴道镜检查情况
  52. costStatus: '', //阴道镜检查费用情况
  53. examineTimeStatus: '', //阴道镜检查时间
  54. examineTime: '', //请选择阴道镜检查时间
  55. colposcopyOrgStatus: '', //阴道镜检查机构
  56. colposcopyOrg: '', //请输入阴道镜检查机构 暂时不用
  57. colposcopyOrgName: '', //请输入阴道镜检查机构
  58. tentativeDiagnosis: '', //阴道镜检查初步诊断
  59. tentativeDiagnosisAbnormal: '', //阴道镜检查初步诊断异常
  60. tentativeDiagnosisAbnormalExplain: '', //阴道镜检查初步诊断异常-其他
  61. pathologyExamine: '', //是否需组织病理检查
  62. acceptExamine: '', //接受组织病理学检查
  63. notExamineCause: '', //组织病理学检查-未接受检查的原因
  64. notExamineCauseExplain: '', //组织病理学检查-未接受检查的原因-其他
  65. examineCauseResult: '', //组织病理学检查结果
  66. examineCauseResultAbnormal: [], //组织病理学检查结果异常
  67. examineCauseResultAbnormalExplain: '', //组织病理学检查结果异常-其他
  68. colposcopyTime: '', //计划行阴道镜检查时间
  69. notExamineCauseOther: '', //阴道镜检查情况-未接受检查的原因
  70. notExamineCauseOtherCause: '', //阴道镜检查情况-未接受检查的原因-其他
  71. orgName: '', //随访机构
  72. org: '', //随访机构
  73. doctorName: '', //随访人员
  74. doctor: '', //随访人员
  75. followupTime: '' //随访时间
  76. }
  77. if (!noDefault) {
  78. tmp.orgName = docInfo.hospitalName
  79. tmp.org = docInfo.hospital
  80. tmp.doctorName = docInfo.name
  81. tmp.doctor = docInfo.code
  82. tmp.followupTime = moment().format('YYYY-MM-DD')
  83. }
  84. return tmp
  85. },
  86. isStrEmpty: function (str) {
  87. return typeof str === 'undefined' || str === null || str === ''
  88. }
  89. }
  90. })