From 21e4683f413305228541be8212031c63b100e497 Mon Sep 17 00:00:00 2001 From: milo <315045773@qq.com> Date: Mon, 4 Apr 2022 20:24:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AE=A2=E6=88=B7=E6=9D=A5?= =?UTF-8?q?=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Customer.vue | 31 +++++++++++++++++++++++++++++++ src/views/Source.vue | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/src/views/Customer.vue b/src/views/Customer.vue index 4b335dc..322d6a6 100644 --- a/src/views/Customer.vue +++ b/src/views/Customer.vue @@ -23,6 +23,7 @@ + @@ -53,6 +54,16 @@ + + + + + @@ -77,6 +88,16 @@ + + + + + @@ -103,6 +124,7 @@ import { ElMessage, ElMessageBox } from "element-plus"; import { customerData } from "../api/customer"; import { customerAdd } from "../api/customerAdd"; import { customerEdit } from '../api/customerEdit'; +import { sourceData } from '../api/source'; export default { name: "basetable", @@ -114,6 +136,7 @@ export default { pageSize: 10, }); const tableData = ref([]); + const sourceListData = ref([]); const pageTotal = ref(0); // 获取表格数据 const getData = () => { @@ -121,6 +144,10 @@ export default { tableData.value = res.data.data; pageTotal.value = res.data.pageTotal || 0; }); + sourceData({}).then((res) => { + console.log(res.data.data) + sourceListData.value = res.data.data; + }); }; getData(); @@ -153,6 +180,7 @@ export default { const tableEditData = ref(null); const editForm = reactive({ company:'', + source_id: 0, name:'', telephone:'', wechat:'', @@ -202,6 +230,7 @@ export default { const addForm = reactive({ company:'', name:'', + source_id: 0, telephone:'', wechat:'', userid:user.id @@ -245,6 +274,8 @@ export default { saveEdit, saveAdd, rules, + sourceListData + //options }; }, }; diff --git a/src/views/Source.vue b/src/views/Source.vue index 975e187..7fe92b5 100644 --- a/src/views/Source.vue +++ b/src/views/Source.vue @@ -120,7 +120,7 @@ export default { const tableEditData = ref(null); const editForm = reactive({ name : '', - id : 0 + id: 0 }); let idx = -1; const handleEdit = (index, row) => {