var docInfo = JSON.parse(window.localStorage.getItem('wlyyAgent'));
var TemplateList = {
template: '
',
props: [],
data: function() {
return {
items: []
}
},
created: function() {
var vm = this
vm.findTemplateList()
EventBus.$on("refresh-index",function() {
vm.findTemplateList()
})
},
mounted: function() {
var vm = this
},
methods: {
findTemplateList: function() {
var vm = this
rehaAPI.findTemplateList({
doctor: storage.docInfo.uid
}).then(function(res) {
vm.items = res.data
})
},
showTemplateDetail: function(o) {
var vm = this
vm.$router.push({
path:'/template-items',
query: {
name: o.title,
isNew: false,
templateId: o.id
}
})
},
newTemplate: function() {
var vm = this
vm.$router.push('/new-template-form')
}
}
}