Browse Source

提示优化

master
陈裕财 4 years ago
parent
commit
81f89c635f
  1. 11
      src/styles/mdp.scss
  2. 18
      src/views/xm/core/xmIteration/XmIterationForProjectComplex.vue
  3. 17
      src/views/xm/core/xmProduct/XmProductForProjectComplex.vue
  4. 4
      src/views/xm/core/xmProduct/XmProductSelect.vue
  5. 16
      src/views/xm/core/xmProject/XmProjectComplex.vue

11
src/styles/mdp.scss

@ -194,16 +194,11 @@
max-width: 100%; max-width: 100%;
object-fit: scale-down; object-fit: scale-down;
} }
.el-table .warning-row {
background: oldlace;
}
.el-table .success-row {
background: #f0f9eb;
.el-table .current-row > td {
background: #a9d6f0 !important;
} }
/*此处根据不同屏幕分配率显示不同的样式*/ /*此处根据不同屏幕分配率显示不同的样式*/
/*手机端*/ /*手机端*/
@media only screen and (min-width: 0px) and (max-width: 768px) { @media only screen and (min-width: 0px) and (max-width: 768px) {

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

@ -4,12 +4,12 @@
<el-col :span="iterationVisible==true?3:0" > <el-col :span="iterationVisible==true?3:0" >
<xm-iteration-select :sel-project="selProject" :product-id="xmProduct?xmProduct.id:null" @row-click="onIterationRowClick" @clear-select="onIterationClearSelect"></xm-iteration-select> <xm-iteration-select :sel-project="selProject" :product-id="xmProduct?xmProduct.id:null" @row-click="onIterationRowClick" @clear-select="onIterationClearSelect"></xm-iteration-select>
</el-col> </el-col>
<el-col :span="iterationVisible==true?21:24" >
<el-col :span="iterationVisible==true?21:24" v-show="xmIteration && xmIteration.id">
<el-tabs type="border-card" :value="showPanel" @tab-click="tabClick"> <el-tabs type="border-card" :value="showPanel" @tab-click="tabClick">
<el-tab-pane lazy @click.stop="iterationVisible=!iterationVisible"> <el-tab-pane lazy @click.stop="iterationVisible=!iterationVisible">
<span @click.stop="iterationVisible=false" v-show="iterationVisible==true" slot="label" ><i class="el-icon-d-arrow-left" ></i>隐藏左边</span>
<span @click.stop="iterationVisible=true" v-show="iterationVisible==false" slot="label" ><i class="el-icon-d-arrow-right"></i> 展开左边</span>
<span @click.stop="iterationVisible=false" v-show="iterationVisible==true" slot="label" ><i class="el-icon-d-arrow-left" ></i>隐藏左边迭代列表</span>
<span @click.stop="iterationVisible=true" v-show="iterationVisible==false" slot="label" ><i class="el-icon-d-arrow-right"></i> 展开左边迭代列表</span>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="迭代概览" lazy name="iterationOverview"> <el-tab-pane label="迭代概览" lazy name="iterationOverview">
<xm-iteration-overview v-if="xmIteration && showPanel=='iterationOverview'" :xm-iteration="xmIteration" :sel-project="selProject"></xm-iteration-overview> <xm-iteration-overview v-if="xmIteration && showPanel=='iterationOverview'" :xm-iteration="xmIteration" :sel-project="selProject"></xm-iteration-overview>
@ -138,9 +138,14 @@
}, },
onIterationClearSelect(){ onIterationClearSelect(){
this.iteration=null;
this.xmIteration=null;
}, },
tabClick(tab){ tabClick(tab){
if(this.xmIteration==null || !this.xmIteration.id){
this.iterationVisible=true;
this.$notify({showClose: true, message:"请先选中左边迭代", type: 'warning', position: 'top-left' });
}
return false;
this.showPanel=tab.name this.showPanel=tab.name
}, },
doDelXmIterationProductLink(){ doDelXmIterationProductLink(){
@ -167,6 +172,11 @@
XmProjectForLink, XmProjectForLink,
}, },
mounted() { mounted() {
if(this.xmIteration==null || !this.xmIteration.id){
this.iterationVisible=true;
this.$notify({showClose: true, message:"请先选中左边迭代", type: 'warning', position: 'top-left' });
}
this.$nextTick(() => { this.$nextTick(() => {
}); });

17
src/views/xm/core/xmProduct/XmProductForProjectComplex.vue

@ -4,11 +4,11 @@
<el-col :span="productVisible==true?3:0" > <el-col :span="productVisible==true?3:0" >
<xm-product-select :sel-project="selProject" :xm-iteration="xmIteration" @row-click="onProductRowClick" @clear-select="onProductClearSelect"></xm-product-select> <xm-product-select :sel-project="selProject" :xm-iteration="xmIteration" @row-click="onProductRowClick" @clear-select="onProductClearSelect"></xm-product-select>
</el-col> </el-col>
<el-col :span="productVisible==true?21:24" >
<el-col :span="productVisible==true?21:24" v-show="xmProduct && xmProduct.id">
<el-tabs type="border-card" :value="showPanel" @tab-click="tabClick"> <el-tabs type="border-card" :value="showPanel" @tab-click="tabClick">
<el-tab-pane> <el-tab-pane>
<span v-show="productVisible==true" slot="label" @click.stop="productVisible=false" ><i class="el-icon-d-arrow-left" ></i> 隐藏左边</span>
<span v-show="productVisible==false" slot="label" @click.stop="productVisible=true"><i class="el-icon-d-arrow-right" ></i> 展开左边</span>
<span v-show="productVisible==true" slot="label" @click.stop="productVisible=false" ><i class="el-icon-d-arrow-left" ></i> 隐藏左边产品列表</span>
<span v-show="productVisible==false" slot="label" @click.stop="productVisible=true"><i class="el-icon-d-arrow-right" ></i> 展开左边产品列表</span>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="产品概览" name="productOverview"> <el-tab-pane label="产品概览" name="productOverview">
<xm-product-overview v-if="xmProduct && showPanel=='productOverview'" :xm-product="xmProduct" :sel-project="selProject"></xm-product-overview> <xm-product-overview v-if="xmProduct && showPanel=='productOverview'" :xm-product="xmProduct" :sel-project="selProject"></xm-product-overview>
@ -140,9 +140,13 @@ import XmProductOverview from "./XmProductOverview";
}, },
onProductClearSelect(){ onProductClearSelect(){
this.iteration=null;
this.xmProduct=null;
}, },
tabClick(tab){ tabClick(tab){
if(this.xmProduct==null || !this.xmProduct.id){
this.productVisible=true;
this.$notify({showClose: true, message:"请先选中左边产品", type: 'warning', position: 'top-left'});
}
this.showPanel=tab.name this.showPanel=tab.name
} }
},//end methods },//end methods
@ -161,6 +165,11 @@ XmProductProjectForLink,
XmProductOverview, XmProductOverview,
}, },
mounted() { mounted() {
if(this.xmProduct==null || !this.xmProduct.id){
this.productVisible=true;
this.$notify({showClose: true, message:"请先选中左边产品", type: 'warning', position: 'top-left'});
}
this.$nextTick(() => { this.$nextTick(() => {
}); });

4
src/views/xm/core/xmProduct/XmProductSelect.vue

@ -319,10 +319,10 @@
} }
} }
</script>
</script>
<style scoped> <style scoped>
.more-label-font{ .more-label-font{
text-align:center; text-align:center;
float:left; float:left;

16
src/views/xm/core/xmProject/XmProjectComplex.vue

@ -4,13 +4,15 @@
<el-col :span="projectVisible==true?3:0" > <el-col :span="projectVisible==true?3:0" >
<xm-project-select :xm-iteration="xmIteration" :xm-product="xmProduct" @row-click="onProjectRowClick" @clear-select="onProjectClearSelect"></xm-project-select> <xm-project-select :xm-iteration="xmIteration" :xm-product="xmProduct" @row-click="onProjectRowClick" @clear-select="onProjectClearSelect"></xm-project-select>
</el-col> </el-col>
<el-col :span="projectVisible==true?21:24" >
<el-col :span="projectVisible==true?21:24" v-show="selProject && selProject.id">
<el-tabs type="border-card" :value="showPanel" @tab-click="tabClick"> <el-tabs type="border-card" :value="showPanel" @tab-click="tabClick">
<el-tab-pane>
<span v-show="projectVisible==true" slot="label" @click.stop="projectVisible=false"><i class="el-icon-d-arrow-left" ></i> 隐藏左边项目列表</span>
<span v-show="projectVisible==false" slot="label" @click.stop="projectVisible=true"><i class="el-icon-d-arrow-right" ></i> 展开左边项目列表</span>
</el-tab-pane>
<el-tab-pane label="项目概览" name="projectOverview"> <el-tab-pane label="项目概览" name="projectOverview">
<span v-show="projectVisible==true" slot="label" ><i class="el-icon-d-arrow-left" @click.stop="projectVisible=false"></i> 项目概览</span>
<span v-show="projectVisible==false" slot="label" ><i class="el-icon-d-arrow-right" @click.stop="projectVisible=true"></i> 项目概览</span>
<xm-project-overview v-if="selProject && showPanel=='projectOverview'" :xm-product="xmProduct" :xm-iteration="xmIteration" :sel-project="selProject"></xm-project-overview>
</el-tab-pane>
<xm-project-overview v-if="selProject && showPanel=='projectOverview'" :xm-product="xmProduct" :xm-iteration="xmIteration" :sel-project="selProject"></xm-project-overview>
</el-tab-pane>
<el-tab-pane label="迭代" name="iterations" v-if=" !xmIteration" > <el-tab-pane label="迭代" name="iterations" v-if=" !xmIteration" >
<xm-iteration-mng v-if=" selProject && showPanel=='iterations' && !xmIteration" :xm-product="xmProduct" :xm-iteration="xmIteration" :sel-project="selProject"></xm-iteration-mng> <xm-iteration-mng v-if=" selProject && showPanel=='iterations' && !xmIteration" :xm-product="xmProduct" :xm-iteration="xmIteration" :sel-project="selProject"></xm-iteration-mng>
</el-tab-pane> </el-tab-pane>
@ -143,6 +145,10 @@ import XmProjectOverview from "./XmProjectOverview";
this.selProject=null; this.selProject=null;
}, },
tabClick(tab){ tabClick(tab){
if(this.selProject==null || !this.selProject.id){
this.projectVisible=true;
this.$notify({showClose: true, message:"请先选中左边项目", type: 'warning', position: 'top-left'});
}
this.showPanel=tab.name this.showPanel=tab.name
} }
},//end methods },//end methods

Loading…
Cancel
Save