Browse Source

优化

master
陈裕财 4 years ago
parent
commit
f3aea3b81a
  1. 18
      src/styles/mdp.scss
  2. 4
      src/views/xm/core/xmMenu/XmMenuAdd.vue
  3. 6
      src/views/xm/core/xmMenu/XmMenuEdit.vue
  4. 65
      src/views/xm/core/xmMenu/XmMenuMng.vue

18
src/styles/mdp.scss

@ -230,11 +230,24 @@
visibility: visible; visibility: visible;
.u-btn{ .u-btn{
float: right; float: right;
}
}
} }
} }
.cell-bar{
display: none;
float: right;
}
.el-table__row td:hover{
.cell-bar{
display: block;
float: right;
}
.cell-text{
display:none;
}
}
.icon { .icon {
color: #fff; color: #fff;
@ -246,8 +259,7 @@
font-size: 14px; font-size: 14px;
display: inline-block; display: inline-block;
margin-right: 5px; margin-right: 5px;
}
}
/*2.隐藏滚动条太丑了 /*2.隐藏滚动条太丑了
.el-drawer__container ::-webkit-scrollbar{ .el-drawer__container ::-webkit-scrollbar{
display: none; display: none;

4
src/views/xm/core/xmMenu/XmMenuAdd.vue

@ -8,7 +8,7 @@
<el-collapse-item :title="calcMenuLabel.label+'基本信息'" name="1" > <el-collapse-item :title="calcMenuLabel.label+'基本信息'" name="1" >
<el-row> <el-row>
<el-col :span="6">
<el-col :span="8">
<el-form-item label="序号名称" prop="seqNo" > <el-form-item label="序号名称" prop="seqNo" >
<template slot="label"> <template slot="label">
<div class="icon" :style="{backgroundColor: calcMenuLabel.color }"> <div class="icon" :style="{backgroundColor: calcMenuLabel.color }">
@ -19,7 +19,7 @@
<el-input v-model="addForm.seqNo" style="width:100%;" placeholder="如1.0 , 1.1 , 1.1.1等" ></el-input> <el-input v-model="addForm.seqNo" style="width:100%;" placeholder="如1.0 , 1.1 , 1.1.1等" ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="18">
<el-col :span="16">
<el-form-item label="" prop="menuName" label-width="0px"> <el-form-item label="" prop="menuName" label-width="0px">
<el-input v-model="addForm.menuName" placeholder="名称" ></el-input> <el-input v-model="addForm.menuName" placeholder="名称" ></el-input>
</el-form-item> </el-form-item>

6
src/views/xm/core/xmMenu/XmMenuEdit.vue

@ -12,7 +12,7 @@
<el-collapse value="1" accordion> <el-collapse value="1" accordion>
<el-collapse-item title="基本信息" name="1" > <el-collapse-item title="基本信息" name="1" >
<el-row> <el-row>
<el-col :span="6">
<el-col :span="8">
<el-form-item label="calcMenuLabel.label" prop="seqNo" > <el-form-item label="calcMenuLabel.label" prop="seqNo" >
<template slot="label"> <template slot="label">
<div class="icon" :style="{backgroundColor: calcMenuLabel.color }"> <div class="icon" :style="{backgroundColor: calcMenuLabel.color }">
@ -20,10 +20,10 @@
</div> </div>
{{calcMenuLabel.label}} {{calcMenuLabel.label}}
</template> </template>
<el-input v-model="editForm.seqNo" style="width:100%;" placeholder="如1.0 , 1.1 , 1.1.1等" ></el-input>
<el-input v-model="editForm.seqNo" style="display:block;width:100%;" placeholder="如1.0 , 1.1 , 1.1.1等" ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="18">
<el-col :span="16">
<el-form-item label="" prop="menuName" label-width="0px"> <el-form-item label="" prop="menuName" label-width="0px">
<el-input v-model="editForm.menuName" placeholder="名称" > <el-input v-model="editForm.menuName" placeholder="名称" >
</el-input> </el-input>

65
src/views/xm/core/xmMenu/XmMenuMng.vue

@ -192,10 +192,10 @@
</span> </span>
</el-row> </el-row>
<el-row class="padding-top"> <el-row class="padding-top">
<el-table lazy :load="loadXmMenusLazy" stripe fit border ref="table" :height="maxTableHeight" :data="xmMenusTreeData" current-row-key="menuId" row-key="menuId" :tree-props="{children: 'children', hasChildren: 'childrenCnt'}" @sort-change="sortChange" highlight-current-row v-loading="load.list" @selection-change="selsChange" @row-click="rowClick">
<el-table :row-style="{height:'60px'}" lazy :load="loadXmMenusLazy" stripe fit border ref="table" :height="maxTableHeight" :data="xmMenusTreeData" current-row-key="menuId" row-key="menuId" :tree-props="{children: 'children', hasChildren: 'childrenCnt'}" @sort-change="sortChange" highlight-current-row v-loading="load.list" @selection-change="selsChange" @row-click="rowClick">
<el-table-column sortable type="selection" width="40"></el-table-column> <el-table-column sortable type="selection" width="40"></el-table-column>
<el-table-column prop="menuName" label="需求名称" min-width="300">
<el-table-column prop="menuName" label="需求名称" min-width="300" fixed="left">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.dclass=='1'" class="icon" style="background-color: rgb(255, 153, 51);"> <div v-if="scope.row.dclass=='1'" class="icon" style="background-color: rgb(255, 153, 51);">
<i class="el-icon-s-promotion"></i> <i class="el-icon-s-promotion"></i>
@ -234,18 +234,65 @@
</el-table-column> </el-table-column>
<el-table-column prop="productId" label="产品" width="100" show-overflow-tooltip> <el-table-column prop="productId" label="产品" width="100" show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column prop="status" label="状态" min-width="80" show-overflow-tooltip>
<el-table-column prop="status" label="状态" min-width="80" >
<template slot-scope="scope"> <template slot-scope="scope">
<div class="cell-text">
{{dicts.menuStatus.some(i=>i.id==scope.row.status)?dicts.menuStatus.find(i=>scope.row.status==i.id).name:''}} {{dicts.menuStatus.some(i=>i.id==scope.row.status)?dicts.menuStatus.find(i=>scope.row.status==i.id).name:''}}
</div>
<span class="cell-bar">
<el-select v-model="scope.row.status" placeholder="需求状态" style="display:block;">
<el-option :value="item.id" :label="item.name" v-for="(item,index) in dicts.menuStatus" :key="index"></el-option>
</el-select>
</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="dtype" label="类型" width="100" :formatter="formaterByDicts" show-overflow-tooltip>
<el-table-column prop="dtype" label="类型" width="100" :formatter="formaterByDicts" show-overflow-tooltip>
<template slot-scope="scope">
<div class="cell-text">
{{dicts.demandType.some(i=>i.id==scope.row.dtype)?dicts.demandType.find(i=>scope.row.dtype==i.id).name:''}}
</div>
<span class="cell-bar">
<el-select v-model="scope.row.dtype" placeholder="类型" style="display:block;">
<el-option :value="item.id" :label="item.name" v-for="(item,index) in dicts.demandType" :key="index"></el-option>
</el-select>
</span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="source" label="来源" width="100" :formatter="formaterByDicts" show-overflow-tooltip>
<el-table-column prop="source" label="来源" width="100" :formatter="formaterByDicts" show-overflow-tooltip>
<template slot-scope="scope">
<div class="cell-text">
{{dicts.demandSource.some(i=>i.id==scope.row.source)?dicts.demandSource.find(i=>scope.row.source==i.id).name:''}}
</div>
<span class="cell-bar">
<el-select v-model="scope.row.source" placeholder="来源" style="display:block;">
<el-option :value="item.id" :label="item.name" v-for="(item,index) in dicts.demandSource" :key="index"></el-option>
</el-select>
</span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="dlvl" label="层次" width="100" :formatter="formaterByDicts" show-overflow-tooltip>
<el-table-column prop="dlvl" label="层次" width="100">
<template slot-scope="scope">
<div class="cell-text">
{{dicts.demandLvl.some(i=>i.id==scope.row.dlvl)?dicts.demandLvl.find(i=>scope.row.dlvl==i.id).name:''}}
</div>
<span class="cell-bar">
<el-select v-model="scope.row.dlvl" placeholder="层次" style="display:block;">
<el-option :value="item.id" :label="item.name" v-for="(item,index) in dicts.demandLvl" :key="index"></el-option>
</el-select>
</span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="priority" label="优先级" width="100" :formatter="formaterByDicts" show-overflow-tooltip>
<el-table-column prop="priority" label="优先级" width="100">
<template slot-scope="scope">
<div class="cell-text">
{{dicts.priority.some(i=>i.id==scope.row.priority)?dicts.priority.find(i=>scope.row.priority==i.id).name:''}}
</div>
<span class="cell-bar">
<el-select v-model="scope.row.priority" placeholder="优先级" style="display:block;">
<el-option :value="item.id" :label="item.name" v-for="(item,index) in dicts.priority" :key="index"> </el-option>
</el-select>
</span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="iterationName" label="迭代" min-width="120" show-overflow-tooltip> <el-table-column prop="iterationName" label="迭代" min-width="120" show-overflow-tooltip>
<template slot="header"> <template slot="header">
@ -290,10 +337,10 @@
</el-table-column> </el-table-column>
<el-table-column prop="ctime" label="创建日期" min-width="100" show-overflow-tooltip> <el-table-column prop="ctime" label="创建日期" min-width="100" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.ctime}} </span>
<span>{{scope.row.ctime}} </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="menuName" label="跟进人" min-width="100" show-overflow-tooltip>
<el-table-column prop="mmUsername" label="跟进人" min-width="100" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.mmUsername}} </span> <span>{{scope.row.mmUsername}} </span>
</template> </template>

Loading…
Cancel
Save