Browse Source

fix: 人员卡片添加单位

master
buaixuexideshitongxue 23 hours ago
parent
commit
0a814f10bf
  1. 5
      src/components/datav/chart-bar-fixbug.vue
  2. 4
      src/views/datav/Lmgz.vue

5
src/components/datav/chart-bar-fixbug.vue

@ -15,10 +15,11 @@
<span <span
class="bar-item-label mr-8" class="bar-item-label mr-8"
:class="{ 'bar-item-label-clickable': clickable && item.detailId }" :class="{ 'bar-item-label-clickable': clickable && item.detailId }"
:title="item.displayLabel || item.label"
style="margin-right: 20px" style="margin-right: 20px"
@click="clickable && item.detailId && emit('item-click', item)" @click="clickable && item.detailId && emit('item-click', item)"
> >
{{ item.label }} {{ item.displayLabel || item.label }}
</span> </span>
<div class="bar-item_content " :long="!item.denominator"> <div class="bar-item_content " :long="!item.denominator">
<div <div
@ -147,7 +148,7 @@ function getColor(val) {
font-size: 12px; font-size: 12px;
.bar-item_content { .bar-item_content {
width: calc(100% - 220px); width: calc(100% - var(--label-width) - 140px);
} }
} }

4
src/views/datav/Lmgz.vue

@ -223,6 +223,7 @@
<el-scrollbar height="200px"> <el-scrollbar height="200px">
<datav-chart-bar-fixbug <datav-chart-bar-fixbug
:data="list4" :data="list4"
:label-width="160"
clickable clickable
@item-click="openDetail($event, 'police')" @item-click="openDetail($event, 'police')"
size="small" size="small"
@ -246,6 +247,7 @@
<el-scrollbar height="200px"> <el-scrollbar height="200px">
<datav-chart-bar-fixbug <datav-chart-bar-fixbug
:data="list5" :data="list5"
:label-width="160"
clickable clickable
@item-click="openDetail($event, 'police')" @item-click="openDetail($event, 'police')"
size="small" size="small"
@ -269,6 +271,7 @@
<el-scrollbar height="200px"> <el-scrollbar height="200px">
<datav-chart-bar-fixbug <datav-chart-bar-fixbug
:data="list6" :data="list6"
:label-width="160"
clickable clickable
@item-click="openDetail($event, 'police')" @item-click="openDetail($event, 'police')"
size="small" size="small"
@ -421,6 +424,7 @@ function withRankColors(data) {
function withProfileScope(data, query, category) { function withProfileScope(data, query, category) {
return data.map(item => ({ return data.map(item => ({
...item, ...item,
displayLabel: `${item.label}(${item.departName || '单位未知'})`,
profileScope: { groupId: query.groupId, category, rankName: item.label, rankEmpNo: item.empNo }, profileScope: { groupId: query.groupId, category, rankName: item.label, rankEmpNo: item.empNo },
initialTime: [ initialTime: [
moment(query.beginTime).startOf('day').format('YYYY-MM-DD HH:mm:ss'), moment(query.beginTime).startOf('day').format('YYYY-MM-DD HH:mm:ss'),

Loading…
Cancel
Save