feat:完善出差申请,城市页面优化
This commit is contained in:
@@ -25,14 +25,21 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="cityList" @selection-change="handleSelectionChange" border stripe>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" type="index" width="50" align="center" />
|
||||
<el-table-column prop="cityCode" label="城市编码" align="center" width="150" />
|
||||
<el-table-column prop="countryName" label="国家" align="center" width="120" />
|
||||
<el-table-column prop="cityName" label="城市名称" align="center" width="200" />
|
||||
<el-table-column prop="provinceName" label="所属省份" align="center" width="150" />
|
||||
<el-table-column label="操作" align="center" width="150">
|
||||
<!-- 表格取消所有固定宽度,100%自适应铺满容器 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="cityList"
|
||||
@selection-change="handleSelectionChange"
|
||||
border stripe
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="selection" align="center" />
|
||||
<el-table-column label="序号" type="index" align="center" />
|
||||
<el-table-column prop="cityCode" label="城市编码" align="center" />
|
||||
<el-table-column prop="countryName" label="国家" align="center" />
|
||||
<el-table-column prop="cityName" label="城市名称" align="center" />
|
||||
<el-table-column prop="provinceName" label="所属省份" align="center" />
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
@@ -48,7 +55,7 @@
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 弹窗表单:我加了国家输入框 -->
|
||||
<!-- 弹窗表单 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="国家" prop="countryName">
|
||||
@@ -86,7 +93,7 @@ export default {
|
||||
total: 0,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 50, // 已改成每页50条
|
||||
cityName: null
|
||||
},
|
||||
ids: [],
|
||||
@@ -119,7 +126,7 @@ export default {
|
||||
this.getList();
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParams = { pageNum: 1, pageSize: 10, cityName: null };
|
||||
this.queryParams = { pageNum: 1, pageSize: 50, cityName: null };
|
||||
this.getList();
|
||||
},
|
||||
handleSelectionChange(selection) {
|
||||
@@ -171,4 +178,27 @@ export default {
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 全局弱化边框、阴影、降低层级 */
|
||||
.app-container {
|
||||
padding: 12px;
|
||||
}
|
||||
.el-table {
|
||||
box-shadow: none !important;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.el-table th, .el-table td {
|
||||
border-color: #f0f2f5 !important;
|
||||
}
|
||||
/* 按钮缩小、弱化样式 */
|
||||
.el-button--mini {
|
||||
padding: 3px 10px;
|
||||
font-size: 12px;
|
||||
}
|
||||
/* 降低弹窗层级柔和化 */
|
||||
.el-dialog {
|
||||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user