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
90c9e279
Commit
90c9e279
authored
Jun 03, 2024
by
jiaxu.yan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修改开始试验任务的接口
parent
ccd0d795
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
23 deletions
+20
-23
dialog.vue
...views/processing/unprocessed-review/components/dialog.vue
+20
-23
No files found.
src/views/processing/unprocessed-review/components/dialog.vue
View file @
90c9e279
...
@@ -44,11 +44,11 @@
...
@@ -44,11 +44,11 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
import
{
getCaseByScenario
,
getScenarioList
,
getScenarioList
,
reviewTaskStart
reviewTaskStart
,
createProject
,
getUseCaseListByScenario
}
from
'@/api/task/task'
}
from
'@/api/task/task'
import
{
FastTestProject
}
from
'@/api/graphql/client.graphql'
export
default
{
export
default
{
props
:
{
props
:
{
dialogManger
:
{
dialogManger
:
{
...
@@ -64,7 +64,9 @@ export default {
...
@@ -64,7 +64,9 @@ export default {
data
()
{
data
()
{
return
{
return
{
model
:
{
model
:
{
scenarioNameList
:
[]
searchFields
:
{
scenario
:
[]
}
},
},
loading
:
false
,
loading
:
false
,
testScenarioList
:
[]
testScenarioList
:
[]
...
@@ -75,7 +77,9 @@ export default {
...
@@ -75,7 +77,9 @@ export default {
if
(
newValue
)
{
if
(
newValue
)
{
this
.
getScenario
()
this
.
getScenario
()
this
.
model
=
{
this
.
model
=
{
scenarioNameList
:
[]
searchFields
:
{
scenario
:
[]
}
}
}
}
}
}
}
...
@@ -90,13 +94,13 @@ export default {
...
@@ -90,13 +94,13 @@ export default {
const
params
=
{
const
params
=
{
id
:
this
.
dialogManger
.
item
.
id
id
:
this
.
dialogManger
.
item
.
id
}
}
const
res
=
await
get
Case
ByScenario
(
this
.
model
)
const
res
=
await
get
UseCaseList
ByScenario
(
this
.
model
)
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
const
resp
=
await
this
.
newFileTest
({
const
resp
=
await
this
.
newFileTest
({
name
:
this
.
dialogManger
.
item
.
taskName
,
name
:
this
.
dialogManger
.
item
.
taskName
,
caseIdList
:
res
.
data
caseIdList
:
res
.
data
})
})
params
.
testSchemeId
=
resp
.
data
.
projectMutation
.
project
.
id
params
.
testSchemeId
=
resp
.
data
this
.
startTaskModel
(
params
)
this
.
startTaskModel
(
params
)
}
}
},
},
...
@@ -121,17 +125,9 @@ export default {
...
@@ -121,17 +125,9 @@ export default {
* 对接车联网新建测试项目
* 对接车联网新建测试项目
*/
*/
async
newFileTest
(
task
)
{
async
newFileTest
(
task
)
{
const
res
=
await
this
.
$apollo
.
mutate
({
const
res
=
await
createProject
({
// fetchPolicy: 'no-cache',
name
:
task
.
name
,
mutation
:
FastTestProject
,
useCaseList
:
task
.
caseIdList
variables
:
{
name
:
task
.
name
,
lawId
:
'law_items;106'
,
principalUserId
:
'user_items;2'
,
systemId
:
'system;1'
,
caseIdList
:
task
.
caseIdList
,
fileList
:
[
'file_management_items;2'
]
}
})
})
return
res
return
res
},
},
...
@@ -147,15 +143,16 @@ export default {
...
@@ -147,15 +143,16 @@ export default {
})
})
},
},
handleTestScenario
(
item
)
{
handleTestScenario
(
item
)
{
if
(
this
.
model
.
scenarioNameList
.
includes
(
item
.
label
))
{
console
.
log
(
this
.
model
)
this
.
model
.
scenarioNameList
.
splice
(
if
(
this
.
model
.
searchFields
.
scenario
.
includes
(
item
.
label
))
{
this
.
model
.
scenarioNameList
.
indexOf
(
item
.
label
),
this
.
model
.
searchFields
.
scenario
.
splice
(
this
.
model
.
searchFields
.
scenario
.
indexOf
(
item
.
label
),
1
1
)
)
item
.
check
=
false
item
.
check
=
false
}
else
{
}
else
{
item
.
check
=
true
item
.
check
=
true
this
.
model
.
s
cenarioNameList
.
push
(
item
.
label
)
this
.
model
.
s
earchFields
.
scenario
.
push
(
item
.
label
)
}
}
},
},
// 全选
// 全选
...
@@ -163,7 +160,7 @@ export default {
...
@@ -163,7 +160,7 @@ export default {
this
.
testScenarioList
.
forEach
(
obj
=>
{
this
.
testScenarioList
.
forEach
(
obj
=>
{
obj
.
check
=
true
obj
.
check
=
true
})
})
this
.
model
.
s
cenarioNameList
=
this
.
testScenarioList
.
map
(
obj
=>
{
this
.
model
.
s
earchFields
.
scenario
=
this
.
testScenarioList
.
map
(
obj
=>
{
return
obj
.
label
return
obj
.
label
})
})
}
}
...
...
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