var ItemDetail = { template: '
\
\
\
项目名称
\
{{item.specialistServiceItemDO.title}}
\
\
\
项目内容
\
{{item.specialistServiceItemDO.content}}
\
\
\
项目类型
\
{{itemTypes[item.specialistServiceItemDO.itemType]}}
\
\
\
服务机构
\
{{item.hospitalName}}
\
\
\
服务地点
\
{{item.hospitalDo.address}}
\
\
\ \ 返回\ \
', props: [], data: function() { return { item: { specialistServiceItemDO: {}, hospitalName: "", hospitalDo: {} }, itemTypes: ["","诊疗服务","健康服务"], itemId: "" } }, beforeRouteEnter: function(to, from, next) { next(function(vm) { var query = vm.$route.query vm.itemId = query.itemId rehaAPI.selectByIds({ ids: JSON.stringify([vm.itemId]) }).then(function(res) { if(res.status == 200) { var data = res.data[0] if(data) { vm.item = data } } else { } }) }) }, created: function() { var vm = this }, mounted: function() { var vm = this }, methods: { goBack: function() { this.$router.back() } } }