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. form: {
  28. screenId: '', //两癌筛查id
  29. list: []
  30. }
  31. }
  32. },
  33. methods: {},
  34. mounted() {
  35. if (this.data.value && this.data.value.length && this.data.value[0].id) {
  36. var form = JSON.parse(JSON.stringify(this.data.value))
  37. form.forEach(function (v) {
  38. if (v.pathologicalExaminationResult != 1) {
  39. var pathologicalExaminationResult = v.pathologicalExaminationResult
  40. v.pathologicalExaminationResult = []
  41. if (v.pathologicalExaminationAbnormal) {
  42. v.pathologicalExaminationAbnormal.split(',').forEach(function (m) {
  43. v.pathologicalExaminationResult.push(pathologicalExaminationResult + '-' + m)
  44. })
  45. }
  46. } else {
  47. v.pathologicalExaminationResult = v.pathologicalExaminationResult ? v.pathologicalExaminationResult.split(',') : ''
  48. }
  49. })
  50. this.form.list = form
  51. console.log('99999999999999999', this.form)
  52. }
  53. }
  54. })