From 5055badbccbb2e9fca8bc252de5d770487c2de1b Mon Sep 17 00:00:00 2001 From: fufeifei Date: Wed, 4 Dec 2024 10:46:54 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=8F=A3=E9=97=A8=E9=97=A8=E7=A6=81?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=B3=BB=E7=BB=9F--->=E9=95=BF=E6=9C=9F?= =?UTF-8?q?=E8=BD=A6=E8=BE=86=E8=BF=9B=E6=B8=AF=E7=AE=A1=E7=90=86=E6=A8=A1?= =?UTF-8?q?=E5=9D=97--->=E5=88=86=E5=85=AC=E5=8F=B8=E8=BD=A6=E8=BE=86?= =?UTF-8?q?=E4=BF=A1=E6=81=AF--->=20=E9=80=82=E5=BA=94=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E6=96=B9=E6=8E=A5=E5=8F=A3=E8=B0=83=E7=94=A8=E5=81=9A=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vehiclemessage/components/list.vue | 50 ++++++++++++------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/src/views/longtermvehicleinputportmessage/vehiclemessage/components/list.vue b/src/views/longtermvehicleinputportmessage/vehiclemessage/components/list.vue index 852266d..f64e943 100644 --- a/src/views/longtermvehicleinputportmessage/vehiclemessage/components/list.vue +++ b/src/views/longtermvehicleinputportmessage/vehiclemessage/components/list.vue @@ -263,6 +263,7 @@ export default { loginUserName: '', loginDepartmentId: '', loginDepartmentName: '', + corpInfoId: '', // 获取当前登陆用户的企业id listQuery: { page: 1, limit: 20 @@ -363,10 +364,10 @@ export default { } }, created() { - // this.getDict() // 获取字典 - this.getPageList() // 获取分页列表要展示的数据 this.getDepartmentTreeData() // 获取部门树的数据 this.getLoginUserInfo() // 获取当前登陆用户的信息 + // this.getDict() // 获取字典 + this.getPageList() // 获取分页列表要展示的数据 }, methods: { getRowKey(row) { @@ -388,20 +389,21 @@ export default { } }, getLoginUserInfo() { // 获取登录人信息 - return new Promise((resolve) => { - requestFN( - '/user/goEditMyInfo', - {} - ).then((data) => { - this.loginUserId = data.pd.USER_ID - this.loginUserName = data.pd.NAME - this.loginDepartmentId = data.pd.DEPARTMENT_ID - this.loginDepartmentName = data.pd.deptName - resolve('ok') - }).catch((e) => { - - }) + // return new Promise((resolve) => { + requestFN( + '/user/goEditMyInfo', + {} + ).then((data) => { + console.info(data.pd) + this.loginUserId = data.pd.USER_ID + this.loginUserName = data.pd.NAME + this.loginDepartmentId = data.pd.DEPARTMENT_ID + this.loginDepartmentName = data.pd.deptName + this.corpInfoId = data.pd.CORPINFO_ID + // resolve('ok') + }).catch((e) => { }) + // }) }, // 搜索 getQuery() { @@ -414,12 +416,16 @@ export default { }, // 获取列表 getPageList() { + console.info('输出登陆用户的信息') + console.info(JSON.parse(sessionStorage.getItem('user'))) this.roleName = '' this.listLoading = true requestFN( 'vehiclemessage/getPageList?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page, { - ...this.searchFrom + ...this.searchFrom, + 'CORPINFO_ID': JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID, + 'loginUserId': JSON.parse(sessionStorage.getItem('user')).USER_ID } ).then((data) => { this.listLoading = false @@ -524,7 +530,9 @@ export default { requestFN( 'vehiclemessage/addVehicleMessage', { - ...this.addForm + ...this.addForm, + 'CORPINFO_ID': this.corpInfoId, + 'loginUserId': this.loginUserId } ).then((data) => { if (data.result === 'fail') { @@ -638,7 +646,9 @@ export default { requestFN( 'vehiclemessage/updateVehicleMessage', { - ...this.editForm + ...this.editForm, + 'CORPINFO_ID': JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID, + 'loginUserId': JSON.parse(sessionStorage.getItem('user')).USER_ID } ).then((data) => { if (data.result === 'success') { @@ -678,7 +688,9 @@ export default { { VEHICLE_ID: id, USER_ID: USER_ID, - EMPLOYEE_VEHICLE_USER_ID: EMPLOYEE_VEHICLE_USER_ID + EMPLOYEE_VEHICLE_USER_ID: EMPLOYEE_VEHICLE_USER_ID, + 'CORPINFO_ID': JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID, + 'loginUserId': JSON.parse(sessionStorage.getItem('user')).USER_ID } ).then((data) => { if (data.result === 'success') {