vue2-client 1.2.95 → 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 +4 -1
- package/package.json +1 -1
- package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +4 -4
- package/src/base-client/components/common/XForm/XFormItem.vue +11 -7
- package/src/config/CreateQueryConfig.js +5 -2
- package/src/layouts/header/HeaderNotice.vue +150 -96
- package/vue.config.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +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
|
+
- 文件表单项cascader 修改了一下能用了
|
|
10
|
+
- xformitem修改了两个文件上传框时得bug
|
|
11
|
+
- 新增制度待确认提示
|
|
9
12
|
|
|
10
13
|
**1.2.93 -2022-08-03 @江超**
|
|
11
14
|
- 功能新增:
|
package/package.json
CHANGED
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
</a-col>
|
|
183
183
|
<a-col v-if="item.formType" :span="9">
|
|
184
184
|
<a-card :bodyStyle="bodyStyle" title="扩展属性">
|
|
185
|
-
<template v-if="(dataMode.addOrEditForm || dataMode.queryForm ) && (item.formType === 'input' || item.formType === 'select' || item.formType === 'selects')">
|
|
185
|
+
<template v-if="(dataMode.addOrEditForm || dataMode.queryForm ) && (item.formType === 'input' || item.formType === 'select' || item.formType === 'selects' || item.formType === 'cascader')">
|
|
186
186
|
<a-divider style="font-size: 14px;margin-top: 0">提示相关</a-divider>
|
|
187
187
|
<a-form-model-item label="表单水印" prop="placeholder">
|
|
188
188
|
<a-input v-model="item.placeholder" placeholder="表单水印(placeholder)" />
|
|
@@ -330,7 +330,7 @@
|
|
|
330
330
|
style="margin-top: 5px"
|
|
331
331
|
type="error"/>
|
|
332
332
|
<a-alert
|
|
333
|
-
v-if="dataMode.addOrEditForm && !dataMode.sqlQueryItem && item.formType !== 'file' && item.formType !== 'image' && item.formType !== 'personSetting' "
|
|
333
|
+
v-if="dataMode.addOrEditForm && !dataMode.sqlQueryItem && item.formType !== 'file' && item.formType !== 'image' && item.formType !== 'personSetting' && item.formType !== 'cascader' "
|
|
334
334
|
message="错误:如果要生成新增/修改表单项,必须勾选生成SQL查询项"
|
|
335
335
|
show-icon
|
|
336
336
|
style="margin-top: 5px"
|
|
@@ -380,7 +380,7 @@ export default {
|
|
|
380
380
|
computed: {
|
|
381
381
|
// 是否展示数据源相关字段
|
|
382
382
|
selectDataShow () {
|
|
383
|
-
return this.item.formType === 'select' || (this.item.formType === 'selects' && this.item.groupIndexView === '1') || this.item.formType === 'checkbox' || this.item.formType === 'radio'
|
|
383
|
+
return this.item.formType === 'select' || this.item.formType === 'cascader' || (this.item.formType === 'selects' && this.item.groupIndexView === '1') || this.item.formType === 'checkbox' || this.item.formType === 'radio'
|
|
384
384
|
},
|
|
385
385
|
// 作用域插槽是否禁用
|
|
386
386
|
slotTypeDisabled () {
|
|
@@ -592,7 +592,7 @@ export default {
|
|
|
592
592
|
this.$message.error('请至少选择一种数据模式')
|
|
593
593
|
return
|
|
594
594
|
}
|
|
595
|
-
if (!fileBool && (this.dataMode.addOrEditForm && !this.dataMode.sqlQueryItem) && this.item.formType !== 'personSetting') {
|
|
595
|
+
if (!fileBool && (this.dataMode.addOrEditForm && !this.dataMode.sqlQueryItem) && this.item.formType !== 'personSetting' && this.item.formType !== 'cascader') {
|
|
596
596
|
this.$message.error('如果要生成新增/修改表单项,必须勾选生成SQL查询项')
|
|
597
597
|
return
|
|
598
598
|
}
|
|
@@ -170,12 +170,13 @@
|
|
|
170
170
|
:xl="xl"
|
|
171
171
|
:xxl="xxl">
|
|
172
172
|
<a-form-model-item :ref="attr.model" :label="attr.name" :prop="attr.model">
|
|
173
|
-
<
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
173
|
+
<a-cascader
|
|
174
|
+
:disabled="disabled"
|
|
175
|
+
change-on-select
|
|
176
|
+
:options="option"
|
|
177
|
+
v-model="form[attr.model]"
|
|
178
|
+
:placeholder="attr.placeholder ? attr.placeholder : '请选择'+attr.name.replace(/\s*/g, '')"
|
|
179
|
+
:rows="4"/>
|
|
179
180
|
</a-form-model-item>
|
|
180
181
|
</x-form-col>
|
|
181
182
|
<!-- 文本域 -->
|
|
@@ -323,7 +324,10 @@ export default {
|
|
|
323
324
|
},
|
|
324
325
|
// 文件框时设置上传组件的值
|
|
325
326
|
setFiles (fileIds) {
|
|
326
|
-
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]
|
|
327
331
|
},
|
|
328
332
|
// 懒加载检索方法
|
|
329
333
|
fetchFunction (value) {
|
|
@@ -38,6 +38,9 @@ module.exports = {
|
|
|
38
38
|
{
|
|
39
39
|
label: '级联选择框', key: 'selects'
|
|
40
40
|
},
|
|
41
|
+
{
|
|
42
|
+
label: 'cascader选择框', key: 'cascader'
|
|
43
|
+
},
|
|
41
44
|
{
|
|
42
45
|
label: '多选框', key: 'checkbox'
|
|
43
46
|
},
|
|
@@ -288,12 +291,12 @@ module.exports = {
|
|
|
288
291
|
{
|
|
289
292
|
label: '字典键',
|
|
290
293
|
key: 'key',
|
|
291
|
-
noMatch: ['selects']
|
|
294
|
+
noMatch: ['selects', 'cascader']
|
|
292
295
|
},
|
|
293
296
|
{
|
|
294
297
|
label: '固定集合',
|
|
295
298
|
key: 'fixArray',
|
|
296
|
-
noMatch: ['selects']
|
|
299
|
+
noMatch: ['selects', 'cascader']
|
|
297
300
|
},
|
|
298
301
|
{
|
|
299
302
|
label: '业务逻辑',
|
|
@@ -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
|
|