统一editsite页面的格式

This commit is contained in:
haiyangcui
2020-10-31 21:23:55 +01:00
parent 3d01fd045f
commit 1a3ccaa3ba
2 changed files with 43 additions and 31 deletions

View File

@@ -201,17 +201,29 @@
// Page of list using el-table
.listpage{
height: calc(100% - 40px);
width: 100%;
position: absolute;
left: 80px;
right: 20px;
top: 40px;
bottom: 20px;
width: calc(100% - 100px);
height: calc(100% - 60px);
border-radius: 5px;
display: flex;
flex-direction: column;
.listpage-header{
height: 30px;
height: 60px;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
z-index: 10;
.header-box{
height: 100%;
width: 100%;
align-items: center;
justify-content: space-between;
}
.el-button{
font-size: 1rem;
border: none;
@@ -227,11 +239,10 @@
}
}
.listpage-body{
margin-top: 20px;
flex: 1;
width: 100%;
border-radius: 0 0 5px 5px;
overflow-y: scroll;
height: calc(100% - 60px);
overflow-y: auto;
position: relative;
font-size: 1rem;
&::-webkit-scrollbar{
width: 5px;
height: 1px;
@@ -245,6 +256,9 @@
position: absolute;
}
.show-table{
height: 100%;
width: 100%;
overflow-y: auto;
.el-table::before{
height: 0px;
}

View File

@@ -1,27 +1,25 @@
<template>
<div class="listpage" id="editSites">
<div class="listpage-content">
<div class="listpage-header" v-show="!enableBatchEdit">
<el-switch v-model="enableBatchEdit" active-text="批处理分组">></el-switch>
<el-button @click="addSite" icon="el-icon-document-add">新增</el-button>
<el-button @click="exportSites" icon="el-icon-upload2" ></el-button>
<el-button @click="importSites" icon="el-icon-download">导入</el-button>
<el-button @click="checkAllSite" icon="el-icon-refresh" :loading="checkAllSiteLoading">检测</el-button>
<el-button @click="removeAllSites" icon="el-icon-delete-solid">清空</el-button>
<el-button @click="resetSitesEvent" icon="el-icon-refresh-left">重置</el-button>
</div>
<div class="listpage-header" v-show="enableBatchEdit">
<el-switch v-model="enableBatchEdit" active-text="批处理分组"></el-switch>
<el-input placeholder="新组名" v-model="batchGroupName"></el-input>
<el-switch v-model="batchIsActive" :active-value="1" :inactive-value="0" active-text="自选源"></el-switch>
<el-button type="primary" icon="el-icon-edit" @click.stop="saveBatchEdit">保存</el-button>
</div>
<div class="listpage-body" id="sites-table">
<el-table
<div class="listpage" id="sites">
<div class="listpage-header" v-show="!enableBatchEdit">
<el-switch v-model="enableBatchEdit" active-text="批处理分组">></el-switch>
<el-button @click="addSite" icon="el-icon-document-add">新增</el-button>
<el-button @click="exportSites" icon="el-icon-upload2" >导出</el-button>
<el-button @click="importSites" icon="el-icon-download"></el-button>
<el-button @click="checkAllSite" icon="el-icon-refresh" :loading="checkAllSiteLoading">检测</el-button>
<el-button @click="removeAllSites" icon="el-icon-delete-solid">清空</el-button>
<el-button @click="resetSitesEvent" icon="el-icon-refresh-left">重置</el-button>
</div>
<div class="listpage-header" v-show="enableBatchEdit">
<el-switch v-model="enableBatchEdit" active-text="批处理分组"></el-switch>
<el-input placeholder="新组名" v-model="batchGroupName"></el-input>
<el-switch v-model="batchIsActive" :active-value="1" :inactive-value="0" active-text="自选源"></el-switch>
<el-button type="primary" icon="el-icon-edit" @click.stop="saveBatchEdit">保存</el-button>
</div>
<div class="listpage-body" id="sites-body">
<div class="show-table" id="sites-table">
<el-table size="mini" fit height="100%" row-key="id"
ref="editSitesTable"
size="mini" fit height="100%" row-key="id"
:data="sites"
:key="tableKey"
@selection-change="handleSelectionChange"
@sort-change="handleSortChange">
<el-table-column
@@ -79,7 +77,8 @@
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
<!-- 编辑页面 -->
<div>
<el-dialog :visible.sync="dialogVisible" v-if='dialogVisible' :title="dialogType==='edit'?'编辑源':'新增源'" :append-to-body="true" @close="closeDialog">
@@ -108,7 +107,6 @@
</span>
</el-dialog>
</div>
</div>
</div>
</template>
<script>