|
@@ -13,14 +13,17 @@
|
|
|
@command="openStatsDialog"
|
|
|
/>
|
|
|
<div style="display: inline-block;float:right">
|
|
|
- <el-dropdown placement="bottom">
|
|
|
+ <span class="newBtn" @click="getToDetails()"><i class="el-icon-document" /> 查看详情</span>
|
|
|
+ <span class="newBtn" style="padding: 0 10px" @click="openQueryDialog()"><i class="el-icon-document-copy" /> 复制</span>
|
|
|
+ <span class="newBtn" @click="openDeleteDialog()"><i class="el-icon-delete" /> 删除</span>
|
|
|
+ <!-- <el-dropdown placement="bottom">
|
|
|
<el-button size="small" plain class="button_delete" style="padding:5px"> ··· </el-button>
|
|
|
<el-dropdown-menu slot="dropdown" style="text-align: center;">
|
|
|
- <el-dropdown-item @click.native="openQueryDialog()">复制</el-dropdown-item>
|
|
|
- <el-dropdown-item @click.native="getToDetails()">查看详情</el-dropdown-item>
|
|
|
- <el-dropdown-item @click.native="openDeleteDialog()">删除</el-dropdown-item>
|
|
|
+ <el-dropdown-item @click.native="openQueryDialog()">复制 </el-dropdown-item>
|
|
|
+ <el-dropdown-item @click.native="getToDetails()">查看详情 </el-dropdown-item>
|
|
|
+ <el-dropdown-item @click.native="openDeleteDialog()">删除 </el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
- </el-dropdown>
|
|
|
+ </el-dropdown> -->
|
|
|
<div style="display: inline-block;margin-left: 10px;margin-right: 15px;" @mouseover="iconName = 'float_反馈_icon_close_蓝色'" @mouseleave="iconName = 'float_反馈_icon_close'" @mousedown="closeDrawer();">
|
|
|
<el-button size="medium" type="text" style="margin-top:-5px;">
|
|
|
<svg-icon :icon-class="iconName" />
|
|
@@ -287,11 +290,11 @@
|
|
|
</div>
|
|
|
<el-divider v-if="type !== 'page'" />
|
|
|
<el-aside :width="type=='page'?'100%':'100%'">
|
|
|
- <el-form :label-width="type=='page'?'30%':'16%'" label-position="left" label-suffix=":">
|
|
|
+ <el-form :rules="rules" :label-width="type=='page'?'30%':'16%'" label-position="left" label-suffix=":" :hide-required-asterisk="true">
|
|
|
<el-form-item label="提报人">
|
|
|
<div style="padding-left: 15px" class="bug_manage_div">{{ bug.creatorList }}</div>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="责任人">
|
|
|
+ <el-form-item label="责任人" prop="assigner" :style="formHeight1 == 'type' ? { 'height': '60px' } : { 'height': 'auto' }">
|
|
|
<el-select
|
|
|
v-model="bug.assigner"
|
|
|
class="current"
|
|
@@ -321,7 +324,7 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="修复人">
|
|
|
+ <el-form-item label="修复人" prop="currentHandler" :style="formHeight == 'type' ? { 'height': '60px' } : { 'height': 'auto' }">
|
|
|
<el-select
|
|
|
v-model="bug.currentHandler"
|
|
|
class="current"
|
|
@@ -750,6 +753,8 @@ export default {
|
|
|
uploadDialogImageUrl: '',
|
|
|
test: '测试',
|
|
|
num: 0,
|
|
|
+ formHeight: '',
|
|
|
+ formHeight1: '',
|
|
|
userLoading: false,
|
|
|
statusDialogVisible: false,
|
|
|
statusDialogTitle: '',
|
|
@@ -779,6 +784,12 @@ export default {
|
|
|
showWordLimit: false,
|
|
|
showRule: false,
|
|
|
rules: {
|
|
|
+ assigner: [
|
|
|
+ { required: true, message: '责任人不可为空', trigger: 'change' }
|
|
|
+ ],
|
|
|
+ currentHandler: [
|
|
|
+ { required: true, message: '修复人不可为空', trigger: 'change' }
|
|
|
+ ],
|
|
|
bugName: [
|
|
|
{ required: true, message: '标题不可为空', trigger: 'blur' }
|
|
|
],
|
|
@@ -811,7 +822,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
id(newVal, oldVal) {
|
|
|
- // window.scrollTo(0, 0)
|
|
|
this.bug = {}
|
|
|
this.bugModel = {}
|
|
|
this.bugNameForm = { bugName: '' }
|
|
@@ -819,6 +829,7 @@ export default {
|
|
|
this.init()
|
|
|
},
|
|
|
drawerShow(newV) {
|
|
|
+ this.init()
|
|
|
this.uploadButton = newV
|
|
|
}
|
|
|
},
|
|
@@ -836,18 +847,19 @@ 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.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 => {
|
|
|
this.appClientList = res.data.appClient // 客户端
|
|
@@ -867,19 +879,10 @@ export default {
|
|
|
this.$emit('close', false)
|
|
|
},
|
|
|
init() {
|
|
|
+ this.formHeight = ''
|
|
|
+ this.formHeight1 = ''
|
|
|
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()
|
|
|
this.getCommentList()
|
|
|
releaseList().then(res => {
|
|
@@ -889,6 +892,20 @@ export default {
|
|
|
this.editor.txt.html(this.bugDescribe === null ? '' : this.bugDescribe)
|
|
|
})
|
|
|
},
|
|
|
+ PersonnelData() {
|
|
|
+ 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
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
listen(event) {
|
|
|
event.preventDefault() // 阻止浏览器默认换行操作
|
|
|
return false
|
|
@@ -1083,7 +1100,6 @@ export default {
|
|
|
if (this.num === 0) {
|
|
|
document.getElementsByClassName('scop')[0].scrollTop = 0
|
|
|
}
|
|
|
-
|
|
|
// if (this.type !== 'page') {
|
|
|
// if (res.data.bizId !== Number(localStorage.getItem('bizId'))) {
|
|
|
// Utils.$emit('demo', res.data.bizId)
|
|
@@ -1169,42 +1185,46 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
bugUpdate(form, loadingStr) {
|
|
|
- loadingStr ? this.loading[loadingStr] = true : this.loading.fullscreen = true
|
|
|
- const userData = {
|
|
|
- id: '',
|
|
|
- ename: this.userInformation,
|
|
|
- name: this.userNames
|
|
|
- }
|
|
|
- this.num = 1
|
|
|
- let objData
|
|
|
- if (form) {
|
|
|
- const data = form
|
|
|
- data.currentHandler = form.currentHandler.join(',')
|
|
|
- data.assigner = form.assigner.join(',')
|
|
|
- objData = { bugBaseInfo: data, user: userData }
|
|
|
- } else {
|
|
|
- const data = form
|
|
|
- data.currentHandler = form.currentHandler.join(',')
|
|
|
- data.assigner = form.assigner.join(',')
|
|
|
- objData = { bugBaseInfo: data, user: userData }
|
|
|
- }
|
|
|
- if (objData.bugBaseInfo.currentHandler !== '' && objData.bugBaseInfo.assigner !== '') {
|
|
|
- return bugUpdate(objData).then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
- this.changeWidthOnBlur()
|
|
|
- this.init()
|
|
|
- this.bugModel = JSON.parse(JSON.stringify(this.bug))
|
|
|
- this.$emit('update', false)
|
|
|
+ if (form.currentHandler.length > 0) {
|
|
|
+ if (form.assigner.length > 0) {
|
|
|
+ this.formHeight = ''
|
|
|
+ this.formHeight1 = ''
|
|
|
+ loadingStr ? this.loading[loadingStr] = true : this.loading.fullscreen = true
|
|
|
+ const userData = {
|
|
|
+ id: '',
|
|
|
+ ename: this.userInformation,
|
|
|
+ name: this.userNames
|
|
|
+ }
|
|
|
+ this.num = 1
|
|
|
+ let objData
|
|
|
+ if (form) {
|
|
|
+ const data = form
|
|
|
+ data.currentHandler = form.currentHandler.join(',')
|
|
|
+ data.assigner = form.assigner.join(',')
|
|
|
+ objData = { bugBaseInfo: data, user: userData }
|
|
|
} else {
|
|
|
- this.bug = JSON.parse(JSON.stringify(this.bugModel))
|
|
|
+ const data = form
|
|
|
+ data.currentHandler = form.currentHandler.join(',')
|
|
|
+ data.assigner = form.assigner.join(',')
|
|
|
+ objData = { bugBaseInfo: data, user: userData }
|
|
|
}
|
|
|
- loadingStr ? this.loading[loadingStr] = false : this.loading.fullscreen = false
|
|
|
- return res
|
|
|
- })
|
|
|
+ return bugUpdate(objData).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.changeWidthOnBlur()
|
|
|
+ this.bugModel = JSON.parse(JSON.stringify(this.bug))
|
|
|
+ this.$emit('update', false)
|
|
|
+ this.init()
|
|
|
+ } else {
|
|
|
+ this.bug = JSON.parse(JSON.stringify(this.bugModel))
|
|
|
+ }
|
|
|
+ loadingStr ? this.loading[loadingStr] = false : this.loading.fullscreen = false
|
|
|
+ return res
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.formHeight1 = 'type'
|
|
|
+ }
|
|
|
} else {
|
|
|
- this.$message.warning('责任人,修复人不能为空')
|
|
|
- this.loading.userInfo = false
|
|
|
- this.bugGet(this.bug.id, false)
|
|
|
+ this.formHeight = 'type'
|
|
|
}
|
|
|
},
|
|
|
searchUser(query) {
|
|
@@ -1537,6 +1557,9 @@ export default {
|
|
|
.bug_manage .el-cascader:hover .el-input__suffix-inner {
|
|
|
visibility: visible;
|
|
|
}
|
|
|
+.layout_main .el-form-item.is-error .el-input__inner {
|
|
|
+border-color: #DCDFE6;
|
|
|
+}
|
|
|
</style>
|
|
|
|
|
|
<style scoped>
|
|
@@ -1556,7 +1579,7 @@ export default {
|
|
|
border-bottom-right-radius: 4px;
|
|
|
}
|
|
|
.bug_describe {
|
|
|
- color: #C0C4CC;
|
|
|
+ color: #666666;
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
.bug_describe:hover {
|
|
@@ -1574,6 +1597,15 @@ export default {
|
|
|
</style>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
+.newBtn {
|
|
|
+ font-size: 14px;
|
|
|
+ color: rgb(51, 59, 74);
|
|
|
+ font-weight: 500;
|
|
|
+}
|
|
|
+.newBtn:hover {
|
|
|
+ color: #409EFF;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
.current:hover{
|
|
|
border-radius: 4px;
|
|
|
border: 1px solid #DCDFE6;
|