diff --git a/package.json b/package.json index 6aec83f..479220c 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ "@visactor/vchart-theme": "1.12.2", "@visactor/vtable-editors": "1.10.5", "@visactor/vtable-gantt": "1.10.5", + "@visactor/vue-vtable": "1.10.5", "@vueuse/components": "11.2.0", "@vueuse/core": "11.2.0", "clipboard": "2.0.11", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0427c67..7d3705f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -53,6 +53,9 @@ importers: '@visactor/vtable-gantt': specifier: 1.10.5 version: 1.10.5 + '@visactor/vue-vtable': + specifier: 1.10.5 + version: 1.10.5 '@vueuse/components': specifier: 11.2.0 version: 11.2.0(vue@3.5.13) @@ -3551,6 +3554,13 @@ packages: cssfontparser: 1.2.1 dev: false + /@visactor/vue-vtable@1.10.5: + resolution: {integrity: sha512-e71e8U9+or3wWuS6yjkkP8V55rutiOnfQRtj0uWJF1zihc1T9xb8Ba30pQ3co1vXOah86/1HpyzWlQ/2Gq3+DA==} + dependencies: + '@visactor/vtable': 1.10.5 + '@visactor/vutils': 0.18.18 + dev: false + /@visactor/vutils-extension@1.11.14: resolution: {integrity: sha512-vfViZphXJBH0NwCHIoe8S1/+tDtykEKIfsLMIHprh7Azv7fVSB1eotG00SAegK75E18ARQGNXF1DxixUFiXSIQ==} dependencies: diff --git a/src/locales/langs/en-us.ts b/src/locales/langs/en-us.ts index da74dc9..eed191e 100644 --- a/src/locales/langs/en-us.ts +++ b/src/locales/langs/en-us.ts @@ -220,7 +220,9 @@ const local: App.I18n.Schema = { plugin_excel: 'Excel', plugin_pdf: 'PDF preview', plugin_gantt: 'Gantt Chart', - plugin_typeit: 'Typeit' + plugin_typeit: 'Typeit', + plugin_tables: 'Tables', + plugin_tables_vtable: 'VTable' }, page: { login: { diff --git a/src/locales/langs/zh-cn.ts b/src/locales/langs/zh-cn.ts index 1ee8fce..9c34400 100644 --- a/src/locales/langs/zh-cn.ts +++ b/src/locales/langs/zh-cn.ts @@ -220,7 +220,9 @@ const local: App.I18n.Schema = { plugin_excel: 'Excel', plugin_pdf: 'PDF 预览', plugin_gantt: '甘特图', - plugin_typeit: '打字机' + plugin_typeit: '打字机', + plugin_tables: '表格', + plugin_tables_vtable: 'VTable' }, page: { login: { diff --git a/src/router/elegant/imports.ts b/src/router/elegant/imports.ts index 924ae51..40a4ff0 100644 --- a/src/router/elegant/imports.ts +++ b/src/router/elegant/imports.ts @@ -54,6 +54,7 @@ export const views: Record Promise import("@/views/plugin/pinyin/index.vue"), plugin_print: () => import("@/views/plugin/print/index.vue"), plugin_swiper: () => import("@/views/plugin/swiper/index.vue"), + plugin_tables_vtable: () => import("@/views/plugin/tables/vtable/index.vue"), plugin_typeit: () => import("@/views/plugin/typeit/index.vue"), plugin_video: () => import("@/views/plugin/video/index.vue"), "user-center": () => import("@/views/user-center/index.vue"), diff --git a/src/router/elegant/routes.ts b/src/router/elegant/routes.ts index ca294bb..d0105ad 100644 --- a/src/router/elegant/routes.ts +++ b/src/router/elegant/routes.ts @@ -559,6 +559,25 @@ export const generatedRoutes: GeneratedRoute[] = [ icon: 'simple-icons:swiper' } }, + { + name: 'plugin_tables', + path: '/plugin/tables', + meta: { + title: 'plugin_tables', + i18nKey: 'route.plugin_tables' + }, + children: [ + { + name: 'plugin_tables_vtable', + path: '/plugin/tables/vtable', + component: 'view.plugin_tables_vtable', + meta: { + title: 'plugin_tables_vtable', + i18nKey: 'route.plugin_tables_vtable' + } + } + ] + }, { name: 'plugin_typeit', path: '/plugin/typeit', diff --git a/src/router/elegant/transform.ts b/src/router/elegant/transform.ts index 3aaafbf..5eb0871 100644 --- a/src/router/elegant/transform.ts +++ b/src/router/elegant/transform.ts @@ -227,6 +227,8 @@ const routeMap: RouteMap = { "plugin_pinyin": "/plugin/pinyin", "plugin_print": "/plugin/print", "plugin_swiper": "/plugin/swiper", + "plugin_tables": "/plugin/tables", + "plugin_tables_vtable": "/plugin/tables/vtable", "plugin_typeit": "/plugin/typeit", "plugin_video": "/plugin/video", "user-center": "/user-center" diff --git a/src/typings/elegant-router.d.ts b/src/typings/elegant-router.d.ts index 42d384e..30f8723 100644 --- a/src/typings/elegant-router.d.ts +++ b/src/typings/elegant-router.d.ts @@ -81,6 +81,8 @@ declare module "@elegant-router/types" { "plugin_pinyin": "/plugin/pinyin"; "plugin_print": "/plugin/print"; "plugin_swiper": "/plugin/swiper"; + "plugin_tables": "/plugin/tables"; + "plugin_tables_vtable": "/plugin/tables/vtable"; "plugin_typeit": "/plugin/typeit"; "plugin_video": "/plugin/video"; "user-center": "/user-center"; @@ -199,6 +201,7 @@ declare module "@elegant-router/types" { | "plugin_pinyin" | "plugin_print" | "plugin_swiper" + | "plugin_tables_vtable" | "plugin_typeit" | "plugin_video" | "user-center" diff --git a/src/views/plugin/tables/vtable/data.ts b/src/views/plugin/tables/vtable/data.ts new file mode 100644 index 0000000..8a455d1 --- /dev/null +++ b/src/views/plugin/tables/vtable/data.ts @@ -0,0 +1,1044 @@ +export const listTableRecords = [ + { + 'Row ID': '7981', + 'Order ID': 'CA-2015-103800', + 'Order Date': '2015/1/3', + 'Ship Date': '2015/1/7', + 'Ship Mode': 'Standard Class', + 'Customer ID': 'DP-13000', + 'Customer Name': 'Darren Powers', + Segment: 'Consumer', + Country: 'United States', + City: 'Houston', + State: 'Texas', + 'Postal Code': '77095', + Region: 'Central', + 'Product ID': 'OFF-PA-10000174', + Category: 'Office Supplies', + 'Sub-Category': 'Paper', + 'Product Name': 'Message Book, Wirebound, Four 5 1/2" X 4" Forms/Pg., 200 Dupl. Sets/Book', + Sales: '16.448', + Quantity: '2', + Discount: '0.2', + Profit: '5.5512' + }, + { + 'Row ID': '740', + 'Order ID': 'CA-2015-112326', + 'Order Date': '2015/1/4', + 'Ship Date': '2015/1/8', + 'Ship Mode': 'Standard Class', + 'Customer ID': 'PO-19195', + 'Customer Name': 'Phillina Ober', + Segment: 'Home Office', + Country: 'United States', + City: 'Naperville', + State: 'Illinois', + 'Postal Code': '60540', + Region: 'Central', + 'Product ID': 'OFF-LA-10003223', + Category: 'Office Supplies', + 'Sub-Category': 'Labels', + 'Product Name': 'Avery 508', + Sales: '11.784', + Quantity: '3', + Discount: '0.2', + Profit: '4.2717' + }, + { + 'Row ID': '741', + 'Order ID': 'CA-2015-112326', + 'Order Date': '2015/1/4', + 'Ship Date': '2015/1/8', + 'Ship Mode': 'Standard Class', + 'Customer ID': 'PO-19195', + 'Customer Name': 'Phillina Ober', + Segment: 'Home Office', + Country: 'United States', + City: 'Naperville', + State: 'Illinois', + 'Postal Code': '60540', + Region: 'Central', + 'Product ID': 'OFF-ST-10002743', + Category: 'Office Supplies', + 'Sub-Category': 'Storage', + 'Product Name': 'SAFCO Boltless Steel Shelving', + Sales: '272.736', + Quantity: '3', + Discount: '0.2', + Profit: '-64.7748' + }, + { + 'Row ID': '742', + 'Order ID': 'CA-2015-112326', + 'Order Date': '2015/1/4', + 'Ship Date': '2015/1/8', + 'Ship Mode': 'Standard Class', + 'Customer ID': 'PO-19195', + 'Customer Name': 'Phillina Ober', + Segment: 'Home Office', + Country: 'United States', + City: 'Naperville', + State: 'Illinois', + 'Postal Code': '60540', + Region: 'Central', + 'Product ID': 'OFF-BI-10004094', + Category: 'Office Supplies', + 'Sub-Category': 'Binders', + 'Product Name': 'GBC Standard Plastic Binding Systems Combs', + Sales: '3.54', + Quantity: '2', + Discount: '0.8', + Profit: '-5.487' + }, + { + 'Row ID': '1760', + 'Order ID': 'CA-2015-141817', + 'Order Date': '2015/1/5', + 'Ship Date': '2015/1/12', + 'Ship Mode': 'Standard Class', + 'Customer ID': 'MB-18085', + 'Customer Name': 'Mick Brown', + Segment: 'Consumer', + Country: 'United States', + City: 'Philadelphia', + State: 'Pennsylvania', + 'Postal Code': '19143', + Region: 'East', + 'Product ID': 'OFF-AR-10003478', + Category: 'Office Supplies', + 'Sub-Category': 'Art', + 'Product Name': 'Avery Hi-Liter EverBold Pen Style Fluorescent Highlighters, 4/Pack', + Sales: '19.536', + Quantity: '3', + Discount: '0.2', + Profit: '4.884' + }, + { + 'Row ID': '5328', + 'Order ID': 'CA-2015-130813', + 'Order Date': '2015/1/6', + 'Ship Date': '2015/1/8', + 'Ship Mode': 'Second Class', + 'Customer ID': 'LS-17230', + 'Customer Name': 'Lycoris Saunders', + Segment: 'Consumer', + Country: 'United States', + City: 'Los Angeles', + State: 'California', + 'Postal Code': '90049', + Region: 'West', + 'Product ID': 'OFF-PA-10002005', + Category: 'Office Supplies', + 'Sub-Category': 'Paper', + 'Product Name': 'Xerox 225', + Sales: '19.44', + Quantity: '3', + Discount: '0', + Profit: '9.3312' + }, + { + 'Row ID': '7181', + 'Order ID': 'CA-2015-106054', + 'Order Date': '2015/1/6', + 'Ship Date': '2015/1/7', + 'Ship Mode': 'First Class', + 'Customer ID': 'JO-15145', + 'Customer Name': "Jack O'Briant", + Segment: 'Corporate', + Country: 'United States', + City: 'Athens', + State: 'Georgia', + 'Postal Code': '30605', + Region: 'South', + 'Product ID': 'OFF-AR-10002399', + Category: 'Office Supplies', + 'Sub-Category': 'Art', + 'Product Name': 'Dixon Prang Watercolor Pencils, 10-Color Set with Brush', + Sales: '12.78', + Quantity: '3', + Discount: '0', + Profit: '5.2398' + }, + { + 'Row ID': '7475', + 'Order ID': 'CA-2015-167199', + 'Order Date': '2015/1/6', + 'Ship Date': '2015/1/10', + 'Ship Mode': 'Standard Class', + 'Customer ID': 'ME-17320', + 'Customer Name': 'Maria Etezadi', + Segment: 'Home Office', + Country: 'United States', + City: 'Henderson', + State: 'Kentucky', + 'Postal Code': '42420', + Region: 'South', + 'Product ID': 'FUR-CH-10004063', + Category: 'Furniture', + 'Sub-Category': 'Chairs', + 'Product Name': "Global Deluxe High-Back Manager's Chair", + Sales: '2573.82', + Quantity: '9', + Discount: '0', + Profit: '746.4078' + }, + { + 'Row ID': '7476', + 'Order ID': 'CA-2015-167199', + 'Order Date': '2015/1/6', + 'Ship Date': '2015/1/10', + 'Ship Mode': 'Standard Class', + 'Customer ID': 'ME-17320', + 'Customer Name': 'Maria Etezadi', + Segment: 'Home Office', + Country: 'United States', + City: 'Henderson', + State: 'Kentucky', + 'Postal Code': '42420', + Region: 'South', + 'Product ID': 'OFF-BI-10004632', + Category: 'Office Supplies', + 'Sub-Category': 'Binders', + 'Product Name': 'Ibico Hi-Tech Manual Binding System', + Sales: '609.98', + Quantity: '2', + Discount: '0', + Profit: '274.491' + }, + { + 'Row ID': '7477', + 'Order ID': 'CA-2015-167199', + 'Order Date': '2015/1/6', + 'Ship Date': '2015/1/10', + 'Ship Mode': 'Standard Class', + 'Customer ID': 'ME-17320', + 'Customer Name': 'Maria Etezadi', + Segment: 'Home Office', + Country: 'United States', + City: 'Henderson', + State: 'Kentucky', + 'Postal Code': '42420', + Region: 'South', + 'Product ID': 'OFF-AR-10001662', + Category: 'Office Supplies', + 'Sub-Category': 'Art', + 'Product Name': 'Rogers Handheld Barrel Pencil Sharpener', + Sales: '5.48', + Quantity: '2', + Discount: '0', + Profit: '1.4796' + }, + { + 'Row ID': '7478', + 'Order ID': 'CA-2015-167199', + 'Order Date': '2015/1/6', + 'Ship Date': '2015/1/10', + 'Ship Mode': 'Standard Class', + 'Customer ID': 'ME-17320', + 'Customer Name': 'Maria Etezadi', + Segment: 'Home Office', + Country: 'United States', + City: 'Henderson', + State: 'Kentucky', + 'Postal Code': '42420', + Region: 'South', + 'Product ID': 'TEC-PH-10004977', + Category: 'Technology', + 'Sub-Category': 'Phones', + 'Product Name': 'GE 30524EE4', + Sales: '391.98', + Quantity: '2', + Discount: '0', + Profit: '113.6742' + }, + { + 'Row ID': '7479', + 'Order ID': 'CA-2015-167199', + 'Order Date': '2015/1/6', + 'Ship Date': '2015/1/10', + 'Ship Mode': 'Standard Class', + 'Customer ID': 'ME-17320', + 'Customer Name': 'Maria Etezadi', + Segment: 'Home Office', + Country: 'United States', + City: 'Henderson', + State: 'Kentucky', + 'Postal Code': '42420', + Region: 'South', + 'Product ID': 'TEC-PH-10004539', + Category: 'Technology', + 'Sub-Category': 'Phones', + 'Product Name': 'Wireless Extenders zBoost YX545 SOHO Signal Booster', + Sales: '755.96', + Quantity: '4', + Discount: '0', + Profit: '204.1092' + }, + { + 'Row ID': '7480', + 'Order ID': 'CA-2015-167199', + 'Order Date': '2015/1/6', + 'Ship Date': '2015/1/10', + 'Ship Mode': 'Standard Class', + 'Customer ID': 'ME-17320', + 'Customer Name': 'Maria Etezadi', + Segment: 'Home Office', + Country: 'United States', + City: 'Henderson', + State: 'Kentucky', + 'Postal Code': '42420', + Region: 'South', + 'Product ID': 'OFF-FA-10001883', + Category: 'Office Supplies', + 'Sub-Category': 'Fasteners', + 'Product Name': 'Alliance Super-Size Bands, Assorted Sizes', + Sales: '31.12', + Quantity: '4', + Discount: '0', + Profit: '0.3112' + }, + { + 'Row ID': '7481', + 'Order ID': 'CA-2015-167199', + 'Order Date': '2015/1/6', + 'Ship Date': '2015/1/10', + 'Ship Mode': 'Standard Class', + 'Customer ID': 'ME-17320', + 'Customer Name': 'Maria Etezadi', + Segment: 'Home Office', + Country: 'United States', + City: 'Henderson', + State: 'Kentucky', + 'Postal Code': '42420', + Region: 'South', + 'Product ID': 'OFF-PA-10000955', + Category: 'Office Supplies', + 'Sub-Category': 'Paper', + 'Product Name': 'Southworth 25% Cotton Granite Paper & Envelopes', + Sales: '6.54', + Quantity: '1', + Discount: '0', + Profit: '3.0084' + }, + { + 'Row ID': '7661', + 'Order ID': 'CA-2015-105417', + 'Order Date': '2015/1/7', + 'Ship Date': '2015/1/12', + 'Ship Mode': 'Standard Class', + 'Customer ID': 'VS-21820', + 'Customer Name': 'Vivek Sundaresam', + Segment: 'Consumer', + Country: 'United States', + City: 'Huntsville', + State: 'Texas', + 'Postal Code': '77340', + Region: 'Central', + 'Product ID': 'FUR-FU-10004864', + Category: 'Furniture', + 'Sub-Category': 'Furnishings', + 'Product Name': 'Howard Miller 14-1/2" Diameter Chrome Round Wall Clock', + Sales: '76.728', + Quantity: '3', + Discount: '0.6', + Profit: '-53.7096' + }, + { + 'Row ID': '7662', + 'Order ID': 'CA-2015-105417', + 'Order Date': '2015/1/7', + 'Ship Date': '2015/1/12', + 'Ship Mode': 'Standard Class', + 'Customer ID': 'VS-21820', + 'Customer Name': 'Vivek Sundaresam', + Segment: 'Consumer', + Country: 'United States', + City: 'Huntsville', + State: 'Texas', + 'Postal Code': '77340', + Region: 'Central', + 'Product ID': 'OFF-BI-10003708', + Category: 'Office Supplies', + 'Sub-Category': 'Binders', + 'Product Name': 'Acco Four Pocket Poly Ring Binder with Label Holder, Smoke, 1"', + Sales: '10.43', + Quantity: '7', + Discount: '0.8', + Profit: '-18.2525' + }, + { + 'Row ID': '593', + 'Order ID': 'CA-2015-135405', + 'Order Date': '2015/1/9', + 'Ship Date': '2015/1/13', + 'Ship Mode': 'Standard Class', + 'Customer ID': 'MS-17830', + 'Customer Name': 'Melanie Seite', + Segment: 'Consumer', + Country: 'United States', + City: 'Laredo', + State: 'Texas', + 'Postal Code': '78041', + Region: 'Central', + 'Product ID': 'OFF-AR-10004078', + Category: 'Office Supplies', + 'Sub-Category': 'Art', + 'Product Name': 'Newell 312', + Sales: '9.344', + Quantity: '2', + Discount: '0.2', + Profit: '1.168' + }, + { + 'Row ID': '594', + 'Order ID': 'CA-2015-135405', + 'Order Date': '2015/1/9', + 'Ship Date': '2015/1/13', + 'Ship Mode': 'Standard Class', + 'Customer ID': 'MS-17830', + 'Customer Name': 'Melanie Seite', + Segment: 'Consumer', + Country: 'United States', + City: 'Laredo', + State: 'Texas', + 'Postal Code': '78041', + Region: 'Central', + 'Product ID': 'TEC-AC-10001266', + Category: 'Technology', + 'Sub-Category': 'Accessories', + 'Product Name': 'Memorex Micro Travel Drive 8 GB', + Sales: '31.2', + Quantity: '3', + Discount: '0.2', + Profit: '9.75' + }, + { + 'Row ID': '866', + 'Order ID': 'CA-2015-149020', + 'Order Date': '2015/1/10', + 'Ship Date': '2015/1/15', + 'Ship Mode': 'Standard Class', + 'Customer ID': 'AJ-10780', + 'Customer Name': 'Anthony Jacobs', + Segment: 'Corporate', + Country: 'United States', + City: 'Springfield', + State: 'Virginia', + 'Postal Code': '22153', + Region: 'South', + 'Product ID': 'OFF-LA-10004272', + Category: 'Office Supplies', + 'Sub-Category': 'Labels', + 'Product Name': 'Avery 482', + Sales: '2.89', + Quantity: '1', + Discount: '0', + Profit: '1.3583' + }, + { + 'Row ID': '867', + 'Order ID': 'CA-2015-149020', + 'Order Date': '2015/1/10', + 'Ship Date': '2015/1/15', + 'Ship Mode': 'Standard Class', + 'Customer ID': 'AJ-10780', + 'Customer Name': 'Anthony Jacobs', + Segment: 'Corporate', + Country: 'United States', + City: 'Springfield', + State: 'Virginia', + 'Postal Code': '22153', + Region: 'South', + 'Product ID': 'FUR-FU-10000965', + Category: 'Furniture', + 'Sub-Category': 'Furnishings', + 'Product Name': 'Howard Miller 11-1/2" Diameter Ridgewood Wall Clock', + Sales: '51.94', + Quantity: '1', + Discount: '0', + Profit: '21.2954' + }, + { + 'Row ID': '717', + 'Order ID': 'CA-2015-130092', + 'Order Date': '2015/1/11', + 'Ship Date': '2015/1/14', + 'Ship Mode': 'First Class', + 'Customer ID': 'SV-20365', + 'Customer Name': 'Seth Vernon', + Segment: 'Consumer', + Country: 'United States', + City: 'Dover', + State: 'Delaware', + 'Postal Code': '19901', + Region: 'East', + 'Product ID': 'FUR-FU-10000010', + Category: 'Furniture', + 'Sub-Category': 'Furnishings', + 'Product Name': 'DAX Value U-Channel Document Frames, Easel Back', + Sales: '9.94', + Quantity: '2', + Discount: '0', + Profit: '3.0814' + }, + { + 'Row ID': '764', + 'Order ID': 'CA-2015-162775', + 'Order Date': '2015/1/13', + 'Ship Date': '2015/1/15', + 'Ship Mode': 'Second Class', + 'Customer ID': 'CS-12250', + 'Customer Name': 'Chris Selesnick', + Segment: 'Corporate', + Country: 'United States', + City: 'Bossier City', + State: 'Louisiana', + 'Postal Code': '71111', + Region: 'South', + 'Product ID': 'OFF-EN-10001990', + Category: 'Office Supplies', + 'Sub-Category': 'Envelopes', + 'Product Name': 'Staple envelope', + Sales: '11.36', + Quantity: '2', + Discount: '0', + Profit: '5.3392' + }, + { + 'Row ID': '765', + 'Order ID': 'CA-2015-162775', + 'Order Date': '2015/1/13', + 'Ship Date': '2015/1/15', + 'Ship Mode': 'Second Class', + 'Customer ID': 'CS-12250', + 'Customer Name': 'Chris Selesnick', + Segment: 'Corporate', + Country: 'United States', + City: 'Bossier City', + State: 'Louisiana', + 'Postal Code': '71111', + Region: 'South', + 'Product ID': 'OFF-EN-10001532', + Category: 'Office Supplies', + 'Sub-Category': 'Envelopes', + 'Product Name': 'Brown Kraft Recycled Envelopes', + Sales: '50.94', + Quantity: '3', + Discount: '0', + Profit: '25.47' + }, + { + 'Row ID': '766', + 'Order ID': 'CA-2015-162775', + 'Order Date': '2015/1/13', + 'Ship Date': '2015/1/15', + 'Ship Mode': 'Second Class', + 'Customer ID': 'CS-12250', + 'Customer Name': 'Chris Selesnick', + Segment: 'Corporate', + Country: 'United States', + City: 'Bossier City', + State: 'Louisiana', + 'Postal Code': '71111', + Region: 'South', + 'Product ID': 'TEC-AC-10003174', + Category: 'Technology', + 'Sub-Category': 'Accessories', + 'Product Name': 'Plantronics S12 Corded Telephone Headset System', + Sales: '646.74', + Quantity: '6', + Discount: '0', + Profit: '258.696' + }, + { + 'Row ID': '767', + 'Order ID': 'CA-2015-162775', + 'Order Date': '2015/1/13', + 'Ship Date': '2015/1/15', + 'Ship Mode': 'Second Class', + 'Customer ID': 'CS-12250', + 'Customer Name': 'Chris Selesnick', + Segment: 'Corporate', + Country: 'United States', + City: 'Bossier City', + State: 'Louisiana', + 'Postal Code': '71111', + Region: 'South', + 'Product ID': 'OFF-BI-10004187', + Category: 'Office Supplies', + 'Sub-Category': 'Binders', + 'Product Name': '3-ring staple pack', + Sales: '5.64', + Quantity: '3', + Discount: '0', + Profit: '2.7072' + }, + { + 'Row ID': '768', + 'Order ID': 'CA-2015-162775', + 'Order Date': '2015/1/13', + 'Ship Date': '2015/1/15', + 'Ship Mode': 'Second Class', + 'Customer ID': 'CS-12250', + 'Customer Name': 'Chris Selesnick', + Segment: 'Corporate', + Country: 'United States', + City: 'Bossier City', + State: 'Louisiana', + 'Postal Code': '71111', + Region: 'South', + 'Product ID': 'OFF-ST-10000025', + Category: 'Office Supplies', + 'Sub-Category': 'Storage', + 'Product Name': 'Fellowes Stor/Drawer Steel Plus Storage Drawers', + Sales: '572.58', + Quantity: '6', + Discount: '0', + Profit: '34.3548' + }, + { + 'Row ID': '2979', + 'Order ID': 'CA-2015-109232', + 'Order Date': '2015/1/13', + 'Ship Date': '2015/1/16', + 'Ship Mode': 'Second Class', + 'Customer ID': 'ND-18370', + 'Customer Name': 'Natalie DeCherney', + Segment: 'Consumer', + Country: 'United States', + City: 'Mount Pleasant', + State: 'South Carolina', + 'Postal Code': '29464', + Region: 'South', + 'Product ID': 'FUR-CH-10000422', + Category: 'Furniture', + 'Sub-Category': 'Chairs', + 'Product Name': 'Global Highback Leather Tilter in Burgundy', + Sales: '545.94', + Quantity: '6', + Discount: '0', + Profit: '87.3504' + }, + { + 'Row ID': '4938', + 'Order ID': 'CA-2015-157147', + 'Order Date': '2015/1/13', + 'Ship Date': '2015/1/18', + 'Ship Mode': 'Standard Class', + 'Customer ID': 'BD-11605', + 'Customer Name': 'Brian Dahlen', + Segment: 'Consumer', + Country: 'United States', + City: 'San Francisco', + State: 'California', + 'Postal Code': '94109', + Region: 'West', + 'Product ID': 'OFF-ST-10000078', + Category: 'Office Supplies', + 'Sub-Category': 'Storage', + 'Product Name': 'Tennsco 6- and 18-Compartment Lockers', + Sales: '1325.85', + Quantity: '5', + Discount: '0', + Profit: '238.653' + }, + { + 'Row ID': '4939', + 'Order ID': 'CA-2015-157147', + 'Order Date': '2015/1/13', + 'Ship Date': '2015/1/18', + 'Ship Mode': 'Standard Class', + 'Customer ID': 'BD-11605', + 'Customer Name': 'Brian Dahlen', + Segment: 'Consumer', + Country: 'United States', + City: 'San Francisco', + State: 'California', + 'Postal Code': '94109', + Region: 'West', + 'Product ID': 'FUR-BO-10003034', + Category: 'Furniture', + 'Sub-Category': 'Bookcases', + 'Product Name': "O'Sullivan Elevations Bookcase, Cherry Finish", + Sales: '333.999', + Quantity: '3', + Discount: '0.15', + Profit: '3.9294' + }, + { + 'Row ID': '4940', + 'Order ID': 'CA-2015-157147', + 'Order Date': '2015/1/13', + 'Ship Date': '2015/1/18', + 'Ship Mode': 'Standard Class', + 'Customer ID': 'BD-11605', + 'Customer Name': 'Brian Dahlen', + Segment: 'Consumer', + Country: 'United States', + City: 'San Francisco', + State: 'California', + 'Postal Code': '94109', + Region: 'West', + 'Product ID': 'OFF-AR-10003514', + Category: 'Office Supplies', + 'Sub-Category': 'Art', + 'Product Name': '4009 Highlighters by Sanford', + Sales: '19.9', + Quantity: '5', + Discount: '0', + Profit: '6.567' + } +]; + +export const customListRecords = [ + { + bloggerId: 1, + bloggerName: 'Virtual Anchor Xiaohua', + bloggerAvatar: 'https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/custom-render/flower.jpg', + introduction: + 'Hi everyone, I am Xiaohua, the virtual host. I am a little fairy who likes games, animation and food. I hope to share happy moments with you through live broadcast.', + fansCount: 400, + worksCount: 10, + viewCount: 5, + city: 'Dream City', + tags: ['game', 'anime', 'food'] + }, + { + bloggerId: 2, + bloggerName: 'Virtual anchor little wolf', + bloggerAvatar: 'https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/custom-render/wolf.jpg', + introduction: + 'Hello everyone, I am the virtual anchor Little Wolf. I like music, travel and photography, and I hope to explore the beauty of the world with you through live broadcast.', + fansCount: 800, + worksCount: 20, + viewCount: 15, + city: 'City of Music', + tags: ['music', 'travel', 'photography'] + }, + { + bloggerId: 3, + bloggerName: 'Virtual anchor bunny', + bloggerAvatar: 'https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/custom-render/rabbit.jpg', + introduction: + 'Hello everyone, I am the virtual anchor Xiaotu. I like painting, handicrafts and beauty makeup. I hope to share creativity and fashion with you through live broadcast.', + fansCount: 600, + worksCount: 15, + viewCount: 10, + city: 'City of Art', + tags: ['painting', 'handmade', 'beauty makeup'] + }, + { + bloggerId: 4, + bloggerName: 'Virtual anchor kitten', + bloggerAvatar: 'https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/custom-render/cat.jpg', + introduction: + 'Hello everyone, I am the virtual host Kitty. I am a lazy cat who likes dancing, fitness and cooking. I hope to live a healthy and happy life with everyone through the live broadcast.', + fansCount: 1000, + worksCount: 30, + viewCount: 20, + city: 'Health City', + tags: ['dance', 'fitness', 'cooking'] + }, + { + bloggerId: 5, + bloggerName: 'Virtual anchor Bear', + bloggerAvatar: 'https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/custom-render/bear.jpg', + introduction: + 'Hello everyone, I am the virtual host Xiaoxiong. A little wise man who likes movies, reading and philosophy, I hope to explore the meaning of life with you through live broadcast.', + fansCount: 1200, + worksCount: 25, + viewCount: 18, + city: 'City of Wisdom', + tags: ['Movie', 'Literature'] + }, + { + bloggerId: 6, + bloggerName: 'Virtual anchor bird', + bloggerAvatar: 'https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/custom-render/bird.jpeg', + introduction: + 'Hello everyone, I am the virtual anchor Xiaoniao. I like singing, acting and variety shows. I hope to be happy with everyone through the live broadcast.', + fansCount: 900, + worksCount: 12, + viewCount: 8, + city: 'Happy City', + tags: ['music', 'performance', 'variety'] + } +]; + +export const pivotChartColumns = [ + { + dimensionKey: 'Region', + title: 'Region', + headerStyle: { + textStick: true + } + }, + 'Category' +]; +export const pivotChartRows = [ + { + dimensionKey: 'Order Year', + title: 'Order Year', + headerStyle: { + textStick: true + } + }, + 'Ship Mode' +]; +export const pivotChartIndicators = [ + { + indicatorKey: 'Quantity', + title: 'Quantity', + width: 'auto', + cellType: 'chart', + chartModule: 'vchart', + chartSpec: { + stack: true, + type: 'bar', + data: { + id: 'data', + fields: { + 'Sub-Category': { + sortIndex: 0, + domain: [ + 'Chairs', + 'Tables', + 'Bookcases', + 'Furnishings', + 'Binders', + 'Art', + 'Storage', + 'Appliances', + 'Envelopes', + 'Fasteners', + 'Paper', + 'Labels', + 'Supplies', + 'Accessories', + 'Phones', + 'Copiers', + 'Machines' + ] + }, + 'Segment-Indicator': { + sortIndex: 1, + domain: [ + 'Consumer-Quantity', + 'Corporate-Quantity', + 'Home Office-Quantity', + 'Consumer-Sales', + 'Corporate-Sales', + 'Home Office-Sales', + 'Consumer-Profit', + 'Corporate-Profit', + 'Home Office-Profit' + ] + } + } + }, + xField: ['Sub-Category'], + yField: 'Quantity', + seriesField: 'Segment-Indicator', + axes: [ + { orient: 'left', visible: true, label: { visible: true } }, + { orient: 'bottom', visible: true } + ], + bar: { + state: { + selected: { fill: 'yellow' }, + selected_reverse: { opacity: 0.2 } + } + }, + scales: [ + { + id: 'color', + type: 'ordinal', + domain: [ + 'Consumer-Quantity', + 'Corporate-Quantity', + 'Home Office-Quantity', + 'Consumer-Sales', + 'Corporate-Sales', + 'Home Office-Sales', + 'Consumer-Profit', + 'Corporate-Profit', + 'Home Office-Profit' + ], + range: [ + '#2E62F1', + '#4DC36A', + '#FF8406', + '#FFCC00', + '#4F44CF', + '#5AC8FA', + '#003A8C', + '#B08AE2', + '#FF6341', + '#98DD62', + '#07A199', + '#87DBDD' + ] + } + ] + }, + style: { padding: 1 } + }, + { + indicatorKey: 'Sales', + title: 'Sales & Profit', + cellType: 'chart', + chartModule: 'vchart', + chartSpec: { + type: 'common', + series: [ + { + type: 'bar', + data: { + id: 'data1', + fields: { + 'Sub-Category': { + sortIndex: 0, + domain: [ + 'Chairs', + 'Tables', + 'Bookcases', + 'Furnishings', + 'Binders', + 'Art', + 'Storage', + 'Appliances', + 'Envelopes', + 'Fasteners', + 'Paper', + 'Labels', + 'Supplies', + 'Accessories', + 'Phones', + 'Copiers', + 'Machines' + ] + }, + 'Segment-Indicator': { + sortIndex: 1, + domain: [ + 'Consumer-Quantity', + 'Corporate-Quantity', + 'Home Office-Quantity', + 'Consumer-Sales', + 'Corporate-Sales', + 'Home Office-Sales', + 'Consumer-Profit', + 'Corporate-Profit', + 'Home Office-Profit' + ] + } + } + }, + stack: true, + xField: ['Sub-Category'], + yField: 'Sales', + seriesField: 'Segment-Indicator', + bar: { + state: { + selected: { fill: 'yellow' }, + selected_reverse: { opacity: 0.2 } + } + } + }, + { + type: 'line', + data: { + id: 'data2', + fields: { + 'Sub-Category': { + sortIndex: 0, + domain: [ + 'Chairs', + 'Tables', + 'Bookcases', + 'Furnishings', + 'Binders', + 'Art', + 'Storage', + 'Appliances', + 'Envelopes', + 'Fasteners', + 'Paper', + 'Labels', + 'Supplies', + 'Phones', + 'Accessories', + 'Machines', + 'Copiers' + ] + }, + 'Segment-Indicator': { + sortIndex: 1, + domain: [ + 'Consumer-Quantity', + 'Corporate-Quantity', + 'Home Office-Quantity', + 'Consumer-Sales', + 'Corporate-Sales', + 'Home Office-Sales', + 'Consumer-Profit', + 'Corporate-Profit', + 'Home Office-Profit' + ] + } + } + }, + stack: false, + xField: ['Sub-Category'], + yField: 'Profit', + seriesField: 'Segment-Indicator', + line: { + state: { + selected: { lineWidth: 3 }, + selected_reverse: { lineWidth: 1 } + } + }, + point: { + state: { + selected: { fill: 'yellow' }, + selected_reverse: { fill: '#ddd' } + } + } + } + ], + scales: [ + { + id: 'color', + type: 'ordinal', + domain: [ + 'Consumer-Quantity', + 'Corporate-Quantity', + 'Home Office-Quantity', + 'Consumer-Sales', + 'Corporate-Sales', + 'Home Office-Sales', + 'Consumer-Profit', + 'Corporate-Profit', + 'Home Office-Profit' + ], + range: [ + '#2E62F1', + '#4DC36A', + '#FF8406', + '#FFCC00', + '#4F44CF', + '#5AC8FA', + '#003A8C', + '#B08AE2', + '#FF6341', + '#98DD62', + '#07A199', + '#87DBDD' + ] + } + ] + }, + style: { padding: 1 } + } +]; diff --git a/src/views/plugin/tables/vtable/index.vue b/src/views/plugin/tables/vtable/index.vue new file mode 100644 index 0000000..85cf4e4 --- /dev/null +++ b/src/views/plugin/tables/vtable/index.vue @@ -0,0 +1,408 @@ + + +