master
xy 2 years ago
parent 31383b4167
commit c944b75d31

@ -995,6 +995,7 @@ export default {
::v-deep .el-table { ::v-deep .el-table {
margin-bottom: 0 !important; margin-bottom: 0 !important;
} }
.xy-table__setting { .xy-table__setting {
font-size: 14px; font-size: 14px;

@ -308,12 +308,12 @@
<!-- :form-info="form"--> <!-- :form-info="form"-->
<!-- ref="drawer"--> <!-- ref="drawer"-->
<!-- ></drawer>--> <!-- ></drawer>-->
<!-- <imports--> <imports
<!-- :table-name="customForm.tableName"--> :table-name="customForm.tableName"
<!-- :form-info="form"--> :form-info="form"
<!-- ref="imports"--> ref="imports"
<!-- @refresh="$refs['xyTable'].getTableData()"--> @refresh="$refs['xyTable'].getTableData()"
<!-- ></imports>--> ></imports>
<!-- <assetsHistoryList ref="assetsHistoryList"></assetsHistoryList>--> <!-- <assetsHistoryList ref="assetsHistoryList"></assetsHistoryList>-->
</div> </div>
</template> </template>
@ -336,7 +336,7 @@ import headerContent from "@/components/LxHeader/XyContent.vue";
import history from '@/views/assets/history.vue'; import history from '@/views/assets/history.vue';
import lease from '@/views/assets/lease.vue'; import lease from '@/views/assets/lease.vue';
// import drawer from "@/views/component/drawer.vue"; // import drawer from "@/views/component/drawer.vue";
// import imports from "./imports.vue"; import imports from "@/views/component/imports.vue";
import atlas from "@/views/assets/atlas.vue"; import atlas from "@/views/assets/atlas.vue";
// import assetsHistoryList from '@/views/assets/assetsHistoryList.vue' // import assetsHistoryList from '@/views/assets/assetsHistoryList.vue'
export default { export default {
@ -349,7 +349,7 @@ export default {
lease, lease,
atlas, atlas,
// drawer, // drawer,
// imports, imports,
// assetsHistoryList // assetsHistoryList
}, },

@ -129,11 +129,6 @@ export default {
width: 200 width: 200
}; };
}); });
this.table.unshift({
key: 'id',
title: 'id',
width: 140
})
} }
}, },
}, },

