htui-yllkbz 1.5.12 → 1.5.16
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/lib/htui.common.js +86 -76
- package/lib/htui.common.js.gz +0 -0
- package/lib/htui.css +1 -1
- package/lib/htui.umd.js +86 -76
- package/lib/htui.umd.js.gz +0 -0
- package/lib/htui.umd.min.js +5 -5
- package/lib/htui.umd.min.js.gz +0 -0
- package/package.json +2 -2
- package/src/App.vue +148 -151
- package/src/packages/HtBaseData/index.vue +236 -279
- package/src/packages/HtOffice/cryto.js +5989 -0
- package/src/packages/HtOffice/index.ts +16 -0
- package/src/packages/HtOffice/index.vue +491 -0
- package/src/packages/HtSelectUser/index.vue +29 -25
- package/src/packages/index.ts +2 -1
- package/src/shims-js.d.ts +12 -0
|
@@ -1,30 +1,27 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<!-- 选择部门 -->
|
|
4
|
-
<template
|
|
5
|
-
v-if="
|
|
4
|
+
<template v-if="
|
|
6
5
|
state.configJson['departmentId'] &&
|
|
7
6
|
state.configJson['departmentId'].show
|
|
8
|
-
"
|
|
9
|
-
>
|
|
7
|
+
">
|
|
10
8
|
<!-- multiple: state.configJson['departmentId'].multiple, -->
|
|
11
|
-
<el-cascader
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
:props="{
|
|
9
|
+
<el-cascader v-if="!state.configJson['departmentId'].panel"
|
|
10
|
+
:disabled="!!disabled"
|
|
11
|
+
:size="size"
|
|
12
|
+
popper-class="ht-cascader-poper"
|
|
13
|
+
class="component-item "
|
|
14
|
+
:class="comClass"
|
|
15
|
+
style="width:100%"
|
|
16
|
+
:style="comStyle || ''"
|
|
17
|
+
:filter-method="filterMethodOrg"
|
|
18
|
+
:filterable="!state.configJson['departmentId'].multiple"
|
|
19
|
+
:clearable="state.configJson['departmentId'].clearable"
|
|
20
|
+
:placeholder="placeholder || `请选择部门`"
|
|
21
|
+
:collapse-tags="state.configJson['departmentId'].collapseTags"
|
|
22
|
+
v-model="state.selectVal['departmentId']"
|
|
23
|
+
:show-all-levels="state.configJson['departmentId'].showAllLevels"
|
|
24
|
+
:props="{
|
|
28
25
|
label: 'name',
|
|
29
26
|
value: 'id',
|
|
30
27
|
children: 'children',
|
|
@@ -33,23 +30,21 @@
|
|
|
33
30
|
checkStrictly: state.configJson['departmentId'].checkStrictly,
|
|
34
31
|
multiple: state.configJson['departmentId'].multiple,
|
|
35
32
|
}"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
>
|
|
33
|
+
@click.native="selectClick($event)"
|
|
34
|
+
ref="departmentId"
|
|
35
|
+
@change="setSelctData('departmentId', $event)"
|
|
36
|
+
:options="organizationUsersTree">
|
|
41
37
|
</el-cascader>
|
|
42
|
-
<el-cascader-panel
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
:props="{
|
|
38
|
+
<el-cascader-panel :size="size"
|
|
39
|
+
v-if="state.configJson['departmentId'].panel"
|
|
40
|
+
class="component-item"
|
|
41
|
+
popper-class="ht-cascader-poper"
|
|
42
|
+
:class="comClass"
|
|
43
|
+
style="width:100%"
|
|
44
|
+
:style="comStyle || ''"
|
|
45
|
+
:placeholder="placeholder || `请选择部门`"
|
|
46
|
+
v-model="state.selectVal['departmentId']"
|
|
47
|
+
:props="{
|
|
53
48
|
label: 'name',
|
|
54
49
|
value: 'id',
|
|
55
50
|
children: 'children',
|
|
@@ -58,54 +53,46 @@
|
|
|
58
53
|
checkStrictly: state.configJson['departmentId'].checkStrictly,
|
|
59
54
|
multiple: state.configJson['departmentId'].multiple,
|
|
60
55
|
}"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
>
|
|
56
|
+
ref="departmentId"
|
|
57
|
+
@change="setSelctData('departmentId', $event)"
|
|
58
|
+
:options="organizationUsersTree">
|
|
65
59
|
<template slot-scope="{ data }">
|
|
66
60
|
<span>{{ data.label }}</span>
|
|
67
61
|
</template>
|
|
68
62
|
</el-cascader-panel>
|
|
69
63
|
</template>
|
|
70
64
|
<!-- 选择人员 -->
|
|
71
|
-
<el-select
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
:value="item.id"
|
|
89
|
-
:title="`所在部门:${item.organizationNames}`"
|
|
90
|
-
>
|
|
65
|
+
<el-select v-model="state.selectVal['userId']"
|
|
66
|
+
:popper-append-to-body="appendToBody"
|
|
67
|
+
:placeholder="placeholder || '请选择人员'"
|
|
68
|
+
:filterable="!state.configJson['userId'].multiple"
|
|
69
|
+
:disabled="!!disabled"
|
|
70
|
+
:style="comStyle || ''"
|
|
71
|
+
class="component-item"
|
|
72
|
+
style="width:100%"
|
|
73
|
+
@click.native="selectClick($event)"
|
|
74
|
+
v-if="state.configJson['userId'] && state.configJson['userId'].show"
|
|
75
|
+
:multiple="state.configJson['userId'].multiple">
|
|
76
|
+
<el-option v-for="item in userDataList"
|
|
77
|
+
:key="item.id"
|
|
78
|
+
:label="item.value"
|
|
79
|
+
:disabled="item.showLocked?false:!item.isActive"
|
|
80
|
+
:value="item.id"
|
|
81
|
+
:title="`所在部门:${item.organizationNames}`">
|
|
91
82
|
<span>
|
|
92
|
-
<p
|
|
93
|
-
|
|
94
|
-
:class="
|
|
83
|
+
<p class="ht-user-dot"
|
|
84
|
+
:class="
|
|
95
85
|
item.dutyOfficer && !item.dutyOfficer.status
|
|
96
86
|
? 'ht-user-dot-disabled'
|
|
97
87
|
: ''
|
|
98
88
|
"
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
class="ht-user-name"
|
|
103
|
-
:class="
|
|
89
|
+
v-if="item.dutyOfficer"></p>
|
|
90
|
+
<p class="ht-user-name"
|
|
91
|
+
:class="
|
|
104
92
|
item.dutyOfficer && !item.dutyOfficer.status
|
|
105
93
|
? 'ht-user-disabled'
|
|
106
94
|
: ''
|
|
107
|
-
"
|
|
108
|
-
>
|
|
95
|
+
">
|
|
109
96
|
{{ item.value
|
|
110
97
|
}}<span v-if="item.phoneNumber"> ({{ item.phoneNumber }}) </span>
|
|
111
98
|
</p>
|
|
@@ -113,29 +100,26 @@
|
|
|
113
100
|
</el-option>
|
|
114
101
|
</el-select>
|
|
115
102
|
<!-- 选择部门下人员 -->
|
|
116
|
-
<template
|
|
117
|
-
v-if="
|
|
103
|
+
<template v-if="
|
|
118
104
|
state.configJson['departmentUser'] &&
|
|
119
105
|
state.configJson['departmentUser'].show
|
|
120
|
-
"
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
:show-all-levels="state.configJson['departmentUser'].showAllLevels"
|
|
138
|
-
:props="{
|
|
106
|
+
">
|
|
107
|
+
<el-cascader :size="size"
|
|
108
|
+
popper-class="ht-cascader-poper"
|
|
109
|
+
v-if="!state.configJson['departmentUser'].panel"
|
|
110
|
+
:disabled="!!disabled"
|
|
111
|
+
class="component-item"
|
|
112
|
+
style="width:100%"
|
|
113
|
+
:filterable="!state.configJson['departmentUser'].multiple"
|
|
114
|
+
:class="comClass"
|
|
115
|
+
:style="comStyle || ''"
|
|
116
|
+
:filter-method="filterMethod"
|
|
117
|
+
:clearable="state.configJson['departmentUser'].clearable"
|
|
118
|
+
:placeholder="placeholder || `请选择部门下人员`"
|
|
119
|
+
:collapse-tags="state.configJson['departmentUser'].collapseTags"
|
|
120
|
+
v-model="state.selectVal['departmentUser']"
|
|
121
|
+
:show-all-levels="state.configJson['departmentUser'].showAllLevels"
|
|
122
|
+
:props="{
|
|
139
123
|
label: 'label',
|
|
140
124
|
value: 'id',
|
|
141
125
|
children: 'childrenList',
|
|
@@ -144,15 +128,13 @@
|
|
|
144
128
|
checkStrictly: state.configJson['departmentUser'].checkStrictly,
|
|
145
129
|
multiple: state.configJson['departmentUser'].multiple,
|
|
146
130
|
}"
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
>
|
|
131
|
+
ref="departmentUser"
|
|
132
|
+
@click.native="selectClick($event)"
|
|
133
|
+
@change="setSelctData('departmentUser', $event)"
|
|
134
|
+
:options="organizationUsersTreeUser">
|
|
152
135
|
<template slot-scope="{ data }">
|
|
153
|
-
<p
|
|
154
|
-
|
|
155
|
-
style="
|
|
136
|
+
<p class="ht-user-dot"
|
|
137
|
+
style="
|
|
156
138
|
padding: 0;
|
|
157
139
|
margin: 0;
|
|
158
140
|
float: left;
|
|
@@ -164,36 +146,32 @@
|
|
|
164
146
|
border-radius: 10px;
|
|
165
147
|
margin-right: 4px;
|
|
166
148
|
"
|
|
167
|
-
|
|
149
|
+
:style="
|
|
168
150
|
data.dutyOfficer && !data.dutyOfficer.status
|
|
169
151
|
? 'background: #ccc;'
|
|
170
152
|
: ''
|
|
171
153
|
"
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
data.dutyOfficer && !data.dutyOfficer.status ? 'color:#ddd' : ''
|
|
179
|
-
"
|
|
180
|
-
>
|
|
154
|
+
v-if="data.dutyOfficer"></p>
|
|
155
|
+
<p class="ht-user-name"
|
|
156
|
+
style="padding: 0; margin: 0; float: left"
|
|
157
|
+
:style="
|
|
158
|
+
( data.dutyOfficer && !data.dutyOfficer.status)||data.disabled ? 'color:#ddd' : ''
|
|
159
|
+
">
|
|
181
160
|
{{ data.label }}
|
|
182
161
|
</p>
|
|
183
162
|
</template>
|
|
184
163
|
</el-cascader>
|
|
185
|
-
<el-cascader-panel
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
:props="{
|
|
164
|
+
<el-cascader-panel v-else
|
|
165
|
+
:size="size"
|
|
166
|
+
popper-class="ht-cascader-poper"
|
|
167
|
+
:style="panStyle"
|
|
168
|
+
:filterable="!state.configJson['departmentUser'].multiple"
|
|
169
|
+
:filter-method="filterMethod"
|
|
170
|
+
class="component-item"
|
|
171
|
+
style="width:100%"
|
|
172
|
+
:placeholder="placeholder || `请选择部门下人员`"
|
|
173
|
+
v-model="state.selectVal['departmentUser']"
|
|
174
|
+
:props="{
|
|
197
175
|
label: 'label',
|
|
198
176
|
value: 'id',
|
|
199
177
|
children: 'childrenList',
|
|
@@ -202,14 +180,12 @@
|
|
|
202
180
|
checkStrictly: state.configJson['departmentUser'].checkStrictly,
|
|
203
181
|
multiple: state.configJson['departmentUser'].multiple,
|
|
204
182
|
}"
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
>
|
|
183
|
+
ref="departmentUser"
|
|
184
|
+
@change="setSelctData('departmentUser', $event)"
|
|
185
|
+
:options="organizationUsersTreeUser">
|
|
209
186
|
<template slot-scope="{ data }">
|
|
210
|
-
<p
|
|
211
|
-
|
|
212
|
-
style="
|
|
187
|
+
<p class="ht-user-dot"
|
|
188
|
+
style="
|
|
213
189
|
padding: 0;
|
|
214
190
|
margin: 0;
|
|
215
191
|
float: left;
|
|
@@ -221,20 +197,17 @@
|
|
|
221
197
|
border-radius: 10px;
|
|
222
198
|
margin-right: 4px;
|
|
223
199
|
"
|
|
224
|
-
|
|
225
|
-
data.dutyOfficer && !data.dutyOfficer.status
|
|
200
|
+
:style="
|
|
201
|
+
(data.dutyOfficer && !data.dutyOfficer.status)
|
|
226
202
|
? 'background: #ccc;'
|
|
227
203
|
: ''
|
|
228
204
|
"
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
data.dutyOfficer && !data.dutyOfficer.status ? 'color:#ddd' : ''
|
|
236
|
-
"
|
|
237
|
-
>
|
|
205
|
+
v-if="data.dutyOfficer"></p>
|
|
206
|
+
<p class="ht-user-name"
|
|
207
|
+
style="padding: 0; margin: 0; float: left"
|
|
208
|
+
:style="
|
|
209
|
+
( data.dutyOfficer && !data.dutyOfficer.status)||data.disabled? 'color:#ddd' : ''
|
|
210
|
+
">
|
|
238
211
|
{{ data.label }}
|
|
239
212
|
</p>
|
|
240
213
|
</template>
|
|
@@ -244,45 +217,37 @@
|
|
|
244
217
|
<template v-for="item in state.resData.dictionaryCategory.items">
|
|
245
218
|
<!-- 选择严重等级 -->
|
|
246
219
|
<template v-if="item.code == 'SeverityLevel'">
|
|
247
|
-
<el-select
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
<span
|
|
272
|
-
style="display: flex;
|
|
273
|
-
align-items: center;"
|
|
274
|
-
>
|
|
275
|
-
<b
|
|
276
|
-
class="item-origin"
|
|
277
|
-
:style="{
|
|
220
|
+
<el-select :popper-append-to-body="appendToBody"
|
|
221
|
+
v-if="state.configJson[item.code] && state.configJson[item.code].show"
|
|
222
|
+
v-model="state.selectVal[item.code]"
|
|
223
|
+
:disabled="!!disabled"
|
|
224
|
+
:key="item.id"
|
|
225
|
+
:clearable="state.configJson[item.code].clearable"
|
|
226
|
+
:style="comStyle || ''"
|
|
227
|
+
:placeholder="placeholder || '请选择严重等级'"
|
|
228
|
+
:filterable="!state.configJson[item.code].multiple"
|
|
229
|
+
class="component-item"
|
|
230
|
+
:multiple="state.configJson[item.code].multiple"
|
|
231
|
+
style="width:100%"
|
|
232
|
+
@click.native="selectClick($event)"
|
|
233
|
+
@change="setSelctItem(item.code)">
|
|
234
|
+
<el-option v-for="item in SeverityLevel"
|
|
235
|
+
:key="item.id"
|
|
236
|
+
:style="panStyle"
|
|
237
|
+
:label="hideCode ? item.name : `${item.name}(${item.value})`"
|
|
238
|
+
:value="`${item.value}`"
|
|
239
|
+
:title="`${item.name}(${item.value})`">
|
|
240
|
+
<span style="display: flex;
|
|
241
|
+
align-items: center;">
|
|
242
|
+
<b class="item-origin"
|
|
243
|
+
:style="{
|
|
278
244
|
'background-color': `${item.color}`,
|
|
279
245
|
display: `inline-block`,
|
|
280
246
|
width: `6px`,
|
|
281
247
|
height: `6px`,
|
|
282
248
|
overflow: `hidden`,
|
|
283
249
|
'border-width': '0',
|
|
284
|
-
}"
|
|
285
|
-
></b>
|
|
250
|
+
}"></b>
|
|
286
251
|
{{ item.name }}
|
|
287
252
|
</span>
|
|
288
253
|
<span v-if="item.phoneNumber"> ({{ item.phoneNumber }}) </span>
|
|
@@ -291,37 +256,31 @@
|
|
|
291
256
|
</template>
|
|
292
257
|
<!-- 选择响应列表 -->
|
|
293
258
|
<template v-else-if="item.code == 'ResponseList'">
|
|
294
|
-
<el-select
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
:label="hideCode ? item.name : `${item.name}(${item.value})`"
|
|
314
|
-
:value="item.value"
|
|
315
|
-
:title="`${item.name}(${item.value})`"
|
|
316
|
-
>
|
|
259
|
+
<el-select :popper-append-to-body="appendToBody"
|
|
260
|
+
v-if="state.configJson[item.code] && state.configJson[item.code].show"
|
|
261
|
+
v-model="state.selectVal[item.code]"
|
|
262
|
+
:key="item.id"
|
|
263
|
+
:disabled="!!disabled"
|
|
264
|
+
:style="comStyle || ''"
|
|
265
|
+
:multiple="state.configJson[item.code].multiple"
|
|
266
|
+
:clearable="state.configJson[item.code].clearable"
|
|
267
|
+
:placeholder="placeholder || '请选择响应列表'"
|
|
268
|
+
:filterable="!state.configJson[item.code].multiple"
|
|
269
|
+
class="component-item"
|
|
270
|
+
@click.native="selectClick($event)"
|
|
271
|
+
@change="setSelctItem(item.code)">
|
|
272
|
+
<el-option v-for="item in ResponseList"
|
|
273
|
+
:key="item.id"
|
|
274
|
+
:style="panStyle"
|
|
275
|
+
:label="hideCode ? item.name : `${item.name}(${item.value})`"
|
|
276
|
+
:value="item.value"
|
|
277
|
+
:title="`${item.name}(${item.value})`">
|
|
317
278
|
<span>
|
|
318
|
-
<b
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
:style="{
|
|
279
|
+
<b v-if="item.color"
|
|
280
|
+
class="item-origin"
|
|
281
|
+
:style="{
|
|
322
282
|
'border-color': `${item.color}`,
|
|
323
|
-
}"
|
|
324
|
-
></b>
|
|
283
|
+
}"></b>
|
|
325
284
|
{{ item.name }}
|
|
326
285
|
</span>
|
|
327
286
|
<span v-if="item.phoneNumber"> ({{ item.phoneNumber }}) </span>
|
|
@@ -330,26 +289,23 @@
|
|
|
330
289
|
</template>
|
|
331
290
|
<!-- 基础数据级联选择 -->
|
|
332
291
|
<template v-else>
|
|
333
|
-
<template
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
:collapse-tags="state.configJson[item.code].collapseTags"
|
|
351
|
-
:show-all-levels="state.configJson[item.code].showAllLevels"
|
|
352
|
-
:props="{
|
|
292
|
+
<template v-if="state.configJson[item.code] && state.configJson[item.code].show">
|
|
293
|
+
<el-cascader :size="size"
|
|
294
|
+
popper-class="ht-cascader-poper"
|
|
295
|
+
v-if="!state.configJson[item.code].panel"
|
|
296
|
+
:placeholder="placeholder || `请选择${item.name}`"
|
|
297
|
+
:disabled="!!disabled"
|
|
298
|
+
class="component-item"
|
|
299
|
+
:style="comStyle || ''"
|
|
300
|
+
:key="item.id"
|
|
301
|
+
style="width:100%"
|
|
302
|
+
:filterable="!state.configJson[item.code].multiple"
|
|
303
|
+
:clearable="state.configJson[item.code].clearable"
|
|
304
|
+
@click.native="selectClick($event)"
|
|
305
|
+
v-model="state.selectVal[item.code]"
|
|
306
|
+
:collapse-tags="state.configJson[item.code].collapseTags"
|
|
307
|
+
:show-all-levels="state.configJson[item.code].showAllLevels"
|
|
308
|
+
:props="{
|
|
353
309
|
label: hideCode ? 'name' : 'label',
|
|
354
310
|
value: 'id',
|
|
355
311
|
children: 'children',
|
|
@@ -358,22 +314,20 @@
|
|
|
358
314
|
checkStrictly: state.configJson[item.code].checkStrictly,
|
|
359
315
|
multiple: state.configJson[item.code].multiple,
|
|
360
316
|
}"
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
v-model="state.selectVal[item.code]"
|
|
376
|
-
:props="{
|
|
317
|
+
:ref="`${item.code}`"
|
|
318
|
+
@change="setSelctData(item.code, $event)"
|
|
319
|
+
:options="getbaseDataInfo[item.id]"></el-cascader>
|
|
320
|
+
<el-cascader-panel v-else
|
|
321
|
+
:size="size"
|
|
322
|
+
popper-class="ht-cascader-poper"
|
|
323
|
+
@click.native="selectClick($event)"
|
|
324
|
+
:placeholder="placeholder || `请选择${item.name}`"
|
|
325
|
+
class="component-item"
|
|
326
|
+
style="width:100%"
|
|
327
|
+
:key="item.id"
|
|
328
|
+
:style="panStyle"
|
|
329
|
+
v-model="state.selectVal[item.code]"
|
|
330
|
+
:props="{
|
|
377
331
|
label: hideCode ? 'name' : 'label',
|
|
378
332
|
value: 'id',
|
|
379
333
|
children: 'children',
|
|
@@ -382,10 +336,9 @@
|
|
|
382
336
|
checkStrictly: state.configJson[item.code].checkStrictly,
|
|
383
337
|
multiple: state.configJson[item.code].multiple,
|
|
384
338
|
}"
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
></el-cascader-panel>
|
|
339
|
+
:ref="`${item.code}`"
|
|
340
|
+
@change="setSelctData(item.code, $event)"
|
|
341
|
+
:options="getbaseDataInfo[item.id]"></el-cascader-panel>
|
|
389
342
|
</template>
|
|
390
343
|
</template>
|
|
391
344
|
</template>
|
|
@@ -400,21 +353,21 @@
|
|
|
400
353
|
</template>
|
|
401
354
|
|
|
402
355
|
<script lang="ts">
|
|
403
|
-
import { Vue, Prop, Emit, Component, Watch } from
|
|
356
|
+
import { Vue, Prop, Emit, Component, Watch } from "vue-property-decorator";
|
|
404
357
|
|
|
405
358
|
import {
|
|
406
359
|
BaseDataDto,
|
|
407
360
|
DictionaryCategoryDto,
|
|
408
361
|
DictionaryDataDto,
|
|
409
362
|
SeverityLevelDto,
|
|
410
|
-
} from
|
|
363
|
+
} from "@/plugins/commonApi";
|
|
411
364
|
/* eslint-disable @typescript-eslint/camelcase */
|
|
412
365
|
import {
|
|
413
366
|
ListResultDto_1OfOfOrganizationUnitWithUsersAndContractsAnd_0AndCulture_neutralAndPublicKeyToken_null,
|
|
414
367
|
OrganizationUnitWithDetailsDto,
|
|
415
368
|
OrganizationUnitDto,
|
|
416
|
-
} from
|
|
417
|
-
import { _axios, baseConfig } from
|
|
369
|
+
} from "@/plugins/Auth";
|
|
370
|
+
import { _axios, baseConfig } from "vue-kst-auth";
|
|
418
371
|
interface Inuser {
|
|
419
372
|
concurrencyStamp: string;
|
|
420
373
|
email: string;
|
|
@@ -553,7 +506,7 @@ interface State {
|
|
|
553
506
|
};
|
|
554
507
|
}
|
|
555
508
|
@Component({
|
|
556
|
-
name:
|
|
509
|
+
name: "HtBaseData",
|
|
557
510
|
components: {},
|
|
558
511
|
})
|
|
559
512
|
export default class CommonDatas extends Vue {
|
|
@@ -563,6 +516,7 @@ export default class CommonDatas extends Vue {
|
|
|
563
516
|
@Prop() comClass?: string;
|
|
564
517
|
/** 隐藏编码 */
|
|
565
518
|
@Prop() hideCode?: boolean;
|
|
519
|
+
@Prop() showLocked?: boolean;
|
|
566
520
|
@Prop() placeholder?: string;
|
|
567
521
|
/** 自定义style */
|
|
568
522
|
@Prop() comStyle?: string;
|
|
@@ -596,9 +550,10 @@ export default class CommonDatas extends Vue {
|
|
|
596
550
|
users: {
|
|
597
551
|
items: [],
|
|
598
552
|
},
|
|
599
|
-
SessionState:
|
|
553
|
+
SessionState: "",
|
|
600
554
|
userInOrganiza: [],
|
|
601
|
-
organizationUsers:
|
|
555
|
+
organizationUsers:
|
|
556
|
+
new ListResultDto_1OfOfOrganizationUnitWithUsersAndContractsAnd_0AndCulture_neutralAndPublicKeyToken_null(),
|
|
602
557
|
},
|
|
603
558
|
selectVal: {},
|
|
604
559
|
selectValData: {},
|
|
@@ -610,7 +565,7 @@ export default class CommonDatas extends Vue {
|
|
|
610
565
|
if (!baseConfig.getLoginState()) {
|
|
611
566
|
return;
|
|
612
567
|
}
|
|
613
|
-
const data = window.localStorage.getItem(
|
|
568
|
+
const data = window.localStorage.getItem("commonDatas");
|
|
614
569
|
if (data) {
|
|
615
570
|
this.state.resData = Object.assign(this.state.resData, JSON.parse(data));
|
|
616
571
|
}
|
|
@@ -621,31 +576,31 @@ export default class CommonDatas extends Vue {
|
|
|
621
576
|
const { items } = this.state.resData.dictionaryCategory;
|
|
622
577
|
let configJson: any = {
|
|
623
578
|
departmentId: {
|
|
624
|
-
name:
|
|
579
|
+
name: "部门树结构",
|
|
625
580
|
show: true,
|
|
626
581
|
showAllLevels: false,
|
|
627
582
|
multiple: false,
|
|
628
|
-
code:
|
|
583
|
+
code: "departmentId",
|
|
629
584
|
data: {},
|
|
630
585
|
checkStrictly: true,
|
|
631
586
|
panel: false,
|
|
632
587
|
},
|
|
633
588
|
departmentUser: {
|
|
634
|
-
name:
|
|
589
|
+
name: "部门下人员",
|
|
635
590
|
show: true,
|
|
636
591
|
showAllLevels: false,
|
|
637
592
|
multiple: false,
|
|
638
|
-
code:
|
|
593
|
+
code: "departmentUser",
|
|
639
594
|
data: {},
|
|
640
595
|
checkStrictly: false,
|
|
641
596
|
panel: false,
|
|
642
597
|
},
|
|
643
598
|
userId: {
|
|
644
|
-
name:
|
|
599
|
+
name: "部门人员",
|
|
645
600
|
show: true,
|
|
646
601
|
showAllLevels: false,
|
|
647
602
|
multiple: false,
|
|
648
|
-
code:
|
|
603
|
+
code: "userId",
|
|
649
604
|
data: {},
|
|
650
605
|
checkStrictly: false,
|
|
651
606
|
panel: false,
|
|
@@ -664,7 +619,7 @@ export default class CommonDatas extends Vue {
|
|
|
664
619
|
data: {},
|
|
665
620
|
checkStrictly: true,
|
|
666
621
|
panel: false,
|
|
667
|
-
key:
|
|
622
|
+
key: "a1c72763-0ed5-0ba8-5131-39fdf96dfe9a",
|
|
668
623
|
},
|
|
669
624
|
};
|
|
670
625
|
});
|
|
@@ -685,7 +640,7 @@ export default class CommonDatas extends Vue {
|
|
|
685
640
|
if (Object.prototype.hasOwnProperty.call(this.state.configJson, key)) {
|
|
686
641
|
const element = this.state.configJson[key];
|
|
687
642
|
|
|
688
|
-
this.$set(this.state.selectVal, key, element.key ||
|
|
643
|
+
this.$set(this.state.selectVal, key, element.key || "");
|
|
689
644
|
}
|
|
690
645
|
}
|
|
691
646
|
}
|
|
@@ -693,7 +648,7 @@ export default class CommonDatas extends Vue {
|
|
|
693
648
|
/** 重写window的一个方法,解决web components组件获取样式报错问题 */
|
|
694
649
|
rewriteGetComputedStyle() {
|
|
695
650
|
const getComputedStyle = window.getComputedStyle;
|
|
696
|
-
window.getComputedStyle = function(element: any, property) {
|
|
651
|
+
window.getComputedStyle = function (element: any, property) {
|
|
697
652
|
return getComputedStyle(element.host || element, property);
|
|
698
653
|
};
|
|
699
654
|
}
|
|
@@ -732,15 +687,15 @@ export default class CommonDatas extends Vue {
|
|
|
732
687
|
const code = this.state.selectVal[key];
|
|
733
688
|
let codelist: string[];
|
|
734
689
|
if (!Array.isArray(code)) {
|
|
735
|
-
codelist = code ? code.toString().split(
|
|
690
|
+
codelist = code ? code.toString().split(",") : [];
|
|
736
691
|
}
|
|
737
692
|
switch (key) {
|
|
738
|
-
case
|
|
693
|
+
case "SeverityLevel":
|
|
739
694
|
this.state.selectValData[key] = this.SeverityLevel.filter((item) =>
|
|
740
695
|
codelist.some((val) => val == item.value?.toString())
|
|
741
696
|
);
|
|
742
697
|
break;
|
|
743
|
-
case
|
|
698
|
+
case "ResponseList":
|
|
744
699
|
this.state.selectValData[key] = this.SeverityLevel.filter((item) =>
|
|
745
700
|
codelist.some((val) => val == item.id)
|
|
746
701
|
);
|
|
@@ -751,7 +706,7 @@ export default class CommonDatas extends Vue {
|
|
|
751
706
|
}
|
|
752
707
|
|
|
753
708
|
this.$emit(
|
|
754
|
-
|
|
709
|
+
"change",
|
|
755
710
|
this.state.selectValData[key] && this.state.selectValData[key].length
|
|
756
711
|
? this.state.selectValData
|
|
757
712
|
: { [key]: [] }
|
|
@@ -810,7 +765,7 @@ export default class CommonDatas extends Vue {
|
|
|
810
765
|
this.state.selectValData[key] = [];
|
|
811
766
|
checkNodes.forEach(
|
|
812
767
|
(item: { data?: { id: string; name: string } } | undefined) => {
|
|
813
|
-
const { data } = item || { data:
|
|
768
|
+
const { data } = item || { data: "" };
|
|
814
769
|
if (data && !this.state.selectValData[key].includes(data)) {
|
|
815
770
|
this.state.selectValData[key].push(data);
|
|
816
771
|
}
|
|
@@ -822,7 +777,7 @@ export default class CommonDatas extends Vue {
|
|
|
822
777
|
}
|
|
823
778
|
|
|
824
779
|
this.$emit(
|
|
825
|
-
|
|
780
|
+
"change",
|
|
826
781
|
this.state.selectValData[key] && this.state.selectValData[key].length
|
|
827
782
|
? this.state.selectValData
|
|
828
783
|
: { [key]: [] }
|
|
@@ -852,9 +807,9 @@ export default class CommonDatas extends Vue {
|
|
|
852
807
|
/** 获取基础数据列表 */
|
|
853
808
|
const { items: baseItems } = this.state.resData.baseData;
|
|
854
809
|
this.state.resData.dictionaryCategory.items.forEach((item) => {
|
|
855
|
-
body[item.id ||
|
|
810
|
+
body[item.id || ""] = [];
|
|
856
811
|
if (this.org) {
|
|
857
|
-
body[item.id ||
|
|
812
|
+
body[item.id || ""] = this.recursion(
|
|
858
813
|
baseItems.filter(
|
|
859
814
|
(val) =>
|
|
860
815
|
val.category == item.code &&
|
|
@@ -863,25 +818,25 @@ export default class CommonDatas extends Vue {
|
|
|
863
818
|
)
|
|
864
819
|
);
|
|
865
820
|
if (this.parentId) {
|
|
866
|
-
const arr = body[item.id ||
|
|
821
|
+
const arr = body[item.id || ""].filter(
|
|
867
822
|
(item) => item.id === this.parentId
|
|
868
823
|
);
|
|
869
|
-
body[item.id ||
|
|
824
|
+
body[item.id || ""] =
|
|
870
825
|
Array.isArray(arr) && arr.length
|
|
871
826
|
? (arr[0].children as BaseDataDto[])
|
|
872
827
|
: arr;
|
|
873
828
|
}
|
|
874
829
|
} else {
|
|
875
|
-
body[item.id ||
|
|
830
|
+
body[item.id || ""] = this.recursion(
|
|
876
831
|
baseItems.filter(
|
|
877
832
|
(val) => val.category == item.code && val.isEnabled !== false
|
|
878
833
|
)
|
|
879
834
|
);
|
|
880
835
|
if (this.parentId) {
|
|
881
|
-
const arr = body[item.id ||
|
|
836
|
+
const arr = body[item.id || ""].filter(
|
|
882
837
|
(item) => item.id === this.parentId
|
|
883
838
|
);
|
|
884
|
-
body[item.id ||
|
|
839
|
+
body[item.id || ""] =
|
|
885
840
|
Array.isArray(arr) && arr.length
|
|
886
841
|
? (arr[0].children as BaseDataDto[])
|
|
887
842
|
: arr;
|
|
@@ -896,7 +851,7 @@ export default class CommonDatas extends Vue {
|
|
|
896
851
|
get ResponseList() {
|
|
897
852
|
return (
|
|
898
853
|
this.state.resData.dictionaryData.filter(
|
|
899
|
-
(val) => val.categoryCode ==
|
|
854
|
+
(val) => val.categoryCode == "ResponseList"
|
|
900
855
|
) || []
|
|
901
856
|
);
|
|
902
857
|
}
|
|
@@ -951,20 +906,22 @@ export default class CommonDatas extends Vue {
|
|
|
951
906
|
users?: any[];
|
|
952
907
|
children?: any[];
|
|
953
908
|
childrenList: any[] | undefined;
|
|
954
|
-
}
|
|
909
|
+
}>,
|
|
910
|
+
showLocked = true
|
|
955
911
|
) {
|
|
956
912
|
return data.reduce((prv: any[], cur) => {
|
|
957
913
|
/** 合并部门人员数据 */
|
|
958
914
|
cur.childrenList = [];
|
|
959
915
|
if (cur.users) {
|
|
960
916
|
cur.users.map((item) => {
|
|
917
|
+
item.disabled = showLocked ? false : !item.isActive;
|
|
961
918
|
if (item.displayName) {
|
|
962
919
|
item.name = item.displayName;
|
|
963
920
|
} else {
|
|
964
921
|
if (item.surname) {
|
|
965
|
-
item.name = `${item.surname ||
|
|
922
|
+
item.name = `${item.surname || ""}${item.name || ""}`;
|
|
966
923
|
} else {
|
|
967
|
-
item.name = item.userName ||
|
|
924
|
+
item.name = item.userName || "";
|
|
968
925
|
}
|
|
969
926
|
}
|
|
970
927
|
|
|
@@ -990,9 +947,9 @@ export default class CommonDatas extends Vue {
|
|
|
990
947
|
}, []);
|
|
991
948
|
}
|
|
992
949
|
|
|
993
|
-
return recursion(this.organizationUsersTree);
|
|
950
|
+
return recursion(this.organizationUsersTree, this.showLocked);
|
|
994
951
|
}
|
|
995
|
-
@Watch(
|
|
952
|
+
@Watch("configJson", { deep: true })
|
|
996
953
|
watchCongiJson(val: any, old: any) {
|
|
997
954
|
this.state.configJson = JSON.parse(val);
|
|
998
955
|
if (val !== old) {
|
|
@@ -1000,7 +957,7 @@ export default class CommonDatas extends Vue {
|
|
|
1000
957
|
if (Object.prototype.hasOwnProperty.call(this.state.configJson, key)) {
|
|
1001
958
|
const element = this.state.configJson[key];
|
|
1002
959
|
|
|
1003
|
-
this.$set(this.state.selectVal, key, element.key ||
|
|
960
|
+
this.$set(this.state.selectVal, key, element.key || "");
|
|
1004
961
|
}
|
|
1005
962
|
}
|
|
1006
963
|
}
|