From 311623e208e5cb87ebcb99278fa249c9e522fa76 Mon Sep 17 00:00:00 2001 From: Teo <2642673902@qq.com> Date: Wed, 10 Sep 2025 01:11:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- src/api/cory/contactnotice/index.ts | 11 + src/api/gis/index.ts | 3 +- src/api/machinery/machinery/index.ts | 76 +- src/api/machinery/machineryDetail/index.ts | 76 +- src/api/materials/company/index.ts | 5 +- src/api/materials/materials/index.ts | 7 +- src/api/materials/materialsInventory/index.ts | 5 +- src/api/project/constructionUser/index.ts | 30 +- .../quality/qualityConstructionLog/index.ts | 11 +- src/api/safety/safetyWeeklyReport/index.ts | 9 +- src/components/FileUpload/index.vue | 18 +- src/components/ImageUpload/index.vue | 13 +- src/components/bigUploader/index.vue | 2 +- src/components/uploadImg/index.vue | 244 ++++ src/utils/request-go.ts | 2 + .../busMachineryDetail/list/component/add.vue | 232 ++++ .../list/component/detail.vue | 219 ++++ .../list/component/edit.vue | 253 ++++ .../list/component/model.ts | 55 + src/views/busMachineryDetail/list/index.vue | 339 ++++++ src/views/cory/workMessage/index.vue | 4 +- .../component/MachineryDetailAddDialog.vue | 115 -- .../component/MachineryDetailTable.vue | 206 ---- src/views/machinery/component/add.vue | 154 +++ src/views/machinery/component/detail.vue | 156 +++ src/views/machinery/component/edit.vue | 184 +++ src/views/machinery/component/model.ts | 59 + src/views/machinery/index.vue | 769 +++++++----- src/views/materials/batchPlan/index.vue | 13 +- .../overallPlanMaterialSupply/index.vue | 1049 +++++++---------- src/views/other/ys7DeviceImg/index.vue | 4 +- src/views/progress/plan/index.vue | 6 +- .../project/attendance/component/detail.vue | 395 +++++++ src/views/project/attendance/index.vue | 42 +- .../component/ConstructionUserDetail.vue | 7 +- .../landTransferLedger/index.vue | 132 ++- .../projectTeam/component/UserListDialog.vue | 22 +- .../component/ConstructionUserDetail.vue | 8 +- src/views/project/projectUser/index.vue | 9 +- src/views/project/reissueCard/index.vue | 29 +- .../component/ConstructionUserDetail.vue | 6 +- src/views/project/subcontract/index.vue | 3 +- .../quality/documentQualityMeeting/index.vue | 4 +- src/views/quality/knowledgeDocument/index.vue | 182 ++- .../cpmponent/qualityConstructionDetail.vue | 2 +- .../component/qualityInspectionDetail.vue | 4 +- src/views/quality/qualityInspection/index.vue | 33 +- .../safety/documentSafetyMeeting/index.vue | 4 +- src/views/safety/knowledgeDocument/index.vue | 2 +- src/views/safety/recognizeRecord/index.vue | 2 +- .../SafetyInspectionDetailDialog.vue | 26 +- .../component/TeamMeetingDetailDrawer.vue | 2 +- .../component/violationRecordDetailDialog.vue | 2 +- 54 files changed, 3724 insertions(+), 1523 deletions(-) create mode 100644 src/components/uploadImg/index.vue create mode 100644 src/views/busMachineryDetail/list/component/add.vue create mode 100644 src/views/busMachineryDetail/list/component/detail.vue create mode 100644 src/views/busMachineryDetail/list/component/edit.vue create mode 100644 src/views/busMachineryDetail/list/component/model.ts create mode 100644 src/views/busMachineryDetail/list/index.vue delete mode 100644 src/views/machinery/component/MachineryDetailAddDialog.vue delete mode 100644 src/views/machinery/component/MachineryDetailTable.vue create mode 100644 src/views/machinery/component/add.vue create mode 100644 src/views/machinery/component/detail.vue create mode 100644 src/views/machinery/component/edit.vue create mode 100644 src/views/machinery/component/model.ts create mode 100644 src/views/project/attendance/component/detail.vue diff --git a/.env.development b/.env.development index e9d12d1..8388384 100644 --- a/.env.development +++ b/.env.development @@ -5,7 +5,7 @@ VITE_APP_TITLE = 煤科建管平台 VITE_APP_ENV = 'development' # 开发环境 -VITE_APP_BASE_API = 'http://192.168.110.149:8899' +VITE_APP_BASE_API = 'http://192.168.110.209:8899' # VITE_APP_BASE_API = 'http://58.17.134.85:8899' # GO开发环境 VITE_APP_BASE_API_GO = 'http://xny.yj-3d.com:7464' diff --git a/src/api/cory/contactnotice/index.ts b/src/api/cory/contactnotice/index.ts index 89e28c3..76498ca 100644 --- a/src/api/cory/contactnotice/index.ts +++ b/src/api/cory/contactnotice/index.ts @@ -16,6 +16,17 @@ export const listContactnotice = (query?: ContactnoticeQuery): AxiosPromise => { + return request({ + url: '/project/projectTeam/listForeman/' + projectId, + method: 'get' + }); +}; + /** * 查询联系单详细 * @param id diff --git a/src/api/gis/index.ts b/src/api/gis/index.ts index 8486dcc..9269e20 100644 --- a/src/api/gis/index.ts +++ b/src/api/gis/index.ts @@ -1,4 +1,5 @@ import request from '@/utils/request-go'; +import request1 from '@/utils/request'; import { AxiosPromise } from 'axios'; import { QualityVO, @@ -172,7 +173,7 @@ export const getweatherList = (): AxiosPromise => { */ export const getSafetyDay = (id?: string): AxiosPromise => { - return request({ + return request1({ url: '/project/project/safetyDay/' + id, method: 'get' }); diff --git a/src/api/machinery/machinery/index.ts b/src/api/machinery/machinery/index.ts index 27ecba7..a1a6d20 100644 --- a/src/api/machinery/machinery/index.ts +++ b/src/api/machinery/machinery/index.ts @@ -1,63 +1,45 @@ -import request from '@/utils/request'; -import { AxiosPromise } from 'axios'; -import { MachineryForm, MachineryQuery, MachineryVO } from '@/api/machinery/machinery/types'; - -/** - * 查询机械列表 - * @param query - * @returns {*} - */ - -export const listMachinery = (query?: MachineryQuery): AxiosPromise => { +import request from '@/utils/request-go'; +// 查询机械列表 +export function listBusMachinery(query: object) { return request({ - url: '/machinery/machinery/list', + url: '/zm/api/v1/system/busMachinery/list', method: 'get', params: query }); -}; - -/** - * 查询机械详细 - * @param id - */ -export const getMachinery = (id: string | number): AxiosPromise => { +} +// 查询机械详细 +export function getBusMachinery(id: number) { return request({ - url: '/machinery/machinery/' + id, - method: 'get' + url: '/zm/api/v1/system/busMachinery/get', + method: 'get', + params: { + id: id.toString() + } }); -}; - -/** - * 新增机械 - * @param data - */ -export const addMachinery = (data: MachineryForm): AxiosPromise => { +} +// 新增机械 +export function addBusMachinery(data: object) { return request({ - url: '/machinery/machinery', + url: '/zm/api/v1/system/busMachinery/add', method: 'post', data: data }); -}; - -/** - * 修改机械 - * @param data - */ -export const updateMachinery = (data: MachineryForm) => { +} +// 修改机械 +export function updateBusMachinery(data: object) { return request({ - url: '/machinery/machinery', + url: '/zm/api/v1/system/busMachinery/edit', method: 'put', data: data }); -}; - -/** - * 删除机械 - * @param id - */ -export const delMachinery = (id: string | number | Array) => { +} +// 删除机械 +export function delBusMachinery(ids: number[]) { return request({ - url: '/machinery/machinery/' + id, - method: 'delete' + url: '/zm/api/v1/system/busMachinery/delete', + method: 'delete', + data: { + ids: ids + } }); -}; +} diff --git a/src/api/machinery/machineryDetail/index.ts b/src/api/machinery/machineryDetail/index.ts index 809c367..f7baa88 100644 --- a/src/api/machinery/machineryDetail/index.ts +++ b/src/api/machinery/machineryDetail/index.ts @@ -1,63 +1,45 @@ -import request from '@/utils/request'; -import { AxiosPromise } from 'axios'; -import { MachineryDetailForm, MachineryDetailQuery, MachineryDetailVO } from '@/api/machinery/machineryDetail/types'; - -/** - * 查询机械详情列表 - * @param query - * @returns {*} - */ - -export const listMachineryDetail = (query?: MachineryDetailQuery): AxiosPromise => { +import request from '@/utils/request-go'; +// 查询机械详情列表 +export function listBusMachineryDetail(query: object) { return request({ - url: '/machinery/machineryDetail/list', + url: '/zm/api/v1/system/busMachineryDetail/list', method: 'get', params: query }); -}; - -/** - * 查询机械详情详细 - * @param id - */ -export const getMachineryDetail = (id: string | number): AxiosPromise => { +} +// 查询机械详情详细 +export function getBusMachineryDetail(id: number) { return request({ - url: '/machinery/machineryDetail/' + id, - method: 'get' + url: '/zm/api/v1/system/busMachineryDetail/get', + method: 'get', + params: { + id: id.toString() + } }); -}; - -/** - * 新增机械详情 - * @param data - */ -export const addMachineryDetail = (data: MachineryDetailForm): AxiosPromise => { +} +// 新增机械详情 +export function addBusMachineryDetail(data: object) { return request({ - url: '/machinery/machineryDetail', + url: '/zm/api/v1/system/busMachineryDetail/add', method: 'post', data: data }); -}; - -/** - * 修改机械详情 - * @param data - */ -export const updateMachineryDetail = (data: MachineryDetailForm) => { +} +// 修改机械详情 +export function updateBusMachineryDetail(data: object) { return request({ - url: '/machinery/machineryDetail', + url: '/zm/api/v1/system/busMachineryDetail/edit', method: 'put', data: data }); -}; - -/** - * 删除机械详情 - * @param id - */ -export const delMachineryDetail = (id: string | number | Array) => { +} +// 删除机械详情 +export function delBusMachineryDetail(ids: number[]) { return request({ - url: '/machinery/machineryDetail/' + id, - method: 'delete' + url: '/zm/api/v1/system/busMachineryDetail/delete', + method: 'delete', + data: { + ids: ids + } }); -}; +} diff --git a/src/api/materials/company/index.ts b/src/api/materials/company/index.ts index 2db0fb5..463f21b 100644 --- a/src/api/materials/company/index.ts +++ b/src/api/materials/company/index.ts @@ -1,4 +1,5 @@ -import request from '@/utils/request-go'; +import requestGo from '@/utils/request-go'; +import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { CompanyForm, CompanyQuery, CompanyVO } from '@/api/materials/company/types'; @@ -9,7 +10,7 @@ import { CompanyForm, CompanyQuery, CompanyVO } from '@/api/materials/company/ty */ export const listCompany = (query?: CompanyQuery): AxiosPromise => { - return request({ + return requestGo({ 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 33bc66b..3908cc6 100644 --- a/src/api/materials/materials/index.ts +++ b/src/api/materials/materials/index.ts @@ -1,4 +1,5 @@ -import request from '@/utils/request-go'; +import requestGo from '@/utils/request-go'; +import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { MaterialsForm, MaterialsQuery, MaterialsVO } from '@/api/materials/materials/types'; @@ -8,7 +9,7 @@ import { MaterialsForm, MaterialsQuery, MaterialsVO } from '@/api/materials/mate * @returns {*} */ export const listMaterials = (query?: MaterialsQuery): AxiosPromise => { - return request({ + return requestGo({ url: '/zm/api/v1/system/busEquipmentMaterials/list', method: 'get', params: query @@ -20,7 +21,7 @@ export const listMaterials = (query?: MaterialsQuery): AxiosPromise => { - return request({ + return requestGo({ url: '/zm/api/v1/system/busEquipmentMaterials/get', method: 'get', params: { diff --git a/src/api/materials/materialsInventory/index.ts b/src/api/materials/materialsInventory/index.ts index b328ece..514c949 100644 --- a/src/api/materials/materialsInventory/index.ts +++ b/src/api/materials/materialsInventory/index.ts @@ -1,4 +1,5 @@ -import request from '@/utils/request-go'; +import requestGo from '@/utils/request-go'; +import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { MaterialsInventoryForm, MaterialsInventoryQuery, MaterialsInventoryVO } from '@/api/materials/materialsInventory/types'; @@ -9,7 +10,7 @@ import { MaterialsInventoryForm, MaterialsInventoryQuery, MaterialsInventoryVO } */ export const listMaterialsInventory = (query?: MaterialsInventoryQuery): AxiosPromise => { - return request({ + return requestGo({ url: '/zm/api/v1/system/busEquipmentMaterialsInventory/excellist', method: 'get', params: query diff --git a/src/api/project/constructionUser/index.ts b/src/api/project/constructionUser/index.ts index ddaf3f4..a29bba6 100644 --- a/src/api/project/constructionUser/index.ts +++ b/src/api/project/constructionUser/index.ts @@ -1,4 +1,4 @@ -import request from '@/utils/request-go'; +import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { ConstructionUserForm, @@ -23,7 +23,7 @@ import requestGo from '@/utils/request-go'; */ export const listConstructionMonth = (query?: ConstructionMonthQuery): AxiosPromise => { - return request({ + return requestGo({ url: '/zm/api/wxApplet/wxApplet/busAttendance/byOpenId', method: 'get', params: query @@ -62,7 +62,7 @@ export const listConstructionUserInTeam = (query?: ConstructionUserQuery): Axios * @param id */ export const getConstructionUser = (id: string | number): AxiosPromise => { - return request({ + return requestGo({ url: '/zm/api/wxApplet/wxApplet/busConstructionUser/getDetails?id=' + id, method: 'get' }); @@ -73,7 +73,7 @@ export const getConstructionUser = (id: string | number): AxiosPromise { - return request({ + return requestGo({ url: '/zm/api/wxApplet/wxApplet/busConstructionUser/changePay', method: 'put', data: data @@ -84,7 +84,7 @@ export const transferConstructionUser = (data: skipType) => { * 查询项目以及项目下的分包公司列表 */ export const getProjectContractorList = () => { - return request({ + return requestGo({ url: '/zm/api/v1/system/sysProject/list?pageNum=1&pageSize=1000', method: 'get' }); @@ -95,7 +95,7 @@ export const getProjectContractorList = () => { * @param data */ export const addConstructionUser = (data: ConstructionUserForm): AxiosPromise => { - return request({ + return requestGo({ url: '/zm/api/wxApplet/wxApplet/busConstructionUser/add', method: 'post', data: data @@ -107,7 +107,7 @@ export const addConstructionUser = (data: ConstructionUserForm): AxiosPromise { - return request({ + return requestGo({ url: '/zm/api/v1/system/busConstructionUser/pcEdit', method: 'put', data: data @@ -119,7 +119,7 @@ export const updateConstructionUser = (data: ConstructionUserForm) => { * @param id */ export const delConstructionUser = (data) => { - return request({ + return requestGo({ url: '/zm/api/wxApplet/wxApplet/busConstructionUser/delete', method: 'delete', data @@ -131,7 +131,7 @@ export const delConstructionUser = (data) => { * @param data */ export const updateConstructionUserStatus = (data: ConstructionUserStatusForm) => { - return request({ + return requestGo({ url: '/zm/api/wxApplet/wxApplet/busConstructionUser/changeState', method: 'delete', data: data @@ -143,7 +143,7 @@ export const updateConstructionUserStatus = (data: ConstructionUserStatusForm) = * @param data */ export const updateConstructionUserPlayCardStatus = (data: ConstructionUserPlayCardForm) => { - return request({ + return requestGo({ url: '/zm/api/v1/system/busConstructionUser/oneClickOpen', method: 'put', data: data @@ -155,7 +155,7 @@ export const updateConstructionUserPlayCardStatus = (data: ConstructionUserPlayC * @param data */ export const updateConstructionUserPlayCardOneStatus = (data: ConstructionUserPlayCardForm) => { - return request({ + return requestGo({ url: '/zm/api/v1/system/busConstructionUser/clockingCondition', method: 'put', data: data @@ -167,7 +167,7 @@ export const updateConstructionUserPlayCardOneStatus = (data: ConstructionUserPl * @param data */ export const updateConstructionUserSalary = (data: ConstructionUserSalaryForm) => { - return request({ + return requestGo({ url: '/zm/api/wxApplet/wxApplet/busConstructionUser/payEdit', method: 'put', data: data @@ -179,7 +179,7 @@ export const updateConstructionUserSalary = (data: ConstructionUserSalaryForm) = * @param query */ export const getConstructionUserExit = (query: ConstructionUserExitForm) => { - return request({ + return requestGo({ url: '/zm/api/v1/system/busConstructionUser/departureRecord', method: 'post', data: query @@ -191,7 +191,7 @@ export const getConstructionUserExit = (query: ConstructionUserExitForm) => { * @param query */ export const dowloadConstructionUserTemplate = (query: ConstructionUserTemplateForm) => { - return request({ + return requestGo({ url: '/zm/api/v1/system/busConstructionUser/templateExport', method: 'get', params: query @@ -208,7 +208,7 @@ export const dowloadConstructionUserTemplate = (query: ConstructionUserTemplateF * @param data */ export const delConstructionUserMember = (data: ConstructionUserMembeForm) => { - return request({ + return requestGo({ url: '/zm/api/v1/system/busConstructionUser/departure', method: 'post', data diff --git a/src/api/quality/qualityConstructionLog/index.ts b/src/api/quality/qualityConstructionLog/index.ts index d823a1a..8ab2202 100644 --- a/src/api/quality/qualityConstructionLog/index.ts +++ b/src/api/quality/qualityConstructionLog/index.ts @@ -1,4 +1,5 @@ -import request from '@/utils/request-go'; +import requestGo from '@/utils/request-go'; +import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { QualityConstructionLogVO, QualityConstructionLogForm, QualityConstructionLogQuery } from '@/api/quality/qualityConstructionLog/types'; @@ -9,7 +10,7 @@ import { QualityConstructionLogVO, QualityConstructionLogForm, QualityConstructi */ export const listQualityConstructionLog = (query?: QualityConstructionLogQuery): AxiosPromise => { - return request({ + return requestGo({ url: '/zm/api/v1/system/busConstructionLog/list', method: 'get', params: query @@ -21,8 +22,8 @@ export const listQualityConstructionLog = (query?: QualityConstructionLogQuery): * @param id */ export const getQualityConstructionLog = (id: string | number): AxiosPromise => { - return request({ - url: 'zm/api/v1/system/busConstructionLog/get', + return requestGo({ + url: '/zm/api/v1/system/busConstructionLog/get', method: 'get', params: { id } }); @@ -57,7 +58,7 @@ export const updateQualityConstructionLog = (data: QualityConstructionLogForm) = * @param id */ export const delQualityConstructionLog = (id: string | number | Array) => { - return request({ + return requestGo({ url: '/zm/api/v1/system/busConstructionLog/delete', method: 'delete', data: { ids: id } diff --git a/src/api/safety/safetyWeeklyReport/index.ts b/src/api/safety/safetyWeeklyReport/index.ts index f0e9c00..4177b4d 100644 --- a/src/api/safety/safetyWeeklyReport/index.ts +++ b/src/api/safety/safetyWeeklyReport/index.ts @@ -1,4 +1,5 @@ -import request from '@/utils/request-go'; +import requestGo from '@/utils/request-go'; +import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { SafetyWeeklyReportForm, SafetyWeeklyReportQuery, SafetyWeeklyReportVO } from '@/api/safety/safetyWeeklyReport/types'; @@ -9,7 +10,7 @@ import { SafetyWeeklyReportForm, SafetyWeeklyReportQuery, SafetyWeeklyReportVO } */ export const listSafetyWeeklyReport = (query?: SafetyWeeklyReportQuery): AxiosPromise => { - return request({ + return requestGo({ url: '/zm/api/v1/system/busWeeklySecurityReport/list', method: 'get', params: query @@ -32,7 +33,7 @@ export const getSafetyWeeklyReport = (id: string | number): AxiosPromise { - return request({ + return requestGo({ url: '/zm/api/v1/system/busWeeklySecurityReport/add', method: 'post', data: data @@ -56,7 +57,7 @@ export const updateSafetyWeeklyReport = (data: SafetyWeeklyReportForm) => { * @param id */ export const delSafetyWeeklyReport = (id: string | number | Array) => { - return request({ + return requestGo({ url: '/zm/api/v1/system/busWeeklySecurityReport/delete', method: 'delete', data: { ids: id } diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index f75610b..ddadbc0 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -226,7 +226,12 @@ watch( ); // 上传前校检格式和大小 const handleBeforeUpload = (file: any) => { - if (!validateFile(file)) return false; + if (!validateFile(file)) { + if (props.isGo) { + fileList.value = []; + } + return false; + } proxy?.$modal.loading('正在上传文件,请稍候...'); number.value++; return true; @@ -266,7 +271,6 @@ interface UploadFileWithOssId extends UploadFile { } const handleUploadSuccess = (res: any, file: UploadFileWithOssId) => { - console.log('🚀 ~ handleUploadSuccess ~ res:', res.code); if (res.code === 200 || res.code === 0) { console.log('上传成功'); // 上传成功,不管 data 是否为空 @@ -277,6 +281,9 @@ const handleUploadSuccess = (res: any, file: UploadFileWithOssId) => { }); } else { console.log('失败', res); + if (props.isGo) { + fileList.value = []; + } number.value--; proxy?.$modal.closeLoading(); @@ -330,12 +337,15 @@ const handleDelete = async (index: string | number, type?: string) => { delOss(index); fileList.value = fileList.value.filter((f) => f.ossId !== index); } else { - let ossId = fileList.value[index].ossId; - delOss(ossId); + if (!props.isGo) { + let ossId = fileList.value[index].ossId; + delOss(ossId); + } index = parseInt(index as string); fileList.value.splice(index, 1); } } finally { + // fileList.value = []; emit('handleRemove'); emit('update:modelValue', listToString(fileList.value)); } diff --git a/src/components/ImageUpload/index.vue b/src/components/ImageUpload/index.vue index 4921a6d..4e15527 100644 --- a/src/components/ImageUpload/index.vue +++ b/src/components/ImageUpload/index.vue @@ -63,6 +63,15 @@ const props = defineProps({ type: Boolean, default: true }, + isGo: { + type: Boolean, + default: false + }, + // 图片上传路径 + action: { + type: String, + default: '' + }, // 是否支持压缩,默认否 compressSupport: { type: Boolean, @@ -79,8 +88,8 @@ const uploadList = ref([]); const dialogImageUrl = ref(''); const dialogVisible = ref(false); -const baseUrl = import.meta.env.VITE_APP_BASE_API; -const uploadImgUrl = ref(baseUrl + '/resource/oss/upload'); // 上传的图片服务器地址 +const baseUrl = props.isGo ? import.meta.env.VITE_APP_BASE_API_GO : import.meta.env.VITE_APP_BASE_API; +const uploadImgUrl = ref(baseUrl + props.action ? props.action : '/resource/oss/upload'); // 上传的图片服务器地址 const headers = ref(globalHeaders()); const fileList = ref([]); diff --git a/src/components/bigUploader/index.vue b/src/components/bigUploader/index.vue index 4529f63..45606d6 100644 --- a/src/components/bigUploader/index.vue +++ b/src/components/bigUploader/index.vue @@ -51,7 +51,7 @@ const instance = axios.create({ }); import sign from '@/utils/sign.js'; import { getGoToken } from '@/utils/auth'; -const BASE_URL = 'http://58.17.134.85:8919'; +const BASE_URL = 'http://58.17.134.85:8920'; const acceptConfig = ['.zip', '.rar']; //文件 // const acceptConfig = { // // image: ['gif', 'jpg', 'jpeg', 'png', 'bmp', 'webp'], diff --git a/src/components/uploadImg/index.vue b/src/components/uploadImg/index.vue new file mode 100644 index 0000000..ee5f100 --- /dev/null +++ b/src/components/uploadImg/index.vue @@ -0,0 +1,244 @@ + + + + + diff --git a/src/utils/request-go.ts b/src/utils/request-go.ts index 7bc0667..e9b3d06 100644 --- a/src/utils/request-go.ts +++ b/src/utils/request-go.ts @@ -70,9 +70,11 @@ const exceptionStr = '/api/v1/test/'; // /api/v1/test/*接口拦截 service.interceptors.request.use( (config: any) => { // 在发送请求之前做些什么 token + if (token) { config.headers = config.headers || {}; (config.headers as any)['Authorization'] = `Bearer ${token}`; + console.log('🚀 ~ config.headers:', config.headers); } const stores = useUserStore(); if (!whiteUrl.includes(config.url) && !config.url.includes(exceptionStr)) { diff --git a/src/views/busMachineryDetail/list/component/add.vue b/src/views/busMachineryDetail/list/component/add.vue new file mode 100644 index 0000000..69d9f21 --- /dev/null +++ b/src/views/busMachineryDetail/list/component/add.vue @@ -0,0 +1,232 @@ + + + diff --git a/src/views/busMachineryDetail/list/component/detail.vue b/src/views/busMachineryDetail/list/component/detail.vue new file mode 100644 index 0000000..88f631f --- /dev/null +++ b/src/views/busMachineryDetail/list/component/detail.vue @@ -0,0 +1,219 @@ + + + diff --git a/src/views/busMachineryDetail/list/component/edit.vue b/src/views/busMachineryDetail/list/component/edit.vue new file mode 100644 index 0000000..d33816f --- /dev/null +++ b/src/views/busMachineryDetail/list/component/edit.vue @@ -0,0 +1,253 @@ + + + + + diff --git a/src/views/busMachineryDetail/list/component/model.ts b/src/views/busMachineryDetail/list/component/model.ts new file mode 100644 index 0000000..fd0c0c0 --- /dev/null +++ b/src/views/busMachineryDetail/list/component/model.ts @@ -0,0 +1,55 @@ +export interface BusMachineryDetailTableColumns { + id:number; // 序号 + checkoutNumber:string; // 检验证编号 + checkoutUnit:string; // 检验单位 + checkoutDate:string; // 检定日期/有效期 + status:string; // 施工类型状态 + entryTime:string; // 入场时间 + createdAt:string; // 创建时间 + remark:string; // 备注 + picture:any[]; // 4张图片,逗号分隔 +} + + +export interface BusMachineryDetailInfoData { + id:number|undefined; // 序号 + checkoutNumber:string|undefined; // 检验证编号 + checkoutUnit:string|undefined; // 检验单位 + checkoutDate:string|undefined; // 检定日期/有效期 + status:string|undefined; // 施工类型状态 + entryTime:string|undefined; // 入场时间 + createBy:string|undefined; // 创建者 + updateBy:string|undefined; // 更新者 + createdAt:string|undefined; // 创建时间 + updatedAt:string|undefined; // 更新时间 + deletedAt:string|undefined; // 删除时间 + remark:string|undefined; // 备注 + picture:any[]; // 4张图片,逗号分隔 + type: undefined, // 出入场 +} + + +export interface BusMachineryDetailTableDataState { + ids:any[]; + tableData: { + data: Array; + total: number; + loading: boolean; + param: { + pageNum: number; + pageSize: number; + checkoutNumber: string|undefined; + status: string|undefined; + entryTime: string|undefined; + dateRange: string[]; + }; + }; +} + + +export interface BusMachineryDetailEditState{ + loading:boolean; + isShowDialog: boolean; + formData:BusMachineryDetailInfoData; + rules: object; +} \ No newline at end of file diff --git a/src/views/busMachineryDetail/list/index.vue b/src/views/busMachineryDetail/list/index.vue new file mode 100644 index 0000000..227c975 --- /dev/null +++ b/src/views/busMachineryDetail/list/index.vue @@ -0,0 +1,339 @@ + + + diff --git a/src/views/cory/workMessage/index.vue b/src/views/cory/workMessage/index.vue index 805cdc0..314d417 100644 --- a/src/views/cory/workMessage/index.vue +++ b/src/views/cory/workMessage/index.vue @@ -111,8 +111,7 @@ import { useUserStoreHook } from '@/store/modules/user'; import type { FormInstance, FormRules } from 'element-plus'; import Notice from './components/notice.vue'; import { listContactTypeformtemplate } from '@/api/cory/contactformtemplate'; -import { addContactnotice, delContactnotice, listContactnotice } from '@/api/cory/contactnotice'; -import { listProjectTeamForeman } from '@/api/project/projectTeam'; +import { addContactnotice, delContactnotice, listContactnotice, listProjectTeamForeman } from '@/api/cory/contactnotice'; import { foremanQuery, ProjectTeamForemanResp } from '@/api/project/projectTeam/types'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; @@ -265,6 +264,7 @@ const getList = async () => { tableData.value = res.rows; total.value = res.total || 0; // 获取项目班组信息 + console.log('🚀 ~ getList ~ currentProject.value?.id:', currentProject.value?.id); const teamRes = await listProjectTeamForeman(currentProject.value?.id); teamList.value = teamRes.data; teamOpt.value = teamList.value.map((team: ProjectTeamForemanResp) => ({ diff --git a/src/views/machinery/component/MachineryDetailAddDialog.vue b/src/views/machinery/component/MachineryDetailAddDialog.vue deleted file mode 100644 index c848e60..0000000 --- a/src/views/machinery/component/MachineryDetailAddDialog.vue +++ /dev/null @@ -1,115 +0,0 @@ - - diff --git a/src/views/machinery/component/MachineryDetailTable.vue b/src/views/machinery/component/MachineryDetailTable.vue deleted file mode 100644 index 7124070..0000000 --- a/src/views/machinery/component/MachineryDetailTable.vue +++ /dev/null @@ -1,206 +0,0 @@ - - - diff --git a/src/views/machinery/component/add.vue b/src/views/machinery/component/add.vue new file mode 100644 index 0000000..dc9eb15 --- /dev/null +++ b/src/views/machinery/component/add.vue @@ -0,0 +1,154 @@ + + + diff --git a/src/views/machinery/component/detail.vue b/src/views/machinery/component/detail.vue new file mode 100644 index 0000000..06e4907 --- /dev/null +++ b/src/views/machinery/component/detail.vue @@ -0,0 +1,156 @@ + + + diff --git a/src/views/machinery/component/edit.vue b/src/views/machinery/component/edit.vue new file mode 100644 index 0000000..9a178d7 --- /dev/null +++ b/src/views/machinery/component/edit.vue @@ -0,0 +1,184 @@ + + + diff --git a/src/views/machinery/component/model.ts b/src/views/machinery/component/model.ts new file mode 100644 index 0000000..f8125fb --- /dev/null +++ b/src/views/machinery/component/model.ts @@ -0,0 +1,59 @@ +export interface BusMachineryTableColumns { + id:number; // 序号 + machineryName:string; // 机械名称 + machineryNumber:string; // 编号 + checkoutNumber:string; // 检验证编号 + checkoutUnit:string; // 检验单位 + checkoutDate:string; // 检定日期/有效期 + status:string; // 施工类型状态 + createdAt:string; // 创建时间 +} + + +export interface BusMachineryInfoData { + id:number|undefined; // 序号 + machineryName:string|undefined; // 机械名称 + machineryNumber:string|undefined; // 编号 + projectId:number|undefined; // 项目id + checkoutNumber:string|undefined; // 检验证编号 + checkoutUnit:string|undefined; // 检验单位 + checkoutDate:string|undefined; // 检定日期/有效期 + status:boolean; // 施工类型状态 + createBy:string|undefined; // 创建者 + updateBy:string|undefined; // 更新者 + createdAt:string|undefined; // 创建时间 + updatedAt:string|undefined; // 更新时间 + deletedAt:string|undefined; // 删除时间 + number:number|undefined; //数量 + entryTime: string|undefined; // 进场时间 + principal: string|undefined; // 负责人 + remark: string|undefined; // 备注 +} + + +export interface BusMachineryTableDataState { + ids:any[]; + tableData: { + data: Array; + total: number; + loading: boolean; + param: { + pageNum: number; + pageSize: number; + id: number|undefined; + machineryName: string|undefined; + status: string|undefined; + createdAt: string|undefined; + dateRange: string[]; + projectId: undefined, + }; + }; +} + + +export interface BusMachineryEditState{ + loading:boolean; + isShowDialog: boolean; + formData:BusMachineryInfoData; + rules: object; +} \ No newline at end of file diff --git a/src/views/machinery/index.vue b/src/views/machinery/index.vue index d97b660..20a545b 100644 --- a/src/views/machinery/index.vue +++ b/src/views/machinery/index.vue @@ -1,295 +1,532 @@ @@ -426,11 +421,11 @@ const getAvailableNameList = (currentIndex: number) => { // 收集除当前行外已选中的物资ID const selectedIds = form.value.planList .filter((_, index) => index !== currentIndex) - .map(item => item.suppliespriceId) - .filter(id => id !== undefined && id !== null); + .map((item) => item.suppliespriceId) + .filter((id) => id !== undefined && id !== null); // 过滤掉已选中的物资 - return nameList.value.filter(item => !selectedIds.includes(item.id)); + return nameList.value.filter((item) => !selectedIds.includes(item.id)); }; /** 选择物资名称触发 */ diff --git a/src/views/materials/overallPlanMaterialSupply/index.vue b/src/views/materials/overallPlanMaterialSupply/index.vue index 317b908..a0e8afc 100644 --- a/src/views/materials/overallPlanMaterialSupply/index.vue +++ b/src/views/materials/overallPlanMaterialSupply/index.vue @@ -1,45 +1,43 @@ - - diff --git a/src/views/other/ys7DeviceImg/index.vue b/src/views/other/ys7DeviceImg/index.vue index 4ae0c8b..fe3d06f 100644 --- a/src/views/other/ys7DeviceImg/index.vue +++ b/src/views/other/ys7DeviceImg/index.vue @@ -34,9 +34,9 @@ diff --git a/src/views/progress/plan/index.vue b/src/views/progress/plan/index.vue index b4eb9cf..078e79e 100644 --- a/src/views/progress/plan/index.vue +++ b/src/views/progress/plan/index.vue @@ -416,7 +416,11 @@ const handleDayAdd = (row: ProgressCategoryVO) => { if (row.unitType === '2') { dailyRef.value.openDialog(row); } else { - dailyRateRef.value.openDialog(row); + if (!row.workType) { + dailyRef.value.openDialog(row); + } else { + dailyRateRef.value.openDialog(row); + } } }; diff --git a/src/views/project/attendance/component/detail.vue b/src/views/project/attendance/component/detail.vue new file mode 100644 index 0000000..5649888 --- /dev/null +++ b/src/views/project/attendance/component/detail.vue @@ -0,0 +1,395 @@ + + + diff --git a/src/views/project/attendance/index.vue b/src/views/project/attendance/index.vue index 0379006..569890e 100644 --- a/src/views/project/attendance/index.vue +++ b/src/views/project/attendance/index.vue @@ -62,9 +62,9 @@ - + - + + @@ -126,7 +127,7 @@ import { useUserStoreHook } from '@/store/modules/user'; import { parseTime } from '@/utils/ruoyi'; const commandstats = ref(); import { pcSelectBelowProjectOfPersonnel, getSysProjectTeamList, pcCollectDataForTwoWeeks } from '@/api/project/goUser/index'; - +import detail from './component/detail.vue'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { type_of_work } = toRefs(proxy?.useDict('clock_status_type', 'type_of_work')); import type { CalendarInstance } from 'element-plus'; @@ -136,7 +137,22 @@ const userStore = useUserStoreHook(); // 从 store 中获取项目列表和当前选中的项目 const currentProject = computed(() => userStore.selectedProject); const exportDialogVisible = ref(false); +const nowMonth = computed(() => { + // 获取当前日期 + const today = new Date(); + // 获取年份 + const year = today.getFullYear(); + + // 获取月份(注意:getMonth()返回0-11,所以需要+1) + let month = today.getMonth() + 1; + + // 月份补零处理 + month = month < 10 ? '0' + month : month; + + // 拼接成"YYYY-MM"格式 + return `${year}-${month}`; +}); const attendanceList = ref([]); const attendanceTwoWeekList = ref([]); const buttonLoading = ref(false); @@ -187,7 +203,7 @@ const data = reactive>({ queryParams: { pageNum: 1, pageSize: 10, - dateStr: undefined, + dateStr: nowMonth.value, fuzzyQuery: undefined, projectId: currentProject.value.goId, typeOfWork: undefined, @@ -209,7 +225,9 @@ const day = computed(() => (date) => { }); //是否打卡 const isplayCard = computed(() => (date) => { - return calendarList.value.some((item) => item.dateStr == date.day); + console.log('🚀 ~ date:', date); + + return calendarList.value.some((item) => item.PrintingDate == date.day); }); //打卡时间下标 const playCardIdx = computed(() => (date) => { @@ -227,7 +245,7 @@ const workFromTime = computed(() => (date) => { //考勤状态 const attendanceStatus = computed(() => (date) => { - return calendarList.value[playCardIdx.value(date)].status; + return calendarList.value[playCardIdx.value(date)].Status; }); const { queryParams, form, rules } = toRefs(data); @@ -328,13 +346,9 @@ const incrementMonth = (dateStr: string, monthsToAdd: number) => { }; /** 详情按钮操作 */ +const detailRef = ref(); const handleDetails = async (row?: AttendanceVO) => { - const res = await listAttendanceMonth({ openid: row?.openid, dateStr: queryParams.value.dateStr }); - calendarList.value = res.data.list || []; - console.log('🚀 ~ handleDetails ~ calendarList.value:', calendarList.value); - dialog.details = true; - dialog.id = row?.id; - dialog.title = row?.userName || ''; + detailRef.value.openDialog(toRaw(row)); }; const onExport = () => { diff --git a/src/views/project/constructionUser/component/ConstructionUserDetail.vue b/src/views/project/constructionUser/component/ConstructionUserDetail.vue index f801259..80f837a 100644 --- a/src/views/project/constructionUser/component/ConstructionUserDetail.vue +++ b/src/views/project/constructionUser/component/ConstructionUserDetail.vue @@ -6,7 +6,11 @@ - + @@ -154,6 +158,7 @@ const userDetail = ref(); const getUserDetail = async () => { loading.value = true; const res = await getConstructionUser(props.userId); + console.log('🚀 ~ getUserDetail ~ res:', res); if (res.data && res.code === 0) { userDetail.value = res.data; } diff --git a/src/views/project/landTransfer/BusinessLedger/landTransferLedger/index.vue b/src/views/project/landTransfer/BusinessLedger/landTransferLedger/index.vue index 71eef7a..e92ea01 100644 --- a/src/views/project/landTransfer/BusinessLedger/landTransferLedger/index.vue +++ b/src/views/project/landTransfer/BusinessLedger/landTransferLedger/index.vue @@ -31,7 +31,7 @@
- + @@ -48,15 +48,6 @@ - - - 搜索 重置 @@ -71,28 +62,22 @@ 新增 - - 删除 - - + - - - + + - + - + - - + +