|
@@ -2,7 +2,7 @@
|
|
<div class="task">
|
|
<div class="task">
|
|
<el-dialog :title="tit_Name" :visible.sync="dialogFormVisible" width="70%" :close-on-click-modal="false" :destroy-on-close="true">
|
|
<el-dialog :title="tit_Name" :visible.sync="dialogFormVisible" width="70%" :close-on-click-modal="false" :destroy-on-close="true">
|
|
<div class="blueStripe" />
|
|
<div class="blueStripe" />
|
|
- <el-form ref="task_form" :model="task_form" :rules="task_rulesForm" label-position="right" style="margin-right: 3%;" label-width="120px">
|
|
|
|
|
|
+ <el-form ref="task_form" :model="task_form" :rules="task_rulesForm" label-position="right" style="margin-right: 3%;" label-width="130px">
|
|
<el-form-item label="任务名称" prop="name" style="width: 100%">
|
|
<el-form-item label="任务名称" prop="name" style="width: 100%">
|
|
<el-input v-model="task_form.name" autocomplete="off" placeholder="请输入任务名称" />
|
|
<el-input v-model="task_form.name" autocomplete="off" placeholder="请输入任务名称" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -16,7 +16,7 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item v-if="ascription_demand" label="归属需求" prop="requireId">
|
|
<el-form-item v-if="ascription_demand" label="归属需求" prop="requireId">
|
|
<el-select v-model="task_form.requireId" filterable clearable placeholder="请选择" style="width:20vw">
|
|
<el-select v-model="task_form.requireId" filterable clearable placeholder="请选择" style="width:20vw">
|
|
- <el-option v-for="item in demandList" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
|
|
|
+ <el-option v-for="item in demandList" :key="item.id" :label="item.name" :value="item.id" @click.native="tit_Name === '编辑任务' ? taskUpdateRequire(item.id, requirementIdList.taskId) : getRequireItem(item)" />
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item v-if="ascription_project" label="归属项目" prop="projectId">
|
|
<el-form-item v-if="ascription_project" label="归属项目" prop="projectId">
|
|
@@ -90,6 +90,14 @@
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div v-if="ascription_demand && show_schedule" style="color: #E81C1C; font-size: 12px; margin: 0 20px 10px;">
|
|
|
|
+ <i class="el-icon-warning-outline" /> {{ tit_Name === '编辑任务' ? '您选择的任务归属需求来自望岳,该任务未设置关联的望岳任务,请进行设置,以便于后续排期的同步!' : '您选择的任务归属需求来自望岳,请设置该任务关联的望岳任务,以便于后期排期的同步!' }}
|
|
|
|
+ </div>
|
|
|
|
+ <el-form-item v-if="ascription_demand && show_schedule" clearable label="关联望岳的任务" prop="taskIdFromDpm">
|
|
|
|
+ <el-select v-model="task_form.taskIdFromDpm" filterable placeholder="请选择" style="width: 100%">
|
|
|
|
+ <el-option v-for="item in arr_schedule" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer">
|
|
<div slot="footer">
|
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
|
@@ -104,7 +112,7 @@
|
|
import { mapGetters } from 'vuex'
|
|
import { mapGetters } from 'vuex'
|
|
import { analysisBizId_id, EncryptId } from '@/utils/crypto-js.js'
|
|
import { analysisBizId_id, EncryptId } from '@/utils/crypto-js.js'
|
|
const _ = require('lodash')
|
|
const _ = require('lodash')
|
|
-import { taskCreate, memberQueryMemberInfoByIDAPorName, configShowTaskEnum, configShowRequirementVersionEnum, taskGet, taskUpdate, projectListProject } from '@/api/taskIndex' // ajax
|
|
|
|
|
|
+import { taskCreate, memberQueryMemberInfoByIDAPorName, configShowTaskEnum, configShowRequirementVersionEnum, taskGet, taskUpdate, projectListProject, getRelDpmTask } from '@/api/taskIndex' // ajax
|
|
import { projectList, settingGetBizList, settingGetMyAndOtherBizList } from '@/api/projectIndex'
|
|
import { projectList, settingGetBizList, settingGetMyAndOtherBizList } from '@/api/projectIndex'
|
|
import { settingQueryBizModuleList } from '@/api/defectManage'
|
|
import { settingQueryBizModuleList } from '@/api/defectManage'
|
|
export default {
|
|
export default {
|
|
@@ -140,21 +148,23 @@ export default {
|
|
show_Client: false, // 涉及的客户端(显示)
|
|
show_Client: false, // 涉及的客户端(显示)
|
|
projectList: [], // 归属项目数据
|
|
projectList: [], // 归属项目数据
|
|
demandList: [], // 需求list
|
|
demandList: [], // 需求list
|
|
|
|
+ arr_schedule: [], // 关联望岳的任务list
|
|
|
|
+ show_schedule: false,
|
|
userInformation: localStorage.getItem('username'),
|
|
userInformation: localStorage.getItem('username'),
|
|
userNames: localStorage.getItem('realname'),
|
|
userNames: localStorage.getItem('realname'),
|
|
requirementIdList: {},
|
|
requirementIdList: {},
|
|
task_rulesForm: {
|
|
task_rulesForm: {
|
|
- name: [{ required: true, message: '请输入任务名称', trigger: 'blur' }],
|
|
|
|
- // moduleIds: [{ required: true, message: '请选择模块', trigger: 'blur' }],
|
|
|
|
- priority: [{ required: true, message: '请选择优先级', trigger: 'blur' }],
|
|
|
|
- bizId: [{ required: true, message: '请选择业务线', trigger: 'blur' }],
|
|
|
|
- source: [{ required: true, message: '请输入直接归属', trigger: 'blur' }],
|
|
|
|
- requireId: [{ required: true, message: '请选择归属需求', trigger: 'blur' }],
|
|
|
|
- projectId: [{ required: true, message: '请选择归属项目', trigger: 'blur' }],
|
|
|
|
|
|
+ name: [{ required: true, message: '请输入任务名称', trigger: 'change' }],
|
|
|
|
+ priority: [{ required: true, message: '请选择优先级', trigger: 'change' }],
|
|
|
|
+ bizId: [{ required: true, message: '请选择业务线', trigger: 'change' }],
|
|
|
|
+ source: [{ required: true, message: '请输入直接归属', trigger: 'change' }],
|
|
|
|
+ requireId: [{ required: true, message: '请选择归属需求', trigger: 'change' }],
|
|
|
|
+ projectId: [{ required: true, message: '请选择归属项目', trigger: 'change' }],
|
|
followVersion: [{ required: true, message: '请选择是否跟版', trigger: 'blur' }],
|
|
followVersion: [{ required: true, message: '请选择是否跟版', trigger: 'blur' }],
|
|
notest: [{ required: true, message: '请选择是否免测', trigger: 'blur' }],
|
|
notest: [{ required: true, message: '请选择是否免测', trigger: 'blur' }],
|
|
cliType: [{ required: true, message: '请选择业务/平台/模块', trigger: 'blur' }],
|
|
cliType: [{ required: true, message: '请选择业务/平台/模块', trigger: 'blur' }],
|
|
- involveApp: [{ required: true, message: '请选择涉及的客户端', trigger: 'blur' }]
|
|
|
|
|
|
+ involveApp: [{ required: true, message: '请选择涉及的客户端', trigger: 'blur' }],
|
|
|
|
+ taskIdFromDpm: [{ required: true, message: '请选择关联望岳的任务', trigger: 'change' }]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -184,7 +194,7 @@ export default {
|
|
this.ascription_demand = false
|
|
this.ascription_demand = false
|
|
this.ascription_project = false
|
|
this.ascription_project = false
|
|
this.task_form = { 'notest': 0, 'followVersion': 2, 'source': 1, 'bizId': this.bizId }
|
|
this.task_form = { 'notest': 0, 'followVersion': 2, 'source': 1, 'bizId': this.bizId }
|
|
- this.requirementIdList = { 'name': '主页' }
|
|
|
|
|
|
+ this.requirementIdList = { 'name': '主页', 'data': {}}
|
|
this.show_Client = false
|
|
this.show_Client = false
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
this.$refs['task_form'].clearValidate()
|
|
this.$refs['task_form'].clearValidate()
|
|
@@ -206,6 +216,7 @@ export default {
|
|
case 3: // 编辑任务(任务详情)
|
|
case 3: // 编辑任务(任务详情)
|
|
this.tit_Name = '编辑任务'
|
|
this.tit_Name = '编辑任务'
|
|
taskGet(id[1]).then(res => {
|
|
taskGet(id[1]).then(res => {
|
|
|
|
+ this.requirementIdList = { 'name': '需求', 'data': res.data.requireId, taskId: res.data.id }
|
|
this.dialogFormVisible = true
|
|
this.dialogFormVisible = true
|
|
var that = this
|
|
var that = this
|
|
setTimeout(function() {
|
|
setTimeout(function() {
|
|
@@ -233,6 +244,7 @@ export default {
|
|
}, [])
|
|
}, [])
|
|
}, 100)
|
|
}, 100)
|
|
this.task_change_bizId(res.data.bizId, res.data.id)
|
|
this.task_change_bizId(res.data.bizId, res.data.id)
|
|
|
|
+ this.taskUpdateRequire(res.data.requireId, res.data.id)
|
|
})
|
|
})
|
|
break
|
|
break
|
|
case 4: // 新建任务(需求详情)
|
|
case 4: // 新建任务(需求详情)
|
|
@@ -252,6 +264,7 @@ export default {
|
|
this.requirementIdList = { 'name': '需求', 'data': data.requirementId }
|
|
this.requirementIdList = { 'name': '需求', 'data': data.requirementId }
|
|
}
|
|
}
|
|
this.task_change_bizId(this.bizId)
|
|
this.task_change_bizId(this.bizId)
|
|
|
|
+ this.taskUpdateRequire(ss.id)
|
|
})
|
|
})
|
|
break
|
|
break
|
|
}
|
|
}
|
|
@@ -397,13 +410,16 @@ export default {
|
|
this.$set(this.task_form, 'bizId', this.bizId)
|
|
this.$set(this.task_form, 'bizId', this.bizId)
|
|
this.$set(this.task_form, 'requireId', '')
|
|
this.$set(this.task_form, 'requireId', '')
|
|
this.$set(this.task_form, 'projectId', '')
|
|
this.$set(this.task_form, 'projectId', '')
|
|
|
|
+ this.$set(this.task_form, 'taskIdFromDpm', '')
|
|
this.bugDataGet(this.bizId)
|
|
this.bugDataGet(this.bizId)
|
|
break
|
|
break
|
|
case 2:
|
|
case 2:
|
|
|
|
+ this.show_schedule = false
|
|
this.ascription_demand = true
|
|
this.ascription_demand = true
|
|
this.ascription_project = false
|
|
this.ascription_project = false
|
|
this.requirementIdList.name === '需求' ? this.$set(this.task_form, 'requireId', this.requirementIdList.data) : this.$set(this.task_form, 'requireId', '')
|
|
this.requirementIdList.name === '需求' ? this.$set(this.task_form, 'requireId', this.requirementIdList.data) : this.$set(this.task_form, 'requireId', '')
|
|
this.$set(this.task_form, 'projectId', '')
|
|
this.$set(this.task_form, 'projectId', '')
|
|
|
|
+ this.tit_Name === '编辑任务' ? this.taskUpdateRequire(this.requirementIdList.data, this.requirementIdList.taskId) : this.getRequireItem({ id: this.requirementIdList.data })
|
|
break
|
|
break
|
|
case 3:
|
|
case 3:
|
|
this.ascription_demand = false
|
|
this.ascription_demand = false
|
|
@@ -411,6 +427,7 @@ export default {
|
|
this.$set(this.task_form, 'bizId', this.bizId)
|
|
this.$set(this.task_form, 'bizId', this.bizId)
|
|
this.requirementIdList.name === '项目' ? this.$set(this.task_form, 'projectId', this.requirementIdList.data) : this.$set(this.task_form, 'projectId', '')
|
|
this.requirementIdList.name === '项目' ? this.$set(this.task_form, 'projectId', this.requirementIdList.data) : this.$set(this.task_form, 'projectId', '')
|
|
this.$set(this.task_form, 'requireId', '')
|
|
this.$set(this.task_form, 'requireId', '')
|
|
|
|
+ this.$set(this.task_form, 'taskIdFromDpm', '')
|
|
this.bugDataGet(this.bizId)
|
|
this.bugDataGet(this.bizId)
|
|
break
|
|
break
|
|
}
|
|
}
|
|
@@ -430,6 +447,23 @@ export default {
|
|
e === 1 ? this.show_Client = true : ''
|
|
e === 1 ? this.show_Client = true : ''
|
|
e === 2 ? this.show_Client = false : ''
|
|
e === 2 ? this.show_Client = false : ''
|
|
},
|
|
},
|
|
|
|
+ async taskUpdateRequire(requireId, id) {
|
|
|
|
+ const res = await getRelDpmTask({ requireId: requireId, taskId: id })
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ const show = res.data.relDpm
|
|
|
|
+ show ? this.show_schedule = show : this.show_schedule = show
|
|
|
|
+ this.arr_schedule = res.data.tasks
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ async getRequireItem(val) {
|
|
|
|
+ if (val) {
|
|
|
|
+ const res = await getRelDpmTask({ requireId: val.id })
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.show_schedule = res.data.relDpm
|
|
|
|
+ this.arr_schedule = res.data.tasks
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
bugDataGet(bizId) { // 所属模块
|
|
bugDataGet(bizId) { // 所属模块
|
|
settingQueryBizModuleList(bizId).then(res => {
|
|
settingQueryBizModuleList(bizId).then(res => {
|
|
this.business_platform_Modular = res.data.map(item => ({
|
|
this.business_platform_Modular = res.data.map(item => ({
|