Browse Source

优化

master
陈裕财 4 years ago
parent
commit
043672f371
  1. 2
      src/router/routes_xm.js
  2. 39
      src/views/xm/core/xmProject/XmProjectMng.vue
  3. 718
      src/views/xm/core/xmProject/XmProjectTplMng.vue

2
src/router/routes_xm.js

@ -24,7 +24,7 @@ export default {
{ path: 'xmBranchState/XmBranchStateMng', component: _import('xm/core/xmBranchState/XmBranchStateMng'), name: 'XmBranchStateMng', meta: { title: '所有项目汇总' }},
{ path: 'xmRecord/XmRecord', component: _import('xm/core/xmRecord/XmRecord'), name: 'XmRecord', meta: { title: '项目动态' }},
{ path: 'xmProjectTemplate/XmProjectTemplateMng', component: _import('xm/core/xmProjectTemplate/XmProjectTemplateMng'), name: 'XmProjectTemplateMng', meta: { title: '项目模板' }},
{ path: 'xmProject/XmProjectTplMng', component: _import('xm/core/xmProject/XmProjectTplMng'), name: 'XmProjectTplMng', meta: { title: '项目模板' }},
{ path: 'xmEnvList/XmEnvListMng', component: _import('xm/core/xmEnvList/XmEnvListMng'), name: 'XmEnvListMng', meta: { title: '环境清单' }},
]

39
src/views/xm/core/xmProject/XmProjectMng.vue

