Commit 2580123a authored by 盖献康's avatar 盖献康

Merge branch 'develop' of http://gitlab.91isoft.com:90/car-test/web into developer/gaixiankang

parents 155a4121 d84068ed
import request from '@/utils/request'
export function testDetail(data) {
return request({
url: '/car/test/task/getById',
method: 'post',
data
})
}
......@@ -130,10 +130,12 @@ export default {
// 上传前loading加载
handleBeforeUpload(file) {
if (file.name) {
const regex = /[\s~`!@#$%^&*()\-_=+[\]{}|;:'",<>/?]/
// const regex = /[\s~`!@#$%^&*()\-_=+[\]{}|;:'",<>/?]/
const regex = /[~`!@#$%^&*=[\]{}|;:'",<>/?]/
const result = regex.test(file.name)
if (result === true) {
this.fileList = []
// this.$refs.imageUpload.clearFiles()
this.$modal.msgError('文件名称不正确,请上传不包含特殊字符名称的图片')
} else if (result === false) {
let isImg = false
......
......@@ -10,6 +10,19 @@ export function getRows(i) {
return n + 1
}
/**
* 根据章节号合并单元格
* @param {*} i 章节号
*/
export function getRows3(i) {
let n = 0
if (i.testCaseList) {
n = i.testCaseList.length
}
return n + 1
}
/**
* 根据要求合并单元格
* @param {*} i 标准要求
......
......@@ -28,13 +28,14 @@ export default {
}
},
tooltip: {
name: '用例测试类型概览',
trigger: 'item',
axisPointer: {
type: 'shadow'
}
},
legend: {},
legend: {
show: false
},
grid: {
left: '1%',
right: '4%',
......@@ -51,6 +52,7 @@ export default {
},
series: [
{
name: '用例测试类型概览',
type: 'bar',
barWidth: '20',
data: [
......
......@@ -145,7 +145,10 @@
height: 149px;
"
>
<div class="dangerousCard" style="background: #f1f5f9">
<div
class="dangerousCard"
style="background: rgba(230, 88, 104, 0.08)"
>
<div class="lineOne">高危</div>
<div>高危</div>
<div class="lineLast">83</div>
......
......@@ -50,7 +50,6 @@
<!--查看试验方案列表-->
<div>
<div class="form-review-questionnaire">
<!--查看试验方案列表-->
<table class="table">
<col style="width: 100px" />
<thead>
......@@ -68,60 +67,40 @@
</tr>
</thead>
<tbody>
<!-- 循环遍历 keyPointList -->
<template v-for="(i, PointIndex) in tableData.keyPointList">
<template v-for="(i, PointIndex) in tableData">
<tr :key="'PointIndex1' + PointIndex">
<td align="center" :rowspan="getRows(i)">
{{ '7.1.1' }}
<td align="center" :rowspan="getRows3(i)">
{{ i.chapter }}
</td>
<td align="center" :rowspan="getRows(i)">
<td align="center" :rowspan="getRows3(i)">
{{ i.text }}
</td>
<td align="center" :rowspan="getRows(i)">
{{ i.text }}
<td align="center" :rowspan="getRows3(i)">
{{ i.testMethod }}
</td>
</tr>
<!-- 循环遍历 reviewDetailsList -->
<template v-for="(v, reviewDetailIndex) in i.reviewDetailsList">
<tr
:key="'reviewDetailIndex' + PointIndex + reviewDetailIndex"
>
<td align="center">
{{ '测试场景' }}
<template v-for="(v, testCaseIndex) in i.testCaseList">
<tr :key="'testCaseIndex' + PointIndex + testCaseIndex">
<td align="center" rowspan="1">
{{ v.testScenario }}
</td>
<td align="center">
{{ '测试类型' }}
<td align="center" rowspan="1">
{{ v.testType }}
</td>
<td align="center">
{{ '用例编号' }}
<td align="center" rowspan="1">
{{ v.usecaseNo }}
</td>
<td align="center">
{{ '用例名称' }}
<td align="center" rowspan="1">
{{ v.name }}
</td>
<td align="center">
{{ '工具' }}
<td align="center" rowspan="1">
{{ v.tools }}
</td>
<td align="center">
{{ v.text }}
<td align="center" rowspan="1">
{{ v.input }}
</td>
<td align="center">
<template
v-for="(a, reviewSceneIndex) in v.reviewSceneList"
>
<div
:key="
'reviewSceneIndex' +
PointIndex +
reviewDetailIndex +
reviewSceneIndex
"
>
<span>{{
reviewSceneIndex + 1 + '、' + a.text
}}</span>
<br />
</div>
</template>
<td align="center" rowspan="1">
{{ v.description }}
</td>
</tr>
</template>
......@@ -148,9 +127,10 @@
</template>
<!--js逻辑-->
<script>
import { getRows, getRows2 } from '../../../../utils/reviewDetailsTable'
import { getRows3 } from '../../../../utils/reviewDetailsTable'
import routerMixins from '@/mixins/router'
import { listInspection } from '../../../../api/setting/standardTerms'
import { testDetail } from '../../../../api/task/test'
import { getBySubtaskId } from '../../../../api/task/task'
export default {
name: 'Index',
mixins: [routerMixins],
......@@ -169,39 +149,22 @@ export default {
}
},
mounted() {
this.init()
this.getTestDetail()
this.getTest()
},
methods: {
/**
* 获取任务详情
*/
async getTest() {
// this.loading = true
// const res = await reviewTaskDetail({
// taskId: '1767377960098127873'
// })
// this.loading = false
// if (res.code === 200) {
// await this.getTaskDetail()
// this.model = res.data
// } else {
// this.$modal.msgError(res.msg)
// }
getRows3,
getTest() {
getBySubtaskId({ taskId: '1768527384203460609' }).then(res => {
if (res === 200) {
this.task = res.data
}
})
},
// async getTaskDetail() {
// const result = await getBySubtaskId({
// id: '1767377960098127873'
// })
// if (result.code === 200) {
// this.task = result.data
// }
// }
getRows,
getRows2,
/** 获取体系审查、车型审查检验内容 */
init() {
/** 获取任务详情 */
getTestDetail() {
this.loading = true
listInspection({ id: '1744181159757221888' }).then(res => {
testDetail({ taskId: '1768527384203460609' }).then(res => {
this.tableData = res.data
this.loading = false
})
......
......@@ -98,13 +98,9 @@
min-width="200"
>
<template slot-scope="scope">
<el-link
type="primary"
:underline="false"
class="custom-link"
@click="clickSampleName(scope.row)"
>{{ scope.row.sampleName }}</el-link
>
<div class="custom-link" @click="clickSampleName(scope.row)">
{{ scope.row.sampleName }}
</div>
</template>
</el-table-column>
<el-table-column
......@@ -711,7 +707,15 @@ export default {
justify-content: flex-end;
margin-right: 20px;
}
.custom-link {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: #1a6fd7;
}
.custom-link:hover {
text-decoration: underline;
cursor: pointer;
}
</style>
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