Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yq-ui
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhaopanyu
yq-ui
Commits
ee5d1eef
Commit
ee5d1eef
authored
Oct 28, 2024
by
tyk
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
0fa78ed3
e5118c88
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
49 deletions
+20
-49
src/assets/images/new.png
+0
-0
src/views/zyyq/index copy.vue
+0
-0
src/views/zyyq/index.vue
+20
-49
No files found.
src/assets/images/new.png
View file @
ee5d1eef
3.56 KB
|
W:
|
H:
508 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
src/views/zyyq/index copy.vue
0 → 100644
View file @
ee5d1eef
This diff is collapsed.
Click to expand it.
src/views/zyyq/index.vue
View file @
ee5d1eef
...
...
@@ -46,7 +46,7 @@
@
click
.
native=
"handleInnerClick(innerItem.name, content.mc, content.id, content.remark)"
:class=
"{ 'menu-item-active': activeNameInner === innerItem.name + '-' + content.mc }"
>
<img
v-if=
"content.zx === '1'"
src=
"../../assets/images/new.png"
alt=
"new"
style=
"width: 2
8px; height: 28px; margin-left: -3
0px; vertical-align: middle;"
/>
style=
"width: 2
0px; height: 20px; margin-left: -2
0px; vertical-align: middle;"
/>
<span
:style=
"{ width: '6px', height: '6px', background: '#165BFF', borderRadius: '50%', display: 'inline-block', marginRight: '10px' }"
></span>
<span
:style=
"{
...
...
@@ -83,7 +83,7 @@
@
click
.
native=
"handleServiceClick(outerItem.mc, service.mc, service.id, service.remark)"
:class=
"{ 'menu-item-active': activeNameInner === outerItem.mc + '-' + service.mc, 'service-menu-item-active': activeNameInner === outerItem.mc + '-' + service.mc }"
>
<img
v-if=
"service.zx === '1'"
src=
"../../assets/images/new.png"
alt=
"new"
style=
"width: 2
8px; height: 28px; margin-left: -3
0px; vertical-align: middle;"
/>
style=
"width: 2
0px; height: 20px; margin-left: -2
0px; vertical-align: middle;"
/>
<span
:style=
"{ width: '6px', height: '6px', background: '#165BFF', borderRadius: '50%', display: 'inline-block', marginRight: '10px' }"
></span>
<span
:style=
"{
...
...
@@ -218,35 +218,6 @@ export default {
};
},
watch
:
{
// activeNameOuter(newValue) {
// console.log(newValue, 'newValue');
// if (newValue === '服务类') {
// const selectedItem = this.collapseDataOuter.find(item => item.mc === '智能化服务类');
// if (selectedItem && selectedItem.fwlChildren.length > 0) {
// const firstService = selectedItem.fwlChildren[0];
// this.activeNameInner = `智能化服务类-${firstService.mc}`;
// console.log(this.activeNameInner, ' this.activeNameInner');
// this.activeServiceId = firstService.id; // 设置 activeServiceId 为第一项的 ID
// console.log(this.activeServiceId, 'Selected Service ID');
// this.getListdt(this.activeServiceId);
// }
// } else if (newValue === '产品') {
// const selectedItem = this.collapseDataOuter.find(item => item.mc === '软硬件产品');
// if (selectedItem && selectedItem.cpChildren && selectedItem.cpChildren.length > 0) {
// const firstProduct = selectedItem.cpChildren[0]; // 从 cpChildren 中获取第一个产品
// if (firstProduct.children2 && firstProduct.children2.length > 0) {
// const firstProductChild = firstProduct.children2[0]; // 从 children2 中获取第一个子产品
// this.activeNameInner = `软硬件产品-${firstProductChild.mc}`;
// console.log(this.activeNameInner, 'this.activeNameInner');
// this.activeServiceId = firstProductChild.id; // 设置 activeServiceId 为第一项的 ID
// console.log(this.activeServiceId, 'Selected Product ID');
// this.getListdt(this.activeServiceId);
// }
// }
// }
// }
},
mounted
()
{
this
.
getList
();
},
...
...
@@ -286,24 +257,24 @@ export default {
const
firstInnerItem
=
this
.
collapseDataOuter
.
find
(
item
=>
item
.
cplx
===
cplx
);
console
.
log
(
firstInnerItem
,
'firstInnerItem'
);
if
(
firstInnerItem
)
{
// 仅在第一次点击外层菜单时设置默认值
if
(
!
this
.
isOuterMenuClicked
)
{
this
.
isOuterMenuClicked
=
true
;
// 设置状态为已点击外层菜单
// 如果是产品,选择第三级菜单的第一项
if
(
cplx
===
'产品'
&&
firstInnerItem
.
cpChildren
.
length
>
0
)
{
const
firstInner
=
firstInnerItem
.
cpChildren
[
0
];
this
.
activeNameInner
=
`
${
firstInner
.
name
}
-
${
firstInner
.
children2
[
0
]?.
mc
||
''
}
`; // 设置第三级菜单的第一项
this.setActiveInner(firstInner.name, firstInner.children2[0]?.mc, firstInner.children2[0]?.id); // 设置内容
}
// 如果是服务类,选择第二级菜单的第一项
else if (cplx === '服务类' && firstInnerItem.fwlChildren.length > 0) {
const firstService = firstInnerItem.fwlChildren[0];
this.activeNameInner = `
$
{
firstInnerItem
.
mc
}
-
$
{
firstService
.
mc
}
`; // 设置第二级菜单的第一项
this.handleServiceClick(firstInnerItem.mc, firstService.mc, firstService.id); // 设置内容
}
}
}
//
if (firstInnerItem) {
//
// 仅在第一次点击外层菜单时设置默认值
//
if (!this.isOuterMenuClicked) {
//
this.isOuterMenuClicked = true; // 设置状态为已点击外层菜单
//
// 如果是产品,选择第三级菜单的第一项
//
if (cplx === '产品' && firstInnerItem.cpChildren.length > 0) {
//
const firstInner = firstInnerItem.cpChildren[0];
//
this.activeNameInner = `${firstInner.name}-${firstInner.children2[0]?.mc || ''}`; // 设置第三级菜单的第一项
//
this.setActiveInner(firstInner.name, firstInner.children2[0]?.mc, firstInner.children2[0]?.id); // 设置内容
//
}
//
// 如果是服务类,选择第二级菜单的第一项
//
else if (cplx === '服务类' && firstInnerItem.fwlChildren.length > 0) {
//
const firstService = firstInnerItem.fwlChildren[0];
//
this.activeNameInner = `${firstInnerItem.mc}-${firstService.mc}`; // 设置第二级菜单的第一项
//
this.handleServiceClick(firstInnerItem.mc, firstService.mc, firstService.id); // 设置内容
//
}
//
}
//
}
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment