Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
李宁
/
Activity
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b881b66f
authored
Nov 19, 2025
by
李宁
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1
1 parent
a58d16a8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
7 deletions
zhiJianBusi/zjbPhone/.claude/settings.local.json
zhiJianBusi/zjbPhone/js/myBusi.js
zhiJianBusi/zjbPhone/myBusi.html
zhiJianBusi/zjbPhone/.claude/settings.local.json
View file @
b881b66
...
@@ -23,7 +23,10 @@
...
@@ -23,7 +23,10 @@
"Bash(lsof -ti:8080)"
,
"Bash(lsof -ti:8080)"
,
"Bash(python3 -m http.server 8081)"
,
"Bash(python3 -m http.server 8081)"
,
"Bash(open
\"
http://localhost:8081/zjbPhone/busiDetail.html
\"
)"
,
"Bash(open
\"
http://localhost:8081/zjbPhone/busiDetail.html
\"
)"
,
"Bash(open
\"
http://localhost:8081/zjbPhone/addBusi.html
\"
)"
"Bash(open
\"
http://localhost:8081/zjbPhone/addBusi.html
\"
)"
,
"Bash(lsof -ti:8080,8081)"
,
"Bash(kill 33038 46309)"
,
"Bash(open
\"
http://localhost:8081/myBusi.html
\"
)"
],
],
"deny"
:
[],
"deny"
:
[],
"ask"
:
[]
"ask"
:
[]
...
...
zhiJianBusi/zjbPhone/js/myBusi.js
View file @
b881b66
...
@@ -18,7 +18,8 @@ new Vue({
...
@@ -18,7 +18,8 @@ new Vue({
{
id
:
'4'
,
name
:
'已成单'
,
selected
:
false
,
nodeId
:
'355:540'
},
{
id
:
'4'
,
name
:
'已成单'
,
selected
:
false
,
nodeId
:
'355:540'
},
{
id
:
'5'
,
name
:
'已关闭'
,
selected
:
false
,
nodeId
:
'355:543'
}
{
id
:
'5'
,
name
:
'已关闭'
,
selected
:
false
,
nodeId
:
'355:543'
}
],
],
businessList
:
[]
businessList
:
[],
scrollTop
:
0
},
},
computed
:
{
computed
:
{
...
@@ -61,6 +62,11 @@ new Vue({
...
@@ -61,6 +62,11 @@ new Vue({
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
code
==
200
){
if
(
res
.
code
==
200
){
this
.
detail
=
res
.
data
this
.
detail
=
res
.
data
this
.
$nextTick
(()
=>
{
this
.
updateActiveIndicator
(
this
.
activeTab
);
document
.
querySelector
(
'#listDiv'
).
scrollTop
=
this
.
scrollTop
||
0
});
}
}
})
})
},
},
...
@@ -109,6 +115,8 @@ new Vue({
...
@@ -109,6 +115,8 @@ new Vue({
// 查看商机详情
// 查看商机详情
viewBusinessDetail
(
business
)
{
viewBusinessDetail
(
business
)
{
console
.
log
(
'查看商机详情:'
,
business
);
console
.
log
(
'查看商机详情:'
,
business
);
// 保存当前页面状态
this
.
savePageState
();
// 实际项目中这里应该跳转到详情页面
// 实际项目中这里应该跳转到详情页面
window
.
location
.
href
=
`busiDetail.html?id=
${
business
.
id
}
`
;
window
.
location
.
href
=
`busiDetail.html?id=
${
business
.
id
}
`
;
},
},
...
@@ -147,9 +155,50 @@ new Vue({
...
@@ -147,9 +155,50 @@ new Vue({
return
'completed'
return
'completed'
}
}
},
},
// 保存页面状态
savePageState
()
{
const
state
=
{
searchKeyword
:
this
.
searchKeyword
,
activeTab
:
this
.
activeTab
,
tagId
:
this
.
tagId
,
scrollTop
:
document
.
querySelector
(
'#listDiv'
).
scrollTop
,
timestamp
:
Date
.
now
()
};
localStorage
.
setItem
(
'myBusiPageState'
,
JSON
.
stringify
(
state
));
},
// 恢复页面状态
restorePageState
()
{
const
savedState
=
localStorage
.
getItem
(
'myBusiPageState'
);
if
(
savedState
)
{
try
{
const
state
=
JSON
.
parse
(
savedState
);
// 检查状态是否在30分钟内保存的(避免过期状态)
const
isRecent
=
(
Date
.
now
()
-
state
.
timestamp
)
<
30
*
60
*
1000
;
if
(
isRecent
)
{
this
.
searchKeyword
=
state
.
searchKeyword
||
''
;
this
.
activeTab
=
state
.
activeTab
||
'all'
;
this
.
tagId
=
state
.
tagId
||
'all'
;
this
.
scrollTop
=
state
.
scrollTop
}
}
catch
(
e
)
{
console
.
error
(
'恢复页面状态失败:'
,
e
);
}
this
.
clearPageState
()
}
},
// 清除页面状态
clearPageState
()
{
localStorage
.
removeItem
(
'myBusiPageState'
);
},
loginOut
(){
loginOut
(){
localStorage
.
removeItem
(
'userInfo'
)
localStorage
.
removeItem
(
'userInfo'
)
localStorage
.
removeItem
(
'tokenInfo'
)
localStorage
.
removeItem
(
'tokenInfo'
)
this
.
clearPageState
()
location
.
replace
(
'login.html?platform='
+
localStorage
.
getItem
(
'platform'
))
location
.
replace
(
'login.html?platform='
+
localStorage
.
getItem
(
'platform'
))
}
}
...
@@ -170,10 +219,8 @@ new Vue({
...
@@ -170,10 +219,8 @@ new Vue({
mounted
()
{
mounted
()
{
this
.
isWorker
=
localStorage
.
getItem
(
'platform'
)
==
'gw'
this
.
isWorker
=
localStorage
.
getItem
(
'platform'
)
==
'gw'
// 延迟更新指示器位置,确保DOM已渲染
// 恢复页面状态
this
.
$nextTick
(()
=>
{
this
.
restorePageState
();
this
.
updateActiveIndicator
(
this
.
activeTab
);
});
this
.
queryBusiList
()
this
.
queryBusiList
()
},
},
...
...
zhiJianBusi/zjbPhone/myBusi.html
View file @
b881b66
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
</div>
</div>
<!-- 商机列表 -->
<!-- 商机列表 -->
<div
class=
"business-list"
>
<div
class=
"business-list"
id=
"listDiv"
>
<div
<div
v-for=
"(business, index) in detail.records"
v-for=
"(business, index) in detail.records"
:key=
"business.id"
:key=
"business.id"
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment