Commit a247d8d6 by 潘际乾

home ui

parent 23174c7b
<template> <template>
<c-page> <div class="eContainer">
<div class="eContainer"> <c-page>
<!-- <c-bus-button :$pntvm="this"></c-bus-button> j加操作按钮--> <!-- <c-bus-button :$pntvm="this"></c-bus-button> j加操作按钮-->
<el-form <el-form
:model="model" :model="model"
...@@ -109,8 +109,8 @@ ...@@ -109,8 +109,8 @@
@select-ety="selectMsg" @select-ety="selectMsg"
> >
</c-grid-ety-prompt-dialog> </c-grid-ety-prompt-dialog>
</div> </c-page>
</c-page> </div>
</template> </template>
<script> <script>
import Api from '~/service/Api' import Api from '~/service/Api'
......
<template> <template>
<c-page> <div class="eContainer">
<div class="eContainer"> <c-page>
<el-form :model="model" :rules="rules" ref="modelForm" label-width="120px" label-position="right" size="small" :validate-on-rule-change="false"> <el-form :model="model" :rules="rules" ref="modelForm" label-width="120px" label-position="right" size="small" :validate-on-rule-change="false">
<c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="myTabClick"> <c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="myTabClick">
...@@ -124,8 +124,8 @@ ...@@ -124,8 +124,8 @@
<!-- <el-button size="small">拆分报文</el-button> --> <!-- <el-button size="small">拆分报文</el-button> -->
<!-- <el-button size="small">智能提示</el-button> --> <!-- <el-button size="small">智能提示</el-button> -->
</c-function-btn> </c-function-btn>
</div> </c-page>
</c-page> </div>
</template> </template>
<script> <script>
import Api from "~/service/Api" import Api from "~/service/Api"
......
<template> <template>
<c-page title="进口信用证通知"> <div class="eContainer">
<div class="eContainer"> <c-page title="进口信用证通知">
<el-form <el-form
:model="model" :model="model"
:rules="rules" :rules="rules"
...@@ -106,8 +106,8 @@ ...@@ -106,8 +106,8 @@
v-on:select-ety="selectEty" v-on:select-ety="selectEty"
> >
</c-grid-ety-prompt-dialog> </c-grid-ety-prompt-dialog>
</div> </c-page>
</c-page> </div>
</template> </template>
<script> <script>
import Api from "~/service/Api"; import Api from "~/service/Api";
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
</template> </template>
<div class="notice-container"> <div class="notice-container">
<el-scrollbar style="height: 100%;"> <el-scrollbar style="height: 100%;padding-right: 10px;">
<div class="notice-item" v-for="(item, idx) in testData" :key="idx"> <div class="notice-item" v-for="(item, idx) in testData" :key="idx">
<div class="notice-title" :class="{ active: idx === 0 }"> <div class="notice-title" :class="{ active: idx === 0 }">
<a :href="item.url" target="_blank" rel="noopener noreferrer"> <a :href="item.url" target="_blank" rel="noopener noreferrer">
......
<template> <template>
<div class="eContainer-home"> <div class="eContainer-home">
<c-row <c-row
:gutter="10"
v-for="cRow in cellRows" v-for="cRow in cellRows"
:key="cRow" :key="cRow"
> >
<c-col <div class="cell-item"
:span="24 / cellCols" :style="{'width': cellWidth + 'px'}"
v-for="cCol in cellCols" v-for="cCol in cellCols"
:key="cCol" :key="cCol"
> >
...@@ -15,7 +14,7 @@ ...@@ -15,7 +14,7 @@
v-bind:is="getComponentName([cRow - 1], [cCol - 1])" v-bind:is="getComponentName([cRow - 1], [cCol - 1])"
:cellContentHeight="cellContentHeight" :cellContentHeight="cellContentHeight"
></component> ></component>
</c-col> </div>
</c-row> </c-row>
</div> </div>
</template> </template>
...@@ -46,6 +45,7 @@ export default { ...@@ -46,6 +45,7 @@ export default {
data() { data() {
return { return {
cellContentHeight: 0, cellContentHeight: 0,
cellWidth: 0
}; };
}, },
created() { created() {
...@@ -67,6 +67,9 @@ export default { ...@@ -67,6 +67,9 @@ export default {
cellRows(newVal, oldVal) { cellRows(newVal, oldVal) {
this.calcCellContentHeight() this.calcCellContentHeight()
}, },
cellCols(newVal, oldVal) {
this.calcCellContentWidth()
}
}, },
methods: { methods: {
loadCellData() { loadCellData() {
...@@ -117,12 +120,16 @@ export default { ...@@ -117,12 +120,16 @@ export default {
return this.cellNames[rowIdx] ? this.cellNames[rowIdx][colIdx] : null; return this.cellNames[rowIdx] ? this.cellNames[rowIdx][colIdx] : null;
}, },
calcCellContentHeight() { calcCellContentHeight() {
this.cellContentHeight = this.$el.clientHeight * this.getRowHeightPercent() - 52 - 10 // this.cellContentHeight = this.$el.clientHeight * this.getRowHeightPercent() - 52 - 10
this.cellContentHeight = (this.$el.clientHeight - (this.cellRows + 1) * 25 - (52 + 10) * this.cellRows) / this.cellRows
}, },
getRowHeightPercent() { getRowHeightPercent() {
// 每行预留 0.4% 的间距 // 每行预留 0.4% 的间距
return 1 / this.cellRows - 0.004 * this.cellRows; return 1 / this.cellRows - 0.004 * this.cellRows;
}, },
calcCellContentWidth() {
this.cellWidth = (this.$el.clientWidth - (this.cellCols + 1) * 25) / this.cellCols
}
}, },
destroyed() { destroyed() {
window.removeEventListener("resize", this.calcCellContentHeightBind); window.removeEventListener("resize", this.calcCellContentHeightBind);
...@@ -132,9 +139,21 @@ export default { ...@@ -132,9 +139,21 @@ export default {
<style scoped> <style scoped>
.eContainer-home { .eContainer-home {
box-sizing: border-box;
height: 100%; height: 100%;
display: flex; padding: 25px;
flex-direction: column; }
justify-content: space-around; .eContainer-home .el-row {
margin-bottom: 25px;
}
.eContainer-home .el-row:last-child {
margin-bottom: 0;
}
.eContainer-home .cell-item {
float: left;
margin-right: 25px;
}
.eContainer-home .el-row .cell-item:last-child {
margin-right: 0;
} }
</style> </style>
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