From fd7093e613baf6220a13bdc81f83ca61dc0d1378 Mon Sep 17 00:00:00 2001 From: merak1237 <1036673629@qq.com> Date: Sat, 6 Sep 2025 23:06:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8D=95=E4=BD=8D=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/http.api.js | 10 +- common/http.interceptor.js | 2 +- common/upload.js | 2 +- pages/sys/login/login.vue | 506 +++++++++--------- pages/sys/user/myRepair/addRepair.vue | 1 - .../workbench/unitManagement/auditsDetail.vue | 62 ++- .../workbench/unitManagement/employeeAdd.vue | 211 +++++--- .../unitManagement/employeeAudits.vue | 32 +- .../unitManagement/unitManagement.vue | 2 +- 9 files changed, 470 insertions(+), 358 deletions(-) diff --git a/common/http.api.js b/common/http.api.js index b8a397a..bdaf268 100644 --- a/common/http.api.js +++ b/common/http.api.js @@ -12,7 +12,7 @@ const install = (Vue, vm) => { login: (params = {}) => vm.$u.post(config.adminPath+'/auth/login', params), - getUserInfo: (params = {}) => vm.$u.get(config.adminPath+'/system/user/profile', params), + getUserInfo: (params = {}) => vm.$u.get(config.adminPath+'/property/xcx/person/getInfo', params), //工作台列表 getFunList:(params = {})=>vm.$u.get(config.adminPath+'/system/funList/list', params), //我的访客列表 @@ -112,7 +112,13 @@ const install = (Vue, vm) => { office: { treeData: (params = {}) => vm.$u.get(config.adminPath+'/sys/office/treeData', params), }, - + // 单位管理 + unit:{ + addEmployee:(params = {}) => vm.$u.post(config.adminPath+'/property/xcx/person', params), + queryEmployeeById:(params = {}) => vm.$u.get(config.adminPath+'/property/xcx/person/'+ params.id), + queryEmployee:(params = {}) => vm.$u.get(config.adminPath+'/property/xcx/person/list', params), + updateEmployee:(params = {}) => vm.$u.put(config.adminPath+'/property/xcx/person', params), + }, // 增删改查例子 testData: { form: (params = {}) => vm.$u.post(config.adminPath+'/test/testData/form', params), diff --git a/common/http.interceptor.js b/common/http.interceptor.js index 87898be..95f9059 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -25,7 +25,7 @@ const install = (Vue, vm) => { req.header = []; } req.header["source"] = "uniapp"; - req.header["clientId"] = "dab457a1ea14411787c240db05bb0832" + req.header["clientId"] = "22b351e7583881d0a608dd44371bae41" // 默认指定返回 JSON 数据 if (!req.header[ajaxHeader]){ req.header[ajaxHeader] = 'json'; diff --git a/common/upload.js b/common/upload.js index fe11031..9388f45 100644 --- a/common/upload.js +++ b/common/upload.js @@ -46,7 +46,7 @@ function uploadSingleFile({ const headers = { 'x-requested-with': 'XMLHttpRequest', source: 'uniapp', - clientId: 'dab457a1ea14411787c240db05bb0832', + clientId: '22b351e7583881d0a608dd44371bae41', }; // 手动加上 Token diff --git a/pages/sys/login/login.vue b/pages/sys/login/login.vue index 9cf7ccd..c9b87bd 100644 --- a/pages/sys/login/login.vue +++ b/pages/sys/login/login.vue @@ -1,282 +1,282 @@ \ No newline at end of file diff --git a/pages/sys/user/myRepair/addRepair.vue b/pages/sys/user/myRepair/addRepair.vue index b5cc740..ba312f0 100644 --- a/pages/sys/user/myRepair/addRepair.vue +++ b/pages/sys/user/myRepair/addRepair.vue @@ -108,7 +108,6 @@ this.realSubmit(); return; } - const result = await uploadFiles({ files: images, url: this.vuex_config.baseUrl + '/resource/oss/upload', diff --git a/pages/sys/workbench/unitManagement/auditsDetail.vue b/pages/sys/workbench/unitManagement/auditsDetail.vue index 3e61b82..3ab97ee 100644 --- a/pages/sys/workbench/unitManagement/auditsDetail.vue +++ b/pages/sys/workbench/unitManagement/auditsDetail.vue @@ -8,7 +8,7 @@ 用户姓名: - 余永乐 + {{auditsDetail.userName}} 性别: @@ -16,15 +16,15 @@ 证件号: - 5001255658789955 + {{auditsDetail.idCard}} 联系电话: - 17898987887 + {{auditsDetail.phone}} 所属单位: - x x x x x + {{auditsDetail.name}} @@ -32,7 +32,7 @@ 人脸图片: @@ -43,11 +43,11 @@ 邮箱: - - + {{auditsDetail.email}} 车牌号: - - + {{auditsDetail.carNumber}} @@ -73,16 +73,54 @@ }; }, methods: { + onLoad(options) { + if (options.id) { + const id = options.id; + this.auditsDetail.id = id; + this.queryEmployee(id); + } + }, // 原有方法保持不变... handleApprove() { - console.log('approve'); + this.auditsDetail.isAudit=1 + this.$u.api.unit.updateEmployee(this.auditsDetail).then(res => { + if (res.code == "200") { + // 提交逻辑 + uni.showToast({ + title: '审核通过', + icon: 'success', + }); + setTimeout(() => { + uni.navigateTo({ + url: '/pages/sys/workbench/unitManagement/employeeAudits' + }); + }, 600); + } + }); }, handleReject() { - console.log('reject'); - }, - async submit(action) { - // 提交逻辑... + this.auditsDetail.isAudit=2 + this.$u.api.unit.updateEmployee(this.auditsDetail).then(res => { + if (res.code == "200") { + // 提交逻辑 + uni.showToast({ + title: '拒绝通过', + icon: 'success', + }); + setTimeout(() => { + uni.navigateTo({ + url: '/pages/sys/workbench/unitManagement/employeeAudits' + }); + }, 600); + } + }); }, + + queryEmployee(id){ + this.$u.api.unit.queryEmployeeById(this.auditsDetail).then(res => { + this.auditsDetail = res.data; + }); + } // 其他原有方法... } }; diff --git a/pages/sys/workbench/unitManagement/employeeAdd.vue b/pages/sys/workbench/unitManagement/employeeAdd.vue index 377c9f4..0fa7d19 100644 --- a/pages/sys/workbench/unitManagement/employeeAdd.vue +++ b/pages/sys/workbench/unitManagement/employeeAdd.vue @@ -11,48 +11,51 @@ 用户姓名 - + 性别 - - {{array[index]}} + + {{ array[index] }} 证件号 - + 联系电话 - + - - - 验证码 - - - - - + + + + + + + + 登录密码 - + 确认密码 - + @@ -67,46 +70,66 @@ - - + + × - - 请上传正脸并不超过5MB的jpg,jpeg,png,gif,webp格式文件 - + + 请上传正脸并不超过5MB的jpg,jpeg,png,gif,webp格式文件 + - - 邮箱 - - - - 车牌号码 - - + + 邮箱 + + + + 车牌号码 + + - - +