From f417dc0a44d225d4ed19bcb5207250eb1b669455 Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期五, 25 八月 2023 12:45:09 +0800 Subject: [PATCH] bug修复 --- src/views/client/contacts/index.vue | 28 +++++++++++++++++++++------- 1 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/views/client/contacts/index.vue b/src/views/client/contacts/index.vue index 303b3d4..a8f919f 100644 --- a/src/views/client/contacts/index.vue +++ b/src/views/client/contacts/index.vue @@ -57,6 +57,12 @@ isDetail: { type: Boolean, default: false + }, + addConfig: { + type: Object, + default: () => { + return {} + } } }, mixins: [pageMixin], @@ -113,7 +119,14 @@ }, created() { this.setTable() - this.getData() + if (!this.isDetail) { + this.search_map = {} + } else { + this.search_map = { + [this.addConfig.id_name]: this.addConfig.client_name + } + } + this.getData(this.search_map) }, methods: { setTable() { @@ -125,8 +138,8 @@ { label: "鑱旂郴浜虹紪鍙�", prop: "number", min: 100 }, // 鑱旂郴浜虹紪鍙� { label: "鑱屽姟", prop: "position", min: 120 }, // 鑱屽姟 { label: "鎵嬫満", prop: "phone", min: 100 }, // 鎵嬫満鍙风爜 - { label: "閿�鍞礋璐d汉", prop: "member_id", min: 120 }, // 閿�鍞礋璐d汉 - { label: "棣栬鑱旂郴浜�", prop: "is_first", min: 90 } // 棣栬鑱旂郴浜� + { label: "閿�鍞礋璐d汉", prop: "member_name", min: 120 }, // 閿�鍞礋璐d汉 + { label: "棣栬鑱旂郴浜�", prop: "is_first", isFirst: true, min: 90 } // 棣栬鑱旂郴浜� ] } this.searchOptions = [] @@ -152,8 +165,8 @@ return { ...item, client_name: item.Client.name, - is_first: item.is_first ? "鏄�" : "鍚�", - client_id: item.Client.id + client_id: item.Client.id, + member_name: item.member.username } }) this.tableList.tableInfomation = list || [] @@ -188,7 +201,8 @@ addBtnClick() { this.editConfig.visible = true this.editConfig.title = "鏂板缓" - this.editConfig.infomation = {} + console.log(this.addIdConfig) + this.editConfig.infomation = { ...this.addConfig } }, // 缂栬緫 handleClick(row) { @@ -236,7 +250,7 @@ }, // 瀹㈡埛鍚嶇О璇︽儏 selClientClick(row) { - // console.log(row) + console.log(row) this.clientDeail.visible = true this.clientDeail.infomation = { ...row.Client, -- Gitblit v1.8.0