index.js 2.5 KB

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