Browse Source

优化

master
陈裕财 3 years ago
parent
commit
fc15c02556
  1. 14
      src/router/routes_xm.js
  2. 4
      src/views/xm/core/xmMyFocus/XmMyFocusList.vue
  3. 84
      src/views/xm/core/xmProduct/XmProductInfoRoute.vue
  4. 3
      src/views/xm/core/xmProduct/XmProductOverview.vue
  5. 14
      src/views/xm/core/xmProduct/XmProductOverviewComplex.vue
  6. 2
      src/views/xm/core/xmProduct/XmProductTplMng.vue
  7. 9
      src/views/xm/core/xmProduct/index.vue
  8. 4
      src/views/xm/core/xmProductProjectLink/XmProductProjectLinkMng.vue
  9. 2
      src/views/xm/core/xmProject/XmProjectOverview.vue
  10. 2
      src/views/xm/core/xmProject/XmProjectOverviewComplex.vue
  11. 4
      src/views/xm/core/xmProject/index.vue

14
src/router/routes_xm.js

@ -488,19 +488,7 @@ export default {
{ path: 'xmIteration/XmIterationMng', component: _import('xm/core/xmIteration/XmIterationMng'), name: 'XmIterationMng', meta: { title: '迭代管理',roles:["user"] }}, { path: 'xmIteration/XmIterationMng', component: _import('xm/core/xmIteration/XmIterationMng'), name: 'XmIterationMng', meta: { title: '迭代管理',roles:["user"] }},
] ]
},
{
path: '/xm/core/xmProduct/XmProductInfoRoute',
component: _import('xm/core/xmProduct/XmProductInfoRoute'),
name: 'XmProductInfoRoute',
iconCls: 'fa el-icon-menu',
meta: {
title: '产品管理-如有跳转',
icon: 'product',roles:["user"]
},
hidden:true
},
},
{ {
path: '/xm/core/xmIteration/XmIterationInfoRoute', path: '/xm/core/xmIteration/XmIterationInfoRoute',
component: _import('xm/core/xmIteration/XmIterationInfoRoute'), component: _import('xm/core/xmIteration/XmIterationInfoRoute'),

4
src/views/xm/core/xmMyFocus/XmMyFocusList.vue

@ -215,9 +215,9 @@ export default {
*/ */
toBizPage(bizObj){ toBizPage(bizObj){
if(bizObj.focusType=='1'){ if(bizObj.focusType=='1'){
this.$router.push({path:'/xm/core/xmProject/XmProjectInfoRoute',query:{id:bizObj.bizId}})
this.$router.push({path:'/xm/core/project/overview',query:{projectId:bizObj.bizId}})
}else if(bizObj.focusType=='3'){ }else if(bizObj.focusType=='3'){
this.$router.push({path:'/xm/core/xmProduct/XmProductInfoRoute',query:{id:bizObj.bizId}})
this.$router.push({path:'/xm/core/product/overview',query:{productId:bizObj.bizId}})
}else if(bizObj.focusType=='2'){ }else if(bizObj.focusType=='2'){
this.$router.push({path:'/xm/core/xmTask/XmTaskDetailRoute',query:{id:bizObj.bizId}}) this.$router.push({path:'/xm/core/xmTask/XmTaskDetailRoute',query:{id:bizObj.bizId}})
}else if(bizObj.focusType=='4'){ }else if(bizObj.focusType=='4'){

84
src/views/xm/core/xmProduct/XmProductInfoRoute.vue

@ -1,84 +0,0 @@
<template>
<section>
<xm-product-info v-if="xmProduct" :xm-product="xmProduct" :visible="showInfo" @edit-fields="onEditFields"></xm-product-info>
</section>
</template>
<script>
import util from '@/common/js/util';//
import { listXmProductWithState } from '@/api/xm/core/xmProduct';
import { mapGetters } from 'vuex';
import XmProductInfo from './XmProductInfo'
export default {
computed: {
...mapGetters([
'userInfo','roles'
]),
},
watch:{
},
data() {
return {
xmProduct:null,
showInfo:false,
}
},//end data
methods: {
initByQueryId(){
if(this.$route.query && this.$route.query.id){
var localStorageProduct=localStorage.getItem("xm-product-info-route")
var product=null;
if(localStorageProduct && localStorageProduct!='undefined'){
product=JSON.parse(localStorageProduct)
if(product && product.id==this.$route.query.id){
this.xmProduct=product
this.showInfo=true;
}else{
this.getProduct(this.$route.query.id);
}
}else{
this.getProduct(this.$route.query.id);
}
}
},
getProduct(id){
listXmProductWithState({id:id}).then(res=>{
var tips = res.data.tips;
if(tips.isOk){
this.xmProduct=res.data.data[0]
localStorage.setItem("xm-product-info-route",JSON.stringify(this.xmProduct))
this.showInfo=true;
}else{
}
})
},
onEditFields(row) {
Object.assign(this.xmProduct, row);
localStorage.setItem("xm-product-info-route",JSON.stringify(this.xmProduct))
this.$emit("edit-fields", row);
},
},//end methods
components: {
XmProductInfo,
//
},
activated(){
this.initByQueryId();
},
mounted() {
this.initByQueryId();
}
}
</script>
<style scoped>
</style>

3
src/views/xm/core/xmProduct/XmProductOverview.vue

@ -1,6 +1,6 @@
<template> <template>
<section > <section >
<el-row ref="pageMainRef" :style="{overflowX:'hidden',height:maxTableHeight+'px'}" >
<el-row class="page-main" ref="pageMainRef" :style="{overflowX:'hidden',height:maxTableHeight+'px'}" >
<el-row :gutter="10" style="margin-bottom:10px"> <el-row :gutter="10" style="margin-bottom:10px">
<el-col :span="8" > <el-col :span="8" >
<el-card class="box-card" style="padding:0px ;height:425px"> <el-card class="box-card" style="padding:0px ;height:425px">
@ -581,6 +581,7 @@ export default {
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
debugger;
this.maxTableHeight=util.calcTableMaxHeight(this.$refs.pageMainRef.$el) this.maxTableHeight=util.calcTableMaxHeight(this.$refs.pageMainRef.$el)
}); });
initSimpleDicts('all',['xmProductPstatus'] ).then(res=>{ initSimpleDicts('all',['xmProductPstatus'] ).then(res=>{

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

@ -1,10 +1,9 @@
<template> <template>
<section class="padding-left padding-right">
<section class="page-container padding-left padding-right">
<el-row ref="pageBody"> <el-row ref="pageBody">
<el-col <el-col
:span="4" :span="4"
class="padding border"
:style="{ maxHeight: maxTableHeight + 'px', overflowY: 'auto' }"
class="padding border" :style="{ maxHeight: maxTableHeight + 'px', overflowY: 'auto' }"
> >
<h4 class="padding-bottom">常用功能导航</h4> <h4 class="padding-bottom">常用功能导航</h4>
<el-steps <el-steps
@ -217,7 +216,8 @@
</el-menu-item> </el-menu-item>
</el-menu> </el-menu>
<xm-product-overview v-if="showPanelName=='overview'" :xm-product="xmProduct"></xm-product-overview>
<xm-product-overview v-if="showPanelName=='overview' && xmProduct && xmProduct.id" :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-link-for-product v-if="showPanelName=='iterationProductLink'" :xm-product="xmProduct"></xm-iteration-link-for-product> <xm-iteration-link-for-product v-if="showPanelName=='iterationProductLink'" :xm-product="xmProduct"></xm-iteration-link-for-product>
<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>
@ -417,11 +417,11 @@ export default {
}, },
mounted() { mounted() {
initDicts(this)
this.$nextTick(() => {
this.$nextTick(() => {
this.maxTableHeight = util.calcTableMaxHeight(this.$refs.pageBody.$el); this.maxTableHeight = util.calcTableMaxHeight(this.$refs.pageBody.$el);
}); });
initDicts(this)
}, },
}; };

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

@ -304,7 +304,7 @@
//info //info
intoInfo(row) { intoInfo(row) {
this.editForm = row; this.editForm = row;
this.$router.push({ name:'XmProductInfoRoute', params: row })
this.$router.push({ name:'productOverview', query: {productId:row.id} })
//this.showInfo = true; //this.showInfo = true;
}, },
//xmProduct //xmProduct

9
src/views/xm/core/xmProduct/index.vue

@ -1,7 +1,7 @@
<template> <template>
<section> <section>
<top-nav/>
<keep-alive><router-view></router-view></keep-alive>
<top-nav v-if="xmProduct&&xmProduct.id"/>
<keep-alive><router-view v-if="xmProduct && xmProduct.id"></router-view></keep-alive>
</section> </section>
</template> </template>
@ -12,7 +12,7 @@ import util from "@/common/js/util"; //全局公共库
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import topNav from './top-nav.vue' import topNav from './top-nav.vue'
import store from '@/store' import store from '@/store'
import { listXmProduct } from '@/api/xm/core/xmProduct';
import { listXmProductWithState } from '@/api/xm/core/xmProduct';
export default { export default {
computed: { computed: {
@ -31,12 +31,13 @@ export default {
// //
}, },
mounted() { mounted() {
debugger;
if(!this.$route.query.productId){ if(!this.$route.query.productId){
this.$message.error("地址不合规") this.$message.error("地址不合规")
this.$route.back(-1) this.$route.back(-1)
} }
if(!this.xmProduct||this.xmProduct.id!=this.$route.query.productId){ if(!this.xmProduct||this.xmProduct.id!=this.$route.query.productId){
listXmProduct({id:this.$route.query.productId}).then(res=>{
listXmProductWithState({id:this.$route.query.productId}).then(res=>{
var tips = res.data.tips; var tips = res.data.tips;
if(tips.isOk ){ if(tips.isOk ){
if( res.data.data.length==1){ if( res.data.data.length==1){

4
src/views/xm/core/xmProductProjectLink/XmProductProjectLinkMng.vue

@ -304,10 +304,10 @@ import XmProjectSelect from '@/views/xm/core/components/XmProjectSelect.vue'
}, },
goToProject(row){ goToProject(row){
this.$router.push({path:'/xm/core/xmProject/XmProjectInfoRoute',query:{id:row.projectId}})
this.$router.push({path:'/xm/core/project/overview',query:{projectId:row.projectId}})
}, },
goToProduct(row){ goToProduct(row){
this.$router.push({path:'/xm/core/xmProduct/XmProductInfoRoute',query:{id:row.productId}})
this.$router.push({path:'/xm/core/product/overview',query:{productId:row.productId}})
}, },
/**end 自定义函数请在上面加**/ /**end 自定义函数请在上面加**/

2
src/views/xm/core/xmProject/XmProjectOverview.vue

@ -1,6 +1,6 @@
<template> <template>
<section> <section>
<el-row class="page-main " :style="{overflowX: 'hidden',height:maxTableHeight+'px'}" ref="table">
<el-row class="page-main" :style="{overflowX: 'hidden',height:maxTableHeight+'px'}" ref="table">
<el-row :gutter="10" style="margin-bottom:10px"> <el-row :gutter="10" style="margin-bottom:10px">
<el-col :span="8" > <el-col :span="8" >
<el-card class="box-card" style="padding:0px ;height:425px"> <el-card class="box-card" style="padding:0px ;height:425px">

2
src/views/xm/core/xmProject/XmProjectOverviewComplex.vue

@ -1,7 +1,7 @@
<template> <template>
<section class="page-container padding-left padding-right"> <section class="page-container padding-left padding-right">
<el-row ref="pageBody"> <el-row ref="pageBody">
<el-col :span="4" class="padding border" :style="{maxHeight:maxTableHeight+'px',overflowY:'auto'}">
<el-col :span="4" class="padding border" :style="{height:maxTableHeight+'px',overflowY:'auto'}">
<h4 class="padding-bottom">常用功能快捷导航</h4> <h4 class="padding-bottom">常用功能快捷导航</h4>
<el-steps :active="calcProjectStatusStep" finish-status="success" direction="vertical"> <el-steps :active="calcProjectStatusStep" finish-status="success" direction="vertical">
<el-step <el-step

4
src/views/xm/core/xmProject/index.vue

@ -1,7 +1,7 @@
<template> <template>
<section> <section>
<top-nav/>
<keep-alive><router-view></router-view></keep-alive>
<top-nav v-if="projectInfo && projectInfo.id"/>
<keep-alive><router-view v-if="projectInfo && projectInfo.id"></router-view></keep-alive>
</section> </section>
</template> </template>

Loading…
Cancel
Save