Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
source-trace-manage
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenqikuai
source-trace-manage
Commits
7ceb4ee8
Commit
7ceb4ee8
authored
Apr 13, 2022
by
chenqikuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复模板管理中点击模板后,再点击返回,没有回到之前的页面中的问题
parent
9dd81b18
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
5 deletions
+31
-5
router.ts
src/router.ts
+16
-1
state.ts
src/store/state.ts
+1
-1
Main.vue
src/views/Main.vue
+1
-1
Index.vue
src/views/category/Index.vue
+13
-2
No files found.
src/router.ts
View file @
7ceb4ee8
import
{
getLoginCode
}
from
"cqk-sy-ui"
;
import
{
createRouter
,
createWebHashHistory
}
from
"vue-router"
;
const
routes
=
[
...
...
@@ -120,7 +121,21 @@ const routes = [
},
];
export
const
router
=
createRouter
({
const
router
=
createRouter
({
history
:
createWebHashHistory
(),
routes
,
});
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
const
urls
=
[
"/"
,
"/signIn"
];
if
(
to
.
path
===
`/signIn`
&&
getLoginCode
())
{
next
();
}
if
(
!
urls
.
includes
(
to
.
path
)
&&
!
getLoginCode
())
{
return
next
({
path
:
"/signIn"
});
}
else
{
next
();
}
});
export
{
router
};
src/store/state.ts
View file @
7ceb4ee8
...
...
@@ -4,7 +4,7 @@ export const globalState = reactive({
businessType
:
0
,
//0设置 1忘记
goodsNum
:
0
,
// 存证数量
deletedNum
:
0
,
// 回收站数据总量
selectedStatus
:
1
,
// 默认显示存证
selectedStatus
:
0
,
// 默认显示存证
depositCertificate
:
{
base_id
:
0
,
base_hash
:
""
,
...
...
src/views/Main.vue
View file @
7ceb4ee8
...
...
@@ -26,7 +26,7 @@ import { $ajax } from "@/service";
import
{
setuserInfos
}
from
"@/store/mutations"
;
import
{
globalState
}
from
"@/store/state"
;
import
{
sySideBar
,
syBusinessHeader
,
GO_URLS
}
from
"cqk-sy-ui"
;
import
{
onMounted
,
reactive
,
watch
}
from
"vue"
;
import
{
onMounted
,
reactive
}
from
"vue"
;
import
{
useRoute
}
from
"vue-router"
;
const
route
=
useRoute
();
...
...
src/views/category/Index.vue
View file @
7ceb4ee8
...
...
@@ -45,6 +45,14 @@
v-show=
"menuState.current === 1"
:navigate=
"navigate"
:setTemplateNum=
"setTemplateNum"
:TemplateType=
"globalState.templateType"
:setTemplateType=
"(v: number) => (globalState.templateType = v)"
:templateData=
"globalState.templateData"
:setTemplateData=
"
(v: any) => {
globalState.templateData = v;
}
"
></syTraceTemplateManage>
<Deleted
v-show=
"menuState.current === 2"
:ToUpdate=
"toUpdate"
/>
</div>
...
...
@@ -83,8 +91,11 @@ const setTemplateNum = (n: number) => {
};
const
menuState
=
reactive
({
current
:
0
,
setCurrent
:
(
v
:
number
)
=>
(
menuState
.
current
=
v
),
current
:
globalState
.
selectedStatus
,
setCurrent
:
(
v
:
number
)
=>
{
menuState
.
current
=
v
;
globalState
.
selectedStatus
=
v
;
},
});
const
numList
=
computed
(()
=>
{
...
...
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