htui-yllkbz 1.3.32 → 1.3.36
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 +125 -109
- package/lib/htui.common.js.gz +0 -0
- package/lib/htui.css +1 -1
- package/lib/htui.umd.js +125 -109
- package/lib/htui.umd.js.gz +0 -0
- package/lib/htui.umd.min.js +3 -3
- package/lib/htui.umd.min.js.gz +0 -0
- package/package.json +1 -1
- package/src/App.vue +27 -26
- package/src/packages/HtBaseData/index.vue +246 -196
- package/src/packages/HtSelectBaseData/index.vue +41 -33
- package/src/packages/HtSelectOrg/index.vue +29 -22
- package/src/packages/HtSelectUser/index.vue +29 -22
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
|
|
4
3
|
<!-- 选择部门 -->
|
|
5
|
-
<template
|
|
4
|
+
<template
|
|
5
|
+
v-if="
|
|
6
6
|
state.configJson['departmentId'] &&
|
|
7
|
-
|
|
8
|
-
"
|
|
7
|
+
state.configJson['departmentId'].show
|
|
8
|
+
"
|
|
9
|
+
>
|
|
9
10
|
<!-- multiple: state.configJson['departmentId'].multiple, -->
|
|
10
|
-
<el-cascader
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
<el-cascader
|
|
12
|
+
v-if="!state.configJson['departmentId'].panel"
|
|
13
|
+
:disabled="!!disabled"
|
|
14
|
+
class="component-item"
|
|
15
|
+
:class="comClass"
|
|
16
|
+
:style="comStyle || ''"
|
|
17
|
+
:filterable="!state.configJson['departmentId'].multiple"
|
|
18
|
+
:clearable="state.configJson['departmentId'].clearable"
|
|
19
|
+
:placeholder="placeholder || `请选择部门`"
|
|
20
|
+
:collapse-tags="state.configJson['departmentId'].collapseTags"
|
|
21
|
+
v-model="state.selectVal['departmentId']"
|
|
22
|
+
:show-all-levels="state.configJson['departmentId'].showAllLevels"
|
|
23
|
+
:props="{
|
|
22
24
|
label: 'name',
|
|
23
25
|
value: 'id',
|
|
24
26
|
children: 'children',
|
|
@@ -27,18 +29,20 @@
|
|
|
27
29
|
checkStrictly: state.configJson['departmentId'].checkStrictly,
|
|
28
30
|
multiple: state.configJson['departmentId'].multiple,
|
|
29
31
|
}"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
@click.native="selectClick($event)"
|
|
33
|
+
ref="departmentId"
|
|
34
|
+
@change="setSelctData('departmentId', $event)"
|
|
35
|
+
:options="organizationUsersTree"
|
|
36
|
+
>
|
|
34
37
|
</el-cascader>
|
|
35
|
-
<el-cascader-panel
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
<el-cascader-panel
|
|
39
|
+
v-if="state.configJson['departmentId'].panel"
|
|
40
|
+
class="component-item"
|
|
41
|
+
:class="comClass"
|
|
42
|
+
:style="comStyle || ''"
|
|
43
|
+
:placeholder="placeholder || `请选择部门`"
|
|
44
|
+
v-model="state.selectVal['departmentId']"
|
|
45
|
+
:props="{
|
|
42
46
|
label: 'name',
|
|
43
47
|
value: 'id',
|
|
44
48
|
children: 'children',
|
|
@@ -47,43 +51,52 @@
|
|
|
47
51
|
checkStrictly: state.configJson['departmentId'].checkStrictly,
|
|
48
52
|
multiple: state.configJson['departmentId'].multiple,
|
|
49
53
|
}"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
54
|
+
ref="departmentId"
|
|
55
|
+
@change="setSelctData('departmentId', $event)"
|
|
56
|
+
:options="organizationUsersTree"
|
|
57
|
+
>
|
|
53
58
|
<template slot-scope="{ data }">
|
|
54
59
|
<span>{{ data.label }}</span>
|
|
55
60
|
</template>
|
|
56
61
|
</el-cascader-panel>
|
|
57
62
|
</template>
|
|
58
63
|
<!-- 选择人员 -->
|
|
59
|
-
<el-select
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
64
|
+
<el-select
|
|
65
|
+
v-model="state.selectVal['userId']"
|
|
66
|
+
:placeholder="placeholder || '请选择人员'"
|
|
67
|
+
:filterable="!state.configJson['userId'].multiple"
|
|
68
|
+
:disabled="!!disabled"
|
|
69
|
+
:style="comStyle || ''"
|
|
70
|
+
class="component-item"
|
|
71
|
+
@click.native="selectClick($event)"
|
|
72
|
+
v-if="state.configJson['userId'] && state.configJson['userId'].show"
|
|
73
|
+
:multiple="state.configJson['userId'].multiple"
|
|
74
|
+
>
|
|
75
|
+
<el-option
|
|
76
|
+
v-for="item in userDataList"
|
|
77
|
+
:key="item.id"
|
|
78
|
+
:label="item.value"
|
|
79
|
+
:value="item.id"
|
|
80
|
+
:title="`所在部门:${item.organizationNames}`"
|
|
81
|
+
>
|
|
73
82
|
<span>
|
|
74
|
-
<p
|
|
75
|
-
|
|
83
|
+
<p
|
|
84
|
+
class="ht-user-dot"
|
|
85
|
+
:class="
|
|
76
86
|
item.dutyOfficer && !item.dutyOfficer.status
|
|
77
87
|
? 'ht-user-dot-disabled'
|
|
78
88
|
: ''
|
|
79
89
|
"
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
90
|
+
v-if="item.dutyOfficer"
|
|
91
|
+
></p>
|
|
92
|
+
<p
|
|
93
|
+
class="ht-user-name"
|
|
94
|
+
:class="
|
|
83
95
|
item.dutyOfficer && !item.dutyOfficer.status
|
|
84
96
|
? 'ht-user-disabled'
|
|
85
97
|
: ''
|
|
86
|
-
"
|
|
98
|
+
"
|
|
99
|
+
>
|
|
87
100
|
{{ item.value
|
|
88
101
|
}}<span v-if="item.phoneNumber"> ({{ item.phoneNumber }}) </span>
|
|
89
102
|
</p>
|
|
@@ -91,22 +104,25 @@
|
|
|
91
104
|
</el-option>
|
|
92
105
|
</el-select>
|
|
93
106
|
<!-- 选择部门下人员 -->
|
|
94
|
-
<template
|
|
107
|
+
<template
|
|
108
|
+
v-if="
|
|
95
109
|
state.configJson['departmentUser'] &&
|
|
96
|
-
|
|
97
|
-
"
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
+
state.configJson['departmentUser'].show
|
|
111
|
+
"
|
|
112
|
+
>
|
|
113
|
+
<el-cascader
|
|
114
|
+
v-if="!state.configJson['departmentUser'].panel"
|
|
115
|
+
:disabled="!!disabled"
|
|
116
|
+
class="component-item"
|
|
117
|
+
:filterable="!state.configJson['departmentUser'].multiple"
|
|
118
|
+
:class="comClass"
|
|
119
|
+
:style="comStyle || ''"
|
|
120
|
+
:clearable="state.configJson['departmentUser'].clearable"
|
|
121
|
+
:placeholder="placeholder || `请选择部门下人员`"
|
|
122
|
+
:collapse-tags="state.configJson['departmentUser'].collapseTags"
|
|
123
|
+
v-model="state.selectVal['departmentUser']"
|
|
124
|
+
:show-all-levels="state.configJson['departmentUser'].showAllLevels"
|
|
125
|
+
:props="{
|
|
110
126
|
label: 'name',
|
|
111
127
|
value: 'id',
|
|
112
128
|
children: 'childrenList',
|
|
@@ -115,13 +131,15 @@
|
|
|
115
131
|
checkStrictly: state.configJson['departmentUser'].checkStrictly,
|
|
116
132
|
multiple: state.configJson['departmentUser'].multiple,
|
|
117
133
|
}"
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
134
|
+
ref="departmentUser"
|
|
135
|
+
@click.native="selectClick($event)"
|
|
136
|
+
@change="setSelctData('departmentUser', $event)"
|
|
137
|
+
:options="organizationUsersTreeUser"
|
|
138
|
+
>
|
|
122
139
|
<template slot-scope="{ data }">
|
|
123
|
-
<p
|
|
124
|
-
|
|
140
|
+
<p
|
|
141
|
+
class="ht-user-dot"
|
|
142
|
+
style="
|
|
125
143
|
padding: 0;
|
|
126
144
|
margin: 0;
|
|
127
145
|
float: left;
|
|
@@ -133,28 +151,32 @@
|
|
|
133
151
|
border-radius: 10px;
|
|
134
152
|
margin-right: 4px;
|
|
135
153
|
"
|
|
136
|
-
|
|
154
|
+
:style="
|
|
137
155
|
data.dutyOfficer && !data.dutyOfficer.status
|
|
138
156
|
? 'background: #ccc;'
|
|
139
157
|
: ''
|
|
140
158
|
"
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
159
|
+
v-if="data.dutyOfficer"
|
|
160
|
+
></p>
|
|
161
|
+
<p
|
|
162
|
+
class="ht-user-name"
|
|
163
|
+
style="padding: 0; margin: 0; float: left"
|
|
164
|
+
:style="
|
|
145
165
|
data.dutyOfficer && !data.dutyOfficer.status ? 'color:#ddd' : ''
|
|
146
|
-
"
|
|
166
|
+
"
|
|
167
|
+
>
|
|
147
168
|
{{ data.label }}
|
|
148
169
|
</p>
|
|
149
170
|
</template>
|
|
150
171
|
</el-cascader>
|
|
151
|
-
<el-cascader-panel
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
172
|
+
<el-cascader-panel
|
|
173
|
+
v-else
|
|
174
|
+
:style="panStyle"
|
|
175
|
+
:filterable="!state.configJson['departmentUser'].multiple"
|
|
176
|
+
class="component-item"
|
|
177
|
+
:placeholder="placeholder || `请选择部门下人员`"
|
|
178
|
+
v-model="state.selectVal['departmentUser']"
|
|
179
|
+
:props="{
|
|
158
180
|
label: 'name',
|
|
159
181
|
value: 'id',
|
|
160
182
|
children: 'childrenList',
|
|
@@ -163,12 +185,14 @@
|
|
|
163
185
|
checkStrictly: state.configJson['departmentUser'].checkStrictly,
|
|
164
186
|
multiple: state.configJson['departmentUser'].multiple,
|
|
165
187
|
}"
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
188
|
+
ref="departmentUser"
|
|
189
|
+
@change="setSelctData('departmentUser', $event)"
|
|
190
|
+
:options="organizationUsersTreeUser"
|
|
191
|
+
>
|
|
169
192
|
<template slot-scope="{ data }">
|
|
170
|
-
<p
|
|
171
|
-
|
|
193
|
+
<p
|
|
194
|
+
class="ht-user-dot"
|
|
195
|
+
style="
|
|
172
196
|
padding: 0;
|
|
173
197
|
margin: 0;
|
|
174
198
|
float: left;
|
|
@@ -180,17 +204,20 @@
|
|
|
180
204
|
border-radius: 10px;
|
|
181
205
|
margin-right: 4px;
|
|
182
206
|
"
|
|
183
|
-
|
|
207
|
+
:style="
|
|
184
208
|
data.dutyOfficer && !data.dutyOfficer.status
|
|
185
209
|
? 'background: #ccc;'
|
|
186
210
|
: ''
|
|
187
211
|
"
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
212
|
+
v-if="data.dutyOfficer"
|
|
213
|
+
></p>
|
|
214
|
+
<p
|
|
215
|
+
class="ht-user-name"
|
|
216
|
+
style="padding: 0; margin: 0; float: left"
|
|
217
|
+
:style="
|
|
192
218
|
data.dutyOfficer && !data.dutyOfficer.status ? 'color:#ddd' : ''
|
|
193
|
-
"
|
|
219
|
+
"
|
|
220
|
+
>
|
|
194
221
|
{{ data.label }}
|
|
195
222
|
</p>
|
|
196
223
|
</template>
|
|
@@ -200,27 +227,33 @@
|
|
|
200
227
|
<template v-for="item in state.resData.dictionaryCategory.items">
|
|
201
228
|
<!-- 选择严重等级 -->
|
|
202
229
|
<template v-if="item.code == 'SeverityLevel'">
|
|
203
|
-
<el-select
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
230
|
+
<el-select
|
|
231
|
+
v-if="state.configJson[item.code] && state.configJson[item.code].show"
|
|
232
|
+
v-model="state.selectVal[item.code]"
|
|
233
|
+
:disabled="!!disabled"
|
|
234
|
+
:key="item.id"
|
|
235
|
+
:style="comStyle || ''"
|
|
236
|
+
:placeholder="placeholder || '请选择严重等级'"
|
|
237
|
+
:filterable="!state.configJson[item.code].multiple"
|
|
238
|
+
class="component-item"
|
|
239
|
+
@click.native="selectClick($event)"
|
|
240
|
+
@change="setSelctItem(item.code)"
|
|
241
|
+
>
|
|
242
|
+
<el-option
|
|
243
|
+
v-for="item in SeverityLevel"
|
|
244
|
+
:key="item.id"
|
|
245
|
+
:style="panStyle"
|
|
246
|
+
:label="hideCode ? item.name : `${item.name}(${item.value})`"
|
|
247
|
+
:value="`${item.value}`"
|
|
248
|
+
:title="`${item.name}(${item.value})`"
|
|
249
|
+
>
|
|
219
250
|
<span>
|
|
220
|
-
<b
|
|
221
|
-
|
|
251
|
+
<b
|
|
252
|
+
class="item-origin"
|
|
253
|
+
:style="{
|
|
222
254
|
'border-color': `${item.color}`,
|
|
223
|
-
}"
|
|
255
|
+
}"
|
|
256
|
+
></b>
|
|
224
257
|
{{ item.name }}
|
|
225
258
|
</span>
|
|
226
259
|
<span v-if="item.phoneNumber"> ({{ item.phoneNumber }}) </span>
|
|
@@ -229,28 +262,34 @@
|
|
|
229
262
|
</template>
|
|
230
263
|
<!-- 选择响应列表 -->
|
|
231
264
|
<template v-else-if="item.code == 'ResponseList'">
|
|
232
|
-
<el-select
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
265
|
+
<el-select
|
|
266
|
+
v-if="state.configJson[item.code] && state.configJson[item.code].show"
|
|
267
|
+
v-model="state.selectVal[item.code]"
|
|
268
|
+
:key="item.id"
|
|
269
|
+
:disabled="!!disabled"
|
|
270
|
+
:style="comStyle || ''"
|
|
271
|
+
:placeholder="placeholder || '请选择响应列表'"
|
|
272
|
+
:filterable="!state.configJson[item.code].multiple"
|
|
273
|
+
class="component-item"
|
|
274
|
+
@click.native="selectClick($event)"
|
|
275
|
+
@change="setSelctItem(item.code)"
|
|
276
|
+
>
|
|
277
|
+
<el-option
|
|
278
|
+
v-for="item in ResponseList"
|
|
279
|
+
:key="item.id"
|
|
280
|
+
:style="panStyle"
|
|
281
|
+
:label="hideCode ? item.name : `${item.name}(${item.value})`"
|
|
282
|
+
:value="item.value"
|
|
283
|
+
:title="`${item.name}(${item.value})`"
|
|
284
|
+
>
|
|
248
285
|
<span>
|
|
249
|
-
<b
|
|
250
|
-
|
|
251
|
-
|
|
286
|
+
<b
|
|
287
|
+
v-if="item.color"
|
|
288
|
+
class="item-origin"
|
|
289
|
+
:style="{
|
|
252
290
|
'border-color': `${item.color}`,
|
|
253
|
-
}"
|
|
291
|
+
}"
|
|
292
|
+
></b>
|
|
254
293
|
{{ item.name }}
|
|
255
294
|
</span>
|
|
256
295
|
<span v-if="item.phoneNumber"> ({{ item.phoneNumber }}) </span>
|
|
@@ -259,21 +298,24 @@
|
|
|
259
298
|
</template>
|
|
260
299
|
<!-- 基础数据级联选择 -->
|
|
261
300
|
<template v-else>
|
|
262
|
-
<template
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
301
|
+
<template
|
|
302
|
+
v-if="state.configJson[item.code] && state.configJson[item.code].show"
|
|
303
|
+
>
|
|
304
|
+
<el-cascader
|
|
305
|
+
v-if="!state.configJson[item.code].panel"
|
|
306
|
+
:placeholder="placeholder || `请选择${item.name}`"
|
|
307
|
+
:disabled="!!disabled"
|
|
308
|
+
class="component-item"
|
|
309
|
+
:style="comStyle || ''"
|
|
310
|
+
:key="item.id"
|
|
311
|
+
:filterable="!state.configJson[item.code].multiple"
|
|
312
|
+
:clearable="state.configJson[item.code].clearable"
|
|
313
|
+
@click.native="selectClick($event)"
|
|
314
|
+
v-model="state.selectVal[item.code]"
|
|
315
|
+
:collapse-tags="state.configJson[item.code].collapseTags"
|
|
316
|
+
:show-all-levels="state.configJson[item.code].showAllLevels"
|
|
317
|
+
:props="{
|
|
318
|
+
label: hideCode ? 'name' : 'label',
|
|
277
319
|
value: 'id',
|
|
278
320
|
children: 'children',
|
|
279
321
|
expandTrigger: 'click',
|
|
@@ -281,18 +323,20 @@
|
|
|
281
323
|
checkStrictly: state.configJson[item.code].checkStrictly,
|
|
282
324
|
multiple: state.configJson[item.code].multiple,
|
|
283
325
|
}"
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
326
|
+
:ref="`${item.code}`"
|
|
327
|
+
@change="setSelctData(item.code, $event)"
|
|
328
|
+
:options="getbaseDataInfo[item.id]"
|
|
329
|
+
></el-cascader>
|
|
330
|
+
<el-cascader-panel
|
|
331
|
+
v-else
|
|
332
|
+
@click.native="selectClick($event)"
|
|
333
|
+
:placeholder="placeholder || `请选择${item.name}`"
|
|
334
|
+
class="component-item"
|
|
335
|
+
:key="item.id"
|
|
336
|
+
:style="panStyle"
|
|
337
|
+
v-model="state.selectVal[item.code]"
|
|
338
|
+
:props="{
|
|
339
|
+
label: hideCode ? 'name' : 'label',
|
|
296
340
|
value: 'id',
|
|
297
341
|
children: 'children',
|
|
298
342
|
expandTrigger: 'click',
|
|
@@ -300,9 +344,10 @@
|
|
|
300
344
|
checkStrictly: state.configJson[item.code].checkStrictly,
|
|
301
345
|
multiple: state.configJson[item.code].multiple,
|
|
302
346
|
}"
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
347
|
+
:ref="`${item.code}`"
|
|
348
|
+
@change="setSelctData(item.code, $event)"
|
|
349
|
+
:options="getbaseDataInfo[item.id]"
|
|
350
|
+
></el-cascader-panel>
|
|
306
351
|
</template>
|
|
307
352
|
</template>
|
|
308
353
|
</template>
|
|
@@ -317,21 +362,21 @@
|
|
|
317
362
|
</template>
|
|
318
363
|
|
|
319
364
|
<script lang="ts">
|
|
320
|
-
import { Vue, Prop, Emit, Component, Watch } from
|
|
365
|
+
import { Vue, Prop, Emit, Component, Watch } from 'vue-property-decorator';
|
|
321
366
|
|
|
322
367
|
import {
|
|
323
368
|
BaseDataDto,
|
|
324
369
|
DictionaryCategoryDto,
|
|
325
370
|
DictionaryDataDto,
|
|
326
371
|
SeverityLevelDto,
|
|
327
|
-
} from
|
|
372
|
+
} from '@/plugins/commonApi';
|
|
328
373
|
/* eslint-disable @typescript-eslint/camelcase */
|
|
329
374
|
import {
|
|
330
375
|
ListResultDto_1OfOfOrganizationUnitWithUsersAndContractsAnd_0AndCulture_neutralAndPublicKeyToken_null,
|
|
331
376
|
OrganizationUnitWithDetailsDto,
|
|
332
377
|
OrganizationUnitDto,
|
|
333
|
-
} from
|
|
334
|
-
import { _axios, baseConfig } from
|
|
378
|
+
} from '@/plugins/Auth';
|
|
379
|
+
import { _axios, baseConfig } from 'vue-kst-auth';
|
|
335
380
|
interface Inuser {
|
|
336
381
|
concurrencyStamp: string;
|
|
337
382
|
email: string;
|
|
@@ -470,7 +515,7 @@ interface State {
|
|
|
470
515
|
};
|
|
471
516
|
}
|
|
472
517
|
@Component({
|
|
473
|
-
name:
|
|
518
|
+
name: 'HtBaseData',
|
|
474
519
|
components: {},
|
|
475
520
|
})
|
|
476
521
|
export default class CommonDatas extends Vue {
|
|
@@ -478,6 +523,9 @@ export default class CommonDatas extends Vue {
|
|
|
478
523
|
@Prop() configJson?: string;
|
|
479
524
|
/** 自定义class */
|
|
480
525
|
@Prop() comClass?: string;
|
|
526
|
+
/** 隐藏编码 */
|
|
527
|
+
@Prop() hideCode?: boolean;
|
|
528
|
+
@Prop() placeholder?: string;
|
|
481
529
|
/** 自定义style */
|
|
482
530
|
@Prop() comStyle?: string;
|
|
483
531
|
/** 自定义style */
|
|
@@ -504,10 +552,9 @@ export default class CommonDatas extends Vue {
|
|
|
504
552
|
users: {
|
|
505
553
|
items: [],
|
|
506
554
|
},
|
|
507
|
-
SessionState:
|
|
555
|
+
SessionState: '',
|
|
508
556
|
userInOrganiza: [],
|
|
509
|
-
organizationUsers:
|
|
510
|
-
new ListResultDto_1OfOfOrganizationUnitWithUsersAndContractsAnd_0AndCulture_neutralAndPublicKeyToken_null(),
|
|
557
|
+
organizationUsers: new ListResultDto_1OfOfOrganizationUnitWithUsersAndContractsAnd_0AndCulture_neutralAndPublicKeyToken_null(),
|
|
511
558
|
},
|
|
512
559
|
selectVal: {},
|
|
513
560
|
selectValData: {},
|
|
@@ -519,7 +566,7 @@ export default class CommonDatas extends Vue {
|
|
|
519
566
|
if (!baseConfig.getLoginState()) {
|
|
520
567
|
return;
|
|
521
568
|
}
|
|
522
|
-
const data = window.localStorage.getItem(
|
|
569
|
+
const data = window.localStorage.getItem('commonDatas');
|
|
523
570
|
if (data) {
|
|
524
571
|
this.state.resData = Object.assign(this.state.resData, JSON.parse(data));
|
|
525
572
|
}
|
|
@@ -530,31 +577,31 @@ export default class CommonDatas extends Vue {
|
|
|
530
577
|
const { items } = this.state.resData.dictionaryCategory;
|
|
531
578
|
let configJson: any = {
|
|
532
579
|
departmentId: {
|
|
533
|
-
name:
|
|
580
|
+
name: '部门树结构',
|
|
534
581
|
show: true,
|
|
535
582
|
showAllLevels: false,
|
|
536
583
|
multiple: false,
|
|
537
|
-
code:
|
|
584
|
+
code: 'departmentId',
|
|
538
585
|
data: {},
|
|
539
586
|
checkStrictly: true,
|
|
540
587
|
panel: false,
|
|
541
588
|
},
|
|
542
589
|
departmentUser: {
|
|
543
|
-
name:
|
|
590
|
+
name: '部门下人员',
|
|
544
591
|
show: true,
|
|
545
592
|
showAllLevels: false,
|
|
546
593
|
multiple: false,
|
|
547
|
-
code:
|
|
594
|
+
code: 'departmentUser',
|
|
548
595
|
data: {},
|
|
549
596
|
checkStrictly: false,
|
|
550
597
|
panel: false,
|
|
551
598
|
},
|
|
552
599
|
userId: {
|
|
553
|
-
name:
|
|
600
|
+
name: '部门人员',
|
|
554
601
|
show: true,
|
|
555
602
|
showAllLevels: false,
|
|
556
603
|
multiple: false,
|
|
557
|
-
code:
|
|
604
|
+
code: 'userId',
|
|
558
605
|
data: {},
|
|
559
606
|
checkStrictly: false,
|
|
560
607
|
panel: false,
|
|
@@ -573,7 +620,7 @@ export default class CommonDatas extends Vue {
|
|
|
573
620
|
data: {},
|
|
574
621
|
checkStrictly: true,
|
|
575
622
|
panel: false,
|
|
576
|
-
key:
|
|
623
|
+
key: 'a1c72763-0ed5-0ba8-5131-39fdf96dfe9a',
|
|
577
624
|
},
|
|
578
625
|
};
|
|
579
626
|
});
|
|
@@ -594,7 +641,7 @@ export default class CommonDatas extends Vue {
|
|
|
594
641
|
if (Object.prototype.hasOwnProperty.call(this.state.configJson, key)) {
|
|
595
642
|
const element = this.state.configJson[key];
|
|
596
643
|
|
|
597
|
-
this.$set(this.state.selectVal, key, element.key ||
|
|
644
|
+
this.$set(this.state.selectVal, key, element.key || '');
|
|
598
645
|
}
|
|
599
646
|
}
|
|
600
647
|
}
|
|
@@ -602,7 +649,7 @@ export default class CommonDatas extends Vue {
|
|
|
602
649
|
/** 重写window的一个方法,解决web components组件获取样式报错问题 */
|
|
603
650
|
rewriteGetComputedStyle() {
|
|
604
651
|
const getComputedStyle = window.getComputedStyle;
|
|
605
|
-
window.getComputedStyle = function
|
|
652
|
+
window.getComputedStyle = function(element: any, property) {
|
|
606
653
|
return getComputedStyle(element.host || element, property);
|
|
607
654
|
};
|
|
608
655
|
}
|
|
@@ -611,15 +658,15 @@ export default class CommonDatas extends Vue {
|
|
|
611
658
|
const code = this.state.selectVal[key];
|
|
612
659
|
let codelist: string[];
|
|
613
660
|
if (!Array.isArray(code)) {
|
|
614
|
-
codelist = code ? code.toString().split(
|
|
661
|
+
codelist = code ? code.toString().split(',') : [];
|
|
615
662
|
}
|
|
616
663
|
switch (key) {
|
|
617
|
-
case
|
|
664
|
+
case 'SeverityLevel':
|
|
618
665
|
this.state.selectValData[key] = this.SeverityLevel.filter((item) =>
|
|
619
666
|
codelist.some((val) => val == item.value?.toString())
|
|
620
667
|
);
|
|
621
668
|
break;
|
|
622
|
-
case
|
|
669
|
+
case 'ResponseList':
|
|
623
670
|
this.state.selectValData[key] = this.SeverityLevel.filter((item) =>
|
|
624
671
|
codelist.some((val) => val == item.id)
|
|
625
672
|
);
|
|
@@ -632,7 +679,7 @@ export default class CommonDatas extends Vue {
|
|
|
632
679
|
/** 动态设置显示面板位置 */
|
|
633
680
|
|
|
634
681
|
selectClick(e: any) {
|
|
635
|
-
|
|
682
|
+
//
|
|
636
683
|
// 下拉选择框列表
|
|
637
684
|
//const list = window.document.getElementsByClassName("el-select-dropdown");
|
|
638
685
|
// (list as any).forEach((element: any) => {
|
|
@@ -681,19 +728,22 @@ export default class CommonDatas extends Vue {
|
|
|
681
728
|
this.state.selectValData[key] = [];
|
|
682
729
|
checkNodes.forEach(
|
|
683
730
|
(item: { data?: { id: string; name: string } } | undefined) => {
|
|
684
|
-
const { data } = item || { data:
|
|
731
|
+
const { data } = item || { data: '' };
|
|
685
732
|
if (data && !this.state.selectValData[key].includes(data)) {
|
|
686
733
|
this.state.selectValData[key].push(data);
|
|
687
734
|
}
|
|
688
735
|
}
|
|
689
736
|
);
|
|
690
737
|
}
|
|
691
|
-
if (!e
|
|
738
|
+
if (!e || !e.length) {
|
|
692
739
|
this.state.selectValData[key] = [];
|
|
693
740
|
}
|
|
741
|
+
|
|
694
742
|
this.$emit(
|
|
695
|
-
|
|
696
|
-
this.state.selectValData[key]
|
|
743
|
+
'change',
|
|
744
|
+
this.state.selectValData[key] && this.state.selectValData[key].length
|
|
745
|
+
? this.state.selectValData
|
|
746
|
+
: { [key]: [] }
|
|
697
747
|
);
|
|
698
748
|
}
|
|
699
749
|
/** 基础数据递归处理 */
|
|
@@ -715,9 +765,9 @@ export default class CommonDatas extends Vue {
|
|
|
715
765
|
/** 获取基础数据列表 */
|
|
716
766
|
const { items: baseItems } = this.state.resData.baseData;
|
|
717
767
|
this.state.resData.dictionaryCategory.items.forEach((item) => {
|
|
718
|
-
body[item.id ||
|
|
768
|
+
body[item.id || ''] = [];
|
|
719
769
|
if (this.org) {
|
|
720
|
-
body[item.id ||
|
|
770
|
+
body[item.id || ''] = this.recursion(
|
|
721
771
|
baseItems.filter(
|
|
722
772
|
(val) =>
|
|
723
773
|
val.category == item.code &&
|
|
@@ -725,7 +775,7 @@ export default class CommonDatas extends Vue {
|
|
|
725
775
|
)
|
|
726
776
|
);
|
|
727
777
|
} else {
|
|
728
|
-
body[item.id ||
|
|
778
|
+
body[item.id || ''] = this.recursion(
|
|
729
779
|
baseItems.filter((val) => val.category == item.code)
|
|
730
780
|
);
|
|
731
781
|
}
|
|
@@ -736,7 +786,7 @@ export default class CommonDatas extends Vue {
|
|
|
736
786
|
get ResponseList() {
|
|
737
787
|
return (
|
|
738
788
|
this.state.resData.dictionaryData.filter(
|
|
739
|
-
(val) => val.categoryCode ==
|
|
789
|
+
(val) => val.categoryCode == 'ResponseList'
|
|
740
790
|
) || []
|
|
741
791
|
);
|
|
742
792
|
}
|
|
@@ -826,7 +876,7 @@ export default class CommonDatas extends Vue {
|
|
|
826
876
|
|
|
827
877
|
return recursion(this.organizationUsersTree);
|
|
828
878
|
}
|
|
829
|
-
@Watch(
|
|
879
|
+
@Watch('configJson', { deep: true })
|
|
830
880
|
watchCongiJson(val: any, old: any) {
|
|
831
881
|
this.state.configJson = JSON.parse(val);
|
|
832
882
|
if (val !== old) {
|
|
@@ -834,7 +884,7 @@ export default class CommonDatas extends Vue {
|
|
|
834
884
|
if (Object.prototype.hasOwnProperty.call(this.state.configJson, key)) {
|
|
835
885
|
const element = this.state.configJson[key];
|
|
836
886
|
|
|
837
|
-
this.$set(this.state.selectVal, key, element.key ||
|
|
887
|
+
this.$set(this.state.selectVal, key, element.key || '');
|
|
838
888
|
}
|
|
839
889
|
}
|
|
840
890
|
}
|