vue2-client 1.2.74 → 1.2.77

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 (46) hide show
  1. package/.env +15 -15
  2. package/.eslintrc.js +82 -82
  3. package/CHANGELOG.md +5 -0
  4. package/package.json +52 -49
  5. package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +225 -225
  6. package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +113 -113
  7. package/src/base-client/components/common/CitySelect/CitySelect.vue +244 -244
  8. package/src/base-client/components/common/CitySelect/index.js +3 -3
  9. package/src/base-client/components/common/CitySelect/index.md +109 -109
  10. package/src/base-client/components/common/CreateQuery/CreateQuery.vue +539 -539
  11. package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +773 -773
  12. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +310 -310
  13. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +553 -553
  14. package/src/base-client/components/common/Upload/Upload.vue +151 -151
  15. package/src/base-client/components/common/Upload/index.js +3 -3
  16. package/src/base-client/components/common/XAddForm/XAddForm.vue +345 -345
  17. package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +322 -322
  18. package/src/base-client/components/common/XForm/XForm.vue +268 -268
  19. package/src/base-client/components/common/XForm/XFormItem.vue +358 -358
  20. package/src/base-client/components/common/XFormTable/XFormTable.vue +491 -491
  21. package/src/base-client/components/common/XTable/XTable.vue +269 -269
  22. package/src/base-client/components/iot/DeviceDetailsView/DeviceDetailsView.vue +232 -230
  23. package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsCount.vue +623 -330
  24. package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsException.vue +57 -57
  25. package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsRead.vue +131 -131
  26. package/src/base-client/components/iot/DeviceTypeDetailsView/DeviceTypeDetailsView.vue +300 -300
  27. package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +647 -647
  28. package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +532 -532
  29. package/src/base-client/plugins/AppData.js +70 -70
  30. package/src/base-client/plugins/compatible/LoginServiceOA.js +20 -20
  31. package/src/components/Charts/ChartCard.vue +14 -0
  32. package/src/config/CreateQueryConfig.js +301 -301
  33. package/src/pages/resourceManage/orgListManage.vue +98 -98
  34. package/src/router/async/config.async.js +26 -26
  35. package/src/router/async/router.map.js +60 -60
  36. package/src/router/index.js +27 -27
  37. package/src/services/api/common.js +56 -56
  38. package/src/services/api/index.js +39 -39
  39. package/src/services/api/iot/DeviceDetailsView/DeviceDetailsCountApi.js +14 -0
  40. package/src/services/api/manage.js +16 -16
  41. package/src/services/api/restTools.js +24 -24
  42. package/src/theme/default/style.less +47 -47
  43. package/src/utils/map-utils.js +28 -28
  44. package/src/utils/request.js +198 -198
  45. package/src/utils/util.js +222 -222
  46. package/vue.config.js +153 -153
