vue2-client 1.2.96 → 1.2.99
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/base-client/components/common/PersonSetting/PersonSetting.vue +2 -13
- package/src/base-client/components/common/Upload/Upload.vue +6 -1
- package/src/base-client/components/common/XAddForm/XAddForm.vue +5 -1
- package/src/base-client/components/common/XForm/XFormItem.vue +5 -3
- package/src/layouts/header/HeaderNotice.vue +149 -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
|
@@ -79,15 +79,6 @@ export default {
|
|
|
79
79
|
type: Array,
|
|
80
80
|
default: () => []
|
|
81
81
|
},
|
|
82
|
-
// 默认选中key
|
|
83
|
-
defaultCheckedNames: {
|
|
84
|
-
type: Array,
|
|
85
|
-
default: () => []
|
|
86
|
-
},
|
|
87
|
-
defaultCheckedIds: {
|
|
88
|
-
type: Array,
|
|
89
|
-
default: () => []
|
|
90
|
-
},
|
|
91
82
|
// // 返回数据类型 String,Array 发现返回类型只能有一个
|
|
92
83
|
// type: {
|
|
93
84
|
// type: String,
|
|
@@ -115,10 +106,8 @@ export default {
|
|
|
115
106
|
this.visible = true
|
|
116
107
|
this.searchValue = ''
|
|
117
108
|
this.treeData = this.sourceTreeData
|
|
118
|
-
if (this.
|
|
119
|
-
this.checkedKeys = this.getCheckedKeys(this.
|
|
120
|
-
} else if (this.defaultCheckedNames.length > 0) {
|
|
121
|
-
this.checkedKeys = this.getCheckedKeys(this.defaultCheckedNames)
|
|
109
|
+
if (this.value.length > 0) {
|
|
110
|
+
this.checkedKeys = this.getCheckedKeys(this.value)
|
|
122
111
|
}
|
|
123
112
|
this.expandedKeys = []
|
|
124
113
|
},
|
|
@@ -70,7 +70,12 @@ export default {
|
|
|
70
70
|
...mapState('account', { currUser: 'user' })
|
|
71
71
|
},
|
|
72
72
|
created () {
|
|
73
|
-
|
|
73
|
+
const list = this.model.type === 'file' ? [...this.files] : [...this.images]
|
|
74
|
+
if (this.model.useType) {
|
|
75
|
+
this.uploadedFileList = list.filter(item => item.f_use_type === this.model.useType)
|
|
76
|
+
} else {
|
|
77
|
+
this.uploadedFileList = list
|
|
78
|
+
}
|
|
74
79
|
},
|
|
75
80
|
methods: {
|
|
76
81
|
uploadFiles (info) {
|
|
@@ -323,7 +323,11 @@ export default {
|
|
|
323
323
|
}
|
|
324
324
|
const item = this.realJsonData[i]
|
|
325
325
|
if (this.modifyModelData.data[item.model] || this.modifyModelData.data[item.model] === 0) {
|
|
326
|
-
|
|
326
|
+
if (this.modifyModelData.data[item.model] instanceof Array) {
|
|
327
|
+
this.form[item.model] = this.modifyModelData.data[item.model]
|
|
328
|
+
} else {
|
|
329
|
+
this.form[item.model] = this.modifyModelData.data[item.model] + ''
|
|
330
|
+
}
|
|
327
331
|
} else {
|
|
328
332
|
this.form[item.model] = undefined
|
|
329
333
|
}
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
:disabled="disabled"
|
|
175
175
|
change-on-select
|
|
176
176
|
:options="option"
|
|
177
|
-
|
|
177
|
+
v-model="form[attr.model]"
|
|
178
178
|
:placeholder="attr.placeholder ? attr.placeholder : '请选择'+attr.name.replace(/\s*/g, '')"
|
|
179
179
|
:rows="4"/>
|
|
180
180
|
</a-form-model-item>
|
|
@@ -313,7 +313,6 @@ export default {
|
|
|
313
313
|
created () {
|
|
314
314
|
if (this.attr.keyName && this.attr.keyName.indexOf('logic@') !== -1) {
|
|
315
315
|
this.getData({}, res => {
|
|
316
|
-
console.log(res, '====')
|
|
317
316
|
this.option = res
|
|
318
317
|
})
|
|
319
318
|
}
|
|
@@ -325,7 +324,10 @@ export default {
|
|
|
325
324
|
},
|
|
326
325
|
// 文件框时设置上传组件的值
|
|
327
326
|
setFiles (fileIds) {
|
|
328
|
-
this.form[this.attr.model]
|
|
327
|
+
if (!this.form[this.attr.model]) {
|
|
328
|
+
this.form[this.attr.model] = []
|
|
329
|
+
}
|
|
330
|
+
this.form[this.attr.model] = [...this.form[this.attr.model], ...fileIds]
|
|
329
331
|
},
|
|
330
332
|
// 懒加载检索方法
|
|
331
333
|
fetchFunction (value) {
|
|
@@ -1,96 +1,149 @@
|
|
|
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
|
+
|
|
46
|
+
export default {
|
|
47
|
+
name: 'HeaderNotice',
|
|
48
|
+
data () {
|
|
49
|
+
return {
|
|
50
|
+
loading: false,
|
|
51
|
+
show: false,
|
|
52
|
+
exception: [],
|
|
53
|
+
backlog: []
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
computed: {},
|
|
57
|
+
created () {
|
|
58
|
+
this.get_to_be_confirmed()
|
|
59
|
+
},
|
|
60
|
+
methods: {
|
|
61
|
+
read (item) {
|
|
62
|
+
post('/webmeterapi/saveSingleTable', {
|
|
63
|
+
data: {
|
|
64
|
+
tablename: 't_iot_device_exception',
|
|
65
|
+
param: { id: item.e_id, f_is_read: 1 }
|
|
66
|
+
}
|
|
67
|
+
}).then(res => {
|
|
68
|
+
this.refresh()
|
|
69
|
+
})
|
|
70
|
+
},
|
|
71
|
+
get_to_be_confirmed (item) {
|
|
72
|
+
try {
|
|
73
|
+
if (this.$login.f.name) {
|
|
74
|
+
post('/webmetersql/getToBeConfirmed', { data: { condition: `state = '待确认' and f_affirm_by = '${this.$login.f.name}'` } }).then(res => {
|
|
75
|
+
this.backlog = [...res]
|
|
76
|
+
})
|
|
77
|
+
}
|
|
78
|
+
} catch (e) {
|
|
79
|
+
console.log(e)
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
confirm_institution (item) {
|
|
83
|
+
post('/webmeterapi/affirmInstitution', {
|
|
84
|
+
data: {
|
|
85
|
+
tobe: [
|
|
86
|
+
{
|
|
87
|
+
id: item.id,
|
|
88
|
+
f_affirm_type: '系统确认'
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
}).then(res => {
|
|
93
|
+
this.get_to_be_confirmed()
|
|
94
|
+
})
|
|
95
|
+
},
|
|
96
|
+
refresh () {
|
|
97
|
+
post('/webmeterapi/commonQuery', {
|
|
98
|
+
queryParamsName: 'deviceExceptionQueryParams',
|
|
99
|
+
conditionParams: { e_f_is_read: 0 },
|
|
100
|
+
pageNo: 1,
|
|
101
|
+
pageSize: 999999
|
|
102
|
+
}).then(res => {
|
|
103
|
+
this.exception = res.data
|
|
104
|
+
})
|
|
105
|
+
},
|
|
106
|
+
fetchNotice () {
|
|
107
|
+
if (this.loading) {
|
|
108
|
+
this.loading = false
|
|
109
|
+
return
|
|
110
|
+
}
|
|
111
|
+
this.loadding = true
|
|
112
|
+
setTimeout(() => {
|
|
113
|
+
this.loadding = false
|
|
114
|
+
}, 1000)
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
</script>
|
|
119
|
+
|
|
120
|
+
<style lang="less">
|
|
121
|
+
.header-notice {
|
|
122
|
+
display: inline-block;
|
|
123
|
+
transition: all 0.3s;
|
|
124
|
+
|
|
125
|
+
span {
|
|
126
|
+
vertical-align: initial;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.notice-badge {
|
|
130
|
+
color: inherit;
|
|
131
|
+
|
|
132
|
+
.header-notice-icon {
|
|
133
|
+
font-size: 16px;
|
|
134
|
+
padding: 4px;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.dropdown-tabs {
|
|
140
|
+
background-color: @base-bg-color;
|
|
141
|
+
box-shadow: 0 2px 8px @shadow-color;
|
|
142
|
+
border-radius: 4px;
|
|
143
|
+
|
|
144
|
+
.tab-pane {
|
|
145
|
+
padding: 0 24px 12px;
|
|
146
|
+
min-height: 250px;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
</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
|
|