var template = '' $.ajax('../../../component/statistics/LascCervicalPathologicalExaminationList/index.html', { data: {}, dataType: 'html', cache: false, timeout: 60000, async: false, error: function (res) {}, success: function (res) { template = res } }) Vue.component('lasc-cervical-pathological-examination-list', { template: template, props: ['data'], data: function () { return { readonlyTwo: 1, readonly: true, isShowPicker: false, columns: [], pickType: '', curItem: '', isShowDatePicker: false, activeDateField: '', date: '', form: { screenId: '', //两癌筛查id list: [] } } }, methods: {}, mounted() { if (this.data.value && this.data.value.length && this.data.value[0].id) { var form = JSON.parse(JSON.stringify(this.data.value)) form.forEach(function (v) { if (v.pathologicalExaminationResult != 1) { var pathologicalExaminationResult = v.pathologicalExaminationResult v.pathologicalExaminationResult = [] if (v.pathologicalExaminationAbnormal) { v.pathologicalExaminationAbnormal.split(',').forEach(function (m) { v.pathologicalExaminationResult.push(pathologicalExaminationResult + '-' + m) }) } } else { v.pathologicalExaminationResult = v.pathologicalExaminationResult ? v.pathologicalExaminationResult.split(',') : '' } }) this.form.list = form } } })