From 252b07352e35272de07594cf95d2a4916d9b5e05 Mon Sep 17 00:00:00 2001 From: kun <1422840143@qq.com> Date: Tue, 13 Jun 2023 09:47:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 1 + .env.production | 5 ++-- .../goverment/naturalResources/index.vue | 2 +- .../components/orderAdd.vue | 25 +++++++++++++++++-- 4 files changed, 28 insertions(+), 5 deletions(-) diff --git a/.env.development b/.env.development index 4123da6..bd41f8a 100644 --- a/.env.development +++ b/.env.development @@ -3,6 +3,7 @@ NODE_ENV = 'development' # 本地环境接口地址(/api/index.ts文件中使用) VITE_API_URL = 'http://192.168.34.155:6688' +VITE_WPAPI_URL = "http://182.90.224.147:8081" # VITE_API_URL = "http://182.90.224.147:6688" # 上传 diff --git a/.env.production b/.env.production index 7a920ab..374e524 100644 --- a/.env.production +++ b/.env.production @@ -3,8 +3,9 @@ NODE_ENV = "production" # 线上环境接口地址(easymock) # VITE_API_URL = "http://139.9.66.234:6688" -# VITE_API_URL = "http://182.90.224.147:6688" -VITE_API_URL = "http://101.43.164.214:6688" +VITE_API_URL = "http://182.90.224.147:6688" +VITE_WPAPI_URL = "http://182.90.224.147:8081" +# VITE_API_URL = "http://101.43.164.214:6688" # VITE_API_URL = "https://wx.antjg.com:6081/" # 打包 diff --git a/src/views/goverment/naturalResources/index.vue b/src/views/goverment/naturalResources/index.vue index 52c40ba..5b6c549 100644 --- a/src/views/goverment/naturalResources/index.vue +++ b/src/views/goverment/naturalResources/index.vue @@ -12,7 +12,7 @@ import { GlobalStore } from "@/stores"; onBeforeMount(() => { getToken(); }); -const baseUrl = import.meta.env.VITE_API_URL; +const baseUrl = import.meta.env.VITE_WPAPI_URL; const token = ref(""); const getToken = () => { const globalstore = GlobalStore(); diff --git a/src/views/goverment/qualitySupervision/components/orderAdd.vue b/src/views/goverment/qualitySupervision/components/orderAdd.vue index 078b110..3c362b8 100644 --- a/src/views/goverment/qualitySupervision/components/orderAdd.vue +++ b/src/views/goverment/qualitySupervision/components/orderAdd.vue @@ -337,11 +337,12 @@ - + @@ -418,6 +419,7 @@ import { import { GlobalStore } from "@/stores"; import { Delete } from "@element-plus/icons-vue"; import { jxj_User } from "@/api/types"; +const multipleTable = ref(null); const memberVisible = ref(false); const store = GlobalStore(); const headers = ref({ Authorization: "Bearer " + store.token }); @@ -575,6 +577,15 @@ const selectMember = async () => { const res = await getgovNamelist({}); console.log(res); membertableData.value = res.result; + console.log(membertableData.value); + console.log(selectedMemberList.value); + selectedMemberList.value.forEach(key => { + membertableData.value.forEach(row => { + if (row.userId == key.userId) { + multipleTable.value.toggleRowSelection(row, true); + } + }); + }); memberVisible.value = true; }; // 删除用户信息 @@ -596,9 +607,19 @@ const uploadSuccess = (response: any, index: number) => { } }; const handleSelectionChange = val => { - selectedMemberList.value = val; console.log(val); + let obj = {}; + // 当检查人员表格数据行勾选变换时触发 + selectedMemberList.value = val.reduce((item, next) => { + obj[next.userId] ? "" : (obj[next.userId] = true && item.push(next)); + return item; + }, []); + console.log(selectedMemberList.value); }; +// const handleSelectionAllChange = val => { +// selectedMemberList.value = val; +// console.log(val); +// }; const handleSmallSelectionChange = val => { selectedSmallList.value = val; };