index.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. var template = ''
  2. $.ajax('../../../component/statistics/LascCervicalPreliminaryScreenEntity/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-preliminary-screen-entity', {
  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. preliminaryScreenResults: '', //
  31. preliminaryScreenOrg: docInfo.hospitalName, //检查机构
  32. preliminaryScreenUser: docInfo.name, //检查人员
  33. preliminaryScreenTime: '' //检查时间
  34. }
  35. }
  36. },
  37. methods: {},
  38. mounted() {
  39. var vm = this
  40. if (this.readonly && !this.form.preliminaryScreenOrg) {
  41. this.form = {
  42. screenId: '', //两癌筛查id
  43. preliminaryScreenResults: '', //
  44. preliminaryScreenOrg: '', //检查机构
  45. preliminaryScreenUser: '', //检查人员
  46. preliminaryScreenTime: '' //检查时间
  47. }
  48. } else {
  49. this.form = _.assign(this.form, this.data.value)
  50. this.form.screenId = this.data.value[0] && this.data.value[0].screenId
  51. }
  52. httpRequest
  53. .get('doctor/twoCancers/getPreliminaryScreenResults', {
  54. data: {
  55. screenId: this.form.screenId
  56. }
  57. })
  58. .then(function (ress) {
  59. vm.form.preliminaryScreenResults = ress.data || '1'
  60. })
  61. }
  62. })