diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 321213a..f2250c7 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -47,7 +47,6 @@ :height="300" :data="leases" :columns="leaseTable" - @on-row-dblclick="leaseRowDbclick" >
{ return h( "div", @@ -395,6 +393,24 @@ export default { render: (h, { row }) => { return h('div',`${row.department ? ('【' + row.department.name + '】') : ''}${row.admin ? row.admin.name : ''}`) } + }, + { + key: 'operate', + title: '操作', + width: 82, + align: 'center', + fixed: 'right', + render: (h, { row }) => h('Button', { + props: { + size: 'small', + type: 'primary' + }, + on: { + click: _ => { + this.leasePlanDbclick(row) + } + } + }, '查看') } ], @@ -450,170 +466,58 @@ export default { { title: "资产名称", key: "dikuaimingcheng", - minWidth: 220, + minWidth: 240, fixed: "left", align: "left", render: (h, { row }) => { let tags = row.id_leases_to_assets_lease_id_relation?.map(item => { if (item.land_id) { let land = row.land?.find(j => j.id === item.land_id) - return h('el-popover',{ - props: { - width: 240, - trigger: 'hover', - placement: 'top' - } - },[ - h( - "Tag", - { - slot: 'reference', - props: { - type: "dot", - color: "#3fa45a", - }, - style: { - background: "#e5f4ea !important", - }, + return h( + "Tag", + { + slot: 'reference', + props: { + type: "border", + color: "#3fa45a", }, - land.name - ), - h("div",{ - slot: 'default' - }, [ - h('div', [ - h('span',{ - style: { - 'font-weight': '500' - } - }, '资产名称:'), - h('span', land.name||item.name||'无') - ]), - h('div', [ - h('span', { - style: { - 'font-weight': '500' - } - },'详细位置:'), - h('span', item.xiangxiweizhi||'无') - ]), - h('div', [ - h('span', { - style: { - 'font-weight': '500' - } - },'出租面积:'), - h('span', item.chuzumianji||'0') - ]) - ]) - ]) + style: { + background: "#e5f4ea !important", + }, + }, + land.name + ) } else if (item.house_id) { let house = row.houses?.find(j => j.id === item.house_id) - return h("el-popover",{ - props: { - width: 240, - trigger: "hover", - placement: 'top' - } - },[ - h( - "Tag", - { - slot: "reference", - props: { - type: "dot", - color: "#2254e4", - }, - style: { - background: "#e8edfc !important", - }, + return h( + "Tag", + { + slot: "reference", + props: { + type: "border", + color: "#2254e4", }, - (house.name||'无') - ), - h("div",{ - slot: 'default' - },[ - h('div', [ - h('span',{ - style: { - 'font-weight': '500' - } - }, '资产名称:'), - h('span', house.name||item.name||'无') - ]), - h('div', [ - h('span', { - style: { - 'font-weight': '500' - } - },'详细位置:'), - h('span', item.xiangxiweizhi||'无') - ]), - h('div', [ - h('span', { - style: { - 'font-weight': '500' - } - },'出租面积:'), - h('span', item.chuzumianji||'0') - ]) - ]) - ]) + style: { + background: "#e8edfc !important", + }, + }, + (house.name||'无') + ) } else { - return h("el-popover",{ - props: { - width: 240, - trigger: "hover", - placement: 'top' - } - },[ - h( - "Tag", - { - slot: "reference", - props: { - type: "dot", - color: "#6c3fa4", - }, - style: { - background: "#b78cea !important", - }, + return h( + "Tag", + { + slot: "reference", + props: { + type: "border", + color: "#6c3fa4", }, - item.name || "" - ), - h( - "div", - { - slot: "default" + style: { + background: "#b78cea !important", }, - [ - h('div', [ - h('span',{ - style: { - 'font-weight': '500' - } - }, '资产名称:'), - h('span', item.name||'无') - ]), - h('div', [ - h('span', { - style: { - 'font-weight': '500' - } - },'详细位置:'), - h('span', item.xiangxiweizhi||'无') - ]), - h('div', [ - h('span', { - style: { - 'font-weight': '500' - } - },'出租面积:'), - h('span', item.chuzumianji||'0') - ]) - ] - ), - ]) + }, + item.name || "无" + ) } }) @@ -719,6 +623,24 @@ export default { render: (h, { row }) => { return h('div',`${row.department ? ('【' + row.department.name + '】') : ''}${row.admin ? row.admin.name : ''}`) } + }, + { + key: 'operate', + title: '操作', + width: 82, + align: 'center', + fixed: 'right', + render: (h, { row }) => h('Button', { + props: { + size: 'small', + type: 'primary' + }, + on: { + click: _ => { + this.leaseRowDbclick(row) + } + } + }, '查看') } ], systemSelect: {