|
@@ -287,11 +287,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 +321,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"
|
|
@@ -707,6 +707,8 @@ export default {
|
|
|
uploadDialogImageUrl: '',
|
|
|
test: '测试',
|
|
|
num: 0,
|
|
|
+ formHeight: '',
|
|
|
+ formHeight1: '',
|
|
|
userLoading: false,
|
|
|
statusDialogVisible: false,
|
|
|
statusDialogTitle: '',
|
|
@@ -736,6 +738,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' }
|
|
|
],
|
|
@@ -762,7 +770,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
id(newVal, oldVal) {
|
|
|
- // window.scrollTo(0, 0)
|
|
|
this.bug = {}
|
|
|
this.bugModel = {}
|
|
|
this.bugNameForm = { bugName: '' }
|
|
@@ -770,6 +777,7 @@ export default {
|
|
|
this.init()
|
|
|
},
|
|
|
drawerShow(newV) {
|
|
|
+ this.init()
|
|
|
this.uploadButton = newV
|
|
|
}
|
|
|
},
|
|
@@ -818,6 +826,8 @@ 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) {
|
|
@@ -1082,42 +1092,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.init()
|
|
|
+ this.bugModel = JSON.parse(JSON.stringify(this.bug))
|
|
|
+ this.$emit('update', false)
|
|
|
+ } 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) {
|
|
@@ -1185,6 +1199,9 @@ export default {
|
|
|
statusDialogCancel() {
|
|
|
this.statusDialogVisible = false
|
|
|
},
|
|
|
+ blurAss() {
|
|
|
+ alert('ddds')
|
|
|
+ },
|
|
|
statusDialogConfirm() {
|
|
|
if (this.statusDialogTitle === '删除确认') {
|
|
|
this.bugDelete().then(res => {
|
|
@@ -1455,6 +1472,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>
|
|
@@ -1474,7 +1494,7 @@ export default {
|
|
|
border-bottom-right-radius: 4px;
|
|
|
}
|
|
|
.bug_describe {
|
|
|
- color: #C0C4CC;
|
|
|
+ color: #666666;
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
.bug_describe:hover {
|
|
@@ -1492,6 +1512,10 @@ export default {
|
|
|
</style>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
+ .str {
|
|
|
+ border: '1px solid red';
|
|
|
+ border-radius: '4px'
|
|
|
+ }
|
|
|
.current:hover{
|
|
|
border-radius: 4px;
|
|
|
border: 1px solid #DCDFE6;
|