|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<el-container class="bgColor">
|
|
|
- <el-header v-if="type === 'page'" class="public_header">
|
|
|
+ <el-header v-if="type === 'page'" style="height: auto; margin-top: 1%; padding: 0 1%;">
|
|
|
<el-row class="headerBg">
|
|
|
<div class="Layout_space_between">
|
|
|
<div class="public_themeName">缺陷</div>
|
|
@@ -429,7 +429,7 @@
|
|
|
</el-row>
|
|
|
</el-row>
|
|
|
</el-header>
|
|
|
- <el-main :style="type === 'page'?{padding: '10px'}:{padding: '0'}">
|
|
|
+ <el-main :style="type === 'page'?{padding: '1%'}:{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">
|
|
@@ -469,7 +469,21 @@
|
|
|
<el-table-column prop="priorityName" label="缺陷等级" align="center" />
|
|
|
<el-table-column prop="bugStatusName" label="状态" min-width="110" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <Status-component :title="'缺陷'" :status-data="scope.row.status" :status-row="scope.row" />
|
|
|
+ <el-select
|
|
|
+ v-model="scope.row.status"
|
|
|
+ :class="{
|
|
|
+ 'status_color': scope.row.status === 0,
|
|
|
+ 'status_color2': scope.row.status === 3,
|
|
|
+ 'status_color5': scope.row.status === 2,
|
|
|
+ 'status_color1': scope.row.status === 4,
|
|
|
+ 'status_color3': 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="taskName" label="所属任务" align="center" min-width="250" show-overflow-tooltip />
|
|
@@ -512,8 +526,6 @@
|
|
|
<bug-details
|
|
|
:id="bugQuery.id+''"
|
|
|
ref="bugDetails"
|
|
|
- :status="bugQuery"
|
|
|
- :bug-enum-list="bugEnumList"
|
|
|
:type="'drawer'"
|
|
|
:drawer-show="drawerShow"
|
|
|
@close="drawerShow = false"
|
|
@@ -522,6 +534,43 @@
|
|
|
/>
|
|
|
</div>
|
|
|
</el-drawer>
|
|
|
+ <el-dialog
|
|
|
+ v-if="statusDialogVisible"
|
|
|
+ :visible.sync="statusDialogVisible"
|
|
|
+ width="30%"
|
|
|
+ :title="statusDialogTitle"
|
|
|
+ class="public_task"
|
|
|
+ :append-to-body="true"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ @close="modalClose"
|
|
|
+ >
|
|
|
+ <div class="blueStripe" />
|
|
|
+ <el-form ref="statusDialogForm" label-width="110px" label-position="left" :model="statusDialogForm" :rules="rules">
|
|
|
+ <el-form-item v-if="statusDialogTitle === '待测试' || 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 === '待测试' || statusDialogTitle === '已完成'" label="缺陷原因" prop="bugReason" class="bug_manage_dialog">
|
|
|
+ <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 === 'Reopen'" label="Reopen原因" prop="reasonOrDesc" class="bug_manage_dialog">
|
|
|
+ <el-input v-model="statusDialogForm.reasonOrDesc" type="textarea" placeholder="请输入Reopen" maxlength="300" show-word-limit rows="4" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item v-if="statusDialogTitle === 'Hold'" label="Hold原因" prop="reasonOrDesc" class="bug_manage_dialog">
|
|
|
+ <el-input v-model="statusDialogForm.reasonOrDesc" type="textarea" 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="'保存筛选项'"
|
|
@@ -550,16 +599,17 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import StatusComponent from '@/components/StatusComponent/StatusComponent.vue'
|
|
|
import BugDetails from './details/index'
|
|
|
import createdBug from '@/views/projectManage/bugList/file/createdBug'
|
|
|
import normalDialog from '@/components/dialog/normalDialog'
|
|
|
import filterList from '@/views/projectManage/bugList/details/filterList'
|
|
|
import { deepClone } from '@/utils/global'
|
|
|
+import '@/styles/PublicStyle/index.scss'
|
|
|
import {
|
|
|
bugList,
|
|
|
bugSelfList,
|
|
|
bugGetEnum,
|
|
|
+ bugUpdate,
|
|
|
settingGetBizList,
|
|
|
taskListCreate,
|
|
|
releaseList,
|
|
@@ -569,17 +619,14 @@ import {
|
|
|
getFilterList,
|
|
|
getFilterItem
|
|
|
} from '@/api/defectManage'
|
|
|
-// 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,
|
|
|
BugDetails,
|
|
|
normalDialog,
|
|
|
- filterList,
|
|
|
- StatusComponent
|
|
|
+ filterList
|
|
|
},
|
|
|
filters: {
|
|
|
oneA(value) {
|
|
@@ -594,7 +641,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
props: {
|
|
|
- type: { type: String, default: 'page' }
|
|
|
+ type: {
|
|
|
+ type: String,
|
|
|
+ default: 'page'
|
|
|
+ }
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -625,9 +675,18 @@ export default {
|
|
|
}
|
|
|
}]
|
|
|
},
|
|
|
+ rules: {
|
|
|
+ bugReason: [{ required: true, message: '请选择缺陷原因', trigger: ['blur', 'change'] }],
|
|
|
+ repairResult: [{ required: true, message: '请选择修复结果', trigger: ['blur', 'change'] }],
|
|
|
+ reasonOrDesc: [{ required: true, message: '请输入Reopen原因', trigger: ['blur', 'change'] }]
|
|
|
+ },
|
|
|
+ statusDialogForm: {},
|
|
|
bugListType: 2,
|
|
|
props: { multiple: true },
|
|
|
reopens: [{ code: 1, name: '是' }, { code: 0, name: '否' }],
|
|
|
+ userData: { id: '', ename: localStorage.getItem('username'), name: localStorage.getItem('realname') },
|
|
|
+ statusDialogTitle: '',
|
|
|
+ statusDialogVisible: false,
|
|
|
DetailedScreening: false, // 高级筛选
|
|
|
bugEnumList: [], // bug状态
|
|
|
bugDevRepairTimeList: [], // 开发修复时长
|
|
@@ -642,21 +701,36 @@ 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
|
|
@@ -758,15 +832,76 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ modalClose() {
|
|
|
+ this.getBugList()
|
|
|
+ },
|
|
|
selectStatus(row) {
|
|
|
row.isSelected = !row.isSelected
|
|
|
},
|
|
|
+ blurEvent(row, status) {
|
|
|
+ this.staData = row
|
|
|
+ this.statusId = status
|
|
|
+ if (status === 0) {
|
|
|
+ row.status = status
|
|
|
+ const objData = { bugBaseInfo: row, user: this.userData }
|
|
|
+ bugUpdate(objData).then(res => {
|
|
|
+ row.isSelected = !row.isSelected
|
|
|
+ this.$message({ message: res.msg, type: res.msg })
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let data = ''
|
|
|
+ this.bugEnumList.map(item => {
|
|
|
+ item.code === status ? data = item.name : ''
|
|
|
+ })
|
|
|
+ this.statusDialogTitle = data
|
|
|
+ this.statusDialogForm = {}
|
|
|
+ this.statusDialogVisible = true
|
|
|
+ },
|
|
|
bugStatusChange(row) {
|
|
|
row.isSelected = !row.isSelected
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.inputVal.focus()
|
|
|
})
|
|
|
},
|
|
|
+ statusDialogConfirm() { // 点击确定 验证 修改
|
|
|
+ this.$refs.statusDialogForm.validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ this.staData.status = this.statusCode
|
|
|
+ this.staData.reasonOrDesc = this.statusDialogForm.reasonOrDesc
|
|
|
+ this.staData.repairResult = this.statusDialogForm.repairResult
|
|
|
+ this.staData.bugReason = this.statusDialogForm.bugReason
|
|
|
+ const objData = { bugBaseInfo: this.staData, user: this.userData }
|
|
|
+ alert()
|
|
|
+ bugUpdate(objData).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.statusDialogVisible = false
|
|
|
+ this.statusDialogForm = {}
|
|
|
+ } else if (res.code !== 200) {
|
|
|
+ this.getBugList()
|
|
|
+ }
|
|
|
+ this.$message({ message: res.msg, type: res.msg })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ postDialogForm() {
|
|
|
+ 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: this.userData }
|
|
|
+ bugUpdate(objData).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.statusDialogVisible = false
|
|
|
+ this.statusDialogForm = {}
|
|
|
+ this.$message({ message: res.msg, type: res.msg })
|
|
|
+ } else if (res.code !== 200) {
|
|
|
+ this.$message({ message: res.msg, type: res.msg })
|
|
|
+ this.getBugList()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
resetQuery() {
|
|
|
this.$router.push({ path: this.$route.path })
|
|
|
this.stratAndEnd = []
|
|
@@ -815,6 +950,30 @@ 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])
|
|
@@ -871,6 +1030,7 @@ 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 => {
|
|
@@ -978,6 +1138,33 @@ export default {
|
|
|
deleteFilter() {
|
|
|
this.$router.push({ path: this.$route.path })
|
|
|
this.getFilterList()
|
|
|
+ },
|
|
|
+ bugStatusList(status) { // 不同状态返回不同的option
|
|
|
+ if (status === 0) {
|
|
|
+ return this.bugEnumList.filter(item => {
|
|
|
+ return item.code === 0 || item.code === 2 || 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 === 5 || item.code === 2
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1014,4 +1201,97 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+</style>
|
|
|
+<style lang="scss">
|
|
|
+.btns .el-input--suffix .el-input__inner {
|
|
|
+ padding-right: 10px;
|
|
|
+ padding-left: 10px;
|
|
|
+ width: 73px;
|
|
|
+}
|
|
|
+// .btns .el-input__suffix {
|
|
|
+// // display: none;
|
|
|
+// visibility: hidden;
|
|
|
+// }
|
|
|
+// .btns :hover {
|
|
|
+// /deep/ .el-input__suffix {
|
|
|
+// // display: inline-block;
|
|
|
+// visibility: inherit;
|
|
|
+// }
|
|
|
+// }
|
|
|
+.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>
|