From 7154bbbbccf8107a5c08de782656073eca216995 Mon Sep 17 00:00:00 2001 From: Teo <2642673902@qq.com> Date: Sat, 2 Aug 2025 16:45:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9D=90=E6=96=99=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- .env.production | 2 + src/api/materials/company/index.ts | 4 +- src/api/materials/materials/index.ts | 11 ++-- src/api/materials/materialsInventory/index.ts | 4 +- src/api/project/project/index.ts | 7 +-- src/views/design/volumeCatalog/index.vue | 16 ++++++ src/views/materials/company/index.vue | 24 ++++----- src/views/materials/materials/index.vue | 34 +++++++------ .../materials/materialsInventory/index.vue | 50 +++++++++---------- .../project/contractorMaterial/index.vue | 1 + src/views/project/project/index.vue | 40 ++++++--------- src/views/project/subManagementUser/index.vue | 1 + src/views/safety/safetyInspection/index.vue | 16 ------ 14 files changed, 106 insertions(+), 106 deletions(-) create mode 100644 src/views/design/volumeCatalog/index.vue diff --git a/.env.development b/.env.development index cafdc42..382faae 100644 --- a/.env.development +++ b/.env.development @@ -8,7 +8,7 @@ VITE_APP_ENV = 'development' VITE_APP_BASE_API = 'http://192.168.110.119:8899' # VITE_APP_BASE_API = 'http://58.17.134.85:8899' # GO开发环境 -VITE_APP_BASE_API_GO = 'http://192.168.110.159:8919' +VITE_APP_BASE_API_GO = 'http://58.17.134.85:8919' # 无人机接口地址 diff --git a/.env.production b/.env.production index e1eaa1a..efcba42 100644 --- a/.env.production +++ b/.env.production @@ -15,6 +15,8 @@ VITE_APP_SNAILJOB_ADMIN = '/snail-job' # 生产环境 VITE_APP_BASE_API = 'http://58.17.134.85:8899' +# GO生产环境 +VITE_APP_BASE_API_GO = 'http://58.17.134.85:7363' # 是否在打包时开启压缩,支持 gzip 和 brotli VITE_BUILD_COMPRESS = gzip diff --git a/src/api/materials/company/index.ts b/src/api/materials/company/index.ts index da21b9f..4f0aa80 100644 --- a/src/api/materials/company/index.ts +++ b/src/api/materials/company/index.ts @@ -1,4 +1,4 @@ -import request from '@/utils/request'; +import request from '@/utils/request-go'; import { AxiosPromise } from 'axios'; import { CompanyForm, CompanyQuery, CompanyVO } from '@/api/materials/company/types'; @@ -10,7 +10,7 @@ import { CompanyForm, CompanyQuery, CompanyVO } from '@/api/materials/company/ty export const listCompany = (query?: CompanyQuery): AxiosPromise => { return request({ - url: '/materials/company/list', + url: '/zm/api/v1/system/busCompany/list', method: 'get', params: query }); diff --git a/src/api/materials/materials/index.ts b/src/api/materials/materials/index.ts index 04a2153..33bc66b 100644 --- a/src/api/materials/materials/index.ts +++ b/src/api/materials/materials/index.ts @@ -1,4 +1,4 @@ -import request from '@/utils/request'; +import request from '@/utils/request-go'; import { AxiosPromise } from 'axios'; import { MaterialsForm, MaterialsQuery, MaterialsVO } from '@/api/materials/materials/types'; @@ -9,7 +9,7 @@ import { MaterialsForm, MaterialsQuery, MaterialsVO } from '@/api/materials/mate */ export const listMaterials = (query?: MaterialsQuery): AxiosPromise => { return request({ - url: '/materials/materials/list', + url: '/zm/api/v1/system/busEquipmentMaterials/list', method: 'get', params: query }); @@ -21,8 +21,11 @@ export const listMaterials = (query?: MaterialsQuery): AxiosPromise => { return request({ - url: '/materials/materials/' + id, - method: 'get' + url: '/zm/api/v1/system/busEquipmentMaterials/get', + method: 'get', + params: { + equipmentMaterialsId: id + } }); }; diff --git a/src/api/materials/materialsInventory/index.ts b/src/api/materials/materialsInventory/index.ts index 2d780e3..ee19f6c 100644 --- a/src/api/materials/materialsInventory/index.ts +++ b/src/api/materials/materialsInventory/index.ts @@ -1,4 +1,4 @@ -import request from '@/utils/request'; +import request from '@/utils/request-go'; import { AxiosPromise } from 'axios'; import { MaterialsInventoryForm, MaterialsInventoryQuery, MaterialsInventoryVO } from '@/api/materials/materialsInventory/types'; @@ -10,7 +10,7 @@ import { MaterialsInventoryForm, MaterialsInventoryQuery, MaterialsInventoryVO } export const listMaterialsInventory = (query?: MaterialsInventoryQuery): AxiosPromise => { return request({ - url: '/materials/materialsInventory/list', + url: '/zm/api/v1/system/busEquipmentMaterialsInventory/excellist', method: 'get', params: query }); diff --git a/src/api/project/project/index.ts b/src/api/project/project/index.ts index 61dcb29..801fec8 100644 --- a/src/api/project/project/index.ts +++ b/src/api/project/project/index.ts @@ -1,6 +1,7 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { childProjectQuery, ProjectForm, ProjectQuery, ProjectVO } from '@/api/project/project/types'; +import requestGo from '@/utils/request-go'; /** * 查询项目列表 @@ -9,10 +10,10 @@ import { childProjectQuery, ProjectForm, ProjectQuery, ProjectVO } from '@/api/p */ export const listProject = (query?: ProjectQuery): AxiosPromise => { - return request({ - url: '/project/project/list', + return requestGo({ + url: '/zm/api/v1/system/sysProject/list', method: 'get', - params: query + params: { ...query, isShow: '2' } }); }; diff --git a/src/views/design/volumeCatalog/index.vue b/src/views/design/volumeCatalog/index.vue new file mode 100644 index 0000000..67bddd4 --- /dev/null +++ b/src/views/design/volumeCatalog/index.vue @@ -0,0 +1,16 @@ + + + + + diff --git a/src/views/materials/company/index.vue b/src/views/materials/company/index.vue index 32e7e58..ae45681 100644 --- a/src/views/materials/company/index.vue +++ b/src/views/materials/company/index.vue @@ -24,7 +24,7 @@ - - + + @@ -177,7 +181,7 @@ const initFormData: MaterialsForm = { id: undefined, materialsName: undefined, companyId: undefined, - projectId: currentProject.value.id, + projectId: currentProject.value.goId, typeSpecificationName: undefined, fileOssIdMap: undefined, usePart: undefined, @@ -193,7 +197,7 @@ const data = reactive>({ pageSize: 10, materialsName: undefined, companyId: undefined, - projectId: currentProject.value.id, + projectId: currentProject.value.goId, typeSpecificationName: undefined, fileOssIdMap: undefined, usePart: undefined, @@ -214,8 +218,8 @@ const companyOptions = ref([]); const getList = async () => { loading.value = true; const res = await listMaterials(queryParams.value); - materialsList.value = res.rows; - total.value = res.total; + materialsList.value = res.data.list; + total.value = res.data.total; loading.value = false; }; @@ -227,10 +231,12 @@ const getCompanyList = async () => { pageSize: 1000, projectId: currentProject.value.id }); - companyOptions.value = companyRes.rows.map((company: CompanyVO) => ({ - value: company.id, - label: company.companyName + companyOptions.value = companyRes.data.list.map((company: CompanyVO) => ({ + value: company.companyId + '', + label: company.companyName, + elTagType: 'default' })); + console.log('🚀 ~ getCompanyList ~ companyOptions.value:', companyOptions.value); loading.value = false; }; @@ -268,7 +274,7 @@ const handleSelectionChange = (selection: MaterialsVO[]) => { /** 展开材料详情抽屉操作 */ const showDetailDrawer = ref(false); const handleShowDrawer = (row?: MaterialsVO) => { - currentMaterialsId.value = row.id; + currentMaterialsId.value = row.companyId; showDetailDrawer.value = true; }; @@ -354,7 +360,7 @@ const handleOssUpdate = (ossId: string, value: string) => { //监听项目id刷新数据 const listeningProject = watch( - () => currentProject.value.id, + () => currentProject.value.goId, (nid, oid) => { queryParams.value.projectId = nid; form.value.projectId = nid; diff --git a/src/views/materials/materialsInventory/index.vue b/src/views/materials/materialsInventory/index.vue index d2914ce..892999c 100644 --- a/src/views/materials/materialsInventory/index.vue +++ b/src/views/materials/materialsInventory/index.vue @@ -31,53 +31,53 @@ - + - - + + + + + + + - - - - - + + - + - - - + - + - + @@ -128,7 +118,7 @@ - + - + - + @@ -460,8 +450,8 @@ const { queryParams, form, rules } = toRefs(data); const getList = async () => { loading.value = true; const res = await listProject(queryParams.value); - projectList.value = res.rows; - total.value = res.total; + projectList.value = res.data.list; + total.value = res.data.total; loading.value = false; }; /** 取消按钮 */ diff --git a/src/views/project/subManagementUser/index.vue b/src/views/project/subManagementUser/index.vue index 4130b26..67fde77 100644 --- a/src/views/project/subManagementUser/index.vue +++ b/src/views/project/subManagementUser/index.vue @@ -517,6 +517,7 @@ const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { type_of_work, user_sex_type, user_clock_type, user_file_type, user_status_type, wage_measure_unit_type } = toRefs( proxy?.useDict('type_of_work', 'user_sex_type', 'user_clock_type', 'user_file_type', 'user_status_type', 'wage_measure_unit_type') ); +console.log('🚀 ~ user_sex_type:', user_sex_type); // 获取用户 store const userStore = useUserStoreHook(); // 从 store 中获取项目列表和当前选中的项目 diff --git a/src/views/safety/safetyInspection/index.vue b/src/views/safety/safetyInspection/index.vue index 80419d6..9e4040c 100644 --- a/src/views/safety/safetyInspection/index.vue +++ b/src/views/safety/safetyInspection/index.vue @@ -241,20 +241,12 @@ const { queryParams, form, rules } = toRefs(data); const teamOpt = ref([]); const foremanOpt = ref([]); -const teamList = ref(); /** 查询安全巡检工单列表 */ const getList = async () => { loading.value = true; const res = await listSafetyInspection(queryParams.value); safetyInspectionList.value = res.data.list; total.value = res.data.total; - // 获取项目班组信息 - const teamRes = await listProjectTeamForeman(currentProject.value.id); - teamList.value = teamRes.data; - teamOpt.value = teamList.value.map((team: ProjectTeamForemanResp) => ({ - label: team.teamName, - value: team.id - })); loading.value = false; }; @@ -265,14 +257,6 @@ const getDictDataList = async () => { const res1 = await getDictData('tour_type'); safety_inspection_violation_type.value = res1.data.values; }; -const changeForeman = (value: string | number) => { - const team = teamList.value.filter((team) => team.id === value)[0]; - foremanOpt.value = team.foremanList?.map((foreman: foremanQuery) => ({ - label: foreman.foremanName, - value: foreman.foremanId - })); - form.value.correctorId = ''; -}; /** 展开安全巡检工单详情对话框操作 */ const currentSafetyInspectionId = ref();