|
@@ -151,6 +151,7 @@
|
|
|
|
|
|
<script>
|
|
|
const _ = require('lodash')
|
|
|
+import { mapGetters } from 'vuex'
|
|
|
import '@/styles/PublicStyle/index.scss'
|
|
|
import { dailyReportDelete } from '@/api/testPresentetion' // 日报
|
|
|
import { projectTestReportList } from '@/api/ResultPage' // 准出
|
|
@@ -181,7 +182,6 @@ export default {
|
|
|
history: true, // 新老数据
|
|
|
userInformation: localStorage.getItem('username'),
|
|
|
userNames: localStorage.getItem('realname'),
|
|
|
- bizJson: localStorage.getItem('bizId'),
|
|
|
message: {}, // 老日报数据
|
|
|
reportDaily: false,
|
|
|
testPresenyL: false, // 老日报数据
|
|
@@ -214,11 +214,22 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(['bizId'])
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ bizId: {
|
|
|
+ handler(newV) {
|
|
|
+ if (newV === -1) return
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ immediate: true
|
|
|
+ }
|
|
|
+ },
|
|
|
destroyed() {
|
|
|
this.$store.state.data.status = false
|
|
|
},
|
|
|
created() {
|
|
|
- this.getList()
|
|
|
this.$store.state.data.status = true
|
|
|
},
|
|
|
methods: {
|
|
@@ -244,7 +255,7 @@ export default {
|
|
|
async getList(e) { // 报告list
|
|
|
this.loading = true
|
|
|
this.history = true
|
|
|
- const indexPage = { bizId: localStorage.getItem('bizId'), pageSize: this.pageSize, curIndex: this.curIndex }
|
|
|
+ const indexPage = { bizId: this.bizId, pageSize: this.pageSize, curIndex: this.curIndex }
|
|
|
e ? indexPage.reportName = this.state : ''
|
|
|
if (this.title === '测试日报') {
|
|
|
const res = await dailyReportListV2(indexPage)
|
|
@@ -261,7 +272,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
if (this.title === '提测报告') {
|
|
|
- const data = { bizId: localStorage.getItem('bizId'), pageSize: this.pageSize, curIndex: this.curIndex }
|
|
|
+ const data = { bizId: this.bizId, pageSize: this.pageSize, curIndex: this.curIndex }
|
|
|
e ? data.reportName = this.state : ''
|
|
|
const res = await reportdelivertestList(data)
|
|
|
if (res.code === 200) {
|
|
@@ -400,7 +411,7 @@ export default {
|
|
|
// 远程搜索任务
|
|
|
async getTaskList(val) {
|
|
|
const params = {
|
|
|
- bizId: localStorage.getItem('bizId')
|
|
|
+ bizId: this.bizId
|
|
|
}
|
|
|
if (val) { params.name = val }
|
|
|
const res = await taskListCreate(params)
|
|
@@ -477,7 +488,7 @@ export default {
|
|
|
async gethistoryData(e) { // 查看所有老日报列表
|
|
|
this.loading = true
|
|
|
this.history = false
|
|
|
- const indexPage = { bizId: localStorage.getItem('bizId'), pageSize: this.pageSize, curIndex: this.curIndex }
|
|
|
+ const indexPage = { bizId: this.bizId, pageSize: this.pageSize, curIndex: this.curIndex }
|
|
|
e ? indexPage.reportName = this.state : ''
|
|
|
if (this.title === '测试日报') {
|
|
|
const res = await dailyReportList(indexPage)
|
|
@@ -494,7 +505,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
if (this.title === '提测报告') {
|
|
|
- const data = { bizId: localStorage.getItem('bizId'), pageSize: this.pageSize, curIndex: this.curIndex }
|
|
|
+ const data = { bizId: this.bizId, pageSize: this.pageSize, curIndex: this.curIndex }
|
|
|
e ? data.name = this.state : ''
|
|
|
const res = await launchTestList(data)
|
|
|
if (res.code === 200) {
|