diff --git a/src/views/xm/core/xmIteration/XmIterationAdd.vue b/src/views/xm/core/xmIteration/XmIterationAdd.vue index fb576c0b..eaad32e3 100644 --- a/src/views/xm/core/xmIteration/XmIterationAdd.vue +++ b/src/views/xm/core/xmIteration/XmIterationAdd.vue @@ -2,19 +2,10 @@
- - - {{parentIteration.seqNo}}  {{parentIteration.iterationName}} - - - 无上级 - + - - 建议:{{parentIteration.seqNo}}.1 - @@ -59,7 +50,7 @@ 'userInfo','roles' ]) }, - props:['xmIteration','visible','parentIteration'], + props:['xmIteration','visible','parentIteration','selProject','xmProduct'], watch: { 'xmIteration':function( xmIteration ) { this.addForm = xmIteration; @@ -112,22 +103,25 @@ this.$emit('cancel'); }, //新增提交XmIteration 迭代定义 父组件监听@submit="afterAddSubmit" - addSubmit: function () { - if(!this.roles.some(i=>i.roleid=='iterationAdmin')){ - this.$notify({showClose: true, message: "只有迭代管理员可以修改迭代", type: 'error' }); - return ; - } + addSubmit: function () { this.$refs.addForm.validate((valid) => { - if (valid) { + if (valid) { + var links=[]; + if(this.xmProduct){ + links.push({proId:this.xmProduct.id,ltype:'1'}) + } + if(this.selProject){ + links.push({proId:this.selProject.id,ltype:'0'}) + } + var params={...this.addForm} + params.links=links; this.$confirm('确认提交吗?', '提示', {}).then(() => { - this.load.add=true - let params = Object.assign({}, this.addForm); + this.load.add=true addXmIteration(params).then((res) => { this.load.add=false var tips=res.data.tips; - if(tips.isOk){ - this.$refs['addForm'].resetFields(); + if(tips.isOk){ this.$emit('submit',res.data.data);// @submit="afterAddSubmit" } this.$notify({showClose: true, message: tips.msg, type: tips.isOk?'success':'error' }); diff --git a/src/views/xm/core/xmIterationLink/XmIterationLinkForProject.vue b/src/views/xm/core/xmIterationLink/XmIterationLinkForProject.vue index 0abd9c8a..b21394a2 100644 --- a/src/views/xm/core/xmIterationLink/XmIterationLinkForProject.vue +++ b/src/views/xm/core/xmIterationLink/XmIterationLinkForProject.vue @@ -3,6 +3,7 @@ 选择更多项目加入迭代 选择更多迭代加入项目 + 新增迭代 @@ -28,6 +29,11 @@ + + + + +
@@ -37,12 +43,13 @@ import config from '@/common/config';//全局公共库 import { listOption } from '@/api/mdp/meta/itemOption';//下拉框数据查询 import { listXmIterationLinkWithProjectInfo,addXmIterationLink, delXmIterationLink, batchDelXmIterationLink } from '@/api/xm/core/xmIterationLink'; - import XmIterationLinkAdd from './XmIterationLinkAdd';//新增界面 - import XmIterationLinkEdit from './XmIterationLinkEdit';//修改界面 + import { mapGetters } from 'vuex' import XmProjectSelect from '../xmProject/XmProjectSelect.vue'; import XmIterationSelect from '../xmIteration/XmIterationSelect.vue'; + import XmIterationAdd from '../xmIteration/XmIterationAdd';//新增界面 + export default { props:['xmIteration','selProject'], watch:{ @@ -268,11 +275,10 @@ /**end 自定义函数请在上面加**/ },//end methods - components: { - 'xm-iteration-link-add':XmIterationLinkAdd, - 'xm-iteration-link-edit':XmIterationLinkEdit, + components: { XmProjectSelect, XmIterationSelect, + XmIterationAdd, }, mounted() { this.$nextTick(() => {