From ef10c34571075381e83269ef176be5ba0f44ad51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A9=99=E5=AD=90?= <454313500@qq.com> Date: Mon, 18 Oct 2021 18:46:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF=E6=B7=BB=E5=8A=A0=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=BF=A1=E6=81=AF=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Yi.Framework.ApiMicroservice/YIDB.db | Bin 65536 -> 65536 bytes .../Yi.Framework.WebCore/CommonExtend.cs | 4 +- Yi.Vue/src/components/ccTable.vue | 2 - Yi.Vue/src/components/ccTreeview.vue | 4 +- Yi.Vue/src/layouts/default/Drawer.vue | 15 +- .../src/layouts/default/widgets/Account.vue | 6 +- .../layouts/default/widgets/Notifications.vue | 10 +- Yi.Vue/src/permission.js | 1 - Yi.Vue/src/router/index.js | 1 + Yi.Vue/src/views/AdmMenu.vue | 13 +- Yi.Vue/src/views/AdmMould.vue | 9 +- Yi.Vue/src/views/AdmRole.vue | 34 +- Yi.Vue/src/views/AdmRoleMenu.vue | 5 +- Yi.Vue/src/views/AdmUser.vue | 11 +- Yi.Vue/src/views/Index.vue | 461 +++++++++++++++++- Yi.Vue/src/views/Index2.vue | 25 + Yi.Vue/src/views/userInfo.vue | 254 ++++++++++ 17 files changed, 793 insertions(+), 62 deletions(-) create mode 100644 Yi.Vue/src/views/Index2.vue create mode 100644 Yi.Vue/src/views/userInfo.vue diff --git a/Yi.Framework/Yi.Framework.ApiMicroservice/YIDB.db b/Yi.Framework/Yi.Framework.ApiMicroservice/YIDB.db index 8173bcc19910ebb95860dc7e2158539b8ad73bf5..c5e78f306af2571c085471e654124020dfb6e706 100644 GIT binary patch delta 366 zcmYk1O-e&C6or$Qdz0oNIeCJEH!JEc9O%FWxTLoOl`cScU@=n%I%q*~RA~{5m7*0< z6vaRM8JNV0lkcxH;Ii8;bC+34`p zit0+d#H60UC+=~AF?u+~RjB+PRy0W~t1`n|Loy|rOwT&ACdzco@gyzlY<8{v!=gR^ z5tE0h#5smB{TZ|1caN}2v1FOVrhC|A)k%r+J7rNaw91rL%(1M~_-FW^%zAtH-zDHTQO z7g!&h>@I<1Ncbfaf`lNi650+0;U7OZ-~+|H`}l^*lb;sP{mfydqi>Y+&bV%`ULLyG z6Jt%W|BkgrgVK?6Y)tN)Xc3$#H9Zl_#^*$o_+Exxv`fMlHdty@b`Ynjn99~wRNq9+ zi5PEkTl?9<-gi!MMM?O>4y8tO{&uL>UG;~^FO&!id!tmcm>jl*3x09LC$^1h-KmmB L>DzLZEwlGmkHAA# diff --git a/Yi.Framework/Yi.Framework.WebCore/CommonExtend.cs b/Yi.Framework/Yi.Framework.WebCore/CommonExtend.cs index 08d104d2..9e5a2f12 100644 --- a/Yi.Framework/Yi.Framework.WebCore/CommonExtend.cs +++ b/Yi.Framework/Yi.Framework.WebCore/CommonExtend.cs @@ -33,11 +33,11 @@ namespace Yi.Framework.WebCore { IEnumerable claimlist = httpContext.AuthenticateAsync().Result.Principal.Claims; - Int32.TryParse(claimlist.FirstOrDefault(u => u.Type == "id").Value,out int resId); + Int32.TryParse(claimlist.FirstOrDefault(u => u.Type == ClaimTypes.Sid).Value,out int resId); return new user() { id =resId, - username = claimlist.FirstOrDefault(u => u.Type == "username").Value ?? "匿名" + username = claimlist.FirstOrDefault(u => u.Type == ClaimTypes.Name).Value ?? "匿名" }; } } diff --git a/Yi.Vue/src/components/ccTable.vue b/Yi.Vue/src/components/ccTable.vue index eff8c6e5..e3ae25d6 100644 --- a/Yi.Vue/src/components/ccTable.vue +++ b/Yi.Vue/src/components/ccTable.vue @@ -1,5 +1,4 @@ - \ No newline at end of file + // Utilities + // import { get } from 'vuex-pathify' + import Vue from 'vue' + + const lineSmooth = Vue.chartist.Interpolation.cardinal({ + tension: 0, + }) + + export default { + name: 'DashboardView', + + data: () => ({ + charts: [{ + type: 'Bar', + color: 'primary', + title: 'Website Views', + subtitle: 'Last Campaign Performance', + time: 'updated 10 minutes ago', + data: { + labels: ['Ja', 'Fe', 'Ma', 'Ap', 'Mai', 'Ju', 'Jul', 'Au', 'Se', 'Oc', 'No', 'De'], + series: [ + [542, 443, 320, 780, 553, 453, 326, 434, 568, 610, 756, 895], + ], + }, + options: { + axisX: { + showGrid: false, + }, + low: 0, + high: 1000, + chartPadding: { + top: 0, + right: 5, + bottom: 0, + left: 0, + }, + }, + responsiveOptions: [ + ['screen and (max-width: 640px)', { + seriesBarDistance: 5, + axisX: { + labelInterpolationFnc: function (value) { + return value[0] + }, + }, + }], + ], + }, { + type: 'Line', + color: 'success', + title: 'Daily Sales', + subtitle: '55% increase in today\'s sales', + time: 'updated 4 minutes ago', + data: { + labels: ['12am', '3pm', '6pm', '9pm', '12pm', '3am', '6am', '9am'], + series: [ + [230, 750, 450, 300, 280, 240, 200, 190], + ], + }, + options: { + lineSmooth, + low: 0, + high: 1000, // creative tim: we recommend you to set the high sa the biggest value + something for a better look + chartPadding: { + top: 0, + right: 0, + bottom: 0, + left: 0, + }, + }, + }, { + type: 'Line', + color: 'info', + title: 'Completed Tasks', + subtitle: 'Last Campaign Performance', + time: 'campaign sent 26 minutes ago', + data: { + labels: ['M', 'T', 'W', 'T', 'F', 'S', 'S'], + series: [ + [12, 17, 7, 17, 23, 18, 38], + ], + }, + options: { + lineSmooth, + low: 0, + high: 50, // creative tim: we recommend you to set the high sa the biggest value + something for a better look + chartPadding: { + top: 0, + right: 0, + bottom: 0, + left: 0, + }, + }, + }], + headers: [ + { + sortable: false, + text: 'ID', + value: 'id', + }, + { + sortable: false, + text: 'Name', + value: 'name', + }, + { + sortable: false, + text: 'Salary', + value: 'salary', + align: 'right', + }, + { + sortable: false, + text: 'Country', + value: 'country', + align: 'right', + }, + { + sortable: false, + text: 'City', + value: 'city', + align: 'right', + }, + ], + items: [ + { + id: 1, + name: 'Dakota Rice', + country: 'Niger', + city: 'Oud-Tunrhout', + salary: '$35,738', + }, + { + id: 2, + name: 'Minerva Hooper', + country: 'Curaçao', + city: 'Sinaai-Waas', + salary: '$23,738', + }, + { + id: 3, + name: 'Sage Rodriguez', + country: 'Netherlands', + city: 'Overland Park', + salary: '$56,142', + }, + { + id: 4, + name: 'Philip Chanley', + country: 'Korea, South', + city: 'Gloucester', + salary: '$38,735', + }, + { + id: 5, + name: 'Doris Greene', + country: 'Malawi', + city: 'Feldkirchen in Kārnten', + salary: '$63,542', + }, + ], + stats: [ + { + actionIcon: 'mdi-alert', + actionText: 'Get More Space...', + color: '#FD9A13', + icon: 'mdi-sofa-single', + title: 'Bookings', + value: '184', + }, + { + actionIcon: 'mdi-tag', + actionText: 'Tracked from Google Analytics', + color: 'primary', + icon: 'mdi-chart-bar', + title: 'Website Visits', + value: '75.521', + }, + { + actionIcon: 'mdi-calendar-range', + actionText: 'Last 24 Hours', + color: 'success', + icon: 'mdi-store', + title: 'Revenue', + value: '$34,245', + }, + { + actionIcon: 'mdi-history', + actionText: 'Just Updated', + color: 'info', + icon: 'mdi-twitter', + title: 'Followers', + value: '+245', + }, + ], + tabs: 0, + tasks: { + 0: [ + { + text: 'Sign contract for "What are conference organizers afraid of?"', + value: true, + }, + { + text: 'Lines From Great Russian Literature? Or E-mails From My Boss?', + value: false, + }, + { + text: 'Flooded: One year later, assessing what was lost and what was found when a ravaging rain swept through metro Detroit', + value: false, + }, + { + text: 'Create 4 Invisible User Experiences you Never Knew About', + value: true, + }, + ], + 1: [ + { + text: 'Flooded: One year later, assessing what was lost and what was found when a ravaging rain swept through metro Detroit', + value: true, + }, + { + text: 'Sign contract for "What are conference organizers afraid of?"', + value: false, + }, + ], + 2: [ + { + text: 'Lines From Great Russian Literature? Or E-mails From My Boss?', + value: false, + }, + { + text: 'Flooded: One year later, assessing what was lost and what was found when a ravaging rain swept through metro Detroit', + value: true, + }, + { + text: 'Sign contract for "What are conference organizers afraid of?"', + value: true, + }, + ], + }, + }), + + computed: { + // sales: get('sales/sales'), + // totalSales () { + // return this.sales.reduce((acc, val) => acc + val.salesInM, 0) + // }, + }, + } + diff --git a/Yi.Vue/src/views/Index2.vue b/Yi.Vue/src/views/Index2.vue new file mode 100644 index 00000000..cadecbbd --- /dev/null +++ b/Yi.Vue/src/views/Index2.vue @@ -0,0 +1,25 @@ + + \ No newline at end of file diff --git a/Yi.Vue/src/views/userInfo.vue b/Yi.Vue/src/views/userInfo.vue new file mode 100644 index 00000000..031c9563 --- /dev/null +++ b/Yi.Vue/src/views/userInfo.vue @@ -0,0 +1,254 @@ + + +