diff --git a/Yi.Vue2.x/.browserslistrc b/Yi.Vue2.x/.browserslistrc new file mode 100644 index 00000000..214388fe --- /dev/null +++ b/Yi.Vue2.x/.browserslistrc @@ -0,0 +1,3 @@ +> 1% +last 2 versions +not dead diff --git a/Yi.Vue2.x/.env.development b/Yi.Vue2.x/.env.development new file mode 100644 index 00000000..66cee758 --- /dev/null +++ b/Yi.Vue2.x/.env.development @@ -0,0 +1,4 @@ +#接口服务地址 +VUE_APP_SERVICE_URL='https://localhost:44329/api' +#开发环境路径前缀 +VUE_APP_BASE_API='/dev-apis' \ No newline at end of file diff --git a/Yi.Vue2.x/.env.production b/Yi.Vue2.x/.env.production new file mode 100644 index 00000000..e08412fa --- /dev/null +++ b/Yi.Vue2.x/.env.production @@ -0,0 +1,2 @@ +#生成环境路径前缀 +VUE_APP_BASE_API='/prod-apis' \ No newline at end of file diff --git a/Yi.Vue2.x/.gitignore b/Yi.Vue2.x/.gitignore new file mode 100644 index 00000000..403adbc1 --- /dev/null +++ b/Yi.Vue2.x/.gitignore @@ -0,0 +1,23 @@ +.DS_Store +node_modules +/dist + + +# local env files +.env.local +.env.*.local + +# Log files +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* + +# Editor directories and files +.idea +.vscode +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/Yi.Vue2.x/README.md b/Yi.Vue2.x/README.md new file mode 100644 index 00000000..7d33362c --- /dev/null +++ b/Yi.Vue2.x/README.md @@ -0,0 +1,19 @@ +# vuetify-test + +## Project setup +``` +npm install +``` + +### Compiles and hot-reloads for development +``` +npm run serve +``` + +### Compiles and minifies for production +``` +npm run build +``` + +### Customize configuration +See [Configuration Reference](https://cli.vuejs.org/config/). diff --git a/Yi.Vue2.x/src/App.vue b/Yi.Vue2.x/src/App.vue new file mode 100644 index 00000000..706a0b0b --- /dev/null +++ b/Yi.Vue2.x/src/App.vue @@ -0,0 +1,23 @@ + + + + + + + diff --git a/Yi.Vue2.x/src/api/accountApi.js b/Yi.Vue2.x/src/api/accountApi.js new file mode 100644 index 00000000..30744d7a --- /dev/null +++ b/Yi.Vue2.x/src/api/accountApi.js @@ -0,0 +1,46 @@ +import myaxios from '@/util/myaxios' +export default { + login(username, password) { + return myaxios({ + url: '/Account/login', + method: 'post', + data: { + username, + password + } + }) + }, + logout() { + return myaxios({ + url: '/Account/logout', + method: 'post', + }) + }, + register(username, password, phone, code) { + return myaxios({ + url: `/Account/register?code=${code}`, + method: 'post', + data: { username, password, phone } + }) + }, + email(emailAddress) { + return myaxios({ + url: `/Account/email?emailAddress=${emailAddress}`, + method: 'post', + }) + }, + SendSMS(smsAddress) { + return myaxios({ + url: `/Account/SendSMS?SMSAddress=${smsAddress}`, + method: 'post', + }) + }, + changePassword(user, newPassword) { + return myaxios({ + url: `/Account/changePassword`, + method: 'put', + data: { user, newPassword } + }) + } + +} \ No newline at end of file diff --git a/Yi.Vue2.x/src/api/fileApi.js b/Yi.Vue2.x/src/api/fileApi.js new file mode 100644 index 00000000..3b653b07 --- /dev/null +++ b/Yi.Vue2.x/src/api/fileApi.js @@ -0,0 +1,11 @@ +import myaxios from '@/util/myaxios' +export default { + EditIcon(file) { + return myaxios({ + url: '/File/EditIcon', + method: 'post', + headers: { "Content-Type": "multipart/form-data" }, + data: file + }) + } +} \ No newline at end of file diff --git a/Yi.Vue2.x/src/api/menuApi.js b/Yi.Vue2.x/src/api/menuApi.js new file mode 100644 index 00000000..26abc23a --- /dev/null +++ b/Yi.Vue2.x/src/api/menuApi.js @@ -0,0 +1,50 @@ +import myaxios from '@/util/myaxios' +export default { + GetMenuInMould() { + return myaxios({ + url: '/Menu/GetMenuInMould', + method: 'get' + }) + }, + addChildrenMenu(id, data) { + return myaxios({ + url: '/Menu/addChildrenMenu', + method: 'post', + data: { parentId: id, data } + }) + }, + UpdateMenu(data) { + return myaxios({ + url: '/Menu/UpdateMenu', + method: 'put', + data: data + }) + }, + DelListMenu(ids) { + return myaxios({ + url: '/Menu/DelListMenu', + method: 'delete', + data: ids + }) + }, + AddTopMenu(data) { + return myaxios({ + url: '/Menu/AddTopMenu', + method: 'post', + data: data + }) + }, + SetMouldByMenu(menuId, mouldId) { + return myaxios({ + url: '/Menu/SetMouldByMenu', + method: 'post', + data: { id1: menuId, id2: mouldId } + }) + }, + GetTopMenusByHttpUser() { + return myaxios({ + url: '/Menu/GetTopMenusByHttpUser', + method: 'get' + }) + } +} \ No newline at end of file diff --git a/Yi.Vue2.x/src/api/mouldApi.js b/Yi.Vue2.x/src/api/mouldApi.js new file mode 100644 index 00000000..eefdde37 --- /dev/null +++ b/Yi.Vue2.x/src/api/mouldApi.js @@ -0,0 +1,10 @@ +import myaxios from '@/util/myaxios' +export default { + getMould() { + return myaxios({ + url: '/Mould/GetMould', + method: 'get' + }) + } + +} \ No newline at end of file diff --git a/Yi.Vue2.x/src/api/panApi.js b/Yi.Vue2.x/src/api/panApi.js new file mode 100644 index 00000000..49bf9cd9 --- /dev/null +++ b/Yi.Vue2.x/src/api/panApi.js @@ -0,0 +1,19 @@ +import myaxios from '@/util/myaxios' +export default { + GetPanFiles(dirName) { + return myaxios({ + url: '/Pan/GetPanFiles', + method: 'post', + data: { dirName} + }) + }, + Download(dirName,allName) + { + return myaxios({ + url: '/Pan/Download', + method: 'post', + data: { dirName,allName} + }) + + } +} \ No newline at end of file diff --git a/Yi.Vue2.x/src/api/roleApi.js b/Yi.Vue2.x/src/api/roleApi.js new file mode 100644 index 00000000..615deacd --- /dev/null +++ b/Yi.Vue2.x/src/api/roleApi.js @@ -0,0 +1,29 @@ +import myaxios from '@/util/myaxios' +export default { + getRole() { + return myaxios({ + url: '/Role/getRole', + method: 'get' + }) + }, + setMenuByRole(roleList, menuList) { + return myaxios({ + url: '/Role/setMenuByRole', + method: 'post', + data: { ids1: roleList, ids2: menuList } + }) + }, + GetTopMenusByRoleId(roleId) { + return myaxios({ + url: `/Role/GetTopMenusByRoleId?roleId=${roleId}`, + method: 'get' + + }) + }, + GetRolesByUserId(userId) { + return myaxios({ + url: `/Role/GetRolesByUserId?userId=${userId}`, + method: 'get' + }) + }, +} \ No newline at end of file diff --git a/Yi.Vue2.x/src/api/userApi.js b/Yi.Vue2.x/src/api/userApi.js new file mode 100644 index 00000000..a76e9398 --- /dev/null +++ b/Yi.Vue2.x/src/api/userApi.js @@ -0,0 +1,31 @@ +import myaxios from '@/util/myaxios' +export default { + SetRoleByUser(userIds, roleIds) { + return myaxios({ + url: '/User/SetRoleByUser', + method: 'post', + data: { "ids1": userIds, "ids2": roleIds } + }) + }, + + + + GetUserInRolesByHttpUser() { + return myaxios({ + url: `/User/GetUserInRolesByHttpUser`, + method: 'get' + }) + }, + GetMenuByHttpUser() { + return myaxios({ + url: `/User/GetMenuByHttpUser`, + method: 'get' + }) + }, + GetAxiosByRouter(router) { + return myaxios({ + url: `/User/GetAxiosByRouter?router=${router}`, + method: 'get' + }) + } +} \ No newline at end of file diff --git a/Yi.Vue2.x/src/assets/clint-mckoy.jpg b/Yi.Vue2.x/src/assets/clint-mckoy.jpg new file mode 100644 index 00000000..6e23b7b8 Binary files /dev/null and b/Yi.Vue2.x/src/assets/clint-mckoy.jpg differ diff --git a/Yi.Vue2.x/src/assets/lock.jpg b/Yi.Vue2.x/src/assets/lock.jpg new file mode 100644 index 00000000..6e5d4c0a Binary files /dev/null and b/Yi.Vue2.x/src/assets/lock.jpg differ diff --git a/Yi.Vue2.x/src/assets/login.jpg b/Yi.Vue2.x/src/assets/login.jpg new file mode 100644 index 00000000..52b905a7 Binary files /dev/null and b/Yi.Vue2.x/src/assets/login.jpg differ diff --git a/Yi.Vue2.x/src/assets/login.svg b/Yi.Vue2.x/src/assets/login.svg new file mode 100644 index 00000000..e27fd805 --- /dev/null +++ b/Yi.Vue2.x/src/assets/login.svg @@ -0,0 +1 @@ +instat_analysis \ No newline at end of file diff --git a/Yi.Vue2.x/src/assets/logo.png b/Yi.Vue2.x/src/assets/logo.png new file mode 100644 index 00000000..f3d2503f Binary files /dev/null and b/Yi.Vue2.x/src/assets/logo.png differ diff --git a/Yi.Vue2.x/src/assets/logo.svg b/Yi.Vue2.x/src/assets/logo.svg new file mode 100644 index 00000000..145b6d13 --- /dev/null +++ b/Yi.Vue2.x/src/assets/logo.svg @@ -0,0 +1 @@ +Artboard 46 diff --git a/Yi.Vue2.x/src/assets/mask-dark.png b/Yi.Vue2.x/src/assets/mask-dark.png new file mode 100644 index 00000000..68a00482 Binary files /dev/null and b/Yi.Vue2.x/src/assets/mask-dark.png differ diff --git a/Yi.Vue2.x/src/assets/mask-light.png b/Yi.Vue2.x/src/assets/mask-light.png new file mode 100644 index 00000000..66287717 Binary files /dev/null and b/Yi.Vue2.x/src/assets/mask-light.png differ diff --git a/Yi.Vue2.x/src/assets/pricing.jpg b/Yi.Vue2.x/src/assets/pricing.jpg new file mode 100644 index 00000000..df49d3fa Binary files /dev/null and b/Yi.Vue2.x/src/assets/pricing.jpg differ diff --git a/Yi.Vue2.x/src/assets/register.jpg b/Yi.Vue2.x/src/assets/register.jpg new file mode 100644 index 00000000..94d234cf Binary files /dev/null and b/Yi.Vue2.x/src/assets/register.jpg differ diff --git a/Yi.Vue2.x/src/assets/tree-3.png b/Yi.Vue2.x/src/assets/tree-3.png new file mode 100644 index 00000000..b854520e Binary files /dev/null and b/Yi.Vue2.x/src/assets/tree-3.png differ diff --git a/Yi.Vue2.x/src/assets/tree-4.png b/Yi.Vue2.x/src/assets/tree-4.png new file mode 100644 index 00000000..13eae8fb Binary files /dev/null and b/Yi.Vue2.x/src/assets/tree-4.png differ diff --git a/Yi.Vue2.x/src/assets/tree.png b/Yi.Vue2.x/src/assets/tree.png new file mode 100644 index 00000000..be561134 Binary files /dev/null and b/Yi.Vue2.x/src/assets/tree.png differ diff --git a/Yi.Vue2.x/src/assets/vmd.svg b/Yi.Vue2.x/src/assets/vmd.svg new file mode 100644 index 00000000..0bdb0a1d --- /dev/null +++ b/Yi.Vue2.x/src/assets/vmd.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Yi.Vue2.x/src/assets/vuetify.svg b/Yi.Vue2.x/src/assets/vuetify.svg new file mode 100644 index 00000000..4ef7bd53 --- /dev/null +++ b/Yi.Vue2.x/src/assets/vuetify.svg @@ -0,0 +1 @@ +Artboard 47 diff --git a/Yi.Vue2.x/src/components/Links.vue b/Yi.Vue2.x/src/components/Links.vue new file mode 100644 index 00000000..b00cd06e --- /dev/null +++ b/Yi.Vue2.x/src/components/Links.vue @@ -0,0 +1,64 @@ + + + + + + + + + + + + © {{ (new Date()).getFullYear() }}, Made by mdi-vuetify + ccnetcore + + + + + + + + + diff --git a/Yi.Vue2.x/src/components/MaterialAlert.vue b/Yi.Vue2.x/src/components/MaterialAlert.vue new file mode 100644 index 00000000..2397fc92 --- /dev/null +++ b/Yi.Vue2.x/src/components/MaterialAlert.vue @@ -0,0 +1,59 @@ + + + + + + {{ $attrs.icon }} + + + + + + + + + + $vuetify.icons.cancel + + + + + + + + + diff --git a/Yi.Vue2.x/src/components/MaterialCard.vue b/Yi.Vue2.x/src/components/MaterialCard.vue new file mode 100644 index 00000000..c8002d5f --- /dev/null +++ b/Yi.Vue2.x/src/components/MaterialCard.vue @@ -0,0 +1,113 @@ + + + + + + + + + + + + + {{ heading }} + + + + + + + + + {{ title }} + + + + + + + {{ subtitle }} + + + + + + + + + + + + + + + + + + + + diff --git a/Yi.Vue2.x/src/components/MaterialChartCard.vue b/Yi.Vue2.x/src/components/MaterialChartCard.vue new file mode 100644 index 00000000..4049201e --- /dev/null +++ b/Yi.Vue2.x/src/components/MaterialChartCard.vue @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Yi.Vue2.x/src/components/MaterialSnackbar.vue b/Yi.Vue2.x/src/components/MaterialSnackbar.vue new file mode 100644 index 00000000..2801d97c --- /dev/null +++ b/Yi.Vue2.x/src/components/MaterialSnackbar.vue @@ -0,0 +1,78 @@ + + + + + + + + + + + diff --git a/Yi.Vue2.x/src/components/MaterialStatsCard.vue b/Yi.Vue2.x/src/components/MaterialStatsCard.vue new file mode 100644 index 00000000..f1322d15 --- /dev/null +++ b/Yi.Vue2.x/src/components/MaterialStatsCard.vue @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + diff --git a/Yi.Vue2.x/src/components/TableApi.js b/Yi.Vue2.x/src/components/TableApi.js new file mode 100644 index 00000000..9a5dbd3a --- /dev/null +++ b/Yi.Vue2.x/src/components/TableApi.js @@ -0,0 +1,30 @@ +import myaxios from '@/util/myaxios' +export default { + getItem(url) { + return myaxios({ + url: url, + method: 'get' + }) + }, + addItem(url, data) { + return myaxios({ + url: url, + method: 'post', + data: data + }) + }, + updateItem(url, data) { + return myaxios({ + url: url, + method: 'put', + data: data + }) + }, + delItemList(url, Ids) { + return myaxios({ + url: url, + method: 'delete', + data: Ids + }) + }, +} \ No newline at end of file diff --git a/Yi.Vue2.x/src/components/ViewIntro.vue b/Yi.Vue2.x/src/components/ViewIntro.vue new file mode 100644 index 00000000..eb1ca1cc --- /dev/null +++ b/Yi.Vue2.x/src/components/ViewIntro.vue @@ -0,0 +1,37 @@ + + + + + + Please checkout the full documentation + + + + + + + + + diff --git a/Yi.Vue2.x/src/components/app/BarItem.vue b/Yi.Vue2.x/src/components/app/BarItem.vue new file mode 100644 index 00000000..fe36dfb6 --- /dev/null +++ b/Yi.Vue2.x/src/components/app/BarItem.vue @@ -0,0 +1,29 @@ + diff --git a/Yi.Vue2.x/src/components/app/Btn.vue b/Yi.Vue2.x/src/components/app/Btn.vue new file mode 100644 index 00000000..8de14054 --- /dev/null +++ b/Yi.Vue2.x/src/components/app/Btn.vue @@ -0,0 +1,22 @@ + + + + + + + diff --git a/Yi.Vue2.x/src/components/app/Card.vue b/Yi.Vue2.x/src/components/app/Card.vue new file mode 100644 index 00000000..d8dd5ff7 --- /dev/null +++ b/Yi.Vue2.x/src/components/app/Card.vue @@ -0,0 +1,12 @@ + + + + + + + diff --git a/Yi.Vue2.x/src/components/app/Tabs.vue b/Yi.Vue2.x/src/components/app/Tabs.vue new file mode 100644 index 00000000..16df63af --- /dev/null +++ b/Yi.Vue2.x/src/components/app/Tabs.vue @@ -0,0 +1,42 @@ + + + + + + + + + + + diff --git a/Yi.Vue2.x/src/components/ccAvatar.vue b/Yi.Vue2.x/src/components/ccAvatar.vue new file mode 100644 index 00000000..a8709e15 --- /dev/null +++ b/Yi.Vue2.x/src/components/ccAvatar.vue @@ -0,0 +1,28 @@ + + + + + + + + diff --git a/Yi.Vue2.x/src/components/ccCombobox.vue b/Yi.Vue2.x/src/components/ccCombobox.vue new file mode 100644 index 00000000..78f07eb1 --- /dev/null +++ b/Yi.Vue2.x/src/components/ccCombobox.vue @@ -0,0 +1,67 @@ + + + + + {{ headers }} + + + + + {{ headers }} + + + + + + + + + + *可多选 + + + + 关闭 + + + + + + + \ No newline at end of file diff --git a/Yi.Vue2.x/src/components/ccTable.vue b/Yi.Vue2.x/src/components/ccTable.vue new file mode 100644 index 00000000..aa4ae38b --- /dev/null +++ b/Yi.Vue2.x/src/components/ccTable.vue @@ -0,0 +1,245 @@ + + + + + + + + + + + 添加新项 + + + + + + + {{ formTitle }} + + + + + + + + + + + + + + + 取消 + 保存 + + + + + + 删除所选 + + + + + + + + + + mdi-pencil + + + mdi-delete + + + + + + 刷新 + + + + \ No newline at end of file diff --git a/Yi.Vue2.x/src/components/ccTreeview.vue b/Yi.Vue2.x/src/components/ccTreeview.vue new file mode 100644 index 00000000..e90c02c2 --- /dev/null +++ b/Yi.Vue2.x/src/components/ccTreeview.vue @@ -0,0 +1,227 @@ + + + + 展开全部 + 添加新项 + + 删除所选 + + + + + + + + + {{ formTitle }} + + + + + + + + + + + + + + + 取消 + 保存 + + + + + + + 编号:{{ item.id }} + 图标:{{ item.icon }} + 路由:{{ item.router }} + 接口名:{{ item.mould.mould_name }} + 接口地址:{{ item.mould.url }} + + + + 保存 + + + 添加子菜单 + 编辑 + + 删除 + + + + + + \ No newline at end of file diff --git a/Yi.Vue2.x/src/layouts/default/AppBar.vue b/Yi.Vue2.x/src/layouts/default/AppBar.vue new file mode 100644 index 00000000..ab818026 --- /dev/null +++ b/Yi.Vue2.x/src/layouts/default/AppBar.vue @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/Yi.Vue2.x/src/layouts/default/Drawer.vue b/Yi.Vue2.x/src/layouts/default/Drawer.vue new file mode 100644 index 00000000..5d080a8b --- /dev/null +++ b/Yi.Vue2.x/src/layouts/default/Drawer.vue @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + Documentation + + + + mdi-package-up + + 退出 + + + + + + + + + + + diff --git a/Yi.Vue2.x/src/layouts/default/Footer.vue b/Yi.Vue2.x/src/layouts/default/Footer.vue new file mode 100644 index 00000000..5feef9dd --- /dev/null +++ b/Yi.Vue2.x/src/layouts/default/Footer.vue @@ -0,0 +1,22 @@ + + + + + + + diff --git a/Yi.Vue2.x/src/layouts/default/Index.vue b/Yi.Vue2.x/src/layouts/default/Index.vue new file mode 100644 index 00000000..1aa5350e --- /dev/null +++ b/Yi.Vue2.x/src/layouts/default/Index.vue @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + diff --git a/Yi.Vue2.x/src/layouts/default/List.vue b/Yi.Vue2.x/src/layouts/default/List.vue new file mode 100644 index 00000000..f10e8485 --- /dev/null +++ b/Yi.Vue2.x/src/layouts/default/List.vue @@ -0,0 +1,40 @@ + + + + + + + + + + + diff --git a/Yi.Vue2.x/src/layouts/default/ListGroup.vue b/Yi.Vue2.x/src/layouts/default/ListGroup.vue new file mode 100644 index 00000000..2f4811ef --- /dev/null +++ b/Yi.Vue2.x/src/layouts/default/ListGroup.vue @@ -0,0 +1,91 @@ + + + + + {{ title }} + + + + + + + + + + + + + + + + + + + + diff --git a/Yi.Vue2.x/src/layouts/default/ListItem.vue b/Yi.Vue2.x/src/layouts/default/ListItem.vue new file mode 100644 index 00000000..47b1ee83 --- /dev/null +++ b/Yi.Vue2.x/src/layouts/default/ListItem.vue @@ -0,0 +1,58 @@ + + + + {{ title }} + + + + + + + + + + + + + + + + + diff --git a/Yi.Vue2.x/src/layouts/default/Settings.vue b/Yi.Vue2.x/src/layouts/default/Settings.vue new file mode 100644 index 00000000..ef0a3bde --- /dev/null +++ b/Yi.Vue2.x/src/layouts/default/Settings.vue @@ -0,0 +1,303 @@ + + + + mdi-cog + + + + + + 主题颜色 + + + + + + + + + + + + 图层颜色 + + + + + + + + + + + + + 主题模式 + + + + + + + + + + + + 迷你菜单 + + + + + + + + + + + + 图片菜单 + + + + + + + + + + + 图片 + + + + + + + + + + + + + + + Github 地址 + + + + 加入我们 + + + + + + 感谢你的支持! + + + + mdi-twitter + - 45 + + + + mdi-facebook + - 50 + + + + + + + + + + diff --git a/Yi.Vue2.x/src/layouts/default/View.vue b/Yi.Vue2.x/src/layouts/default/View.vue new file mode 100644 index 00000000..dfc65be7 --- /dev/null +++ b/Yi.Vue2.x/src/layouts/default/View.vue @@ -0,0 +1,20 @@ + + + + + + + + + + diff --git a/Yi.Vue2.x/src/layouts/default/widgets/Account.vue b/Yi.Vue2.x/src/layouts/default/widgets/Account.vue new file mode 100644 index 00000000..a6218329 --- /dev/null +++ b/Yi.Vue2.x/src/layouts/default/widgets/Account.vue @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Yi.Vue2.x/src/layouts/default/widgets/AccountSettings.vue b/Yi.Vue2.x/src/layouts/default/widgets/AccountSettings.vue new file mode 100644 index 00000000..bf5d48cd --- /dev/null +++ b/Yi.Vue2.x/src/layouts/default/widgets/AccountSettings.vue @@ -0,0 +1,39 @@ + + + + + diff --git a/Yi.Vue2.x/src/layouts/default/widgets/DrawerHeader.vue b/Yi.Vue2.x/src/layouts/default/widgets/DrawerHeader.vue new file mode 100644 index 00000000..104474f1 --- /dev/null +++ b/Yi.Vue2.x/src/layouts/default/widgets/DrawerHeader.vue @@ -0,0 +1,29 @@ + + + + + + + + + Yi + + Framework + + + + + + diff --git a/Yi.Vue2.x/src/layouts/default/widgets/DrawerToggle.vue b/Yi.Vue2.x/src/layouts/default/widgets/DrawerToggle.vue new file mode 100644 index 00000000..782ac12f --- /dev/null +++ b/Yi.Vue2.x/src/layouts/default/widgets/DrawerToggle.vue @@ -0,0 +1,31 @@ + + + + {{ $store.state.home.mini ? 'mdi-format-list-bulleted' : 'mdi-dots-vertical' }} + + + + + diff --git a/Yi.Vue2.x/src/layouts/default/widgets/GoHome.vue b/Yi.Vue2.x/src/layouts/default/widgets/GoHome.vue new file mode 100644 index 00000000..60b54a2b --- /dev/null +++ b/Yi.Vue2.x/src/layouts/default/widgets/GoHome.vue @@ -0,0 +1,17 @@ + + + mdi-view-dashboard + + + + diff --git a/Yi.Vue2.x/src/layouts/default/widgets/Notifications.vue b/Yi.Vue2.x/src/layouts/default/widgets/Notifications.vue new file mode 100644 index 00000000..f6075607 --- /dev/null +++ b/Yi.Vue2.x/src/layouts/default/widgets/Notifications.vue @@ -0,0 +1,62 @@ + + + + + + + 5 + + + mdi-bell + + + + + + + + {{ n }} + + + + + + + diff --git a/Yi.Vue2.x/src/layouts/default/widgets/Search.vue b/Yi.Vue2.x/src/layouts/default/widgets/Search.vue new file mode 100644 index 00000000..8c6e3368 --- /dev/null +++ b/Yi.Vue2.x/src/layouts/default/widgets/Search.vue @@ -0,0 +1,31 @@ + + + + + mdi-magnify + + + + + + diff --git a/Yi.Vue2.x/src/layouts/login/Index.vue b/Yi.Vue2.x/src/layouts/login/Index.vue new file mode 100644 index 00000000..7df60b61 --- /dev/null +++ b/Yi.Vue2.x/src/layouts/login/Index.vue @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Yi.Vue2.x/src/main.js b/Yi.Vue2.x/src/main.js new file mode 100644 index 00000000..4443c42a --- /dev/null +++ b/Yi.Vue2.x/src/main.js @@ -0,0 +1,24 @@ +import Vue from 'vue' +import App from './App.vue' +import router from './router' +import vuetify from './plugins/vuetify' +import VuetifyDialog from 'vuetify-dialog' +import 'vuetify-dialog/dist/vuetify-dialog.css' +import './plugins' +import "./permission" +import store from './store/index' + +Vue.config.productionTip = false +Vue.use(VuetifyDialog, { + context: { + vuetify + } +}); +let vm = new Vue({ + router, + store, + vuetify, + render: function(h) { return h(App) } +}).$mount('#app') + +export default vm; \ No newline at end of file diff --git a/Yi.Vue2.x/src/permission.js b/Yi.Vue2.x/src/permission.js new file mode 100644 index 00000000..54c597df --- /dev/null +++ b/Yi.Vue2.x/src/permission.js @@ -0,0 +1,18 @@ +import router from './router/index' +import store from './store/index' +// import accountApi from '@/api/accountApi' + + +router.beforeEach((to, from, next) => { + const user = store.state.user.user; //获取是有user + if (!user) { //如果没有登入 + if (to.path == '/login/' || to.path == '/register/' || to.path == '/reset_password/' || to.path == '/qq/') { + next(); + } else { + next({ path: '/login/' }); + } + } else { + next(); + } + +}) \ No newline at end of file diff --git a/Yi.Vue2.x/src/plugins/app.js b/Yi.Vue2.x/src/plugins/app.js new file mode 100644 index 00000000..740a6f5f --- /dev/null +++ b/Yi.Vue2.x/src/plugins/app.js @@ -0,0 +1,20 @@ +/** + * plugins/app.js + * + * Automatically loads and bootstraps files + * in the `./src/components/` folder. + */ + +// Imports +import Vue from 'vue' + +const requireComponent = require.context('@/components', true, /\.vue$/) + +for (const file of requireComponent.keys()) { + const componentConfig = requireComponent(file) + + Vue.component( + componentConfig.default.name, + componentConfig.default || componentConfig, + ) +} diff --git a/Yi.Vue2.x/src/plugins/chartist.js b/Yi.Vue2.x/src/plugins/chartist.js new file mode 100644 index 00000000..2c8bb2d9 --- /dev/null +++ b/Yi.Vue2.x/src/plugins/chartist.js @@ -0,0 +1,4 @@ +import Vue from 'vue' +import 'chartist/dist/chartist.min.css' + +Vue.use(require('vue-chartist')) diff --git a/Yi.Vue2.x/src/plugins/index.js b/Yi.Vue2.x/src/plugins/index.js new file mode 100644 index 00000000..e65178ed --- /dev/null +++ b/Yi.Vue2.x/src/plugins/index.js @@ -0,0 +1,6 @@ +// Automatically included in './src/main.js' + +import './app' +import './chartist' +// import './webfontloader' +// import './vue-meta' \ No newline at end of file diff --git a/Yi.Vue2.x/src/plugins/vuetify.js b/Yi.Vue2.x/src/plugins/vuetify.js new file mode 100644 index 00000000..8634eeef --- /dev/null +++ b/Yi.Vue2.x/src/plugins/vuetify.js @@ -0,0 +1,30 @@ +// Vuetify Documentation https://vuetifyjs.com + +import Vue from 'vue' +import Vuetify from 'vuetify/lib/framework' +import ripple from 'vuetify/lib/directives/ripple' + +Vue.use(Vuetify, { directives: { ripple } }) + +const theme = { + primary: '#E91E63', + secondary: '#9C27b0', + accent: '#e91e63', + info: '#00CAE3', + success: '#4CAF50', + warning: '#FB8C00', + error: '#FF5252', +} + +export default new Vuetify({ + breakpoint: { mobileBreakpoint: 960 }, + icons: { + values: { expand: 'mdi-menu-down' }, + }, + theme: { + themes: { + dark: theme, + light: theme, + }, + }, +}) \ No newline at end of file diff --git a/Yi.Vue2.x/src/router/index.js b/Yi.Vue2.x/src/router/index.js new file mode 100644 index 00000000..7fe4996e --- /dev/null +++ b/Yi.Vue2.x/src/router/index.js @@ -0,0 +1,45 @@ +import Vue from 'vue' +import VueRouter from 'vue-router' + + +import { trailingSlash } from '@/util/helpers' +import { + layout, + route, +} from '@/util/routes' +Vue.use(VueRouter) + + + +const router = new VueRouter({ + mode: 'history', + base: process.env.BASE_URL, + scrollBehavior: (to, from, savedPosition) => { + if (to.hash) return { selector: to.hash } + if (savedPosition) return savedPosition + + return { x: 0, y: 0 } + }, + routes: [ + layout('Default', [ + route('Index'), + route('AdmUser', null, 'AdmUser'), + route('AdmRole', null, 'AdmRole'), + route('AdmMenu', null, 'AdmMenu'), + route('AdmMould', null, 'AdmMould'), + route('AdmRoleMenu', null, 'AdmRoleMenu'), + route('userInfo', null, 'userInfo'), + route('Pan',null,'pan'), + route('PanInfo',null,'PanInfo') + ]), + layout('Login', [ + route('login', null, 'login'), + route('register', null, 'register') + ]) + + ] +}) +router.beforeEach((to, from, next) => { + return to.path.endsWith('/') ? next() : next(trailingSlash(to.path)) +}) +export default router \ No newline at end of file diff --git a/Yi.Vue2.x/src/store/index.js b/Yi.Vue2.x/src/store/index.js new file mode 100644 index 00000000..1f6c6b21 --- /dev/null +++ b/Yi.Vue2.x/src/store/index.js @@ -0,0 +1,20 @@ +import Vue from 'vue' +import Vuex from 'vuex' +import home from './modules/home' +import user from './modules/user' +import theme from './modules/theme' +import loader from './modules/loader' +import pan from './modules/pan' +Vue.use(Vuex); + +//实例化 +const store = new Vuex.Store({ + modules: { + home, + user, + theme, + loader, + pan + } +}) +export default store \ No newline at end of file diff --git a/Yi.Vue2.x/src/store/modules/home.js b/Yi.Vue2.x/src/store/modules/home.js new file mode 100644 index 00000000..debfaa81 --- /dev/null +++ b/Yi.Vue2.x/src/store/modules/home.js @@ -0,0 +1,56 @@ +const state = { + drawer: null, + drawerImage: true, + mini: false, + items: [{ + title: 'Dashboard', + icon: 'mdi-view-dashboard', + to: '/', + }, + { + title: 'User Profile', + icon: 'mdi-account', + to: '/components/profile/', + }, + { + title: 'Regular Tables', + icon: 'mdi-clipboard-outline', + to: '/tables/regular/', + }, + { + title: 'Typography', + icon: 'mdi-format-font', + to: '/components/typography/', + }, + { + title: 'Icons', + icon: 'mdi-chart-bubble', + to: '/components/icons/', + }, + { + title: 'Google Maps', + icon: 'mdi-map-marker', + to: '/maps/google/', + }, + { + title: 'Notifications', + icon: 'mdi-bell', + to: '/components/notifications/', + }, + ], +} + +const mutations = { //变化//载荷 + SetDrawerImage(state, drawerImage) { + state.drawerImage = drawerImage + } +} + +//在action中可以配合axios进行权限判断 +const actions = { //动作 + +} +const getters = {} + + +export default { state, mutations, actions, getters } \ No newline at end of file diff --git a/Yi.Vue2.x/src/store/modules/loader.js b/Yi.Vue2.x/src/store/modules/loader.js new file mode 100644 index 00000000..64b0b327 --- /dev/null +++ b/Yi.Vue2.x/src/store/modules/loader.js @@ -0,0 +1,34 @@ +const state = { //状态 + load: false +} + +const mutations = { //变化//载荷 + OPEN(state) { + state.load = true; + }, + CLOSE(state) { + state.load = false; + }, +} + +//在action中可以配合axios进行权限判断 +const actions = { //动作 + openLoad(context) { + context.commit('OPEN') + }, + closeLoad(context) { + context.commit('CLOSE') + } +} + +// const getters = { //类似与计算属性 派生属性 +// msg(state) { +// if (state.count > 80) { +// return "成绩优异" +// } else { +// return "成绩不合格" +// } +// } +// } + +export default { state, mutations, actions } \ No newline at end of file diff --git a/Yi.Vue2.x/src/store/modules/pan.js b/Yi.Vue2.x/src/store/modules/pan.js new file mode 100644 index 00000000..015b80fb --- /dev/null +++ b/Yi.Vue2.x/src/store/modules/pan.js @@ -0,0 +1,36 @@ +const state = { + basePath: "", + extendPath:"" +} + +const mutations = { //变化//载荷 + SetExtendPath(state, extendPath) { + state.extendPath = extendPath + }, + + SetBasePath(state, basePath) { + state.basePath = basePath + } +} + +//在action中可以配合axios进行权限判断 +const actions = { //动作 + Set_ExtendPath(context,extendPath) { + context.commit('SetExtendPath',extendPath) + }, + Set_BasePath(context,basePath) { + context.commit('SetBasePath',basePath) + }, + Add_ExtendPath(context,extendPath) { + context.commit('SetExtendPath',context.state.extendPath+"/"+extendPath) + }, +} +const getters = { + path: state => { + return state.basePath+state.extendPath; + } + +} + + +export default { state, mutations, actions, getters } \ No newline at end of file diff --git a/Yi.Vue2.x/src/store/modules/theme.js b/Yi.Vue2.x/src/store/modules/theme.js new file mode 100644 index 00000000..131d8683 --- /dev/null +++ b/Yi.Vue2.x/src/store/modules/theme.js @@ -0,0 +1,33 @@ +import vuetify from '../../plugins/vuetify'; +const state = { //状态 + light: { + primary: '#1976D2', + secondary: '#424242', + accent: '#82B1FF', + error: '#FF5252', + info: '#2196F3', + success: '#4CAF50', + warning: '#FFC107', + cyan: "#FAB2B1", + blue: "#2196F3" + }, + dark: {} +} + +const mutations = { //变化//载荷 + SET_Light(state, n) { + state.light = n + vuetify.framework.theme.themes.light = n + }, +} + +//在action中可以配合axios进行权限判断 +const actions = { //动作 + set_light(context, n) { + context.commit('SET_Light', n) + }, + +} + + +export default { state, mutations, actions } \ No newline at end of file diff --git a/Yi.Vue2.x/src/store/modules/user.js b/Yi.Vue2.x/src/store/modules/user.js new file mode 100644 index 00000000..6232cb9f --- /dev/null +++ b/Yi.Vue2.x/src/store/modules/user.js @@ -0,0 +1,153 @@ +import { getToken, setToken, getUser, setUser, removeToken } from '../../util/usertoken' +import accountApi from "@/api/accountApi" + +//再导入axion请求 +const state = { //状态 + token: getToken(), + user: getUser(), + dark: false, + drawer: { + image: 0, + gradient: 1, + mini: false, + }, + gradients: [ + 'rgba(0, 0, 0, .7), rgba(0, 0, 0, .7)', + 'rgba(228, 226, 226, 1), rgba(255, 255, 255, 0.7)', + 'rgba(244, 67, 54, .8), rgba(244, 67, 54, .8)', + ], + images: [ + 'https://s1.ax1x.com/2022/03/26/qdNnbD.jpg', + 'https://s1.ax1x.com/2022/03/26/qdNMUH.jpg', + 'https://s1.ax1x.com/2022/03/26/qdNKVe.jpg', + 'https://s1.ax1x.com/2022/03/26/qdNmDO.jpg' + ], + notifications: [], + rtl: false +} + +const mutations = { //变化//载荷 + SET_TOKEN(state, token) { + state.token = token + setToken(token) + }, + SET_USER(state, user) { + state.user = user + setUser(user) + }, + SetGradient(state, gradient) { + state.drawer.gradient = gradient + }, + SetImage(state, image) { + state.drawer.image = image + } +} + +//在action中可以配合axios进行权限判断 +const actions = { //动作 + setIcon({ commit, state }, icon) { + state.user.icon = icon + commit('SET_USER', state.user) + }, + // qqUpdate({ state }, openid) { + // return new Promise((resolv, reject) => { + // qqApi.qqupdate(openid, state.user.id).then(resp => { + // resolv(resp) + // }).catch(error => { + // reject(error) + // }) + // }) + // }, + + // qqLogin({ commit }, openid) { + // return new Promise((resolv, reject) => { + // qqApi.qqlogin(openid).then(resp => { + // if (resp.status) { + // commit('SET_TOKEN', resp.data.token) + // commit('SET_USER', resp.data.user) + // } + // resolv(resp) + // }).catch(error => { + // reject(error) + // }) + // }) + // }, + + Login({ commit }, form) { + return new Promise((resolv, reject) => { + accountApi.login(form.username.trim(), form.password.trim()).then(resp => { + if (resp.status) { + commit('SET_TOKEN', resp.data.token) + commit('SET_USER', resp.data.user) + } + resolv(resp) + }).catch(error => { + reject(error) + }) + }) + }, + + + + Register({ commit }, form) { + return new Promise((resolv, reject) => { + accountApi.register(form.username.trim(), form.password.trim(), form.email.trim(), form.code.trim()).then(resp => { + resolv(resp) + }).catch(error => { + reject(error) + }) + }) + }, + Logged({ commit }) { + return new Promise((resolv, reject) => { + accountApi.logged().then(resp => { + resolv(resp) + }).catch(error => { + reject(error) + }) + }) + }, + + // GetUserInfo({ commit, state }) { + // return new Promise((resolv, reject) => { + // // getUserInfo(state.token).then(response => { + // // commit('SET_USER', response.data) + // // resolve(response) + // // }).catch(error=>{ + // // reject(error) + // // }) + // }) + // }, + Logout({ commit, state }) { + return new Promise((resolv, reject) => { + accountApi.logout().then(response => { + commit('SET_TOKEN', '') + commit('SET_USER', null) + removeToken() + resolv(response) + }).catch(error => { + reject(error) + }) + }) + } + +} + +const getters = { //类似与计算属性 派生属性 + dark: (state, getters) => { + return ( + state.dark || + getters.gradient.indexOf('255, 255, 255') === -1 + ) + }, + gradient: state => { + return state.gradients[state.drawer.gradient] + }, + image: state => { + return state.drawer.image === '' ? state.drawer.image : state.images[state.drawer.image] + } +} + + + +export default { state, mutations, actions, getters } \ No newline at end of file diff --git a/Yi.Vue2.x/src/styles/auth.scss b/Yi.Vue2.x/src/styles/auth.scss new file mode 100644 index 00000000..7fe41f16 --- /dev/null +++ b/Yi.Vue2.x/src/styles/auth.scss @@ -0,0 +1,55 @@ +.auth-wrapper { + display: flex; + min-height: calc(var(--vh, 1vh) * 100); + width: 100%; + flex-basis: 100%; + align-items: center; + background-color: #F4F5FA; + // common style for both v1 and v2 + a { + text-decoration: unset; + } + // auth v1 + &.auth-v1 { + align-items: center; + justify-content: center; + overflow: hidden; + padding: 1.5rem; + .auth-mask-bg { + position: absolute; + bottom: 0; + width: 100%; + } + .auth-tree, + .auth-tree-3 { + position: absolute; + } + .auth-tree { + bottom: 0; + left: 0; + } + .auth-tree-3 { + bottom: 0; + right: 0; + } + // auth card + .auth-inner { + width: 28rem; + z-index: 1; + .auth-card { + padding: 0.9375rem 0.875rem; + } + } + } +} + +@media (max-width: 600px) { + // auth bg and tree hide in sm screen + .auth-v1 { + .auth-tree, + .auth-tree-3, + .auth-mask-bg { + display: none; + } + } +} \ No newline at end of file diff --git a/Yi.Vue2.x/src/styles/overrides.sass b/Yi.Vue2.x/src/styles/overrides.sass new file mode 100644 index 00000000..5755ee53 --- /dev/null +++ b/Yi.Vue2.x/src/styles/overrides.sass @@ -0,0 +1,26 @@ +.text-mono + font-family: monospace + +// Helpers +.flex-1-1-auto + flex: 1 1 auto !important + +.flex-1-0-auto + flex: 1 0 auto !important + +.flex-0-1-auto + flex: 0 1 auto !important + +.flex-0-0-auto + flex: 0 0 auto !important + +.position-relative + position: relative !important + +.overflow-y-scroll + overflow-y: scroll + +table + > thead > tr > th, + > tbody > tr > td + font-weight: 300 !important diff --git a/Yi.Vue2.x/src/styles/variables.scss b/Yi.Vue2.x/src/styles/variables.scss new file mode 100644 index 00000000..3a6131f7 --- /dev/null +++ b/Yi.Vue2.x/src/styles/variables.scss @@ -0,0 +1,106 @@ +// reduce button default elevation +// default background color is #EEEEEE + +$btn-sizes: ( + 'small': 28, + 'default': 41, + 'large': 54 +); + +$btn-font-sizes: ( + 'default': .75rem +); + +$btn-font-weight: 400; +$btn-letter-spacing: normal; +$material-light: ( + 'background': #EEEEEE, + 'text': ( + 'primary': #333333, + 'secondary': #999999 + ) +); +$btn-icon-font-size: 1.0625rem !important; + +$list-item-min-height: 48px; + +$blockquote-font-size: 1.25rem; + +$card-border-radius: 6px; +$card-text-font-weight: 300; +$card-elevation: 1; + +$data-table-regular-header-font-size: 1.0625rem; + +$shadow-key-umbra: ( + 1: (0 1px 4px 0 rgba(0,0,0,.14)), + 12: (0 16px 38px -12px rgba(0,0,0,.56)) +); + +$shadow-key-penumbra: ( + 1: (0 0 0 0 rgba(0,0,0,0)), + 12: (0 4px 25px 0 rgba(0,0,0,.12)) +); + +$shadow-key-ambient: ( + 1: (0 0 0 0 rgba(0,0,0,0)), + 12: (0 8px 10px -5px rgba(0,0,0,.2)) +); + +$headings: ( + 'h1': ( + 'size': 3.3125rem, + 'line-height': 1.15em, + 'weight': 300 + ), + 'h2': ( + 'size': 2.25rem, + 'line-height': 1.5em, + 'weight': 300 + ), + 'h3': ( + 'size': 1.5625rem, + 'line-height': 1.4em, + 'weight': 300 + ), + 'h4': ( + 'size': 1.125rem, + 'line-height': 1.4em, + 'weight': 300 + ), + 'h5': ( + 'size': 1.0625rem, + 'line-height': 1.4em, + 'weight': 300 + ), + 'h6': ( + 'size': .75rem, + 'line-height': 1.5em, + 'text-transform': uppercase, + 'weight': 500 + ), + 'subtitle-1': ( + 'size': 0.875rem, + 'weight': 300 + ), + 'subtitle-2': ( + 'size': 0.875rem, + 'line-height': 1.5em !important, + 'weight': 300 + ), + 'caption': ( + 'size': 0.8125rem, + 'weight': 300 + ), + 'overline': ( + 'letter-spacing': normal, + 'line-height': 0.625rem, + 'size': 0.625rem, + 'weight': 500 + ) +); + +// Tabs +$tab-font-size: .775rem; +$tab-font-weight: 500; +$tabs-item-letter-spacing: normal; diff --git a/Yi.Vue2.x/src/util/dialog.js b/Yi.Vue2.x/src/util/dialog.js new file mode 100644 index 00000000..4c10059e --- /dev/null +++ b/Yi.Vue2.x/src/util/dialog.js @@ -0,0 +1,13 @@ +function notify(resp) { + if (resp.status) { + this.$dialog.notify.success(resp.msg, { + position: "top-right", + }); + } else { + this.$dialog.notify.error(resp.msg, { + position: "top-right", + }); + } +}; + +export default { notify }; \ No newline at end of file diff --git a/Yi.Vue2.x/src/util/getMould.js b/Yi.Vue2.x/src/util/getMould.js new file mode 100644 index 00000000..360c8ae4 --- /dev/null +++ b/Yi.Vue2.x/src/util/getMould.js @@ -0,0 +1,54 @@ +var start = true; + +function getUrl(menuList, menuStr) { + + if (start) { + for (var i = 0; i < menuList.length; i++) { + if (menuList[i].menu_name == menuStr) { + start = false; + console.log(handUrl(menuList[i])) + return handUrl(menuList[i]) + } else { + if (menuList[i].children != undefined && start) { + getUrl(menuList[i].children, menuStr); + } + + } + } + } +}; + +function handUrl(menu) { + var axiosUrls = { + get: "123", + update: "123", + del: "123", + add: "123", + }; + const myMenu = menu.children; + myMenu.forEach(item => { + const myName = item.mould.mould_name; + const myUrl = item.mould.url; + + switch (myName) { + case 'get': + axiosUrls.get = myUrl; + break; + case 'update': + axiosUrls.update = myUrl; + break; + case 'del': + axiosUrls.del = myUrl; + break; + case 'add': + axiosUrls.add = myUrl; + break; + } + }); + return axiosUrls; +} + +export { + getUrl, + handUrl +} \ No newline at end of file diff --git a/Yi.Vue2.x/src/util/globals.js b/Yi.Vue2.x/src/util/globals.js new file mode 100644 index 00000000..71bb7cff --- /dev/null +++ b/Yi.Vue2.x/src/util/globals.js @@ -0,0 +1,11 @@ +const EN_LOCALE_ONLY = process.env.EN_LOCALE_ONLY === 'true' +const IN_BROWSER = typeof window !== 'undefined' +const IS_DEBUG = process.env.DEBUG === 'true' +const IS_PROD = process.env.NODE_ENV === 'production' + +module.exports = { + EN_LOCALE_ONLY, + IN_BROWSER, + IS_DEBUG, + IS_PROD, +} diff --git a/Yi.Vue2.x/src/util/helpers.js b/Yi.Vue2.x/src/util/helpers.js new file mode 100644 index 00000000..fbfb09d5 --- /dev/null +++ b/Yi.Vue2.x/src/util/helpers.js @@ -0,0 +1,11 @@ +export function leadingSlash (str) { + return str.startsWith('/') ? str : '/' + str +} + +export function trailingSlash (str) { + return str.endsWith('/') ? str : str + '/' +} + +export const wait = timeout => { + return new Promise(resolve => setTimeout(resolve, timeout)) +} diff --git a/Yi.Vue2.x/src/util/myaction.js b/Yi.Vue2.x/src/util/myaction.js new file mode 100644 index 00000000..6c1b626f --- /dev/null +++ b/Yi.Vue2.x/src/util/myaction.js @@ -0,0 +1,16 @@ +const actionList = [ + "用户管理", + "角色管理", + "权限管理", + "板块管理", + "等级管理", + "主题管理", + "设置管理", + "横幅管理", + "版本管理", + "道具管理", + "商城管理", + "日志管理", + "类型管理" +]; +export default { actionList }; \ No newline at end of file diff --git a/Yi.Vue2.x/src/util/myaxios.js b/Yi.Vue2.x/src/util/myaxios.js new file mode 100644 index 00000000..cc2800cb --- /dev/null +++ b/Yi.Vue2.x/src/util/myaxios.js @@ -0,0 +1,85 @@ +import axios from 'axios' +import store from '../store/index' +import vm from '../main' +// import VuetifyDialogPlugin from 'vuetify-dialog/nuxt/index'; +const myaxios = axios.create({ + // baseURL:'/'// + baseURL: process.env.VUE_APP_BASE_API, // /dev-apis + timeout: 50000, + headers: { + 'Authorization': 'Bearer ' + "" + }, + }) + // 请求拦截器 +myaxios.interceptors.request.use(function(config) { + + config.headers.Authorization = 'Bearer ' + store.state.user.token; + store.dispatch("openLoad"); + return config; +}, function(error) { + return Promise.reject(error); +}); + +// 响应拦截器 +myaxios.interceptors.response.use(async function(response) { + const resp = response.data + if (resp.code == undefined && resp.msg == undefined) { + vm.$dialog.notify.error("错误代码:无,原因:与服务器失去连接", { + position: "top-right", + timeout: 5000, + }); + } else if (resp.code == 401) { + const res = await vm.$dialog.error({ + text: `错误代码:${resp.code},原因:${resp.msg}是否重新进行登录?`, + title: '错误', + actions: { + 'false': '取消', + 'true': '跳转' + } + }); + if (res) { + vm.$router.push({ path: "/login" }); + } + + } else if (resp.code !== 200) { + vm.$dialog.notify.error(`错误代码:${resp.code},原因:${resp.msg}`, { + position: "top-right", + timeout: 5000, + }); + } + + store.dispatch("closeLoad"); + return resp; +}, async function(error) { + const resp = error.response.data + if (resp.code == undefined && resp.msg == undefined) { + vm.$dialog.notify.error("错误代码:无,原因:与服务器失去连接", { + position: "top-right", + timeout: 5000, + }); + } else if (resp.code == 401) { + const res = await vm.$dialog.error({ + text: `错误代码:${resp.code},原因:${resp.msg}是否重新进行登录?`, + title: '错误', + actions: { + 'false': '取消', + 'true': '跳转' + } + }); + if (res) { + vm.$store.dispatch("Logout").then((resp) => { + vm.$router.push({ path: "/login" }); + }); + } + + } else if (resp.code !== 200) { + vm.$dialog.notify.error(`错误代码:${resp.code},原因:${resp.msg}`, { + position: "top-right", + timeout: 5000, + }); + } + + store.dispatch("closeLoad"); + return Promise.reject(error); +}); +export default myaxios \ No newline at end of file diff --git a/Yi.Vue2.x/src/util/myqq.js b/Yi.Vue2.x/src/util/myqq.js new file mode 100644 index 00000000..1a9037e2 --- /dev/null +++ b/Yi.Vue2.x/src/util/myqq.js @@ -0,0 +1,9 @@ +const myqqLogin = { + appId: "101951505", + redirectURI: "https://jiftcc.com/qq?state=0", +}; +const myqqUpdate = { + appId: "101951505", + redirectURI: "https://jiftcc.com/qq?state=1", +}; +export default { myqqLogin, myqqUpdate }; \ No newline at end of file diff --git a/Yi.Vue2.x/src/util/routes.js b/Yi.Vue2.x/src/util/routes.js new file mode 100644 index 00000000..eecc16bd --- /dev/null +++ b/Yi.Vue2.x/src/util/routes.js @@ -0,0 +1,75 @@ +// Imports +import { kebabCase } from 'lodash' +import { leadingSlash, trailingSlash } from '@/util/helpers' + +export function abort(code = 404) { + return { + name: 'FourOhFour', + path: '*', + component: () => error(code), + } +} + +export function error(code = 404) { + return import ( + /* webpackChunkName: "error-[request]" */ + `@/views/${code}.vue` + ) +} + +export function layout(layout = 'Default', children, path = '') { + const dir = kebabCase(layout) + + return { + children, + component: () => + import ( + /* webpackChunkName: "layout-[request]" */ + `@/layouts/${dir}/Index` + ), + path, + } +} + +export function redirect( + path = '*', + rhandler, +) { + if (typeof path === 'function') { + rhandler = path + path = '*' + } + + return { + path, + redirect: to => { + const rpath = rhandler(to) + const url = rpath !== '' ? + leadingSlash(trailingSlash(rpath)) : + rpath + + return `/${url}` + }, + } +} + +export function route(name, component, path = '') { + component = Object(component) === component ? + component : { default: name.replace(' ', '') } + + const components = {} + + for (const [key, value] of Object.entries(component)) { + components[key] = () => + import ( + /* webpackChunkName: "views-[request]" */ + `@/views/${value}` + ) + } + + return { + name, + components, + path, + } +} \ No newline at end of file diff --git a/Yi.Vue2.x/src/util/signalR.js b/Yi.Vue2.x/src/util/signalR.js new file mode 100644 index 00000000..a25715a0 --- /dev/null +++ b/Yi.Vue2.x/src/util/signalR.js @@ -0,0 +1,34 @@ +//引入安装的signalr包 +import * as signalR from '@microsoft/signalr' + +const signal = new signalR.HubConnectionBuilder() //服务器地址 + .withUrl([process.env.VUE_APP_BASE_API] + '/chat', {}) + .build() + +/* const signalr = function () { + var hub + if (hub === undefined) { + hub = signal + } + return hub +} */ +// 自动重连 +// async function start() { +// try { +// await signal.start() +// console.log('connected') +// } catch (err) { +// console.log(err) +// setTimeout(() => start(), 5000) +// } +// } + +// signal.onclose(async() => { +// await start() +// }) +// //将创建的signal赋值给Vue实例 +export default { + install: function(Vue) { + Vue.prototype.signalr = signal + } +} \ No newline at end of file diff --git a/Yi.Vue2.x/src/util/usertoken.js b/Yi.Vue2.x/src/util/usertoken.js new file mode 100644 index 00000000..fe7cbaa4 --- /dev/null +++ b/Yi.Vue2.x/src/util/usertoken.js @@ -0,0 +1,18 @@ +const TOKEN_KEY = "token_key" +const USER_KEY = "user_key" +export function getToken() { + return localStorage.getItem(TOKEN_KEY) +} +export function setToken(token) { + return localStorage.setItem(TOKEN_KEY, token) +} +export function getUser() { + return JSON.parse(localStorage.getItem(USER_KEY)) +} +export function setUser(user) { + return localStorage.setItem(USER_KEY, JSON.stringify(user)) +} +export function removeToken() { + localStorage.removeItem(TOKEN_KEY) + localStorage.removeItem(USER_KEY) +} \ No newline at end of file diff --git a/Yi.Vue2.x/src/views/AdmMenu.vue b/Yi.Vue2.x/src/views/AdmMenu.vue new file mode 100644 index 00000000..6ec26a30 --- /dev/null +++ b/Yi.Vue2.x/src/views/AdmMenu.vue @@ -0,0 +1,25 @@ + + + + 菜单管理 — 菜单可分配一个接口 + + + + + + + + + \ No newline at end of file diff --git a/Yi.Vue2.x/src/views/AdmMould.vue b/Yi.Vue2.x/src/views/AdmMould.vue new file mode 100644 index 00000000..069f06af --- /dev/null +++ b/Yi.Vue2.x/src/views/AdmMould.vue @@ -0,0 +1,39 @@ + + + + 接口管理 — 接口可被菜单拥有 + + + + + \ No newline at end of file diff --git a/Yi.Vue2.x/src/views/AdmRole.vue b/Yi.Vue2.x/src/views/AdmRole.vue new file mode 100644 index 00000000..b01ef891 --- /dev/null +++ b/Yi.Vue2.x/src/views/AdmRole.vue @@ -0,0 +1,45 @@ + + + + 角色管理 — 角色可分配多个菜单 + + + + + + \ No newline at end of file diff --git a/Yi.Vue2.x/src/views/AdmRoleMenu.vue b/Yi.Vue2.x/src/views/AdmRoleMenu.vue new file mode 100644 index 00000000..abbfed26 --- /dev/null +++ b/Yi.Vue2.x/src/views/AdmRoleMenu.vue @@ -0,0 +1,120 @@ + + + + + + 角色菜单分配管理 — + 你可以在这里多角色分配多菜单/选中一个可查看 + + 展开全部 + 确定分配 + + 清空选择 + + + + + + + + + + + + + + + id:{{ item.id }} + + + + + + \ No newline at end of file diff --git a/Yi.Vue2.x/src/views/AdmUser.vue b/Yi.Vue2.x/src/views/AdmUser.vue new file mode 100644 index 00000000..61e22ee2 --- /dev/null +++ b/Yi.Vue2.x/src/views/AdmUser.vue @@ -0,0 +1,121 @@ + + + + 用户管理 — 用户可拥有多个角色 + + + + 保存 + + + + + mdi-eye + + + + + \ No newline at end of file diff --git a/Yi.Vue2.x/src/views/Index.vue b/Yi.Vue2.x/src/views/Index.vue new file mode 100644 index 00000000..9951f7e1 --- /dev/null +++ b/Yi.Vue2.x/src/views/Index.vue @@ -0,0 +1,442 @@ + + + + + + + + + + + + + + + + mdi-clock-outline + + + + + + + + + + + + + + + {{ actionText }} + + + + + + + + + + + Employees Stats + + + New employees on 15th September, 2016 + + + + + + + + + + + + + + Tasks: + + + mdi-bug + + Bugs + + + + mdi-code-tags + + Website + + + + mdi-cloud + + Server + + + + + + + + + + + + + + + + + + + mdi-pencil + + + + mdi-close + + + + + + + + + + + + + + diff --git a/Yi.Vue2.x/src/views/Pan.vue b/Yi.Vue2.x/src/views/Pan.vue new file mode 100644 index 00000000..9c5277b9 --- /dev/null +++ b/Yi.Vue2.x/src/views/Pan.vue @@ -0,0 +1,51 @@ + + + + + + 企业云盘 — 选择你的角色空间 + + + + + + + mdi-briefcase-account + + + {{item.role_name}} + + + + + + + + + + diff --git a/Yi.Vue2.x/src/views/PanInfo.vue b/Yi.Vue2.x/src/views/PanInfo.vue new file mode 100644 index 00000000..86809327 --- /dev/null +++ b/Yi.Vue2.x/src/views/PanInfo.vue @@ -0,0 +1,115 @@ + + + + + + XX-云盘空间 — 浏览属于你的空间 + + + + + 返回 + 全部选中 + 清空选中 + + 批量下载 + + + + + mdi-briefcase-account + + + + + + + + + mdi-badge-account-outline + + + + + + + + + diff --git a/Yi.Vue2.x/src/views/login.vue b/Yi.Vue2.x/src/views/login.vue new file mode 100644 index 00000000..798a9746 --- /dev/null +++ b/Yi.Vue2.x/src/views/login.vue @@ -0,0 +1,153 @@ + + + + + + + Yi-Framework + + + + + + + 欢迎来到CCNetCore! 👋🏻 + + 登入你的用户,开始畅游一切 + + + + + + + + + + + + + + + 忘记密码? + + + 登录 + + + + + + 没有我们的账号? + 注册账号 + + + + + + or + + + + + + + + {{ link.icon }} + + + + + + diff --git a/Yi.Vue2.x/src/views/register.vue b/Yi.Vue2.x/src/views/register.vue new file mode 100644 index 00000000..b1c159d9 --- /dev/null +++ b/Yi.Vue2.x/src/views/register.vue @@ -0,0 +1,183 @@ + + + + + + + + Yi-Framework + + + + + + + 注册-从这里开始 🚀 + + 加入我们,获得一个有趣的灵魂! + + + + + + + + + + + + + + + + + 验证码 + + + + + + + + 我同意协议 & 策略 + + + + + + 注册 + + + + + + + 已经存在账号? + 跳转登录 + + + + + + or + + + + + + + + {{ link.icon }} + + + + + + \ No newline at end of file diff --git a/Yi.Vue2.x/src/views/userInfo.vue b/Yi.Vue2.x/src/views/userInfo.vue new file mode 100644 index 00000000..cd11f4d1 --- /dev/null +++ b/Yi.Vue2.x/src/views/userInfo.vue @@ -0,0 +1,348 @@ + + + + + + + + + + {{ userInfo.username }} + + + {{ userInfo.nick }} + + {{ userInfo.introduction }} + + + 编辑头像 + + 绑定QQ + + + + + + + + 用户信息 — 编辑属于你的一切 + + + + + + 账户信息 + mdi-phone + + + + 额外信息 + mdi-account-box + + + + 修改密码 + mdi-account-box + + + + + + + + Account Information + + + + + + + + + + + + + + + + + + + + + + + + + + + + Extra Information + + + + + + mdi-phone + + + + 等级: + 100 + + + + mdi-message-text + + + + + + + + 经验: + 1000 + + + + mdi-message-text + + + + + + + + mdi-lock + + + + 拥有角色: + + + {{ item.role_name }} + + + + + + + + + 拥有菜单: + + + {{ item.menu_name }} + + + + + + + + + + mdi-email + + + + 等待更新: + 1000 + + + + + + + + 等待更新: + 500 + + + + + + + + 等待更新 + + + + + + + + + + + + + + Password Information + + + + + + + + + + + 清空 + + 保存 + + + + + + + + + + diff --git a/Yi.Vue2.x/vue.config.js b/Yi.Vue2.x/vue.config.js new file mode 100644 index 00000000..ee782210 --- /dev/null +++ b/Yi.Vue2.x/vue.config.js @@ -0,0 +1,23 @@ +module.exports = { + // publicPath: './', + transpileDependencies: [ + 'vuetify' + ], + devServer: { + port: 6789, + open: true, + https: false, + host: "localhost", + proxy: { + [process.env.VUE_APP_BASE_API]: { + target: process.env.VUE_APP_SERVICE_URL, + changeOrigin: true, + pathRewrite: { + ['^' + process.env.VUE_APP_BASE_API]: '' + } + }, + } + }, + lintOnSave: false, //关闭格式检查 + productionSourceMap: false +} \ No newline at end of file
+ 欢迎来到CCNetCore! 👋🏻 +
登入你的用户,开始畅游一切
+ 注册-从这里开始 🚀 +
加入我们,获得一个有趣的灵魂!
{{ userInfo.introduction }}