diff --git a/.env.development b/.env.development index 0269bac..1db4544 100644 --- a/.env.development +++ b/.env.development @@ -6,7 +6,7 @@ VITE_APP_ENV = 'development' # 开发环境 # 李陈杰 209 -# VITE_APP_BASE_API = 'http://192.168.110.180:8899' +VITE_APP_BASE_API = 'http://192.168.110.180:8899' # 曾涛 # VITE_APP_BASE_API = 'http://192.168.110.180:8899' # 罗成 @@ -14,8 +14,6 @@ VITE_APP_ENV = 'development' # 朱银 # VITE_APP_BASE_API = 'http://192.168.110.180:8899' -VITE_APP_BASE_API = 'http://192.168.110.149:8899' - # 无人机接口地址 VITE_APP_BASE_DRONE_API = 'http://58.17.134.85:9512' diff --git a/src/api/design/appointment/index.ts b/src/api/design/appointment/index.ts index 61fdca8..9deefc3 100644 --- a/src/api/design/appointment/index.ts +++ b/src/api/design/appointment/index.ts @@ -27,3 +27,11 @@ export const systemUserList = (query) => { params: query }); }; +// 查询 +export const desUserList = (query) => { + return request({ + url: '/design/drawingreviewReceipts/desUser/list', + method: 'get', + params: query + }); +}; diff --git a/src/api/design/drawingreview/index.ts b/src/api/design/drawingreview/index.ts index d28e0be..7ed39e6 100644 --- a/src/api/design/drawingreview/index.ts +++ b/src/api/design/drawingreview/index.ts @@ -56,7 +56,7 @@ export const fillOutTheDesignVerificationForm = (data) => { export const drawingreviewReceipts = (data) => { return request({ url: '/design/drawingreviewReceipts', - method: 'post', + method: 'put', data }); }; @@ -96,3 +96,10 @@ export const drawingreview = (id) => { method: 'get' }); }; +// 获取单据 +export const getDrawingreviewReceipts = (id) => { + return request({ + url: '/design/drawingreviewReceipts/review/' + id, + method: 'get' + }); +}; diff --git a/src/api/materials/materialIssue/index.ts b/src/api/materials/materialIssue/index.ts index a366fa6..99af31a 100644 --- a/src/api/materials/materialIssue/index.ts +++ b/src/api/materials/materialIssue/index.ts @@ -68,3 +68,10 @@ export const getMaterialName = (id: any) => { method: 'get' }); }; +//获取出库记录 +export const inventoryList = (id: any) => { + return request({ + url: '/materials/materialIssue/inventory/list/' + id, + method: 'get' + }); +}; diff --git a/src/api/project/contractor/types.ts b/src/api/project/contractor/types.ts index f041fa6..0d4ab3f 100644 --- a/src/api/project/contractor/types.ts +++ b/src/api/project/contractor/types.ts @@ -28,10 +28,10 @@ export interface ContractorVO { * 管理人联系电话 */ custodianPhone: string; - /** + /** * 分包类型 */ - contractorType?: string; + contractorType?: string; /** * 公司相关文件 @@ -54,6 +54,14 @@ export interface ContractorForm extends BaseEntity { * 主键id */ id?: string | number; + /** + * 供应商id + */ + supplierId?: string | number; + /** + * 供应商 + */ + supplier?: string; /** * 主键id @@ -127,10 +135,10 @@ export interface ContractorQuery extends PageQuery { * 管理人联系电话 */ custodianPhone?: string; - /** + /** * 分包类型 */ - contractorType?: string; + contractorType?: string; /** * 日期范围参数 diff --git a/src/api/supplierInput/supplierInput/index.ts b/src/api/supplierInput/supplierInput/index.ts index 719aa11..834b072 100644 --- a/src/api/supplierInput/supplierInput/index.ts +++ b/src/api/supplierInput/supplierInput/index.ts @@ -8,7 +8,7 @@ import { SupplierInputVO, SupplierInputForm, SupplierInputQuery } from '@/api/su * @returns {*} */ -export const listSupplierInput = (query?: SupplierInputQuery): AxiosPromise => { +export const listSupplierInput = (query?: any): AxiosPromise => { return request({ url: '/supplierInput/supplierInput/list', method: 'get', diff --git a/src/components/Process/submitVerify.vue b/src/components/Process/submitVerify.vue index 03000a9..f678b11 100644 --- a/src/components/Process/submitVerify.vue +++ b/src/components/Process/submitVerify.vue @@ -185,6 +185,10 @@ const props = defineProps({ taskVariables: { type: Object as () => Record, default: () => {} + }, + businessId1: { + type: String, + default: '' } }); //遮罩层 @@ -336,6 +340,9 @@ const handleCompleteTask = async () => { } if (isDrawing.value) { isShowSubmit.value = true; + nextTick(() => { + detailFormTeRef.value.getInfo(props.businessId1); + }); return; } await proxy?.$modal.confirm('是否确认提交?'); @@ -538,6 +545,9 @@ const handleTermination = async () => { const handleTerminationTask = async () => { if (isDrawing.value) { isShowTermination.value = true; + nextTick(() => { + detailFormTeRef.value.getInfo(props.businessId); + }); return; } const params = { diff --git a/src/components/ProjectSelector/index.vue b/src/components/ProjectSelector/index.vue index 5884a27..1259482 100644 --- a/src/components/ProjectSelector/index.vue +++ b/src/components/ProjectSelector/index.vue @@ -56,7 +56,13 @@ const handleSelect = async (projectId: string) => { text: '项目切换中...', background: 'rgba(0, 0, 0, 0.7)' }); + setTimeout(() => { + if (loadingInstance && loadingInstance.visible) { + loadingInstance.close(); + } + }, 3000); await changeProject(projectId); + console.log('切换项目', selectedProject); // 更新项目 & 权限 userStore.setSelectedProject(selectedProject); diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 8703d66..d1e745a 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -16,7 +16,7 @@ { if (onlyOneChild.value.meta?.title == '我的待办' || props.item.meta?.title == '我的任务') { console.log(44444444); - getWaitingList(); } }); diff --git a/src/permission.ts b/src/permission.ts index 4a7ff0e..6162675 100644 --- a/src/permission.ts +++ b/src/permission.ts @@ -10,6 +10,8 @@ import useUserStore from '@/store/modules/user'; import useSettingsStore from '@/store/modules/settings'; import usePermissionStore from '@/store/modules/permission'; +let isFirst = false; + NProgress.configure({ showSpinner: false }); const whiteList = ['/login', '/register', '/social-callback', '/register*', '/register/*', '/materials/purchaseDoc/uploadCode']; @@ -17,56 +19,64 @@ const isWhiteList = (path: string) => { return whiteList.some((pattern) => isPathMatch(pattern, path)); }; -router.beforeEach(async (to, from, next) => { +router.beforeEach(async (to, from) => { NProgress.start(); - if (to.path == '/indexEquipment' || to.path == '/materials/purchaseDoc/uploadCode' || to.path == '/codeDetail') { - next(); - } else if (getToken()) { - to.meta.title && useSettingsStore().setTitle(to.meta.title); - /* has token*/ - if (to.path === '/login') { - next({ path: '/' }); - NProgress.done(); - } else if (isWhiteList(to.path)) { - next(); - } else { - if (useUserStore().roles.length === 0 || $cache.local.getJSON('isCheckRole')) { - isRelogin.show = true; - // 判断当前用户是否已拉取完user_info信息 - const [err] = await tos(useUserStore().getInfo()); - if (err) { - await useUserStore().logout(); - ElMessage.error(err); - next({ path: '/' }); - } else { - isRelogin.show = false; - const accessRoutes = await usePermissionStore().generateRoutes(); - // 根据roles权限生成可访问的路由表 - accessRoutes.forEach((route) => { - if (!isHttp(route.path)) { - router.addRoute(route); // 动态添加可访问路由表 - } - }); - $cache.local.remove('isCheckRole'); - // @ts-expect-error hack方法 确保addRoutes已完成 - next({ path: to.path, replace: true, params: to.params, query: to.query, hash: to.hash, name: to.name as string }); // hack方法 确保addRoutes已完成 - } - } else { - next(); - } - } - } else { - // 没有token - if (isWhiteList(to.path)) { - // 在免登录白名单,直接进入 - next(); - } else { - const redirect = encodeURIComponent(to.fullPath || '/'); - next(`/login?redirect=${redirect}`); // 否则全部重定向到登录页 - NProgress.done(); - } + // 特殊页面放行 + if (['/indexEquipment', '/materials/purchaseDoc/uploadCode', '/codeDetail'].includes(to.path)) { + return true; } + + // 已登录 + if (getToken()) { + if (to.meta.title) useSettingsStore().setTitle(to.meta.title); + + if (to.path === '/login') { + NProgress.done(); + return { path: '/' }; + } + + if (isWhiteList(to.path)) { + return true; + } + if ((!isFirst && useUserStore().roles.length === 0) || $cache.local.getJSON('isCheckRole') === 'true') { + isFirst = true; + isRelogin.show = true; + + const [err] = await tos(useUserStore().getInfo()); + + if (err) { + await useUserStore().logout(); + ElMessage.error(err); + NProgress.done(); + return { path: '/' }; + } + + isRelogin.show = false; + const accessRoutes = await usePermissionStore().generateRoutes(); + accessRoutes.forEach((route) => { + if (!isHttp(route.path)) router.addRoute(route); + }); + + $cache.local.remove('isCheckRole'); + + // 确保路由已添加后再跳转 + return { ...to, replace: true }; + } + + return true; + } else { + isFirst = false; + } + + // 未登录 + if (isWhiteList(to.path)) { + return true; + } + + const redirect = encodeURIComponent(to.fullPath || '/'); + NProgress.done(); + return { path: `/login?redirect=${redirect}` }; }); router.afterEach(() => { diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index a2a9836..086d45c 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -28,7 +28,6 @@ const getSelectedProjectFromStorage = () => { const getProjectTeamListFromStorage = () => { const stored = $cache.local.getJSON('ProjectTeamList'); console.log('获取缓存的项目班组列表:', stored); - return stored ? stored : null; }; @@ -75,9 +74,7 @@ export const useUserStore = defineStore('user', () => { id: p.projectId, name: p.projectName || '未知项目' })); - setProjects(projectList); - // 如果有缓存的选中项目,且该项目在当前项目列表中存在,则使用缓存的项目 const storedProject = getSelectedProjectFromStorage(); if (storedProject && projectList.some((p) => p.id === storedProject.id)) { @@ -88,16 +85,14 @@ export const useUserStore = defineStore('user', () => { } } const [err, res] = await to(getUserInfo()); - if (res) { const data = res.data; const user = data.user; const profile = user.avatar == '' || user.avatar == null ? defAva : user.avatar; - if (data.roles && data.roles.length > 0) { - setRoles(); permissionList.value = data.permissions; roleList.value = data.roles; + setRoles(); } else { roles.value = ['ROLE_DEFAULT']; } @@ -112,19 +107,16 @@ export const useUserStore = defineStore('user', () => { } return Promise.reject(err); }; - const setInfo = async () => { const [err, res] = await to(getUserInfo()); - if (res) { const data = res.data; const user = data.user; const profile = user.avatar == '' || user.avatar == null ? defAva : user.avatar; - if (data.roles && data.roles.length > 0) { - setRoles(); permissionList.value = data.permissions; roleList.value = data.roles; + setRoles(); } else { roles.value = ['ROLE_DEFAULT']; } diff --git a/src/views/design/appointment/index copy 2.vue b/src/views/design/appointment/index copy 2.vue new file mode 100644 index 0000000..d87d820 --- /dev/null +++ b/src/views/design/appointment/index copy 2.vue @@ -0,0 +1,804 @@ + + + + + diff --git a/src/views/design/appointment/index.vue b/src/views/design/appointment/index.vue index 7e58d1f..644b26b 100644 --- a/src/views/design/appointment/index.vue +++ b/src/views/design/appointment/index.vue @@ -1,251 +1,365 @@ diff --git a/src/views/design/designChange/index.vue b/src/views/design/designChange/index.vue index d744c51..7ec17a6 100644 --- a/src/views/design/designChange/index.vue +++ b/src/views/design/designChange/index.vue @@ -44,7 +44,7 @@ @@ -64,19 +64,16 @@ + + +