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
b1b31c4d
Commit
b1b31c4d
authored
Dec 25, 2023
by
盖献康
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 发布新任务 - 车型测评任务
parent
6302b64b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
113 additions
and
10 deletions
+113
-10
index.vue
src/views/task/new/index.vue
+113
-10
No files found.
src/views/task/new/index.vue
View file @
b1b31c4d
...
@@ -14,15 +14,15 @@
...
@@ -14,15 +14,15 @@
:type=
"formType === 2 ? 'primary' : 'default'"
:type=
"formType === 2 ? 'primary' : 'default'"
round
round
@
click=
"formType = 2"
@
click=
"formType = 2"
>
车型审查任务
>
车型测评任务
</el-button>
<el-button
size=
"mini"
:type=
"formType === 3 ? 'primary' : 'default'"
round
@
click=
"formType = 3"
>
车型检验任务
</el-button>
</el-button>
<!--
<el-button-->
<!-- size="mini"-->
<!-- :type="formType === 3 ? 'primary' : 'default'"-->
<!-- round-->
<!-- @click="formType = 3"-->
<!-- >车型检验任务-->
<!--
</el-button>
-->
</el-form-item>
</el-form-item>
<div
class=
"subtitle"
>
基础信息
</div>
<div
class=
"subtitle"
>
基础信息
</div>
...
@@ -352,6 +352,24 @@
...
@@ -352,6 +352,24 @@
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<!-- 测试场景 -->
<div
v-show=
"formType === 2"
>
<div
class=
"subtitle"
style=
"margin-top: 20px"
>
测试场景
</div>
<div
class=
"test-scenario-container"
>
<div
v-for=
"(item, index) in testScenarioList"
:key=
"index"
:class=
"{
'test-scenario': item.check === false,
'check-test-scenario': item.check === true
}"
@
click=
"handleTestScenario(item)"
>
<div>
{{ item.label }}
</div>
</div>
</div>
</div>
</el-form>
</el-form>
<div
class=
"bottom-button"
>
<div
class=
"bottom-button"
>
...
@@ -375,15 +393,45 @@
...
@@ -375,15 +393,45 @@
</template>
</template>
<
script
>
<
script
>
export
default
{
export
default
{
dicts
:
[
'sys_task_status'
,
'sys_pro'
,
'confidentiality_level'
],
dicts
:
[
'sys_task_status'
,
'sys_pro'
,
'confidentiality_level'
,
'test_scenario'
],
data
()
{
data
()
{
return
{
return
{
name
:
''
,
name
:
''
,
formType
:
1
,
formType
:
1
,
showTestScenario
:
false
,
// 新增/保存 - 对象
// 新增/保存 - 对象
model
:
{},
model
:
{},
loading
:
false
,
loading
:
false
,
tableData
:
[],
tableData
:
[],
checkTestScenarioList
:
[],
testScenarioList
:
[
{
value
:
0
,
label
:
'TBOX-蜂窝以太网接口'
,
check
:
false
},
{
value
:
0
,
label
:
'WiFi API接口'
,
check
:
false
},
{
value
:
0
,
label
:
'WiFi Client接口'
,
check
:
false
},
{
value
:
0
,
label
:
'充电以太网接口'
,
check
:
false
},
{
value
:
0
,
label
:
'CAN 诊断接口(OBD)'
,
check
:
false
},
{
value
:
0
,
label
:
'以太网诊断接口(OBD)'
,
check
:
false
},
{
value
:
0
,
label
:
'车载摄像头以太网接口(无线)'
,
check
:
false
},
{
value
:
0
,
label
:
'第三方应用软件'
,
check
:
false
},
{
value
:
0
,
label
:
'远程控车应用'
,
check
:
false
},
{
value
:
0
,
label
:
'USB接口'
,
check
:
false
},
{
value
:
0
,
label
:
'XCB标定'
,
check
:
false
},
{
value
:
0
,
label
:
'CCP标定'
,
check
:
false
},
{
value
:
0
,
label
:
'安全启动'
,
check
:
false
},
{
value
:
0
,
label
:
'远程控车'
,
check
:
false
},
{
value
:
0
,
label
:
'V2X'
,
check
:
false
},
{
value
:
0
,
label
:
'BT'
,
check
:
false
},
{
value
:
0
,
label
:
'BLE'
,
check
:
false
},
{
value
:
0
,
label
:
'NFC'
,
check
:
false
},
{
value
:
0
,
label
:
'射频钥匙'
,
check
:
false
},
{
value
:
0
,
label
:
'软件升级'
,
check
:
false
},
{
value
:
0
,
label
:
'ECU固体'
,
check
:
false
}
],
rules
:
{
rules
:
{
no
:
[{
required
:
true
,
message
:
'任务编号不能为空'
,
trigger
:
'blur'
}],
no
:
[{
required
:
true
,
message
:
'任务编号不能为空'
,
trigger
:
'blur'
}],
taskName
:
[
taskName
:
[
...
@@ -487,12 +535,21 @@ export default {
...
@@ -487,12 +535,21 @@ export default {
'model.trademark'
:
{
'model.trademark'
:
{
handler
(
newValue
,
oldValue
)
{
handler
(
newValue
,
oldValue
)
{
if
(
newValue
)
{
if
(
newValue
)
{
console
.
log
(
'aaa'
)
this
.
$refs
.
form
.
clearValidate
(
'trademark'
)
this
.
$refs
.
form
.
clearValidate
(
'trademark'
)
}
else
{
}
else
{
this
.
$refs
.
form
.
validateField
(
'trademark'
)
this
.
$refs
.
form
.
validateField
(
'trademark'
)
}
}
}
}
},
formType
:
{
handler
(
newValue
,
oldValue
)
{
console
.
log
(
'formType'
,
newValue
)
if
(
newValue
===
'1'
)
{
this
.
formType
=
1
}
else
if
(
newValue
===
'2'
)
{
this
.
formType
=
2
}
}
}
}
},
},
methods
:
{
methods
:
{
...
@@ -506,6 +563,20 @@ export default {
...
@@ -506,6 +563,20 @@ export default {
this
.
userList
.
find
(
item
=>
item
.
name
===
row
.
name
).
disabled
=
false
this
.
userList
.
find
(
item
=>
item
.
name
===
row
.
name
).
disabled
=
false
this
.
tableData
.
find
(
item
=>
item
.
name
===
row
.
name
).
name
=
''
this
.
tableData
.
find
(
item
=>
item
.
name
===
row
.
name
).
name
=
''
},
},
handleTestScenario
(
item
)
{
// 查看item.value在this.checkTestScenarioList里面存不存在
// 存在则删除
if
(
this
.
checkTestScenarioList
.
includes
(
item
.
label
))
{
this
.
checkTestScenarioList
.
splice
(
this
.
checkTestScenarioList
.
indexOf
(
item
.
label
),
1
)
item
.
check
=
false
}
else
{
item
.
check
=
true
this
.
checkTestScenarioList
.
push
(
item
.
value
)
}
},
/**
/**
* 小组信息删除
* 小组信息删除
* @param row 行内信息
* @param row 行内信息
...
@@ -589,6 +660,7 @@ export default {
...
@@ -589,6 +660,7 @@ export default {
},
},
// 保存
// 保存
handleAdd
()
{
handleAdd
()
{
console
.
log
(
'a'
,
this
.
checkTestScenarioList
)
this
.
$refs
.
form
.
validate
(
valid
=>
{
this
.
$refs
.
form
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
this
.
$modal
.
msgSuccess
(
'发布成功'
)
this
.
$modal
.
msgSuccess
(
'发布成功'
)
...
@@ -613,4 +685,35 @@ export default {
...
@@ -613,4 +685,35 @@ export default {
.add-number
{
.add-number
{
width
:
100%
;
width
:
100%
;
}
}
.test-scenario-container
{
display
:
flex
;
flex-wrap
:
wrap
;
.test-scenario
{
width
:
220px
;
height
:
40px
;
border
:
1px
solid
#dcdfe6
;
background-color
:
#ffffff
;
margin
:
0
10px
10px
0
;
border-radius
:
30px
;
div
{
text-align
:
center
;
position
:
relative
;
top
:
8px
;
}
}
.check-test-scenario
{
width
:
220px
;
height
:
40px
;
border
:
1px
solid
#a1cfff
;
background-color
:
#f0f7ff
;
margin
:
0
10px
10px
0
;
border-radius
:
30px
;
div
{
color
:
#68b6ff
;
text-align
:
center
;
position
:
relative
;
top
:
8px
;
}
}
}
</
style
>
</
style
>
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