index.js 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. var template = ''
  2. $.ajax('../../../component/statistics/LascCervicalHistopathologyFollowup/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-histopathology-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: '',
  24. form: {
  25. screenId: '', //两癌筛查id
  26. list: []
  27. }
  28. }
  29. },
  30. template: template,
  31. created: function () {
  32. },
  33. watch:{
  34. data:{
  35. handler(newVal,oldVal){
  36. var vm = this
  37. this.form.screenId = this.data.screenId
  38. if (this.data.value && this.data.value.length) {
  39. var form = JSON.parse(JSON.stringify(this.data.value))
  40. if (vm.isStrEmpty(form[0].examineStatus)) {
  41. this.form.list = _.map(form, function (v) {
  42. return _.assign(vm.getDefItem(), v)
  43. })
  44. } else {
  45. _.each(form, function (m) {
  46. m.examineResultAbnorma = m.examineResultAbnorma.split(',')
  47. })
  48. this.form.list = form
  49. }
  50. }
  51. },
  52. deep:true
  53. }
  54. },
  55. methods: {
  56. isStrEmpty: function (str) {
  57. return typeof str === 'undefined' || str === null || str === ''
  58. },
  59. getDefItem: function (noDefault) {
  60. var tmp = {
  61. screenId: this.form.screenId,
  62. examineStatus: '', //病理学检查情况
  63. examineResult: '', //组织病理学检查结果
  64. examineResultAbnorma: [], //组织病理学检查结果异常
  65. examineResultAbnormaExplain: '', //组织病理学检查结果异常-其他
  66. diagnoseTimeStatus: '', //诊断日期(病理)
  67. diagnoseTime: '', //请选择诊断日期(病理)
  68. diagnoseOrgStatus: '', //诊断机构(病理)
  69. diagnoseOrg: '', //请输入诊断机构(病理)--暂时不用
  70. diagnoseOrgName: '', //请输入诊断机构(病理)
  71. notExaminedCause: '', //未接受检查的原因
  72. notExaminedCauseExplain: '', //未接受检查的原因-其他
  73. orgName: '', //随访机构
  74. org: '', //随访机构
  75. doctorName: '', //随访人员
  76. doctor: '', //随访人员
  77. followupTime: '' //随访时间
  78. }
  79. if (!noDefault) {
  80. tmp.orgName = docInfo.hospitalName
  81. tmp.org = docInfo.hospital
  82. tmp.doctorName = docInfo.name
  83. tmp.doctor = docInfo.code
  84. tmp.followupTime = moment().format('YYYY-MM-DD')
  85. }
  86. return tmp
  87. }
  88. }
  89. })