diff --git a/apis/commonApi.js b/apis/commonApi.js index f0403b3..ef0bd31 100644 --- a/apis/commonApi.js +++ b/apis/commonApi.js @@ -36,13 +36,17 @@ function syncStore(res) { fddEnterpriseStatus: company.fddEnterpriseStatus, enterpriseType: company.enterpriseType }) + res.name = company.employeeName + res.avatar = null let userInfo = { name: company.employeeName, // 没有企业就没有name, userId: res.userId, mobile: res.mobile, avatar: null } - store.commit('setUserInfo', userInfo) + uni.setStorageSync('factoryId', company.factoryList[0].id) + uni.setStorageSync('organizationId', company.organizationId) + store.commit('setUserInfo', res) // 根据企业类型切换tabbar } else { let userInfo = { diff --git a/apis/enterpriseInfoApi.js b/apis/enterpriseInfoApi.js index d8b53f7..620de7a 100644 --- a/apis/enterpriseInfoApi.js +++ b/apis/enterpriseInfoApi.js @@ -47,3 +47,25 @@ export function getCompanyLocationList(data) { data }) } + +export const getMemberList = (data) => { + return http.get({ + url: '/uec/user/get/organization-member-list', + data + }) +} + +export const getApplicationList = (data) => { + return http.get({ + url: '/uec/user/get/joining-organization-application-list', + data + }) +} + + +export const auditMember = (data) => { + return http.post({ + url: '/uec/user/audit/organization/joining-application', + data + }) +} diff --git a/apis/loginApi.js b/apis/loginApi.js index 678bf80..17769be 100644 --- a/apis/loginApi.js +++ b/apis/loginApi.js @@ -40,3 +40,11 @@ export const getQnToken = (data) => { data }) } + +export const createQrcode = (data) => { + return http.post({ + url: '/uec/create/qrcode-record', + data + }) +} + diff --git a/pages.json b/pages.json index 9fe4647..c34247d 100644 --- a/pages.json +++ b/pages.json @@ -179,6 +179,22 @@ "navigationStyle": "custom" } }, + { + "path": "pages/employee-manage/index", + "style": { + "navigationBarTitleText": "员工管理", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + }, + { + "path": "pages/employee-detail/index", + "style": { + "navigationBarTitleText": "员工详情", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + }, { "path": "pages/add-address-manage/index", "style": { diff --git a/pages/digital-workshops/index.vue b/pages/digital-workshops/index.vue index 6b0810a..50e74bd 100644 --- a/pages/digital-workshops/index.vue +++ b/pages/digital-workshops/index.vue @@ -182,6 +182,7 @@ export default { }, watch: { factoryId(val, oldVal) { + uni.setStorageSync('factoryId', this.factoryId) this.getCameraList() this.getList() this.downCallback() diff --git a/pages/employee-detail/index.vue b/pages/employee-detail/index.vue new file mode 100644 index 0000000..34e7a73 --- /dev/null +++ b/pages/employee-detail/index.vue @@ -0,0 +1,291 @@ + + + + + diff --git a/pages/employee-manage/index.vue b/pages/employee-manage/index.vue new file mode 100644 index 0000000..49a3031 --- /dev/null +++ b/pages/employee-manage/index.vue @@ -0,0 +1,354 @@ + + + + + diff --git a/pages/mine/index.vue b/pages/mine/index.vue index 79b57e8..96fde34 100644 --- a/pages/mine/index.vue +++ b/pages/mine/index.vue @@ -93,10 +93,10 @@ 验厂申请 - + + + 员工管理 + 地址管理 diff --git a/static/imgs/mine/icon-employe.png b/static/imgs/mine/icon-employe.png new file mode 100644 index 0000000..42b7ac0 Binary files /dev/null and b/static/imgs/mine/icon-employe.png differ diff --git a/utils/http/index.js b/utils/http/index.js index 6088352..2f1bb8b 100644 --- a/utils/http/index.js +++ b/utils/http/index.js @@ -41,6 +41,7 @@ const reqInterceptor = (config, options) => { // 添加token let token = '' let factoryId = '' + let organizationId = '' try { if (url.startsWith('uec')) { token = uni.getStorageSync('uecToken') @@ -48,6 +49,7 @@ const reqInterceptor = (config, options) => { token = uni.getStorageSync('qnToken') } factoryId = uni.getStorageSync('factoryId') + organizationId = uni.getStorageSync('organizationId') } catch (e) { console.error('获取缓存失败:', e) } @@ -55,7 +57,8 @@ const reqInterceptor = (config, options) => { ...config.header, Authorization: token || '', 'X-APP-ID': XAPPID, - 'X-FACTORY-ID': factoryId + 'X-FACTORY-ID': factoryId, + 'X-ORGANIZATION-ID': organizationId } // 改变url let newUrl = ''