@ -0,0 +1,3 @@ |
|||||
|
> 1% |
||||
|
last 2 versions |
||||
|
not dead |
@ -0,0 +1,8 @@ |
|||||
|
[*.{js,jsx,ts,tsx,vue}] |
||||
|
indent_style = space |
||||
|
indent_size = 2 |
||||
|
end_of_line = lf |
||||
|
trim_trailing_whitespace = true |
||||
|
insert_final_newline = true |
||||
|
max_line_length = 140 |
||||
|
root = true |
@ -0,0 +1,3 @@ |
|||||
|
VUE_APP_MODE=production |
||||
|
VUE_APP_PREVIEW=false |
||||
|
VUE_APP_URL=http://www.tall.wiki/ |
@ -0,0 +1,10 @@ |
|||||
|
VUE_APP_MODE=development |
||||
|
VUE_APP_NODE_ENV=development |
||||
|
VUE_APP_SCENE=medicine |
||||
|
VUE_APP_BASE_URL=http://test.tall.wiki/ |
||||
|
VUE_APP_API_URL=http://test.tall.wiki/gateway |
||||
|
VUE_APP_PROXY_URL=/gateway |
||||
|
VUE_APP_PUBLIC_PATH=/medicine |
||||
|
VUE_APP_MSG_URL=wss://test.tall.wiki/websocket/message/v4.0/ws |
||||
|
VUE_APP_TITLE=盐湖区人民医院数字看板 |
||||
|
VUE_APP_DESCRIPTION=盐湖区人民医院数字看板 |
@ -0,0 +1,10 @@ |
|||||
|
VUE_APP_MODE=production |
||||
|
VUE_APP_NODE_ENV=production |
||||
|
VUE_APP_SCENE=medicine |
||||
|
VUE_APP_BASE_URL=http://www.tall.wiki/ |
||||
|
VUE_APP_API_URL=http://www.tall.wiki/gateway |
||||
|
VUE_APP_PROXY_URL=/gateway |
||||
|
VUE_APP_PUBLIC_PATH=/medicine |
||||
|
VUE_APP_MSG_URL=wss://www.tall.wiki/websocket/message/v4.0/ws |
||||
|
VUE_APP_TITLE=盐湖区人民医院数字看板 |
||||
|
VUE_APP_DESCRIPTION=盐湖区人民医院数字看板 |
@ -0,0 +1,47 @@ |
|||||
|
/* |
||||
|
* Copyright (c) 2019. |
||||
|
* author: wally |
||||
|
* email: 18603454788@163.com |
||||
|
*/ |
||||
|
|
||||
|
module.exports = { |
||||
|
root: true, |
||||
|
env: { browser: true, node: true }, |
||||
|
extends: ['plugin:vue/recommended', 'plugin:vue/essential'], |
||||
|
|
||||
|
rules: { |
||||
|
'vue/html-self-closing': 'off', |
||||
|
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', |
||||
|
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', |
||||
|
'no-param-reassign': ['error', { props: true, ignorePropertyModificationsFor: ['state'] }], |
||||
|
'max-len': ['error', { code: 140, tabWidth: 2 }], |
||||
|
'object-curly-newline': ['error', { multiline: true }], |
||||
|
'arrow-parens': ['error', 'as-needed'], |
||||
|
'linebreak-style': 'off', |
||||
|
'vue/attributes-order': 'off', |
||||
|
'no-param-reassign': 'off', |
||||
|
'vue/singleline-html-element-content-newline': 'off', |
||||
|
'vue/max-attributes-per-line': 'off', |
||||
|
'vue/multiline-html-element-content-newline': 'off', |
||||
|
'vue/html-indent': 'off', |
||||
|
}, |
||||
|
|
||||
|
parserOptions: { parser: 'babel-eslint' }, |
||||
|
|
||||
|
overrides: [ |
||||
|
{ |
||||
|
files: ['**/__tests__/*.{j,t}s?(x)'], |
||||
|
env: { jest: true }, |
||||
|
}, |
||||
|
], |
||||
|
|
||||
|
globals: { |
||||
|
Vue: true, |
||||
|
VueRouter: true, |
||||
|
Vuex: true, |
||||
|
axios: true, |
||||
|
_: true, |
||||
|
Vuetify: true, |
||||
|
vuetify: true, |
||||
|
}, |
||||
|
}; |
@ -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? |
@ -0,0 +1,13 @@ |
|||||
|
{ |
||||
|
"printWidth": 140, |
||||
|
"singleQuote": true, |
||||
|
"semi": true, |
||||
|
"trailingComma": "all", |
||||
|
"arrowParens": "avoid", |
||||
|
"tabWidth": 2, |
||||
|
"useTabs": false, |
||||
|
"bracketSpacing": true, |
||||
|
"jsxBracketSameLine": false, |
||||
|
"proseWrap": "always", |
||||
|
"endOfLine": "lf" |
||||
|
} |
@ -0,0 +1,24 @@ |
|||||
|
# 盐湖区人民医院数字看板 |
||||
|
|
||||
|
## Project setup |
||||
|
``` |
||||
|
yarn install |
||||
|
``` |
||||
|
|
||||
|
### Compiles and hot-reloads for development |
||||
|
``` |
||||
|
yarn serve |
||||
|
``` |
||||
|
|
||||
|
### Compiles and minifies for production |
||||
|
``` |
||||
|
yarn build |
||||
|
``` |
||||
|
|
||||
|
### Lints and fixes files |
||||
|
``` |
||||
|
yarn lint |
||||
|
``` |
||||
|
|
||||
|
### Customize configuration |
||||
|
See [Configuration Reference](https://cli.vuejs.org/config/). |
@ -0,0 +1,13 @@ |
|||||
|
module.exports = { |
||||
|
presets: ["@vue/cli-plugin-babel/preset"], |
||||
|
plugins: [ |
||||
|
[ |
||||
|
"import", |
||||
|
{ |
||||
|
libraryName: "ant-design-vue", |
||||
|
libraryDirectory: "es", |
||||
|
style: true |
||||
|
} |
||||
|
] |
||||
|
] |
||||
|
}; |
@ -0,0 +1 @@ |
|||||
|
module.exports = {extends: ['./node_modules/vue-cli-plugin-commitlint/lib/lint']}; |
@ -0,0 +1,51 @@ |
|||||
|
{ |
||||
|
"name": "salt-lake-hospital", |
||||
|
"version": "0.1.0", |
||||
|
"private": true, |
||||
|
"scripts": { |
||||
|
"serve": "vue-cli-service serve", |
||||
|
"build": "vue-cli-service build", |
||||
|
"lint": "vue-cli-service lint" |
||||
|
}, |
||||
|
"dependencies": { |
||||
|
"ant-design-vue": "^1.2.4", |
||||
|
"compression-webpack-plugin": "^6.1.1", |
||||
|
"core-js": "^3.6.5", |
||||
|
"echarts": "^4.9.0", |
||||
|
"echarts-gl": "^1.1.1", |
||||
|
"moment": "^2.29.1", |
||||
|
"register-service-worker": "^1.7.1", |
||||
|
"stylus": "^0.54.8", |
||||
|
"vue": "^2.6.11", |
||||
|
"vue-dompurify-html": "^2.3.0", |
||||
|
"vue-router": "^3.2.0", |
||||
|
"vuex": "^3.4.0" |
||||
|
}, |
||||
|
"devDependencies": { |
||||
|
"@vue/cli-plugin-babel": "~4.5.0", |
||||
|
"@vue/cli-plugin-eslint": "~4.5.0", |
||||
|
"@vue/cli-plugin-pwa": "~4.5.0", |
||||
|
"@vue/cli-plugin-router": "~4.5.0", |
||||
|
"@vue/cli-plugin-vuex": "~4.5.0", |
||||
|
"@vue/cli-service": "~4.5.0", |
||||
|
"@vue/eslint-config-prettier": "^6.0.0", |
||||
|
"axios": "^0.18.0", |
||||
|
"babel-eslint": "^10.1.0", |
||||
|
"babel-plugin-import": "^1.11.0", |
||||
|
"css-loader": "^5.0.1", |
||||
|
"eslint": "^6.7.2", |
||||
|
"eslint-plugin-prettier": "^3.1.3", |
||||
|
"eslint-plugin-vue": "^6.2.2", |
||||
|
"less": "^2.7.3", |
||||
|
"less-loader": "^4.1.0", |
||||
|
"prettier": "^1.19.1", |
||||
|
"sass": "^1.26.5", |
||||
|
"sass-loader": "^8.0.2", |
||||
|
"stylus": "^0.54.5", |
||||
|
"stylus-loader": "^3.0.2", |
||||
|
"svg-sprite-loader": "^5.0.0", |
||||
|
"vue-cli-plugin-ant-design": "^1.0.1", |
||||
|
"vue-cli-plugin-axios": "^0.0.4", |
||||
|
"vue-template-compiler": "^2.6.11" |
||||
|
} |
||||
|
} |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 9.2 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 84 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 84 KiB |
After Width: | Height: | Size: 84 KiB |
After Width: | Height: | Size: 84 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 215 B |
@ -0,0 +1,18 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="en"> |
||||
|
<head> |
||||
|
<meta charset="utf-8"> |
||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
||||
|
<meta name="viewport" content="width=device-width,initial-scale=1.0"> |
||||
|
<link rel="icon" href="./favicon.ico"> |
||||
|
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> |
||||
|
<title><%= htmlWebpackPlugin.options.title %></title> |
||||
|
</head> |
||||
|
<body> |
||||
|
<noscript> |
||||
|
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> |
||||
|
</noscript> |
||||
|
<div id="app"></div> |
||||
|
<!-- built files will be auto injected --> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,2 @@ |
|||||
|
User-agent: * |
||||
|
Disallow: |
@ -0,0 +1,15 @@ |
|||||
|
{ |
||||
|
"$shared": { |
||||
|
"version": "v1", |
||||
|
"identifier": "wally", |
||||
|
"credential": "111111" |
||||
|
}, |
||||
|
"dev": { |
||||
|
"name": "dev", |
||||
|
"url": "http://192.168.0.99/gateway" |
||||
|
}, |
||||
|
"local": { |
||||
|
"version": "v2", |
||||
|
"url": "http://192.168.0.99/gateway" |
||||
|
} |
||||
|
} |
@ -0,0 +1,72 @@ |
|||||
|
# @tall = {{url}}/tall/v1.0 |
||||
|
@tall = http://www.tall.wiki/gateway/tall/v1.0 |
||||
|
@greenvalley = http://www.sxwikionline.com/gateway/greenvalley |
||||
|
@record = https://www.tall.wiki/gateway/wisdomcar |
||||
|
@type = content-type: application/json;charset=utf-8 |
||||
|
|
||||
|
### login |
||||
|
|
||||
|
# @name login |
||||
|
POST {{tall}}/users/signin |
||||
|
{{type}} |
||||
|
|
||||
|
{ |
||||
|
"client": 1, |
||||
|
"type": 3, |
||||
|
"data": { |
||||
|
"identifier": "song", |
||||
|
"credential": "999999" |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
### send code |
||||
|
|
||||
|
GET {{tall}}/users/smscode?phone=16603418748 |
||||
|
|
||||
|
|
||||
|
### phone login |
||||
|
|
||||
|
# @name phonelogin |
||||
|
POST {{tall}}/users/signin |
||||
|
{{type}} |
||||
|
|
||||
|
{ |
||||
|
"client": 1, |
||||
|
"type": 1, |
||||
|
"data": { |
||||
|
"identifier": "16603418748", |
||||
|
"credential": "1111" |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
### 根据团队id查看研发团队相关信息 |
||||
|
|
||||
|
POST {{greenvalley}}/researchTeam/selectTeam |
||||
|
{{type}} |
||||
|
Authorization: Bearer {{login.response.body.$.data.token}} |
||||
|
|
||||
|
{ |
||||
|
"param": { |
||||
|
"company": "", |
||||
|
"researchDirection": "", |
||||
|
"teamId": 0, |
||||
|
"teamIntroduce": "", |
||||
|
"teamLeaderName": "", |
||||
|
"teamName": "" |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
### 根据团队id查看研发团队相关信息 |
||||
|
|
||||
|
POST {{record}}/debug/record |
||||
|
{{type}} |
||||
|
# Authorization: Bearer {{login.response.body.$.data.token}} |
||||
|
|
||||
|
{ |
||||
|
"param":{ |
||||
|
"authId": "1", |
||||
|
"type": "2", |
||||
|
"value":"21", |
||||
|
"time":"1607937529000" |
||||
|
} |
||||
|
} |
@ -0,0 +1,59 @@ |
|||||
|
<!-- |
||||
|
* @Author: wally |
||||
|
* @email: 18603454788@163.com |
||||
|
* @Date: 2021-01-28 09:32:34 |
||||
|
* @LastEditors: wally |
||||
|
* @LastEditTime: 2021-01-29 10:57:06 |
||||
|
--> |
||||
|
<template> |
||||
|
<a-config-provider :locale="zh_CN"> |
||||
|
<div id="app"> |
||||
|
<btn-con /> |
||||
|
<router-view></router-view> |
||||
|
</div> |
||||
|
</a-config-provider> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { mapState, mapActions, mapMutations } from 'vuex'; |
||||
|
import zh_CN from 'ant-design-vue/lib/locale-provider/zh_CN'; |
||||
|
import BtnCon from 'components/BtnCom/BtnCon.vue'; |
||||
|
|
||||
|
export default { |
||||
|
name: 'App', |
||||
|
components: { BtnCon }, |
||||
|
data() { |
||||
|
return { zh_CN }; |
||||
|
}, |
||||
|
|
||||
|
computed: mapState('home', ['anyringToken']), |
||||
|
|
||||
|
created() { |
||||
|
// const userId = '1338747522436435968'; |
||||
|
// const params = { userId }; |
||||
|
// this.getUserId(params); |
||||
|
}, |
||||
|
|
||||
|
methods: mapActions('home', ['getUserId']), |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style> |
||||
|
html, |
||||
|
body, |
||||
|
#app { |
||||
|
min-height: 100%; |
||||
|
} |
||||
|
|
||||
|
#app { |
||||
|
background: transparent; |
||||
|
} |
||||
|
body::-webkit-scrollbar { |
||||
|
width: 0; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
|
|
||||
|
<style lang="stylus"> |
||||
|
@import './common/portrait.styl'; |
||||
|
</style> |
@ -0,0 +1,21 @@ |
|||||
|
@font-face {font-family: "iconfont"; |
||||
|
src: url('iconfont.eot?t=1606814380789'); /* IE9 */ |
||||
|
src: url('iconfont.eot?t=1606814380789#iefix') format('embedded-opentype'), /* IE6-IE8 */ |
||||
|
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAALAAAsAAAAABnAAAAJ0AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCCcAp8gRABNgIkAwgLBgAEIAWEbQcvG7UFyJ6aPClS2/jAQpBlKUHgLEQQraGzf/cfBIUoGRWCjoqLMLFRrXRVrTH1bMRfztXeEwobfUDy1DOlP3OusGk5nTSH6gmFJ0tKIY+nBgQ4ZZ5fe/U+cbjXxvJA5jvvchlj0FiTJnUBxoEU0N4YbeEC+QD+h7ELXMJlAs2GJMUOR6aWoE1mzQrEm22q0JbzyzJLNQpVzcYsvio1Fp/FAXwJfx//IR9tFMrEqrh4HTag75dmZ6SPmhefIEBA20skLACZuKmNn2kUjNmoOd5kDOyrNPil1bVvE3v954mKVdwKBqDknqSu7Fb5C5DpzRiwMuoDpJaW1veXVeV5b+lxhVLteX355ZA+rS0ZjT+ex05fRr8/jR493lS0+Eefi/THEQbKv8zAm9u5cn11ob622gISIuUCqogn3i5OR1tKlzE/z2iuVkMfQC0tEYA/mX852tS7eVtLBj//5s/CKbVc+kDjvh3BP5L2bMm63LIWWZXWpgtjGs9d1awZddjd7Xusoe+G0qFR3205GwymSBpNEDN1AaUWi6g02kGzeaPbW/QQGkVuwpxNgNDpEoV235B0uiJm6hdK/f5R6YxGNLuLngNbTIXdcSBQlWgQrUZsnQfMscuOqHQBzZKniqw8ZCkoIjtEculsMTWKAYo5lkRlMy8lI0xwn4yA69DzOAkFd1CXaUvKsJDJsLo7pXXuQ4cDAlJJyEBoagibjgswv7PUUfr+AmQq8ahES1NNUIGEiN0/kZOW7UEc1QS9mu7llkiZKU+SGIIROB8xAsYhj4cjwvpxDqST0qwR0VBBxm7H+mrS6+v8r9sFzSxjEfaIpHzjuuoBAAA=') format('woff2'), |
||||
|
url('iconfont.woff?t=1606814380789') format('woff'), |
||||
|
url('iconfont.ttf?t=1606814380789') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */ |
||||
|
url('iconfont.svg?t=1606814380789#iconfont') format('svg'); /* iOS 4.1- */ |
||||
|
} |
||||
|
|
||||
|
.iconfont { |
||||
|
font-family: "iconfont" !important; |
||||
|
font-size: 14px; |
||||
|
font-style: normal; |
||||
|
-webkit-font-smoothing: antialiased; |
||||
|
-moz-osx-font-smoothing: grayscale; |
||||
|
} |
||||
|
|
||||
|
.icon-local:before { |
||||
|
content: "\e662"; |
||||
|
font-size: 20px; |
||||
|
} |
After Width: | Height: | Size: 1018 B |
@ -0,0 +1,279 @@ |
|||||
|
// padding |
||||
|
.pa-3 { |
||||
|
padding: 12px; |
||||
|
} |
||||
|
|
||||
|
.px-2{ |
||||
|
padding-left: 8px; |
||||
|
padding-right: 8px; |
||||
|
} |
||||
|
|
||||
|
.px-3{ |
||||
|
padding-left: 12px; |
||||
|
padding-right: 12px; |
||||
|
} |
||||
|
|
||||
|
.px-10{ |
||||
|
padding-left: 30px; |
||||
|
padding-right: 30px; |
||||
|
} |
||||
|
|
||||
|
.pb-3 { |
||||
|
padding-bottom: 12px; |
||||
|
} |
||||
|
|
||||
|
.pb-4 { |
||||
|
padding-bottom: 16px; |
||||
|
} |
||||
|
|
||||
|
.pb-5 { |
||||
|
padding-bottom: 20px; |
||||
|
} |
||||
|
|
||||
|
.pb-10 { |
||||
|
padding-bottom: 40px; |
||||
|
} |
||||
|
|
||||
|
// margin |
||||
|
.ma-2 { |
||||
|
margin: 8px; |
||||
|
} |
||||
|
|
||||
|
.ma-3 { |
||||
|
margin: 12px; |
||||
|
} |
||||
|
|
||||
|
.mx-2{ |
||||
|
margin-left: 8px; |
||||
|
margin-right: 8px; |
||||
|
} |
||||
|
|
||||
|
.my-2{ |
||||
|
margin-top: 8px; |
||||
|
margin-bottom: 8px; |
||||
|
} |
||||
|
|
||||
|
.my-3{ |
||||
|
margin-top: 12px; |
||||
|
margin-bottom: 12px; |
||||
|
} |
||||
|
|
||||
|
.my-4{ |
||||
|
margin-top: 16px; |
||||
|
margin-bottom: 16px; |
||||
|
} |
||||
|
|
||||
|
.mt-1{ |
||||
|
margin-top: 4px; |
||||
|
} |
||||
|
|
||||
|
.mt-2{ |
||||
|
margin-top: 8px; |
||||
|
} |
||||
|
|
||||
|
.mt-3{ |
||||
|
margin-top: 12px; |
||||
|
} |
||||
|
|
||||
|
.mt-4{ |
||||
|
margin-top: 16px; |
||||
|
} |
||||
|
|
||||
|
.mb-1{ |
||||
|
margin-bottom: 4px; |
||||
|
} |
||||
|
|
||||
|
.mb-2{ |
||||
|
margin-bottom: 8px; |
||||
|
} |
||||
|
|
||||
|
.mb-3{ |
||||
|
margin-bottom: 12px; |
||||
|
} |
||||
|
|
||||
|
.mb-4{ |
||||
|
margin-bottom: 16px; |
||||
|
} |
||||
|
|
||||
|
.ml-2{ |
||||
|
margin-left: 8px; |
||||
|
} |
||||
|
|
||||
|
.ml-3{ |
||||
|
margin-left: 12px; |
||||
|
} |
||||
|
|
||||
|
.ml-4{ |
||||
|
margin-left: 16px; |
||||
|
} |
||||
|
|
||||
|
.ml-5{ |
||||
|
margin-left: 20px; |
||||
|
} |
||||
|
|
||||
|
.ml-6{ |
||||
|
margin-left: 24px; |
||||
|
} |
||||
|
|
||||
|
.ml-7{ |
||||
|
margin-left: 28px; |
||||
|
} |
||||
|
|
||||
|
.ml-8{ |
||||
|
margin-left: 32px; |
||||
|
} |
||||
|
|
||||
|
.mr-1{ |
||||
|
margin-right: 4px; |
||||
|
} |
||||
|
|
||||
|
.mr-2{ |
||||
|
margin-right: 8px; |
||||
|
} |
||||
|
|
||||
|
.mr-3{ |
||||
|
margin-right: 12px; |
||||
|
} |
||||
|
|
||||
|
.mr-4{ |
||||
|
margin-right: 16px; |
||||
|
} |
||||
|
|
||||
|
.mr-5{ |
||||
|
margin-right: 20px; |
||||
|
} |
||||
|
|
||||
|
.mr-6{ |
||||
|
margin-right: 24px; |
||||
|
} |
||||
|
|
||||
|
// background |
||||
|
.white { |
||||
|
background: white; |
||||
|
} |
||||
|
|
||||
|
// flex |
||||
|
.d-flex{ |
||||
|
display: flex; |
||||
|
} |
||||
|
|
||||
|
.flex-wrap{ |
||||
|
flex-wrap: wrap; |
||||
|
} |
||||
|
|
||||
|
.flex-nowrap{ |
||||
|
flex-wrap: nowrap; |
||||
|
} |
||||
|
|
||||
|
.flex-column{ |
||||
|
flex-direction: column; |
||||
|
} |
||||
|
|
||||
|
.flex-column-reverse{ |
||||
|
flex-direction: column-reverse; |
||||
|
} |
||||
|
|
||||
|
.flex-row{ |
||||
|
flex-direction: row; |
||||
|
} |
||||
|
|
||||
|
.flex-row-reverse{ |
||||
|
flex-direction: row-reverse; |
||||
|
} |
||||
|
|
||||
|
.justify-center{ |
||||
|
justify-content: center; |
||||
|
} |
||||
|
|
||||
|
.justify-space-between{ |
||||
|
justify-content: space-between; |
||||
|
} |
||||
|
|
||||
|
.align-center{ |
||||
|
align-items: center; |
||||
|
} |
||||
|
|
||||
|
.flex-1{ |
||||
|
display: flex; |
||||
|
flex: 1; |
||||
|
} |
||||
|
|
||||
|
.flex-2{ |
||||
|
display: flex; |
||||
|
flex: 2; |
||||
|
} |
||||
|
// other |
||||
|
.pointer{ |
||||
|
cursor:pointer; |
||||
|
} |
||||
|
|
||||
|
.fill-height{ |
||||
|
height:100%; |
||||
|
} |
||||
|
|
||||
|
// font |
||||
|
.font-bold-24{ |
||||
|
font-size: 24px; |
||||
|
font-weight: bold; |
||||
|
} |
||||
|
|
||||
|
.font-24{ |
||||
|
font-size: 24px; |
||||
|
} |
||||
|
|
||||
|
.font-bold-16{ |
||||
|
font-size: 16px; |
||||
|
font-weight: bold; |
||||
|
} |
||||
|
|
||||
|
.font-16{ |
||||
|
font-size: 16px; |
||||
|
} |
||||
|
|
||||
|
.font-bold-14{ |
||||
|
font-size: 14px; |
||||
|
font-weight: bold; |
||||
|
} |
||||
|
|
||||
|
.font-14{ |
||||
|
font-size: 14px; |
||||
|
} |
||||
|
|
||||
|
.icon-size{ |
||||
|
font-size: 20px; |
||||
|
} |
||||
|
|
||||
|
h2{ |
||||
|
font-size: 24px; |
||||
|
font-weight: bold; |
||||
|
color: rgba(0,0,0,.85) |
||||
|
} |
||||
|
|
||||
|
.textColor{ |
||||
|
color: rgba(0,0,0,.65) |
||||
|
} |
||||
|
|
||||
|
.baseColor{ |
||||
|
color: #13ACC4 |
||||
|
} |
||||
|
|
||||
|
.bg{ |
||||
|
background: #F5F5F5 |
||||
|
} |
||||
|
|
||||
|
.ant-btn-primary{ |
||||
|
background-color: #13ACC4 |
||||
|
border-color: #13ACC4; |
||||
|
} |
||||
|
|
||||
|
.ant-btn-link:hover, .ant-btn-link:focus{ |
||||
|
color: #13ACC4; |
||||
|
} |
||||
|
|
||||
|
.fill-width{ |
||||
|
width:100%; |
||||
|
} |
||||
|
|
||||
|
.fill-height{ |
||||
|
height:100%; |
||||
|
} |
@ -0,0 +1,32 @@ |
|||||
|
<template> |
||||
|
<div class="btn-box"> |
||||
|
<a-button @click="jump('/')">首页数据统计页面</a-button> |
||||
|
<a-button @click="jump('/Meeting')">会议纪要页面</a-button> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
name: 'BtnCom', |
||||
|
data() { |
||||
|
return { |
||||
|
str: '', |
||||
|
showVideo: false, |
||||
|
}; |
||||
|
}, |
||||
|
|
||||
|
methods: { |
||||
|
jump(url) { |
||||
|
this.$router.push(url); |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style lang="stylus" scoped> |
||||
|
.btn-box { |
||||
|
height: 100px; |
||||
|
width: 100%; |
||||
|
border: 2px solid #ccc; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,13 @@ |
|||||
|
/* |
||||
|
* Copyright (c) 2020. |
||||
|
* author: wally |
||||
|
* email: 18603454788@163.com |
||||
|
*/ |
||||
|
import axios from 'axios'; |
||||
|
let { proxyUrl, msgUrl } = require('@/config/setting'); |
||||
|
|
||||
|
const tall = `${proxyUrl}/tall/v1.0`; |
||||
|
const users = `${tall}/users`; |
||||
|
|
||||
|
// 查找用户详细信息
|
||||
|
export const getUserId = params => axios.get(`${users}/userId`, params); |
@ -0,0 +1,8 @@ |
|||||
|
import axios from 'axios'; |
||||
|
let { proxyUrl, msgUrl } = require('@/config/setting'); |
||||
|
|
||||
|
const wisdomcar = `${proxyUrl}/wisdomcar`; // 盐湖医院分路径
|
||||
|
const statistics = `${wisdomcar}/statistics`; // 盐湖医院相关接口
|
||||
|
|
||||
|
// 急救时长分析统计图数据
|
||||
|
// export const getPointTime = params => axios.post(`${statistics}/getPointTime`, params);
|
@ -0,0 +1,30 @@ |
|||||
|
const title = process.env.VUE_APP_TITLE; |
||||
|
const description = process.env.VUE_APP_DESCRIPTION; |
||||
|
const baseUrl = process.env.VUE_APP_BASE_URL; |
||||
|
const apiUrl = process.env.VUE_APP_API_URL; |
||||
|
const proxyUrl = process.env.VUE_APP_PROXY_URL; |
||||
|
const publicPath = process.env.VUE_APP_PUBLIC_PATH; |
||||
|
const msgUrl = process.env.VUE_APP_MSG_URL; |
||||
|
|
||||
|
module.exports = { |
||||
|
// 首页标题
|
||||
|
title, |
||||
|
|
||||
|
// 首页描述信息
|
||||
|
description, |
||||
|
|
||||
|
// 基础地址
|
||||
|
baseUrl, |
||||
|
|
||||
|
// api基础地址
|
||||
|
apiUrl, |
||||
|
|
||||
|
// 消息系统地址
|
||||
|
msgUrl, |
||||
|
|
||||
|
// api代理地址
|
||||
|
proxyUrl, |
||||
|
|
||||
|
// 生成文件目录 publicPath
|
||||
|
publicPath, |
||||
|
}; |
@ -0,0 +1,19 @@ |
|||||
|
/* |
||||
|
* Copyright (c) 2019. |
||||
|
* author: wally |
||||
|
* email: 18603454788@163.com |
||||
|
*/ |
||||
|
|
||||
|
// 用户登录client
|
||||
|
export const SIGN_IN_CLIENTS = { mp: 0, h5: 1, android: 2, ios: 3 }; |
||||
|
|
||||
|
// 用户登录类型
|
||||
|
export const SIGN_IN_TYPES = { |
||||
|
mp: 0, |
||||
|
phone: 1, |
||||
|
email: 2, |
||||
|
username: 3, |
||||
|
wx: 4, |
||||
|
wx_web: 5, |
||||
|
wb: 6, |
||||
|
}; |
@ -0,0 +1,25 @@ |
|||||
|
// @ts-ignore
|
||||
|
import Vue from 'vue'; |
||||
|
import './plugins/axios'; |
||||
|
import App from './App.vue'; |
||||
|
import './registerServiceWorker'; |
||||
|
import router from './router'; |
||||
|
import store from './store'; |
||||
|
import './plugins/ant-design-vue.js'; |
||||
|
import 'common/portrait.styl'; |
||||
|
import echarts from 'echarts'; |
||||
|
import 'echarts-gl'; |
||||
|
import 'echarts/map/js/province/shanxi.js'; //对应的省份
|
||||
|
// Vue.use(echarts);
|
||||
|
Vue.prototype.$echarts = echarts; |
||||
|
// import './assets/icon/iconfont.css';
|
||||
|
// import VueDOMPurifyHTML from 'vue-dompurify-html';
|
||||
|
// import moment from 'moment'; //导入文件
|
||||
|
// Vue.prototype.$moment = moment; //赋值使用
|
||||
|
Vue.config.productionTip = false; |
||||
|
|
||||
|
window.vm = new Vue({ |
||||
|
router, |
||||
|
store, |
||||
|
render: h => h(App), |
||||
|
}).$mount('#app'); |
@ -0,0 +1,74 @@ |
|||||
|
import Vue from 'vue'; |
||||
|
import { |
||||
|
Pagination, |
||||
|
Button, |
||||
|
Input, |
||||
|
message, |
||||
|
notification, |
||||
|
Modal, |
||||
|
Tag, |
||||
|
Table, |
||||
|
Tabs, |
||||
|
Icon, |
||||
|
Empty, |
||||
|
Form, |
||||
|
Select, |
||||
|
Upload, |
||||
|
Badge, |
||||
|
Popconfirm, |
||||
|
DatePicker, |
||||
|
Switch, |
||||
|
Radio, |
||||
|
Dropdown, |
||||
|
Menu, |
||||
|
Row, |
||||
|
Col, |
||||
|
Timeline, |
||||
|
Checkbox, |
||||
|
BackTop, |
||||
|
Progress, |
||||
|
carousel, |
||||
|
Spin, |
||||
|
} from 'ant-design-vue'; |
||||
|
import { ConfigProvider } from 'ant-design-vue'; |
||||
|
Vue.component(ConfigProvider.name, ConfigProvider); |
||||
|
Vue.use(Pagination); |
||||
|
Vue.use(Button); |
||||
|
Vue.use(Input); |
||||
|
Vue.use(Modal); |
||||
|
Vue.use(Tag); |
||||
|
Vue.use(Table); |
||||
|
Vue.use(Tabs); |
||||
|
Vue.use(Icon); |
||||
|
Vue.use(Empty); |
||||
|
Vue.use(Form); |
||||
|
Vue.use(Select); |
||||
|
Vue.use(Upload); |
||||
|
Vue.use(Badge); |
||||
|
Vue.use(Popconfirm); |
||||
|
Vue.use(DatePicker); |
||||
|
Vue.use(Switch); |
||||
|
Vue.use(Radio); |
||||
|
Vue.use(Dropdown); |
||||
|
Vue.use(Menu); |
||||
|
Vue.use(Row); |
||||
|
Vue.use(Col); |
||||
|
Vue.use(Timeline); |
||||
|
Vue.use(Checkbox); |
||||
|
Vue.use(BackTop); |
||||
|
Vue.use(Progress); |
||||
|
Vue.use(carousel); |
||||
|
Vue.use(Spin); |
||||
|
|
||||
|
Vue.prototype.$message = message; |
||||
|
Vue.prototype.$notification = notification; |
||||
|
Vue.prototype.$info = Modal.info; |
||||
|
Vue.prototype.$success = Modal.success; |
||||
|
Vue.prototype.$error = Modal.error; |
||||
|
Vue.prototype.$warning = Modal.warning; |
||||
|
Vue.prototype.$confirm = Modal.confirm; |
||||
|
|
||||
|
message.config({ |
||||
|
duration: 3, |
||||
|
maxCount: 3, |
||||
|
}); |
@ -0,0 +1,77 @@ |
|||||
|
'use strict'; |
||||
|
|
||||
|
import Vue from 'vue'; |
||||
|
import axios from 'axios'; |
||||
|
import router from '../router/index'; |
||||
|
import store from '../store/index'; |
||||
|
|
||||
|
// Full config: https://github.com/axios/axios#request-config
|
||||
|
// axios.defaults.baseURL = process.env.baseURL || process.env.apiUrl || '';
|
||||
|
// axios.defaults.headers.common['Authorization'] = AUTH_TOKEN;
|
||||
|
// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
|
||||
|
let config = { |
||||
|
// baseURL: process.env.baseURL || process.env.apiUrl || ""
|
||||
|
timeout: 60 * 1000, // Timeout
|
||||
|
// withCredentials: true, // Check cross-site Access-Control
|
||||
|
}; |
||||
|
|
||||
|
const _axios = axios.create(config); |
||||
|
axios.interceptors.request.use( |
||||
|
function(config) { |
||||
|
let token = store.state.anyringToken || sessionStorage.getItem('anyringToken'); |
||||
|
|
||||
|
if (token) { |
||||
|
config.headers.Authorization = `Bearer ${token}`; |
||||
|
} |
||||
|
return config; |
||||
|
}, |
||||
|
function(error) { |
||||
|
// Do something with request error
|
||||
|
return Promise.reject(error); |
||||
|
}, |
||||
|
); |
||||
|
|
||||
|
// Add a response interceptor
|
||||
|
axios.interceptors.response.use( |
||||
|
function(response) { |
||||
|
if (response.data && response.data.code >= 400 && response.data.code < 500) { |
||||
|
store.commit('user/sign', ''); |
||||
|
router.replace({ |
||||
|
path: '/user/login', |
||||
|
query: { redirect: router.currentRoute.fullPath }, |
||||
|
}); |
||||
|
} |
||||
|
// Do something with response data
|
||||
|
return response; |
||||
|
}, |
||||
|
function(error) { |
||||
|
// Do something with response error
|
||||
|
return Promise.reject(error); |
||||
|
}, |
||||
|
); |
||||
|
|
||||
|
Plugin.install = function(Vue) { |
||||
|
Vue.axios = _axios; |
||||
|
window.axios = _axios; |
||||
|
Object.defineProperties(Vue.prototype, { |
||||
|
axios: { |
||||
|
get() { |
||||
|
return _axios; |
||||
|
}, |
||||
|
}, |
||||
|
$axios: { |
||||
|
get() { |
||||
|
return _axios; |
||||
|
}, |
||||
|
}, |
||||
|
$http: { |
||||
|
get() { |
||||
|
return _axios; |
||||
|
}, |
||||
|
}, |
||||
|
}); |
||||
|
}; |
||||
|
|
||||
|
Vue.use(Plugin); |
||||
|
|
||||
|
export default Plugin; |
@ -0,0 +1,34 @@ |
|||||
|
/* eslint-disable no-console */ |
||||
|
|
||||
|
import { register } from "register-service-worker"; |
||||
|
|
||||
|
if (process.env.NODE_ENV === "production") { |
||||
|
register(`${process.env.BASE_URL}service-worker.js`, { |
||||
|
ready() { |
||||
|
console.log( |
||||
|
"App is being served from cache by a service worker.\n" + |
||||
|
"For more details, visit https://goo.gl/AFskqB" |
||||
|
); |
||||
|
}, |
||||
|
registered() { |
||||
|
console.log("Service worker has been registered."); |
||||
|
}, |
||||
|
cached() { |
||||
|
console.log("Content has been cached for offline use."); |
||||
|
}, |
||||
|
updatefound() { |
||||
|
console.log("New content is downloading."); |
||||
|
}, |
||||
|
updated() { |
||||
|
console.log("New content is available; please refresh."); |
||||
|
}, |
||||
|
offline() { |
||||
|
console.log( |
||||
|
"No internet connection found. App is running in offline mode." |
||||
|
); |
||||
|
}, |
||||
|
error(error) { |
||||
|
console.error("Error during service worker registration:", error); |
||||
|
} |
||||
|
}); |
||||
|
} |
@ -0,0 +1,35 @@ |
|||||
|
/* |
||||
|
* @Author: wally |
||||
|
* @email: 18603454788@163.com |
||||
|
* @Date: 2021-01-28 09:32:34 |
||||
|
* @LastEditors: wally |
||||
|
* @LastEditTime: 2021-01-29 11:00:57 |
||||
|
*/ |
||||
|
import Vue from 'vue'; |
||||
|
import VueRouter from 'vue-router'; |
||||
|
import Home from 'views/Index/Index.vue'; |
||||
|
|
||||
|
Vue.use(VueRouter); |
||||
|
|
||||
|
const routes = [ |
||||
|
// 首页数据统计
|
||||
|
{ |
||||
|
path: '/', |
||||
|
name: 'Home', |
||||
|
component: Home, |
||||
|
}, |
||||
|
// 会议纪要
|
||||
|
{ |
||||
|
path: '/Meeting', |
||||
|
name: 'Meeting', |
||||
|
component: () => import('@/views/Meeting/Index.vue'), |
||||
|
}, |
||||
|
]; |
||||
|
|
||||
|
const router = new VueRouter({ |
||||
|
mode: 'history', |
||||
|
base: process.env.BASE_URL, |
||||
|
routes, |
||||
|
}); |
||||
|
|
||||
|
export default router; |
@ -0,0 +1,7 @@ |
|||||
|
import Vue from 'vue'; |
||||
|
import Vuex from 'vuex'; |
||||
|
import home from './modules/home/index'; |
||||
|
// import messages from './modules/messages/index';
|
||||
|
|
||||
|
Vue.use(Vuex); |
||||
|
export default new Vuex.Store({ modules: { home } }); |
@ -0,0 +1,28 @@ |
|||||
|
import axios from 'axios'; |
||||
|
import { message } from 'ant-design-vue'; |
||||
|
import { getUserId } from 'config/api-user'; |
||||
|
|
||||
|
const actions = { |
||||
|
/** |
||||
|
* 通过userId获取token |
||||
|
* @param {any} commit |
||||
|
* @param {object} params 提交的参数 |
||||
|
*/ |
||||
|
async getUserId({ commit }, params) { |
||||
|
try { |
||||
|
const res = await getUserId({ params }); |
||||
|
const { code, msg, data } = res.data; |
||||
|
if (code === 200) { |
||||
|
commit('sign', data.token); |
||||
|
commit('setUser', data); |
||||
|
return data; |
||||
|
} else { |
||||
|
throw msg; |
||||
|
} |
||||
|
} catch (error) { |
||||
|
throw error || '获取个人信息失败'; |
||||
|
} |
||||
|
}, |
||||
|
}; |
||||
|
|
||||
|
export default actions; |
@ -0,0 +1,7 @@ |
|||||
|
const getters = {}; |
||||
|
// 域定制导航展示形式
|
||||
|
// 0 -> 无特殊导航文字
|
||||
|
// 1 -> 横向定制导航
|
||||
|
// 2 -> 纵向定制导航
|
||||
|
|
||||
|
export default getters; |
@ -0,0 +1,6 @@ |
|||||
|
import mutations from './mutations'; |
||||
|
import actions from './actions'; |
||||
|
import getters from './getters'; |
||||
|
import state from './state'; |
||||
|
|
||||
|
export default { namespaced: true, state, getters, mutations, actions }; |
@ -0,0 +1,24 @@ |
|||||
|
const mutations = { |
||||
|
/** |
||||
|
* 设置token |
||||
|
* @param { object } state |
||||
|
* @param { string } token |
||||
|
*/ |
||||
|
sign(state, token) { |
||||
|
state.anyringToken = token; |
||||
|
sessionStorage.setItem('anyringToken', token); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 设置user用户信息 |
||||
|
* @param {object} state |
||||
|
* @param {object} user {id, account, phone} |
||||
|
*/ |
||||
|
setUser(state, user) { |
||||
|
if (!user) return; |
||||
|
state.user = { ...user }; |
||||
|
sessionStorage.setItem('user', JSON.stringify(user)); |
||||
|
}, |
||||
|
}; |
||||
|
|
||||
|
export default mutations; |
@ -0,0 +1,6 @@ |
|||||
|
const state = { |
||||
|
anyringToken: '', |
||||
|
user: { id: '', phone: '', account: '' }, |
||||
|
}; |
||||
|
|
||||
|
export default state; |
@ -0,0 +1,19 @@ |
|||||
|
<template> |
||||
|
<div>首页数据统计图界面</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
name: 'Index', |
||||
|
data() { |
||||
|
return { |
||||
|
str: '', |
||||
|
showVideo: false, |
||||
|
}; |
||||
|
}, |
||||
|
|
||||
|
methods: {}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style lang="stylus" scoped></style> |
@ -0,0 +1,19 @@ |
|||||
|
<template> |
||||
|
<div>会议纪要界面</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
name: 'Meeting', |
||||
|
data() { |
||||
|
return { |
||||
|
str: '', |
||||
|
showVideo: false, |
||||
|
}; |
||||
|
}, |
||||
|
|
||||
|
methods: {}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style lang="stylus" scoped></style> |
@ -0,0 +1,138 @@ |
|||||
|
/* |
||||
|
* Copyright (c) 2019. |
||||
|
* author: wally |
||||
|
* email: 18603454788@163.com |
||||
|
*/ |
||||
|
const path = require('path'); |
||||
|
const productionGzipExtensions = /\.(js|css|json|txt|html|ico|svg|ttf|woff|woff2)(\?.*)?$/i; |
||||
|
const CompressionWebpackPlugin = require('compression-webpack-plugin'); |
||||
|
|
||||
|
const resolve = dir => path.join(__dirname, dir); |
||||
|
const isPro = process.env.VUE_APP_NODE_ENV === 'production'; |
||||
|
const publicPath = process.env.VUE_APP_PUBLIC_PATH; |
||||
|
const proxyUrl = process.env.VUE_APP_PROXY_URL; |
||||
|
const apiUrl = process.env.VUE_APP_API_URL; |
||||
|
const title = process.env.VUE_APP_TITLE; |
||||
|
console.log('proxyUrl: ', proxyUrl); |
||||
|
console.log('apiUrl: ', apiUrl); |
||||
|
|
||||
|
// 本地环境是否需要使用cdn
|
||||
|
const devNeedCdn = true; |
||||
|
|
||||
|
// cdn 链接及配置
|
||||
|
const cdn = { |
||||
|
css: [ |
||||
|
'https://cdn.jsdelivr.net/npm/@mdi/font@5.x/css/materialdesignicons.min.css', |
||||
|
'https://cdn.bootcdn.net/ajax/libs/ant-design-vue/1.6.5/antd.min.css', |
||||
|
], |
||||
|
js: [ |
||||
|
isPro ? 'https://cdn.bootcdn.net/ajax/libs/vue/2.6.12/vue.min.js' : 'https://cdn.bootcdn.net/ajax/libs/vue/2.6.12/vue.js', |
||||
|
'https://cdn.bootcdn.net/ajax/libs/vue-router/3.4.3/vue-router.min.js', |
||||
|
'https://cdn.bootcdn.net/ajax/libs/vuex/3.5.1/vuex.min.js', |
||||
|
'https://cdn.bootcdn.net/ajax/libs/moment.js/2.9.0/moment.min.js', |
||||
|
'https://cdn.bootcdn.net/ajax/libs/lodash.js/4.17.20/lodash.min.js', |
||||
|
'https://cdn.bootcdn.net/ajax/libs/axios/0.20.0/axios.min.js', |
||||
|
'https://cdn.bootcdn.net/ajax/libs/ant-design-vue/1.6.5/antd.min.js', |
||||
|
], |
||||
|
// externals: {
|
||||
|
// vue: 'Vue',
|
||||
|
// vuex: 'Vuex',
|
||||
|
// 'vue-router': 'VueRouter',
|
||||
|
// moment: 'moment',
|
||||
|
// axios: 'axios',
|
||||
|
// 'ant-design-vue': 'antd',
|
||||
|
// lodash: '_',
|
||||
|
// },
|
||||
|
}; |
||||
|
|
||||
|
module.exports = { |
||||
|
lintOnSave: true, |
||||
|
publicPath: isPro ? publicPath : '/', |
||||
|
devServer: { |
||||
|
open: true, |
||||
|
overlay: { |
||||
|
warnings: false, |
||||
|
errors: true, |
||||
|
}, |
||||
|
proxy: { |
||||
|
[proxyUrl]: { |
||||
|
target: apiUrl, // 代理接口
|
||||
|
changeOrigin: true, |
||||
|
pathRewrite: { [`^${proxyUrl}`]: '' }, |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
productionSourceMap: false, // 去掉生产环境的sourcemap 加快构建速度
|
||||
|
|
||||
|
configureWebpack: { |
||||
|
// provide the app's title in webpack's name field, so that
|
||||
|
// it can be accessed in index.html to inject the correct title.
|
||||
|
|
||||
|
name: title, |
||||
|
resolve: { |
||||
|
alias: { |
||||
|
'~': __dirname, |
||||
|
'@': resolve('src'), |
||||
|
assets: resolve('src/assets'), |
||||
|
views: resolve('src/views'), |
||||
|
components: resolve('src/components'), |
||||
|
common: resolve('src/common'), |
||||
|
config: resolve('src/config'), |
||||
|
router: resolve('src/router'), |
||||
|
store: resolve('src/store'), |
||||
|
util: resolve('src/util'), |
||||
|
request: resolve('src/request'), |
||||
|
}, |
||||
|
}, |
||||
|
plugins: isPro |
||||
|
? [ |
||||
|
new CompressionWebpackPlugin({ |
||||
|
test: productionGzipExtensions, |
||||
|
threshold: 10240, |
||||
|
deleteOriginalAssets: false, |
||||
|
}), |
||||
|
] |
||||
|
: [], |
||||
|
externals: isPro || devNeedCdn ? cdn.externals : {}, |
||||
|
}, |
||||
|
|
||||
|
chainWebpack(config) { |
||||
|
if (isPro) { |
||||
|
config.optimization |
||||
|
.runtimeChunk('single') |
||||
|
.minimize(true) |
||||
|
.splitChunks({ |
||||
|
chunks: 'all', |
||||
|
maxInitialRequests: Infinity, |
||||
|
minSize: 20000, // 依赖包超过20000bit将被单独打包
|
||||
|
cacheGroups: { |
||||
|
vendor: { |
||||
|
test: /[\\/]node_modules[\\/]/, |
||||
|
name(module) { |
||||
|
// get the name. E.g. node_modules/packageName/not/this/part.js
|
||||
|
// or node_modules/packageName
|
||||
|
const packageName = module.context.match(/[\\/]node_modules[\\/](.*?)([\\/]|$)/)[1]; |
||||
|
// npm package names are URL-safe, but some servers don't like @ symbols
|
||||
|
return `npm.${packageName.replace('@', '')}`; |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
// set svg-sprite-loader
|
||||
|
// config.module
|
||||
|
// .rule('svg')
|
||||
|
// .exclude.add(resolve('src/icons'))
|
||||
|
// .end();
|
||||
|
// config.module
|
||||
|
// .rule('icons')
|
||||
|
// .test(/\.svg$/)
|
||||
|
// .include.add(resolve('src/icons'))
|
||||
|
// .end()
|
||||
|
// .use('svg-sprite-loader')
|
||||
|
// .loader('svg-sprite-loader')
|
||||
|
// .options({ symbolId: 'icon-[name]' })
|
||||
|
// .end();
|
||||
|
}, |
||||
|
}; |