diff --git a/src/styles/index.scss b/src/styles/index.scss index ef15120..253b5fe 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -180,9 +180,13 @@ top: 41px !important; line-height: 32px !important; } +.ivu-table-fixed.ivu-table-fixed-shadow { + height: calc(100% - 8px); + scrollbar-width: 8px; +} ::-webkit-scrollbar { - width: 6px; - height: 6px; + width: 8px; + height: 8px; } ::-webkit-scrollbar-thumb { diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ac3377d..000db45 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -39,6 +39,7 @@
{ - let tags = [ - ...row?.land?.map((i) => - h( - "Tag", - { - props: { - type: "dot", - color: "#3fa45a", + 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: 200 + } + },[ + h( + "Tag", + { + slot: 'reference', + props: { + type: "dot", + color: "#3fa45a", + }, + style: { + background: "#e5f4ea !important", + }, }, - style: { - background: "#e5f4ea !important", + land.name + ), + h("div",{ + slot: 'default' + }, (land.name||'无') + '-' + (item.xiangxiweizhi||'无') + '-' + (item.chuzumianji||'0')) + ]) + } else if (item.house_id) { + let house = row.houses?.find(j => j.id === item.house_id) + return h("el-popover",{ + props: { + width: 200, + trigger: "hover" + } + },[ + h( + "Tag", + { + slot: "reference", + props: { + type: "dot", + color: "#2254e4", + }, + style: { + background: "#e8edfc !important", + }, }, - }, - i.name - ) - ), - ...row?.houses?.map((i) => - h( - "Tag", - { - props: { - type: "dot", - color: "#2254e4", + h("div",{ + slot: 'default' + },(house.name||'无') + '-' + (item.xiangxiweizhi||'无') + '-' + (item.chuzumianji||'0')) + ) + ]) + } else { + return h("el-popover",{ + props: { + width: 200, + trigger: "hover" + } + },[ + h( + "Tag", + { + slot: "reference", + props: { + type: "dot", + color: "#6c3fa4", + }, + style: { + background: "#b78cea !important", + }, }, - style: { - background: "#e8edfc !important", + item.name || "" + ), + h( + "div", + { + slot: "default" }, - }, - i.name - ) - ), - ]; + (item.name||'无') + '-' + (item.xiangxiweizhi||'无') + '-' + (item.chuzumianji||'0') + ), + ]) + } + + }) + // let tags = [ + // ...row?.land?.map((i) => + // h( + // "Tag", + // { + // props: { + // type: "dot", + // color: "#3fa45a", + // }, + // style: { + // background: "#e5f4ea !important", + // }, + // }, + // i.name + // ) + // ), + // ...row?.houses?.map((i) => + // h( + // "Tag", + // { + // props: { + // type: "dot", + // color: "#2254e4", + // }, + // style: { + // background: "#e8edfc !important", + // }, + // }, + // i.name + // ) + // ), + // ]; return h("div", [ ...tags.slice(0, 1), h( @@ -514,12 +601,6 @@ export default { ]); }, }, - { - title: "出租方", - key: "chuzufang", - align: "left", - width: 150, - }, { title: "租赁期限", width: 190, @@ -601,6 +682,17 @@ export default { }, }, methods: { + leaseRowDbclick(row, index) { + this.$router.push({ + path: '/lease/detail/' + row.id + }) + }, + leasePlanDbclick(row, index) { + this.$router.push({ + path: '/leasePlan/detail/' + row.id + }) + }, + index, async loadData() { await getChartsHome()