|
@@ -6,10 +6,10 @@
|
|
|
<dropdown
|
|
|
v-if="map.bugEnumList && typeof bug.status !== 'undefined'"
|
|
|
v-model="map.bugEnumList[bug.status]"
|
|
|
- :options="enums.bugEnumList"
|
|
|
+ :options="bugStatusList(map.bugEnumList[bug.status])"
|
|
|
:size="'small'"
|
|
|
:class="{
|
|
|
- 'item-color' : map.bugEnumList[bug.status] === '待修复' || '修复中',
|
|
|
+ 'item-color' : map.bugEnumList[bug.status] === '待修复',
|
|
|
'item' : map.bugEnumList[bug.status] === '已完成',
|
|
|
'item1' : map.bugEnumList[bug.status] === '待测试',
|
|
|
'item2' : map.bugEnumList[bug.status] === 'Reopen',
|
|
@@ -68,7 +68,14 @@
|
|
|
v-if="map.bugEnumList && typeof bug.status !== 'undefined'"
|
|
|
v-model="map.bugEnumList[bug.status]"
|
|
|
size="small"
|
|
|
- :options="enums.bugEnumList"
|
|
|
+ :class="{
|
|
|
+ 'item-color' : map.bugEnumList[bug.status] === '待修复',
|
|
|
+ 'item' : map.bugEnumList[bug.status] === '已完成',
|
|
|
+ 'item1' : map.bugEnumList[bug.status] === '待测试',
|
|
|
+ 'item2' : map.bugEnumList[bug.status] === 'Reopen',
|
|
|
+ 'item3' : map.bugEnumList[bug.status] === 'Hold'
|
|
|
+ }"
|
|
|
+ :options="bugStatusList(map.bugEnumList[bug.status])"
|
|
|
class="button_status"
|
|
|
@command="openStatsDialog"
|
|
|
/>
|
|
@@ -167,6 +174,9 @@
|
|
|
class="bug_manage_div"
|
|
|
>{{ map.repairResultEnumList[bug.repairResult]?map.repairResultEnumList[bug.repairResult]:'未修复' }}</div>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="Hold次数">
|
|
|
+ <div style="padding-left: 15px" class="bug_manage_div">{{ bug.holdCount }}</div>
|
|
|
+ </el-form-item>
|
|
|
|
|
|
</el-form>
|
|
|
</el-aside>
|
|
@@ -500,30 +510,15 @@
|
|
|
>
|
|
|
<div class="image-name">{{ file.name }}</div>
|
|
|
</el-tooltip>
|
|
|
- <img
|
|
|
- class="el-upload-list__item-thumbnail detail-img"
|
|
|
- :src="file.url"
|
|
|
- alt=""
|
|
|
- >
|
|
|
+ <img class="el-upload-list__item-thumbnail detail-img" :src="file.url" alt="">
|
|
|
<span class="el-upload-list__item-actions">
|
|
|
- <span
|
|
|
- class="el-upload-list__item-preview"
|
|
|
- @click="handlePictureCardPreview(file)"
|
|
|
- >
|
|
|
+ <span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
|
|
|
<i class="el-icon-zoom-in" />
|
|
|
</span>
|
|
|
- <span
|
|
|
- v-if="!disabled"
|
|
|
- class="el-upload-list__item-delete"
|
|
|
- @click="handleDownload(file)"
|
|
|
- >
|
|
|
+ <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleDownload(file)">
|
|
|
<i class="el-icon-download" />
|
|
|
</span>
|
|
|
- <span
|
|
|
- v-if="!disabled"
|
|
|
- class="el-upload-list__item-delete"
|
|
|
- @click="handleRemoveImage(file)"
|
|
|
- >
|
|
|
+ <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemoveImage(file)">
|
|
|
<i class="el-icon-delete" />
|
|
|
</span>
|
|
|
</span>
|
|
@@ -542,15 +537,9 @@
|
|
|
<el-divider v-if="type !== 'page'" /><br>
|
|
|
<div>
|
|
|
<div v-for="(item,index) in comments" :key="index" class="animated bounceInRight">
|
|
|
- <div
|
|
|
- style="font-size:14px;color:#333B4A;display: inline-block;"
|
|
|
- >{{ item.commentInfo.name }}</div>
|
|
|
- <div
|
|
|
- style="margin-left:20px;display: inline-block;color: #9B9B9B;font-size:12px"
|
|
|
- >{{ item.commentInfo.gmtCreater }}</div>
|
|
|
- <p
|
|
|
- style="font-size:14px;color:#333B4A;margin-top: 10px;white-space: pre-line;"
|
|
|
- >{{ item.commentInfo.content }}</p>
|
|
|
+ <div style="font-size:14px;color:#333B4A;display: inline-block;">{{ item.commentInfo.name }}</div>
|
|
|
+ <div style="margin-left:20px;display: inline-block;color: #9B9B9B;font-size:12px">{{ item.commentInfo.gmtCreater }}</div>
|
|
|
+ <p style="font-size:14px;color:#333B4A;margin-top: 10px;white-space: pre-line;">{{ item.commentInfo.content }}</p>
|
|
|
<br>
|
|
|
</div>
|
|
|
<el-input
|
|
@@ -571,80 +560,31 @@
|
|
|
v-if="statusDialogVisible"
|
|
|
:visible.sync="statusDialogVisible"
|
|
|
width="33%"
|
|
|
- class="bug_manage_dialog"
|
|
|
+ :title="statusDialogTitle"
|
|
|
+ class="public_task"
|
|
|
:append-to-body="true"
|
|
|
:close-on-click-modal="false"
|
|
|
>
|
|
|
- <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
|
|
|
- v-if="statusDialogTitle !== '删除确认'"
|
|
|
- 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 enums.bugReasonEnumList"
|
|
|
- :key="item.code"
|
|
|
- :label="item.name"
|
|
|
- :value="item.code"
|
|
|
- />
|
|
|
+ <div class="blueStripe" />
|
|
|
+ <el-form v-if="statusDialogTitle !== '删除确认'" 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%" @change="modifyResult(statusDialogForm.repairResult)">
|
|
|
+ <el-option v-for="item in enums.repairResultEnumList" :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 enums.repairResultEnumList"
|
|
|
- :key="item.code"
|
|
|
- :label="item.name"
|
|
|
- :value="item.code"
|
|
|
- />
|
|
|
+ <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 enums.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">
|
|
|
- <el-input
|
|
|
- v-model="statusDialogForm.reasonOrDesc"
|
|
|
- type="textarea"
|
|
|
- placeholder="请输入Reopen"
|
|
|
- maxlength="300"
|
|
|
- show-word-limit
|
|
|
- rows="4"
|
|
|
- />
|
|
|
+ <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">
|
|
|
+ <el-input v-model="statusDialogForm.reasonOrDesc" type="textarea" maxlength="300" show-word-limit rows="4" />
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div v-else style="text-align:center;line-height: 150px">是否要删除当前缺陷?</div>
|
|
@@ -687,8 +627,7 @@
|
|
|
<script>
|
|
|
import fackClickOutSide from './fackClickOutSide.js'
|
|
|
import E from 'wangeditor'
|
|
|
-// import Utils from '../../../../util.js'
|
|
|
-// import { settingGetTypeMap } from '@/api/taskIndex'
|
|
|
+import '@/styles/PublicStyle/index.scss'
|
|
|
import { getCommentList, addComment, getMemberInfo } from '@/api/requirement.js'
|
|
|
import {
|
|
|
bugDetails,
|
|
@@ -874,18 +813,6 @@ export default {
|
|
|
this.bugGetEnum()
|
|
|
this.$nextTick(() => {
|
|
|
this.bugGet(this.id, false).then(res => {
|
|
|
- // this.assignerOptions = []
|
|
|
- // for (const i in this.bug.assignerList.length) {
|
|
|
- // this.searchUser(this.bug.assigner[i]).then(res => {
|
|
|
- // this.assignerOptions = res.data
|
|
|
- // })
|
|
|
- // }
|
|
|
- // this.currentHandlerOptions = []
|
|
|
- // for (const i in this.bug.currentHandlerList.length) {
|
|
|
- // this.searchUser(this.bug.currentHandler[i]).then(res => {
|
|
|
- // this.currentHandlerOptions = res.data
|
|
|
- // })
|
|
|
- // }
|
|
|
this.PersonnelData()
|
|
|
this.changeWidthOnBlur()
|
|
|
releaseList().then(res => {
|
|
@@ -933,6 +860,24 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ modifyResult(val) { // 修复结果
|
|
|
+ switch (val) {
|
|
|
+ case 9:
|
|
|
+ this.$set(this.statusDialogForm, 'bugReason', 9)
|
|
|
+ break
|
|
|
+ case 11:
|
|
|
+ this.$set(this.statusDialogForm, 'bugReason', 11)
|
|
|
+ break
|
|
|
+ case 2:
|
|
|
+ this.$set(this.statusDialogForm, 'bugReason', 10)
|
|
|
+ break
|
|
|
+ case 3:
|
|
|
+ this.$set(this.statusDialogForm, 'bugReason', 12)
|
|
|
+ break
|
|
|
+ default: this.$set(this.statusDialogForm, 'bugReason', '')
|
|
|
+ break
|
|
|
+ }
|
|
|
+ },
|
|
|
listen(event) {
|
|
|
event.preventDefault() // 阻止浏览器默认换行操作
|
|
|
return false
|
|
@@ -1067,10 +1012,7 @@ export default {
|
|
|
this.$message.warning('评论不能为空')
|
|
|
return
|
|
|
}
|
|
|
- addComment({
|
|
|
- commentInfo: { joinId: this.id, type: 2, content: this.commentContent },
|
|
|
- user: { ename: this.userInformation }
|
|
|
- }).then(res => {
|
|
|
+ addComment({ commentInfo: { joinId: this.id, type: 2, content: this.commentContent }, user: { ename: this.userInformation }}).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
this.getCommentList()
|
|
|
}
|
|
@@ -1118,6 +1060,33 @@ export default {
|
|
|
this.bug.bugName = this.bugNameForm.bugName
|
|
|
this.bugUpdate(this.bug, 'title')
|
|
|
},
|
|
|
+ bugStatusList(status) { // 不同状态返回不同的option
|
|
|
+ if (status === '待修复') {
|
|
|
+ return this.enums.bugEnumList.filter(item => {
|
|
|
+ return item.code === 0 || item.code === 2 || item.code === 5
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (status === '待测试') {
|
|
|
+ return this.enums.bugEnumList.filter(item => {
|
|
|
+ return item.code === 2 || item.code === 3 || item.code === 4
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (status === '已完成') {
|
|
|
+ return this.enums.bugEnumList.filter(item => {
|
|
|
+ return item.code === 3
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (status === 'Reopen') {
|
|
|
+ return this.enums.bugEnumList.filter(item => {
|
|
|
+ return item.code === 2 || item.code === 5 || item.code === 4
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (status === 'Hold') {
|
|
|
+ return this.enums.bugEnumList.filter(item => {
|
|
|
+ return item.code === 5 || item.code === 2
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
RichText() {
|
|
|
this.editor = new E('#wage', '#wage1')
|
|
|
this.editor.customConfig.zIndex = 0
|
|
@@ -1244,11 +1213,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
bugDelete() {
|
|
|
- const userData = {
|
|
|
- id: '',
|
|
|
- ename: this.userInformation,
|
|
|
- name: this.userNames
|
|
|
- }
|
|
|
+ const userData = { id: '', ename: this.userInformation, name: this.userNames }
|
|
|
return bugDelete(userData, this.bug.id).then(res => {
|
|
|
return res
|
|
|
})
|
|
@@ -1348,13 +1313,20 @@ export default {
|
|
|
openStatsDialog(item) {
|
|
|
this.statusDialogForm = JSON.parse(JSON.stringify(this.bug))
|
|
|
this.statusDialogForm.status = item.code
|
|
|
- if (item.name === '待修复' || item.name === '修复中' || item.name === 'Hold') {
|
|
|
- this.bugUpdate(this.statusDialogForm, 'title')
|
|
|
- .then(res => {
|
|
|
- this.bugGet(this.bug.id, false)
|
|
|
- })
|
|
|
+ if (item.name === '待修复') {
|
|
|
+ this.bugUpdate(this.statusDialogForm, 'title').then(res => {
|
|
|
+ this.bugGet(this.bug.id, false)
|
|
|
+ })
|
|
|
return
|
|
|
}
|
|
|
+ if (item.name === '待测试') {
|
|
|
+ this.$set(this.statusDialogForm, 'repairResult', 1)
|
|
|
+ this.$set(this.statusDialogForm, 'bugReason', '')
|
|
|
+ }
|
|
|
+ if (item.name === '已完成') {
|
|
|
+ this.$set(this.statusDialogForm, 'repairResult', this.bug.repairResult)
|
|
|
+ this.$set(this.statusDialogForm, 'bugReason', this.bug.bugReason)
|
|
|
+ }
|
|
|
this.statusDialogTitle = item.name
|
|
|
this.statusDialogVisible = true
|
|
|
},
|
|
@@ -1374,28 +1346,18 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
} else if (this.statusDialogTitle === '待测试') {
|
|
|
- if (
|
|
|
- typeof this.statusDialogForm.bugReason === 'undefined' ||
|
|
|
- this.statusDialogForm.bugReason === null
|
|
|
- ) {
|
|
|
+ if (typeof this.statusDialogForm.bugReason === 'undefined' || this.statusDialogForm.bugReason === null) {
|
|
|
this.$message.warning('请选择缺陷原因')
|
|
|
}
|
|
|
- this.postDialogForm()
|
|
|
- .then(res => {
|
|
|
- this.getCommentList()
|
|
|
- })
|
|
|
+ this.postDialogForm().then(res => {
|
|
|
+ this.getCommentList()
|
|
|
+ })
|
|
|
} else if (this.statusDialogTitle === '已完成') {
|
|
|
- if (
|
|
|
- typeof this.statusDialogForm.bugReason === 'undefined' ||
|
|
|
- this.statusDialogForm.bugReason === null
|
|
|
- ) {
|
|
|
+ if (typeof this.statusDialogForm.bugReason === 'undefined' || this.statusDialogForm.bugReason === null) {
|
|
|
this.$message.warning('请选择缺陷原因')
|
|
|
return
|
|
|
}
|
|
|
- if (
|
|
|
- typeof this.statusDialogForm.repairResult === 'undefined' ||
|
|
|
- this.statusDialogForm.repairResult === null
|
|
|
- ) {
|
|
|
+ if (typeof this.statusDialogForm.repairResult === 'undefined' || this.statusDialogForm.repairResult === null) {
|
|
|
this.$message.warning('请选择修复结果')
|
|
|
return
|
|
|
}
|
|
@@ -1405,10 +1367,9 @@ export default {
|
|
|
this.$message.warning('请输入Reopen原因')
|
|
|
return
|
|
|
}
|
|
|
- this.postDialogForm()
|
|
|
- .then(res => {
|
|
|
- this.getCommentList()
|
|
|
- })
|
|
|
+ this.postDialogForm().then(res => {
|
|
|
+ this.getCommentList()
|
|
|
+ })
|
|
|
// this.addComment()
|
|
|
this.statusDialogVisible = false
|
|
|
}
|