diff --git a/frontend/README.md b/frontend/README.md deleted file mode 100644 index c1b8d92e38..0000000000 --- a/frontend/README.md +++ /dev/null @@ -1,128 +0,0 @@ -# 项目说明 - -> 这是一个极简的 vue admin 管理后台,基于vue-admin-template进行了细节改造,主要是把侧边导航改造为了顶部和侧边两个导航。 -> -> 本项目默认开启了css:sourceMap和devtool('source-map'),便于在开发中调试,除非编译速度过慢,否则开发环境不建议修改。 - -## IDE - -编辑器建议使用VS Code,格式化时可以统一代码风格,配置项建议统一设置为默认不自动保存,手动保存后自动修复部分错误。具体参数如下: - -```js -{ - "emmet.triggerExpansionOnTab": true, - "files.autoSave": "off", - "vetur.format.defaultFormatterOptions": { - "js-beautify-html": { - "wrap_attributes": "force-aligned" - }, - "prettyhtml": { - "printWidth": 100, - "singleQuote": false, - "wrapAttributes": false, - "sortAttributes": true - }, - "prettier": { - "semi": false, - "singleQuote": true - } - }, - "eslint.run": "onSave", - "editor.codeActionsOnSave": { - "source.fixAll.eslint": true - } -} -``` - - -## 目录结构 - -```bash -├── build # 构建相关 -├── mock # 项目mock 模拟数据 -├── public # 静态资源 -│ │── favicon.ico # favicon图标 -│ └── index.html # html模板 -├── src # 源代码 -│ ├── api # 所有请求 -│ ├── assets # 主题 字体等静态资源 -│ ├── components # 全局公用组件 -│ ├── directive # 全局指令 -│ ├── filters # 全局 filter -│ ├── icons # 项目所有 svg icons -│ ├── lang # 国际化 language -│ ├── layout # 全局 layout -│ ├── router # 路由 -│ ├── store # 全局 store管理 -│ ├── styles # 全局样式 -│ ├── utils # 全局公用方法 -│ ├── vendor # 公用vendor -│ ├── views # views 所有页面 -│ ├── App.vue # 入口页面 -│ ├── main.js # 入口文件 加载组件 初始化等 -│ └── permission.js # 权限管理 -├── tests # 测试 -├── .env.xxx # 环境变量配置 -├── .eslintrc.js # eslint 配置项 -├── .babelrc # babel-loader 配置 -├── .travis.yml # 自动化CI配置 -├── vue.config.js # vue-cli 配置 -├── postcss.config.js # postcss 配置 -└── package.json # package.json -``` - - - -## 构建步骤 - -```bash -# 克隆项目 -git clone 项目地址 - -# 进入项目目录 -cd admin-web - -# 安装依赖 -npm install - -# 建议不要直接使用 cnpm 安装依赖,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题 -npm install --registry=https://registry.npm.taobao.org - -# 启动服务 -npm run dev -``` - -浏览器访问 [http://localhost:9528](http://localhost:9528) - -## 发布 - -```bash -# 构建测试环境 -npm run build:stage - -# 构建生产环境 -npm run build:prod -``` - -## 其它 - -```bash -# 预览发布环境效果 -npm run preview - -# 预览发布环境效果 + 静态资源分析 -npm run preview -- --report - -# 代码格式检查 -npm run lint - -# 代码格式检查并自动修复 -npm run lint -- --fix -``` - -更多信息请参考花裤衩大佬的vue-element-admin [使用文档](https://panjiachen.github.io/vue-element-admin-site/zh/) - -[线上地址](http://panjiachen.github.io/vue-admin-template) - -[国内访问](https://panjiachen.gitee.io/vue-admin-template) - diff --git a/frontend/mock/table.js b/frontend/mock/table.js index ba95f76426..38eabd634c 100644 --- a/frontend/mock/table.js +++ b/frontend/mock/table.js @@ -13,7 +13,7 @@ const data = Mock.mock({ export default [ { - url: '/vue-admin-template/table/list', + url: '/dataease/table/list', type: 'get', response: config => { const items = data.items diff --git a/frontend/mock/user.js b/frontend/mock/user.js index f007cd98d7..fc30695881 100644 --- a/frontend/mock/user.js +++ b/frontend/mock/user.js @@ -26,7 +26,7 @@ const users = { export default [ // user login { - url: '/vue-admin-template/user/login', + url: '/dataease/user/login', type: 'post', response: config => { const { username } = config.body @@ -49,7 +49,7 @@ export default [ // get user info { - url: '/vue-admin-template/user/info\.*', + url: '/dataease/user/info\.*', type: 'get', response: config => { const { token } = config.query @@ -72,7 +72,7 @@ export default [ // user logout { - url: '/vue-admin-template/user/logout', + url: '/dataease/user/logout', type: 'post', response: _ => { return { diff --git a/frontend/package.json b/frontend/package.json index fce213e62e..bf9a37f154 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,9 +1,7 @@ { - "name": "vue-admin-template", - "version": "4.2.1", - "description": "A vue admin template with Element UI & axios & iconfont & permission control & lint", - "author": "Pan ", - "license": "MIT", + "name": "dataease", + "version": "1.5.0", + "description": "dataease front", "private": true, "scripts": { "serve": "vue-cli-service serve", @@ -23,10 +21,10 @@ "css-color-function": "^1.3.3", "echarts": "^5.0.1", "element-resize-detector": "^1.2.3", - "element-ui": "2.15.6", + "element-ui": "2.15.7", "file-save": "^0.2.0", "file-saver": "^2.0.5", - "fit2cloud-ui": "1.5.0-beta.0", + "fit2cloud-ui": "1.5.4", "html2canvasde": "^v1.1.4-de", "jquery": "^3.1.1", "js-base64": "^3.7.2", diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 27046fe564..4c83f5c23f 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -1,7 +1,7 @@ @@ -10,7 +10,7 @@ import PluginCom from '@/views/system/plugin/PluginCom' export default { name: 'App', - components: { PluginCom }, + components: {PluginCom}, beforeCreate() { } diff --git a/frontend/src/api/table.js b/frontend/src/api/table.js index 7f7d7c9e43..1e2360b668 100644 --- a/frontend/src/api/table.js +++ b/frontend/src/api/table.js @@ -10,11 +10,6 @@ const data = Mock.mock({ }] }) export function getList(params) { -// return request({ -// url: '/vue-admin-template/table/list', -// method: 'get', -// params -// }) return new Promise((resolve, reject) => { const items = data.items const result = { diff --git a/frontend/src/components/AsyncComponent/index.vue b/frontend/src/components/AsyncComponent/index.vue index 28e60641ed..7ef4b4d38d 100644 --- a/frontend/src/components/AsyncComponent/index.vue +++ b/frontend/src/components/AsyncComponent/index.vue @@ -7,7 +7,6 @@ diff --git a/frontend/src/views/system/datasource/DsMain.vue b/frontend/src/views/system/datasource/DsMain.vue index 7de8b42ca8..4446d05e88 100644 --- a/frontend/src/views/system/datasource/DsMain.vue +++ b/frontend/src/views/system/datasource/DsMain.vue @@ -1,10 +1,11 @@ @@ -16,9 +17,10 @@ import DeAsideContainer from '@/components/dataease/DeAsideContainer' import DsTree from './DsTree' import DsForm from './form' import DataHome from './DataHome' + export default { name: 'DsMain', - components: { DeMainContainer, DeContainer, DeAsideContainer, DsTree, DataHome }, + components: {DeMainContainer, DeContainer, DeAsideContainer, DsTree, DataHome}, data() { return { component: DataHome, @@ -26,19 +28,15 @@ export default { param: null } }, - computed: { - - }, - watch: { - - }, + computed: {}, + watch: {}, mounted() { // this.clear() }, methods: { // 切换main区内容 switchMain(param) { - const { component, componentParam } = param + const {component, componentParam} = param this.component = DataHome this.param = null this.$nextTick(() => { @@ -66,14 +64,15 @@ export default { diff --git a/frontend/src/views/system/datasource/DsTree.vue b/frontend/src/views/system/datasource/DsTree.vue index 61f9da893e..2cb93d3caf 100644 --- a/frontend/src/views/system/datasource/DsTree.vue +++ b/frontend/src/views/system/datasource/DsTree.vue @@ -5,10 +5,11 @@ {{ $t('commons.datasource') }} - + - + @@ -39,18 +40,21 @@ - + - - + + {{ data.name }} - + - + {{ data.name }} @@ -87,7 +91,7 @@ diff --git a/frontend/src/views/system/datasource/form.vue b/frontend/src/views/system/datasource/form.vue index 40a95caf3e..ea0ae25d56 100644 --- a/frontend/src/views/system/datasource/form.vue +++ b/frontend/src/views/system/datasource/form.vue @@ -1,20 +1,26 @@