Commit 9a300667 authored by renjintao's avatar renjintao

detail height

parent 3e99b4c1
<template> <template>
<div> <div>
<DataGrid :columns="columns" ref="grid" :data="data" :set="false"> <DataGrid :columns="columns" ref="grid" :data="data" :set="false" :height="tableHeight">
<template slot="easySearch"> <template slot="easySearch">
<p class="pl10">{{this.l('userTitle')}}<span class="mr20">{{entity.userTitle}}</span>{{this.l('userTitle')}}<span class="mr20">{{entity.userCardNo}}</span>{{this.l('totalWorkHour')}}<span class="mr20">{{entity.totalWorkHour}}</span>{{this.l('planQuantity')}}<span class="mr20">{{entity.planQuantity}}</span>{{this.l('qualified')}}<span class="mr20">{{entity.qualified}}</span></p> <p class="pl10">{{this.l('userTitle')}}<span class="mr20">{{entity.userTitle}}</span>{{this.l('userTitle')}}<span class="mr20">{{entity.userCardNo}}</span>{{this.l('totalWorkHour')}}<span class="mr20">{{entity.totalWorkHour}}</span>{{this.l('planQuantity')}}<span class="mr20">{{entity.planQuantity}}</span>{{this.l('qualified')}}<span class="mr20">{{entity.qualified}}</span></p>
</template> </template>
...@@ -62,6 +62,7 @@ export default { ...@@ -62,6 +62,7 @@ export default {
], ],
data: [], data: [],
tableHeight: '',
}; };
}, },
props: { props: {
...@@ -79,12 +80,21 @@ export default { ...@@ -79,12 +80,21 @@ export default {
}) { }) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
created() {
this.tableHeight = window.innerHeight - 240
},
mounted() { mounted() {
if (this.row != null && this.row != {}) { if (this.row != null && this.row != {}) {
this.entity = this.row this.entity = this.row
this.load(this.eid); this.load(this.eid);
} }
window.onresize = () => { ///浏览器窗口大小变化
return (() => {
window.screenHeight = window.innerHeight
this.tableHeight = window.screenHeight - 240
})()
}
}, },
methods: { methods: {
load(v) { load(v) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment