|
@@ -206,6 +206,7 @@ import {
|
|
|
} from '@/api/defectManage'
|
|
|
import searchPeople from '@/components/select/searchPeople' // 人员select
|
|
|
import { memberQueryMemberInfoByIDAPorName } from '@/api/projectIndex'
|
|
|
+import { getExecutionDetialRes } from '@/api/usecase'
|
|
|
import normalDialog from '@/components/dialog/normalDialog'
|
|
|
import '@/views/projectManage/bugList/css/index.css'
|
|
|
import normalArea from '@/components/input/normalArea' // 富文本
|
|
@@ -412,6 +413,49 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
+ if (e === 3) { // 用例新建缺陷
|
|
|
+ const { ucd: id = null } = this.$route.query
|
|
|
+ this.titleName = '新建缺陷'
|
|
|
+ getExecutionDetialRes({ id }).then(res => {
|
|
|
+ console.log('res', res)
|
|
|
+ const {
|
|
|
+ id,
|
|
|
+ name,
|
|
|
+ precondition,
|
|
|
+ stepDescription,
|
|
|
+ expectedResult
|
|
|
+ } = res.data.caseDetails || {}
|
|
|
+ const {
|
|
|
+ executeResult
|
|
|
+ } = res.data.taskExecutionRecord || {}
|
|
|
+ this.formInline = {
|
|
|
+ ...this.formInline,
|
|
|
+ discoveryMeth: 1,
|
|
|
+ bugName: `【C-${id}】${name}-${executeResult.label ? `${executeResult.label}-` : ''}提bug`,
|
|
|
+ bugDescribe: `<p>【前置条件】</p>\n${precondition}\n<p>【执行步骤】</p>\n${stepDescription}\n<p>【预期结果】</p>\n${expectedResult}\<p>【实际结果】</p>`
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // if (ele !== undefined) {
|
|
|
+ // this.formInline = ele
|
|
|
+ // this.getTaskList(ele.taskName)
|
|
|
+ // this.show2 = true
|
|
|
+ // this.formInline.creatorList = this.userNames
|
|
|
+ // this.$set(this.formInline, 'bugName', '')
|
|
|
+ // this.$set(this.formInline, 'accessory', '')
|
|
|
+ // this.options = []
|
|
|
+ // this.formData = []
|
|
|
+ // this.formData1 = []
|
|
|
+ // this.formData = this.formInline.assigner.concat(
|
|
|
+ // this.formInline.currentHandler
|
|
|
+ // )
|
|
|
+ // this.formData1 = this.unique6(this.formData)
|
|
|
+ // this.formData1.map(item => {
|
|
|
+ // this.searchUser(item).then(res => {
|
|
|
+ // this.options.push(res.data[0])
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ }
|
|
|
this.$nextTick(() => {
|
|
|
document.getElementById('soll').scrollTop = 0
|
|
|
this.editr = true
|