Commit 2406be22 authored by 周远喜's avatar 周远喜

ok

parent ceee37a7
...@@ -3,18 +3,26 @@ ...@@ -3,18 +3,26 @@
<div class="table-tools" v-if="tool"> <div class="table-tools" v-if="tool">
<div class="table-search" v-if="easy"> <div class="table-search" v-if="easy">
<slot name="easySearch"> <slot name="easySearch">
<Input <Form inline>
search <FormItem>
enter-button <Input
:placeholder="placeholder" search
@on-search="easySearch" enter-button
v-model="keys" :placeholder="placeholder"
/> @on-search="easySearch"
v-width="300"
v-model="keys"
/>
</FormItem>
<FormItem>
<Button v-if="high" @click="modalSearch=true" type="text">
<Icon type="md-search" />高级
</Button>
</FormItem>
</Form>
</slot> </slot>
<Button v-if="high" @click="modalSearch=true" type="text">
<Icon type="md-search" />高级
</Button>
</div> </div>
<div class="searchBack"> <div class="searchBack">
<slot name="searchBack"></slot> <slot name="searchBack"></slot>
</div> </div>
...@@ -269,14 +277,23 @@ export default { ...@@ -269,14 +277,23 @@ export default {
} else { } else {
this.easySearch(); this.easySearch();
} }
console.warn("this.$refs.main.clientX",this.$refs.main.offsetTop,this.$refs.main.offsetHeight)
if (this.height === 0) { if (this.height === 0) {
this.$nextTick(() => { this.$nextTick(() => {
this.tableHeight = this.$refs.main.offsetHeight; this.tableHeight = this.$refs.main.offsetHeight;
if (this.tableHeight < 300) {
this.tableHeight = window.screen.availHeight -this.$refs.main.offsetTop-200;
}
console.warn("this.$refs.main.VVV",this.tableHeight)
window.onresize = () => { window.onresize = () => {
///浏览器窗口大小变化 ///浏览器窗口大小变化
return (() => { return (() => {
console.warn("fasfas",this.$refs.main) console.warn(123)
// this.tableHeight = this.$refs.main.offsetHeight; this.tableHeight = this.$refs.main.offsetHeight;
if (this.tableHeight < 300) {
this.tableHeight = window.screen.availHeight -this.$refs.main.offsetTop-150;
}
console.warn("this.$refs.main.tableHeight",this.tableHeight)
})(); })();
}; };
}); });
...@@ -291,7 +308,7 @@ export default { ...@@ -291,7 +308,7 @@ export default {
}, },
methods: { methods: {
//数据加载 //数据加载
load() { load() {
if (this.action) { if (this.action) {
//条件初始化处理。 //条件初始化处理。
if (this.initsearch) { if (this.initsearch) {
...@@ -427,7 +444,7 @@ export default { ...@@ -427,7 +444,7 @@ export default {
let v = conditions[u].value; let v = conditions[u].value;
let op = conditions[u].op; let op = conditions[u].op;
if (!this.$u.isNull(v)) { if (!this.$u.isNull(v)) {
if (op == "Range"&&Array.isArray(v)) { if (op == "Range" && Array.isArray(v)) {
let times = []; let times = [];
v.map(u => { v.map(u => {
if (!this.$u.isNull(u)) { if (!this.$u.isNull(u)) {
...@@ -435,7 +452,7 @@ export default { ...@@ -435,7 +452,7 @@ export default {
} }
}); });
v = times.join(","); v = times.join(",");
} else if (op.indexOf("In") > -1&&Array.isArray(v)) { } else if (op.indexOf("In") > -1 && Array.isArray(v)) {
v = v.join(","); v = v.join(",");
} }
if (!this.$u.isNull(v)) { if (!this.$u.isNull(v)) {
...@@ -543,13 +560,13 @@ export default { ...@@ -543,13 +560,13 @@ export default {
height() { height() {
this.tableHeight = this.height; this.tableHeight = this.height;
}, },
"columns.length"(){ "columns.length"() {
this.columns.forEach(u => { this.columns.forEach(u => {
if (!u.hide) { if (!u.hide) {
u.hide = false; u.hide = false;
} }
}); });
this.columnsCur = this.$u.clone(this.columns); this.columnsCur = this.$u.clone(this.columns);
} }
} }
}; };
......
...@@ -359,6 +359,7 @@ export default { ...@@ -359,6 +359,7 @@ export default {
.product-layout { .product-layout {
.i-layout-content { .i-layout-content {
padding: 5px 10px; padding: 5px 10px;
height: calc(100vh - 100px);
} }
.i-tabs { .i-tabs {
width: 100% !important; width: 100% !important;
......
...@@ -32,14 +32,14 @@ export default { ...@@ -32,14 +32,14 @@ export default {
default:()=>{ default:()=>{
return { return {
res:true, res:true,
datas:{}, datas:'{}',
} }
} }
}, },
computed:{ computed:{
list(){ list(){
var data={}; var data={};
if(this.data.datas){ if(this.data.datas!=''){
var item=JSON.parse(this.data.datas); var item=JSON.parse(this.data.datas);
for(var key in item) for(var key in item)
{ {
......
...@@ -129,7 +129,7 @@ export default { ...@@ -129,7 +129,7 @@ export default {
}, },
result: { result: {
res: true, res: true,
datas: {} datas: '{}'
}, },
resultModal: false, resultModal: false,
entity: { entity: {
......
<template> <template>
<div class="myBug"> <div class="h100">
<DataGrid <DataGrid
:columns="columns" :columns="columns"
ref="grid" ref="grid"
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
enter-button enter-button
placeholder="请输入关键字订单编号/项目名称" placeholder="请输入关键字订单编号/项目名称"
v-model="easySearch.keys.value" v-model="easySearch.keys.value"
v-width="300"
@on-search="search" @on-search="search"
/> />
</FormItem> </FormItem>
......
<template> <template>
<div> <div class="h100">
<DataGrid :columns="columns" ref="grid" :action="action"><template slot="easySearch"><Form ref="formInline" :model="easySearch" inline><FormItem prop="keys"><Input placeholder="请输入关键字编码/名称" v-model="easySearch.keys.value" /> </FormItem> <DataGrid :columns="columns" ref="grid" :action="action"><template slot="easySearch"><Form ref="formInline" :model="easySearch" inline><FormItem prop="keys"><Input placeholder="请输入关键字编码/名称" v-model="easySearch.keys.value" /> </FormItem>
<FormItem><Button type="primary" @click="search">查询</Button></FormItem> <FormItem><Button type="primary" @click="search">查询</Button></FormItem>
</Form></template> </Form></template>
......
<template> <template>
<div class="monitoring"> <div class="monitoring h100">
<DataGrid :columns="columns" ref="grid" :action="action"> <DataGrid :columns="columns" ref="grid" :action="action">
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline style="margin-top:5px;"> <Form ref="formInline" :model="easySearch" inline style="margin-top:5px;">
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
} }
</style> </style>
<template> <template>
<div class="content manyTabs"> <div class="content manyTabs h100">
<Tabs value="Powder" @on-click='changeTab'> <Tabs value="Powder" @on-click='changeTab' class="h100">
<TabPane label="待复验" name="Powder"> <TabPane label="待复验" name="Powder">
<waitReview ref="waitReview" style="margin-top: 45px;" /> <waitReview ref="waitReview" style="margin-top: 45px;" />
</TabPane> </TabPane>
......
<template> <template>
<div> <div class="h100">
<DataGrid :columns="columns" ref="grid" :action="action" @on-expand="show"> <DataGrid :columns="columns" ref="grid" :action="action" @on-expand="show">
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline> <Form ref="formInline" :model="easySearch" inline>
......
<template> <template>
<div class="resources-p"> <div class="resources-p h100">
<DataGrid <DataGrid
:columns="columns" :columns="columns"
ref="grid" ref="grid"
......
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