|
@@ -102,7 +102,7 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="double" align="right" style="margin: 5vw 0 3vw 60vw;">
|
|
|
- <div><el-button @click="clickPreview(dataChange)"> 预 览 </el-button></div>
|
|
|
+ <div><el-button v-show="preview" @click="clickPreview(dataChange)"> 预 览 </el-button></div>
|
|
|
<div v-show="showButton"><el-button type="primary" @click="getCreateData(dataChange)"> 保 存 </el-button></div>
|
|
|
<div v-show="showButton1"><el-button type="primary" @click="getQueryData(dataChange)"> 更 新 </el-button></div>
|
|
|
<div><el-button @click="open(dataChange)"> 取 消 </el-button></div>
|
|
@@ -115,6 +115,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { launchTestUpdate, launchTestCreate } from '@/api/InterfaceReport'
|
|
|
+import { launchTest } from '@/api/testPresentetion'
|
|
|
import E from 'wangeditor'
|
|
|
|
|
|
export default {
|
|
@@ -147,6 +148,7 @@ export default {
|
|
|
showApollo: false,
|
|
|
showRelyOn: false,
|
|
|
showButton: true,
|
|
|
+ preview: false,
|
|
|
showButton1: '',
|
|
|
userData: '',
|
|
|
objData: '',
|
|
@@ -175,7 +177,6 @@ export default {
|
|
|
this.DetailsOfProposal.customConfig.onchange = (html) => { this.DetailsOfProposal = html }
|
|
|
this.DetailsOfProposal.create()
|
|
|
this.DetailsOfProposal.txt.html(`<p></p><table width="100%"><colgroup><col width="30%"><col width="30%"><col width="30%"></colgroup><thead><tr><th>端类型</th><th>联调RD</th><th>联调结果</th></tr></thead><tbody><tr><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td></tr></tbody></table><p></p>`)
|
|
|
- this.getRouterData1()
|
|
|
},
|
|
|
methods: {
|
|
|
getRouterData() {
|
|
@@ -186,43 +187,47 @@ export default {
|
|
|
this.bizIdCode = this.$route.query.task.bizId
|
|
|
this.projectIdCode = this.$route.query.task.id
|
|
|
}
|
|
|
- if (this.$route.query.data) {
|
|
|
+ if (this.$route.query.data) { // 提测编辑
|
|
|
this.showButton1 = true
|
|
|
this.showButton = false
|
|
|
- this.dataChange = this.$route.query.data
|
|
|
- if (this.dataChange.lateStatus === 1) {
|
|
|
- this.lateStatusBtn1 = 'success'
|
|
|
- this.lateStatusBtn = 'info'
|
|
|
- this.lateStatus = 1
|
|
|
- this.showDelay = false
|
|
|
- } else {
|
|
|
- this.lateStatusBtn1 = 'info'
|
|
|
- this.lateStatusBtn = 'danger'
|
|
|
- this.lateStatus = 2
|
|
|
- this.showDelay = true
|
|
|
- }
|
|
|
- if (this.dataChange.configInfo !== '') {
|
|
|
- this.configInBtn = 'success'
|
|
|
- this.configInBtn1 = 'info'
|
|
|
- this.configIn = 1
|
|
|
- this.showApollo = true
|
|
|
- } else {
|
|
|
- this.configInBtn = 'info'
|
|
|
- this.configInBtn1 = 'danger'
|
|
|
- this.configIn = 2
|
|
|
- this.showApollo = false
|
|
|
- }
|
|
|
- if (this.dataChange.dependentComponents !== '') {
|
|
|
- this.dependentBtn = 'success'
|
|
|
- this.dependentBtn1 = 'info'
|
|
|
- this.dependent = 1
|
|
|
- this.showRelyOn = true
|
|
|
- } else {
|
|
|
- this.dependentBtn = 'info'
|
|
|
- this.dependentBtn1 = 'danger'
|
|
|
- this.dependent = 2
|
|
|
- this.showRelyOn = false
|
|
|
- }
|
|
|
+ this.preview = true
|
|
|
+ launchTest({ id: this.$route.query.id }).then((res) => {
|
|
|
+ this.dataChange = res.data
|
|
|
+ this.DetailsOfProposal.txt.html(this.dataChange.joinTest)
|
|
|
+ if (this.dataChange.lateStatus === 1) {
|
|
|
+ this.lateStatusBtn1 = 'success'
|
|
|
+ this.lateStatusBtn = 'info'
|
|
|
+ this.lateStatus = 1
|
|
|
+ this.showDelay = false
|
|
|
+ } else {
|
|
|
+ this.lateStatusBtn1 = 'info'
|
|
|
+ this.lateStatusBtn = 'danger'
|
|
|
+ this.lateStatus = 2
|
|
|
+ this.showDelay = true
|
|
|
+ }
|
|
|
+ if (this.dataChange.configInfo !== '') {
|
|
|
+ this.configInBtn = 'success'
|
|
|
+ this.configInBtn1 = 'info'
|
|
|
+ this.configIn = 1
|
|
|
+ this.showApollo = true
|
|
|
+ } else {
|
|
|
+ this.configInBtn = 'info'
|
|
|
+ this.configInBtn1 = 'danger'
|
|
|
+ this.configIn = 2
|
|
|
+ this.showApollo = false
|
|
|
+ }
|
|
|
+ if (this.dataChange.dependentComponents !== '') {
|
|
|
+ this.dependentBtn = 'success'
|
|
|
+ this.dependentBtn1 = 'info'
|
|
|
+ this.dependent = 1
|
|
|
+ this.showRelyOn = true
|
|
|
+ } else {
|
|
|
+ this.dependentBtn = 'info'
|
|
|
+ this.dependentBtn1 = 'danger'
|
|
|
+ this.dependent = 2
|
|
|
+ this.showRelyOn = false
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
getQueryData(ele) {
|
|
@@ -268,9 +273,6 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- getRouterData1() {
|
|
|
- this.DetailsOfProposal.txt.html(this.dataChange.joinTest)
|
|
|
- },
|
|
|
open(ele) {
|
|
|
this.$confirm('是否放弃修改,离开页面?', '确认信息', {
|
|
|
distinguishCancelAndClose: true,
|
|
@@ -330,7 +332,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
clickPreview(ele) {
|
|
|
- this.$router.push({ path: '/Platform/presentation/acceptTheReport', query: { data: ele }})
|
|
|
+ this.$router.push({ path: '/Platform/presentation/acceptTheReport', query: { id: this.$route.query.id }})
|
|
|
}
|
|
|
}
|
|
|
}
|