index.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. watch:{
  35. data:{
  36. handler(newVal,oldVal){
  37. if (this.data.value && this.data.value.length && this.data.value[0].id) {
  38. var form = JSON.parse(JSON.stringify(this.data.value))
  39. form.forEach(function (v) {
  40. if (v.pathologicalExaminationResult != 1) {
  41. var pathologicalExaminationResult = v.pathologicalExaminationResult
  42. v.pathologicalExaminationResult = []
  43. if (v.pathologicalExaminationAbnormal) {
  44. v.pathologicalExaminationAbnormal.split(',').forEach(function (m) {
  45. v.pathologicalExaminationResult.push(pathologicalExaminationResult + '-' + m)
  46. })
  47. }
  48. } else {
  49. v.pathologicalExaminationResult = v.pathologicalExaminationResult ? v.pathologicalExaminationResult.split(',') : ''
  50. }
  51. })
  52. this.form.list = form
  53. console.log('99999999999999999', this.form)
  54. }
  55. },
  56. deep:true
  57. }
  58. },
  59. mounted() {
  60. }
  61. })