htui-yllkbz 1.3.27 → 1.3.30
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 +78 -69
- package/lib/htui.common.js.gz +0 -0
- package/lib/htui.css +1 -1
- package/lib/htui.umd.js +78 -69
- 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 +17 -9
- package/src/packages/HtBaseData/index.vue +22 -13
- package/src/packages/HtSelectUser/index.vue +1 -1
- package/src/packages/HtShowBaseType/index.vue +3 -2
package/lib/htui.umd.min.js.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-11-15 14:41:40
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2022-05-11
|
|
7
|
+
* @LastEditTime: 2022-05-17 11:31:05
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
10
|
<div id="app">
|
|
@@ -13,12 +13,17 @@
|
|
|
13
13
|
<HtSelectBaseData dataTypeId="chengbenzhongxin"
|
|
14
14
|
v-model="state.value"
|
|
15
15
|
@change="change"></HtSelectBaseData>
|
|
16
|
-
|
|
17
|
-
:multiple="false"
|
|
18
|
-
v-model="state.value"
|
|
19
|
-
@change="change"></HtSelectBaseData>
|
|
16
|
+
|
|
20
17
|
<HtSelectOrg :clearable="true"
|
|
18
|
+
:multiple="true"
|
|
19
|
+
v-model="state.value"
|
|
21
20
|
@change="testuser"></HtSelectOrg>
|
|
21
|
+
<!-- <HtSelectOrg :clearable="true"
|
|
22
|
+
v-model="state.value"
|
|
23
|
+
@change="testuser"></HtSelectOrg> -->
|
|
24
|
+
-------------
|
|
25
|
+
|
|
26
|
+
----------
|
|
22
27
|
<router-view></router-view>
|
|
23
28
|
</div>
|
|
24
29
|
</template>
|
|
@@ -26,17 +31,20 @@
|
|
|
26
31
|
<script lang="ts">
|
|
27
32
|
import { Component, Vue } from "vue-property-decorator";
|
|
28
33
|
import HtSelectBaseData from "@/packages/HtSelectBaseData";
|
|
29
|
-
import HtSelectOrg from "@/packages/
|
|
34
|
+
import HtSelectOrg from "@/packages/HtSelectOrg";
|
|
35
|
+
import HtSelectUser from "@/packages/HtSelectUser";
|
|
36
|
+
import HtShowBaseType from "@/packages/HtShowBaseType";
|
|
30
37
|
import { mgr } from "@/plugins/oidc-client";
|
|
31
38
|
@Component({
|
|
32
39
|
components: {
|
|
33
40
|
HtSelectBaseData,
|
|
34
41
|
HtSelectOrg,
|
|
42
|
+
HtShowBaseType,
|
|
35
43
|
},
|
|
36
44
|
})
|
|
37
45
|
export default class App extends Vue {
|
|
38
46
|
state = {
|
|
39
|
-
value:
|
|
47
|
+
value: ["95bd1bfd-59d8-f88b-2b65-39f97d1da058"],
|
|
40
48
|
};
|
|
41
49
|
/** 生命周期 */
|
|
42
50
|
created() {
|
|
@@ -58,8 +66,8 @@ export default class App extends Vue {
|
|
|
58
66
|
change() {
|
|
59
67
|
// console.log("eeee", e);
|
|
60
68
|
}
|
|
61
|
-
testuser() {
|
|
62
|
-
|
|
69
|
+
testuser(e: any) {
|
|
70
|
+
console.log("eee", e);
|
|
63
71
|
}
|
|
64
72
|
test(e: any) {
|
|
65
73
|
//mgr.removeUser();
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
class="component-item"
|
|
13
13
|
:class="comClass"
|
|
14
14
|
:style="comStyle || ''"
|
|
15
|
-
filterable
|
|
15
|
+
:filterable="!state.configJson['departmentId'].multiple"
|
|
16
16
|
:clearable="state.configJson['departmentId'].clearable"
|
|
17
17
|
:placeholder="`请选择部门`"
|
|
18
18
|
:collapse-tags="state.configJson['departmentId'].collapseTags"
|
|
@@ -632,6 +632,7 @@ export default class CommonDatas extends Vue {
|
|
|
632
632
|
/** 动态设置显示面板位置 */
|
|
633
633
|
|
|
634
634
|
selectClick(e: any) {
|
|
635
|
+
console.log("ee", e);
|
|
635
636
|
// 下拉选择框列表
|
|
636
637
|
//const list = window.document.getElementsByClassName("el-select-dropdown");
|
|
637
638
|
// (list as any).forEach((element: any) => {
|
|
@@ -653,20 +654,25 @@ export default class CommonDatas extends Vue {
|
|
|
653
654
|
/** 设置下拉数据(级联选择) */
|
|
654
655
|
setSelctData(key: string, e?: string) {
|
|
655
656
|
const value = e || this.state.selectVal[key];
|
|
656
|
-
|
|
657
|
+
const multiple = this.state.configJson[key].multiple;
|
|
657
658
|
const ref: any | undefined = (this.$refs[key] as any)[0] || this.$refs[key];
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
if (ref && ref.getCheckedNodes() && ref.getCheckedNodes()[0] !== null) {
|
|
659
|
+
let checkList: any[] = [];
|
|
660
|
+
if (multiple) {
|
|
661
661
|
checkList = ref.getCheckedNodes();
|
|
662
|
-
} else
|
|
663
|
-
ref &&
|
|
664
|
-
|
|
665
|
-
ref.getCheckedNodes()[0] === null
|
|
666
|
-
) {
|
|
667
|
-
checkList = [ref.panel.getNodeByValue(value)];
|
|
668
|
-
}
|
|
662
|
+
} else {
|
|
663
|
+
if (ref && ref.getCheckedNodes() && ref.getCheckedNodes()[0] !== null) {
|
|
664
|
+
//checkList = ref.getCheckedNodes();
|
|
669
665
|
|
|
666
|
+
checkList = [ref.panel.getNodeByValue(value)];
|
|
667
|
+
//this.state.selectValData[key] = [checkList[0].data];
|
|
668
|
+
} else if (
|
|
669
|
+
ref &&
|
|
670
|
+
ref.getCheckedNodes() &&
|
|
671
|
+
ref.getCheckedNodes()[0] === null
|
|
672
|
+
) {
|
|
673
|
+
checkList = [ref.panel.getNodeByValue(value)];
|
|
674
|
+
}
|
|
675
|
+
}
|
|
670
676
|
/** 过滤在多选模式下,Tag时触发删除 */
|
|
671
677
|
const checkNodes = checkList.filter((item: any) => {
|
|
672
678
|
return value?.includes(item.data.id);
|
|
@@ -685,7 +691,10 @@ export default class CommonDatas extends Vue {
|
|
|
685
691
|
if (!e && !this.state.selectVal[key]) {
|
|
686
692
|
this.state.selectValData[key] = [];
|
|
687
693
|
}
|
|
688
|
-
this.$emit(
|
|
694
|
+
this.$emit(
|
|
695
|
+
"change",
|
|
696
|
+
this.state.selectValData[key] ? this.state.selectValData : { [key]: [] }
|
|
697
|
+
);
|
|
689
698
|
}
|
|
690
699
|
/** 基础数据递归处理 */
|
|
691
700
|
recursion(data: Array<BaseDataDto>) {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2022-05-15 14:53:15
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2022-05-15
|
|
7
|
+
* @LastEditTime: 2022-05-15 16:06:01
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
10
|
<span>{{state.value}}</span>
|
|
@@ -36,7 +36,7 @@ export default class HtShowBaseType extends Vue {
|
|
|
36
36
|
}
|
|
37
37
|
/** 方法 */
|
|
38
38
|
|
|
39
|
-
@Watch("value")
|
|
39
|
+
@Watch("value", { immediate: true })
|
|
40
40
|
setText(val: string) {
|
|
41
41
|
this.state.value = "";
|
|
42
42
|
if (!val) {
|
|
@@ -46,6 +46,7 @@ export default class HtShowBaseType extends Vue {
|
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
48
48
|
const data = window.localStorage.getItem("commonDatas");
|
|
49
|
+
|
|
49
50
|
if (data) {
|
|
50
51
|
const dictionaryCategory =
|
|
51
52
|
JSON.parse(data)["dictionaryCategory"]["items"];
|