|
@@ -6,7 +6,7 @@
|
|
|
<div class="title-left-icon" />
|
|
|
<div class="title-left-name">提测报告</div>
|
|
|
</div>
|
|
|
- <el-button class="task-report-btn" type="text" @click="getTest()">{{ dataStatus?'回到最新':"查看历史" }}</el-button>
|
|
|
+ <el-button class="task-report-btn" type="text" @click="dataStatus ? reportdelivertestGetByTaskId(1):launchTest(1) ">{{ dataStatus?'回到最新':"查看历史" }}</el-button>
|
|
|
</div>
|
|
|
<div class="detail-info">
|
|
|
<el-table
|
|
@@ -84,13 +84,13 @@
|
|
|
<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>
|
|
|
+ <el-button class="task-report-btn" type="text" @click="dailyDataStatus?dailyReportGetByTaskIdV2(1):dailyReport(1)">{{ 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">
|
|
|
<el-table-column label="标题名称" min-width="120">
|
|
|
<template slot-scope="scope">
|
|
|
- <a href="javascript:void(0)" style="color:#20a0ff" @click="!dailyDataStatus ? OldDaily(scope.row ,'测试日报') :toReportView(scope.row, 0)">{{ scope.row.reportName }}</a>
|
|
|
+ <a href="javascript:void(0)" style="color:#20a0ff" @click="dailyDataStatus ? OldDaily(scope.row ,'测试日报') :toReportView(scope.row, 0)">{{ scope.row.reportName }}</a>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="状态" min-width="100" align="center">
|
|
@@ -98,14 +98,14 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="报告人" min-width="100" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="dailyDataStatus">{{ !scope.row.reportorObject? '':scope.row.reportorObject.name }}</span>
|
|
|
- <span v-if="!dailyDataStatus">{{ scope.row.createrObject.name }}</span>
|
|
|
+ <span v-if="!dailyDataStatus">{{ !scope.row.reportorObject? '':scope.row.reportorObject.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 v-if="dailyDataStatus" 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>
|
|
@@ -150,31 +150,31 @@
|
|
|
<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>
|
|
|
+ <el-button class="task-report-btn" type="text" @click="releaseDataStatus?reportreleaseGetByTaskId(1): projectTestReport(1)">{{ 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">
|
|
|
<el-table-column label="标题名称" min-width="120">
|
|
|
<template slot-scope="scope">
|
|
|
- <a href="javascript:void(0)" style="color:#20a0ff" @click="!releaseDataStatus ? OldDaily(scope.row ,'准出报告') : toReportView(scope.row, 1)">{{ scope.row.reportName }}</a>
|
|
|
+ <a href="javascript:void(0)" style="color:#20a0ff" @click="releaseDataStatus ? OldDaily(scope.row ,'准出报告') : toReportView(scope.row, 1)">{{ scope.row.reportName }}</a>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="状态" min-width="100" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="!releaseDataStatus">{{ scope.row.reportStatusString }}</span>
|
|
|
- <span v-if="releaseDataStatus">{{ scope.row.statusString }}</span>
|
|
|
+ <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">
|
|
|
- <span v-if="!releaseDataStatus">{{ scope.row.createrObject.name }}</span>
|
|
|
- <span v-if="releaseDataStatus">{{ scope.row.reportorObject === null ? '' :scope.row.reportorObject.name }}</span>
|
|
|
+ <span v-if="releaseDataStatus">{{ scope.row.createrObject.name }}</span>
|
|
|
+ <span v-if="!releaseDataStatus">{{ scope.row.reportorObject === null ? '' :scope.row.reportorObject.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 v-if="releaseDataStatus" label="操作" width="200">
|
|
|
+ <el-table-column v-if="!releaseDataStatus" label="操作" width="200">
|
|
|
<template slot-scope="scope">
|
|
|
<div v-if="scope.row.status === 3 ? false : true">
|
|
|
<span v-if="scope.row.status === 0 ? true : false" class="btn" @click="clientButtom(5,scope.row.id, scope.row)">发送</span>
|
|
@@ -266,9 +266,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, // 日报
|
|
|
+ dataStatus: false, // 数据状态
|
|
|
+ releaseDataStatus: false, // 准出
|
|
|
+ dailyDataStatus: false, // 日报
|
|
|
dialog_testData: false, // 打回弹窗
|
|
|
dialog_daily: false, // 测试报告dialog
|
|
|
dialog_client: false, // 准出报告dialog
|
|
@@ -303,91 +303,91 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.getTest()
|
|
|
- this.getDaily()
|
|
|
- this.getClient()
|
|
|
+ this.reportdelivertestGetByTaskId()
|
|
|
+ this.dailyReportGetByTaskIdV2()
|
|
|
+ this.reportreleaseGetByTaskId()
|
|
|
},
|
|
|
methods: {
|
|
|
- async getTest(val) { // 获取提测
|
|
|
- if (this.dataStatus) {
|
|
|
- this.dataStatus = false
|
|
|
- const data = { taskId: this.taskId, bizId: localStorage.getItem('bizId'), curIndex: this.testPages.curIndex, pageSize: this.testPages.pageSize }
|
|
|
- const res = await reportdelivertestGetByTaskId(data)
|
|
|
- if (res.code === 200) {
|
|
|
- this.testData = res.data.list
|
|
|
- this.testPages.total = res.data.total
|
|
|
- }
|
|
|
- return false
|
|
|
- }
|
|
|
- if (!this.dataStatus) {
|
|
|
- this.dataStatus = true
|
|
|
- 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(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 dailyReportGetByTaskIdV2(indexPage)
|
|
|
- if (res.code === 200) {
|
|
|
- this.dailyData = res.data.list
|
|
|
- this.dailyPages.total = res.data.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 reportdelivertestGetByTaskId(e) { // 获取新提测
|
|
|
+ e ? this.dataStatus = false : ''
|
|
|
+ const data = { taskId: this.taskId, bizId: localStorage.getItem('bizId'), curIndex: this.testPages.curIndex, pageSize: this.testPages.pageSize }
|
|
|
+ const res = await reportdelivertestGetByTaskId(data)
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.testData = res.data.list
|
|
|
+ this.testPages.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 reportreleaseGetByTaskId(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
|
|
|
- }
|
|
|
+ async launchTest(e) { // 获取老提测
|
|
|
+ e ? this.dataStatus = true : ''
|
|
|
+ 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
|
|
|
}
|
|
|
},
|
|
|
testSizeChange(e) { // 提测分页
|
|
|
this.testPages.pageSize = e
|
|
|
- this.getTest()
|
|
|
+ !this.dataStatus ? this.reportdelivertestGetByTaskId() : this.launchTest()
|
|
|
},
|
|
|
testCurrentChange(e) { // 提测分页
|
|
|
this.testPages.curIndex = e
|
|
|
- this.getTest()
|
|
|
+ !this.dataStatus ? this.reportdelivertestGetByTaskId() : this.launchTest()
|
|
|
+ },
|
|
|
+
|
|
|
+ async dailyReportGetByTaskIdV2(e) {
|
|
|
+ e ? this.dailyDataStatus = false : ''
|
|
|
+ const indexPage = { taskId: this.taskId, bizId: localStorage.getItem('bizId'), curIndex: this.dailyPages.curIndex, pageSize: this.dailyPages.pageSize }
|
|
|
+ const res = await dailyReportGetByTaskIdV2(indexPage)
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.dailyData = res.data.list
|
|
|
+ this.dailyPages.total = res.data.total
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async dailyReport(e) {
|
|
|
+ e ? this.dailyDataStatus = true : ''
|
|
|
+ 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
|
|
|
+ }
|
|
|
},
|
|
|
dailySizeChange(e) { // 日报分页
|
|
|
this.dailyPages.pageSize = e
|
|
|
- this.getDaily()
|
|
|
+ !this.dailyDataStatus ? this.dailyReportGetByTaskIdV2() : this.dailyReport()
|
|
|
},
|
|
|
dailyCurrentChange(e) { // 日报分页
|
|
|
this.dailyPages.curIndex = e
|
|
|
- this.getDaily()
|
|
|
+ !this.dailyDataStatus ? this.dailyReportGetByTaskIdV2() : this.dailyReport()
|
|
|
},
|
|
|
+
|
|
|
+ async reportreleaseGetByTaskId(e) {
|
|
|
+ e ? this.releaseDataStatus = false : ''
|
|
|
+ const indexPage = { taskId: this.taskId, bizId: localStorage.getItem('bizId'), curIndex: this.clientPages.curIndex, pageSize: this.clientPages.pageSize }
|
|
|
+ const res = await reportreleaseGetByTaskId(indexPage)
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.clientData = res.data.list
|
|
|
+ this.clientPages.total = res.data.total
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async projectTestReport(e) {
|
|
|
+ e ? this.releaseDataStatus = true : ''
|
|
|
+ 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
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
clientSizeChange(e) { // 准出分页
|
|
|
this.clientPages.pageSize = e
|
|
|
- this.getClient()
|
|
|
+ !this.releaseDataStatus ? this.reportreleaseGetByTaskId() : this.projectTestReport()
|
|
|
},
|
|
|
clientCurrentChange(e) { // 准出分页
|
|
|
this.clientPages.curIndex = e
|
|
|
- this.getClient()
|
|
|
+ !this.releaseDataStatus ? this.reportreleaseGetByTaskId() : this.projectTestReport()
|
|
|
},
|
|
|
async passOrBackSend() { // 提测打回
|
|
|
this.dialog_testData = false
|
|
@@ -404,13 +404,13 @@ export default {
|
|
|
const res = await reportdelivertestUpdate(data)
|
|
|
if (res.code === 200) {
|
|
|
this.dataStatus = true
|
|
|
- this.getTest()
|
|
|
+ this.reportdelivertestGetByTaskId()
|
|
|
this.$message({ message: res.msg, type: 'success', offset: 150 })
|
|
|
}
|
|
|
} else if (this.Str === '删除') {
|
|
|
const res = await reportdelivertestDelete({}, this.reportData.id)
|
|
|
if (res.code === 200) {
|
|
|
- this.getTest()
|
|
|
+ this.reportdelivertestGetByTaskId()
|
|
|
this.$message({ type: 'success', message: '删除成功' })
|
|
|
}
|
|
|
}
|
|
@@ -439,7 +439,7 @@ export default {
|
|
|
const res = await dailyReportDelete({}, this.CallBackId)
|
|
|
if (res.code === 200) {
|
|
|
this.dialog_daily = false
|
|
|
- this.getDaily()
|
|
|
+ this.dailyReportGetByTaskIdV2()
|
|
|
this.$message({ type: 'success', message: '删除成功' })
|
|
|
}
|
|
|
},
|
|
@@ -448,7 +448,7 @@ export default {
|
|
|
const res = await reportreleaseDelete({}, this.CallBackId)
|
|
|
if (res.code === 200) {
|
|
|
this.dialog_client = false
|
|
|
- this.getClient()
|
|
|
+ this.reportreleaseGetByTaskId()
|
|
|
this.$message({ type: 'success', message: '删除成功' })
|
|
|
}
|
|
|
},
|