Browse Source

迭代优化

master
陈裕财 4 years ago
parent
commit
2847b64051
  1. 12
      src/api/xm/core/xmIterationLink.js
  2. 6
      src/views/xm/core/xmIteration/XmIterationForProjectComplex.vue
  3. 8
      src/views/xm/core/xmIteration/XmIterationMng.vue
  4. 6
      src/views/xm/core/xmIteration/XmIterationOverviewComplex.vue
  5. 18
      src/views/xm/core/xmIterationLink/XmIterationLinkAdd.vue
  6. 20
      src/views/xm/core/xmIterationLink/XmIterationLinkEdit.vue
  7. 76
      src/views/xm/core/xmIterationLink/XmIterationLinkMng.vue
  8. 8
      src/views/xm/core/xmProduct/XmProductMng.vue
  9. 6
      src/views/xm/core/xmProduct/XmProductOverviewComplex.vue
  10. 8
      src/views/xm/core/xmProduct/XmProductTplMng.vue

12
src/api/xm/core/xmIterationLink.js

@ -12,19 +12,19 @@ let base = config.getCoreBasePath();
**/ **/
//普通查询 条件之间and关系 //普通查询 条件之间and关系
export const listXmIterationProductLink = params => { return axios.get(`${base}/xm/core/xmIterationProductLink/list`, { params: params }); };
export const listXmIterationLink = params => { return axios.get(`${base}/xm/core/xmIterationLink/list`, { params: params }); };
//模糊查询迭代表与产品表的关联关系,一般由迭代管理员将迭代挂接到产品表 条件之间or关系 //模糊查询迭代表与产品表的关联关系,一般由迭代管理员将迭代挂接到产品表 条件之间or关系
//export const listXmIterationProductLinkKey = params => { return axios.get(`${base}/xm/core/xmIterationProductLink/listKey`, { params: params }); };
//export const listXmIterationLinkKey = params => { return axios.get(`${base}/xm/core/xmIterationLink/listKey`, { params: params }); };
//删除一条迭代表与产品表的关联关系,一般由迭代管理员将迭代挂接到产品表 params={iterationId:'迭代表主键 主键',productId:'产品表主键 主键'} //删除一条迭代表与产品表的关联关系,一般由迭代管理员将迭代挂接到产品表 params={iterationId:'迭代表主键 主键',productId:'产品表主键 主键'}
export const delXmIterationProductLink = params => { return axios.post(`${base}/xm/core/xmIterationProductLink/del`,params); };
export const delXmIterationLink = params => { return axios.post(`${base}/xm/core/xmIterationLink/del`,params); };
//批量删除迭代表与产品表的关联关系,一般由迭代管理员将迭代挂接到产品表 params=[{iterationId:'迭代表主键 主键',productId:'产品表主键 主键'}] //批量删除迭代表与产品表的关联关系,一般由迭代管理员将迭代挂接到产品表 params=[{iterationId:'迭代表主键 主键',productId:'产品表主键 主键'}]
export const batchDelXmIterationProductLink = params => { return axios.post(`${base}/xm/core/xmIterationProductLink/batchDel`, params); };
export const batchDelXmIterationLink = params => { return axios.post(`${base}/xm/core/xmIterationLink/batchDel`, params); };
//修改一条迭代表与产品表的关联关系,一般由迭代管理员将迭代挂接到产品表记录 //修改一条迭代表与产品表的关联关系,一般由迭代管理员将迭代挂接到产品表记录
export const editXmIterationProductLink = params => { return axios.post(`${base}/xm/core/xmIterationProductLink/edit`, params); };
export const editXmIterationLink = params => { return axios.post(`${base}/xm/core/xmIterationLink/edit`, params); };
//新增一条迭代表与产品表的关联关系,一般由迭代管理员将迭代挂接到产品表 //新增一条迭代表与产品表的关联关系,一般由迭代管理员将迭代挂接到产品表
export const addXmIterationProductLink = params => { return axios.post(`${base}/xm/core/xmIterationProductLink/add`, params); };
export const addXmIterationLink = params => { return axios.post(`${base}/xm/core/xmIterationLink/add`, params); };

6
src/views/xm/core/xmIteration/XmIterationForProjectComplex.vue

