vue2-client 1.2.97 → 1.2.98
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.
- package/CHANGELOG.md +3 -1
- package/package.json +1 -1
- package/src/layouts/header/HeaderNotice.vue +150 -96
- package/vue.config.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
> 所有关于本项目的变化都在该文档里。
|
|
3
3
|
|
|
4
|
-
**1.2.94 -2022-08-05 - 1.2.
|
|
4
|
+
**1.2.94 -2022-08-05 - 1.2.98 @张振宇**
|
|
5
5
|
- 功能新增:
|
|
6
6
|
- 新增表单组件 人员选择框
|
|
7
7
|
- 新增表单配置可以配置自定义请求
|
|
8
8
|
- 文件表单项新增附件用途配置
|
|
9
9
|
- 文件表单项cascader 修改了一下能用了
|
|
10
|
+
- xformitem修改了两个文件上传框时得bug
|
|
11
|
+
- 新增制度待确认提示
|
|
10
12
|
|
|
11
13
|
**1.2.93 -2022-08-03 @江超**
|
|
12
14
|
- 功能新增:
|
package/package.json
CHANGED
|
@@ -1,96 +1,150 @@
|
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
</a-tab-pane>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
</
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
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-tabs>
|
|
33
|
+
</a-spin>
|
|
34
|
+
</div>
|
|
35
|
+
<span @click="fetchNotice" class="header-notice">
|
|
36
|
+
<a-badge class="notice-badge" :count="exception.length + backlog.length">
|
|
37
|
+
<a-icon :class="['header-notice-icon']" type="bell"/>
|
|
38
|
+
</a-badge>
|
|
39
|
+
</span>
|
|
40
|
+
</a-dropdown>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script>
|
|
44
|
+
import { post } from '@vue2-client/services/api'
|
|
45
|
+
import { mapState } from 'vuex'
|
|
46
|
+
|
|
47
|
+
export default {
|
|
48
|
+
name: 'HeaderNotice',
|
|
49
|
+
data () {
|
|
50
|
+
return {
|
|
51
|
+
loading: false,
|
|
52
|
+
show: false,
|
|
53
|
+
exception: [],
|
|
54
|
+
backlog: []
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
computed: {},
|
|
58
|
+
created () {
|
|
59
|
+
this.get_to_be_confirmed()
|
|
60
|
+
},
|
|
61
|
+
methods: {
|
|
62
|
+
read (item) {
|
|
63
|
+
post('/webmeterapi/saveSingleTable', {
|
|
64
|
+
data: {
|
|
65
|
+
tablename: 't_iot_device_exception',
|
|
66
|
+
param: { id: item.e_id, f_is_read: 1 }
|
|
67
|
+
}
|
|
68
|
+
}).then(res => {
|
|
69
|
+
this.refresh()
|
|
70
|
+
})
|
|
71
|
+
},
|
|
72
|
+
get_to_be_confirmed (item) {
|
|
73
|
+
try {
|
|
74
|
+
if (this.$login.f.name) {
|
|
75
|
+
post('/webmetersql/getToBeConfirmed', { data: { condition: `state = '待确认' and f_affirm_by = '${this.$login.f.name}'` } }).then(res => {
|
|
76
|
+
this.backlog = [...res]
|
|
77
|
+
})
|
|
78
|
+
}
|
|
79
|
+
} catch (e) {
|
|
80
|
+
console.log(e)
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
confirm_institution (item) {
|
|
84
|
+
post('/webmeterapi/affirmInstitution', {
|
|
85
|
+
data: {
|
|
86
|
+
tobe: [
|
|
87
|
+
{
|
|
88
|
+
id: item.id,
|
|
89
|
+
f_affirm_type: '系统确认'
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
}).then(res => {
|
|
94
|
+
this.get_to_be_confirmed()
|
|
95
|
+
})
|
|
96
|
+
},
|
|
97
|
+
refresh () {
|
|
98
|
+
post('/webmeterapi/commonQuery', {
|
|
99
|
+
queryParamsName: 'deviceExceptionQueryParams',
|
|
100
|
+
conditionParams: { e_f_is_read: 0 },
|
|
101
|
+
pageNo: 1,
|
|
102
|
+
pageSize: 999999
|
|
103
|
+
}).then(res => {
|
|
104
|
+
this.exception = res.data
|
|
105
|
+
})
|
|
106
|
+
},
|
|
107
|
+
fetchNotice () {
|
|
108
|
+
if (this.loading) {
|
|
109
|
+
this.loading = false
|
|
110
|
+
return
|
|
111
|
+
}
|
|
112
|
+
this.loadding = true
|
|
113
|
+
setTimeout(() => {
|
|
114
|
+
this.loadding = false
|
|
115
|
+
}, 1000)
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
</script>
|
|
120
|
+
|
|
121
|
+
<style lang="less">
|
|
122
|
+
.header-notice {
|
|
123
|
+
display: inline-block;
|
|
124
|
+
transition: all 0.3s;
|
|
125
|
+
|
|
126
|
+
span {
|
|
127
|
+
vertical-align: initial;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.notice-badge {
|
|
131
|
+
color: inherit;
|
|
132
|
+
|
|
133
|
+
.header-notice-icon {
|
|
134
|
+
font-size: 16px;
|
|
135
|
+
padding: 4px;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.dropdown-tabs {
|
|
141
|
+
background-color: @base-bg-color;
|
|
142
|
+
box-shadow: 0 2px 8px @shadow-color;
|
|
143
|
+
border-radius: 4px;
|
|
144
|
+
|
|
145
|
+
.tab-pane {
|
|
146
|
+
padding: 0 24px 12px;
|
|
147
|
+
min-height: 250px;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
</style>
|
package/vue.config.js
CHANGED
|
@@ -34,7 +34,7 @@ const isProd = process.env.NODE_ENV === 'production'
|
|
|
34
34
|
// ]
|
|
35
35
|
// }
|
|
36
36
|
|
|
37
|
-
const server = 'http://
|
|
37
|
+
const server = 'http://123.60.214.109:8406'
|
|
38
38
|
const local = 'http://localhost:8445/webmeter'
|
|
39
39
|
// const local = 'http://123.60.214.109:8405/webmeter'
|
|
40
40
|
|