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 @@
<div class="component-upload-image">
<el-upload
multiple
:auto-upload="true"
:action="uploadImgUrl"
list-type="picture-card"
:on-success="handleUploadSuccess"
......@@ -128,36 +129,45 @@ export default {
methods: {
// 上传前loading加载
handleBeforeUpload(file) {
let isImg = false
if (this.fileType.length) {
let fileExtension = ''
if (file.name.lastIndexOf('.') > -1) {
fileExtension = file.name.slice(file.name.lastIndexOf('.') + 1)
}
isImg = this.fileType.some(type => {
if (file.type.indexOf(type) > -1) return true
if (fileExtension && fileExtension.indexOf(type) > -1) return true
return false
})
} else {
isImg = file.type.indexOf('image') > -1
}
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
if (this.fileType.length) {
let fileExtension = ''
if (file.name.lastIndexOf('.') > -1) {
fileExtension = file.name.slice(file.name.lastIndexOf('.') + 1)
}
isImg = this.fileType.some(type => {
if (file.type.indexOf(type) > -1) return true
if (fileExtension && fileExtension.indexOf(type) > -1) return true
return false
})
} else {
isImg = file.type.indexOf('image') > -1
}
if (!isImg) {
this.$modal.msgError(
`文件格式不正确, 请上传${this.fileType.join('/')}图片格式文件!`
)
return false
}
if (this.fileSize) {
const isLt = file.size / 1024 / 1024 < this.fileSize
if (!isLt) {
this.$modal.msgError(`上传图片大小不能超过 ${this.fileSize} MB!`)
return false
if (!isImg) {
this.$modal.msgError(
`文件格式不正确, 请上传${this.fileType.join('/')}图片格式文件!`
)
return false
}
if (this.fileSize) {
const isLt = file.size / 1024 / 1024 < this.fileSize
if (!isLt) {
this.$modal.msgError(`上传图片大小不能超过 ${this.fileSize} MB!`)
return false
}
}
this.$modal.loading('正在上传图片,请稍候...')
this.number++
}
}
this.$modal.loading('正在上传图片,请稍候...')
this.number++
},
// 文件个数超出
handleExceed() {
......
......@@ -129,6 +129,10 @@ import VueApollo from 'vue-apollo'
// 全局使用
Vue.use(VueApollo);
// 全局导入Echarts
import * as echarts from 'echarts'
Vue.prototype.$echarts = echarts
// 请求graphql使用的apollo API
const apolloClient = new ApolloClient({
// 服务端Url
......
......@@ -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
......@@ -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
})
......
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>
<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>
<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 {
name: 'HomePage',
components: {
UseCaseTest,
UseCaseRisk,
ConfidentialityTasks,
StandardClassification
},
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>
<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 @@
size="40%"
:before-close="handleClose"
>
<template slot="title">
<div class="custom_title">{{ '检验内容' }}</div>
</template>
<el-table
v-loading="loading"
class="el-table"
......@@ -94,4 +97,12 @@ export default {
.el-table {
width: auto;
}
/deep/ .el-drawer__header {
margin-bottom: 0px !important;
}
.custom_title {
color: #303133 !important;
font-size: 18px;
font-weight: 400;
}
</style>
......@@ -6,6 +6,9 @@
size="40%"
:before-close="handleClose"
>
<template slot="title">
<div class="custom_title">{{ '检验内容' }}</div>
</template>
<table class="table" style="margin: 20px">
<thead>
<tr>
......@@ -98,4 +101,25 @@ export default {
.table {
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>
......@@ -100,7 +100,7 @@
<template slot-scope="scope">
<div class="button-bar">
<page-button
v-hasPermi="['setting:standard:update']"
v-hasPermi="['setting:standardTerms:content']"
icon="doc-search"
title="检验内容"
@click.native="handleUpdate(scope.row)"
......
......@@ -74,24 +74,29 @@
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="测试场景" align="left" prop="testScenario" />
<el-table-column label="测试类型" align="left" prop="testType" />
<el-table-column
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="name" />
<el-table-column label="工具" align="left" prop="tools" />
<el-table-column label="对应输入" align="left" prop="input" />
<el-table-column label="用例描述" align="left" prop="description" />
<el-table-column label="更新人员" align="left" prop="updateBy" />
<el-table-column
label="更新时间"
align="center"
prop="updateTime"
width="180"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="更新人员" align="left" prop="updateBy" />-->
<!-- <el-table-column-->
<!-- label="更新时间"-->
<!-- align="center"-->
<!-- prop="updateTime"-->
<!-- width="180"-->
<!-- >-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<pagination
v-show="total > 0"
......
......@@ -26,6 +26,7 @@
type="password"
auto-complete="off"
placeholder="密码"
maxlength="20"
@keyup.enter.native="handleLogin"
>
<iconpark-icon slot="prefix" name="lock" size="20"></iconpark-icon>
......
......@@ -152,6 +152,7 @@ import { getRows, getRows2 } from '../../../../utils/reviewDetailsTable'
import routerMixins from '@/mixins/router'
import { listInspection } from '../../../../api/setting/standardTerms'
export default {
name: 'Index',
mixins: [routerMixins],
dicts: ['task_test_status'],
data() {
......
......@@ -665,6 +665,15 @@ export default {
}
selectSampleInfo({ id: id }).then(res => {
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.$refs.editForm.resetFields()
......
......@@ -99,7 +99,7 @@
<template slot-scope="scope">
<div class="button-bar">
<page-button
v-hasPermi="['setting:standard:update']"
v-hasPermi="['setting:standardTerms:content']"
icon="doc-search"
title="检验内容"
@click.native="handleUpdate(scope.row)"
......
......@@ -85,18 +85,18 @@
<el-table-column label="工具" align="left" prop="tools" />
<el-table-column label="对应输入" align="left" prop="input" />
<el-table-column label="用例描述" align="left" prop="description" />
<el-table-column label="更新人员" align="left" prop="updateBy" />
<el-table-column
label="更新时间"
sortable
align="left"
prop="updateTime"
width="180"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="更新人员" align="left" prop="updateBy" />-->
<!-- <el-table-column-->
<!-- label="更新时间"-->
<!-- sortable-->
<!-- align="left"-->
<!-- prop="updateTime"-->
<!-- width="180"-->
<!-- >-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<pagination
v-show="total > 0"
......
......@@ -598,9 +598,9 @@ export default {
password: [
{ required: true, message: '用户密码不能为空', trigger: 'blur' },
{
min: 5,
min: 6,
max: 20,
message: '用户密码长度必须介于 5 和 20 之间',
message: '用户密码长度必须介于 6 和 20 之间',
trigger: 'blur'
}
],
......
......@@ -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
......
......@@ -338,6 +338,7 @@ export default {
taskCreateRequest: {
standardId: '', // 检验依据
taskList: [], // 选择的任务(检查项目)
testScenarioList: [], // 选择的测试场景
taskNo: '', // 任务编号
taskName: '', // 任务名称
confidentialityLevel: '', // 保密等级
......@@ -424,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: [
{
......@@ -617,9 +596,7 @@ export default {
}
},
created() {
setTimeout(() => {
console.log('standardList', this.standardList)
}, 3000)
this.$store.dispatch('testScenario/setTestScenarioList')
// 对字典:inspection_item, 做处理
this.getUserByRole()
// this.initWebSocket()
......@@ -632,7 +609,7 @@ export default {
this.$store.dispatch('standard/setStandardList')
},
computed: {
...mapGetters(['standard', 'standardList'])
...mapGetters(['standard', 'standardList', 'testScenarioList'])
},
// destroyed() {
// this.websock.close() // 离开路由之后断开websocket连接
......@@ -735,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) {
......@@ -930,7 +917,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
......
......@@ -353,39 +353,9 @@ export default {
},
loading: false,
// 小组成员回显数据
tableData: [
// { nickName: '老二', role: '组员', dept: '第一部门', disabled: true },
// { nickName: '老三', role: '组员', dept: '第一部门', disabled: true },
// { 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 }
],
tableData: [],
inspectionItemList: [],
// testScenarioList: [],
rules: {
testScenarioList: [
{
......@@ -471,13 +441,7 @@ export default {
{ required: true, message: '检验项目不能为空', trigger: 'change' }
]
},
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 }
],
userList: [],
imageUrl: '',
productionEnterpriseList: [
{
......@@ -553,20 +517,12 @@ export default {
},
created() {
// 接收路由传参
this.$store.dispatch('standard/setStandardList')
this.$store.dispatch('testScenario/setTestScenarioList')
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) {
......@@ -580,6 +536,14 @@ export default {
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) {
......
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