vue2-client 1.3.2 → 1.3.5

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.
Files changed (106) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/index.js +30 -28
  3. package/package.json +1 -1
  4. package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +225 -225
  5. package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +777 -777
  6. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +553 -553
  7. package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +165 -163
  8. package/src/base-client/components/common/ScrollList/ScrollList.vue +113 -0
  9. package/src/base-client/components/common/ScrollList/index.js +3 -0
  10. package/src/base-client/components/common/Upload/Upload.vue +161 -158
  11. package/src/base-client/components/common/XAddForm/XAddForm.vue +349 -349
  12. package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +321 -322
  13. package/src/base-client/components/common/XForm/XForm.vue +273 -268
  14. package/src/base-client/components/common/XForm/XFormItem.vue +387 -371
  15. package/src/base-client/components/common/XFormTable/XFormTable.vue +6 -5
  16. package/src/base-client/components/common/XTable/XTable.vue +278 -274
  17. package/src/base-client/components/{iot → system}/LogDetailsView/LogDetailsView.vue +0 -0
  18. package/src/base-client/components/{iot → system}/LogDetailsView/index.js +0 -0
  19. package/src/base-client/components/{iot → system}/LogDetailsView/index.md +0 -0
  20. package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +281 -280
  21. package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +806 -804
  22. package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +24 -24
  23. package/src/base-client/plugins/PagedList.js +177 -176
  24. package/src/components/STable/index.js +318 -316
  25. package/src/components/index.js +36 -36
  26. package/src/components/table/StandardTable.vue +141 -142
  27. package/src/components/tool/TagSelect.vue +83 -83
  28. package/src/layouts/header/AdminHeader.vue +104 -109
  29. package/src/layouts/header/HeaderNotice.vue +167 -199
  30. package/src/layouts/header/InstitutionDetail.vue +181 -182
  31. package/src/pages/CreateQueryPage.vue +65 -59
  32. package/src/pages/system/dictionary/index.vue +43 -41
  33. package/src/pages/system/file/Info.vue +56 -0
  34. package/src/pages/system/file/index.vue +317 -0
  35. package/src/pages/system/queryParams/index.vue +43 -41
  36. package/src/pages/system/ticket/index.vue +458 -452
  37. package/src/pages/system/ticket/submitTicketSuccess.vue +206 -203
  38. package/src/router/async/router.map.js +56 -60
  39. package/src/services/api/DictionaryDetailsViewApi.js +6 -6
  40. package/src/services/api/LogDetailsViewApi.js +10 -10
  41. package/src/services/api/QueryParamsDetailsViewApi.js +6 -6
  42. package/src/services/api/TicketDetailsViewApi.js +42 -40
  43. package/src/services/api/commonTempTable.js +10 -0
  44. package/src/services/api/index.js +2 -24
  45. package/src/services/api/manage.js +8 -16
  46. package/src/utils/excel/Blob.js +181 -181
  47. package/src/utils/excel/Export2Excel.js +141 -142
  48. package/src/utils/i18n.js +80 -80
  49. package/src/utils/request.js +4 -4
  50. package/src/utils/theme-color-replacer-extend.js +91 -92
  51. package/vue.config.js +109 -163
  52. package/src/base-client/all.js +0 -62
  53. package/src/base-client/components/iot/CustomerDetailsView/CustomerDetailsView.vue +0 -225
  54. package/src/base-client/components/iot/CustomerDetailsView/index.js +0 -3
  55. package/src/base-client/components/iot/CustomerDetailsView/index.md +0 -40
  56. package/src/base-client/components/iot/DataAnalysisUser/DataAnalysisUser.vue +0 -127
  57. package/src/base-client/components/iot/DataAnalysisUser/index.js +0 -3
  58. package/src/base-client/components/iot/DeviceBrandDetailsView/DeviceBrandDetailsView.vue +0 -452
  59. package/src/base-client/components/iot/DeviceBrandDetailsView/index.js +0 -3
  60. package/src/base-client/components/iot/DeviceDetailsView/DeviceDetailsView.vue +0 -232
  61. package/src/base-client/components/iot/DeviceDetailsView/index.js +0 -3
  62. package/src/base-client/components/iot/DeviceDetailsView/index.md +0 -41
  63. package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsCount.vue +0 -678
  64. package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsException.vue +0 -57
  65. package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsInstruct.vue +0 -122
  66. package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsInstructOperate.vue +0 -121
  67. package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsMain.vue +0 -269
  68. package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsRead.vue +0 -131
  69. package/src/base-client/components/iot/DeviceDetailsView/part/index.js +0 -8
  70. package/src/base-client/components/iot/DeviceTypeDetailsView/DeviceTypeDetailsView.vue +0 -300
  71. package/src/base-client/components/iot/DeviceTypeDetailsView/index.js +0 -3
  72. package/src/base-client/components/iot/InstructDetailsView/InstructDetailsView.vue +0 -464
  73. package/src/base-client/components/iot/InstructDetailsView/index.js +0 -3
  74. package/src/base-client/components/iot/InstructDetailsView/index.md +0 -43
  75. package/src/base-client/components/iot/MeterDetailsView/MeterDetailsView.vue +0 -352
  76. package/src/base-client/components/iot/MeterDetailsView/index.js +0 -3
  77. package/src/base-client/components/iot/MeterDetailsView/index.md +0 -41
  78. package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsCount.vue +0 -330
  79. package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsException.vue +0 -179
  80. package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsHandPlan.vue +0 -285
  81. package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsInstruct.vue +0 -230
  82. package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsMain.vue +0 -251
  83. package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsSellGas.vue +0 -184
  84. package/src/base-client/components/iot/MeterDetailsView/part/index.js +0 -9
  85. package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +0 -960
  86. package/src/base-client/components/iot/WebmeterAnalysisView/index.js +0 -3
  87. package/src/base-client/components/iot/WebmeterAnalysisView/index.md +0 -42
  88. package/src/base-client/components/ticket/EmployeeDetailsView/EmployeeDetailsView.vue +0 -370
  89. package/src/base-client/components/ticket/EmployeeDetailsView/index.js +0 -3
  90. package/src/base-client/components/ticket/EmployeeDetailsView/index.md +0 -28
  91. package/src/components/Charts/DataUserOrderSituation.vue +0 -77
  92. package/src/components/Charts/DataUserReporting.vue +0 -74
  93. package/src/components/Charts/DataUserSituation.vue +0 -107
  94. package/src/services/api/CustomerDetailsViewApi.js +0 -6
  95. package/src/services/api/DeviceBrandDetailsViewApi.js +0 -14
  96. package/src/services/api/DeviceDetailsViewApi.js +0 -10
  97. package/src/services/api/DeviceTypeDetailsViewApi.js +0 -6
  98. package/src/services/api/EmployeeDetailsViewApi.js +0 -12
  99. package/src/services/api/FormGroupEditApi.js +0 -6
  100. package/src/services/api/InstructDetailsViewApi.js +0 -12
  101. package/src/services/api/MeterDetailsViewApi.js +0 -24
  102. package/src/services/api/WebmeterAnalysisViewApi.js +0 -24
  103. package/src/services/api/applyInstallApi.js +0 -14
  104. package/src/services/api/iot/DeviceDetailsView/DeviceDetailsCountApi.js +0 -18
  105. package/src/services/api/iot.js +0 -7
  106. package/src/services/api/service.js +0 -12
package/vue.config.js CHANGED
@@ -1,163 +1,109 @@
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 assetsCDN = {
12
- // // webpack build externals
13
- // externals: {
14
- // vue: 'Vue',
15
- // 'vue-router': 'VueRouter',
16
- // vuex: 'Vuex',
17
- // axios: 'axios',
18
- // nprogress: 'NProgress',
19
- // clipboard: 'ClipboardJS',
20
- // '@antv/data-set': 'DataSet',
21
- // 'js-cookie': 'Cookies'
22
- // },
23
- // css: [
24
- // ],
25
- // js: [
26
- // '//cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.min.js',
27
- // '//cdn.jsdelivr.net/npm/vue-router@3.3.4/dist/vue-router.min.js',
28
- // '//cdn.jsdelivr.net/npm/vuex@3.4.0/dist/vuex.min.js',
29
- // '//cdn.jsdelivr.net/npm/axios@0.19.2/dist/axios.min.js',
30
- // '//cdn.jsdelivr.net/npm/nprogress@0.2.0/nprogress.min.js',
31
- // '//cdn.jsdelivr.net/npm/clipboard@2.0.6/dist/clipboard.min.js',
32
- // '//cdn.jsdelivr.net/npm/@antv/data-set@0.11.4/build/data-set.min.js',
33
- // '//cdn.jsdelivr.net/npm/js-cookie@2.2.1/src/js.cookie.min.js'
34
- // ]
35
- // }
36
-
37
- const server = 'http://121.36.106.17:8400'
38
- const local = 'http://localhost:8445/webmeter'
39
- // const local = 'http://123.60.214.109:8405/webmeter'
40
-
41
- module.exports = {
42
- devServer: {
43
- // development server port 8000
44
- port: 8001,
45
- // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
46
- proxy: {
47
- '/rs': {
48
- target: server,
49
- ws: false,
50
- changeOrigin: true
51
- },
52
- '/image': {
53
- target: server,
54
- ws: false,
55
- changeOrigin: true
56
- },
57
- '/webapps': {
58
- target: server,
59
- ws: false,
60
- changeOrigin: true
61
- },
62
- '/webmeterapi/foreignaidUseGasSumCountData': {
63
- // pathRewrite: { '^/webmeterapi': '/rs/logic' },
64
- target: 'http://61.134.55.234:8405/',
65
- changeOrigin: true
66
- },
67
- '/webmeterapi/getEmpTree': {
68
- // pathRewrite: { '^/webmeterapi': '/rs/logic' },
69
- target: 'http://123.60.214.109:8406/',
70
- changeOrigin: true
71
- },
72
- '/webmeterapi': {
73
- pathRewrite: { '^/webmeterapi': '/rs/logic' },
74
- target: local,
75
- changeOrigin: true
76
- },
77
- '/webmeteruploadapi': {
78
- pathRewrite: { '^/webmeteruploadapi': '/rs/file' },
79
- target: local,
80
- changeOrigin: true
81
- },
82
- '/webmeterresourceapi': {
83
- pathRewrite: { '^/webmeterresourceapi': '/rs/resource' },
84
- target: local,
85
- changeOrigin: true
86
- },
87
- '/resource': {
88
- pathRewrite: { '^/resource': '/' },
89
- target: 'http://127.0.0.1:4789',
90
- changeOrigin: true
91
- }
92
- }
93
- },
94
- pluginOptions: {
95
- 'style-resources-loader': {
96
- preProcessor: 'less',
97
- patterns: [path.resolve(__dirname, './src/theme/theme.less')]
98
- }
99
- },
100
- configureWebpack: config => {
101
- config.entry.app = ['babel-polyfill', 'whatwg-fetch', './src/main.js']
102
- config.performance = {
103
- hints: false
104
- }
105
- config.plugins.push(
106
- new ThemeColorReplacer({
107
- fileName: 'css/theme-colors-[contenthash:8].css',
108
- matchColors: getThemeColors(),
109
- injectCss: true,
110
- resolveCss
111
- })
112
- )
113
- // Ignore all locale files of moment.js
114
- config.plugins.push(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/))
115
- // 生产环境下将资源压缩成gzip格式
116
- if (isProd) {
117
- // add `CompressionWebpack` plugin to webpack plugins
118
- config.plugins.push(new CompressionWebpackPlugin({
119
- algorithm: 'gzip',
120
- test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'),
121
- threshold: 10240,
122
- minRatio: 0.8
123
- }))
124
- }
125
- // if prod, add externals
126
- // if (isProd) {
127
- // config.externals = assetsCDN.externals
128
- // }
129
- },
130
- chainWebpack: config => {
131
- // 生产环境下关闭css压缩的 colormin 项,因为此项优化与主题色替换功能冲突
132
- if (isProd) {
133
- config.plugin('optimize-css')
134
- .tap(args => {
135
- args[0].cssnanoOptions.preset[1].colormin = false
136
- return args
137
- })
138
- }
139
- // 生产环境下使用CDN
140
- // if (isProd) {
141
- // config.plugin('html')
142
- // .tap(args => {
143
- // args[0].cdn = assetsCDN
144
- // return args
145
- // })
146
- // }
147
- config.resolve.alias.set('@vue2-client', path.resolve(__dirname, 'src'))
148
- },
149
- css: {
150
- loaderOptions: {
151
- less: {
152
- lessOptions: {
153
- modifyVars: modifyVars(),
154
- javascriptEnabled: true
155
- }
156
- }
157
- }
158
- },
159
- publicPath: process.env.VUE_APP_PUBLIC_PATH,
160
- outputDir: 'dist',
161
- assetsDir: 'static',
162
- productionSourceMap: false
163
- }
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
+ '/af-system/entity': {
27
+ pathRewrite: { '^/af-system/entity': '/rs/entity' },
28
+ target: local,
29
+ changeOrigin: true
30
+ },
31
+ '/af-system/upload': {
32
+ pathRewrite: { '^/af-system/upload': '/rs/file/upload' },
33
+ target: local,
34
+ changeOrigin: true
35
+ },
36
+ '/af-system/resource': {
37
+ pathRewrite: { '^/af-system/resource': '/rs/resource' },
38
+ target: local,
39
+ changeOrigin: true
40
+ },
41
+ '/af-system': {
42
+ pathRewrite: { '^/af-system': '/rs/logic' },
43
+ target: local,
44
+ changeOrigin: true
45
+ }
46
+ }
47
+ },
48
+ pluginOptions: {
49
+ 'style-resources-loader': {
50
+ preProcessor: 'less',
51
+ patterns: [path.resolve(__dirname, './src/theme/theme.less')]
52
+ }
53
+ },
54
+ configureWebpack: config => {
55
+ config.entry.app = ['babel-polyfill', 'whatwg-fetch', './src/main.js']
56
+ config.performance = {
57
+ hints: false
58
+ }
59
+ config.plugins.push(
60
+ new ThemeColorReplacer({
61
+ fileName: 'css/theme-colors-[contenthash:8].css',
62
+ matchColors: getThemeColors(),
63
+ injectCss: true,
64
+ resolveCss
65
+ })
66
+ )
67
+ // Ignore all locale files of moment.js
68
+ config.plugins.push(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/))
69
+ // 生产环境下将资源压缩成gzip格式
70
+ if (isProd) {
71
+ // add `CompressionWebpack` plugin to webpack plugins
72
+ config.plugins.push(new CompressionWebpackPlugin({
73
+ algorithm: 'gzip',
74
+ test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'),
75
+ threshold: 10240,
76
+ minRatio: 0.8
77
+ }))
78
+ }
79
+ // if prod, add externals
80
+ // if (isProd) {
81
+ // config.externals = assetsCDN.externals
82
+ // }
83
+ },
84
+ chainWebpack: config => {
85
+ // 生产环境下关闭css压缩的 colormin 项,因为此项优化与主题色替换功能冲突
86
+ if (isProd) {
87
+ config.plugin('optimize-css')
88
+ .tap(args => {
89
+ args[0].cssnanoOptions.preset[1].colormin = false
90
+ return args
91
+ })
92
+ }
93
+ config.resolve.alias.set('@vue2-client', path.resolve(__dirname, 'src'))
94
+ },
95
+ css: {
96
+ loaderOptions: {
97
+ less: {
98
+ lessOptions: {
99
+ modifyVars: modifyVars(),
100
+ javascriptEnabled: true
101
+ }
102
+ }
103
+ }
104
+ },
105
+ publicPath: process.env.VUE_APP_PUBLIC_PATH,
106
+ outputDir: 'dist',
107
+ assetsDir: 'static',
108
+ productionSourceMap: false
109
+ }
@@ -1,62 +0,0 @@
1
- import Vue from 'vue'
2
-
3
- import CustomColumnsDrawer from '@vue2-client/base-client/components/common/CustomColumnsDrawer'
4
- import InstructDetailsView from '@vue2-client/base-client/components/iot/InstructDetailsView'
5
- import MeterDetailsView from '@vue2-client/base-client/components/iot/MeterDetailsView'
6
- import CustomerDetailsView from '@vue2-client/base-client/components/iot/CustomerDetailsView'
7
- import LogDetailsView from '@vue2-client/base-client/components/iot/LogDetailsView'
8
- import WebmeterAnalysisView from '@vue2-client/base-client/components/iot/WebmeterAnalysisView'
9
- import XCard from '@vue2-client/base-client/components/common/XCard/XCard'
10
- import XFormCol from '@vue2-client/base-client/components/common/XFormCol'
11
- import XBadge from '@vue2-client/base-client/components/common/XBadge'
12
- import DataAnalysisUser from '@vue2-client/base-client/components/iot/DataAnalysisUser'
13
- import AmapPointRendering from '@vue2-client/base-client/components/common/AmapMarker'
14
- import DeviceTypeDetailsView from '@vue2-client/base-client/components/iot/DeviceTypeDetailsView'
15
- import DeviceBrandDetailsView from '@vue2-client/base-client/components/iot/DeviceBrandDetailsView'
16
- import DictionaryDetailsView from '@vue2-client/base-client/components/system/DictionaryDetailsView'
17
- import QueryParamsDetailsView from '@vue2-client/base-client/components/system/QueryParamsDetailsView'
18
- import DeviceDetailsView from '@vue2-client/base-client/components/iot/DeviceDetailsView'
19
- import TicketDetailsView from '@vue2-client/base-client/components/ticket/TicketDetailsView'
20
- import EmployeeDetailsView from '@vue2-client/base-client/components/ticket/EmployeeDetailsView'
21
- import submitTicketSuccess from '@vue2-client/base-client/components/ticket/TicketSubmitSuccessView'
22
- import CreateQuery from '@vue2-client/base-client/components/common/CreateQuery'
23
- import CreateSimpleFormQuery from '@vue2-client/base-client/components/common/CreateSimpleFormQuery'
24
- import FormGroupQuery from '@vue2-client/base-client/components/common/FormGroupQuery'
25
- import FormGroupEdit from '@vue2-client/base-client/components/common/FormGroupEdit'
26
- import JSONToTree from '@vue2-client/base-client/components/common/JSONToTree'
27
- import Upload from '@vue2-client/base-client/components/common/Upload'
28
- import AddressSearchCombobox from '@vue2-client/base-client/components/common/AddressSearchCombobox'
29
- import CitySelect from '@vue2-client/base-client/components/common/CitySelect'
30
- import PersonSetting from '@vue2-client/base-client/components/common/PersonSetting'
31
- // 插件
32
- import Plugins from '@vue2-client/base-client/plugins'
33
- Vue.use(Plugins)
34
-
35
- Vue.component('custom-columns-drawer', CustomColumnsDrawer)
36
- Vue.component('InstructDetailsView', InstructDetailsView)
37
- Vue.component('MeterDetailsView', MeterDetailsView)
38
- Vue.component('CustomerDetailsView', CustomerDetailsView)
39
- Vue.component('LogDetailsView', LogDetailsView)
40
- Vue.component('WebmeterAnalysisView', WebmeterAnalysisView)
41
- Vue.component('XCard', XCard)
42
- Vue.component('XBadge', XBadge)
43
- Vue.component('XFormCol', XFormCol)
44
- Vue.component('DataAnalysisUser', DataAnalysisUser)
45
- Vue.component('DeviceTypeDetailsView', DeviceTypeDetailsView)
46
- Vue.component('DeviceBrandDetailsView', DeviceBrandDetailsView)
47
- Vue.component('DeviceDetailsView', DeviceDetailsView)
48
- Vue.component('DictionaryDetailsView', DictionaryDetailsView)
49
- Vue.component('QueryParamsDetailsView', QueryParamsDetailsView)
50
- Vue.component('TicketDetailsView', TicketDetailsView)
51
- Vue.component('EmployeeDetailsView', EmployeeDetailsView)
52
- Vue.component('submitTicketSuccess', submitTicketSuccess)
53
- Vue.component('CreateQuery', CreateQuery)
54
- Vue.component('CreateSimpleFormQuery', CreateSimpleFormQuery)
55
- Vue.component('FormGroupQuery', FormGroupQuery)
56
- Vue.component('FormGroupEdit', FormGroupEdit)
57
- Vue.component('JSONToTree', JSONToTree)
58
- Vue.component('Upload', Upload)
59
- Vue.component('AmapPointRendering', AmapPointRendering)
60
- Vue.component('AddressSearchCombobox', AddressSearchCombobox)
61
- Vue.component('CitySelect', CitySelect)
62
- Vue.component('PersonSetting', PersonSetting)
@@ -1,225 +0,0 @@
1
- <template>
2
- <a-drawer
3
- title="客户详情"
4
- placement="right"
5
- :width="isMobile ? screenWidth : screenWidth * 0.85"
6
- :visible="visible"
7
- @close="onClose"
8
- >
9
- <a-spin :spinning="loading">
10
- <a-page-header
11
- :title="details.f_name"
12
- >
13
- <div class="row">
14
- <div class="content">
15
- <a-descriptions size="small" :column="isMobile ? 1 : 2">
16
- <a-descriptions-item label="客户编号">{{ details.id }}</a-descriptions-item>
17
- <a-descriptions-item label="创建时间">{{ format(details.f_input_date,'yyyy-MM-dd hh:mm:ss') }}</a-descriptions-item>
18
- <a-descriptions-item label="所属大区">{{ details.f_region }}</a-descriptions-item>
19
- <a-descriptions-item label="系统版本">
20
- {{ details.f_system_version }}
21
- </a-descriptions-item>
22
- <a-descriptions-item label="数据库类型">
23
- {{ details.f_data_source }}
24
- </a-descriptions-item>
25
- </a-descriptions>
26
- </div>
27
- <div class="extra">
28
- <a-row class="status-list">
29
- <a-col :xs="12" :sm="24">
30
- <div class="text">客户状态</div>
31
- <div class="heading">
32
- <x-badge badge-key="customerStateMap" :value="details.f_state" :is-external-text="true"/>
33
- </div>
34
- </a-col>
35
- </a-row>
36
- <p></p>
37
- <a-row class="status-list">
38
- <a-col :xs="12" :sm="24">
39
- <div class="text">日志持久化状态</div>
40
- <div class="heading">
41
- <x-badge badge-key="logPersistenceStateMap" :value="details.f_log_persistence" :is-external-text="true"/>
42
- </div>
43
- </a-col>
44
- </a-row>
45
- </div>
46
- </div>
47
- <!-- actions -->
48
- <template v-slot:extra>
49
- <a-button-group style="margin-right: 4px;">
50
- <a-button type="dashed" @click="initView" :loading="loading">刷新</a-button>
51
- </a-button-group>
52
- </template>
53
- <!-- 操作 -->
54
- <a-card
55
- style="margin-top: 24px"
56
- :bordered="false"
57
- :tabList="operationTabList"
58
- :activeTabKey="operationActiveTabKey"
59
- @tabChange="(key) => {this.operationActiveTabKey = key}"
60
- >
61
- <div v-if="operationActiveTabKey === '1'">
62
- <a-descriptions layout="vertical" bordered>
63
- <a-descriptions-item label="联系方式">{{ details.f_contact }}</a-descriptions-item>
64
- <a-descriptions-item label="地址" span="2">{{ details.f_address }}</a-descriptions-item>
65
- <a-descriptions-item label="备注">{{ details.f_remark }}</a-descriptions-item>
66
- </a-descriptions>
67
- </div>
68
- <div v-else-if="operationActiveTabKey === '2'" class="no-data"><a-icon type="frown-o"/>暂无数据</div>
69
- </a-card>
70
- </a-page-header>
71
- </a-spin>
72
- </a-drawer>
73
- </template>
74
-
75
- <script>
76
- import { formatDate } from '@vue2-client/utils/util'
77
- import { CustomerDetailsViewApi, post } from '@vue2-client/services/api'
78
- import { mapState } from 'vuex'
79
-
80
- export default {
81
- name: 'CustomerDetailsView',
82
- data () {
83
- return {
84
- // 页面宽度
85
- screenWidth: document.documentElement.clientWidth,
86
- // 客户详情
87
- details: {
88
- id: 0,
89
- f_name: '',
90
- f_region: '',
91
- f_system_version: '',
92
- f_contact: '',
93
- f_address: '',
94
- f_remark: '',
95
- f_state: '正常',
96
- f_input_date: '',
97
- f_data_source: '',
98
- f_log_persistence: '支持'
99
- },
100
- // 是否刷新加载中
101
- loading: false,
102
- operationTabList: [
103
- {
104
- key: '1',
105
- tab: '基本信息'
106
- },
107
- {
108
- key: '2',
109
- tab: '操作日志'
110
- }
111
- ],
112
- operationActiveTabKey: '1'
113
- }
114
- },
115
- mounted () {
116
- this.initView()
117
- },
118
- computed: {
119
- ...mapState('account', { currUser: 'user' }),
120
- ...mapState('setting', ['isMobile'])
121
- },
122
- props: {
123
- customerName: {
124
- type: String,
125
- required: true
126
- },
127
- visible: {
128
- type: Boolean,
129
- default: false
130
- }
131
- },
132
- methods: {
133
- // 初始化组件
134
- initView () {
135
- this.getCustomers(this.customerName)
136
- },
137
- onClose () {
138
- this.$emit('update:visible', false)
139
- },
140
- getCustomers (customerName) {
141
- this.loading = true
142
- return post(CustomerDetailsViewApi.getCustomerDetails, {
143
- customerName: customerName
144
- })
145
- .then(res => {
146
- res.f_state = res.f_state === '1' ? '正常' : '停用'
147
- this.details = res
148
- this.loading = false
149
- }, err => {
150
- this.loading = false
151
- console.warn(err)
152
- })
153
- },
154
- format (date, format) {
155
- return formatDate(date, format)
156
- }
157
- },
158
- watch: {
159
- 'visible' (val) {
160
- if (val) {
161
- this.initView()
162
- }
163
- }
164
- }
165
- }
166
- </script>
167
-
168
- <style lang="less" scoped>
169
- .detail-layout {
170
- margin-left: 44px;
171
- }
172
- .text {
173
- color: rgba(0, 0, 0, .45);
174
- }
175
-
176
- .heading {
177
- color: rgba(0, 0, 0, .85);
178
- font-size: 20px;
179
- }
180
-
181
- .no-data {
182
- color: rgba(0, 0, 0, .25);
183
- text-align: center;
184
- line-height: 64px;
185
- font-size: 16px;
186
-
187
- i {
188
- font-size: 24px;
189
- margin-right: 16px;
190
- position: relative;
191
- top: 3px;
192
- }
193
- }
194
-
195
- .mobile {
196
- .detail-layout {
197
- margin-left: unset;
198
- }
199
- .text {
200
-
201
- }
202
- .status-list {
203
- text-align: left;
204
- }
205
- }
206
-
207
- .row {
208
- display: flex;
209
-
210
- .content {
211
- -webkit-box-flex: 1;
212
- flex: auto;
213
- -ms-flex: auto;
214
- }
215
-
216
- .extra {
217
- flex: 0 1 auto;
218
- -webkit-box-flex: 0;
219
- -ms-flex: 0 1 auto;
220
- min-width: 242px;
221
- margin-left: 88px;
222
- text-align: right;
223
- }
224
- }
225
- </style>
@@ -1,3 +0,0 @@
1
- import CustomerDetailsView from './CustomerDetailsView'
2
-
3
- export default CustomerDetailsView
@@ -1,40 +0,0 @@
1
- # CustomerDetailsView 客户详情页
2
-
3
- 提供一个可以对单条客户进行一系列通用业务操作的抽屉实现
4
-
5
-
6
-
7
- ## 何时使用
8
-
9
- 允许用户对单条客户进行一系列通用业务操作,常用于作为客户详情页的通用实现。
10
-
11
-
12
-
13
- 引用方式:
14
-
15
- ```javascript
16
- import CustomerDetailsView from '@vue2-client/base-client/components/CustomerDetailsView'
17
-
18
- export default {
19
- components: {
20
- CustomerDetailsView
21
- }
22
- }
23
- ```
24
-
25
-
26
-
27
- ## 代码演示
28
-
29
- ```html
30
- <log-details-view
31
- :visible.sync="detailVisible"
32
- />
33
- ```
34
-
35
- ## API
36
-
37
- 参数 | 说明 | 类型 | 默认值
38
- ----|------|-----|------
39
- visible | 是否显示 | Boolean | false
40
- customerName | 燃气公司客户名 | String | null