Commit dd372aa5 authored by hangjun83's avatar hangjun83

前端: 1、调整样式页面

parent 9e49e6da
...@@ -155,7 +155,7 @@ App running at: ...@@ -155,7 +155,7 @@ App running at:
``` ```
> <strong>注意:</strong> 如果需要打包进行正式环境的运行要执行: > <strong>注意:</strong> 如果需要打包进行正式环境的运行要执行:
```sh ```sh
npm build #运行结束会在dist文件生成html文件,将该dist文件夹打包上传至服务中。 npm run build #运行结束会在dist文件生成html文件,将该dist文件夹打包上传至服务中。
``` ```
......
...@@ -3,6 +3,11 @@ ...@@ -3,6 +3,11 @@
margin-bottom: 2vh; margin-bottom: 2vh;
} }
.operation button {
width: 150px;
height: 40px;
}
.select-count { .select-count {
font-weight: 600; font-weight: 600;
color: #40a9ff; color: #40a9ff;
......
.search { .search {
.operation { .operation {
margin-bottom: 2vh; margin-bottom: 2vh;
height: 80vh;
}
.operation form input {
width: 550px;
height: 35px;
} }
.select-title { .select-title {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<Menu active-name="1-1" theme="primary" width="auto" @on-select="currName = $event"> <Menu active-name="1-1" theme="primary" width="auto" @on-select="currName = $event">
<MenuItem name="1-1">安装配置</MenuItem> <MenuItem name="1-1">安装配置</MenuItem>
<MenuItem name="1-2">服务器端</MenuItem> <MenuItem name="1-2">服务器端</MenuItem>
<MenuItem name="1-3"></MenuItem> <MenuItem name="1-3">页面</MenuItem>
</Menu> </Menu>
</Sider> </Sider>
<Content :style="{ <Content :style="{
......
...@@ -356,4 +356,68 @@ ...@@ -356,4 +356,68 @@
right: 4px; right: 4px;
z-index: 100; z-index: 100;
top: 1px; top: 1px;
}
//表格公共样式
.tableInfoBox {
position: relative;
margin: 10px 0px 0px;
background-color: #fff;
border: 1px;
.ivu-table-wrapper {
border: 0px;
}
.ivu-table-border td {
border-color: #f9f9f9;
height: 65px;
}
.ivu-table-tip td {
border-bottom: 1px;
span {
width: 100%;
padding: 0px;
display: inline-block;
color: #aaaaaa;
background-repeat: no-repeat;
background-position: center 50%;
}
}
table th .ivu-table-cell {
position: relative;
display: inline-block;
white-space: nowrap;
overflow: hidden;
text-overflow: inherit;
padding-left: 10px;
padding-right: 10px;
}
/*头部th*/
.ivu-table-header th,
.ivu-table-fixed-header th {
color: #252b2d;
font-weight: bold;
background-color: #f9f9f9;
border:0px;
height: 105px;
}
.ivu-table table {
width: calc(~'100% - 0px') !important;
}
}
/*-弹窗居中显示-*/
.vertical-center-modal {
display: flex;
align-items: center;
justify-content: center;
.ivu-modal {
top: 0;
}
} }
\ No newline at end of file
...@@ -11,14 +11,15 @@ ...@@ -11,14 +11,15 @@
<Button @click="delAll" icon="md-trash">批量删除</Button> <Button @click="delAll" icon="md-trash">批量删除</Button>
<Button @click="init" icon="md-refresh">刷新</Button> <Button @click="init" icon="md-refresh">刷新</Button>
</Row> </Row>
<Alert show-icon v-show="openTip"> <Divider />
<div>
已选择 已选择
<span class="select-count">{{ selectList.length }}</span> <span class="select-count">{{ selectList.length }}</span>
<a class="select-clear" @click="clearSelectAll">清空</a> <a class="select-clear" @click="clearSelectAll">清空</a>
</Alert> </div>
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table> <Table stripe border class="tableInfoBox" :loading="loading" :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small" show-total show-elevator show-sizer></Page> <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" show-total show-sizer></Page>
</Row> </Row>
</Card> </Card>
......
...@@ -35,19 +35,23 @@ ...@@ -35,19 +35,23 @@
<DropdownItem name="refresh">刷新</DropdownItem> <DropdownItem name="refresh">刷新</DropdownItem>
</DropdownMenu> </DropdownMenu>
</Dropdown> </Dropdown>
</Col> </Col>
<Col span="12"> <Col span="12" style="text-align:right">
<div style="text-align:right;"> <Button icon="ios-search" type="dashed" @click="openSearch = !openSearch">开启/关闭搜索</Button>
<Button icon="ios-search" style="margin-top:10px" type="text" @click="openSearch = !openSearch">关闭/开启搜索</Button> </Col>
</div>
</Col>
</Row> </Row>
<Alert show-icon v-show="openTip">
已选择 <Divider />
<span class="select-count">{{ this.selectList.length }}</span> <Row>
<a class="select-clear" @click="clearSelectAll">清空</a> <Col span="3">
</Alert> <div style="display:inline-block;vertical-align: middle;">
<Table :loading="loading" border :columns="columns" :data="data" sortable="custom" @on-sort-change="changeSort" @on-selection-change="showSelect" ref="table"></Table> 已选择
<span class="select-count">{{ selectList.length }}</span>
<a class="select-clear" @click="clearSelectAll">清空</a>
</div>
</Col>
</Row>
<Table stripe border class="tableInfoBox" :loading="loading" :columns="columns" :data="data" sortable="custom" @on-sort-change="changeSort" @on-selection-change="showSelect"></Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small" show-total show-elevator show-sizer></Page> <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small" show-total show-elevator show-sizer></Page>
</Row> </Row>
...@@ -64,8 +68,6 @@ import { ...@@ -64,8 +68,6 @@ import {
enableUser, enableUser,
disableUser, disableUser,
deleteUser, deleteUser,
getAllUserData,
resetUserPass,
} from "@/api/index"; } from "@/api/index";
import addEdit from "./addEdit.vue"; import addEdit from "./addEdit.vue";
import { import {
...@@ -115,27 +117,23 @@ export default { ...@@ -115,27 +117,23 @@ export default {
type: "selection", type: "selection",
width: 60, width: 60,
align: "center", align: "center",
fixed: "left",
}, },
{ {
type: "index", type: "index",
width: 60, width: 60,
align: "center", align: "center",
fixed: "left",
}, },
{ {
title: "登录账号", title: "登录账号",
key: "username", key: "username",
minWidth: 125, minWidth: 125,
sortable: true, sortable: true,
fixed: "left",
}, },
{ {
title: "用户名", title: "用户名",
key: "nickname", key: "nickname",
minWidth: 125, minWidth: 125,
sortable: true, sortable: true,
fixed: "left",
render: (h, params) => { render: (h, params) => {
return h( return h(
"a", { "a", {
...@@ -159,7 +157,7 @@ export default { ...@@ -159,7 +157,7 @@ export default {
title: "类型", title: "类型",
key: "type", key: "type",
align: "center", align: "center",
width: 110, width: 150,
render: (h, params) => { render: (h, params) => {
let re = "", let re = "",
color = ""; color = "";
...@@ -181,31 +179,12 @@ export default { ...@@ -181,31 +179,12 @@ export default {
), ),
]); ]);
}, },
filters: [{
label: "普通用户",
value: 0,
},
{
label: "管理员",
value: 1,
},
],
filterMultiple: false,
filterRemote: (e) => {
let v = "";
if (e.length > 0) {
v = e[0];
}
this.searchForm.type = v;
this.searchForm.pageNumber = 1;
this.getDataList();
},
}, },
{ {
title: "状态", title: "状态",
key: "status", key: "status",
align: "center", align: "center",
width: 100, width: 150,
render: (h, params) => { render: (h, params) => {
if (params.row.status == 1) { if (params.row.status == 1) {
return h("div", [ return h("div", [
...@@ -227,25 +206,6 @@ export default { ...@@ -227,25 +206,6 @@ export default {
]); ]);
} }
}, },
filters: [{
label: "启用",
value: 1,
},
{
label: "禁用",
value: 0,
},
],
filterMultiple: false,
filterRemote: (e) => {
let v = "";
if (e.length > 0) {
v = e[0];
}
this.searchForm.status = v;
this.searchForm.pageNumber = 1;
this.getDataList();
},
}, },
{ {
title: "所在角色组", title: "所在角色组",
...@@ -467,7 +427,7 @@ export default { ...@@ -467,7 +427,7 @@ export default {
onOk: () => { onOk: () => {
enableUser(v.id).then((res) => { enableUser(v.id).then((res) => {
this.$Modal.remove(); this.$Modal.remove();
if (res.success) { if (res.status == 'success') {
this.$Message.success("操作成功"); this.$Message.success("操作成功");
this.getDataList(); this.getDataList();
} }
......
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