htui-yllkbz 1.3.14 → 1.3.17
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 +2850 -199
- package/lib/htui.common.js.gz +0 -0
- package/lib/htui.css +1 -1
- package/lib/htui.umd.js +2850 -199
- package/lib/htui.umd.js.gz +0 -0
- package/lib/htui.umd.min.js +4 -4
- package/lib/htui.umd.min.js.gz +0 -0
- package/package.json +1 -1
- package/src/packages/HtBaseData/index.ts +15 -0
- package/src/packages/HtBaseData/index.vue +860 -0
- package/src/packages/HtOrgInfo/index.ts +14 -0
- package/src/packages/HtOrgInfo/index.vue +77 -0
- package/src/packages/HtSelectBaseData/index.vue +28 -12
- package/src/packages/HtSelectOrg/index.vue +27 -14
- package/src/packages/HtSelectUser/index.vue +27 -15
- package/src/packages/HtTable/index.vue +9 -7
- package/src/packages/index.ts +5 -3
- package/src/plugins/Auth.ts +54853 -0
- package/src/plugins/commonApi.ts +24120 -0
- package/src/views/About.vue +9 -8
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Descripttion:选择部门
|
|
3
|
+
* @version:
|
|
4
|
+
* @Author: hutao
|
|
5
|
+
* @Date: 2021-11-15 15:00:57
|
|
6
|
+
* @LastEditors: hutao
|
|
7
|
+
* @LastEditTime: 2022-04-12 17:59:54
|
|
8
|
+
*/
|
|
9
|
+
import HtOrgInfo from "./index.vue";
|
|
10
|
+
(HtOrgInfo as any).install = function (Vue: any) {
|
|
11
|
+
|
|
12
|
+
Vue.component("HtOrgInfo", HtOrgInfo);
|
|
13
|
+
};
|
|
14
|
+
export default HtOrgInfo;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Descripttion:
|
|
3
|
+
* @version:
|
|
4
|
+
* @Author: hutao
|
|
5
|
+
* @Date: 2021-07-14 16:40:33
|
|
6
|
+
* @LastEditors: hutao
|
|
7
|
+
* @LastEditTime: 2022-04-12 18:00:15
|
|
8
|
+
-->
|
|
9
|
+
<template>
|
|
10
|
+
<div :style="wapperStyle"
|
|
11
|
+
v-if="orgId">
|
|
12
|
+
<el-tag type="success"
|
|
13
|
+
size="medium"
|
|
14
|
+
v-if="type==='tag'"
|
|
15
|
+
:style="comStyle">
|
|
16
|
+
{{getOrgNameFunc(orgId)}}
|
|
17
|
+
</el-tag>
|
|
18
|
+
<span v-else
|
|
19
|
+
:style="comStyle">
|
|
20
|
+
{{getOrgNameFunc(orgId)}}
|
|
21
|
+
</span>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
<script lang='ts'>
|
|
25
|
+
import { Component, Vue, Prop } from "vue-property-decorator";
|
|
26
|
+
interface State {
|
|
27
|
+
/** 数据状态 */
|
|
28
|
+
loading: boolean;
|
|
29
|
+
}
|
|
30
|
+
@Component({
|
|
31
|
+
name: "HtOrgInfo",
|
|
32
|
+
})
|
|
33
|
+
export default class Index extends Vue {
|
|
34
|
+
/** 是否用tag标签展示 tag表示是 */
|
|
35
|
+
@Prop() type!: string;
|
|
36
|
+
/** 机构id */
|
|
37
|
+
@Prop() orgId!: string;
|
|
38
|
+
/** 节点样式 */
|
|
39
|
+
@Prop() comStyle!: string;
|
|
40
|
+
/** 外层样式 */
|
|
41
|
+
@Prop() wapperStyle!: string;
|
|
42
|
+
|
|
43
|
+
/** 数据 */
|
|
44
|
+
state: State = {
|
|
45
|
+
loading: false,
|
|
46
|
+
};
|
|
47
|
+
/** 生命周期 */
|
|
48
|
+
/** 方法 */
|
|
49
|
+
/** 监听 */
|
|
50
|
+
/** 计算属性 */
|
|
51
|
+
/** 查询所属部门 */
|
|
52
|
+
getOrgNameFunc(id: string | undefined) {
|
|
53
|
+
// console.log("id", id);
|
|
54
|
+
let commonDatas: any = window.localStorage.getItem("commonDatas");
|
|
55
|
+
let getOrganizaList: any[] = [];
|
|
56
|
+
if (commonDatas) {
|
|
57
|
+
commonDatas = JSON.parse(commonDatas);
|
|
58
|
+
getOrganizaList = commonDatas.organizationUnit;
|
|
59
|
+
}
|
|
60
|
+
if (id) {
|
|
61
|
+
return this.getOrgName(id, getOrganizaList);
|
|
62
|
+
} else {
|
|
63
|
+
return "";
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
getOrgName(id: string, list: any[]) {
|
|
67
|
+
const arr = list.filter((item) => id === item.id);
|
|
68
|
+
|
|
69
|
+
if (arr.length) {
|
|
70
|
+
return arr[0].displayName;
|
|
71
|
+
} else {
|
|
72
|
+
return "--";
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
</script>
|
|
77
|
+
<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-04-
|
|
7
|
+
* @LastEditTime: 2022-04-13 13:47:43
|
|
8
8
|
-->
|
|
9
9
|
|
|
10
10
|
<template>
|
|
@@ -15,12 +15,11 @@
|
|
|
15
15
|
:disabled="disabled"
|
|
16
16
|
style="width:100%"
|
|
17
17
|
placeholder="请选择"></el-select>
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
@change="getCommonData"></div>
|
|
18
|
+
<HtBaseData v-else
|
|
19
|
+
:disabled="disabled"
|
|
20
|
+
com-style="background:#fff"
|
|
21
|
+
:config-json="configJson"
|
|
22
|
+
@change="getCommonData"></HtBaseData>
|
|
24
23
|
|
|
25
24
|
</template>
|
|
26
25
|
<div v-else>
|
|
@@ -45,6 +44,7 @@
|
|
|
45
44
|
<script lang='ts'>
|
|
46
45
|
import { Component, Prop, Vue, Watch } from "vue-property-decorator";
|
|
47
46
|
import HtShowBaseData from "@/packages/HtShowBaseData";
|
|
47
|
+
import HtBaseData from "@/packages/HtBaseData";
|
|
48
48
|
interface State {
|
|
49
49
|
/** 数据状态 */
|
|
50
50
|
loading: boolean;
|
|
@@ -54,6 +54,7 @@ interface State {
|
|
|
54
54
|
name: "HtSelectBaseData",
|
|
55
55
|
components: {
|
|
56
56
|
HtShowBaseData,
|
|
57
|
+
HtBaseData,
|
|
57
58
|
},
|
|
58
59
|
})
|
|
59
60
|
export default class HtSelectBaseData extends Vue {
|
|
@@ -83,11 +84,26 @@ export default class HtSelectBaseData extends Vue {
|
|
|
83
84
|
/** 方法 */
|
|
84
85
|
|
|
85
86
|
/** 基础数据返回 */
|
|
86
|
-
getCommonData(res:
|
|
87
|
-
const data = res.detail[0];
|
|
88
|
-
const id = data[this.dataTypeId][0]["id"];
|
|
89
|
-
this
|
|
90
|
-
|
|
87
|
+
getCommonData(res: any) {
|
|
88
|
+
// const data = res.detail[0];
|
|
89
|
+
//const id = data[this.dataTypeId][0]["id"];
|
|
90
|
+
const dep = res[this.dataTypeId];
|
|
91
|
+
let data = undefined;
|
|
92
|
+
if (dep.length) {
|
|
93
|
+
if (this.multiple) {
|
|
94
|
+
const arr: string[] = [];
|
|
95
|
+
dep.forEach((item: any) => {
|
|
96
|
+
arr.push(item.id);
|
|
97
|
+
});
|
|
98
|
+
data = arr;
|
|
99
|
+
} else {
|
|
100
|
+
data = dep[0].id;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
this.$emit("input", data);
|
|
104
|
+
this.$emit("change", data);
|
|
105
|
+
// this.$emit("input", id);
|
|
106
|
+
// this.$emit("change", id, data[this.dataTypeId][0]);
|
|
91
107
|
}
|
|
92
108
|
/** 监听 */
|
|
93
109
|
@Watch("value")
|
|
@@ -4,33 +4,37 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-12-30 14:29:14
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2022-
|
|
7
|
+
* @LastEditTime: 2022-04-13 13:45:57
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
10
|
<span v-if="readonly">
|
|
11
11
|
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
:department-id="JSON.stringify([value])"></div>
|
|
12
|
+
<HtShowBaseData v-if="value"
|
|
13
|
+
:department-id="JSON.stringify([value])"></HtShowBaseData>
|
|
15
14
|
<span v-else> </span>
|
|
16
15
|
</span>
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
@change="searchCommonData"></div>
|
|
16
|
+
<HtBaseData v-else
|
|
17
|
+
:disabled="disabled"
|
|
18
|
+
com-style="background:#fff"
|
|
19
|
+
:config-json="configJson"
|
|
20
|
+
com-class='ht-item-common'
|
|
21
|
+
@change="searchCommonData"></HtBaseData>
|
|
24
22
|
|
|
25
23
|
</template>
|
|
26
24
|
<script lang='ts'>
|
|
27
25
|
import { Component, Prop, Vue } from "vue-property-decorator";
|
|
26
|
+
import HtShowBaseData from "@/packages/HtShowBaseData";
|
|
27
|
+
import HtBaseData from "@/packages/HtBaseData";
|
|
28
28
|
interface State {
|
|
29
29
|
/** 数据状态 */
|
|
30
30
|
loading: boolean;
|
|
31
31
|
}
|
|
32
32
|
@Component({
|
|
33
33
|
name: "HtSelectOrg",
|
|
34
|
+
components: {
|
|
35
|
+
HtShowBaseData,
|
|
36
|
+
HtBaseData,
|
|
37
|
+
},
|
|
34
38
|
})
|
|
35
39
|
export default class HtSelectOrg extends Vue {
|
|
36
40
|
@Prop() value!: string;
|
|
@@ -52,11 +56,20 @@ export default class HtSelectOrg extends Vue {
|
|
|
52
56
|
/** 生命周期 */
|
|
53
57
|
/** 方法 */
|
|
54
58
|
/**部门选择回调 */
|
|
55
|
-
searchCommonData(res:
|
|
56
|
-
const dep = res
|
|
59
|
+
searchCommonData(res: any) {
|
|
60
|
+
const dep = res["departmentId"];
|
|
61
|
+
|
|
57
62
|
let data = undefined;
|
|
58
63
|
if (dep.length) {
|
|
59
|
-
|
|
64
|
+
if (this.multiple) {
|
|
65
|
+
const arr: string[] = [];
|
|
66
|
+
dep.forEach((item: any) => {
|
|
67
|
+
arr.push(item.id);
|
|
68
|
+
});
|
|
69
|
+
data = arr;
|
|
70
|
+
} else {
|
|
71
|
+
data = dep[0].id;
|
|
72
|
+
}
|
|
60
73
|
}
|
|
61
74
|
this.$emit("input", data);
|
|
62
75
|
this.$emit("change", data);
|
|
@@ -4,34 +4,37 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-12-30 14:29:14
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2022-
|
|
7
|
+
* @LastEditTime: 2022-04-13 13:27:23
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
10
|
|
|
11
11
|
<span v-if="readonly">
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
:user-id="JSON.stringify([value])"></div>
|
|
12
|
+
<HtShowBaseData v-if="value"
|
|
13
|
+
:user-id="JSON.stringify([value])"></HtShowBaseData>
|
|
15
14
|
<span v-else> </span>
|
|
16
15
|
</span>
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
com-class='ht-item-common'
|
|
24
|
-
@change="searchCommonData"></div>
|
|
16
|
+
<HtBaseData v-else
|
|
17
|
+
:disabled="disabled"
|
|
18
|
+
com-style="background:#fff"
|
|
19
|
+
:config-json="configJson"
|
|
20
|
+
com-class='ht-item-common'
|
|
21
|
+
@change="searchCommonData"></HtBaseData>
|
|
25
22
|
|
|
26
23
|
</template>
|
|
27
24
|
<script lang='ts'>
|
|
28
25
|
import { Component, Prop, Vue } from "vue-property-decorator";
|
|
26
|
+
import HtShowBaseData from "@/packages/HtShowBaseData";
|
|
27
|
+
import HtBaseData from "@/packages/HtBaseData";
|
|
29
28
|
interface State {
|
|
30
29
|
/** 数据状态 */
|
|
31
30
|
loading: boolean;
|
|
32
31
|
}
|
|
33
32
|
@Component({
|
|
34
33
|
name: "HtSelectUser",
|
|
34
|
+
components: {
|
|
35
|
+
HtShowBaseData,
|
|
36
|
+
HtBaseData,
|
|
37
|
+
},
|
|
35
38
|
})
|
|
36
39
|
export default class HtSelectUser extends Vue {
|
|
37
40
|
@Prop() value!: string;
|
|
@@ -53,11 +56,20 @@ export default class HtSelectUser extends Vue {
|
|
|
53
56
|
/** 生命周期 */
|
|
54
57
|
/** 方法 */
|
|
55
58
|
/**部门选择回调 */
|
|
56
|
-
searchCommonData(res:
|
|
57
|
-
const dep = res
|
|
59
|
+
searchCommonData(res: any) {
|
|
60
|
+
const dep = res["departmentUser"];
|
|
61
|
+
|
|
58
62
|
let data = undefined;
|
|
59
63
|
if (dep.length) {
|
|
60
|
-
|
|
64
|
+
if (this.multiple) {
|
|
65
|
+
const arr: string[] = [];
|
|
66
|
+
dep.forEach((item: any) => {
|
|
67
|
+
arr.push(item.id);
|
|
68
|
+
});
|
|
69
|
+
data = arr;
|
|
70
|
+
} else {
|
|
71
|
+
data = dep[0].id;
|
|
72
|
+
}
|
|
61
73
|
}
|
|
62
74
|
this.$emit("input", data);
|
|
63
75
|
this.$emit("change", data);
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @Author: hutao
|
|
6
6
|
* @Date: 2021-11-11 11:23:24
|
|
7
7
|
* @LastEditors: hutao
|
|
8
|
-
* @LastEditTime: 2022-04-
|
|
8
|
+
* @LastEditTime: 2022-04-13 13:26:54
|
|
9
9
|
-->
|
|
10
10
|
<template>
|
|
11
11
|
<div v-loading="state.loading"
|
|
@@ -105,10 +105,9 @@
|
|
|
105
105
|
:rowIndex="rowIndex">
|
|
106
106
|
<!-- 处理部门 -->
|
|
107
107
|
<template v-if="item.type==='org'">
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
type="tag"></common-org-info>
|
|
108
|
+
<HtOrgInfo v-if="getPropByPath(row,item.key)"
|
|
109
|
+
:org-id="getPropByPath(row,item.key)"
|
|
110
|
+
type="tag"></HtOrgInfo>
|
|
112
111
|
<span v-else>--</span>
|
|
113
112
|
</template>
|
|
114
113
|
<!-- 处理基础数据 -->
|
|
@@ -276,7 +275,8 @@ import { Component, Prop, Vue, Watch } from "vue-property-decorator";
|
|
|
276
275
|
import { Column, PageInfoType } from "@/packages/type";
|
|
277
276
|
import PageInfo from "@/packages/PageInfo/index.vue";
|
|
278
277
|
import HtUploadFiles from "@/packages/HtUploadFiles/index.vue";
|
|
279
|
-
|
|
278
|
+
import HtShowBaseData from "@/packages/HtShowBaseData";
|
|
279
|
+
import HtOrgInfo from "@/packages/HtOrgInfo";
|
|
280
280
|
interface State {
|
|
281
281
|
pageInfo: PageInfoType;
|
|
282
282
|
loading: boolean;
|
|
@@ -302,6 +302,8 @@ interface State {
|
|
|
302
302
|
components: {
|
|
303
303
|
PageInfo,
|
|
304
304
|
HtUploadFiles,
|
|
305
|
+
HtShowBaseData,
|
|
306
|
+
HtOrgInfo,
|
|
305
307
|
},
|
|
306
308
|
})
|
|
307
309
|
export default class HtTable extends Vue {
|
|
@@ -398,7 +400,7 @@ export default class HtTable extends Vue {
|
|
|
398
400
|
this.creatInitColumnKey(this.columns || []);
|
|
399
401
|
}
|
|
400
402
|
}
|
|
401
|
-
console.log("this.columns", this.columns);
|
|
403
|
+
// console.log("this.columns", this.columns);
|
|
402
404
|
}
|
|
403
405
|
resetColumn() {
|
|
404
406
|
if (this.configShow) {
|
package/src/packages/index.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-10-21 10:08:41
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2022-
|
|
7
|
+
* @LastEditTime: 2022-04-12 18:02:13
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
// 导入组件
|
|
@@ -22,10 +22,12 @@ import HtUploadFiles from './HtUploadFiles/index'
|
|
|
22
22
|
import HtSelectBaseData from './HtSelectBaseData/index'
|
|
23
23
|
import HtSelectOrg from './HtSelectOrg/index'
|
|
24
24
|
import HtSelectUser from './HtSelectUser/index'
|
|
25
|
+
import HtShowBaseData from './HtShowBaseData/index'
|
|
26
|
+
import HtOrgInfo from './HtOrgInfo/index'
|
|
25
27
|
|
|
26
28
|
|
|
27
29
|
// 存储组件列表
|
|
28
|
-
const components = [HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles, HtSelectBaseData, HtSelectOrg, HtSelectUser]
|
|
30
|
+
const components = [HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles, HtSelectBaseData, HtSelectOrg, HtSelectUser, HtShowBaseData, HtOrgInfo]
|
|
29
31
|
// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
|
|
30
32
|
const install = function (Vue: any) {
|
|
31
33
|
// 判断是否安装
|
|
@@ -42,6 +44,6 @@ export default {
|
|
|
42
44
|
install,
|
|
43
45
|
// 以下是具体的组件列表
|
|
44
46
|
HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles,
|
|
45
|
-
HtSelectBaseData, HtSelectOrg, HtSelectUser
|
|
47
|
+
HtSelectBaseData, HtSelectOrg, HtSelectUser, HtShowBaseData, HtOrgInfo
|
|
46
48
|
}
|
|
47
49
|
|