vue2-client 1.2.46 → 1.2.49

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 (61) hide show
  1. package/CHANGELOG.md +130 -114
  2. package/docs/notice.md +22 -22
  3. package/package.json +1 -1
  4. package/src/App.vue +99 -99
  5. package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +1 -1
  6. package/src/base-client/components/common/FormGroupEdit/FormGroupEdit.vue +149 -149
  7. package/src/base-client/components/common/XAddForm/XAddForm.vue +339 -339
  8. package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +316 -316
  9. package/src/base-client/components/common/XForm/XForm.vue +275 -275
  10. package/src/base-client/components/iot/CustomerDetailsView/CustomerDetailsView.vue +225 -225
  11. package/src/base-client/components/iot/DataAnalysisView/DataAnalysisView.vue +244 -244
  12. package/src/base-client/components/iot/DeviceBrandDetailsView/DeviceBrandDetailsView.vue +452 -452
  13. package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsCount.vue +330 -330
  14. package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsException.vue +57 -57
  15. package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsInstructOperate.vue +121 -121
  16. package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsRead.vue +131 -131
  17. package/src/base-client/components/iot/DeviceTypeDetailsView/DeviceTypeDetailsView.vue +276 -276
  18. package/src/base-client/components/iot/InstructDetailsView/InstructDetailsView.vue +469 -469
  19. package/src/base-client/components/iot/LogDetailsView/LogDetailsView.vue +379 -379
  20. package/src/base-client/components/iot/MeterDetailsView/MeterDetailsView.vue +359 -359
  21. package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsCount.vue +335 -335
  22. package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsException.vue +184 -184
  23. package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsHandPlan.vue +291 -291
  24. package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsInstruct.vue +236 -236
  25. package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsMain.vue +256 -256
  26. package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsSellGas.vue +189 -189
  27. package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +722 -722
  28. package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +231 -231
  29. package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +247 -247
  30. package/src/base-client/components/ticket/EmployeeDetailsView/EmployeeDetailsView.vue +370 -370
  31. package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +853 -844
  32. package/src/base-client/components/ticket/TicketDetailsView/part/TicketDetailsFlow.vue +260 -260
  33. package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +532 -532
  34. package/src/base-client/plugins/AppData.js +17 -27
  35. package/src/base-client/plugins/GetLoginInfoService.js +252 -252
  36. package/src/components/exception/ExceptionPage.vue +70 -70
  37. package/src/components/setting/Setting.vue +235 -235
  38. package/src/config/index.js +3 -3
  39. package/src/layouts/SinglePageView.vue +78 -78
  40. package/src/layouts/header/HeaderNotice.vue +0 -1
  41. package/src/pages/exception/403.vue +21 -21
  42. package/src/pages/exception/404.vue +21 -21
  43. package/src/pages/exception/500.vue +21 -21
  44. package/src/pages/report/ReportTableHome.vue +28 -28
  45. package/src/pages/resourceManage/depListManage.vue +23 -23
  46. package/src/pages/resourceManage/funListManage.vue +23 -23
  47. package/src/pages/resourceManage/index.js +15 -15
  48. package/src/pages/resourceManage/orgListManage.vue +98 -98
  49. package/src/pages/resourceManage/roleListManage.vue +23 -23
  50. package/src/pages/resourceManage/staffListManage.vue +23 -23
  51. package/src/pages/system/ticket/submitTicketSuccess.vue +33 -13
  52. package/src/router/async/config.async.js +26 -26
  53. package/src/router/index.js +27 -27
  54. package/src/services/api/common.js +47 -47
  55. package/src/services/api/index.js +39 -39
  56. package/src/services/user.js +34 -34
  57. package/src/theme/default/style.less +47 -47
  58. package/src/utils/indexedDB.js +146 -146
  59. package/src/utils/map-utils.js +17 -0
  60. package/src/utils/routerUtil.js +359 -359
  61. package/vue.config.js +143 -143
