htui-yllkbz 1.3.30 → 1.3.34
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 -106
- package/lib/htui.common.js.gz +0 -0
- package/lib/htui.css +1 -1
- package/lib/htui.umd.js +125 -106
- package/lib/htui.umd.js.gz +0 -0
- package/lib/htui.umd.min.js +2 -2
- package/lib/htui.umd.min.js.gz +0 -0
- package/package.json +1 -1
- package/src/packages/HtBaseData/index.vue +240 -194
- package/src/packages/HtSelectBaseData/index.vue +41 -33
- package/src/packages/HtSelectOrg/index.vue +28 -22
- package/src/packages/HtSelectUser/index.vue +28 -22
|
@@ -4,32 +4,39 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-12-30 15:47:47
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2022-
|
|
7
|
+
* @LastEditTime: 2022-07-10 14:38:04
|
|
8
8
|
-->
|
|
9
9
|
|
|
10
10
|
<template>
|
|
11
11
|
<div>
|
|
12
12
|
<template v-if="!readonly">
|
|
13
|
-
<el-select
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
<el-select
|
|
14
|
+
value=""
|
|
15
|
+
v-if="!dataTypeId"
|
|
16
|
+
:disabled="disabled"
|
|
17
|
+
style="width:100%"
|
|
18
|
+
placeholder="请选择"
|
|
19
|
+
></el-select>
|
|
20
|
+
<HtBaseData
|
|
21
|
+
v-else
|
|
22
|
+
:org="org"
|
|
23
|
+
:hide-code="hideCode"
|
|
24
|
+
:disabled="disabled"
|
|
25
|
+
com-style="background:#fff"
|
|
26
|
+
:config-json="configJson"
|
|
27
|
+
@change="getCommonData"
|
|
28
|
+
></HtBaseData>
|
|
24
29
|
</template>
|
|
25
30
|
<div v-else>
|
|
26
|
-
<HtShowBaseData
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
<HtShowBaseData
|
|
32
|
+
v-if="this.value"
|
|
33
|
+
:hide-code="hideCode"
|
|
34
|
+
:show-all-level="showAllLevels"
|
|
35
|
+
:base-data-id="this.value"
|
|
36
|
+
:base-data-info="true"
|
|
37
|
+
com-style="font-size:12px"
|
|
38
|
+
style="font-size:12px"
|
|
39
|
+
>
|
|
33
40
|
</HtShowBaseData>
|
|
34
41
|
<!-- <div is='common-datas-info-id'
|
|
35
42
|
com-style="font-size:12px"
|
|
@@ -38,21 +45,19 @@
|
|
|
38
45
|
:base-data-id='this.value'
|
|
39
46
|
:base-data-info='true'></div> -->
|
|
40
47
|
</div>
|
|
41
|
-
|
|
42
48
|
</div>
|
|
43
|
-
|
|
44
49
|
</template>
|
|
45
|
-
<script lang=
|
|
46
|
-
import { Component, Prop, Vue, Watch } from
|
|
47
|
-
import HtShowBaseData from
|
|
48
|
-
import HtBaseData from
|
|
50
|
+
<script lang="ts">
|
|
51
|
+
import { Component, Prop, Vue, Watch } from 'vue-property-decorator';
|
|
52
|
+
import HtShowBaseData from '@/packages/HtShowBaseData';
|
|
53
|
+
import HtBaseData from '@/packages/HtBaseData';
|
|
49
54
|
interface State {
|
|
50
55
|
/** 数据状态 */
|
|
51
56
|
loading: boolean;
|
|
52
57
|
value?: string;
|
|
53
58
|
}
|
|
54
59
|
@Component({
|
|
55
|
-
name:
|
|
60
|
+
name: 'HtSelectBaseData',
|
|
56
61
|
components: {
|
|
57
62
|
HtShowBaseData,
|
|
58
63
|
HtBaseData,
|
|
@@ -60,12 +65,14 @@ interface State {
|
|
|
60
65
|
})
|
|
61
66
|
export default class HtSelectBaseData extends Vue {
|
|
62
67
|
@Prop() value!: string;
|
|
68
|
+
@Prop() org?: string;
|
|
63
69
|
/** 是否禁用 */
|
|
64
70
|
@Prop({ default: false }) disabled?: boolean;
|
|
65
71
|
/* 是否只读 */
|
|
66
72
|
@Prop({ default: false }) readonly?: boolean;
|
|
67
73
|
/** 级联id */
|
|
68
74
|
@Prop() dataTypeId!: string;
|
|
75
|
+
@Prop() collapseTags!: boolean;
|
|
69
76
|
/** 展示时候是否隐藏value */
|
|
70
77
|
@Prop() hideCode!: boolean;
|
|
71
78
|
@Prop({ default: false }) clearable!: boolean;
|
|
@@ -76,7 +83,7 @@ export default class HtSelectBaseData extends Vue {
|
|
|
76
83
|
/** 数据 */
|
|
77
84
|
state: State = {
|
|
78
85
|
loading: false,
|
|
79
|
-
value:
|
|
86
|
+
value: '',
|
|
80
87
|
};
|
|
81
88
|
/** 生命周期 */
|
|
82
89
|
created() {
|
|
@@ -101,13 +108,13 @@ export default class HtSelectBaseData extends Vue {
|
|
|
101
108
|
data = dep[0].id;
|
|
102
109
|
}
|
|
103
110
|
}
|
|
104
|
-
this.$emit(
|
|
105
|
-
this.$emit(
|
|
111
|
+
this.$emit('input', data);
|
|
112
|
+
this.$emit('change', data, dep);
|
|
106
113
|
// this.$emit("input", id);
|
|
107
114
|
// this.$emit("change", id, data[this.dataTypeId][0]);
|
|
108
115
|
}
|
|
109
116
|
/** 监听 */
|
|
110
|
-
@Watch(
|
|
117
|
+
@Watch('value')
|
|
111
118
|
onValue(val: string) {
|
|
112
119
|
this.state.value = val;
|
|
113
120
|
}
|
|
@@ -115,16 +122,17 @@ export default class HtSelectBaseData extends Vue {
|
|
|
115
122
|
/** 选项列表 */
|
|
116
123
|
/** 基础组件应用json */
|
|
117
124
|
get configJson() {
|
|
118
|
-
const { dataTypeId =
|
|
125
|
+
const { dataTypeId = '', value } = this;
|
|
119
126
|
const body: { [key: string]: any } = {};
|
|
120
127
|
body[dataTypeId] = {
|
|
121
|
-
name:
|
|
128
|
+
name: 'cece',
|
|
122
129
|
show: true,
|
|
123
130
|
filterable: true,
|
|
124
131
|
clearable: this.clearable,
|
|
125
132
|
disabled: this.disabled,
|
|
126
133
|
showAllLevels: this.showAllLevels,
|
|
127
134
|
multiple: this.multiple,
|
|
135
|
+
collapseTags: this.collapseTags,
|
|
128
136
|
code: dataTypeId,
|
|
129
137
|
data: {},
|
|
130
138
|
checkStrictly: this.checkStrictly,
|
|
@@ -135,4 +143,4 @@ export default class HtSelectBaseData extends Vue {
|
|
|
135
143
|
}
|
|
136
144
|
}
|
|
137
145
|
</script>
|
|
138
|
-
<style lang=
|
|
146
|
+
<style lang="scss" scoped></style>
|
|
@@ -4,33 +4,36 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-12-30 14:29:14
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2022-
|
|
7
|
+
* @LastEditTime: 2022-07-10 14:34:45
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
10
|
<span v-if="readonly">
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
<HtShowBaseData
|
|
12
|
+
v-if="value"
|
|
13
|
+
:org="org"
|
|
14
|
+
:department-id="JSON.stringify([value])"
|
|
15
|
+
></HtShowBaseData>
|
|
14
16
|
<span v-else> </span>
|
|
15
17
|
</span>
|
|
16
|
-
<HtBaseData
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
<HtBaseData
|
|
19
|
+
v-else
|
|
20
|
+
:disabled="disabled"
|
|
21
|
+
com-style="background:#fff"
|
|
22
|
+
:config-json="configJson"
|
|
23
|
+
com-class="ht-item-common"
|
|
24
|
+
@change="searchCommonData"
|
|
25
|
+
></HtBaseData>
|
|
23
26
|
</template>
|
|
24
|
-
<script lang=
|
|
25
|
-
import { Component, Prop, Vue } from
|
|
26
|
-
import HtShowBaseData from
|
|
27
|
-
import HtBaseData from
|
|
27
|
+
<script lang="ts">
|
|
28
|
+
import { Component, Prop, Vue } from 'vue-property-decorator';
|
|
29
|
+
import HtShowBaseData from '@/packages/HtShowBaseData';
|
|
30
|
+
import HtBaseData from '@/packages/HtBaseData';
|
|
28
31
|
interface State {
|
|
29
32
|
/** 数据状态 */
|
|
30
33
|
loading: boolean;
|
|
31
34
|
}
|
|
32
35
|
@Component({
|
|
33
|
-
name:
|
|
36
|
+
name: 'HtSelectOrg',
|
|
34
37
|
components: {
|
|
35
38
|
HtShowBaseData,
|
|
36
39
|
HtBaseData,
|
|
@@ -40,12 +43,14 @@ export default class HtSelectOrg extends Vue {
|
|
|
40
43
|
@Prop() value!: string;
|
|
41
44
|
/** 是否禁用 */
|
|
42
45
|
@Prop() disabled?: boolean;
|
|
46
|
+
@Prop() org?: string;
|
|
43
47
|
/** 是否可以清除 */
|
|
44
48
|
@Prop() clearable?: boolean;
|
|
45
49
|
@Prop({ default: true }) show?: boolean;
|
|
46
50
|
@Prop({ default: false }) multiple?: boolean;
|
|
47
51
|
@Prop({ default: true }) showAllLevels?: boolean;
|
|
48
52
|
@Prop({ default: true }) checkStrictly?: boolean;
|
|
53
|
+
@Prop() collapseTags!: boolean;
|
|
49
54
|
/* 是否只读 */
|
|
50
55
|
@Prop({ default: false }) readonly?: boolean;
|
|
51
56
|
@Prop({ default: false }) panel?: boolean;
|
|
@@ -57,7 +62,7 @@ export default class HtSelectOrg extends Vue {
|
|
|
57
62
|
/** 方法 */
|
|
58
63
|
/**部门选择回调 */
|
|
59
64
|
searchCommonData(res: any) {
|
|
60
|
-
const dep = res[
|
|
65
|
+
const dep = res['departmentId'];
|
|
61
66
|
|
|
62
67
|
let data = undefined;
|
|
63
68
|
if (dep.length) {
|
|
@@ -71,21 +76,22 @@ export default class HtSelectOrg extends Vue {
|
|
|
71
76
|
data = dep[0].id;
|
|
72
77
|
}
|
|
73
78
|
}
|
|
74
|
-
this.$emit(
|
|
75
|
-
this.$emit(
|
|
79
|
+
this.$emit('input', data);
|
|
80
|
+
this.$emit('change', data);
|
|
76
81
|
}
|
|
77
82
|
/** 监听 */
|
|
78
83
|
get configJson() {
|
|
79
84
|
return JSON.stringify({
|
|
80
85
|
departmentId: {
|
|
81
|
-
name:
|
|
86
|
+
name: '部门树结构',
|
|
82
87
|
show: this.show,
|
|
83
88
|
disabled: this.disabled,
|
|
84
89
|
showAllLevels: this.showAllLevels,
|
|
85
90
|
multiple: this.multiple,
|
|
86
|
-
code:
|
|
91
|
+
code: 'departmentId',
|
|
87
92
|
data: {},
|
|
88
93
|
checkStrictly: this.checkStrictly,
|
|
94
|
+
collapseTags: this.collapseTags,
|
|
89
95
|
panel: this.panel,
|
|
90
96
|
key: this.value,
|
|
91
97
|
clearable: this.clearable,
|
|
@@ -95,4 +101,4 @@ export default class HtSelectOrg extends Vue {
|
|
|
95
101
|
/** 计算属性 */
|
|
96
102
|
}
|
|
97
103
|
</script>
|
|
98
|
-
<style lang=
|
|
104
|
+
<style lang="scss" scoped></style>
|
|
@@ -4,33 +4,36 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-12-30 14:29:14
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2022-
|
|
7
|
+
* @LastEditTime: 2022-07-10 14:34:15
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
|
-
|
|
11
10
|
<span v-if="readonly">
|
|
12
|
-
<HtShowBaseData
|
|
13
|
-
|
|
11
|
+
<HtShowBaseData
|
|
12
|
+
v-if="value"
|
|
13
|
+
:user-id="JSON.stringify([value])"
|
|
14
|
+
:org="org"
|
|
15
|
+
></HtShowBaseData>
|
|
14
16
|
<span v-else> </span>
|
|
15
17
|
</span>
|
|
16
|
-
<HtBaseData
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
<HtBaseData
|
|
19
|
+
v-else
|
|
20
|
+
:disabled="disabled"
|
|
21
|
+
com-style="background:#fff"
|
|
22
|
+
:config-json="configJson"
|
|
23
|
+
com-class="ht-item-common"
|
|
24
|
+
@change="searchCommonData"
|
|
25
|
+
></HtBaseData>
|
|
23
26
|
</template>
|
|
24
|
-
<script lang=
|
|
25
|
-
import { Component, Prop, Vue } from
|
|
26
|
-
import HtShowBaseData from
|
|
27
|
-
import HtBaseData from
|
|
27
|
+
<script lang="ts">
|
|
28
|
+
import { Component, Prop, Vue } from 'vue-property-decorator';
|
|
29
|
+
import HtShowBaseData from '@/packages/HtShowBaseData';
|
|
30
|
+
import HtBaseData from '@/packages/HtBaseData';
|
|
28
31
|
interface State {
|
|
29
32
|
/** 数据状态 */
|
|
30
33
|
loading: boolean;
|
|
31
34
|
}
|
|
32
35
|
@Component({
|
|
33
|
-
name:
|
|
36
|
+
name: 'HtSelectUser',
|
|
34
37
|
components: {
|
|
35
38
|
HtShowBaseData,
|
|
36
39
|
HtBaseData,
|
|
@@ -38,6 +41,7 @@ interface State {
|
|
|
38
41
|
})
|
|
39
42
|
export default class HtSelectUser extends Vue {
|
|
40
43
|
@Prop() value!: string;
|
|
44
|
+
@Prop() org!: string;
|
|
41
45
|
/** 是否禁用 */
|
|
42
46
|
@Prop() disabled?: boolean;
|
|
43
47
|
/** 是否可以清除 */
|
|
@@ -49,6 +53,7 @@ export default class HtSelectUser extends Vue {
|
|
|
49
53
|
/* 是否只读 */
|
|
50
54
|
@Prop({ default: false }) readonly?: boolean;
|
|
51
55
|
@Prop({ default: false }) panel?: boolean;
|
|
56
|
+
@Prop({ default: false }) collapseTags?: boolean;
|
|
52
57
|
/** 数据 */
|
|
53
58
|
state: State = {
|
|
54
59
|
loading: false,
|
|
@@ -57,7 +62,7 @@ export default class HtSelectUser extends Vue {
|
|
|
57
62
|
/** 方法 */
|
|
58
63
|
/**部门选择回调 */
|
|
59
64
|
searchCommonData(res: any) {
|
|
60
|
-
const dep = res[
|
|
65
|
+
const dep = res['departmentUser'];
|
|
61
66
|
|
|
62
67
|
let data = undefined;
|
|
63
68
|
if (dep.length) {
|
|
@@ -71,23 +76,24 @@ export default class HtSelectUser extends Vue {
|
|
|
71
76
|
data = dep[0].id;
|
|
72
77
|
}
|
|
73
78
|
}
|
|
74
|
-
this.$emit(
|
|
75
|
-
this.$emit(
|
|
79
|
+
this.$emit('input', data);
|
|
80
|
+
this.$emit('change', data);
|
|
76
81
|
}
|
|
77
82
|
/** 监听 */
|
|
78
83
|
get configJson() {
|
|
79
84
|
return JSON.stringify({
|
|
80
85
|
departmentUser: {
|
|
81
|
-
name:
|
|
86
|
+
name: '部门树结构',
|
|
82
87
|
show: this.show,
|
|
83
88
|
disabled: this.disabled,
|
|
84
89
|
showAllLevels: this.showAllLevels,
|
|
85
90
|
multiple: this.multiple,
|
|
86
|
-
code:
|
|
91
|
+
code: 'departmentUser',
|
|
87
92
|
data: {},
|
|
88
93
|
checkStrictly: false,
|
|
89
94
|
panel: this.panel,
|
|
90
95
|
key: this.value,
|
|
96
|
+
collapseTags: this.collapseTags,
|
|
91
97
|
clearable: this.clearable,
|
|
92
98
|
},
|
|
93
99
|
});
|
|
@@ -95,4 +101,4 @@ export default class HtSelectUser extends Vue {
|
|
|
95
101
|
/** 计算属性 */
|
|
96
102
|
}
|
|
97
103
|
</script>
|
|
98
|
-
<style lang=
|
|
104
|
+
<style lang="scss" scoped></style>
|