-
-
-
-
-
制度文档
-
-
-
-
-
-
-
-
通知
-
-
-
-
-
-
-
-
-
-
租赁台账
-
-
-
- 合约中
- 临期
- 已过期
-
-
+
+
+
+
+
+
通知
+
+
+
+
+ {{ item.name }}
+ {{ item.shijian }}
+
+
+
+
+
+
+
+
+
+
制度文档
+
+
+
+
+ {{ item.name }}
+ {{ $moment(new Date(item.created_at)).format('YYYY-MM-DD') }}
+
+
+
+
+
+
+
-
-
+
+
+
+
+
租赁台账
+
+
+
+
合约中
+
临期
+
已过期
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -81,8 +110,13 @@
orderArr: [],
chartData: {},
- radio: 3,
- select: {
+ radio: 0,
+ config: {
+ time: 1,
+ unit: 'months'
+ },
+ leaseTableLoading: false,
+ leaseSelect: {
table_name: 'leases',
filter: [
{
@@ -95,59 +129,78 @@
op: 'range',
value: `${this.$moment(0).format("YYYY-MM-DD")},${this.$moment().format("YYYY-MM-DD")}`
}
- ]
+ ],
+ page: 1,
+ page_size: 10
},
- table1: [
+ leases: [],
+ leaseTotal: 0,
+ leaseTable: [
{
+ title: '序号',
fixed: 'left',
- type: 'index',
- width: 46,
+ align: 'center',
+ width: 60,
+ render:(h, { row, column, index }) => {
+ return h('div',{
+ style: {
+ height: '18px',
+ width: '18px',
+ 'border-radius': '100%',
+ color: '#fff',
+ background: '#4986cc',
+ 'text-align': 'center',
+ 'font-size': '12px'
+ }
+ },index+1)
+ }
},
{
- label: '地块名称',
- prop: 'dikuaimingcheng',
+ title: '地块名称',
+ key: 'dikuaimingcheng',
width: 180,
fixed: 'left',
align: 'left'
},
{
- label: '出租方',
- prop: 'chuzufang',
+ title: '出租方',
+ key: 'chuzufang',
+ align: 'left',
width: 150
},
{
- label: '承租方',
- prop: 'chengzufang',
+ title: '承租方',
+ align: 'center',
+ key: 'chengzufang',
width: 150
},
{
- label: '租赁期限',
+ title: '租赁期限',
width: 190,
- customFn:row => {
- return (
-
- { this.$moment(new Date(row.zulinkaishiqixian)).format('YYYY.MM.DD') }
- -
- { this.$moment(new Date(row.zulinjieshuqixian)).format('YYYY.MM.DD') }
-
- )
+ align: 'center',
+ render:(h,{ row }) => {
+ return ('div',[
+ h('span',this.$moment(new Date(row.zulinkaishiqixian)).format('YYYY.MM.DD')),
+ h('span',' - '),
+ h('span',this.$moment(new Date(row.zulinjieshuqixian)).format('YYYY.MM.DD'))
+ ])
}
},
{
- label: '应收租金',
- prop: 'yingshouzujin',
+ title: '应收租金',
+ key: 'yingshouzujin',
align: 'right',
width: 120
},
{
- label: '实收租金',
- prop: 'shishouzujin',
+ title: '实收租金',
+ label: 'shishouzujin',
align: 'right',
width: 120
},
{
- label: '保证金',
- prop: 'baozhengjin',
+ title: '保证金',
+ key: 'baozhengjin',
width: 120,
customFn:row => {
return (
@@ -156,11 +209,27 @@
}
},
{
- label: '未到位原因',
- prop: 'weidaoweiyuanyin',
+ title: '未到位原因',
+ key: 'weidaoweiyuanyin',
minWidth: 140
}
- ]
+ ],
+ systemSelect: {
+ table_name: 'systems',
+ filter: [
+ ],
+ page: 1,
+ page_size: 10
+ },
+ systems: [],
+ systemTotal: 0,
+ noticeSelect: {
+ table_name: 'notices',
+ page: 1,
+ page_size: 10
+ },
+ noticeTotal: 0,
+ notices: [],
}
},
watch: {
@@ -244,7 +313,10 @@
},
},
}
- ]
+ ],
+ select1: {
+
+ }
})
this.line = echarts.init(document.getElementById('line-chart'))
@@ -302,27 +374,69 @@
},
async radioPick (e) {
+ this.radio = 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 = ''
+ let preDate = date.subtract(this.config.time, this.config.unit).format("YYYY-MM-DD")
+ this.leaseSelect.filter[0].value = `${preDate},${date.format("YYYY-MM-DD")}`
+ this.leaseSelect.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 = ''
+ this.leaseSelect.filter[0].value = `${this.$moment(0).format("YYYY-MM-DD")},${this.$moment().format("YYYY-MM-DD")}`
+ this.leaseSelect.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")}`
+ if (e === 0) {
+ this.leaseSelect.filter[0].value = `${this.$moment().format("YYYY-MM-DD")},2999-12-31`
+ this.leaseSelect.filter[1].value = `${this.$moment(0).format("YYYY-MM-DD")},${this.$moment().format("YYYY-MM-DD")}`
}
+ this.leaseSelect.page = 1;
+ await this.getLeases();
+ },
- this.$refs['table1'].getTableData(true)
+ async getConfig () {
+ const res = await index({
+ table_name: 'warnings',
+ filter: [
+ {
+ key: 'flag',
+ op: 'eq',
+ value: 'contract'
+ }
+ ]
+ })
+ this.config.time = Number(res.data[0]?.time);
+ this.config.unit = res.data[0]?.unit;
+ },
+
+ async getNotices () {
+ const res = await index(this.noticeSelect,false);
+ this.notices = res.data;
+ this.noticeTotal = res.total;
+ },
+ async getSystems () {
+ const res = await index(this.systemSelect,false);
+ this.systems = res.data;
+ this.systemTotal = res.total;
+ },
+ async getLeases () {
+ try {
+ this.leaseTableLoading = true;
+ const res = await index(this.leaseSelect,false);
+ this.leases = res.data;
+ this.leaseTotal = res.total;
+ this.leaseTableLoading = false;
+ }catch (e) {
+ this.leaseTableLoading = false;
+ }
}
},
created() {
-
+ this.getNotices();
+ this.getSystems();
+ this.getConfig().then(_ => {
+ this.getLeases();
+ })
//this.loadData();
},
mounted() {
@@ -474,4 +588,81 @@
}
}
}
+
+ .type-bar {
+ display: flex;
+
+ position: relative;
+ top: 4px;
+ &::before {
+ content: '';
+ height: .5px;
+ background: #aaa;
+
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ }
+
+ &__item {
+ cursor: pointer;
+ text-align: center;
+ width: 80px;
+ line-height: 40px;
+ transition: all .2s;
+
+ &--active {
+ color: $primaryColor;
+ font-weight: 600;
+ }
+ }
+ & > svg {
+ width: 80px;
+ transition: all .2s;
+
+ position: absolute;
+ left: 0;
+ bottom: 0;
+ }
+ }
+
+ .list {
+
+ padding: 10px 10px 0 10px;
+ &-page {
+ display: flex;
+ justify-content: center;
+
+ margin-top: 30px;
+ }
+ &-item {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+
+ padding-left: 16px;
+ position: relative;
+ & > span + span {
+ color: #999;
+ zoom: .9;
+ }
+ &::before {
+ content: '';
+ width: 4px;
+ height: 4px;
+ border-radius: 100%;
+ background: $primaryColor;
+ transform: translateY(-50%);
+
+ position: absolute;
+ left: 0;
+ top: 50%
+ }
+ }
+ &-item + &-item {
+
+ margin-top: 10px;
+ }
+ }
diff --git a/src/views/operate/file.vue b/src/views/operate/file.vue
index 91da19f..6864b6f 100644
--- a/src/views/operate/file.vue
+++ b/src/views/operate/file.vue
@@ -433,14 +433,16 @@ export default {
);
if (i.select_item && typeof i.select_item === "object") {
let keys = Object.keys(i.select_item);
- i._params = keys.map((key) => {
- return {
- key,
- value: /^\d*$/.test(i.select_item[key])
- ? Number(i.select_item[key])
- : i.select_item[key],
- };
- });
+ if (keys instanceof Array && keys.length > 0) {
+ i._params = keys.map((key) => {
+ return {
+ key,
+ value: /^\d*$/.test(i.select_item[key])
+ ? Number(i.select_item[key])
+ : i.select_item[key],
+ };
+ });
+ }
}
if (i.edit_input === 'file' || i.edit_input === 'files') {
return