@ -47,7 +47,7 @@
import util from '@/common/js/util';// import util from '@/common/js/util';//
import config from '@/common/config';// import config from '@/common/config';//
import { listOption } from '@/api/mdp/meta/itemOption';// import { listOption } from '@/api/mdp/meta/itemOption';//
import { delXmIterationProductLink } from '@/api/xm/core/xmIterationProductLink';
import { delXmIterationLink } from '@/api/xm/core/xmIterationLink';
import XmIterationSelect from './XmIterationSelect.vue' import XmIterationSelect from './XmIterationSelect.vue'
import XmMenuMng from '../xmMenu/XmMenuMng.vue' import XmMenuMng from '../xmMenu/XmMenuMng.vue'
@ -156,10 +156,10 @@
} }
this.showPanel=tab.name this.showPanel=tab.name
}, },
doDelXmIterationProductLink(){
doDelXmIterationLink(){
this.$confirm('移出后,迭代试图将看不到该产品信息,确认将产品【'+this.xmProduct.productName+'】从迭代【'+this.xmIteration.iterationName+'】移出吗?', '提示', {}).then(() => { this.$confirm('移出后,迭代试图将看不到该产品信息,确认将产品【'+this.xmProduct.productName+'】从迭代【'+this.xmIteration.iterationName+'】移出吗?', '提示', {}).then(() => {
var params={iterationId:this.xmIteration.id,productId:this.xmProduct.id} var params={iterationId:this.xmIteration.id,productId:this.xmProduct.id}
delXmIterationProductLink(params).then(res=>{
delXmIterationLink(params).then(res=>{
var tips = res.data.tips; var tips = res.data.tips;
if(tips.isOk){ if(tips.isOk){
this.$notify({showClose: true, message:"移出成功", type: tips.isOk?'success':'error' }); this.$notify({showClose: true, message:"移出成功", type: tips.isOk?'success':'error' });

8
src/views/xm/core/xmIteration/XmIterationMng.vue

@ -131,7 +131,7 @@
import config from '@/common/config';// import config from '@/common/config';//
import { listOption } from '@/api/mdp/meta/itemOption';// import { listOption } from '@/api/mdp/meta/itemOption';//
import { listXmIteration,listXmIterationWithState, delXmIteration, batchDelXmIteration,loadTasksToXmIterationState } from '@/api/xm/core/xmIteration'; import { listXmIteration,listXmIterationWithState, delXmIteration, batchDelXmIteration,loadTasksToXmIterationState } from '@/api/xm/core/xmIteration';
import { addXmIterationProductLink,delXmIterationProductLink } from '@/api/xm/core/xmIterationProductLink';
import { addXmIterationLink,delXmIterationLink } from '@/api/xm/core/xmIterationLink';
import XmIterationAdd from './XmIterationAdd';// import XmIterationAdd from './XmIterationAdd';//
import XmIterationEdit from './XmIterationEdit';// import XmIterationEdit from './XmIterationEdit';//
@ -491,7 +491,7 @@ import XmIterationSelect from './XmIterationSelect.vue';
this.$confirm('确认将产品【'+xmProduct.productName+'】加入迭代计划【'+xmIteration.iterationName+'】吗?', '提示', { this.$confirm('确认将产品【'+xmProduct.productName+'】加入迭代计划【'+xmIteration.iterationName+'】吗?', '提示', {
type: 'warning' type: 'warning'
}).then(()=>{ }).then(()=>{
addXmIterationProductLink({iterationId:xmIteration.id,productId:xmProduct.id}).then(res=>{
addXmIterationLink({iterationId:xmIteration.id,productId:xmProduct.id}).then(res=>{
var tips =res.data.tips; var tips =res.data.tips;
if(tips.isOk){ if(tips.isOk){
this.getXmIterations(); this.getXmIterations();
@ -500,13 +500,13 @@ import XmIterationSelect from './XmIterationSelect.vue';
}) })
}) })
}, },
doDelXmIterationProductLink(row){
doDelXmIterationLink(row){
var xmIteration=row; var xmIteration=row;
var xmProduct=this.xmProduct; var xmProduct=this.xmProduct;
this.$confirm('确认将产品【'+xmProduct.productName+'】与迭代【'+xmIteration.iterationName+'】进行脱钩吗?脱钩后,产品与迭代互相查看不到对方信息。', '提示', { this.$confirm('确认将产品【'+xmProduct.productName+'】与迭代【'+xmIteration.iterationName+'】进行脱钩吗?脱钩后,产品与迭代互相查看不到对方信息。', '提示', {
type: 'warning' type: 'warning'
}).then(()=>{ }).then(()=>{
delXmIterationProductLink({iterationId:xmIteration.id,productId:xmProduct.id}).then(res=>{
delXmIterationLink({iterationId:xmIteration.id,productId:xmProduct.id}).then(res=>{
var tips =res.data.tips; var tips =res.data.tips;
if(tips.isOk){ if(tips.isOk){
this.getXmIterations(); this.getXmIterations();

6
src/views/xm/core/xmIteration/XmIterationOverviewComplex.vue

@ -19,7 +19,7 @@
</el-menu> </el-menu>
<xm-iteration-overview v-if="showPanelName=='overview'" :xm-iteration="xmIteration"></xm-iteration-overview> <xm-iteration-overview v-if="showPanelName=='overview'" :xm-iteration="xmIteration"></xm-iteration-overview>
<xm-iteration-edit v-if="showPanelName=='detail'" :xm-iteration="xmIteration"></xm-iteration-edit> <xm-iteration-edit v-if="showPanelName=='detail'" :xm-iteration="xmIteration"></xm-iteration-edit>
<xm-iteration-product-link-mng v-if="showPanelName=='iterationProductLink'" :xm-iteration="xmIteration"></xm-iteration-product-link-mng>
<xm-iteration-link-mng v-if="showPanelName=='iterationProductLink'" :xm-iteration="xmIteration"></xm-iteration-link-mng>
<xm-iteration-menu-mng v-if="showPanelName=='iterationMenuMng'" :xm-iteration="xmIteration"></xm-iteration-menu-mng> <xm-iteration-menu-mng v-if="showPanelName=='iterationMenuMng'" :xm-iteration="xmIteration"></xm-iteration-menu-mng>
</section> </section>
</template> </template>
@ -30,12 +30,12 @@ import util from "@/common/js/util"; // 全局公共库
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import XmIterationOverview from './XmIterationOverview.vue'; import XmIterationOverview from './XmIterationOverview.vue';
import XmIterationEdit from './XmIterationEdit.vue'; import XmIterationEdit from './XmIterationEdit.vue';
import XmIterationProductLinkMng from '../xmIterationProductLink/XmIterationProductLinkMng.vue';
import XmIterationLinkMng from '../xmIterationLink/XmIterationLinkMng.vue';
import XmIterationMenuMng from '../xmIterationMenu/XmIterationMenuMng.vue'; import XmIterationMenuMng from '../xmIterationMenu/XmIterationMenuMng.vue';
export default { export default {
components: {XmIterationOverview,XmIterationEdit, XmIterationProductLinkMng, XmIterationMenuMng },
components: {XmIterationOverview,XmIterationEdit, XmIterationLinkMng, XmIterationMenuMng },
computed: { computed: {
...mapGetters(["userInfo"]), ...mapGetters(["userInfo"]),
}, },

18
src/views/xm/core/xmIterationLink/XmIterationLinkAdd.vue

@ -1,7 +1,7 @@
<template> <template>
<section> <section>
<el-row> <el-row>
<!--新增界面 XmIterationProductLink 迭代表与产品表的关联关系一般由迭代管理员将迭代挂接到产品表-->
<!--新增界面 XmIterationLink 迭代表与产品表的关联关系一般由迭代管理员将迭代挂接到产品表-->
<el-form :model="addForm" label-width="120px" :rules="addFormRules" ref="addForm"> <el-form :model="addForm" label-width="120px" :rules="addFormRules" ref="addForm">
<el-form-item label="迭代表主键" prop="iterationId"> <el-form-item label="迭代表主键" prop="iterationId">
<el-input v-model="addForm.iterationId" placeholder="迭代表主键" ></el-input> <el-input v-model="addForm.iterationId" placeholder="迭代表主键" ></el-input>
@ -35,7 +35,7 @@
<script> <script>
import util from '@/common/js/util';// import util from '@/common/js/util';//
import { listOption } from '@/api/mdp/meta/itemOption';// import { listOption } from '@/api/mdp/meta/itemOption';//
import { addXmIterationProductLink } from '@/api/xm/core/xmIterationProductLink';
import { addXmIterationLink } from '@/api/xm/core/xmIterationLink';
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
@ -44,10 +44,10 @@
'userInfo' 'userInfo'
]) ])
}, },
props:['xmIterationProductLink','visible'],
props:['xmIterationLink','visible'],
watch: { watch: {
'xmIterationProductLink':function( xmIterationProductLink ) {
this.addForm = xmIterationProductLink;
'xmIterationLink':function( xmIterationLink ) {
this.addForm = xmIterationLink;
}, },
'visible':function(visible) { 'visible':function(visible) {
if(visible==true){ if(visible==true){
@ -79,7 +79,7 @@
this.$refs['addForm'].resetFields(); this.$refs['addForm'].resetFields();
this.$emit('cancel'); this.$emit('cancel');
}, },
//XmIterationProductLink @submit="afterAddSubmit"
//XmIterationLink @submit="afterAddSubmit"
addSubmit: function () { addSubmit: function () {
this.$refs.addForm.validate((valid) => { this.$refs.addForm.validate((valid) => {
@ -88,7 +88,7 @@
this.$confirm('确认提交吗?', '提示', {}).then(() => { this.$confirm('确认提交吗?', '提示', {}).then(() => {
this.load.add=true this.load.add=true
let params = Object.assign({}, this.addForm); let params = Object.assign({}, this.addForm);
addXmIterationProductLink(params).then((res) => {
addXmIterationLink(params).then((res) => {
this.load.add=false this.load.add=false
var tips=res.data.tips; var tips=res.data.tips;
if(tips.isOk){ if(tips.isOk){
@ -107,10 +107,10 @@
},//end method },//end method
components: { components: {
// 'xm-iteration-product-link-edit':XmIterationProductLinkEdit
// 'xm-iteration-link-edit':XmIterationLinkEdit
}, },
mounted() { mounted() {
this.addForm=Object.assign(this.addForm, this.xmIterationProductLink);
this.addForm=Object.assign(this.addForm, this.xmIterationLink);
/**在下面写其它函数***/ /**在下面写其它函数***/
}//end mounted }//end mounted

20
src/views/xm/core/xmIterationLink/XmIterationLinkEdit.vue

@ -1,7 +1,7 @@
<template> <template>
<section> <section>
<el-row> <el-row>
<!--编辑界面 XmIterationProductLink 迭代表与产品表的关联关系一般由迭代管理员将迭代挂接到产品表-->
<!--编辑界面 XmIterationLink 迭代表与产品表的关联关系一般由迭代管理员将迭代挂接到产品表-->
<el-form :model="editForm" label-width="120px" :rules="editFormRules" ref="editForm"> <el-form :model="editForm" label-width="120px" :rules="editFormRules" ref="editForm">
<el-form-item label="迭代表主键" prop="iterationId"> <el-form-item label="迭代表主键" prop="iterationId">
<el-input v-model="editForm.iterationId" placeholder="迭代表主键"></el-input> <el-input v-model="editForm.iterationId" placeholder="迭代表主键"></el-input>
@ -35,7 +35,7 @@
<script> <script>
import util from '@/common/js/util';// import util from '@/common/js/util';//
import { listOption } from '@/api/mdp/meta/itemOption';// import { listOption } from '@/api/mdp/meta/itemOption';//
import { editXmIterationProductLink } from '@/api/xm/core/xmIterationProductLink';
import { editXmIterationLink } from '@/api/xm/core/xmIterationLink';
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
@ -44,10 +44,10 @@
'userInfo' 'userInfo'
]) ])
}, },
props:['xmIterationProductLink','visible'],
props:['xmIterationLink','visible'],
watch: { watch: {
'xmIterationProductLink':function( xmIterationProductLink ) {
this.editForm = xmIterationProductLink;
'xmIterationLink':function( xmIterationLink ) {
this.editForm = xmIterationLink;
}, },
'visible':function(visible) { 'visible':function(visible) {
if(visible==true){ if(visible==true){
@ -64,7 +64,7 @@
//{ required: true, message: '', trigger: 'blur' } //{ required: true, message: '', trigger: 'blur' }
] ]
}, },
// XmIterationProductLink
// XmIterationLink
editForm: { editForm: {
iterationId:'',productId:'',ctime:'',cuserid:'',cusername:'',linkStatus:'' iterationId:'',productId:'',ctime:'',cuserid:'',cusername:'',linkStatus:''
} }
@ -79,14 +79,14 @@
this.$refs['editForm'].resetFields(); this.$refs['editForm'].resetFields();
this.$emit('cancel'); this.$emit('cancel');
}, },
//XmIterationProductLink @submit="afterEditSubmit"
//XmIterationLink @submit="afterEditSubmit"
editSubmit: function () { editSubmit: function () {
this.$refs.editForm.validate((valid) => { this.$refs.editForm.validate((valid) => {
if (valid) { if (valid) {
this.$confirm('确认提交吗?', '提示', {}).then(() => { this.$confirm('确认提交吗?', '提示', {}).then(() => {
this.load.edit=true this.load.edit=true
let params = Object.assign({}, this.editForm); let params = Object.assign({}, this.editForm);
editXmIterationProductLink(params).then((res) => {
editXmIterationLink(params).then((res) => {
this.load.edit=false this.load.edit=false
var tips=res.data.tips; var tips=res.data.tips;
if(tips.isOk){ if(tips.isOk){
@ -104,10 +104,10 @@
/**end 在上面加自定义方法**/ /**end 在上面加自定义方法**/
},//end method },//end method
components: { components: {
// 'xm-iteration-product-link-edit':XmIterationProductLinkEdit
// 'xm-iteration-link-edit':XmIterationLinkEdit
}, },
mounted() { mounted() {
this.editForm=Object.assign(this.editForm, this.xmIterationProductLink);
this.editForm=Object.assign(this.editForm, this.xmIterationLink);
} }
} }

76
src/views/xm/core/xmIterationLink/XmIterationLinkMng.vue

@ -5,8 +5,8 @@
<el-button type="primary" v-if="xmProduct" @click="iterationVisible=true" icon="el-icon-plus" > 选择更多迭代加入产品 </el-button> <el-button type="primary" v-if="xmProduct" @click="iterationVisible=true" icon="el-icon-plus" > 选择更多迭代加入产品 </el-button>
</el-row> </el-row>
<el-row style="padding-top:10px;"> <el-row style="padding-top:10px;">
<!--列表 XmIterationProductLink 迭代表与产品表的关联关系一般由迭代管理员将迭代挂接到产品表-->
<el-table ref="xmIterationProductLink" :data="xmIterationProductLinks" :height="maxTableHeight" @sort-change="sortChange" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<!--列表 XmIterationLink 迭代表与产品表的关联关系一般由迭代管理员将迭代挂接到产品表-->
<el-table ref="xmIterationLink" :data="xmIterationLinks" :height="maxTableHeight" @sort-change="sortChange" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<el-table-column prop="iterationName" v-if="!xmIteration" label="包含的迭代名称" min-width="150" ></el-table-column> <el-table-column prop="iterationName" v-if="!xmIteration" label="包含的迭代名称" min-width="150" ></el-table-column>
<el-table-column prop="productName" v-if="!xmProduct" label="包含的产品名称" min-width="150" ></el-table-column> <el-table-column prop="productName" v-if="!xmProduct" label="包含的产品名称" min-width="150" ></el-table-column>
<el-table-column prop="ctime" label="加入时间" min-width="80" ></el-table-column> <el-table-column prop="ctime" label="加入时间" min-width="80" ></el-table-column>
@ -36,9 +36,9 @@
import util from '@/common/js/util';// import util from '@/common/js/util';//
import config from '@/common/config';// import config from '@/common/config';//
import { listOption } from '@/api/mdp/meta/itemOption';// import { listOption } from '@/api/mdp/meta/itemOption';//
import { listXmIterationProductLink,addXmIterationProductLink, delXmIterationProductLink, batchDelXmIterationProductLink } from '@/api/xm/core/xmIterationProductLink';
import XmIterationProductLinkAdd from './XmIterationProductLinkAdd';//
import XmIterationProductLinkEdit from './XmIterationProductLinkEdit';//
import { listXmIterationLink,addXmIterationLink, delXmIterationLink, batchDelXmIterationLink } from '@/api/xm/core/xmIterationLink';
import XmIterationLinkAdd from './XmIterationLinkAdd';//
import XmIterationLinkEdit from './XmIterationLinkEdit';//
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import XmProductSelect from '../xmProduct/XmProductSelect.vue'; import XmProductSelect from '../xmProduct/XmProductSelect.vue';
import XmIterationSelect from '../xmIteration/XmIterationSelect.vue'; import XmIterationSelect from '../xmIteration/XmIterationSelect.vue';
@ -47,10 +47,10 @@ import XmIterationSelect from '../xmIteration/XmIterationSelect.vue';
props:['xmIteration','xmProduct'], props:['xmIteration','xmProduct'],
watch:{ watch:{
xmIteration(){ xmIteration(){
this.getXmIterationProductLinks();
this.getXmIterationLinks();
}, },
xmProduct(){ xmProduct(){
this.getXmIterationProductLinks();
this.getXmIterationLinks();
} }
}, },
computed: { computed: {
@ -63,7 +63,7 @@ import XmIterationSelect from '../xmIteration/XmIterationSelect.vue';
filters: { filters: {
key: '' key: ''
}, },
xmIterationProductLinks: [],//
xmIterationLinks: [],//
pageInfo:{// pageInfo:{//
total:0,//0>0 total:0,//0>0
pageSize:10,// pageSize:10,//
@ -78,14 +78,14 @@ import XmIterationSelect from '../xmIteration/XmIterationSelect.vue';
//sex:[], //sex:[],
},// params=[{categoryId:'0001',itemCode:'sex'}] {'sex':[{optionValue:'1',optionName:'',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'',seqOrder:'2',fp:'',isDefault:'0'}]} },// params=[{categoryId:'0001',itemCode:'sex'}] {'sex':[{optionValue:'1',optionName:'',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'',seqOrder:'2',fp:'',isDefault:'0'}]}
addFormVisible: false,//xmIterationProductLink
//xmIterationProductLink
addFormVisible: false,//xmIterationLink
//xmIterationLink
addForm: { addForm: {
iterationId:'',productId:'',ctime:'',cuserid:'',cusername:'',linkStatus:'' iterationId:'',productId:'',ctime:'',cuserid:'',cusername:'',linkStatus:''
}, },
editFormVisible: false,// editFormVisible: false,//
//xmIterationProductLink
//xmIterationLink
editForm: { editForm: {
iterationId:'',productId:'',ctime:'',cuserid:'',cusername:'',linkStatus:'' iterationId:'',productId:'',ctime:'',cuserid:'',cusername:'',linkStatus:''
}, },
@ -97,11 +97,11 @@ import XmIterationSelect from '../xmIteration/XmIterationSelect.vue';
methods: { methods: {
handleSizeChange(pageSize) { handleSizeChange(pageSize) {
this.pageInfo.pageSize=pageSize; this.pageInfo.pageSize=pageSize;
this.getXmIterationProductLinks();
this.getXmIterationLinks();
}, },
handleCurrentChange(pageNum) { handleCurrentChange(pageNum) {
this.pageInfo.pageNum = pageNum; this.pageInfo.pageNum = pageNum;
this.getXmIterationProductLinks();
this.getXmIterationLinks();
}, },
// obj.order=ascending/descending, asc/desc ; obj.prop=, // obj.order=ascending/descending, asc/desc ; obj.prop=,
sortChange( obj ){ sortChange( obj ){
@ -119,14 +119,14 @@ import XmIterationSelect from '../xmIteration/XmIterationSelect.vue';
this.pageInfo.orderFields=[util.toLine(obj.prop)]; this.pageInfo.orderFields=[util.toLine(obj.prop)];
this.pageInfo.orderDirs=[dir]; this.pageInfo.orderDirs=[dir];
} }
this.getXmIterationProductLinks();
this.getXmIterationLinks();
}, },
searchXmIterationProductLinks(){
searchXmIterationLinks(){
this.pageInfo.count=true; this.pageInfo.count=true;
this.getXmIterationProductLinks();
this.getXmIterationLinks();
}, },
// XmIterationProductLink
getXmIterationProductLinks() {
// XmIterationLink
getXmIterationLinks() {
let params = { let params = {
pageSize: this.pageInfo.pageSize, pageSize: this.pageInfo.pageSize,
pageNum: this.pageInfo.pageNum, pageNum: this.pageInfo.pageNum,
@ -152,12 +152,12 @@ import XmIterationSelect from '../xmIteration/XmIterationSelect.vue';
params.productId=this.xmProduct.id params.productId=this.xmProduct.id
} }
this.load.list = true; this.load.list = true;
listXmIterationProductLink(params).then((res) => {
listXmIterationLink(params).then((res) => {
var tips=res.data.tips; var tips=res.data.tips;
if(tips.isOk){ if(tips.isOk){
this.pageInfo.total = res.data.total; this.pageInfo.total = res.data.total;
this.pageInfo.count=false; this.pageInfo.count=false;
this.xmIterationProductLinks = res.data.data;
this.xmIterationLinks = res.data.data;
}else{ }else{
this.$notify({ message: tips.msg, type: 'error' }); this.$notify({ message: tips.msg, type: 'error' });
} }
@ -165,12 +165,12 @@ import XmIterationSelect from '../xmIteration/XmIterationSelect.vue';
}).catch( err => this.load.list = false ); }).catch( err => this.load.list = false );
}, },
// XmIterationProductLink
// XmIterationLink
showEdit: function ( row,index ) { showEdit: function ( row,index ) {
this.editFormVisible = true; this.editFormVisible = true;
this.editForm = Object.assign({}, row); this.editForm = Object.assign({}, row);
}, },
// XmIterationProductLink
// XmIterationLink
showAdd: function () { showAdd: function () {
this.addFormVisible = true; this.addFormVisible = true;
//this.addForm=Object.assign({}, this.editForm); //this.addForm=Object.assign({}, this.editForm);
@ -178,46 +178,46 @@ import XmIterationSelect from '../xmIteration/XmIterationSelect.vue';
afterAddSubmit(){ afterAddSubmit(){
this.addFormVisible=false; this.addFormVisible=false;
this.pageInfo.count=true; this.pageInfo.count=true;
this.getXmIterationProductLinks();
this.getXmIterationLinks();
}, },
afterEditSubmit(){ afterEditSubmit(){
this.editFormVisible=false; this.editFormVisible=false;
}, },
//xmIterationProductLink
//xmIterationLink
selsChange: function (sels) { selsChange: function (sels) {
this.sels = sels; this.sels = sels;
}, },
//xmIterationProductLink
//xmIterationLink
handleDel: function (row,index) { handleDel: function (row,index) {
this.$confirm('确认删除该记录吗?', '提示', { this.$confirm('确认删除该记录吗?', '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.load.del=true; this.load.del=true;
let params = row; let params = row;
delXmIterationProductLink(params).then((res) => {
delXmIterationLink(params).then((res) => {
this.load.del=false; this.load.del=false;
var tips=res.data.tips; var tips=res.data.tips;
if(tips.isOk){ if(tips.isOk){
this.pageInfo.count=true; this.pageInfo.count=true;
this.getXmIterationProductLinks();
this.getXmIterationLinks();
} }
this.$notify({ message: tips.msg, type: tips.isOk?'success':'error' }); this.$notify({ message: tips.msg, type: tips.isOk?'success':'error' });
}).catch( err => this.load.del=false ); }).catch( err => this.load.del=false );
}); });
}, },
//xmIterationProductLink
//xmIterationLink
batchDel: function () { batchDel: function () {
this.$confirm('确认删除选中记录吗?', '提示', { this.$confirm('确认删除选中记录吗?', '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.load.del=true; this.load.del=true;
batchDelXmIterationProductLink(this.sels).then((res) => {
batchDelXmIterationLink(this.sels).then((res) => {
this.load.del=false; this.load.del=false;
var tips=res.data.tips; var tips=res.data.tips;
if( tips.isOk ){ if( tips.isOk ){
this.pageInfo.count=true; this.pageInfo.count=true;
this.getXmIterationProductLinks();
this.getXmIterationLinks();
} }
this.$notify({ message: tips.msg, type: tips.isOk?'success':'error'}); this.$notify({ message: tips.msg, type: tips.isOk?'success':'error'});
}).catch( err => this.load.del=false ); }).catch( err => this.load.del=false );
@ -234,12 +234,12 @@ import XmIterationSelect from '../xmIteration/XmIterationSelect.vue';
this.load.add=true; this.load.add=true;
this.addForm.iterationId=this.xmIteration.id; this.addForm.iterationId=this.xmIteration.id;
this.addForm.productId= product.id; this.addForm.productId= product.id;
addXmIterationProductLink(this.addForm).then((res) => {
addXmIterationLink(this.addForm).then((res) => {
this.load.del=false; this.load.del=false;
var tips=res.data.tips; var tips=res.data.tips;
if( tips.isOk ){ if( tips.isOk ){
this.pageInfo.count=true; this.pageInfo.count=true;
this.getXmIterationProductLinks();
this.getXmIterationLinks();
} }
this.$notify({ message: tips.msg, type: tips.isOk?'success':'error'}); this.$notify({ message: tips.msg, type: tips.isOk?'success':'error'});
}).catch( err => this.load.del=false ); }).catch( err => this.load.del=false );
@ -252,12 +252,12 @@ import XmIterationSelect from '../xmIteration/XmIterationSelect.vue';
this.load.del=true; this.load.del=true;
this.addForm.iterationId=iteration.id; this.addForm.iterationId=iteration.id;
this.addForm.productId=this.xmProduct.id; this.addForm.productId=this.xmProduct.id;
addXmIterationProductLink(this.addForm).then((res) => {
addXmIterationLink(this.addForm).then((res) => {
this.load.del=false; this.load.del=false;
var tips=res.data.tips; var tips=res.data.tips;
if( tips.isOk ){ if( tips.isOk ){
this.pageInfo.count=true; this.pageInfo.count=true;
this.getXmIterationProductLinks();
this.getXmIterationLinks();
} }
this.$notify({ message: tips.msg, type: tips.isOk?'success':'error'}); this.$notify({ message: tips.msg, type: tips.isOk?'success':'error'});
}).catch( err => this.load.del=false ); }).catch( err => this.load.del=false );
@ -267,15 +267,15 @@ import XmIterationSelect from '../xmIteration/XmIterationSelect.vue';
},//end methods },//end methods
components: { components: {
'xm-iteration-product-link-add':XmIterationProductLinkAdd,
'xm-iteration-product-link-edit':XmIterationProductLinkEdit,
'xm-iteration-link-add':XmIterationLinkAdd,
'xm-iteration-link-edit':XmIterationLinkEdit,
XmProductSelect, XmProductSelect,
XmIterationSelect, XmIterationSelect,
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.getXmIterationProductLinks();
this.maxTableHeight = util.calcTableMaxHeight(this.$refs.xmIterationProductLink.$el)
this.getXmIterationLinks();
this.maxTableHeight = util.calcTableMaxHeight(this.$refs.xmIterationLink.$el)
}); });
/** /**
listOption([{categoryId:'all',itemCode:'sex'},{categoryId:'all',itemCode:'grade'}] ).then(res=>{ listOption([{categoryId:'all',itemCode:'sex'},{categoryId:'all',itemCode:'grade'}] ).then(res=>{

8
src/views/xm/core/xmProduct/XmProductMng.vue

@ -267,7 +267,7 @@
//import Sticky from '@/components/Sticky' // header //import Sticky from '@/components/Sticky' // header
import { listOption } from '@/api/mdp/meta/itemOption';// import { listOption } from '@/api/mdp/meta/itemOption';//
import { listXmProduct,listXmProductWithState, delXmProduct, batchDelXmProduct,copyTo,createProductCode } from '@/api/xm/core/xmProduct'; import { listXmProduct,listXmProductWithState, delXmProduct, batchDelXmProduct,copyTo,createProductCode } from '@/api/xm/core/xmProduct';
import { addXmIterationProductLink,delXmIterationProductLink } from '@/api/xm/core/xmIterationProductLink';
import { addXmIterationLink,delXmIterationLink } from '@/api/xm/core/xmIterationLink';
import { loadTasksToXmProductState } from '@/api/xm/core/xmProductState'; import { loadTasksToXmProductState } from '@/api/xm/core/xmProductState';
import XmProductAdd from './XmProductAdd';// import XmProductAdd from './XmProductAdd';//
import XmProductEdit from './XmProductEdit';// import XmProductEdit from './XmProductEdit';//
@ -603,7 +603,7 @@
this.$confirm('确认将产品【'+xmProduct.productName+'】加入迭代计划【'+xmIteration.iterationName+'】吗?', '提示', { this.$confirm('确认将产品【'+xmProduct.productName+'】加入迭代计划【'+xmIteration.iterationName+'】吗?', '提示', {
type: 'warning' type: 'warning'
}).then(()=>{ }).then(()=>{
addXmIterationProductLink({iterationId:xmIteration.id,productId:xmProduct.id}).then(res=>{
addXmIterationLink({iterationId:xmIteration.id,productId:xmProduct.id}).then(res=>{
var tips =res.data.tips; var tips =res.data.tips;
if(tips.isOk){ if(tips.isOk){
this.getXmProducts(); this.getXmProducts();
@ -612,13 +612,13 @@
}) })
}) })
}, },
doDelXmIterationProductLink(row){
doDelXmIterationLink(row){
var xmIteration=this.xmIteration; var xmIteration=this.xmIteration;
var xmProduct=row; var xmProduct=row;
this.$confirm('确认将产品【'+xmProduct.productName+'】与迭代【'+xmIteration.iterationName+'】进行脱钩吗?脱钩后,产品下的所有需求将从本迭代计划一并移出。', '提示', { this.$confirm('确认将产品【'+xmProduct.productName+'】与迭代【'+xmIteration.iterationName+'】进行脱钩吗?脱钩后,产品下的所有需求将从本迭代计划一并移出。', '提示', {
type: 'warning' type: 'warning'
}).then(()=>{ }).then(()=>{
delXmIterationProductLink({iterationId:xmIteration.id,productId:xmProduct.id}).then(res=>{
delXmIterationLink({iterationId:xmIteration.id,productId:xmProduct.id}).then(res=>{
var tips =res.data.tips; var tips =res.data.tips;
if(tips.isOk){ if(tips.isOk){
this.getXmProducts(); this.getXmProducts();

6
src/views/xm/core/xmProduct/XmProductOverviewComplex.vue

@ -51,7 +51,7 @@
</el-menu> </el-menu>
<xm-product-overview v-if="showPanelName=='overview'" :xm-product="xmProduct"></xm-product-overview> <xm-product-overview v-if="showPanelName=='overview'" :xm-product="xmProduct"></xm-product-overview>
<xm-product-edit v-if="showPanelName=='detail'" :xm-product="xmProduct"></xm-product-edit> <xm-product-edit v-if="showPanelName=='detail'" :xm-product="xmProduct"></xm-product-edit>
<xm-iteration-product-link-mng v-if="showPanelName=='iterationProductLink'" :xm-product="xmProduct"></xm-iteration-product-link-mng>
<xm-iteration-link-mng v-if="showPanelName=='iterationProductLink'" :xm-product="xmProduct"></xm-iteration-link-mng>
<xm-product-project-link-mng v-if="showPanelName=='productProjectLink'" :xm-product="xmProduct"></xm-product-project-link-mng> <xm-product-project-link-mng v-if="showPanelName=='productProjectLink'" :xm-product="xmProduct"></xm-product-project-link-mng>
</section> </section>
</template> </template>
@ -62,12 +62,12 @@ import util from "@/common/js/util"; // 全局公共库
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import XmProductOverview from './XmProductOverview.vue'; import XmProductOverview from './XmProductOverview.vue';
import XmProductEdit from './XmProductEdit.vue'; import XmProductEdit from './XmProductEdit.vue';
import XmIterationProductLinkMng from '../xmIterationProductLink/XmIterationProductLinkMng.vue';
import XmIterationLinkMng from '../xmIterationLink/XmIterationLinkMng.vue';
import XmProductProjectLinkMng from '../xmProductProjectLink/XmProductProjectLinkMng.vue'; import XmProductProjectLinkMng from '../xmProductProjectLink/XmProductProjectLinkMng.vue';
export default { export default {
components: { XmProductOverview, XmProductEdit, XmIterationProductLinkMng, XmProductProjectLinkMng },
components: { XmProductOverview, XmProductEdit, XmIterationLinkMng, XmProductProjectLinkMng },
computed: { computed: {
...mapGetters(["userInfo"]), ...mapGetters(["userInfo"]),
}, },

8
src/views/xm/core/xmProduct/XmProductTplMng.vue

@ -121,7 +121,7 @@
//import Sticky from '@/components/Sticky' // header //import Sticky from '@/components/Sticky' // header
//import { listOption } from '@/api/mdp/meta/itemOption';// //import { listOption } from '@/api/mdp/meta/itemOption';//
import { listXmProduct,listXmProductWithState, delXmProduct, batchDelXmProduct,copyTo,createProductCode } from '@/api/xm/core/xmProduct'; import { listXmProduct,listXmProductWithState, delXmProduct, batchDelXmProduct,copyTo,createProductCode } from '@/api/xm/core/xmProduct';
import { addXmIterationProductLink,delXmIterationProductLink } from '@/api/xm/core/xmIterationProductLink';
import { addXmIterationLink,delXmIterationLink } from '@/api/xm/core/xmIterationLink';
import { loadTasksToXmProductState } from '@/api/xm/core/xmProductState'; import { loadTasksToXmProductState } from '@/api/xm/core/xmProductState';
import XmProductEdit from './XmProductEdit';// import XmProductEdit from './XmProductEdit';//
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
@ -404,7 +404,7 @@
this.$confirm('确认将产品【'+xmProduct.productName+'】加入迭代计划【'+xmIteration.iterationName+'】吗?', '提示', { this.$confirm('确认将产品【'+xmProduct.productName+'】加入迭代计划【'+xmIteration.iterationName+'】吗?', '提示', {
type: 'warning' type: 'warning'
}).then(()=>{ }).then(()=>{
addXmIterationProductLink({iterationId:xmIteration.id,productId:xmProduct.id}).then(res=>{
addXmIterationLink({iterationId:xmIteration.id,productId:xmProduct.id}).then(res=>{
var tips =res.data.tips; var tips =res.data.tips;
if(tips.isOk){ if(tips.isOk){
this.getXmProducts(); this.getXmProducts();
@ -413,13 +413,13 @@
}) })
}) })
}, },
doDelXmIterationProductLink(row){
doDelXmIterationLink(row){
var xmIteration=this.xmIteration; var xmIteration=this.xmIteration;
var xmProduct=row; var xmProduct=row;
this.$confirm('确认将产品【'+xmProduct.productName+'】与迭代【'+xmIteration.iterationName+'】进行脱钩吗?脱钩后,产品下的所有需求将从本迭代计划一并移出。', '提示', { this.$confirm('确认将产品【'+xmProduct.productName+'】与迭代【'+xmIteration.iterationName+'】进行脱钩吗?脱钩后,产品下的所有需求将从本迭代计划一并移出。', '提示', {
type: 'warning' type: 'warning'
}).then(()=>{ }).then(()=>{
delXmIterationProductLink({iterationId:xmIteration.id,productId:xmProduct.id}).then(res=>{
delXmIterationLink({iterationId:xmIteration.id,productId:xmProduct.id}).then(res=>{
var tips =res.data.tips; var tips =res.data.tips;
if(tips.isOk){ if(tips.isOk){
this.getXmProducts(); this.getXmProducts();

Loading…
Cancel
Save