Browse Source

优化

master
陈裕财 4 years ago
parent
commit
d2074919a9
  1. 60
      src/views/xm/core/xmGroup/XmGroupMng.vue
  2. 3
      src/views/xm/core/xmIteration/XmIterationSelect.vue
  3. 2
      src/views/xm/core/xmProduct/XmProductSelect.vue
  4. 4
      src/views/xm/core/xmProject/XmProjectSelect.vue

60
src/views/xm/core/xmGroup/XmGroupMng.vue

@ -9,18 +9,26 @@
<xm-project-select :auto-select="true" v-if="!selProject" :xm-iteration="xmIteration" :xm-product="xmProduct" @row-click="onProjectRowClick" @clear-select="onProjectClearSelect"></xm-project-select> <xm-project-select :auto-select="true" v-if="!selProject" :xm-iteration="xmIteration" :xm-product="xmProduct" @row-click="onProjectRowClick" @clear-select="onProjectClearSelect"></xm-project-select>
<el-link type="warning" slot="reference" v-if="!selProject" icon="el-icon-search"><font style="font-size:14px;">{{filters.selProject?filters.selProject.name:'选择项目'}}</font></el-link> <el-link type="warning" slot="reference" v-if="!selProject" icon="el-icon-search"><font style="font-size:14px;">{{filters.selProject?filters.selProject.name:'选择项目'}}</font></el-link>
</el-popover> </el-popover>
<el-input v-model="filters.groupNameKey" style="width:15%;" clearable placeholder="小组名称查询"></el-input>
<el-input v-model="filters.mngUsernamekey" style="width:15%;" clearable placeholder="组长、副组长名称查询"></el-input>
<el-input v-model="filters.groupUsernameKey" style="width:15%;" clearable placeholder="组员名称查询"></el-input>
<el-button type="primary" @click="searchXmGroups">查询</el-button>
<el-input v-model="filters.key" style="width:15%;" clearable placeholder="名称过滤"></el-input>
<el-button type="plain" @click="showGroupState" icon="el-icon-s-data">小组进度</el-button> <el-button type="plain" @click="showGroupState" icon="el-icon-s-data">小组进度</el-button>
<el-button class="hidden-md-and-down" type="plain" @click="xmRecordVisible=true" icon="el-icon-document">变化日志</el-button>
<el-button class="hidden-md-and-down" type="plain" @click="doSearchImGroupsByProjectId" icon="el-icon-document">绑定即聊情况</el-button>
<el-button class="hidden-lg-and-down" type="plain" @click="xmRecordVisible=true" icon="el-icon-document">变化日志</el-button>
<el-button class="hidden-lg-and-down" type="plain" @click="doSearchImGroupsByProjectId" icon="el-icon-document">绑定即聊情况</el-button>
<el-button class="hidden-md-and-down" @click="groupRoleDescVisible=true" icon="el-icon-document">角色说明</el-button> <el-button class="hidden-md-and-down" @click="groupRoleDescVisible=true" icon="el-icon-document">角色说明</el-button>
<font style="font-size:12px;" class="hidden-md-and-down" color="red">注意点击架构图进行操作</font>
<font style="font-size:12px;" class="hidden-md-and-down" color="red">点击架构图操作</font>
<el-popover
placement="right"
width="400"
trigger="click">
<el-button type="plain" @click="xmRecordVisible=true" icon="el-icon-document">变化日志</el-button>
<el-button type="plain" @click="doSearchImGroupsByProjectId" icon="el-icon-document">绑定即聊情况</el-button>
<el-button @click="groupRoleDescVisible=true" icon="el-icon-document">角色说明</el-button>
<font style="font-size:12px;" color="red">注意点击架构图进行操作</font>
<el-link type="warning" slot="reference" v-if="!selProject" icon="el-icon-search">更多</el-link>
</el-popover>
</el-row> </el-row>
<el-row ref="table" :style="{overflowX:'auto',height:maxTableHeight+'px'}"> <el-row ref="table" :style="{overflowX:'auto',height:maxTableHeight+'px'}">
<vue-okr-tree :data="okrTreeData" v-loading="load.list"
<vue-okr-tree :data="okrTreeData" v-loading="load.list" ref="tree"
show-collapsable show-collapsable
node-key="id" node-key="id"
default-expand-all default-expand-all
@ -28,6 +36,7 @@
:render-content="renderContent" :render-content="renderContent"
@node-click="handleNodeClick" @node-click="handleNodeClick"
direction="horizontal" direction="horizontal"
:filter-node-method="filterNode"
></vue-okr-tree> ></vue-okr-tree>
</el-row> </el-row>
<el-row> <el-row>
@ -297,6 +306,9 @@ XmProductSelect,XmProjectSelect,
}, },
xmIteration(){ xmIteration(){
this.getXmGroup(); this.getXmGroup();
},
"filters.key":function(val) {
this.$refs.tree.filter(val);
} }
}, },
data() { data() {
@ -748,7 +760,37 @@ XmProductSelect,XmProjectSelect,
onProjectClearSelect(){ onProjectClearSelect(){
this.filters.selProject=null this.filters.selProject=null
this.xmGroups=[] this.xmGroups=[]
}
},
filterNode(value, data) {
if (!value) return true;
var match=false;
if(data.leaderUsername){
match=data.leaderUsername.indexOf(value)!==-1;
if(match==true){
return true;
}
}
if(data.assUsername){
match=data.assUsername.indexOf(value)!==-1;
if(match==true){
return true;
}
}
if(data.groupName){
match=data.groupName.indexOf(value)!==-1;
if(match==true){
return true;
}
}
if(data.crowBranchName){
match=data.crowBranchName.indexOf(value)!==-1;
if(match==true){
return true;
}
}
return data.label.indexOf(value) !== -1;
},
},//end methods },//end methods
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {

3
src/views/xm/core/xmIteration/XmIterationSelect.vue

@ -3,7 +3,8 @@
<el-row> <el-row>
<!--列表 XmIteration 迭代定义--> <!--列表 XmIteration 迭代定义-->
<el-table ref="table" :height="maxTableHeight" :data="xmIterationTreeData" row-key="id" default-expand-all :tree-props="{children: 'children', hasChildren: 'hasChildren'}" @sort-change="sortChange" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;"> <el-table ref="table" :height="maxTableHeight" :data="xmIterationTreeData" row-key="id" default-expand-all :tree-props="{children: 'children', hasChildren: 'hasChildren'}" @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" label="迭代名称" >
<el-table-column type="index" label="序号" ></el-table-column>
<el-table-column prop="iterationName" label="迭代名称" >
<template slot="header" slot-scope="scope"> <template slot="header" slot-scope="scope">
迭代名称 <el-button type="text" @click="clearSelectIteration">清空所选</el-button> 迭代名称 <el-button type="text" @click="clearSelectIteration">清空所选</el-button>
<el-popover v-if=" !menuId && !productId" <el-popover v-if=" !menuId && !productId"

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

@ -4,7 +4,7 @@
<!--列表 XmProduct 产品表--> <!--列表 XmProduct 产品表-->
<el-table ref="table" :height="maxTableHeight" :data="xmProducts" :row-class-name="tableRowClassName" @sort-change="sortChange" :highlight-current-row="true" current-row-key="id" v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;"> <el-table ref="table" :height="maxTableHeight" :data="xmProducts" :row-class-name="tableRowClassName" @sort-change="sortChange" :highlight-current-row="true" current-row-key="id" v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<el-table-column label="" type="index" width="50" > </el-table-column>
<el-table-column label="序号" type="index" width="50" > </el-table-column>
<el-table-column v-if="isSelectProduct==true" label="产品代号" prop="code" min-width="100" show-overflow-tooltip > </el-table-column> <el-table-column v-if="isSelectProduct==true" label="产品代号" prop="code" min-width="100" show-overflow-tooltip > </el-table-column>
<el-table-column prop="productName" label="产品名称" show-overflow-tooltip> <el-table-column prop="productName" label="产品名称" show-overflow-tooltip>
<template slot="header" slot-scope="scope"> <template slot="header" slot-scope="scope">

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

@ -2,7 +2,9 @@
<section> <section>
<el-row class="page-main padding-left"> <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 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 prop="name" label="项目名称" >
<el-table-column type="index" label="序号" >
</el-table-column>
<el-table-column prop="name" label="项目名称" >
<template slot="header"> <template slot="header">
项目名称 <el-button type="text" @click="clearSelect">清空所选</el-button> 项目名称 <el-button type="text" @click="clearSelect">清空所选</el-button>
</template> </template>

Loading…
Cancel
Save