vue2-client 1.2.101 → 1.2.102

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 (32) hide show
  1. package/.env +15 -15
  2. package/.eslintrc.js +82 -82
  3. package/CHANGELOG.md +246 -245
  4. package/package.json +92 -92
  5. package/src/base-client/all.js +66 -66
  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 +547 -547
  11. package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +778 -778
  12. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +310 -310
  13. package/src/base-client/components/common/PersonSetting/PersonSetting.vue +210 -210
  14. package/src/base-client/components/common/PersonSetting/index.js +3 -3
  15. package/src/base-client/components/common/Upload/Upload.vue +157 -157
  16. package/src/base-client/components/common/Upload/index.js +3 -3
  17. package/src/base-client/components/common/XAddForm/XAddForm.vue +349 -349
  18. package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +322 -322
  19. package/src/base-client/components/common/XForm/XForm.vue +268 -268
  20. package/src/base-client/components/common/XForm/XFormItem.vue +371 -371
  21. package/src/base-client/components/common/XFormTable/XFormTable.vue +507 -507
  22. package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +960 -960
  23. package/src/config/CreateQueryConfig.js +307 -307
  24. package/src/layouts/header/HeaderNotice.vue +199 -164
  25. package/src/layouts/header/InstitutionDetail.vue +177 -177
  26. package/src/pages/system/ticket/index.vue +5 -68
  27. package/src/router/async/router.map.js +60 -60
  28. package/src/services/api/TicketDetailsViewApi.js +1 -3
  29. package/src/services/api/WebmeterAnalysisViewApi.js +24 -24
  30. package/src/services/api/manage.js +16 -16
  31. package/src/services/api/restTools.js +24 -24
  32. package/vue.config.js +163 -163