@ -1,5 +1,12 @@
<template>
<section class="page-container">
<el-row>
<el-col :span="6" class="padding-top">
<el-row>
<xm-project-tpl-mng></xm-project-tpl-mng>
</el-row>
</el-col>
<el-col :span="18" class="border">
<el-row>
<el-menu active-text-color="#00abfc" :default-active="menukey" mode="horizontal" @select="handleSelect">
<el-menu-item index="all">全部</el-menu-item>
@ -8,13 +15,13 @@
<el-menu-item index="moniter">我监控</el-menu-item>
<el-menu-item index="approver">我审核</el-menu-item>
<el-menu-item index="create">我创建</el-menu-item>
<el-menu-item index="myFocus">我关注</el-menu-item>
<el-menu-item index="myExecuserStatus0">我排队</el-menu-item>
<el-menu-item index="myExecuserStatus1">我执行</el-menu-item>
<el-menu-item index="myExecuserStatus2">我提交验收</el-menu-item>
<el-menu-item class="hidden-md-and-down" index="myExecuserStatus3">我验收成功</el-menu-item>
<el-menu-item class="hidden-md-and-down" index="myExecuserStatus4">我验收失败</el-menu-item>
<el-menu-item class="hidden-md-and-down" index="myExecuserStatus5">我付款中</el-menu-item>
<el-menu-item class="hidden-md-and-down" index="myFocus">我关注</el-menu-item>
<el-menu-item class="hidden-md-and-down" index="myExecuserStatus0">我排队</el-menu-item>
<el-menu-item class="hidden-md-and-down" index="myExecuserStatus1">我执行</el-menu-item>
<el-menu-item class="hidden-lg-and-down" index="myExecuserStatus2">我提交验收</el-menu-item>
<el-menu-item class="hidden-lg-and-down" index="myExecuserStatus3">我验收成功</el-menu-item>
<el-menu-item class="hidden-lg-and-down" index="myExecuserStatus4">我验收失败</el-menu-item>
<el-menu-item class="hidden-lg-and-down" index="myExecuserStatus5">我付款中</el-menu-item>
<el-menu-item class="hidden-lg-and-down" index="myExecuserStatus6">我付款成功</el-menu-item>
<el-menu-item class="hidden-lg-and-down" index="myExecuserStatus7">我放弃</el-menu-item>
<!-- <el-submenu index="7">
@ -36,14 +43,11 @@
<font v-if="filters.productId" class="more-label-font">产品:</font> <el-tag v-if="filters.productId" closable @close="onProductClose">{{filters.productName}}</el-tag><el-button v-else @click.native="productSelectVisible=true" >选择产品</el-button>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<el-checkbox v-model="showType" false-label="false" true-label="true">直观展示</el-checkbox>
<font class="more-label-font">显示方式:</font>
<el-radio v-model="showType" :label="false">表格</el-radio>
<el-radio v-model="showType" :label="true">卡片</el-radio>
</el-col>
<el-col :span="24" style="padding-top:5px; ">
<el-button class="hidden-lg-and-up hidden-btn" style="margin-left:10px;" @click="handleSelect('myExecuserStatus3')">我验收成功</el-button>
<el-button class="hidden-lg-and-up hidden-btn" @click="handleSelect('myExecuserStatus4')">我验收失败</el-button>
<el-button class="hidden-lg-and-up hidden-btn" @click="handleSelect('myExecuserStatus5')">我付款中</el-button>
<el-button class="hidden-xl-and-up hidden-btn" @click="handleSelect('myExecuserStatus6')">我付款成功</el-button>
<el-button class="hidden-xl-and-up hidden-btn" @click="handleSelect('myExecuserStatus7')">我放弃</el-button>
</el-col>
<el-col :span="24" style="padding-top:5px;">
@ -178,8 +182,11 @@
</template>
</el-table-column>
</el-table>
<el-pagination v-show="!showType" 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-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>
</el-col>
</el-row>
<el-drawer title="项目新增" :visible.sync="addFormVisible" :with-header="false" size="50%" :close-on-click-modal="false" append-to-body>
<xm-project-add :sel-project="addForm" :visible="addFormVisible" @cancel="addFormVisible=false" @submit="afterAddSubmit"></xm-project-add>
</el-drawer>
@ -218,6 +225,7 @@
import { mapGetters } from 'vuex'
import xmTaskMng from '../xmTask/XmTaskMng';
import xmProjectInfo from './XmProjectInfo';
import XmProjectTplMng from './XmProjectTplMng';
import XmProductMng from '../xmProduct/XmProductSelect';
if(!Vue.component("xm-project-info")){
@ -660,7 +668,8 @@
'xm-project-edit':XmProjectEdit,
XmProductMng,
xmTaskMng
xmTaskMng,
XmProjectTplMng,
//
},
mounted() {

718
src/views/xm/core/xmProject/XmProjectTplMng.vue

@ -0,0 +1,718 @@
<template>
<section class="page-container">
<el-row class="page-main page-height-80">
<!--列表 XmProject xm_project-->
<el-row v-loading="load.list">
<el-table ref="table" v-cloak stripe :data="ScreenData" @sort-change="sortChange" highlight-current-row v-loading="load.list" @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<el-table-column prop="name" label="项目模板(学习/参考)" min-width="200" >
<template slot-scope="scope">
<el-link @click.stop="intoInfo(scope.row)">{{scope.row.name}}</el-link>
</template>
</el-table-column>
<el-table-column label="" width="100" fixed="right">
<template slot-scope="scope">
<el-button type="text" title="通过复制创建新的项目" @click="onCopyToBtnClick(scope.row)" :disabled="load.add" v-load="load.add">复制</el-button>
<el-button type="text" title="删除该模板" @click="handleDel(scope.row)" :disabled="load.del" v-load="load.del">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
<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"></el-pagination>
</el-row>
<el-drawer title="项目编辑" :visible.sync="editFormVisible" :with-header="false" size="50%" :close-on-click-modal="false" append-to-body>
<xm-project-edit :sel-project="editForm" :visible="editFormVisible" @cancel="editFormVisible=false" @submit="afterEditSubmit"></xm-project-edit>
</el-drawer>
<el-drawer :title="selectProject==null?'项目明细':selectProject.name" center :fullscreen="true" :visible.sync="showInfo" size="50%" :close-on-click-modal="false" append-to-body>
<xm-project-info :sel-project="selectProject" :visible="showInfo" @changeShowInfo="changeShowInfo" @submit="changeShowInfo"></xm-project-info>
</el-drawer>
<el-dialog
title="提示"
:visible.sync="copyToVisible"
width="30%" >
<el-form>
<el-form-item label="项目名称">
<el-input v-model="xmProjectCopy.name" placeholder="新的项目名称"></el-input>
</el-form-item>
<el-form-item label="项目编码(留空则后台自动生成)">
<el-input v-model="xmProjectCopy.code" placeholder="新的项目编码"></el-input>
</el-form-item>
<el-form-item label="目标">
<el-radio v-model="xmProjectCopy.isTpl" label="0">复制为新的模板</el-radio>
<el-radio v-model="xmProjectCopy.isTpl" label="1">复制为新的项目</el-radio>
</el-form-item>
<el-form-item label="附加任务">
<el-checkbox v-model="xmProjectCopy.copyPhase" true-label="1" false-label="0">拷贝计划</el-checkbox>
<el-checkbox v-model="xmProjectCopy.copyTask" true-label="1" false-label="0">拷贝任务</el-checkbox>
<el-checkbox v-model="xmProjectCopy.copyGroup" true-label="1" false-label="0">拷贝项目组成员</el-checkbox>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="copyToVisible = false"> </el-button>
<el-button type="primary" @click="onCopyToConfirm"> </el-button>
</span>
</el-dialog>
</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 { listOption } from '@/api/mdp/meta/itemOption';//
import { listXmProject, editStatus, delXmProject, batchDelXmProject } from '@/api/xm/core/xmProject';
import { addXmMyFocus , delXmMyFocus } from '@/api/xm/core/xmMyFocus';
import XmProjectEdit from './XmProjectEdit';//
import { mapGetters } from 'vuex'
import xmProjectInfo from './XmProjectInfo';
if(!Vue.component("xm-project-info")){
Vue.component('xm-project-info',xmProjectInfo)
Vue.use(xmProjectInfo);
}
export default {
props:['dataScope'],
computed: {
...mapGetters([
'userInfo','roles'
]),
ScreenData() {
const key = this.menukey;
const userid = this.userInfo.userid;
return this.xmProjects;
},
},
watch: {
"showType": function(val){
console.log("shotType_change");
//this.xmProjects = [];
//this.getXmProjects();
},
"finishFlag":function(val){
this.searchXmProjects();
}
},
data() {
const beginDate = new Date();
const endDate = new Date();
beginDate.setTime(beginDate.getTime() - 3600 * 1000 * 24 * 7 * 4 * 12 );
return {
filters: {
key: '',
productId:'',
productName:'',
},
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: [],//
options:{},// 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:'',planInnerUserAt:'',planOutUserAt:'',locked:'',baseTime:'',baseRemark:'',baselineId:'',planWorkload:'',totalReceivables:'',budgetMarginRate:'',contractAmt:'',planInnerUserPrice:'',budgetOutUserPrice:'',planOutUserCnt:'',planInnerUserCnt:'',planWorkingHours:'',budgetCtrl:'0',
},
editFormVisible: false,//
//xmProject
editForm: {
id:'',code:'',name:'',xmType:'',startTime:'',endTime:'',urgent:'',priority:'',description:'',createUserid:'',createUsername:'',createTime:'',assess:'',assessRemarks:'',status:'',branchId:'',planTotalCost:'',bizProcInstId:'',bizFlowState:'',planNouserAt:'',planInnerUserAt:'',planOutUserAt:'',locked:'',baseTime:'',baseRemark:'',baselineId:'',planWorkload:'',totalReceivables:'',budgetMarginRate:'',contractAmt:'',planInnerUserPrice:'',budgetOutUserPrice:'',planOutUserCnt:'',planInnerUserCnt:'',planWorkingHours:'',budgetCtrl:'0',
},
/**begin 自定义属性请在下面加 请加备注**/
menukey: "all",
showType: true,
showInfo: false,
selectProject: null,
finishFlag: false,
xmRecordVisible: false,
productSelectVisible:false,
tableHeight:300,
dateRanger: [ ],
pickerOptions: util.pickerOptions('datarange'),
xmProjectCopy:{
id:'',name:'',code:'',isTpl:'',copyPhase:'1',copyTask:'1',copyGrup:'0'
},
copyToVisible:false,
/**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.xxx=this.filters.key
}else{
//params.xxx=xxxxx
}
if(this.dateRanger&&this.dateRanger.length==2){
}
params.isTpl="1"
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.finishFlag){
params.status = '4';
}
params = this.menuFilter(params);
if(this.filters.productId){
params.productId = this.filters.productId
}
params.createTimeStart=this.dateRanger[0]
params.createTimeEnd=this.dateRanger[1]
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.$message({showClose: true, message: tips.msg, type: 'error' });
}
this.load.list = false;
}).catch( err => this.load.list = false );
},
menuFilter(params) {
const key = this.menukey;
const userid = this.userInfo.userid;
if( this.dataScope=='all' && key == "compete"){
params.compete = userid;
}else if( this.dataScope!='all' && (key == "compete" || key=="all")){
params.compete = userid;
} else if(key == "leader"){ //
params.pgTypeIds=['nbxmjl']
params.userid=userid
}
else if(key == "moniter"){ //
params.pgTypeIds=['yyz','xmzl']
params.userid=userid
}
else if(key == "approver"){ //
params.pgTypeIds=['nbxmjl','xmzk','nbldz']
params.userid=userid
}
else if(key == "create"){
params.createUserid = userid;
}else if(key=="myFocus"){
params.myFocus="1"
params.userid=userid
}else if(key.indexOf("myExecuserStatus")>=0){
params.userid=userid
params.myExecuserStatus=key.substring("myExecuserStatus".length)
}
return params;
},
//""
setSearch() {
this.getXmProjects();
},
// XmProject xm_project
showEdit: function ( row,index ) {
this.editFormVisible = true;
this.editForm = Object.assign({}, row);
},
// XmProject xm_project
showAdd: function () {
this.addFormVisible = true;
//this.addForm=Object.assign({}, this.editForm);
},
afterAddSubmit(){
this.addFormVisible=false;
this.pageInfo.count=true;
this.getXmProjects();
},
afterEditSubmit(){
this.editFormVisible=false;
},
//xmProject
selsChange: function (sels) {
this.sels = sels;
},
//xmProject
handleDel: function (row,index) {
this.$confirm('确认删除该记录吗?', '提示', {
type: 'warning'
}).then(() => {
this.load.del=true;
let params = { id: row.id };
delXmProject(params).then((res) => {
this.load.del=false;
var tips=res.data.tips;
if(tips.isOk){
this.pageInfo.count=true;
this.getXmProjects();
}
this.$message({showClose: true, message: tips.msg, type: tips.isOk?'success':'error' });
}).catch( err => this.load.del=false );
});
},
//xmProject
batchDel: function () {
this.$confirm('确认删除选中记录吗?', '提示', {
type: 'warning'
}).then(() => {
this.load.del=true;
batchDelXmProject(this.sels).then((res) => {
this.load.del=false;
var tips=res.data.tips;
if( tips.isOk ){
this.pageInfo.count=true;
this.getXmProjects();
}
this.$message({showClose: true, message: tips.msg, type: tips.isOk?'success':'error'});
}).catch( err => this.load.del=false );
});
},
rowClick: function(row, event, column){
const that = this;
//that.intoInfo(row.id);
// this.$emit('row-click',row, event, column);// @row-click="rowClick"
},
onCopyToBtnClick(row){
this.xmProjectCopy.id=row.id;
this.xmProjectCopy.name=row.name+"(复制)";
this.xmProjectCopy.isTpl=row.isTpl;
this.copyToVisible=true;
},
onCopyToConfirm(){
this.load.add=true;
copyTo(this.xmProjectCopy).then(res=>{
this.load.add=false;
var tips = res.tips;
if(tips.isOk){
if(this.xmProjectCopy.isTpl){
this.searchXmProjects()
}
}
this.$message({showClose: true, message: tips.msg, type: tips.isOk?'success':'error' });
})
},
/**begin 自定义函数请在下面加**/
// truefalse
isLeader(leader) {
return leader.some(i=>i.leadType=='负责人' && i.userid == this.userInfo.userid);
},
//info
intoInfo(row) {
this.selectProject = row;
this.$router.push({ name:'XmProjectInfoRoute', params: row })
//this.showInfo = true;
},
//
handleSelect(key, keyPath) {
this.menukey = key;
this.getXmProjects();
},
//
statusChange(scope,val) {
this.load.edit = true;
let params = {
id: scope.row.id,
status: val,
};
editStatus(params).then((res) => {
var tips=res.data.tips;
if(tips.isOk){
this.ScreenData[scope.$index].status = val;
this.status = val;
}
this.$message({showClose: true, message: tips.msg, type: tips.isOk?'success':'error' });
this.load.edit = false;
}).catch( err => this.load.edut = false );
},
changeShowInfo() {
this.xmProjects = [];
this.getXmProjects();
this.showInfo = false;
},
showApprovaInfo:function(row){
var msgFields=[];
if(row.mainTitle!=null && row.mainTitle!=""){
msgFields.push("流程【"+row.mainTitle+"】");
}
if(row.taskName!=null && row.taskName!=""){
msgFields.push("当前环节【"+row.taskName+"】");
}
if(row.assigneeName!=null && row.assigneeName!=""){
msgFields.push("执行人【"+row.assigneeName+"】");
}
if(row.commentMsg!=null && row.commentMsg!=""){
msgFields.push("审批意见【"+row.commentMsg+"】");
}
var msg=msgFields.join(",");
return msg;
},
sendToProcessApprova:function(row,bizKey){
if(row.bizFlowState=='1'){
this.$message.error("审核中,不允许重新发起");
return;
}
let extVars={projectId:row.id}
let jsonExtVars=JSON.stringify(extVars);
var currDomain=window.location.protocol+"//"+window.location.host;
var fullPath=this.$route.fullPath;
var bizUrl=currDomain+'/'+process.env.CONTEXT+'/'+process.env.VERSION+'/#'+fullPath+'?extVars='+jsonExtVars
var titleNames=row.name
var mainTitle=''
var mainContext=''
if(bizKey=='xm_project_delete_approva'){
if(row.status!='0'){
this.$message.error("只有状态为初始化的项目可以删除");
return;
}
mainTitle='关于删除项目【'+titleNames+"】的审批"
mainContext=mainTitle+',删除原因:';
} else if(bizKey=='xm_project_over_approva'){
if(row.status!='1'){
this.$message.error("只有状态为执行中的项目可以进行结项操作");
return;
}
mainTitle='关于项目【'+titleNames+"】结项的审批"
mainContext=mainTitle;
} else if(bizKey=='xm_project_restart_approva'){
if(row.status!='3'){
this.$message.error("只有状态为暂停的项目可以进行重新启动操作");
return;
}
mainTitle='关于项目【'+titleNames+"】重新启动的审批"
mainContext=mainTitle;
} else if(bizKey=='xm_project_start_approva'){
if(row.status!='0'){
this.$message.error("只有状态为初始化的项目可以进行立项审批操作");
return;
}
mainTitle='关于项目【'+titleNames+"】的立项审批"
mainContext=mainTitle
} else if(bizKey=='xm_project_suspension_approva'){
if(row.status!='1'){
this.$message.error("只有状态为执行中的项目可以进行挂起操作");
return;
}
mainTitle='关于项目【'+titleNames+"】暂停的审批"
mainContext=mainTitle+'';
} else if(bizKey=='xm_project_budget_change_approva'){
if(row.status!='1'){
this.$message.error("只有状态为执行中的项目可以进行预算变更操作");
return;
}
mainTitle='关于项目【'+titleNames+"】的预算变更审批"
mainContext=mainTitle+'';
} else{
this.$message.error("暂不支持的业务审批");
return;
}
let params={
mainContext:mainContext,
mainTitle:mainTitle,
bizKey:bizKey,
bizUrl:bizUrl,
restUrl:config.getXmBasePath()+"/xm/core/xmProject/processApprova",
extVars:extVars,
flowVars:{
subscribeTaskEvent:'TASK_COMPLETED,TASK_CREATED',
branchId:row.branchId,
projectId:row.id
},
}
let jsonParmas=encodeURIComponent(JSON.stringify(params));// decodeURIComponent
this.$router.push({name:'ProcdefListForBizStart',params:jsonParmas});
},
handleCommand(command) {
if(command.type=='sendToProcessApprova'){
this.sendToProcessApprova(command.row,command.bizKey);
} else if(command.type=='showEdit'){
this.showEdit(command.row,null);
}
},
focusOrUnfocus:function(row){
if(this.menukey=="myFocus"){
delXmMyFocus({projectId:row.id,focusType:'project',userid:this.userInfo.userid,username:this.userInfo.username}).then(res=>{
var tips=res.data.tips;
if(tips.isOk){
this.getXmProjects();
}
this.$message({showClose: true, message: tips.msg, type: tips.isOk?'success':'error' });
})
}else{
addXmMyFocus({projectId:row.id,focusType:'project',projectName:row.name,userid:this.userInfo.userid,username:this.userInfo.username}).then(res=>{
var tips=res.data.tips;
this.$message({showClose: true, message: tips.msg, type: tips.isOk?'success':'error' });
})
}
},
onProductSelected:function(product){
this.filters.productId=product.id
this.filters.productName=product.productName
this.getXmProjects()
this.productSelectVisible=false;
},
onProductClose:function(){
this.filters.productId=''
this.filters.productName=''
this.getXmProjects()
}
/**end 自定义函数请在上面加**/
},//end methods
components: {
'xm-project-edit':XmProjectEdit,
//
},
mounted() {
if(this.$route.params){
this.filters.productId=this.$route.params.productId;
this.filters.productName=this.$route.params.productName;
}
this.$nextTick(() => {
this.showInfo = false;
this.getXmProjects();
});
},
}
</script>
<style scoped>
* >>> .sub-navbar{
background: #fafbfc;
}
.changebtn{
float: right;
padding: 2px 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;
padding-left: 10px;
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;
}
.hidden-btn{
margin-top: 5px;
margin-bottom: 5px;
}
.right-btn{
margin-top: 12px;
}
@media only screen and (max-height: 2400px) {
.project-box{
max-height: 1600x;
overflow-y: auto;
}
}
@media only screen and (max-height: 1200px) {
.project-box{
max-height: 800px;
overflow-y: auto;
}
}
@media only screen and (max-height: 980px) {
.project-box{
max-height: 600px;
overflow-y: auto;
}
}
@media only screen and (max-height: 640px) {
.project-box{
max-height: 300px;
overflow-y: auto;
}
}
.more-label-font{
text-align:center;
float:left;
padding-top:5px;
}
</style>
Loading…
Cancel
Save