htui-yllkbz 1.3.36 → 1.3.39
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 +54 -54
- package/lib/htui.common.js.gz +0 -0
- package/lib/htui.css +1 -1
- package/lib/htui.umd.js +54 -54
- 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/packages/HtBaseData/index.vue +21 -3
- package/src/packages/HtMd/index.vue +28 -29
- package/src/packages/HtSelectBaseData/index.vue +3 -1
- package/src/packages/HtSelectOrg/index.vue +3 -1
- package/src/packages/HtSelectUser/index.vue +3 -1
- package/src/packages/common.ts +70 -0
- package/src/packages/style.scss +43 -0
package/lib/htui.umd.min.js.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -11,8 +11,10 @@
|
|
|
11
11
|
<el-cascader
|
|
12
12
|
v-if="!state.configJson['departmentId'].panel"
|
|
13
13
|
:disabled="!!disabled"
|
|
14
|
+
:append-to-body="appendToBody"
|
|
14
15
|
class="component-item"
|
|
15
16
|
:class="comClass"
|
|
17
|
+
style="width:100%"
|
|
16
18
|
:style="comStyle || ''"
|
|
17
19
|
:filterable="!state.configJson['departmentId'].multiple"
|
|
18
20
|
:clearable="state.configJson['departmentId'].clearable"
|
|
@@ -38,7 +40,9 @@
|
|
|
38
40
|
<el-cascader-panel
|
|
39
41
|
v-if="state.configJson['departmentId'].panel"
|
|
40
42
|
class="component-item"
|
|
43
|
+
:append-to-body="appendToBody"
|
|
41
44
|
:class="comClass"
|
|
45
|
+
style="width:100%"
|
|
42
46
|
:style="comStyle || ''"
|
|
43
47
|
:placeholder="placeholder || `请选择部门`"
|
|
44
48
|
v-model="state.selectVal['departmentId']"
|
|
@@ -63,11 +67,13 @@
|
|
|
63
67
|
<!-- 选择人员 -->
|
|
64
68
|
<el-select
|
|
65
69
|
v-model="state.selectVal['userId']"
|
|
70
|
+
:popper-append-to-body="appendToBody"
|
|
66
71
|
:placeholder="placeholder || '请选择人员'"
|
|
67
72
|
:filterable="!state.configJson['userId'].multiple"
|
|
68
73
|
:disabled="!!disabled"
|
|
69
74
|
:style="comStyle || ''"
|
|
70
75
|
class="component-item"
|
|
76
|
+
style="width:100%"
|
|
71
77
|
@click.native="selectClick($event)"
|
|
72
78
|
v-if="state.configJson['userId'] && state.configJson['userId'].show"
|
|
73
79
|
:multiple="state.configJson['userId'].multiple"
|
|
@@ -111,9 +117,11 @@
|
|
|
111
117
|
"
|
|
112
118
|
>
|
|
113
119
|
<el-cascader
|
|
120
|
+
:append-to-body="appendToBody"
|
|
114
121
|
v-if="!state.configJson['departmentUser'].panel"
|
|
115
122
|
:disabled="!!disabled"
|
|
116
123
|
class="component-item"
|
|
124
|
+
style="width:100%"
|
|
117
125
|
:filterable="!state.configJson['departmentUser'].multiple"
|
|
118
126
|
:class="comClass"
|
|
119
127
|
:style="comStyle || ''"
|
|
@@ -145,7 +153,7 @@
|
|
|
145
153
|
float: left;
|
|
146
154
|
width: 14px;
|
|
147
155
|
height: 14px;
|
|
148
|
-
background:
|
|
156
|
+
background: var(--primary);
|
|
149
157
|
line-height: 34px;
|
|
150
158
|
margin-top: 10px;
|
|
151
159
|
border-radius: 10px;
|
|
@@ -171,9 +179,11 @@
|
|
|
171
179
|
</el-cascader>
|
|
172
180
|
<el-cascader-panel
|
|
173
181
|
v-else
|
|
182
|
+
:append-to-body="appendToBody"
|
|
174
183
|
:style="panStyle"
|
|
175
184
|
:filterable="!state.configJson['departmentUser'].multiple"
|
|
176
185
|
class="component-item"
|
|
186
|
+
style="width:100%"
|
|
177
187
|
:placeholder="placeholder || `请选择部门下人员`"
|
|
178
188
|
v-model="state.selectVal['departmentUser']"
|
|
179
189
|
:props="{
|
|
@@ -198,7 +208,7 @@
|
|
|
198
208
|
float: left;
|
|
199
209
|
width: 14px;
|
|
200
210
|
height: 14px;
|
|
201
|
-
background:
|
|
211
|
+
background: var(--primary);
|
|
202
212
|
line-height: 34px;
|
|
203
213
|
margin-top: 10px;
|
|
204
214
|
border-radius: 10px;
|
|
@@ -228,6 +238,7 @@
|
|
|
228
238
|
<!-- 选择严重等级 -->
|
|
229
239
|
<template v-if="item.code == 'SeverityLevel'">
|
|
230
240
|
<el-select
|
|
241
|
+
:popper-append-to-body="appendToBody"
|
|
231
242
|
v-if="state.configJson[item.code] && state.configJson[item.code].show"
|
|
232
243
|
v-model="state.selectVal[item.code]"
|
|
233
244
|
:disabled="!!disabled"
|
|
@@ -236,6 +247,7 @@
|
|
|
236
247
|
:placeholder="placeholder || '请选择严重等级'"
|
|
237
248
|
:filterable="!state.configJson[item.code].multiple"
|
|
238
249
|
class="component-item"
|
|
250
|
+
style="width:100%"
|
|
239
251
|
@click.native="selectClick($event)"
|
|
240
252
|
@change="setSelctItem(item.code)"
|
|
241
253
|
>
|
|
@@ -263,6 +275,7 @@
|
|
|
263
275
|
<!-- 选择响应列表 -->
|
|
264
276
|
<template v-else-if="item.code == 'ResponseList'">
|
|
265
277
|
<el-select
|
|
278
|
+
:popper-append-to-body="appendToBody"
|
|
266
279
|
v-if="state.configJson[item.code] && state.configJson[item.code].show"
|
|
267
280
|
v-model="state.selectVal[item.code]"
|
|
268
281
|
:key="item.id"
|
|
@@ -302,12 +315,14 @@
|
|
|
302
315
|
v-if="state.configJson[item.code] && state.configJson[item.code].show"
|
|
303
316
|
>
|
|
304
317
|
<el-cascader
|
|
318
|
+
:append-to-body="appendToBody"
|
|
305
319
|
v-if="!state.configJson[item.code].panel"
|
|
306
320
|
:placeholder="placeholder || `请选择${item.name}`"
|
|
307
321
|
:disabled="!!disabled"
|
|
308
322
|
class="component-item"
|
|
309
323
|
:style="comStyle || ''"
|
|
310
324
|
:key="item.id"
|
|
325
|
+
style="width:100%"
|
|
311
326
|
:filterable="!state.configJson[item.code].multiple"
|
|
312
327
|
:clearable="state.configJson[item.code].clearable"
|
|
313
328
|
@click.native="selectClick($event)"
|
|
@@ -329,9 +344,11 @@
|
|
|
329
344
|
></el-cascader>
|
|
330
345
|
<el-cascader-panel
|
|
331
346
|
v-else
|
|
347
|
+
:append-to-body="appendToBody"
|
|
332
348
|
@click.native="selectClick($event)"
|
|
333
349
|
:placeholder="placeholder || `请选择${item.name}`"
|
|
334
350
|
class="component-item"
|
|
351
|
+
style="width:100%"
|
|
335
352
|
:key="item.id"
|
|
336
353
|
:style="panStyle"
|
|
337
354
|
v-model="state.selectVal[item.code]"
|
|
@@ -534,6 +551,7 @@ export default class CommonDatas extends Vue {
|
|
|
534
551
|
@Prop() org?: string;
|
|
535
552
|
/** 是否禁用 */
|
|
536
553
|
@Prop() disabled?: string;
|
|
554
|
+
@Prop({ default: true }) appendToBody?: boolean;
|
|
537
555
|
|
|
538
556
|
/** 人员 */
|
|
539
557
|
/** 数据 */
|
|
@@ -907,7 +925,7 @@ export default class CommonDatas extends Vue {
|
|
|
907
925
|
}
|
|
908
926
|
</style>
|
|
909
927
|
<style lang="scss">
|
|
910
|
-
$primary-color:
|
|
928
|
+
$primary-color: var(--primary);
|
|
911
929
|
.component-item .el-input--suffix .el-input__inner {
|
|
912
930
|
background: none;
|
|
913
931
|
height: 32px !important;
|
|
@@ -4,24 +4,26 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-12-21 16:24:07
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime:
|
|
7
|
+
* @LastEditTime: 2022-07-18 14:59:56
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
|
-
<mavon-editor
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
<mavon-editor
|
|
11
|
+
v-model="state.content"
|
|
12
|
+
:subfield="subfield"
|
|
13
|
+
default_open="{}"
|
|
14
|
+
ref="md"
|
|
15
|
+
@save="save"
|
|
16
|
+
:placeholder="placeholder"
|
|
17
|
+
:editable="!disabled"
|
|
18
|
+
@imgAdd="addImg"
|
|
19
|
+
@change="change"
|
|
20
|
+
/>
|
|
19
21
|
</template>
|
|
20
|
-
<script lang=
|
|
21
|
-
import { Component, Prop, Vue, Watch } from
|
|
22
|
-
import mavonEditor from
|
|
23
|
-
import
|
|
24
|
-
import { _axios } from
|
|
22
|
+
<script lang="ts">
|
|
23
|
+
import { Component, Prop, Vue, Watch } from 'vue-property-decorator';
|
|
24
|
+
import mavonEditor from 'mavon-editor';
|
|
25
|
+
import 'mavon-editor/dist/css/index.css';
|
|
26
|
+
import { _axios } from 'vue-kst-auth';
|
|
25
27
|
Vue.use(mavonEditor);
|
|
26
28
|
interface State {
|
|
27
29
|
/** 数据状态 */
|
|
@@ -43,7 +45,7 @@ export default class HtMd extends Vue {
|
|
|
43
45
|
/** 数据 */
|
|
44
46
|
state: State = {
|
|
45
47
|
loading: false,
|
|
46
|
-
content:
|
|
48
|
+
content: '',
|
|
47
49
|
};
|
|
48
50
|
/** 生命周期 */
|
|
49
51
|
created() {
|
|
@@ -53,17 +55,17 @@ export default class HtMd extends Vue {
|
|
|
53
55
|
/** 添加图片 */
|
|
54
56
|
addImg(e: number, f: File) {
|
|
55
57
|
if (this.changImg) {
|
|
56
|
-
this.$emit(
|
|
58
|
+
this.$emit('callBackImg', e, f);
|
|
57
59
|
return;
|
|
58
60
|
}
|
|
59
61
|
const formdata = new FormData();
|
|
60
|
-
formdata.append(
|
|
62
|
+
formdata.append('file', f);
|
|
61
63
|
//将下面上传接口替换为你自己的服务器接口
|
|
62
64
|
_axios({
|
|
63
|
-
url:
|
|
64
|
-
method:
|
|
65
|
+
url: '/files/api/filing/file/upload',
|
|
66
|
+
method: 'post',
|
|
65
67
|
data: formdata,
|
|
66
|
-
headers: {
|
|
68
|
+
headers: { 'Content-Type': 'multipart/form-data' },
|
|
67
69
|
}).then((res) => {
|
|
68
70
|
if (res.status === 200) {
|
|
69
71
|
(this.$refs.md as any).$img2Url(
|
|
@@ -72,28 +74,25 @@ export default class HtMd extends Vue {
|
|
|
72
74
|
);
|
|
73
75
|
}
|
|
74
76
|
});
|
|
75
|
-
|
|
76
77
|
//
|
|
77
78
|
}
|
|
78
79
|
/** 实时改变 */
|
|
79
80
|
change(e: string, text: string) {
|
|
80
|
-
this.$emit(
|
|
81
|
-
|
|
82
|
-
this.$emit("change", e, text);
|
|
83
|
-
|
|
81
|
+
this.$emit('input', e);
|
|
82
|
+
this.$emit('change', e, text);
|
|
84
83
|
//
|
|
85
84
|
}
|
|
86
85
|
/** 保存数据 */
|
|
87
86
|
save(e: string, text: string) {
|
|
88
|
-
this.$emit(
|
|
87
|
+
this.$emit('save', e, text);
|
|
89
88
|
}
|
|
90
89
|
|
|
91
90
|
/** 监听 */
|
|
92
|
-
@Watch(
|
|
91
|
+
@Watch('value', { deep: true })
|
|
93
92
|
onContent(val: string) {
|
|
94
93
|
this.state.content = val;
|
|
95
94
|
}
|
|
96
95
|
/** 计算属性 */
|
|
97
96
|
}
|
|
98
97
|
</script>
|
|
99
|
-
<style lang=
|
|
98
|
+
<style lang="scss" scoped></style>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-12-30 15:47:47
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2022-07
|
|
7
|
+
* @LastEditTime: 2022-08-07 15:09:05
|
|
8
8
|
-->
|
|
9
9
|
|
|
10
10
|
<template>
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
<HtBaseData
|
|
21
21
|
v-else
|
|
22
22
|
:org="org"
|
|
23
|
+
:appendToBody="appendToBody"
|
|
23
24
|
:placeholder="placeholder"
|
|
24
25
|
:hide-code="hideCode"
|
|
25
26
|
:disabled="disabled"
|
|
@@ -82,6 +83,7 @@ export default class HtSelectBaseData extends Vue {
|
|
|
82
83
|
@Prop({ default: false }) multiple!: boolean;
|
|
83
84
|
@Prop({ default: false }) checkStrictly!: boolean;
|
|
84
85
|
@Prop({ default: true }) showAllLevels!: boolean;
|
|
86
|
+
@Prop({ default: true }) appendToBody?: boolean;
|
|
85
87
|
/** 数据 */
|
|
86
88
|
state: State = {
|
|
87
89
|
loading: false,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-12-30 14:29:14
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2022-07
|
|
7
|
+
* @LastEditTime: 2022-08-07 15:05:01
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
10
|
<span v-if="readonly">
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
:org="org"
|
|
21
21
|
:placeholder="placeholder"
|
|
22
22
|
:disabled="disabled"
|
|
23
|
+
:appendToBody="appendToBody"
|
|
23
24
|
com-style="background:#fff"
|
|
24
25
|
:config-json="configJson"
|
|
25
26
|
com-class="ht-item-common"
|
|
@@ -53,6 +54,7 @@ export default class HtSelectOrg extends Vue {
|
|
|
53
54
|
@Prop({ default: false }) multiple?: boolean;
|
|
54
55
|
@Prop({ default: true }) showAllLevels?: boolean;
|
|
55
56
|
@Prop({ default: true }) checkStrictly?: boolean;
|
|
57
|
+
@Prop({ default: true }) appendToBody?: boolean;
|
|
56
58
|
@Prop() collapseTags!: boolean;
|
|
57
59
|
/* 是否只读 */
|
|
58
60
|
@Prop({ default: false }) readonly?: boolean;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-12-30 14:29:14
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2022-07
|
|
7
|
+
* @LastEditTime: 2022-08-07 15:04:46
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
10
|
<span v-if="readonly">
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
:placeholder="placeholder"
|
|
22
22
|
:disabled="disabled"
|
|
23
23
|
com-style="background:#fff"
|
|
24
|
+
:appendToBody="appendToBody"
|
|
24
25
|
:config-json="configJson"
|
|
25
26
|
com-class="ht-item-common"
|
|
26
27
|
@change="searchCommonData"
|
|
@@ -57,6 +58,7 @@ export default class HtSelectUser extends Vue {
|
|
|
57
58
|
@Prop({ default: false }) readonly?: boolean;
|
|
58
59
|
@Prop({ default: false }) panel?: boolean;
|
|
59
60
|
@Prop({ default: false }) collapseTags?: boolean;
|
|
61
|
+
@Prop({ default: true }) appendToBody?: boolean;
|
|
60
62
|
/** 数据 */
|
|
61
63
|
state: State = {
|
|
62
64
|
loading: false,
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Descripttion:
|
|
3
|
+
* @version:
|
|
4
|
+
* @Author: hutao
|
|
5
|
+
* @Date: 2022-07-18 15:01:02
|
|
6
|
+
* @LastEditors: hutao
|
|
7
|
+
* @LastEditTime: 2022-07-18 15:03:00
|
|
8
|
+
*/
|
|
9
|
+
import moment from "moment";
|
|
10
|
+
|
|
11
|
+
/** 生成唯一Id
|
|
12
|
+
* @params e 生成的id位数 默认32
|
|
13
|
+
*/
|
|
14
|
+
export const randomString = (e = 32) => {
|
|
15
|
+
/** 生成格式17位的时间YYYY-MM-DD HH:mm:ss.SSS加(e-17)位的随机数 */
|
|
16
|
+
const t = "ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz23456789",
|
|
17
|
+
a = t.length;
|
|
18
|
+
const now = moment().format('YYYYMMDDHHmmssSSS')
|
|
19
|
+
let n = "";
|
|
20
|
+
if (e > 17) {
|
|
21
|
+
n = now
|
|
22
|
+
|
|
23
|
+
for (let i = 0; i < (e - 17); i++) {
|
|
24
|
+
n += t.charAt(Math.floor(Math.random() * a));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
else if (e === 17) {
|
|
28
|
+
n = now
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
for (let i = 0; i < e; i++) {
|
|
32
|
+
n += t.charAt(Math.floor(Math.random() * a));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return n;
|
|
37
|
+
}
|
|
38
|
+
/** 时间计算
|
|
39
|
+
@params fromDate 开始时间
|
|
40
|
+
@params toDate 结束时间
|
|
41
|
+
*/
|
|
42
|
+
export const dateLess = (fromDate: string, toDate: string) => {
|
|
43
|
+
if (fromDate && toDate) {
|
|
44
|
+
const date = new Date(fromDate);
|
|
45
|
+
const date2 = new Date(toDate);
|
|
46
|
+
const s1: number = date.getTime(),
|
|
47
|
+
s2 = date2.getTime();
|
|
48
|
+
const total: number = (s2 - s1) / 1000;
|
|
49
|
+
const day: number = parseInt((total / (24 * 60 * 60)).toString()); //计算整数天数
|
|
50
|
+
const afterDay: number = total - day * 24 * 60 * 60; //取得算出天数后剩余的秒数
|
|
51
|
+
const hour: number = parseInt((afterDay / (60 * 60)).toString()); //计算整数小时数
|
|
52
|
+
const afterHour = total - day * 24 * 60 * 60 - hour * 60 * 60; //取得算出小时数后剩余的秒数
|
|
53
|
+
const min: number = parseInt((afterHour / 60).toString()); //计算整数分
|
|
54
|
+
const afterMin: number =
|
|
55
|
+
parseInt((total - day * 24 * 60 * 60 - hour * 60 * 60 - min * 60).toString()); //取得算出分后剩余的秒数
|
|
56
|
+
if (day === 0) {
|
|
57
|
+
if (hour === 0) {
|
|
58
|
+
return min + "分" + afterMin + "秒";
|
|
59
|
+
} else {
|
|
60
|
+
return hour + "小时" + min + "分" + afterMin + "秒";
|
|
61
|
+
}
|
|
62
|
+
} else {
|
|
63
|
+
return day + "天" + hour + "小时" + min + "分" + afterMin + "秒";
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
return "-"
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
}
|
package/src/packages/style.scss
CHANGED
|
@@ -11,3 +11,46 @@
|
|
|
11
11
|
float: right;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
+
.component-item {
|
|
15
|
+
width: 100%;
|
|
16
|
+
+ .component-item {
|
|
17
|
+
margin-top: 10px;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
.item-origin {
|
|
21
|
+
border-radius: 50%;
|
|
22
|
+
border-width: 0px 7px;
|
|
23
|
+
margin-right: 6px;
|
|
24
|
+
border-style: solid;
|
|
25
|
+
}
|
|
26
|
+
$primary-color: var(--primary);
|
|
27
|
+
.component-item .el-input--suffix .el-input__inner {
|
|
28
|
+
background: none;
|
|
29
|
+
height: 32px !important;
|
|
30
|
+
}
|
|
31
|
+
.component-item .is-disabled .el-input__inner {
|
|
32
|
+
background: #f5f5f5;
|
|
33
|
+
}
|
|
34
|
+
.ht-user-dot {
|
|
35
|
+
padding: 0;
|
|
36
|
+
margin: 0;
|
|
37
|
+
float: left;
|
|
38
|
+
width: 14px;
|
|
39
|
+
height: 14px;
|
|
40
|
+
background: $primary-color;
|
|
41
|
+
line-height: 34px;
|
|
42
|
+
margin-top: 10px;
|
|
43
|
+
border-radius: 10px;
|
|
44
|
+
margin-right: 4px;
|
|
45
|
+
}
|
|
46
|
+
.ht-user-name {
|
|
47
|
+
padding: 0;
|
|
48
|
+
margin: 0;
|
|
49
|
+
float: left;
|
|
50
|
+
}
|
|
51
|
+
.ht-user-dot-disabled {
|
|
52
|
+
background: #ccc;
|
|
53
|
+
}
|
|
54
|
+
.ht-user-disabled {
|
|
55
|
+
color: #ddd;
|
|
56
|
+
}
|