Commit 97731cb5 by 史敦盼

表格分页序号翻页增加,以及查询表单与表格距离调整

1 parent dedd7eee
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Autor: pan * @Autor: pan
* @Date: 2024-03-12 14:01:57 * @Date: 2024-03-12 14:01:57
* @LastEditors: pan * @LastEditors: pan
* @LastEditTime: 2024-03-29 20:23:32 * @LastEditTime: 2024-04-01 10:35:02
--> -->
<template> <template>
<div class="list-page"> <div class="list-page">
...@@ -45,7 +45,7 @@ export default { ...@@ -45,7 +45,7 @@ export default {
box-sizing: border-box; box-sizing: border-box;
.operation-wrap { .operation-wrap {
display: flex; display: flex;
padding: 10px 0; padding: 14px 0;
box-sizing: border-box; box-sizing: border-box;
} }
.table-wrap { .table-wrap {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Autor: pan * @Autor: pan
* @Date: 2024-03-11 14:53:40 * @Date: 2024-03-11 14:53:40
* @LastEditors: pan * @LastEditors: pan
* @LastEditTime: 2024-03-27 17:22:37 * @LastEditTime: 2024-04-01 10:28:05
--> -->
<!-- 示例 <!-- 示例
columns: [{ label: '头像', prop: 'avatar', align: 'center', __slotName: 'avatar',callback: (row, title) => { columns: [{ label: '头像', prop: 'avatar', align: 'center', __slotName: 'avatar',callback: (row, title) => {
...@@ -60,9 +60,17 @@ ...@@ -60,9 +60,17 @@
<span v-html="item.callback && item.callback(scope.row)"></span> <span v-html="item.callback && item.callback(scope.row)"></span>
</template> </template>
</el-table-column> --> </el-table-column> -->
<el-table-column
v-if="item.type === 'index'"
v-bind="item"
align="center"
:key="item"
:index="indexMethod"
>
</el-table-column>
<!-- 操作列 --> <!-- 操作列 -->
<el-table-column <el-table-column
v-if="item.type === 'operation'" v-else-if="item.type === 'operation'"
:key="item.prop" :key="item.prop"
v-bind="item" v-bind="item"
align="center" align="center"
...@@ -218,6 +226,12 @@ export default { ...@@ -218,6 +226,12 @@ export default {
this.queryData() this.queryData()
}, },
methods: { methods: {
indexMethod(index) {
return (
(this.pagination.current - 1) * this.pagination.pageSize + index + 1
)
},
clearSelection() { clearSelection() {
this.$refs.tableConfig.clearSelection() this.$refs.tableConfig.clearSelection()
}, },
......
...@@ -98,6 +98,7 @@ ...@@ -98,6 +98,7 @@
type="index" type="index"
label="序号" label="序号"
width="80" width="80"
:index="indexMethod"
align="center" align="center"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
...@@ -353,20 +354,20 @@ ...@@ -353,20 +354,20 @@
></el-option> ></el-option>
</el-select> </el-select>
</div> </div>
<div class="newBtn"> <div class="newBtn" style="display: flex">
<el-button <el-button
class="addItem" class="addItem"
icon="el-icon-plus" icon="el-icon-minus"
circle circle
@click="operateDia('add')" @click="operateDia('del', index)"
v-if="formData.arrList.length == index + 1" v-if="formData.arrList.length > 1"
></el-button> ></el-button>
<el-button <el-button
class="addItem" class="addItem"
icon="el-icon-minus" icon="el-icon-plus"
circle circle
@click="operateDia('del')" @click="operateDia('add')"
v-else v-if="formData.arrList.length - 1 == index"
></el-button> ></el-button>
</div> </div>
</div> </div>
...@@ -733,6 +734,9 @@ export default { ...@@ -733,6 +734,9 @@ export default {
}, },
created() {}, created() {},
methods: { methods: {
indexMethod(index) {
return (this.params.current - 1) * this.params.pageSize + index + 1
},
queryAllKey() { queryAllKey() {
//查询控件右边的下拉框值 //查询控件右边的下拉框值
gAllDictKey().then((res) => { gAllDictKey().then((res) => {
...@@ -1164,7 +1168,7 @@ export default { ...@@ -1164,7 +1168,7 @@ export default {
}, },
// 对话表格操作 // 对话表格操作
operateDia(type) { operateDia(type, index) {
switch (type) { switch (type) {
// 添加 // 添加
case 'add': case 'add':
...@@ -1176,7 +1180,7 @@ export default { ...@@ -1176,7 +1180,7 @@ export default {
break break
// 删除 // 删除
case 'del': case 'del':
this.formData.arrList.splice(this.formData.arrList.length - 1, 1) this.formData.arrList.splice(index, 1)
break break
} }
}, },
...@@ -1323,8 +1327,8 @@ export default { ...@@ -1323,8 +1327,8 @@ export default {
.search_btn { .search_btn {
width: 100%; width: 100%;
display: flex; display: flex;
margin-top: 50px; margin-top: 14px;
margin-bottom: 20px; margin-bottom: 14px;
} }
.add_btn { .add_btn {
display: flex; display: flex;
......
...@@ -93,6 +93,7 @@ ...@@ -93,6 +93,7 @@
type="index" type="index"
label="序号" label="序号"
width="80" width="80"
:index="indexMethod"
align="center" align="center"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
...@@ -389,6 +390,9 @@ export default { ...@@ -389,6 +390,9 @@ export default {
this.getList() this.getList()
}, },
methods: { methods: {
indexMethod(index) {
return (this.pager.current - 1) * this.pager.size + index + 1
},
search_table() { search_table() {
//搜索 //搜索
this.pager.current = 1 this.pager.current = 1
...@@ -769,8 +773,8 @@ export default { ...@@ -769,8 +773,8 @@ export default {
.search_btn { .search_btn {
width: 100%; width: 100%;
display: flex; display: flex;
margin-top: 50px; margin-top: 14px;
margin-bottom: 20px; margin-bottom: 14px;
.el-button--primary { .el-button--primary {
background: rgba(13, 134, 127, 0.1); background: rgba(13, 134, 127, 0.1);
color: #0d867f; color: #0d867f;
......
...@@ -114,6 +114,7 @@ ...@@ -114,6 +114,7 @@
type="index" type="index"
label="序号" label="序号"
width="80" width="80"
:index="indexMethod"
align="center" align="center"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
...@@ -791,6 +792,9 @@ export default { ...@@ -791,6 +792,9 @@ export default {
this.getDicts() this.getDicts()
}, },
methods: { methods: {
indexMethod(index) {
return (this.pager.current - 1) * this.pager.size + index + 1
},
formatterDept(row, column, cellValue, index, options) { formatterDept(row, column, cellValue, index, options) {
const obj = this[options]?.find((v) => v.value == cellValue) || {} const obj = this[options]?.find((v) => v.value == cellValue) || {}
return obj.label return obj.label
...@@ -1006,7 +1010,7 @@ export default { ...@@ -1006,7 +1010,7 @@ export default {
if (item.value == v.busiFileType) { if (item.value == v.busiFileType) {
item.fileList = [ item.fileList = [
{ {
name: v.busiFileName, name: v.fileName,
url: v.fileUrl, url: v.fileUrl,
fileId: v.fileId, fileId: v.fileId,
fileName: v.fileName, fileName: v.fileName,
...@@ -1015,7 +1019,7 @@ export default { ...@@ -1015,7 +1019,7 @@ export default {
] ]
item.fileArray = [ item.fileArray = [
{ {
name: v.busiFileName, name: v.fileName,
url: v.fileUrl, url: v.fileUrl,
fileId: v.fileId, fileId: v.fileId,
fileName: v.fileName, fileName: v.fileName,
...@@ -1443,13 +1447,13 @@ export default { ...@@ -1443,13 +1447,13 @@ export default {
.search_btn { .search_btn {
width: 100%; width: 100%;
display: flex; display: flex;
margin-top: 50px; margin-top: 14px;
margin-bottom: 20px; margin-bottom: 14px;
} }
.search_menu { .search_menu {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-bottom: 50px; margin-bottom: 14px;
} }
.search_menu_item_container { .search_menu_item_container {
display: flex; display: flex;
......
...@@ -114,6 +114,7 @@ ...@@ -114,6 +114,7 @@
type="index" type="index"
label="序号" label="序号"
width="80" width="80"
:index="indexMethod"
align="center" align="center"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
...@@ -390,6 +391,9 @@ export default { ...@@ -390,6 +391,9 @@ export default {
this.getDicts() this.getDicts()
}, },
methods: { methods: {
indexMethod(index) {
return (this.pager.current - 1) * this.pager.size + index + 1
},
openDetail(row) { openDetail(row) {
this.rowData = row this.rowData = row
this.appDetailVisible = true this.appDetailVisible = true
...@@ -718,13 +722,13 @@ export default { ...@@ -718,13 +722,13 @@ export default {
.search_btn { .search_btn {
width: 100%; width: 100%;
display: flex; display: flex;
margin-top: 50px; margin-top: 14px;
margin-bottom: 20px; margin-bottom: 14px;
} }
.search_menu { .search_menu {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-bottom: 50px; margin-bottom: 14px;
} }
.search_menu_item_container { .search_menu_item_container {
display: flex; display: flex;
......
...@@ -98,6 +98,7 @@ ...@@ -98,6 +98,7 @@
type="index" type="index"
label="序号" label="序号"
width="80" width="80"
:index="indexMethod"
align="center" align="center"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
...@@ -347,6 +348,9 @@ export default { ...@@ -347,6 +348,9 @@ export default {
}) })
}, },
methods: { methods: {
indexMethod(index) {
return (this.pager.current - 1) * this.pager.size + index + 1
},
search_table() { search_table() {
//搜索 //搜索
this.pager.current = 1 this.pager.current = 1
...@@ -708,8 +712,8 @@ export default { ...@@ -708,8 +712,8 @@ export default {
.search_btn { .search_btn {
width: 100%; width: 100%;
display: flex; display: flex;
margin-top: 50px; margin-top: 14px;
margin-bottom: 20px; margin-bottom: 14px;
} }
.el-button--default { .el-button--default {
border: 0; border: 0;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!