diff --git a/src/api/equipment/info/book.ts b/src/api/equipment/info/book.ts index 60cf0d2..295d4f9 100644 --- a/src/api/equipment/info/book.ts +++ b/src/api/equipment/info/book.ts @@ -9,7 +9,7 @@ return request({ url: `${prefix}/approval/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -18,7 +18,7 @@ return request({ url: `${prefix}/save`, method: 'post', - data + data, }) } @@ -27,7 +27,7 @@ return request({ url: `${prefix}/draftUpdate`, method: 'post', - data + data, }) } // 编辑 @@ -35,7 +35,7 @@ return request({ url: `${prefix}/failUpdate`, method: 'post', - data + data, }) } @@ -44,7 +44,7 @@ return request({ url: `${prefix}/detail`, method: 'post', - data + data, }) } @@ -59,7 +59,7 @@ return request({ url: `${prefix}/submit`, method: 'post', - data + data, }) } @@ -68,7 +68,7 @@ return request({ url: `${prefix}/draftDelete`, method: 'post', - data + data, }) } @@ -77,7 +77,7 @@ return request({ url: `${prefix}/approval/delete`, method: 'post', - data + data, }) } @@ -86,7 +86,7 @@ return request({ url: `${prefix}/circulationLog/listPage`, method: 'post', - data + data, }) } @@ -99,7 +99,7 @@ return request({ url: `${prefix}/status/log/list`, method: 'get', - params + params, }) } @@ -112,7 +112,7 @@ return request({ url: `${prefix}/approval/revoke`, method: 'post', - data + data, }) } @@ -125,7 +125,7 @@ return request({ url: `${prefix}/approval/refuse`, method: 'post', - data + data, }) } @@ -134,7 +134,7 @@ return request({ url: `${prefix}/remind`, method: 'post', - data + data, }) } @@ -143,11 +143,11 @@ return request({ url: `${prefix}/import`, method: 'post', - data + data, }) } -// 根据实验室代码和组别获取deptId +// 根据实验室代码和部门获取deptId export function getDeptIdByLabAndGroup(params: { labCode: string groupNo: string @@ -155,7 +155,7 @@ return request({ url: '/system/getDeptIdByLabAndGroup', method: 'get', - params + params, }) } @@ -164,7 +164,7 @@ return request({ url: `${path}?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -173,7 +173,7 @@ return request({ url: '/equipment/certificate/listPage', method: 'post', - data + data, }) } @@ -182,7 +182,7 @@ return request({ url: '/equipment/detail/maintain/listPage', method: 'post', - data + data, }) } @@ -191,7 +191,7 @@ return request({ url: '/equipment/detail/resume/listPage', method: 'post', - data + data, }) } @@ -200,7 +200,7 @@ return request({ url: '/equipment/hasChanged', method: 'post', - data + data, }) } @@ -210,7 +210,7 @@ url: '/equipment/exportFile', method: 'post', responseType: 'blob', - data + data, }) } @@ -220,6 +220,6 @@ url: '/equipment/exportExcelFile', method: 'post', responseType: 'blob', - data + data, }) } diff --git a/src/api/equipment/info/book.ts b/src/api/equipment/info/book.ts index 60cf0d2..295d4f9 100644 --- a/src/api/equipment/info/book.ts +++ b/src/api/equipment/info/book.ts @@ -9,7 +9,7 @@ return request({ url: `${prefix}/approval/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -18,7 +18,7 @@ return request({ url: `${prefix}/save`, method: 'post', - data + data, }) } @@ -27,7 +27,7 @@ return request({ url: `${prefix}/draftUpdate`, method: 'post', - data + data, }) } // 编辑 @@ -35,7 +35,7 @@ return request({ url: `${prefix}/failUpdate`, method: 'post', - data + data, }) } @@ -44,7 +44,7 @@ return request({ url: `${prefix}/detail`, method: 'post', - data + data, }) } @@ -59,7 +59,7 @@ return request({ url: `${prefix}/submit`, method: 'post', - data + data, }) } @@ -68,7 +68,7 @@ return request({ url: `${prefix}/draftDelete`, method: 'post', - data + data, }) } @@ -77,7 +77,7 @@ return request({ url: `${prefix}/approval/delete`, method: 'post', - data + data, }) } @@ -86,7 +86,7 @@ return request({ url: `${prefix}/circulationLog/listPage`, method: 'post', - data + data, }) } @@ -99,7 +99,7 @@ return request({ url: `${prefix}/status/log/list`, method: 'get', - params + params, }) } @@ -112,7 +112,7 @@ return request({ url: `${prefix}/approval/revoke`, method: 'post', - data + data, }) } @@ -125,7 +125,7 @@ return request({ url: `${prefix}/approval/refuse`, method: 'post', - data + data, }) } @@ -134,7 +134,7 @@ return request({ url: `${prefix}/remind`, method: 'post', - data + data, }) } @@ -143,11 +143,11 @@ return request({ url: `${prefix}/import`, method: 'post', - data + data, }) } -// 根据实验室代码和组别获取deptId +// 根据实验室代码和部门获取deptId export function getDeptIdByLabAndGroup(params: { labCode: string groupNo: string @@ -155,7 +155,7 @@ return request({ url: '/system/getDeptIdByLabAndGroup', method: 'get', - params + params, }) } @@ -164,7 +164,7 @@ return request({ url: `${path}?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -173,7 +173,7 @@ return request({ url: '/equipment/certificate/listPage', method: 'post', - data + data, }) } @@ -182,7 +182,7 @@ return request({ url: '/equipment/detail/maintain/listPage', method: 'post', - data + data, }) } @@ -191,7 +191,7 @@ return request({ url: '/equipment/detail/resume/listPage', method: 'post', - data + data, }) } @@ -200,7 +200,7 @@ return request({ url: '/equipment/hasChanged', method: 'post', - data + data, }) } @@ -210,7 +210,7 @@ url: '/equipment/exportFile', method: 'post', responseType: 'blob', - data + data, }) } @@ -220,6 +220,6 @@ url: '/equipment/exportExcelFile', method: 'post', responseType: 'blob', - data + data, }) } diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 5678997..ff2d6d5 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -10,7 +10,7 @@ return request({ url: `${prefix}mgr/list`, method: 'get', - params + params, }) } @@ -19,14 +19,14 @@ return request({ url: '/system/mgr/list', method: 'get', - params + params, }) } // 获取用户所在单位 export function getUserDept() { return request({ - url: '/system/company' + url: '/system/company', }) } @@ -43,7 +43,7 @@ return request({ url: `${prefix}mgr/delete`, method: 'post', - data + data, }) } @@ -52,7 +52,7 @@ return request({ url: `${prefix}mgr/freeze`, method: 'post', - data + data, }) } // 冻结用户 @@ -60,7 +60,7 @@ return request({ url: `${prefix}mgr/unfreeze`, method: 'post', - data + data, }) } @@ -69,7 +69,7 @@ return request({ url: 'sys/mgr/reset', method: 'post', - data + data, }) } @@ -80,17 +80,17 @@ method: 'post', data: { userId, - roleIds: ids - } + roleIds: ids, + }, // paramsSerializer: (params) => qs.stringify(params, { indices: false }) }) } -// 获取用户实验室代码和组别 +// 获取用户实验室代码和部门 export function getLabAndGroup(params: { deptId: string }) { return request({ url: '/system/labAndGroup', method: 'get', - params + params, }) } diff --git a/src/api/equipment/info/book.ts b/src/api/equipment/info/book.ts index 60cf0d2..295d4f9 100644 --- a/src/api/equipment/info/book.ts +++ b/src/api/equipment/info/book.ts @@ -9,7 +9,7 @@ return request({ url: `${prefix}/approval/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -18,7 +18,7 @@ return request({ url: `${prefix}/save`, method: 'post', - data + data, }) } @@ -27,7 +27,7 @@ return request({ url: `${prefix}/draftUpdate`, method: 'post', - data + data, }) } // 编辑 @@ -35,7 +35,7 @@ return request({ url: `${prefix}/failUpdate`, method: 'post', - data + data, }) } @@ -44,7 +44,7 @@ return request({ url: `${prefix}/detail`, method: 'post', - data + data, }) } @@ -59,7 +59,7 @@ return request({ url: `${prefix}/submit`, method: 'post', - data + data, }) } @@ -68,7 +68,7 @@ return request({ url: `${prefix}/draftDelete`, method: 'post', - data + data, }) } @@ -77,7 +77,7 @@ return request({ url: `${prefix}/approval/delete`, method: 'post', - data + data, }) } @@ -86,7 +86,7 @@ return request({ url: `${prefix}/circulationLog/listPage`, method: 'post', - data + data, }) } @@ -99,7 +99,7 @@ return request({ url: `${prefix}/status/log/list`, method: 'get', - params + params, }) } @@ -112,7 +112,7 @@ return request({ url: `${prefix}/approval/revoke`, method: 'post', - data + data, }) } @@ -125,7 +125,7 @@ return request({ url: `${prefix}/approval/refuse`, method: 'post', - data + data, }) } @@ -134,7 +134,7 @@ return request({ url: `${prefix}/remind`, method: 'post', - data + data, }) } @@ -143,11 +143,11 @@ return request({ url: `${prefix}/import`, method: 'post', - data + data, }) } -// 根据实验室代码和组别获取deptId +// 根据实验室代码和部门获取deptId export function getDeptIdByLabAndGroup(params: { labCode: string groupNo: string @@ -155,7 +155,7 @@ return request({ url: '/system/getDeptIdByLabAndGroup', method: 'get', - params + params, }) } @@ -164,7 +164,7 @@ return request({ url: `${path}?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -173,7 +173,7 @@ return request({ url: '/equipment/certificate/listPage', method: 'post', - data + data, }) } @@ -182,7 +182,7 @@ return request({ url: '/equipment/detail/maintain/listPage', method: 'post', - data + data, }) } @@ -191,7 +191,7 @@ return request({ url: '/equipment/detail/resume/listPage', method: 'post', - data + data, }) } @@ -200,7 +200,7 @@ return request({ url: '/equipment/hasChanged', method: 'post', - data + data, }) } @@ -210,7 +210,7 @@ url: '/equipment/exportFile', method: 'post', responseType: 'blob', - data + data, }) } @@ -220,6 +220,6 @@ url: '/equipment/exportExcelFile', method: 'post', responseType: 'blob', - data + data, }) } diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 5678997..ff2d6d5 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -10,7 +10,7 @@ return request({ url: `${prefix}mgr/list`, method: 'get', - params + params, }) } @@ -19,14 +19,14 @@ return request({ url: '/system/mgr/list', method: 'get', - params + params, }) } // 获取用户所在单位 export function getUserDept() { return request({ - url: '/system/company' + url: '/system/company', }) } @@ -43,7 +43,7 @@ return request({ url: `${prefix}mgr/delete`, method: 'post', - data + data, }) } @@ -52,7 +52,7 @@ return request({ url: `${prefix}mgr/freeze`, method: 'post', - data + data, }) } // 冻结用户 @@ -60,7 +60,7 @@ return request({ url: `${prefix}mgr/unfreeze`, method: 'post', - data + data, }) } @@ -69,7 +69,7 @@ return request({ url: 'sys/mgr/reset', method: 'post', - data + data, }) } @@ -80,17 +80,17 @@ method: 'post', data: { userId, - roleIds: ids - } + roleIds: ids, + }, // paramsSerializer: (params) => qs.stringify(params, { indices: false }) }) } -// 获取用户实验室代码和组别 +// 获取用户实验室代码和部门 export function getLabAndGroup(params: { deptId: string }) { return request({ url: '/system/labAndGroup', method: 'get', - params + params, }) } diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 102ce61..400bf48 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -34,11 +34,11 @@ isLogout: 0, // 是否被退出登录 bizLabCode: localStorage.bizLabCode || '', // 实验室 labCodeName: localStorage.labCodeName || '', // 实验室名称 - groupNo: localStorage.groupNo || '', // 组别 - groupName: localStorage.groupName || '' // 组别名称 + groupNo: localStorage.groupNo || '', // 部门 + groupName: localStorage.groupName || '', // 部门名称 }), getters: { - isLogin: state => { + isLogin: (state) => { let retn = false if (state.token) { retn = true @@ -46,17 +46,18 @@ return retn }, // 是否已获取用户信息 - hasUserInfo: state => { + hasUserInfo: (state) => { if (state.roleList && state.roleList.length > 0) { return true - } else { + } + else { return false } }, - getPublicKey: state => { + getPublicKey: (state) => { return state.publicKey }, - getPrivateKey: state => { + getPrivateKey: (state) => { return state.privateKey }, getMenus: (state): Menu.menu[] => { @@ -64,14 +65,14 @@ }, getBtns: (state): Menu.menu[] => { return state.btns - } + }, }, actions: { // 获取项目基础配置 getBaseConfig() { return new Promise((resolve, reject) => { getConfig() - .then(res => { + .then((res) => { this.publicKey = res.data.publicKey localStorage.setItem('publicKey', res.data.publicKey) // 保存私钥 @@ -80,7 +81,7 @@ this.isLogout = 0 resolve(res.data) }) - .catch(e => { + .catch((e) => { reject(e) }) }) @@ -94,21 +95,21 @@ }) { return new Promise((resolve, reject) => { doLogin(data) - .then(res => { + .then((res) => { localStorage.setItem('token', res.data.token) this.username = res.data.username this.token = res.data.token this.isLogout = 0 resolve() }) - .catch(error => { + .catch((error) => { reject(error) }) }) }, // 注销 logout() { - return new Promise(resolve => { + return new Promise((resolve) => { const routeStore = useRouteStore() const menuStore = useMenuStore() localStorage.removeItem('username') @@ -117,17 +118,17 @@ localStorage.removeItem('depId') localStorage.removeItem('bizLabCode') // 实验室 localStorage.removeItem('labCodeName') // 实验室 - localStorage.removeItem('groupNo') // 组别 - localStorage.removeItem('groupName') // 组别 + localStorage.removeItem('groupNo') // 部门 + localStorage.removeItem('groupName') // 部门 // localStorage.clear() this.username = '' this.token = '' this.roleList = [] this.roleNames = [] this.bizLabCode = '' // 实验室 - this.groupNo = '' // 组别 - this.labCodeName = '' // 组别 - this.groupName = '' // 组别 + this.groupNo = '' // 部门 + this.labCodeName = '' // 部门 + this.groupName = '' // 部门 routeStore.removeRoutes() menuStore.setActived(0) resolve() @@ -135,53 +136,54 @@ }, // 获取用户信息 getUserInfo() { - return new Promise(resolve => { + return new Promise((resolve) => { getInfo() - .then(res => { + .then((res) => { if (res.data.roleIds && res.data.roleIds.length > 0) { this.roleList = res.data.roleIds this.roleNames = res.data.roleNames this.roleTips = res.data.roleTips localStorage.setItem('nameId', res.data.id) localStorage.setItem('depId', res.data.deptId) - } else { + } + else { reject('该用户无角色') } if (res.data.deptId) { this.deptId = res.data.deptId this.deptName = res.data.deptName - // 获取本用户实验室代码、组别 - getLabAndGroup({ deptId: res.data.deptId }).then(res => { + // 获取本用户实验室代码、部门 + getLabAndGroup({ deptId: res.data.deptId }).then((res) => { this.bizLabCode = res.data.bizLabCode // 实验室 - this.groupNo = res.data.groupNo // 组别 + this.groupNo = res.data.groupNo // 部门 if (this.bizLabCode) { - getDictByCode('bizGroupCodeEquipment').then(response => { + getDictByCode('bizGroupCodeEquipment').then((response) => { const labCodeList = response.data const index = labCodeList.findIndex( (item: { value: string }) => - item.value === this.bizLabCode + item.value === this.bizLabCode, ) if (index !== -1) { this.labCodeName = labCodeList[index].name // 实验室 localStorage.setItem( 'labCodeName', - labCodeList[index].name + labCodeList[index].name, ) } }) } if (this.bizLabCode) { - getDictByCode('bizGroupCode').then(response => { + getDictByCode('bizGroupCode').then((response) => { const groupCodeList = response.data const index = groupCodeList.findIndex( - (item: { value: string }) => item.value === this.groupNo + (item: { value: string }) => item.value === this.groupNo, ) if (index !== -1) { this.groupName = groupCodeList[index].name localStorage.setItem( 'groupName', - groupCodeList[index].name + groupCodeList[index].name, ) } }) @@ -190,10 +192,11 @@ localStorage.setItem('bizLabCode', res.data.bizLabCode) }) // 基本信息-部门接口-查询部门类别 - getDeptList({ deptName: res.data.deptName }).then(response => { + getDeptList({ deptName: res.data.deptName }).then((response) => { this.deptType = response.data.list[0].deptType }) - } else { + } + else { reject('该用户无组织机构') } this.id = res.data.id @@ -210,13 +213,13 @@ getPermissions(currentSystem?: { name: string; code: string }) { const params = { resourceType: '', - parentCode: '' + parentCode: '', } if (currentSystem) { params.parentCode = currentSystem.code // 子系统code } - return new Promise(resolve => { - getUserMenus(params).then(response => { + return new Promise((resolve) => { + getUserMenus(params).then((response) => { const data = response.data const menus = [] // 仅菜单 const btns = [] // 非菜单 @@ -230,14 +233,14 @@ const menu_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } menus.push(menu_tmp) } const btn_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } btns.push(btn_tmp) } @@ -250,8 +253,8 @@ }, // 修改密码 editPassword(data: { oldPwd: string; newPwd: string }) { - return new Promise(resolve => { - changePwd(data).then(response => { + return new Promise((resolve) => { + changePwd(data).then((response) => { resolve(response) }) }) @@ -259,9 +262,9 @@ // 被退出登录 toLogout() { this.isLogout += 1 - } - } - } + }, + }, + }, ) export default useUserStore diff --git a/src/api/equipment/info/book.ts b/src/api/equipment/info/book.ts index 60cf0d2..295d4f9 100644 --- a/src/api/equipment/info/book.ts +++ b/src/api/equipment/info/book.ts @@ -9,7 +9,7 @@ return request({ url: `${prefix}/approval/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -18,7 +18,7 @@ return request({ url: `${prefix}/save`, method: 'post', - data + data, }) } @@ -27,7 +27,7 @@ return request({ url: `${prefix}/draftUpdate`, method: 'post', - data + data, }) } // 编辑 @@ -35,7 +35,7 @@ return request({ url: `${prefix}/failUpdate`, method: 'post', - data + data, }) } @@ -44,7 +44,7 @@ return request({ url: `${prefix}/detail`, method: 'post', - data + data, }) } @@ -59,7 +59,7 @@ return request({ url: `${prefix}/submit`, method: 'post', - data + data, }) } @@ -68,7 +68,7 @@ return request({ url: `${prefix}/draftDelete`, method: 'post', - data + data, }) } @@ -77,7 +77,7 @@ return request({ url: `${prefix}/approval/delete`, method: 'post', - data + data, }) } @@ -86,7 +86,7 @@ return request({ url: `${prefix}/circulationLog/listPage`, method: 'post', - data + data, }) } @@ -99,7 +99,7 @@ return request({ url: `${prefix}/status/log/list`, method: 'get', - params + params, }) } @@ -112,7 +112,7 @@ return request({ url: `${prefix}/approval/revoke`, method: 'post', - data + data, }) } @@ -125,7 +125,7 @@ return request({ url: `${prefix}/approval/refuse`, method: 'post', - data + data, }) } @@ -134,7 +134,7 @@ return request({ url: `${prefix}/remind`, method: 'post', - data + data, }) } @@ -143,11 +143,11 @@ return request({ url: `${prefix}/import`, method: 'post', - data + data, }) } -// 根据实验室代码和组别获取deptId +// 根据实验室代码和部门获取deptId export function getDeptIdByLabAndGroup(params: { labCode: string groupNo: string @@ -155,7 +155,7 @@ return request({ url: '/system/getDeptIdByLabAndGroup', method: 'get', - params + params, }) } @@ -164,7 +164,7 @@ return request({ url: `${path}?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -173,7 +173,7 @@ return request({ url: '/equipment/certificate/listPage', method: 'post', - data + data, }) } @@ -182,7 +182,7 @@ return request({ url: '/equipment/detail/maintain/listPage', method: 'post', - data + data, }) } @@ -191,7 +191,7 @@ return request({ url: '/equipment/detail/resume/listPage', method: 'post', - data + data, }) } @@ -200,7 +200,7 @@ return request({ url: '/equipment/hasChanged', method: 'post', - data + data, }) } @@ -210,7 +210,7 @@ url: '/equipment/exportFile', method: 'post', responseType: 'blob', - data + data, }) } @@ -220,6 +220,6 @@ url: '/equipment/exportExcelFile', method: 'post', responseType: 'blob', - data + data, }) } diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 5678997..ff2d6d5 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -10,7 +10,7 @@ return request({ url: `${prefix}mgr/list`, method: 'get', - params + params, }) } @@ -19,14 +19,14 @@ return request({ url: '/system/mgr/list', method: 'get', - params + params, }) } // 获取用户所在单位 export function getUserDept() { return request({ - url: '/system/company' + url: '/system/company', }) } @@ -43,7 +43,7 @@ return request({ url: `${prefix}mgr/delete`, method: 'post', - data + data, }) } @@ -52,7 +52,7 @@ return request({ url: `${prefix}mgr/freeze`, method: 'post', - data + data, }) } // 冻结用户 @@ -60,7 +60,7 @@ return request({ url: `${prefix}mgr/unfreeze`, method: 'post', - data + data, }) } @@ -69,7 +69,7 @@ return request({ url: 'sys/mgr/reset', method: 'post', - data + data, }) } @@ -80,17 +80,17 @@ method: 'post', data: { userId, - roleIds: ids - } + roleIds: ids, + }, // paramsSerializer: (params) => qs.stringify(params, { indices: false }) }) } -// 获取用户实验室代码和组别 +// 获取用户实验室代码和部门 export function getLabAndGroup(params: { deptId: string }) { return request({ url: '/system/labAndGroup', method: 'get', - params + params, }) } diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 102ce61..400bf48 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -34,11 +34,11 @@ isLogout: 0, // 是否被退出登录 bizLabCode: localStorage.bizLabCode || '', // 实验室 labCodeName: localStorage.labCodeName || '', // 实验室名称 - groupNo: localStorage.groupNo || '', // 组别 - groupName: localStorage.groupName || '' // 组别名称 + groupNo: localStorage.groupNo || '', // 部门 + groupName: localStorage.groupName || '', // 部门名称 }), getters: { - isLogin: state => { + isLogin: (state) => { let retn = false if (state.token) { retn = true @@ -46,17 +46,18 @@ return retn }, // 是否已获取用户信息 - hasUserInfo: state => { + hasUserInfo: (state) => { if (state.roleList && state.roleList.length > 0) { return true - } else { + } + else { return false } }, - getPublicKey: state => { + getPublicKey: (state) => { return state.publicKey }, - getPrivateKey: state => { + getPrivateKey: (state) => { return state.privateKey }, getMenus: (state): Menu.menu[] => { @@ -64,14 +65,14 @@ }, getBtns: (state): Menu.menu[] => { return state.btns - } + }, }, actions: { // 获取项目基础配置 getBaseConfig() { return new Promise((resolve, reject) => { getConfig() - .then(res => { + .then((res) => { this.publicKey = res.data.publicKey localStorage.setItem('publicKey', res.data.publicKey) // 保存私钥 @@ -80,7 +81,7 @@ this.isLogout = 0 resolve(res.data) }) - .catch(e => { + .catch((e) => { reject(e) }) }) @@ -94,21 +95,21 @@ }) { return new Promise((resolve, reject) => { doLogin(data) - .then(res => { + .then((res) => { localStorage.setItem('token', res.data.token) this.username = res.data.username this.token = res.data.token this.isLogout = 0 resolve() }) - .catch(error => { + .catch((error) => { reject(error) }) }) }, // 注销 logout() { - return new Promise(resolve => { + return new Promise((resolve) => { const routeStore = useRouteStore() const menuStore = useMenuStore() localStorage.removeItem('username') @@ -117,17 +118,17 @@ localStorage.removeItem('depId') localStorage.removeItem('bizLabCode') // 实验室 localStorage.removeItem('labCodeName') // 实验室 - localStorage.removeItem('groupNo') // 组别 - localStorage.removeItem('groupName') // 组别 + localStorage.removeItem('groupNo') // 部门 + localStorage.removeItem('groupName') // 部门 // localStorage.clear() this.username = '' this.token = '' this.roleList = [] this.roleNames = [] this.bizLabCode = '' // 实验室 - this.groupNo = '' // 组别 - this.labCodeName = '' // 组别 - this.groupName = '' // 组别 + this.groupNo = '' // 部门 + this.labCodeName = '' // 部门 + this.groupName = '' // 部门 routeStore.removeRoutes() menuStore.setActived(0) resolve() @@ -135,53 +136,54 @@ }, // 获取用户信息 getUserInfo() { - return new Promise(resolve => { + return new Promise((resolve) => { getInfo() - .then(res => { + .then((res) => { if (res.data.roleIds && res.data.roleIds.length > 0) { this.roleList = res.data.roleIds this.roleNames = res.data.roleNames this.roleTips = res.data.roleTips localStorage.setItem('nameId', res.data.id) localStorage.setItem('depId', res.data.deptId) - } else { + } + else { reject('该用户无角色') } if (res.data.deptId) { this.deptId = res.data.deptId this.deptName = res.data.deptName - // 获取本用户实验室代码、组别 - getLabAndGroup({ deptId: res.data.deptId }).then(res => { + // 获取本用户实验室代码、部门 + getLabAndGroup({ deptId: res.data.deptId }).then((res) => { this.bizLabCode = res.data.bizLabCode // 实验室 - this.groupNo = res.data.groupNo // 组别 + this.groupNo = res.data.groupNo // 部门 if (this.bizLabCode) { - getDictByCode('bizGroupCodeEquipment').then(response => { + getDictByCode('bizGroupCodeEquipment').then((response) => { const labCodeList = response.data const index = labCodeList.findIndex( (item: { value: string }) => - item.value === this.bizLabCode + item.value === this.bizLabCode, ) if (index !== -1) { this.labCodeName = labCodeList[index].name // 实验室 localStorage.setItem( 'labCodeName', - labCodeList[index].name + labCodeList[index].name, ) } }) } if (this.bizLabCode) { - getDictByCode('bizGroupCode').then(response => { + getDictByCode('bizGroupCode').then((response) => { const groupCodeList = response.data const index = groupCodeList.findIndex( - (item: { value: string }) => item.value === this.groupNo + (item: { value: string }) => item.value === this.groupNo, ) if (index !== -1) { this.groupName = groupCodeList[index].name localStorage.setItem( 'groupName', - groupCodeList[index].name + groupCodeList[index].name, ) } }) @@ -190,10 +192,11 @@ localStorage.setItem('bizLabCode', res.data.bizLabCode) }) // 基本信息-部门接口-查询部门类别 - getDeptList({ deptName: res.data.deptName }).then(response => { + getDeptList({ deptName: res.data.deptName }).then((response) => { this.deptType = response.data.list[0].deptType }) - } else { + } + else { reject('该用户无组织机构') } this.id = res.data.id @@ -210,13 +213,13 @@ getPermissions(currentSystem?: { name: string; code: string }) { const params = { resourceType: '', - parentCode: '' + parentCode: '', } if (currentSystem) { params.parentCode = currentSystem.code // 子系统code } - return new Promise(resolve => { - getUserMenus(params).then(response => { + return new Promise((resolve) => { + getUserMenus(params).then((response) => { const data = response.data const menus = [] // 仅菜单 const btns = [] // 非菜单 @@ -230,14 +233,14 @@ const menu_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } menus.push(menu_tmp) } const btn_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } btns.push(btn_tmp) } @@ -250,8 +253,8 @@ }, // 修改密码 editPassword(data: { oldPwd: string; newPwd: string }) { - return new Promise(resolve => { - changePwd(data).then(response => { + return new Promise((resolve) => { + changePwd(data).then((response) => { resolve(response) }) }) @@ -259,9 +262,9 @@ // 被退出登录 toLogout() { this.isLogout += 1 - } - } - } + }, + }, + }, ) export default useUserStore diff --git a/src/views/business/certManage/apply/apply-interface.ts b/src/views/business/certManage/apply/apply-interface.ts index 5595f43..1fdb9b7 100644 --- a/src/views/business/certManage/apply/apply-interface.ts +++ b/src/views/business/certManage/apply/apply-interface.ts @@ -31,7 +31,7 @@ // 表单 export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 changeApplyNo: string // 申请单编号 changeApplyName: string // 申请单名称 createUserId: string // 创建人id diff --git a/src/api/equipment/info/book.ts b/src/api/equipment/info/book.ts index 60cf0d2..295d4f9 100644 --- a/src/api/equipment/info/book.ts +++ b/src/api/equipment/info/book.ts @@ -9,7 +9,7 @@ return request({ url: `${prefix}/approval/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -18,7 +18,7 @@ return request({ url: `${prefix}/save`, method: 'post', - data + data, }) } @@ -27,7 +27,7 @@ return request({ url: `${prefix}/draftUpdate`, method: 'post', - data + data, }) } // 编辑 @@ -35,7 +35,7 @@ return request({ url: `${prefix}/failUpdate`, method: 'post', - data + data, }) } @@ -44,7 +44,7 @@ return request({ url: `${prefix}/detail`, method: 'post', - data + data, }) } @@ -59,7 +59,7 @@ return request({ url: `${prefix}/submit`, method: 'post', - data + data, }) } @@ -68,7 +68,7 @@ return request({ url: `${prefix}/draftDelete`, method: 'post', - data + data, }) } @@ -77,7 +77,7 @@ return request({ url: `${prefix}/approval/delete`, method: 'post', - data + data, }) } @@ -86,7 +86,7 @@ return request({ url: `${prefix}/circulationLog/listPage`, method: 'post', - data + data, }) } @@ -99,7 +99,7 @@ return request({ url: `${prefix}/status/log/list`, method: 'get', - params + params, }) } @@ -112,7 +112,7 @@ return request({ url: `${prefix}/approval/revoke`, method: 'post', - data + data, }) } @@ -125,7 +125,7 @@ return request({ url: `${prefix}/approval/refuse`, method: 'post', - data + data, }) } @@ -134,7 +134,7 @@ return request({ url: `${prefix}/remind`, method: 'post', - data + data, }) } @@ -143,11 +143,11 @@ return request({ url: `${prefix}/import`, method: 'post', - data + data, }) } -// 根据实验室代码和组别获取deptId +// 根据实验室代码和部门获取deptId export function getDeptIdByLabAndGroup(params: { labCode: string groupNo: string @@ -155,7 +155,7 @@ return request({ url: '/system/getDeptIdByLabAndGroup', method: 'get', - params + params, }) } @@ -164,7 +164,7 @@ return request({ url: `${path}?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -173,7 +173,7 @@ return request({ url: '/equipment/certificate/listPage', method: 'post', - data + data, }) } @@ -182,7 +182,7 @@ return request({ url: '/equipment/detail/maintain/listPage', method: 'post', - data + data, }) } @@ -191,7 +191,7 @@ return request({ url: '/equipment/detail/resume/listPage', method: 'post', - data + data, }) } @@ -200,7 +200,7 @@ return request({ url: '/equipment/hasChanged', method: 'post', - data + data, }) } @@ -210,7 +210,7 @@ url: '/equipment/exportFile', method: 'post', responseType: 'blob', - data + data, }) } @@ -220,6 +220,6 @@ url: '/equipment/exportExcelFile', method: 'post', responseType: 'blob', - data + data, }) } diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 5678997..ff2d6d5 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -10,7 +10,7 @@ return request({ url: `${prefix}mgr/list`, method: 'get', - params + params, }) } @@ -19,14 +19,14 @@ return request({ url: '/system/mgr/list', method: 'get', - params + params, }) } // 获取用户所在单位 export function getUserDept() { return request({ - url: '/system/company' + url: '/system/company', }) } @@ -43,7 +43,7 @@ return request({ url: `${prefix}mgr/delete`, method: 'post', - data + data, }) } @@ -52,7 +52,7 @@ return request({ url: `${prefix}mgr/freeze`, method: 'post', - data + data, }) } // 冻结用户 @@ -60,7 +60,7 @@ return request({ url: `${prefix}mgr/unfreeze`, method: 'post', - data + data, }) } @@ -69,7 +69,7 @@ return request({ url: 'sys/mgr/reset', method: 'post', - data + data, }) } @@ -80,17 +80,17 @@ method: 'post', data: { userId, - roleIds: ids - } + roleIds: ids, + }, // paramsSerializer: (params) => qs.stringify(params, { indices: false }) }) } -// 获取用户实验室代码和组别 +// 获取用户实验室代码和部门 export function getLabAndGroup(params: { deptId: string }) { return request({ url: '/system/labAndGroup', method: 'get', - params + params, }) } diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 102ce61..400bf48 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -34,11 +34,11 @@ isLogout: 0, // 是否被退出登录 bizLabCode: localStorage.bizLabCode || '', // 实验室 labCodeName: localStorage.labCodeName || '', // 实验室名称 - groupNo: localStorage.groupNo || '', // 组别 - groupName: localStorage.groupName || '' // 组别名称 + groupNo: localStorage.groupNo || '', // 部门 + groupName: localStorage.groupName || '', // 部门名称 }), getters: { - isLogin: state => { + isLogin: (state) => { let retn = false if (state.token) { retn = true @@ -46,17 +46,18 @@ return retn }, // 是否已获取用户信息 - hasUserInfo: state => { + hasUserInfo: (state) => { if (state.roleList && state.roleList.length > 0) { return true - } else { + } + else { return false } }, - getPublicKey: state => { + getPublicKey: (state) => { return state.publicKey }, - getPrivateKey: state => { + getPrivateKey: (state) => { return state.privateKey }, getMenus: (state): Menu.menu[] => { @@ -64,14 +65,14 @@ }, getBtns: (state): Menu.menu[] => { return state.btns - } + }, }, actions: { // 获取项目基础配置 getBaseConfig() { return new Promise((resolve, reject) => { getConfig() - .then(res => { + .then((res) => { this.publicKey = res.data.publicKey localStorage.setItem('publicKey', res.data.publicKey) // 保存私钥 @@ -80,7 +81,7 @@ this.isLogout = 0 resolve(res.data) }) - .catch(e => { + .catch((e) => { reject(e) }) }) @@ -94,21 +95,21 @@ }) { return new Promise((resolve, reject) => { doLogin(data) - .then(res => { + .then((res) => { localStorage.setItem('token', res.data.token) this.username = res.data.username this.token = res.data.token this.isLogout = 0 resolve() }) - .catch(error => { + .catch((error) => { reject(error) }) }) }, // 注销 logout() { - return new Promise(resolve => { + return new Promise((resolve) => { const routeStore = useRouteStore() const menuStore = useMenuStore() localStorage.removeItem('username') @@ -117,17 +118,17 @@ localStorage.removeItem('depId') localStorage.removeItem('bizLabCode') // 实验室 localStorage.removeItem('labCodeName') // 实验室 - localStorage.removeItem('groupNo') // 组别 - localStorage.removeItem('groupName') // 组别 + localStorage.removeItem('groupNo') // 部门 + localStorage.removeItem('groupName') // 部门 // localStorage.clear() this.username = '' this.token = '' this.roleList = [] this.roleNames = [] this.bizLabCode = '' // 实验室 - this.groupNo = '' // 组别 - this.labCodeName = '' // 组别 - this.groupName = '' // 组别 + this.groupNo = '' // 部门 + this.labCodeName = '' // 部门 + this.groupName = '' // 部门 routeStore.removeRoutes() menuStore.setActived(0) resolve() @@ -135,53 +136,54 @@ }, // 获取用户信息 getUserInfo() { - return new Promise(resolve => { + return new Promise((resolve) => { getInfo() - .then(res => { + .then((res) => { if (res.data.roleIds && res.data.roleIds.length > 0) { this.roleList = res.data.roleIds this.roleNames = res.data.roleNames this.roleTips = res.data.roleTips localStorage.setItem('nameId', res.data.id) localStorage.setItem('depId', res.data.deptId) - } else { + } + else { reject('该用户无角色') } if (res.data.deptId) { this.deptId = res.data.deptId this.deptName = res.data.deptName - // 获取本用户实验室代码、组别 - getLabAndGroup({ deptId: res.data.deptId }).then(res => { + // 获取本用户实验室代码、部门 + getLabAndGroup({ deptId: res.data.deptId }).then((res) => { this.bizLabCode = res.data.bizLabCode // 实验室 - this.groupNo = res.data.groupNo // 组别 + this.groupNo = res.data.groupNo // 部门 if (this.bizLabCode) { - getDictByCode('bizGroupCodeEquipment').then(response => { + getDictByCode('bizGroupCodeEquipment').then((response) => { const labCodeList = response.data const index = labCodeList.findIndex( (item: { value: string }) => - item.value === this.bizLabCode + item.value === this.bizLabCode, ) if (index !== -1) { this.labCodeName = labCodeList[index].name // 实验室 localStorage.setItem( 'labCodeName', - labCodeList[index].name + labCodeList[index].name, ) } }) } if (this.bizLabCode) { - getDictByCode('bizGroupCode').then(response => { + getDictByCode('bizGroupCode').then((response) => { const groupCodeList = response.data const index = groupCodeList.findIndex( - (item: { value: string }) => item.value === this.groupNo + (item: { value: string }) => item.value === this.groupNo, ) if (index !== -1) { this.groupName = groupCodeList[index].name localStorage.setItem( 'groupName', - groupCodeList[index].name + groupCodeList[index].name, ) } }) @@ -190,10 +192,11 @@ localStorage.setItem('bizLabCode', res.data.bizLabCode) }) // 基本信息-部门接口-查询部门类别 - getDeptList({ deptName: res.data.deptName }).then(response => { + getDeptList({ deptName: res.data.deptName }).then((response) => { this.deptType = response.data.list[0].deptType }) - } else { + } + else { reject('该用户无组织机构') } this.id = res.data.id @@ -210,13 +213,13 @@ getPermissions(currentSystem?: { name: string; code: string }) { const params = { resourceType: '', - parentCode: '' + parentCode: '', } if (currentSystem) { params.parentCode = currentSystem.code // 子系统code } - return new Promise(resolve => { - getUserMenus(params).then(response => { + return new Promise((resolve) => { + getUserMenus(params).then((response) => { const data = response.data const menus = [] // 仅菜单 const btns = [] // 非菜单 @@ -230,14 +233,14 @@ const menu_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } menus.push(menu_tmp) } const btn_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } btns.push(btn_tmp) } @@ -250,8 +253,8 @@ }, // 修改密码 editPassword(data: { oldPwd: string; newPwd: string }) { - return new Promise(resolve => { - changePwd(data).then(response => { + return new Promise((resolve) => { + changePwd(data).then((response) => { resolve(response) }) }) @@ -259,9 +262,9 @@ // 被退出登录 toLogout() { this.isLogout += 1 - } - } - } + }, + }, + }, ) export default useUserStore diff --git a/src/views/business/certManage/apply/apply-interface.ts b/src/views/business/certManage/apply/apply-interface.ts index 5595f43..1fdb9b7 100644 --- a/src/views/business/certManage/apply/apply-interface.ts +++ b/src/views/business/certManage/apply/apply-interface.ts @@ -31,7 +31,7 @@ // 表单 export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 changeApplyNo: string // 申请单编号 changeApplyName: string // 申请单名称 createUserId: string // 创建人id diff --git a/src/views/business/certManage/apply/components/basic.vue b/src/views/business/certManage/apply/components/basic.vue index 3be1fef..bf02448 100644 --- a/src/views/business/certManage/apply/components/basic.vue +++ b/src/views/business/certManage/apply/components/basic.vue @@ -32,7 +32,7 @@ const user = useUserStore() // 用户信息 const form = ref({ labCode: '', // 实验室 - groupCode: '', // 组别 + groupCode: '', // 部门 changeApplyNo: '', // 申请单编号 changeApplyName: '', // 申请单名称 createUserId: '', // 创建人id @@ -53,13 +53,13 @@ const rules = ref({ // 校验规则 labCode: [{ required: true, message: '实验室不能为空', trigger: ['blur', 'change'] }], - groupCode: [{ required: true, message: '组别不能为空', trigger: ['blur', 'change'] }], + groupCode: [{ required: true, message: '部门不能为空', trigger: ['blur', 'change'] }], changeReportNo: [{ required: true, message: '更换证书编号不能为空', trigger: ['change', 'blur'] }], changeType: [{ required: true, message: '变更类型不能为空', trigger: ['change', 'blur'] }], }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 const changeTypeList = ref([]) // 变更类型 function getDict() { @@ -67,7 +67,7 @@ getDictByCode('bizLabCode').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) @@ -192,7 +192,7 @@ onMounted(async () => { if (props.pageType === 'edit' || props.pageType === 'detail') { form.value.labCode = $route.query.labCode as any // 实验室 - form.value.groupCode = $route.query.groupCode as string // 组别 + form.value.groupCode = $route.query.groupCode as string // 部门 form.value.changeApplyNo = $route.query.changeApplyNo as string // 申请单编号 form.value.changeApplyName = $route.query.changeApplyName as string // 申请单名称 form.value.createUserId = $route.query.createUserId as string // 创建人id @@ -236,8 +236,8 @@ - - + + diff --git a/src/api/equipment/info/book.ts b/src/api/equipment/info/book.ts index 60cf0d2..295d4f9 100644 --- a/src/api/equipment/info/book.ts +++ b/src/api/equipment/info/book.ts @@ -9,7 +9,7 @@ return request({ url: `${prefix}/approval/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -18,7 +18,7 @@ return request({ url: `${prefix}/save`, method: 'post', - data + data, }) } @@ -27,7 +27,7 @@ return request({ url: `${prefix}/draftUpdate`, method: 'post', - data + data, }) } // 编辑 @@ -35,7 +35,7 @@ return request({ url: `${prefix}/failUpdate`, method: 'post', - data + data, }) } @@ -44,7 +44,7 @@ return request({ url: `${prefix}/detail`, method: 'post', - data + data, }) } @@ -59,7 +59,7 @@ return request({ url: `${prefix}/submit`, method: 'post', - data + data, }) } @@ -68,7 +68,7 @@ return request({ url: `${prefix}/draftDelete`, method: 'post', - data + data, }) } @@ -77,7 +77,7 @@ return request({ url: `${prefix}/approval/delete`, method: 'post', - data + data, }) } @@ -86,7 +86,7 @@ return request({ url: `${prefix}/circulationLog/listPage`, method: 'post', - data + data, }) } @@ -99,7 +99,7 @@ return request({ url: `${prefix}/status/log/list`, method: 'get', - params + params, }) } @@ -112,7 +112,7 @@ return request({ url: `${prefix}/approval/revoke`, method: 'post', - data + data, }) } @@ -125,7 +125,7 @@ return request({ url: `${prefix}/approval/refuse`, method: 'post', - data + data, }) } @@ -134,7 +134,7 @@ return request({ url: `${prefix}/remind`, method: 'post', - data + data, }) } @@ -143,11 +143,11 @@ return request({ url: `${prefix}/import`, method: 'post', - data + data, }) } -// 根据实验室代码和组别获取deptId +// 根据实验室代码和部门获取deptId export function getDeptIdByLabAndGroup(params: { labCode: string groupNo: string @@ -155,7 +155,7 @@ return request({ url: '/system/getDeptIdByLabAndGroup', method: 'get', - params + params, }) } @@ -164,7 +164,7 @@ return request({ url: `${path}?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -173,7 +173,7 @@ return request({ url: '/equipment/certificate/listPage', method: 'post', - data + data, }) } @@ -182,7 +182,7 @@ return request({ url: '/equipment/detail/maintain/listPage', method: 'post', - data + data, }) } @@ -191,7 +191,7 @@ return request({ url: '/equipment/detail/resume/listPage', method: 'post', - data + data, }) } @@ -200,7 +200,7 @@ return request({ url: '/equipment/hasChanged', method: 'post', - data + data, }) } @@ -210,7 +210,7 @@ url: '/equipment/exportFile', method: 'post', responseType: 'blob', - data + data, }) } @@ -220,6 +220,6 @@ url: '/equipment/exportExcelFile', method: 'post', responseType: 'blob', - data + data, }) } diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 5678997..ff2d6d5 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -10,7 +10,7 @@ return request({ url: `${prefix}mgr/list`, method: 'get', - params + params, }) } @@ -19,14 +19,14 @@ return request({ url: '/system/mgr/list', method: 'get', - params + params, }) } // 获取用户所在单位 export function getUserDept() { return request({ - url: '/system/company' + url: '/system/company', }) } @@ -43,7 +43,7 @@ return request({ url: `${prefix}mgr/delete`, method: 'post', - data + data, }) } @@ -52,7 +52,7 @@ return request({ url: `${prefix}mgr/freeze`, method: 'post', - data + data, }) } // 冻结用户 @@ -60,7 +60,7 @@ return request({ url: `${prefix}mgr/unfreeze`, method: 'post', - data + data, }) } @@ -69,7 +69,7 @@ return request({ url: 'sys/mgr/reset', method: 'post', - data + data, }) } @@ -80,17 +80,17 @@ method: 'post', data: { userId, - roleIds: ids - } + roleIds: ids, + }, // paramsSerializer: (params) => qs.stringify(params, { indices: false }) }) } -// 获取用户实验室代码和组别 +// 获取用户实验室代码和部门 export function getLabAndGroup(params: { deptId: string }) { return request({ url: '/system/labAndGroup', method: 'get', - params + params, }) } diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 102ce61..400bf48 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -34,11 +34,11 @@ isLogout: 0, // 是否被退出登录 bizLabCode: localStorage.bizLabCode || '', // 实验室 labCodeName: localStorage.labCodeName || '', // 实验室名称 - groupNo: localStorage.groupNo || '', // 组别 - groupName: localStorage.groupName || '' // 组别名称 + groupNo: localStorage.groupNo || '', // 部门 + groupName: localStorage.groupName || '', // 部门名称 }), getters: { - isLogin: state => { + isLogin: (state) => { let retn = false if (state.token) { retn = true @@ -46,17 +46,18 @@ return retn }, // 是否已获取用户信息 - hasUserInfo: state => { + hasUserInfo: (state) => { if (state.roleList && state.roleList.length > 0) { return true - } else { + } + else { return false } }, - getPublicKey: state => { + getPublicKey: (state) => { return state.publicKey }, - getPrivateKey: state => { + getPrivateKey: (state) => { return state.privateKey }, getMenus: (state): Menu.menu[] => { @@ -64,14 +65,14 @@ }, getBtns: (state): Menu.menu[] => { return state.btns - } + }, }, actions: { // 获取项目基础配置 getBaseConfig() { return new Promise((resolve, reject) => { getConfig() - .then(res => { + .then((res) => { this.publicKey = res.data.publicKey localStorage.setItem('publicKey', res.data.publicKey) // 保存私钥 @@ -80,7 +81,7 @@ this.isLogout = 0 resolve(res.data) }) - .catch(e => { + .catch((e) => { reject(e) }) }) @@ -94,21 +95,21 @@ }) { return new Promise((resolve, reject) => { doLogin(data) - .then(res => { + .then((res) => { localStorage.setItem('token', res.data.token) this.username = res.data.username this.token = res.data.token this.isLogout = 0 resolve() }) - .catch(error => { + .catch((error) => { reject(error) }) }) }, // 注销 logout() { - return new Promise(resolve => { + return new Promise((resolve) => { const routeStore = useRouteStore() const menuStore = useMenuStore() localStorage.removeItem('username') @@ -117,17 +118,17 @@ localStorage.removeItem('depId') localStorage.removeItem('bizLabCode') // 实验室 localStorage.removeItem('labCodeName') // 实验室 - localStorage.removeItem('groupNo') // 组别 - localStorage.removeItem('groupName') // 组别 + localStorage.removeItem('groupNo') // 部门 + localStorage.removeItem('groupName') // 部门 // localStorage.clear() this.username = '' this.token = '' this.roleList = [] this.roleNames = [] this.bizLabCode = '' // 实验室 - this.groupNo = '' // 组别 - this.labCodeName = '' // 组别 - this.groupName = '' // 组别 + this.groupNo = '' // 部门 + this.labCodeName = '' // 部门 + this.groupName = '' // 部门 routeStore.removeRoutes() menuStore.setActived(0) resolve() @@ -135,53 +136,54 @@ }, // 获取用户信息 getUserInfo() { - return new Promise(resolve => { + return new Promise((resolve) => { getInfo() - .then(res => { + .then((res) => { if (res.data.roleIds && res.data.roleIds.length > 0) { this.roleList = res.data.roleIds this.roleNames = res.data.roleNames this.roleTips = res.data.roleTips localStorage.setItem('nameId', res.data.id) localStorage.setItem('depId', res.data.deptId) - } else { + } + else { reject('该用户无角色') } if (res.data.deptId) { this.deptId = res.data.deptId this.deptName = res.data.deptName - // 获取本用户实验室代码、组别 - getLabAndGroup({ deptId: res.data.deptId }).then(res => { + // 获取本用户实验室代码、部门 + getLabAndGroup({ deptId: res.data.deptId }).then((res) => { this.bizLabCode = res.data.bizLabCode // 实验室 - this.groupNo = res.data.groupNo // 组别 + this.groupNo = res.data.groupNo // 部门 if (this.bizLabCode) { - getDictByCode('bizGroupCodeEquipment').then(response => { + getDictByCode('bizGroupCodeEquipment').then((response) => { const labCodeList = response.data const index = labCodeList.findIndex( (item: { value: string }) => - item.value === this.bizLabCode + item.value === this.bizLabCode, ) if (index !== -1) { this.labCodeName = labCodeList[index].name // 实验室 localStorage.setItem( 'labCodeName', - labCodeList[index].name + labCodeList[index].name, ) } }) } if (this.bizLabCode) { - getDictByCode('bizGroupCode').then(response => { + getDictByCode('bizGroupCode').then((response) => { const groupCodeList = response.data const index = groupCodeList.findIndex( - (item: { value: string }) => item.value === this.groupNo + (item: { value: string }) => item.value === this.groupNo, ) if (index !== -1) { this.groupName = groupCodeList[index].name localStorage.setItem( 'groupName', - groupCodeList[index].name + groupCodeList[index].name, ) } }) @@ -190,10 +192,11 @@ localStorage.setItem('bizLabCode', res.data.bizLabCode) }) // 基本信息-部门接口-查询部门类别 - getDeptList({ deptName: res.data.deptName }).then(response => { + getDeptList({ deptName: res.data.deptName }).then((response) => { this.deptType = response.data.list[0].deptType }) - } else { + } + else { reject('该用户无组织机构') } this.id = res.data.id @@ -210,13 +213,13 @@ getPermissions(currentSystem?: { name: string; code: string }) { const params = { resourceType: '', - parentCode: '' + parentCode: '', } if (currentSystem) { params.parentCode = currentSystem.code // 子系统code } - return new Promise(resolve => { - getUserMenus(params).then(response => { + return new Promise((resolve) => { + getUserMenus(params).then((response) => { const data = response.data const menus = [] // 仅菜单 const btns = [] // 非菜单 @@ -230,14 +233,14 @@ const menu_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } menus.push(menu_tmp) } const btn_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } btns.push(btn_tmp) } @@ -250,8 +253,8 @@ }, // 修改密码 editPassword(data: { oldPwd: string; newPwd: string }) { - return new Promise(resolve => { - changePwd(data).then(response => { + return new Promise((resolve) => { + changePwd(data).then((response) => { resolve(response) }) }) @@ -259,9 +262,9 @@ // 被退出登录 toLogout() { this.isLogout += 1 - } - } - } + }, + }, + }, ) export default useUserStore diff --git a/src/views/business/certManage/apply/apply-interface.ts b/src/views/business/certManage/apply/apply-interface.ts index 5595f43..1fdb9b7 100644 --- a/src/views/business/certManage/apply/apply-interface.ts +++ b/src/views/business/certManage/apply/apply-interface.ts @@ -31,7 +31,7 @@ // 表单 export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 changeApplyNo: string // 申请单编号 changeApplyName: string // 申请单名称 createUserId: string // 创建人id diff --git a/src/views/business/certManage/apply/components/basic.vue b/src/views/business/certManage/apply/components/basic.vue index 3be1fef..bf02448 100644 --- a/src/views/business/certManage/apply/components/basic.vue +++ b/src/views/business/certManage/apply/components/basic.vue @@ -32,7 +32,7 @@ const user = useUserStore() // 用户信息 const form = ref({ labCode: '', // 实验室 - groupCode: '', // 组别 + groupCode: '', // 部门 changeApplyNo: '', // 申请单编号 changeApplyName: '', // 申请单名称 createUserId: '', // 创建人id @@ -53,13 +53,13 @@ const rules = ref({ // 校验规则 labCode: [{ required: true, message: '实验室不能为空', trigger: ['blur', 'change'] }], - groupCode: [{ required: true, message: '组别不能为空', trigger: ['blur', 'change'] }], + groupCode: [{ required: true, message: '部门不能为空', trigger: ['blur', 'change'] }], changeReportNo: [{ required: true, message: '更换证书编号不能为空', trigger: ['change', 'blur'] }], changeType: [{ required: true, message: '变更类型不能为空', trigger: ['change', 'blur'] }], }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 const changeTypeList = ref([]) // 变更类型 function getDict() { @@ -67,7 +67,7 @@ getDictByCode('bizLabCode').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) @@ -192,7 +192,7 @@ onMounted(async () => { if (props.pageType === 'edit' || props.pageType === 'detail') { form.value.labCode = $route.query.labCode as any // 实验室 - form.value.groupCode = $route.query.groupCode as string // 组别 + form.value.groupCode = $route.query.groupCode as string // 部门 form.value.changeApplyNo = $route.query.changeApplyNo as string // 申请单编号 form.value.changeApplyName = $route.query.changeApplyName as string // 申请单名称 form.value.createUserId = $route.query.createUserId as string // 创建人id @@ -236,8 +236,8 @@ - - + + diff --git a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue index b8d9940..959501b 100644 --- a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue +++ b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue @@ -18,7 +18,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 @@ -123,7 +123,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/api/equipment/info/book.ts b/src/api/equipment/info/book.ts index 60cf0d2..295d4f9 100644 --- a/src/api/equipment/info/book.ts +++ b/src/api/equipment/info/book.ts @@ -9,7 +9,7 @@ return request({ url: `${prefix}/approval/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -18,7 +18,7 @@ return request({ url: `${prefix}/save`, method: 'post', - data + data, }) } @@ -27,7 +27,7 @@ return request({ url: `${prefix}/draftUpdate`, method: 'post', - data + data, }) } // 编辑 @@ -35,7 +35,7 @@ return request({ url: `${prefix}/failUpdate`, method: 'post', - data + data, }) } @@ -44,7 +44,7 @@ return request({ url: `${prefix}/detail`, method: 'post', - data + data, }) } @@ -59,7 +59,7 @@ return request({ url: `${prefix}/submit`, method: 'post', - data + data, }) } @@ -68,7 +68,7 @@ return request({ url: `${prefix}/draftDelete`, method: 'post', - data + data, }) } @@ -77,7 +77,7 @@ return request({ url: `${prefix}/approval/delete`, method: 'post', - data + data, }) } @@ -86,7 +86,7 @@ return request({ url: `${prefix}/circulationLog/listPage`, method: 'post', - data + data, }) } @@ -99,7 +99,7 @@ return request({ url: `${prefix}/status/log/list`, method: 'get', - params + params, }) } @@ -112,7 +112,7 @@ return request({ url: `${prefix}/approval/revoke`, method: 'post', - data + data, }) } @@ -125,7 +125,7 @@ return request({ url: `${prefix}/approval/refuse`, method: 'post', - data + data, }) } @@ -134,7 +134,7 @@ return request({ url: `${prefix}/remind`, method: 'post', - data + data, }) } @@ -143,11 +143,11 @@ return request({ url: `${prefix}/import`, method: 'post', - data + data, }) } -// 根据实验室代码和组别获取deptId +// 根据实验室代码和部门获取deptId export function getDeptIdByLabAndGroup(params: { labCode: string groupNo: string @@ -155,7 +155,7 @@ return request({ url: '/system/getDeptIdByLabAndGroup', method: 'get', - params + params, }) } @@ -164,7 +164,7 @@ return request({ url: `${path}?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -173,7 +173,7 @@ return request({ url: '/equipment/certificate/listPage', method: 'post', - data + data, }) } @@ -182,7 +182,7 @@ return request({ url: '/equipment/detail/maintain/listPage', method: 'post', - data + data, }) } @@ -191,7 +191,7 @@ return request({ url: '/equipment/detail/resume/listPage', method: 'post', - data + data, }) } @@ -200,7 +200,7 @@ return request({ url: '/equipment/hasChanged', method: 'post', - data + data, }) } @@ -210,7 +210,7 @@ url: '/equipment/exportFile', method: 'post', responseType: 'blob', - data + data, }) } @@ -220,6 +220,6 @@ url: '/equipment/exportExcelFile', method: 'post', responseType: 'blob', - data + data, }) } diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 5678997..ff2d6d5 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -10,7 +10,7 @@ return request({ url: `${prefix}mgr/list`, method: 'get', - params + params, }) } @@ -19,14 +19,14 @@ return request({ url: '/system/mgr/list', method: 'get', - params + params, }) } // 获取用户所在单位 export function getUserDept() { return request({ - url: '/system/company' + url: '/system/company', }) } @@ -43,7 +43,7 @@ return request({ url: `${prefix}mgr/delete`, method: 'post', - data + data, }) } @@ -52,7 +52,7 @@ return request({ url: `${prefix}mgr/freeze`, method: 'post', - data + data, }) } // 冻结用户 @@ -60,7 +60,7 @@ return request({ url: `${prefix}mgr/unfreeze`, method: 'post', - data + data, }) } @@ -69,7 +69,7 @@ return request({ url: 'sys/mgr/reset', method: 'post', - data + data, }) } @@ -80,17 +80,17 @@ method: 'post', data: { userId, - roleIds: ids - } + roleIds: ids, + }, // paramsSerializer: (params) => qs.stringify(params, { indices: false }) }) } -// 获取用户实验室代码和组别 +// 获取用户实验室代码和部门 export function getLabAndGroup(params: { deptId: string }) { return request({ url: '/system/labAndGroup', method: 'get', - params + params, }) } diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 102ce61..400bf48 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -34,11 +34,11 @@ isLogout: 0, // 是否被退出登录 bizLabCode: localStorage.bizLabCode || '', // 实验室 labCodeName: localStorage.labCodeName || '', // 实验室名称 - groupNo: localStorage.groupNo || '', // 组别 - groupName: localStorage.groupName || '' // 组别名称 + groupNo: localStorage.groupNo || '', // 部门 + groupName: localStorage.groupName || '', // 部门名称 }), getters: { - isLogin: state => { + isLogin: (state) => { let retn = false if (state.token) { retn = true @@ -46,17 +46,18 @@ return retn }, // 是否已获取用户信息 - hasUserInfo: state => { + hasUserInfo: (state) => { if (state.roleList && state.roleList.length > 0) { return true - } else { + } + else { return false } }, - getPublicKey: state => { + getPublicKey: (state) => { return state.publicKey }, - getPrivateKey: state => { + getPrivateKey: (state) => { return state.privateKey }, getMenus: (state): Menu.menu[] => { @@ -64,14 +65,14 @@ }, getBtns: (state): Menu.menu[] => { return state.btns - } + }, }, actions: { // 获取项目基础配置 getBaseConfig() { return new Promise((resolve, reject) => { getConfig() - .then(res => { + .then((res) => { this.publicKey = res.data.publicKey localStorage.setItem('publicKey', res.data.publicKey) // 保存私钥 @@ -80,7 +81,7 @@ this.isLogout = 0 resolve(res.data) }) - .catch(e => { + .catch((e) => { reject(e) }) }) @@ -94,21 +95,21 @@ }) { return new Promise((resolve, reject) => { doLogin(data) - .then(res => { + .then((res) => { localStorage.setItem('token', res.data.token) this.username = res.data.username this.token = res.data.token this.isLogout = 0 resolve() }) - .catch(error => { + .catch((error) => { reject(error) }) }) }, // 注销 logout() { - return new Promise(resolve => { + return new Promise((resolve) => { const routeStore = useRouteStore() const menuStore = useMenuStore() localStorage.removeItem('username') @@ -117,17 +118,17 @@ localStorage.removeItem('depId') localStorage.removeItem('bizLabCode') // 实验室 localStorage.removeItem('labCodeName') // 实验室 - localStorage.removeItem('groupNo') // 组别 - localStorage.removeItem('groupName') // 组别 + localStorage.removeItem('groupNo') // 部门 + localStorage.removeItem('groupName') // 部门 // localStorage.clear() this.username = '' this.token = '' this.roleList = [] this.roleNames = [] this.bizLabCode = '' // 实验室 - this.groupNo = '' // 组别 - this.labCodeName = '' // 组别 - this.groupName = '' // 组别 + this.groupNo = '' // 部门 + this.labCodeName = '' // 部门 + this.groupName = '' // 部门 routeStore.removeRoutes() menuStore.setActived(0) resolve() @@ -135,53 +136,54 @@ }, // 获取用户信息 getUserInfo() { - return new Promise(resolve => { + return new Promise((resolve) => { getInfo() - .then(res => { + .then((res) => { if (res.data.roleIds && res.data.roleIds.length > 0) { this.roleList = res.data.roleIds this.roleNames = res.data.roleNames this.roleTips = res.data.roleTips localStorage.setItem('nameId', res.data.id) localStorage.setItem('depId', res.data.deptId) - } else { + } + else { reject('该用户无角色') } if (res.data.deptId) { this.deptId = res.data.deptId this.deptName = res.data.deptName - // 获取本用户实验室代码、组别 - getLabAndGroup({ deptId: res.data.deptId }).then(res => { + // 获取本用户实验室代码、部门 + getLabAndGroup({ deptId: res.data.deptId }).then((res) => { this.bizLabCode = res.data.bizLabCode // 实验室 - this.groupNo = res.data.groupNo // 组别 + this.groupNo = res.data.groupNo // 部门 if (this.bizLabCode) { - getDictByCode('bizGroupCodeEquipment').then(response => { + getDictByCode('bizGroupCodeEquipment').then((response) => { const labCodeList = response.data const index = labCodeList.findIndex( (item: { value: string }) => - item.value === this.bizLabCode + item.value === this.bizLabCode, ) if (index !== -1) { this.labCodeName = labCodeList[index].name // 实验室 localStorage.setItem( 'labCodeName', - labCodeList[index].name + labCodeList[index].name, ) } }) } if (this.bizLabCode) { - getDictByCode('bizGroupCode').then(response => { + getDictByCode('bizGroupCode').then((response) => { const groupCodeList = response.data const index = groupCodeList.findIndex( - (item: { value: string }) => item.value === this.groupNo + (item: { value: string }) => item.value === this.groupNo, ) if (index !== -1) { this.groupName = groupCodeList[index].name localStorage.setItem( 'groupName', - groupCodeList[index].name + groupCodeList[index].name, ) } }) @@ -190,10 +192,11 @@ localStorage.setItem('bizLabCode', res.data.bizLabCode) }) // 基本信息-部门接口-查询部门类别 - getDeptList({ deptName: res.data.deptName }).then(response => { + getDeptList({ deptName: res.data.deptName }).then((response) => { this.deptType = response.data.list[0].deptType }) - } else { + } + else { reject('该用户无组织机构') } this.id = res.data.id @@ -210,13 +213,13 @@ getPermissions(currentSystem?: { name: string; code: string }) { const params = { resourceType: '', - parentCode: '' + parentCode: '', } if (currentSystem) { params.parentCode = currentSystem.code // 子系统code } - return new Promise(resolve => { - getUserMenus(params).then(response => { + return new Promise((resolve) => { + getUserMenus(params).then((response) => { const data = response.data const menus = [] // 仅菜单 const btns = [] // 非菜单 @@ -230,14 +233,14 @@ const menu_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } menus.push(menu_tmp) } const btn_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } btns.push(btn_tmp) } @@ -250,8 +253,8 @@ }, // 修改密码 editPassword(data: { oldPwd: string; newPwd: string }) { - return new Promise(resolve => { - changePwd(data).then(response => { + return new Promise((resolve) => { + changePwd(data).then((response) => { resolve(response) }) }) @@ -259,9 +262,9 @@ // 被退出登录 toLogout() { this.isLogout += 1 - } - } - } + }, + }, + }, ) export default useUserStore diff --git a/src/views/business/certManage/apply/apply-interface.ts b/src/views/business/certManage/apply/apply-interface.ts index 5595f43..1fdb9b7 100644 --- a/src/views/business/certManage/apply/apply-interface.ts +++ b/src/views/business/certManage/apply/apply-interface.ts @@ -31,7 +31,7 @@ // 表单 export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 changeApplyNo: string // 申请单编号 changeApplyName: string // 申请单名称 createUserId: string // 创建人id diff --git a/src/views/business/certManage/apply/components/basic.vue b/src/views/business/certManage/apply/components/basic.vue index 3be1fef..bf02448 100644 --- a/src/views/business/certManage/apply/components/basic.vue +++ b/src/views/business/certManage/apply/components/basic.vue @@ -32,7 +32,7 @@ const user = useUserStore() // 用户信息 const form = ref({ labCode: '', // 实验室 - groupCode: '', // 组别 + groupCode: '', // 部门 changeApplyNo: '', // 申请单编号 changeApplyName: '', // 申请单名称 createUserId: '', // 创建人id @@ -53,13 +53,13 @@ const rules = ref({ // 校验规则 labCode: [{ required: true, message: '实验室不能为空', trigger: ['blur', 'change'] }], - groupCode: [{ required: true, message: '组别不能为空', trigger: ['blur', 'change'] }], + groupCode: [{ required: true, message: '部门不能为空', trigger: ['blur', 'change'] }], changeReportNo: [{ required: true, message: '更换证书编号不能为空', trigger: ['change', 'blur'] }], changeType: [{ required: true, message: '变更类型不能为空', trigger: ['change', 'blur'] }], }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 const changeTypeList = ref([]) // 变更类型 function getDict() { @@ -67,7 +67,7 @@ getDictByCode('bizLabCode').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) @@ -192,7 +192,7 @@ onMounted(async () => { if (props.pageType === 'edit' || props.pageType === 'detail') { form.value.labCode = $route.query.labCode as any // 实验室 - form.value.groupCode = $route.query.groupCode as string // 组别 + form.value.groupCode = $route.query.groupCode as string // 部门 form.value.changeApplyNo = $route.query.changeApplyNo as string // 申请单编号 form.value.changeApplyName = $route.query.changeApplyName as string // 申请单名称 form.value.createUserId = $route.query.createUserId as string // 创建人id @@ -236,8 +236,8 @@ - - + + diff --git a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue index b8d9940..959501b 100644 --- a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue +++ b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue @@ -18,7 +18,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 @@ -123,7 +123,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/certManage/apply/list.vue b/src/views/business/certManage/apply/list.vue index 6829e97..fb5e6c3 100644 --- a/src/views/business/certManage/apply/list.vue +++ b/src/views/business/certManage/apply/list.vue @@ -211,7 +211,7 @@ processId: row.processId, // 流程实例id taskId: row.taskId, // 任务id labCode: row.labCode, // 实验室 - groupCode: row.groupCode, // 组别 + groupCode: row.groupCode, // 部门 changeApplyNo: row.changeApplyNo, // 申请单编号 changeApplyName: row.changeApplyName, // 申请单名称 createUserId: row.createUserId, // 创建人id diff --git a/src/api/equipment/info/book.ts b/src/api/equipment/info/book.ts index 60cf0d2..295d4f9 100644 --- a/src/api/equipment/info/book.ts +++ b/src/api/equipment/info/book.ts @@ -9,7 +9,7 @@ return request({ url: `${prefix}/approval/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -18,7 +18,7 @@ return request({ url: `${prefix}/save`, method: 'post', - data + data, }) } @@ -27,7 +27,7 @@ return request({ url: `${prefix}/draftUpdate`, method: 'post', - data + data, }) } // 编辑 @@ -35,7 +35,7 @@ return request({ url: `${prefix}/failUpdate`, method: 'post', - data + data, }) } @@ -44,7 +44,7 @@ return request({ url: `${prefix}/detail`, method: 'post', - data + data, }) } @@ -59,7 +59,7 @@ return request({ url: `${prefix}/submit`, method: 'post', - data + data, }) } @@ -68,7 +68,7 @@ return request({ url: `${prefix}/draftDelete`, method: 'post', - data + data, }) } @@ -77,7 +77,7 @@ return request({ url: `${prefix}/approval/delete`, method: 'post', - data + data, }) } @@ -86,7 +86,7 @@ return request({ url: `${prefix}/circulationLog/listPage`, method: 'post', - data + data, }) } @@ -99,7 +99,7 @@ return request({ url: `${prefix}/status/log/list`, method: 'get', - params + params, }) } @@ -112,7 +112,7 @@ return request({ url: `${prefix}/approval/revoke`, method: 'post', - data + data, }) } @@ -125,7 +125,7 @@ return request({ url: `${prefix}/approval/refuse`, method: 'post', - data + data, }) } @@ -134,7 +134,7 @@ return request({ url: `${prefix}/remind`, method: 'post', - data + data, }) } @@ -143,11 +143,11 @@ return request({ url: `${prefix}/import`, method: 'post', - data + data, }) } -// 根据实验室代码和组别获取deptId +// 根据实验室代码和部门获取deptId export function getDeptIdByLabAndGroup(params: { labCode: string groupNo: string @@ -155,7 +155,7 @@ return request({ url: '/system/getDeptIdByLabAndGroup', method: 'get', - params + params, }) } @@ -164,7 +164,7 @@ return request({ url: `${path}?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -173,7 +173,7 @@ return request({ url: '/equipment/certificate/listPage', method: 'post', - data + data, }) } @@ -182,7 +182,7 @@ return request({ url: '/equipment/detail/maintain/listPage', method: 'post', - data + data, }) } @@ -191,7 +191,7 @@ return request({ url: '/equipment/detail/resume/listPage', method: 'post', - data + data, }) } @@ -200,7 +200,7 @@ return request({ url: '/equipment/hasChanged', method: 'post', - data + data, }) } @@ -210,7 +210,7 @@ url: '/equipment/exportFile', method: 'post', responseType: 'blob', - data + data, }) } @@ -220,6 +220,6 @@ url: '/equipment/exportExcelFile', method: 'post', responseType: 'blob', - data + data, }) } diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 5678997..ff2d6d5 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -10,7 +10,7 @@ return request({ url: `${prefix}mgr/list`, method: 'get', - params + params, }) } @@ -19,14 +19,14 @@ return request({ url: '/system/mgr/list', method: 'get', - params + params, }) } // 获取用户所在单位 export function getUserDept() { return request({ - url: '/system/company' + url: '/system/company', }) } @@ -43,7 +43,7 @@ return request({ url: `${prefix}mgr/delete`, method: 'post', - data + data, }) } @@ -52,7 +52,7 @@ return request({ url: `${prefix}mgr/freeze`, method: 'post', - data + data, }) } // 冻结用户 @@ -60,7 +60,7 @@ return request({ url: `${prefix}mgr/unfreeze`, method: 'post', - data + data, }) } @@ -69,7 +69,7 @@ return request({ url: 'sys/mgr/reset', method: 'post', - data + data, }) } @@ -80,17 +80,17 @@ method: 'post', data: { userId, - roleIds: ids - } + roleIds: ids, + }, // paramsSerializer: (params) => qs.stringify(params, { indices: false }) }) } -// 获取用户实验室代码和组别 +// 获取用户实验室代码和部门 export function getLabAndGroup(params: { deptId: string }) { return request({ url: '/system/labAndGroup', method: 'get', - params + params, }) } diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 102ce61..400bf48 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -34,11 +34,11 @@ isLogout: 0, // 是否被退出登录 bizLabCode: localStorage.bizLabCode || '', // 实验室 labCodeName: localStorage.labCodeName || '', // 实验室名称 - groupNo: localStorage.groupNo || '', // 组别 - groupName: localStorage.groupName || '' // 组别名称 + groupNo: localStorage.groupNo || '', // 部门 + groupName: localStorage.groupName || '', // 部门名称 }), getters: { - isLogin: state => { + isLogin: (state) => { let retn = false if (state.token) { retn = true @@ -46,17 +46,18 @@ return retn }, // 是否已获取用户信息 - hasUserInfo: state => { + hasUserInfo: (state) => { if (state.roleList && state.roleList.length > 0) { return true - } else { + } + else { return false } }, - getPublicKey: state => { + getPublicKey: (state) => { return state.publicKey }, - getPrivateKey: state => { + getPrivateKey: (state) => { return state.privateKey }, getMenus: (state): Menu.menu[] => { @@ -64,14 +65,14 @@ }, getBtns: (state): Menu.menu[] => { return state.btns - } + }, }, actions: { // 获取项目基础配置 getBaseConfig() { return new Promise((resolve, reject) => { getConfig() - .then(res => { + .then((res) => { this.publicKey = res.data.publicKey localStorage.setItem('publicKey', res.data.publicKey) // 保存私钥 @@ -80,7 +81,7 @@ this.isLogout = 0 resolve(res.data) }) - .catch(e => { + .catch((e) => { reject(e) }) }) @@ -94,21 +95,21 @@ }) { return new Promise((resolve, reject) => { doLogin(data) - .then(res => { + .then((res) => { localStorage.setItem('token', res.data.token) this.username = res.data.username this.token = res.data.token this.isLogout = 0 resolve() }) - .catch(error => { + .catch((error) => { reject(error) }) }) }, // 注销 logout() { - return new Promise(resolve => { + return new Promise((resolve) => { const routeStore = useRouteStore() const menuStore = useMenuStore() localStorage.removeItem('username') @@ -117,17 +118,17 @@ localStorage.removeItem('depId') localStorage.removeItem('bizLabCode') // 实验室 localStorage.removeItem('labCodeName') // 实验室 - localStorage.removeItem('groupNo') // 组别 - localStorage.removeItem('groupName') // 组别 + localStorage.removeItem('groupNo') // 部门 + localStorage.removeItem('groupName') // 部门 // localStorage.clear() this.username = '' this.token = '' this.roleList = [] this.roleNames = [] this.bizLabCode = '' // 实验室 - this.groupNo = '' // 组别 - this.labCodeName = '' // 组别 - this.groupName = '' // 组别 + this.groupNo = '' // 部门 + this.labCodeName = '' // 部门 + this.groupName = '' // 部门 routeStore.removeRoutes() menuStore.setActived(0) resolve() @@ -135,53 +136,54 @@ }, // 获取用户信息 getUserInfo() { - return new Promise(resolve => { + return new Promise((resolve) => { getInfo() - .then(res => { + .then((res) => { if (res.data.roleIds && res.data.roleIds.length > 0) { this.roleList = res.data.roleIds this.roleNames = res.data.roleNames this.roleTips = res.data.roleTips localStorage.setItem('nameId', res.data.id) localStorage.setItem('depId', res.data.deptId) - } else { + } + else { reject('该用户无角色') } if (res.data.deptId) { this.deptId = res.data.deptId this.deptName = res.data.deptName - // 获取本用户实验室代码、组别 - getLabAndGroup({ deptId: res.data.deptId }).then(res => { + // 获取本用户实验室代码、部门 + getLabAndGroup({ deptId: res.data.deptId }).then((res) => { this.bizLabCode = res.data.bizLabCode // 实验室 - this.groupNo = res.data.groupNo // 组别 + this.groupNo = res.data.groupNo // 部门 if (this.bizLabCode) { - getDictByCode('bizGroupCodeEquipment').then(response => { + getDictByCode('bizGroupCodeEquipment').then((response) => { const labCodeList = response.data const index = labCodeList.findIndex( (item: { value: string }) => - item.value === this.bizLabCode + item.value === this.bizLabCode, ) if (index !== -1) { this.labCodeName = labCodeList[index].name // 实验室 localStorage.setItem( 'labCodeName', - labCodeList[index].name + labCodeList[index].name, ) } }) } if (this.bizLabCode) { - getDictByCode('bizGroupCode').then(response => { + getDictByCode('bizGroupCode').then((response) => { const groupCodeList = response.data const index = groupCodeList.findIndex( - (item: { value: string }) => item.value === this.groupNo + (item: { value: string }) => item.value === this.groupNo, ) if (index !== -1) { this.groupName = groupCodeList[index].name localStorage.setItem( 'groupName', - groupCodeList[index].name + groupCodeList[index].name, ) } }) @@ -190,10 +192,11 @@ localStorage.setItem('bizLabCode', res.data.bizLabCode) }) // 基本信息-部门接口-查询部门类别 - getDeptList({ deptName: res.data.deptName }).then(response => { + getDeptList({ deptName: res.data.deptName }).then((response) => { this.deptType = response.data.list[0].deptType }) - } else { + } + else { reject('该用户无组织机构') } this.id = res.data.id @@ -210,13 +213,13 @@ getPermissions(currentSystem?: { name: string; code: string }) { const params = { resourceType: '', - parentCode: '' + parentCode: '', } if (currentSystem) { params.parentCode = currentSystem.code // 子系统code } - return new Promise(resolve => { - getUserMenus(params).then(response => { + return new Promise((resolve) => { + getUserMenus(params).then((response) => { const data = response.data const menus = [] // 仅菜单 const btns = [] // 非菜单 @@ -230,14 +233,14 @@ const menu_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } menus.push(menu_tmp) } const btn_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } btns.push(btn_tmp) } @@ -250,8 +253,8 @@ }, // 修改密码 editPassword(data: { oldPwd: string; newPwd: string }) { - return new Promise(resolve => { - changePwd(data).then(response => { + return new Promise((resolve) => { + changePwd(data).then((response) => { resolve(response) }) }) @@ -259,9 +262,9 @@ // 被退出登录 toLogout() { this.isLogout += 1 - } - } - } + }, + }, + }, ) export default useUserStore diff --git a/src/views/business/certManage/apply/apply-interface.ts b/src/views/business/certManage/apply/apply-interface.ts index 5595f43..1fdb9b7 100644 --- a/src/views/business/certManage/apply/apply-interface.ts +++ b/src/views/business/certManage/apply/apply-interface.ts @@ -31,7 +31,7 @@ // 表单 export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 changeApplyNo: string // 申请单编号 changeApplyName: string // 申请单名称 createUserId: string // 创建人id diff --git a/src/views/business/certManage/apply/components/basic.vue b/src/views/business/certManage/apply/components/basic.vue index 3be1fef..bf02448 100644 --- a/src/views/business/certManage/apply/components/basic.vue +++ b/src/views/business/certManage/apply/components/basic.vue @@ -32,7 +32,7 @@ const user = useUserStore() // 用户信息 const form = ref({ labCode: '', // 实验室 - groupCode: '', // 组别 + groupCode: '', // 部门 changeApplyNo: '', // 申请单编号 changeApplyName: '', // 申请单名称 createUserId: '', // 创建人id @@ -53,13 +53,13 @@ const rules = ref({ // 校验规则 labCode: [{ required: true, message: '实验室不能为空', trigger: ['blur', 'change'] }], - groupCode: [{ required: true, message: '组别不能为空', trigger: ['blur', 'change'] }], + groupCode: [{ required: true, message: '部门不能为空', trigger: ['blur', 'change'] }], changeReportNo: [{ required: true, message: '更换证书编号不能为空', trigger: ['change', 'blur'] }], changeType: [{ required: true, message: '变更类型不能为空', trigger: ['change', 'blur'] }], }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 const changeTypeList = ref([]) // 变更类型 function getDict() { @@ -67,7 +67,7 @@ getDictByCode('bizLabCode').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) @@ -192,7 +192,7 @@ onMounted(async () => { if (props.pageType === 'edit' || props.pageType === 'detail') { form.value.labCode = $route.query.labCode as any // 实验室 - form.value.groupCode = $route.query.groupCode as string // 组别 + form.value.groupCode = $route.query.groupCode as string // 部门 form.value.changeApplyNo = $route.query.changeApplyNo as string // 申请单编号 form.value.changeApplyName = $route.query.changeApplyName as string // 申请单名称 form.value.createUserId = $route.query.createUserId as string // 创建人id @@ -236,8 +236,8 @@ - - + + diff --git a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue index b8d9940..959501b 100644 --- a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue +++ b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue @@ -18,7 +18,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 @@ -123,7 +123,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/certManage/apply/list.vue b/src/views/business/certManage/apply/list.vue index 6829e97..fb5e6c3 100644 --- a/src/views/business/certManage/apply/list.vue +++ b/src/views/business/certManage/apply/list.vue @@ -211,7 +211,7 @@ processId: row.processId, // 流程实例id taskId: row.taskId, // 任务id labCode: row.labCode, // 实验室 - groupCode: row.groupCode, // 组别 + groupCode: row.groupCode, // 部门 changeApplyNo: row.changeApplyNo, // 申请单编号 changeApplyName: row.changeApplyName, // 申请单名称 createUserId: row.createUserId, // 创建人id diff --git a/src/views/business/certManage/cert/cert-interface.ts b/src/views/business/certManage/cert/cert-interface.ts index 19d8c65..9fc92d0 100644 --- a/src/views/business/certManage/cert/cert-interface.ts +++ b/src/views/business/certManage/cert/cert-interface.ts @@ -17,7 +17,7 @@ measureValidDateStart: string // 检定有效期开始 measureValidDateEnd: string // 检定有效期结束 labCode: string // 实验室(字典code) - groupCode: string // 组别(字典code) + groupCode: string // 部门(字典code) createUserName: string // 检定员 formId: string // 表单id printStatus: string // 打印状态(未打印传1,其他状态不传) diff --git a/src/api/equipment/info/book.ts b/src/api/equipment/info/book.ts index 60cf0d2..295d4f9 100644 --- a/src/api/equipment/info/book.ts +++ b/src/api/equipment/info/book.ts @@ -9,7 +9,7 @@ return request({ url: `${prefix}/approval/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -18,7 +18,7 @@ return request({ url: `${prefix}/save`, method: 'post', - data + data, }) } @@ -27,7 +27,7 @@ return request({ url: `${prefix}/draftUpdate`, method: 'post', - data + data, }) } // 编辑 @@ -35,7 +35,7 @@ return request({ url: `${prefix}/failUpdate`, method: 'post', - data + data, }) } @@ -44,7 +44,7 @@ return request({ url: `${prefix}/detail`, method: 'post', - data + data, }) } @@ -59,7 +59,7 @@ return request({ url: `${prefix}/submit`, method: 'post', - data + data, }) } @@ -68,7 +68,7 @@ return request({ url: `${prefix}/draftDelete`, method: 'post', - data + data, }) } @@ -77,7 +77,7 @@ return request({ url: `${prefix}/approval/delete`, method: 'post', - data + data, }) } @@ -86,7 +86,7 @@ return request({ url: `${prefix}/circulationLog/listPage`, method: 'post', - data + data, }) } @@ -99,7 +99,7 @@ return request({ url: `${prefix}/status/log/list`, method: 'get', - params + params, }) } @@ -112,7 +112,7 @@ return request({ url: `${prefix}/approval/revoke`, method: 'post', - data + data, }) } @@ -125,7 +125,7 @@ return request({ url: `${prefix}/approval/refuse`, method: 'post', - data + data, }) } @@ -134,7 +134,7 @@ return request({ url: `${prefix}/remind`, method: 'post', - data + data, }) } @@ -143,11 +143,11 @@ return request({ url: `${prefix}/import`, method: 'post', - data + data, }) } -// 根据实验室代码和组别获取deptId +// 根据实验室代码和部门获取deptId export function getDeptIdByLabAndGroup(params: { labCode: string groupNo: string @@ -155,7 +155,7 @@ return request({ url: '/system/getDeptIdByLabAndGroup', method: 'get', - params + params, }) } @@ -164,7 +164,7 @@ return request({ url: `${path}?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -173,7 +173,7 @@ return request({ url: '/equipment/certificate/listPage', method: 'post', - data + data, }) } @@ -182,7 +182,7 @@ return request({ url: '/equipment/detail/maintain/listPage', method: 'post', - data + data, }) } @@ -191,7 +191,7 @@ return request({ url: '/equipment/detail/resume/listPage', method: 'post', - data + data, }) } @@ -200,7 +200,7 @@ return request({ url: '/equipment/hasChanged', method: 'post', - data + data, }) } @@ -210,7 +210,7 @@ url: '/equipment/exportFile', method: 'post', responseType: 'blob', - data + data, }) } @@ -220,6 +220,6 @@ url: '/equipment/exportExcelFile', method: 'post', responseType: 'blob', - data + data, }) } diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 5678997..ff2d6d5 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -10,7 +10,7 @@ return request({ url: `${prefix}mgr/list`, method: 'get', - params + params, }) } @@ -19,14 +19,14 @@ return request({ url: '/system/mgr/list', method: 'get', - params + params, }) } // 获取用户所在单位 export function getUserDept() { return request({ - url: '/system/company' + url: '/system/company', }) } @@ -43,7 +43,7 @@ return request({ url: `${prefix}mgr/delete`, method: 'post', - data + data, }) } @@ -52,7 +52,7 @@ return request({ url: `${prefix}mgr/freeze`, method: 'post', - data + data, }) } // 冻结用户 @@ -60,7 +60,7 @@ return request({ url: `${prefix}mgr/unfreeze`, method: 'post', - data + data, }) } @@ -69,7 +69,7 @@ return request({ url: 'sys/mgr/reset', method: 'post', - data + data, }) } @@ -80,17 +80,17 @@ method: 'post', data: { userId, - roleIds: ids - } + roleIds: ids, + }, // paramsSerializer: (params) => qs.stringify(params, { indices: false }) }) } -// 获取用户实验室代码和组别 +// 获取用户实验室代码和部门 export function getLabAndGroup(params: { deptId: string }) { return request({ url: '/system/labAndGroup', method: 'get', - params + params, }) } diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 102ce61..400bf48 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -34,11 +34,11 @@ isLogout: 0, // 是否被退出登录 bizLabCode: localStorage.bizLabCode || '', // 实验室 labCodeName: localStorage.labCodeName || '', // 实验室名称 - groupNo: localStorage.groupNo || '', // 组别 - groupName: localStorage.groupName || '' // 组别名称 + groupNo: localStorage.groupNo || '', // 部门 + groupName: localStorage.groupName || '', // 部门名称 }), getters: { - isLogin: state => { + isLogin: (state) => { let retn = false if (state.token) { retn = true @@ -46,17 +46,18 @@ return retn }, // 是否已获取用户信息 - hasUserInfo: state => { + hasUserInfo: (state) => { if (state.roleList && state.roleList.length > 0) { return true - } else { + } + else { return false } }, - getPublicKey: state => { + getPublicKey: (state) => { return state.publicKey }, - getPrivateKey: state => { + getPrivateKey: (state) => { return state.privateKey }, getMenus: (state): Menu.menu[] => { @@ -64,14 +65,14 @@ }, getBtns: (state): Menu.menu[] => { return state.btns - } + }, }, actions: { // 获取项目基础配置 getBaseConfig() { return new Promise((resolve, reject) => { getConfig() - .then(res => { + .then((res) => { this.publicKey = res.data.publicKey localStorage.setItem('publicKey', res.data.publicKey) // 保存私钥 @@ -80,7 +81,7 @@ this.isLogout = 0 resolve(res.data) }) - .catch(e => { + .catch((e) => { reject(e) }) }) @@ -94,21 +95,21 @@ }) { return new Promise((resolve, reject) => { doLogin(data) - .then(res => { + .then((res) => { localStorage.setItem('token', res.data.token) this.username = res.data.username this.token = res.data.token this.isLogout = 0 resolve() }) - .catch(error => { + .catch((error) => { reject(error) }) }) }, // 注销 logout() { - return new Promise(resolve => { + return new Promise((resolve) => { const routeStore = useRouteStore() const menuStore = useMenuStore() localStorage.removeItem('username') @@ -117,17 +118,17 @@ localStorage.removeItem('depId') localStorage.removeItem('bizLabCode') // 实验室 localStorage.removeItem('labCodeName') // 实验室 - localStorage.removeItem('groupNo') // 组别 - localStorage.removeItem('groupName') // 组别 + localStorage.removeItem('groupNo') // 部门 + localStorage.removeItem('groupName') // 部门 // localStorage.clear() this.username = '' this.token = '' this.roleList = [] this.roleNames = [] this.bizLabCode = '' // 实验室 - this.groupNo = '' // 组别 - this.labCodeName = '' // 组别 - this.groupName = '' // 组别 + this.groupNo = '' // 部门 + this.labCodeName = '' // 部门 + this.groupName = '' // 部门 routeStore.removeRoutes() menuStore.setActived(0) resolve() @@ -135,53 +136,54 @@ }, // 获取用户信息 getUserInfo() { - return new Promise(resolve => { + return new Promise((resolve) => { getInfo() - .then(res => { + .then((res) => { if (res.data.roleIds && res.data.roleIds.length > 0) { this.roleList = res.data.roleIds this.roleNames = res.data.roleNames this.roleTips = res.data.roleTips localStorage.setItem('nameId', res.data.id) localStorage.setItem('depId', res.data.deptId) - } else { + } + else { reject('该用户无角色') } if (res.data.deptId) { this.deptId = res.data.deptId this.deptName = res.data.deptName - // 获取本用户实验室代码、组别 - getLabAndGroup({ deptId: res.data.deptId }).then(res => { + // 获取本用户实验室代码、部门 + getLabAndGroup({ deptId: res.data.deptId }).then((res) => { this.bizLabCode = res.data.bizLabCode // 实验室 - this.groupNo = res.data.groupNo // 组别 + this.groupNo = res.data.groupNo // 部门 if (this.bizLabCode) { - getDictByCode('bizGroupCodeEquipment').then(response => { + getDictByCode('bizGroupCodeEquipment').then((response) => { const labCodeList = response.data const index = labCodeList.findIndex( (item: { value: string }) => - item.value === this.bizLabCode + item.value === this.bizLabCode, ) if (index !== -1) { this.labCodeName = labCodeList[index].name // 实验室 localStorage.setItem( 'labCodeName', - labCodeList[index].name + labCodeList[index].name, ) } }) } if (this.bizLabCode) { - getDictByCode('bizGroupCode').then(response => { + getDictByCode('bizGroupCode').then((response) => { const groupCodeList = response.data const index = groupCodeList.findIndex( - (item: { value: string }) => item.value === this.groupNo + (item: { value: string }) => item.value === this.groupNo, ) if (index !== -1) { this.groupName = groupCodeList[index].name localStorage.setItem( 'groupName', - groupCodeList[index].name + groupCodeList[index].name, ) } }) @@ -190,10 +192,11 @@ localStorage.setItem('bizLabCode', res.data.bizLabCode) }) // 基本信息-部门接口-查询部门类别 - getDeptList({ deptName: res.data.deptName }).then(response => { + getDeptList({ deptName: res.data.deptName }).then((response) => { this.deptType = response.data.list[0].deptType }) - } else { + } + else { reject('该用户无组织机构') } this.id = res.data.id @@ -210,13 +213,13 @@ getPermissions(currentSystem?: { name: string; code: string }) { const params = { resourceType: '', - parentCode: '' + parentCode: '', } if (currentSystem) { params.parentCode = currentSystem.code // 子系统code } - return new Promise(resolve => { - getUserMenus(params).then(response => { + return new Promise((resolve) => { + getUserMenus(params).then((response) => { const data = response.data const menus = [] // 仅菜单 const btns = [] // 非菜单 @@ -230,14 +233,14 @@ const menu_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } menus.push(menu_tmp) } const btn_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } btns.push(btn_tmp) } @@ -250,8 +253,8 @@ }, // 修改密码 editPassword(data: { oldPwd: string; newPwd: string }) { - return new Promise(resolve => { - changePwd(data).then(response => { + return new Promise((resolve) => { + changePwd(data).then((response) => { resolve(response) }) }) @@ -259,9 +262,9 @@ // 被退出登录 toLogout() { this.isLogout += 1 - } - } - } + }, + }, + }, ) export default useUserStore diff --git a/src/views/business/certManage/apply/apply-interface.ts b/src/views/business/certManage/apply/apply-interface.ts index 5595f43..1fdb9b7 100644 --- a/src/views/business/certManage/apply/apply-interface.ts +++ b/src/views/business/certManage/apply/apply-interface.ts @@ -31,7 +31,7 @@ // 表单 export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 changeApplyNo: string // 申请单编号 changeApplyName: string // 申请单名称 createUserId: string // 创建人id diff --git a/src/views/business/certManage/apply/components/basic.vue b/src/views/business/certManage/apply/components/basic.vue index 3be1fef..bf02448 100644 --- a/src/views/business/certManage/apply/components/basic.vue +++ b/src/views/business/certManage/apply/components/basic.vue @@ -32,7 +32,7 @@ const user = useUserStore() // 用户信息 const form = ref({ labCode: '', // 实验室 - groupCode: '', // 组别 + groupCode: '', // 部门 changeApplyNo: '', // 申请单编号 changeApplyName: '', // 申请单名称 createUserId: '', // 创建人id @@ -53,13 +53,13 @@ const rules = ref({ // 校验规则 labCode: [{ required: true, message: '实验室不能为空', trigger: ['blur', 'change'] }], - groupCode: [{ required: true, message: '组别不能为空', trigger: ['blur', 'change'] }], + groupCode: [{ required: true, message: '部门不能为空', trigger: ['blur', 'change'] }], changeReportNo: [{ required: true, message: '更换证书编号不能为空', trigger: ['change', 'blur'] }], changeType: [{ required: true, message: '变更类型不能为空', trigger: ['change', 'blur'] }], }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 const changeTypeList = ref([]) // 变更类型 function getDict() { @@ -67,7 +67,7 @@ getDictByCode('bizLabCode').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) @@ -192,7 +192,7 @@ onMounted(async () => { if (props.pageType === 'edit' || props.pageType === 'detail') { form.value.labCode = $route.query.labCode as any // 实验室 - form.value.groupCode = $route.query.groupCode as string // 组别 + form.value.groupCode = $route.query.groupCode as string // 部门 form.value.changeApplyNo = $route.query.changeApplyNo as string // 申请单编号 form.value.changeApplyName = $route.query.changeApplyName as string // 申请单名称 form.value.createUserId = $route.query.createUserId as string // 创建人id @@ -236,8 +236,8 @@ - - + + diff --git a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue index b8d9940..959501b 100644 --- a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue +++ b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue @@ -18,7 +18,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 @@ -123,7 +123,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/certManage/apply/list.vue b/src/views/business/certManage/apply/list.vue index 6829e97..fb5e6c3 100644 --- a/src/views/business/certManage/apply/list.vue +++ b/src/views/business/certManage/apply/list.vue @@ -211,7 +211,7 @@ processId: row.processId, // 流程实例id taskId: row.taskId, // 任务id labCode: row.labCode, // 实验室 - groupCode: row.groupCode, // 组别 + groupCode: row.groupCode, // 部门 changeApplyNo: row.changeApplyNo, // 申请单编号 changeApplyName: row.changeApplyName, // 申请单名称 createUserId: row.createUserId, // 创建人id diff --git a/src/views/business/certManage/cert/cert-interface.ts b/src/views/business/certManage/cert/cert-interface.ts index 19d8c65..9fc92d0 100644 --- a/src/views/business/certManage/cert/cert-interface.ts +++ b/src/views/business/certManage/cert/cert-interface.ts @@ -17,7 +17,7 @@ measureValidDateStart: string // 检定有效期开始 measureValidDateEnd: string // 检定有效期结束 labCode: string // 实验室(字典code) - groupCode: string // 组别(字典code) + groupCode: string // 部门(字典code) createUserName: string // 检定员 formId: string // 表单id printStatus: string // 打印状态(未打印传1,其他状态不传) diff --git a/src/views/business/certManage/cert/list.vue b/src/views/business/certManage/cert/list.vue index 3daaec1..f21f74d 100644 --- a/src/views/business/certManage/cert/list.vue +++ b/src/views/business/certManage/cert/list.vue @@ -45,7 +45,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -197,7 +197,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -282,7 +282,7 @@ measureValidDateStart: listQuery.value.measureValidDateStart, // 检定有效期开始 measureValidDateEnd: listQuery.value.measureValidDateEnd, // 检定有效期结束 labCode: listQuery.value.labCode, // 实验室(字典code) - groupCode: listQuery.value.groupCode, // 组别(字典code) + groupCode: listQuery.value.groupCode, // 部门(字典code) createUserName: listQuery.value.createUserName, // 检定员 formId: listQuery.value.formId, // 表单id printStatus: listQuery.value.printStatus, // 打印状态(未打印传1,其他状态不传) diff --git a/src/api/equipment/info/book.ts b/src/api/equipment/info/book.ts index 60cf0d2..295d4f9 100644 --- a/src/api/equipment/info/book.ts +++ b/src/api/equipment/info/book.ts @@ -9,7 +9,7 @@ return request({ url: `${prefix}/approval/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -18,7 +18,7 @@ return request({ url: `${prefix}/save`, method: 'post', - data + data, }) } @@ -27,7 +27,7 @@ return request({ url: `${prefix}/draftUpdate`, method: 'post', - data + data, }) } // 编辑 @@ -35,7 +35,7 @@ return request({ url: `${prefix}/failUpdate`, method: 'post', - data + data, }) } @@ -44,7 +44,7 @@ return request({ url: `${prefix}/detail`, method: 'post', - data + data, }) } @@ -59,7 +59,7 @@ return request({ url: `${prefix}/submit`, method: 'post', - data + data, }) } @@ -68,7 +68,7 @@ return request({ url: `${prefix}/draftDelete`, method: 'post', - data + data, }) } @@ -77,7 +77,7 @@ return request({ url: `${prefix}/approval/delete`, method: 'post', - data + data, }) } @@ -86,7 +86,7 @@ return request({ url: `${prefix}/circulationLog/listPage`, method: 'post', - data + data, }) } @@ -99,7 +99,7 @@ return request({ url: `${prefix}/status/log/list`, method: 'get', - params + params, }) } @@ -112,7 +112,7 @@ return request({ url: `${prefix}/approval/revoke`, method: 'post', - data + data, }) } @@ -125,7 +125,7 @@ return request({ url: `${prefix}/approval/refuse`, method: 'post', - data + data, }) } @@ -134,7 +134,7 @@ return request({ url: `${prefix}/remind`, method: 'post', - data + data, }) } @@ -143,11 +143,11 @@ return request({ url: `${prefix}/import`, method: 'post', - data + data, }) } -// 根据实验室代码和组别获取deptId +// 根据实验室代码和部门获取deptId export function getDeptIdByLabAndGroup(params: { labCode: string groupNo: string @@ -155,7 +155,7 @@ return request({ url: '/system/getDeptIdByLabAndGroup', method: 'get', - params + params, }) } @@ -164,7 +164,7 @@ return request({ url: `${path}?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -173,7 +173,7 @@ return request({ url: '/equipment/certificate/listPage', method: 'post', - data + data, }) } @@ -182,7 +182,7 @@ return request({ url: '/equipment/detail/maintain/listPage', method: 'post', - data + data, }) } @@ -191,7 +191,7 @@ return request({ url: '/equipment/detail/resume/listPage', method: 'post', - data + data, }) } @@ -200,7 +200,7 @@ return request({ url: '/equipment/hasChanged', method: 'post', - data + data, }) } @@ -210,7 +210,7 @@ url: '/equipment/exportFile', method: 'post', responseType: 'blob', - data + data, }) } @@ -220,6 +220,6 @@ url: '/equipment/exportExcelFile', method: 'post', responseType: 'blob', - data + data, }) } diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 5678997..ff2d6d5 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -10,7 +10,7 @@ return request({ url: `${prefix}mgr/list`, method: 'get', - params + params, }) } @@ -19,14 +19,14 @@ return request({ url: '/system/mgr/list', method: 'get', - params + params, }) } // 获取用户所在单位 export function getUserDept() { return request({ - url: '/system/company' + url: '/system/company', }) } @@ -43,7 +43,7 @@ return request({ url: `${prefix}mgr/delete`, method: 'post', - data + data, }) } @@ -52,7 +52,7 @@ return request({ url: `${prefix}mgr/freeze`, method: 'post', - data + data, }) } // 冻结用户 @@ -60,7 +60,7 @@ return request({ url: `${prefix}mgr/unfreeze`, method: 'post', - data + data, }) } @@ -69,7 +69,7 @@ return request({ url: 'sys/mgr/reset', method: 'post', - data + data, }) } @@ -80,17 +80,17 @@ method: 'post', data: { userId, - roleIds: ids - } + roleIds: ids, + }, // paramsSerializer: (params) => qs.stringify(params, { indices: false }) }) } -// 获取用户实验室代码和组别 +// 获取用户实验室代码和部门 export function getLabAndGroup(params: { deptId: string }) { return request({ url: '/system/labAndGroup', method: 'get', - params + params, }) } diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 102ce61..400bf48 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -34,11 +34,11 @@ isLogout: 0, // 是否被退出登录 bizLabCode: localStorage.bizLabCode || '', // 实验室 labCodeName: localStorage.labCodeName || '', // 实验室名称 - groupNo: localStorage.groupNo || '', // 组别 - groupName: localStorage.groupName || '' // 组别名称 + groupNo: localStorage.groupNo || '', // 部门 + groupName: localStorage.groupName || '', // 部门名称 }), getters: { - isLogin: state => { + isLogin: (state) => { let retn = false if (state.token) { retn = true @@ -46,17 +46,18 @@ return retn }, // 是否已获取用户信息 - hasUserInfo: state => { + hasUserInfo: (state) => { if (state.roleList && state.roleList.length > 0) { return true - } else { + } + else { return false } }, - getPublicKey: state => { + getPublicKey: (state) => { return state.publicKey }, - getPrivateKey: state => { + getPrivateKey: (state) => { return state.privateKey }, getMenus: (state): Menu.menu[] => { @@ -64,14 +65,14 @@ }, getBtns: (state): Menu.menu[] => { return state.btns - } + }, }, actions: { // 获取项目基础配置 getBaseConfig() { return new Promise((resolve, reject) => { getConfig() - .then(res => { + .then((res) => { this.publicKey = res.data.publicKey localStorage.setItem('publicKey', res.data.publicKey) // 保存私钥 @@ -80,7 +81,7 @@ this.isLogout = 0 resolve(res.data) }) - .catch(e => { + .catch((e) => { reject(e) }) }) @@ -94,21 +95,21 @@ }) { return new Promise((resolve, reject) => { doLogin(data) - .then(res => { + .then((res) => { localStorage.setItem('token', res.data.token) this.username = res.data.username this.token = res.data.token this.isLogout = 0 resolve() }) - .catch(error => { + .catch((error) => { reject(error) }) }) }, // 注销 logout() { - return new Promise(resolve => { + return new Promise((resolve) => { const routeStore = useRouteStore() const menuStore = useMenuStore() localStorage.removeItem('username') @@ -117,17 +118,17 @@ localStorage.removeItem('depId') localStorage.removeItem('bizLabCode') // 实验室 localStorage.removeItem('labCodeName') // 实验室 - localStorage.removeItem('groupNo') // 组别 - localStorage.removeItem('groupName') // 组别 + localStorage.removeItem('groupNo') // 部门 + localStorage.removeItem('groupName') // 部门 // localStorage.clear() this.username = '' this.token = '' this.roleList = [] this.roleNames = [] this.bizLabCode = '' // 实验室 - this.groupNo = '' // 组别 - this.labCodeName = '' // 组别 - this.groupName = '' // 组别 + this.groupNo = '' // 部门 + this.labCodeName = '' // 部门 + this.groupName = '' // 部门 routeStore.removeRoutes() menuStore.setActived(0) resolve() @@ -135,53 +136,54 @@ }, // 获取用户信息 getUserInfo() { - return new Promise(resolve => { + return new Promise((resolve) => { getInfo() - .then(res => { + .then((res) => { if (res.data.roleIds && res.data.roleIds.length > 0) { this.roleList = res.data.roleIds this.roleNames = res.data.roleNames this.roleTips = res.data.roleTips localStorage.setItem('nameId', res.data.id) localStorage.setItem('depId', res.data.deptId) - } else { + } + else { reject('该用户无角色') } if (res.data.deptId) { this.deptId = res.data.deptId this.deptName = res.data.deptName - // 获取本用户实验室代码、组别 - getLabAndGroup({ deptId: res.data.deptId }).then(res => { + // 获取本用户实验室代码、部门 + getLabAndGroup({ deptId: res.data.deptId }).then((res) => { this.bizLabCode = res.data.bizLabCode // 实验室 - this.groupNo = res.data.groupNo // 组别 + this.groupNo = res.data.groupNo // 部门 if (this.bizLabCode) { - getDictByCode('bizGroupCodeEquipment').then(response => { + getDictByCode('bizGroupCodeEquipment').then((response) => { const labCodeList = response.data const index = labCodeList.findIndex( (item: { value: string }) => - item.value === this.bizLabCode + item.value === this.bizLabCode, ) if (index !== -1) { this.labCodeName = labCodeList[index].name // 实验室 localStorage.setItem( 'labCodeName', - labCodeList[index].name + labCodeList[index].name, ) } }) } if (this.bizLabCode) { - getDictByCode('bizGroupCode').then(response => { + getDictByCode('bizGroupCode').then((response) => { const groupCodeList = response.data const index = groupCodeList.findIndex( - (item: { value: string }) => item.value === this.groupNo + (item: { value: string }) => item.value === this.groupNo, ) if (index !== -1) { this.groupName = groupCodeList[index].name localStorage.setItem( 'groupName', - groupCodeList[index].name + groupCodeList[index].name, ) } }) @@ -190,10 +192,11 @@ localStorage.setItem('bizLabCode', res.data.bizLabCode) }) // 基本信息-部门接口-查询部门类别 - getDeptList({ deptName: res.data.deptName }).then(response => { + getDeptList({ deptName: res.data.deptName }).then((response) => { this.deptType = response.data.list[0].deptType }) - } else { + } + else { reject('该用户无组织机构') } this.id = res.data.id @@ -210,13 +213,13 @@ getPermissions(currentSystem?: { name: string; code: string }) { const params = { resourceType: '', - parentCode: '' + parentCode: '', } if (currentSystem) { params.parentCode = currentSystem.code // 子系统code } - return new Promise(resolve => { - getUserMenus(params).then(response => { + return new Promise((resolve) => { + getUserMenus(params).then((response) => { const data = response.data const menus = [] // 仅菜单 const btns = [] // 非菜单 @@ -230,14 +233,14 @@ const menu_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } menus.push(menu_tmp) } const btn_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } btns.push(btn_tmp) } @@ -250,8 +253,8 @@ }, // 修改密码 editPassword(data: { oldPwd: string; newPwd: string }) { - return new Promise(resolve => { - changePwd(data).then(response => { + return new Promise((resolve) => { + changePwd(data).then((response) => { resolve(response) }) }) @@ -259,9 +262,9 @@ // 被退出登录 toLogout() { this.isLogout += 1 - } - } - } + }, + }, + }, ) export default useUserStore diff --git a/src/views/business/certManage/apply/apply-interface.ts b/src/views/business/certManage/apply/apply-interface.ts index 5595f43..1fdb9b7 100644 --- a/src/views/business/certManage/apply/apply-interface.ts +++ b/src/views/business/certManage/apply/apply-interface.ts @@ -31,7 +31,7 @@ // 表单 export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 changeApplyNo: string // 申请单编号 changeApplyName: string // 申请单名称 createUserId: string // 创建人id diff --git a/src/views/business/certManage/apply/components/basic.vue b/src/views/business/certManage/apply/components/basic.vue index 3be1fef..bf02448 100644 --- a/src/views/business/certManage/apply/components/basic.vue +++ b/src/views/business/certManage/apply/components/basic.vue @@ -32,7 +32,7 @@ const user = useUserStore() // 用户信息 const form = ref({ labCode: '', // 实验室 - groupCode: '', // 组别 + groupCode: '', // 部门 changeApplyNo: '', // 申请单编号 changeApplyName: '', // 申请单名称 createUserId: '', // 创建人id @@ -53,13 +53,13 @@ const rules = ref({ // 校验规则 labCode: [{ required: true, message: '实验室不能为空', trigger: ['blur', 'change'] }], - groupCode: [{ required: true, message: '组别不能为空', trigger: ['blur', 'change'] }], + groupCode: [{ required: true, message: '部门不能为空', trigger: ['blur', 'change'] }], changeReportNo: [{ required: true, message: '更换证书编号不能为空', trigger: ['change', 'blur'] }], changeType: [{ required: true, message: '变更类型不能为空', trigger: ['change', 'blur'] }], }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 const changeTypeList = ref([]) // 变更类型 function getDict() { @@ -67,7 +67,7 @@ getDictByCode('bizLabCode').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) @@ -192,7 +192,7 @@ onMounted(async () => { if (props.pageType === 'edit' || props.pageType === 'detail') { form.value.labCode = $route.query.labCode as any // 实验室 - form.value.groupCode = $route.query.groupCode as string // 组别 + form.value.groupCode = $route.query.groupCode as string // 部门 form.value.changeApplyNo = $route.query.changeApplyNo as string // 申请单编号 form.value.changeApplyName = $route.query.changeApplyName as string // 申请单名称 form.value.createUserId = $route.query.createUserId as string // 创建人id @@ -236,8 +236,8 @@ - - + + diff --git a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue index b8d9940..959501b 100644 --- a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue +++ b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue @@ -18,7 +18,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 @@ -123,7 +123,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/certManage/apply/list.vue b/src/views/business/certManage/apply/list.vue index 6829e97..fb5e6c3 100644 --- a/src/views/business/certManage/apply/list.vue +++ b/src/views/business/certManage/apply/list.vue @@ -211,7 +211,7 @@ processId: row.processId, // 流程实例id taskId: row.taskId, // 任务id labCode: row.labCode, // 实验室 - groupCode: row.groupCode, // 组别 + groupCode: row.groupCode, // 部门 changeApplyNo: row.changeApplyNo, // 申请单编号 changeApplyName: row.changeApplyName, // 申请单名称 createUserId: row.createUserId, // 创建人id diff --git a/src/views/business/certManage/cert/cert-interface.ts b/src/views/business/certManage/cert/cert-interface.ts index 19d8c65..9fc92d0 100644 --- a/src/views/business/certManage/cert/cert-interface.ts +++ b/src/views/business/certManage/cert/cert-interface.ts @@ -17,7 +17,7 @@ measureValidDateStart: string // 检定有效期开始 measureValidDateEnd: string // 检定有效期结束 labCode: string // 实验室(字典code) - groupCode: string // 组别(字典code) + groupCode: string // 部门(字典code) createUserName: string // 检定员 formId: string // 表单id printStatus: string // 打印状态(未打印传1,其他状态不传) diff --git a/src/views/business/certManage/cert/list.vue b/src/views/business/certManage/cert/list.vue index 3daaec1..f21f74d 100644 --- a/src/views/business/certManage/cert/list.vue +++ b/src/views/business/certManage/cert/list.vue @@ -45,7 +45,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -197,7 +197,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -282,7 +282,7 @@ measureValidDateStart: listQuery.value.measureValidDateStart, // 检定有效期开始 measureValidDateEnd: listQuery.value.measureValidDateEnd, // 检定有效期结束 labCode: listQuery.value.labCode, // 实验室(字典code) - groupCode: listQuery.value.groupCode, // 组别(字典code) + groupCode: listQuery.value.groupCode, // 部门(字典code) createUserName: listQuery.value.createUserName, // 检定员 formId: listQuery.value.formId, // 表单id printStatus: listQuery.value.printStatus, // 打印状态(未打印传1,其他状态不传) diff --git a/src/views/business/certManage/supplement/components/basic.vue b/src/views/business/certManage/supplement/components/basic.vue index 61921e2..d5ec033 100644 --- a/src/views/business/certManage/supplement/components/basic.vue +++ b/src/views/business/certManage/supplement/components/basic.vue @@ -76,7 +76,7 @@ }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 function getDict() { // 实验室 @@ -118,7 +118,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -144,7 +144,7 @@ certificateName: '', // 证书名称 certificateNo: changeReportNo, // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/api/equipment/info/book.ts b/src/api/equipment/info/book.ts index 60cf0d2..295d4f9 100644 --- a/src/api/equipment/info/book.ts +++ b/src/api/equipment/info/book.ts @@ -9,7 +9,7 @@ return request({ url: `${prefix}/approval/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -18,7 +18,7 @@ return request({ url: `${prefix}/save`, method: 'post', - data + data, }) } @@ -27,7 +27,7 @@ return request({ url: `${prefix}/draftUpdate`, method: 'post', - data + data, }) } // 编辑 @@ -35,7 +35,7 @@ return request({ url: `${prefix}/failUpdate`, method: 'post', - data + data, }) } @@ -44,7 +44,7 @@ return request({ url: `${prefix}/detail`, method: 'post', - data + data, }) } @@ -59,7 +59,7 @@ return request({ url: `${prefix}/submit`, method: 'post', - data + data, }) } @@ -68,7 +68,7 @@ return request({ url: `${prefix}/draftDelete`, method: 'post', - data + data, }) } @@ -77,7 +77,7 @@ return request({ url: `${prefix}/approval/delete`, method: 'post', - data + data, }) } @@ -86,7 +86,7 @@ return request({ url: `${prefix}/circulationLog/listPage`, method: 'post', - data + data, }) } @@ -99,7 +99,7 @@ return request({ url: `${prefix}/status/log/list`, method: 'get', - params + params, }) } @@ -112,7 +112,7 @@ return request({ url: `${prefix}/approval/revoke`, method: 'post', - data + data, }) } @@ -125,7 +125,7 @@ return request({ url: `${prefix}/approval/refuse`, method: 'post', - data + data, }) } @@ -134,7 +134,7 @@ return request({ url: `${prefix}/remind`, method: 'post', - data + data, }) } @@ -143,11 +143,11 @@ return request({ url: `${prefix}/import`, method: 'post', - data + data, }) } -// 根据实验室代码和组别获取deptId +// 根据实验室代码和部门获取deptId export function getDeptIdByLabAndGroup(params: { labCode: string groupNo: string @@ -155,7 +155,7 @@ return request({ url: '/system/getDeptIdByLabAndGroup', method: 'get', - params + params, }) } @@ -164,7 +164,7 @@ return request({ url: `${path}?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -173,7 +173,7 @@ return request({ url: '/equipment/certificate/listPage', method: 'post', - data + data, }) } @@ -182,7 +182,7 @@ return request({ url: '/equipment/detail/maintain/listPage', method: 'post', - data + data, }) } @@ -191,7 +191,7 @@ return request({ url: '/equipment/detail/resume/listPage', method: 'post', - data + data, }) } @@ -200,7 +200,7 @@ return request({ url: '/equipment/hasChanged', method: 'post', - data + data, }) } @@ -210,7 +210,7 @@ url: '/equipment/exportFile', method: 'post', responseType: 'blob', - data + data, }) } @@ -220,6 +220,6 @@ url: '/equipment/exportExcelFile', method: 'post', responseType: 'blob', - data + data, }) } diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 5678997..ff2d6d5 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -10,7 +10,7 @@ return request({ url: `${prefix}mgr/list`, method: 'get', - params + params, }) } @@ -19,14 +19,14 @@ return request({ url: '/system/mgr/list', method: 'get', - params + params, }) } // 获取用户所在单位 export function getUserDept() { return request({ - url: '/system/company' + url: '/system/company', }) } @@ -43,7 +43,7 @@ return request({ url: `${prefix}mgr/delete`, method: 'post', - data + data, }) } @@ -52,7 +52,7 @@ return request({ url: `${prefix}mgr/freeze`, method: 'post', - data + data, }) } // 冻结用户 @@ -60,7 +60,7 @@ return request({ url: `${prefix}mgr/unfreeze`, method: 'post', - data + data, }) } @@ -69,7 +69,7 @@ return request({ url: 'sys/mgr/reset', method: 'post', - data + data, }) } @@ -80,17 +80,17 @@ method: 'post', data: { userId, - roleIds: ids - } + roleIds: ids, + }, // paramsSerializer: (params) => qs.stringify(params, { indices: false }) }) } -// 获取用户实验室代码和组别 +// 获取用户实验室代码和部门 export function getLabAndGroup(params: { deptId: string }) { return request({ url: '/system/labAndGroup', method: 'get', - params + params, }) } diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 102ce61..400bf48 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -34,11 +34,11 @@ isLogout: 0, // 是否被退出登录 bizLabCode: localStorage.bizLabCode || '', // 实验室 labCodeName: localStorage.labCodeName || '', // 实验室名称 - groupNo: localStorage.groupNo || '', // 组别 - groupName: localStorage.groupName || '' // 组别名称 + groupNo: localStorage.groupNo || '', // 部门 + groupName: localStorage.groupName || '', // 部门名称 }), getters: { - isLogin: state => { + isLogin: (state) => { let retn = false if (state.token) { retn = true @@ -46,17 +46,18 @@ return retn }, // 是否已获取用户信息 - hasUserInfo: state => { + hasUserInfo: (state) => { if (state.roleList && state.roleList.length > 0) { return true - } else { + } + else { return false } }, - getPublicKey: state => { + getPublicKey: (state) => { return state.publicKey }, - getPrivateKey: state => { + getPrivateKey: (state) => { return state.privateKey }, getMenus: (state): Menu.menu[] => { @@ -64,14 +65,14 @@ }, getBtns: (state): Menu.menu[] => { return state.btns - } + }, }, actions: { // 获取项目基础配置 getBaseConfig() { return new Promise((resolve, reject) => { getConfig() - .then(res => { + .then((res) => { this.publicKey = res.data.publicKey localStorage.setItem('publicKey', res.data.publicKey) // 保存私钥 @@ -80,7 +81,7 @@ this.isLogout = 0 resolve(res.data) }) - .catch(e => { + .catch((e) => { reject(e) }) }) @@ -94,21 +95,21 @@ }) { return new Promise((resolve, reject) => { doLogin(data) - .then(res => { + .then((res) => { localStorage.setItem('token', res.data.token) this.username = res.data.username this.token = res.data.token this.isLogout = 0 resolve() }) - .catch(error => { + .catch((error) => { reject(error) }) }) }, // 注销 logout() { - return new Promise(resolve => { + return new Promise((resolve) => { const routeStore = useRouteStore() const menuStore = useMenuStore() localStorage.removeItem('username') @@ -117,17 +118,17 @@ localStorage.removeItem('depId') localStorage.removeItem('bizLabCode') // 实验室 localStorage.removeItem('labCodeName') // 实验室 - localStorage.removeItem('groupNo') // 组别 - localStorage.removeItem('groupName') // 组别 + localStorage.removeItem('groupNo') // 部门 + localStorage.removeItem('groupName') // 部门 // localStorage.clear() this.username = '' this.token = '' this.roleList = [] this.roleNames = [] this.bizLabCode = '' // 实验室 - this.groupNo = '' // 组别 - this.labCodeName = '' // 组别 - this.groupName = '' // 组别 + this.groupNo = '' // 部门 + this.labCodeName = '' // 部门 + this.groupName = '' // 部门 routeStore.removeRoutes() menuStore.setActived(0) resolve() @@ -135,53 +136,54 @@ }, // 获取用户信息 getUserInfo() { - return new Promise(resolve => { + return new Promise((resolve) => { getInfo() - .then(res => { + .then((res) => { if (res.data.roleIds && res.data.roleIds.length > 0) { this.roleList = res.data.roleIds this.roleNames = res.data.roleNames this.roleTips = res.data.roleTips localStorage.setItem('nameId', res.data.id) localStorage.setItem('depId', res.data.deptId) - } else { + } + else { reject('该用户无角色') } if (res.data.deptId) { this.deptId = res.data.deptId this.deptName = res.data.deptName - // 获取本用户实验室代码、组别 - getLabAndGroup({ deptId: res.data.deptId }).then(res => { + // 获取本用户实验室代码、部门 + getLabAndGroup({ deptId: res.data.deptId }).then((res) => { this.bizLabCode = res.data.bizLabCode // 实验室 - this.groupNo = res.data.groupNo // 组别 + this.groupNo = res.data.groupNo // 部门 if (this.bizLabCode) { - getDictByCode('bizGroupCodeEquipment').then(response => { + getDictByCode('bizGroupCodeEquipment').then((response) => { const labCodeList = response.data const index = labCodeList.findIndex( (item: { value: string }) => - item.value === this.bizLabCode + item.value === this.bizLabCode, ) if (index !== -1) { this.labCodeName = labCodeList[index].name // 实验室 localStorage.setItem( 'labCodeName', - labCodeList[index].name + labCodeList[index].name, ) } }) } if (this.bizLabCode) { - getDictByCode('bizGroupCode').then(response => { + getDictByCode('bizGroupCode').then((response) => { const groupCodeList = response.data const index = groupCodeList.findIndex( - (item: { value: string }) => item.value === this.groupNo + (item: { value: string }) => item.value === this.groupNo, ) if (index !== -1) { this.groupName = groupCodeList[index].name localStorage.setItem( 'groupName', - groupCodeList[index].name + groupCodeList[index].name, ) } }) @@ -190,10 +192,11 @@ localStorage.setItem('bizLabCode', res.data.bizLabCode) }) // 基本信息-部门接口-查询部门类别 - getDeptList({ deptName: res.data.deptName }).then(response => { + getDeptList({ deptName: res.data.deptName }).then((response) => { this.deptType = response.data.list[0].deptType }) - } else { + } + else { reject('该用户无组织机构') } this.id = res.data.id @@ -210,13 +213,13 @@ getPermissions(currentSystem?: { name: string; code: string }) { const params = { resourceType: '', - parentCode: '' + parentCode: '', } if (currentSystem) { params.parentCode = currentSystem.code // 子系统code } - return new Promise(resolve => { - getUserMenus(params).then(response => { + return new Promise((resolve) => { + getUserMenus(params).then((response) => { const data = response.data const menus = [] // 仅菜单 const btns = [] // 非菜单 @@ -230,14 +233,14 @@ const menu_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } menus.push(menu_tmp) } const btn_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } btns.push(btn_tmp) } @@ -250,8 +253,8 @@ }, // 修改密码 editPassword(data: { oldPwd: string; newPwd: string }) { - return new Promise(resolve => { - changePwd(data).then(response => { + return new Promise((resolve) => { + changePwd(data).then((response) => { resolve(response) }) }) @@ -259,9 +262,9 @@ // 被退出登录 toLogout() { this.isLogout += 1 - } - } - } + }, + }, + }, ) export default useUserStore diff --git a/src/views/business/certManage/apply/apply-interface.ts b/src/views/business/certManage/apply/apply-interface.ts index 5595f43..1fdb9b7 100644 --- a/src/views/business/certManage/apply/apply-interface.ts +++ b/src/views/business/certManage/apply/apply-interface.ts @@ -31,7 +31,7 @@ // 表单 export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 changeApplyNo: string // 申请单编号 changeApplyName: string // 申请单名称 createUserId: string // 创建人id diff --git a/src/views/business/certManage/apply/components/basic.vue b/src/views/business/certManage/apply/components/basic.vue index 3be1fef..bf02448 100644 --- a/src/views/business/certManage/apply/components/basic.vue +++ b/src/views/business/certManage/apply/components/basic.vue @@ -32,7 +32,7 @@ const user = useUserStore() // 用户信息 const form = ref({ labCode: '', // 实验室 - groupCode: '', // 组别 + groupCode: '', // 部门 changeApplyNo: '', // 申请单编号 changeApplyName: '', // 申请单名称 createUserId: '', // 创建人id @@ -53,13 +53,13 @@ const rules = ref({ // 校验规则 labCode: [{ required: true, message: '实验室不能为空', trigger: ['blur', 'change'] }], - groupCode: [{ required: true, message: '组别不能为空', trigger: ['blur', 'change'] }], + groupCode: [{ required: true, message: '部门不能为空', trigger: ['blur', 'change'] }], changeReportNo: [{ required: true, message: '更换证书编号不能为空', trigger: ['change', 'blur'] }], changeType: [{ required: true, message: '变更类型不能为空', trigger: ['change', 'blur'] }], }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 const changeTypeList = ref([]) // 变更类型 function getDict() { @@ -67,7 +67,7 @@ getDictByCode('bizLabCode').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) @@ -192,7 +192,7 @@ onMounted(async () => { if (props.pageType === 'edit' || props.pageType === 'detail') { form.value.labCode = $route.query.labCode as any // 实验室 - form.value.groupCode = $route.query.groupCode as string // 组别 + form.value.groupCode = $route.query.groupCode as string // 部门 form.value.changeApplyNo = $route.query.changeApplyNo as string // 申请单编号 form.value.changeApplyName = $route.query.changeApplyName as string // 申请单名称 form.value.createUserId = $route.query.createUserId as string // 创建人id @@ -236,8 +236,8 @@ - - + + diff --git a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue index b8d9940..959501b 100644 --- a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue +++ b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue @@ -18,7 +18,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 @@ -123,7 +123,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/certManage/apply/list.vue b/src/views/business/certManage/apply/list.vue index 6829e97..fb5e6c3 100644 --- a/src/views/business/certManage/apply/list.vue +++ b/src/views/business/certManage/apply/list.vue @@ -211,7 +211,7 @@ processId: row.processId, // 流程实例id taskId: row.taskId, // 任务id labCode: row.labCode, // 实验室 - groupCode: row.groupCode, // 组别 + groupCode: row.groupCode, // 部门 changeApplyNo: row.changeApplyNo, // 申请单编号 changeApplyName: row.changeApplyName, // 申请单名称 createUserId: row.createUserId, // 创建人id diff --git a/src/views/business/certManage/cert/cert-interface.ts b/src/views/business/certManage/cert/cert-interface.ts index 19d8c65..9fc92d0 100644 --- a/src/views/business/certManage/cert/cert-interface.ts +++ b/src/views/business/certManage/cert/cert-interface.ts @@ -17,7 +17,7 @@ measureValidDateStart: string // 检定有效期开始 measureValidDateEnd: string // 检定有效期结束 labCode: string // 实验室(字典code) - groupCode: string // 组别(字典code) + groupCode: string // 部门(字典code) createUserName: string // 检定员 formId: string // 表单id printStatus: string // 打印状态(未打印传1,其他状态不传) diff --git a/src/views/business/certManage/cert/list.vue b/src/views/business/certManage/cert/list.vue index 3daaec1..f21f74d 100644 --- a/src/views/business/certManage/cert/list.vue +++ b/src/views/business/certManage/cert/list.vue @@ -45,7 +45,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -197,7 +197,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -282,7 +282,7 @@ measureValidDateStart: listQuery.value.measureValidDateStart, // 检定有效期开始 measureValidDateEnd: listQuery.value.measureValidDateEnd, // 检定有效期结束 labCode: listQuery.value.labCode, // 实验室(字典code) - groupCode: listQuery.value.groupCode, // 组别(字典code) + groupCode: listQuery.value.groupCode, // 部门(字典code) createUserName: listQuery.value.createUserName, // 检定员 formId: listQuery.value.formId, // 表单id printStatus: listQuery.value.printStatus, // 打印状态(未打印传1,其他状态不传) diff --git a/src/views/business/certManage/supplement/components/basic.vue b/src/views/business/certManage/supplement/components/basic.vue index 61921e2..d5ec033 100644 --- a/src/views/business/certManage/supplement/components/basic.vue +++ b/src/views/business/certManage/supplement/components/basic.vue @@ -76,7 +76,7 @@ }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 function getDict() { // 实验室 @@ -118,7 +118,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -144,7 +144,7 @@ certificateName: '', // 证书名称 certificateNo: changeReportNo, // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/certManage/supplement/list.vue b/src/views/business/certManage/supplement/list.vue index ce4297f..0b3f696 100644 --- a/src/views/business/certManage/supplement/list.vue +++ b/src/views/business/certManage/supplement/list.vue @@ -252,7 +252,7 @@ processId: row.processId, // 流程实例id taskId: row.taskId, // 任务id labCode: row.labCode, // 实验室 - groupCode: row.groupCode, // 组别 + groupCode: row.groupCode, // 部门 ...row, }, }) @@ -352,7 +352,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/api/equipment/info/book.ts b/src/api/equipment/info/book.ts index 60cf0d2..295d4f9 100644 --- a/src/api/equipment/info/book.ts +++ b/src/api/equipment/info/book.ts @@ -9,7 +9,7 @@ return request({ url: `${prefix}/approval/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -18,7 +18,7 @@ return request({ url: `${prefix}/save`, method: 'post', - data + data, }) } @@ -27,7 +27,7 @@ return request({ url: `${prefix}/draftUpdate`, method: 'post', - data + data, }) } // 编辑 @@ -35,7 +35,7 @@ return request({ url: `${prefix}/failUpdate`, method: 'post', - data + data, }) } @@ -44,7 +44,7 @@ return request({ url: `${prefix}/detail`, method: 'post', - data + data, }) } @@ -59,7 +59,7 @@ return request({ url: `${prefix}/submit`, method: 'post', - data + data, }) } @@ -68,7 +68,7 @@ return request({ url: `${prefix}/draftDelete`, method: 'post', - data + data, }) } @@ -77,7 +77,7 @@ return request({ url: `${prefix}/approval/delete`, method: 'post', - data + data, }) } @@ -86,7 +86,7 @@ return request({ url: `${prefix}/circulationLog/listPage`, method: 'post', - data + data, }) } @@ -99,7 +99,7 @@ return request({ url: `${prefix}/status/log/list`, method: 'get', - params + params, }) } @@ -112,7 +112,7 @@ return request({ url: `${prefix}/approval/revoke`, method: 'post', - data + data, }) } @@ -125,7 +125,7 @@ return request({ url: `${prefix}/approval/refuse`, method: 'post', - data + data, }) } @@ -134,7 +134,7 @@ return request({ url: `${prefix}/remind`, method: 'post', - data + data, }) } @@ -143,11 +143,11 @@ return request({ url: `${prefix}/import`, method: 'post', - data + data, }) } -// 根据实验室代码和组别获取deptId +// 根据实验室代码和部门获取deptId export function getDeptIdByLabAndGroup(params: { labCode: string groupNo: string @@ -155,7 +155,7 @@ return request({ url: '/system/getDeptIdByLabAndGroup', method: 'get', - params + params, }) } @@ -164,7 +164,7 @@ return request({ url: `${path}?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -173,7 +173,7 @@ return request({ url: '/equipment/certificate/listPage', method: 'post', - data + data, }) } @@ -182,7 +182,7 @@ return request({ url: '/equipment/detail/maintain/listPage', method: 'post', - data + data, }) } @@ -191,7 +191,7 @@ return request({ url: '/equipment/detail/resume/listPage', method: 'post', - data + data, }) } @@ -200,7 +200,7 @@ return request({ url: '/equipment/hasChanged', method: 'post', - data + data, }) } @@ -210,7 +210,7 @@ url: '/equipment/exportFile', method: 'post', responseType: 'blob', - data + data, }) } @@ -220,6 +220,6 @@ url: '/equipment/exportExcelFile', method: 'post', responseType: 'blob', - data + data, }) } diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 5678997..ff2d6d5 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -10,7 +10,7 @@ return request({ url: `${prefix}mgr/list`, method: 'get', - params + params, }) } @@ -19,14 +19,14 @@ return request({ url: '/system/mgr/list', method: 'get', - params + params, }) } // 获取用户所在单位 export function getUserDept() { return request({ - url: '/system/company' + url: '/system/company', }) } @@ -43,7 +43,7 @@ return request({ url: `${prefix}mgr/delete`, method: 'post', - data + data, }) } @@ -52,7 +52,7 @@ return request({ url: `${prefix}mgr/freeze`, method: 'post', - data + data, }) } // 冻结用户 @@ -60,7 +60,7 @@ return request({ url: `${prefix}mgr/unfreeze`, method: 'post', - data + data, }) } @@ -69,7 +69,7 @@ return request({ url: 'sys/mgr/reset', method: 'post', - data + data, }) } @@ -80,17 +80,17 @@ method: 'post', data: { userId, - roleIds: ids - } + roleIds: ids, + }, // paramsSerializer: (params) => qs.stringify(params, { indices: false }) }) } -// 获取用户实验室代码和组别 +// 获取用户实验室代码和部门 export function getLabAndGroup(params: { deptId: string }) { return request({ url: '/system/labAndGroup', method: 'get', - params + params, }) } diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 102ce61..400bf48 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -34,11 +34,11 @@ isLogout: 0, // 是否被退出登录 bizLabCode: localStorage.bizLabCode || '', // 实验室 labCodeName: localStorage.labCodeName || '', // 实验室名称 - groupNo: localStorage.groupNo || '', // 组别 - groupName: localStorage.groupName || '' // 组别名称 + groupNo: localStorage.groupNo || '', // 部门 + groupName: localStorage.groupName || '', // 部门名称 }), getters: { - isLogin: state => { + isLogin: (state) => { let retn = false if (state.token) { retn = true @@ -46,17 +46,18 @@ return retn }, // 是否已获取用户信息 - hasUserInfo: state => { + hasUserInfo: (state) => { if (state.roleList && state.roleList.length > 0) { return true - } else { + } + else { return false } }, - getPublicKey: state => { + getPublicKey: (state) => { return state.publicKey }, - getPrivateKey: state => { + getPrivateKey: (state) => { return state.privateKey }, getMenus: (state): Menu.menu[] => { @@ -64,14 +65,14 @@ }, getBtns: (state): Menu.menu[] => { return state.btns - } + }, }, actions: { // 获取项目基础配置 getBaseConfig() { return new Promise((resolve, reject) => { getConfig() - .then(res => { + .then((res) => { this.publicKey = res.data.publicKey localStorage.setItem('publicKey', res.data.publicKey) // 保存私钥 @@ -80,7 +81,7 @@ this.isLogout = 0 resolve(res.data) }) - .catch(e => { + .catch((e) => { reject(e) }) }) @@ -94,21 +95,21 @@ }) { return new Promise((resolve, reject) => { doLogin(data) - .then(res => { + .then((res) => { localStorage.setItem('token', res.data.token) this.username = res.data.username this.token = res.data.token this.isLogout = 0 resolve() }) - .catch(error => { + .catch((error) => { reject(error) }) }) }, // 注销 logout() { - return new Promise(resolve => { + return new Promise((resolve) => { const routeStore = useRouteStore() const menuStore = useMenuStore() localStorage.removeItem('username') @@ -117,17 +118,17 @@ localStorage.removeItem('depId') localStorage.removeItem('bizLabCode') // 实验室 localStorage.removeItem('labCodeName') // 实验室 - localStorage.removeItem('groupNo') // 组别 - localStorage.removeItem('groupName') // 组别 + localStorage.removeItem('groupNo') // 部门 + localStorage.removeItem('groupName') // 部门 // localStorage.clear() this.username = '' this.token = '' this.roleList = [] this.roleNames = [] this.bizLabCode = '' // 实验室 - this.groupNo = '' // 组别 - this.labCodeName = '' // 组别 - this.groupName = '' // 组别 + this.groupNo = '' // 部门 + this.labCodeName = '' // 部门 + this.groupName = '' // 部门 routeStore.removeRoutes() menuStore.setActived(0) resolve() @@ -135,53 +136,54 @@ }, // 获取用户信息 getUserInfo() { - return new Promise(resolve => { + return new Promise((resolve) => { getInfo() - .then(res => { + .then((res) => { if (res.data.roleIds && res.data.roleIds.length > 0) { this.roleList = res.data.roleIds this.roleNames = res.data.roleNames this.roleTips = res.data.roleTips localStorage.setItem('nameId', res.data.id) localStorage.setItem('depId', res.data.deptId) - } else { + } + else { reject('该用户无角色') } if (res.data.deptId) { this.deptId = res.data.deptId this.deptName = res.data.deptName - // 获取本用户实验室代码、组别 - getLabAndGroup({ deptId: res.data.deptId }).then(res => { + // 获取本用户实验室代码、部门 + getLabAndGroup({ deptId: res.data.deptId }).then((res) => { this.bizLabCode = res.data.bizLabCode // 实验室 - this.groupNo = res.data.groupNo // 组别 + this.groupNo = res.data.groupNo // 部门 if (this.bizLabCode) { - getDictByCode('bizGroupCodeEquipment').then(response => { + getDictByCode('bizGroupCodeEquipment').then((response) => { const labCodeList = response.data const index = labCodeList.findIndex( (item: { value: string }) => - item.value === this.bizLabCode + item.value === this.bizLabCode, ) if (index !== -1) { this.labCodeName = labCodeList[index].name // 实验室 localStorage.setItem( 'labCodeName', - labCodeList[index].name + labCodeList[index].name, ) } }) } if (this.bizLabCode) { - getDictByCode('bizGroupCode').then(response => { + getDictByCode('bizGroupCode').then((response) => { const groupCodeList = response.data const index = groupCodeList.findIndex( - (item: { value: string }) => item.value === this.groupNo + (item: { value: string }) => item.value === this.groupNo, ) if (index !== -1) { this.groupName = groupCodeList[index].name localStorage.setItem( 'groupName', - groupCodeList[index].name + groupCodeList[index].name, ) } }) @@ -190,10 +192,11 @@ localStorage.setItem('bizLabCode', res.data.bizLabCode) }) // 基本信息-部门接口-查询部门类别 - getDeptList({ deptName: res.data.deptName }).then(response => { + getDeptList({ deptName: res.data.deptName }).then((response) => { this.deptType = response.data.list[0].deptType }) - } else { + } + else { reject('该用户无组织机构') } this.id = res.data.id @@ -210,13 +213,13 @@ getPermissions(currentSystem?: { name: string; code: string }) { const params = { resourceType: '', - parentCode: '' + parentCode: '', } if (currentSystem) { params.parentCode = currentSystem.code // 子系统code } - return new Promise(resolve => { - getUserMenus(params).then(response => { + return new Promise((resolve) => { + getUserMenus(params).then((response) => { const data = response.data const menus = [] // 仅菜单 const btns = [] // 非菜单 @@ -230,14 +233,14 @@ const menu_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } menus.push(menu_tmp) } const btn_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } btns.push(btn_tmp) } @@ -250,8 +253,8 @@ }, // 修改密码 editPassword(data: { oldPwd: string; newPwd: string }) { - return new Promise(resolve => { - changePwd(data).then(response => { + return new Promise((resolve) => { + changePwd(data).then((response) => { resolve(response) }) }) @@ -259,9 +262,9 @@ // 被退出登录 toLogout() { this.isLogout += 1 - } - } - } + }, + }, + }, ) export default useUserStore diff --git a/src/views/business/certManage/apply/apply-interface.ts b/src/views/business/certManage/apply/apply-interface.ts index 5595f43..1fdb9b7 100644 --- a/src/views/business/certManage/apply/apply-interface.ts +++ b/src/views/business/certManage/apply/apply-interface.ts @@ -31,7 +31,7 @@ // 表单 export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 changeApplyNo: string // 申请单编号 changeApplyName: string // 申请单名称 createUserId: string // 创建人id diff --git a/src/views/business/certManage/apply/components/basic.vue b/src/views/business/certManage/apply/components/basic.vue index 3be1fef..bf02448 100644 --- a/src/views/business/certManage/apply/components/basic.vue +++ b/src/views/business/certManage/apply/components/basic.vue @@ -32,7 +32,7 @@ const user = useUserStore() // 用户信息 const form = ref({ labCode: '', // 实验室 - groupCode: '', // 组别 + groupCode: '', // 部门 changeApplyNo: '', // 申请单编号 changeApplyName: '', // 申请单名称 createUserId: '', // 创建人id @@ -53,13 +53,13 @@ const rules = ref({ // 校验规则 labCode: [{ required: true, message: '实验室不能为空', trigger: ['blur', 'change'] }], - groupCode: [{ required: true, message: '组别不能为空', trigger: ['blur', 'change'] }], + groupCode: [{ required: true, message: '部门不能为空', trigger: ['blur', 'change'] }], changeReportNo: [{ required: true, message: '更换证书编号不能为空', trigger: ['change', 'blur'] }], changeType: [{ required: true, message: '变更类型不能为空', trigger: ['change', 'blur'] }], }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 const changeTypeList = ref([]) // 变更类型 function getDict() { @@ -67,7 +67,7 @@ getDictByCode('bizLabCode').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) @@ -192,7 +192,7 @@ onMounted(async () => { if (props.pageType === 'edit' || props.pageType === 'detail') { form.value.labCode = $route.query.labCode as any // 实验室 - form.value.groupCode = $route.query.groupCode as string // 组别 + form.value.groupCode = $route.query.groupCode as string // 部门 form.value.changeApplyNo = $route.query.changeApplyNo as string // 申请单编号 form.value.changeApplyName = $route.query.changeApplyName as string // 申请单名称 form.value.createUserId = $route.query.createUserId as string // 创建人id @@ -236,8 +236,8 @@ - - + + diff --git a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue index b8d9940..959501b 100644 --- a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue +++ b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue @@ -18,7 +18,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 @@ -123,7 +123,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/certManage/apply/list.vue b/src/views/business/certManage/apply/list.vue index 6829e97..fb5e6c3 100644 --- a/src/views/business/certManage/apply/list.vue +++ b/src/views/business/certManage/apply/list.vue @@ -211,7 +211,7 @@ processId: row.processId, // 流程实例id taskId: row.taskId, // 任务id labCode: row.labCode, // 实验室 - groupCode: row.groupCode, // 组别 + groupCode: row.groupCode, // 部门 changeApplyNo: row.changeApplyNo, // 申请单编号 changeApplyName: row.changeApplyName, // 申请单名称 createUserId: row.createUserId, // 创建人id diff --git a/src/views/business/certManage/cert/cert-interface.ts b/src/views/business/certManage/cert/cert-interface.ts index 19d8c65..9fc92d0 100644 --- a/src/views/business/certManage/cert/cert-interface.ts +++ b/src/views/business/certManage/cert/cert-interface.ts @@ -17,7 +17,7 @@ measureValidDateStart: string // 检定有效期开始 measureValidDateEnd: string // 检定有效期结束 labCode: string // 实验室(字典code) - groupCode: string // 组别(字典code) + groupCode: string // 部门(字典code) createUserName: string // 检定员 formId: string // 表单id printStatus: string // 打印状态(未打印传1,其他状态不传) diff --git a/src/views/business/certManage/cert/list.vue b/src/views/business/certManage/cert/list.vue index 3daaec1..f21f74d 100644 --- a/src/views/business/certManage/cert/list.vue +++ b/src/views/business/certManage/cert/list.vue @@ -45,7 +45,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -197,7 +197,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -282,7 +282,7 @@ measureValidDateStart: listQuery.value.measureValidDateStart, // 检定有效期开始 measureValidDateEnd: listQuery.value.measureValidDateEnd, // 检定有效期结束 labCode: listQuery.value.labCode, // 实验室(字典code) - groupCode: listQuery.value.groupCode, // 组别(字典code) + groupCode: listQuery.value.groupCode, // 部门(字典code) createUserName: listQuery.value.createUserName, // 检定员 formId: listQuery.value.formId, // 表单id printStatus: listQuery.value.printStatus, // 打印状态(未打印传1,其他状态不传) diff --git a/src/views/business/certManage/supplement/components/basic.vue b/src/views/business/certManage/supplement/components/basic.vue index 61921e2..d5ec033 100644 --- a/src/views/business/certManage/supplement/components/basic.vue +++ b/src/views/business/certManage/supplement/components/basic.vue @@ -76,7 +76,7 @@ }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 function getDict() { // 实验室 @@ -118,7 +118,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -144,7 +144,7 @@ certificateName: '', // 证书名称 certificateNo: changeReportNo, // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/certManage/supplement/list.vue b/src/views/business/certManage/supplement/list.vue index ce4297f..0b3f696 100644 --- a/src/views/business/certManage/supplement/list.vue +++ b/src/views/business/certManage/supplement/list.vue @@ -252,7 +252,7 @@ processId: row.processId, // 流程实例id taskId: row.taskId, // 任务id labCode: row.labCode, // 实验室 - groupCode: row.groupCode, // 组别 + groupCode: row.groupCode, // 部门 ...row, }, }) @@ -352,7 +352,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/fieldTest/approve/approve-interface.ts b/src/views/business/fieldTest/approve/approve-interface.ts index ab91930..9b5bc40 100644 --- a/src/views/business/fieldTest/approve/approve-interface.ts +++ b/src/views/business/fieldTest/approve/approve-interface.ts @@ -9,7 +9,7 @@ siteExecutiveNo: string // 现场检测编号 labCode: string // 实验室 - groupCode: string // 组别、部门 + groupCode: string // 部门、部门 executiveItem: string // 测试校准检定项目 orderNo: string // 关联任务单 limit: number @@ -31,7 +31,7 @@ export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 siteExecutiveNo: string // 现场检测编号(审批编号) siteExecutiveName: string // 现场检测名字(审批名称) applyId: string // 申请人id diff --git a/src/api/equipment/info/book.ts b/src/api/equipment/info/book.ts index 60cf0d2..295d4f9 100644 --- a/src/api/equipment/info/book.ts +++ b/src/api/equipment/info/book.ts @@ -9,7 +9,7 @@ return request({ url: `${prefix}/approval/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -18,7 +18,7 @@ return request({ url: `${prefix}/save`, method: 'post', - data + data, }) } @@ -27,7 +27,7 @@ return request({ url: `${prefix}/draftUpdate`, method: 'post', - data + data, }) } // 编辑 @@ -35,7 +35,7 @@ return request({ url: `${prefix}/failUpdate`, method: 'post', - data + data, }) } @@ -44,7 +44,7 @@ return request({ url: `${prefix}/detail`, method: 'post', - data + data, }) } @@ -59,7 +59,7 @@ return request({ url: `${prefix}/submit`, method: 'post', - data + data, }) } @@ -68,7 +68,7 @@ return request({ url: `${prefix}/draftDelete`, method: 'post', - data + data, }) } @@ -77,7 +77,7 @@ return request({ url: `${prefix}/approval/delete`, method: 'post', - data + data, }) } @@ -86,7 +86,7 @@ return request({ url: `${prefix}/circulationLog/listPage`, method: 'post', - data + data, }) } @@ -99,7 +99,7 @@ return request({ url: `${prefix}/status/log/list`, method: 'get', - params + params, }) } @@ -112,7 +112,7 @@ return request({ url: `${prefix}/approval/revoke`, method: 'post', - data + data, }) } @@ -125,7 +125,7 @@ return request({ url: `${prefix}/approval/refuse`, method: 'post', - data + data, }) } @@ -134,7 +134,7 @@ return request({ url: `${prefix}/remind`, method: 'post', - data + data, }) } @@ -143,11 +143,11 @@ return request({ url: `${prefix}/import`, method: 'post', - data + data, }) } -// 根据实验室代码和组别获取deptId +// 根据实验室代码和部门获取deptId export function getDeptIdByLabAndGroup(params: { labCode: string groupNo: string @@ -155,7 +155,7 @@ return request({ url: '/system/getDeptIdByLabAndGroup', method: 'get', - params + params, }) } @@ -164,7 +164,7 @@ return request({ url: `${path}?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -173,7 +173,7 @@ return request({ url: '/equipment/certificate/listPage', method: 'post', - data + data, }) } @@ -182,7 +182,7 @@ return request({ url: '/equipment/detail/maintain/listPage', method: 'post', - data + data, }) } @@ -191,7 +191,7 @@ return request({ url: '/equipment/detail/resume/listPage', method: 'post', - data + data, }) } @@ -200,7 +200,7 @@ return request({ url: '/equipment/hasChanged', method: 'post', - data + data, }) } @@ -210,7 +210,7 @@ url: '/equipment/exportFile', method: 'post', responseType: 'blob', - data + data, }) } @@ -220,6 +220,6 @@ url: '/equipment/exportExcelFile', method: 'post', responseType: 'blob', - data + data, }) } diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 5678997..ff2d6d5 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -10,7 +10,7 @@ return request({ url: `${prefix}mgr/list`, method: 'get', - params + params, }) } @@ -19,14 +19,14 @@ return request({ url: '/system/mgr/list', method: 'get', - params + params, }) } // 获取用户所在单位 export function getUserDept() { return request({ - url: '/system/company' + url: '/system/company', }) } @@ -43,7 +43,7 @@ return request({ url: `${prefix}mgr/delete`, method: 'post', - data + data, }) } @@ -52,7 +52,7 @@ return request({ url: `${prefix}mgr/freeze`, method: 'post', - data + data, }) } // 冻结用户 @@ -60,7 +60,7 @@ return request({ url: `${prefix}mgr/unfreeze`, method: 'post', - data + data, }) } @@ -69,7 +69,7 @@ return request({ url: 'sys/mgr/reset', method: 'post', - data + data, }) } @@ -80,17 +80,17 @@ method: 'post', data: { userId, - roleIds: ids - } + roleIds: ids, + }, // paramsSerializer: (params) => qs.stringify(params, { indices: false }) }) } -// 获取用户实验室代码和组别 +// 获取用户实验室代码和部门 export function getLabAndGroup(params: { deptId: string }) { return request({ url: '/system/labAndGroup', method: 'get', - params + params, }) } diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 102ce61..400bf48 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -34,11 +34,11 @@ isLogout: 0, // 是否被退出登录 bizLabCode: localStorage.bizLabCode || '', // 实验室 labCodeName: localStorage.labCodeName || '', // 实验室名称 - groupNo: localStorage.groupNo || '', // 组别 - groupName: localStorage.groupName || '' // 组别名称 + groupNo: localStorage.groupNo || '', // 部门 + groupName: localStorage.groupName || '', // 部门名称 }), getters: { - isLogin: state => { + isLogin: (state) => { let retn = false if (state.token) { retn = true @@ -46,17 +46,18 @@ return retn }, // 是否已获取用户信息 - hasUserInfo: state => { + hasUserInfo: (state) => { if (state.roleList && state.roleList.length > 0) { return true - } else { + } + else { return false } }, - getPublicKey: state => { + getPublicKey: (state) => { return state.publicKey }, - getPrivateKey: state => { + getPrivateKey: (state) => { return state.privateKey }, getMenus: (state): Menu.menu[] => { @@ -64,14 +65,14 @@ }, getBtns: (state): Menu.menu[] => { return state.btns - } + }, }, actions: { // 获取项目基础配置 getBaseConfig() { return new Promise((resolve, reject) => { getConfig() - .then(res => { + .then((res) => { this.publicKey = res.data.publicKey localStorage.setItem('publicKey', res.data.publicKey) // 保存私钥 @@ -80,7 +81,7 @@ this.isLogout = 0 resolve(res.data) }) - .catch(e => { + .catch((e) => { reject(e) }) }) @@ -94,21 +95,21 @@ }) { return new Promise((resolve, reject) => { doLogin(data) - .then(res => { + .then((res) => { localStorage.setItem('token', res.data.token) this.username = res.data.username this.token = res.data.token this.isLogout = 0 resolve() }) - .catch(error => { + .catch((error) => { reject(error) }) }) }, // 注销 logout() { - return new Promise(resolve => { + return new Promise((resolve) => { const routeStore = useRouteStore() const menuStore = useMenuStore() localStorage.removeItem('username') @@ -117,17 +118,17 @@ localStorage.removeItem('depId') localStorage.removeItem('bizLabCode') // 实验室 localStorage.removeItem('labCodeName') // 实验室 - localStorage.removeItem('groupNo') // 组别 - localStorage.removeItem('groupName') // 组别 + localStorage.removeItem('groupNo') // 部门 + localStorage.removeItem('groupName') // 部门 // localStorage.clear() this.username = '' this.token = '' this.roleList = [] this.roleNames = [] this.bizLabCode = '' // 实验室 - this.groupNo = '' // 组别 - this.labCodeName = '' // 组别 - this.groupName = '' // 组别 + this.groupNo = '' // 部门 + this.labCodeName = '' // 部门 + this.groupName = '' // 部门 routeStore.removeRoutes() menuStore.setActived(0) resolve() @@ -135,53 +136,54 @@ }, // 获取用户信息 getUserInfo() { - return new Promise(resolve => { + return new Promise((resolve) => { getInfo() - .then(res => { + .then((res) => { if (res.data.roleIds && res.data.roleIds.length > 0) { this.roleList = res.data.roleIds this.roleNames = res.data.roleNames this.roleTips = res.data.roleTips localStorage.setItem('nameId', res.data.id) localStorage.setItem('depId', res.data.deptId) - } else { + } + else { reject('该用户无角色') } if (res.data.deptId) { this.deptId = res.data.deptId this.deptName = res.data.deptName - // 获取本用户实验室代码、组别 - getLabAndGroup({ deptId: res.data.deptId }).then(res => { + // 获取本用户实验室代码、部门 + getLabAndGroup({ deptId: res.data.deptId }).then((res) => { this.bizLabCode = res.data.bizLabCode // 实验室 - this.groupNo = res.data.groupNo // 组别 + this.groupNo = res.data.groupNo // 部门 if (this.bizLabCode) { - getDictByCode('bizGroupCodeEquipment').then(response => { + getDictByCode('bizGroupCodeEquipment').then((response) => { const labCodeList = response.data const index = labCodeList.findIndex( (item: { value: string }) => - item.value === this.bizLabCode + item.value === this.bizLabCode, ) if (index !== -1) { this.labCodeName = labCodeList[index].name // 实验室 localStorage.setItem( 'labCodeName', - labCodeList[index].name + labCodeList[index].name, ) } }) } if (this.bizLabCode) { - getDictByCode('bizGroupCode').then(response => { + getDictByCode('bizGroupCode').then((response) => { const groupCodeList = response.data const index = groupCodeList.findIndex( - (item: { value: string }) => item.value === this.groupNo + (item: { value: string }) => item.value === this.groupNo, ) if (index !== -1) { this.groupName = groupCodeList[index].name localStorage.setItem( 'groupName', - groupCodeList[index].name + groupCodeList[index].name, ) } }) @@ -190,10 +192,11 @@ localStorage.setItem('bizLabCode', res.data.bizLabCode) }) // 基本信息-部门接口-查询部门类别 - getDeptList({ deptName: res.data.deptName }).then(response => { + getDeptList({ deptName: res.data.deptName }).then((response) => { this.deptType = response.data.list[0].deptType }) - } else { + } + else { reject('该用户无组织机构') } this.id = res.data.id @@ -210,13 +213,13 @@ getPermissions(currentSystem?: { name: string; code: string }) { const params = { resourceType: '', - parentCode: '' + parentCode: '', } if (currentSystem) { params.parentCode = currentSystem.code // 子系统code } - return new Promise(resolve => { - getUserMenus(params).then(response => { + return new Promise((resolve) => { + getUserMenus(params).then((response) => { const data = response.data const menus = [] // 仅菜单 const btns = [] // 非菜单 @@ -230,14 +233,14 @@ const menu_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } menus.push(menu_tmp) } const btn_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } btns.push(btn_tmp) } @@ -250,8 +253,8 @@ }, // 修改密码 editPassword(data: { oldPwd: string; newPwd: string }) { - return new Promise(resolve => { - changePwd(data).then(response => { + return new Promise((resolve) => { + changePwd(data).then((response) => { resolve(response) }) }) @@ -259,9 +262,9 @@ // 被退出登录 toLogout() { this.isLogout += 1 - } - } - } + }, + }, + }, ) export default useUserStore diff --git a/src/views/business/certManage/apply/apply-interface.ts b/src/views/business/certManage/apply/apply-interface.ts index 5595f43..1fdb9b7 100644 --- a/src/views/business/certManage/apply/apply-interface.ts +++ b/src/views/business/certManage/apply/apply-interface.ts @@ -31,7 +31,7 @@ // 表单 export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 changeApplyNo: string // 申请单编号 changeApplyName: string // 申请单名称 createUserId: string // 创建人id diff --git a/src/views/business/certManage/apply/components/basic.vue b/src/views/business/certManage/apply/components/basic.vue index 3be1fef..bf02448 100644 --- a/src/views/business/certManage/apply/components/basic.vue +++ b/src/views/business/certManage/apply/components/basic.vue @@ -32,7 +32,7 @@ const user = useUserStore() // 用户信息 const form = ref({ labCode: '', // 实验室 - groupCode: '', // 组别 + groupCode: '', // 部门 changeApplyNo: '', // 申请单编号 changeApplyName: '', // 申请单名称 createUserId: '', // 创建人id @@ -53,13 +53,13 @@ const rules = ref({ // 校验规则 labCode: [{ required: true, message: '实验室不能为空', trigger: ['blur', 'change'] }], - groupCode: [{ required: true, message: '组别不能为空', trigger: ['blur', 'change'] }], + groupCode: [{ required: true, message: '部门不能为空', trigger: ['blur', 'change'] }], changeReportNo: [{ required: true, message: '更换证书编号不能为空', trigger: ['change', 'blur'] }], changeType: [{ required: true, message: '变更类型不能为空', trigger: ['change', 'blur'] }], }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 const changeTypeList = ref([]) // 变更类型 function getDict() { @@ -67,7 +67,7 @@ getDictByCode('bizLabCode').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) @@ -192,7 +192,7 @@ onMounted(async () => { if (props.pageType === 'edit' || props.pageType === 'detail') { form.value.labCode = $route.query.labCode as any // 实验室 - form.value.groupCode = $route.query.groupCode as string // 组别 + form.value.groupCode = $route.query.groupCode as string // 部门 form.value.changeApplyNo = $route.query.changeApplyNo as string // 申请单编号 form.value.changeApplyName = $route.query.changeApplyName as string // 申请单名称 form.value.createUserId = $route.query.createUserId as string // 创建人id @@ -236,8 +236,8 @@ - - + + diff --git a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue index b8d9940..959501b 100644 --- a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue +++ b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue @@ -18,7 +18,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 @@ -123,7 +123,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/certManage/apply/list.vue b/src/views/business/certManage/apply/list.vue index 6829e97..fb5e6c3 100644 --- a/src/views/business/certManage/apply/list.vue +++ b/src/views/business/certManage/apply/list.vue @@ -211,7 +211,7 @@ processId: row.processId, // 流程实例id taskId: row.taskId, // 任务id labCode: row.labCode, // 实验室 - groupCode: row.groupCode, // 组别 + groupCode: row.groupCode, // 部门 changeApplyNo: row.changeApplyNo, // 申请单编号 changeApplyName: row.changeApplyName, // 申请单名称 createUserId: row.createUserId, // 创建人id diff --git a/src/views/business/certManage/cert/cert-interface.ts b/src/views/business/certManage/cert/cert-interface.ts index 19d8c65..9fc92d0 100644 --- a/src/views/business/certManage/cert/cert-interface.ts +++ b/src/views/business/certManage/cert/cert-interface.ts @@ -17,7 +17,7 @@ measureValidDateStart: string // 检定有效期开始 measureValidDateEnd: string // 检定有效期结束 labCode: string // 实验室(字典code) - groupCode: string // 组别(字典code) + groupCode: string // 部门(字典code) createUserName: string // 检定员 formId: string // 表单id printStatus: string // 打印状态(未打印传1,其他状态不传) diff --git a/src/views/business/certManage/cert/list.vue b/src/views/business/certManage/cert/list.vue index 3daaec1..f21f74d 100644 --- a/src/views/business/certManage/cert/list.vue +++ b/src/views/business/certManage/cert/list.vue @@ -45,7 +45,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -197,7 +197,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -282,7 +282,7 @@ measureValidDateStart: listQuery.value.measureValidDateStart, // 检定有效期开始 measureValidDateEnd: listQuery.value.measureValidDateEnd, // 检定有效期结束 labCode: listQuery.value.labCode, // 实验室(字典code) - groupCode: listQuery.value.groupCode, // 组别(字典code) + groupCode: listQuery.value.groupCode, // 部门(字典code) createUserName: listQuery.value.createUserName, // 检定员 formId: listQuery.value.formId, // 表单id printStatus: listQuery.value.printStatus, // 打印状态(未打印传1,其他状态不传) diff --git a/src/views/business/certManage/supplement/components/basic.vue b/src/views/business/certManage/supplement/components/basic.vue index 61921e2..d5ec033 100644 --- a/src/views/business/certManage/supplement/components/basic.vue +++ b/src/views/business/certManage/supplement/components/basic.vue @@ -76,7 +76,7 @@ }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 function getDict() { // 实验室 @@ -118,7 +118,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -144,7 +144,7 @@ certificateName: '', // 证书名称 certificateNo: changeReportNo, // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/certManage/supplement/list.vue b/src/views/business/certManage/supplement/list.vue index ce4297f..0b3f696 100644 --- a/src/views/business/certManage/supplement/list.vue +++ b/src/views/business/certManage/supplement/list.vue @@ -252,7 +252,7 @@ processId: row.processId, // 流程实例id taskId: row.taskId, // 任务id labCode: row.labCode, // 实验室 - groupCode: row.groupCode, // 组别 + groupCode: row.groupCode, // 部门 ...row, }, }) @@ -352,7 +352,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/fieldTest/approve/approve-interface.ts b/src/views/business/fieldTest/approve/approve-interface.ts index ab91930..9b5bc40 100644 --- a/src/views/business/fieldTest/approve/approve-interface.ts +++ b/src/views/business/fieldTest/approve/approve-interface.ts @@ -9,7 +9,7 @@ siteExecutiveNo: string // 现场检测编号 labCode: string // 实验室 - groupCode: string // 组别、部门 + groupCode: string // 部门、部门 executiveItem: string // 测试校准检定项目 orderNo: string // 关联任务单 limit: number @@ -31,7 +31,7 @@ export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 siteExecutiveNo: string // 现场检测编号(审批编号) siteExecutiveName: string // 现场检测名字(审批名称) applyId: string // 申请人id diff --git a/src/views/business/fieldTest/approve/components/basic.vue b/src/views/business/fieldTest/approve/components/basic.vue index 5349362..98ab196 100644 --- a/src/views/business/fieldTest/approve/components/basic.vue +++ b/src/views/business/fieldTest/approve/components/basic.vue @@ -36,7 +36,7 @@ const user = useUserStore() // 用户信息 const form = ref({ labCode: '', // 实验室 - groupCode: '', // 组别 + groupCode: '', // 部门 siteExecutiveNo: '', // 现场检测编号(审批编号) siteExecutiveName: '', // 现场检测名字(审批名称) applyId: '', // 申请人id @@ -72,13 +72,13 @@ }) // -----------------------------------------字典-------------------------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 function getDict() { // 实验室 getDictByCode('bizGroupCodeEquipment').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) diff --git a/src/api/equipment/info/book.ts b/src/api/equipment/info/book.ts index 60cf0d2..295d4f9 100644 --- a/src/api/equipment/info/book.ts +++ b/src/api/equipment/info/book.ts @@ -9,7 +9,7 @@ return request({ url: `${prefix}/approval/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -18,7 +18,7 @@ return request({ url: `${prefix}/save`, method: 'post', - data + data, }) } @@ -27,7 +27,7 @@ return request({ url: `${prefix}/draftUpdate`, method: 'post', - data + data, }) } // 编辑 @@ -35,7 +35,7 @@ return request({ url: `${prefix}/failUpdate`, method: 'post', - data + data, }) } @@ -44,7 +44,7 @@ return request({ url: `${prefix}/detail`, method: 'post', - data + data, }) } @@ -59,7 +59,7 @@ return request({ url: `${prefix}/submit`, method: 'post', - data + data, }) } @@ -68,7 +68,7 @@ return request({ url: `${prefix}/draftDelete`, method: 'post', - data + data, }) } @@ -77,7 +77,7 @@ return request({ url: `${prefix}/approval/delete`, method: 'post', - data + data, }) } @@ -86,7 +86,7 @@ return request({ url: `${prefix}/circulationLog/listPage`, method: 'post', - data + data, }) } @@ -99,7 +99,7 @@ return request({ url: `${prefix}/status/log/list`, method: 'get', - params + params, }) } @@ -112,7 +112,7 @@ return request({ url: `${prefix}/approval/revoke`, method: 'post', - data + data, }) } @@ -125,7 +125,7 @@ return request({ url: `${prefix}/approval/refuse`, method: 'post', - data + data, }) } @@ -134,7 +134,7 @@ return request({ url: `${prefix}/remind`, method: 'post', - data + data, }) } @@ -143,11 +143,11 @@ return request({ url: `${prefix}/import`, method: 'post', - data + data, }) } -// 根据实验室代码和组别获取deptId +// 根据实验室代码和部门获取deptId export function getDeptIdByLabAndGroup(params: { labCode: string groupNo: string @@ -155,7 +155,7 @@ return request({ url: '/system/getDeptIdByLabAndGroup', method: 'get', - params + params, }) } @@ -164,7 +164,7 @@ return request({ url: `${path}?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -173,7 +173,7 @@ return request({ url: '/equipment/certificate/listPage', method: 'post', - data + data, }) } @@ -182,7 +182,7 @@ return request({ url: '/equipment/detail/maintain/listPage', method: 'post', - data + data, }) } @@ -191,7 +191,7 @@ return request({ url: '/equipment/detail/resume/listPage', method: 'post', - data + data, }) } @@ -200,7 +200,7 @@ return request({ url: '/equipment/hasChanged', method: 'post', - data + data, }) } @@ -210,7 +210,7 @@ url: '/equipment/exportFile', method: 'post', responseType: 'blob', - data + data, }) } @@ -220,6 +220,6 @@ url: '/equipment/exportExcelFile', method: 'post', responseType: 'blob', - data + data, }) } diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 5678997..ff2d6d5 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -10,7 +10,7 @@ return request({ url: `${prefix}mgr/list`, method: 'get', - params + params, }) } @@ -19,14 +19,14 @@ return request({ url: '/system/mgr/list', method: 'get', - params + params, }) } // 获取用户所在单位 export function getUserDept() { return request({ - url: '/system/company' + url: '/system/company', }) } @@ -43,7 +43,7 @@ return request({ url: `${prefix}mgr/delete`, method: 'post', - data + data, }) } @@ -52,7 +52,7 @@ return request({ url: `${prefix}mgr/freeze`, method: 'post', - data + data, }) } // 冻结用户 @@ -60,7 +60,7 @@ return request({ url: `${prefix}mgr/unfreeze`, method: 'post', - data + data, }) } @@ -69,7 +69,7 @@ return request({ url: 'sys/mgr/reset', method: 'post', - data + data, }) } @@ -80,17 +80,17 @@ method: 'post', data: { userId, - roleIds: ids - } + roleIds: ids, + }, // paramsSerializer: (params) => qs.stringify(params, { indices: false }) }) } -// 获取用户实验室代码和组别 +// 获取用户实验室代码和部门 export function getLabAndGroup(params: { deptId: string }) { return request({ url: '/system/labAndGroup', method: 'get', - params + params, }) } diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 102ce61..400bf48 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -34,11 +34,11 @@ isLogout: 0, // 是否被退出登录 bizLabCode: localStorage.bizLabCode || '', // 实验室 labCodeName: localStorage.labCodeName || '', // 实验室名称 - groupNo: localStorage.groupNo || '', // 组别 - groupName: localStorage.groupName || '' // 组别名称 + groupNo: localStorage.groupNo || '', // 部门 + groupName: localStorage.groupName || '', // 部门名称 }), getters: { - isLogin: state => { + isLogin: (state) => { let retn = false if (state.token) { retn = true @@ -46,17 +46,18 @@ return retn }, // 是否已获取用户信息 - hasUserInfo: state => { + hasUserInfo: (state) => { if (state.roleList && state.roleList.length > 0) { return true - } else { + } + else { return false } }, - getPublicKey: state => { + getPublicKey: (state) => { return state.publicKey }, - getPrivateKey: state => { + getPrivateKey: (state) => { return state.privateKey }, getMenus: (state): Menu.menu[] => { @@ -64,14 +65,14 @@ }, getBtns: (state): Menu.menu[] => { return state.btns - } + }, }, actions: { // 获取项目基础配置 getBaseConfig() { return new Promise((resolve, reject) => { getConfig() - .then(res => { + .then((res) => { this.publicKey = res.data.publicKey localStorage.setItem('publicKey', res.data.publicKey) // 保存私钥 @@ -80,7 +81,7 @@ this.isLogout = 0 resolve(res.data) }) - .catch(e => { + .catch((e) => { reject(e) }) }) @@ -94,21 +95,21 @@ }) { return new Promise((resolve, reject) => { doLogin(data) - .then(res => { + .then((res) => { localStorage.setItem('token', res.data.token) this.username = res.data.username this.token = res.data.token this.isLogout = 0 resolve() }) - .catch(error => { + .catch((error) => { reject(error) }) }) }, // 注销 logout() { - return new Promise(resolve => { + return new Promise((resolve) => { const routeStore = useRouteStore() const menuStore = useMenuStore() localStorage.removeItem('username') @@ -117,17 +118,17 @@ localStorage.removeItem('depId') localStorage.removeItem('bizLabCode') // 实验室 localStorage.removeItem('labCodeName') // 实验室 - localStorage.removeItem('groupNo') // 组别 - localStorage.removeItem('groupName') // 组别 + localStorage.removeItem('groupNo') // 部门 + localStorage.removeItem('groupName') // 部门 // localStorage.clear() this.username = '' this.token = '' this.roleList = [] this.roleNames = [] this.bizLabCode = '' // 实验室 - this.groupNo = '' // 组别 - this.labCodeName = '' // 组别 - this.groupName = '' // 组别 + this.groupNo = '' // 部门 + this.labCodeName = '' // 部门 + this.groupName = '' // 部门 routeStore.removeRoutes() menuStore.setActived(0) resolve() @@ -135,53 +136,54 @@ }, // 获取用户信息 getUserInfo() { - return new Promise(resolve => { + return new Promise((resolve) => { getInfo() - .then(res => { + .then((res) => { if (res.data.roleIds && res.data.roleIds.length > 0) { this.roleList = res.data.roleIds this.roleNames = res.data.roleNames this.roleTips = res.data.roleTips localStorage.setItem('nameId', res.data.id) localStorage.setItem('depId', res.data.deptId) - } else { + } + else { reject('该用户无角色') } if (res.data.deptId) { this.deptId = res.data.deptId this.deptName = res.data.deptName - // 获取本用户实验室代码、组别 - getLabAndGroup({ deptId: res.data.deptId }).then(res => { + // 获取本用户实验室代码、部门 + getLabAndGroup({ deptId: res.data.deptId }).then((res) => { this.bizLabCode = res.data.bizLabCode // 实验室 - this.groupNo = res.data.groupNo // 组别 + this.groupNo = res.data.groupNo // 部门 if (this.bizLabCode) { - getDictByCode('bizGroupCodeEquipment').then(response => { + getDictByCode('bizGroupCodeEquipment').then((response) => { const labCodeList = response.data const index = labCodeList.findIndex( (item: { value: string }) => - item.value === this.bizLabCode + item.value === this.bizLabCode, ) if (index !== -1) { this.labCodeName = labCodeList[index].name // 实验室 localStorage.setItem( 'labCodeName', - labCodeList[index].name + labCodeList[index].name, ) } }) } if (this.bizLabCode) { - getDictByCode('bizGroupCode').then(response => { + getDictByCode('bizGroupCode').then((response) => { const groupCodeList = response.data const index = groupCodeList.findIndex( - (item: { value: string }) => item.value === this.groupNo + (item: { value: string }) => item.value === this.groupNo, ) if (index !== -1) { this.groupName = groupCodeList[index].name localStorage.setItem( 'groupName', - groupCodeList[index].name + groupCodeList[index].name, ) } }) @@ -190,10 +192,11 @@ localStorage.setItem('bizLabCode', res.data.bizLabCode) }) // 基本信息-部门接口-查询部门类别 - getDeptList({ deptName: res.data.deptName }).then(response => { + getDeptList({ deptName: res.data.deptName }).then((response) => { this.deptType = response.data.list[0].deptType }) - } else { + } + else { reject('该用户无组织机构') } this.id = res.data.id @@ -210,13 +213,13 @@ getPermissions(currentSystem?: { name: string; code: string }) { const params = { resourceType: '', - parentCode: '' + parentCode: '', } if (currentSystem) { params.parentCode = currentSystem.code // 子系统code } - return new Promise(resolve => { - getUserMenus(params).then(response => { + return new Promise((resolve) => { + getUserMenus(params).then((response) => { const data = response.data const menus = [] // 仅菜单 const btns = [] // 非菜单 @@ -230,14 +233,14 @@ const menu_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } menus.push(menu_tmp) } const btn_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } btns.push(btn_tmp) } @@ -250,8 +253,8 @@ }, // 修改密码 editPassword(data: { oldPwd: string; newPwd: string }) { - return new Promise(resolve => { - changePwd(data).then(response => { + return new Promise((resolve) => { + changePwd(data).then((response) => { resolve(response) }) }) @@ -259,9 +262,9 @@ // 被退出登录 toLogout() { this.isLogout += 1 - } - } - } + }, + }, + }, ) export default useUserStore diff --git a/src/views/business/certManage/apply/apply-interface.ts b/src/views/business/certManage/apply/apply-interface.ts index 5595f43..1fdb9b7 100644 --- a/src/views/business/certManage/apply/apply-interface.ts +++ b/src/views/business/certManage/apply/apply-interface.ts @@ -31,7 +31,7 @@ // 表单 export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 changeApplyNo: string // 申请单编号 changeApplyName: string // 申请单名称 createUserId: string // 创建人id diff --git a/src/views/business/certManage/apply/components/basic.vue b/src/views/business/certManage/apply/components/basic.vue index 3be1fef..bf02448 100644 --- a/src/views/business/certManage/apply/components/basic.vue +++ b/src/views/business/certManage/apply/components/basic.vue @@ -32,7 +32,7 @@ const user = useUserStore() // 用户信息 const form = ref({ labCode: '', // 实验室 - groupCode: '', // 组别 + groupCode: '', // 部门 changeApplyNo: '', // 申请单编号 changeApplyName: '', // 申请单名称 createUserId: '', // 创建人id @@ -53,13 +53,13 @@ const rules = ref({ // 校验规则 labCode: [{ required: true, message: '实验室不能为空', trigger: ['blur', 'change'] }], - groupCode: [{ required: true, message: '组别不能为空', trigger: ['blur', 'change'] }], + groupCode: [{ required: true, message: '部门不能为空', trigger: ['blur', 'change'] }], changeReportNo: [{ required: true, message: '更换证书编号不能为空', trigger: ['change', 'blur'] }], changeType: [{ required: true, message: '变更类型不能为空', trigger: ['change', 'blur'] }], }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 const changeTypeList = ref([]) // 变更类型 function getDict() { @@ -67,7 +67,7 @@ getDictByCode('bizLabCode').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) @@ -192,7 +192,7 @@ onMounted(async () => { if (props.pageType === 'edit' || props.pageType === 'detail') { form.value.labCode = $route.query.labCode as any // 实验室 - form.value.groupCode = $route.query.groupCode as string // 组别 + form.value.groupCode = $route.query.groupCode as string // 部门 form.value.changeApplyNo = $route.query.changeApplyNo as string // 申请单编号 form.value.changeApplyName = $route.query.changeApplyName as string // 申请单名称 form.value.createUserId = $route.query.createUserId as string // 创建人id @@ -236,8 +236,8 @@ - - + + diff --git a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue index b8d9940..959501b 100644 --- a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue +++ b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue @@ -18,7 +18,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 @@ -123,7 +123,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/certManage/apply/list.vue b/src/views/business/certManage/apply/list.vue index 6829e97..fb5e6c3 100644 --- a/src/views/business/certManage/apply/list.vue +++ b/src/views/business/certManage/apply/list.vue @@ -211,7 +211,7 @@ processId: row.processId, // 流程实例id taskId: row.taskId, // 任务id labCode: row.labCode, // 实验室 - groupCode: row.groupCode, // 组别 + groupCode: row.groupCode, // 部门 changeApplyNo: row.changeApplyNo, // 申请单编号 changeApplyName: row.changeApplyName, // 申请单名称 createUserId: row.createUserId, // 创建人id diff --git a/src/views/business/certManage/cert/cert-interface.ts b/src/views/business/certManage/cert/cert-interface.ts index 19d8c65..9fc92d0 100644 --- a/src/views/business/certManage/cert/cert-interface.ts +++ b/src/views/business/certManage/cert/cert-interface.ts @@ -17,7 +17,7 @@ measureValidDateStart: string // 检定有效期开始 measureValidDateEnd: string // 检定有效期结束 labCode: string // 实验室(字典code) - groupCode: string // 组别(字典code) + groupCode: string // 部门(字典code) createUserName: string // 检定员 formId: string // 表单id printStatus: string // 打印状态(未打印传1,其他状态不传) diff --git a/src/views/business/certManage/cert/list.vue b/src/views/business/certManage/cert/list.vue index 3daaec1..f21f74d 100644 --- a/src/views/business/certManage/cert/list.vue +++ b/src/views/business/certManage/cert/list.vue @@ -45,7 +45,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -197,7 +197,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -282,7 +282,7 @@ measureValidDateStart: listQuery.value.measureValidDateStart, // 检定有效期开始 measureValidDateEnd: listQuery.value.measureValidDateEnd, // 检定有效期结束 labCode: listQuery.value.labCode, // 实验室(字典code) - groupCode: listQuery.value.groupCode, // 组别(字典code) + groupCode: listQuery.value.groupCode, // 部门(字典code) createUserName: listQuery.value.createUserName, // 检定员 formId: listQuery.value.formId, // 表单id printStatus: listQuery.value.printStatus, // 打印状态(未打印传1,其他状态不传) diff --git a/src/views/business/certManage/supplement/components/basic.vue b/src/views/business/certManage/supplement/components/basic.vue index 61921e2..d5ec033 100644 --- a/src/views/business/certManage/supplement/components/basic.vue +++ b/src/views/business/certManage/supplement/components/basic.vue @@ -76,7 +76,7 @@ }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 function getDict() { // 实验室 @@ -118,7 +118,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -144,7 +144,7 @@ certificateName: '', // 证书名称 certificateNo: changeReportNo, // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/certManage/supplement/list.vue b/src/views/business/certManage/supplement/list.vue index ce4297f..0b3f696 100644 --- a/src/views/business/certManage/supplement/list.vue +++ b/src/views/business/certManage/supplement/list.vue @@ -252,7 +252,7 @@ processId: row.processId, // 流程实例id taskId: row.taskId, // 任务id labCode: row.labCode, // 实验室 - groupCode: row.groupCode, // 组别 + groupCode: row.groupCode, // 部门 ...row, }, }) @@ -352,7 +352,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/fieldTest/approve/approve-interface.ts b/src/views/business/fieldTest/approve/approve-interface.ts index ab91930..9b5bc40 100644 --- a/src/views/business/fieldTest/approve/approve-interface.ts +++ b/src/views/business/fieldTest/approve/approve-interface.ts @@ -9,7 +9,7 @@ siteExecutiveNo: string // 现场检测编号 labCode: string // 实验室 - groupCode: string // 组别、部门 + groupCode: string // 部门、部门 executiveItem: string // 测试校准检定项目 orderNo: string // 关联任务单 limit: number @@ -31,7 +31,7 @@ export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 siteExecutiveNo: string // 现场检测编号(审批编号) siteExecutiveName: string // 现场检测名字(审批名称) applyId: string // 申请人id diff --git a/src/views/business/fieldTest/approve/components/basic.vue b/src/views/business/fieldTest/approve/components/basic.vue index 5349362..98ab196 100644 --- a/src/views/business/fieldTest/approve/components/basic.vue +++ b/src/views/business/fieldTest/approve/components/basic.vue @@ -36,7 +36,7 @@ const user = useUserStore() // 用户信息 const form = ref({ labCode: '', // 实验室 - groupCode: '', // 组别 + groupCode: '', // 部门 siteExecutiveNo: '', // 现场检测编号(审批编号) siteExecutiveName: '', // 现场检测名字(审批名称) applyId: '', // 申请人id @@ -72,13 +72,13 @@ }) // -----------------------------------------字典-------------------------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 function getDict() { // 实验室 getDictByCode('bizGroupCodeEquipment').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) diff --git a/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue b/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue index 47ec902..a0031cb 100644 --- a/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue +++ b/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue @@ -27,13 +27,13 @@ const emits = defineEmits(['confirm']) const dialogFormVisible = ref(false) const labCode = ref('') // 实验室 -const groupCode = ref('') // 组别 +const groupCode = ref('') // 部门 const changeType = ref('') // 允许筛选条件改变类型 const selectByUseStatus = ref('') // 固定筛选使用状态 // 查询条件 const listQuery = ref({ approvalStatus: '0', // 审批状态类型code,导出接口不用传 - groupCode: '', // 组别--后台定义用此字段筛选部门(刘翔) + groupCode: '', // 部门--后台定义用此字段筛选部门(刘翔) directorId: '', // 负责人id equipmentName: props.equipmentName, // 设备名称 equipmentNo: '', // 设备编号 @@ -143,7 +143,7 @@ const clearList = () => { listQuery.value = { approvalStatus: '0', // 审批状态类型code,导出接口不用传 - groupCode: '', // 组别--后台定义用此字段筛选部门(刘翔) + groupCode: '', // 部门--后台定义用此字段筛选部门(刘翔) directorId: '', // 负责人id equipmentName: '', // 设备名称 equipmentNo: '', // 设备编号 @@ -207,8 +207,8 @@ /** * 弹窗初始化 * @param labCode 实验室 - * @param groupCode 组别 - * @param noChange 是否实验室和组别固定,不允许改变 + * @param groupCode 部门 + * @param noChange 是否实验室和部门固定,不允许改变 * @param selectByUseStatusType 固定筛选使用状态的类型 */ const initDialog = async (labCodeParam = '', groupCodeParam = '', changeTypeParam = '', selectByUseStatusType = '') => { @@ -216,7 +216,7 @@ listQuery.value.labCode = labCodeParam listQuery.value.groupCode = groupCodeParam labCode.value = labCodeParam// 实验室 - groupCode.value = groupCodeParam// 组别 + groupCode.value = groupCodeParam// 部门 changeType.value = changeTypeParam// 允许筛选条件改变类型 selectByUseStatus.value = selectByUseStatusType dialogFormVisible.value = true diff --git a/src/api/equipment/info/book.ts b/src/api/equipment/info/book.ts index 60cf0d2..295d4f9 100644 --- a/src/api/equipment/info/book.ts +++ b/src/api/equipment/info/book.ts @@ -9,7 +9,7 @@ return request({ url: `${prefix}/approval/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -18,7 +18,7 @@ return request({ url: `${prefix}/save`, method: 'post', - data + data, }) } @@ -27,7 +27,7 @@ return request({ url: `${prefix}/draftUpdate`, method: 'post', - data + data, }) } // 编辑 @@ -35,7 +35,7 @@ return request({ url: `${prefix}/failUpdate`, method: 'post', - data + data, }) } @@ -44,7 +44,7 @@ return request({ url: `${prefix}/detail`, method: 'post', - data + data, }) } @@ -59,7 +59,7 @@ return request({ url: `${prefix}/submit`, method: 'post', - data + data, }) } @@ -68,7 +68,7 @@ return request({ url: `${prefix}/draftDelete`, method: 'post', - data + data, }) } @@ -77,7 +77,7 @@ return request({ url: `${prefix}/approval/delete`, method: 'post', - data + data, }) } @@ -86,7 +86,7 @@ return request({ url: `${prefix}/circulationLog/listPage`, method: 'post', - data + data, }) } @@ -99,7 +99,7 @@ return request({ url: `${prefix}/status/log/list`, method: 'get', - params + params, }) } @@ -112,7 +112,7 @@ return request({ url: `${prefix}/approval/revoke`, method: 'post', - data + data, }) } @@ -125,7 +125,7 @@ return request({ url: `${prefix}/approval/refuse`, method: 'post', - data + data, }) } @@ -134,7 +134,7 @@ return request({ url: `${prefix}/remind`, method: 'post', - data + data, }) } @@ -143,11 +143,11 @@ return request({ url: `${prefix}/import`, method: 'post', - data + data, }) } -// 根据实验室代码和组别获取deptId +// 根据实验室代码和部门获取deptId export function getDeptIdByLabAndGroup(params: { labCode: string groupNo: string @@ -155,7 +155,7 @@ return request({ url: '/system/getDeptIdByLabAndGroup', method: 'get', - params + params, }) } @@ -164,7 +164,7 @@ return request({ url: `${path}?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -173,7 +173,7 @@ return request({ url: '/equipment/certificate/listPage', method: 'post', - data + data, }) } @@ -182,7 +182,7 @@ return request({ url: '/equipment/detail/maintain/listPage', method: 'post', - data + data, }) } @@ -191,7 +191,7 @@ return request({ url: '/equipment/detail/resume/listPage', method: 'post', - data + data, }) } @@ -200,7 +200,7 @@ return request({ url: '/equipment/hasChanged', method: 'post', - data + data, }) } @@ -210,7 +210,7 @@ url: '/equipment/exportFile', method: 'post', responseType: 'blob', - data + data, }) } @@ -220,6 +220,6 @@ url: '/equipment/exportExcelFile', method: 'post', responseType: 'blob', - data + data, }) } diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 5678997..ff2d6d5 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -10,7 +10,7 @@ return request({ url: `${prefix}mgr/list`, method: 'get', - params + params, }) } @@ -19,14 +19,14 @@ return request({ url: '/system/mgr/list', method: 'get', - params + params, }) } // 获取用户所在单位 export function getUserDept() { return request({ - url: '/system/company' + url: '/system/company', }) } @@ -43,7 +43,7 @@ return request({ url: `${prefix}mgr/delete`, method: 'post', - data + data, }) } @@ -52,7 +52,7 @@ return request({ url: `${prefix}mgr/freeze`, method: 'post', - data + data, }) } // 冻结用户 @@ -60,7 +60,7 @@ return request({ url: `${prefix}mgr/unfreeze`, method: 'post', - data + data, }) } @@ -69,7 +69,7 @@ return request({ url: 'sys/mgr/reset', method: 'post', - data + data, }) } @@ -80,17 +80,17 @@ method: 'post', data: { userId, - roleIds: ids - } + roleIds: ids, + }, // paramsSerializer: (params) => qs.stringify(params, { indices: false }) }) } -// 获取用户实验室代码和组别 +// 获取用户实验室代码和部门 export function getLabAndGroup(params: { deptId: string }) { return request({ url: '/system/labAndGroup', method: 'get', - params + params, }) } diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 102ce61..400bf48 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -34,11 +34,11 @@ isLogout: 0, // 是否被退出登录 bizLabCode: localStorage.bizLabCode || '', // 实验室 labCodeName: localStorage.labCodeName || '', // 实验室名称 - groupNo: localStorage.groupNo || '', // 组别 - groupName: localStorage.groupName || '' // 组别名称 + groupNo: localStorage.groupNo || '', // 部门 + groupName: localStorage.groupName || '', // 部门名称 }), getters: { - isLogin: state => { + isLogin: (state) => { let retn = false if (state.token) { retn = true @@ -46,17 +46,18 @@ return retn }, // 是否已获取用户信息 - hasUserInfo: state => { + hasUserInfo: (state) => { if (state.roleList && state.roleList.length > 0) { return true - } else { + } + else { return false } }, - getPublicKey: state => { + getPublicKey: (state) => { return state.publicKey }, - getPrivateKey: state => { + getPrivateKey: (state) => { return state.privateKey }, getMenus: (state): Menu.menu[] => { @@ -64,14 +65,14 @@ }, getBtns: (state): Menu.menu[] => { return state.btns - } + }, }, actions: { // 获取项目基础配置 getBaseConfig() { return new Promise((resolve, reject) => { getConfig() - .then(res => { + .then((res) => { this.publicKey = res.data.publicKey localStorage.setItem('publicKey', res.data.publicKey) // 保存私钥 @@ -80,7 +81,7 @@ this.isLogout = 0 resolve(res.data) }) - .catch(e => { + .catch((e) => { reject(e) }) }) @@ -94,21 +95,21 @@ }) { return new Promise((resolve, reject) => { doLogin(data) - .then(res => { + .then((res) => { localStorage.setItem('token', res.data.token) this.username = res.data.username this.token = res.data.token this.isLogout = 0 resolve() }) - .catch(error => { + .catch((error) => { reject(error) }) }) }, // 注销 logout() { - return new Promise(resolve => { + return new Promise((resolve) => { const routeStore = useRouteStore() const menuStore = useMenuStore() localStorage.removeItem('username') @@ -117,17 +118,17 @@ localStorage.removeItem('depId') localStorage.removeItem('bizLabCode') // 实验室 localStorage.removeItem('labCodeName') // 实验室 - localStorage.removeItem('groupNo') // 组别 - localStorage.removeItem('groupName') // 组别 + localStorage.removeItem('groupNo') // 部门 + localStorage.removeItem('groupName') // 部门 // localStorage.clear() this.username = '' this.token = '' this.roleList = [] this.roleNames = [] this.bizLabCode = '' // 实验室 - this.groupNo = '' // 组别 - this.labCodeName = '' // 组别 - this.groupName = '' // 组别 + this.groupNo = '' // 部门 + this.labCodeName = '' // 部门 + this.groupName = '' // 部门 routeStore.removeRoutes() menuStore.setActived(0) resolve() @@ -135,53 +136,54 @@ }, // 获取用户信息 getUserInfo() { - return new Promise(resolve => { + return new Promise((resolve) => { getInfo() - .then(res => { + .then((res) => { if (res.data.roleIds && res.data.roleIds.length > 0) { this.roleList = res.data.roleIds this.roleNames = res.data.roleNames this.roleTips = res.data.roleTips localStorage.setItem('nameId', res.data.id) localStorage.setItem('depId', res.data.deptId) - } else { + } + else { reject('该用户无角色') } if (res.data.deptId) { this.deptId = res.data.deptId this.deptName = res.data.deptName - // 获取本用户实验室代码、组别 - getLabAndGroup({ deptId: res.data.deptId }).then(res => { + // 获取本用户实验室代码、部门 + getLabAndGroup({ deptId: res.data.deptId }).then((res) => { this.bizLabCode = res.data.bizLabCode // 实验室 - this.groupNo = res.data.groupNo // 组别 + this.groupNo = res.data.groupNo // 部门 if (this.bizLabCode) { - getDictByCode('bizGroupCodeEquipment').then(response => { + getDictByCode('bizGroupCodeEquipment').then((response) => { const labCodeList = response.data const index = labCodeList.findIndex( (item: { value: string }) => - item.value === this.bizLabCode + item.value === this.bizLabCode, ) if (index !== -1) { this.labCodeName = labCodeList[index].name // 实验室 localStorage.setItem( 'labCodeName', - labCodeList[index].name + labCodeList[index].name, ) } }) } if (this.bizLabCode) { - getDictByCode('bizGroupCode').then(response => { + getDictByCode('bizGroupCode').then((response) => { const groupCodeList = response.data const index = groupCodeList.findIndex( - (item: { value: string }) => item.value === this.groupNo + (item: { value: string }) => item.value === this.groupNo, ) if (index !== -1) { this.groupName = groupCodeList[index].name localStorage.setItem( 'groupName', - groupCodeList[index].name + groupCodeList[index].name, ) } }) @@ -190,10 +192,11 @@ localStorage.setItem('bizLabCode', res.data.bizLabCode) }) // 基本信息-部门接口-查询部门类别 - getDeptList({ deptName: res.data.deptName }).then(response => { + getDeptList({ deptName: res.data.deptName }).then((response) => { this.deptType = response.data.list[0].deptType }) - } else { + } + else { reject('该用户无组织机构') } this.id = res.data.id @@ -210,13 +213,13 @@ getPermissions(currentSystem?: { name: string; code: string }) { const params = { resourceType: '', - parentCode: '' + parentCode: '', } if (currentSystem) { params.parentCode = currentSystem.code // 子系统code } - return new Promise(resolve => { - getUserMenus(params).then(response => { + return new Promise((resolve) => { + getUserMenus(params).then((response) => { const data = response.data const menus = [] // 仅菜单 const btns = [] // 非菜单 @@ -230,14 +233,14 @@ const menu_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } menus.push(menu_tmp) } const btn_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } btns.push(btn_tmp) } @@ -250,8 +253,8 @@ }, // 修改密码 editPassword(data: { oldPwd: string; newPwd: string }) { - return new Promise(resolve => { - changePwd(data).then(response => { + return new Promise((resolve) => { + changePwd(data).then((response) => { resolve(response) }) }) @@ -259,9 +262,9 @@ // 被退出登录 toLogout() { this.isLogout += 1 - } - } - } + }, + }, + }, ) export default useUserStore diff --git a/src/views/business/certManage/apply/apply-interface.ts b/src/views/business/certManage/apply/apply-interface.ts index 5595f43..1fdb9b7 100644 --- a/src/views/business/certManage/apply/apply-interface.ts +++ b/src/views/business/certManage/apply/apply-interface.ts @@ -31,7 +31,7 @@ // 表单 export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 changeApplyNo: string // 申请单编号 changeApplyName: string // 申请单名称 createUserId: string // 创建人id diff --git a/src/views/business/certManage/apply/components/basic.vue b/src/views/business/certManage/apply/components/basic.vue index 3be1fef..bf02448 100644 --- a/src/views/business/certManage/apply/components/basic.vue +++ b/src/views/business/certManage/apply/components/basic.vue @@ -32,7 +32,7 @@ const user = useUserStore() // 用户信息 const form = ref({ labCode: '', // 实验室 - groupCode: '', // 组别 + groupCode: '', // 部门 changeApplyNo: '', // 申请单编号 changeApplyName: '', // 申请单名称 createUserId: '', // 创建人id @@ -53,13 +53,13 @@ const rules = ref({ // 校验规则 labCode: [{ required: true, message: '实验室不能为空', trigger: ['blur', 'change'] }], - groupCode: [{ required: true, message: '组别不能为空', trigger: ['blur', 'change'] }], + groupCode: [{ required: true, message: '部门不能为空', trigger: ['blur', 'change'] }], changeReportNo: [{ required: true, message: '更换证书编号不能为空', trigger: ['change', 'blur'] }], changeType: [{ required: true, message: '变更类型不能为空', trigger: ['change', 'blur'] }], }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 const changeTypeList = ref([]) // 变更类型 function getDict() { @@ -67,7 +67,7 @@ getDictByCode('bizLabCode').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) @@ -192,7 +192,7 @@ onMounted(async () => { if (props.pageType === 'edit' || props.pageType === 'detail') { form.value.labCode = $route.query.labCode as any // 实验室 - form.value.groupCode = $route.query.groupCode as string // 组别 + form.value.groupCode = $route.query.groupCode as string // 部门 form.value.changeApplyNo = $route.query.changeApplyNo as string // 申请单编号 form.value.changeApplyName = $route.query.changeApplyName as string // 申请单名称 form.value.createUserId = $route.query.createUserId as string // 创建人id @@ -236,8 +236,8 @@ - - + + diff --git a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue index b8d9940..959501b 100644 --- a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue +++ b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue @@ -18,7 +18,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 @@ -123,7 +123,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/certManage/apply/list.vue b/src/views/business/certManage/apply/list.vue index 6829e97..fb5e6c3 100644 --- a/src/views/business/certManage/apply/list.vue +++ b/src/views/business/certManage/apply/list.vue @@ -211,7 +211,7 @@ processId: row.processId, // 流程实例id taskId: row.taskId, // 任务id labCode: row.labCode, // 实验室 - groupCode: row.groupCode, // 组别 + groupCode: row.groupCode, // 部门 changeApplyNo: row.changeApplyNo, // 申请单编号 changeApplyName: row.changeApplyName, // 申请单名称 createUserId: row.createUserId, // 创建人id diff --git a/src/views/business/certManage/cert/cert-interface.ts b/src/views/business/certManage/cert/cert-interface.ts index 19d8c65..9fc92d0 100644 --- a/src/views/business/certManage/cert/cert-interface.ts +++ b/src/views/business/certManage/cert/cert-interface.ts @@ -17,7 +17,7 @@ measureValidDateStart: string // 检定有效期开始 measureValidDateEnd: string // 检定有效期结束 labCode: string // 实验室(字典code) - groupCode: string // 组别(字典code) + groupCode: string // 部门(字典code) createUserName: string // 检定员 formId: string // 表单id printStatus: string // 打印状态(未打印传1,其他状态不传) diff --git a/src/views/business/certManage/cert/list.vue b/src/views/business/certManage/cert/list.vue index 3daaec1..f21f74d 100644 --- a/src/views/business/certManage/cert/list.vue +++ b/src/views/business/certManage/cert/list.vue @@ -45,7 +45,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -197,7 +197,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -282,7 +282,7 @@ measureValidDateStart: listQuery.value.measureValidDateStart, // 检定有效期开始 measureValidDateEnd: listQuery.value.measureValidDateEnd, // 检定有效期结束 labCode: listQuery.value.labCode, // 实验室(字典code) - groupCode: listQuery.value.groupCode, // 组别(字典code) + groupCode: listQuery.value.groupCode, // 部门(字典code) createUserName: listQuery.value.createUserName, // 检定员 formId: listQuery.value.formId, // 表单id printStatus: listQuery.value.printStatus, // 打印状态(未打印传1,其他状态不传) diff --git a/src/views/business/certManage/supplement/components/basic.vue b/src/views/business/certManage/supplement/components/basic.vue index 61921e2..d5ec033 100644 --- a/src/views/business/certManage/supplement/components/basic.vue +++ b/src/views/business/certManage/supplement/components/basic.vue @@ -76,7 +76,7 @@ }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 function getDict() { // 实验室 @@ -118,7 +118,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -144,7 +144,7 @@ certificateName: '', // 证书名称 certificateNo: changeReportNo, // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/certManage/supplement/list.vue b/src/views/business/certManage/supplement/list.vue index ce4297f..0b3f696 100644 --- a/src/views/business/certManage/supplement/list.vue +++ b/src/views/business/certManage/supplement/list.vue @@ -252,7 +252,7 @@ processId: row.processId, // 流程实例id taskId: row.taskId, // 任务id labCode: row.labCode, // 实验室 - groupCode: row.groupCode, // 组别 + groupCode: row.groupCode, // 部门 ...row, }, }) @@ -352,7 +352,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/fieldTest/approve/approve-interface.ts b/src/views/business/fieldTest/approve/approve-interface.ts index ab91930..9b5bc40 100644 --- a/src/views/business/fieldTest/approve/approve-interface.ts +++ b/src/views/business/fieldTest/approve/approve-interface.ts @@ -9,7 +9,7 @@ siteExecutiveNo: string // 现场检测编号 labCode: string // 实验室 - groupCode: string // 组别、部门 + groupCode: string // 部门、部门 executiveItem: string // 测试校准检定项目 orderNo: string // 关联任务单 limit: number @@ -31,7 +31,7 @@ export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 siteExecutiveNo: string // 现场检测编号(审批编号) siteExecutiveName: string // 现场检测名字(审批名称) applyId: string // 申请人id diff --git a/src/views/business/fieldTest/approve/components/basic.vue b/src/views/business/fieldTest/approve/components/basic.vue index 5349362..98ab196 100644 --- a/src/views/business/fieldTest/approve/components/basic.vue +++ b/src/views/business/fieldTest/approve/components/basic.vue @@ -36,7 +36,7 @@ const user = useUserStore() // 用户信息 const form = ref({ labCode: '', // 实验室 - groupCode: '', // 组别 + groupCode: '', // 部门 siteExecutiveNo: '', // 现场检测编号(审批编号) siteExecutiveName: '', // 现场检测名字(审批名称) applyId: '', // 申请人id @@ -72,13 +72,13 @@ }) // -----------------------------------------字典-------------------------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 function getDict() { // 实验室 getDictByCode('bizGroupCodeEquipment').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) diff --git a/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue b/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue index 47ec902..a0031cb 100644 --- a/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue +++ b/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue @@ -27,13 +27,13 @@ const emits = defineEmits(['confirm']) const dialogFormVisible = ref(false) const labCode = ref('') // 实验室 -const groupCode = ref('') // 组别 +const groupCode = ref('') // 部门 const changeType = ref('') // 允许筛选条件改变类型 const selectByUseStatus = ref('') // 固定筛选使用状态 // 查询条件 const listQuery = ref({ approvalStatus: '0', // 审批状态类型code,导出接口不用传 - groupCode: '', // 组别--后台定义用此字段筛选部门(刘翔) + groupCode: '', // 部门--后台定义用此字段筛选部门(刘翔) directorId: '', // 负责人id equipmentName: props.equipmentName, // 设备名称 equipmentNo: '', // 设备编号 @@ -143,7 +143,7 @@ const clearList = () => { listQuery.value = { approvalStatus: '0', // 审批状态类型code,导出接口不用传 - groupCode: '', // 组别--后台定义用此字段筛选部门(刘翔) + groupCode: '', // 部门--后台定义用此字段筛选部门(刘翔) directorId: '', // 负责人id equipmentName: '', // 设备名称 equipmentNo: '', // 设备编号 @@ -207,8 +207,8 @@ /** * 弹窗初始化 * @param labCode 实验室 - * @param groupCode 组别 - * @param noChange 是否实验室和组别固定,不允许改变 + * @param groupCode 部门 + * @param noChange 是否实验室和部门固定,不允许改变 * @param selectByUseStatusType 固定筛选使用状态的类型 */ const initDialog = async (labCodeParam = '', groupCodeParam = '', changeTypeParam = '', selectByUseStatusType = '') => { @@ -216,7 +216,7 @@ listQuery.value.labCode = labCodeParam listQuery.value.groupCode = groupCodeParam labCode.value = labCodeParam// 实验室 - groupCode.value = groupCodeParam// 组别 + groupCode.value = groupCodeParam// 部门 changeType.value = changeTypeParam// 允许筛选条件改变类型 selectByUseStatus.value = selectByUseStatusType dialogFormVisible.value = true diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue index f730b40..6bc8b66 100644 --- a/src/views/business/fieldTest/approve/list.vue +++ b/src/views/business/fieldTest/approve/list.vue @@ -43,7 +43,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, @@ -145,7 +145,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, @@ -196,7 +196,7 @@ applyTimeStart: listQuery.value.applyTimeStart, // 申请时间开始 labCode: listQuery.value.labCode, // 实验室 - groupCode: listQuery.value.groupCode, // 组别、部门 + groupCode: listQuery.value.groupCode, // 部门、部门 executiveItem: listQuery.value.executiveItem, // 测试校准检定项目 orderNo: listQuery.value.orderNo, // 关联任务单 offset: 1, diff --git a/src/api/equipment/info/book.ts b/src/api/equipment/info/book.ts index 60cf0d2..295d4f9 100644 --- a/src/api/equipment/info/book.ts +++ b/src/api/equipment/info/book.ts @@ -9,7 +9,7 @@ return request({ url: `${prefix}/approval/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -18,7 +18,7 @@ return request({ url: `${prefix}/save`, method: 'post', - data + data, }) } @@ -27,7 +27,7 @@ return request({ url: `${prefix}/draftUpdate`, method: 'post', - data + data, }) } // 编辑 @@ -35,7 +35,7 @@ return request({ url: `${prefix}/failUpdate`, method: 'post', - data + data, }) } @@ -44,7 +44,7 @@ return request({ url: `${prefix}/detail`, method: 'post', - data + data, }) } @@ -59,7 +59,7 @@ return request({ url: `${prefix}/submit`, method: 'post', - data + data, }) } @@ -68,7 +68,7 @@ return request({ url: `${prefix}/draftDelete`, method: 'post', - data + data, }) } @@ -77,7 +77,7 @@ return request({ url: `${prefix}/approval/delete`, method: 'post', - data + data, }) } @@ -86,7 +86,7 @@ return request({ url: `${prefix}/circulationLog/listPage`, method: 'post', - data + data, }) } @@ -99,7 +99,7 @@ return request({ url: `${prefix}/status/log/list`, method: 'get', - params + params, }) } @@ -112,7 +112,7 @@ return request({ url: `${prefix}/approval/revoke`, method: 'post', - data + data, }) } @@ -125,7 +125,7 @@ return request({ url: `${prefix}/approval/refuse`, method: 'post', - data + data, }) } @@ -134,7 +134,7 @@ return request({ url: `${prefix}/remind`, method: 'post', - data + data, }) } @@ -143,11 +143,11 @@ return request({ url: `${prefix}/import`, method: 'post', - data + data, }) } -// 根据实验室代码和组别获取deptId +// 根据实验室代码和部门获取deptId export function getDeptIdByLabAndGroup(params: { labCode: string groupNo: string @@ -155,7 +155,7 @@ return request({ url: '/system/getDeptIdByLabAndGroup', method: 'get', - params + params, }) } @@ -164,7 +164,7 @@ return request({ url: `${path}?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -173,7 +173,7 @@ return request({ url: '/equipment/certificate/listPage', method: 'post', - data + data, }) } @@ -182,7 +182,7 @@ return request({ url: '/equipment/detail/maintain/listPage', method: 'post', - data + data, }) } @@ -191,7 +191,7 @@ return request({ url: '/equipment/detail/resume/listPage', method: 'post', - data + data, }) } @@ -200,7 +200,7 @@ return request({ url: '/equipment/hasChanged', method: 'post', - data + data, }) } @@ -210,7 +210,7 @@ url: '/equipment/exportFile', method: 'post', responseType: 'blob', - data + data, }) } @@ -220,6 +220,6 @@ url: '/equipment/exportExcelFile', method: 'post', responseType: 'blob', - data + data, }) } diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 5678997..ff2d6d5 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -10,7 +10,7 @@ return request({ url: `${prefix}mgr/list`, method: 'get', - params + params, }) } @@ -19,14 +19,14 @@ return request({ url: '/system/mgr/list', method: 'get', - params + params, }) } // 获取用户所在单位 export function getUserDept() { return request({ - url: '/system/company' + url: '/system/company', }) } @@ -43,7 +43,7 @@ return request({ url: `${prefix}mgr/delete`, method: 'post', - data + data, }) } @@ -52,7 +52,7 @@ return request({ url: `${prefix}mgr/freeze`, method: 'post', - data + data, }) } // 冻结用户 @@ -60,7 +60,7 @@ return request({ url: `${prefix}mgr/unfreeze`, method: 'post', - data + data, }) } @@ -69,7 +69,7 @@ return request({ url: 'sys/mgr/reset', method: 'post', - data + data, }) } @@ -80,17 +80,17 @@ method: 'post', data: { userId, - roleIds: ids - } + roleIds: ids, + }, // paramsSerializer: (params) => qs.stringify(params, { indices: false }) }) } -// 获取用户实验室代码和组别 +// 获取用户实验室代码和部门 export function getLabAndGroup(params: { deptId: string }) { return request({ url: '/system/labAndGroup', method: 'get', - params + params, }) } diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 102ce61..400bf48 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -34,11 +34,11 @@ isLogout: 0, // 是否被退出登录 bizLabCode: localStorage.bizLabCode || '', // 实验室 labCodeName: localStorage.labCodeName || '', // 实验室名称 - groupNo: localStorage.groupNo || '', // 组别 - groupName: localStorage.groupName || '' // 组别名称 + groupNo: localStorage.groupNo || '', // 部门 + groupName: localStorage.groupName || '', // 部门名称 }), getters: { - isLogin: state => { + isLogin: (state) => { let retn = false if (state.token) { retn = true @@ -46,17 +46,18 @@ return retn }, // 是否已获取用户信息 - hasUserInfo: state => { + hasUserInfo: (state) => { if (state.roleList && state.roleList.length > 0) { return true - } else { + } + else { return false } }, - getPublicKey: state => { + getPublicKey: (state) => { return state.publicKey }, - getPrivateKey: state => { + getPrivateKey: (state) => { return state.privateKey }, getMenus: (state): Menu.menu[] => { @@ -64,14 +65,14 @@ }, getBtns: (state): Menu.menu[] => { return state.btns - } + }, }, actions: { // 获取项目基础配置 getBaseConfig() { return new Promise((resolve, reject) => { getConfig() - .then(res => { + .then((res) => { this.publicKey = res.data.publicKey localStorage.setItem('publicKey', res.data.publicKey) // 保存私钥 @@ -80,7 +81,7 @@ this.isLogout = 0 resolve(res.data) }) - .catch(e => { + .catch((e) => { reject(e) }) }) @@ -94,21 +95,21 @@ }) { return new Promise((resolve, reject) => { doLogin(data) - .then(res => { + .then((res) => { localStorage.setItem('token', res.data.token) this.username = res.data.username this.token = res.data.token this.isLogout = 0 resolve() }) - .catch(error => { + .catch((error) => { reject(error) }) }) }, // 注销 logout() { - return new Promise(resolve => { + return new Promise((resolve) => { const routeStore = useRouteStore() const menuStore = useMenuStore() localStorage.removeItem('username') @@ -117,17 +118,17 @@ localStorage.removeItem('depId') localStorage.removeItem('bizLabCode') // 实验室 localStorage.removeItem('labCodeName') // 实验室 - localStorage.removeItem('groupNo') // 组别 - localStorage.removeItem('groupName') // 组别 + localStorage.removeItem('groupNo') // 部门 + localStorage.removeItem('groupName') // 部门 // localStorage.clear() this.username = '' this.token = '' this.roleList = [] this.roleNames = [] this.bizLabCode = '' // 实验室 - this.groupNo = '' // 组别 - this.labCodeName = '' // 组别 - this.groupName = '' // 组别 + this.groupNo = '' // 部门 + this.labCodeName = '' // 部门 + this.groupName = '' // 部门 routeStore.removeRoutes() menuStore.setActived(0) resolve() @@ -135,53 +136,54 @@ }, // 获取用户信息 getUserInfo() { - return new Promise(resolve => { + return new Promise((resolve) => { getInfo() - .then(res => { + .then((res) => { if (res.data.roleIds && res.data.roleIds.length > 0) { this.roleList = res.data.roleIds this.roleNames = res.data.roleNames this.roleTips = res.data.roleTips localStorage.setItem('nameId', res.data.id) localStorage.setItem('depId', res.data.deptId) - } else { + } + else { reject('该用户无角色') } if (res.data.deptId) { this.deptId = res.data.deptId this.deptName = res.data.deptName - // 获取本用户实验室代码、组别 - getLabAndGroup({ deptId: res.data.deptId }).then(res => { + // 获取本用户实验室代码、部门 + getLabAndGroup({ deptId: res.data.deptId }).then((res) => { this.bizLabCode = res.data.bizLabCode // 实验室 - this.groupNo = res.data.groupNo // 组别 + this.groupNo = res.data.groupNo // 部门 if (this.bizLabCode) { - getDictByCode('bizGroupCodeEquipment').then(response => { + getDictByCode('bizGroupCodeEquipment').then((response) => { const labCodeList = response.data const index = labCodeList.findIndex( (item: { value: string }) => - item.value === this.bizLabCode + item.value === this.bizLabCode, ) if (index !== -1) { this.labCodeName = labCodeList[index].name // 实验室 localStorage.setItem( 'labCodeName', - labCodeList[index].name + labCodeList[index].name, ) } }) } if (this.bizLabCode) { - getDictByCode('bizGroupCode').then(response => { + getDictByCode('bizGroupCode').then((response) => { const groupCodeList = response.data const index = groupCodeList.findIndex( - (item: { value: string }) => item.value === this.groupNo + (item: { value: string }) => item.value === this.groupNo, ) if (index !== -1) { this.groupName = groupCodeList[index].name localStorage.setItem( 'groupName', - groupCodeList[index].name + groupCodeList[index].name, ) } }) @@ -190,10 +192,11 @@ localStorage.setItem('bizLabCode', res.data.bizLabCode) }) // 基本信息-部门接口-查询部门类别 - getDeptList({ deptName: res.data.deptName }).then(response => { + getDeptList({ deptName: res.data.deptName }).then((response) => { this.deptType = response.data.list[0].deptType }) - } else { + } + else { reject('该用户无组织机构') } this.id = res.data.id @@ -210,13 +213,13 @@ getPermissions(currentSystem?: { name: string; code: string }) { const params = { resourceType: '', - parentCode: '' + parentCode: '', } if (currentSystem) { params.parentCode = currentSystem.code // 子系统code } - return new Promise(resolve => { - getUserMenus(params).then(response => { + return new Promise((resolve) => { + getUserMenus(params).then((response) => { const data = response.data const menus = [] // 仅菜单 const btns = [] // 非菜单 @@ -230,14 +233,14 @@ const menu_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } menus.push(menu_tmp) } const btn_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } btns.push(btn_tmp) } @@ -250,8 +253,8 @@ }, // 修改密码 editPassword(data: { oldPwd: string; newPwd: string }) { - return new Promise(resolve => { - changePwd(data).then(response => { + return new Promise((resolve) => { + changePwd(data).then((response) => { resolve(response) }) }) @@ -259,9 +262,9 @@ // 被退出登录 toLogout() { this.isLogout += 1 - } - } - } + }, + }, + }, ) export default useUserStore diff --git a/src/views/business/certManage/apply/apply-interface.ts b/src/views/business/certManage/apply/apply-interface.ts index 5595f43..1fdb9b7 100644 --- a/src/views/business/certManage/apply/apply-interface.ts +++ b/src/views/business/certManage/apply/apply-interface.ts @@ -31,7 +31,7 @@ // 表单 export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 changeApplyNo: string // 申请单编号 changeApplyName: string // 申请单名称 createUserId: string // 创建人id diff --git a/src/views/business/certManage/apply/components/basic.vue b/src/views/business/certManage/apply/components/basic.vue index 3be1fef..bf02448 100644 --- a/src/views/business/certManage/apply/components/basic.vue +++ b/src/views/business/certManage/apply/components/basic.vue @@ -32,7 +32,7 @@ const user = useUserStore() // 用户信息 const form = ref({ labCode: '', // 实验室 - groupCode: '', // 组别 + groupCode: '', // 部门 changeApplyNo: '', // 申请单编号 changeApplyName: '', // 申请单名称 createUserId: '', // 创建人id @@ -53,13 +53,13 @@ const rules = ref({ // 校验规则 labCode: [{ required: true, message: '实验室不能为空', trigger: ['blur', 'change'] }], - groupCode: [{ required: true, message: '组别不能为空', trigger: ['blur', 'change'] }], + groupCode: [{ required: true, message: '部门不能为空', trigger: ['blur', 'change'] }], changeReportNo: [{ required: true, message: '更换证书编号不能为空', trigger: ['change', 'blur'] }], changeType: [{ required: true, message: '变更类型不能为空', trigger: ['change', 'blur'] }], }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 const changeTypeList = ref([]) // 变更类型 function getDict() { @@ -67,7 +67,7 @@ getDictByCode('bizLabCode').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) @@ -192,7 +192,7 @@ onMounted(async () => { if (props.pageType === 'edit' || props.pageType === 'detail') { form.value.labCode = $route.query.labCode as any // 实验室 - form.value.groupCode = $route.query.groupCode as string // 组别 + form.value.groupCode = $route.query.groupCode as string // 部门 form.value.changeApplyNo = $route.query.changeApplyNo as string // 申请单编号 form.value.changeApplyName = $route.query.changeApplyName as string // 申请单名称 form.value.createUserId = $route.query.createUserId as string // 创建人id @@ -236,8 +236,8 @@ - - + + diff --git a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue index b8d9940..959501b 100644 --- a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue +++ b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue @@ -18,7 +18,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 @@ -123,7 +123,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/certManage/apply/list.vue b/src/views/business/certManage/apply/list.vue index 6829e97..fb5e6c3 100644 --- a/src/views/business/certManage/apply/list.vue +++ b/src/views/business/certManage/apply/list.vue @@ -211,7 +211,7 @@ processId: row.processId, // 流程实例id taskId: row.taskId, // 任务id labCode: row.labCode, // 实验室 - groupCode: row.groupCode, // 组别 + groupCode: row.groupCode, // 部门 changeApplyNo: row.changeApplyNo, // 申请单编号 changeApplyName: row.changeApplyName, // 申请单名称 createUserId: row.createUserId, // 创建人id diff --git a/src/views/business/certManage/cert/cert-interface.ts b/src/views/business/certManage/cert/cert-interface.ts index 19d8c65..9fc92d0 100644 --- a/src/views/business/certManage/cert/cert-interface.ts +++ b/src/views/business/certManage/cert/cert-interface.ts @@ -17,7 +17,7 @@ measureValidDateStart: string // 检定有效期开始 measureValidDateEnd: string // 检定有效期结束 labCode: string // 实验室(字典code) - groupCode: string // 组别(字典code) + groupCode: string // 部门(字典code) createUserName: string // 检定员 formId: string // 表单id printStatus: string // 打印状态(未打印传1,其他状态不传) diff --git a/src/views/business/certManage/cert/list.vue b/src/views/business/certManage/cert/list.vue index 3daaec1..f21f74d 100644 --- a/src/views/business/certManage/cert/list.vue +++ b/src/views/business/certManage/cert/list.vue @@ -45,7 +45,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -197,7 +197,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -282,7 +282,7 @@ measureValidDateStart: listQuery.value.measureValidDateStart, // 检定有效期开始 measureValidDateEnd: listQuery.value.measureValidDateEnd, // 检定有效期结束 labCode: listQuery.value.labCode, // 实验室(字典code) - groupCode: listQuery.value.groupCode, // 组别(字典code) + groupCode: listQuery.value.groupCode, // 部门(字典code) createUserName: listQuery.value.createUserName, // 检定员 formId: listQuery.value.formId, // 表单id printStatus: listQuery.value.printStatus, // 打印状态(未打印传1,其他状态不传) diff --git a/src/views/business/certManage/supplement/components/basic.vue b/src/views/business/certManage/supplement/components/basic.vue index 61921e2..d5ec033 100644 --- a/src/views/business/certManage/supplement/components/basic.vue +++ b/src/views/business/certManage/supplement/components/basic.vue @@ -76,7 +76,7 @@ }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 function getDict() { // 实验室 @@ -118,7 +118,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -144,7 +144,7 @@ certificateName: '', // 证书名称 certificateNo: changeReportNo, // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/certManage/supplement/list.vue b/src/views/business/certManage/supplement/list.vue index ce4297f..0b3f696 100644 --- a/src/views/business/certManage/supplement/list.vue +++ b/src/views/business/certManage/supplement/list.vue @@ -252,7 +252,7 @@ processId: row.processId, // 流程实例id taskId: row.taskId, // 任务id labCode: row.labCode, // 实验室 - groupCode: row.groupCode, // 组别 + groupCode: row.groupCode, // 部门 ...row, }, }) @@ -352,7 +352,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/fieldTest/approve/approve-interface.ts b/src/views/business/fieldTest/approve/approve-interface.ts index ab91930..9b5bc40 100644 --- a/src/views/business/fieldTest/approve/approve-interface.ts +++ b/src/views/business/fieldTest/approve/approve-interface.ts @@ -9,7 +9,7 @@ siteExecutiveNo: string // 现场检测编号 labCode: string // 实验室 - groupCode: string // 组别、部门 + groupCode: string // 部门、部门 executiveItem: string // 测试校准检定项目 orderNo: string // 关联任务单 limit: number @@ -31,7 +31,7 @@ export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 siteExecutiveNo: string // 现场检测编号(审批编号) siteExecutiveName: string // 现场检测名字(审批名称) applyId: string // 申请人id diff --git a/src/views/business/fieldTest/approve/components/basic.vue b/src/views/business/fieldTest/approve/components/basic.vue index 5349362..98ab196 100644 --- a/src/views/business/fieldTest/approve/components/basic.vue +++ b/src/views/business/fieldTest/approve/components/basic.vue @@ -36,7 +36,7 @@ const user = useUserStore() // 用户信息 const form = ref({ labCode: '', // 实验室 - groupCode: '', // 组别 + groupCode: '', // 部门 siteExecutiveNo: '', // 现场检测编号(审批编号) siteExecutiveName: '', // 现场检测名字(审批名称) applyId: '', // 申请人id @@ -72,13 +72,13 @@ }) // -----------------------------------------字典-------------------------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 function getDict() { // 实验室 getDictByCode('bizGroupCodeEquipment').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) diff --git a/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue b/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue index 47ec902..a0031cb 100644 --- a/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue +++ b/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue @@ -27,13 +27,13 @@ const emits = defineEmits(['confirm']) const dialogFormVisible = ref(false) const labCode = ref('') // 实验室 -const groupCode = ref('') // 组别 +const groupCode = ref('') // 部门 const changeType = ref('') // 允许筛选条件改变类型 const selectByUseStatus = ref('') // 固定筛选使用状态 // 查询条件 const listQuery = ref({ approvalStatus: '0', // 审批状态类型code,导出接口不用传 - groupCode: '', // 组别--后台定义用此字段筛选部门(刘翔) + groupCode: '', // 部门--后台定义用此字段筛选部门(刘翔) directorId: '', // 负责人id equipmentName: props.equipmentName, // 设备名称 equipmentNo: '', // 设备编号 @@ -143,7 +143,7 @@ const clearList = () => { listQuery.value = { approvalStatus: '0', // 审批状态类型code,导出接口不用传 - groupCode: '', // 组别--后台定义用此字段筛选部门(刘翔) + groupCode: '', // 部门--后台定义用此字段筛选部门(刘翔) directorId: '', // 负责人id equipmentName: '', // 设备名称 equipmentNo: '', // 设备编号 @@ -207,8 +207,8 @@ /** * 弹窗初始化 * @param labCode 实验室 - * @param groupCode 组别 - * @param noChange 是否实验室和组别固定,不允许改变 + * @param groupCode 部门 + * @param noChange 是否实验室和部门固定,不允许改变 * @param selectByUseStatusType 固定筛选使用状态的类型 */ const initDialog = async (labCodeParam = '', groupCodeParam = '', changeTypeParam = '', selectByUseStatusType = '') => { @@ -216,7 +216,7 @@ listQuery.value.labCode = labCodeParam listQuery.value.groupCode = groupCodeParam labCode.value = labCodeParam// 实验室 - groupCode.value = groupCodeParam// 组别 + groupCode.value = groupCodeParam// 部门 changeType.value = changeTypeParam// 允许筛选条件改变类型 selectByUseStatus.value = selectByUseStatusType dialogFormVisible.value = true diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue index f730b40..6bc8b66 100644 --- a/src/views/business/fieldTest/approve/list.vue +++ b/src/views/business/fieldTest/approve/list.vue @@ -43,7 +43,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, @@ -145,7 +145,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, @@ -196,7 +196,7 @@ applyTimeStart: listQuery.value.applyTimeStart, // 申请时间开始 labCode: listQuery.value.labCode, // 实验室 - groupCode: listQuery.value.groupCode, // 组别、部门 + groupCode: listQuery.value.groupCode, // 部门、部门 executiveItem: listQuery.value.executiveItem, // 测试校准检定项目 orderNo: listQuery.value.orderNo, // 关联任务单 offset: 1, diff --git a/src/views/business/fieldTest/record/dialog/selectFieldTestApprove.vue b/src/views/business/fieldTest/record/dialog/selectFieldTestApprove.vue index 43ef3d7..be4a469 100644 --- a/src/views/business/fieldTest/record/dialog/selectFieldTestApprove.vue +++ b/src/views/business/fieldTest/record/dialog/selectFieldTestApprove.vue @@ -21,7 +21,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, @@ -76,7 +76,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, diff --git a/src/api/equipment/info/book.ts b/src/api/equipment/info/book.ts index 60cf0d2..295d4f9 100644 --- a/src/api/equipment/info/book.ts +++ b/src/api/equipment/info/book.ts @@ -9,7 +9,7 @@ return request({ url: `${prefix}/approval/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -18,7 +18,7 @@ return request({ url: `${prefix}/save`, method: 'post', - data + data, }) } @@ -27,7 +27,7 @@ return request({ url: `${prefix}/draftUpdate`, method: 'post', - data + data, }) } // 编辑 @@ -35,7 +35,7 @@ return request({ url: `${prefix}/failUpdate`, method: 'post', - data + data, }) } @@ -44,7 +44,7 @@ return request({ url: `${prefix}/detail`, method: 'post', - data + data, }) } @@ -59,7 +59,7 @@ return request({ url: `${prefix}/submit`, method: 'post', - data + data, }) } @@ -68,7 +68,7 @@ return request({ url: `${prefix}/draftDelete`, method: 'post', - data + data, }) } @@ -77,7 +77,7 @@ return request({ url: `${prefix}/approval/delete`, method: 'post', - data + data, }) } @@ -86,7 +86,7 @@ return request({ url: `${prefix}/circulationLog/listPage`, method: 'post', - data + data, }) } @@ -99,7 +99,7 @@ return request({ url: `${prefix}/status/log/list`, method: 'get', - params + params, }) } @@ -112,7 +112,7 @@ return request({ url: `${prefix}/approval/revoke`, method: 'post', - data + data, }) } @@ -125,7 +125,7 @@ return request({ url: `${prefix}/approval/refuse`, method: 'post', - data + data, }) } @@ -134,7 +134,7 @@ return request({ url: `${prefix}/remind`, method: 'post', - data + data, }) } @@ -143,11 +143,11 @@ return request({ url: `${prefix}/import`, method: 'post', - data + data, }) } -// 根据实验室代码和组别获取deptId +// 根据实验室代码和部门获取deptId export function getDeptIdByLabAndGroup(params: { labCode: string groupNo: string @@ -155,7 +155,7 @@ return request({ url: '/system/getDeptIdByLabAndGroup', method: 'get', - params + params, }) } @@ -164,7 +164,7 @@ return request({ url: `${path}?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -173,7 +173,7 @@ return request({ url: '/equipment/certificate/listPage', method: 'post', - data + data, }) } @@ -182,7 +182,7 @@ return request({ url: '/equipment/detail/maintain/listPage', method: 'post', - data + data, }) } @@ -191,7 +191,7 @@ return request({ url: '/equipment/detail/resume/listPage', method: 'post', - data + data, }) } @@ -200,7 +200,7 @@ return request({ url: '/equipment/hasChanged', method: 'post', - data + data, }) } @@ -210,7 +210,7 @@ url: '/equipment/exportFile', method: 'post', responseType: 'blob', - data + data, }) } @@ -220,6 +220,6 @@ url: '/equipment/exportExcelFile', method: 'post', responseType: 'blob', - data + data, }) } diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 5678997..ff2d6d5 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -10,7 +10,7 @@ return request({ url: `${prefix}mgr/list`, method: 'get', - params + params, }) } @@ -19,14 +19,14 @@ return request({ url: '/system/mgr/list', method: 'get', - params + params, }) } // 获取用户所在单位 export function getUserDept() { return request({ - url: '/system/company' + url: '/system/company', }) } @@ -43,7 +43,7 @@ return request({ url: `${prefix}mgr/delete`, method: 'post', - data + data, }) } @@ -52,7 +52,7 @@ return request({ url: `${prefix}mgr/freeze`, method: 'post', - data + data, }) } // 冻结用户 @@ -60,7 +60,7 @@ return request({ url: `${prefix}mgr/unfreeze`, method: 'post', - data + data, }) } @@ -69,7 +69,7 @@ return request({ url: 'sys/mgr/reset', method: 'post', - data + data, }) } @@ -80,17 +80,17 @@ method: 'post', data: { userId, - roleIds: ids - } + roleIds: ids, + }, // paramsSerializer: (params) => qs.stringify(params, { indices: false }) }) } -// 获取用户实验室代码和组别 +// 获取用户实验室代码和部门 export function getLabAndGroup(params: { deptId: string }) { return request({ url: '/system/labAndGroup', method: 'get', - params + params, }) } diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 102ce61..400bf48 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -34,11 +34,11 @@ isLogout: 0, // 是否被退出登录 bizLabCode: localStorage.bizLabCode || '', // 实验室 labCodeName: localStorage.labCodeName || '', // 实验室名称 - groupNo: localStorage.groupNo || '', // 组别 - groupName: localStorage.groupName || '' // 组别名称 + groupNo: localStorage.groupNo || '', // 部门 + groupName: localStorage.groupName || '', // 部门名称 }), getters: { - isLogin: state => { + isLogin: (state) => { let retn = false if (state.token) { retn = true @@ -46,17 +46,18 @@ return retn }, // 是否已获取用户信息 - hasUserInfo: state => { + hasUserInfo: (state) => { if (state.roleList && state.roleList.length > 0) { return true - } else { + } + else { return false } }, - getPublicKey: state => { + getPublicKey: (state) => { return state.publicKey }, - getPrivateKey: state => { + getPrivateKey: (state) => { return state.privateKey }, getMenus: (state): Menu.menu[] => { @@ -64,14 +65,14 @@ }, getBtns: (state): Menu.menu[] => { return state.btns - } + }, }, actions: { // 获取项目基础配置 getBaseConfig() { return new Promise((resolve, reject) => { getConfig() - .then(res => { + .then((res) => { this.publicKey = res.data.publicKey localStorage.setItem('publicKey', res.data.publicKey) // 保存私钥 @@ -80,7 +81,7 @@ this.isLogout = 0 resolve(res.data) }) - .catch(e => { + .catch((e) => { reject(e) }) }) @@ -94,21 +95,21 @@ }) { return new Promise((resolve, reject) => { doLogin(data) - .then(res => { + .then((res) => { localStorage.setItem('token', res.data.token) this.username = res.data.username this.token = res.data.token this.isLogout = 0 resolve() }) - .catch(error => { + .catch((error) => { reject(error) }) }) }, // 注销 logout() { - return new Promise(resolve => { + return new Promise((resolve) => { const routeStore = useRouteStore() const menuStore = useMenuStore() localStorage.removeItem('username') @@ -117,17 +118,17 @@ localStorage.removeItem('depId') localStorage.removeItem('bizLabCode') // 实验室 localStorage.removeItem('labCodeName') // 实验室 - localStorage.removeItem('groupNo') // 组别 - localStorage.removeItem('groupName') // 组别 + localStorage.removeItem('groupNo') // 部门 + localStorage.removeItem('groupName') // 部门 // localStorage.clear() this.username = '' this.token = '' this.roleList = [] this.roleNames = [] this.bizLabCode = '' // 实验室 - this.groupNo = '' // 组别 - this.labCodeName = '' // 组别 - this.groupName = '' // 组别 + this.groupNo = '' // 部门 + this.labCodeName = '' // 部门 + this.groupName = '' // 部门 routeStore.removeRoutes() menuStore.setActived(0) resolve() @@ -135,53 +136,54 @@ }, // 获取用户信息 getUserInfo() { - return new Promise(resolve => { + return new Promise((resolve) => { getInfo() - .then(res => { + .then((res) => { if (res.data.roleIds && res.data.roleIds.length > 0) { this.roleList = res.data.roleIds this.roleNames = res.data.roleNames this.roleTips = res.data.roleTips localStorage.setItem('nameId', res.data.id) localStorage.setItem('depId', res.data.deptId) - } else { + } + else { reject('该用户无角色') } if (res.data.deptId) { this.deptId = res.data.deptId this.deptName = res.data.deptName - // 获取本用户实验室代码、组别 - getLabAndGroup({ deptId: res.data.deptId }).then(res => { + // 获取本用户实验室代码、部门 + getLabAndGroup({ deptId: res.data.deptId }).then((res) => { this.bizLabCode = res.data.bizLabCode // 实验室 - this.groupNo = res.data.groupNo // 组别 + this.groupNo = res.data.groupNo // 部门 if (this.bizLabCode) { - getDictByCode('bizGroupCodeEquipment').then(response => { + getDictByCode('bizGroupCodeEquipment').then((response) => { const labCodeList = response.data const index = labCodeList.findIndex( (item: { value: string }) => - item.value === this.bizLabCode + item.value === this.bizLabCode, ) if (index !== -1) { this.labCodeName = labCodeList[index].name // 实验室 localStorage.setItem( 'labCodeName', - labCodeList[index].name + labCodeList[index].name, ) } }) } if (this.bizLabCode) { - getDictByCode('bizGroupCode').then(response => { + getDictByCode('bizGroupCode').then((response) => { const groupCodeList = response.data const index = groupCodeList.findIndex( - (item: { value: string }) => item.value === this.groupNo + (item: { value: string }) => item.value === this.groupNo, ) if (index !== -1) { this.groupName = groupCodeList[index].name localStorage.setItem( 'groupName', - groupCodeList[index].name + groupCodeList[index].name, ) } }) @@ -190,10 +192,11 @@ localStorage.setItem('bizLabCode', res.data.bizLabCode) }) // 基本信息-部门接口-查询部门类别 - getDeptList({ deptName: res.data.deptName }).then(response => { + getDeptList({ deptName: res.data.deptName }).then((response) => { this.deptType = response.data.list[0].deptType }) - } else { + } + else { reject('该用户无组织机构') } this.id = res.data.id @@ -210,13 +213,13 @@ getPermissions(currentSystem?: { name: string; code: string }) { const params = { resourceType: '', - parentCode: '' + parentCode: '', } if (currentSystem) { params.parentCode = currentSystem.code // 子系统code } - return new Promise(resolve => { - getUserMenus(params).then(response => { + return new Promise((resolve) => { + getUserMenus(params).then((response) => { const data = response.data const menus = [] // 仅菜单 const btns = [] // 非菜单 @@ -230,14 +233,14 @@ const menu_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } menus.push(menu_tmp) } const btn_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } btns.push(btn_tmp) } @@ -250,8 +253,8 @@ }, // 修改密码 editPassword(data: { oldPwd: string; newPwd: string }) { - return new Promise(resolve => { - changePwd(data).then(response => { + return new Promise((resolve) => { + changePwd(data).then((response) => { resolve(response) }) }) @@ -259,9 +262,9 @@ // 被退出登录 toLogout() { this.isLogout += 1 - } - } - } + }, + }, + }, ) export default useUserStore diff --git a/src/views/business/certManage/apply/apply-interface.ts b/src/views/business/certManage/apply/apply-interface.ts index 5595f43..1fdb9b7 100644 --- a/src/views/business/certManage/apply/apply-interface.ts +++ b/src/views/business/certManage/apply/apply-interface.ts @@ -31,7 +31,7 @@ // 表单 export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 changeApplyNo: string // 申请单编号 changeApplyName: string // 申请单名称 createUserId: string // 创建人id diff --git a/src/views/business/certManage/apply/components/basic.vue b/src/views/business/certManage/apply/components/basic.vue index 3be1fef..bf02448 100644 --- a/src/views/business/certManage/apply/components/basic.vue +++ b/src/views/business/certManage/apply/components/basic.vue @@ -32,7 +32,7 @@ const user = useUserStore() // 用户信息 const form = ref({ labCode: '', // 实验室 - groupCode: '', // 组别 + groupCode: '', // 部门 changeApplyNo: '', // 申请单编号 changeApplyName: '', // 申请单名称 createUserId: '', // 创建人id @@ -53,13 +53,13 @@ const rules = ref({ // 校验规则 labCode: [{ required: true, message: '实验室不能为空', trigger: ['blur', 'change'] }], - groupCode: [{ required: true, message: '组别不能为空', trigger: ['blur', 'change'] }], + groupCode: [{ required: true, message: '部门不能为空', trigger: ['blur', 'change'] }], changeReportNo: [{ required: true, message: '更换证书编号不能为空', trigger: ['change', 'blur'] }], changeType: [{ required: true, message: '变更类型不能为空', trigger: ['change', 'blur'] }], }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 const changeTypeList = ref([]) // 变更类型 function getDict() { @@ -67,7 +67,7 @@ getDictByCode('bizLabCode').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) @@ -192,7 +192,7 @@ onMounted(async () => { if (props.pageType === 'edit' || props.pageType === 'detail') { form.value.labCode = $route.query.labCode as any // 实验室 - form.value.groupCode = $route.query.groupCode as string // 组别 + form.value.groupCode = $route.query.groupCode as string // 部门 form.value.changeApplyNo = $route.query.changeApplyNo as string // 申请单编号 form.value.changeApplyName = $route.query.changeApplyName as string // 申请单名称 form.value.createUserId = $route.query.createUserId as string // 创建人id @@ -236,8 +236,8 @@ - - + + diff --git a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue index b8d9940..959501b 100644 --- a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue +++ b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue @@ -18,7 +18,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 @@ -123,7 +123,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/certManage/apply/list.vue b/src/views/business/certManage/apply/list.vue index 6829e97..fb5e6c3 100644 --- a/src/views/business/certManage/apply/list.vue +++ b/src/views/business/certManage/apply/list.vue @@ -211,7 +211,7 @@ processId: row.processId, // 流程实例id taskId: row.taskId, // 任务id labCode: row.labCode, // 实验室 - groupCode: row.groupCode, // 组别 + groupCode: row.groupCode, // 部门 changeApplyNo: row.changeApplyNo, // 申请单编号 changeApplyName: row.changeApplyName, // 申请单名称 createUserId: row.createUserId, // 创建人id diff --git a/src/views/business/certManage/cert/cert-interface.ts b/src/views/business/certManage/cert/cert-interface.ts index 19d8c65..9fc92d0 100644 --- a/src/views/business/certManage/cert/cert-interface.ts +++ b/src/views/business/certManage/cert/cert-interface.ts @@ -17,7 +17,7 @@ measureValidDateStart: string // 检定有效期开始 measureValidDateEnd: string // 检定有效期结束 labCode: string // 实验室(字典code) - groupCode: string // 组别(字典code) + groupCode: string // 部门(字典code) createUserName: string // 检定员 formId: string // 表单id printStatus: string // 打印状态(未打印传1,其他状态不传) diff --git a/src/views/business/certManage/cert/list.vue b/src/views/business/certManage/cert/list.vue index 3daaec1..f21f74d 100644 --- a/src/views/business/certManage/cert/list.vue +++ b/src/views/business/certManage/cert/list.vue @@ -45,7 +45,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -197,7 +197,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -282,7 +282,7 @@ measureValidDateStart: listQuery.value.measureValidDateStart, // 检定有效期开始 measureValidDateEnd: listQuery.value.measureValidDateEnd, // 检定有效期结束 labCode: listQuery.value.labCode, // 实验室(字典code) - groupCode: listQuery.value.groupCode, // 组别(字典code) + groupCode: listQuery.value.groupCode, // 部门(字典code) createUserName: listQuery.value.createUserName, // 检定员 formId: listQuery.value.formId, // 表单id printStatus: listQuery.value.printStatus, // 打印状态(未打印传1,其他状态不传) diff --git a/src/views/business/certManage/supplement/components/basic.vue b/src/views/business/certManage/supplement/components/basic.vue index 61921e2..d5ec033 100644 --- a/src/views/business/certManage/supplement/components/basic.vue +++ b/src/views/business/certManage/supplement/components/basic.vue @@ -76,7 +76,7 @@ }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 function getDict() { // 实验室 @@ -118,7 +118,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -144,7 +144,7 @@ certificateName: '', // 证书名称 certificateNo: changeReportNo, // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/certManage/supplement/list.vue b/src/views/business/certManage/supplement/list.vue index ce4297f..0b3f696 100644 --- a/src/views/business/certManage/supplement/list.vue +++ b/src/views/business/certManage/supplement/list.vue @@ -252,7 +252,7 @@ processId: row.processId, // 流程实例id taskId: row.taskId, // 任务id labCode: row.labCode, // 实验室 - groupCode: row.groupCode, // 组别 + groupCode: row.groupCode, // 部门 ...row, }, }) @@ -352,7 +352,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/fieldTest/approve/approve-interface.ts b/src/views/business/fieldTest/approve/approve-interface.ts index ab91930..9b5bc40 100644 --- a/src/views/business/fieldTest/approve/approve-interface.ts +++ b/src/views/business/fieldTest/approve/approve-interface.ts @@ -9,7 +9,7 @@ siteExecutiveNo: string // 现场检测编号 labCode: string // 实验室 - groupCode: string // 组别、部门 + groupCode: string // 部门、部门 executiveItem: string // 测试校准检定项目 orderNo: string // 关联任务单 limit: number @@ -31,7 +31,7 @@ export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 siteExecutiveNo: string // 现场检测编号(审批编号) siteExecutiveName: string // 现场检测名字(审批名称) applyId: string // 申请人id diff --git a/src/views/business/fieldTest/approve/components/basic.vue b/src/views/business/fieldTest/approve/components/basic.vue index 5349362..98ab196 100644 --- a/src/views/business/fieldTest/approve/components/basic.vue +++ b/src/views/business/fieldTest/approve/components/basic.vue @@ -36,7 +36,7 @@ const user = useUserStore() // 用户信息 const form = ref({ labCode: '', // 实验室 - groupCode: '', // 组别 + groupCode: '', // 部门 siteExecutiveNo: '', // 现场检测编号(审批编号) siteExecutiveName: '', // 现场检测名字(审批名称) applyId: '', // 申请人id @@ -72,13 +72,13 @@ }) // -----------------------------------------字典-------------------------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 function getDict() { // 实验室 getDictByCode('bizGroupCodeEquipment').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) diff --git a/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue b/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue index 47ec902..a0031cb 100644 --- a/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue +++ b/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue @@ -27,13 +27,13 @@ const emits = defineEmits(['confirm']) const dialogFormVisible = ref(false) const labCode = ref('') // 实验室 -const groupCode = ref('') // 组别 +const groupCode = ref('') // 部门 const changeType = ref('') // 允许筛选条件改变类型 const selectByUseStatus = ref('') // 固定筛选使用状态 // 查询条件 const listQuery = ref({ approvalStatus: '0', // 审批状态类型code,导出接口不用传 - groupCode: '', // 组别--后台定义用此字段筛选部门(刘翔) + groupCode: '', // 部门--后台定义用此字段筛选部门(刘翔) directorId: '', // 负责人id equipmentName: props.equipmentName, // 设备名称 equipmentNo: '', // 设备编号 @@ -143,7 +143,7 @@ const clearList = () => { listQuery.value = { approvalStatus: '0', // 审批状态类型code,导出接口不用传 - groupCode: '', // 组别--后台定义用此字段筛选部门(刘翔) + groupCode: '', // 部门--后台定义用此字段筛选部门(刘翔) directorId: '', // 负责人id equipmentName: '', // 设备名称 equipmentNo: '', // 设备编号 @@ -207,8 +207,8 @@ /** * 弹窗初始化 * @param labCode 实验室 - * @param groupCode 组别 - * @param noChange 是否实验室和组别固定,不允许改变 + * @param groupCode 部门 + * @param noChange 是否实验室和部门固定,不允许改变 * @param selectByUseStatusType 固定筛选使用状态的类型 */ const initDialog = async (labCodeParam = '', groupCodeParam = '', changeTypeParam = '', selectByUseStatusType = '') => { @@ -216,7 +216,7 @@ listQuery.value.labCode = labCodeParam listQuery.value.groupCode = groupCodeParam labCode.value = labCodeParam// 实验室 - groupCode.value = groupCodeParam// 组别 + groupCode.value = groupCodeParam// 部门 changeType.value = changeTypeParam// 允许筛选条件改变类型 selectByUseStatus.value = selectByUseStatusType dialogFormVisible.value = true diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue index f730b40..6bc8b66 100644 --- a/src/views/business/fieldTest/approve/list.vue +++ b/src/views/business/fieldTest/approve/list.vue @@ -43,7 +43,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, @@ -145,7 +145,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, @@ -196,7 +196,7 @@ applyTimeStart: listQuery.value.applyTimeStart, // 申请时间开始 labCode: listQuery.value.labCode, // 实验室 - groupCode: listQuery.value.groupCode, // 组别、部门 + groupCode: listQuery.value.groupCode, // 部门、部门 executiveItem: listQuery.value.executiveItem, // 测试校准检定项目 orderNo: listQuery.value.orderNo, // 关联任务单 offset: 1, diff --git a/src/views/business/fieldTest/record/dialog/selectFieldTestApprove.vue b/src/views/business/fieldTest/record/dialog/selectFieldTestApprove.vue index 43ef3d7..be4a469 100644 --- a/src/views/business/fieldTest/record/dialog/selectFieldTestApprove.vue +++ b/src/views/business/fieldTest/record/dialog/selectFieldTestApprove.vue @@ -21,7 +21,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, @@ -76,7 +76,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, diff --git a/src/views/business/fieldTest/record/edit.vue b/src/views/business/fieldTest/record/edit.vue index 9f30b7b..8d9765d 100644 --- a/src/views/business/fieldTest/record/edit.vue +++ b/src/views/business/fieldTest/record/edit.vue @@ -30,8 +30,8 @@ const form = ref({ labCode: '', // 实验室 labCodeName: '', // 实验室名称 - groupCode: '', // 组别 - groupCodeName: '', // 组别(字典value) + groupCode: '', // 部门 + groupCodeName: '', // 部门(字典value) logNo: '', // 记录单编号 logName: '', // 记录单名称 createUserId: '', // 创建人id @@ -84,14 +84,14 @@ // -------------------------------------------字典------------------------------------------ const userList = ref<{ [key: string]: string }[]>([]) // 用户列表 const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 // 获取字典值 async function getDict() { // 实验室 getDictByCode('bizGroupCodeEquipment').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) diff --git a/src/api/equipment/info/book.ts b/src/api/equipment/info/book.ts index 60cf0d2..295d4f9 100644 --- a/src/api/equipment/info/book.ts +++ b/src/api/equipment/info/book.ts @@ -9,7 +9,7 @@ return request({ url: `${prefix}/approval/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -18,7 +18,7 @@ return request({ url: `${prefix}/save`, method: 'post', - data + data, }) } @@ -27,7 +27,7 @@ return request({ url: `${prefix}/draftUpdate`, method: 'post', - data + data, }) } // 编辑 @@ -35,7 +35,7 @@ return request({ url: `${prefix}/failUpdate`, method: 'post', - data + data, }) } @@ -44,7 +44,7 @@ return request({ url: `${prefix}/detail`, method: 'post', - data + data, }) } @@ -59,7 +59,7 @@ return request({ url: `${prefix}/submit`, method: 'post', - data + data, }) } @@ -68,7 +68,7 @@ return request({ url: `${prefix}/draftDelete`, method: 'post', - data + data, }) } @@ -77,7 +77,7 @@ return request({ url: `${prefix}/approval/delete`, method: 'post', - data + data, }) } @@ -86,7 +86,7 @@ return request({ url: `${prefix}/circulationLog/listPage`, method: 'post', - data + data, }) } @@ -99,7 +99,7 @@ return request({ url: `${prefix}/status/log/list`, method: 'get', - params + params, }) } @@ -112,7 +112,7 @@ return request({ url: `${prefix}/approval/revoke`, method: 'post', - data + data, }) } @@ -125,7 +125,7 @@ return request({ url: `${prefix}/approval/refuse`, method: 'post', - data + data, }) } @@ -134,7 +134,7 @@ return request({ url: `${prefix}/remind`, method: 'post', - data + data, }) } @@ -143,11 +143,11 @@ return request({ url: `${prefix}/import`, method: 'post', - data + data, }) } -// 根据实验室代码和组别获取deptId +// 根据实验室代码和部门获取deptId export function getDeptIdByLabAndGroup(params: { labCode: string groupNo: string @@ -155,7 +155,7 @@ return request({ url: '/system/getDeptIdByLabAndGroup', method: 'get', - params + params, }) } @@ -164,7 +164,7 @@ return request({ url: `${path}?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -173,7 +173,7 @@ return request({ url: '/equipment/certificate/listPage', method: 'post', - data + data, }) } @@ -182,7 +182,7 @@ return request({ url: '/equipment/detail/maintain/listPage', method: 'post', - data + data, }) } @@ -191,7 +191,7 @@ return request({ url: '/equipment/detail/resume/listPage', method: 'post', - data + data, }) } @@ -200,7 +200,7 @@ return request({ url: '/equipment/hasChanged', method: 'post', - data + data, }) } @@ -210,7 +210,7 @@ url: '/equipment/exportFile', method: 'post', responseType: 'blob', - data + data, }) } @@ -220,6 +220,6 @@ url: '/equipment/exportExcelFile', method: 'post', responseType: 'blob', - data + data, }) } diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 5678997..ff2d6d5 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -10,7 +10,7 @@ return request({ url: `${prefix}mgr/list`, method: 'get', - params + params, }) } @@ -19,14 +19,14 @@ return request({ url: '/system/mgr/list', method: 'get', - params + params, }) } // 获取用户所在单位 export function getUserDept() { return request({ - url: '/system/company' + url: '/system/company', }) } @@ -43,7 +43,7 @@ return request({ url: `${prefix}mgr/delete`, method: 'post', - data + data, }) } @@ -52,7 +52,7 @@ return request({ url: `${prefix}mgr/freeze`, method: 'post', - data + data, }) } // 冻结用户 @@ -60,7 +60,7 @@ return request({ url: `${prefix}mgr/unfreeze`, method: 'post', - data + data, }) } @@ -69,7 +69,7 @@ return request({ url: 'sys/mgr/reset', method: 'post', - data + data, }) } @@ -80,17 +80,17 @@ method: 'post', data: { userId, - roleIds: ids - } + roleIds: ids, + }, // paramsSerializer: (params) => qs.stringify(params, { indices: false }) }) } -// 获取用户实验室代码和组别 +// 获取用户实验室代码和部门 export function getLabAndGroup(params: { deptId: string }) { return request({ url: '/system/labAndGroup', method: 'get', - params + params, }) } diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 102ce61..400bf48 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -34,11 +34,11 @@ isLogout: 0, // 是否被退出登录 bizLabCode: localStorage.bizLabCode || '', // 实验室 labCodeName: localStorage.labCodeName || '', // 实验室名称 - groupNo: localStorage.groupNo || '', // 组别 - groupName: localStorage.groupName || '' // 组别名称 + groupNo: localStorage.groupNo || '', // 部门 + groupName: localStorage.groupName || '', // 部门名称 }), getters: { - isLogin: state => { + isLogin: (state) => { let retn = false if (state.token) { retn = true @@ -46,17 +46,18 @@ return retn }, // 是否已获取用户信息 - hasUserInfo: state => { + hasUserInfo: (state) => { if (state.roleList && state.roleList.length > 0) { return true - } else { + } + else { return false } }, - getPublicKey: state => { + getPublicKey: (state) => { return state.publicKey }, - getPrivateKey: state => { + getPrivateKey: (state) => { return state.privateKey }, getMenus: (state): Menu.menu[] => { @@ -64,14 +65,14 @@ }, getBtns: (state): Menu.menu[] => { return state.btns - } + }, }, actions: { // 获取项目基础配置 getBaseConfig() { return new Promise((resolve, reject) => { getConfig() - .then(res => { + .then((res) => { this.publicKey = res.data.publicKey localStorage.setItem('publicKey', res.data.publicKey) // 保存私钥 @@ -80,7 +81,7 @@ this.isLogout = 0 resolve(res.data) }) - .catch(e => { + .catch((e) => { reject(e) }) }) @@ -94,21 +95,21 @@ }) { return new Promise((resolve, reject) => { doLogin(data) - .then(res => { + .then((res) => { localStorage.setItem('token', res.data.token) this.username = res.data.username this.token = res.data.token this.isLogout = 0 resolve() }) - .catch(error => { + .catch((error) => { reject(error) }) }) }, // 注销 logout() { - return new Promise(resolve => { + return new Promise((resolve) => { const routeStore = useRouteStore() const menuStore = useMenuStore() localStorage.removeItem('username') @@ -117,17 +118,17 @@ localStorage.removeItem('depId') localStorage.removeItem('bizLabCode') // 实验室 localStorage.removeItem('labCodeName') // 实验室 - localStorage.removeItem('groupNo') // 组别 - localStorage.removeItem('groupName') // 组别 + localStorage.removeItem('groupNo') // 部门 + localStorage.removeItem('groupName') // 部门 // localStorage.clear() this.username = '' this.token = '' this.roleList = [] this.roleNames = [] this.bizLabCode = '' // 实验室 - this.groupNo = '' // 组别 - this.labCodeName = '' // 组别 - this.groupName = '' // 组别 + this.groupNo = '' // 部门 + this.labCodeName = '' // 部门 + this.groupName = '' // 部门 routeStore.removeRoutes() menuStore.setActived(0) resolve() @@ -135,53 +136,54 @@ }, // 获取用户信息 getUserInfo() { - return new Promise(resolve => { + return new Promise((resolve) => { getInfo() - .then(res => { + .then((res) => { if (res.data.roleIds && res.data.roleIds.length > 0) { this.roleList = res.data.roleIds this.roleNames = res.data.roleNames this.roleTips = res.data.roleTips localStorage.setItem('nameId', res.data.id) localStorage.setItem('depId', res.data.deptId) - } else { + } + else { reject('该用户无角色') } if (res.data.deptId) { this.deptId = res.data.deptId this.deptName = res.data.deptName - // 获取本用户实验室代码、组别 - getLabAndGroup({ deptId: res.data.deptId }).then(res => { + // 获取本用户实验室代码、部门 + getLabAndGroup({ deptId: res.data.deptId }).then((res) => { this.bizLabCode = res.data.bizLabCode // 实验室 - this.groupNo = res.data.groupNo // 组别 + this.groupNo = res.data.groupNo // 部门 if (this.bizLabCode) { - getDictByCode('bizGroupCodeEquipment').then(response => { + getDictByCode('bizGroupCodeEquipment').then((response) => { const labCodeList = response.data const index = labCodeList.findIndex( (item: { value: string }) => - item.value === this.bizLabCode + item.value === this.bizLabCode, ) if (index !== -1) { this.labCodeName = labCodeList[index].name // 实验室 localStorage.setItem( 'labCodeName', - labCodeList[index].name + labCodeList[index].name, ) } }) } if (this.bizLabCode) { - getDictByCode('bizGroupCode').then(response => { + getDictByCode('bizGroupCode').then((response) => { const groupCodeList = response.data const index = groupCodeList.findIndex( - (item: { value: string }) => item.value === this.groupNo + (item: { value: string }) => item.value === this.groupNo, ) if (index !== -1) { this.groupName = groupCodeList[index].name localStorage.setItem( 'groupName', - groupCodeList[index].name + groupCodeList[index].name, ) } }) @@ -190,10 +192,11 @@ localStorage.setItem('bizLabCode', res.data.bizLabCode) }) // 基本信息-部门接口-查询部门类别 - getDeptList({ deptName: res.data.deptName }).then(response => { + getDeptList({ deptName: res.data.deptName }).then((response) => { this.deptType = response.data.list[0].deptType }) - } else { + } + else { reject('该用户无组织机构') } this.id = res.data.id @@ -210,13 +213,13 @@ getPermissions(currentSystem?: { name: string; code: string }) { const params = { resourceType: '', - parentCode: '' + parentCode: '', } if (currentSystem) { params.parentCode = currentSystem.code // 子系统code } - return new Promise(resolve => { - getUserMenus(params).then(response => { + return new Promise((resolve) => { + getUserMenus(params).then((response) => { const data = response.data const menus = [] // 仅菜单 const btns = [] // 非菜单 @@ -230,14 +233,14 @@ const menu_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } menus.push(menu_tmp) } const btn_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } btns.push(btn_tmp) } @@ -250,8 +253,8 @@ }, // 修改密码 editPassword(data: { oldPwd: string; newPwd: string }) { - return new Promise(resolve => { - changePwd(data).then(response => { + return new Promise((resolve) => { + changePwd(data).then((response) => { resolve(response) }) }) @@ -259,9 +262,9 @@ // 被退出登录 toLogout() { this.isLogout += 1 - } - } - } + }, + }, + }, ) export default useUserStore diff --git a/src/views/business/certManage/apply/apply-interface.ts b/src/views/business/certManage/apply/apply-interface.ts index 5595f43..1fdb9b7 100644 --- a/src/views/business/certManage/apply/apply-interface.ts +++ b/src/views/business/certManage/apply/apply-interface.ts @@ -31,7 +31,7 @@ // 表单 export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 changeApplyNo: string // 申请单编号 changeApplyName: string // 申请单名称 createUserId: string // 创建人id diff --git a/src/views/business/certManage/apply/components/basic.vue b/src/views/business/certManage/apply/components/basic.vue index 3be1fef..bf02448 100644 --- a/src/views/business/certManage/apply/components/basic.vue +++ b/src/views/business/certManage/apply/components/basic.vue @@ -32,7 +32,7 @@ const user = useUserStore() // 用户信息 const form = ref({ labCode: '', // 实验室 - groupCode: '', // 组别 + groupCode: '', // 部门 changeApplyNo: '', // 申请单编号 changeApplyName: '', // 申请单名称 createUserId: '', // 创建人id @@ -53,13 +53,13 @@ const rules = ref({ // 校验规则 labCode: [{ required: true, message: '实验室不能为空', trigger: ['blur', 'change'] }], - groupCode: [{ required: true, message: '组别不能为空', trigger: ['blur', 'change'] }], + groupCode: [{ required: true, message: '部门不能为空', trigger: ['blur', 'change'] }], changeReportNo: [{ required: true, message: '更换证书编号不能为空', trigger: ['change', 'blur'] }], changeType: [{ required: true, message: '变更类型不能为空', trigger: ['change', 'blur'] }], }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 const changeTypeList = ref([]) // 变更类型 function getDict() { @@ -67,7 +67,7 @@ getDictByCode('bizLabCode').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) @@ -192,7 +192,7 @@ onMounted(async () => { if (props.pageType === 'edit' || props.pageType === 'detail') { form.value.labCode = $route.query.labCode as any // 实验室 - form.value.groupCode = $route.query.groupCode as string // 组别 + form.value.groupCode = $route.query.groupCode as string // 部门 form.value.changeApplyNo = $route.query.changeApplyNo as string // 申请单编号 form.value.changeApplyName = $route.query.changeApplyName as string // 申请单名称 form.value.createUserId = $route.query.createUserId as string // 创建人id @@ -236,8 +236,8 @@ - - + + diff --git a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue index b8d9940..959501b 100644 --- a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue +++ b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue @@ -18,7 +18,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 @@ -123,7 +123,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/certManage/apply/list.vue b/src/views/business/certManage/apply/list.vue index 6829e97..fb5e6c3 100644 --- a/src/views/business/certManage/apply/list.vue +++ b/src/views/business/certManage/apply/list.vue @@ -211,7 +211,7 @@ processId: row.processId, // 流程实例id taskId: row.taskId, // 任务id labCode: row.labCode, // 实验室 - groupCode: row.groupCode, // 组别 + groupCode: row.groupCode, // 部门 changeApplyNo: row.changeApplyNo, // 申请单编号 changeApplyName: row.changeApplyName, // 申请单名称 createUserId: row.createUserId, // 创建人id diff --git a/src/views/business/certManage/cert/cert-interface.ts b/src/views/business/certManage/cert/cert-interface.ts index 19d8c65..9fc92d0 100644 --- a/src/views/business/certManage/cert/cert-interface.ts +++ b/src/views/business/certManage/cert/cert-interface.ts @@ -17,7 +17,7 @@ measureValidDateStart: string // 检定有效期开始 measureValidDateEnd: string // 检定有效期结束 labCode: string // 实验室(字典code) - groupCode: string // 组别(字典code) + groupCode: string // 部门(字典code) createUserName: string // 检定员 formId: string // 表单id printStatus: string // 打印状态(未打印传1,其他状态不传) diff --git a/src/views/business/certManage/cert/list.vue b/src/views/business/certManage/cert/list.vue index 3daaec1..f21f74d 100644 --- a/src/views/business/certManage/cert/list.vue +++ b/src/views/business/certManage/cert/list.vue @@ -45,7 +45,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -197,7 +197,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -282,7 +282,7 @@ measureValidDateStart: listQuery.value.measureValidDateStart, // 检定有效期开始 measureValidDateEnd: listQuery.value.measureValidDateEnd, // 检定有效期结束 labCode: listQuery.value.labCode, // 实验室(字典code) - groupCode: listQuery.value.groupCode, // 组别(字典code) + groupCode: listQuery.value.groupCode, // 部门(字典code) createUserName: listQuery.value.createUserName, // 检定员 formId: listQuery.value.formId, // 表单id printStatus: listQuery.value.printStatus, // 打印状态(未打印传1,其他状态不传) diff --git a/src/views/business/certManage/supplement/components/basic.vue b/src/views/business/certManage/supplement/components/basic.vue index 61921e2..d5ec033 100644 --- a/src/views/business/certManage/supplement/components/basic.vue +++ b/src/views/business/certManage/supplement/components/basic.vue @@ -76,7 +76,7 @@ }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 function getDict() { // 实验室 @@ -118,7 +118,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -144,7 +144,7 @@ certificateName: '', // 证书名称 certificateNo: changeReportNo, // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/certManage/supplement/list.vue b/src/views/business/certManage/supplement/list.vue index ce4297f..0b3f696 100644 --- a/src/views/business/certManage/supplement/list.vue +++ b/src/views/business/certManage/supplement/list.vue @@ -252,7 +252,7 @@ processId: row.processId, // 流程实例id taskId: row.taskId, // 任务id labCode: row.labCode, // 实验室 - groupCode: row.groupCode, // 组别 + groupCode: row.groupCode, // 部门 ...row, }, }) @@ -352,7 +352,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/fieldTest/approve/approve-interface.ts b/src/views/business/fieldTest/approve/approve-interface.ts index ab91930..9b5bc40 100644 --- a/src/views/business/fieldTest/approve/approve-interface.ts +++ b/src/views/business/fieldTest/approve/approve-interface.ts @@ -9,7 +9,7 @@ siteExecutiveNo: string // 现场检测编号 labCode: string // 实验室 - groupCode: string // 组别、部门 + groupCode: string // 部门、部门 executiveItem: string // 测试校准检定项目 orderNo: string // 关联任务单 limit: number @@ -31,7 +31,7 @@ export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 siteExecutiveNo: string // 现场检测编号(审批编号) siteExecutiveName: string // 现场检测名字(审批名称) applyId: string // 申请人id diff --git a/src/views/business/fieldTest/approve/components/basic.vue b/src/views/business/fieldTest/approve/components/basic.vue index 5349362..98ab196 100644 --- a/src/views/business/fieldTest/approve/components/basic.vue +++ b/src/views/business/fieldTest/approve/components/basic.vue @@ -36,7 +36,7 @@ const user = useUserStore() // 用户信息 const form = ref({ labCode: '', // 实验室 - groupCode: '', // 组别 + groupCode: '', // 部门 siteExecutiveNo: '', // 现场检测编号(审批编号) siteExecutiveName: '', // 现场检测名字(审批名称) applyId: '', // 申请人id @@ -72,13 +72,13 @@ }) // -----------------------------------------字典-------------------------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 function getDict() { // 实验室 getDictByCode('bizGroupCodeEquipment').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) diff --git a/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue b/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue index 47ec902..a0031cb 100644 --- a/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue +++ b/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue @@ -27,13 +27,13 @@ const emits = defineEmits(['confirm']) const dialogFormVisible = ref(false) const labCode = ref('') // 实验室 -const groupCode = ref('') // 组别 +const groupCode = ref('') // 部门 const changeType = ref('') // 允许筛选条件改变类型 const selectByUseStatus = ref('') // 固定筛选使用状态 // 查询条件 const listQuery = ref({ approvalStatus: '0', // 审批状态类型code,导出接口不用传 - groupCode: '', // 组别--后台定义用此字段筛选部门(刘翔) + groupCode: '', // 部门--后台定义用此字段筛选部门(刘翔) directorId: '', // 负责人id equipmentName: props.equipmentName, // 设备名称 equipmentNo: '', // 设备编号 @@ -143,7 +143,7 @@ const clearList = () => { listQuery.value = { approvalStatus: '0', // 审批状态类型code,导出接口不用传 - groupCode: '', // 组别--后台定义用此字段筛选部门(刘翔) + groupCode: '', // 部门--后台定义用此字段筛选部门(刘翔) directorId: '', // 负责人id equipmentName: '', // 设备名称 equipmentNo: '', // 设备编号 @@ -207,8 +207,8 @@ /** * 弹窗初始化 * @param labCode 实验室 - * @param groupCode 组别 - * @param noChange 是否实验室和组别固定,不允许改变 + * @param groupCode 部门 + * @param noChange 是否实验室和部门固定,不允许改变 * @param selectByUseStatusType 固定筛选使用状态的类型 */ const initDialog = async (labCodeParam = '', groupCodeParam = '', changeTypeParam = '', selectByUseStatusType = '') => { @@ -216,7 +216,7 @@ listQuery.value.labCode = labCodeParam listQuery.value.groupCode = groupCodeParam labCode.value = labCodeParam// 实验室 - groupCode.value = groupCodeParam// 组别 + groupCode.value = groupCodeParam// 部门 changeType.value = changeTypeParam// 允许筛选条件改变类型 selectByUseStatus.value = selectByUseStatusType dialogFormVisible.value = true diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue index f730b40..6bc8b66 100644 --- a/src/views/business/fieldTest/approve/list.vue +++ b/src/views/business/fieldTest/approve/list.vue @@ -43,7 +43,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, @@ -145,7 +145,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, @@ -196,7 +196,7 @@ applyTimeStart: listQuery.value.applyTimeStart, // 申请时间开始 labCode: listQuery.value.labCode, // 实验室 - groupCode: listQuery.value.groupCode, // 组别、部门 + groupCode: listQuery.value.groupCode, // 部门、部门 executiveItem: listQuery.value.executiveItem, // 测试校准检定项目 orderNo: listQuery.value.orderNo, // 关联任务单 offset: 1, diff --git a/src/views/business/fieldTest/record/dialog/selectFieldTestApprove.vue b/src/views/business/fieldTest/record/dialog/selectFieldTestApprove.vue index 43ef3d7..be4a469 100644 --- a/src/views/business/fieldTest/record/dialog/selectFieldTestApprove.vue +++ b/src/views/business/fieldTest/record/dialog/selectFieldTestApprove.vue @@ -21,7 +21,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, @@ -76,7 +76,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, diff --git a/src/views/business/fieldTest/record/edit.vue b/src/views/business/fieldTest/record/edit.vue index 9f30b7b..8d9765d 100644 --- a/src/views/business/fieldTest/record/edit.vue +++ b/src/views/business/fieldTest/record/edit.vue @@ -30,8 +30,8 @@ const form = ref({ labCode: '', // 实验室 labCodeName: '', // 实验室名称 - groupCode: '', // 组别 - groupCodeName: '', // 组别(字典value) + groupCode: '', // 部门 + groupCodeName: '', // 部门(字典value) logNo: '', // 记录单编号 logName: '', // 记录单名称 createUserId: '', // 创建人id @@ -84,14 +84,14 @@ // -------------------------------------------字典------------------------------------------ const userList = ref<{ [key: string]: string }[]>([]) // 用户列表 const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 // 获取字典值 async function getDict() { // 实验室 getDictByCode('bizGroupCodeEquipment').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue index 83fce19..22540f6 100644 --- a/src/views/business/fieldTest/record/list.vue +++ b/src/views/business/fieldTest/record/list.vue @@ -17,7 +17,7 @@ siteExecutiveNo: '', // 现场测试、校准 或检定审批单编号 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 limit: 20, offset: 1, @@ -90,7 +90,7 @@ siteExecutiveNo: '', // 现场测试、校准 或检定审批单编号 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 limit: 20, offset: 1, diff --git a/src/api/equipment/info/book.ts b/src/api/equipment/info/book.ts index 60cf0d2..295d4f9 100644 --- a/src/api/equipment/info/book.ts +++ b/src/api/equipment/info/book.ts @@ -9,7 +9,7 @@ return request({ url: `${prefix}/approval/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -18,7 +18,7 @@ return request({ url: `${prefix}/save`, method: 'post', - data + data, }) } @@ -27,7 +27,7 @@ return request({ url: `${prefix}/draftUpdate`, method: 'post', - data + data, }) } // 编辑 @@ -35,7 +35,7 @@ return request({ url: `${prefix}/failUpdate`, method: 'post', - data + data, }) } @@ -44,7 +44,7 @@ return request({ url: `${prefix}/detail`, method: 'post', - data + data, }) } @@ -59,7 +59,7 @@ return request({ url: `${prefix}/submit`, method: 'post', - data + data, }) } @@ -68,7 +68,7 @@ return request({ url: `${prefix}/draftDelete`, method: 'post', - data + data, }) } @@ -77,7 +77,7 @@ return request({ url: `${prefix}/approval/delete`, method: 'post', - data + data, }) } @@ -86,7 +86,7 @@ return request({ url: `${prefix}/circulationLog/listPage`, method: 'post', - data + data, }) } @@ -99,7 +99,7 @@ return request({ url: `${prefix}/status/log/list`, method: 'get', - params + params, }) } @@ -112,7 +112,7 @@ return request({ url: `${prefix}/approval/revoke`, method: 'post', - data + data, }) } @@ -125,7 +125,7 @@ return request({ url: `${prefix}/approval/refuse`, method: 'post', - data + data, }) } @@ -134,7 +134,7 @@ return request({ url: `${prefix}/remind`, method: 'post', - data + data, }) } @@ -143,11 +143,11 @@ return request({ url: `${prefix}/import`, method: 'post', - data + data, }) } -// 根据实验室代码和组别获取deptId +// 根据实验室代码和部门获取deptId export function getDeptIdByLabAndGroup(params: { labCode: string groupNo: string @@ -155,7 +155,7 @@ return request({ url: '/system/getDeptIdByLabAndGroup', method: 'get', - params + params, }) } @@ -164,7 +164,7 @@ return request({ url: `${path}?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -173,7 +173,7 @@ return request({ url: '/equipment/certificate/listPage', method: 'post', - data + data, }) } @@ -182,7 +182,7 @@ return request({ url: '/equipment/detail/maintain/listPage', method: 'post', - data + data, }) } @@ -191,7 +191,7 @@ return request({ url: '/equipment/detail/resume/listPage', method: 'post', - data + data, }) } @@ -200,7 +200,7 @@ return request({ url: '/equipment/hasChanged', method: 'post', - data + data, }) } @@ -210,7 +210,7 @@ url: '/equipment/exportFile', method: 'post', responseType: 'blob', - data + data, }) } @@ -220,6 +220,6 @@ url: '/equipment/exportExcelFile', method: 'post', responseType: 'blob', - data + data, }) } diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 5678997..ff2d6d5 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -10,7 +10,7 @@ return request({ url: `${prefix}mgr/list`, method: 'get', - params + params, }) } @@ -19,14 +19,14 @@ return request({ url: '/system/mgr/list', method: 'get', - params + params, }) } // 获取用户所在单位 export function getUserDept() { return request({ - url: '/system/company' + url: '/system/company', }) } @@ -43,7 +43,7 @@ return request({ url: `${prefix}mgr/delete`, method: 'post', - data + data, }) } @@ -52,7 +52,7 @@ return request({ url: `${prefix}mgr/freeze`, method: 'post', - data + data, }) } // 冻结用户 @@ -60,7 +60,7 @@ return request({ url: `${prefix}mgr/unfreeze`, method: 'post', - data + data, }) } @@ -69,7 +69,7 @@ return request({ url: 'sys/mgr/reset', method: 'post', - data + data, }) } @@ -80,17 +80,17 @@ method: 'post', data: { userId, - roleIds: ids - } + roleIds: ids, + }, // paramsSerializer: (params) => qs.stringify(params, { indices: false }) }) } -// 获取用户实验室代码和组别 +// 获取用户实验室代码和部门 export function getLabAndGroup(params: { deptId: string }) { return request({ url: '/system/labAndGroup', method: 'get', - params + params, }) } diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 102ce61..400bf48 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -34,11 +34,11 @@ isLogout: 0, // 是否被退出登录 bizLabCode: localStorage.bizLabCode || '', // 实验室 labCodeName: localStorage.labCodeName || '', // 实验室名称 - groupNo: localStorage.groupNo || '', // 组别 - groupName: localStorage.groupName || '' // 组别名称 + groupNo: localStorage.groupNo || '', // 部门 + groupName: localStorage.groupName || '', // 部门名称 }), getters: { - isLogin: state => { + isLogin: (state) => { let retn = false if (state.token) { retn = true @@ -46,17 +46,18 @@ return retn }, // 是否已获取用户信息 - hasUserInfo: state => { + hasUserInfo: (state) => { if (state.roleList && state.roleList.length > 0) { return true - } else { + } + else { return false } }, - getPublicKey: state => { + getPublicKey: (state) => { return state.publicKey }, - getPrivateKey: state => { + getPrivateKey: (state) => { return state.privateKey }, getMenus: (state): Menu.menu[] => { @@ -64,14 +65,14 @@ }, getBtns: (state): Menu.menu[] => { return state.btns - } + }, }, actions: { // 获取项目基础配置 getBaseConfig() { return new Promise((resolve, reject) => { getConfig() - .then(res => { + .then((res) => { this.publicKey = res.data.publicKey localStorage.setItem('publicKey', res.data.publicKey) // 保存私钥 @@ -80,7 +81,7 @@ this.isLogout = 0 resolve(res.data) }) - .catch(e => { + .catch((e) => { reject(e) }) }) @@ -94,21 +95,21 @@ }) { return new Promise((resolve, reject) => { doLogin(data) - .then(res => { + .then((res) => { localStorage.setItem('token', res.data.token) this.username = res.data.username this.token = res.data.token this.isLogout = 0 resolve() }) - .catch(error => { + .catch((error) => { reject(error) }) }) }, // 注销 logout() { - return new Promise(resolve => { + return new Promise((resolve) => { const routeStore = useRouteStore() const menuStore = useMenuStore() localStorage.removeItem('username') @@ -117,17 +118,17 @@ localStorage.removeItem('depId') localStorage.removeItem('bizLabCode') // 实验室 localStorage.removeItem('labCodeName') // 实验室 - localStorage.removeItem('groupNo') // 组别 - localStorage.removeItem('groupName') // 组别 + localStorage.removeItem('groupNo') // 部门 + localStorage.removeItem('groupName') // 部门 // localStorage.clear() this.username = '' this.token = '' this.roleList = [] this.roleNames = [] this.bizLabCode = '' // 实验室 - this.groupNo = '' // 组别 - this.labCodeName = '' // 组别 - this.groupName = '' // 组别 + this.groupNo = '' // 部门 + this.labCodeName = '' // 部门 + this.groupName = '' // 部门 routeStore.removeRoutes() menuStore.setActived(0) resolve() @@ -135,53 +136,54 @@ }, // 获取用户信息 getUserInfo() { - return new Promise(resolve => { + return new Promise((resolve) => { getInfo() - .then(res => { + .then((res) => { if (res.data.roleIds && res.data.roleIds.length > 0) { this.roleList = res.data.roleIds this.roleNames = res.data.roleNames this.roleTips = res.data.roleTips localStorage.setItem('nameId', res.data.id) localStorage.setItem('depId', res.data.deptId) - } else { + } + else { reject('该用户无角色') } if (res.data.deptId) { this.deptId = res.data.deptId this.deptName = res.data.deptName - // 获取本用户实验室代码、组别 - getLabAndGroup({ deptId: res.data.deptId }).then(res => { + // 获取本用户实验室代码、部门 + getLabAndGroup({ deptId: res.data.deptId }).then((res) => { this.bizLabCode = res.data.bizLabCode // 实验室 - this.groupNo = res.data.groupNo // 组别 + this.groupNo = res.data.groupNo // 部门 if (this.bizLabCode) { - getDictByCode('bizGroupCodeEquipment').then(response => { + getDictByCode('bizGroupCodeEquipment').then((response) => { const labCodeList = response.data const index = labCodeList.findIndex( (item: { value: string }) => - item.value === this.bizLabCode + item.value === this.bizLabCode, ) if (index !== -1) { this.labCodeName = labCodeList[index].name // 实验室 localStorage.setItem( 'labCodeName', - labCodeList[index].name + labCodeList[index].name, ) } }) } if (this.bizLabCode) { - getDictByCode('bizGroupCode').then(response => { + getDictByCode('bizGroupCode').then((response) => { const groupCodeList = response.data const index = groupCodeList.findIndex( - (item: { value: string }) => item.value === this.groupNo + (item: { value: string }) => item.value === this.groupNo, ) if (index !== -1) { this.groupName = groupCodeList[index].name localStorage.setItem( 'groupName', - groupCodeList[index].name + groupCodeList[index].name, ) } }) @@ -190,10 +192,11 @@ localStorage.setItem('bizLabCode', res.data.bizLabCode) }) // 基本信息-部门接口-查询部门类别 - getDeptList({ deptName: res.data.deptName }).then(response => { + getDeptList({ deptName: res.data.deptName }).then((response) => { this.deptType = response.data.list[0].deptType }) - } else { + } + else { reject('该用户无组织机构') } this.id = res.data.id @@ -210,13 +213,13 @@ getPermissions(currentSystem?: { name: string; code: string }) { const params = { resourceType: '', - parentCode: '' + parentCode: '', } if (currentSystem) { params.parentCode = currentSystem.code // 子系统code } - return new Promise(resolve => { - getUserMenus(params).then(response => { + return new Promise((resolve) => { + getUserMenus(params).then((response) => { const data = response.data const menus = [] // 仅菜单 const btns = [] // 非菜单 @@ -230,14 +233,14 @@ const menu_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } menus.push(menu_tmp) } const btn_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } btns.push(btn_tmp) } @@ -250,8 +253,8 @@ }, // 修改密码 editPassword(data: { oldPwd: string; newPwd: string }) { - return new Promise(resolve => { - changePwd(data).then(response => { + return new Promise((resolve) => { + changePwd(data).then((response) => { resolve(response) }) }) @@ -259,9 +262,9 @@ // 被退出登录 toLogout() { this.isLogout += 1 - } - } - } + }, + }, + }, ) export default useUserStore diff --git a/src/views/business/certManage/apply/apply-interface.ts b/src/views/business/certManage/apply/apply-interface.ts index 5595f43..1fdb9b7 100644 --- a/src/views/business/certManage/apply/apply-interface.ts +++ b/src/views/business/certManage/apply/apply-interface.ts @@ -31,7 +31,7 @@ // 表单 export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 changeApplyNo: string // 申请单编号 changeApplyName: string // 申请单名称 createUserId: string // 创建人id diff --git a/src/views/business/certManage/apply/components/basic.vue b/src/views/business/certManage/apply/components/basic.vue index 3be1fef..bf02448 100644 --- a/src/views/business/certManage/apply/components/basic.vue +++ b/src/views/business/certManage/apply/components/basic.vue @@ -32,7 +32,7 @@ const user = useUserStore() // 用户信息 const form = ref({ labCode: '', // 实验室 - groupCode: '', // 组别 + groupCode: '', // 部门 changeApplyNo: '', // 申请单编号 changeApplyName: '', // 申请单名称 createUserId: '', // 创建人id @@ -53,13 +53,13 @@ const rules = ref({ // 校验规则 labCode: [{ required: true, message: '实验室不能为空', trigger: ['blur', 'change'] }], - groupCode: [{ required: true, message: '组别不能为空', trigger: ['blur', 'change'] }], + groupCode: [{ required: true, message: '部门不能为空', trigger: ['blur', 'change'] }], changeReportNo: [{ required: true, message: '更换证书编号不能为空', trigger: ['change', 'blur'] }], changeType: [{ required: true, message: '变更类型不能为空', trigger: ['change', 'blur'] }], }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 const changeTypeList = ref([]) // 变更类型 function getDict() { @@ -67,7 +67,7 @@ getDictByCode('bizLabCode').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) @@ -192,7 +192,7 @@ onMounted(async () => { if (props.pageType === 'edit' || props.pageType === 'detail') { form.value.labCode = $route.query.labCode as any // 实验室 - form.value.groupCode = $route.query.groupCode as string // 组别 + form.value.groupCode = $route.query.groupCode as string // 部门 form.value.changeApplyNo = $route.query.changeApplyNo as string // 申请单编号 form.value.changeApplyName = $route.query.changeApplyName as string // 申请单名称 form.value.createUserId = $route.query.createUserId as string // 创建人id @@ -236,8 +236,8 @@ - - + + diff --git a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue index b8d9940..959501b 100644 --- a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue +++ b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue @@ -18,7 +18,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 @@ -123,7 +123,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/certManage/apply/list.vue b/src/views/business/certManage/apply/list.vue index 6829e97..fb5e6c3 100644 --- a/src/views/business/certManage/apply/list.vue +++ b/src/views/business/certManage/apply/list.vue @@ -211,7 +211,7 @@ processId: row.processId, // 流程实例id taskId: row.taskId, // 任务id labCode: row.labCode, // 实验室 - groupCode: row.groupCode, // 组别 + groupCode: row.groupCode, // 部门 changeApplyNo: row.changeApplyNo, // 申请单编号 changeApplyName: row.changeApplyName, // 申请单名称 createUserId: row.createUserId, // 创建人id diff --git a/src/views/business/certManage/cert/cert-interface.ts b/src/views/business/certManage/cert/cert-interface.ts index 19d8c65..9fc92d0 100644 --- a/src/views/business/certManage/cert/cert-interface.ts +++ b/src/views/business/certManage/cert/cert-interface.ts @@ -17,7 +17,7 @@ measureValidDateStart: string // 检定有效期开始 measureValidDateEnd: string // 检定有效期结束 labCode: string // 实验室(字典code) - groupCode: string // 组别(字典code) + groupCode: string // 部门(字典code) createUserName: string // 检定员 formId: string // 表单id printStatus: string // 打印状态(未打印传1,其他状态不传) diff --git a/src/views/business/certManage/cert/list.vue b/src/views/business/certManage/cert/list.vue index 3daaec1..f21f74d 100644 --- a/src/views/business/certManage/cert/list.vue +++ b/src/views/business/certManage/cert/list.vue @@ -45,7 +45,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -197,7 +197,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -282,7 +282,7 @@ measureValidDateStart: listQuery.value.measureValidDateStart, // 检定有效期开始 measureValidDateEnd: listQuery.value.measureValidDateEnd, // 检定有效期结束 labCode: listQuery.value.labCode, // 实验室(字典code) - groupCode: listQuery.value.groupCode, // 组别(字典code) + groupCode: listQuery.value.groupCode, // 部门(字典code) createUserName: listQuery.value.createUserName, // 检定员 formId: listQuery.value.formId, // 表单id printStatus: listQuery.value.printStatus, // 打印状态(未打印传1,其他状态不传) diff --git a/src/views/business/certManage/supplement/components/basic.vue b/src/views/business/certManage/supplement/components/basic.vue index 61921e2..d5ec033 100644 --- a/src/views/business/certManage/supplement/components/basic.vue +++ b/src/views/business/certManage/supplement/components/basic.vue @@ -76,7 +76,7 @@ }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 function getDict() { // 实验室 @@ -118,7 +118,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -144,7 +144,7 @@ certificateName: '', // 证书名称 certificateNo: changeReportNo, // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/certManage/supplement/list.vue b/src/views/business/certManage/supplement/list.vue index ce4297f..0b3f696 100644 --- a/src/views/business/certManage/supplement/list.vue +++ b/src/views/business/certManage/supplement/list.vue @@ -252,7 +252,7 @@ processId: row.processId, // 流程实例id taskId: row.taskId, // 任务id labCode: row.labCode, // 实验室 - groupCode: row.groupCode, // 组别 + groupCode: row.groupCode, // 部门 ...row, }, }) @@ -352,7 +352,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/fieldTest/approve/approve-interface.ts b/src/views/business/fieldTest/approve/approve-interface.ts index ab91930..9b5bc40 100644 --- a/src/views/business/fieldTest/approve/approve-interface.ts +++ b/src/views/business/fieldTest/approve/approve-interface.ts @@ -9,7 +9,7 @@ siteExecutiveNo: string // 现场检测编号 labCode: string // 实验室 - groupCode: string // 组别、部门 + groupCode: string // 部门、部门 executiveItem: string // 测试校准检定项目 orderNo: string // 关联任务单 limit: number @@ -31,7 +31,7 @@ export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 siteExecutiveNo: string // 现场检测编号(审批编号) siteExecutiveName: string // 现场检测名字(审批名称) applyId: string // 申请人id diff --git a/src/views/business/fieldTest/approve/components/basic.vue b/src/views/business/fieldTest/approve/components/basic.vue index 5349362..98ab196 100644 --- a/src/views/business/fieldTest/approve/components/basic.vue +++ b/src/views/business/fieldTest/approve/components/basic.vue @@ -36,7 +36,7 @@ const user = useUserStore() // 用户信息 const form = ref({ labCode: '', // 实验室 - groupCode: '', // 组别 + groupCode: '', // 部门 siteExecutiveNo: '', // 现场检测编号(审批编号) siteExecutiveName: '', // 现场检测名字(审批名称) applyId: '', // 申请人id @@ -72,13 +72,13 @@ }) // -----------------------------------------字典-------------------------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 function getDict() { // 实验室 getDictByCode('bizGroupCodeEquipment').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) diff --git a/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue b/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue index 47ec902..a0031cb 100644 --- a/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue +++ b/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue @@ -27,13 +27,13 @@ const emits = defineEmits(['confirm']) const dialogFormVisible = ref(false) const labCode = ref('') // 实验室 -const groupCode = ref('') // 组别 +const groupCode = ref('') // 部门 const changeType = ref('') // 允许筛选条件改变类型 const selectByUseStatus = ref('') // 固定筛选使用状态 // 查询条件 const listQuery = ref({ approvalStatus: '0', // 审批状态类型code,导出接口不用传 - groupCode: '', // 组别--后台定义用此字段筛选部门(刘翔) + groupCode: '', // 部门--后台定义用此字段筛选部门(刘翔) directorId: '', // 负责人id equipmentName: props.equipmentName, // 设备名称 equipmentNo: '', // 设备编号 @@ -143,7 +143,7 @@ const clearList = () => { listQuery.value = { approvalStatus: '0', // 审批状态类型code,导出接口不用传 - groupCode: '', // 组别--后台定义用此字段筛选部门(刘翔) + groupCode: '', // 部门--后台定义用此字段筛选部门(刘翔) directorId: '', // 负责人id equipmentName: '', // 设备名称 equipmentNo: '', // 设备编号 @@ -207,8 +207,8 @@ /** * 弹窗初始化 * @param labCode 实验室 - * @param groupCode 组别 - * @param noChange 是否实验室和组别固定,不允许改变 + * @param groupCode 部门 + * @param noChange 是否实验室和部门固定,不允许改变 * @param selectByUseStatusType 固定筛选使用状态的类型 */ const initDialog = async (labCodeParam = '', groupCodeParam = '', changeTypeParam = '', selectByUseStatusType = '') => { @@ -216,7 +216,7 @@ listQuery.value.labCode = labCodeParam listQuery.value.groupCode = groupCodeParam labCode.value = labCodeParam// 实验室 - groupCode.value = groupCodeParam// 组别 + groupCode.value = groupCodeParam// 部门 changeType.value = changeTypeParam// 允许筛选条件改变类型 selectByUseStatus.value = selectByUseStatusType dialogFormVisible.value = true diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue index f730b40..6bc8b66 100644 --- a/src/views/business/fieldTest/approve/list.vue +++ b/src/views/business/fieldTest/approve/list.vue @@ -43,7 +43,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, @@ -145,7 +145,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, @@ -196,7 +196,7 @@ applyTimeStart: listQuery.value.applyTimeStart, // 申请时间开始 labCode: listQuery.value.labCode, // 实验室 - groupCode: listQuery.value.groupCode, // 组别、部门 + groupCode: listQuery.value.groupCode, // 部门、部门 executiveItem: listQuery.value.executiveItem, // 测试校准检定项目 orderNo: listQuery.value.orderNo, // 关联任务单 offset: 1, diff --git a/src/views/business/fieldTest/record/dialog/selectFieldTestApprove.vue b/src/views/business/fieldTest/record/dialog/selectFieldTestApprove.vue index 43ef3d7..be4a469 100644 --- a/src/views/business/fieldTest/record/dialog/selectFieldTestApprove.vue +++ b/src/views/business/fieldTest/record/dialog/selectFieldTestApprove.vue @@ -21,7 +21,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, @@ -76,7 +76,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, diff --git a/src/views/business/fieldTest/record/edit.vue b/src/views/business/fieldTest/record/edit.vue index 9f30b7b..8d9765d 100644 --- a/src/views/business/fieldTest/record/edit.vue +++ b/src/views/business/fieldTest/record/edit.vue @@ -30,8 +30,8 @@ const form = ref({ labCode: '', // 实验室 labCodeName: '', // 实验室名称 - groupCode: '', // 组别 - groupCodeName: '', // 组别(字典value) + groupCode: '', // 部门 + groupCodeName: '', // 部门(字典value) logNo: '', // 记录单编号 logName: '', // 记录单名称 createUserId: '', // 创建人id @@ -84,14 +84,14 @@ // -------------------------------------------字典------------------------------------------ const userList = ref<{ [key: string]: string }[]>([]) // 用户列表 const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 // 获取字典值 async function getDict() { // 实验室 getDictByCode('bizGroupCodeEquipment').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue index 83fce19..22540f6 100644 --- a/src/views/business/fieldTest/record/list.vue +++ b/src/views/business/fieldTest/record/list.vue @@ -17,7 +17,7 @@ siteExecutiveNo: '', // 现场测试、校准 或检定审批单编号 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 limit: 20, offset: 1, @@ -90,7 +90,7 @@ siteExecutiveNo: '', // 现场测试、校准 或检定审批单编号 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 limit: 20, offset: 1, diff --git a/src/views/business/fieldTest/record/record-interface.ts b/src/views/business/fieldTest/record/record-interface.ts index 7e67e86..bd4678e 100644 --- a/src/views/business/fieldTest/record/record-interface.ts +++ b/src/views/business/fieldTest/record/record-interface.ts @@ -6,7 +6,7 @@ siteExecutiveNo: string // 现场测试、校准 或检定审批单编号 labCode: string // 实验室 - groupCode: string // 组别、部门 + groupCode: string // 部门、部门 executiveItem: string // 测试校准检定项目 limit: number offset: number @@ -27,8 +27,8 @@ export interface IForm { labCode: string // 实验室 labCodeName: string // 实验室名称 - groupCode: string // 组别(字典code) - groupCodeName: string // 组别(字典value) + groupCode: string // 部门(字典code) + groupCodeName: string // 部门(字典value) logNo: string // 记录单编号 logName: string // 记录单名称 createUserId: string // 创建人id diff --git a/src/api/equipment/info/book.ts b/src/api/equipment/info/book.ts index 60cf0d2..295d4f9 100644 --- a/src/api/equipment/info/book.ts +++ b/src/api/equipment/info/book.ts @@ -9,7 +9,7 @@ return request({ url: `${prefix}/approval/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -18,7 +18,7 @@ return request({ url: `${prefix}/save`, method: 'post', - data + data, }) } @@ -27,7 +27,7 @@ return request({ url: `${prefix}/draftUpdate`, method: 'post', - data + data, }) } // 编辑 @@ -35,7 +35,7 @@ return request({ url: `${prefix}/failUpdate`, method: 'post', - data + data, }) } @@ -44,7 +44,7 @@ return request({ url: `${prefix}/detail`, method: 'post', - data + data, }) } @@ -59,7 +59,7 @@ return request({ url: `${prefix}/submit`, method: 'post', - data + data, }) } @@ -68,7 +68,7 @@ return request({ url: `${prefix}/draftDelete`, method: 'post', - data + data, }) } @@ -77,7 +77,7 @@ return request({ url: `${prefix}/approval/delete`, method: 'post', - data + data, }) } @@ -86,7 +86,7 @@ return request({ url: `${prefix}/circulationLog/listPage`, method: 'post', - data + data, }) } @@ -99,7 +99,7 @@ return request({ url: `${prefix}/status/log/list`, method: 'get', - params + params, }) } @@ -112,7 +112,7 @@ return request({ url: `${prefix}/approval/revoke`, method: 'post', - data + data, }) } @@ -125,7 +125,7 @@ return request({ url: `${prefix}/approval/refuse`, method: 'post', - data + data, }) } @@ -134,7 +134,7 @@ return request({ url: `${prefix}/remind`, method: 'post', - data + data, }) } @@ -143,11 +143,11 @@ return request({ url: `${prefix}/import`, method: 'post', - data + data, }) } -// 根据实验室代码和组别获取deptId +// 根据实验室代码和部门获取deptId export function getDeptIdByLabAndGroup(params: { labCode: string groupNo: string @@ -155,7 +155,7 @@ return request({ url: '/system/getDeptIdByLabAndGroup', method: 'get', - params + params, }) } @@ -164,7 +164,7 @@ return request({ url: `${path}?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -173,7 +173,7 @@ return request({ url: '/equipment/certificate/listPage', method: 'post', - data + data, }) } @@ -182,7 +182,7 @@ return request({ url: '/equipment/detail/maintain/listPage', method: 'post', - data + data, }) } @@ -191,7 +191,7 @@ return request({ url: '/equipment/detail/resume/listPage', method: 'post', - data + data, }) } @@ -200,7 +200,7 @@ return request({ url: '/equipment/hasChanged', method: 'post', - data + data, }) } @@ -210,7 +210,7 @@ url: '/equipment/exportFile', method: 'post', responseType: 'blob', - data + data, }) } @@ -220,6 +220,6 @@ url: '/equipment/exportExcelFile', method: 'post', responseType: 'blob', - data + data, }) } diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 5678997..ff2d6d5 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -10,7 +10,7 @@ return request({ url: `${prefix}mgr/list`, method: 'get', - params + params, }) } @@ -19,14 +19,14 @@ return request({ url: '/system/mgr/list', method: 'get', - params + params, }) } // 获取用户所在单位 export function getUserDept() { return request({ - url: '/system/company' + url: '/system/company', }) } @@ -43,7 +43,7 @@ return request({ url: `${prefix}mgr/delete`, method: 'post', - data + data, }) } @@ -52,7 +52,7 @@ return request({ url: `${prefix}mgr/freeze`, method: 'post', - data + data, }) } // 冻结用户 @@ -60,7 +60,7 @@ return request({ url: `${prefix}mgr/unfreeze`, method: 'post', - data + data, }) } @@ -69,7 +69,7 @@ return request({ url: 'sys/mgr/reset', method: 'post', - data + data, }) } @@ -80,17 +80,17 @@ method: 'post', data: { userId, - roleIds: ids - } + roleIds: ids, + }, // paramsSerializer: (params) => qs.stringify(params, { indices: false }) }) } -// 获取用户实验室代码和组别 +// 获取用户实验室代码和部门 export function getLabAndGroup(params: { deptId: string }) { return request({ url: '/system/labAndGroup', method: 'get', - params + params, }) } diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 102ce61..400bf48 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -34,11 +34,11 @@ isLogout: 0, // 是否被退出登录 bizLabCode: localStorage.bizLabCode || '', // 实验室 labCodeName: localStorage.labCodeName || '', // 实验室名称 - groupNo: localStorage.groupNo || '', // 组别 - groupName: localStorage.groupName || '' // 组别名称 + groupNo: localStorage.groupNo || '', // 部门 + groupName: localStorage.groupName || '', // 部门名称 }), getters: { - isLogin: state => { + isLogin: (state) => { let retn = false if (state.token) { retn = true @@ -46,17 +46,18 @@ return retn }, // 是否已获取用户信息 - hasUserInfo: state => { + hasUserInfo: (state) => { if (state.roleList && state.roleList.length > 0) { return true - } else { + } + else { return false } }, - getPublicKey: state => { + getPublicKey: (state) => { return state.publicKey }, - getPrivateKey: state => { + getPrivateKey: (state) => { return state.privateKey }, getMenus: (state): Menu.menu[] => { @@ -64,14 +65,14 @@ }, getBtns: (state): Menu.menu[] => { return state.btns - } + }, }, actions: { // 获取项目基础配置 getBaseConfig() { return new Promise((resolve, reject) => { getConfig() - .then(res => { + .then((res) => { this.publicKey = res.data.publicKey localStorage.setItem('publicKey', res.data.publicKey) // 保存私钥 @@ -80,7 +81,7 @@ this.isLogout = 0 resolve(res.data) }) - .catch(e => { + .catch((e) => { reject(e) }) }) @@ -94,21 +95,21 @@ }) { return new Promise((resolve, reject) => { doLogin(data) - .then(res => { + .then((res) => { localStorage.setItem('token', res.data.token) this.username = res.data.username this.token = res.data.token this.isLogout = 0 resolve() }) - .catch(error => { + .catch((error) => { reject(error) }) }) }, // 注销 logout() { - return new Promise(resolve => { + return new Promise((resolve) => { const routeStore = useRouteStore() const menuStore = useMenuStore() localStorage.removeItem('username') @@ -117,17 +118,17 @@ localStorage.removeItem('depId') localStorage.removeItem('bizLabCode') // 实验室 localStorage.removeItem('labCodeName') // 实验室 - localStorage.removeItem('groupNo') // 组别 - localStorage.removeItem('groupName') // 组别 + localStorage.removeItem('groupNo') // 部门 + localStorage.removeItem('groupName') // 部门 // localStorage.clear() this.username = '' this.token = '' this.roleList = [] this.roleNames = [] this.bizLabCode = '' // 实验室 - this.groupNo = '' // 组别 - this.labCodeName = '' // 组别 - this.groupName = '' // 组别 + this.groupNo = '' // 部门 + this.labCodeName = '' // 部门 + this.groupName = '' // 部门 routeStore.removeRoutes() menuStore.setActived(0) resolve() @@ -135,53 +136,54 @@ }, // 获取用户信息 getUserInfo() { - return new Promise(resolve => { + return new Promise((resolve) => { getInfo() - .then(res => { + .then((res) => { if (res.data.roleIds && res.data.roleIds.length > 0) { this.roleList = res.data.roleIds this.roleNames = res.data.roleNames this.roleTips = res.data.roleTips localStorage.setItem('nameId', res.data.id) localStorage.setItem('depId', res.data.deptId) - } else { + } + else { reject('该用户无角色') } if (res.data.deptId) { this.deptId = res.data.deptId this.deptName = res.data.deptName - // 获取本用户实验室代码、组别 - getLabAndGroup({ deptId: res.data.deptId }).then(res => { + // 获取本用户实验室代码、部门 + getLabAndGroup({ deptId: res.data.deptId }).then((res) => { this.bizLabCode = res.data.bizLabCode // 实验室 - this.groupNo = res.data.groupNo // 组别 + this.groupNo = res.data.groupNo // 部门 if (this.bizLabCode) { - getDictByCode('bizGroupCodeEquipment').then(response => { + getDictByCode('bizGroupCodeEquipment').then((response) => { const labCodeList = response.data const index = labCodeList.findIndex( (item: { value: string }) => - item.value === this.bizLabCode + item.value === this.bizLabCode, ) if (index !== -1) { this.labCodeName = labCodeList[index].name // 实验室 localStorage.setItem( 'labCodeName', - labCodeList[index].name + labCodeList[index].name, ) } }) } if (this.bizLabCode) { - getDictByCode('bizGroupCode').then(response => { + getDictByCode('bizGroupCode').then((response) => { const groupCodeList = response.data const index = groupCodeList.findIndex( - (item: { value: string }) => item.value === this.groupNo + (item: { value: string }) => item.value === this.groupNo, ) if (index !== -1) { this.groupName = groupCodeList[index].name localStorage.setItem( 'groupName', - groupCodeList[index].name + groupCodeList[index].name, ) } }) @@ -190,10 +192,11 @@ localStorage.setItem('bizLabCode', res.data.bizLabCode) }) // 基本信息-部门接口-查询部门类别 - getDeptList({ deptName: res.data.deptName }).then(response => { + getDeptList({ deptName: res.data.deptName }).then((response) => { this.deptType = response.data.list[0].deptType }) - } else { + } + else { reject('该用户无组织机构') } this.id = res.data.id @@ -210,13 +213,13 @@ getPermissions(currentSystem?: { name: string; code: string }) { const params = { resourceType: '', - parentCode: '' + parentCode: '', } if (currentSystem) { params.parentCode = currentSystem.code // 子系统code } - return new Promise(resolve => { - getUserMenus(params).then(response => { + return new Promise((resolve) => { + getUserMenus(params).then((response) => { const data = response.data const menus = [] // 仅菜单 const btns = [] // 非菜单 @@ -230,14 +233,14 @@ const menu_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } menus.push(menu_tmp) } const btn_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } btns.push(btn_tmp) } @@ -250,8 +253,8 @@ }, // 修改密码 editPassword(data: { oldPwd: string; newPwd: string }) { - return new Promise(resolve => { - changePwd(data).then(response => { + return new Promise((resolve) => { + changePwd(data).then((response) => { resolve(response) }) }) @@ -259,9 +262,9 @@ // 被退出登录 toLogout() { this.isLogout += 1 - } - } - } + }, + }, + }, ) export default useUserStore diff --git a/src/views/business/certManage/apply/apply-interface.ts b/src/views/business/certManage/apply/apply-interface.ts index 5595f43..1fdb9b7 100644 --- a/src/views/business/certManage/apply/apply-interface.ts +++ b/src/views/business/certManage/apply/apply-interface.ts @@ -31,7 +31,7 @@ // 表单 export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 changeApplyNo: string // 申请单编号 changeApplyName: string // 申请单名称 createUserId: string // 创建人id diff --git a/src/views/business/certManage/apply/components/basic.vue b/src/views/business/certManage/apply/components/basic.vue index 3be1fef..bf02448 100644 --- a/src/views/business/certManage/apply/components/basic.vue +++ b/src/views/business/certManage/apply/components/basic.vue @@ -32,7 +32,7 @@ const user = useUserStore() // 用户信息 const form = ref({ labCode: '', // 实验室 - groupCode: '', // 组别 + groupCode: '', // 部门 changeApplyNo: '', // 申请单编号 changeApplyName: '', // 申请单名称 createUserId: '', // 创建人id @@ -53,13 +53,13 @@ const rules = ref({ // 校验规则 labCode: [{ required: true, message: '实验室不能为空', trigger: ['blur', 'change'] }], - groupCode: [{ required: true, message: '组别不能为空', trigger: ['blur', 'change'] }], + groupCode: [{ required: true, message: '部门不能为空', trigger: ['blur', 'change'] }], changeReportNo: [{ required: true, message: '更换证书编号不能为空', trigger: ['change', 'blur'] }], changeType: [{ required: true, message: '变更类型不能为空', trigger: ['change', 'blur'] }], }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 const changeTypeList = ref([]) // 变更类型 function getDict() { @@ -67,7 +67,7 @@ getDictByCode('bizLabCode').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) @@ -192,7 +192,7 @@ onMounted(async () => { if (props.pageType === 'edit' || props.pageType === 'detail') { form.value.labCode = $route.query.labCode as any // 实验室 - form.value.groupCode = $route.query.groupCode as string // 组别 + form.value.groupCode = $route.query.groupCode as string // 部门 form.value.changeApplyNo = $route.query.changeApplyNo as string // 申请单编号 form.value.changeApplyName = $route.query.changeApplyName as string // 申请单名称 form.value.createUserId = $route.query.createUserId as string // 创建人id @@ -236,8 +236,8 @@ - - + + diff --git a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue index b8d9940..959501b 100644 --- a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue +++ b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue @@ -18,7 +18,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 @@ -123,7 +123,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/certManage/apply/list.vue b/src/views/business/certManage/apply/list.vue index 6829e97..fb5e6c3 100644 --- a/src/views/business/certManage/apply/list.vue +++ b/src/views/business/certManage/apply/list.vue @@ -211,7 +211,7 @@ processId: row.processId, // 流程实例id taskId: row.taskId, // 任务id labCode: row.labCode, // 实验室 - groupCode: row.groupCode, // 组别 + groupCode: row.groupCode, // 部门 changeApplyNo: row.changeApplyNo, // 申请单编号 changeApplyName: row.changeApplyName, // 申请单名称 createUserId: row.createUserId, // 创建人id diff --git a/src/views/business/certManage/cert/cert-interface.ts b/src/views/business/certManage/cert/cert-interface.ts index 19d8c65..9fc92d0 100644 --- a/src/views/business/certManage/cert/cert-interface.ts +++ b/src/views/business/certManage/cert/cert-interface.ts @@ -17,7 +17,7 @@ measureValidDateStart: string // 检定有效期开始 measureValidDateEnd: string // 检定有效期结束 labCode: string // 实验室(字典code) - groupCode: string // 组别(字典code) + groupCode: string // 部门(字典code) createUserName: string // 检定员 formId: string // 表单id printStatus: string // 打印状态(未打印传1,其他状态不传) diff --git a/src/views/business/certManage/cert/list.vue b/src/views/business/certManage/cert/list.vue index 3daaec1..f21f74d 100644 --- a/src/views/business/certManage/cert/list.vue +++ b/src/views/business/certManage/cert/list.vue @@ -45,7 +45,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -197,7 +197,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -282,7 +282,7 @@ measureValidDateStart: listQuery.value.measureValidDateStart, // 检定有效期开始 measureValidDateEnd: listQuery.value.measureValidDateEnd, // 检定有效期结束 labCode: listQuery.value.labCode, // 实验室(字典code) - groupCode: listQuery.value.groupCode, // 组别(字典code) + groupCode: listQuery.value.groupCode, // 部门(字典code) createUserName: listQuery.value.createUserName, // 检定员 formId: listQuery.value.formId, // 表单id printStatus: listQuery.value.printStatus, // 打印状态(未打印传1,其他状态不传) diff --git a/src/views/business/certManage/supplement/components/basic.vue b/src/views/business/certManage/supplement/components/basic.vue index 61921e2..d5ec033 100644 --- a/src/views/business/certManage/supplement/components/basic.vue +++ b/src/views/business/certManage/supplement/components/basic.vue @@ -76,7 +76,7 @@ }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 function getDict() { // 实验室 @@ -118,7 +118,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -144,7 +144,7 @@ certificateName: '', // 证书名称 certificateNo: changeReportNo, // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/certManage/supplement/list.vue b/src/views/business/certManage/supplement/list.vue index ce4297f..0b3f696 100644 --- a/src/views/business/certManage/supplement/list.vue +++ b/src/views/business/certManage/supplement/list.vue @@ -252,7 +252,7 @@ processId: row.processId, // 流程实例id taskId: row.taskId, // 任务id labCode: row.labCode, // 实验室 - groupCode: row.groupCode, // 组别 + groupCode: row.groupCode, // 部门 ...row, }, }) @@ -352,7 +352,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/fieldTest/approve/approve-interface.ts b/src/views/business/fieldTest/approve/approve-interface.ts index ab91930..9b5bc40 100644 --- a/src/views/business/fieldTest/approve/approve-interface.ts +++ b/src/views/business/fieldTest/approve/approve-interface.ts @@ -9,7 +9,7 @@ siteExecutiveNo: string // 现场检测编号 labCode: string // 实验室 - groupCode: string // 组别、部门 + groupCode: string // 部门、部门 executiveItem: string // 测试校准检定项目 orderNo: string // 关联任务单 limit: number @@ -31,7 +31,7 @@ export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 siteExecutiveNo: string // 现场检测编号(审批编号) siteExecutiveName: string // 现场检测名字(审批名称) applyId: string // 申请人id diff --git a/src/views/business/fieldTest/approve/components/basic.vue b/src/views/business/fieldTest/approve/components/basic.vue index 5349362..98ab196 100644 --- a/src/views/business/fieldTest/approve/components/basic.vue +++ b/src/views/business/fieldTest/approve/components/basic.vue @@ -36,7 +36,7 @@ const user = useUserStore() // 用户信息 const form = ref({ labCode: '', // 实验室 - groupCode: '', // 组别 + groupCode: '', // 部门 siteExecutiveNo: '', // 现场检测编号(审批编号) siteExecutiveName: '', // 现场检测名字(审批名称) applyId: '', // 申请人id @@ -72,13 +72,13 @@ }) // -----------------------------------------字典-------------------------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 function getDict() { // 实验室 getDictByCode('bizGroupCodeEquipment').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) diff --git a/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue b/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue index 47ec902..a0031cb 100644 --- a/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue +++ b/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue @@ -27,13 +27,13 @@ const emits = defineEmits(['confirm']) const dialogFormVisible = ref(false) const labCode = ref('') // 实验室 -const groupCode = ref('') // 组别 +const groupCode = ref('') // 部门 const changeType = ref('') // 允许筛选条件改变类型 const selectByUseStatus = ref('') // 固定筛选使用状态 // 查询条件 const listQuery = ref({ approvalStatus: '0', // 审批状态类型code,导出接口不用传 - groupCode: '', // 组别--后台定义用此字段筛选部门(刘翔) + groupCode: '', // 部门--后台定义用此字段筛选部门(刘翔) directorId: '', // 负责人id equipmentName: props.equipmentName, // 设备名称 equipmentNo: '', // 设备编号 @@ -143,7 +143,7 @@ const clearList = () => { listQuery.value = { approvalStatus: '0', // 审批状态类型code,导出接口不用传 - groupCode: '', // 组别--后台定义用此字段筛选部门(刘翔) + groupCode: '', // 部门--后台定义用此字段筛选部门(刘翔) directorId: '', // 负责人id equipmentName: '', // 设备名称 equipmentNo: '', // 设备编号 @@ -207,8 +207,8 @@ /** * 弹窗初始化 * @param labCode 实验室 - * @param groupCode 组别 - * @param noChange 是否实验室和组别固定,不允许改变 + * @param groupCode 部门 + * @param noChange 是否实验室和部门固定,不允许改变 * @param selectByUseStatusType 固定筛选使用状态的类型 */ const initDialog = async (labCodeParam = '', groupCodeParam = '', changeTypeParam = '', selectByUseStatusType = '') => { @@ -216,7 +216,7 @@ listQuery.value.labCode = labCodeParam listQuery.value.groupCode = groupCodeParam labCode.value = labCodeParam// 实验室 - groupCode.value = groupCodeParam// 组别 + groupCode.value = groupCodeParam// 部门 changeType.value = changeTypeParam// 允许筛选条件改变类型 selectByUseStatus.value = selectByUseStatusType dialogFormVisible.value = true diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue index f730b40..6bc8b66 100644 --- a/src/views/business/fieldTest/approve/list.vue +++ b/src/views/business/fieldTest/approve/list.vue @@ -43,7 +43,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, @@ -145,7 +145,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, @@ -196,7 +196,7 @@ applyTimeStart: listQuery.value.applyTimeStart, // 申请时间开始 labCode: listQuery.value.labCode, // 实验室 - groupCode: listQuery.value.groupCode, // 组别、部门 + groupCode: listQuery.value.groupCode, // 部门、部门 executiveItem: listQuery.value.executiveItem, // 测试校准检定项目 orderNo: listQuery.value.orderNo, // 关联任务单 offset: 1, diff --git a/src/views/business/fieldTest/record/dialog/selectFieldTestApprove.vue b/src/views/business/fieldTest/record/dialog/selectFieldTestApprove.vue index 43ef3d7..be4a469 100644 --- a/src/views/business/fieldTest/record/dialog/selectFieldTestApprove.vue +++ b/src/views/business/fieldTest/record/dialog/selectFieldTestApprove.vue @@ -21,7 +21,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, @@ -76,7 +76,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, diff --git a/src/views/business/fieldTest/record/edit.vue b/src/views/business/fieldTest/record/edit.vue index 9f30b7b..8d9765d 100644 --- a/src/views/business/fieldTest/record/edit.vue +++ b/src/views/business/fieldTest/record/edit.vue @@ -30,8 +30,8 @@ const form = ref({ labCode: '', // 实验室 labCodeName: '', // 实验室名称 - groupCode: '', // 组别 - groupCodeName: '', // 组别(字典value) + groupCode: '', // 部门 + groupCodeName: '', // 部门(字典value) logNo: '', // 记录单编号 logName: '', // 记录单名称 createUserId: '', // 创建人id @@ -84,14 +84,14 @@ // -------------------------------------------字典------------------------------------------ const userList = ref<{ [key: string]: string }[]>([]) // 用户列表 const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 // 获取字典值 async function getDict() { // 实验室 getDictByCode('bizGroupCodeEquipment').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue index 83fce19..22540f6 100644 --- a/src/views/business/fieldTest/record/list.vue +++ b/src/views/business/fieldTest/record/list.vue @@ -17,7 +17,7 @@ siteExecutiveNo: '', // 现场测试、校准 或检定审批单编号 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 limit: 20, offset: 1, @@ -90,7 +90,7 @@ siteExecutiveNo: '', // 现场测试、校准 或检定审批单编号 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 limit: 20, offset: 1, diff --git a/src/views/business/fieldTest/record/record-interface.ts b/src/views/business/fieldTest/record/record-interface.ts index 7e67e86..bd4678e 100644 --- a/src/views/business/fieldTest/record/record-interface.ts +++ b/src/views/business/fieldTest/record/record-interface.ts @@ -6,7 +6,7 @@ siteExecutiveNo: string // 现场测试、校准 或检定审批单编号 labCode: string // 实验室 - groupCode: string // 组别、部门 + groupCode: string // 部门、部门 executiveItem: string // 测试校准检定项目 limit: number offset: number @@ -27,8 +27,8 @@ export interface IForm { labCode: string // 实验室 labCodeName: string // 实验室名称 - groupCode: string // 组别(字典code) - groupCodeName: string // 组别(字典value) + groupCode: string // 部门(字典code) + groupCodeName: string // 部门(字典value) logNo: string // 记录单编号 logName: string // 记录单名称 createUserId: string // 创建人id diff --git a/src/views/business/manager/sendReceive/components/basic.vue b/src/views/business/manager/sendReceive/components/basic.vue index d9fc336..7eb7323 100644 --- a/src/views/business/manager/sendReceive/components/basic.vue +++ b/src/views/business/manager/sendReceive/components/basic.vue @@ -55,7 +55,7 @@ directorId: '', // 负责人Id rfid: '', // RFID标签绑定 useSign: '', // 在用信息(字典code) - groupInfos: [], // 组别信息 + groupInfos: [], // 部门信息 installLocation: '', // 安装位置(多个用,拼接) installLocationExt: '', // 安装位置(自定义编写) testTask: '', // 参试任务 @@ -466,7 +466,7 @@ - + qs.stringify(params, { indices: false }) }) } -// 获取用户实验室代码和组别 +// 获取用户实验室代码和部门 export function getLabAndGroup(params: { deptId: string }) { return request({ url: '/system/labAndGroup', method: 'get', - params + params, }) } diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 102ce61..400bf48 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -34,11 +34,11 @@ isLogout: 0, // 是否被退出登录 bizLabCode: localStorage.bizLabCode || '', // 实验室 labCodeName: localStorage.labCodeName || '', // 实验室名称 - groupNo: localStorage.groupNo || '', // 组别 - groupName: localStorage.groupName || '' // 组别名称 + groupNo: localStorage.groupNo || '', // 部门 + groupName: localStorage.groupName || '', // 部门名称 }), getters: { - isLogin: state => { + isLogin: (state) => { let retn = false if (state.token) { retn = true @@ -46,17 +46,18 @@ return retn }, // 是否已获取用户信息 - hasUserInfo: state => { + hasUserInfo: (state) => { if (state.roleList && state.roleList.length > 0) { return true - } else { + } + else { return false } }, - getPublicKey: state => { + getPublicKey: (state) => { return state.publicKey }, - getPrivateKey: state => { + getPrivateKey: (state) => { return state.privateKey }, getMenus: (state): Menu.menu[] => { @@ -64,14 +65,14 @@ }, getBtns: (state): Menu.menu[] => { return state.btns - } + }, }, actions: { // 获取项目基础配置 getBaseConfig() { return new Promise((resolve, reject) => { getConfig() - .then(res => { + .then((res) => { this.publicKey = res.data.publicKey localStorage.setItem('publicKey', res.data.publicKey) // 保存私钥 @@ -80,7 +81,7 @@ this.isLogout = 0 resolve(res.data) }) - .catch(e => { + .catch((e) => { reject(e) }) }) @@ -94,21 +95,21 @@ }) { return new Promise((resolve, reject) => { doLogin(data) - .then(res => { + .then((res) => { localStorage.setItem('token', res.data.token) this.username = res.data.username this.token = res.data.token this.isLogout = 0 resolve() }) - .catch(error => { + .catch((error) => { reject(error) }) }) }, // 注销 logout() { - return new Promise(resolve => { + return new Promise((resolve) => { const routeStore = useRouteStore() const menuStore = useMenuStore() localStorage.removeItem('username') @@ -117,17 +118,17 @@ localStorage.removeItem('depId') localStorage.removeItem('bizLabCode') // 实验室 localStorage.removeItem('labCodeName') // 实验室 - localStorage.removeItem('groupNo') // 组别 - localStorage.removeItem('groupName') // 组别 + localStorage.removeItem('groupNo') // 部门 + localStorage.removeItem('groupName') // 部门 // localStorage.clear() this.username = '' this.token = '' this.roleList = [] this.roleNames = [] this.bizLabCode = '' // 实验室 - this.groupNo = '' // 组别 - this.labCodeName = '' // 组别 - this.groupName = '' // 组别 + this.groupNo = '' // 部门 + this.labCodeName = '' // 部门 + this.groupName = '' // 部门 routeStore.removeRoutes() menuStore.setActived(0) resolve() @@ -135,53 +136,54 @@ }, // 获取用户信息 getUserInfo() { - return new Promise(resolve => { + return new Promise((resolve) => { getInfo() - .then(res => { + .then((res) => { if (res.data.roleIds && res.data.roleIds.length > 0) { this.roleList = res.data.roleIds this.roleNames = res.data.roleNames this.roleTips = res.data.roleTips localStorage.setItem('nameId', res.data.id) localStorage.setItem('depId', res.data.deptId) - } else { + } + else { reject('该用户无角色') } if (res.data.deptId) { this.deptId = res.data.deptId this.deptName = res.data.deptName - // 获取本用户实验室代码、组别 - getLabAndGroup({ deptId: res.data.deptId }).then(res => { + // 获取本用户实验室代码、部门 + getLabAndGroup({ deptId: res.data.deptId }).then((res) => { this.bizLabCode = res.data.bizLabCode // 实验室 - this.groupNo = res.data.groupNo // 组别 + this.groupNo = res.data.groupNo // 部门 if (this.bizLabCode) { - getDictByCode('bizGroupCodeEquipment').then(response => { + getDictByCode('bizGroupCodeEquipment').then((response) => { const labCodeList = response.data const index = labCodeList.findIndex( (item: { value: string }) => - item.value === this.bizLabCode + item.value === this.bizLabCode, ) if (index !== -1) { this.labCodeName = labCodeList[index].name // 实验室 localStorage.setItem( 'labCodeName', - labCodeList[index].name + labCodeList[index].name, ) } }) } if (this.bizLabCode) { - getDictByCode('bizGroupCode').then(response => { + getDictByCode('bizGroupCode').then((response) => { const groupCodeList = response.data const index = groupCodeList.findIndex( - (item: { value: string }) => item.value === this.groupNo + (item: { value: string }) => item.value === this.groupNo, ) if (index !== -1) { this.groupName = groupCodeList[index].name localStorage.setItem( 'groupName', - groupCodeList[index].name + groupCodeList[index].name, ) } }) @@ -190,10 +192,11 @@ localStorage.setItem('bizLabCode', res.data.bizLabCode) }) // 基本信息-部门接口-查询部门类别 - getDeptList({ deptName: res.data.deptName }).then(response => { + getDeptList({ deptName: res.data.deptName }).then((response) => { this.deptType = response.data.list[0].deptType }) - } else { + } + else { reject('该用户无组织机构') } this.id = res.data.id @@ -210,13 +213,13 @@ getPermissions(currentSystem?: { name: string; code: string }) { const params = { resourceType: '', - parentCode: '' + parentCode: '', } if (currentSystem) { params.parentCode = currentSystem.code // 子系统code } - return new Promise(resolve => { - getUserMenus(params).then(response => { + return new Promise((resolve) => { + getUserMenus(params).then((response) => { const data = response.data const menus = [] // 仅菜单 const btns = [] // 非菜单 @@ -230,14 +233,14 @@ const menu_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } menus.push(menu_tmp) } const btn_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } btns.push(btn_tmp) } @@ -250,8 +253,8 @@ }, // 修改密码 editPassword(data: { oldPwd: string; newPwd: string }) { - return new Promise(resolve => { - changePwd(data).then(response => { + return new Promise((resolve) => { + changePwd(data).then((response) => { resolve(response) }) }) @@ -259,9 +262,9 @@ // 被退出登录 toLogout() { this.isLogout += 1 - } - } - } + }, + }, + }, ) export default useUserStore diff --git a/src/views/business/certManage/apply/apply-interface.ts b/src/views/business/certManage/apply/apply-interface.ts index 5595f43..1fdb9b7 100644 --- a/src/views/business/certManage/apply/apply-interface.ts +++ b/src/views/business/certManage/apply/apply-interface.ts @@ -31,7 +31,7 @@ // 表单 export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 changeApplyNo: string // 申请单编号 changeApplyName: string // 申请单名称 createUserId: string // 创建人id diff --git a/src/views/business/certManage/apply/components/basic.vue b/src/views/business/certManage/apply/components/basic.vue index 3be1fef..bf02448 100644 --- a/src/views/business/certManage/apply/components/basic.vue +++ b/src/views/business/certManage/apply/components/basic.vue @@ -32,7 +32,7 @@ const user = useUserStore() // 用户信息 const form = ref({ labCode: '', // 实验室 - groupCode: '', // 组别 + groupCode: '', // 部门 changeApplyNo: '', // 申请单编号 changeApplyName: '', // 申请单名称 createUserId: '', // 创建人id @@ -53,13 +53,13 @@ const rules = ref({ // 校验规则 labCode: [{ required: true, message: '实验室不能为空', trigger: ['blur', 'change'] }], - groupCode: [{ required: true, message: '组别不能为空', trigger: ['blur', 'change'] }], + groupCode: [{ required: true, message: '部门不能为空', trigger: ['blur', 'change'] }], changeReportNo: [{ required: true, message: '更换证书编号不能为空', trigger: ['change', 'blur'] }], changeType: [{ required: true, message: '变更类型不能为空', trigger: ['change', 'blur'] }], }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 const changeTypeList = ref([]) // 变更类型 function getDict() { @@ -67,7 +67,7 @@ getDictByCode('bizLabCode').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) @@ -192,7 +192,7 @@ onMounted(async () => { if (props.pageType === 'edit' || props.pageType === 'detail') { form.value.labCode = $route.query.labCode as any // 实验室 - form.value.groupCode = $route.query.groupCode as string // 组别 + form.value.groupCode = $route.query.groupCode as string // 部门 form.value.changeApplyNo = $route.query.changeApplyNo as string // 申请单编号 form.value.changeApplyName = $route.query.changeApplyName as string // 申请单名称 form.value.createUserId = $route.query.createUserId as string // 创建人id @@ -236,8 +236,8 @@ - - + + diff --git a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue index b8d9940..959501b 100644 --- a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue +++ b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue @@ -18,7 +18,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 @@ -123,7 +123,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/certManage/apply/list.vue b/src/views/business/certManage/apply/list.vue index 6829e97..fb5e6c3 100644 --- a/src/views/business/certManage/apply/list.vue +++ b/src/views/business/certManage/apply/list.vue @@ -211,7 +211,7 @@ processId: row.processId, // 流程实例id taskId: row.taskId, // 任务id labCode: row.labCode, // 实验室 - groupCode: row.groupCode, // 组别 + groupCode: row.groupCode, // 部门 changeApplyNo: row.changeApplyNo, // 申请单编号 changeApplyName: row.changeApplyName, // 申请单名称 createUserId: row.createUserId, // 创建人id diff --git a/src/views/business/certManage/cert/cert-interface.ts b/src/views/business/certManage/cert/cert-interface.ts index 19d8c65..9fc92d0 100644 --- a/src/views/business/certManage/cert/cert-interface.ts +++ b/src/views/business/certManage/cert/cert-interface.ts @@ -17,7 +17,7 @@ measureValidDateStart: string // 检定有效期开始 measureValidDateEnd: string // 检定有效期结束 labCode: string // 实验室(字典code) - groupCode: string // 组别(字典code) + groupCode: string // 部门(字典code) createUserName: string // 检定员 formId: string // 表单id printStatus: string // 打印状态(未打印传1,其他状态不传) diff --git a/src/views/business/certManage/cert/list.vue b/src/views/business/certManage/cert/list.vue index 3daaec1..f21f74d 100644 --- a/src/views/business/certManage/cert/list.vue +++ b/src/views/business/certManage/cert/list.vue @@ -45,7 +45,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -197,7 +197,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -282,7 +282,7 @@ measureValidDateStart: listQuery.value.measureValidDateStart, // 检定有效期开始 measureValidDateEnd: listQuery.value.measureValidDateEnd, // 检定有效期结束 labCode: listQuery.value.labCode, // 实验室(字典code) - groupCode: listQuery.value.groupCode, // 组别(字典code) + groupCode: listQuery.value.groupCode, // 部门(字典code) createUserName: listQuery.value.createUserName, // 检定员 formId: listQuery.value.formId, // 表单id printStatus: listQuery.value.printStatus, // 打印状态(未打印传1,其他状态不传) diff --git a/src/views/business/certManage/supplement/components/basic.vue b/src/views/business/certManage/supplement/components/basic.vue index 61921e2..d5ec033 100644 --- a/src/views/business/certManage/supplement/components/basic.vue +++ b/src/views/business/certManage/supplement/components/basic.vue @@ -76,7 +76,7 @@ }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 function getDict() { // 实验室 @@ -118,7 +118,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -144,7 +144,7 @@ certificateName: '', // 证书名称 certificateNo: changeReportNo, // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/certManage/supplement/list.vue b/src/views/business/certManage/supplement/list.vue index ce4297f..0b3f696 100644 --- a/src/views/business/certManage/supplement/list.vue +++ b/src/views/business/certManage/supplement/list.vue @@ -252,7 +252,7 @@ processId: row.processId, // 流程实例id taskId: row.taskId, // 任务id labCode: row.labCode, // 实验室 - groupCode: row.groupCode, // 组别 + groupCode: row.groupCode, // 部门 ...row, }, }) @@ -352,7 +352,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/fieldTest/approve/approve-interface.ts b/src/views/business/fieldTest/approve/approve-interface.ts index ab91930..9b5bc40 100644 --- a/src/views/business/fieldTest/approve/approve-interface.ts +++ b/src/views/business/fieldTest/approve/approve-interface.ts @@ -9,7 +9,7 @@ siteExecutiveNo: string // 现场检测编号 labCode: string // 实验室 - groupCode: string // 组别、部门 + groupCode: string // 部门、部门 executiveItem: string // 测试校准检定项目 orderNo: string // 关联任务单 limit: number @@ -31,7 +31,7 @@ export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 siteExecutiveNo: string // 现场检测编号(审批编号) siteExecutiveName: string // 现场检测名字(审批名称) applyId: string // 申请人id diff --git a/src/views/business/fieldTest/approve/components/basic.vue b/src/views/business/fieldTest/approve/components/basic.vue index 5349362..98ab196 100644 --- a/src/views/business/fieldTest/approve/components/basic.vue +++ b/src/views/business/fieldTest/approve/components/basic.vue @@ -36,7 +36,7 @@ const user = useUserStore() // 用户信息 const form = ref({ labCode: '', // 实验室 - groupCode: '', // 组别 + groupCode: '', // 部门 siteExecutiveNo: '', // 现场检测编号(审批编号) siteExecutiveName: '', // 现场检测名字(审批名称) applyId: '', // 申请人id @@ -72,13 +72,13 @@ }) // -----------------------------------------字典-------------------------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 function getDict() { // 实验室 getDictByCode('bizGroupCodeEquipment').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) diff --git a/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue b/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue index 47ec902..a0031cb 100644 --- a/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue +++ b/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue @@ -27,13 +27,13 @@ const emits = defineEmits(['confirm']) const dialogFormVisible = ref(false) const labCode = ref('') // 实验室 -const groupCode = ref('') // 组别 +const groupCode = ref('') // 部门 const changeType = ref('') // 允许筛选条件改变类型 const selectByUseStatus = ref('') // 固定筛选使用状态 // 查询条件 const listQuery = ref({ approvalStatus: '0', // 审批状态类型code,导出接口不用传 - groupCode: '', // 组别--后台定义用此字段筛选部门(刘翔) + groupCode: '', // 部门--后台定义用此字段筛选部门(刘翔) directorId: '', // 负责人id equipmentName: props.equipmentName, // 设备名称 equipmentNo: '', // 设备编号 @@ -143,7 +143,7 @@ const clearList = () => { listQuery.value = { approvalStatus: '0', // 审批状态类型code,导出接口不用传 - groupCode: '', // 组别--后台定义用此字段筛选部门(刘翔) + groupCode: '', // 部门--后台定义用此字段筛选部门(刘翔) directorId: '', // 负责人id equipmentName: '', // 设备名称 equipmentNo: '', // 设备编号 @@ -207,8 +207,8 @@ /** * 弹窗初始化 * @param labCode 实验室 - * @param groupCode 组别 - * @param noChange 是否实验室和组别固定,不允许改变 + * @param groupCode 部门 + * @param noChange 是否实验室和部门固定,不允许改变 * @param selectByUseStatusType 固定筛选使用状态的类型 */ const initDialog = async (labCodeParam = '', groupCodeParam = '', changeTypeParam = '', selectByUseStatusType = '') => { @@ -216,7 +216,7 @@ listQuery.value.labCode = labCodeParam listQuery.value.groupCode = groupCodeParam labCode.value = labCodeParam// 实验室 - groupCode.value = groupCodeParam// 组别 + groupCode.value = groupCodeParam// 部门 changeType.value = changeTypeParam// 允许筛选条件改变类型 selectByUseStatus.value = selectByUseStatusType dialogFormVisible.value = true diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue index f730b40..6bc8b66 100644 --- a/src/views/business/fieldTest/approve/list.vue +++ b/src/views/business/fieldTest/approve/list.vue @@ -43,7 +43,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, @@ -145,7 +145,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, @@ -196,7 +196,7 @@ applyTimeStart: listQuery.value.applyTimeStart, // 申请时间开始 labCode: listQuery.value.labCode, // 实验室 - groupCode: listQuery.value.groupCode, // 组别、部门 + groupCode: listQuery.value.groupCode, // 部门、部门 executiveItem: listQuery.value.executiveItem, // 测试校准检定项目 orderNo: listQuery.value.orderNo, // 关联任务单 offset: 1, diff --git a/src/views/business/fieldTest/record/dialog/selectFieldTestApprove.vue b/src/views/business/fieldTest/record/dialog/selectFieldTestApprove.vue index 43ef3d7..be4a469 100644 --- a/src/views/business/fieldTest/record/dialog/selectFieldTestApprove.vue +++ b/src/views/business/fieldTest/record/dialog/selectFieldTestApprove.vue @@ -21,7 +21,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, @@ -76,7 +76,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, diff --git a/src/views/business/fieldTest/record/edit.vue b/src/views/business/fieldTest/record/edit.vue index 9f30b7b..8d9765d 100644 --- a/src/views/business/fieldTest/record/edit.vue +++ b/src/views/business/fieldTest/record/edit.vue @@ -30,8 +30,8 @@ const form = ref({ labCode: '', // 实验室 labCodeName: '', // 实验室名称 - groupCode: '', // 组别 - groupCodeName: '', // 组别(字典value) + groupCode: '', // 部门 + groupCodeName: '', // 部门(字典value) logNo: '', // 记录单编号 logName: '', // 记录单名称 createUserId: '', // 创建人id @@ -84,14 +84,14 @@ // -------------------------------------------字典------------------------------------------ const userList = ref<{ [key: string]: string }[]>([]) // 用户列表 const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 // 获取字典值 async function getDict() { // 实验室 getDictByCode('bizGroupCodeEquipment').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue index 83fce19..22540f6 100644 --- a/src/views/business/fieldTest/record/list.vue +++ b/src/views/business/fieldTest/record/list.vue @@ -17,7 +17,7 @@ siteExecutiveNo: '', // 现场测试、校准 或检定审批单编号 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 limit: 20, offset: 1, @@ -90,7 +90,7 @@ siteExecutiveNo: '', // 现场测试、校准 或检定审批单编号 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 limit: 20, offset: 1, diff --git a/src/views/business/fieldTest/record/record-interface.ts b/src/views/business/fieldTest/record/record-interface.ts index 7e67e86..bd4678e 100644 --- a/src/views/business/fieldTest/record/record-interface.ts +++ b/src/views/business/fieldTest/record/record-interface.ts @@ -6,7 +6,7 @@ siteExecutiveNo: string // 现场测试、校准 或检定审批单编号 labCode: string // 实验室 - groupCode: string // 组别、部门 + groupCode: string // 部门、部门 executiveItem: string // 测试校准检定项目 limit: number offset: number @@ -27,8 +27,8 @@ export interface IForm { labCode: string // 实验室 labCodeName: string // 实验室名称 - groupCode: string // 组别(字典code) - groupCodeName: string // 组别(字典value) + groupCode: string // 部门(字典code) + groupCodeName: string // 部门(字典value) logNo: string // 记录单编号 logName: string // 记录单名称 createUserId: string // 创建人id diff --git a/src/views/business/manager/sendReceive/components/basic.vue b/src/views/business/manager/sendReceive/components/basic.vue index d9fc336..7eb7323 100644 --- a/src/views/business/manager/sendReceive/components/basic.vue +++ b/src/views/business/manager/sendReceive/components/basic.vue @@ -55,7 +55,7 @@ directorId: '', // 负责人Id rfid: '', // RFID标签绑定 useSign: '', // 在用信息(字典code) - groupInfos: [], // 组别信息 + groupInfos: [], // 部门信息 installLocation: '', // 安装位置(多个用,拼接) installLocationExt: '', // 安装位置(自定义编写) testTask: '', // 参试任务 @@ -466,7 +466,7 @@ - + // 组别信息 + groupInfos: Array // 部门信息 installLocation: string // 安装位置(多个用,拼接) installLocationExt: string // 安装位置(自定义编写) testTask: string // 参试任务 diff --git a/src/api/equipment/info/book.ts b/src/api/equipment/info/book.ts index 60cf0d2..295d4f9 100644 --- a/src/api/equipment/info/book.ts +++ b/src/api/equipment/info/book.ts @@ -9,7 +9,7 @@ return request({ url: `${prefix}/approval/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -18,7 +18,7 @@ return request({ url: `${prefix}/save`, method: 'post', - data + data, }) } @@ -27,7 +27,7 @@ return request({ url: `${prefix}/draftUpdate`, method: 'post', - data + data, }) } // 编辑 @@ -35,7 +35,7 @@ return request({ url: `${prefix}/failUpdate`, method: 'post', - data + data, }) } @@ -44,7 +44,7 @@ return request({ url: `${prefix}/detail`, method: 'post', - data + data, }) } @@ -59,7 +59,7 @@ return request({ url: `${prefix}/submit`, method: 'post', - data + data, }) } @@ -68,7 +68,7 @@ return request({ url: `${prefix}/draftDelete`, method: 'post', - data + data, }) } @@ -77,7 +77,7 @@ return request({ url: `${prefix}/approval/delete`, method: 'post', - data + data, }) } @@ -86,7 +86,7 @@ return request({ url: `${prefix}/circulationLog/listPage`, method: 'post', - data + data, }) } @@ -99,7 +99,7 @@ return request({ url: `${prefix}/status/log/list`, method: 'get', - params + params, }) } @@ -112,7 +112,7 @@ return request({ url: `${prefix}/approval/revoke`, method: 'post', - data + data, }) } @@ -125,7 +125,7 @@ return request({ url: `${prefix}/approval/refuse`, method: 'post', - data + data, }) } @@ -134,7 +134,7 @@ return request({ url: `${prefix}/remind`, method: 'post', - data + data, }) } @@ -143,11 +143,11 @@ return request({ url: `${prefix}/import`, method: 'post', - data + data, }) } -// 根据实验室代码和组别获取deptId +// 根据实验室代码和部门获取deptId export function getDeptIdByLabAndGroup(params: { labCode: string groupNo: string @@ -155,7 +155,7 @@ return request({ url: '/system/getDeptIdByLabAndGroup', method: 'get', - params + params, }) } @@ -164,7 +164,7 @@ return request({ url: `${path}?offset=${data.offset}&limit=${data.limit}`, method: 'post', - data + data, }) } @@ -173,7 +173,7 @@ return request({ url: '/equipment/certificate/listPage', method: 'post', - data + data, }) } @@ -182,7 +182,7 @@ return request({ url: '/equipment/detail/maintain/listPage', method: 'post', - data + data, }) } @@ -191,7 +191,7 @@ return request({ url: '/equipment/detail/resume/listPage', method: 'post', - data + data, }) } @@ -200,7 +200,7 @@ return request({ url: '/equipment/hasChanged', method: 'post', - data + data, }) } @@ -210,7 +210,7 @@ url: '/equipment/exportFile', method: 'post', responseType: 'blob', - data + data, }) } @@ -220,6 +220,6 @@ url: '/equipment/exportExcelFile', method: 'post', responseType: 'blob', - data + data, }) } diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 5678997..ff2d6d5 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -10,7 +10,7 @@ return request({ url: `${prefix}mgr/list`, method: 'get', - params + params, }) } @@ -19,14 +19,14 @@ return request({ url: '/system/mgr/list', method: 'get', - params + params, }) } // 获取用户所在单位 export function getUserDept() { return request({ - url: '/system/company' + url: '/system/company', }) } @@ -43,7 +43,7 @@ return request({ url: `${prefix}mgr/delete`, method: 'post', - data + data, }) } @@ -52,7 +52,7 @@ return request({ url: `${prefix}mgr/freeze`, method: 'post', - data + data, }) } // 冻结用户 @@ -60,7 +60,7 @@ return request({ url: `${prefix}mgr/unfreeze`, method: 'post', - data + data, }) } @@ -69,7 +69,7 @@ return request({ url: 'sys/mgr/reset', method: 'post', - data + data, }) } @@ -80,17 +80,17 @@ method: 'post', data: { userId, - roleIds: ids - } + roleIds: ids, + }, // paramsSerializer: (params) => qs.stringify(params, { indices: false }) }) } -// 获取用户实验室代码和组别 +// 获取用户实验室代码和部门 export function getLabAndGroup(params: { deptId: string }) { return request({ url: '/system/labAndGroup', method: 'get', - params + params, }) } diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 102ce61..400bf48 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -34,11 +34,11 @@ isLogout: 0, // 是否被退出登录 bizLabCode: localStorage.bizLabCode || '', // 实验室 labCodeName: localStorage.labCodeName || '', // 实验室名称 - groupNo: localStorage.groupNo || '', // 组别 - groupName: localStorage.groupName || '' // 组别名称 + groupNo: localStorage.groupNo || '', // 部门 + groupName: localStorage.groupName || '', // 部门名称 }), getters: { - isLogin: state => { + isLogin: (state) => { let retn = false if (state.token) { retn = true @@ -46,17 +46,18 @@ return retn }, // 是否已获取用户信息 - hasUserInfo: state => { + hasUserInfo: (state) => { if (state.roleList && state.roleList.length > 0) { return true - } else { + } + else { return false } }, - getPublicKey: state => { + getPublicKey: (state) => { return state.publicKey }, - getPrivateKey: state => { + getPrivateKey: (state) => { return state.privateKey }, getMenus: (state): Menu.menu[] => { @@ -64,14 +65,14 @@ }, getBtns: (state): Menu.menu[] => { return state.btns - } + }, }, actions: { // 获取项目基础配置 getBaseConfig() { return new Promise((resolve, reject) => { getConfig() - .then(res => { + .then((res) => { this.publicKey = res.data.publicKey localStorage.setItem('publicKey', res.data.publicKey) // 保存私钥 @@ -80,7 +81,7 @@ this.isLogout = 0 resolve(res.data) }) - .catch(e => { + .catch((e) => { reject(e) }) }) @@ -94,21 +95,21 @@ }) { return new Promise((resolve, reject) => { doLogin(data) - .then(res => { + .then((res) => { localStorage.setItem('token', res.data.token) this.username = res.data.username this.token = res.data.token this.isLogout = 0 resolve() }) - .catch(error => { + .catch((error) => { reject(error) }) }) }, // 注销 logout() { - return new Promise(resolve => { + return new Promise((resolve) => { const routeStore = useRouteStore() const menuStore = useMenuStore() localStorage.removeItem('username') @@ -117,17 +118,17 @@ localStorage.removeItem('depId') localStorage.removeItem('bizLabCode') // 实验室 localStorage.removeItem('labCodeName') // 实验室 - localStorage.removeItem('groupNo') // 组别 - localStorage.removeItem('groupName') // 组别 + localStorage.removeItem('groupNo') // 部门 + localStorage.removeItem('groupName') // 部门 // localStorage.clear() this.username = '' this.token = '' this.roleList = [] this.roleNames = [] this.bizLabCode = '' // 实验室 - this.groupNo = '' // 组别 - this.labCodeName = '' // 组别 - this.groupName = '' // 组别 + this.groupNo = '' // 部门 + this.labCodeName = '' // 部门 + this.groupName = '' // 部门 routeStore.removeRoutes() menuStore.setActived(0) resolve() @@ -135,53 +136,54 @@ }, // 获取用户信息 getUserInfo() { - return new Promise(resolve => { + return new Promise((resolve) => { getInfo() - .then(res => { + .then((res) => { if (res.data.roleIds && res.data.roleIds.length > 0) { this.roleList = res.data.roleIds this.roleNames = res.data.roleNames this.roleTips = res.data.roleTips localStorage.setItem('nameId', res.data.id) localStorage.setItem('depId', res.data.deptId) - } else { + } + else { reject('该用户无角色') } if (res.data.deptId) { this.deptId = res.data.deptId this.deptName = res.data.deptName - // 获取本用户实验室代码、组别 - getLabAndGroup({ deptId: res.data.deptId }).then(res => { + // 获取本用户实验室代码、部门 + getLabAndGroup({ deptId: res.data.deptId }).then((res) => { this.bizLabCode = res.data.bizLabCode // 实验室 - this.groupNo = res.data.groupNo // 组别 + this.groupNo = res.data.groupNo // 部门 if (this.bizLabCode) { - getDictByCode('bizGroupCodeEquipment').then(response => { + getDictByCode('bizGroupCodeEquipment').then((response) => { const labCodeList = response.data const index = labCodeList.findIndex( (item: { value: string }) => - item.value === this.bizLabCode + item.value === this.bizLabCode, ) if (index !== -1) { this.labCodeName = labCodeList[index].name // 实验室 localStorage.setItem( 'labCodeName', - labCodeList[index].name + labCodeList[index].name, ) } }) } if (this.bizLabCode) { - getDictByCode('bizGroupCode').then(response => { + getDictByCode('bizGroupCode').then((response) => { const groupCodeList = response.data const index = groupCodeList.findIndex( - (item: { value: string }) => item.value === this.groupNo + (item: { value: string }) => item.value === this.groupNo, ) if (index !== -1) { this.groupName = groupCodeList[index].name localStorage.setItem( 'groupName', - groupCodeList[index].name + groupCodeList[index].name, ) } }) @@ -190,10 +192,11 @@ localStorage.setItem('bizLabCode', res.data.bizLabCode) }) // 基本信息-部门接口-查询部门类别 - getDeptList({ deptName: res.data.deptName }).then(response => { + getDeptList({ deptName: res.data.deptName }).then((response) => { this.deptType = response.data.list[0].deptType }) - } else { + } + else { reject('该用户无组织机构') } this.id = res.data.id @@ -210,13 +213,13 @@ getPermissions(currentSystem?: { name: string; code: string }) { const params = { resourceType: '', - parentCode: '' + parentCode: '', } if (currentSystem) { params.parentCode = currentSystem.code // 子系统code } - return new Promise(resolve => { - getUserMenus(params).then(response => { + return new Promise((resolve) => { + getUserMenus(params).then((response) => { const data = response.data const menus = [] // 仅菜单 const btns = [] // 非菜单 @@ -230,14 +233,14 @@ const menu_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } menus.push(menu_tmp) } const btn_tmp = { url: menu.url, name: menu.name, - icon: menu.icon + icon: menu.icon, } btns.push(btn_tmp) } @@ -250,8 +253,8 @@ }, // 修改密码 editPassword(data: { oldPwd: string; newPwd: string }) { - return new Promise(resolve => { - changePwd(data).then(response => { + return new Promise((resolve) => { + changePwd(data).then((response) => { resolve(response) }) }) @@ -259,9 +262,9 @@ // 被退出登录 toLogout() { this.isLogout += 1 - } - } - } + }, + }, + }, ) export default useUserStore diff --git a/src/views/business/certManage/apply/apply-interface.ts b/src/views/business/certManage/apply/apply-interface.ts index 5595f43..1fdb9b7 100644 --- a/src/views/business/certManage/apply/apply-interface.ts +++ b/src/views/business/certManage/apply/apply-interface.ts @@ -31,7 +31,7 @@ // 表单 export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 changeApplyNo: string // 申请单编号 changeApplyName: string // 申请单名称 createUserId: string // 创建人id diff --git a/src/views/business/certManage/apply/components/basic.vue b/src/views/business/certManage/apply/components/basic.vue index 3be1fef..bf02448 100644 --- a/src/views/business/certManage/apply/components/basic.vue +++ b/src/views/business/certManage/apply/components/basic.vue @@ -32,7 +32,7 @@ const user = useUserStore() // 用户信息 const form = ref({ labCode: '', // 实验室 - groupCode: '', // 组别 + groupCode: '', // 部门 changeApplyNo: '', // 申请单编号 changeApplyName: '', // 申请单名称 createUserId: '', // 创建人id @@ -53,13 +53,13 @@ const rules = ref({ // 校验规则 labCode: [{ required: true, message: '实验室不能为空', trigger: ['blur', 'change'] }], - groupCode: [{ required: true, message: '组别不能为空', trigger: ['blur', 'change'] }], + groupCode: [{ required: true, message: '部门不能为空', trigger: ['blur', 'change'] }], changeReportNo: [{ required: true, message: '更换证书编号不能为空', trigger: ['change', 'blur'] }], changeType: [{ required: true, message: '变更类型不能为空', trigger: ['change', 'blur'] }], }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 const changeTypeList = ref([]) // 变更类型 function getDict() { @@ -67,7 +67,7 @@ getDictByCode('bizLabCode').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) @@ -192,7 +192,7 @@ onMounted(async () => { if (props.pageType === 'edit' || props.pageType === 'detail') { form.value.labCode = $route.query.labCode as any // 实验室 - form.value.groupCode = $route.query.groupCode as string // 组别 + form.value.groupCode = $route.query.groupCode as string // 部门 form.value.changeApplyNo = $route.query.changeApplyNo as string // 申请单编号 form.value.changeApplyName = $route.query.changeApplyName as string // 申请单名称 form.value.createUserId = $route.query.createUserId as string // 创建人id @@ -236,8 +236,8 @@ - - + + diff --git a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue index b8d9940..959501b 100644 --- a/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue +++ b/src/views/business/certManage/apply/dialog/selectTaskMeasureCertificateListDialog.vue @@ -18,7 +18,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 @@ -123,7 +123,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/certManage/apply/list.vue b/src/views/business/certManage/apply/list.vue index 6829e97..fb5e6c3 100644 --- a/src/views/business/certManage/apply/list.vue +++ b/src/views/business/certManage/apply/list.vue @@ -211,7 +211,7 @@ processId: row.processId, // 流程实例id taskId: row.taskId, // 任务id labCode: row.labCode, // 实验室 - groupCode: row.groupCode, // 组别 + groupCode: row.groupCode, // 部门 changeApplyNo: row.changeApplyNo, // 申请单编号 changeApplyName: row.changeApplyName, // 申请单名称 createUserId: row.createUserId, // 创建人id diff --git a/src/views/business/certManage/cert/cert-interface.ts b/src/views/business/certManage/cert/cert-interface.ts index 19d8c65..9fc92d0 100644 --- a/src/views/business/certManage/cert/cert-interface.ts +++ b/src/views/business/certManage/cert/cert-interface.ts @@ -17,7 +17,7 @@ measureValidDateStart: string // 检定有效期开始 measureValidDateEnd: string // 检定有效期结束 labCode: string // 实验室(字典code) - groupCode: string // 组别(字典code) + groupCode: string // 部门(字典code) createUserName: string // 检定员 formId: string // 表单id printStatus: string // 打印状态(未打印传1,其他状态不传) diff --git a/src/views/business/certManage/cert/list.vue b/src/views/business/certManage/cert/list.vue index 3daaec1..f21f74d 100644 --- a/src/views/business/certManage/cert/list.vue +++ b/src/views/business/certManage/cert/list.vue @@ -45,7 +45,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -197,7 +197,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -282,7 +282,7 @@ measureValidDateStart: listQuery.value.measureValidDateStart, // 检定有效期开始 measureValidDateEnd: listQuery.value.measureValidDateEnd, // 检定有效期结束 labCode: listQuery.value.labCode, // 实验室(字典code) - groupCode: listQuery.value.groupCode, // 组别(字典code) + groupCode: listQuery.value.groupCode, // 部门(字典code) createUserName: listQuery.value.createUserName, // 检定员 formId: listQuery.value.formId, // 表单id printStatus: listQuery.value.printStatus, // 打印状态(未打印传1,其他状态不传) diff --git a/src/views/business/certManage/supplement/components/basic.vue b/src/views/business/certManage/supplement/components/basic.vue index 61921e2..d5ec033 100644 --- a/src/views/business/certManage/supplement/components/basic.vue +++ b/src/views/business/certManage/supplement/components/basic.vue @@ -76,7 +76,7 @@ }) // ------------------------------------------字典---------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 function getDict() { // 实验室 @@ -118,7 +118,7 @@ measureValidDateStart: '', // 检定有效期开始 measureValidDateEnd: '', // 检定有效期结束 labCode: '', // 实验室(字典code) - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) createUserName: '', // 检定员 formId: SCHEDULE.CERTIFICATE_PRINT_APPROVAL, // 表单id printStatus: '', // 打印状态(未打印传1,其他状态不传) @@ -144,7 +144,7 @@ certificateName: '', // 证书名称 certificateNo: changeReportNo, // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/certManage/supplement/list.vue b/src/views/business/certManage/supplement/list.vue index ce4297f..0b3f696 100644 --- a/src/views/business/certManage/supplement/list.vue +++ b/src/views/business/certManage/supplement/list.vue @@ -252,7 +252,7 @@ processId: row.processId, // 流程实例id taskId: row.taskId, // 任务id labCode: row.labCode, // 实验室 - groupCode: row.groupCode, // 组别 + groupCode: row.groupCode, // 部门 ...row, }, }) @@ -352,7 +352,7 @@ certificateName: '', // 证书名称 certificateNo: '', // 证书编号 formId: SCHEDULE.CERTIFICATE_APPROVAL, // 表单id(流程定义对应的表单id,等价于业务id),导出接口不用传 - groupCode: '', // 组别(字典code) + groupCode: '', // 部门(字典code) labCode: '', // 实验室(字典code) manufactureNo: '', // 出厂编号 manufacturer: '', // 生产厂家 diff --git a/src/views/business/fieldTest/approve/approve-interface.ts b/src/views/business/fieldTest/approve/approve-interface.ts index ab91930..9b5bc40 100644 --- a/src/views/business/fieldTest/approve/approve-interface.ts +++ b/src/views/business/fieldTest/approve/approve-interface.ts @@ -9,7 +9,7 @@ siteExecutiveNo: string // 现场检测编号 labCode: string // 实验室 - groupCode: string // 组别、部门 + groupCode: string // 部门、部门 executiveItem: string // 测试校准检定项目 orderNo: string // 关联任务单 limit: number @@ -31,7 +31,7 @@ export interface IForm { labCode: string // 实验室 - groupCode: string // 组别 + groupCode: string // 部门 siteExecutiveNo: string // 现场检测编号(审批编号) siteExecutiveName: string // 现场检测名字(审批名称) applyId: string // 申请人id diff --git a/src/views/business/fieldTest/approve/components/basic.vue b/src/views/business/fieldTest/approve/components/basic.vue index 5349362..98ab196 100644 --- a/src/views/business/fieldTest/approve/components/basic.vue +++ b/src/views/business/fieldTest/approve/components/basic.vue @@ -36,7 +36,7 @@ const user = useUserStore() // 用户信息 const form = ref({ labCode: '', // 实验室 - groupCode: '', // 组别 + groupCode: '', // 部门 siteExecutiveNo: '', // 现场检测编号(审批编号) siteExecutiveName: '', // 现场检测名字(审批名称) applyId: '', // 申请人id @@ -72,13 +72,13 @@ }) // -----------------------------------------字典-------------------------------------------------------------- const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 function getDict() { // 实验室 getDictByCode('bizGroupCodeEquipment').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) diff --git a/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue b/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue index 47ec902..a0031cb 100644 --- a/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue +++ b/src/views/business/fieldTest/approve/dialog/selectEquipmentDialog.vue @@ -27,13 +27,13 @@ const emits = defineEmits(['confirm']) const dialogFormVisible = ref(false) const labCode = ref('') // 实验室 -const groupCode = ref('') // 组别 +const groupCode = ref('') // 部门 const changeType = ref('') // 允许筛选条件改变类型 const selectByUseStatus = ref('') // 固定筛选使用状态 // 查询条件 const listQuery = ref({ approvalStatus: '0', // 审批状态类型code,导出接口不用传 - groupCode: '', // 组别--后台定义用此字段筛选部门(刘翔) + groupCode: '', // 部门--后台定义用此字段筛选部门(刘翔) directorId: '', // 负责人id equipmentName: props.equipmentName, // 设备名称 equipmentNo: '', // 设备编号 @@ -143,7 +143,7 @@ const clearList = () => { listQuery.value = { approvalStatus: '0', // 审批状态类型code,导出接口不用传 - groupCode: '', // 组别--后台定义用此字段筛选部门(刘翔) + groupCode: '', // 部门--后台定义用此字段筛选部门(刘翔) directorId: '', // 负责人id equipmentName: '', // 设备名称 equipmentNo: '', // 设备编号 @@ -207,8 +207,8 @@ /** * 弹窗初始化 * @param labCode 实验室 - * @param groupCode 组别 - * @param noChange 是否实验室和组别固定,不允许改变 + * @param groupCode 部门 + * @param noChange 是否实验室和部门固定,不允许改变 * @param selectByUseStatusType 固定筛选使用状态的类型 */ const initDialog = async (labCodeParam = '', groupCodeParam = '', changeTypeParam = '', selectByUseStatusType = '') => { @@ -216,7 +216,7 @@ listQuery.value.labCode = labCodeParam listQuery.value.groupCode = groupCodeParam labCode.value = labCodeParam// 实验室 - groupCode.value = groupCodeParam// 组别 + groupCode.value = groupCodeParam// 部门 changeType.value = changeTypeParam// 允许筛选条件改变类型 selectByUseStatus.value = selectByUseStatusType dialogFormVisible.value = true diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue index f730b40..6bc8b66 100644 --- a/src/views/business/fieldTest/approve/list.vue +++ b/src/views/business/fieldTest/approve/list.vue @@ -43,7 +43,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, @@ -145,7 +145,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, @@ -196,7 +196,7 @@ applyTimeStart: listQuery.value.applyTimeStart, // 申请时间开始 labCode: listQuery.value.labCode, // 实验室 - groupCode: listQuery.value.groupCode, // 组别、部门 + groupCode: listQuery.value.groupCode, // 部门、部门 executiveItem: listQuery.value.executiveItem, // 测试校准检定项目 orderNo: listQuery.value.orderNo, // 关联任务单 offset: 1, diff --git a/src/views/business/fieldTest/record/dialog/selectFieldTestApprove.vue b/src/views/business/fieldTest/record/dialog/selectFieldTestApprove.vue index 43ef3d7..be4a469 100644 --- a/src/views/business/fieldTest/record/dialog/selectFieldTestApprove.vue +++ b/src/views/business/fieldTest/record/dialog/selectFieldTestApprove.vue @@ -21,7 +21,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, @@ -76,7 +76,7 @@ applyTimeStart: '', // 申请时间开始 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 orderNo: '', // 关联任务单 limit: 20, diff --git a/src/views/business/fieldTest/record/edit.vue b/src/views/business/fieldTest/record/edit.vue index 9f30b7b..8d9765d 100644 --- a/src/views/business/fieldTest/record/edit.vue +++ b/src/views/business/fieldTest/record/edit.vue @@ -30,8 +30,8 @@ const form = ref({ labCode: '', // 实验室 labCodeName: '', // 实验室名称 - groupCode: '', // 组别 - groupCodeName: '', // 组别(字典value) + groupCode: '', // 部门 + groupCodeName: '', // 部门(字典value) logNo: '', // 记录单编号 logName: '', // 记录单名称 createUserId: '', // 创建人id @@ -84,14 +84,14 @@ // -------------------------------------------字典------------------------------------------ const userList = ref<{ [key: string]: string }[]>([]) // 用户列表 const labCodeList = ref([]) // 实验室 -const groupCodeList = ref([]) // 组别 +const groupCodeList = ref([]) // 部门 // 获取字典值 async function getDict() { // 实验室 getDictByCode('bizGroupCodeEquipment').then((response) => { labCodeList.value = response.data }) - // 组别 + // 部门 getDictByCode('bizGroupCode').then((response) => { groupCodeList.value = response.data }) diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue index 83fce19..22540f6 100644 --- a/src/views/business/fieldTest/record/list.vue +++ b/src/views/business/fieldTest/record/list.vue @@ -17,7 +17,7 @@ siteExecutiveNo: '', // 现场测试、校准 或检定审批单编号 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 limit: 20, offset: 1, @@ -90,7 +90,7 @@ siteExecutiveNo: '', // 现场测试、校准 或检定审批单编号 labCode: '', // 实验室 - groupCode: '', // 组别、部门 + groupCode: '', // 部门、部门 executiveItem: '', // 测试校准检定项目 limit: 20, offset: 1, diff --git a/src/views/business/fieldTest/record/record-interface.ts b/src/views/business/fieldTest/record/record-interface.ts index 7e67e86..bd4678e 100644 --- a/src/views/business/fieldTest/record/record-interface.ts +++ b/src/views/business/fieldTest/record/record-interface.ts @@ -6,7 +6,7 @@ siteExecutiveNo: string // 现场测试、校准 或检定审批单编号 labCode: string // 实验室 - groupCode: string // 组别、部门 + groupCode: string // 部门、部门 executiveItem: string // 测试校准检定项目 limit: number offset: number @@ -27,8 +27,8 @@ export interface IForm { labCode: string // 实验室 labCodeName: string // 实验室名称 - groupCode: string // 组别(字典code) - groupCodeName: string // 组别(字典value) + groupCode: string // 部门(字典code) + groupCodeName: string // 部门(字典value) logNo: string // 记录单编号 logName: string // 记录单名称 createUserId: string // 创建人id diff --git a/src/views/business/manager/sendReceive/components/basic.vue b/src/views/business/manager/sendReceive/components/basic.vue index d9fc336..7eb7323 100644 --- a/src/views/business/manager/sendReceive/components/basic.vue +++ b/src/views/business/manager/sendReceive/components/basic.vue @@ -55,7 +55,7 @@ directorId: '', // 负责人Id rfid: '', // RFID标签绑定 useSign: '', // 在用信息(字典code) - groupInfos: [], // 组别信息 + groupInfos: [], // 部门信息 installLocation: '', // 安装位置(多个用,拼接) installLocationExt: '', // 安装位置(自定义编写) testTask: '', // 参试任务 @@ -466,7 +466,7 @@ - + // 组别信息 + groupInfos: Array // 部门信息 installLocation: string // 安装位置(多个用,拼接) installLocationExt: string // 安装位置(自定义编写) testTask: string // 参试任务 diff --git a/src/views/business/measure/item/detail.vue b/src/views/business/measure/item/detail.vue index 48adada..6fd702c 100644 --- a/src/views/business/measure/item/detail.vue +++ b/src/views/business/measure/item/detail.vue @@ -846,16 +846,16 @@