|
@@ -1,9 +1,12 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<section class="main-section">
|
|
|
- <div class="el-main-title">
|
|
|
- <div class="title-left-icon" />
|
|
|
- <div class="title-left-name">提测报告</div>
|
|
|
+ <div class="Layout_space_between">
|
|
|
+ <div class="el-main-title">
|
|
|
+ <div class="title-left-icon" />
|
|
|
+ <div class="title-left-name">提测报告</div>
|
|
|
+ </div>
|
|
|
+ <el-button class="task-report-btn" type="text" @click="getTest(10086)">{{ dataStatus?'查看历史':"回到最新" }}</el-button>
|
|
|
</div>
|
|
|
<div class="detail-info">
|
|
|
<el-table
|
|
@@ -15,7 +18,8 @@
|
|
|
>
|
|
|
<el-table-column label="标题名称" min-width="120">
|
|
|
<template slot-scope="scope">
|
|
|
- <a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(scope.row, 2)">{{ scope.row.name }}</a>
|
|
|
+ <a v-if="dataStatus" href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(scope.row, 2)">{{ scope.row.reportName }}</a>
|
|
|
+ <a v-if="!dataStatus" href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(scope.row, 2)">{{ scope.row.name }}</a>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="状态" min-width="100" align="center">
|
|
@@ -24,12 +28,15 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="创建人" min-width="100" align="center">
|
|
|
- <template slot-scope="scope">{{ scope.row.createrObject.name }}</template>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="dataStatus">{{ scope.row.creatorObject === null ? '' : scope.row.creatorObject.name }}</span>
|
|
|
+ <span v-if="!dataStatus">{{ scope.row.createrObject.name }}</span>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="创建日期" min-width="100" align="center">
|
|
|
<template slot-scope="scope">{{ scope.row.gmtCreate }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" width="200">
|
|
|
+ <el-table-column v-if="dataStatus" label="操作" width="200">
|
|
|
<template slot-scope="scope">
|
|
|
<div v-if="scope.row.status === 1 ? false : true">
|
|
|
<span v-if="scope.row.status === 3 ? true : false" class="btn" @click="back(1,scope.row.id, scope.row)">通过</span>
|
|
@@ -71,9 +78,12 @@
|
|
|
</div>
|
|
|
</section>
|
|
|
<section class="main-section">
|
|
|
- <div class="el-main-title">
|
|
|
- <div class="title-left-icon" />
|
|
|
- <div class="title-left-name">测试日报</div>
|
|
|
+ <div class="Layout_space_between">
|
|
|
+ <div class="el-main-title">
|
|
|
+ <div class="title-left-icon" />
|
|
|
+ <div class="title-left-name">测试日报</div>
|
|
|
+ </div>
|
|
|
+ <el-button class="task-report-btn" type="text" @click="getDaily(10011)">{{ dailyDataStatus?'查看历史':"回到最新" }}</el-button>
|
|
|
</div>
|
|
|
<div class="detail-info">
|
|
|
<el-table :data="dailyData" size="small" :header-cell-style="{ color: 'rgb(74, 74, 74)', fontSize: '14px', fontWeight: '500' }" show-overflow-tooltip="true">
|
|
@@ -86,12 +96,15 @@
|
|
|
<template slot-scope="scope">{{ scope.row.statusString }}</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="创建人" min-width="100" align="center">
|
|
|
- <template slot-scope="scope">{{ scope.row.createrObject.name }}</template>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="dailyDataStatus">{{ !scope.row.createrObject? '':scope.row.createrObject.name }}</span>
|
|
|
+ <span v-if="!dailyDataStatus">{{ scope.row.createrObject.name }}</span>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="创建日期" min-width="100" align="center">
|
|
|
<template slot-scope="scope">{{ scope.row.gmtCreate }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" width="200">
|
|
|
+ <el-table-column v-if="dailyDataStatus" label="操作" width="200">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
<span v-if="scope.row.status === 0 ? true : false" class="btn" @click="dailyButtom(5,scope.row.id, scope.row)">发送</span>
|
|
@@ -131,9 +144,12 @@
|
|
|
</div>
|
|
|
</section>
|
|
|
<section class="main-section">
|
|
|
- <div class="el-main-title">
|
|
|
- <div class="title-left-icon" />
|
|
|
- <div class="title-left-name">准出报告</div>
|
|
|
+ <div class="Layout_space_between">
|
|
|
+ <div class="el-main-title">
|
|
|
+ <div class="title-left-icon" />
|
|
|
+ <div class="title-left-name">准出报告</div>
|
|
|
+ </div>
|
|
|
+ <el-button class="task-report-btn" type="text" @click="getClient(10000)">{{ releaseDataStatus?'查看历史':"回到最新" }}</el-button>
|
|
|
</div>
|
|
|
<div class="detail-info">
|
|
|
<el-table :data="clientData" size="small" :header-cell-style="{ color: 'rgb(74, 74, 74)', fontSize: '14px', fontWeight: '500' }" show-overflow-tooltip="true">
|
|
@@ -143,15 +159,21 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="状态" min-width="100" align="center">
|
|
|
- <template slot-scope="scope">{{ scope.row.reportStatusString }}</template>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="!releaseDataStatus">{{ scope.row.reportStatusString }}</span>
|
|
|
+ <span v-if="releaseDataStatus">{{ scope.row.statusString }}</span>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="创建人" min-width="100" align="center">
|
|
|
- <template slot-scope="scope">{{ scope.row.createrObject.name }}</template>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="!releaseDataStatus">{{ scope.row.createrObject.name }}</span>
|
|
|
+ <span v-if="releaseDataStatus">{{ scope.row.creatorObject === null ? '' :scope.row.creatorObject.name }}</span>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="创建日期" min-width="100" align="center">
|
|
|
<template slot-scope="scope">{{ scope.row.gmtCreate }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" width="200">
|
|
|
+ <el-table-column v-if="releaseDataStatus" label="操作" width="200">
|
|
|
<template slot-scope="scope">
|
|
|
<div v-if="scope.row.status === 1 ? false : true">
|
|
|
<span v-if="scope.row.status === 2 ? true : false" class="btn" @click="clientButtom(5,scope.row.id, scope.row)">发送</span>
|
|
@@ -202,11 +224,13 @@ import {
|
|
|
launchTest,
|
|
|
launchTestDelete
|
|
|
} from '@/api/taskIndex' // ajax
|
|
|
+import '@/styles/PublicStyle/index.scss'
|
|
|
import TestReport from '@/views/reportManagement/components/TestingReport' // 提测
|
|
|
import DailyReport from '@/views/reportManagement/components/DailyReport' // 日报
|
|
|
import ReleaseReport from '@/views/reportManagement/components/ReleaseReport' // 准出
|
|
|
import { dailyReportDelete, projectTestReportDelete } from '@/api/testPresentetion' // 日报
|
|
|
import { launchTestUpdate } from '@/api/InterfaceReport'
|
|
|
+import { reportdelivertestList, reportreleaseList, dailyReportListV2 } from '@/api/reportTemplate'
|
|
|
export default {
|
|
|
components: {
|
|
|
TestReport,
|
|
@@ -219,6 +243,9 @@ export default {
|
|
|
userNames: localStorage.getItem('realname'),
|
|
|
taskId: Number(this.$route.query.id), // 任务id
|
|
|
stColors: ['#409EFF', '#07BCA4', '#F56C6C', '#07BCA4'],
|
|
|
+ dataStatus: true, // 数据状态
|
|
|
+ releaseDataStatus: true, // 准出
|
|
|
+ dailyDataStatus: true, // 日报
|
|
|
dialog_testData: false, // 打回弹窗
|
|
|
dialog_daily: false, // 测试报告dialog
|
|
|
dialog_client: false, // 准出报告dialog
|
|
@@ -257,28 +284,58 @@ export default {
|
|
|
this.getClient()
|
|
|
},
|
|
|
methods: {
|
|
|
- async getTest() { // 获取提测
|
|
|
- const params = { taskId: this.taskId, curIndex: this.testPages.curIndex, pageSize: this.testPages.pageSize }
|
|
|
- const res = await launchTest(params)
|
|
|
- if (res.code === 200) {
|
|
|
- this.testData = res.data.list
|
|
|
- this.testPages.total = res.data.total
|
|
|
+ async getTest(val) { // 获取提测
|
|
|
+ val === 10086 ? this.dataStatus = !this.dataStatus : ''
|
|
|
+ if (this.dataStatus) {
|
|
|
+ const data = { taskId: this.taskId, bizId: localStorage.getItem('bizId'), curIndex: this.testPages.curIndex, pageSize: this.testPages.pageSize }
|
|
|
+ const res = await reportdelivertestList(data)
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.testData = res.data.list
|
|
|
+ this.testPages.total = res.data.total
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ const params = { taskId: this.taskId, curIndex: this.testPages.curIndex, pageSize: this.testPages.pageSize }
|
|
|
+ const res = await launchTest(params)
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.testData = res.data.list
|
|
|
+ this.testPages.total = res.data.total
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
- async getDaily() { // 获取日报
|
|
|
- const params = { taskId: this.taskId, curIndex: this.dailyPages.curIndex, pageSize: this.dailyPages.pageSize }
|
|
|
- const res = await dailyReport(params)
|
|
|
- if (res.code === 200) {
|
|
|
- this.dailyData = res.data.list
|
|
|
- this.dailyPages.total = res.data.total
|
|
|
+ async getDaily(val) { // 获取日报
|
|
|
+ val === 10011 ? this.dailyDataStatus = !this.dailyDataStatus : ''
|
|
|
+ if (this.dailyDataStatus) {
|
|
|
+ const indexPage = { taskId: this.taskId, bizId: localStorage.getItem('bizId'), curIndex: this.clientPages.curIndex, pageSize: this.clientPages.pageSize }
|
|
|
+ const res = await dailyReportListV2(indexPage)
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.dailyData = res.data
|
|
|
+ this.dailyPages.total = res.total
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ const params = { taskId: this.taskId, curIndex: this.dailyPages.curIndex, pageSize: this.dailyPages.pageSize }
|
|
|
+ const res = await dailyReport(params)
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.dailyData = res.data.list
|
|
|
+ this.dailyPages.total = res.data.total
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
- async getClient() { // 获取准出
|
|
|
- const params = { taskId: this.taskId, curIndex: this.clientPages.curIndex, pageSize: this.clientPages.pageSize }
|
|
|
- const res = await projectTestReport(params)
|
|
|
- if (res.code === 200) {
|
|
|
- this.clientData = res.data.list
|
|
|
- this.clientPages.total = res.data.total
|
|
|
+ async getClient(val) { // 获取准出
|
|
|
+ val === 10000 ? this.releaseDataStatus = !this.releaseDataStatus : ''
|
|
|
+ if (this.releaseDataStatus) {
|
|
|
+ const indexPage = { taskId: this.taskId, bizId: localStorage.getItem('bizId'), curIndex: this.clientPages.curIndex, pageSize: this.clientPages.pageSize }
|
|
|
+ const res = await reportreleaseList(indexPage)
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.clientData = res.data.list
|
|
|
+ this.clientPages.total = res.data.total
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ const params = { taskId: this.taskId, curIndex: this.clientPages.curIndex, pageSize: this.clientPages.pageSize }
|
|
|
+ const res = await projectTestReport(params)
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.clientData = res.data.list
|
|
|
+ this.clientPages.total = res.data.total
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
testSizeChange(e) { // 提测分页
|
|
@@ -364,7 +421,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
back(e, ele, data) { // 提测报告
|
|
|
- this.requireName = data.name
|
|
|
+ this.dataStatus ? this.requireName = data.reportName : this.requireName = data.name
|
|
|
this.CallBackStatus = e
|
|
|
this.CallBackId = ele
|
|
|
switch (e) {
|
|
@@ -473,4 +530,7 @@ export default {
|
|
|
.btn{
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
+.task-report-btn {
|
|
|
+ margin-right: 30px;
|
|
|
+}
|
|
|
</style>
|