From 44787ad94aa657b732b5ce838d977e479263d7e4 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期二, 17 十月 2023 09:37:49 +0800
Subject: [PATCH] bug修复(5239)
---
src/views/other/commonDialog/SelectClientDialog.vue | 85 ++++++++++++++++++++++++++++++++----------
1 files changed, 65 insertions(+), 20 deletions(-)
diff --git a/src/views/other/commonDialog/SelectClientDialog.vue b/src/views/other/commonDialog/SelectClientDialog.vue
index 0f09db5..4615423 100644
--- a/src/views/other/commonDialog/SelectClientDialog.vue
+++ b/src/views/other/commonDialog/SelectClientDialog.vue
@@ -27,10 +27,14 @@
:table-list="tableList"
:select-box="false"
@selClientClick="selNameClick"
+ @selTableCol="selTableCol"
>
</TableCommonView>
<div slot="footer" class="dialog-footer">
- <div class="remark">璇存槑锛氭敮鎸佸瀛楁妯$硦鏌ヨ锛屼粎鏄剧ず绗﹀悎鏉′欢鐨勫墠5鏉℃暟鎹�</div>
+ <!-- <div class="remark">璇存槑锛氭敮鎸佸瀛楁妯$硦鏌ヨ锛屼粎鏄剧ず绗﹀悎鏉′欢鐨勫墠5鏉℃暟鎹�</div> -->
+ <div class="btn-pager">
+ <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
+ </div>
</div>
</div>
</el-dialog>
@@ -39,8 +43,10 @@
<script>
import { getClientList } from "@/api/client/client"
+import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
export default {
name: "EditSelClientDialog",
+ mixins: [pageMixin],
props: {
editCommonConfig: {
type: Object,
@@ -66,7 +72,29 @@
loading: false,
searchOptions: [],
tableList: {},
- search_map: {}
+ search_map: {},
+ tableColumn: [
+ { label: "瀹㈡埛鍚嶇О", prop: "name", min: 100, isClientClick: true, default: true },
+ { label: "瀹㈡埛缂栧彿", prop: "number" },
+ { label: "瀹㈡埛鐘舵��", prop: "client_status" },
+ { label: "閿�鍞礋璐d汉", prop: "member_name", min: 100 },
+ { label: "娉曞畾浠h〃浜�", prop: "representative", min: 100 },
+ { label: "娉ㄥ唽鏃堕棿", prop: "registration_time" },
+ { label: "缁忚惀鑼冨洿", prop: "business_scope" },
+ { label: "璇︾粏鍦板潃", prop: "detail_address" },
+ { label: "澶囨敞", prop: "remark" }
+ ],
+ showCol: [
+ "瀹㈡埛鍚嶇О",
+ "瀹㈡埛缂栧彿",
+ "瀹㈡埛鐘舵��",
+ "閿�鍞礋璐d汉",
+ "娉曞畾浠h〃浜�",
+ "娉ㄥ唽鏃堕棿",
+ "缁忚惀鑼冨洿",
+ "璇︾粏鍦板潃",
+ "澶囨敞"
+ ]
}
},
created() {
@@ -76,25 +104,31 @@
methods: {
setTable() {
this.tableList = {
+ selectIndex: true,
tableInfomation: [],
- tableColumn: [
- { label: "瀹㈡埛鍚嶇О", prop: "name", min: 100, isClientClick: true },
- { label: "瀹㈡埛缂栧彿", prop: "number" },
- { label: "瀹㈡埛鐘舵��", prop: "client_status" },
- { label: "閿�鍞礋璐d汉", prop: "member_name" },
- { label: "娉曞畾浠h〃浜�", prop: "representative" },
- { label: "娉ㄥ唽鏃堕棿", prop: "registration_time" },
- { label: "缁忚惀鑼冨洿", prop: "business_scope" },
- { label: "璇︾粏鍦板潃", prop: "detail_address" },
- { label: "澶囨敞", prop: "remark" }
- ]
+ allcol: [],
+ showcol: this.showCol,
+ tableColumn: this.setColumnVisible(this.showCol)
}
+ this.tableList.allcol = this.tableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label)
this.searchOptions = []
for (let i = 0; i < this.tableList.tableColumn.length; i++) {
const label = this.tableList.tableColumn[i].label
const value = this.tableList.tableColumn[i].prop
this.searchOptions.push({ value: value, label: label })
}
+ },
+ setColumnVisible(showCol) {
+ return this.tableColumn.map((ele) => {
+ return {
+ ...ele,
+ isShowColumn: showCol.includes(ele.label)
+ }
+ })
+ },
+ selTableCol(val) {
+ this.showcol = val
+ this.tableList.tableColumn = this.setColumnVisible(val)
},
handleClose() {
this.editConfig.editVisible = false
@@ -104,13 +138,14 @@
this.loading = true
await getClientList({
search_map: this.search_map,
- page: 0,
- pageSize: 0
+ page: this.pagerOptions.currPage,
+ pageSize: this.pagerOptions.pageSize
})
.then((res) => {
console.log(res)
if (res.code === 200) {
if (res.data.list && res.data.list.length > 0) {
+ console.log("ssss")
const list = res.data.list.map((item) => {
return {
...item,
@@ -118,9 +153,8 @@
member_name: item.member.username
}
})
- this.tableList.tableInfomation = list.slice(0, 5) || []
- } else {
- this.tableList.tableInfomation = []
+ this.tableList.tableInfomation = list || []
+ this.pagerOptions.totalCount = res.data.count
}
} else {
this.tableList.tableInfomation = []
@@ -172,15 +206,26 @@
float: right;
}
}
+ .list-view {
+ height: 100%;
+ background: #c22f2f;
+ }
}
.sel-name {
color: $color-primary;
cursor: pointer;
}
.dialog-footer {
- height: 40px;
- line-height: 40px;
+ height: 50px;
+ line-height: 50px;
color: red;
+ .btn-pager {
+ display: flex;
+ margin-top: 0px;
+ .page {
+ margin-left: auto;
+ }
+ }
}
::v-deep {
.input-with-select .el-input-group__prepend {
--
Gitblit v1.8.0