|
@@ -44,8 +44,7 @@
|
|
|
|
|
|
<div style="margin-bottom: 1%;" class="backStyle">二. 项目背景</div>
|
|
|
|
|
|
- <div id="editorElem" class="toolbar" />
|
|
|
- <div id="editorElem1" class="text" />
|
|
|
+ <normal-area id="bug-children-projectBackground" :value.sync="clienEdit.projectBackground" :height="150" />
|
|
|
|
|
|
<div style="margin: 1% 0;" class="backStyle">三. 测试项</div>
|
|
|
|
|
@@ -58,8 +57,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div id="editorElems" class="toolbar" />
|
|
|
- <div id="editorElems1" class="text" />
|
|
|
+ <normal-area id="bug-children-fctInfo" :value.sync="clienEdit.fctInfo" :height="150" />
|
|
|
|
|
|
<div class="BJIsize">
|
|
|
<el-form-item>2.兼容测试</el-form-item>
|
|
@@ -70,11 +68,9 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div id="editorFrom" class="toolbar" />
|
|
|
- <div id="editorFrom1" class="text" />
|
|
|
+ <normal-area id="bug-children-sctInfo" :value.sync="clienEdit.sctInfo" :height="400" />
|
|
|
|
|
|
<div style="margin: 2% 0 0% 0;" class="backStyle">四. 产品验收</div>
|
|
|
-
|
|
|
<div class="BJIsize">
|
|
|
<p>验收结果</p>
|
|
|
<div class="BJIsize">
|
|
@@ -83,12 +79,9 @@
|
|
|
<el-tag :type="acceptanceResultChange2" size="small" effect="dark" class="tag" @click="changeAcceptanceResult(2)"> 测试未通过 </el-tag>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
- <div id="editorFro" class="toolbar" />
|
|
|
- <div id="editorFro1" class="text" />
|
|
|
+ <normal-area id="bug-children-acceptanceResultInfo" :value.sync="clienEdit.acceptanceResultInfo" :height="150" />
|
|
|
|
|
|
<div style="margin: 2% 0 2% 0;" class="backStyle">五. bug指标</div>
|
|
|
-
|
|
|
<el-table :data="tableData" border>
|
|
|
<el-table-column prop="totalBug" label="bug总数" min-width="200" align="center" edit="false">
|
|
|
<template slot-scope="scope">
|
|
@@ -125,9 +118,13 @@
|
|
|
|
|
|
<script>
|
|
|
import { projectTestReportUpdate, projectTestReportCreate, bugFinishList } from '@/api/ResultPage'
|
|
|
-import E from 'wangeditor'
|
|
|
+import normalArea from '@/components/input/normalArea'
|
|
|
+
|
|
|
export default {
|
|
|
name: 'ClientAcceptance',
|
|
|
+ components: {
|
|
|
+ normalArea
|
|
|
+ },
|
|
|
props: {
|
|
|
clienData: {
|
|
|
type: Object,
|
|
@@ -161,9 +158,7 @@ export default {
|
|
|
taskLateReason: [{ required: true, message: '延期原因不能为空', trigger: 'change' }],
|
|
|
smokeTestResult: [{ required: true, message: '准入结果不能为空', trigger: 'change' }],
|
|
|
developer: [{ required: true, message: '开发人员不能为空', trigger: 'change' }],
|
|
|
- // devTimeEnd: [{ required: true, message: '开发周期不能为空', trigger: 'change' }],
|
|
|
tester: [{ required: true, message: '测试人员不能为空', trigger: 'change' }]
|
|
|
- // testTimeEnd: [{ required: true, message: '测试周期不能为空', trigger: 'change' }]
|
|
|
},
|
|
|
showDelay: false,
|
|
|
status: '',
|
|
@@ -171,58 +166,39 @@ export default {
|
|
|
pftResult: '',
|
|
|
sctResult: '',
|
|
|
acceptanceResult: '',
|
|
|
+ clienEdit: {
|
|
|
+ projectBackground: '',
|
|
|
+ sctInfo: `<p>1、机型兼容</p><table border="1" style="border: 1px solid #DEE2E7" width="100%"><colgroup><col width="20%"><col width="20%"><col width="20%"><col width="20%"></colgroup><thead><tr><th>手机型号</th><th>操作系统</th><th>分辨率</th><th>(微信版本号)</tr></thead><tbody><tr><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td><td><br></td></tr></tbody></table><p>2、网络兼容</p><table border="1" style="border: 1px solid #DEE2E7" width="100%"><colgroup><col width="20%"><col width="20%"><col width="20%"></colgroup><thead><tr><th>WIFI</th><th>4G</th><th>5G</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>3、容器兼容</p><br>`,
|
|
|
+ acceptanceResultInfo: `<table border="1" style="border: 1px solid #DEE2E7" width="100%"><colgroup><col width="20%"><col width="20%"><col width="20%"><col width="20%"><col width="20%"></colgroup><thead><tr><th>验收项</th><th>验收点</th><th>验收人</th><th>验收结果</th><th>备注</th></tr></thead><tbody><tr><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td></tr></tbody></table>`,
|
|
|
+ fctInfo: `<table border="1" style="border: 1px solid #DEE2E7" width="100%"><colgroup><col width="20%"><col width="20%"><col width="20%"><col width="20%"><col width="20%"></colgroup><thead><tr><th>页面</th><th>模块</th><th>接口</th><th>测试结果</th><th>备注</th></tr></thead><tbody><tr><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td></tr></tbody></table>`
|
|
|
+ },
|
|
|
ClientData: {},
|
|
|
- editorElem: [],
|
|
|
- editorElems: [],
|
|
|
bugNum: '',
|
|
|
Ts: [],
|
|
|
clienId: '',
|
|
|
tableData: []
|
|
|
}
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ clienData: {
|
|
|
+ handler(newV, old) {
|
|
|
+ console.log(newV, '结果')
|
|
|
+ if (newV.id) {
|
|
|
+ alert(1)
|
|
|
+ this.getRouterData()
|
|
|
+ }
|
|
|
+ this.bugNum = { type: 2, taskIds: newV.taskIds }
|
|
|
+ this.getBugData()
|
|
|
+ },
|
|
|
+ immediate: true
|
|
|
+ }
|
|
|
+ },
|
|
|
created() {
|
|
|
this.getRouterData()
|
|
|
},
|
|
|
- mounted() {
|
|
|
- this.editorElem = new E('#editorElem', '#editorElem1')
|
|
|
- this.editorElems = new E('#editorElems', '#editorElems1')
|
|
|
- this.editorFrom = new E('#editorFrom', '#editorFrom1')
|
|
|
- this.editorFro = new E('#editorFro', '#editorFro1')
|
|
|
-
|
|
|
- this.editorElem.customConfig.zIndex = 110
|
|
|
- this.editorElems.customConfig.zIndex = 110
|
|
|
- this.editorFrom.customConfig.zIndex = 110
|
|
|
- this.editorFro.customConfig.zIndex = 110
|
|
|
-
|
|
|
- this.editorElem.customConfig.menus = ['bold', 'italic', 'underline', 'link', 'list', 'justify', 'table']
|
|
|
- this.editorElems.customConfig.menus = ['bold', 'italic', 'underline', 'link', 'list', 'justify', 'table']
|
|
|
- this.editorFrom.customConfig.menus = ['bold', 'italic', 'underline', 'link', 'list', 'justify', 'table']
|
|
|
- this.editorFro.customConfig.menus = ['bold', 'italic', 'underline', 'link', 'list', 'justify', 'table']
|
|
|
-
|
|
|
- this.editorElem.customConfig.onchange = (html) => { this.editorElem = html }
|
|
|
- this.editorElems.customConfig.onchange = (html) => { this.editorElems = html }
|
|
|
- this.editorFrom.customConfig.onchange = (html) => { this.editorFrom = html }
|
|
|
- this.editorFro.customConfig.onchange = (html) => { this.editorFro = html }
|
|
|
-
|
|
|
- this.editorElem.create()
|
|
|
- this.editorElems.create()
|
|
|
- this.editorFrom.create()
|
|
|
- this.editorFro.create()
|
|
|
-
|
|
|
- this.editorElems.txt.html(`<p></p><table width="100%"><colgroup><col width="20%"><col width="20%"><col width="20%"><col width="20%"><col width="20%"></colgroup><thead><tr><th>页面</th><th>模块</th><th>接口</th><th>测试结果</th><th>备注</th></tr></thead><tbody><tr><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td></tr></tbody></table><p></p>`)
|
|
|
- this.editorFrom.txt.html(`<p>1、机型兼容</p><table width="100%"><colgroup><col width="20%"><col width="20%"><col width="20%"><col width="20%"></colgroup><thead><tr><th>手机型号</th><th>操作系统</th><th>分辨率</th><th>(微信版本号)</tr></thead><tbody><tr><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td><td><br></td></tr></tbody></table><p>2、网络兼容</p><table width="100%"><colgroup><col width="20%"><col width="20%"><col width="20%"></colgroup><thead><tr><th>WIFI</th><th>4G</th><th>5G</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>3、容器兼容</p><br>`)
|
|
|
- this.editorFro.txt.html(`<p></p><table width="100%"><colgroup><col width="20%"><col width="20%"><col width="20%"><col width="20%"><col width="20%"></colgroup><thead><tr><th>验收项</th><th>验收点</th><th>验收人</th><th>验收结果</th><th>备注</th></tr></thead><tbody><tr><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td></tr></tbody></table><p></p>`)
|
|
|
- },
|
|
|
methods: {
|
|
|
getRouterData() {
|
|
|
- var url = location.href // 获取url中"?"符后的字串
|
|
|
- var arr = url.split('=')
|
|
|
- console.log(this.clienData, '准出客户端')
|
|
|
this.ClientData = this.clienData
|
|
|
- var task_Ids = ''
|
|
|
- this.clienData.taskIds ? task_Ids = this.ClientData.taskIds : task_Ids = [Number(arr[1])]
|
|
|
- this.bugNum = { type: 2, taskIds: task_Ids }
|
|
|
- this.getBugData()
|
|
|
if (this.ClientData.status === 1) {
|
|
|
this.tagBtn = 'success'
|
|
|
this.tagBtn1 = 'info'
|
|
@@ -307,18 +283,17 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
this.$nextTick(() => {
|
|
|
- this.ClientData.projectBackground !== null ? this.editorElem.txt.html(this.ClientData.projectBackground) : ''
|
|
|
- this.ClientData.fctInfo !== null ? this.editorElems.txt.html(this.ClientData.fctInfo) : ''
|
|
|
- this.ClientData.sctInfo !== null ? this.editorFrom.txt.html(this.ClientData.sctInfo) : ''
|
|
|
- this.ClientData.acceptanceResultInfo !== null ? this.editorFro.txt.html(this.ClientData.acceptanceResultInfo) : ''
|
|
|
+ this.clienEdit.projectBackground = this.ClientData.projectBackground || this.clienEdit.projectBackground
|
|
|
+ this.clienEdit.fctInfo = this.ClientData.fctInfo || this.clienEdit.fctInfo
|
|
|
+ this.clienEdit.sctInfo = this.ClientData.sctInfo || this.clienEdit.sctInfo
|
|
|
+ this.clienEdit.acceptanceResultInfo = this.ClientData.acceptanceResultInfo || this.clienEdit.acceptanceResultInfo
|
|
|
})
|
|
|
},
|
|
|
- getBugData() {
|
|
|
- bugFinishList(this.bugNum).then(res => {
|
|
|
- res.data.launchInfo !== null ? this.$set(this.ClientData, 'smokeTestResult', res.data.launchInfo) : ''
|
|
|
- this.tableData = [res.data]
|
|
|
- this.formatData()
|
|
|
- })
|
|
|
+ async getBugData() {
|
|
|
+ const res = await bugFinishList(this.bugNum)
|
|
|
+ res.data.launchInfo !== null ? this.$set(this.ClientData, 'smokeTestResult', res.data.launchInfo) : ''
|
|
|
+ this.tableData = [res.data]
|
|
|
+ this.formatData()
|
|
|
},
|
|
|
parentHandleclick(e, task, id) {
|
|
|
if (e === 1) {
|
|
@@ -333,10 +308,10 @@ export default {
|
|
|
this.$refs['ClientData'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.ClientData = ele
|
|
|
- typeof (this.editorElem) === 'string' ? this.ClientData.projectBackground = this.editorElem : ''
|
|
|
- typeof (this.editorElems) === 'string' ? this.ClientData.fctInfo = this.editorElems : ''
|
|
|
- typeof (this.editorFrom) === 'string' ? this.ClientData.sctInfo = this.editorFrom : ''
|
|
|
- typeof (this.editorFro) === 'string' ? this.ClientData.acceptanceResultInfo = this.editorFro : ''
|
|
|
+ this.ClientData.projectBackground = this.clienEdit.projectBackground
|
|
|
+ this.ClientData.fctInfo = this.clienEdit.fctInfo
|
|
|
+ this.ClientData.sctInfo = this.clienEdit.sctInfo
|
|
|
+ this.ClientData.acceptanceResultInfo = this.clienEdit.acceptanceResultInfo
|
|
|
this.ClientData.pftResult = this.pftResult
|
|
|
this.ClientData.sctResult = this.sctResult
|
|
|
this.ClientData.acceptanceResult = this.acceptanceResult
|
|
@@ -362,10 +337,10 @@ export default {
|
|
|
this.$refs['ClientData'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.ClientData = ele
|
|
|
- typeof (this.editorElem) === 'string' ? this.ClientData.projectBackground = this.editorElem : ''
|
|
|
- typeof (this.editorElems) === 'string' ? this.ClientData.fctInfo = this.editorElems : ''
|
|
|
- typeof (this.editorFrom) === 'string' ? this.ClientData.sctInfo = this.editorFrom : ''
|
|
|
- typeof (this.editorFro) === 'string' ? this.ClientData.acceptanceResultInfo = this.editorFro : ''
|
|
|
+ this.ClientData.projectBackground = this.clienEdit.projectBackground
|
|
|
+ this.ClientData.fctInfo = this.clienEdit.fctInfo
|
|
|
+ this.ClientData.sctInfo = this.clienEdit.sctInfo
|
|
|
+ this.ClientData.acceptanceResultInfo = this.clienEdit.acceptanceResultInfo
|
|
|
this.ClientData.pftResult = this.pftResult
|
|
|
this.ClientData.sctResult = this.sctResult
|
|
|
this.ClientData.acceptanceResult = this.acceptanceResult
|
|
@@ -511,17 +486,6 @@ export default {
|
|
|
height:100%;
|
|
|
display: inline-block;
|
|
|
}
|
|
|
- .toolbar {
|
|
|
- border: 2px solid #DEE2E7;
|
|
|
- }
|
|
|
- .text {
|
|
|
- text-align: left;
|
|
|
- min-height: 100px;
|
|
|
- font-size: 15px;
|
|
|
- color: #606266;
|
|
|
- border: 1px solid #DEE2E7;
|
|
|
- height: auto;
|
|
|
- }
|
|
|
.BJIsize {
|
|
|
display: flex;
|
|
|
align-items: center;
|