index.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. var template = ''
  2. $.ajax('../../../component/statistics/LascCervicalPathologicalExaminationList/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-pathological-examination-list', {
  14. template: template,
  15. props: ['data'],
  16. data: function () {
  17. return {
  18. readonlyTwo: 1,
  19. readonly: true,
  20. isShowPicker: false,
  21. columns: [],
  22. pickType: '',
  23. curItem: '',
  24. isShowDatePicker: false,
  25. activeDateField: '',
  26. date: '',
  27. minDate: moment().add(-100, 'year').toDate(),
  28. form: {
  29. screenId: '', //两癌筛查id
  30. list: []
  31. }
  32. }
  33. },
  34. methods: {},
  35. mounted() {
  36. if (this.data.value && this.data.value.length && this.data.value[0].id) {
  37. var form = JSON.parse(JSON.stringify(this.data.value))
  38. form.forEach(function (v) {
  39. if (v.pathologicalExaminationResult != 1) {
  40. var pathologicalExaminationResult = v.pathologicalExaminationResult
  41. v.pathologicalExaminationResult = []
  42. if (v.pathologicalExaminationAbnormal) {
  43. v.pathologicalExaminationAbnormal.split(',').forEach(function (m) {
  44. v.pathologicalExaminationResult.push(pathologicalExaminationResult + '-' + m)
  45. })
  46. }
  47. } else {
  48. v.pathologicalExaminationResult = v.pathologicalExaminationResult ? v.pathologicalExaminationResult.split(',') : ''
  49. }
  50. })
  51. this.form.list = form
  52. }
  53. }
  54. })