@@ -1,164 +1,199 @@
1
- <template>
2
- <a-dropdown :trigger="['click']" v-model="show">
3
- <div slot="overlay">
4
- <a-spin :spinning="loading">
5
- <a-tabs class="dropdown-tabs" :tabBarStyle="{textAlign: 'center'}" :style="{width: '297px'}">
6
- <a-tab-pane tab="通知" key="1">
7
- <a-list>
8
- <a-list-item :key="item.id" class="tab-pane" v-for=" item in exception">
9
- <a-list-item-meta
10
- :title="'设备号'+ item.e_f_device_id"
11
- :description="item.e_f_error_msg"
12
- @click="read(item)">
13
- <a-avatar
14
- style="background-color: white"
15
- slot="avatar"
16
- src="https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png"/>
17
- </a-list-item-meta>
18
- </a-list-item>
19
- </a-list>
20
- </a-tab-pane>
21
- <a-tab-pane tab="消息" key="2">
22
- <a-list class="tab-pane"></a-list>
23
- </a-tab-pane>
24
- <a-tab-pane tab="待办" key="3">
25
- <a-list item-layout="horizontal" :data-source="backlog" :bordered="true">
26
- <a-list-item slot="renderItem" slot-scope="item, index">
27
- <a slot="actions" v-if="item.type==='制度待确认'" @click="confirm_institution(item)">确认</a>
28
- <a-list-item-meta :title="item.title" :description="item.description"/>
29
- </a-list-item>
30
- </a-list>
31
- </a-tab-pane>
32
- <a-drawer
33
- placement="right"
34
- title="待确认制度详情"
35
- :width="screenWidth * 0.5"
36
- :visible="institutionDetailVisible"
37
- @close="onClose"
38
- >
39
- <institution-detail
40
- :institutionId="institution"
41
- :affirmInstitution="affirmInstitution"
42
- @get_to_be_confirmed="getToBeConfirmed"/>
43
- </a-drawer>
44
- </a-tabs>
45
- </a-spin>
46
- </div>
47
- <span @click="fetchNotice" class="header-notice">
48
- <a-badge class="notice-badge" :count="exception.length + backlog.length">
49
- <a-icon :class="['header-notice-icon']" type="bell"/>
50
- </a-badge>
51
- </span>
52
- </a-dropdown>
53
- </template>
54
-
55
- <script>
56
- import { post } from '@vue2-client/services/api'
57
- import InstitutionDetail from './InstitutionDetail'
58
-
59
- export default {
60
- name: 'HeaderNotice',
61
- data () {
62
- return {
63
- loading: false,
64
- screenWidth: document.documentElement.clientWidth,
65
- show: false,
66
- institutionDetailVisible: false,
67
- institution: undefined,
68
- affirmInstitution: undefined,
69
- exception: [],
70
- backlog: []
71
- }
72
- },
73
- components: { InstitutionDetail },
74
- computed: {},
75
- created () {
76
- this.getToBeConfirmed()
77
- },
78
- methods: {
79
- onClose () {
80
- this.institutionDetailVisible = false
81
- this.getToBeConfirmed()
82
- },
83
- read (item) {
84
- post('/webmeterapi/saveSingleTable', {
85
- data: {
86
- tablename: 't_iot_device_exception',
87
- param: { id: item.e_id, f_is_read: 1 }
88
- }
89
- }).then(res => {
90
- this.refresh()
91
- })
92
- },
93
- getToBeConfirmed () {
94
- this.institutionDetailVisible = false
95
- try {
96
- if (this.$login.f.name) {
97
- post('/webmetersql/getToBeConfirmed', { data: { condition: `state = '待确认' and f_affirm_by = '${this.$login.f.name}'` } }).then(res => {
98
- this.backlog = [...res]
99
- })
100
- }
101
- } catch (e) {
102
- console.log(e)
103
- }
104
- },
105
- confirm_institution (item) {
106
- this.institutionDetailVisible = true
107
- this.show = false
108
- this.institution = item.institution
109
- this.affirmInstitution = item.id
110
- },
111
- refresh () {
112
- post('/webmeterapi/commonQuery', {
113
- queryParamsName: 'deviceExceptionQueryParams',
114
- conditionParams: { e_f_is_read: 0 },
115
- pageNo: 1,
116
- pageSize: 999999
117
- }).then(res => {
118
- this.exception = res.data
119
- })
120
- },
121
- fetchNotice () {
122
- if (this.loading) {
123
- this.loading = false
124
- return
125
- }
126
- this.loadding = true
127
- setTimeout(() => {
128
- this.loadding = false
129
- }, 1000)
130
- }
131
- }
132
- }
133
- </script>
134
-
135
- <style lang="less">
136
- .header-notice {
137
- display: inline-block;
138
- transition: all 0.3s;
139
-
140
- span {
141
- vertical-align: initial;
142
- }
143
-
144
- .notice-badge {
145
- color: inherit;
146
-
147
- .header-notice-icon {
148
- font-size: 16px;
149
- padding: 4px;
150
- }
151
- }
152
- }
153
-
154
- .dropdown-tabs {
155
- background-color: @base-bg-color;
156
- box-shadow: 0 2px 8px @shadow-color;
157
- border-radius: 4px;
158
-
159
- .tab-pane {
160
- padding: 0 24px 12px;
161
- min-height: 250px;
162
- }
163
- }
164
- </style>
1
+ <template>
2
+ <a-dropdown :trigger="['click']" v-model="show">
3
+ <div slot="overlay">
4
+ <a-spin :spinning="loading">
5
+ <a-tabs
6
+ class="dropdown-tabs"
7
+ :tabBarStyle="{textAlign: 'center'}"
8
+ :style="{width: '297px'}"
9
+ v-model="activeKey">
10
+ <a-tab-pane tab="通知" key="1">
11
+ <a-list>
12
+ <a-list-item :key="item.id" class="tab-pane" v-for=" item in exception">
13
+ <a-list-item-meta
14
+ :title="'设备号'+ item.e_f_device_id"
15
+ :description="item.e_f_error_msg"
16
+ @click="read(item)">
17
+ <a-avatar
18
+ style="background-color: white"
19
+ slot="avatar"
20
+ src="https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png"/>
21
+ </a-list-item-meta>
22
+ </a-list-item>
23
+ </a-list>
24
+ </a-tab-pane>
25
+ <a-tab-pane tab="消息" key="2">
26
+ <a-list class="tab-pane"></a-list>
27
+ </a-tab-pane>
28
+ <a-tab-pane tab="待办" key="3">
29
+ <a-list item-layout="horizontal" :data-source="backlog" :bordered="true">
30
+ <a-list-item slot="renderItem" slot-scope="item, index">
31
+ <a slot="actions" v-if="item.type==='制度待确认'" @click="confirm_institution(item)">查看</a>
32
+ <a-list-item-meta :title="item.title" :description="item.description"/>
33
+ </a-list-item>
34
+ </a-list>
35
+ </a-tab-pane>
36
+ <a-drawer
37
+ placement="right"
38
+ title="待确认制度详情"
39
+ :width="screenWidth * 0.5"
40
+ :visible="institutionDetailVisible"
41
+ @close="onClose"
42
+ >
43
+ <institution-detail
44
+ :institutionId="institution"
45
+ :affirmInstitution="affirmInstitution"
46
+ @get_to_be_confirmed="getToBeConfirmed"/>
47
+ </a-drawer>
48
+ </a-tabs>
49
+ </a-spin>
50
+ </div>
51
+ <span @click="fetchNotice" class="header-notice">
52
+ <a-badge class="notice-badge" :count="exception.length + backlog.length">
53
+ <a-icon :class="['header-notice-icon']" type="bell"/>
54
+ </a-badge>
55
+ </span>
56
+ </a-dropdown>
57
+ </template>
58
+
59
+ <script>
60
+ import { post } from '@vue2-client/services/api'
61
+ import InstitutionDetail from './InstitutionDetail'
62
+
63
+ export default {
64
+ name: 'HeaderNotice',
65
+ data () {
66
+ return {
67
+ loading: false,
68
+ screenWidth: document.documentElement.clientWidth,
69
+ show: false,
70
+ institutionDetailVisible: false,
71
+ institution: undefined,
72
+ affirmInstitution: undefined,
73
+ exception: [],
74
+ backlog: [],
75
+ activeKey: '1'
76
+ }
77
+ },
78
+ components: { InstitutionDetail },
79
+ computed: {},
80
+ created () {
81
+ this.getToBeConfirmed()
82
+ },
83
+ methods: {
84
+ onClose () {
85
+ this.institutionDetailVisible = false
86
+ this.getToBeConfirmed()
87
+ },
88
+ read (item) {
89
+ post('/webmeterapi/saveSingleTable', {
90
+ data: {
91
+ tablename: 't_iot_device_exception',
92
+ param: { id: item.e_id, f_is_read: 1 }
93
+ }
94
+ }).then(res => {
95
+ this.refresh()
96
+ })
97
+ },
98
+ getToBeConfirmed () {
99
+ this.institutionDetailVisible = false
100
+ try {
101
+ if (this.$login.f.name) {
102
+ post('/webmetersql/getToBeConfirmed', { data: { condition: `state = '待确认' and f_affirm_by = '${this.$login.f.name}'` } }).then(res => {
103
+ this.backlog = [...res]
104
+ if (this.backlog.length > 0) {
105
+ const key = `open${Date.now()}`
106
+ this.$notification.open({
107
+ key,
108
+ message: `您有${this.backlog.length}条待办需要确认`,
109
+ top: '50px',
110
+ description: this.backlog.map((item, index) => index + 1 + '、' + item.title).join(';'),
111
+ icon: <a-icon type="container" style="color: #f5222d"/>,
112
+ btn: h => {
113
+ return h(
114
+ 'a-button',
115
+ {
116
+ props: {
117
+ type: 'primary',
118
+ size: 'small',
119
+ },
120
+ on: {
121
+ click: () => this.viewBacklog(key),
122
+ },
123
+ },
124
+ '查看',
125
+ )
126
+ }
127
+ })
128
+ }
129
+ })
130
+ }
131
+ } catch (e) {
132
+ console.log(e)
133
+ }
134
+ },
135
+ viewBacklog (key) {
136
+ this.$notification.close(key)
137
+ this.show = true
138
+ this.activeKey = '3'
139
+ },
140
+ confirm_institution (item) {
141
+ this.institutionDetailVisible = true
142
+ this.show = false
143
+ this.institution = item.institution
144
+ this.affirmInstitution = item.id
145
+ },
146
+ refresh () {
147
+ post('/webmeterapi/commonQuery', {
148
+ queryParamsName: 'deviceExceptionQueryParams',
149
+ conditionParams: { e_f_is_read: 0 },
150
+ pageNo: 1,
151
+ pageSize: 999999
152
+ }).then(res => {
153
+ this.exception = res.data
154
+ })
155
+ },
156
+ fetchNotice () {
157
+ if (this.loading) {
158
+ this.loading = false
159
+ return
160
+ }
161
+ this.loadding = true
162
+ setTimeout(() => {
163
+ this.loadding = false
164
+ }, 1000)
165
+ }
166
+ }
167
+ }
168
+ </script>
169
+
170
+ <style lang="less">
171
+ .header-notice {
172
+ display: inline-block;
173
+ transition: all 0.3s;
174
+
175
+ span {
176
+ vertical-align: initial;
177
+ }
178
+
179
+ .notice-badge {
180
+ color: inherit;
181
+
182
+ .header-notice-icon {
183
+ font-size: 16px;
184
+ padding: 4px;
185
+ }
186
+ }
187
+ }
188
+
189
+ .dropdown-tabs {
190
+ background-color: @base-bg-color;
191
+ box-shadow: 0 2px 8px @shadow-color;
192
+ border-radius: 4px;
193
+
194
+ .tab-pane {
195
+ padding: 0 24px 12px;
196
+ min-height: 250px;
197
+ }
198
+ }
199
+ </style>