htui-yllkbz 1.4.3 → 1.4.4

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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "htui-yllkbz",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "port": "8082",
5
5
  "typings": "types/index.d.ts",
6
6
  "main": "lib/htui.common.js",
@@ -4,12 +4,12 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2023-03-20 18:46:48
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2023-03-30 16:04:29
7
+ * @LastEditTime: 2023-03-30 17:15:49
8
8
  -->
9
9
  <template>
10
10
  <el-menu
11
11
  class="ht-menu-list"
12
- :active="state.defaultIndex"
12
+ :default-active="state.defaultIndex"
13
13
  router
14
14
  :collapse="state.collapsed"
15
15
  :collapse-transition="false"
@@ -60,7 +60,21 @@ export default class Index extends Vue {
60
60
  /** 计算属性 */
61
61
  @Watch('$route.path', { immediate: true })
62
62
  getRoutes() {
63
- this.state.defaultIndex = window.location.pathname;
63
+ const pathName = window.location.pathname;
64
+ let newPathName = pathName;
65
+ if (pathName.slice(-1) === '/') {
66
+ const indexss = pathName.lastIndexOf('/');
67
+ newPathName = pathName.substring(0, indexss);
68
+ }
69
+
70
+ if (
71
+ newPathName.split('/').length === 2 &&
72
+ newPathName.includes(this.baseUrl)
73
+ ) {
74
+ newPathName = '/';
75
+ }
76
+
77
+ this.state.defaultIndex = newPathName;
64
78
  }
65
79
  @Watch('collapse', { immediate: true })
66
80
  getCollapse(val: boolean) {
@@ -68,7 +82,7 @@ export default class Index extends Vue {
68
82
  }
69
83
  @Watch('data', { immediate: true })
70
84
  getdata(val: any) {
71
- console.log('data', val);
85
+ //console.log('data', val);
72
86
  }
73
87
  }
74
88
  </script>
@@ -4,7 +4,7 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2023-03-20 18:47:12
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2023-03-30 16:29:42
7
+ * @LastEditTime: 2023-03-30 17:10:36
8
8
  -->
9
9
  <template>
10
10
  <el-submenu class="ht-menu-list" :index="data.name" v-if="dataLeng">
@@ -24,10 +24,10 @@
24
24
  <el-menu-item
25
25
  v-else-if="!dataLeng && setRoute(data).isSelf"
26
26
  :route="setRoute(data).url || '/'"
27
- :index="!!setRoute(data).url ? data.name : '/'"
27
+ :index="!!setRoute(data).url ? data.path : '/'"
28
28
  >
29
29
  <i :class="data.icon"></i>
30
- <span slot="title">{{ data.displayName }}</span>
30
+ <span slot="title">{{ data.displayName }}{{ data.path }}</span>
31
31
  </el-menu-item>
32
32
  <el-menu-item
33
33
  v-else-if="!dataLeng && !setRoute(data).isSelf"
@@ -1,38 +1,151 @@
1
+ /*
2
+ * @Descripttion:
3
+ * @version:
4
+ * @Author: hutao
5
+ * @Date: 2021-12-29 15:18:26
6
+ * @LastEditors: hutao
7
+ * @LastEditTime: 2023-03-30 16:41:47
8
+ */
1
9
  import { RouteConfig } from "vue-router";
2
- import index from "../views/Index.vue";
10
+ import Index from "../views/Index.vue";
3
11
  import Login from "vue-kst-auth";
12
+
4
13
  const routes: Array<RouteConfig> = [
5
14
  {
6
15
  path: "/login",
7
16
  name: "登录",
8
17
  component: Login as any
9
18
  },
19
+
10
20
  {
11
21
  path: "/",
12
22
  name: "首页",
13
- component: index,
23
+ component: Index,
14
24
  children: [
15
25
  {
16
26
  path: "",
17
27
  name: "",
18
28
  meta: {
19
- title:"模板首页"
29
+ title: "资产管理"
30
+ },
31
+ component: Index
32
+ },
33
+ {
34
+ path: "assetManagement",
35
+ name: "",
36
+ meta: {
37
+ title: "资产管理"
38
+ },
39
+ component: Index
40
+ },
41
+ {
42
+ path: "fireManagement",
43
+ name: "",
44
+ meta: {
45
+ title: "消防管理"
46
+ },
47
+ component: Index
48
+ },
49
+ {
50
+ path: "laboratoryManagement",
51
+ name: "",
52
+ meta: {
53
+ title: "化验室管理"
54
+ },
55
+ component: Index
56
+ },
57
+ {
58
+ path: "extendProperty",
59
+ name: "",
60
+ meta: {
61
+ title: "扩展属性管理"
62
+ },
63
+ component: Index
64
+ },
65
+
66
+ {
67
+ path: "extendPropertyTemplate",
68
+ name: "",
69
+ meta: {
70
+ title: "扩展属性模板管理"
71
+ },
72
+ component: Index
73
+ },
74
+ {
75
+ path: "assetCategory",
76
+ name: "",
77
+ meta: {
78
+ title: "资产分类"
20
79
  },
21
- component: () =>
22
- import(/* webpackChunkName: "about" */ "../views/About.vue")
80
+ component: Index
81
+ },
82
+ {
83
+ path: "assetAdscription",
84
+ name: "",
85
+ meta: {
86
+ title: "资产类型"
87
+ },
88
+ component: Index
89
+ },
90
+ {
91
+ path: "produceLevel",
92
+ name: "",
93
+ meta: {
94
+ title: "节点层次"
95
+ },
96
+ component: Index
97
+ },
98
+ {
99
+ path: "/operationalModel",
100
+ name: "运维模型",
101
+ // route level code-splitting
102
+ // this generates a separate chunk (about.[hash].js) for this route
103
+ // which is lazy-loaded when the route is visited.
104
+ component: Index
105
+ },
106
+ {
107
+ path: "/bindoperationalModel",
108
+ name: "绑定运维模型",
109
+ // route level code-splitting
110
+ // this generates a separate chunk (about.[hash].js) for this route
111
+ // which is lazy-loaded when the route is visited.
112
+ component: Index
113
+ },
114
+ {
115
+ path: "/operationalDevices",
116
+ name: "运维设备",
117
+ // route level code-splitting
118
+ // this generates a separate chunk (about.[hash].js) for this route
119
+ // which is lazy-loaded when the route is visited.
120
+ component: Index
121
+ },
122
+ {
123
+ path: "/assetRetire",
124
+ name: "资产报废管理",
125
+ // route level code-splitting
126
+ // this generates a separate chunk (about.[hash].js) for this route
127
+ // which is lazy-loaded when the route is visited.
128
+ component: Index
129
+ },
130
+ {
131
+ path: "/httpAction",
132
+ name: "资产第三方接口管理",
133
+ // route level code-splitting
134
+ // this generates a separate chunk (about.[hash].js) for this route
135
+ // which is lazy-loaded when the route is visited.
136
+ component: Index
137
+ },
138
+ {
139
+ path: "/Sop",
140
+ name: "SOP维护",
141
+ // route level code-splitting
142
+ // this generates a separate chunk (about.[hash].js) for this route
143
+ // which is lazy-loaded when the route is visited.
144
+ component: Index
23
145
  }
24
146
  ]
25
147
  },
26
- {
27
- path: "/about",
28
- name: "About",
29
- // route level code-splitting
30
- // this generates a separate chunk (about.[hash].js) for this route
31
- // which is lazy-loaded when the route is visited.
32
- component: () =>
33
- import(/* webpackChunkName: "about" */ "../views/About.vue")
34
- }
35
- ];
148
+ ]
36
149
 
37
150
  // const router = new VueRouter({
38
151
  // routes