12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- var ItemDetail = {
- template: '<div class="plr10 ptb10 c-position-r item-detail-wrap">\
- <div class="item-detail-innerwrap">\
- <div class="item-detail">\
- <div class="c-f14 c-999 plr10 item-detail-name">项目名称</div>\
- <div class="c-f14 c-666 ptb10 plr10">{{item.specialistServiceItemDO.title}}</div>\
- </div>\
- <div class="item-detail mt20">\
- <div class="c-f14 c-999 plr10 item-detail-name">项目内容</div>\
- <div class="c-f14 c-666 ptb10 plr10">{{item.specialistServiceItemDO.content}}</div>\
- </div>\
- <div class="item-detail mt20">\
- <div class="c-f14 c-999 plr10 item-detail-name">项目类型</div>\
- <div class="c-f14 c-666 ptb10 plr10">{{itemTypes[item.specialistServiceItemDO.itemType]}}</div>\
- </div>\
- <div class="item-detail mt20">\
- <div class="c-f14 c-999 plr10 item-detail-name">服务机构</div>\
- <div class="c-f14 c-666 ptb10 plr10">{{item.hospitalName}}</div>\
- </div>\
- <div class="item-detail mt20">\
- <div class="c-f14 c-999 plr10 item-detail-name">服务地点</div>\
- <div class="c-f14 c-666 ptb10 plr10">{{item.hospitalDo.address}}</div>\
- </div>\
- </div>\
- <a class="back-btn c-t-center mr15" @click="goBack">\
- 返回\
- </a>\
- </div>',
- 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()
- }
- }
- }
|