htui-yllkbz 1.3.109 → 1.4.0
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 +6072 -5517
- package/lib/htui.common.js.gz +0 -0
- package/lib/htui.css +1 -1
- package/lib/htui.umd.js +6072 -5517
- package/lib/htui.umd.js.gz +0 -0
- package/lib/htui.umd.min.js +125 -139
- package/lib/htui.umd.min.js.gz +0 -0
- package/package.json +1 -1
- package/src/packages/HtBaseData/index.vue +5 -1
- package/src/packages/HtDrawer/index.vue +2 -2
- package/src/packages/HtMenu/index.ts +15 -0
- package/src/packages/HtMenu/index.vue +86 -0
- package/src/packages/HtMenu/menuItem.vue +92 -0
- package/src/packages/HtSelectCategory/index.vue +1 -2
- package/src/packages/HtTree/index.ts +14 -0
- package/src/packages/HtTree/index.vue +82 -0
- package/src/packages/HtUpload/index.vue +3 -1
- package/src/packages/PageInfo/index.vue +16 -13
- package/src/packages/index.ts +4 -3
- package/src/packages/type.ts +27 -2
- package/src/views/Index.vue +13 -2
package/lib/htui.umd.min.js.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -863,9 +863,13 @@ export default class CommonDatas extends Vue {
|
|
|
863
863
|
)
|
|
864
864
|
);
|
|
865
865
|
if (this.parentId) {
|
|
866
|
-
|
|
866
|
+
const arr = body[item.id || ''].filter(
|
|
867
867
|
(item) => item.id === this.parentId
|
|
868
868
|
);
|
|
869
|
+
body[item.id || ''] =
|
|
870
|
+
Array.isArray(arr) && arr.length
|
|
871
|
+
? (arr[0].children as BaseDataDto[])
|
|
872
|
+
: arr;
|
|
869
873
|
}
|
|
870
874
|
} else {
|
|
871
875
|
body[item.id || ''] = this.recursion(
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2022-09-28 10:24:08
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2023-
|
|
7
|
+
* @LastEditTime: 2023-03-08 09:41:20
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
10
|
<el-drawer
|
|
@@ -96,7 +96,7 @@ export default class Index extends Vue {
|
|
|
96
96
|
/** 是否可以通过按下 ESC 关闭 Drawer */
|
|
97
97
|
@Prop({ default: false }) closeOnPressEscape!: boolean;
|
|
98
98
|
/** 控制是否在关闭 Drawer 之后将子元素全部销毁 */
|
|
99
|
-
@Prop({ default:
|
|
99
|
+
@Prop({ default: true }) destroyOnClose!: boolean;
|
|
100
100
|
/** 是否需要遮罩层 */
|
|
101
101
|
@Prop({ default: true }) modal!: boolean;
|
|
102
102
|
/** Drawer 的自定义类名 */
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Descripttion: 更多三个点功能
|
|
3
|
+
* @version:
|
|
4
|
+
* @Author: hutao
|
|
5
|
+
* @Date: 2022-04-12 17:34:51
|
|
6
|
+
* @LastEditors: hutao
|
|
7
|
+
* @LastEditTime: 2023-03-21 10:50:04
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import HtMenu from "./index.vue";
|
|
11
|
+
(HtMenu as any).install = function (Vue: any) {
|
|
12
|
+
|
|
13
|
+
Vue.component("HtMenu", HtMenu);
|
|
14
|
+
};
|
|
15
|
+
export default HtMenu;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Descripttion: 菜单管理
|
|
3
|
+
* @version:
|
|
4
|
+
* @Author: hutao
|
|
5
|
+
* @Date: 2023-03-20 18:46:48
|
|
6
|
+
* @LastEditors: hutao
|
|
7
|
+
* @LastEditTime: 2023-03-21 19:27:10
|
|
8
|
+
-->
|
|
9
|
+
<template>
|
|
10
|
+
<el-menu
|
|
11
|
+
class="ht-menu-list"
|
|
12
|
+
:default-active="state.defaultIndex"
|
|
13
|
+
router
|
|
14
|
+
:collapse="state.collapsed"
|
|
15
|
+
:collapse-transition="false"
|
|
16
|
+
>
|
|
17
|
+
<MenuItem
|
|
18
|
+
:baseUrl="baseUrl"
|
|
19
|
+
v-for="item in data"
|
|
20
|
+
:key="item.name"
|
|
21
|
+
:data="item"
|
|
22
|
+
></MenuItem>
|
|
23
|
+
</el-menu>
|
|
24
|
+
</template>
|
|
25
|
+
<script lang="ts">
|
|
26
|
+
import { Component, Prop, Vue, Watch } from 'vue-property-decorator';
|
|
27
|
+
import ElementUI from 'element-ui';
|
|
28
|
+
import MenuItem from './menuItem.vue';
|
|
29
|
+
Vue.use(ElementUI);
|
|
30
|
+
interface State {
|
|
31
|
+
/** 数据状态 */
|
|
32
|
+
loading: boolean;
|
|
33
|
+
collapsed: boolean;
|
|
34
|
+
defaultIndex: string;
|
|
35
|
+
}
|
|
36
|
+
@Component({
|
|
37
|
+
name: 'HtMenu',
|
|
38
|
+
components: {
|
|
39
|
+
MenuItem,
|
|
40
|
+
},
|
|
41
|
+
})
|
|
42
|
+
export default class Index extends Vue {
|
|
43
|
+
/** 通用样式 */
|
|
44
|
+
@Prop() comStyle!: string;
|
|
45
|
+
@Prop() data!: string;
|
|
46
|
+
@Prop() collapse!: string;
|
|
47
|
+
@Prop() baseUrl!: string;
|
|
48
|
+
/** 数据 */
|
|
49
|
+
state: State = {
|
|
50
|
+
loading: false,
|
|
51
|
+
defaultIndex: '/',
|
|
52
|
+
collapsed: false,
|
|
53
|
+
};
|
|
54
|
+
/** 生命周期 */
|
|
55
|
+
created() {
|
|
56
|
+
this.state.defaultIndex = window.location.pathname;
|
|
57
|
+
}
|
|
58
|
+
/** 方法 */
|
|
59
|
+
/** 监听 */
|
|
60
|
+
/** 计算属性 */
|
|
61
|
+
@Watch('collapse', { immediate: true })
|
|
62
|
+
getCollapse(val: boolean) {
|
|
63
|
+
this.state.collapsed = val;
|
|
64
|
+
}
|
|
65
|
+
@Watch('data', { immediate: true })
|
|
66
|
+
getdata(val: any) {
|
|
67
|
+
console.log('data', val);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
</script>
|
|
71
|
+
<style>
|
|
72
|
+
@import url('/publicData/styles/theme/fonts/element-icons.woff');
|
|
73
|
+
@import url('/publicData/styles/theme/index.css');
|
|
74
|
+
</style>
|
|
75
|
+
<style lang="scss">
|
|
76
|
+
.ht-menu-list {
|
|
77
|
+
background: none !important;
|
|
78
|
+
.el-menu {
|
|
79
|
+
background: none !important;
|
|
80
|
+
}
|
|
81
|
+
.el-menu-item {
|
|
82
|
+
height: 30px !important;
|
|
83
|
+
line-height: 30px !important;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
</style>
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Descripttion:
|
|
3
|
+
* @version:
|
|
4
|
+
* @Author: hutao
|
|
5
|
+
* @Date: 2023-03-20 18:47:12
|
|
6
|
+
* @LastEditors: hutao
|
|
7
|
+
* @LastEditTime: 2023-03-21 19:25:06
|
|
8
|
+
-->
|
|
9
|
+
<template>
|
|
10
|
+
<el-submenu class="ht-menu-list" :index="data.name" v-if="dataLeng">
|
|
11
|
+
<template slot="title">
|
|
12
|
+
<i :class="data.icon"></i>
|
|
13
|
+
<span>{{ data.displayName }}</span>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<MenuItem
|
|
17
|
+
:baseUrl="baseUrl"
|
|
18
|
+
v-for="item in data.children"
|
|
19
|
+
:key="item.name"
|
|
20
|
+
:data="item"
|
|
21
|
+
></MenuItem>
|
|
22
|
+
</el-submenu>
|
|
23
|
+
|
|
24
|
+
<el-menu-item
|
|
25
|
+
v-else-if="!dataLeng && setRoute(data).isSelf"
|
|
26
|
+
:route="setRoute(data).url"
|
|
27
|
+
:index="data.name"
|
|
28
|
+
>
|
|
29
|
+
<i :class="data.icon"></i>
|
|
30
|
+
<span slot="title">{{ data.displayName }}</span>
|
|
31
|
+
</el-menu-item>
|
|
32
|
+
<el-menu-item
|
|
33
|
+
v-else-if="!dataLeng && !setRoute(data).isSelf"
|
|
34
|
+
:index="data.name"
|
|
35
|
+
>
|
|
36
|
+
<div class="ht-jump" @click.stop="jumpUrl(data)">
|
|
37
|
+
<i :class="data.icon"> </i>
|
|
38
|
+
<span slot="title">{{ data.displayName }}</span>
|
|
39
|
+
</div>
|
|
40
|
+
</el-menu-item>
|
|
41
|
+
</template>
|
|
42
|
+
<script lang="ts">
|
|
43
|
+
import { Component, Prop, Vue } from 'vue-property-decorator';
|
|
44
|
+
import { MenuDto } from '../type';
|
|
45
|
+
interface State {
|
|
46
|
+
/** 数据状态 */
|
|
47
|
+
loading: boolean;
|
|
48
|
+
}
|
|
49
|
+
@Component({
|
|
50
|
+
components: {
|
|
51
|
+
MenuItem: () => import('./menuItem.vue'),
|
|
52
|
+
},
|
|
53
|
+
})
|
|
54
|
+
export default class Index extends Vue {
|
|
55
|
+
@Prop() data!: MenuDto;
|
|
56
|
+
@Prop() baseUrl!: string;
|
|
57
|
+
/** 数据 */
|
|
58
|
+
state: State = {
|
|
59
|
+
loading: false,
|
|
60
|
+
};
|
|
61
|
+
/** 生命周期 */
|
|
62
|
+
created() {
|
|
63
|
+
//
|
|
64
|
+
}
|
|
65
|
+
/** url跳转 */
|
|
66
|
+
jumpUrl(row: MenuDto) {
|
|
67
|
+
//window.location.href = row.path || '';
|
|
68
|
+
if (row.target == '_blank') {
|
|
69
|
+
window.open(row.path);
|
|
70
|
+
} else {
|
|
71
|
+
window.location.href = row.path || '';
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/** 设置跳转地址 */
|
|
75
|
+
setRoute(data: MenuDto) {
|
|
76
|
+
const urlArr = data.path ? data.path.split(this.baseUrl) : [];
|
|
77
|
+
|
|
78
|
+
if (urlArr && Array.isArray(urlArr) && urlArr.length) {
|
|
79
|
+
return { url: urlArr[urlArr.length - 1], isSelf: urlArr.length > 1 };
|
|
80
|
+
} else {
|
|
81
|
+
return { url: data.path, isSelf: true };
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/** 方法 */
|
|
85
|
+
/** 监听 */
|
|
86
|
+
/** 计算属性 */
|
|
87
|
+
get dataLeng() {
|
|
88
|
+
return this.data.children && this.data.children.length;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
</script>
|
|
92
|
+
<style lang="scss" scoped></style>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-12-30 14:29:14
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2023-03-
|
|
7
|
+
* @LastEditTime: 2023-03-19 19:00:58
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
10
|
<span v-if="readonly">
|
|
@@ -190,7 +190,6 @@ export default class HtSelectUser extends Vue {
|
|
|
190
190
|
} else {
|
|
191
191
|
nameStr = data[i].displayName;
|
|
192
192
|
}
|
|
193
|
-
|
|
194
193
|
break;
|
|
195
194
|
} else {
|
|
196
195
|
if (data[i].children) {
|
|
@@ -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: 2023-03-08 09:43:23
|
|
8
|
+
*/
|
|
9
|
+
import HtTree from "./index.vue";
|
|
10
|
+
(HtTree as any).install = function (Vue: any) {
|
|
11
|
+
|
|
12
|
+
Vue.component("HtTree", HtTree);
|
|
13
|
+
};
|
|
14
|
+
export default HtTree;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Descripttion:
|
|
3
|
+
* @version:
|
|
4
|
+
* @Author: hutao
|
|
5
|
+
* @Date: 2023-03-07 09:16:01
|
|
6
|
+
* @LastEditors: hutao
|
|
7
|
+
* @LastEditTime: 2023-03-08 10:05:00
|
|
8
|
+
-->
|
|
9
|
+
<template>
|
|
10
|
+
<ul class="ht-tree ht-tree-ul">
|
|
11
|
+
<TreeItem
|
|
12
|
+
@nodeClick="nodeClick"
|
|
13
|
+
:data="item"
|
|
14
|
+
v-for="item in dataSource"
|
|
15
|
+
:key="item.id"
|
|
16
|
+
>
|
|
17
|
+
<template slot="title" slot-scope="{ data }">
|
|
18
|
+
<slot name="title" :data="data"></slot
|
|
19
|
+
></template>
|
|
20
|
+
</TreeItem>
|
|
21
|
+
</ul>
|
|
22
|
+
</template>
|
|
23
|
+
<script lang="ts">
|
|
24
|
+
import { Component, Vue } from 'vue-property-decorator';
|
|
25
|
+
import TreeItem from './treeItem.vue';
|
|
26
|
+
interface State {
|
|
27
|
+
/** 数据状态 */
|
|
28
|
+
loading: boolean;
|
|
29
|
+
}
|
|
30
|
+
@Component({
|
|
31
|
+
name: 'HtTree',
|
|
32
|
+
components: { TreeItem },
|
|
33
|
+
})
|
|
34
|
+
export default class Index extends Vue {
|
|
35
|
+
/** 数据 */
|
|
36
|
+
state: State = {
|
|
37
|
+
loading: false,
|
|
38
|
+
};
|
|
39
|
+
/** 生命周期 */
|
|
40
|
+
/** 方法 */
|
|
41
|
+
/** 点击节点 */
|
|
42
|
+
nodeClick(data: any) {
|
|
43
|
+
this.$emit('nodeClick', data);
|
|
44
|
+
}
|
|
45
|
+
/** 监听 */
|
|
46
|
+
/** 计算属性 */
|
|
47
|
+
get dataSource() {
|
|
48
|
+
return [
|
|
49
|
+
{
|
|
50
|
+
id: 12,
|
|
51
|
+
name: '电科',
|
|
52
|
+
children: [
|
|
53
|
+
{ id: 121, name: '张三', children: [{ id: 1211, name: '张三三' }] },
|
|
54
|
+
{ id: 122, name: '张四' },
|
|
55
|
+
{ id: 123, name: '张五' },
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
{ id: 13, name: '水科' },
|
|
59
|
+
{ id: 14, name: '气科' },
|
|
60
|
+
{ id: 15, name: '空调科' },
|
|
61
|
+
];
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
</script>
|
|
65
|
+
<style lang="scss">
|
|
66
|
+
.ht-tree-ul,
|
|
67
|
+
.ht-tree-li {
|
|
68
|
+
list-style-type: none;
|
|
69
|
+
list-style: none;
|
|
70
|
+
padding: 0;
|
|
71
|
+
margin: 0;
|
|
72
|
+
}
|
|
73
|
+
.ht-tree-li {
|
|
74
|
+
min-height: 25px;
|
|
75
|
+
line-height: 25px;
|
|
76
|
+
padding-left: 12px;
|
|
77
|
+
.ht-tree-item-icon {
|
|
78
|
+
padding: 6px;
|
|
79
|
+
cursor: pointer;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
</style>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-12-08 11:30:56
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime:
|
|
7
|
+
* @LastEditTime: 2023-03-24 10:46:35
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
10
|
<el-pagination
|
|
@@ -69,9 +69,9 @@ export default class HtPagination extends Vue {
|
|
|
69
69
|
|
|
70
70
|
/** 生命周期 */
|
|
71
71
|
created() {
|
|
72
|
-
if (this.pageInfo) {
|
|
73
|
-
|
|
74
|
-
}
|
|
72
|
+
// if (this.pageInfo) {
|
|
73
|
+
// this.setpageInfo(this.pageInfo);
|
|
74
|
+
// }
|
|
75
75
|
}
|
|
76
76
|
/** 方法 */
|
|
77
77
|
/** 翻页 */
|
|
@@ -88,15 +88,18 @@ export default class HtPagination extends Vue {
|
|
|
88
88
|
this.handleCurrentChange(1);
|
|
89
89
|
}
|
|
90
90
|
/** 监听 */
|
|
91
|
-
@Watch('pageInfo')
|
|
92
|
-
setpageInfo(val
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
91
|
+
@Watch('pageInfo', { immediate: true })
|
|
92
|
+
setpageInfo(val?: PageInfoType) {
|
|
93
|
+
if (val) {
|
|
94
|
+
console.log('val');
|
|
95
|
+
const pageInfo: PageInfoType = val;
|
|
96
|
+
this.state.pageInfo = {
|
|
97
|
+
currentPage: Number(pageInfo.currentPage) || 1,
|
|
98
|
+
maxResultCount: Number(pageInfo.pageSize),
|
|
99
|
+
skipCount: pageInfo.skipCount ? Number(pageInfo.skipCount) : undefined,
|
|
100
|
+
totalCount: pageInfo.totalCount ? Number(pageInfo.totalCount) : 0,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
100
103
|
}
|
|
101
104
|
/** 计算属性 */
|
|
102
105
|
}
|
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: 2023-
|
|
7
|
+
* @LastEditTime: 2023-03-30 15:04:34
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
// 导入组件
|
|
@@ -33,13 +33,14 @@ import HtMore from './HtMore'
|
|
|
33
33
|
import HtSelectUnit from './HtSelectUnit'
|
|
34
34
|
import HtSelectPosition from './HtSelectPosition'
|
|
35
35
|
import HtSelectCategory from './HtSelectCategory'
|
|
36
|
+
import HtMenu from './HtMenu'
|
|
36
37
|
|
|
37
38
|
|
|
38
39
|
|
|
39
40
|
|
|
40
41
|
|
|
41
42
|
// 存储组件列表
|
|
42
|
-
const components = [HtSelectCategory, HtSelectUnit, HtSelectPosition, HtMore, HtSelectTimeSlot, HtSelectCron, HtBaseData, HtDrawer, HtShowBaseType, HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles, HtSelectBaseData, HtSelectOrg, HtSelectUser, HtShowBaseData, HtOrgInfo]
|
|
43
|
+
const components = [HtMenu, HtSelectCategory, HtSelectUnit, HtSelectPosition, HtMore, HtSelectTimeSlot, HtSelectCron, HtBaseData, HtDrawer, HtShowBaseType, HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles, HtSelectBaseData, HtSelectOrg, HtSelectUser, HtShowBaseData, HtOrgInfo]
|
|
43
44
|
// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
|
|
44
45
|
const install = function (Vue: any) {
|
|
45
46
|
// 判断是否安装
|
|
@@ -56,7 +57,7 @@ export default {
|
|
|
56
57
|
install,
|
|
57
58
|
// 以下是具体的组件列表
|
|
58
59
|
HtSelectTable, HtSelectPosition, HtPagination, HtShowBaseType, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles, HtMore,
|
|
59
|
-
HtSelectUnit, HtSelectCategory,
|
|
60
|
+
HtSelectUnit, HtSelectCategory, HtMenu,
|
|
60
61
|
HtSelectBaseData, HtSelectOrg, HtSelectUser, HtShowBaseData, HtOrgInfo, HtBaseData, HtDrawer, HtSelectCron, HtSelectTimeSlot
|
|
61
62
|
}
|
|
62
63
|
|
package/src/packages/type.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-10-25 17:05:17
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2023-
|
|
7
|
+
* @LastEditTime: 2023-03-24 10:46:46
|
|
8
8
|
*/
|
|
9
9
|
/** 初始的默认条数 */
|
|
10
10
|
export const defalutPageSize = 10
|
|
@@ -90,12 +90,37 @@ export interface PageInfoType {
|
|
|
90
90
|
skipCount: number;
|
|
91
91
|
totalCount: number;
|
|
92
92
|
}
|
|
93
|
+
export interface MenuDto {
|
|
94
|
+
id?: string;
|
|
95
|
+
creationTime?: string;
|
|
96
|
+
creatorId?: string | undefined;
|
|
97
|
+
lastModificationTime?: string | undefined;
|
|
98
|
+
lastModifierId?: string | undefined;
|
|
99
|
+
isDeleted?: boolean;
|
|
100
|
+
deleterId?: string | undefined;
|
|
101
|
+
deletionTime?: string | undefined;
|
|
102
|
+
name?: string | undefined;
|
|
103
|
+
displayName?: string | undefined;
|
|
104
|
+
features?: string | undefined;
|
|
105
|
+
path?: string | undefined;
|
|
106
|
+
order?: number;
|
|
107
|
+
description?: string | undefined;
|
|
108
|
+
icon?: string | undefined;
|
|
109
|
+
position?: number;
|
|
110
|
+
isEnabled?: boolean;
|
|
111
|
+
target?: string | undefined;
|
|
112
|
+
code?: string | undefined;
|
|
113
|
+
level?: number;
|
|
114
|
+
parentId?: string | undefined;
|
|
115
|
+
children?: MenuDto[] | undefined;
|
|
116
|
+
childrenCount?: number;
|
|
117
|
+
}
|
|
93
118
|
/** 分页返回时候的分页信息 */
|
|
94
119
|
export interface PageType {
|
|
95
120
|
|
|
96
121
|
currentPage: number;
|
|
97
122
|
maxResultCount: number;
|
|
98
|
-
skipCount
|
|
123
|
+
skipCount?: number;
|
|
99
124
|
totalCount: number;
|
|
100
125
|
|
|
101
126
|
}
|
package/src/views/Index.vue
CHANGED
|
@@ -2,12 +2,17 @@
|
|
|
2
2
|
<div id="index">
|
|
3
3
|
<el-container style="height: 100vh" class="index">
|
|
4
4
|
<el-header style="padding: 0; height: min-content">
|
|
5
|
-
<xhkj-layout02 :hide="true">
|
|
5
|
+
<xhkj-layout02 @leftMenu="leftMenu" :hide="true">
|
|
6
6
|
<router-link to="/login" slot="navEnd">注销</router-link>
|
|
7
7
|
</xhkj-layout02>
|
|
8
8
|
</el-header>
|
|
9
9
|
<el-container class="body">
|
|
10
10
|
<el-aside :width="state.collapsed ? '66px' : '230px'" class="left">
|
|
11
|
+
<HtMenu
|
|
12
|
+
:data="state.menusList"
|
|
13
|
+
:collapse="state.collapsed"
|
|
14
|
+
baseUrl="/plan-maintenance"
|
|
15
|
+
></HtMenu>
|
|
11
16
|
<!--导航菜单-->
|
|
12
17
|
<el-menu
|
|
13
18
|
:default-active="state.defaultIndex"
|
|
@@ -55,6 +60,7 @@
|
|
|
55
60
|
<script lang="ts">
|
|
56
61
|
import { Component, Vue, Watch } from 'vue-property-decorator';
|
|
57
62
|
import { baseConfig } from 'vue-kst-auth';
|
|
63
|
+
import HtMenu from '@/packages/HtMenu/index.vue';
|
|
58
64
|
interface State {
|
|
59
65
|
/** 数据状态 */
|
|
60
66
|
loading: boolean;
|
|
@@ -64,19 +70,24 @@ interface State {
|
|
|
64
70
|
defaultIndex: string;
|
|
65
71
|
/** 菜单是否收缩 */
|
|
66
72
|
collapsed: boolean;
|
|
73
|
+
menusList: any[];
|
|
67
74
|
}
|
|
68
75
|
|
|
69
76
|
@Component({
|
|
70
|
-
components: {},
|
|
77
|
+
components: { HtMenu },
|
|
71
78
|
})
|
|
72
79
|
export default class App extends Vue {
|
|
73
80
|
/** 数据 */
|
|
74
81
|
state: State = {
|
|
75
82
|
loading: false,
|
|
76
83
|
isLogin: false,
|
|
84
|
+
menusList: [],
|
|
77
85
|
defaultIndex: '/',
|
|
78
86
|
collapsed: true,
|
|
79
87
|
};
|
|
88
|
+
leftMenu(e: CustomEvent) {
|
|
89
|
+
this.state.menusList = e.detail[0];
|
|
90
|
+
}
|
|
80
91
|
/** 生命周期 */
|
|
81
92
|
created() {
|
|
82
93
|
// 动态加载引用文件
|