@@ -1,230 +1,232 @@
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="loadDeviceDetails">
10
- <a-page-header :title="'设备号:' + details.f_device_no">
11
- <div class="row">
12
- <div class="content">
13
- <a-descriptions size="small" :column="isMobile ? 1 : 2">
14
- <a-descriptions-item label="设备IOT标识">{{ details.deviceid }}</a-descriptions-item>
15
- <<a-descriptions-item/>
16
- <a-descriptions-item label="创建时间">{{ details.f_input_date }}</a-descriptions-item>
17
- <a-descriptions-item label="创建人">{{ details.f_inputtor }}</a-descriptions-item>
18
- </a-descriptions>
19
- </div>
20
- <div class="extra">
21
- <a-row class="status-list">
22
- <a-col :xs="12" :sm="24">
23
- <div class="text">设备状态</div>
24
- <div class="heading">
25
- <x-badge badge-key="deviceStateMap" :value="details.f_state" :is-external-text="true"/>
26
- </div>
27
- </a-col>
28
- </a-row>
29
- <p></p>
30
- </div>
31
- </div>
32
- <!-- actions -->
33
- <template v-slot:extra>
34
- <a-button-group style="margin-right: 4px;">
35
- <a-button type="dashed" @click="initView" :loading="loadDeviceDetails">刷新</a-button>
36
- </a-button-group>
37
- <a-button-group style="margin-right: 4px;">
38
- </a-button-group>
39
- </template>
40
- <template slot="footer">
41
- <a-tabs :default-active-key="tabActiveKey" :activeKey="tabActiveKey" @change="handleTabChange" style="margin-bottom: 23px;">
42
- <template v-for="value in tabList">
43
- <a-tab-pane :key="value.key" :tab="value.tab"/>
44
- </template>
45
- </a-tabs>
46
- <div v-if="!loadDeviceDetails">
47
- <device-details-main :details="details" v-if="tabActiveKey === '1'"/>
48
- <device-details-read :device-id="details.id" v-if="tabActiveKey === '2'"/>
49
- <device-details-instruct :device-no="details.f_device_no" v-if="tabActiveKey === '3'"/>
50
- <device-details-singular :device-id="details.id" v-if="tabActiveKey === '4'"/>
51
- <device-details-instruct-operate :device="details" v-if="tabActiveKey === '5'"/>
52
- </div>
53
- </template>
54
- </a-page-header>
55
- </a-spin>
56
- </a-drawer>
57
- </template>
58
-
59
- <script>
60
- import { DeviceDetailsMain, DeviceDetailsCount, DeviceDetailsInstruct, DeviceDetailsRead, DeviceDetailsSingular, DeviceDetailsInstructOperate } from '@vue2-client/base-client/components/iot/DeviceDetailsView/part'
61
- import { DeviceDetailsViewApi, post } from '@vue2-client/services/api'
62
- import { mapState } from 'vuex'
63
-
64
- export default {
65
- name: 'DeviceDetailsView',
66
- components: {
67
- DeviceDetailsMain,
68
- DeviceDetailsCount,
69
- DeviceDetailsInstruct,
70
- DeviceDetailsRead,
71
- DeviceDetailsSingular,
72
- DeviceDetailsInstructOperate
73
- },
74
- data () {
75
- return {
76
- // 页面宽度
77
- screenWidth: document.documentElement.clientWidth,
78
- // Tab页签
79
- tabActiveKey: '1',
80
- // 设备详情
81
- details: {
82
- f_device_no: '',
83
- f_imei: '',
84
- f_imsi: '',
85
- f_state: '正常',
86
- f_device_id: '',
87
- f_manufactor: '',
88
- f_brand: '',
89
- f_alias: '',
90
- f_model: '',
91
- f_input_date: '',
92
- f_inputtor: ''
93
- },
94
- tabList: [
95
- { key: '1', tab: '基本' },
96
- { key: '2', tab: '抄表' },
97
- { key: '3', tab: '指令' },
98
- { key: '4', tab: '异常' },
99
- { key: '5', tab: '指令操作' }
100
- ],
101
- // 设备详情加载
102
- loadDeviceDetails: true
103
- }
104
- },
105
- mounted () {
106
- this.initView()
107
- },
108
- computed: {
109
- ...mapState('account', { currUser: 'user' }),
110
- ...mapState('setting', ['isMobile'])
111
- },
112
- props: {
113
- deviceNo: {
114
- type: String || Number,
115
- required: true
116
- },
117
- visible: {
118
- type: Boolean,
119
- default: false
120
- }
121
- },
122
- methods: {
123
- // 初始化组件
124
- initView () {
125
- this.tabActiveKey = '1'
126
- this.getIotDevice(this.deviceNo)
127
- },
128
- onClose () {
129
- this.$emit('update:visible', false)
130
- },
131
- // 获取设备详情信息
132
- getIotDevice (deviceNo) {
133
- this.loadDeviceDetails = true
134
- return post(DeviceDetailsViewApi.getDeviceDetails, {
135
- id: deviceNo
136
- }).then(res => {
137
- this.details = res
138
- this.loadDeviceDetails = false
139
- }, err => {
140
- this.loadDeviceDetails = false
141
- console.error(err)
142
- })
143
- },
144
- // Tab切换
145
- handleTabChange (key) {
146
- this.tabActiveKey = key
147
- }
148
- },
149
- watch: {
150
- 'visible' (val) {
151
- if (val) {
152
- this.initView()
153
- }
154
- }
155
- }
156
- }
157
- </script>
158
-
159
- <style lang="less" scoped>
160
- .business {
161
- color: #ffffff;
162
- }
163
- .business:enabled:hover {
164
- background-color: #85CE61 !important;
165
- border-color: #85CE61 !important;
166
- }
167
- .business:enabled {
168
- background-color: #67c23a;
169
- border-color: #67c23a;
170
- }
171
- .business:disabled {
172
- color: rgba(0, 0, 0, 0.25);
173
- }
174
- .detail-layout {
175
- margin-left: 44px;
176
- }
177
- .text {
178
- color: rgba(0, 0, 0, .45);
179
- }
180
-
181
- .heading {
182
- color: rgba(0, 0, 0, .85);
183
- font-size: 20px;
184
- }
185
-
186
- .no-data {
187
- color: rgba(0, 0, 0, .25);
188
- text-align: center;
189
- line-height: 64px;
190
- font-size: 16px;
191
-
192
- i {
193
- font-size: 24px;
194
- margin-right: 16px;
195
- position: relative;
196
- top: 3px;
197
- }
198
- }
199
-
200
- .mobile {
201
- .detail-layout {
202
- margin-left: unset;
203
- }
204
- .text {
205
-
206
- }
207
- .status-list {
208
- text-align: left;
209
- }
210
- }
211
-
212
- .row {
213
- display: flex;
214
-
215
- .content {
216
- -webkit-box-flex: 1;
217
- flex: auto;
218
- -ms-flex: auto;
219
- }
220
-
221
- .extra {
222
- flex: 0 1 auto;
223
- -webkit-box-flex: 0;
224
- -ms-flex: 0 1 auto;
225
- min-width: 242px;
226
- margin-left: 88px;
227
- text-align: right;
228
- }
229
- }
230
- </style>
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="loadDeviceDetails">
10
+ <a-page-header :title="'设备号:' + details.f_device_no">
11
+ <div class="row">
12
+ <div class="content">
13
+ <a-descriptions size="small" :column="isMobile ? 1 : 2">
14
+ <a-descriptions-item label="设备IOT标识">{{ details.deviceid }}</a-descriptions-item>
15
+ <<a-descriptions-item/>
16
+ <a-descriptions-item label="创建时间">{{ details.f_input_date }}</a-descriptions-item>
17
+ <a-descriptions-item label="创建人">{{ details.f_inputtor }}</a-descriptions-item>
18
+ </a-descriptions>
19
+ </div>
20
+ <div class="extra">
21
+ <a-row class="status-list">
22
+ <a-col :xs="12" :sm="24">
23
+ <div class="text">设备状态</div>
24
+ <div class="heading">
25
+ <x-badge badge-key="deviceStateMap" :value="details.f_state" :is-external-text="true"/>
26
+ </div>
27
+ </a-col>
28
+ </a-row>
29
+ <p></p>
30
+ </div>
31
+ </div>
32
+ <!-- actions -->
33
+ <template v-slot:extra>
34
+ <a-button-group style="margin-right: 4px;">
35
+ <a-button type="dashed" @click="initView" :loading="loadDeviceDetails">刷新</a-button>
36
+ </a-button-group>
37
+ <a-button-group style="margin-right: 4px;">
38
+ </a-button-group>
39
+ </template>
40
+ <template slot="footer">
41
+ <a-tabs :default-active-key="tabActiveKey" :activeKey="tabActiveKey" @change="handleTabChange" style="margin-bottom: 23px;">
42
+ <template v-for="value in tabList">
43
+ <a-tab-pane :key="value.key" :tab="value.tab"/>
44
+ </template>
45
+ </a-tabs>
46
+ <div v-if="!loadDeviceDetails">
47
+ <device-details-main :details="details" v-if="tabActiveKey === '1'"/>
48
+ <device-details-read :device-id="details.id" v-if="tabActiveKey === '2'"/>
49
+ <device-details-instruct :device-no="details.f_device_no" v-if="tabActiveKey === '3'"/>
50
+ <device-details-singular :device-id="details.id" v-if="tabActiveKey === '4'"/>
51
+ <device-details-instruct-operate :device="details" v-if="tabActiveKey === '5'"/>
52
+ <device-details-count :device-id="details.id" v-if="tabActiveKey === '6'"/>
53
+ </div>
54
+ </template>
55
+ </a-page-header>
56
+ </a-spin>
57
+ </a-drawer>
58
+ </template>
59
+
60
+ <script>
61
+ import { DeviceDetailsMain, DeviceDetailsCount, DeviceDetailsInstruct, DeviceDetailsRead, DeviceDetailsSingular, DeviceDetailsInstructOperate } from '@vue2-client/base-client/components/iot/DeviceDetailsView/part'
62
+ import { DeviceDetailsViewApi, post } from '@vue2-client/services/api'
63
+ import { mapState } from 'vuex'
64
+
65
+ export default {
66
+ name: 'DeviceDetailsView',
67
+ components: {
68
+ DeviceDetailsMain,
69
+ DeviceDetailsCount,
70
+ DeviceDetailsInstruct,
71
+ DeviceDetailsRead,
72
+ DeviceDetailsSingular,
73
+ DeviceDetailsInstructOperate
74
+ },
75
+ data () {
76
+ return {
77
+ // 页面宽度
78
+ screenWidth: document.documentElement.clientWidth,
79
+ // Tab页签
80
+ tabActiveKey: '1',
81
+ // 设备详情
82
+ details: {
83
+ f_device_no: '',
84
+ f_imei: '',
85
+ f_imsi: '',
86
+ f_state: '正常',
87
+ f_device_id: '',
88
+ f_manufactor: '',
89
+ f_brand: '',
90
+ f_alias: '',
91
+ f_model: '',
92
+ f_input_date: '',
93
+ f_inputtor: ''
94
+ },
95
+ tabList: [
96
+ { key: '1', tab: '基本' },
97
+ { key: '2', tab: '抄表' },
98
+ { key: '3', tab: '指令' },
99
+ { key: '4', tab: '异常' },
100
+ { key: '5', tab: '指令操作' },
101
+ { key: '6', tab: '数据分析' }
102
+ ],
103
+ // 设备详情加载
104
+ loadDeviceDetails: true
105
+ }
106
+ },
107
+ mounted () {
108
+ this.initView()
109
+ },
110
+ computed: {
111
+ ...mapState('account', { currUser: 'user' }),
112
+ ...mapState('setting', ['isMobile'])
113
+ },
114
+ props: {
115
+ deviceNo: {
116
+ type: String || Number,
117
+ required: true
118
+ },
119
+ visible: {
120
+ type: Boolean,
121
+ default: false
122
+ }
123
+ },
124
+ methods: {
125
+ // 初始化组件
126
+ initView () {
127
+ this.tabActiveKey = '1'
128
+ this.getIotDevice(this.deviceNo)
129
+ },
130
+ onClose () {
131
+ this.$emit('update:visible', false)
132
+ },
133
+ // 获取设备详情信息
134
+ getIotDevice (deviceNo) {
135
+ this.loadDeviceDetails = true
136
+ return post(DeviceDetailsViewApi.getDeviceDetails, {
137
+ id: deviceNo
138
+ }).then(res => {
139
+ this.details = res
140
+ this.loadDeviceDetails = false
141
+ }, err => {
142
+ this.loadDeviceDetails = false
143
+ console.error(err)
144
+ })
145
+ },
146
+ // Tab切换
147
+ handleTabChange (key) {
148
+ this.tabActiveKey = key
149
+ }
150
+ },
151
+ watch: {
152
+ 'visible' (val) {
153
+ if (val) {
154
+ this.initView()
155
+ }
156
+ }
157
+ }
158
+ }
159
+ </script>
160
+
161
+ <style lang="less" scoped>
162
+ .business {
163
+ color: #ffffff;
164
+ }
165
+ .business:enabled:hover {
166
+ background-color: #85CE61 !important;
167
+ border-color: #85CE61 !important;
168
+ }
169
+ .business:enabled {
170
+ background-color: #67c23a;
171
+ border-color: #67c23a;
172
+ }
173
+ .business:disabled {
174
+ color: rgba(0, 0, 0, 0.25);
175
+ }
176
+ .detail-layout {
177
+ margin-left: 44px;
178
+ }
179
+ .text {
180
+ color: rgba(0, 0, 0, .45);
181
+ }
182
+
183
+ .heading {
184
+ color: rgba(0, 0, 0, .85);
185
+ font-size: 20px;
186
+ }
187
+
188
+ .no-data {
189
+ color: rgba(0, 0, 0, .25);
190
+ text-align: center;
191
+ line-height: 64px;
192
+ font-size: 16px;
193
+
194
+ i {
195
+ font-size: 24px;
196
+ margin-right: 16px;
197
+ position: relative;
198
+ top: 3px;
199
+ }
200
+ }
201
+
202
+ .mobile {
203
+ .detail-layout {
204
+ margin-left: unset;
205
+ }
206
+ .text {
207
+
208
+ }
209
+ .status-list {
210
+ text-align: left;
211
+ }
212
+ }
213
+
214
+ .row {
215
+ display: flex;
216
+
217
+ .content {
218
+ -webkit-box-flex: 1;
219
+ flex: auto;
220
+ -ms-flex: auto;
221
+ }
222
+
223
+ .extra {
224
+ flex: 0 1 auto;
225
+ -webkit-box-flex: 0;
226
+ -ms-flex: 0 1 auto;
227
+ min-width: 242px;
228
+ margin-left: 88px;
229
+ text-align: right;
230
+ }
231
+ }
232
+ </style>