index.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. var template = ''
  2. $.ajax('../../../component/statistics/LascCervicalColposcopyEntityList/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-colposcopy-entity-list', {
  14. props: ['data'],
  15. data: function () {
  16. return {
  17. readonlyTwo: 1,
  18. readonly: true,
  19. isShowPicker: false,
  20. columns: [],
  21. pickType: '',
  22. curItem: '',
  23. isShowDatePicker: false,
  24. activeDateField: '',
  25. date: '',
  26. form: {
  27. screenId: '', //两癌筛查id
  28. list: []
  29. }
  30. }
  31. },
  32. template: template,
  33. created: function () {
  34. if (this.data.value && this.data.value.length && this.data.value[0].id) {
  35. this.form.list = this.data.value
  36. }
  37. },
  38. watch:{
  39. data:{
  40. handler(newVal,oldVal){
  41. if (this.data.value && this.data.value.length && this.data.value[0].id) {
  42. this.form.list = this.data.value
  43. }
  44. },
  45. deep:true
  46. }
  47. },
  48. methods: {}
  49. })