|
@@ -1,23 +1,13 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<el-container class="bgColor">
|
|
|
- <el-header v-if="type === 'page'" style="height: auto; margin-top: 1%; padding: 0 1%;">
|
|
|
+ <el-header v-if="type === 'page'" class="public_header">
|
|
|
<el-row class="headerBg">
|
|
|
- <el-col :span="24" class="Layout">
|
|
|
- <div class="titFont Layout">
|
|
|
- <span
|
|
|
- style="width: 100px; font-size: 22px; font-family:PingFangSC-Medium,PingFang SC;padding-left: 15px"
|
|
|
- >缺陷</span>
|
|
|
- </div>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- size="mini"
|
|
|
- @click="createdDefect"
|
|
|
- >新建缺陷</el-button>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24">
|
|
|
- <el-divider style="color: #EEF0F5;" />
|
|
|
- </el-col>
|
|
|
+ <div class="Layout_space_between">
|
|
|
+ <div class="public_themeName">缺陷</div>
|
|
|
+ <el-button size="mini" type="primary" @click="createdDefect">新建缺陷</el-button>
|
|
|
+ </div>
|
|
|
+ <el-divider style="color: #EEF0F5; margin: 10px 0 ;" />
|
|
|
<el-col :span="24" class="Layout" style="padding:0 0 1% 15px">
|
|
|
<el-form :model="formInline" class="flex_start" style="width: 100%;">
|
|
|
<div class="Layout">
|
|
@@ -439,7 +429,7 @@
|
|
|
</el-row>
|
|
|
</el-row>
|
|
|
</el-header>
|
|
|
- <el-main :style="type === 'page'?{padding: '1%'}:{padding: '0'}">
|
|
|
+ <el-main :style="type === 'page'?{padding: '10px'}:{padding: '0'}">
|
|
|
<el-row class="headerBg table_v" style=" padding-top: 0px;">
|
|
|
<el-col :span="24" style="min-height: 47vh;">
|
|
|
<div v-if="type !== 'page'" style="position: relative;top: 5px;right: 10px">
|
|
@@ -479,26 +469,7 @@
|
|
|
<el-table-column prop="priorityName" label="缺陷等级" align="center" />
|
|
|
<el-table-column prop="bugStatusName" label="状态" min-width="110" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-select
|
|
|
- v-model="scope.row.status"
|
|
|
- :class="{
|
|
|
- 'item-color': scope.row.status === 0 || scope.row.status === 1,
|
|
|
- 'item': scope.row.status === 3,
|
|
|
- 'item1': scope.row.status === 2,
|
|
|
- 'item2': scope.row.status === 4,
|
|
|
- 'item3': scope.row.status === 5
|
|
|
- }"
|
|
|
- class="btns"
|
|
|
- size="mini"
|
|
|
- @change="blurEvent(scope.row, scope.row.status)"
|
|
|
- >
|
|
|
- <el-option v-for="item in bugStatusList(scope.row.status)" :key="item.code" :label="item.name" :value="item.code" />
|
|
|
- </el-select>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="bugStatusName" label="状态cs" min-width="110" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- <Status-component :title="'缺陷'" :status-data="scope.row.status" :status-list="bugEnumList" :status-row="scope.row" />
|
|
|
+ <Status-component :title="'缺陷'" :status-data="scope.row.status" :status-row="scope.row" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="taskName" label="所属任务" align="center" min-width="250" show-overflow-tooltip />
|
|
@@ -541,6 +512,8 @@
|
|
|
<bug-details
|
|
|
:id="bugQuery.id+''"
|
|
|
ref="bugDetails"
|
|
|
+ :status="bugQuery"
|
|
|
+ :bug-enum-list="bugEnumList"
|
|
|
:type="'drawer'"
|
|
|
:drawer-show="drawerShow"
|
|
|
@close="drawerShow = false"
|
|
@@ -549,44 +522,6 @@
|
|
|
/>
|
|
|
</div>
|
|
|
</el-drawer>
|
|
|
- <el-dialog
|
|
|
- v-if="statusDialogVisible"
|
|
|
- :visible.sync="statusDialogVisible"
|
|
|
- width="33%"
|
|
|
- class="bug_manage_dialog"
|
|
|
- :append-to-body="true"
|
|
|
- :close-on-click-modal="false"
|
|
|
- @close="modalClose"
|
|
|
- >
|
|
|
- <template v-slot:title>
|
|
|
- <div style="display:flex;align-items: center;">
|
|
|
- <div style="width:4px;height:15px;background:#409EFF;border-radius:1px;" />
|
|
|
- <div style="width:83px;height:18px;font-size:16px;font-family:MicrosoftYaHei;color:rgba(51,59,74,1);margin-left:6px">{{ statusDialogTitle }}</div>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <el-form label-width="110px" label-position="left" :model="statusDialogForm" :rules="rules">
|
|
|
- <el-form-item v-if="statusDialogTitle === '待测试' || statusDialogTitle === '已完成'" label="缺陷原因" prop="bugReason">
|
|
|
- <el-select v-model="statusDialogForm.bugReason" style="width: 100%">
|
|
|
- <el-option v-for="item in bugReasonEnumList" :key="item.code" :label="item.name" :value="item.code" />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item v-if="statusDialogTitle === '待测试'" label="修复方式" class="bug_manage_dialog bug_manage_dialog_fixMethod">
|
|
|
- <el-input v-model="statusDialogForm.reasonOrDesc" type="textarea" placeholder="请输入具体原因和修复方式" maxlength="300" show-word-limit rows="4" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item v-if="statusDialogTitle === '已完成'" label="修复结果" prop="repairResult" class="bug_manage_dialog">
|
|
|
- <el-select v-model="statusDialogForm.repairResult" style="width: 100%">
|
|
|
- <el-option v-for="item in repairResultEnumList" :key="item.code" :label="item.name" :value="item.code" />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item v-if="statusDialogTitle === 'Reopen'" label="Reopen原因" prop="reasonOrDesc">
|
|
|
- <el-input v-model="statusDialogForm.reasonOrDesc" type="textarea" placeholder="请输入Reopen" maxlength="300" show-word-limit rows="4" />
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <template v-slot:footer>
|
|
|
- <el-button @click="getBugList(),statusDialogVisible = false">取 消</el-button>
|
|
|
- <el-button type="primary" @click="statusDialogConfirm">确 定</el-button>
|
|
|
- </template>
|
|
|
- </el-dialog>
|
|
|
<normal-dialog
|
|
|
:show-dialog="showSaveSearch"
|
|
|
:title="'保存筛选项'"
|
|
@@ -625,7 +560,6 @@ import {
|
|
|
bugList,
|
|
|
bugSelfList,
|
|
|
bugGetEnum,
|
|
|
- bugUpdate,
|
|
|
settingGetBizList,
|
|
|
taskListCreate,
|
|
|
releaseList,
|
|
@@ -638,6 +572,7 @@ import {
|
|
|
// import { getCommentList } from '@/api/requirement.js'
|
|
|
import { memberQueryMemberInfoByIDAPorName } from '@/api/projectIndex'
|
|
|
import '@/views/projectManage/bugList/css/index.css'
|
|
|
+import '@/styles/PublicStyle/index.scss'
|
|
|
export default {
|
|
|
components: {
|
|
|
createdBug,
|
|
@@ -659,10 +594,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
props: {
|
|
|
- type: {
|
|
|
- type: String,
|
|
|
- default: 'page'
|
|
|
- }
|
|
|
+ type: { type: String, default: 'page' }
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -693,28 +625,9 @@ export default {
|
|
|
}
|
|
|
}]
|
|
|
},
|
|
|
- rules: {
|
|
|
- bugReason: [
|
|
|
- { required: true, message: '请选择缺陷原因', trigger: 'change' }
|
|
|
- ],
|
|
|
- repairResult: [
|
|
|
- { required: true, message: '请选择修复结果', trigger: 'change' }
|
|
|
- ],
|
|
|
- reasonOrDesc: [
|
|
|
- { required: true, message: '请输入Reopen原因', trigger: 'blur' }
|
|
|
- ]
|
|
|
- },
|
|
|
- statusDialogForm: {},
|
|
|
- radio: '1',
|
|
|
bugListType: 2,
|
|
|
props: { multiple: true },
|
|
|
reopens: [{ code: 1, name: '是' }, { code: 0, name: '否' }],
|
|
|
- priorityColors: ['#F56C6C', '#FF8952', '#7ED321'],
|
|
|
- statusColors: ['#6AB4FF', '#6AB4FF', '#FFCC66', '#7ED321', '#F56C6C'],
|
|
|
- userInformation: localStorage.getItem('username'),
|
|
|
- userNames: localStorage.getItem('realname'),
|
|
|
- statusDialogTitle: '',
|
|
|
- statusDialogVisible: false,
|
|
|
DetailedScreening: false, // 高级筛选
|
|
|
bugEnumList: [], // bug状态
|
|
|
bugDevRepairTimeList: [], // 开发修复时长
|
|
@@ -729,36 +642,21 @@ export default {
|
|
|
priorityLevelEnumList: [], // 优先级
|
|
|
discoveryMethEnumList: [], // 发现方式
|
|
|
bugStageEnumList: [], // 发现阶段
|
|
|
- bugReasonEnumList: [], // 缺陷原因
|
|
|
sysTypeEnumList: [], // 端类型
|
|
|
bugQuery: '', // bug详情
|
|
|
business_platform_Modular: [], // 所属模块
|
|
|
- bugQueryModel: '',
|
|
|
- commentShow: true, // 评论为空默认显示
|
|
|
- content: '', // 评论
|
|
|
- comment_content: '', // 评论内容
|
|
|
- fileList: [], // 储存附件
|
|
|
- dis: false,
|
|
|
- commentTxt: [],
|
|
|
pageSize: 15,
|
|
|
curIndex: 1,
|
|
|
total: 0,
|
|
|
goodName: '更多筛选',
|
|
|
modalShow: false, // 弹窗(新建)
|
|
|
drawerShow: false, // drawer展示
|
|
|
- taskIdStr: [],
|
|
|
formInline: {}, // list
|
|
|
stratAndEnd: [], // 创建日期
|
|
|
tableData: [],
|
|
|
- dialogVisible: false,
|
|
|
- accessory: [],
|
|
|
loading: false,
|
|
|
options: [],
|
|
|
test: [], // 人员查询
|
|
|
- dialogImageUrl: '',
|
|
|
- isBugNameClick: false,
|
|
|
- staData: {},
|
|
|
- statusId: '',
|
|
|
showSaveSearch: false, // 显示保存筛选项对话框
|
|
|
showEditSearch: false, // 显示管理过滤器
|
|
|
searchForm: { name: null }, // 筛选项obj
|
|
@@ -802,33 +700,6 @@ export default {
|
|
|
this.$store.state.data.status = false
|
|
|
},
|
|
|
methods: {
|
|
|
- bugStatusList(status) {
|
|
|
- if (status === 0) {
|
|
|
- return this.bugEnumList.filter(item => {
|
|
|
- return item.code === 2 || item.code === 0 || item.code === 5
|
|
|
- })
|
|
|
- }
|
|
|
- if (status === 2) {
|
|
|
- return this.bugEnumList.filter(item => {
|
|
|
- return item.code === 2 || item.code === 3 || item.code === 4
|
|
|
- })
|
|
|
- }
|
|
|
- if (status === 3) {
|
|
|
- return this.bugEnumList.filter(item => {
|
|
|
- return item.code === 3
|
|
|
- })
|
|
|
- }
|
|
|
- if (status === 4) {
|
|
|
- return this.bugEnumList.filter(item => {
|
|
|
- return item.code === 2 || item.code === 5 || item.code === 4
|
|
|
- })
|
|
|
- }
|
|
|
- if (status === 5) {
|
|
|
- return this.bugEnumList.filter(item => {
|
|
|
- return item.code === 2 || item.code === 5
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
changeSelect() {
|
|
|
this.$forceUpdate()
|
|
|
},
|
|
@@ -887,102 +758,15 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- modalClose() {
|
|
|
- this.getBugList()
|
|
|
- },
|
|
|
selectStatus(row) {
|
|
|
row.isSelected = !row.isSelected
|
|
|
},
|
|
|
- blurEvent(row, status) { // 修改状态
|
|
|
- this.staData = row
|
|
|
- this.statusId = status
|
|
|
- if (status === 0 || status === 1 || status === 5) {
|
|
|
- const userData = { id: '', ename: this.userInformation, name: this.userNames }
|
|
|
- row.status = status
|
|
|
- const objData = { bugBaseInfo: row, user: userData }
|
|
|
- bugUpdate(objData).then(res => {
|
|
|
- row.isSelected = !row.isSelected
|
|
|
- if (res.code === 200) {
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message: res.msg,
|
|
|
- type: 'success'
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.getBugList()
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message: res.msg,
|
|
|
- type: 'error'
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- let data = ''
|
|
|
- this.bugEnumList.map(item => {
|
|
|
- item.code === status ? data = item.name : ''
|
|
|
- })
|
|
|
- this.statusDialogTitle = data
|
|
|
- this.statusDialogVisible = true
|
|
|
- },
|
|
|
bugStatusChange(row) {
|
|
|
row.isSelected = !row.isSelected
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.inputVal.focus()
|
|
|
})
|
|
|
},
|
|
|
- statusDialogConfirm() {
|
|
|
- if (this.statusDialogTitle === '待测试') {
|
|
|
- if (typeof this.statusDialogForm.bugReason === 'undefined' || this.statusDialogForm.bugReason === null) {
|
|
|
- this.$message.warning('请选择缺陷原因')
|
|
|
- }
|
|
|
- this.postDialogForm()
|
|
|
- } else if (this.statusDialogTitle === '已完成') {
|
|
|
- if (typeof this.statusDialogForm.bugReason === 'undefined' || this.statusDialogForm.bugReason === null) {
|
|
|
- this.$message.warning('请选择缺陷原因')
|
|
|
- return
|
|
|
- }
|
|
|
- if (typeof this.statusDialogForm.repairResult === 'undefined' || this.statusDialogForm.repairResult === null) {
|
|
|
- this.$message.warning('请选择修复结果')
|
|
|
- return
|
|
|
- }
|
|
|
- this.postDialogForm()
|
|
|
- } else if (this.statusDialogTitle === 'Reopen') {
|
|
|
- if (!this.statusDialogForm.reasonOrDesc) {
|
|
|
- this.$message.warning('请输入Reopen原因')
|
|
|
- return
|
|
|
- }
|
|
|
- this.postDialogForm()
|
|
|
- this.statusDialogVisible = false
|
|
|
- }
|
|
|
- },
|
|
|
- postDialogForm() {
|
|
|
- const userData = { id: '', ename: this.userInformation, name: this.userNames }
|
|
|
- this.staData.status = this.statusId
|
|
|
- this.staData.reasonOrDesc = this.statusDialogForm.reasonOrDesc
|
|
|
- this.staData.repairResult = this.statusDialogForm.repairResult
|
|
|
- this.staData.bugReason = this.statusDialogForm.bugReason
|
|
|
- const objData = { bugBaseInfo: this.staData, user: userData }
|
|
|
- bugUpdate(objData).then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
- this.statusDialogVisible = false
|
|
|
- this.statusDialogForm = {}
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message: res.msg,
|
|
|
- type: 'success'
|
|
|
- })
|
|
|
- } else if (res.code !== 200) {
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message: res.msg,
|
|
|
- type: 'error'
|
|
|
- })
|
|
|
- this.getBugList()
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
resetQuery() {
|
|
|
this.$router.push({ path: this.$route.path })
|
|
|
this.stratAndEnd = []
|
|
@@ -1031,30 +815,6 @@ export default {
|
|
|
this.options = []
|
|
|
}
|
|
|
},
|
|
|
- handlePictureCardPreview(file) {
|
|
|
- this.dialogImageUrl = file.url
|
|
|
- this.dialogVisible = true
|
|
|
- },
|
|
|
-
|
|
|
- // 文件上传时的钩子
|
|
|
- progress(event, file, fileList) {
|
|
|
- this.dis = true
|
|
|
- },
|
|
|
-
|
|
|
- // 上传成功回调
|
|
|
- handleChange(response, file, fileList) {
|
|
|
- this.fileDbList.push({
|
|
|
- name: file.name,
|
|
|
- url: 'http:' + file.response.url
|
|
|
- })
|
|
|
- this.accessory = JSON.stringify(this.fileDbList)
|
|
|
- this.dis = false
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message: '文件上传成功',
|
|
|
- type: 'success'
|
|
|
- })
|
|
|
- },
|
|
|
click_bugName(e) {
|
|
|
this.bugQuery = JSON.parse(
|
|
|
JSON.stringify(this.tableData.filter(value => value.id === e)[0])
|
|
@@ -1111,7 +871,6 @@ export default {
|
|
|
this.repairResultEnumList = res.data.repairResultEnumList // 修复结果
|
|
|
this.clientTypeEnumList = res.data.clientTypeEnumList // 版本
|
|
|
this.sysTypeEnumList = res.data.sysTypeEnumList // 客户端
|
|
|
- this.bugReasonEnumList = res.data.bugReasonEnumList
|
|
|
this.bugDevRepairTimeList = res.data.bugDevRepairTimeList // 开发修复时长
|
|
|
})
|
|
|
releaseList().then(res => {
|
|
@@ -1255,88 +1014,4 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-</style>
|
|
|
-<style lang="scss">
|
|
|
-.btns .el-input--suffix .el-input__inner {
|
|
|
- padding-right: 10px;
|
|
|
- padding-left: 10px;
|
|
|
- width: 73px;
|
|
|
-}
|
|
|
-
|
|
|
-.item{
|
|
|
- /deep/ input {
|
|
|
- color: rgb(126, 211, 33);
|
|
|
- border: 1px solid rgb(126, 211, 33);
|
|
|
- border-color: rgb(126, 211, 33) !important;
|
|
|
- font-weight: 900;
|
|
|
- }
|
|
|
- /deep/ .el-input__suffix {
|
|
|
- color: rgb(126, 211, 33) !important;
|
|
|
- right: 1px;
|
|
|
- }
|
|
|
- /deep/ .el-select__caret {
|
|
|
- color: rgb(126, 211, 33) !important;
|
|
|
- }
|
|
|
-}
|
|
|
-.item1 {
|
|
|
- /deep/ input {
|
|
|
- color: rgb(255, 204, 102);
|
|
|
- border: 1px solid rgb(255, 204, 102);
|
|
|
- border-color: rgb(255, 204, 102) !important;
|
|
|
- font-weight: 900;
|
|
|
- }
|
|
|
- /deep/ .el-input__suffix {
|
|
|
- color: rgb(255, 204, 102) !important;
|
|
|
- right: 1px;
|
|
|
- }
|
|
|
- /deep/ .el-select__caret {
|
|
|
- color: rgb(255, 204, 102) !important;
|
|
|
- }
|
|
|
-}
|
|
|
-.item2 {
|
|
|
- /deep/ input {
|
|
|
- color: rgb(245, 108, 108);
|
|
|
- border: 1px solid rgb(245, 108, 108);
|
|
|
- border-color: rgb(245, 108, 108) !important;
|
|
|
- font-weight: 900;
|
|
|
- }
|
|
|
- /deep/ .el-input__suffix {
|
|
|
- color: rgb(245, 108, 108) !important;
|
|
|
- right: 1px;
|
|
|
- }
|
|
|
- /deep/ .el-select__caret {
|
|
|
- color: rgb(245, 108, 108) !important;
|
|
|
- }
|
|
|
-}
|
|
|
-.item3 {
|
|
|
- /deep/ input {
|
|
|
- color: #D675F0;
|
|
|
- border: 1px solid #D675F0;
|
|
|
- border-color: #D675F0 !important;
|
|
|
- font-weight: 900;
|
|
|
- }
|
|
|
- /deep/ .el-input__suffix {
|
|
|
- color: #D675F0 !important;
|
|
|
- right: 1px;
|
|
|
- }
|
|
|
- /deep/ .el-select__caret {
|
|
|
- color: #D675F0 !important;
|
|
|
- }
|
|
|
-}
|
|
|
-.item-color {
|
|
|
- /deep/ input {
|
|
|
- color: rgb(106, 180, 255);
|
|
|
- border: 1px solid rgb(106, 180, 255);
|
|
|
- border-color: rgb(106, 180, 255) !important;
|
|
|
- font-weight: 900;
|
|
|
- }
|
|
|
- /deep/ .el-input__suffix {
|
|
|
- color: rgb(106, 180, 255) !important;
|
|
|
- right: 1px;
|
|
|
- }
|
|
|
- /deep/ .el-select__caret {
|
|
|
- color: rgb(106, 180, 255) !important;
|
|
|
- }
|
|
|
-}
|
|
|
</style>
|