@ -97,9 +97,9 @@
<div <div
class="search-list__bar" class="search-list__bar"
> >
<Button size="small" type="success" :ghost="hasHouse !== 2" @click="hasHouse = 2">有房产</Button> <Button size="small" type="success" :ghost="hasHouse !== 1" @click="hasHouse = 1,getList(1)">土地</Button>
<Button size="small" type="primary" :ghost="hasHouse !== 3" @click="hasHouse = 3">房产</Button> <Button size="small" type="primary" :ghost="hasHouse !== 2" @click="hasHouse = 2,getList(2)">房产</Button>
<Button size="small" type="info" :ghost="hasHouse !== 1" @click="hasHouse = 1">全部</Button> <Button size="small" type="info" :ghost="hasHouse !== 3" @click="hasHouse = 3,getList(3)">全部</Button>
<el-input size="mini" style="margin-top: 4px;" placeholder="请输入地块名称" v-model="select.filter[1].value" clearable> <el-input size="mini" style="margin-top: 4px;" placeholder="请输入地块名称" v-model="select.filter[1].value" clearable>
<el-button type="primary" slot="append" icon="el-icon-search" @click="areaPick"></el-button> <el-button type="primary" slot="append" icon="el-icon-search" @click="areaPick"></el-button>
</el-input> </el-input>
@ -134,12 +134,13 @@
<p style="zoom: .9;text-align: center;padding: 4px 0;font-weight: 600;">总共 {{total}} </p> <p style="zoom: .9;text-align: center;padding: 4px 0;font-weight: 600;">总共 {{total}} </p>
<ul v-if="list && list.length > 0"> <ul v-if="list && list.length > 0">
<li v-for="(item,index) in listFilter" :key="item.id" :style="{'border-color': openData.id === item.id ? 'blue' : ''}"> <li v-for="(item,index) in list" :key="item.id" :style="{'border-color': openData.id === item.id ? 'blue' : ''}">
<div class="left"> <div class="left">
<p>{{ item.name }}</p> <p>{{ item.name }}</p>
<Tag :color="Object.hasOwn(item,'id_house_properties_land_id_relation') ? 'green' : 'purple'">{{ Object.hasOwn(item,'id_house_properties_land_id_relation') ? '土地' : '房产' }}</Tag>
<Tag color="blue" v-if="item.area">{{ wxAreas[item.area-1] }}</Tag> <Tag color="blue" v-if="item.area">{{ wxAreas[item.area-1] }}</Tag>
<Tag color="cyan" v-if="item.shijimianji">{{ item.shijimianji }} m²</Tag> <!-- <Tag color="cyan" v-if="item.shijimianji">{{ item.shijimianji }} m²</Tag>-->
<Tag color="red" v-if="item.id_house_properties_land_id_relation"></Tag> <Tag color="red" v-if="Object.hasOwn(item,'id_house_properties_land_id_relation')">{{ item.id_house_properties_land_id_relation ? '' : '' }}</Tag>
<Tag color="gold" v-if="item.jianzhuleixing">{{ jianzhuleixing(item.jianzhuleixing) }}</Tag> <Tag color="gold" v-if="item.jianzhuleixing">{{ jianzhuleixing(item.jianzhuleixing) }}</Tag>
<Tag color="magenta" v-if="item.zichanleixing">{{ zichanleixing(item.zichanleixing) }}</Tag> <Tag color="magenta" v-if="item.zichanleixing">{{ zichanleixing(item.zichanleixing) }}</Tag>
</div> </div>
@ -272,7 +273,7 @@ export default {
loading: false, loading: false,
dragging: false, dragging: false,
searchShow: true, searchShow: true,
hasHouse: 1, //1 2 3 hasHouse: 1, //1 2 3
selectList: { selectList: {
table_name: "assets", table_name: "assets",
filter: [ filter: [
@ -289,7 +290,7 @@ export default {
], ],
}, },
select: { select: {
table_name: "assets", //table_name: "assets",
filter: [ filter: [
{ {
key: "suoshuqu", key: "suoshuqu",
@ -382,14 +383,35 @@ export default {
}, },
async getList() { async getList() {
this.loading = true; this.loading = true;
const res = await index({ let opt = {
page: 1, page: 1,
page_size: 9999, page_size: 9999,
...this.select, ...this.select,
}); table_name: this.hasHouse === 1 ? 'lands' : 'houses'
}
if (this.hasHouse === 3) {
delete opt.table_name
let promise = [];
promise.push(index({
...opt,
table_name: 'lands'
}))
promise.push(index({
...opt,
table_name: 'houses'
}))
const res = await Promise.all(promise)
this.total = res.reduce((a,b) => a + b.total,0);
this.list = Array.from(res, i => i.data).reduce((a,b) => a.concat(b),[]);
this.loading = false;
} else {
const res = await index(opt);
this.total = res.total; this.total = res.total;
this.list = res.data; this.list = res.data;
this.loading = false; this.loading = false;
}
}, },
addCluster() { addCluster() {
if (this.cluster) { if (this.cluster) {
@ -544,7 +566,7 @@ export default {
let custom_form = JSON.parse(decode); let custom_form = JSON.parse(decode);
this.customForm.customFormId = custom_form.custom_form_id; this.customForm.customFormId = custom_form.custom_form_id;
this.customForm.tableName = custom_form.table_name; this.customForm.tableName = custom_form.table_name;
this.select.table_name = custom_form.table_name; //this.select.table_name = custom_form.table_name;
} catch (err) { } catch (err) {
console.warn(err); console.warn(err);
} }

@ -1,20 +1,35 @@
<template> <template>
<div > <div>
<div class="statistics"> <div class="statistics">
<panel-group :totaldata="list" /> <panel-group :totaldata="list" />
</div> </div>
<div class="contract">
<div class="contract__title">
<h3>租凭合同</h3>
<div>
<RadioGroup v-model="radio" type="button" button-style="solid" @on-change="radioPick">
<Radio :label="1">临期</Radio>
<Radio :label="2">已过期</Radio>
<Radio :label="3">合约中</Radio>
</RadioGroup>
</div>
</div>
<xy-table :height="400" :table-item="table1" style="margin-top: 20px" size="mini" stripe ref="table1" :auths="[]" :action="index" :req-opt="select"></xy-table>
</div>
</div> </div>
</template> </template>
<script> <script>
import echarts from "echarts" import echarts from "echarts";
import PanelGroup from './components/PanelGroup' import PanelGroup from './components/PanelGroup';
import { import {
getChartsHome getChartsHome
} from "../../api/dashboard.js" } from '@/api/dashboard';
import { index } from "@/api/system/baseForm"
export default { export default {
components: { components: {
@ -50,6 +65,87 @@
customerArr: [], customerArr: [],
orderArr: [], orderArr: [],
chartData: {}, chartData: {},
radio: 1,
select: {
table_name: 'leases',
filter: [
{
key: 'zulinjieshuqixian',
op: 'range',
value: `${this.$moment().subtract(1, "months").format("YYYY-MM-DD")},${this.$moment().format("YYYY-MM-DD")}`
},
{
key: 'zulinkaishiqixian',
op: 'range',
value: ''
}
]
},
table1: [
{
fixed: 'left',
type: 'index',
width: 46,
},
{
label: '地块名称',
prop: 'dikuaimingcheng',
width: 180,
fixed: 'left',
align: 'left'
},
{
label: '出租房',
prop: 'chuzufang',
width: 150
},
{
label: '承租方',
prop: 'chengzufang',
width: 150
},
{
label: '租聘期限',
width: 190,
customFn:row => {
return (
<div>
<span>{ this.$moment(new Date(row.zulinkaishiqixian)).format('YYYY.MM.DD') }</span>
<span> - </span>
<span>{ this.$moment(new Date(row.zulinjieshuqixian)).format('YYYY.MM.DD') }</span>
</div>
)
}
},
{
label: '应收租金',
prop: 'yingshouzujin',
align: 'right',
width: 120
},
{
label: '实收租金',
prop: 'shishouzujin',
align: 'right',
width: 120
},
{
label: '保证金',
prop: 'baozhengjin',
width: 120,
customFn:row => {
return (
<div style={{'text-align': row.baozhengjin === '无' ? 'center' : 'right' }}>{ row.baozhengjin }</div>
)
}
},
{
label: '未到位原因',
prop: 'weidaoweiyuanyin',
minWidth: 140
}
]
} }
}, },
watch: { watch: {
@ -60,6 +156,7 @@
} }
}, },
methods: { methods: {
index,
async loadData() { async loadData() {
await getChartsHome().then((res) => { await getChartsHome().then((res) => {
console.log(res); console.log(res);
@ -187,6 +284,26 @@
} }
] ]
}) })
},
async radioPick (e) {
if (e === 1) {
let date = this.$moment()
let preDate = date.subtract(1, "months").format("YYYY-MM-DD")
this.select.filter[0].value = `${preDate},${date.format("YYYY-MM-DD")}`
this.select.filter[1].value = ''
}
if (e === 2) {
this.select.filter[0].value = `${this.$moment(0).format("YYYY-MM-DD")},${this.$moment().format("YYYY-MM-DD")}`
this.select.filter[1].value = ''
}
if (e === 3) {
this.select.filter[0].value = `${this.$moment().format("YYYY-MM-DD")},2999-12-31`
this.select.filter[1].value = `${this.$moment(0).format("YYYY-MM-DD")},${this.$moment().format("YYYY-MM-DD")}`
}
this.$refs['table1'].getTableData(true)
} }
}, },
created() { created() {
@ -318,4 +435,29 @@
} }
.contract {
&__title {
display: flex;
justify-content: space-between;
align-items: center;
& > h3 {
position: relative;
&::before {
content: '';
height: 14px;
width: 140px;
background: radial-gradient(12px 9px at 10px 40%,rgba(53, 122, 199, .6) 20%,#0000 70%) 0 0/12px 12px no-repeat,
radial-gradient(120px 9px at 10px 40%,rgba(53, 122, 199, .6) 20%,#0000 70%) 12px 0/130px 12px no-repeat;
position: absolute;
bottom: -3px;
left: -6px;
}
}
}
}
</style> </style>

Loading…
Cancel
Save