vue2-client 1.2.102 → 1.2.106

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 (33) hide show
  1. package/.env +15 -15
  2. package/.eslintrc.js +82 -82
  3. package/CHANGELOG.md +260 -246
  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 +158 -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 +513 -507
  22. package/src/base-client/components/common/XTable/XTable.vue +6 -1
  23. package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +960 -960
  24. package/src/components/STable/index.js +2 -2
  25. package/src/config/CreateQueryConfig.js +307 -307
  26. package/src/layouts/header/HeaderNotice.vue +199 -199
  27. package/src/layouts/header/InstitutionDetail.vue +177 -177
  28. package/src/pages/login/Login.vue +1 -1
  29. package/src/router/async/router.map.js +60 -60
  30. package/src/services/api/WebmeterAnalysisViewApi.js +24 -24
  31. package/src/services/api/manage.js +16 -16
  32. package/src/services/api/restTools.js +24 -24
  33. package/vue.config.js +163 -163
@@ -1,199 +1,199 @@
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>
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>