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
770c330c
Commit
770c330c
authored
Mar 15, 2024
by
盖献康
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 把车型试验(第三个子任务)融合到总任务的 新增、编辑、详情、暂存
parent
b2064b35
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
111 additions
and
94 deletions
+111
-94
scenario.js
src/api/scenario/scenario.js
+10
-0
getters.js
src/store/getters.js
+2
-1
index.js
src/store/index.js
+3
-1
testScenario.js
src/store/modules/testScenario.js
+35
-0
index.vue
src/views/task/edit/index.vue
+37
-26
index.vue
src/views/task/new/index.vue
+13
-27
index.vue
src/views/task/task-detail/index.vue
+11
-39
No files found.
src/api/scenario/scenario.js
0 → 100644
View file @
770c330c
import
request
from
'@/utils/request'
// 获取测试场景
export
function
getTestScenario
(
data
)
{
return
request
({
url
:
'/system/scenario/getListAll'
,
method
:
'post'
,
data
})
}
src/store/getters.js
View file @
770c330c
...
...
@@ -18,6 +18,7 @@ const getters = {
sidebarRouters
:
state
=>
state
.
permission
.
sidebarRouters
,
companyFiles
:
state
=>
state
.
processing
.
companyFiles
,
standard
:
state
=>
state
.
standard
.
standard
,
standardList
:
state
=>
state
.
standard
.
standardList
standardList
:
state
=>
state
.
standard
.
standardList
,
testScenarioList
:
state
=>
state
.
testScenario
.
testScenarioList
}
export
default
getters
src/store/index.js
View file @
770c330c
...
...
@@ -8,6 +8,7 @@ import permission from './modules/permission'
import
settings
from
'./modules/settings'
import
processing
from
'./modules/processing'
import
standard
from
'./modules/standard'
import
testScenario
from
'./modules/testScenario'
import
getters
from
'./getters'
Vue
.
use
(
Vuex
)
...
...
@@ -21,7 +22,8 @@ const store = new Vuex.Store({
permission
,
processing
,
standard
,
settings
settings
,
testScenario
},
getters
})
...
...
src/store/modules/testScenario.js
0 → 100644
View file @
770c330c
import
{
getTestScenario
}
from
"@/api/scenario/scenario"
;
const
testScenario
=
{
namespaced
:
true
,
state
:
{
testScenarioList
:
[]
},
mutations
:
{
SET_TEST_SCENARIO_LIST
:
(
state
,
testScenarioList
)
=>
{
state
.
testScenarioList
=
testScenarioList
}
},
actions
:
{
setTestScenarioList
({
commit
})
{
getTestScenario
({}).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
const
obj
=
res
.
data
.
map
(
({
id
,
testScenario
,
...
rest
})
=>
({
label
:
testScenario
,
value
:
parseInt
(
id
),
check
:
false
,
...
rest
})
)
console
.
log
(
'测试场景'
,
obj
)
commit
(
'SET_TEST_SCENARIO_LIST'
,
obj
)
}
})
}
}
}
export
default
testScenario
src/views/task/edit/index.vue
View file @
770c330c
...
...
@@ -335,8 +335,9 @@ export default {
taskCreateRequest
:
{
standardId
:
''
,
// 检验依据
taskList
:
[],
// 选择的任务(检查项目)
testScenarioList
:
[],
// 选择的测试场景
taskNo
:
''
,
// 任务编号
taskName
:
''
,
// 任务名称
taskName
:
''
,
// 任务名称
测试
confidentialityLevel
:
''
,
// 保密等级
productName
:
''
,
// 产品名称
productModel
:
''
,
// 车辆型号
...
...
@@ -413,29 +414,29 @@ export default {
// 小组成员回显数据
tableData
:
[],
inspectionItemList
:
[],
testScenarioList
:
[
{
value
:
0
,
label
:
'TBOX-蜂窝以太网接口'
,
check
:
false
},
{
value
:
1
,
label
:
'WiFi AP接口'
,
check
:
false
},
{
value
:
2
,
label
:
'WiFi Client接口'
,
check
:
false
},
{
value
:
3
,
label
:
'充电以太网接口'
,
check
:
false
},
{
value
:
4
,
label
:
'CAN 诊断接口(OBD)'
,
check
:
false
},
{
value
:
5
,
label
:
'以太网诊断接口(OBD)'
,
check
:
false
},
{
value
:
6
,
label
:
'车载摄像头以太网接口(无线)'
,
check
:
false
},
{
value
:
7
,
label
:
'第三方应用软件'
,
check
:
false
},
{
value
:
8
,
label
:
'远程控车应用'
,
check
:
false
},
{
value
:
9
,
label
:
'USB接口'
,
check
:
false
},
{
value
:
10
,
label
:
'XCB标定'
,
check
:
false
},
{
value
:
11
,
label
:
'CCP标定'
,
check
:
false
},
{
value
:
12
,
label
:
'安全启动'
,
check
:
false
},
{
value
:
13
,
label
:
'远程控车'
,
check
:
false
},
{
value
:
14
,
label
:
'V2X'
,
check
:
false
},
{
value
:
15
,
label
:
'BT'
,
check
:
false
},
{
value
:
16
,
label
:
'BLE'
,
check
:
false
},
{
value
:
17
,
label
:
'NFC'
,
check
:
false
},
{
value
:
18
,
label
:
'射频钥匙'
,
check
:
false
},
{
value
:
19
,
label
:
'软件升级'
,
check
:
false
},
{
value
:
20
,
label
:
'ECU固件'
,
check
:
false
}
],
//
testScenarioList: [
//
{ value: 0, label: 'TBOX-蜂窝以太网接口', check: false },
//
{ value: 1, label: 'WiFi AP接口', check: false },
//
{ value: 2, label: 'WiFi Client接口', check: false },
//
{ value: 3, label: '充电以太网接口', check: false },
//
{ value: 4, label: 'CAN 诊断接口(OBD)', check: false },
//
{ value: 5, label: '以太网诊断接口(OBD)', check: false },
//
{ value: 6, label: '车载摄像头以太网接口(无线)', check: false },
//
{ value: 7, label: '第三方应用软件', check: false },
//
{ value: 8, label: '远程控车应用', check: false },
//
{ value: 9, label: 'USB接口', check: false },
//
{ value: 10, label: 'XCB标定', check: false },
//
{ value: 11, label: 'CCP标定', check: false },
//
{ value: 12, label: '安全启动', check: false },
//
{ value: 13, label: '远程控车', check: false },
//
{ value: 14, label: 'V2X', check: false },
//
{ value: 15, label: 'BT', check: false },
//
{ value: 16, label: 'BLE', check: false },
//
{ value: 17, label: 'NFC', check: false },
//
{ value: 18, label: '射频钥匙', check: false },
//
{ value: 19, label: '软件升级', check: false },
//
{ value: 20, label: 'ECU固件', check: false }
//
],
rules
:
{
testScenarioList
:
[
{
...
...
@@ -600,6 +601,7 @@ export default {
}
},
created
()
{
this
.
$store
.
dispatch
(
'testScenario/setTestScenarioList'
)
// 对字典:inspection_item, 做处理
this
.
getUserByRole
()
// this.initWebSocket()
...
...
@@ -612,7 +614,7 @@ export default {
this
.
$store
.
dispatch
(
'standard/setStandardList'
)
},
computed
:
{
...
mapGetters
([
'standard'
,
'standardList'
])
...
mapGetters
([
'standard'
,
'standardList'
,
'testScenarioList'
])
},
// destroyed() {
// this.websock.close() // 离开路由之后断开websocket连接
...
...
@@ -639,6 +641,15 @@ export default {
this
.
model
[
key
]
=
this
.
taskDetail
[
key
]
}
}
if
(
this
.
taskDetail
.
testScenarioList
!==
null
)
{
this
.
testScenarioList
.
forEach
(
item
=>
{
if
(
this
.
taskDetail
.
testScenarioList
.
includes
(
item
.
value
))
{
item
.
check
=
true
}
})
}
else
{
this
.
model
.
testScenarioList
=
[]
}
// 小组信息
this
.
tableData
=
this
.
taskDetail
.
auditors
console
.
log
(
'ddd'
,
this
.
tableData
)
...
...
@@ -910,7 +921,7 @@ export default {
handleTestScenario
(
item
)
{
if
(
this
.
model
.
testScenarioList
.
includes
(
item
.
value
))
{
this
.
model
.
testScenarioList
.
splice
(
this
.
model
.
testScenarioList
.
indexOf
(
item
.
label
),
this
.
model
.
testScenarioList
.
indexOf
(
item
.
value
),
1
)
item
.
check
=
false
...
...
src/views/task/new/index.vue
View file @
770c330c
...
...
@@ -425,29 +425,7 @@ export default {
// { value: 1, label: '汽车信息安全一般要求', check: false },
// { value: 2, label: '汽车信息安全技术要求', check: false }
],
testScenarioList
:
[
{
value
:
0
,
label
:
'TBOX-蜂窝以太网接口'
,
check
:
false
},
{
value
:
1
,
label
:
'WiFi AP接口'
,
check
:
false
},
{
value
:
2
,
label
:
'WiFi Client接口'
,
check
:
false
},
{
value
:
3
,
label
:
'充电以太网接口'
,
check
:
false
},
{
value
:
4
,
label
:
'CAN 诊断接口(OBD)'
,
check
:
false
},
{
value
:
5
,
label
:
'以太网诊断接口(OBD)'
,
check
:
false
},
{
value
:
6
,
label
:
'车载摄像头以太网接口(无线)'
,
check
:
false
},
{
value
:
7
,
label
:
'第三方应用软件'
,
check
:
false
},
{
value
:
8
,
label
:
'远程控车应用'
,
check
:
false
},
{
value
:
9
,
label
:
'USB接口'
,
check
:
false
},
{
value
:
10
,
label
:
'XCB标定'
,
check
:
false
},
{
value
:
11
,
label
:
'CCP标定'
,
check
:
false
},
{
value
:
12
,
label
:
'安全启动'
,
check
:
false
},
{
value
:
13
,
label
:
'远程控车'
,
check
:
false
},
{
value
:
14
,
label
:
'V2X'
,
check
:
false
},
{
value
:
15
,
label
:
'BT'
,
check
:
false
},
{
value
:
16
,
label
:
'BLE'
,
check
:
false
},
{
value
:
17
,
label
:
'NFC'
,
check
:
false
},
{
value
:
18
,
label
:
'射频钥匙'
,
check
:
false
},
{
value
:
19
,
label
:
'软件升级'
,
check
:
false
},
{
value
:
20
,
label
:
'ECU固件'
,
check
:
false
}
],
// testScenarioList: [],
rules
:
{
testScenarioList
:
[
{
...
...
@@ -618,9 +596,7 @@ export default {
}
},
created
()
{
setTimeout
(()
=>
{
console
.
log
(
'standardList'
,
this
.
standardList
)
},
3000
)
this
.
$store
.
dispatch
(
'testScenario/setTestScenarioList'
)
// 对字典:inspection_item, 做处理
this
.
getUserByRole
()
// this.initWebSocket()
...
...
@@ -633,7 +609,7 @@ export default {
this
.
$store
.
dispatch
(
'standard/setStandardList'
)
},
computed
:
{
...
mapGetters
([
'standard'
,
'standardList'
])
...
mapGetters
([
'standard'
,
'standardList'
,
'testScenarioList'
])
},
// destroyed() {
// this.websock.close() // 离开路由之后断开websocket连接
...
...
@@ -736,6 +712,16 @@ export default {
item
.
check
=
true
}
})
// 测试场景
if
(
this
.
taskTemporaryStorage
.
testScenarioList
!==
null
)
{
this
.
testScenarioList
.
forEach
(
item
=>
{
if
(
this
.
taskTemporaryStorage
.
testScenarioList
.
includes
(
item
.
value
)
)
{
item
.
check
=
true
}
})
}
console
.
log
(
'检验项目'
,
this
.
inspectionItemList
)
// 把detail转到model里(任务信息)
for
(
const
key
in
this
.
taskTemporaryStorage
)
{
...
...
src/views/task/task-detail/index.vue
View file @
770c330c
...
...
@@ -355,29 +355,7 @@ export default {
// 小组成员回显数据
tableData
:
[],
inspectionItemList
:
[],
testScenarioList
:
[
{
value
:
0
,
label
:
'TBOX-蜂窝以太网接口'
,
check
:
false
},
{
value
:
1
,
label
:
'WiFi AP接口'
,
check
:
false
},
{
value
:
2
,
label
:
'WiFi Client接口'
,
check
:
false
},
{
value
:
3
,
label
:
'充电以太网接口'
,
check
:
false
},
{
value
:
4
,
label
:
'CAN 诊断接口(OBD)'
,
check
:
false
},
{
value
:
5
,
label
:
'以太网诊断接口(OBD)'
,
check
:
false
},
{
value
:
6
,
label
:
'车载摄像头以太网接口(无线)'
,
check
:
false
},
{
value
:
7
,
label
:
'第三方应用软件'
,
check
:
false
},
{
value
:
8
,
label
:
'远程控车应用'
,
check
:
false
},
{
value
:
9
,
label
:
'USB接口'
,
check
:
false
},
{
value
:
10
,
label
:
'XCB标定'
,
check
:
false
},
{
value
:
11
,
label
:
'CCP标定'
,
check
:
false
},
{
value
:
12
,
label
:
'安全启动'
,
check
:
false
},
{
value
:
13
,
label
:
'远程控车'
,
check
:
false
},
{
value
:
14
,
label
:
'V2X'
,
check
:
false
},
{
value
:
15
,
label
:
'BT'
,
check
:
false
},
{
value
:
16
,
label
:
'BLE'
,
check
:
false
},
{
value
:
17
,
label
:
'NFC'
,
check
:
false
},
{
value
:
18
,
label
:
'射频钥匙'
,
check
:
false
},
{
value
:
19
,
label
:
'软件升级'
,
check
:
false
},
{
value
:
20
,
label
:
'ECU固件'
,
check
:
false
}
],
// testScenarioList: [],
rules
:
{
testScenarioList
:
[
{
...
...
@@ -539,20 +517,12 @@ export default {
},
created
()
{
// 接收路由传参
this
.
$store
.
dispatch
(
'
standard/setStandard
List'
)
this
.
$store
.
dispatch
(
'
testScenario/setTestScenario
List'
)
this
.
getInspectionItemDict
()
// 对字典:inspection_item, 做处理
// // 查询样品信息(整车、零件)
// this.getSampleInformation()
// this.getUserByRole()
// this.getManufacturer()
// this.$nextTick(() => {
// this.leaderTop()
// this.rowDrop()
// })
this
.
$store
.
dispatch
(
'standard/setStandardList'
)
},
computed
:
{
...
mapGetters
([
'standard'
,
'standardList'
])
...
mapGetters
([
'standard'
,
'standardList'
,
'testScenarioList'
])
},
methods
:
{
getTaskDetail
(
taskId
)
{
...
...
@@ -567,11 +537,13 @@ export default {
}
})
// 测试场景
this
.
testScenarioList
.
forEach
(
item
=>
{
if
(
this
.
taskDetail
.
testScenarioList
.
includes
(
item
.
value
))
{
item
.
check
=
true
}
})
if
(
this
.
taskDetail
.
testScenarioList
!==
null
)
{
this
.
testScenarioList
.
forEach
(
item
=>
{
if
(
this
.
taskDetail
.
testScenarioList
.
includes
(
item
.
value
))
{
item
.
check
=
true
}
})
}
console
.
log
(
'检验项目'
,
this
.
inspectionItemList
)
// 把detail转到model里(任务信息)
for
(
const
key
in
this
.
taskDetail
)
{
...
...
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