|
@@ -16,12 +16,12 @@
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
<div style="display:flex;">
|
|
|
- <el-form-item style="flex-grow:1" prop="taskId" label="任务" :label-width="formLabelWidth1">
|
|
|
- <el-select v-model="form.taskId" filterable placeholder="任务" style="width:54.5%;">
|
|
|
+ <el-form-item style="flex-grow:1" prop="taskId" label="任务" label-width="99px">
|
|
|
+ <el-select v-model="form.taskId" filterable placeholder="任务" style="width: 245px;margin-right: -50px;" @change="submitJudge(form.taskId)">
|
|
|
<el-option v-for="item in taskIdStr" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item style="flex-grow:1" label="业务模块" :label-width="formLabelWidth1">
|
|
|
+ <el-form-item v-if="businessTypeShow" style="flex-grow:1" prop="businessType" label="业务模块" :label-width="formLabelWidth1">
|
|
|
<el-select ref="clearBusiness" v-model="form.businessType" placeholder="业务模块" style="width:54.5%;">
|
|
|
<el-option v-for="item in businessTypeStr" :key="item.name" :label="item.name" :value="item.name" />
|
|
|
</el-select>
|
|
@@ -77,6 +77,7 @@
|
|
|
type="datetime"
|
|
|
placeholder="选择时间"
|
|
|
style="width:53%;"
|
|
|
+ value-format="yyyy-MM-dd HH:hh:mm"
|
|
|
/></el-form-item>
|
|
|
</div>
|
|
|
<div style="display:flex;">
|
|
@@ -86,6 +87,7 @@
|
|
|
type="datetime"
|
|
|
placeholder="选择时间"
|
|
|
style="width:54%;"
|
|
|
+ value-format="yyyy-MM-dd HH:hh:mm"
|
|
|
/></el-form-item>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -126,7 +128,7 @@
|
|
|
</el-upload>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-input type="textarea" rows="5" />
|
|
|
+ <el-input v-model="form.remark" type="textarea" autocomplete="off" rows="5" />
|
|
|
<el-form-item class="submit">
|
|
|
<el-button size="mini" type="primary" @click="createFormData(form)">提 交</el-button>
|
|
|
<el-button class="move-button" size="mini" @click="$router.go(-1)">取 消</el-button>
|
|
@@ -210,12 +212,14 @@ export default {
|
|
|
stage: [{ required: true, message: '所处阶段不能为空', trigger: 'change' }],
|
|
|
assigner: [{ required: true, message: 'bug责任人不能为空', trigger: 'change' }],
|
|
|
currentHandler: [{ required: true, message: 'bug处理人不能为空', trigger: 'change' }],
|
|
|
- bugDescribe: [{ required: true, message: 'bug描述不能为空', trigger: 'change' }]
|
|
|
- // businessType: [{ required: true, message: '业务模块不能为空', trigger: 'change' }]
|
|
|
+ bugDescribe: [{ required: true, message: 'bug描述不能为空', trigger: 'change' }],
|
|
|
+ businessType: [{ required: true, message: '业务模块不能为空', trigger: 'change' }]
|
|
|
},
|
|
|
formLabelWidth: '11%',
|
|
|
formLabelWidth1: '22%',
|
|
|
userData: '',
|
|
|
+ submitMissionJudge: '',
|
|
|
+ businessTypeShow: false,
|
|
|
userInformation: localStorage.getItem('username'),
|
|
|
userNames: localStorage.getItem('realname')
|
|
|
}
|
|
@@ -247,6 +251,10 @@ export default {
|
|
|
this.$set(this.form, 'taskId', res.data.name)
|
|
|
this.$set(this.form, 'bizId', res.data.bizIdString)
|
|
|
this.$set(this.form, 'platformType', res.data.typeString)
|
|
|
+ if (res.data.clientType) {
|
|
|
+ this.businessTypeShow = true
|
|
|
+ this.$set(this.form, 'businessType', res.data.clientType)
|
|
|
+ }
|
|
|
this.$set(this.form, 'businessType', res.data.clientType)
|
|
|
this.platformTypeStr = this.bizOptions.filter(value => value.code === res.data.bizId)[0].child
|
|
|
if (this.form.businessType) {
|
|
@@ -281,12 +289,16 @@ export default {
|
|
|
// 业务线取子数据
|
|
|
clickChangeBusiness(e) {
|
|
|
if (this.platformTypeStr.filter(value => value.name === e)[0].child) {
|
|
|
+ this.businessTypeShow = true
|
|
|
this.businessTypeStr = this.platformTypeStr.filter(value => value.name === e)[0].child
|
|
|
} else {
|
|
|
- this.businessTypeStr = ''
|
|
|
+ this.businessTypeShow = false
|
|
|
}
|
|
|
this.$set(this.form, 'businessType', '')
|
|
|
},
|
|
|
+ submitJudge(e) {
|
|
|
+ this.submitMissionJudge = e
|
|
|
+ },
|
|
|
// 提交表单并且返回刷新
|
|
|
createFormData(form) {
|
|
|
this.$refs.form.validate((valid) => {
|
|
@@ -294,14 +306,16 @@ export default {
|
|
|
if (this.$route.query.id && typeof this.form.bizId === 'string') {
|
|
|
form.bizId = this.bizOptions.filter(value => value.name === form.bizId)[0].code
|
|
|
}
|
|
|
- if (this.$route.query.id) {
|
|
|
+ if (this.$route.query.id && !this.submitMissionJudge) {
|
|
|
form.taskId = this.taskIdStr.filter(value => value.name === form.taskId)[0].id
|
|
|
}
|
|
|
+ console.log(form)
|
|
|
// form.bizId = this.bizJson
|
|
|
this.userData = { id: '', ename: this.userInformation, name: this.userNames }
|
|
|
this.objData = { bugBaseInfo: form, user: this.userData }
|
|
|
bugCreate(this.objData).then(res => {
|
|
|
res.code === 200 ? this.successFun() : this.errorFun()
|
|
|
+ this.submitMissionJudge = ''
|
|
|
this.$router.go(-1)
|
|
|
})
|
|
|
}
|