|
@@ -119,17 +119,21 @@
|
|
|
<el-row>
|
|
|
<el-col :span="24" style="margin:1% 0;">遗留问题<el-input v-model="ClientData.bugInfo" type="textarea" size="small" placeholder="请填写内容" style="margin-top:1%;" /></el-col>
|
|
|
</el-row>
|
|
|
- <div v-show="showButton1" style="flex: 1;"><el-button type="primary" @click="getQueryData(ClientData, tableData)"> 更 新 </el-button></div>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { projectTestReportUpdate, projectTestReportCreate, bugFinishList } from '@/api/ResultPage'
|
|
|
-import { projectTestReport } from '@/api/testPresentetion'
|
|
|
import E from 'wangeditor'
|
|
|
export default {
|
|
|
name: 'ClientAcceptance',
|
|
|
+ props: {
|
|
|
+ clienData: {
|
|
|
+ type: Object,
|
|
|
+ required: true
|
|
|
+ }
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
userData: '',
|
|
@@ -161,11 +165,7 @@ export default {
|
|
|
tester: [{ required: true, message: '测试人员不能为空', trigger: 'change' }],
|
|
|
testTimeEnd: [{ required: true, message: '测试周期不能为空', trigger: 'change' }]
|
|
|
},
|
|
|
- showButton1: '',
|
|
|
- content: null,
|
|
|
- editorContent: '',
|
|
|
showDelay: false,
|
|
|
- labelWidth: '60px',
|
|
|
status: '',
|
|
|
taskLateStatus: '',
|
|
|
pftResult: '',
|
|
@@ -174,9 +174,6 @@ export default {
|
|
|
ClientData: {},
|
|
|
editorElem: [],
|
|
|
editorElems: [],
|
|
|
- bugDatas: [],
|
|
|
- bizIdCode: '',
|
|
|
- projectIdCode: '',
|
|
|
bugNum: '',
|
|
|
tableData: []
|
|
|
}
|
|
@@ -216,120 +213,97 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
getRouterData() {
|
|
|
- this.showButton1 = false
|
|
|
-
|
|
|
- if (this.$route.query.task) { // 任务页面新建
|
|
|
- this.ClientData = {}
|
|
|
- this.bizIdCode = this.$route.query.task.bizId
|
|
|
- this.projectIdCode = this.$route.query.task.id
|
|
|
- this.bugNum = { type: 2, taskId: this.projectIdCode }
|
|
|
- this.getBugData()
|
|
|
+ console.log(this.clienData, '准出客户端')
|
|
|
+ this.ClientData = this.clienData
|
|
|
+ this.bugNum = { type: 2, taskIds: this.ClientData.taskIds }
|
|
|
+ this.getBugData()
|
|
|
+ if (this.ClientData.status === 1) {
|
|
|
+ this.tagBtn = 'success'
|
|
|
+ this.tagBtn1 = 'info'
|
|
|
+ this.status = 1
|
|
|
+ } else {
|
|
|
+ this.tagBtn1 = 'danger'
|
|
|
+ this.tagBtn = 'info'
|
|
|
+ this.status = 2
|
|
|
}
|
|
|
-
|
|
|
- if (this.$route.query.projectData) { // 主页面新建
|
|
|
- this.ClientData = {}
|
|
|
- this.bizIdCode = this.$route.query.projectData.bizId
|
|
|
- this.projectIdCode = this.$route.query.projectData.id
|
|
|
- this.$route.query.projectData.typeString === 1 ? this.ClientData.projectId = this.projectIdCode : this.ClientData.taskId = this.projectIdCode
|
|
|
- this.bugNum = { type: 2, taskId: this.ClientData.taskId, projectId: this.ClientData.projectId }
|
|
|
- this.getBugData()
|
|
|
+ if (this.ClientData.taskLateStatus === 1) {
|
|
|
+ this.tagChange = 'success'
|
|
|
+ this.tagChange1 = 'info'
|
|
|
+ this.taskLateStatus = 1
|
|
|
+ this.showDelay = false
|
|
|
+ } else {
|
|
|
+ this.tagChange1 = 'danger'
|
|
|
+ this.tagChange = 'info'
|
|
|
+ this.taskLateStatus = 2
|
|
|
+ this.showDelay = true
|
|
|
}
|
|
|
-
|
|
|
- if (this.$route.query.data) { // 准出主页面
|
|
|
- this.showButton1 = true
|
|
|
- projectTestReport({ id: this.$route.query.id }).then((res) => {
|
|
|
- this.ClientData = res.data
|
|
|
- this.bugNum = { type: 2, taskId: this.$route.query.taskId, projectId: this.$route.query.projectId }
|
|
|
- this.getBugData()
|
|
|
- if (this.ClientData.status === 1) {
|
|
|
- this.tagBtn = 'success'
|
|
|
- this.tagBtn1 = 'info'
|
|
|
- this.status = 1
|
|
|
- } else {
|
|
|
- this.tagBtn1 = 'danger'
|
|
|
- this.tagBtn = 'info'
|
|
|
- this.status = 2
|
|
|
- }
|
|
|
- if (this.ClientData.taskLateStatus === 1) {
|
|
|
- this.tagChange = 'success'
|
|
|
- this.tagChange1 = 'info'
|
|
|
- this.taskLateStatus = 1
|
|
|
- this.showDelay = false
|
|
|
- } else {
|
|
|
- this.tagChange1 = 'danger'
|
|
|
- this.tagChange = 'info'
|
|
|
- this.taskLateStatus = 2
|
|
|
- this.showDelay = true
|
|
|
- }
|
|
|
- if (this.ClientData.sctResult) {
|
|
|
- switch (this.ClientData.sctResult) {
|
|
|
- case 1:
|
|
|
- this.sctChange = 'info'
|
|
|
- this.sctChange1 = 'success'
|
|
|
- this.sctChange2 = 'info'
|
|
|
- this.sctResult = 1
|
|
|
- break
|
|
|
- case 2:
|
|
|
- this.sctChange = 'info'
|
|
|
- this.sctChange1 = 'info'
|
|
|
- this.sctChange2 = 'danger'
|
|
|
- this.sctResult = 2
|
|
|
- break
|
|
|
- case 3:
|
|
|
- this.sctChange = 'warning'
|
|
|
- this.sctChange1 = 'info'
|
|
|
- this.sctChange2 = 'info'
|
|
|
- this.sctResult = 3
|
|
|
- }
|
|
|
- }
|
|
|
- if (this.ClientData.pftResult) {
|
|
|
- switch (this.ClientData.pftResult) {
|
|
|
- case 1:
|
|
|
- this.pftChange = 'info'
|
|
|
- this.pftChange1 = 'success'
|
|
|
- this.pftChange2 = 'info'
|
|
|
- this.pftResult = 1
|
|
|
- break
|
|
|
- case 2:
|
|
|
- this.pftChange = 'info'
|
|
|
- this.pftChange1 = 'info'
|
|
|
- this.pftChange2 = 'danger'
|
|
|
- this.pftResult = 2
|
|
|
- break
|
|
|
- case 3:
|
|
|
- this.pftChange = 'warning'
|
|
|
- this.pftChange1 = 'info'
|
|
|
- this.pftChange2 = 'info'
|
|
|
- this.pftResult = 3
|
|
|
- }
|
|
|
- }
|
|
|
- if (this.ClientData.acceptanceResult) {
|
|
|
- switch (this.ClientData.acceptanceResult) {
|
|
|
- case 1:
|
|
|
- this.acceptanceResultChange = 'info'
|
|
|
- this.acceptanceResultChange1 = 'success'
|
|
|
- this.acceptanceResultChange2 = 'info'
|
|
|
- this.acceptanceResult = 1
|
|
|
- break
|
|
|
- case 2:
|
|
|
- this.acceptanceResultChange = 'info'
|
|
|
- this.acceptanceResultChange1 = 'info'
|
|
|
- this.acceptanceResultChange2 = 'danger'
|
|
|
- this.acceptanceResult = 2
|
|
|
- break
|
|
|
- case 3:
|
|
|
- this.acceptanceResultChange = 'warning'
|
|
|
- this.acceptanceResultChange1 = 'info'
|
|
|
- this.acceptanceResultChange2 = 'info'
|
|
|
- this.acceptanceResult = 3
|
|
|
- }
|
|
|
- }
|
|
|
- this.editorElem.txt.html(this.ClientData.projectBackground)
|
|
|
- this.editorElems.txt.html(this.ClientData.fctInfo)
|
|
|
- this.editorFrom.txt.html(this.ClientData.sctInfo)
|
|
|
- this.editorFro.txt.html(this.ClientData.acceptanceResultInfo)
|
|
|
- })
|
|
|
+ if (this.ClientData.sctResult) {
|
|
|
+ switch (this.ClientData.sctResult) {
|
|
|
+ case 1:
|
|
|
+ this.sctChange = 'info'
|
|
|
+ this.sctChange1 = 'success'
|
|
|
+ this.sctChange2 = 'info'
|
|
|
+ this.sctResult = 1
|
|
|
+ break
|
|
|
+ case 2:
|
|
|
+ this.sctChange = 'info'
|
|
|
+ this.sctChange1 = 'info'
|
|
|
+ this.sctChange2 = 'danger'
|
|
|
+ this.sctResult = 2
|
|
|
+ break
|
|
|
+ case 3:
|
|
|
+ this.sctChange = 'warning'
|
|
|
+ this.sctChange1 = 'info'
|
|
|
+ this.sctChange2 = 'info'
|
|
|
+ this.sctResult = 3
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.ClientData.pftResult) {
|
|
|
+ switch (this.ClientData.pftResult) {
|
|
|
+ case 1:
|
|
|
+ this.pftChange = 'info'
|
|
|
+ this.pftChange1 = 'success'
|
|
|
+ this.pftChange2 = 'info'
|
|
|
+ this.pftResult = 1
|
|
|
+ break
|
|
|
+ case 2:
|
|
|
+ this.pftChange = 'info'
|
|
|
+ this.pftChange1 = 'info'
|
|
|
+ this.pftChange2 = 'danger'
|
|
|
+ this.pftResult = 2
|
|
|
+ break
|
|
|
+ case 3:
|
|
|
+ this.pftChange = 'warning'
|
|
|
+ this.pftChange1 = 'info'
|
|
|
+ this.pftChange2 = 'info'
|
|
|
+ this.pftResult = 3
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.ClientData.acceptanceResult) {
|
|
|
+ switch (this.ClientData.acceptanceResult) {
|
|
|
+ case 1:
|
|
|
+ this.acceptanceResultChange = 'info'
|
|
|
+ this.acceptanceResultChange1 = 'success'
|
|
|
+ this.acceptanceResultChange2 = 'info'
|
|
|
+ this.acceptanceResult = 1
|
|
|
+ break
|
|
|
+ case 2:
|
|
|
+ this.acceptanceResultChange = 'info'
|
|
|
+ this.acceptanceResultChange1 = 'info'
|
|
|
+ this.acceptanceResultChange2 = 'danger'
|
|
|
+ this.acceptanceResult = 2
|
|
|
+ break
|
|
|
+ case 3:
|
|
|
+ this.acceptanceResultChange = 'warning'
|
|
|
+ this.acceptanceResultChange1 = 'info'
|
|
|
+ this.acceptanceResultChange2 = 'info'
|
|
|
+ this.acceptanceResult = 3
|
|
|
+ }
|
|
|
}
|
|
|
+ this.editorElem.txt.html(this.ClientData.projectBackground)
|
|
|
+ this.editorElems.txt.html(this.ClientData.fctInfo)
|
|
|
+ this.editorFrom.txt.html(this.ClientData.sctInfo)
|
|
|
+ this.editorFro.txt.html(this.ClientData.acceptanceResultInfo)
|
|
|
},
|
|
|
getBugData() {
|
|
|
bugFinishList(this.bugNum).then(res => {
|
|
@@ -338,8 +312,8 @@ export default {
|
|
|
this.formatData()
|
|
|
})
|
|
|
},
|
|
|
- parentHandleclick() {
|
|
|
- this.getCreateData(this.ClientData, this.tableData)
|
|
|
+ parentHandleclick(e) {
|
|
|
+ e === 1 ? this.getCreateData(this.ClientData, this.tableData) : this.getQueryData(this.ClientData, this.tableData)
|
|
|
},
|
|
|
getCreateData(ele, vel) {
|
|
|
this.$refs['ClientData'].validate((valid) => {
|
|
@@ -390,7 +364,7 @@ export default {
|
|
|
projectTestReportUpdate(this.objData).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
this.$message({ type: 'success', message: '更新成功' })
|
|
|
- this.$router.go(-1)
|
|
|
+ this.$emit('QuasiReport', res.data)
|
|
|
} else {
|
|
|
this.$message.error('更新失败')
|
|
|
}
|
|
@@ -407,14 +381,6 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- // celledit(row, column, cell, event) {
|
|
|
- // if (row[column.property]) {
|
|
|
- // row[column.property].edit = true
|
|
|
- // setTimeout(() => {
|
|
|
- // this.$refs[column.property].focus()
|
|
|
- // }, 20)
|
|
|
- // }
|
|
|
- // },
|
|
|
|
|
|
// 准出延期
|
|
|
lateStatusChange(e) {
|