go-admin-team / go-admin-ui Goto Github PK
View Code? Open in Web Editor NEW基于Gin + Vue + Element UI & Arco Design & Ant Design 的前后端分离权限管理系统的前端模块
Home Page: https://www.go-admin.dev
License: MIT License
基于Gin + Vue + Element UI & Arco Design & Ant Design 的前后端分离权限管理系统的前端模块
Home Page: https://www.go-admin.dev
License: MIT License
初始化项目后 系统工具中包含行政区管理页面,组件路径为src/views/sys-tools/sys-china-area-data/index
。实际前端项目中并没有这个.vue文件。会报错Error: Cannot find module './views/sys-tools/sys-china-area-data/index'
1.修改角色权限,只授予部分菜单权限时,上级节点处于半勾选状态,处于半勾选的数据没有上传到后台。
会导致授予了部分子菜单,但是顶级菜单没有。
go-admin-ui/src/views/admin/sys-role/index.vue
Lines 379 to 388 in 01a21ae
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/soft/node-v14.15.0-linux-x64/bin/node',
1 verbose cli '/soft/node/bin/npm',
1 verbose cli 'run',
1 verbose cli 'lint',
1 verbose cli '--',
1 verbose cli '--fix'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prelint', 'lint', 'postlint' ]
5 info lifecycle [email protected]prelint: [email protected]lint: [email protected]
6 info lifecycle [email protected]
7 verbose lifecycle [email protected]lint: unsafe-perm in lifecycle truelint: PATH: /soft/node-v14.15.0-linux-x64/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/soft/go-admin-ui/node_modules/.bin:/home/bzyy/.local/bin:/home/bzyy/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/soft/node/bin
8 verbose lifecycle [email protected]
9 verbose lifecycle [email protected]lint: CWD: /soft/go-admin-uilint: Args: [ '-c', 'eslint --ext .js,.vue src "--fix"' ]
10 silly lifecycle [email protected]
11 info lifecycle [email protected]~lint: Failed to exec lint script
12 verbose stack Error: [email protected] lint: eslint --ext .js,.vue src "--fix"
12 verbose stack spawn ENOENT
12 verbose stack at ChildProcess. (/soft/node-v14.15.0-linux-x64/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack at ChildProcess.emit (events.js:315:20)
12 verbose stack at maybeClose (internal/child_process.js:1048:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
13 verbose pkgid [email protected]
14 verbose cwd /soft/go-admin-ui
15 verbose Linux 4.18.0-147.5.1.el8_1.x86_64
16 verbose argv "/soft/node-v14.15.0-linux-x64/bin/node" "/soft/node/bin/npm" "run" "lint" "--" "--fix"
17 verbose node v14.15.0
18 verbose npm v6.14.8
19 error code ELIFECYCLE
20 error syscall spawn
21 error file sh
22 error errno ENOENT
23 error [email protected] lint: eslint --ext .js,.vue src "--fix"
23 error spawn ENOENT
24 error Failed at the [email protected] lint script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]
node v14.15.0
Failed to compile with 1 error 下午8:15:12
error in ./src/styles/element-variables.scss
Syntax Error: Error: Missing binding /Users/jonny/go/src/go-admin-ui/node_modules/node-sass/vendor/darwin-x64-83/binding.node
Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 14.x
Found bindings for the following environments:
This usually happens because your environment has changed since running npm install
.
Run npm rebuild node-sass
to download the binding for your current environment.
@ ./src/styles/element-variables.scss 4:14-237 14:3-18:5 15:22-245
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:9527&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js
npm ERR! Error while executing:
npm ERR! D:\SoftWares\Git\cmd\git.EXE ls-remote -h -t https://github.com/nhn/raphael.git
npm ERR!
npm ERR! fatal: unable to access 'https://github.com/nhn/raphael.git/': Failed to connect to github.com port 443: Connec
tion refused
npm ERR!
npm ERR! exited with error code: 128
1.新增或修改页如果为选择框,值无法动态获取
2.建议增加时间属性选择
ERROR Failed to compile with 1 error 下午3:02:10
Syntax Error: Error: No ESLint configuration found in /Users//Documents/Go_admin_Web/src.
You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.
用户管理,点击新增,没有反应。查看日志发现:
vue.runtime.esm.js?2b0e:619 [Vue warn]: Error in v-on handler: "TypeError: Object(...) is not a function"
found in
---> at packages/button/src/button.vue
at packages/card/src/main.vue
at src/layout/BasicLayout.vue
at src/views/admin/sys-user/index.vue
at src/layout/components/AppMain.vue
at src/layout/index.vue
at src/App.vue
warn @ vue.runtime.esm.js?2b0e:619
vue.runtime.esm.js?2b0e:1888 TypeError: Object(...) is not a function
at VueComponent.handleAdd (webpack-internal:///./node_modules/cache-loader/dist/cjs.js?!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/admin/sys-user/index.vue?vue&type=script&lang=js&:611)
at invokeWithErrorHandling (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:1853)
at VueComponent.invoker (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:2178)
at invokeWithErrorHandling (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:1853)
at VueComponent.Vue.$emit (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:3882)
at VueComponent.handleClick (webpack-internal:///./node_modules/element-ui/lib/element-ui.common.js:9417)
at invokeWithErrorHandling (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:1853)
at HTMLButtonElement.invoker (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:2178)
at HTMLButtonElement.original._wrapper (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:6907)
https://github.com/chuzhixin/vue-admin-beautiful
目前这个样式感觉太跳跃,不适合做后台
token续期功能还没做吧,看到有接口,前端还没处理
项目运行起来之后,点击菜单后控制台报错,且跳转没有反应,我试着升级了node版本到v12.16.2后,重新编译运行,也失败。
近期 path-to-regexp 从 2.4
升级到了 6.1.0
导致面包屑导航点击报错
目前只能部署在站点根目录。可不可以修改 publicPath 为 "./" 这样部署时,可以随便自定义路径了
// 多选框选中数据
232 | handleSelectionChange(selection) {
233 | this.ids = selection.map(item => item.)
| ^
234 | this.single = selection.length !== 1
235 | this.multiple = !selection.length
拉取时间2021/6/3 commit c27f7fa
环境:
具体表现
> npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/eslint
npm ERR! dev eslint@"7.6.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@">= 1.6.0 < 7.0.0" from @vue/[email protected]
npm ERR! node_modules/@vue/cli-plugin-eslint
npm ERR! dev @vue/cli-plugin-eslint@"^4.4.6" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\Zander.liu\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Zander.liu\AppData\Local\npm-cache\_logs\2021-06-04T06_43_02_674Z-debug.log
运行 npm install
报错了。
npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/eslint
npm ERR! dev eslint@"7.6.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@">= 1.6.0 < 7.0.0" from @vue/[email protected]
npm ERR! node_modules/@vue/cli-plugin-eslint
npm ERR! dev @vue/cli-plugin-eslint@"^4.4.6" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/nibuw/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/nibuw/.npm/_logs/2021-06-01T10_27_35_783Z-debug.log
点击 header 的搜索按钮搜索报 TypeError: Cannot read property 'join' of undefined
我觉得创建一级菜单后组建还是应该在 appmian 下而不是直接到 app 下了。希望可以优化一下
在文件 src/api/system/config.js的21行, 函数getConfigKey 有误,应该是 get /api/v1/configKey/xxx, 而不是post,页面会报错,
根据后端go-admin的接口文档以及代码来看发现的
我看到你使用率是用:
// 我注意到你是使用磁盘可用GB (free) / 磁盘总GB(total)
(info.disk.free/ info.disk.total * 100).toFixed(2) // 取两位小数
如果,你想得到磁盘使用率,那么Go-admin应该:
diskDic["usage"] = strconv.ParseFloat(fmt.Sprintf("%.2f",dis.UsedPercent), 2)
# or
diskDic["usage"] = tools.Round(dis.UsedPercent,2) // TODO: 保留2位小数,我采用了四舍五入
emmmm.... 视图提示信息也需要更改
默认编辑正常,自动创建代码之后报错
Module not found: Error: Can't resolve '@/components/FileChoose'
I think you Cannot just use /deep/ on the top lvl?Also, try ::v-deep.
like in Vue docVue doc
ERROR Failed to compile with 1 error 10:34:22
error in ./src/main.js
Syntax Error: D:\admin\go-admin-ui\node_modules\eslint\lib\cli-engine\cli-engine.js:406
} catch {
^
SyntaxError: Unexpected token {
@ multi (webpack)-dev-server/client?http://192.168.0.108:9527&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/eslint
npm ERR! dev eslint@"7.6.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@">= 1.6.0 < 7.0.0" from @vue/[email protected]
npm ERR! node_modules/@vue/cli-plugin-eslint
npm ERR! dev @vue/cli-plugin-eslint@"^4.4.6" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
没部署起来......
4790 http fetch GET 304 https://registry.npmjs.org/codemirror 145ms (from cache)
4791 silly fetchPackageMetaData error for [email protected] Unexpected end of JSON input while parsing near '...xFxysdF42Swp81ovye85C'
4792 http fetch GET 304 https://registry.npmjs.org/fuse.js 116ms (from cache)
4793 silly fetchPackageMetaData error for [email protected] Unexpected end of JSON input while parsing near '...4.0.6","vue-eslint-pa'
4794 http fetch GET 304 https://registry.npmjs.org/core-js 149ms (from cache)
4795 silly fetchPackageMetaData error for core-js@^2.6.11 Unexpected end of JSON input while parsing near '...m":"00eb6d6bf815471cc'
4796 http fetch GET 304 https://registry.npmjs.org/vuex 88ms (from cache)
4797 silly fetchPackageMetaData error for [email protected] Unexpected end of JSON input while parsing near '...watch-helpers":"^1.1.'
4798 timing stage:rollbackFailedOptional Completed in 1ms
4799 timing stage:runTopLevelLifecycles Completed in 144167ms
4800 silly saveTree [email protected]
4800 silly saveTree +-- @riophae/[email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree `-- [email protected]
4801 verbose stack SyntaxError: Unexpected end of JSON input while parsing near '...xFxysdF42Swp81ovye85C'
4801 verbose stack at JSON.parse (<anonymous>)
4801 verbose stack at parseJson (/usr/local/lib/node_modules/npm/node_modules/json-parse-better-errors/index.js:7:17)
4801 verbose stack at /usr/local/lib/node_modules/npm/node_modules/node-fetch-npm/src/body.js:96:50
4801 verbose stack at runMicrotasks (<anonymous>)
4801 verbose stack at processTicksAndRejections (internal/process/task_queues.js:97:5)
4802 verbose cwd /app
4803 verbose Linux 4.19.76-linuxkit
4804 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
4805 verbose node v12.16.2
4806 verbose npm v6.14.4
FROM node:lts
# 创建 app 目录
WORKDIR /app
# 可选命令:
# RUN npm -g install serve
# RUN mkdir /src;
# COPY ./go-admin-ui/* /src
# RUN find /src/ -maxdepth 1 -mindepth 1 \! -name "node_modules" \! -name "*.git" \! -name "dist" -exec cp -rf {} /app/ \;
# 安装 app 依赖
# RUN npm install --only=production
# RUN npm install
# RUN npm build:prod
# COPY --from=node_build /app ./
COPY ./start.sh /
RUN chmod +x -R /start.sh;
VOLUME [ "/data1" , "/app" ]
EXPOSE 3000
#CMD ["serve", "-s", "dist", "-p", "8080"]
#CMD ["npm", "run" , "dev"]
CMD ["/start.sh"]
#!/bin/sh
npm cache clean --force
npm install
npm run dev
这是什么原因
这个前端很不错,正好我最近想开发一个基于fastapi的这样一个类似项目,想咨询一下有没有相关的前后端交互协议,或者提供一下相关的资料。
这边页面无限getinfo ,一直刷屏
2021-03-26 01:10:42 [INFO] OPTIONS /api/v1/getinfo 200 13.201µs 127.0.0.1
2021-03-26 01:10:42 [INFO] GET /api/v1/getinfo admin
2021-03-26 01:10:42 [INFO] GET /api/v1/getinfo 200 1.971335ms 127.0.0.1
2021-03-26 01:10:42 [INFO] OPTIONS /api/v1/menurole 200 12.493µs 127.0.0.1
2021-03-26 01:10:42 [INFO] GET /api/v1/menurole admin
2021-03-26 01:10:42 [INFO] GET /api/v1/menurole 200 3.787844ms 127.0.0.1
2021-03-26 01:10:48 [INFO] OPTIONS /api/v1/sysUser?pageIndex=1&pageSize=10 200 9.36µs 127.0.0.1
2021-03-26 01:10:48 [INFO] OPTIONS /api/v1/deptTree 200 8.33µs 127.0.0.1
2021-03-26 01:10:48 [INFO] OPTIONS /api/v1/dict/data-all?dictType=sys_normal_disable 200 8.942µs 127.0.0.1
2021-03-26 01:10:48 [INFO] OPTIONS /api/v1/dict/data-all?dictType=sys_user_sex 200 7.248µs 127.0.0.1
2021-03-26 01:10:48 [INFO] GET /api/v1/deptTree admin
2021-03-26 01:10:48 [INFO] OPTIONS /api/v1/configKey/sys.user.initPassword 200 20.935µs 127.0.0.1
2021-03-26 01:10:48 [INFO] GET /api/v1/deptTree 200 2.097172ms 127.0.0.1
例如:前端访问的是用户管理菜单,下面这两个请求是404,
2021-03-26 01:10:48 [INFO] GET /api/v1/dict/data-all?dictType=sys_normal_disable 404 8.868µs 127.0.0.1
2021-03-26 01:10:48 [INFO] GET /api/v1/dict/data-all?dictType=sys_user_sex 404 6.082µs 127.0.0.1
2021-03-26 01:10:48 [INFO] GET /api/v1/configKey/sys.user.initPassword admin
2021-03-26 01:10:48 [INFO] GET /api/v1/configKey/sys.user.initPassword 200 3.967244ms 127.0.0.1
在登陆页面就会有404的请求
2021-03-26 01:22:37 [INFO] GET /api/v1/app-config 404 7.037µs 127.0.0.1
2021-03-26 01:22:37 [INFO] GET /api/v1/getCaptcha 200 2.653827ms 127.0.0.1
大神 这个是前端请求错误端口了吗?
偶然发现框架 keep-alive 失效,经过了解后发现 路由 name 必须跟组件 name 一模一样。 希望在文档或代码中提及。
以及 dashboard 路由 name 应当与组件 name 一致。
{
path: '/',
component: Layout,
redirect: '/dashboard',
children: [
{
path: 'dashboard',
component: () => import('@/views/dashboard/index'),
- name: '首页',
+ name: 'Dashboard',
meta: { title: '首页', icon: 'dashboard', affix: true }
}
]
},
我还发现菜单的 noCache 是写死的不缓存,我认为可以在创建菜单时提供 cache 选项自定义是否缓存。
npm ERR! Error while executing:
npm ERR! /usr/local/bin/git ls-remote -h -t git://github.com/adobe-webplatform/eve.git
npm ERR!
npm ERR! fatal: unable to connect to github.com:
npm ERR! github.com[0: 192.30.253.112]: errno=Operation timed out
npm ERR!
npm ERR!
npm ERR! exited with error code: 128
npm ERR! A complete log of this run can be found in:
npm ERR! /Applications/MxSrvs/cache/nodejs/_logs/2021-03-01T08_32_24_530Z-debug.log
代码git下来,安装依赖,运行,无验证码,无法登陆
表单构建功能 有源码吗
Expect:
Usage = used disk size / total disk size
Wrong:
Usage = free disk size / total disk size
能否格式化一下下项目,go fmt priject
...
好多地方编码都不符合google go code style,诸如一下不等...
第13行到第19行
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?1d2d61263f13e4b288c8da19ad3ff56d";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
Describe the bug
进入子页面后导航栏的首页链接点击后会进入404页面
To Reproduce
Steps to reproduce the behavior:
Go to '用户管理'
Click on '首页'
See 404 error
什么时候升级到 vue3.x + typescript + vite
Uncaught Error: Module build failed (from ./node_modules/eslint-loader/index.js):
TypeError: Cannot read property 'range' of null
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.