Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
中汽测评-信息安全测评系统
web
Commits
dd9db36a
Commit
dd9db36a
authored
Oct 30, 2024
by
zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 任务处理在详情页返回时跳转到当前页而非第一页
parent
42bcbdfa
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
5 deletions
+41
-5
getters.js
src/store/getters.js
+4
-1
processing.js
src/store/modules/processing.js
+21
-0
index.vue
src/views/processing/archivedTask/index.vue
+5
-1
index.vue
src/views/processing/processed-review/index.vue
+5
-1
index.vue
src/views/processing/unprocessed-review/index.vue
+6
-2
No files found.
src/store/getters.js
View file @
dd9db36a
...
@@ -21,6 +21,9 @@ const getters = {
...
@@ -21,6 +21,9 @@ const getters = {
standard_name
:
state
=>
state
.
standard
.
standard_name
,
standard_name
:
state
=>
state
.
standard
.
standard_name
,
standardList
:
state
=>
state
.
standard
.
standardList
,
standardList
:
state
=>
state
.
standard
.
standardList
,
testScenarioList
:
state
=>
state
.
testScenario
.
testScenarioList
,
testScenarioList
:
state
=>
state
.
testScenario
.
testScenarioList
,
dept
:
state
=>
state
.
user
.
dept
dept
:
state
=>
state
.
user
.
dept
,
currentUnprocessedReviewPage
:
state
=>
state
.
processing
.
currentUnprocessedReviewPage
,
currentProcessedReviewPage
:
state
=>
state
.
processing
.
currentProcessedReviewPage
,
currentArchivedTaskPage
:
state
=>
state
.
processing
.
currentArchivedTaskPage
}
}
export
default
getters
export
default
getters
src/store/modules/processing.js
View file @
dd9db36a
import
{
getCompanyFile
}
from
'@/api/task/files.js'
import
{
getCompanyFile
}
from
'@/api/task/files.js'
const
state
=
{
const
state
=
{
currentUnprocessedReviewPage
:
1
,
currentProcessedReviewPage
:
1
,
currentArchivedTaskPage
:
1
,
companyFiles
:
[]
companyFiles
:
[]
}
}
const
mutations
=
{
const
mutations
=
{
SET_UNPROCESSED_REVIEW_PAGE
:(
state
,
page
)
=>
{
state
.
currentUnprocessedReviewPage
=
page
},
SET_PROCESSED_REVIEW_PAGE
:(
state
,
page
)
=>
{
state
.
currentProcessedReviewPage
=
page
},
SET_ARCHIVED_TASK_PAGE
:(
state
,
page
)
=>
{
state
.
currentArchivedTaskPage
=
page
},
SET_FILES
:
(
state
,
files
)
=>
{
SET_FILES
:
(
state
,
files
)
=>
{
state
.
companyFiles
=
files
state
.
companyFiles
=
files
}
}
}
}
const
actions
=
{
const
actions
=
{
setUnprocessedReviewPage
({
commit
},
page
)
{
commit
(
'SET_UNPROCESSED_REVIEW_PAGE'
,
page
)
},
setProcessedReviewPage
({
commit
},
page
)
{
commit
(
'SET_PROCESSED_REVIEW_PAGE'
,
page
)
},
setArchivedTaskPage
({
commit
},
page
)
{
commit
(
'SET_ARCHIVED_TASK_PAGE'
,
page
)
},
getCompanyFiles
({
commit
},
data
)
{
getCompanyFiles
({
commit
},
data
)
{
getCompanyFile
(
data
).
then
(
res
=>
{
getCompanyFile
(
data
).
then
(
res
=>
{
// 筛选数组返回其中某一个元素成为新数组
// 筛选数组返回其中某一个元素成为新数组
...
...
src/views/processing/archivedTask/index.vue
View file @
dd9db36a
...
@@ -275,7 +275,7 @@ export default {
...
@@ -275,7 +275,7 @@ export default {
},
},
computed
:
{
computed
:
{
...
mapGetters
([
'userId'
,
'standardList'
])
...
mapGetters
([
'userId'
,
'standardList'
,
'currentArchivedTaskPage'
])
},
},
watch
:
{
watch
:
{
// 监控标准修改
// 监控标准修改
...
@@ -289,7 +289,10 @@ export default {
...
@@ -289,7 +289,10 @@ export default {
}
}
},
},
created
()
{
created
()
{
this
.
$store
.
dispatch
(
'processing/setUnprocessedReviewPage'
,
1
)
this
.
$store
.
dispatch
(
'processing/setProcessedReviewPage'
,
1
)
this
.
$store
.
dispatch
(
'standard/setStandardList'
)
this
.
$store
.
dispatch
(
'standard/setStandardList'
)
this
.
queryParams
.
pageNum
=
this
.
currentArchivedTaskPage
},
},
methods
:
{
methods
:
{
getTaskType
(
id
)
{
getTaskType
(
id
)
{
...
@@ -303,6 +306,7 @@ export default {
...
@@ -303,6 +306,7 @@ export default {
/* 跳转到问卷详情*/
/* 跳转到问卷详情*/
goNext
(
url
)
{
goNext
(
url
)
{
this
.
$router
.
push
({
path
:
url
})
this
.
$router
.
push
({
path
:
url
})
this
.
$store
.
dispatch
(
'processing/setArchivedTaskPage'
,
this
.
queryParams
.
pageNum
)
},
},
/* 文件转化为二进制*/
/* 文件转化为二进制*/
fileToBase64
(
file
)
{
fileToBase64
(
file
)
{
...
...
src/views/processing/processed-review/index.vue
View file @
dd9db36a
...
@@ -243,7 +243,7 @@ export default {
...
@@ -243,7 +243,7 @@ export default {
}
}
},
},
computed
:
{
computed
:
{
...
mapGetters
([
'userId'
,
'standardList'
])
...
mapGetters
([
'userId'
,
'standardList'
,
'currentProcessedReviewPage'
])
},
},
watch
:
{
watch
:
{
// 监控标准修改
// 监控标准修改
...
@@ -257,7 +257,10 @@ export default {
...
@@ -257,7 +257,10 @@ export default {
}
}
},
},
created
()
{
created
()
{
this
.
$store
.
dispatch
(
'processing/setArchivedTaskPage'
,
1
)
this
.
$store
.
dispatch
(
'processing/setUnprocessedReviewPage'
,
1
)
this
.
$store
.
dispatch
(
'standard/setStandardList'
)
this
.
$store
.
dispatch
(
'standard/setStandardList'
)
this
.
queryParams
.
pageNum
=
this
.
currentProcessedReviewPage
},
},
methods
:
{
methods
:
{
getTaskType
(
id
)
{
getTaskType
(
id
)
{
...
@@ -302,6 +305,7 @@ export default {
...
@@ -302,6 +305,7 @@ export default {
goNext
(
url
)
{
goNext
(
url
)
{
console
.
log
(
url
)
console
.
log
(
url
)
this
.
$router
.
push
({
path
:
url
})
this
.
$router
.
push
({
path
:
url
})
this
.
$store
.
dispatch
(
'processing/setProcessedReviewPage'
,
this
.
queryParams
.
pageNum
)
}
}
}
}
}
}
...
...
src/views/processing/unprocessed-review/index.vue
View file @
dd9db36a
...
@@ -439,7 +439,7 @@ export default {
...
@@ -439,7 +439,7 @@ export default {
}
}
},
},
computed
:
{
computed
:
{
...
mapGetters
([
'userId'
,
'standardList'
])
...
mapGetters
([
'userId'
,
'standardList'
,
'currentUnprocessedReviewPage'
])
},
},
watch
:
{
watch
:
{
// 监控标准修改
// 监控标准修改
...
@@ -453,7 +453,10 @@ export default {
...
@@ -453,7 +453,10 @@ export default {
}
}
},
},
created
()
{
created
()
{
this
.
$store
.
dispatch
(
'processing/setArchivedTaskPage'
,
1
)
this
.
$store
.
dispatch
(
'processing/setProcessedReviewPage'
,
1
)
this
.
$store
.
dispatch
(
'standard/setStandardList'
)
this
.
$store
.
dispatch
(
'standard/setStandardList'
)
this
.
queryParams
.
pageNum
=
this
.
currentUnprocessedReviewPage
},
},
methods
:
{
methods
:
{
getTaskType
(
id
)
{
getTaskType
(
id
)
{
...
@@ -616,8 +619,9 @@ export default {
...
@@ -616,8 +619,9 @@ export default {
/* 跳转到问卷详情*/
/* 跳转到问卷详情*/
goNext
(
url
)
{
goNext
(
url
)
{
this
.
$router
.
push
({
path
:
url
})
this
.
$router
.
push
({
path
:
url
})
this
.
$store
.
dispatch
(
'processing/setUnprocessedReviewPage'
,
this
.
queryParams
.
pageNum
)
}
}
}
}
,
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
...
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