@@ -1,276 +1,276 @@
1
- <template>
2
- <div>
3
- <a-drawer
4
- title="设备类型详情"
5
- placement="right"
6
- :width="isMobile ? screenWidth : screenWidth * 0.85"
7
- :visible="visible"
8
- @close="onClose"
9
- >
10
- <create-query
11
- :to-edit-json="getColumnJson()"
12
- :visible.sync="createQueryVisible"
13
- @saveQueryParams="saveQueryParams"
14
- />
15
- <a-spin :spinning="loadDeviceTypeDetails">
16
- <a-page-header :title="details.f_name">
17
- <div class="row">
18
- <div class="content">
19
- <a-descriptions size="small" :column="isMobile ? 1 : 2">
20
- <a-descriptions-item label="设备类型状态">{{ details.f_state }}</a-descriptions-item>
21
- <a-descriptions-item label="创建人">{{ details.f_inputtor }}</a-descriptions-item>
22
- <a-descriptions-item label="创建时间">{{ details.f_input_date }}</a-descriptions-item>
23
- <a-descriptions-item label="描述">{{ details.f_describe }}</a-descriptions-item>
24
- </a-descriptions>
25
- </div>
26
- </div>
27
- <!-- actions -->
28
- <template v-slot:extra>
29
- <a-button-group style="margin-right: 4px;">
30
- <a-button type="dashed" @click="initView" :loading="loadDeviceTypeDetails">刷新</a-button>
31
- </a-button-group>
32
- <a-button-group style="margin-right: 4px;">
33
- </a-button-group>
34
- </template>
35
- <template slot="footer">
36
- <a-tabs :default-active-key="tabActiveKey" :activeKey="tabActiveKey" @change="handleTabChange" style="margin-bottom: 23px;">
37
- <template v-for="value in tabList">
38
- <a-tab-pane :key="value.key" :tab="value.tab"/>
39
- </template>
40
- </a-tabs>
41
- <div v-if="!loadDeviceTypeDetails">
42
- <div v-if="tabActiveKey === '1'">
43
- <a-button type="primary" @click="toCreateQuery">
44
- <a-icon :style="iconStyle" type="api"/>编辑设备上报数据
45
- </a-button>
46
- <a-card title="设备上报数据预览" :bordered="true" size="small" style="margin-top: 20px;">
47
- <json-viewer :copyable="{copyText: '复制', copiedText: '已复制'}" :value="getColumnJson()" :expand-depth="parseInt('100')" style="overflow: auto;max-height: 440px"></json-viewer>
48
- </a-card>
49
- </div>
50
- <div v-if="tabActiveKey === '2'">
51
- <x-form-table
52
- title="指令配置"
53
- :fixed-add-form="fixedAddForm"
54
- :fixed-query-form="fixedQueryForm"
55
- queryParamsName="deviceTypeToInstructQueryParams">
56
- </x-form-table>
57
- </div>
58
- </div>
59
- </template>
60
- </a-page-header>
61
- </a-spin>
62
- </a-drawer>
63
- </div>
64
- </template>
65
-
66
- <script>
67
- import JsonViewer from 'vue-json-viewer'
68
- import { mapState, mapGetters } from 'vuex'
69
- import { DeviceTypeDetailsViewApi, post } from '@vue2-client/services/api'
70
- import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
71
-
72
- export default {
73
- name: 'DeviceTypeDetailsView',
74
- components: {
75
- JsonViewer,
76
- XFormTable
77
- },
78
- data () {
79
- return {
80
- // 页面宽度
81
- screenWidth: document.documentElement.clientWidth,
82
- // Tab页签
83
- tabActiveKey: '1',
84
- // 图标样式
85
- iconStyle: {
86
- position: 'relative',
87
- top: '1px'
88
- },
89
- // 是否显示生成查询配置抽屉
90
- createQueryVisible: false,
91
- // 设备类型详情
92
- details: {
93
- f_name: '',
94
- f_describe: '',
95
- f_state: '',
96
- f_columns_json: '',
97
- f_input_date: '',
98
- f_inputtor: ''
99
- },
100
- fixedAddForm: {},
101
- fixedQueryForm: {},
102
- tabList: [
103
- { key: '1', tab: '抄表查询配置' },
104
- { key: '2', tab: '指令配置' }
105
- ],
106
- // 设备类型详情加载
107
- loadDeviceTypeDetails: false
108
- }
109
- },
110
- mounted () {
111
- this.initView()
112
- },
113
- computed: {
114
- ...mapGetters(['account/user']),
115
- ...mapState('account', { currUser: 'user' }),
116
- ...mapState('setting', ['isMobile'])
117
- },
118
- props: {
119
- typeId: {
120
- type: String,
121
- required: true
122
- },
123
- typeName: {
124
- type: String,
125
- required: true
126
- },
127
- visible: {
128
- type: Boolean,
129
- default: false
130
- }
131
- },
132
- methods: {
133
- // 初始化组件
134
- initView () {
135
- this.tabActiveKey = '1'
136
- this.fixedQueryForm['m_f_device_type_id'] = this.typeId
137
- this.fixedAddForm['m_f_device_type_id'] = this.typeId
138
- this.getDeviceType(this.typeId)
139
- },
140
- toCreateQuery () {
141
- this.createQueryVisible = true
142
- },
143
- getColumnJson () {
144
- if (this.details.f_columns_json) {
145
- return JSON.parse(this.details.f_columns_json)
146
- } else {
147
- return {}
148
- }
149
- },
150
- onClose () {
151
- this.$emit('update:visible', false)
152
- },
153
- // 通用徽标过滤器
154
- badgeFilter (key, value) {
155
- const object = this.$appdata.getParam(key)
156
- if (object.hasOwnProperty(value)) {
157
- return object[value]
158
- } else {
159
- return {
160
- 'status': 'default',
161
- 'text': '未知类型:' + value
162
- }
163
- }
164
- },
165
- // 获取设备类型详情信息
166
- getDeviceType (typeId) {
167
- this.loadDeviceTypeDetails = true
168
- return post(DeviceTypeDetailsViewApi.getDeviceTypeDetails, {
169
- id: typeId
170
- }).then(res => {
171
- this.details = res
172
- this.loadDeviceTypeDetails = false
173
- }, err => {
174
- this.loadDeviceTypeDetails = false
175
- console.error(err)
176
- })
177
- },
178
- // 存储查询配置信息
179
- saveQueryParams (source) {
180
- return post('/webmeterapi/updateDeviceTypeQueryParams', {
181
- id: this.typeId,
182
- source: source
183
- }).then(res => {
184
- this.$message.success('保存查询配置成功')
185
- this.getDeviceType(this.typeId)
186
- }, err => {
187
- console.error(err)
188
- })
189
- },
190
- // Tab切换
191
- handleTabChange (key) {
192
- this.tabActiveKey = key
193
- }
194
- },
195
- watch: {
196
- 'visible' (val) {
197
- if (val) {
198
- this.initView()
199
- }
200
- }
201
- }
202
- }
203
- </script>
204
-
205
- <style lang="less" scoped>
206
- .business {
207
- color: #ffffff;
208
- }
209
- .business:enabled:hover {
210
- background-color: #85CE61 !important;
211
- border-color: #85CE61 !important;
212
- }
213
- .business:enabled {
214
- background-color: #67c23a;
215
- border-color: #67c23a;
216
- }
217
- .business:disabled {
218
- color: rgba(0, 0, 0, 0.25);
219
- }
220
- .detail-layout {
221
- margin-left: 44px;
222
- }
223
- .text {
224
- color: rgba(0, 0, 0, .45);
225
- }
226
-
227
- .heading {
228
- color: rgba(0, 0, 0, .85);
229
- font-size: 20px;
230
- }
231
-
232
- .no-data {
233
- color: rgba(0, 0, 0, .25);
234
- text-align: center;
235
- line-height: 64px;
236
- font-size: 16px;
237
-
238
- i {
239
- font-size: 24px;
240
- margin-right: 16px;
241
- position: relative;
242
- top: 3px;
243
- }
244
- }
245
-
246
- .mobile {
247
- .detail-layout {
248
- margin-left: unset;
249
- }
250
- .text {
251
-
252
- }
253
- .status-list {
254
- text-align: left;
255
- }
256
- }
257
-
258
- .row {
259
- display: flex;
260
-
261
- .content {
262
- -webkit-box-flex: 1;
263
- flex: auto;
264
- -ms-flex: auto;
265
- }
266
-
267
- .extra {
268
- flex: 0 1 auto;
269
- -webkit-box-flex: 0;
270
- -ms-flex: 0 1 auto;
271
- min-width: 242px;
272
- margin-left: 88px;
273
- text-align: right;
274
- }
275
- }
276
- </style>
1
+ <template>
2
+ <div>
3
+ <a-drawer
4
+ title="设备类型详情"
5
+ placement="right"
6
+ :width="isMobile ? screenWidth : screenWidth * 0.85"
7
+ :visible="visible"
8
+ @close="onClose"
9
+ >
10
+ <create-query
11
+ :to-edit-json="getColumnJson()"
12
+ :visible.sync="createQueryVisible"
13
+ @saveQueryParams="saveQueryParams"
14
+ />
15
+ <a-spin :spinning="loadDeviceTypeDetails">
16
+ <a-page-header :title="details.f_name">
17
+ <div class="row">
18
+ <div class="content">
19
+ <a-descriptions size="small" :column="isMobile ? 1 : 2">
20
+ <a-descriptions-item label="设备类型状态">{{ details.f_state }}</a-descriptions-item>
21
+ <a-descriptions-item label="创建人">{{ details.f_inputtor }}</a-descriptions-item>
22
+ <a-descriptions-item label="创建时间">{{ details.f_input_date }}</a-descriptions-item>
23
+ <a-descriptions-item label="描述">{{ details.f_describe }}</a-descriptions-item>
24
+ </a-descriptions>
25
+ </div>
26
+ </div>
27
+ <!-- actions -->
28
+ <template v-slot:extra>
29
+ <a-button-group style="margin-right: 4px;">
30
+ <a-button type="dashed" @click="initView" :loading="loadDeviceTypeDetails">刷新</a-button>
31
+ </a-button-group>
32
+ <a-button-group style="margin-right: 4px;">
33
+ </a-button-group>
34
+ </template>
35
+ <template slot="footer">
36
+ <a-tabs :default-active-key="tabActiveKey" :activeKey="tabActiveKey" @change="handleTabChange" style="margin-bottom: 23px;">
37
+ <template v-for="value in tabList">
38
+ <a-tab-pane :key="value.key" :tab="value.tab"/>
39
+ </template>
40
+ </a-tabs>
41
+ <div v-if="!loadDeviceTypeDetails">
42
+ <div v-if="tabActiveKey === '1'">
43
+ <a-button type="primary" @click="toCreateQuery">
44
+ <a-icon :style="iconStyle" type="api"/>编辑设备上报数据
45
+ </a-button>
46
+ <a-card title="设备上报数据预览" :bordered="true" size="small" style="margin-top: 20px;">
47
+ <json-viewer :copyable="{copyText: '复制', copiedText: '已复制'}" :value="getColumnJson()" :expand-depth="parseInt('100')" style="overflow: auto;max-height: 440px"></json-viewer>
48
+ </a-card>
49
+ </div>
50
+ <div v-if="tabActiveKey === '2'">
51
+ <x-form-table
52
+ title="指令配置"
53
+ :fixed-add-form="fixedAddForm"
54
+ :fixed-query-form="fixedQueryForm"
55
+ queryParamsName="deviceTypeToInstructQueryParams">
56
+ </x-form-table>
57
+ </div>
58
+ </div>
59
+ </template>
60
+ </a-page-header>
61
+ </a-spin>
62
+ </a-drawer>
63
+ </div>
64
+ </template>
65
+
66
+ <script>
67
+ import JsonViewer from 'vue-json-viewer'
68
+ import { mapState, mapGetters } from 'vuex'
69
+ import { DeviceTypeDetailsViewApi, post } from '@vue2-client/services/api'
70
+ import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
71
+
72
+ export default {
73
+ name: 'DeviceTypeDetailsView',
74
+ components: {
75
+ JsonViewer,
76
+ XFormTable
77
+ },
78
+ data () {
79
+ return {
80
+ // 页面宽度
81
+ screenWidth: document.documentElement.clientWidth,
82
+ // Tab页签
83
+ tabActiveKey: '1',
84
+ // 图标样式
85
+ iconStyle: {
86
+ position: 'relative',
87
+ top: '1px'
88
+ },
89
+ // 是否显示生成查询配置抽屉
90
+ createQueryVisible: false,
91
+ // 设备类型详情
92
+ details: {
93
+ f_name: '',
94
+ f_describe: '',
95
+ f_state: '',
96
+ f_columns_json: '',
97
+ f_input_date: '',
98
+ f_inputtor: ''
99
+ },
100
+ fixedAddForm: {},
101
+ fixedQueryForm: {},
102
+ tabList: [
103
+ { key: '1', tab: '抄表查询配置' },
104
+ { key: '2', tab: '指令配置' }
105
+ ],
106
+ // 设备类型详情加载
107
+ loadDeviceTypeDetails: false
108
+ }
109
+ },
110
+ mounted () {
111
+ this.initView()
112
+ },
113
+ computed: {
114
+ ...mapGetters(['account/user']),
115
+ ...mapState('account', { currUser: 'user' }),
116
+ ...mapState('setting', ['isMobile'])
117
+ },
118
+ props: {
119
+ typeId: {
120
+ type: String,
121
+ required: true
122
+ },
123
+ typeName: {
124
+ type: String,
125
+ required: true
126
+ },
127
+ visible: {
128
+ type: Boolean,
129
+ default: false
130
+ }
131
+ },
132
+ methods: {
133
+ // 初始化组件
134
+ initView () {
135
+ this.tabActiveKey = '1'
136
+ this.fixedQueryForm['m_f_device_type_id'] = this.typeId
137
+ this.fixedAddForm['m_f_device_type_id'] = this.typeId
138
+ this.getDeviceType(this.typeId)
139
+ },
140
+ toCreateQuery () {
141
+ this.createQueryVisible = true
142
+ },
143
+ getColumnJson () {
144
+ if (this.details.f_columns_json) {
145
+ return JSON.parse(this.details.f_columns_json)
146
+ } else {
147
+ return {}
148
+ }
149
+ },
150
+ onClose () {
151
+ this.$emit('update:visible', false)
152
+ },
153
+ // 通用徽标过滤器
154
+ badgeFilter (key, value) {
155
+ const object = this.$appdata.getParam(key)
156
+ if (object.hasOwnProperty(value)) {
157
+ return object[value]
158
+ } else {
159
+ return {
160
+ 'status': 'default',
161
+ 'text': '未知类型:' + value
162
+ }
163
+ }
164
+ },
165
+ // 获取设备类型详情信息
166
+ getDeviceType (typeId) {
167
+ this.loadDeviceTypeDetails = true
168
+ return post(DeviceTypeDetailsViewApi.getDeviceTypeDetails, {
169
+ id: typeId
170
+ }).then(res => {
171
+ this.details = res
172
+ this.loadDeviceTypeDetails = false
173
+ }, err => {
174
+ this.loadDeviceTypeDetails = false
175
+ console.error(err)
176
+ })
177
+ },
178
+ // 存储查询配置信息
179
+ saveQueryParams (source) {
180
+ return post('/webmeterapi/updateDeviceTypeQueryParams', {
181
+ id: this.typeId,
182
+ source: source
183
+ }).then(res => {
184
+ this.$message.success('保存查询配置成功')
185
+ this.getDeviceType(this.typeId)
186
+ }, err => {
187
+ console.error(err)
188
+ })
189
+ },
190
+ // Tab切换
191
+ handleTabChange (key) {
192
+ this.tabActiveKey = key
193
+ }
194
+ },
195
+ watch: {
196
+ 'visible' (val) {
197
+ if (val) {
198
+ this.initView()
199
+ }
200
+ }
201
+ }
202
+ }
203
+ </script>
204
+
205
+ <style lang="less" scoped>
206
+ .business {
207
+ color: #ffffff;
208
+ }
209
+ .business:enabled:hover {
210
+ background-color: #85CE61 !important;
211
+ border-color: #85CE61 !important;
212
+ }
213
+ .business:enabled {
214
+ background-color: #67c23a;
215
+ border-color: #67c23a;
216
+ }
217
+ .business:disabled {
218
+ color: rgba(0, 0, 0, 0.25);
219
+ }
220
+ .detail-layout {
221
+ margin-left: 44px;
222
+ }
223
+ .text {
224
+ color: rgba(0, 0, 0, .45);
225
+ }
226
+
227
+ .heading {
228
+ color: rgba(0, 0, 0, .85);
229
+ font-size: 20px;
230
+ }
231
+
232
+ .no-data {
233
+ color: rgba(0, 0, 0, .25);
234
+ text-align: center;
235
+ line-height: 64px;
236
+ font-size: 16px;
237
+
238
+ i {
239
+ font-size: 24px;
240
+ margin-right: 16px;
241
+ position: relative;
242
+ top: 3px;
243
+ }
244
+ }
245
+
246
+ .mobile {
247
+ .detail-layout {
248
+ margin-left: unset;
249
+ }
250
+ .text {
251
+
252
+ }
253
+ .status-list {
254
+ text-align: left;
255
+ }
256
+ }
257
+
258
+ .row {
259
+ display: flex;
260
+
261
+ .content {
262
+ -webkit-box-flex: 1;
263
+ flex: auto;
264
+ -ms-flex: auto;
265
+ }
266
+
267
+ .extra {
268
+ flex: 0 1 auto;
269
+ -webkit-box-flex: 0;
270
+ -ms-flex: 0 1 auto;
271
+ min-width: 242px;
272
+ margin-left: 88px;
273
+ text-align: right;
274
+ }
275
+ }
276
+ </style>