vue2-client 1.4.4 → 1.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env +15 -15
- package/.eslintrc.js +82 -82
- package/CHANGELOG.md +347 -343
- package/package.json +78 -78
- package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +113 -113
- package/src/base-client/components/common/CitySelect/CitySelect.vue +244 -244
- package/src/base-client/components/common/CitySelect/index.js +3 -3
- package/src/base-client/components/common/CitySelect/index.md +109 -109
- package/src/base-client/components/common/CreateQuery/CreateQuery.vue +589 -589
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +310 -310
- package/src/base-client/components/common/PersonSetting/PersonSetting.vue +210 -210
- package/src/base-client/components/common/PersonSetting/index.js +3 -3
- package/src/base-client/components/common/Upload/index.js +3 -3
- package/src/base-client/components/common/XFormTable/XFormTable.vue +546 -543
- package/src/base-client/components/common/XTable/XTable.vue +262 -259
- package/src/config/CreateQueryConfig.js +307 -307
- package/src/pages/system/ticket/index.vue +1 -1
- package/src/router/async/router.map.js +56 -58
- package/src/services/api/restTools.js +24 -24
- package/vue.config.js +99 -99
|
@@ -1,58 +1,56 @@
|
|
|
1
|
-
// 视图组件
|
|
2
|
-
const view = {
|
|
3
|
-
tabs: () => import('@vue2-client/layouts/tabs'),
|
|
4
|
-
blank: () => import('@vue2-client/layouts/BlankView'),
|
|
5
|
-
page: () => import('@vue2-client/layouts/PageView')
|
|
6
|
-
}
|
|
7
|
-
// 动态路由对象定义
|
|
8
|
-
const routerResource = {}
|
|
9
|
-
// --------------------------------------基本视图组件--------------------------------------
|
|
10
|
-
// 空白视图
|
|
11
|
-
routerResource.blank = view.blank
|
|
12
|
-
// 单页面视图
|
|
13
|
-
routerResource.singlePage = view.blank
|
|
14
|
-
// --------------------------------------系统配置--------------------------------------
|
|
15
|
-
routerResource.system = view.blank
|
|
16
|
-
// 字典管理
|
|
17
|
-
routerResource.dictionaryManage = () => import(/* webpackChunkName: "dictionary" */ '@vue2-client/pages/system/dictionary')
|
|
18
|
-
// 查询配置管理
|
|
19
|
-
routerResource.queryParamsManage = () => import(/* webpackChunkName: "queryParams" */ '@vue2-client/pages/system/queryParams')
|
|
20
|
-
// 文件管理
|
|
21
|
-
routerResource.fileManager = () => import('@vue2-client/pages/system/file')
|
|
22
|
-
//
|
|
23
|
-
routerResource.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
Object.assign(routerMap, routerResource)
|
|
58
|
-
export default routerMap
|
|
1
|
+
// 视图组件
|
|
2
|
+
const view = {
|
|
3
|
+
tabs: () => import('@vue2-client/layouts/tabs'),
|
|
4
|
+
blank: () => import('@vue2-client/layouts/BlankView'),
|
|
5
|
+
page: () => import('@vue2-client/layouts/PageView')
|
|
6
|
+
}
|
|
7
|
+
// 动态路由对象定义
|
|
8
|
+
const routerResource = {}
|
|
9
|
+
// --------------------------------------基本视图组件--------------------------------------
|
|
10
|
+
// 空白视图
|
|
11
|
+
routerResource.blank = view.blank
|
|
12
|
+
// 单页面视图
|
|
13
|
+
routerResource.singlePage = view.blank
|
|
14
|
+
// --------------------------------------系统配置--------------------------------------
|
|
15
|
+
routerResource.system = view.blank
|
|
16
|
+
// 字典管理
|
|
17
|
+
routerResource.dictionaryManage = () => import(/* webpackChunkName: "dictionary" */ '@vue2-client/pages/system/dictionary')
|
|
18
|
+
// 查询配置管理
|
|
19
|
+
routerResource.queryParamsManage = () => import(/* webpackChunkName: "queryParams" */ '@vue2-client/pages/system/queryParams')
|
|
20
|
+
// 文件管理
|
|
21
|
+
routerResource.fileManager = () => import('@vue2-client/pages/system/file')
|
|
22
|
+
// 系统问题反馈工单
|
|
23
|
+
routerResource.submitTicket = () => import(/* webpackChunkName: "submitTicket" */ '@vue2-client/pages/system/ticket')
|
|
24
|
+
|
|
25
|
+
// 基础路由组件注册
|
|
26
|
+
const routerMap = {
|
|
27
|
+
login: {
|
|
28
|
+
authority: '*',
|
|
29
|
+
path: '/login',
|
|
30
|
+
component: () => import('@vue2-client/pages/login')
|
|
31
|
+
},
|
|
32
|
+
root: {
|
|
33
|
+
path: '/',
|
|
34
|
+
name: '首页',
|
|
35
|
+
redirect: '/login',
|
|
36
|
+
component: view.tabs
|
|
37
|
+
},
|
|
38
|
+
exp403: {
|
|
39
|
+
authority: '*',
|
|
40
|
+
name: 'exp403',
|
|
41
|
+
path: '403',
|
|
42
|
+
component: () => import('@vue2-client/pages/exception/403')
|
|
43
|
+
},
|
|
44
|
+
exp404: {
|
|
45
|
+
name: 'exp404',
|
|
46
|
+
path: '404',
|
|
47
|
+
component: () => import('@vue2-client/pages/exception/404')
|
|
48
|
+
},
|
|
49
|
+
exp500: {
|
|
50
|
+
name: 'exp500',
|
|
51
|
+
path: '500',
|
|
52
|
+
component: () => import('@vue2-client/pages/exception/500')
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
Object.assign(routerMap, routerResource)
|
|
56
|
+
export default routerMap
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { METHOD, request } from '@vue2-client/utils/request'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* GET请求
|
|
5
|
-
* @param url 请求地址
|
|
6
|
-
* @param parameter 路径参数
|
|
7
|
-
* @returns {Promise<AxiosResponse<T>>}
|
|
8
|
-
*/
|
|
9
|
-
function get (url, parameter) {
|
|
10
|
-
return request(url, METHOD.GET, parameter)
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* POST请求
|
|
15
|
-
* @param url 请求地址
|
|
16
|
-
* @param parameter 请求参数
|
|
17
|
-
* @param config
|
|
18
|
-
* @returns {Promise<AxiosResponse<T>>}
|
|
19
|
-
*/
|
|
20
|
-
function post (url, parameter, config = {}) {
|
|
21
|
-
return request(url, METHOD.POST, parameter, config)
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export { get, post }
|
|
1
|
+
import { METHOD, request } from '@vue2-client/utils/request'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* GET请求
|
|
5
|
+
* @param url 请求地址
|
|
6
|
+
* @param parameter 路径参数
|
|
7
|
+
* @returns {Promise<AxiosResponse<T>>}
|
|
8
|
+
*/
|
|
9
|
+
function get (url, parameter) {
|
|
10
|
+
return request(url, METHOD.GET, parameter)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* POST请求
|
|
15
|
+
* @param url 请求地址
|
|
16
|
+
* @param parameter 请求参数
|
|
17
|
+
* @param config
|
|
18
|
+
* @returns {Promise<AxiosResponse<T>>}
|
|
19
|
+
*/
|
|
20
|
+
function post (url, parameter, config = {}) {
|
|
21
|
+
return request(url, METHOD.POST, parameter, config)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { get, post }
|
package/vue.config.js
CHANGED
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
const path = require('path')
|
|
2
|
-
const webpack = require('webpack')
|
|
3
|
-
const ThemeColorReplacer = require('webpack-theme-color-replacer')
|
|
4
|
-
const { getThemeColors, modifyVars } = require('./src/utils/themeUtil')
|
|
5
|
-
const { resolveCss } = require('./src/utils/theme-color-replacer-extend')
|
|
6
|
-
const CompressionWebpackPlugin = require('compression-webpack-plugin')
|
|
7
|
-
|
|
8
|
-
const productionGzipExtensions = ['js', 'css']
|
|
9
|
-
const isProd = process.env.NODE_ENV === 'production'
|
|
10
|
-
|
|
11
|
-
const server = 'http://121.36.106.17:8400'
|
|
12
|
-
const local = 'http://localhost:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
module.exports = {
|
|
16
|
-
devServer: {
|
|
17
|
-
// development server port 8000
|
|
18
|
-
port: 8001,
|
|
19
|
-
// If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
|
|
20
|
-
proxy: {
|
|
21
|
-
'/rs': {
|
|
22
|
-
target: server,
|
|
23
|
-
ws: false,
|
|
24
|
-
changeOrigin: true
|
|
25
|
-
},
|
|
26
|
-
'/api': {
|
|
27
|
-
pathRewrite: { '^/api/af-system/': '/rs/' },
|
|
28
|
-
target: local,
|
|
29
|
-
changeOrigin: true
|
|
30
|
-
},
|
|
31
|
-
'/resource': {
|
|
32
|
-
pathRewrite: { '^/resource': '/' },
|
|
33
|
-
target: 'http://127.0.0.1:4789',
|
|
34
|
-
changeOrigin: true
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
pluginOptions: {
|
|
39
|
-
'style-resources-loader': {
|
|
40
|
-
preProcessor: 'less',
|
|
41
|
-
patterns: [path.resolve(__dirname, './src/theme/theme.less')]
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
configureWebpack: config => {
|
|
45
|
-
config.entry.app = ['babel-polyfill', 'whatwg-fetch', './src/main.js']
|
|
46
|
-
config.performance = {
|
|
47
|
-
hints: false
|
|
48
|
-
}
|
|
49
|
-
config.plugins.push(
|
|
50
|
-
new ThemeColorReplacer({
|
|
51
|
-
fileName: 'css/theme-colors-[contenthash:8].css',
|
|
52
|
-
matchColors: getThemeColors(),
|
|
53
|
-
injectCss: true,
|
|
54
|
-
resolveCss
|
|
55
|
-
})
|
|
56
|
-
)
|
|
57
|
-
// Ignore all locale files of moment.js
|
|
58
|
-
config.plugins.push(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/))
|
|
59
|
-
// 生产环境下将资源压缩成gzip格式
|
|
60
|
-
if (isProd) {
|
|
61
|
-
// add `CompressionWebpack` plugin to webpack plugins
|
|
62
|
-
config.plugins.push(new CompressionWebpackPlugin({
|
|
63
|
-
algorithm: 'gzip',
|
|
64
|
-
test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'),
|
|
65
|
-
threshold: 10240,
|
|
66
|
-
minRatio: 0.8
|
|
67
|
-
}))
|
|
68
|
-
}
|
|
69
|
-
// if prod, add externals
|
|
70
|
-
// if (isProd) {
|
|
71
|
-
// config.externals = assetsCDN.externals
|
|
72
|
-
// }
|
|
73
|
-
},
|
|
74
|
-
chainWebpack: config => {
|
|
75
|
-
// 生产环境下关闭css压缩的 colormin 项,因为此项优化与主题色替换功能冲突
|
|
76
|
-
if (isProd) {
|
|
77
|
-
config.plugin('optimize-css')
|
|
78
|
-
.tap(args => {
|
|
79
|
-
args[0].cssnanoOptions.preset[1].colormin = false
|
|
80
|
-
return args
|
|
81
|
-
})
|
|
82
|
-
}
|
|
83
|
-
config.resolve.alias.set('@vue2-client', path.resolve(__dirname, 'src'))
|
|
84
|
-
},
|
|
85
|
-
css: {
|
|
86
|
-
loaderOptions: {
|
|
87
|
-
less: {
|
|
88
|
-
lessOptions: {
|
|
89
|
-
modifyVars: modifyVars(),
|
|
90
|
-
javascriptEnabled: true
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
publicPath: process.env.VUE_APP_PUBLIC_PATH,
|
|
96
|
-
outputDir: 'dist',
|
|
97
|
-
assetsDir: 'static',
|
|
98
|
-
productionSourceMap: false
|
|
99
|
-
}
|
|
1
|
+
const path = require('path')
|
|
2
|
+
const webpack = require('webpack')
|
|
3
|
+
const ThemeColorReplacer = require('webpack-theme-color-replacer')
|
|
4
|
+
const { getThemeColors, modifyVars } = require('./src/utils/themeUtil')
|
|
5
|
+
const { resolveCss } = require('./src/utils/theme-color-replacer-extend')
|
|
6
|
+
const CompressionWebpackPlugin = require('compression-webpack-plugin')
|
|
7
|
+
|
|
8
|
+
const productionGzipExtensions = ['js', 'css']
|
|
9
|
+
const isProd = process.env.NODE_ENV === 'production'
|
|
10
|
+
|
|
11
|
+
const server = 'http://121.36.106.17:8400'
|
|
12
|
+
// const local = 'http://localhost:8445/webmeter'
|
|
13
|
+
const local = 'http://123.60.214.109:8406'
|
|
14
|
+
|
|
15
|
+
module.exports = {
|
|
16
|
+
devServer: {
|
|
17
|
+
// development server port 8000
|
|
18
|
+
port: 8001,
|
|
19
|
+
// If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
|
|
20
|
+
proxy: {
|
|
21
|
+
'/rs': {
|
|
22
|
+
target: server,
|
|
23
|
+
ws: false,
|
|
24
|
+
changeOrigin: true
|
|
25
|
+
},
|
|
26
|
+
'/api': {
|
|
27
|
+
pathRewrite: { '^/api/af-system/': '/rs/' },
|
|
28
|
+
target: local,
|
|
29
|
+
changeOrigin: true
|
|
30
|
+
},
|
|
31
|
+
'/resource': {
|
|
32
|
+
pathRewrite: { '^/resource': '/' },
|
|
33
|
+
target: 'http://127.0.0.1:4789',
|
|
34
|
+
changeOrigin: true
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
pluginOptions: {
|
|
39
|
+
'style-resources-loader': {
|
|
40
|
+
preProcessor: 'less',
|
|
41
|
+
patterns: [path.resolve(__dirname, './src/theme/theme.less')]
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
configureWebpack: config => {
|
|
45
|
+
config.entry.app = ['babel-polyfill', 'whatwg-fetch', './src/main.js']
|
|
46
|
+
config.performance = {
|
|
47
|
+
hints: false
|
|
48
|
+
}
|
|
49
|
+
config.plugins.push(
|
|
50
|
+
new ThemeColorReplacer({
|
|
51
|
+
fileName: 'css/theme-colors-[contenthash:8].css',
|
|
52
|
+
matchColors: getThemeColors(),
|
|
53
|
+
injectCss: true,
|
|
54
|
+
resolveCss
|
|
55
|
+
})
|
|
56
|
+
)
|
|
57
|
+
// Ignore all locale files of moment.js
|
|
58
|
+
config.plugins.push(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/))
|
|
59
|
+
// 生产环境下将资源压缩成gzip格式
|
|
60
|
+
if (isProd) {
|
|
61
|
+
// add `CompressionWebpack` plugin to webpack plugins
|
|
62
|
+
config.plugins.push(new CompressionWebpackPlugin({
|
|
63
|
+
algorithm: 'gzip',
|
|
64
|
+
test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'),
|
|
65
|
+
threshold: 10240,
|
|
66
|
+
minRatio: 0.8
|
|
67
|
+
}))
|
|
68
|
+
}
|
|
69
|
+
// if prod, add externals
|
|
70
|
+
// if (isProd) {
|
|
71
|
+
// config.externals = assetsCDN.externals
|
|
72
|
+
// }
|
|
73
|
+
},
|
|
74
|
+
chainWebpack: config => {
|
|
75
|
+
// 生产环境下关闭css压缩的 colormin 项,因为此项优化与主题色替换功能冲突
|
|
76
|
+
if (isProd) {
|
|
77
|
+
config.plugin('optimize-css')
|
|
78
|
+
.tap(args => {
|
|
79
|
+
args[0].cssnanoOptions.preset[1].colormin = false
|
|
80
|
+
return args
|
|
81
|
+
})
|
|
82
|
+
}
|
|
83
|
+
config.resolve.alias.set('@vue2-client', path.resolve(__dirname, 'src'))
|
|
84
|
+
},
|
|
85
|
+
css: {
|
|
86
|
+
loaderOptions: {
|
|
87
|
+
less: {
|
|
88
|
+
lessOptions: {
|
|
89
|
+
modifyVars: modifyVars(),
|
|
90
|
+
javascriptEnabled: true
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
publicPath: process.env.VUE_APP_PUBLIC_PATH,
|
|
96
|
+
outputDir: 'dist',
|
|
97
|
+
assetsDir: 'static',
|
|
98
|
+
productionSourceMap: false
|
|
99
|
+
}
|