12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- var Request = new Object()
- Request = GetRequest()
- var patient = Request.patient
- var routes = [
- {
- path: '/',
- component: IndexPage,
- children: [
- {
- path: '/',
- component: PersonEditPanel,
- redirect: 'person-edit-panel'
- },
- {
- path: 'person-new-panel',
- component: PersonNewPanel
- },
- {
- path: 'person-edit-panel',
- component: PersonEditPanel
- },
- {
- path: 'team-new-panel',
- component: TeamNewtPanel
- },
- {
- path: 'team-edit-panel',
- component: TeamEditPanel
- },
- {
- path: 'temp-send-panel',
- component: TempSendPanel
- },
- {
- path: 'system-send-panel',
- component: SystemSendPanel
- },
- {
- path: 'preview-panel',
- component: PreviewPanel
- }
- ]
- }
- ],
- router = new VueRouter({
- routes: routes
- }),
- storage = {
- docInfo: null,
- patient: patient || '', // url中patient,用来来判断是否是"发送"模式
- planId: null
- }
- new Vue({
- data: {},
- router: router,
- created: function () {
- var vm = this
- vm.loading.show()
- homeAPI.baseinfo().then(function (res) {
- if (res.status == 200) {
- vm.loading.close()
- var infoStr = JSON.stringify(res.data)
- localStorage.setItem('docInfo', infoStr)
- storage.docInfo = res.data
- vm.$mount('#app')
- } else {
- vm.loading.close()
- toastr && toastr.error(res.msg)
- }
- })
- },
- methods: {
- chooseTab: function (val) {
- this.selectedTab = val
- }
- }
- })
|