From 4898b385886794bf0663ec2d883ea808b78ae522 Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期三, 19 七月 2023 11:37:25 +0800 Subject: [PATCH] 接口联调相关api添加 --- src/views/service/serviceFollowup/index.vue | 42 +++++++++++++++++++++++++++++++----------- 1 files changed, 31 insertions(+), 11 deletions(-) diff --git a/src/views/service/serviceFollowup/index.vue b/src/views/service/serviceFollowup/index.vue index 92d4b8c..c220f62 100644 --- a/src/views/service/serviceFollowup/index.vue +++ b/src/views/service/serviceFollowup/index.vue @@ -21,6 +21,7 @@ <script> import AddServiceFollowupDialog from "@/views/service/serviceFollowup/AddServiceFollowupDialog" +import { getServiceFollowupList } from "@/api/serviceManage/serviceFollowup" export default { name: "SalesLead", @@ -57,21 +58,12 @@ }, created() { this.setTable() + this.getData() }, methods: { setTable() { this.tableList = { - tableInfomation: [ - { - followupNumber: "HF30", - customName: "涓婃捣閫氱敤鏈烘鏈夐檺鍏徃", - contactName: "钁e浼�", - customServiceForm: "TT5031", - visitor: "绯荤粺绠$悊鍛�", - satisfaction: "100%", - modifyTime: "2023-0703 11:22:12" - } - ], + tableInfomation: [], tableColumn: [ { label: "鍥炶鍗曠紪鍙�", prop: "followupNumber", min: 80 }, // 鍥炶鍗曠紪鍙� { label: "瀹㈡埛鍚嶇О", prop: "customName", min: 130 }, // 瀹㈡埛鍚嶇О @@ -88,6 +80,34 @@ this.searchOptions.push({ value: (i + 1).toString(), label: label }) } }, + // 璇锋眰鏁版嵁 + async getData() { + this.loading = true + await getServiceFollowupList() + .then((res) => { + console.log(res) + if (res.code === 200) { + if (res.data.list && res.data.list.length > 0) { + const list = res.data.list.map((item) => { + return { + ...item + } + }) + this.tableList.tableInfomation = list || [] + } else { + this.tableList.tableInfomation = [] + } + } else { + this.tableList.tableInfomation = [] + } + this.loading = false + }) + .catch((err) => { + console.log(err) + this.tableList.tableInfomation = [] + this.loading = false + }) + }, // 鏂板缓 addBtnClick() { this.editConfig.visible = true -- Gitblit v1.8.0