Commit 81673e21 authored by jiaxu.yan's avatar jiaxu.yan

Merge branch 'develop' into developer/yanjiaxu

parents 02489d31 3353a091
import request from '@/utils/request'
// 获取测试场景
export function getTestScenario(data) {
return request({
url: '/system/scenario/getListAll',
method: 'post',
data
})
}
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<div class="component-upload-image"> <div class="component-upload-image">
<el-upload <el-upload
multiple multiple
:auto-upload="true"
:action="uploadImgUrl" :action="uploadImgUrl"
list-type="picture-card" list-type="picture-card"
:on-success="handleUploadSuccess" :on-success="handleUploadSuccess"
...@@ -128,6 +129,13 @@ export default { ...@@ -128,6 +129,13 @@ export default {
methods: { methods: {
// 上传前loading加载 // 上传前loading加载
handleBeforeUpload(file) { handleBeforeUpload(file) {
if (file.name) {
const regex = /[\s~`!@#$%^&*()\-_=+[\]{}|;:'",<>/?]/
const result = regex.test(file.name)
if (result === true) {
this.fileList = []
this.$modal.msgError('文件名称不正确,请上传不包含特殊字符名称的图片')
} else if (result === false) {
let isImg = false let isImg = false
if (this.fileType.length) { if (this.fileType.length) {
let fileExtension = '' let fileExtension = ''
...@@ -158,6 +166,8 @@ export default { ...@@ -158,6 +166,8 @@ export default {
} }
this.$modal.loading('正在上传图片,请稍候...') this.$modal.loading('正在上传图片,请稍候...')
this.number++ this.number++
}
}
}, },
// 文件个数超出 // 文件个数超出
handleExceed() { handleExceed() {
......
...@@ -129,6 +129,10 @@ import VueApollo from 'vue-apollo' ...@@ -129,6 +129,10 @@ import VueApollo from 'vue-apollo'
// 全局使用 // 全局使用
Vue.use(VueApollo); Vue.use(VueApollo);
// 全局导入Echarts
import * as echarts from 'echarts'
Vue.prototype.$echarts = echarts
// 请求graphql使用的apollo API // 请求graphql使用的apollo API
const apolloClient = new ApolloClient({ const apolloClient = new ApolloClient({
// 服务端Url // 服务端Url
......
...@@ -18,6 +18,7 @@ const getters = { ...@@ -18,6 +18,7 @@ const getters = {
sidebarRouters: state => state.permission.sidebarRouters, sidebarRouters: state => state.permission.sidebarRouters,
companyFiles: state => state.processing.companyFiles, companyFiles: state => state.processing.companyFiles,
standard: state => state.standard.standard, standard: state => state.standard.standard,
standardList: state => state.standard.standardList standardList: state => state.standard.standardList,
testScenarioList: state => state.testScenario.testScenarioList
} }
export default getters export default getters
...@@ -8,6 +8,7 @@ import permission from './modules/permission' ...@@ -8,6 +8,7 @@ import permission from './modules/permission'
import settings from './modules/settings' import settings from './modules/settings'
import processing from './modules/processing' import processing from './modules/processing'
import standard from './modules/standard' import standard from './modules/standard'
import testScenario from './modules/testScenario'
import getters from './getters' import getters from './getters'
Vue.use(Vuex) Vue.use(Vuex)
...@@ -21,7 +22,8 @@ const store = new Vuex.Store({ ...@@ -21,7 +22,8 @@ const store = new Vuex.Store({
permission, permission,
processing, processing,
standard, standard,
settings settings,
testScenario
}, },
getters getters
}) })
......
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
<template>
<div
ref="chart"
style="width: 100%; height: 300px; display: flex; justify-content: center"
></div>
</template>
<script>
export default {
name: 'ConfidentialityTasks',
data() {
return {
chart: null
}
},
mounted() {
this.init()
},
methods: {
init() {
// 2.初始化
this.chart = this.$echarts.init(this.$refs.chart)
// 3.配置数据
const option = {
title: {
text: '任务保密等级占比',
left: 'left',
textStyle: {
color: '#606266',
fontWeight: 700,
fontSize: 16
}
},
color: ['#8C79EA', '#12BEDF', '#F6B24B', '#1A6FD7'],
tooltip: {
trigger: 'item'
},
legend: {
top: 'bottom'
},
series: [
{
type: 'pie',
radius: ['40%', '50%'],
avoidLabelOverlap: false,
itemStyle: {
borderRadius: 10,
borderColor: '#fff',
borderWidth: 2
},
label: {
show: false,
position: 'center',
formatter: `{b|{d}%}\n{d|{b}}`, // 自定义lable处展示那些数据及其格式
rich: {
b: {
fontSize: 16,
fonWweight: 700,
color: ' #303133'
},
d: {
fontSsize: 14,
fontWeight: 400,
color: ' #606266'
}
}
},
emphasis: {
label: {
show: true,
fontSize: 40,
fontWeight: 'bold'
}
},
labelLine: {
show: false
},
data: [
{ value: 1048, name: 'A' },
{ value: 735, name: 'B' },
{ value: 580, name: 'C' },
{ value: 484, name: 'D' }
]
}
]
}
// 4.传入数据
this.chart.setOption(option)
}
}
}
</script>
<style lang="scss" scoped></style>
<template>
<div
ref="chart"
style="width: 100%; height: 300px; display: flex; justify-content: center"
></div>
</template>
<script>
export default {
name: 'StandardClassification',
data() {
return {
chart: null
}
},
mounted() {
this.init()
},
methods: {
init() {
// 2.初始化
this.chart = this.$echarts.init(this.$refs.chart)
// 3.配置数据
const option = {
title: {
text: '标准分类占比',
left: 'left',
textStyle: {
color: '#606266',
fontWeight: 700,
fontSize: 16
}
},
legend: {
top: 'bottom'
},
color: ['#F6B24B', '#1A6FD7', '#13BE24'],
series: [
{
name: 'Nightingale Chart',
type: 'pie',
radius: ['30%', '40%'],
center: ['50%', '40%'],
roseType: 'area',
itemStyle: {
borderRadius: 10
},
label: {
formatter: `{b|{b}}\n\n{d}%`, // 自定义lable处展示那些数据及其格式
fontSize: 14, // 字体大小
rich: {
b: {
color: ' #606266',
fontSize: 14
}
},
color: 'inherit'
},
labelLine: {
length: 25, // 挨着图例的直线的长度
length2: 10 // 挨着文字的直线的长度
},
data: [
{ value: 40, name: 'rose 1' },
{ value: 38, name: 'rose 2' },
{ value: 32, name: 'rose 3' }
]
}
]
}
// 4.传入数据
this.chart.setOption(option)
}
}
}
</script>
<style lang="scss" scoped></style>
<template>
<div ref="chart" style="width: 50%; height: 500px"></div>
</template>
<script>
export default {
name: 'UseCaseRisk',
data() {
return {
chart: null
}
},
mounted() {
this.init()
},
methods: {
init() {
// 2.初始化
this.chart = this.$echarts.init(this.$refs.chart)
// 3.配置数据
const option = {
title: {
text: '任务保密等级占比',
left: 'left',
textStyle: {
color: '#606266',
fontWeight: 700,
fontSize: 16
}
},
color: ['#E55868', '#F6B24B', '#1A6FD7'],
series: [
{
type: 'gauge',
anchor: {
show: true,
showAbove: true,
size: 18,
itemStyle: {
color: '#FAC858'
}
},
pointer: {
icon: 'path://M2.9,0.7L2.9,0.7c1.4,0,2.6,1.2,2.6,2.6v115c0,1.4-1.2,2.6-2.6,2.6l0,0c-1.4,0-2.6-1.2-2.6-2.6V3.3C0.3,1.9,1.4,0.7,2.9,0.7z',
width: 8,
length: '80%',
offsetCenter: [0, '8%']
},
progress: {
show: true,
overlap: true,
roundCap: true
},
axisLine: {
roundCap: true
},
data: [
{
value: 20,
name: 'Good',
title: {
offsetCenter: ['-40%', '80%']
},
detail: {
offsetCenter: ['-40%', '95%']
}
},
{
value: 40,
name: 'Better',
title: {
offsetCenter: ['0%', '80%']
},
detail: {
offsetCenter: ['0%', '95%']
}
},
{
value: 60,
name: 'Perfect',
title: {
offsetCenter: ['40%', '80%']
},
detail: {
offsetCenter: ['40%', '95%']
}
}
],
title: {
fontSize: 14
},
detail: {
width: 40,
height: 14,
fontSize: 14,
color: '#fff',
backgroundColor: 'inherit',
borderRadius: 3,
formatter: '{value}%'
}
}
]
}
// 4.传入数据
this.chart.setOption(option)
}
}
}
</script>
<style lang="scss" scoped></style>
<template>
<div ref="chart" style="width: 100%; height: 500px"></div>
</template>
<script>
export default {
name: 'UseCaseTest',
data() {
return {
chart: null
}
},
mounted() {
this.init()
},
methods: {
init() {
// 2.初始化
this.chart = this.$echarts.init(this.$refs.chart)
// 3.配置数据
const option = {
title: {
text: '用例测试类型概览',
left: 'left',
textStyle: {
color: '#606266',
fontWeight: 700,
fontSize: 16
}
},
tooltip: {
name: '用例测试类型概览',
trigger: 'item',
axisPointer: {
type: 'shadow'
}
},
legend: {},
grid: {
left: '1%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'value',
boundaryGap: [0, 0.01]
},
yAxis: {
type: 'category',
data: ['自动', '半自动', '手工']
},
series: [
{
type: 'bar',
barWidth: '20',
data: [
{ itemStyle: { color: '#13BE24' }, value: 120 },
{ itemStyle: { color: '#7F69E8' }, value: 200 },
{ itemStyle: { color: '#1A6FD7' }, value: 150 }
]
}
]
}
// 4.传入数据
this.chart.setOption(option)
}
}
}
</script>
<style lang="scss" scoped></style>
<template> <template>
<div>HomePage</div> <page-standard>
<el-row :gutter="20">
<el-col :span="8">
<div class="cardOne">
<div class="left">
<ul>
<li style="color: #278ce9">
<div class="textLayout">
<span class="cardOneTitle">支持标准数量</span
><span class="cardOneNumber">319</span>
</div>
</li>
<li style="color: #f96f21">
<div class="textLayout">
<span class="cardOneTitle">任务数量</span
><span class="cardOneNumber">319</span>
</div>
</li>
<li style="color: #13be24">
<div class="textLayout">
<span class="cardOneTitle">检验员数量</span
><span class="cardOneNumber">319</span>
</div>
</li>
<li style="color: #e88069">
<div class="textLayout">
<span class="cardOneTitle">整车样品数量</span
><span class="cardOneNumber">319</span>
</div>
</li>
<li style="color: #7f69e8">
<div class="textLayout">
<span class="cardOneTitle">测试类型数量</span
><span class="cardOneNumber">319</span>
</div>
</li>
</ul>
</div>
<div class="right">
<ul>
<li style="color: #12cdaa">
<div class="textLayout">
<span class="cardOneTitle">测试用例数量</span
><span class="cardOneNumber">319</span>
</div>
</li>
<li style="color: #f9a221">
<div class="textLayout">
<span class="cardOneTitle">检验报告数量</span
><span class="cardOneNumber">319</span>
</div>
</li>
<li style="color: #e55868">
<div class="textLayout">
<span class="cardOneTitle">车企数量</span
><span class="cardOneNumber">319</span>
</div>
</li>
<li style="color: #278ce9">
<div class="textLayout">
<span class="cardOneTitle">零部件样品数量</span
><span class="cardOneNumber">319</span>
</div>
</li>
<li style="color: #41d1ff">
<div class="textLayout">
<span class="cardOneTitle">测试场景数量</span
><span class="cardOneNumber">319</span>
</div>
</li>
</ul>
</div>
</div>
</el-col>
<el-col :span="6">
<div class="cardStyle">
<StandardClassification></StandardClassification>
</div>
</el-col>
<el-col :span="5">
<div class="cardThree">
<div class="cardTitle">任务完成情况占比</div>
<div style="display: flex; justify-content: space-between">
<div class="cardChild" style="background: rgba(18, 190, 223, 0.08)">
<div
style="
width: 36px;
height: 36px;
background: #12bedf;
border-radius: 8px;
"
></div>
<span>已完成 :43个</span>
<el-progress
:percentage="40"
color="#12BEDF"
:stroke-width="10"
:show-text="false"
></el-progress>
<span>40%</span>
</div>
<div class="cardChild" style="background: rgba(230, 88, 104, 0.08)">
<div
style="
width: 36px;
height: 36px;
background: #e55868;
border-radius: 8px;
"
></div>
<span>已完成 :43个</span>
<el-progress
:percentage="40"
color="#E55868"
:stroke-width="10"
:show-text="false"
></el-progress>
<span>40%</span>
</div>
</div>
</div>
</el-col>
<el-col :span="5">
<div class="cardStyle">
<ConfidentialityTasks></ConfidentialityTasks>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="14">
<div class="cardStyle">
<div style="display: flex">
<UseCaseRisk></UseCaseRisk>
<div style="width: 50%; display: flex; align-items: center">
<div
style="
width: 100%;
display: flex;
justify-content: space-around;
height: 149px;
"
>
<div class="dangerousCard" style="background: #f1f5f9">
<div class="lineOne">高危</div>
<div>高危</div>
<div class="lineLast">83</div>
</div>
<div class="dangerousCard" style="background: #fef6e9">
<div class="lineOne">中危</div>
<div>高危</div>
<div class="lineLast">45</div>
</div>
<div class="dangerousCard" style="background: #e8f1fb">
<div class="lineOne">低危</div>
<div>高危</div>
<div class="lineLast">78</div>
</div>
</div>
</div>
</div>
<div class="dashed-divider"></div>
<div>
<UseCaseTest></UseCaseTest>
</div>
</div>
</el-col>
<el-col :span="10">
<el-row>
<el-col :span="24">
<div class="cardStyle" style="height: 50%">
<div class="cardTitle">平均检验通过率</div>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="cardStyle">
<div class="cardTitle">任务完成情况占比</div>
<div
style="
display: flex;
flex-wrap: wrap;
justify-content: space-between;
"
>
<div
v-for="(item, index) in taskCompleted"
:key="index"
style="width: calc(50% - 30px); margin-bottom: 30px"
>
<div style="margin-bottom: 10px">{{ item.name }}</div>
<el-progress
:percentage="item.value"
color="#1A6FD7"
show-text="true"
:stroke-width="15"
:format="format"
></el-progress>
</div>
</div>
</div>
</el-col>
</el-row>
</el-col>
</el-row>
</page-standard>
</template> </template>
<script> <script>
import StandardClassification from './echartHome/standardClassification.vue'
import ConfidentialityTasks from './echartHome/confidentialityTasks.vue'
import UseCaseRisk from './echartHome/useCaseRisk.vue'
import UseCaseTest from './echartHome/useCaseTest.vue'
export default { export default {
name: 'HomePage', name: 'HomePage',
components: {
UseCaseTest,
UseCaseRisk,
ConfidentialityTasks,
StandardClassification
},
data() { data() {
return {} return {
taskCompleted: [
{ name: '站哨', value: 90 },
{ name: '站哨', value: 90 },
{ name: '站哨', value: 90 },
{ name: '站哨', value: 90 },
{ name: '站哨', value: 90 },
{ name: '站哨', value: 90 },
{ name: '站哨', value: 90 },
{ name: '站哨', value: 90 },
{ name: '站哨', value: 90 },
{ name: '站哨', value: 90 }
]
}
},
methods: {
format(percentage) {
return (percentage = `${percentage}个`)
}
} }
} }
</script> </script>
<style lang="scss" scoped>
.dangerousCard {
padding: 20px;
width: 106px;
height: 149px;
border-radius: 8px;
display: flex;
flex-direction: column;
justify-content: space-between;
text-align: center;
.lineOne {
font-size: 14px;
font-weight: 400;
color: #606266;
}
.lineLast {
font-size: 16px;
font-weight: 400;
color: #303133;
}
}
.dashed-divider {
border-top: 1px dashed #ccc;
margin: 10px 0;
}
.cardStyle {
border: 1px solid #dcdfe3;
border-radius: 4px;
padding: 20px;
margin-bottom: 20px;
.cardTitle {
font-size: 16px;
font-weight: 700;
color: #606266;
margin-bottom: 20px;
}
}
.cardOne {
height: 340px;
display: flex;
justify-content: space-between;
padding: 20px 30px;
border: 1px solid #dcdfe3;
border-radius: 4px;
.left {
width: calc(50% - 20px);
}
.right {
width: calc(50% - 20px);
}
}
.cardOneTitle {
font-size: 14px;
font-weight: 400;
color: #606266;
}
.cardOneNumber {
font-size: 18px;
font-weight: 400;
color: #303133;
}
.textLayout {
display: flex;
justify-content: space-between;
margin: 20px 0;
}
.cardThree {
border: 1px solid #dcdfe3;
border-radius: 4px;
padding: 20px 30px;
height: 340px;
.cardTitle {
font-size: 16px;
font-weight: 700;
color: #606266;
margin-bottom: 40px;
}
.cardChild {
width: calc(50% - 10px);
height: 174px;
border-radius: 8px;
}
}
</style>
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
size="40%" size="40%"
:before-close="handleClose" :before-close="handleClose"
> >
<template slot="title">
<div class="custom_title">{{ '检验内容' }}</div>
</template>
<el-table <el-table
v-loading="loading" v-loading="loading"
class="el-table" class="el-table"
...@@ -94,4 +97,12 @@ export default { ...@@ -94,4 +97,12 @@ export default {
.el-table { .el-table {
width: auto; width: auto;
} }
/deep/ .el-drawer__header {
margin-bottom: 0px !important;
}
.custom_title {
color: #303133 !important;
font-size: 18px;
font-weight: 400;
}
</style> </style>
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
size="40%" size="40%"
:before-close="handleClose" :before-close="handleClose"
> >
<template slot="title">
<div class="custom_title">{{ '检验内容' }}</div>
</template>
<table class="table" style="margin: 20px"> <table class="table" style="margin: 20px">
<thead> <thead>
<tr> <tr>
...@@ -98,4 +101,25 @@ export default { ...@@ -98,4 +101,25 @@ export default {
.table { .table {
width: auto; width: auto;
} }
.table thead {
background: none;
}
.table th {
color: #303133;
font-size: 14px;
font-weight: 700;
}
.table td {
color: #606266;
font-size: 14px;
font-weight: 400;
}
.custom_title {
color: #303133 !important;
font-size: 18px;
font-weight: 400;
}
/deep/ .el-drawer__header {
margin-bottom: 0px !important;
}
</style> </style>
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<div class="button-bar"> <div class="button-bar">
<page-button <page-button
v-hasPermi="['setting:standard:update']" v-hasPermi="['setting:standardTerms:content']"
icon="doc-search" icon="doc-search"
title="检验内容" title="检验内容"
@click.native="handleUpdate(scope.row)" @click.native="handleUpdate(scope.row)"
......
...@@ -74,24 +74,29 @@ ...@@ -74,24 +74,29 @@
<span>{{ scope.$index + 1 }}</span> <span>{{ scope.$index + 1 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="测试场景" align="left" prop="testScenario" /> <el-table-column
<el-table-column label="测试类型" align="left" prop="testType" /> label="测试场景"
align="left"
sortable
prop="testScenario"
/>
<el-table-column label="测试类型" align="left" sortable prop="testType" />
<el-table-column label="用例编号" align="left" prop="usecaseNo" /> <el-table-column label="用例编号" align="left" prop="usecaseNo" />
<el-table-column label="用例名称" align="left" prop="name" /> <el-table-column label="用例名称" align="left" prop="name" />
<el-table-column label="工具" align="left" prop="tools" /> <el-table-column label="工具" align="left" prop="tools" />
<el-table-column label="对应输入" align="left" prop="input" /> <el-table-column label="对应输入" align="left" prop="input" />
<el-table-column label="用例描述" align="left" prop="description" /> <el-table-column label="用例描述" align="left" prop="description" />
<el-table-column label="更新人员" align="left" prop="updateBy" /> <!-- <el-table-column label="更新人员" align="left" prop="updateBy" />-->
<el-table-column <!-- <el-table-column-->
label="更新时间" <!-- label="更新时间"-->
align="center" <!-- align="center"-->
prop="updateTime" <!-- prop="updateTime"-->
width="180" <!-- width="180"-->
> <!-- >-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span> <!-- <span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
</el-table> </el-table>
<pagination <pagination
v-show="total > 0" v-show="total > 0"
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
type="password" type="password"
auto-complete="off" auto-complete="off"
placeholder="密码" placeholder="密码"
maxlength="20"
@keyup.enter.native="handleLogin" @keyup.enter.native="handleLogin"
> >
<iconpark-icon slot="prefix" name="lock" size="20"></iconpark-icon> <iconpark-icon slot="prefix" name="lock" size="20"></iconpark-icon>
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<div class="message-list"> <div class="message-list">
<div class="message-box" style="background-color: #2eba3c"> <div class="message-box" style="background-color: #2eba3c">
<div class="message-detail"> <div class="message-detail">
<div class="detail-title">审查细则(条)</div> <div class="detail-title">测试用例(条)</div>
<div class="detail-num mt10"> <div class="detail-num mt10">
{{ model.carReviewTask.details }} {{ model.carReviewTask.details }}
</div> </div>
...@@ -61,9 +61,9 @@ ...@@ -61,9 +61,9 @@
</div> </div>
<div class="message-box" style="background-color: #477bba"> <div class="message-box" style="background-color: #477bba">
<div class="message-detail"> <div class="message-detail">
<div class="detail-title">审查细则符合率(%</div> <div class="detail-title">标准条款(条</div>
<div class="detail-num mt10"> <div class="detail-num mt10">
{{ model.carReviewTask.detailsPass }} % {{ model.carReviewTask.detailsPass }}
</div> </div>
</div> </div>
<svg-icon <svg-icon
...@@ -75,9 +75,9 @@ ...@@ -75,9 +75,9 @@
</div> </div>
<div class="message-box" style="background-color: #eca740"> <div class="message-box" style="background-color: #eca740">
<div class="message-detail"> <div class="message-detail">
<div class="detail-title">标准条款(条)</div> <div class="detail-title">测试通过率(%)</div>
<div class="detail-num mt10"> <div class="detail-num mt10">
{{ model.carReviewTask.standards }} {{ model.carReviewTask.standards }} %
</div> </div>
</div> </div>
<svg-icon <svg-icon
...@@ -89,9 +89,9 @@ ...@@ -89,9 +89,9 @@
</div> </div>
<div class="message-box" style="background-color: #47baba"> <div class="message-box" style="background-color: #47baba">
<div class="message-detail"> <div class="message-detail">
<div class="detail-title">标准条款通过率</div> <div class="detail-title">测试通过(个)</div>
<div class="detail-num mt10"> <div class="detail-num mt10">
{{ model.carReviewTask.standardsPass }} % {{ model.carReviewTask.standardsPass }}
</div> </div>
</div> </div>
<svg-icon <svg-icon
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
</div> </div>
<div class="message-box" style="background-color: #6c47ba"> <div class="message-box" style="background-color: #6c47ba">
<div class="message-detail"> <div class="message-detail">
<div class="detail-title">参与审查人数(人</div> <div class="detail-title">测试未通过(个</div>
<div class="detail-num mt10"> <div class="detail-num mt10">
{{ model.carReviewTask.person }} {{ model.carReviewTask.person }}
</div> </div>
...@@ -119,106 +119,63 @@ ...@@ -119,106 +119,63 @@
</div> </div>
</div> </div>
<!--审查表单概要--> <!--测试情况概要-->
<div> <div>
<div class="form-review-questionnaire"> <div class="form-review-questionnaire">
<div class="title-display"> <div class="title-display">
<span class="title-i"></span> <span class="title-i"></span>
<span class="title-content">审查表单概要</span> <span class="title-content">测试情况概要</span>
<div class="control-btns">
<div class="control-btn" @click="openAll()">
<icon-park
type="down-c"
theme="outline"
size="16"
style="margin-right: 5px"
fill="#303133"
/>
全部展开
</div>
<div class="control-btn" @click="closeAll()">
<icon-park
type="up-c"
theme="outline"
size="16"
style="margin-right: 5px"
fill="#303133"
/>
全部收起
</div>
</div>
</div> </div>
<!--审查表单概要--> <!--审查表单概要-->
<collapse v-model="activeNames" class="mt10">
<collapse-item
v-for="(item, key) in model.carReviewTask.standard"
:key="key"
:name="item.chapter"
>
<span slot="title" style="width: 100%">
<div class="standard-box">
<div class="standard-left">
<div class="standard">标准:</div>
<div class="standard-title">
{{ item.chapter + item.text }}
</div>
</div>
<div class="standard-result">
审查结果:
<span v-if="item.passed == 1" class="green">符合</span>
<span v-else class="orange">不符合</span>
</div>
</div>
</span>
<table class="table"> <table class="table">
<col style="width: 100px" />
<thead>
<tr> <tr>
<th>审查要点</th> <th>章节号</th>
<th>审查细则</th> <th>标准技术要求</th>
<th class="investigate-result">审查结果</th> <th>标准测试方法</th>
<th class="written-by">填写人</th> <th>测试场景</th>
<th>测试类型</th>
<th>用例编号</th>
<th>测试结果</th>
</tr> </tr>
<template v-for="(keyPoint, keyPointKey) in item.keyPointList"> </thead>
<tr :key="keyPointKey"> <tbody>
<td :rowspan="keyPoint.reviewDetailsList.length + 1"> <!-- 循环遍历 keyPointList -->
{{ keyPoint.text }} <template v-for="(i, PointIndex) in tableData.keyPointList">
<tr :key="'PointIndex1' + PointIndex">
<td align="center" :rowspan="getRows(i)">
{{ '7.1.1' }}
</td>
<td align="center" :rowspan="getRows(i)">
{{ i.text }}
</td>
<td align="center" :rowspan="getRows(i)">
{{ i.text }}
</td> </td>
</tr> </tr>
<template <!-- 循环遍历 reviewDetailsList -->
v-for="( <template v-for="(v, reviewDetailIndex) in i.reviewDetailsList">
reviewDetail, reviewDetailKey <tr
) in keyPoint.reviewDetailsList" :key="'reviewDetailIndex' + PointIndex + reviewDetailIndex"
>
<tr :key="reviewDetailKey">
<td align="center">{{ reviewDetail.text }}</td>
<td align="center" class="investigate-result">
<el-tag
v-if="reviewDetail.result.passed === 1"
size="medium"
type="success"
>符合</el-tag
>
<el-tag
v-if="reviewDetail.result.passed === 0"
size="medium"
type="danger"
>不符合</el-tag
> >
<td align="center">
{{ '测试场景' }}
</td> </td>
<td align="center" class="written-by"> <td align="center">
{{ {{ '测试类型' }}
reviewDetail.result </td>
? reviewDetail.result.userName <td align="center">
? reviewDetail.result.userName {{ '用例编号' }}
: '__' </td>
: '__' <td align="center">
}} {{ '测试结果' }}
</td> </td>
</tr> </tr>
</template> </template>
</template> </template>
</tbody>
</table> </table>
</collapse-item>
</collapse>
</div> </div>
<!--签字确认--> <!--签字确认-->
<div class="form-signature-confirmation"> <div class="form-signature-confirmation">
...@@ -265,58 +222,27 @@ ...@@ -265,58 +222,27 @@
</template> </template>
<!--js逻辑--> <!--js逻辑-->
<script> <script>
import { checkTaskDetail, carTaskSubmit, getBySubtaskId } from '@/api/task/task'
import collapse from '@/components/Collapse/collapse'
import collapseItem from '@/components/Collapse/collapse-item'
import routerMixins from '@/mixins/router' import routerMixins from '@/mixins/router'
import { getRows, getRows2 } from '../../../../utils/reviewDetailsTable'
import { listInspection } from '../../../../api/setting/standardTerms'
export default { export default {
components: { name: 'Index',
collapse: collapse,
'collapse-item': collapseItem
},
dicts: ['test_cartype_type'], dicts: ['test_cartype_type'],
mixins: [routerMixins], mixins: [routerMixins],
data() { data() {
return { return {
isShow: true, tableData: [],
task: {}, task: {},
auditRequirement: 0,
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 }
],
checkTestScenarioList: [],
model: { model: {
carReviewTask: {}, carReviewTask: {},
reviewSceneChangeTasks: {}, reviewSceneChangeTasks: {},
detailsList: [] detailsList: []
}, },
columns: [],
ruleForm: { ruleForm: {
enterpriseLeader: '', enterpriseLeader: '',
inspectionLeader: '', inspectionLeader: '',
result: [] result: []
}, },
activeNames: [],
rules: { rules: {
enterpriseLeader: [ enterpriseLeader: [
{ required: true, message: '请输入车企负责人', trigger: 'blur' } { required: true, message: '请输入车企负责人', trigger: 'blur' }
...@@ -336,96 +262,88 @@ export default { ...@@ -336,96 +262,88 @@ export default {
// await this.getTask() // await this.getTask()
// this.openAll() // this.openAll()
// }, // },
mounted() {
this.init()
},
methods: { methods: {
/** getRows,
* 获取任务详情 getRows2,
*/ /** 获取体系审查、车型审查检验内容 */
async getTask() { init() {
this.loading = true this.loading = true
const res = await checkTaskDetail({ listInspection({ id: '1744181159757221888' }).then(res => {
taskId: this.taskId this.tableData = res.data
})
this.loading = false this.loading = false
if (res.code === 200) { })
this.model = res.data
await this.getTaskDetail()
if (this.model.carReviewTask.imagesUrl) {
const imgs = this.model.carReviewTask.imagesUrl.split(',')
this.ruleForm.enterpriseLeader
? process.env.VUE_APP_IMAGE_API + imgs[0]
: ''
this.ruleForm.inspectionLeader
? process.env.VUE_APP_IMAGE_API + imgs[1]
: ''
}
} else {
this.$modal.msgError(res.msg)
}
}, },
/** /**
* 获取任务详情 * 获取任务详情
*/ */
async getTaskDetail() { // async getTask() {
const result = await getBySubtaskId({ // this.loading = true
id: this.taskId // const res = await checkTaskDetail({
}) // taskId: this.taskId
if (result.code === 200) { // })
this.task = result.data // this.loading = false
} // if (res.code === 200) {
}, // this.model = res.data
// await this.getTaskDetail()
// if (this.model.carReviewTask.imagesUrl) {
// const imgs = this.model.carReviewTask.imagesUrl.split(',')
// this.ruleForm.enterpriseLeader
// ? process.env.VUE_APP_IMAGE_API + imgs[0]
// : ''
// this.ruleForm.inspectionLeader
// ? process.env.VUE_APP_IMAGE_API + imgs[1]
// : ''
// }
// } else {
// this.$modal.msgError(res.msg)
// }
// },
/**
* 获取任务详情
*/
// async getTaskDetail() {
// const result = await getBySubtaskId({
// id: this.taskId
// })
// if (result.code === 200) {
// this.task = result.data
// }
// },
/* 返回跳转*/ /* 返回跳转*/
goToProcessedReview() { goToProcessedReview() {
// if (!this.ruleForm.enterpriseLeader) { // this.ruleForm.taskId = this.taskId
// this.$message.error('请车企负责人签字') // const formData = {
// return // imagesUrl: [
// this.ruleForm.enterpriseLeader,
// this.ruleForm.inspectionLeader
// ],
// taskId: this.taskId
// } // }
// if (!this.ruleForm.inspectionLeader) { // carTaskSubmit(formData).then(res => {
// this.$message.error('请检验负责人签字') // if (res.code === 200) {
// return // this.$modal.msgSuccess('确认提交成功')
// this.$router.push({
// path: '/processing/unprocessed-review'
// })
// } else {
// this.$modal.msgError(res.msg)
// } // }
this.ruleForm.taskId = this.taskId // })
const formData = {
imagesUrl: [
this.ruleForm.enterpriseLeader,
this.ruleForm.inspectionLeader
],
taskId: this.taskId
}
carTaskSubmit(formData).then(res => {
if (res.code === 200) {
this.$modal.msgSuccess('确认提交成功')
this.$router.push({
path: '/processing/unprocessed-review'
})
} else {
this.$modal.msgError(res.msg)
}
})
},
handleTestScenario(item) {
// 查看item.value在this.checkTestScenarioList里面存不存在
// 存在则删除
if (this.checkTestScenarioList.includes(item.value)) {
this.checkTestScenarioList.splice(
this.checkTestScenarioList.indexOf(item.label),
1
)
item.check = false
} else {
item.check = true
this.checkTestScenarioList.push(item.value)
}
console.log('李斯特', this.checkTestScenarioList)
},
openAll() {
this.activeNames = this.model.carReviewTask.standard.map(i => {
return i.chapter
})
},
closeAll() {
this.activeNames = []
} }
} }
} }
</script> </script>
<style scoped>
.form-signature-confirmation .img-item .img {
width: 50% !important;
}
.table {
margin-top: 20px;
}
.table th {
background-color: #f2f2f2 !important;
}
</style>
...@@ -152,6 +152,7 @@ import { getRows, getRows2 } from '../../../../utils/reviewDetailsTable' ...@@ -152,6 +152,7 @@ import { getRows, getRows2 } from '../../../../utils/reviewDetailsTable'
import routerMixins from '@/mixins/router' import routerMixins from '@/mixins/router'
import { listInspection } from '../../../../api/setting/standardTerms' import { listInspection } from '../../../../api/setting/standardTerms'
export default { export default {
name: 'Index',
mixins: [routerMixins], mixins: [routerMixins],
dicts: ['task_test_status'], dicts: ['task_test_status'],
data() { data() {
......
...@@ -665,6 +665,15 @@ export default { ...@@ -665,6 +665,15 @@ export default {
} }
selectSampleInfo({ id: id }).then(res => { selectSampleInfo({ id: id }).then(res => {
this.editParamsForm = res.data this.editParamsForm = res.data
const foundObject = this.componentSelect.find(
item => item.id === this.editParamsForm.manufacturingEnterpriseId
)
if (foundObject) {
this.editParamsForm.manufacturingEnterpriseId =
res.data.manufacturingEnterpriseId
} else {
this.editParamsForm.manufacturingEnterpriseId = ''
}
this.dialogVisible = true this.dialogVisible = true
}) })
this.$refs.editForm.resetFields() this.$refs.editForm.resetFields()
......
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<div class="button-bar"> <div class="button-bar">
<page-button <page-button
v-hasPermi="['setting:standard:update']" v-hasPermi="['setting:standardTerms:content']"
icon="doc-search" icon="doc-search"
title="检验内容" title="检验内容"
@click.native="handleUpdate(scope.row)" @click.native="handleUpdate(scope.row)"
......
...@@ -85,18 +85,18 @@ ...@@ -85,18 +85,18 @@
<el-table-column label="工具" align="left" prop="tools" /> <el-table-column label="工具" align="left" prop="tools" />
<el-table-column label="对应输入" align="left" prop="input" /> <el-table-column label="对应输入" align="left" prop="input" />
<el-table-column label="用例描述" align="left" prop="description" /> <el-table-column label="用例描述" align="left" prop="description" />
<el-table-column label="更新人员" align="left" prop="updateBy" /> <!-- <el-table-column label="更新人员" align="left" prop="updateBy" />-->
<el-table-column <!-- <el-table-column-->
label="更新时间" <!-- label="更新时间"-->
sortable <!-- sortable-->
align="left" <!-- align="left"-->
prop="updateTime" <!-- prop="updateTime"-->
width="180" <!-- width="180"-->
> <!-- >-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span> <!-- <span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
</el-table> </el-table>
<pagination <pagination
v-show="total > 0" v-show="total > 0"
......
...@@ -598,9 +598,9 @@ export default { ...@@ -598,9 +598,9 @@ export default {
password: [ password: [
{ required: true, message: '用户密码不能为空', trigger: 'blur' }, { required: true, message: '用户密码不能为空', trigger: 'blur' },
{ {
min: 5, min: 6,
max: 20, max: 20,
message: '用户密码长度必须介于 5 和 20 之间', message: '用户密码长度必须介于 6 和 20 之间',
trigger: 'blur' trigger: 'blur'
} }
], ],
......
...@@ -335,8 +335,9 @@ export default { ...@@ -335,8 +335,9 @@ export default {
taskCreateRequest: { taskCreateRequest: {
standardId: '', // 检验依据 standardId: '', // 检验依据
taskList: [], // 选择的任务(检查项目) taskList: [], // 选择的任务(检查项目)
testScenarioList: [], // 选择的测试场景
taskNo: '', // 任务编号 taskNo: '', // 任务编号
taskName: '', // 任务名称 taskName: '', // 任务名称测试
confidentialityLevel: '', // 保密等级 confidentialityLevel: '', // 保密等级
productName: '', // 产品名称 productName: '', // 产品名称
productModel: '', // 车辆型号 productModel: '', // 车辆型号
...@@ -413,29 +414,29 @@ export default { ...@@ -413,29 +414,29 @@ export default {
// 小组成员回显数据 // 小组成员回显数据
tableData: [], tableData: [],
inspectionItemList: [], inspectionItemList: [],
testScenarioList: [ // testScenarioList: [
{ value: 0, label: 'TBOX-蜂窝以太网接口', check: false }, // { value: 0, label: 'TBOX-蜂窝以太网接口', check: false },
{ value: 1, label: 'WiFi AP接口', check: false }, // { value: 1, label: 'WiFi AP接口', check: false },
{ value: 2, label: 'WiFi Client接口', check: false }, // { value: 2, label: 'WiFi Client接口', check: false },
{ value: 3, label: '充电以太网接口', check: false }, // { value: 3, label: '充电以太网接口', check: false },
{ value: 4, label: 'CAN 诊断接口(OBD)', check: false }, // { value: 4, label: 'CAN 诊断接口(OBD)', check: false },
{ value: 5, label: '以太网诊断接口(OBD)', check: false }, // { value: 5, label: '以太网诊断接口(OBD)', check: false },
{ value: 6, label: '车载摄像头以太网接口(无线)', check: false }, // { value: 6, label: '车载摄像头以太网接口(无线)', check: false },
{ value: 7, label: '第三方应用软件', check: false }, // { value: 7, label: '第三方应用软件', check: false },
{ value: 8, label: '远程控车应用', check: false }, // { value: 8, label: '远程控车应用', check: false },
{ value: 9, label: 'USB接口', check: false }, // { value: 9, label: 'USB接口', check: false },
{ value: 10, label: 'XCB标定', check: false }, // { value: 10, label: 'XCB标定', check: false },
{ value: 11, label: 'CCP标定', check: false }, // { value: 11, label: 'CCP标定', check: false },
{ value: 12, label: '安全启动', check: false }, // { value: 12, label: '安全启动', check: false },
{ value: 13, label: '远程控车', check: false }, // { value: 13, label: '远程控车', check: false },
{ value: 14, label: 'V2X', check: false }, // { value: 14, label: 'V2X', check: false },
{ value: 15, label: 'BT', check: false }, // { value: 15, label: 'BT', check: false },
{ value: 16, label: 'BLE', check: false }, // { value: 16, label: 'BLE', check: false },
{ value: 17, label: 'NFC', check: false }, // { value: 17, label: 'NFC', check: false },
{ value: 18, label: '射频钥匙', check: false }, // { value: 18, label: '射频钥匙', check: false },
{ value: 19, label: '软件升级', check: false }, // { value: 19, label: '软件升级', check: false },
{ value: 20, label: 'ECU固件', check: false } // { value: 20, label: 'ECU固件', check: false }
], // ],
rules: { rules: {
testScenarioList: [ testScenarioList: [
{ {
...@@ -600,6 +601,7 @@ export default { ...@@ -600,6 +601,7 @@ export default {
} }
}, },
created() { created() {
this.$store.dispatch('testScenario/setTestScenarioList')
// 对字典:inspection_item, 做处理 // 对字典:inspection_item, 做处理
this.getUserByRole() this.getUserByRole()
// this.initWebSocket() // this.initWebSocket()
...@@ -612,7 +614,7 @@ export default { ...@@ -612,7 +614,7 @@ export default {
this.$store.dispatch('standard/setStandardList') this.$store.dispatch('standard/setStandardList')
}, },
computed: { computed: {
...mapGetters(['standard', 'standardList']) ...mapGetters(['standard', 'standardList', 'testScenarioList'])
}, },
// destroyed() { // destroyed() {
// this.websock.close() // 离开路由之后断开websocket连接 // this.websock.close() // 离开路由之后断开websocket连接
...@@ -639,6 +641,15 @@ export default { ...@@ -639,6 +641,15 @@ export default {
this.model[key] = this.taskDetail[key] 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 this.tableData = this.taskDetail.auditors
console.log('ddd', this.tableData) console.log('ddd', this.tableData)
...@@ -910,7 +921,7 @@ export default { ...@@ -910,7 +921,7 @@ export default {
handleTestScenario(item) { handleTestScenario(item) {
if (this.model.testScenarioList.includes(item.value)) { if (this.model.testScenarioList.includes(item.value)) {
this.model.testScenarioList.splice( this.model.testScenarioList.splice(
this.model.testScenarioList.indexOf(item.label), this.model.testScenarioList.indexOf(item.value),
1 1
) )
item.check = false item.check = false
......
...@@ -338,6 +338,7 @@ export default { ...@@ -338,6 +338,7 @@ export default {
taskCreateRequest: { taskCreateRequest: {
standardId: '', // 检验依据 standardId: '', // 检验依据
taskList: [], // 选择的任务(检查项目) taskList: [], // 选择的任务(检查项目)
testScenarioList: [], // 选择的测试场景
taskNo: '', // 任务编号 taskNo: '', // 任务编号
taskName: '', // 任务名称 taskName: '', // 任务名称
confidentialityLevel: '', // 保密等级 confidentialityLevel: '', // 保密等级
...@@ -424,29 +425,7 @@ export default { ...@@ -424,29 +425,7 @@ export default {
// { value: 1, label: '汽车信息安全一般要求', check: false }, // { value: 1, label: '汽车信息安全一般要求', check: false },
// { value: 2, label: '汽车信息安全技术要求', check: false } // { value: 2, label: '汽车信息安全技术要求', check: false }
], ],
testScenarioList: [ // 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: { rules: {
testScenarioList: [ testScenarioList: [
{ {
...@@ -617,9 +596,7 @@ export default { ...@@ -617,9 +596,7 @@ export default {
} }
}, },
created() { created() {
setTimeout(() => { this.$store.dispatch('testScenario/setTestScenarioList')
console.log('standardList', this.standardList)
}, 3000)
// 对字典:inspection_item, 做处理 // 对字典:inspection_item, 做处理
this.getUserByRole() this.getUserByRole()
// this.initWebSocket() // this.initWebSocket()
...@@ -632,7 +609,7 @@ export default { ...@@ -632,7 +609,7 @@ export default {
this.$store.dispatch('standard/setStandardList') this.$store.dispatch('standard/setStandardList')
}, },
computed: { computed: {
...mapGetters(['standard', 'standardList']) ...mapGetters(['standard', 'standardList', 'testScenarioList'])
}, },
// destroyed() { // destroyed() {
// this.websock.close() // 离开路由之后断开websocket连接 // this.websock.close() // 离开路由之后断开websocket连接
...@@ -735,6 +712,16 @@ export default { ...@@ -735,6 +712,16 @@ export default {
item.check = true 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) console.log('检验项目', this.inspectionItemList)
// 把detail转到model里(任务信息) // 把detail转到model里(任务信息)
for (const key in this.taskTemporaryStorage) { for (const key in this.taskTemporaryStorage) {
...@@ -930,7 +917,7 @@ export default { ...@@ -930,7 +917,7 @@ export default {
handleTestScenario(item) { handleTestScenario(item) {
if (this.model.testScenarioList.includes(item.value)) { if (this.model.testScenarioList.includes(item.value)) {
this.model.testScenarioList.splice( this.model.testScenarioList.splice(
this.model.testScenarioList.indexOf(item.label), this.model.testScenarioList.indexOf(item.value),
1 1
) )
item.check = false item.check = false
......
...@@ -353,39 +353,9 @@ export default { ...@@ -353,39 +353,9 @@ export default {
}, },
loading: false, loading: false,
// 小组成员回显数据 // 小组成员回显数据
tableData: [ tableData: [],
// { nickName: '老二', role: '组员', dept: '第一部门', disabled: true }, inspectionItemList: [],
// { nickName: '老三', role: '组员', dept: '第一部门', disabled: true }, // testScenarioList: [],
// { nickName: '老大', role: '组长', dept: '第一部门', disabled: true }
],
inspectionItemList: [
// { value: 0, label: '汽车信息安全管理体系要求', check: false },
// { 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 }
],
rules: { rules: {
testScenarioList: [ testScenarioList: [
{ {
...@@ -471,13 +441,7 @@ export default { ...@@ -471,13 +441,7 @@ export default {
{ required: true, message: '检验项目不能为空', trigger: 'change' } { required: true, message: '检验项目不能为空', trigger: 'change' }
] ]
}, },
userList: [ userList: [],
// { nickName: '老大', role: '组长', dept: '第一部门', disabled: true },
// { nickName: '老二', role: '组员', dept: '第一部门', disabled: true },
// { nickName: '老三', role: '组员', dept: '第一部门', disabled: true },
// { nickName: '老四', role: '组员', dept: '第一部门', disabled: false },
// { nickName: '老五', role: '组员', dept: '第一部门', disabled: false }
],
imageUrl: '', imageUrl: '',
productionEnterpriseList: [ productionEnterpriseList: [
{ {
...@@ -553,20 +517,12 @@ export default { ...@@ -553,20 +517,12 @@ export default {
}, },
created() { created() {
// 接收路由传参 // 接收路由传参
this.$store.dispatch('standard/setStandardList') this.$store.dispatch('testScenario/setTestScenarioList')
this.getInspectionItemDict() this.getInspectionItemDict()
// 对字典:inspection_item, 做处理 this.$store.dispatch('standard/setStandardList')
// // 查询样品信息(整车、零件)
// this.getSampleInformation()
// this.getUserByRole()
// this.getManufacturer()
// this.$nextTick(() => {
// this.leaderTop()
// this.rowDrop()
// })
}, },
computed: { computed: {
...mapGetters(['standard', 'standardList']) ...mapGetters(['standard', 'standardList', 'testScenarioList'])
}, },
methods: { methods: {
getTaskDetail(taskId) { getTaskDetail(taskId) {
...@@ -580,6 +536,14 @@ export default { ...@@ -580,6 +536,14 @@ export default {
item.check = true 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) console.log('检验项目', this.inspectionItemList)
// 把detail转到model里(任务信息) // 把detail转到model里(任务信息)
for (const key in this.taskDetail) { for (const key in this.taskDetail) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment