13 changed files with 94 additions and 630 deletions
-
4src/views/xm/core/components/XmProjectSelect.vue
-
5src/views/xm/core/xmGroup/XmGroupMng.vue
-
6src/views/xm/core/xmProduct/XmProductForLinkComplex.vue
-
6src/views/xm/core/xmProduct/XmProductMng.vue
-
10src/views/xm/core/xmProject/XmProjectForLink.vue
-
293src/views/xm/core/xmProject/XmProjectList.vue
-
20src/views/xm/core/xmProject/XmProjectMng.vue
-
198src/views/xm/core/xmProject/XmProjectSelect.vue
-
28src/views/xm/core/xmProjectState/XmProjectStateMng.vue
-
18src/views/xm/core/xmQuestion/XmQuestionAdd.vue
-
52src/views/xm/core/xmQuestion/XmQuestionMng.vue
-
12src/views/xm/core/xmTestCase/XmTestCaseMng.vue
-
72src/views/xm/core/xmTestCaseExec/XmTestCaseExecMng.vue
@ -1,293 +0,0 @@ |
|||
<template> |
|||
<section class="padding"> |
|||
<el-row> |
|||
<el-input v-model="filters.key" style="width:60%;" placeholder="项目名称模糊查询"> |
|||
</el-input> |
|||
<el-button @click="searchXmProjects" icon="el-icon-search"></el-button> |
|||
</el-row> |
|||
<el-row class="page-main "> |
|||
<el-table ref="table" :height="tableHeight" stripe :data="xmProjects" highlight-current-row v-loading="load.list" style="width: 100%;"> |
|||
<el-table-column type="index" label="序号" width="55" ></el-table-column> |
|||
<el-table-column prop="id" label="项目编码" min-width="80" ></el-table-column> |
|||
<el-table-column prop="name" label="项目名称" min-width="120" ></el-table-column> |
|||
<el-table-column label="操作" width="100" fixed="right"> |
|||
<template slot-scope="scope"> |
|||
<el-button-group> |
|||
<el-button type="primary" @click.stop="selectProject(scope.row)" >选中</el-button> |
|||
</el-button-group> |
|||
|
|||
<!-- <el-button style="width:100%;" slot="reference" class="see-more" type="text" icon="el-icon-more"></el-button> |
|||
</el-popover> --> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-pagination layout="total, sizes, prev, pager, next" @current-change="handleCurrentChange" @size-change="handleSizeChange" :page-sizes="[10,20, 50, 100, 500]" :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :total="pageInfo.total" style="float:right;"></el-pagination> |
|||
</el-row> |
|||
</section> |
|||
|
|||
</template> |
|||
|
|||
<script> |
|||
import Vue from 'vue' |
|||
import util from '@/common/js/util';//全局公共库 |
|||
//import Sticky from '@/components/Sticky' // 粘性header组件 |
|||
import config from "@/common/config"; //全局公共库 |
|||
//import { initSimpleDicts } from '@/api/mdp/meta/item';//下拉框数据查询 |
|||
import { listXmProject, } from '@/api/xm/core/xmProject'; |
|||
import { mapGetters } from 'vuex' |
|||
|
|||
|
|||
|
|||
export default { |
|||
computed: { |
|||
...mapGetters([ |
|||
'userInfo','roles' |
|||
]), |
|||
}, |
|||
data() { |
|||
return { |
|||
filters: { |
|||
key: '' |
|||
}, |
|||
xmProjects: [],//查询结果 |
|||
pageInfo:{//分页数据 |
|||
total:0,//服务器端收到0时,会自动计算总记录数,如果上传>0的不自动计算。 |
|||
pageSize:10,//每页数据 |
|||
count:false,//是否需要重新计算总记录数 |
|||
pageNum:1,//当前页码、从1开始计算 |
|||
orderFields:['create_time'],//排序列 如 ['sex','student_id'],必须为数据库字段 |
|||
orderDirs:['desc']//升序 asc,降序desc 如 性别 升序、学生编号降序 ['asc','desc'] |
|||
}, |
|||
load:{ list: false, edit: false, del: false, add: false },//查询中... |
|||
sels: [],//列表选中数据 |
|||
dicts:{},//下拉选择框的所有静态数据 params=[{categoryId:'0001',itemCode:'sex'}] 返回结果 {'sex':[{optionValue:'1',optionName:'男',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'女',seqOrder:'2',fp:'',isDefault:'0'}]} |
|||
|
|||
addFormVisible: false,//新增xmProject界面是否显示 |
|||
//新增xmProject界面初始化数据 |
|||
addForm: { |
|||
id:'',code:'',name:'',xmType:'',startTime:'',endTime:'',urgent:'',priority:'',description:'',createUserid:'',createUsername:'',createTime:'',assess:'',assessRemarks:'',status:'',branchId:'',planTotalCost:'',bizProcInstId:'',bizFlowState:'',planNouserAt:'',planIuserAt:'',planOuserAt:'',locked:'',baseTime:'',baseRemark:'',baselineId:'',planWorkload:'',totalReceivables:'',budgetMarginRate:'',contractAmt:'',planIuserPrice:'',budgetOuserPrice:'',planOuserCnt:'',planIuserCnt:'',planWorkingHours:'' |
|||
}, |
|||
|
|||
editFormVisible: false,//编辑界面是否显示 |
|||
tableHeight:300, |
|||
//编辑xmProject界面初始化数据 |
|||
editForm: { |
|||
id:'',code:'',name:'',xmType:'',startTime:'',endTime:'',urgent:'',priority:'',description:'',createUserid:'',createUsername:'',createTime:'',assess:'',assessRemarks:'',status:'',branchId:'',planTotalCost:'',bizProcInstId:'',bizFlowState:'',planNouserAt:'',planIuserAt:'',planOuserAt:'',locked:'',baseTime:'',baseRemark:'',baselineId:'',planWorkload:'',totalReceivables:'',budgetMarginRate:'',contractAmt:'',planIuserPrice:'',budgetOuserPrice:'',planOuserCnt:'',planIuserCnt:'',planWorkingHours:'' |
|||
}, |
|||
|
|||
|
|||
/**end 自定义属性请在上面加 请加备注**/ |
|||
} |
|||
},//end data |
|||
methods: { |
|||
handleSizeChange(pageSize) { |
|||
this.pageInfo.pageSize=pageSize; |
|||
this.getXmProjects(); |
|||
}, |
|||
handleCurrentChange(pageNum) { |
|||
this.pageInfo.pageNum = pageNum; |
|||
this.getXmProjects(); |
|||
}, |
|||
// 表格排序 obj.order=ascending/descending,需转化为 asc/desc ; obj.prop=表格中的排序字段,字段驼峰命名 |
|||
sortChange( obj ){ |
|||
var dir='asc'; |
|||
if(obj.order=='ascending'){ |
|||
dir='asc' |
|||
}else{ |
|||
dir='desc'; |
|||
} |
|||
if(obj.prop=='xxx'){ |
|||
this.pageInfo.orderFields=['xxx']; |
|||
this.pageInfo.orderDirs=[dir]; |
|||
} |
|||
this.getXmProjects(); |
|||
}, |
|||
searchXmProjects(){ |
|||
this.pageInfo.count=true; |
|||
this.getXmProjects(); |
|||
}, |
|||
//获取列表 XmProject xm_project |
|||
getXmProjects() { |
|||
let params = { |
|||
pageSize: this.pageInfo.pageSize, |
|||
pageNum: this.pageInfo.pageNum, |
|||
total: this.pageInfo.total, |
|||
count:this.pageInfo.count, |
|||
}; |
|||
|
|||
if(this.filters.key){ |
|||
params.key='%'+this.filters.key+'%' |
|||
} |
|||
this.load.list = true; |
|||
if(this.pageInfo.orderFields!=null && this.pageInfo.orderFields.length>0){ |
|||
let orderBys=[]; |
|||
for(var i=0;i<this.pageInfo.orderFields.length;i++){ |
|||
orderBys.push(this.pageInfo.orderFields[i]+" "+this.pageInfo.orderDirs[i]) |
|||
} |
|||
params.orderBy= orderBys.join(",") |
|||
} |
|||
params.branchId = this.userInfo.branchId; |
|||
listXmProject(params).then((res) => { |
|||
var tips=res.data.tips; |
|||
if(tips.isOk){ |
|||
console.log(res.data); |
|||
this.pageInfo.total = res.data.total; |
|||
this.pageInfo.count=false; |
|||
this.xmProjects = res.data.data; |
|||
}else{ |
|||
this.$notify({showClose: true, message: tips.msg, type: 'error' }); |
|||
} |
|||
this.load.list = false; |
|||
}).catch( err => this.load.list = false ); |
|||
}, |
|||
selectProject:function(row){ |
|||
this.editForm=row |
|||
this.$emit('project-confirm',this.editForm); |
|||
} |
|||
/**end 自定义函数请在上面加**/ |
|||
|
|||
},//end methods |
|||
components: { |
|||
|
|||
//在下面添加其它组件 |
|||
}, |
|||
mounted() { |
|||
this.$nextTick(() => { |
|||
this.tableHeight = util.calcTableMaxHeight(this.$refs.table.$el); |
|||
this.showInfo = false; |
|||
this.getXmProjects(); |
|||
}); |
|||
} |
|||
} |
|||
|
|||
</script> |
|||
|
|||
<style scoped> |
|||
* >>> .sub-navbar{ |
|||
background: #fafbfc; |
|||
} |
|||
.changebtn{ |
|||
float: right; |
|||
padding: 0 10px; |
|||
display: flex; |
|||
align-items: center; |
|||
line-height: 0; |
|||
height: 100%; |
|||
} |
|||
.changebtn > button{ |
|||
padding: 0; |
|||
border: 0; |
|||
color: #333; |
|||
} |
|||
.changebtn >>> i::before{ |
|||
font-size:20px; |
|||
} |
|||
.changebtn-active{ |
|||
color: #409EFF !important; |
|||
} |
|||
.app-container{ |
|||
padding: 10px; |
|||
} |
|||
.el-menu-demo{ |
|||
border: 0 !important; |
|||
height: 50px; |
|||
background-color: #fafbfc; |
|||
} |
|||
.el-menu-demo>.el-menu-item, |
|||
.el-menu-demo>.el-submenu >>> .el-submenu__title{ |
|||
height: 100%; |
|||
line-height: 50px; |
|||
color: #909399; |
|||
} |
|||
.el-menu--horizontal>.el-menu-item:not(.is-disabled):focus, |
|||
.el-menu--horizontal>.el-menu-item:not(.is-disabled):hover, |
|||
.el-menu--horizontal>.el-submenu .el-submenu__title:hover{ |
|||
background-color: transparent; |
|||
} |
|||
.project-card{ |
|||
font-size: 12px; |
|||
color: #999; |
|||
margin: 10px 12px; |
|||
} |
|||
.project-card:hover{ |
|||
border-color: #00abfc; |
|||
} |
|||
.project-card >>> .el-card__body{ |
|||
padding: 20px 15px 10px; |
|||
} |
|||
.project-name{ |
|||
font-size: 16px; |
|||
font-weight: 700; |
|||
color: #333; |
|||
height: 24px; |
|||
} |
|||
.project-id{ |
|||
margin-top: 4px; |
|||
height: 18px; |
|||
} |
|||
.project-info{ |
|||
display: flex; |
|||
margin-top: 8px; |
|||
} |
|||
.project-info>div{ |
|||
display: flex; |
|||
flex-direction: column; |
|||
} |
|||
.info-item{ |
|||
width: 15%; |
|||
text-align: center; |
|||
} |
|||
.info-item >>> span{ |
|||
display: block; |
|||
} |
|||
.item-total{ |
|||
font-size: 18px; |
|||
color: #666; |
|||
} |
|||
.info-task{ |
|||
padding-left: 20px; |
|||
width: 70%; |
|||
border-left: 1px solid #efefef; |
|||
} |
|||
.finish-task{ |
|||
color: #00abfc !important; |
|||
} |
|||
.project-rate{ |
|||
margin: 15px 0; |
|||
} |
|||
.project-rate>.el-progress{ |
|||
display: flex; |
|||
align-items: center; |
|||
} |
|||
.project-rate >>> .el-progress-bar{ |
|||
padding-right: 0; |
|||
margin-right: 0; |
|||
} |
|||
.project-rate >>> .el-progress__text{ |
|||
margin-left: 5px; |
|||
} |
|||
.project-footer{ |
|||
display: flex; |
|||
} |
|||
.project-footer>div{ |
|||
width: 30%; |
|||
} |
|||
.project-footer>div:not(:first-child){ |
|||
width: 70%; |
|||
} |
|||
.project-period{ |
|||
text-align: right; |
|||
} |
|||
.see-more > i{ |
|||
background:#000; |
|||
} |
|||
/* 超过宽度则用...代替 */ |
|||
.truncate{ |
|||
overflow: hidden; |
|||
text-overflow: ellipsis; |
|||
white-space: nowrap; |
|||
} |
|||
[v-cloak]{ |
|||
display: none; |
|||
} |
|||
</style> |
|||
@ -1,198 +0,0 @@ |
|||
<template> |
|||
<section> |
|||
<el-row class="page-main padding-left"> |
|||
<el-table ref="table" border :height="maxTableHeight" stripe :data="xmProjects" highlight-current-row v-loading="load.list" @selection-change="selsChange" @row-click="rowClick" style="width: 100%;" > |
|||
<el-table-column type="index" label="序号" > |
|||
</el-table-column> |
|||
<el-table-column prop="name" label="项目名称" > |
|||
<template slot="header"> |
|||
项目名称 <el-button type="text" @click="clearSelect">清空所选</el-button><el-button type="text" @click="close">关闭</el-button> |
|||
</template> |
|||
<template slot-scope="scope"> |
|||
{{scope.row.name}} |
|||
<font :color="scope.row.totalProgress==100?'green':'#FF8C00'">{{parseInt(scope.row.totalProgress)}}%</font> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-pagination layout="total, prev, next" @current-change="handleCurrentChange" @size-change="handleSizeChange" :page-sizes="[10,20, 50, 100, 500]" :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :total="pageInfo.total" style="float:right;"></el-pagination> |
|||
</el-row> |
|||
</section> |
|||
|
|||
</template> |
|||
|
|||
<script> |
|||
import Vue from 'vue' |
|||
import util from '@/common/js/util';//全局公共库 |
|||
//import Sticky from '@/components/Sticky' // 粘性header组件 |
|||
import config from "@/common/config"; //全局公共库 |
|||
//import { initSimpleDicts } from '@/api/mdp/meta/item';//下拉框数据查询 |
|||
import { listXmProject, } from '@/api/xm/core/xmProject'; |
|||
import { mapGetters } from 'vuex' |
|||
|
|||
|
|||
|
|||
export default { |
|||
props:["xmIteration","xmProduct",'autoSelect'], |
|||
computed: { |
|||
...mapGetters([ |
|||
'userInfo','roles' |
|||
]), |
|||
}, |
|||
watch:{ |
|||
"xmIteration.id":function(val){ |
|||
this.getXmProjects(); |
|||
}, |
|||
"xmProduct.id":function(val){ |
|||
this.getXmProjects(); |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
filters: { |
|||
key: '' |
|||
}, |
|||
xmProjects: [],//查询结果 |
|||
pageInfo:{//分页数据 |
|||
total:0,//服务器端收到0时,会自动计算总记录数,如果上传>0的不自动计算。 |
|||
pageSize:10,//每页数据 |
|||
count:false,//是否需要重新计算总记录数 |
|||
pageNum:1,//当前页码、从1开始计算 |
|||
orderFields:['create_time'],//排序列 如 ['sex','student_id'],必须为数据库字段 |
|||
orderDirs:['desc']//升序 asc,降序desc 如 性别 升序、学生编号降序 ['asc','desc'] |
|||
}, |
|||
load:{ list: false, edit: false, del: false, add: false },//查询中... |
|||
sels: [],//列表选中数据 |
|||
dicts:{},//下拉选择框的所有静态数据 params=[{categoryId:'0001',itemCode:'sex'}] 返回结果 {'sex':[{optionValue:'1',optionName:'男',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'女',seqOrder:'2',fp:'',isDefault:'0'}]} |
|||
|
|||
addFormVisible: false,//新增xmProject界面是否显示 |
|||
//新增xmProject界面初始化数据 |
|||
addForm: { |
|||
id:'',code:'',name:'',xmType:'',startTime:'',endTime:'',urgent:'',priority:'',description:'',createUserid:'',createUsername:'',createTime:'',assess:'',assessRemarks:'',status:'',branchId:'',planTotalCost:'',bizProcInstId:'',bizFlowState:'',planNouserAt:'',planIuserAt:'',planOuserAt:'',locked:'',baseTime:'',baseRemark:'',baselineId:'',planWorkload:'',totalReceivables:'',budgetMarginRate:'',contractAmt:'',planIuserPrice:'',budgetOuserPrice:'',planOuserCnt:'',planIuserCnt:'',planWorkingHours:'' |
|||
}, |
|||
|
|||
editFormVisible: false,//编辑界面是否显示 |
|||
maxTableHeight:300, |
|||
//编辑xmProject界面初始化数据 |
|||
editForm: { |
|||
id:'',code:'',name:'',xmType:'',startTime:'',endTime:'',urgent:'',priority:'',description:'',createUserid:'',createUsername:'',createTime:'',assess:'',assessRemarks:'',status:'',branchId:'',planTotalCost:'',bizProcInstId:'',bizFlowState:'',planNouserAt:'',planIuserAt:'',planOuserAt:'',locked:'',baseTime:'',baseRemark:'',baselineId:'',planWorkload:'',totalReceivables:'',budgetMarginRate:'',contractAmt:'',planIuserPrice:'',budgetOuserPrice:'',planOuserCnt:'',planIuserCnt:'',planWorkingHours:'' |
|||
}, |
|||
|
|||
|
|||
/**end 自定义属性请在上面加 请加备注**/ |
|||
} |
|||
},//end data |
|||
methods: { |
|||
handleSizeChange(pageSize) { |
|||
this.pageInfo.pageSize=pageSize; |
|||
this.getXmProjects(); |
|||
}, |
|||
handleCurrentChange(pageNum) { |
|||
this.pageInfo.pageNum = pageNum; |
|||
this.getXmProjects(); |
|||
}, |
|||
// 表格排序 obj.order=ascending/descending,需转化为 asc/desc ; obj.prop=表格中的排序字段,字段驼峰命名 |
|||
sortChange( obj ){ |
|||
var dir='asc'; |
|||
if(obj.order=='ascending'){ |
|||
dir='asc' |
|||
}else{ |
|||
dir='desc'; |
|||
} |
|||
if(obj.prop=='xxx'){ |
|||
this.pageInfo.orderFields=['xxx']; |
|||
this.pageInfo.orderDirs=[dir]; |
|||
} |
|||
this.getXmProjects(); |
|||
}, |
|||
|
|||
//选择行xmProject |
|||
selsChange: function (sels) { |
|||
this.sels = sels; |
|||
}, |
|||
searchXmProjects(){ |
|||
this.pageInfo.count=true; |
|||
this.getXmProjects(); |
|||
}, |
|||
rowClick(row){ |
|||
this.editForm=row; |
|||
this.$emit("row-click",row); |
|||
}, |
|||
//获取列表 XmProject xm_project |
|||
getXmProjects() { |
|||
let params = { |
|||
pageSize: this.pageInfo.pageSize, |
|||
pageNum: this.pageInfo.pageNum, |
|||
total: this.pageInfo.total, |
|||
count:this.pageInfo.count, |
|||
}; |
|||
|
|||
if(this.filters.key){ |
|||
params.key='%'+this.filters.key+'%' |
|||
} |
|||
this.load.list = true; |
|||
if(this.pageInfo.orderFields!=null && this.pageInfo.orderFields.length>0){ |
|||
let orderBys=[]; |
|||
for(var i=0;i<this.pageInfo.orderFields.length;i++){ |
|||
orderBys.push(this.pageInfo.orderFields[i]+" "+this.pageInfo.orderDirs[i]) |
|||
} |
|||
params.orderBy= orderBys.join(",") |
|||
} |
|||
if(this.xmIteration&&this.xmIteration.id){ |
|||
params.iterationId=this.xmIteration.id |
|||
} |
|||
if(this.xmProduct&&this.xmProduct.id){ |
|||
params.productId=this.xmProduct.id |
|||
} |
|||
params.branchId = this.userInfo.branchId; |
|||
listXmProject(params).then((res) => { |
|||
var tips=res.data.tips; |
|||
if(tips.isOk){ |
|||
this.pageInfo.total = res.data.total; |
|||
this.pageInfo.count=false; |
|||
this.xmProjects = res.data.data; |
|||
if(this.autoSelect===true&&this.xmProjects.length>0){ |
|||
var row=this.xmProjects[0]; |
|||
this.$refs.table.setCurrentRow(row); |
|||
this.rowClick(row); |
|||
} |
|||
}else{ |
|||
this.$notify({showClose: true, message: tips.msg, type: 'error' }); |
|||
} |
|||
this.load.list = false; |
|||
}).catch( err => this.load.list = false ); |
|||
}, |
|||
selectProject:function(row){ |
|||
this.editForm=row |
|||
this.$emit('project-confirm',this.editForm); |
|||
} |
|||
/**end 自定义函数请在上面加**/ |
|||
, |
|||
clearSelect(){ |
|||
this.$refs.table.setCurrentRow(); |
|||
this.$emit("clear-select"); |
|||
}, |
|||
close(){ |
|||
this.$emit("close"); |
|||
} |
|||
},//end methods |
|||
components: { |
|||
|
|||
//在下面添加其它组件 |
|||
}, |
|||
mounted() { |
|||
this.$nextTick(() => { |
|||
this.maxTableHeight = util.calcTableMaxHeight(this.$refs.table.$el); |
|||
this.showInfo = false; |
|||
this.getXmProjects(); |
|||
}); |
|||
} |
|||
} |
|||
|
|||
</script> |
|||
|
|||
|
|||
<style scoped> |
|||
.align-right{ |
|||
float: right; |
|||
} |
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue