mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-12 06:15:45 +08:00
This is the first commit for changes and integration with ADempiere UI, the pull request have very to long commits, here is a squash and merge, for detail refere to https://github.com/erpcya/adempiere-vue with committers: - [Yamel Senih](https://github.com/yamelsenih) - [Raúl Muñoz](https://github.com/Raul-mz) - [Edwin Betancourt](https://github.com/EdwinBetanc0urt) - [Leonel Matos](https://github.com/leonel1524) - [Elsio Sanchez](https://github.com/elsiosanchez) * add server error message (#571) * Feature/collapse avanced search (#572) * add server error message * add collasep to advanced search * bugfix load data ordered (#573) * Fix share values from panel. (#574) * Fix share values from panel. * Parsed values. * support refresh and field updata (#575) * refresh * bugfix load data ordered * minimal changes * Fix parameters to share data type date and boolean. (#576) * Change search browser. (#577) * read url parameters and load data (#578) * Fix error when search browser list. (#579) * Fix error when search browser list. * Minimal changes. * Update Dictionary and business data client version * bugfix share link with props (#580) * bugfix copy link with uuid * bugfix share link with props * Add support conditions to object list from criteria. (#581) * bugfix record navigation in left table (#582) * add export-browser (#583) * add export browser * minimal changes * wait for service * add window report * bugfix load report with link shared (#584) * bugfix copy link with uuid * bugfix share link with props * bugfix load report with link shared * Rollback support to window. (#585) * Rollback support to window. * Minimal changes. * support Mandatory Field (#586) * support Mandatory Field * delete comment * bugfix share link from avanced query (#588) * bugfix copy link with uuid * bugfix share link with props * bugfix load report with link shared * bugfix share link from avanced query * Fix optional fields showed from user. (#589) * Fix optional fields showed from user. * Remove destructuring assignment. * message error serve (#587) * message error serve * remove console * remove error code * minimal changes * bugfix change records in record navigation (#590) * bugfix record navigation in left table * bugfix change records in record navigation * support process Activity (#592) * support processActivity * minimal changes * Load one group field to advanced query. (#593) * Load one group field to advanced query. * Minimal changes. * bugfix load record with criteria method (#594) * support refrest menu contexto (#595) * Add new version from business data * Fix read only fields. (#591) * Fix read only fields. * Minimal changes. * Add all field list in panel advanced query. (#596) * fix set date with context (#597) * support logs Process Activity (#598) * support for the logs of Process Activity * support logs Process Activity * remove console.log * Update data in main panel when update list from server. (#599) * Update data in main panel when update list from server. * Update comments. * Update conditional to update main panel. * First commit to data load children. (#600) * bugfix change tag view title and rename variables (#601) * Fix add optional fields to advanced query. (#602) * Fix add optional fields to advanced query. * Add attribute to advanced query. * Fix variable name. * Fix change roles in navigation bar and view profile. (#603) * Fix send all parameters by advanced query. (#604) * bugfix close tag after process execute (#605) * bugfix load windows process without fields (#606) * clear fields when the window is closed (#607) * clear field of process * minimal changes * add report type to share link of reports (#608) * Fix context menu. (#609) * bugfix reload parameters after close SB (#610) * bugfix reload parameters after close SB * change condition * add ZoomIn ProcessActivity (#611) * add ZoomIn ProcessActivity * add parameters * Update es.js Fix Variable Name * Update index.vue Fix Variable Name * Update en.js * bugfix close window after process (#613) * bugfix close window after process * bugfix close views after execute SB process * support refresh the SmartBrowser (#614) * Remove data after close view. (#612) * Remove data after close view. * Clear data in tabs children when change uuid in main panel. * Fix load data in tabs children. (#615) * Fix load data in tabs children. * Send where clause. * bugfix load data whith criteria conditions (#616) * bugfix load data whith criteria conditions * remove unnecessary functions * change import function and change component name (#617) * add reference mobile (#618) * fix function calling (#619) * support mobile (#620) * remove advanced query option from child tabs * support mobile * Fix load data tab children and not send row tab (edit mode). (#621) * bugfix execute report formats (#622) * support datatable y and contextmenu (#623) * Fix load display column, record navigation. (#624) * some bugfix in advanced query panel (#625) * support for the range date and the title of the processes and reports (#626) * add option select last week range date * adjust the height of the title of the processes and reports * fix create new action error (#627) * Remove duplicate request to server by Tabs and Fields children. (#628) * Fix display value NULL in TextField component. (#630) * Smart browser support when opening the process Activity (#631) * support to record load in the table * add dispatch isClearSelection * adding conditional * minimal changes * Update contextMenuMixin.js * bugfix in share link report and process properties (#632) * fix open report viewer on process return error (#633) * feat: Add create entity in tab children. (#634) * feat: Add create entity in tab children. * Fix route query action when create entity in tab children. * feat: Add notification after delete selection records in table. (#636) * feat: Add notification after delete selection records in table. * Add destructuring of object. * Fix fields list mandatory empty when create/update in table. (#635) * feat: Add create entity in tab children. * Fix route query action when create entity in tab children. * Fix fields list mandatory empty when create/update in table. * fix: Create entity from main panel. (#637) * add condition (#638) * fix values of date parameters in share link (#639) * Support DateRange week (#640) * Add Summary to logs (#641) * support daterange week (#642) * Support DateRange week * minimal changes * Auto stash before merge of "bugfix/support-date-range-week" and "develop-i18n" * fix: Search browser when change show/hidden field not isQueryCriteria. (#643) * change displayed fields on advanced query (#644) * add summary to logs (#645) * fix create new action query (#646) * fix: Not load tabs not supported (isSortTab and isTranslationTab) (#647) * Change version * remove refresh the tabs children (#648) * remove refresh the tabs children * column top of the table of the select * minimal changes * fix: Create entity in table send server after change field. (#649) * add loading (#650) * add loading * rename isLoaded * add translations * add translations * add message * report control error (#651) * Add mark (*) mandatory fields in table. (#652) * fix: Exception not handled, add message when capturing error in promise. (#653) * fix: Correct loading into table when it has 0 records. (#654) * fix: Correct loading into table when it has 0 records. If the search returns 0 records the DataTable remains loading even when that was its response, giving the confucion that it is still waiting for the response from the server. * Minimal changes. * fix: Hide search notification for language and role. (#655) * add hidden main panel (#656) * fix: Show fields with default values. (#658) * fix load records in left table (#657) * support the hide panel button (#660) * add icon create new (#659) * add icon create new * setting the add button * fix: Delete record and selection in browser after run process. (#661) * fix load parameters of share link (#662) * open report from the window (#663) * open report from the window * resolve Conflicts * fix references disabled * Remove console.log (#664) * fix: Load data tab children after set context main panel. (#665) * add lastrun to the process Activity (#667) * fix: Lookups context. (#668) * fix: Set is load context not report and process. (#669) * fix: Set is load context not report and process. * Minimal changes. * Change evaluate multiple conditions. * feat: Add display column in add new row with value or default values. (#670) * feat: Add display column in add new row with value or default values. * Add comments. * Fixing navigation height between records (#671) * Fixing navigation height between records * minimal changes * support recent intems * fix: Context for window request. TODO: Add AD_User_ID in user info gRPC. (#672) * feat: Add last run to process activity. (#673) * feat: Add last run to process activity. * Change convert parameters to object in vuex store. * fix: Run process error. * Update source packages version * Update access version * fix: Do not show loading when the data request returns error. (#675) * feat: Add support to fields isEncrypted (type password). (#677) * fixing translation (#678) * fix display panel and fields in advanced query (#676) * fix display panel and fields in advanced query * bugfix filter fields in advanced query * fix load values in lookup component (#679) * filter fields exclude buttons on adavanced query (#680) * fix: Add display column to field link in tab. (#681) * feat: Add support to default context. (#682) TODO: Add default context in session info. * feat: Add field length to field text as max length attribute. (#683) * Add support to latest version from access * button setting to close table panel or expand (#684) * fix activities order by date (#685) * add date translations in process activity * fix activities order by date * fix: Handle data request error to leave loading the table. (#686) * fix: Smart Browser, research data when records length > 100. (#687) * fix: Smart Browser, research data when records length > 100. * Correct variable evaluation. * fix close report (#688) * Evaluate server response error by dictionary (#689) * Evaluate server response error by dictionary * Support Smart Browser and Process * minimal changes * fixed color and size of icon datatable (#690) * fixed color and size of icon datatable * minimal changes * add clearable * fix: Create request field mandatory number 0. (#691) * validate edit mode until ready to save (#692) * validate edit mode until ready to save * correcting condition * add child tab to url and share link (#693) * feat: Add support to new session request. (#694) * multiple record support (#695) * fix delete data after close window (#696) * fix load view on reapeted route * fix delete data after close window * feat: Add read only row from table. (#697) * feat: Add read only row from table. * Add read only if client context is different to client record. * add call off record (#698) * date error when executing (#699) * feat: Add validation read only with parent record is read only. (#700) * feat: Add validation read only with parent record is read only. * Minimal changes. * fix: Run process associate with Smart Browser or Window. (#702) * restore create new record of datatable child (#701) * restore create new record of datatable child * restore change * minimal changes * restoring values in the table * fix: Create new main panel, clear records to tabs children. (#703) * validate multiple record (#704) * validate multiple record * validate isEdit datatable children * Add new version for data * Add new version for data * add show to password type field (#705) * validate multiple record * add show to password type field * fix: Change evaluation of conditionals to add new row. (#706) * feat: Keep rows in edit mode after listing by creating record. (#707) * fix: Fix get lookup to window navigation. (#708) * fix: Parse default values to create or update record. (#709) * bugfix set tab child in URL (#710) * support height datable (#711) * fix: Read Only from processed and processing record. (#712) * Support badge and column fixed (#713) * support height datable * support badge * raname badge (#714) * no recharge view on changes (#715) * bugfix style of badge (#717) * change tabNumber query prop for tabParent (#718) * bugfix set tab child in URL * change tabNumber query prop for tabParent * fix: Pagination and total records. (#719) * Support duplicate lookup (#721) * set advanced search (#716) * field auto focus (#720) * field auto focus * bugfix * some changes * change method * remove unused attributes * fix: Add display column from server to add new row. (#723) * set values in main panel to share link (#725) * fix: Add new record data tables. (#726) * support LookupList (#724) * support LookupList * fix: Add display column from server to add new row. * delete isDisabledAddNewIcono * remove highlight current row of data table (#722) * fix: Tag view undefined. (#727) * fix: Get display column from server to add new row. (#729) * remove unused conditions (#730) * support style collapse item (#731) * clear panel values when view is closed (#732) * fix: Get multiple request data. (#733) * bugfix open process activity view (#736) * Evaluate values of the displayColumn with empty string or number at 0 (#737) * Evaluate values of the displayColumn with empty string or number at 0 * documenting evaluation * fix route from process activity to process view (#735) * bugfix conditions of tags views (#738) * bugfix infinity loading in datatable on new record (#734) * bugfix maxlength in process (#739) * feat: Add support to callout. (#741) * feat: Add callout support. * feat: Add support to callout. * Evaluate Column display values with empty string or number in 0u8 evaluation (#740) * bugfix close window after delete record (#742) * bugfix change panel records (#743) * fix: Error input text when show/hidden column DataTables. (#744) * fix: Remove duplicate code to focus field. (#745) * add change value of image (#746) * fix: Disable roles that do not have uuid in the registry (#747) * Add new version for gRPC data client * fix: Remove multiple request data from server. (#748) * Support duplicate or null data lookup (#749) * bugfix (#750) * Bugfix/parsed boolean context (#751) * bugfix * fix: Parsed context convert Boolean values to string values in query. * feat: Add support to callout response. (#752) * bugfix * feat: Add support to callout response to change panel values. * remove concole.log. * fix: Not send callout if is panel change. (#753) * fix: Not request callout when navigation records. (#755) * Update business data client from latest * Reduce time transition menu (#754) * fix: Set null values before reset panel to new. (#756) * fix: Set null values before reset panel to new. * Add oldValue. * add windowNo to callout store (#757) * bugfix record void in tabs (#758) * Update data version * feat: Add callout request to tab children. (#759) * feat: Add callout request to tab children. * Minimal changes. * bugfix context default values (#762) * bugfix void values from gRPC (#763) * feat: Add support for empty gRPC values. (#764) * feat: Add support for empty gRPC values. * Update comments. * tab record load and reduce requests to the server (#765) * tab record load and reduce requests to the server * duplicate keys Lookups * add forget password (#761) * add forget password * remove console * rename translation * minimal changes * Minimal Changes * duplicate data and string type (#766) * Support duplicate data and string type * minimal changes * update grpc-access-client version (#768) * bugfix load values after callout response (#769) * feat: Add support enrollment. (#767) * feat: Add support enrollment. * Update enrollment package version. * Fix language. * feat: Add reset password with token. (#771) * bugfix send panel values to create record (#772) * bugfix convert dates to UTC (#774) * feat: Add persistent vuex state in local storage. (#773) * feat: Add persistent vuex state in local storage. * fix: Error when LogOut session. * validate options list lookup (#776) * feat: Add enrollment user. (#778) * feat: Add create password and join with reset password form view. (#779) * fix: Zoom item process activity, parameters undefined. (#780) * Validate ColumnName in DataTable (#783) * bugfix load list items and callout send (#777) * fix: Search records with uuid url. (#781) * convert ternary operator into computed property (#782) * fix: Remove unused methods and remove watching. (#784) * fix: Remove unused methods and remove watching. * remove watch window view. * fix: Validation in google chrome enroll user. (#785) * fix: Validation in google chrome enroll user. * Update grpc-enrollment-user-client version. * fix: Convert context map to array pairs. (#786) * fix: Delete persistent date. (#788) * fix: Yes -No component value in table when edit mode. (#789) * multiple requests LookupList (#791) * fix: Read only panel parent when set context tab children. (#792) * Change value to displayColumn (#793) * add display column in tables childs (#787) * bugfix load list items and callout send * add display column in tables childs * add dynamic table name * add get default value from server * change comparation * remove request LookupItem (#794) * Change value to displayColumn * minimal changes * bugfix send criteria for get default value (#795) * bugfix load list items and callout send * add display column in tables childs * add dynamic table name * add get default value from server * change comparation * add criteria for get default value * remove parse int * feat: Add undo to create new record. (#796) * bugfix display values in tabs child (#797) * fix: Browser Generate Invoice From Outbound Order not search result. (#798) * add icons to recent items (#799) * bugfix display values in tabs child * add icons to recent items * correct translation and add client when changing rolecorrect translation and add client when changing role (#800) * feat: Add show mandatory columns and show all available columns. (#801) * bugfix recent items and change styles (#802) * change getDefaultValue service implementation (#803) * bugfix display values with sql * change getDefaultValue service implementation * fix: Set empty values to component's base. (#804) * add context info in field (#805) * bugfix context info fields (#806) * feat: Update access client and data client grpc version. (#807) * Add displayColumn to getterValueSelect (#808) * Add displayColumn to getterValueSelect * Update panel.js * fix: Duplicate change panel with record. (#809) * Change license and readme waiting for merge with ADempiere trunk * Add Changes for license and readme * Add commiter
443 lines
11 KiB
JavaScript
443 lines
11 KiB
JavaScript
import Vue from 'vue'
|
|
import Router from 'vue-router'
|
|
|
|
Vue.use(Router)
|
|
|
|
/* Layout */
|
|
import Layout from '@/layout'
|
|
|
|
/* Router Modules */
|
|
import componentsRouter from './modules/components'
|
|
import chartsRouter from './modules/charts'
|
|
import tableRouter from './modules/table'
|
|
import nestedRouter from './modules/nested'
|
|
|
|
/**
|
|
* Note: sub-menu only appear when route children.length >= 1
|
|
* Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
|
|
*
|
|
* hidden: true if set true, item will not show in the sidebar(default is false)
|
|
* alwaysShow: true if set true, will always show the root menu
|
|
* if not set alwaysShow, when item has more than one children route,
|
|
* it will becomes nested mode, otherwise not show the root menu
|
|
* redirect: noRedirect if set noRedirect will no redirect in the breadcrumb
|
|
* name:'router-name' the name is used by <keep-alive> (must set!!!)
|
|
* meta : {
|
|
roles: ['admin','editor'] control the page roles (you can set multiple roles)
|
|
title: 'title' the name show in sidebar and breadcrumb (recommend set)
|
|
icon: 'svg-name' the icon show in the sidebar
|
|
noCache: true if set true, the page will no be cached(default is false)
|
|
affix: true if set true, the tag will affix in the tags-view
|
|
breadcrumb: false if set false, the item will hidden in breadcrumb(default is true)
|
|
activeMenu: '/example/list' if set path, the sidebar will highlight the path you set
|
|
}
|
|
*/
|
|
|
|
/**
|
|
* constantRoutes
|
|
* a base page that does not have permission requirements
|
|
* all roles can be accessed
|
|
*/
|
|
export const constantRoutes = [
|
|
{
|
|
path: '/redirect',
|
|
component: Layout,
|
|
hidden: true,
|
|
children: [
|
|
{
|
|
path: '/redirect/:path*',
|
|
component: () => import('@/views/redirect/index')
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: '/login',
|
|
component: () => import('@/views/login/index'),
|
|
hidden: true
|
|
},
|
|
{
|
|
path: '/auth-redirect',
|
|
component: () => import('@/views/login/auth-redirect'),
|
|
hidden: true
|
|
},
|
|
{
|
|
path: '/404',
|
|
component: () => import('@/views/error-page/404'),
|
|
hidden: true
|
|
},
|
|
{
|
|
path: '/401',
|
|
component: () => import('@/views/error-page/401'),
|
|
hidden: true
|
|
},
|
|
{
|
|
path: '/userEnrollment',
|
|
component: () => import('@/views/login/userEnrollment'),
|
|
hidden: true
|
|
},
|
|
{
|
|
path: '/forgotPassword',
|
|
component: () => import('@/views/login/forgotPassword'),
|
|
hidden: true
|
|
},
|
|
{
|
|
path: '/passwordReset',
|
|
name: 'passwordReset',
|
|
component: () => import('@/views/login/setPassword'),
|
|
hidden: true
|
|
},
|
|
{
|
|
path: '/createPassword',
|
|
name: 'createPassword',
|
|
component: () => import('@/views/login/setPassword'),
|
|
hidden: true
|
|
},
|
|
{
|
|
path: '',
|
|
component: Layout,
|
|
redirect: 'dashboard',
|
|
meta: { title: 'dashboard', icon: 'dashboard', affix: true, breadcrumb: false },
|
|
children: [
|
|
{
|
|
path: 'dashboard',
|
|
component: () => import('@/views/dashboard/index'),
|
|
name: 'Dashboard',
|
|
meta: { title: 'dashboard', icon: 'dashboard', affix: true, breadcrumb: false, isIndex: true }
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: '/documentation',
|
|
component: Layout,
|
|
redirect: '/documentation/index',
|
|
meta: { title: 'documentation', icon: 'documentation', affix: true, breadcrumb: false },
|
|
children: [
|
|
{
|
|
path: 'index',
|
|
component: () => import('@/views/documentation/index'),
|
|
name: 'Documentation',
|
|
meta: { title: 'documentation', icon: 'documentation', affix: true, isIndex: true }
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: '/guide',
|
|
component: Layout,
|
|
redirect: '/guide/index',
|
|
meta: { title: 'guide', icon: 'guide', noCache: true, breadcrumb: false },
|
|
children: [
|
|
{
|
|
path: 'index',
|
|
component: () => import('@/views/guide/index'),
|
|
name: 'Guide',
|
|
meta: { title: 'guide', icon: 'guide', noCache: true, isIndex: true }
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: '/profile',
|
|
component: Layout,
|
|
redirect: '/profile/index',
|
|
hidden: true,
|
|
children: [
|
|
{
|
|
path: 'index',
|
|
component: () => import('@/views/profile/index'),
|
|
name: 'Profile',
|
|
meta: { title: 'profile', icon: 'user', noCache: true }
|
|
}
|
|
]
|
|
}
|
|
]
|
|
|
|
/**
|
|
* asyncRoutes
|
|
* the routes that need to be dynamically loaded based on user roles
|
|
*/
|
|
export const asyncRoutes = [
|
|
{
|
|
path: '/permission',
|
|
component: Layout,
|
|
redirect: '/permission/page',
|
|
alwaysShow: true, // will always show the root menu
|
|
name: 'Permission',
|
|
meta: {
|
|
title: 'permission',
|
|
icon: 'lock',
|
|
roles: ['admin', 'editor'] // you can set roles in root nav
|
|
},
|
|
children: [
|
|
{
|
|
path: 'page',
|
|
component: () => import('@/views/permission/page'),
|
|
name: 'PagePermission',
|
|
meta: {
|
|
title: 'pagePermission',
|
|
roles: ['admin'] // or you can only set roles in sub nav
|
|
}
|
|
},
|
|
{
|
|
path: 'directive',
|
|
component: () => import('@/views/permission/directive'),
|
|
name: 'DirectivePermission',
|
|
meta: {
|
|
title: 'directivePermission'
|
|
// if do not set roles, means: this page does not require permission
|
|
}
|
|
},
|
|
{
|
|
path: 'role',
|
|
component: () => import('@/views/permission/role'),
|
|
name: 'RolePermission',
|
|
meta: {
|
|
title: 'rolePermission',
|
|
roles: ['admin']
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
{
|
|
path: '/icon',
|
|
component: Layout,
|
|
children: [
|
|
{
|
|
path: 'index',
|
|
component: () => import('@/views/icons/index'),
|
|
name: 'Icons',
|
|
meta: { title: 'icons', icon: 'icon', noCache: true }
|
|
}
|
|
]
|
|
},
|
|
|
|
/** when your routing map is too long, you can split it into small modules **/
|
|
componentsRouter,
|
|
chartsRouter,
|
|
nestedRouter,
|
|
tableRouter,
|
|
|
|
{
|
|
path: '/example',
|
|
component: Layout,
|
|
redirect: '/example/list',
|
|
name: 'Example',
|
|
meta: {
|
|
title: 'example',
|
|
icon: 'example'
|
|
},
|
|
children: [
|
|
{
|
|
path: 'create',
|
|
component: () => import('@/views/example/create'),
|
|
name: 'CreateArticle',
|
|
meta: { title: 'createArticle', icon: 'edit' }
|
|
},
|
|
{
|
|
path: 'edit/:id(\\d+)',
|
|
component: () => import('@/views/example/edit'),
|
|
name: 'EditArticle',
|
|
meta: { title: 'editArticle', noCache: true, activeMenu: '/example/list' },
|
|
hidden: true
|
|
},
|
|
{
|
|
path: 'list',
|
|
component: () => import('@/views/example/list'),
|
|
name: 'ArticleList',
|
|
meta: { title: 'articleList', icon: 'list' }
|
|
}
|
|
]
|
|
},
|
|
|
|
{
|
|
path: '/tab',
|
|
component: Layout,
|
|
children: [
|
|
{
|
|
path: 'index',
|
|
component: () => import('@/views/tab/index'),
|
|
name: 'Tab',
|
|
meta: { title: 'tab', icon: 'tab' }
|
|
}
|
|
]
|
|
},
|
|
|
|
{
|
|
path: '/error',
|
|
component: Layout,
|
|
redirect: 'noRedirect',
|
|
name: 'ErrorPages',
|
|
meta: {
|
|
title: 'errorPages',
|
|
icon: '404'
|
|
},
|
|
children: [
|
|
{
|
|
path: '401',
|
|
component: () => import('@/views/error-page/401'),
|
|
name: 'Page401',
|
|
meta: { title: 'page401', noCache: true }
|
|
},
|
|
{
|
|
path: '404',
|
|
component: () => import('@/views/error-page/404'),
|
|
name: 'Page404',
|
|
meta: { title: 'page404', noCache: true }
|
|
}
|
|
]
|
|
},
|
|
|
|
{
|
|
path: '/error-log',
|
|
component: Layout,
|
|
children: [
|
|
{
|
|
path: 'log',
|
|
component: () => import('@/views/error-log/index'),
|
|
name: 'ErrorLog',
|
|
meta: { title: 'errorLog', icon: 'bug' }
|
|
}
|
|
]
|
|
},
|
|
|
|
{
|
|
path: '/excel',
|
|
component: Layout,
|
|
redirect: '/excel/export-excel',
|
|
name: 'Excel',
|
|
meta: {
|
|
title: 'excel',
|
|
icon: 'excel'
|
|
},
|
|
children: [
|
|
{
|
|
path: 'export-excel',
|
|
component: () => import('@/views/excel/export-excel'),
|
|
name: 'ExportExcel',
|
|
meta: { title: 'exportExcel' }
|
|
},
|
|
{
|
|
path: 'export-selected-excel',
|
|
component: () => import('@/views/excel/select-excel'),
|
|
name: 'SelectExcel',
|
|
meta: { title: 'selectExcel' }
|
|
},
|
|
{
|
|
path: 'export-merge-header',
|
|
component: () => import('@/views/excel/merge-header'),
|
|
name: 'MergeHeader',
|
|
meta: { title: 'mergeHeader' }
|
|
},
|
|
{
|
|
path: 'upload-excel',
|
|
component: () => import('@/views/excel/upload-excel'),
|
|
name: 'UploadExcel',
|
|
meta: { title: 'uploadExcel' }
|
|
}
|
|
]
|
|
},
|
|
|
|
{
|
|
path: '/zip',
|
|
component: Layout,
|
|
redirect: '/zip/download',
|
|
alwaysShow: true,
|
|
name: 'Zip',
|
|
meta: { title: 'zip', icon: 'zip' },
|
|
children: [
|
|
{
|
|
path: 'download',
|
|
component: () => import('@/views/zip/index'),
|
|
name: 'ExportZip',
|
|
meta: { title: 'exportZip' }
|
|
}
|
|
]
|
|
},
|
|
|
|
{
|
|
path: '/pdf',
|
|
component: Layout,
|
|
redirect: '/pdf/index',
|
|
children: [
|
|
{
|
|
path: 'index',
|
|
component: () => import('@/views/pdf/index'),
|
|
name: 'PDF',
|
|
meta: { title: 'pdf', icon: 'pdf' }
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: '/pdf/download',
|
|
component: () => import('@/views/pdf/download'),
|
|
hidden: true
|
|
},
|
|
|
|
{
|
|
path: '/theme',
|
|
component: Layout,
|
|
children: [
|
|
{
|
|
path: 'index',
|
|
component: () => import('@/views/theme/index'),
|
|
name: 'Theme',
|
|
meta: { title: 'theme', icon: 'theme' }
|
|
}
|
|
]
|
|
},
|
|
|
|
{
|
|
path: '/clipboard',
|
|
component: Layout,
|
|
children: [
|
|
{
|
|
path: 'index',
|
|
component: () => import('@/views/clipboard/index'),
|
|
name: 'ClipboardDemo',
|
|
meta: { title: 'clipboardDemo', icon: 'clipboard' }
|
|
}
|
|
]
|
|
},
|
|
|
|
{
|
|
path: '/i18n',
|
|
component: Layout,
|
|
children: [
|
|
{
|
|
path: 'index',
|
|
component: () => import('@/views/i18n-demo/index'),
|
|
name: 'I18n',
|
|
meta: { title: 'i18n', icon: 'international' }
|
|
}
|
|
]
|
|
},
|
|
|
|
{
|
|
path: 'external-link',
|
|
component: Layout,
|
|
children: [
|
|
{
|
|
path: 'https://github.com/PanJiaChen/vue-element-admin',
|
|
meta: { title: 'externalLink', icon: 'link' }
|
|
}
|
|
]
|
|
},
|
|
|
|
{ path: '*', redirect: '/404', hidden: true }
|
|
]
|
|
|
|
const createRouter = () => new Router({
|
|
// mode: 'history', // require service support
|
|
scrollBehavior: () => ({ y: 0 }),
|
|
routes: constantRoutes
|
|
})
|
|
|
|
const router = createRouter()
|
|
|
|
// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
|
|
export function resetRouter() {
|
|
const newRouter = createRouter()
|
|
router.matcher = newRouter.matcher // reset router
|
|
}
|
|
|
|
export default router
|