diff --git a/.env.development b/.env.development index edc5753..b2b3cc4 100644 --- a/.env.development +++ b/.env.development @@ -5,33 +5,22 @@ VITE_APP_TITLE = 煤科建管平台 VITE_APP_ENV = 'development' # 开发环境 -VITE_APP_BASE_API = 'http://192.168.110.180:8899' -# 李陈杰 209 # VITE_APP_BASE_API = 'http://192.168.110.209:8899' -# 李陈杰 209 -# VITE_APP_BASE_API = 'http://192.168.110.209:8899' -# 曾涛 -# VITE_APP_BASE_API = 'http://192.168.110.149:8899' -# 罗成 -# VITE_APP_BASE_API = 'http://192.168.110.188:8899' -# 朱银 -# VITE_APP_BASE_API = 'http://192.168.110.149:8899' -#曾涛 -# VITE_APP_BASE_API = 'http://192.168.110.171:8899' -# 屈展航 -# VITE_APP_BASE_API = 'http://192.168.110.210:8899' - +VITE_APP_BASE_API = 'http://58.17.134.85:8899' +# GO开发环境 +VITE_APP_BASE_API_GO = 'http://xny.yj-3d.com:7464' +# VITE_APP_BASE_API_GO = 'http://192.168.110.188:8919' # ws VITE_APP_BASE_WS_API = 'ws://192.168.110.149:8899/resource/websocket' # EARTH -VITE_APP_BASE_EARTH_API = "http://192.168.110.2:8895" +VITE_APP_BASE_EARTH_API = "http://xny.yj-3d.com:8895" # 无人机接口地址 VITE_APP_BASE_DRONE_API = 'http://58.17.134.85:9512' # 应用访问路径 例如使用前缀 /admin/ -VITE_APP_CONTEXT_PATH = '/' +VITE_APP_CONTEXT_PATH = '/' # 监控地址 VITE_APP_MONITOR_ADMIN = 'http://localhost:9090/admin/applications' diff --git a/.env.production b/.env.production index 8870fdc..911deb6 100644 --- a/.env.production +++ b/.env.production @@ -14,7 +14,10 @@ VITE_APP_MONITOR_ADMIN = '/admin/applications' VITE_APP_SNAILJOB_ADMIN = '/snail-job' # 生产环境 +# GO生产环境 +VITE_APP_BASE_API_GO = 'http://58.17.134.85:7464' VITE_APP_BASE_API = 'http://xny.yj-3d.com:8899' +VITE_APP_BASE_EARTH_API = "http://xny.yj-3d.com:8895" # 是否在打包时开启压缩,支持 gzip 和 brotli VITE_BUILD_COMPRESS = gzip diff --git a/src/views/demo3/bar1.vue b/npm similarity index 100% rename from src/views/demo3/bar1.vue rename to npm diff --git a/package.json b/package.json index 3f899c3..00923e0 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "echarts-gl": "^2.0.9", "element-plus": "2.8.8", "esbuild": "^0.25.0", + "exceljs": "^4.4.0", "ezuikit-js": "^8.1.10", "file-saver": "^2.0.5", "fuse.js": "7.0.0", @@ -66,6 +67,7 @@ "vue-json-pretty": "2.4.0", "vue-print-nb": "^1.7.5", "vue-router": "4.4.5", + "vue-simple-uploader": "^1.0.3", "vue-types": "5.1.3", "vue3-print-nb": "^0.1.4", "vue3-scroll-seamless": "^1.0.6", diff --git a/public/assets/demo/Sunny.png b/public/assets/demo/Sunny.png index 14c94d4..a1c65ac 100644 Binary files a/public/assets/demo/Sunny.png and b/public/assets/demo/Sunny.png differ diff --git a/public/assets/demo/sunny copy.png b/public/assets/demo/sunny copy.png deleted file mode 100644 index a1c65ac..0000000 Binary files a/public/assets/demo/sunny copy.png and /dev/null differ diff --git a/public/assets/demo/sunnyBig.png b/public/assets/demo/sunnyBig.png new file mode 100644 index 0000000..14c94d4 Binary files /dev/null and b/public/assets/demo/sunnyBig.png differ 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 e6c9de9..9269e20 100644 --- a/src/api/gis/index.ts +++ b/src/api/gis/index.ts @@ -1,4 +1,5 @@ -import request from '@/utils/request'; +import request from '@/utils/request-go'; +import request1 from '@/utils/request'; import { AxiosPromise } from 'axios'; import { QualityVO, @@ -12,15 +13,29 @@ import { weatherVO, safetyDayVO } from './type'; +/** + * 查询大屏质量列表 + * @param query + * @returns {*} + */ + +export const getQualityList = (query?: any): AxiosPromise => { + return request({ + url: '/zm/api/v1/system/busInspectionTicket/gisQualityManagementList', + method: 'get', + params: query + }); +}; + /** * 查询大屏质量信息 * @param query * @returns {*} */ -export const getQualityList = (query?: Query): AxiosPromise => { +export const getQualityMsg = (query?: any): AxiosPromise => { return request({ - url: '/quality/qualityInspection/gis', + url: '/zm/api/v1/system/busInspectionTicket/gisQualityManagement', method: 'get', params: query }); @@ -32,14 +47,27 @@ export const getQualityList = (query?: Query): AxiosPromise => { * @returns {*} */ -export const getprojectNewsList = (query?: Query): AxiosPromise => { +export const getprojectNewsList = (query?: any): AxiosPromise => { return request({ - url: '/project/projectNews/list/gis', + url: '/zm/api/v1/system/sysProjectIntroduce/list', method: 'get', params: query }); }; +/** + * 查询进度管理列表 + * @param query + * @returns {*} + */ +export const getProgressList = (): AxiosPromise => { + return request({ + url: '/zm/api/v1/system/workStatus/getParentProgress', + method: 'get', + params: { fangzhenId: 22034 } + }); +}; + /** * 获取项目新闻详细信息 * @param query @@ -48,8 +76,9 @@ export const getprojectNewsList = (query?: Query): AxiosPromise export const getprojectNewsDetailList = (id: number): AxiosPromise => { return request({ - url: '/project/projectNews/' + id, - method: 'get' + url: '/zm/api/v1/system/sysProjectIntroduce/get', + method: 'get', + params: { id } }); }; @@ -59,9 +88,23 @@ export const getprojectNewsDetailList = (id: number): AxiosPromise => { +export const getsafetyInspectionMsg = (query?: Query): AxiosPromise => { + return request({ + url: '/zm/api/v1/system/busHseManagement/gisSafetyManagement', + method: 'get', + params: query + }); +}; + +/** + * 查询大屏安全列表 + * @param query + * @returns {*} + */ + +export const getsafetyInspectionList = (query?: any): AxiosPromise => { return request({ - url: '/safety/safetyInspection/gis', + url: '/zm/api/v1/system/busHseManagement/gisSafetyManagementList', method: 'get', params: query }); @@ -75,7 +118,7 @@ export const getsafetyInspectionList = (query?: Query): AxiosPromise => { return request({ - url: '/project/constructionUser/gis', + url: '/zm/api/wxApplet/wxApplet/busConstructionUser/attendanceCount', method: 'get', params: query }); @@ -89,7 +132,7 @@ export const getConstructionUserList = (query?: Query): AxiosPromise => { return request({ - url: '/machinery/machinery/list/gis', + url: '/zm/api/v1/system/busMachinery/mechanicalCondition', method: 'get', params: query }); @@ -103,7 +146,7 @@ export const getMachineryrList = (query?: Query): AxiosPromise = export const getMaterialsList = (query?: Query): AxiosPromise => { return request({ - url: '/materials/materials/list/gis', + url: '/zm/api/v1/system/busEquipmentMaterialsInventory/excelindex', method: 'get', params: query }); @@ -115,10 +158,11 @@ export const getMaterialsList = (query?: Query): AxiosPromise => * @returns {*} */ -export const getweatherList = (id?: string): AxiosPromise => { +export const getweatherList = (): AxiosPromise => { return request({ - url: '/project/project/weather/' + id, - method: 'get' + url: '/zm/api/wxApplet/wxApplet/busConstructionUser/weather', + method: 'get', + params: { location: '106.54,23.47' } }); }; @@ -129,8 +173,21 @@ export const getweatherList = (id?: string): AxiosPromise => { */ export const getSafetyDay = (id?: string): AxiosPromise => { - return request({ + return request1({ url: '/project/project/safetyDay/' + id, method: 'get' }); }; + +/** + * 查询项目Ai检测 + * @param query + * @returns {*} + */ +export const getAISafetyInspectionList = (query?: any): AxiosPromise => { + return request({ + url: '/zm/api/v1/system/busTour/tourSearchAllList', + method: 'get', + params: query + }); +}; diff --git a/src/api/login.ts b/src/api/login.ts index 854b387..ad6715f 100644 --- a/src/api/login.ts +++ b/src/api/login.ts @@ -2,6 +2,7 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { LoginData, LoginResult, TenantInfo, UserProject, VerifyCodeResult } from './types'; import { UserInfo } from '@/api/system/user/types'; +import requestGo from '@/utils/request-go'; // pc端固定客户端授权id const clientId = import.meta.env.VITE_APP_CLIENT_ID; @@ -119,3 +120,19 @@ export function getUserProject(): AxiosPromise { method: 'get' }); } + +//获取Go服务Token +export function getGoToken(): AxiosPromise { + return requestGo({ + url: '/zm/api/v1/system/login', + method: 'post', + data: { + status: 'yjdsj', + verifyCode: '1111', + // username: 'admin', + // password: 'zmkg@2023A' + username: 'admin', + password: 'zmkg@2023C' + } + }); +} 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 1996df8..463f21b 100644 --- a/src/api/materials/company/index.ts +++ b/src/api/materials/company/index.ts @@ -1,3 +1,4 @@ +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,8 +10,8 @@ import { CompanyForm, CompanyQuery, CompanyVO } from '@/api/materials/company/ty */ export const listCompany = (query?: CompanyQuery): AxiosPromise => { - return request({ - url: '/materials/company/list', + 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 04a2153..3908cc6 100644 --- a/src/api/materials/materials/index.ts +++ b/src/api/materials/materials/index.ts @@ -1,3 +1,4 @@ +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,8 +9,8 @@ import { MaterialsForm, MaterialsQuery, MaterialsVO } from '@/api/materials/mate * @returns {*} */ export const listMaterials = (query?: MaterialsQuery): AxiosPromise => { - return request({ - url: '/materials/materials/list', + return requestGo({ + url: '/zm/api/v1/system/busEquipmentMaterials/list', method: 'get', params: query }); @@ -20,9 +21,12 @@ export const listMaterials = (query?: MaterialsQuery): AxiosPromise => { - return request({ - url: '/materials/materials/' + id, - method: 'get' + return requestGo({ + 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 e0796b7..514c949 100644 --- a/src/api/materials/materialsInventory/index.ts +++ b/src/api/materials/materialsInventory/index.ts @@ -1,3 +1,4 @@ +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,8 +10,8 @@ import { MaterialsInventoryForm, MaterialsInventoryQuery, MaterialsInventoryVO } */ export const listMaterialsInventory = (query?: MaterialsInventoryQuery): AxiosPromise => { - return request({ - url: '/materials/materialsInventory/list', + return requestGo({ + url: '/zm/api/v1/system/busEquipmentMaterialsInventory/excellist', method: 'get', params: query }); diff --git a/src/api/menu.ts b/src/api/menu.ts index fc1d542..a65bb63 100644 --- a/src/api/menu.ts +++ b/src/api/menu.ts @@ -4,6 +4,8 @@ import { RouteRecordRaw } from 'vue-router'; // 获取路由 export function getRouters(id: string): AxiosPromise { + console.log('🚀 ~ getRouters ~ id:', id); + return request({ url: '/system/menu/getRouters/' + id, method: 'get' diff --git a/src/api/other/ys7DeviceImg/index.ts b/src/api/other/ys7DeviceImg/index.ts index bc814c2..35288a9 100644 --- a/src/api/other/ys7DeviceImg/index.ts +++ b/src/api/other/ys7DeviceImg/index.ts @@ -1,3 +1,4 @@ +import request1 from '@/utils/request-go'; import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { Ys7DeviceImgVO, Ys7DeviceImgForm, Ys7DeviceImgQuery } from '@/api/other/ys7DeviceImg/types'; @@ -9,8 +10,8 @@ import { Ys7DeviceImgVO, Ys7DeviceImgForm, Ys7DeviceImgQuery } from '@/api/other */ export const listYs7DeviceImg = (query?: Ys7DeviceImgQuery): AxiosPromise => { - return request({ - url: '/other/ys7DeviceImg/list', + return request1({ + url: '/zm/api/v1/system/ys7DevicesImg/list', method: 'get', params: query }); @@ -56,8 +57,9 @@ export const updateYs7DeviceImg = (data: Ys7DeviceImgForm) => { * @param id */ export const delYs7DeviceImg = (id: string | number | Array) => { - return request({ - url: '/other/ys7DeviceImg/' + id, - method: 'delete' + return request1({ + url: '/zm/api/v1/system/ys7DevicesImg/delete', + method: 'delete', + data: { ids: id } }); }; diff --git a/src/api/project/attendance/index.ts b/src/api/project/attendance/index.ts index 87866a6..0f09869 100644 --- a/src/api/project/attendance/index.ts +++ b/src/api/project/attendance/index.ts @@ -9,6 +9,7 @@ import { AttendanceMonthVO, AttendanceMonthQuery } from '@/api/project/attendance/types'; +import requestGo from '@/utils/request-go'; /** * 查询考勤列表 @@ -45,8 +46,8 @@ export const listAttendanceTwoWeek = (query?: AttendanceTwoWeekQuery): AxiosProm */ export const listAttendanceMonth = (query?: AttendanceMonthQuery): AxiosPromise => { - return request({ - url: '/project/attendance/list/month/byUserId', + return requestGo({ + url: '/zm/api/v1/system/busConstructionUser/pcQueryBasedOnOpenid', method: 'get', params: query }); diff --git a/src/api/project/busSalaryDetails/index.ts b/src/api/project/busSalaryDetails/index.ts index 7041181..0b62b42 100644 --- a/src/api/project/busSalaryDetails/index.ts +++ b/src/api/project/busSalaryDetails/index.ts @@ -1,15 +1,61 @@ -import request from '@/utils/request'; -import { AxiosPromise } from 'axios'; - -/** - * 分页查询项目薪资详情列表 - * @param query - * @returns {*} - */ -export const listBusSalaryDetails = (query?: any): AxiosPromise => { - return request({ - url: '/contractor/userSalaryDetail/salaryPageList', +import request from '@/utils/request-go'; +// 查询员工工资考核记录列表 +export function listBusSalaryDetails(query: object) { + return request({ + url: '/zm/api/v1/system/busSalaryDetails/list', method: 'get', params: query }); -}; +} +// 查询员工工资考核记录详细 +export function getBusSalaryDetails(id: number) { + return request({ + url: '/zm/api/v1/system/busSalaryDetails/get', + method: 'get', + params: { + id: id.toString() + } + }); +} +// 新增员工工资考核记录 +export function addBusSalaryDetails(data: object) { + return request({ + url: '/zm/api/v1/system/busSalaryDetails/add', + method: 'post', + data: data + }); +} +// 修改员工工资考核记录 +export function updateBusSalaryDetails(data: object) { + return request({ + url: '/zm/api/v1/system/busSalaryDetails/edit', + method: 'put', + data: data + }); +} +// 删除员工工资考核记录 +export function delBusSalaryDetails(ids: number[]) { + return request({ + url: '/zm/api/v1/system/busSalaryDetails/delete', + method: 'delete', + data: { + ids: ids + } + }); +} +// 根据身份证获取当前考勤记录明细 +export function getByIdDetail(params) { + return request({ + url: '/zm/api/v1/system/busSalaryDetails/getByIdDetail', + method: 'get', + params + }); +} +// 工资条获取(可根据项目or班组or施工人员) +export function salarySheet(params) { + return request({ + url: '/zm/api/v1/system/busSalaryDetails/salarySheet', + method: 'get', + params + }); +} diff --git a/src/api/project/constructionBlacklist/index.ts b/src/api/project/constructionBlacklist/index.ts index 3407e0d..c19967d 100644 --- a/src/api/project/constructionBlacklist/index.ts +++ b/src/api/project/constructionBlacklist/index.ts @@ -1,6 +1,7 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { ConstructionBlacklistVO, ConstructionBlacklistForm, ConstructionBlacklistQuery } from '@/api/project/constructionBlacklist/types'; +import requestGo from '@/utils/request-go'; /** * 查询黑名单列表 @@ -32,8 +33,8 @@ export const getConstructionBlacklist = (id: string | number): AxiosPromise { - return request({ - url: '/project/constructionBlacklist', + return requestGo({ + url: '/zm/api/v1/system/busConstructionBlacklist/add', method: 'post', data: data }); @@ -56,8 +57,11 @@ export const updateConstructionBlacklist = (data: ConstructionBlacklistForm) => * @param id */ export const delConstructionBlacklist = (id: string | number | Array) => { - return request({ - url: '/project/constructionBlacklist/' + id, - method: 'delete' + return requestGo({ + url: '/zm/api/v1/system/busConstructionBlacklist/delete', + method: 'delete', + data: { + openids: id + } }); }; diff --git a/src/api/project/constructionUser/index.ts b/src/api/project/constructionUser/index.ts index aad0902..a29bba6 100644 --- a/src/api/project/constructionUser/index.ts +++ b/src/api/project/constructionUser/index.ts @@ -1,4 +1,4 @@ -import request, { download } from '@/utils/request'; +import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { ConstructionUserForm, @@ -14,6 +14,7 @@ import { ConstructionMonthQuery } from '@/api/project/constructionUser/types'; import { AttendanceMonthVO } from '../attendance/types'; +import requestGo from '@/utils/request-go'; /** * 查询施工人员月份考勤列表 @@ -22,8 +23,8 @@ import { AttendanceMonthVO } from '../attendance/types'; */ export const listConstructionMonth = (query?: ConstructionMonthQuery): AxiosPromise => { - return request({ - url: '/contractor/constructionUser/list/attendance/month', + return requestGo({ + url: '/zm/api/wxApplet/wxApplet/busAttendance/byOpenId', method: 'get', params: query }); @@ -35,8 +36,22 @@ export const listConstructionMonth = (query?: ConstructionMonthQuery): AxiosProm */ export const listConstructionUser = (query?: ConstructionUserQuery): AxiosPromise => { - return request({ - url: '/contractor/constructionUser/list', + return requestGo({ + url: '/zm/api/wxApplet/wxApplet/busConstructionUser/personnelInquiry', + method: 'get', + params: query + }); +}; + +/** + * 查询施工人员列表 + * @param query + * @returns {*} + */ + +export const listConstructionUserInTeam = (query?: ConstructionUserQuery): AxiosPromise => { + return requestGo({ + url: '/zm/api/wxApplet/wxApplet/busConstructionUser/list', method: 'get', params: query }); @@ -47,8 +62,8 @@ export const listConstructionUser = (query?: ConstructionUserQuery): AxiosPromis * @param id */ export const getConstructionUser = (id: string | number): AxiosPromise => { - return request({ - url: '/contractor/constructionUser/' + id, + return requestGo({ + url: '/zm/api/wxApplet/wxApplet/busConstructionUser/getDetails?id=' + id, method: 'get' }); }; @@ -58,8 +73,8 @@ export const getConstructionUser = (id: string | number): AxiosPromise { - return request({ - url: '/contractor/constructionUser/change/project', + return requestGo({ + url: '/zm/api/wxApplet/wxApplet/busConstructionUser/changePay', method: 'put', data: data }); @@ -69,8 +84,8 @@ export const transferConstructionUser = (data: skipType) => { * 查询项目以及项目下的分包公司列表 */ export const getProjectContractorList = () => { - return request({ - url: '/project/project/list/project/contractorList', + return requestGo({ + url: '/zm/api/v1/system/sysProject/list?pageNum=1&pageSize=1000', method: 'get' }); }; @@ -80,8 +95,8 @@ export const getProjectContractorList = () => { * @param data */ export const addConstructionUser = (data: ConstructionUserForm): AxiosPromise => { - return request({ - url: '/contractor/constructionUser', + return requestGo({ + url: '/zm/api/wxApplet/wxApplet/busConstructionUser/add', method: 'post', data: data }); @@ -92,8 +107,8 @@ export const addConstructionUser = (data: ConstructionUserForm): AxiosPromise { - return request({ - url: '/contractor/constructionUser', + return requestGo({ + url: '/zm/api/v1/system/busConstructionUser/pcEdit', method: 'put', data: data }); @@ -103,10 +118,11 @@ export const updateConstructionUser = (data: ConstructionUserForm) => { * 删除施工人员 * @param id */ -export const delConstructionUser = (id: string | number | Array) => { - return request({ - url: '/contractor/constructionUser/' + id, - method: 'delete' +export const delConstructionUser = (data) => { + return requestGo({ + url: '/zm/api/wxApplet/wxApplet/busConstructionUser/delete', + method: 'delete', + data }); }; @@ -115,9 +131,9 @@ export const delConstructionUser = (id: string | number | Array * @param data */ export const updateConstructionUserStatus = (data: ConstructionUserStatusForm) => { - return request({ - url: '/contractor/constructionUser/batch/status', - method: 'put', + return requestGo({ + url: '/zm/api/wxApplet/wxApplet/busConstructionUser/changeState', + method: 'delete', data: data }); }; @@ -127,8 +143,8 @@ export const updateConstructionUserStatus = (data: ConstructionUserStatusForm) = * @param data */ export const updateConstructionUserPlayCardStatus = (data: ConstructionUserPlayCardForm) => { - return request({ - url: '/contractor/constructionUser/batch/clock', + return requestGo({ + url: '/zm/api/v1/system/busConstructionUser/oneClickOpen', method: 'put', data: data }); @@ -139,8 +155,8 @@ export const updateConstructionUserPlayCardStatus = (data: ConstructionUserPlayC * @param data */ export const updateConstructionUserPlayCardOneStatus = (data: ConstructionUserPlayCardForm) => { - return request({ - url: '/contractor/constructionUser/clock', + return requestGo({ + url: '/zm/api/v1/system/busConstructionUser/clockingCondition', method: 'put', data: data }); @@ -151,8 +167,8 @@ export const updateConstructionUserPlayCardOneStatus = (data: ConstructionUserPl * @param data */ export const updateConstructionUserSalary = (data: ConstructionUserSalaryForm) => { - return request({ - url: '/contractor/constructionUser/salary', + return requestGo({ + url: '/zm/api/wxApplet/wxApplet/busConstructionUser/payEdit', method: 'put', data: data }); @@ -163,10 +179,10 @@ export const updateConstructionUserSalary = (data: ConstructionUserSalaryForm) = * @param query */ export const getConstructionUserExit = (query: ConstructionUserExitForm) => { - return request({ - url: '/project/constructionUserExit/list', - method: 'get', - params: query + return requestGo({ + url: '/zm/api/v1/system/busConstructionUser/departureRecord', + method: 'post', + data: query }); }; @@ -175,19 +191,26 @@ export const getConstructionUserExit = (query: ConstructionUserExitForm) => { * @param query */ export const dowloadConstructionUserTemplate = (query: ConstructionUserTemplateForm) => { - let { projectId } = query; - const fileName = projectId + '_project.zip'; - return download('/contractor/constructionUserFile/exportFileTemplate', query, fileName); + return requestGo({ + url: '/zm/api/v1/system/busConstructionUser/templateExport', + method: 'get', + params: query + }); }; +// export const dowloadConstructionUserTemplate = (query: ConstructionUserTemplateForm) => { +// let { projectId } = query; +// const fileName = projectId + '_project.zip'; +// return request.download('/zm/api/v1/system/busConstructionUser/templateExport', query, fileName, 'get'); +// }; /** * 施工人员退场 * @param data */ export const delConstructionUserMember = (data: ConstructionUserMembeForm) => { - return request({ - url: '/project/projectTeamMember/', - method: 'delete', + return requestGo({ + url: '/zm/api/v1/system/busConstructionUser/departure', + method: 'post', data }); }; diff --git a/src/api/project/constructionUserFile/index.ts b/src/api/project/constructionUserFile/index.ts index 8916b3b..17c27d3 100644 --- a/src/api/project/constructionUserFile/index.ts +++ b/src/api/project/constructionUserFile/index.ts @@ -1,6 +1,7 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { ConstructionUserFileVO, ConstructionUserFileForm, ConstructionUserFileQuery } from '@/api/project/constructionUserFile/types'; +import requestGo from '@/utils/request-go'; /** * 查询施工人员文件存储列表 @@ -9,8 +10,8 @@ import { ConstructionUserFileVO, ConstructionUserFileForm, ConstructionUserFileQ */ export const listConstructionUserFile = (query?: ConstructionUserFileQuery): AxiosPromise => { - return request({ - url: '/contractor/constructionUserFile/list', + return requestGo({ + url: '/zm/api/wxApplet/wxApplet/busConstructionUser/get', method: 'get', params: query }); diff --git a/src/api/project/contractor/index.ts b/src/api/project/contractor/index.ts index e63b992..e3c9cac 100644 --- a/src/api/project/contractor/index.ts +++ b/src/api/project/contractor/index.ts @@ -1,6 +1,7 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { ContractorForm, ContractorQuery, ContractorVO } from '@/api/project/contractor/types'; +import requestGo from '@/utils/request-go'; /** * 查询分包单位列表 @@ -9,8 +10,8 @@ import { ContractorForm, ContractorQuery, ContractorVO } from '@/api/project/con */ export const listContractor = (query?: ContractorQuery): AxiosPromise => { - return request({ - url: '/contractor/contractor/list', + return requestGo({ + url: '/zm/api/wxApplet/wxApplet/busLabourservice/list', method: 'get', params: query }); @@ -21,8 +22,8 @@ export const listContractor = (query?: ContractorQuery): AxiosPromise => { - return request({ - url: '/contractor/contractor/' + id, + return requestGo({ + url: '/zm/api/wxApplet/wxApplet/busLabourservice/get?id=' + id, method: 'get' }); }; @@ -32,8 +33,8 @@ export const getContractor = (id: string | number): AxiosPromise = * @param data */ export const addContractor = (data: ContractorForm): AxiosPromise => { - return request({ - url: '/contractor/contractor', + return requestGo({ + url: '/zm/api/wxApplet/wxApplet/busLabourservice/add', method: 'post', data: data }); @@ -44,8 +45,8 @@ export const addContractor = (data: ContractorForm): AxiosPromise { - return request({ - url: '/contractor/contractor', + return requestGo({ + url: '/zm/api/wxApplet/wxApplet/busLabourservice/edit', method: 'put', data: data }); @@ -56,8 +57,11 @@ export const updateContractor = (data: ContractorForm) => { * @param id */ export const delContractor = (id: string | number | Array) => { - return request({ - url: '/contractor/contractor/' + id, - method: 'delete' + return requestGo({ + url: '/zm/api/wxApplet/wxApplet/busLabourservice/delete', + method: 'delete', + data: { + ids: id + } }); }; diff --git a/src/api/project/goUser/index.ts b/src/api/project/goUser/index.ts new file mode 100644 index 0000000..74fedd0 --- /dev/null +++ b/src/api/project/goUser/index.ts @@ -0,0 +1,87 @@ +import request from '@/utils/request-go'; +// 人员 考勤 补卡 请假接口 对接go 后台 +// 获取施工人员列表 +export const getBusConstructionUser = (params) => { + return request({ + url: '/zm/api/wxApplet/wxApplet/busConstructionUser/list', + method: 'get', + params + }); +}; +// 根据项目获取班组列表 +export const getSysProjectTeamList = (params) => { + return request({ + url: '/zm/api/wxApplet/wxApplet/sysProjectTeam/list', + method: 'get', + params + }); +}; + +// 获取人员详情 +export const getDetails = (id) => { + return request({ + url: '/zm/api/wxApplet/wxApplet/busConstructionUser/getDetails', + method: 'get', + params: { + id: id + } + }); +}; +// 获取考勤列表数据 +export const pcSelectBelowProjectOfPersonnel = (params) => { + return request({ + url: '/zm/api/v1/system/busConstructionUser/pcSelectBelowProjectOfPersonnel', + method: 'get', + params + }); +}; +// 获取考勤列表数据 +export const busAttendancepCList = (params) => { + return request({ + url: '/zm/api/wxApplet/wxApplet/busAttendance/pCList', + method: 'get', + params + }); +}; +// 获取考勤图表数据 +export const pcCollectDataForTwoWeeks = (params) => { + return request({ + url: '/zm/api/v1/system/busConstructionUser/pcCollectDataForTwoWeeks', + method: 'get', + params + }); +}; +// 获取补卡申请 +export const busReissueACardList = (params) => { + return request({ + url: '/zm/api/v1/system/busReissueACard/list', + method: 'get', + params + }); +}; +// 获取请假列表 +export const busAskforleaveList = (params) => { + return request({ + url: '/zm/api/v1/system/busAskforleave/list', + method: 'get', + params + }); +}; +// 获取字典 +export const getDictData = (dictType) => { + return request({ + url: '/zm/api/v1/system/dict/data/getDictData', + method: 'get', + params: { + dictType: dictType, + defaultValue: '' + } + }); +}; +export const busHseSecurityLogList = (params) => { + return request({ + url: '/zm/api/v1/system/busHseSecurityLog/list', + method: 'get', + params + }); +}; \ No newline at end of file diff --git a/src/api/project/leave/index.ts b/src/api/project/leave/index.ts index 50bdc04..39242b9 100644 --- a/src/api/project/leave/index.ts +++ b/src/api/project/leave/index.ts @@ -1,8 +1,8 @@ -import request from '@/utils/request'; +// import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { LeaveVO, LeaveForm, LeaveQuery } from '@/api/project/leave/types'; import { AuditReissueCardForm } from '../reissueCard/types'; - +import request from '@/utils/request-go'; /** * 查询施工人员请假申请列表 * @param query @@ -11,7 +11,7 @@ import { AuditReissueCardForm } from '../reissueCard/types'; export const listLeave = (query?: LeaveQuery): AxiosPromise => { return request({ - url: '/project/leave/list', + url: '/zm/api/v1/system/busAskforleave/list', method: 'get', params: query }); diff --git a/src/api/project/project/index.ts b/src/api/project/project/index.ts index 23cd9ad..68e901d 100644 --- a/src/api/project/project/index.ts +++ b/src/api/project/project/index.ts @@ -1,6 +1,21 @@ 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'; + +/** + * 查询项目列表 + * @param query + * @returns {*} + */ + +export const listProjectGo = (query?: ProjectQuery): AxiosPromise => { + return requestGo({ + url: '/zm/api/v1/system/sysProject/list', + method: 'get', + params: { ...query, isShow: '2' } + }); +}; /** * 查询项目列表 @@ -12,7 +27,7 @@ export const listProject = (query?: ProjectQuery): AxiosPromise => return request({ url: '/project/project/list', method: 'get', - params: query + params: { ...query } }); }; @@ -245,7 +260,6 @@ export const delAttendanceRange = (id) => { }); }; - // 修改项目打卡范围 export const updateAttendanceRange = (data) => { return request({ @@ -262,4 +276,4 @@ export const getAttendanceRangeList = (data) => { method: 'get', params: data }); -}; \ No newline at end of file +}; diff --git a/src/api/project/projectTeam/index.ts b/src/api/project/projectTeam/index.ts index 8d0b39a..a8540c0 100644 --- a/src/api/project/projectTeam/index.ts +++ b/src/api/project/projectTeam/index.ts @@ -1,4 +1,4 @@ -import request from '@/utils/request'; +import request from '@/utils/request-go'; import { AxiosPromise } from 'axios'; import { ProjectTeamForemanResp, ProjectTeamForm, ProjectTeamQuery, ProjectTeamVO } from '@/api/project/projectTeam/types'; @@ -10,7 +10,7 @@ import { ProjectTeamForemanResp, ProjectTeamForm, ProjectTeamQuery, ProjectTeamV export const listProjectTeam = (query?: ProjectTeamQuery): AxiosPromise => { return request({ - url: '/project/projectTeam/list', + url: '/zm/api/wxApplet/wxApplet/sysProjectTeam/list', method: 'get', params: query }); @@ -22,8 +22,9 @@ export const listProjectTeam = (query?: ProjectTeamQuery): AxiosPromise => { return request({ - url: '/project/projectTeam/listForeman/' + projectId, - method: 'get' + url: '/zm/api/wxApplet/wxApplet/sysProjectTeam/get', + method: 'get', + params: { projectId } }); }; @@ -33,8 +34,9 @@ export const listProjectTeamForeman = (projectId: string | number): AxiosPromise */ export const getProjectTeam = (id: string | number): AxiosPromise => { return request({ - url: '/project/projectTeam/' + id, - method: 'get' + url: '/zm/api/wxApplet/wxApplet/sysProjectTeam/get', + method: 'get', + params: { id } }); }; @@ -44,7 +46,7 @@ export const getProjectTeam = (id: string | number): AxiosPromise */ export const addProjectTeam = (data: ProjectTeamForm): AxiosPromise => { return request({ - url: '/project/projectTeam', + url: '/zm/api/wxApplet/wxApplet/sysProjectTeam/add', method: 'post', data: data }); @@ -56,7 +58,7 @@ export const addProjectTeam = (data: ProjectTeamForm): AxiosPromise { return request({ - url: '/project/projectTeam', + url: '/zm/api/wxApplet/wxApplet/sysProjectTeam/edit', method: 'put', data: data }); @@ -66,18 +68,19 @@ export const updateProjectTeam = (data: ProjectTeamForm) => { * 删除项目班组 * @param id */ -export const delProjectTeam = (id: string | number | Array) => { +export const delProjectTeam = (ids: string | number | Array) => { return request({ - url: '/project/projectTeam/' + id, - method: 'delete' + url: '/zm/api/wxApplet/wxApplet/sysProjectTeam/delete', + method: 'delete', + params: { ids } }); }; -// 获取项目得打卡范围 -export const getProjectTeamClockIn = (params) => { +// 根据项目或班组导出出勤记录(班组) +export function exportSalary(data: any) { return request({ - url: '/project/projectTeam/rangeList', - method: 'get', - params + url: '/zm/api/v1/system/busConstructionUser/exportSalary', + method: 'post', + data }); -}; \ No newline at end of file +} diff --git a/src/api/project/projectTeamMember/index.ts b/src/api/project/projectTeamMember/index.ts index c64cee2..98d19bd 100644 --- a/src/api/project/projectTeamMember/index.ts +++ b/src/api/project/projectTeamMember/index.ts @@ -1,4 +1,4 @@ -import request from '@/utils/request'; +import request from '@/utils/request-go'; import { AxiosPromise } from 'axios'; import { ProjectTeamMemberForm, ProjectTeamMemberQuery, ProjectTeamMemberVO } from '@/api/project/projectTeamMember/types'; @@ -10,7 +10,7 @@ import { ProjectTeamMemberForm, ProjectTeamMemberQuery, ProjectTeamMemberVO } fr export const listProjectTeamMember = (query?: ProjectTeamMemberQuery): AxiosPromise => { return request({ - url: '/project/projectTeamMember/list', + url: '/zm/api/wxApplet/wxApplet/sysProjectTeamMember/list', method: 'get', params: query }); @@ -22,8 +22,9 @@ export const listProjectTeamMember = (query?: ProjectTeamMemberQuery): AxiosProm */ export const getProjectTeamMember = (id: string | number): AxiosPromise => { return request({ - url: '/project/projectTeamMember/' + id, - method: 'get' + url: '/zm/api/wxApplet/wxApplet/sysProjectTeamMember/get', + method: 'get', + params: { id } }); }; @@ -33,7 +34,7 @@ export const getProjectTeamMember = (id: string | number): AxiosPromise => { return request({ - url: '/project/projectTeamMember', + url: '/zm/api/wxApplet/wxApplet/sysProjectTeamMember/add', method: 'post', data: data }); @@ -45,7 +46,7 @@ export const addProjectTeamMember = (data: ProjectTeamMemberForm): AxiosPromise< */ export const updateProjectTeamMember = (data: ProjectTeamMemberForm) => { return request({ - url: '/project/projectTeamMember', + url: '/zm/api/wxApplet/wxApplet/sysProjectTeamMember/edit', method: 'put', data: data }); @@ -57,7 +58,8 @@ export const updateProjectTeamMember = (data: ProjectTeamMemberForm) => { */ export const delProjectTeamMember = (id: string | number | Array) => { return request({ - url: '/project/projectTeamMember/' + id, - method: 'delete' + url: '/zm/api/wxApplet/wxApplet/sysProjectTeamMember/delete', + method: 'delete', + data: { ids: id } }); }; diff --git a/src/api/project/salaryExcel/index.ts b/src/api/project/salaryExcel/index.ts new file mode 100644 index 0000000..6f0bd00 --- /dev/null +++ b/src/api/project/salaryExcel/index.ts @@ -0,0 +1,50 @@ +import request from '@/utils/request-go'; +// 读取所有导入列表数据(汇总) +export function readAllImportedListData() { + return request({ + url: '/zm/api/v1/system/busPayrollList/readAllImportedListData', + method: 'get' + }); +} + +// 工资(excel导入形成的)列表 +export function busPayrollList(query: any) { + return request({ + url: '/zm/api/v1/system/busPayrollList/list', + method: 'get', + params: query + }); +} +// 根据工资表的id获取到源excel(只允许查看) +export function getTheSourceExcelAccordingToTheIdOfThePayroll(query: any) { + return request({ + url: '/zm/api/v1/system/busPayrollList/getTheSourceExcelAccordingToTheIdOfThePayroll', + method: 'get', + params: query + }); +} +// 根据工资表的id获取到源excel(只允许查看) +export function importExcelPaySheet(query: any) { + return request({ + url: '/zm/api/v1/system/busPayrollList/importExcelPaySheet', + method: 'post', + data: query + }); +} +// 根据工资表的id获取到源excel(只允许查看) +export function deletePayroll(query: any) { + return request({ + url: '/zm/api/v1/system/busPayrollList/deletePayroll', + method: 'DELETE', + params: query + }); +} + +// 查询施工单位列表 +export function listBusLabourservice(query: object) { + return request({ + url: '/zm/api/wxApplet/wxApplet/busLabourservice/list', + method: 'get', + params: query + }); +} diff --git a/src/api/project/workWage/index.ts b/src/api/project/workWage/index.ts index 01ed29d..8842c0f 100644 --- a/src/api/project/workWage/index.ts +++ b/src/api/project/workWage/index.ts @@ -1,4 +1,4 @@ -import request from '@/utils/request'; +import request from '@/utils/request-go'; import { AxiosPromise } from 'axios'; import { WorkWageVO, WorkWageForm, WorkWageQuery } from '@/api/project/workWage/types'; @@ -10,7 +10,7 @@ import { WorkWageVO, WorkWageForm, WorkWageQuery } from '@/api/project/workWage/ export const listWorkWage = (query?: WorkWageQuery): AxiosPromise => { return request({ - url: '/project/workWage/list', + url: '/zm/api/v1/system/busTypeOfWage/list', method: 'get', params: query }); @@ -22,7 +22,7 @@ export const listWorkWage = (query?: WorkWageQuery): AxiosPromise */ export const getWorkWage = (id: string | number): AxiosPromise => { return request({ - url: '/project/workWage/' + id, + url: '/zm/api/v1/system/busTypeOfWage/get?id=' + id, method: 'get' }); }; @@ -33,7 +33,7 @@ export const getWorkWage = (id: string | number): AxiosPromise => { */ export const addWorkWage = (data: WorkWageForm) => { return request({ - url: '/project/workWage', + url: '/zm/api/v1/system/busTypeOfWage/add', method: 'post', data: data }); @@ -45,7 +45,7 @@ export const addWorkWage = (data: WorkWageForm) => { */ export const updateWorkWage = (data: WorkWageForm) => { return request({ - url: '/project/workWage', + url: '/zm/api/v1/system/busTypeOfWage/edit', method: 'put', data: data }); @@ -57,7 +57,20 @@ export const updateWorkWage = (data: WorkWageForm) => { */ export const delWorkWage = (id: string | number | Array) => { return request({ - url: '/project/workWage/' + id, - method: 'delete' + url: '/zm/api/v1/system/busTypeOfWage/delete', + method: 'delete', + data: { + ids: id + } + }); +}; + +/** + * 查询工种类型 + */ +export const getTypeOfWork = () => { + return request({ + url: '/zm/api/v1/system/dict/data/getDictData?dictType=type_of_work', + method: 'get' }); }; diff --git a/src/api/quality/documentQualityMeeting/index.ts b/src/api/quality/documentQualityMeeting/index.ts new file mode 100644 index 0000000..5b6e81b --- /dev/null +++ b/src/api/quality/documentQualityMeeting/index.ts @@ -0,0 +1,89 @@ +import request from '@/utils/request-go'; +// 查询质量会议树形结构 +export function documentQualityMeetingTreeStructure(query: object) { + return request({ + url: '/zm/api/v1/system/documentQualityMeeting/qualityTreeStructure', + method: 'get', + params: query + }); +} +// 查询质量会议文件列表 +export function documentQualityMeetingList(query: object) { + return request({ + url: '/zm/api/v1/system/documentQualityMeeting/list', + method: 'get', + params: query + }); +} +// 质量会议添加 +export function documentQualityMeetingAdd(data: object) { + return request({ + url: '/zm/api/v1/system/documentQualityMeeting/add', + method: 'post', + data + }); +} +// 质量会议修改文件名 +export function documentQualityMeetingEdit(query: object) { + return request({ + url: '/zm/api/v1/system/documentQualityMeeting/edit', + method: 'put', + params: query + }); +} +// 质量会议删除文件 +export function documentQualityMeetingDelete(query: object) { + return request({ + url: '/zm/api/v1/system/documentQualityMeeting/delete', + method: 'delete', + params: query + }); +} +// 质量会议获取指定id信息 +export function documentProductionDrawingGet(query: object) { + return request({ + url: '/zm/api/v1/system/documentProductionDrawing/get', + method: 'get', + params: query + }); +} +// 新建文件夹 +export function documentQualityMeetingNewFolder(data: object) { + return request({ + url: '/zm/api/v1/system/documentQualityMeeting/qualityNewFolderData', + method: 'post', + data + }); +} +// 单文件下载 +export function documentQualityMeetingDownload(query: object) { + return request({ + url: '/zm/api/v1/system/documentQualityMeeting/qualityDataUniFileDownload', + method: 'get', + params: query + }); +} +// 获取pid +export function getSelectByPid(query: object) { + return request({ + url: '/zm/api/v1/system/documentQualityMeeting/qualitySelectByPid', + method: 'get', + params: query + }); +} +// 回收站恢复 +export function qualityDataRecyclingStation(data: object) { + return request({ + url: '/zm/api/v1/system/documentQualityMeeting/qualityDataRecyclingStation', + method: 'put', + data + }); +} +// 回收站列表数据 +export function qualityRecycleBinList(query: object) { + return request({ + url: '/zm/api/v1/system/documentQualityMeeting/qualityRecycleBinList', + method: 'get', + params: query + }); +} diff --git a/src/api/quality/onlineListquality/Online.ts b/src/api/quality/onlineListquality/Online.ts new file mode 100644 index 0000000..d9db454 --- /dev/null +++ b/src/api/quality/onlineListquality/Online.ts @@ -0,0 +1,92 @@ +import request from '@/utils/request-go'; +// 在线word编辑接口 +// 获取目录 树形数据 +export function treeStructureList(query: object) { + return request({ + url: '/zm/api/v1/system/document/treeStructure', + method: 'get', + params: query + }); +} +// 根据目录信息获取文档 +export function documentList(query: object) { + return request({ + url: '/zm/api/v1/system/document/list', + method: 'get', + params: query + }); +} +// 修改母板名称 +export function documentEdit(data: object) { + return request({ + url: '/zm/api/v1/system/document/edit', + method: 'put', + data + }); +} +// 获取模板list +export function documentAllList(query) { + return request({ + url: '/zm/api/v1/system/document/allList', + method: 'get', + params: query + }); +} + +// 删除母板 +export function documentDelete(ids: any) { + return request({ + url: '/zm/api/v1/system/document/delete', + method: 'delete', + params: { + ids + } + }); +} +// 新增母板 +export function documentAdd(data: object) { + return request({ + url: '/zm/api/v1/system/document/add', + method: 'post', + data: data + }); +} +// 新建文件夹 +export function documentNewFolder(data: object) { + return request({ + url: '/zm/api/v1/system/document/newFolder', + method: 'post', + data: data + }); +} +// 下载文件夹 - 模板 +export function compressedDownload(relativePath) { + return request({ + url: '/zm/api/v1/system/document/compressedDownload', + method: 'get', + params: { + relativePath + } + }); +} +// 下载文件夹 - 资料 +export function uniFolderDownload(relativePath) { + return request({ + url: '/zm/api/v1/system/documentData/dataCompressedDownload', + method: 'get', + params: { + relativePath + } + }); +} +// 下载文件 - 资料 +export function uniFileDownload(relativePath) { + return request({ + url: '/zm/api/v1/system/documentData/uniFileDownload', + method: 'get', + responseType: 'blob', + params: { + relativePath + } + }); +} diff --git a/src/api/quality/onlineListquality/profile.ts b/src/api/quality/onlineListquality/profile.ts new file mode 100644 index 0000000..b1c50af --- /dev/null +++ b/src/api/quality/onlineListquality/profile.ts @@ -0,0 +1,100 @@ +import request from '@/utils/request-go'; +// 工程资料模块 +//添加工程资料 +export function templateDataAdd(data: object) { + return request({ + url: '/zm/api/v1/system/templateData/add', + method: 'post', + data + }); +} +// 获取工程列表 +export function templateDataList(query: object) { + return request({ + url: '/zm/api/v1/system/templateData/list', + method: 'get', + params: query + }); +} + +// 删除工程资料 +export function templateDataDel(query: object) { + return request({ + url: '/zm/api/v1/system/templateData/delete', + method: 'delete', + params: query + }); +} +// 修改工程资料 +export function templateDataEdit(data: object) { + return request({ + url: '/zm/api/v1/system/templateData/edit', + method: 'put', + data + }); +} +// 工程资料下级模板接口 +// 添加 +export function templateDataJuniorAdd(data: object) { + return request({ + url: '/zm/api/v1/system/templateDataJunior/add', + method: 'post', + data + }); +} +// 删除 +export function templateDataJuniorDel(query: object) { + return request({ + url: '/zm/api/v1/system/templateDataJunior/delete', + method: 'delete', + params: query + }); +} +// 修改 +export function templateDataJuniorEdit(data: object) { + return request({ + url: '/zm/api/v1/system/templateDataJunior/edit', + method: 'put', + data + }); +} +// 列表 +export function templateDataJuniorList(query: object) { + return request({ + url: '/zm/api/v1/system/templateDataJunior/list', + method: 'get', + params: query + }); +} +// 获取源数据 +export function templateDataSourceDataList(query: object) { + return request({ + url: '/zm/api/v1/system/templateDataSourceData/list', + method: 'get', + params: query + }); +} +// 添加数据源 +export function templateDataSourceDataAdd(query: object) { + return request({ + url: '/zm/api/v1/system/templateDataSourceData/add', + method: 'get', + params: query + }); +} +// 修改数据源 +export function templateDataSourceDataEdit(query: object) { + return request({ + url: '/zm/api/v1/system/templateDataSourceData/edit', + method: 'get', + params: query + }); +} +// 删除数据源 +export function templateDataSourceDataDel(query: object) { + return request({ + url: '/zm/api/v1/system/templateDataSourceData/delete', + method: 'get', + params: query + }); +} diff --git a/src/api/quality/onlineListquality/profileData.ts b/src/api/quality/onlineListquality/profileData.ts new file mode 100644 index 0000000..d1af756 --- /dev/null +++ b/src/api/quality/onlineListquality/profileData.ts @@ -0,0 +1,129 @@ +import request from '@/utils/request-go'; +// 工程资料模块 +//工程列表 +export function documentDataList(query: object) { + return request({ + url: '/zm/api/v1/system/documentData/list', + method: 'get', + params: query + }); +} +//工程列表(无分页) +export function documentDataListUnPage(query: object) { + return request({ + url: '/zm/api/v1/system/documentData/sonFile', + method: 'get', + params: query + }); +} +// 添加工程资料 +export function documentDataAdd(data: object) { + return request({ + url: '/zm/api/v1/system/documentData/add', + method: 'post', + data + }); +} +// 新建文件夹 +export function documentDataNewFolder(data: object) { + return request({ + url: '/zm/api/v1/system/documentData/newFolder', + method: 'post', + data + }); +} +// 删除工程资料 +export function documentDataDelete(query: object) { + return request({ + url: '/zm/api/v1/system/documentData/delete', + method: 'delete', + params: { + ids: query + } + }); +} +// 修改工程资料 +export function documentDataEdit(data: object) { + return request({ + url: '/zm/api/v1/system/documentData/edit', + method: 'put', + data + }); +} +// 获取资料树形结构 +export function treeStructureData(query: object) { + return request({ + url: '/zm/api/v1/system/documentData/treeStructureData', + method: 'get', + params: query + }); +} + +// 复制模板 +export function onlineImport(data: object) { + return request({ + url: '/zm/api/v1/system/documentData/onlineImport', + method: 'put', + data + }); +} +// 工程资料列表数据 +export function documentDataAllList(query) { + return request({ + url: '/zm/api/v1/system/documentData/allList', + method: 'get', + params: query + }); +} +// 文件拖动 +export function onlineMobile(data) { + return request({ + url: '/zm/api/v1/system/documentData/onlineMobile', + method: 'put', + data + }); +} + +// 回收站文件删除或恢复 资料部分 +export function dataRecyclingStation(data) { + return request({ + url: '/zm/api/v1/system/documentData/dataRecyclingStation', + method: 'put', + data + }); +} +// 回收站文件删除或恢复 模板部分 +export function templateRecycleBin(data) { + return request({ + url: '/zm/api/v1/system/documentData/templateRecycleBin', + method: 'put', + data + }); +} +//资料文件模糊查询(查询资料里面的所有文件,限制文件为ppt、excel、word) +export function dataFileQuery(query) { + return request({ + url: '/zm/api/v1/system/documentData/dataFileQuery', + method: 'get', + params: query + }); +} +// 资料-查看-获取详细信息 +export function getProfileDetail(id) { + return request({ + url: '/zm/api/v1/system/documentData/get', + method: 'get', + params: { + id + } + }); +} + +// 查询项目列表 所有项目 无用户限制 +export function listSysProjectAll(query: object) { + return request({ + url: '/zm/api/v1/system/sysProject/listAll', + method: 'get', + params: query + }); +} diff --git a/src/api/quality/qualityConstructionLog/index.ts b/src/api/quality/qualityConstructionLog/index.ts index fbcb46c..8ab2202 100644 --- a/src/api/quality/qualityConstructionLog/index.ts +++ b/src/api/quality/qualityConstructionLog/index.ts @@ -1,3 +1,4 @@ +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,8 +10,8 @@ import { QualityConstructionLogVO, QualityConstructionLogForm, QualityConstructi */ export const listQualityConstructionLog = (query?: QualityConstructionLogQuery): AxiosPromise => { - return request({ - url: '/quality/qualityConstructionLog/list', + return requestGo({ + url: '/zm/api/v1/system/busConstructionLog/list', method: 'get', params: query }); @@ -21,9 +22,10 @@ export const listQualityConstructionLog = (query?: QualityConstructionLogQuery): * @param id */ export const getQualityConstructionLog = (id: string | number): AxiosPromise => { - return request({ - url: '/quality/qualityConstructionLog/' + id, - method: 'get' + return requestGo({ + url: '/zm/api/v1/system/busConstructionLog/get', + method: 'get', + params: { id } }); }; @@ -56,8 +58,9 @@ export const updateQualityConstructionLog = (data: QualityConstructionLogForm) = * @param id */ export const delQualityConstructionLog = (id: string | number | Array) => { - return request({ - url: '/quality/qualityConstructionLog/' + id, - method: 'delete' + return requestGo({ + url: '/zm/api/v1/system/busConstructionLog/delete', + method: 'delete', + data: { ids: id } }); }; diff --git a/src/api/quality/qualityInspection/index.ts b/src/api/quality/qualityInspection/index.ts index 82c8a4f..9f90b21 100644 --- a/src/api/quality/qualityInspection/index.ts +++ b/src/api/quality/qualityInspection/index.ts @@ -1,4 +1,4 @@ -import request from '@/utils/request'; +import request from '@/utils/request-go'; import { AxiosPromise } from 'axios'; import { QualityInspectionVO, QualityInspectionForm, QualityInspectionQuery } from '@/api/quality/qualityInspection/types'; @@ -10,7 +10,7 @@ import { QualityInspectionVO, QualityInspectionForm, QualityInspectionQuery } fr export const listQualityInspection = (query?: QualityInspectionQuery): AxiosPromise => { return request({ - url: '/quality/qualityInspection/list', + url: '/zm/api/v1/system/busInspectionTicket/list', method: 'get', params: query }); @@ -22,8 +22,9 @@ export const listQualityInspection = (query?: QualityInspectionQuery): AxiosProm */ export const getQualityInspection = (id: string | number): AxiosPromise => { return request({ - url: '/quality/qualityInspection/' + id, - method: 'get' + url: '/zm/api/v1/system/busInspectionTicket/get', + method: 'get', + params: { id } }); }; @@ -33,7 +34,7 @@ export const getQualityInspection = (id: string | number): AxiosPromise { return request({ - url: '/quality/qualityInspection', + url: '/zm/api/v1/system/busInspectionTicket/add', method: 'post', data: data }); @@ -45,7 +46,7 @@ export const addQualityInspection = (data: QualityInspectionForm) => { */ export const updateQualityInspection = (data: QualityInspectionForm) => { return request({ - url: '/quality/qualityInspection', + url: '/zm/api/v1/system/busInspectionTicket/editVerification', method: 'put', data: data }); @@ -57,7 +58,32 @@ export const updateQualityInspection = (data: QualityInspectionForm) => { */ export const delQualityInspection = (id: string | number | Array) => { return request({ - url: '/quality/qualityInspection/' + id, - method: 'delete' + url: '/zm/api/v1/system/busInspectionTicket/delete', + method: 'delete', + data: { + ids: id + } }); }; + +// 下载OSS对象存储 +export function downLoadOss(ossId: { id?: string | number; idList?: string | number | Array }, url: string, fileName: string) { + return request.download(url, ossId, fileName); +} + +// 查询项目下的所有人员 +export function acquisitionOfCorrectivePersonnel(projectId: string | number) { + return request({ + url: '/zm/api/v1/system/busInspectionTicket/acquisitionOfCorrectivePersonnel?projectId=' + projectId, + method: 'get' + }); +} + +// 编辑校验 +export function editVerification(data: any) { + return request({ + url: '/zm/api/v1/system/busInspectionTicket/editVerification', + method: 'post', + data: data + }); +} diff --git a/src/api/safety/documentSafetyMeeting/index.ts b/src/api/safety/documentSafetyMeeting/index.ts index 8ed5baf..2ee143d 100644 --- a/src/api/safety/documentSafetyMeeting/index.ts +++ b/src/api/safety/documentSafetyMeeting/index.ts @@ -1,33 +1,24 @@ -import request from '@/utils/request'; -import { - documentSafetyMeetingListFile, - documentSafetyMeetingListFolder, - documentSafetyMeetingListQuery, - documentSafetyMeetingListVo, - documentRecycleBinListQuery, - documentRecycleBinListVO -} from './type'; -import { AxiosPromise } from 'axios'; +import request from '@/utils/request-go'; // 查询安全会议结构 export function documentCompletionTreeStructure(query: object) { return request({ - url: '/safety/documentSafetyMeeting/list', + url: '/zm/api/v1/system/documentSafetyMeeting/safetyTreeStructure', method: 'get', params: query }); } // 查询安全会议文件列表 -export function documentCompletionList(query: documentSafetyMeetingListQuery): AxiosPromise { +export function documentCompletionList(query: object) { return request({ - url: '/safety/documentSafetyMeeting/list', + url: '/zm/api/v1/system/documentSafetyMeeting/list', method: 'get', params: query }); } // 安全会议添加 -export function documentCompletionAdd(data: documentSafetyMeetingListFile) { +export function documentCompletionAdd(data: object) { return request({ - url: '/safety/documentSafetyMeeting/file', + url: '/zm/api/v1/system/documentSafetyMeeting/add', method: 'post', data }); @@ -35,29 +26,31 @@ export function documentCompletionAdd(data: documentSafetyMeetingListFile) { // 安全会议修改文件名 export function documentCompletionEdit(query: object) { return request({ - url: '/api/v1/system/documentSafetyMeeting/edit', + url: '/zm/api/v1/system/documentSafetyMeeting/edit', method: 'put', params: query }); } // 安全会议删除文件 -export function documentCompletionDelete(id: string) { +export function documentCompletionDelete(query: object) { return request({ - url: '/safety/documentSafetyMeeting/' + id, - method: 'delete' + url: '/zm/api/v1/system/documentSafetyMeeting/delete', + method: 'delete', + params: query }); } // 安全会议获取指定id信息 -export function documentCompletionGet(id: string) { +export function documentCompletionGet(query: object) { return request({ - url: '/safety/documentSafetyMeeting/' + id, - method: 'get' + url: '/zm/api/v1/system/documentSafetyMeeting/get', + method: 'get', + params: query }); } // 新建文件夹 -export function newFolder(data: documentSafetyMeetingListFolder): AxiosPromise { +export function newFolder(data: object) { return request({ - url: '/safety/documentSafetyMeeting/folder', + url: '/zm/api/v1/system/documentSafetyMeeting/safetyNewFolderData', method: 'post', data }); @@ -65,23 +58,24 @@ export function newFolder(data: documentSafetyMeetingListFolder): AxiosPromise { +export function documentRecycleBinList(query: object) { return request({ - url: '/safety/documentSafetyMeeting/recycleBin/list', + url: '/zm/api/v1/system/documentSafetyMeeting/safetyRecycleBinList', method: 'get', - params: { ...query, fileType: '2' } + params: query }); } diff --git a/src/api/safety/recognizeRecord/index.ts b/src/api/safety/recognizeRecord/index.ts index b197db7..c3782ec 100644 --- a/src/api/safety/recognizeRecord/index.ts +++ b/src/api/safety/recognizeRecord/index.ts @@ -1,4 +1,5 @@ import request from '@/utils/request'; +import request1 from '@/utils/request-go'; import { AxiosPromise } from 'axios'; import { RecognizeRecordVO, RecognizeRecordForm, RecognizeRecordQuery } from '@/api/safety/recognizeRecord/types'; @@ -9,8 +10,8 @@ import { RecognizeRecordVO, RecognizeRecordForm, RecognizeRecordQuery } from '@/ */ export const listRecognizeRecord = (query?: RecognizeRecordQuery): AxiosPromise => { - return request({ - url: '/safety/recognizeRecord/list', + return request1({ + url: '/zm/api/v1/system/busTour/list', method: 'get', params: query }); @@ -56,8 +57,9 @@ export const updateRecognizeRecord = (data: RecognizeRecordForm) => { * @param id */ export const delRecognizeRecord = (id: string | number | Array) => { - return request({ - url: '/safety/recognizeRecord/' + id, - method: 'delete' + return request1({ + url: '/zm/api/v1/system/busTour/delete', + method: 'delete', + data: { ids: id } }); }; diff --git a/src/api/safety/safetyInspection/index.ts b/src/api/safety/safetyInspection/index.ts index 8fc0707..155aa49 100644 --- a/src/api/safety/safetyInspection/index.ts +++ b/src/api/safety/safetyInspection/index.ts @@ -1,4 +1,5 @@ import request from '@/utils/request'; +import request1 from '@/utils/request-go'; import { AxiosPromise } from 'axios'; import { SafetyInspectionForm, SafetyInspectionQuery, SafetyInspectionVO } from '@/api/safety/safetyInspection/types'; @@ -9,8 +10,8 @@ import { SafetyInspectionForm, SafetyInspectionQuery, SafetyInspectionVO } from */ export const listSafetyInspection = (query?: SafetyInspectionQuery): AxiosPromise => { - return request({ - url: '/safety/safetyInspection/list', + return request1({ + url: '/zm/api/v1/system/busHseManagement/list', method: 'get', params: query }); @@ -20,10 +21,11 @@ export const listSafetyInspection = (query?: SafetyInspectionQuery): AxiosPromis * 查询安全巡检工单详细 * @param id */ -export const getSafetyInspection = (id: string | number): AxiosPromise => { - return request({ - url: '/safety/safetyInspection/' + id, - method: 'get' +export const getSafetyInspection = (query): AxiosPromise => { + return request1({ + url: '/zm/api/v1/system/busHseManagement/get', + method: 'get', + params: query }); }; @@ -56,9 +58,10 @@ export const updateSafetyInspection = (data: SafetyInspectionForm) => { * @param id */ export const delSafetyInspection = (id: string | number | Array) => { - return request({ - url: '/safety/safetyInspection/' + id, - method: 'delete' + return request1({ + url: '/zm/api/v1/system/busHseManagement/delete', + method: 'delete', + data: { ids: id } }); }; /** diff --git a/src/api/safety/safetyLog/index.ts b/src/api/safety/safetyLog/index.ts index 3389bd0..72385c2 100644 --- a/src/api/safety/safetyLog/index.ts +++ b/src/api/safety/safetyLog/index.ts @@ -1,6 +1,7 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { SafetyLogForm, SafetyLogQuery, SafetyLogVO } from '@/api/safety/safetyLog/types'; +import requestGo from '@/utils/request-go'; /** * 查询安全日志列表 @@ -21,8 +22,8 @@ export const listSafetyLog = (query?: SafetyLogQuery): AxiosPromise => { - return request({ - url: '/safety/safetyLog/' + id, + return requestGo({ + url: '/zm/api/v1/system/busHseSecurityLog/get?id=' + id, method: 'get' }); }; @@ -32,8 +33,8 @@ export const getSafetyLog = (id: string | number): AxiosPromise => * @param data */ export const addSafetyLog = (data: SafetyLogForm) => { - return request({ - url: '/safety/safetyLog', + return requestGo({ + url: '/zm/api/v1/system/busHseSecurityLog/addText', method: 'post', data: data }); @@ -56,8 +57,9 @@ export const updateSafetyLog = (data: SafetyLogForm) => { * @param id */ export const delSafetyLog = (id: string | number | Array) => { - return request({ - url: '/safety/safetyLog/' + id, - method: 'delete' + return requestGo({ + url: '/zm/api/v1/system/busHseSecurityLog/delete', + method: 'delete', + data: { ids: id } }); }; diff --git a/src/api/safety/safetyWeeklyReport/index.ts b/src/api/safety/safetyWeeklyReport/index.ts index c3717ff..7bc80db 100644 --- a/src/api/safety/safetyWeeklyReport/index.ts +++ b/src/api/safety/safetyWeeklyReport/index.ts @@ -1,3 +1,4 @@ +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,8 +10,8 @@ import { SafetyWeeklyReportForm, SafetyWeeklyReportQuery, SafetyWeeklyReportVO } */ export const listSafetyWeeklyReport = (query?: SafetyWeeklyReportQuery): AxiosPromise => { - return request({ - url: '/safety/safetyWeeklyReport/list', + return requestGo({ + url: '/zm/api/v1/system/busWeeklySecurityReport/list', method: 'get', params: query }); @@ -21,9 +22,12 @@ export const listSafetyWeeklyReport = (query?: SafetyWeeklyReportQuery): AxiosPr * @param id */ export const getSafetyWeeklyReport = (id: string | number): AxiosPromise => { - return request({ - url: '/safety/safetyWeeklyReport/' + id, - method: 'get' + return requestGo({ + url: '/zm/api/v1/system/busWeeklySecurityReport/get', + method: 'get', + params: { + id + } }); }; @@ -32,8 +36,8 @@ export const getSafetyWeeklyReport = (id: string | number): AxiosPromise { - return request({ - url: '/safety/safetyWeeklyReport', + return requestGo({ + url: '/zm/api/v1/system/busWeeklySecurityReport/add', method: 'post', data: data }); @@ -56,8 +60,9 @@ export const updateSafetyWeeklyReport = (data: SafetyWeeklyReportForm) => { * @param id */ export const delSafetyWeeklyReport = (id: string | number | Array) => { - return request({ - url: '/safety/safetyWeeklyReport/' + id, - method: 'delete' + return requestGo({ + url: '/zm/api/v1/system/busWeeklySecurityReport/delete', + method: 'delete', + data: { ids: id } }); }; diff --git a/src/api/safety/teamMeeting/index.ts b/src/api/safety/teamMeeting/index.ts index e0c518d..268c6dd 100644 --- a/src/api/safety/teamMeeting/index.ts +++ b/src/api/safety/teamMeeting/index.ts @@ -1,4 +1,5 @@ import request from '@/utils/request'; +import request1 from '@/utils/request-go'; import { AxiosPromise } from 'axios'; import { TeamMeetingForm, TeamMeetingQuery, TeamMeetingVO } from '@/api/safety/teamMeeting/types'; @@ -9,8 +10,8 @@ import { TeamMeetingForm, TeamMeetingQuery, TeamMeetingVO } from '@/api/safety/t */ export const listTeamMeeting = (query?: TeamMeetingQuery): AxiosPromise => { - return request({ - url: '/safety/teamMeeting/list', + return request1({ + url: '/zm/api/wxApplet/wxApplet/sysProjectTeamSquad/list', method: 'get', params: query }); @@ -20,10 +21,11 @@ export const listTeamMeeting = (query?: TeamMeetingQuery): AxiosPromise => { - return request({ - url: '/safety/teamMeeting/' + id, - method: 'get' +export const getTeamMeeting = (query): AxiosPromise => { + return request1({ + url: '/zm/api/wxApplet/wxApplet/sysProjectTeamSquad/get', + method: 'get', + params: query }); }; @@ -56,9 +58,12 @@ export const updateTeamMeeting = (data: TeamMeetingForm) => { * @param id */ export const delTeamMeeting = (id: string | number | Array) => { - return request({ - url: '/safety/teamMeeting/' + id, - method: 'delete' + return request1({ + url: '/zm/api/wxApplet/wxApplet/sysProjectTeamSquad/delete', + method: 'delete', + data: { + ids: id + } }); }; // 查询项目班组下的成员列表 diff --git a/src/api/safety/violationLevel/index.ts b/src/api/safety/violationLevel/index.ts index 1085314..7b2d4dd 100644 --- a/src/api/safety/violationLevel/index.ts +++ b/src/api/safety/violationLevel/index.ts @@ -1,3 +1,4 @@ +import request1 from '@/utils/request-go'; import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { ViolationLevelVO, ViolationLevelForm, ViolationLevelQuery } from '@/api/safety/violationLevel/types'; @@ -9,8 +10,8 @@ import { ViolationLevelVO, ViolationLevelForm, ViolationLevelQuery } from '@/api */ export const listViolationLevel = (query?: ViolationLevelQuery): AxiosPromise => { - return request({ - url: '/safety/violationLevel/list', + return request1({ + url: '/zm/api/v1/system/busViolationLevel/list', method: 'get', params: query }); @@ -21,8 +22,8 @@ export const listViolationLevel = (query?: ViolationLevelQuery): AxiosPromise => { - return request({ - url: '/safety/violationLevel/' + id, + return request1({ + url: '/zm/api/v1/system/busViolationLevel/get?id=' + id, method: 'get' }); }; @@ -32,8 +33,8 @@ export const getViolationLevel = (id: string | number): AxiosPromise { - return request({ - url: '/safety/violationLevel', + return request1({ + url: '/zm/api/v1/system/busViolationLevel/add', method: 'post', data: data }); @@ -44,8 +45,8 @@ export const addViolationLevel = (data: ViolationLevelForm) => { * @param data */ export const updateViolationLevel = (data: ViolationLevelForm) => { - return request({ - url: '/safety/violationLevel', + return request1({ + url: '/zm/api/v1/system/busViolationLevel/edit', method: 'put', data: data }); @@ -56,8 +57,9 @@ export const updateViolationLevel = (data: ViolationLevelForm) => { * @param id */ export const delViolationLevel = (id: string | number | Array) => { - return request({ - url: '/safety/violationLevel/' + id, - method: 'delete' + return request1({ + url: '/zm/api/v1/system/busViolationLevel/delete', + method: 'delete', + data: { ids: id } }); }; diff --git a/src/api/safety/violationRecord/index.ts b/src/api/safety/violationRecord/index.ts index 81d44e3..0d5080e 100644 --- a/src/api/safety/violationRecord/index.ts +++ b/src/api/safety/violationRecord/index.ts @@ -1,4 +1,5 @@ import request from '@/utils/request'; +import request1 from '@/utils/request-go'; import { AxiosPromise } from 'axios'; import { ViolationRecordVO, ViolationRecordForm, ViolationRecordQuery } from '@/api/safety/violationRecord/types'; @@ -9,8 +10,8 @@ import { ViolationRecordVO, ViolationRecordForm, ViolationRecordQuery } from '@/ */ export const listViolationRecord = (query?: ViolationRecordQuery): AxiosPromise => { - return request({ - url: '/safety/violationRecord/list', + return request1({ + url: '/zm/api/v1/system/busViolationRecord/list', method: 'get', params: query }); @@ -20,9 +21,9 @@ export const listViolationRecord = (query?: ViolationRecordQuery): AxiosPromise< * 查询违规记录详细 * @param id */ -export const getViolationRecord = (id: string | number): AxiosPromise => { - return request({ - url: '/safety/violationRecord/' + id, +export const getViolationRecord = (id: string): AxiosPromise => { + return request1({ + url: '/zm/api/v1/system/busViolationRecord/get?id=' + id, method: 'get' }); }; @@ -32,8 +33,8 @@ export const getViolationRecord = (id: string | number): AxiosPromise { - return request({ - url: '/safety/violationRecord/handler', + return request1({ + url: '/zm/api/v1/system/busViolationRecord/selectTheViolator', method: 'post', data: data }); @@ -56,28 +57,17 @@ export const updateViolationRecord = (data: ViolationRecordForm) => { * @param id */ export const delViolationRecord = (id: string | number | Array) => { - return request({ - url: '/safety/violationRecord/' + id, - method: 'delete' + return request1({ + url: '/zm/api/v1/system/busViolationRecord/delete', + method: 'delete', + data: { ids: id } }); }; -/** - * 新增违规记录复查 - */ -export const addSafetyInspectionReview = (data: any) => { - return request({ - url: '/safety/violationRecord/review', - method: 'post', - data: data - }); -} -/** - * 新增违规记录整改 - */ -export const addSafetyInspectionRectification = (data: any) => { - return request({ - url: '/safety/violationRecord/rectification', - method: 'post', - data: data + +export function listBusConstructionUser(query: object) { + return request1({ + url: '/zm/api/v1/system/busConstructionUser/list', + method: 'get', + params: query }); } diff --git a/src/api/system/landTransfer/enterRoad/index.ts b/src/api/system/landTransfer/enterRoad/index.ts index a575127..22bf2f1 100644 --- a/src/api/system/landTransfer/enterRoad/index.ts +++ b/src/api/system/landTransfer/enterRoad/index.ts @@ -69,4 +69,4 @@ export const importEnterRoad = (projectId: any, data: any) => { method: 'post', data: data }); -}; \ No newline at end of file +}; diff --git a/src/api/system/landTransfer/landBlock/index.ts b/src/api/system/landTransfer/landBlock/index.ts index 06e3aad..3f070c0 100644 --- a/src/api/system/landTransfer/landBlock/index.ts +++ b/src/api/system/landTransfer/landBlock/index.ts @@ -78,9 +78,9 @@ export const delLandBlock = (id: string | number | Array) => { }; // 地块信息导入 -export const importLandBlock = (projectId:any,data: any) => { +export const importLandBlock = (projectId: any, data: any) => { return request({ - url: '/land/landBlock/upload/'+projectId, + url: '/land/landBlock/upload/' + projectId, method: 'post', data: data }); diff --git a/src/api/system/post/index.ts b/src/api/system/post/index.ts index 9f028ab..78f0519 100644 --- a/src/api/system/post/index.ts +++ b/src/api/system/post/index.ts @@ -1,6 +1,7 @@ import request from '@/utils/request'; import { PostForm, PostQuery, PostVO } from './types'; import { AxiosPromise } from 'axios'; +import requestGo from '@/utils/request-go'; // 查询岗位列表 export function listPost(query: { pageNum: number; pageSize: number }): AxiosPromise { @@ -13,8 +14,8 @@ export function listPost(query: { pageNum: number; pageSize: number }): AxiosPro // 查询岗位列表 export function listTreeByProject(): AxiosPromise { - return request({ - url: '/system/dept/list/tree', + return requestGo({ + url: '/zm/api/v1/system/post/list?pageNum=1&pageSize=100', method: 'get' }); } diff --git a/src/api/types.ts b/src/api/types.ts index 59f7850..affa38c 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -67,6 +67,7 @@ export interface UserProject { projectId: string; projectName: string; shortName: string; + goId: string; } export interface IdAndNameVO { diff --git a/src/assets/icons/file.png b/src/assets/icons/file.png new file mode 100644 index 0000000..cf70ecf Binary files /dev/null and b/src/assets/icons/file.png differ diff --git a/src/assets/icons/file1.png b/src/assets/icons/file1.png new file mode 100644 index 0000000..eb8ff97 Binary files /dev/null and b/src/assets/icons/file1.png differ diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index dca5657..779f01d 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -59,7 +59,7 @@ {{ getFileName(file.name) }} -
+
删除
@@ -70,7 +70,7 @@ - @@ -125,6 +125,8 @@ const props = defineProps({ autoUpload: propTypes.bool.def(true), // 是否显示文件列表 showFileList: propTypes.bool.def(false), + // 上传类型 + isGo: propTypes.bool.def(false), // 默认显示的文件列表 defaultFileList: { type: Array as any, @@ -156,9 +158,12 @@ const emit = defineEmits(['update:modelValue', 'handleChange', 'handleRemove']); const number = ref(0); const uploadList = ref([]); -const baseUrl = import.meta.env.VITE_APP_BASE_API; +const baseUrl = props.isGo ? import.meta.env.VITE_APP_BASE_API_GO : import.meta.env.VITE_APP_BASE_API; const uploadFileUrl = ref(baseUrl + props.uploadUrl); // 上传文件服务器地址 -const headers = ref(globalHeaders()); +const headers = ref({ + ...globalHeaders(), + 'Authorization': props.isGo ? `Bearer ${proxy.$cache.local.get('goToken') || ''}` : `Bearer ${proxy.$cache.local.get('Admin-Token') || ''}` +}); const pendingFiles = ref([]); const realUploadUrl = computed(() => { @@ -221,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; @@ -261,7 +271,7 @@ interface UploadFileWithOssId extends UploadFile { } const handleUploadSuccess = (res: any, file: UploadFileWithOssId) => { - if (res.code === 200) { + if (res.code === 200 || res.code === 0) { console.log('上传成功'); // 上传成功,不管 data 是否为空 uploadList.value.push({ @@ -271,6 +281,9 @@ const handleUploadSuccess = (res: any, file: UploadFileWithOssId) => { }); } else { console.log('失败', res); + if (props.isGo) { + fileList.value = []; + } number.value--; proxy?.$modal.closeLoading(); @@ -322,12 +335,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)); } @@ -484,7 +500,7 @@ defineExpose({ submitUpload }); } } -.upload-file-list .ele-upload-list__item-content { +.upload-file-list .upload-list__item-content { display: flex; justify-content: space-between; align-items: center; @@ -509,7 +525,7 @@ defineExpose({ submitUpload }); z-index: 1; } -.ele-upload-list__item-content-action .el-link { +.upload-list__item-content-action .el-link { margin-right: 10px; } diff --git a/src/components/ImageUpload/index.vue b/src/components/ImageUpload/index.vue index d20d762..ef092ef 100644 --- a/src/components/ImageUpload/index.vue +++ b/src/components/ImageUpload/index.vue @@ -64,6 +64,15 @@ const props = defineProps({ type: Boolean, default: true }, + isGo: { + type: Boolean, + default: false + }, + // 图片上传路径 + action: { + type: String, + default: '' + }, // 是否支持压缩,默认否 compressSupport: { type: Boolean, @@ -84,8 +93,10 @@ 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')); // 上传的图片服务器地址 +console.log('🚀 ~ uploadImgUrl:', uploadImgUrl.value, baseUrl, props.action); + const headers = ref(globalHeaders()); const fileList = ref([]); diff --git a/src/components/ProjectSelector/index.vue b/src/components/ProjectSelector/index.vue index 1259482..e7c49d7 100644 --- a/src/components/ProjectSelector/index.vue +++ b/src/components/ProjectSelector/index.vue @@ -50,6 +50,7 @@ const handleSelect = async (projectId: string) => { const userStore = useUserStore(); const permissionStore = usePermissionStore(); const selectedProject = projects.value.find((p) => p.id === projectId); + console.log('🚀 ~ handleSelect ~ selectedProject:', selectedProject); if (!selectedProject) return; const loadingInstance = ElLoading.service({ lock: true, diff --git a/src/components/bigUploader/index.vue b/src/components/bigUploader/index.vue new file mode 100644 index 0000000..45606d6 --- /dev/null +++ b/src/components/bigUploader/index.vue @@ -0,0 +1,427 @@ + + + + + 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/main.ts b/src/main.ts index 8197ba2..94ff1c3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -55,12 +55,14 @@ setLocal('host', '121.37.237.116'); setLocal('rtmpPort', '28451'); setLocal('rtcPort', '28453'); setLocal('dockSocketUrl', 'ws://58.17.134.85:9512/websocket'); +window['$HOSTSRC'] = 'ws://58.17.134.85:8920/ws'; // 修改 el-dialog 默认点击遮照为不关闭 /*import { ElDialog } from 'element-plus'; ElDialog.props.closeOnClickModal.default = false;*/ // **main.js** import { vue3ScrollSeamless } from 'vue3-scroll-seamless'; +import uploader from 'vue-simple-uploader'; import bus from './utils/bus'; import $message from '@/plugins/modal'; @@ -74,6 +76,8 @@ app.use(print); app.use(i18n); app.use(VXETable); app.use(plugins); +app.use(uploader); + app.use(bus); app.component('vue3ScrollSeamless', vue3ScrollSeamless); // 自定义指令 diff --git a/src/store/modules/permission.ts b/src/store/modules/permission.ts index 7efcf2d..4678281 100644 --- a/src/store/modules/permission.ts +++ b/src/store/modules/permission.ts @@ -45,7 +45,9 @@ export const usePermissionStore = defineStore('permission', () => { sidebarRouters.value = routes; }; const generateRoutes = async (): Promise => { - const res = await getRouters(useUserStoreHook().selectedProject?.id || '0'); + const id = useUserStoreHook().selectedProject ? useUserStoreHook().selectedProject.id : '0'; + console.log('🚀 ~ generateRoutes ~ useUserStoreHook().selectedProject?.id:', id); + const res = await getRouters(id); const { data } = res; const sdata = JSON.parse(JSON.stringify(data)); const rdata = JSON.parse(JSON.stringify(data)); diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index e04a9f5..00081bc 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -44,9 +44,9 @@ export const useUserStore = defineStore('user', () => { const permissionList = ref>([]); // 用户所有权限列表 const roleList = ref>([]); // 用户所有角色列表 - const projects = ref>([]); + const projects = ref>([]); // 从localStorage获取缓存的项目,如果没有则默认为null - const selectedProject = ref<{ id: string; name: string } | null>(getSelectedProjectFromStorage()); + const selectedProject = ref<{ id: string; name: string; goId: string } | null>(getSelectedProjectFromStorage()); const ProjectTeamList = ref(getProjectTeamListFromStorage()); /** @@ -72,7 +72,8 @@ export const useUserStore = defineStore('user', () => { if (projectRes?.data) { const projectList = projectRes.data.map((p) => ({ id: p.projectId, - name: p.projectName || '未知项目' + name: p.projectName || '未知项目', + goId: p.goId })); setProjects(projectList); // 如果有缓存的选中项目,且该项目在当前项目列表中存在,则使用缓存的项目 @@ -144,6 +145,7 @@ export const useUserStore = defineStore('user', () => { roles.value = []; permissions.value = []; removeToken(); + $cache.local.remove('goToken'); // 清除Go服务Token缓存 // 清除项目缓存 $cache.local.remove('selectedProject'); $cache.local.remove('ProjectTeamList'); @@ -153,11 +155,12 @@ export const useUserStore = defineStore('user', () => { avatar.value = value; }; - const setProjects = (projectList: Array<{ id: string; name: string }>) => { + const setProjects = (projectList: Array<{ id: string; name: string; goId: string }>) => { projects.value = projectList; }; - const setSelectedProject = (project: { id: string; name: string }) => { + const setSelectedProject = (project: { id: string; name: string; goId: string }) => { + console.log('🚀 ~ setSelectedProject ~ project:', project); selectedProject.value = project; saveSelectedProjectToStorage(project); }; diff --git a/src/utils/auth.ts b/src/utils/auth.ts index 0b21b0b..33152c7 100644 --- a/src/utils/auth.ts +++ b/src/utils/auth.ts @@ -10,6 +10,10 @@ export const setToken = (access_token: string) => (tokenStorage.value = access_t export const removeToken = () => (tokenStorage.value = null); +export const getGoToken = () => { + return getLocal('goToken'); +}; + export const getDockSocketUrl = () => { return getLocal('dockSocketUrl'); }; diff --git a/src/utils/exportDataToExcel.js b/src/utils/exportDataToExcel.js new file mode 100644 index 0000000..50ae697 --- /dev/null +++ b/src/utils/exportDataToExcel.js @@ -0,0 +1,146 @@ +// 封装exceljs +import ExcelJS from 'exceljs'; +import FileSaver from 'file-saver'; +/** + * 导出数据到Excel方法 + * @param {Array[Object]} config.data 表格数据 + * @param {Array[String]} config.fields 字段列表 + * @param {Array[String]} config.headers excel表头列表[[]],可以是多级表头[['A1','B1'],['A2','B2']] + * @param {Array[Object]} config.merges 需要合并的单元格,需要考虑表头的行数[{row:1, col:1, rowspan: 1, colspan: 2}] + * @param {Array[Object]} config.attrs 单元格样式配置 + * @param {Array[Object]} config.views 工作表视图配置 + * @param {Array[Number]} config.columnsWidth 每个字段列对应的宽度 + * @param {Object} config.protect 工作表保护【此配置会保护全表,一般推荐只针对单元格进行保护配置】 + * @param {String} config.sheetName 工作表名称,默认从sheet1开始 + * @param {String} fileName excel文件名称 + */ +export function exportDataToExcel(config, fileName) { + if (!config) return; + const options = { + fileName: fileName || `导出excel文件【${Date.now()}】.xlsx`, + worksheets: [], + }; + if (!Array.isArray(config)) { + config = [config]; + } + config.forEach((item) => { + // 深拷贝data【JSON.stringify有缺陷,可自行换成_.cloneDeep】 + const data = JSON.parse(JSON.stringify(item.data)); + const results = data.map((obj) => { + return item.fields.map((key) => { + return obj[key]; + }); + }); + // 生成完整excel数据 + let excelData = []; + excelData = excelData.concat(item.headers).concat(results); + // 单元格合并处理【excel数据的第一行/列是从1开始】 + let excelMerges = []; + excelMerges = item.merges.map((m) => { + return [m.row + 1, m.col + 1, m.row + m.rowspan, m.col + m.colspan]; + }); + // 单元格配置处理【excel数据的第一行/列是从1开始】 + let excelAttrs = []; + excelAttrs = item.attrs.map((attr) => { + attr.rowStart += 1; + attr.rowEnd += 1; + attr.colStart += 1; + attr.colEnd += 1; + return attr; + }); + options.worksheets.push({ + data: excelData, + merges: excelMerges, + attrs: excelAttrs, + views: item.views, + columnsWidth: item.columnsWidth, + protect: item.protect, + sheetName: item.sheetName, + }); + }); + createExcel(options); +} +// 创建Excel文件方法 +async function createExcel(options) { + if (!options.worksheets.length) return; + // 创建工作簿 + const workbook = new ExcelJS.Workbook(); + for (let i = 0; i < options.worksheets.length; i++) { + const sheetOption = options.worksheets[i]; + // 创建工作表 + const sheet = workbook.addWorksheet(sheetOption.sheetName || 'sheet' + (i + 1)); + // 添加数据行 + sheet.addRows(sheetOption.data); + // 配置视图 + sheet.views = sheetOption.views; + // 单元格合并处理【开始行,开始列,结束行,结束列】 + if (sheetOption.merges) { + sheetOption.merges.forEach((item) => { + sheet.mergeCells(item); + }); + } + // 工作表保护 + if (sheetOption.protect) { + const res = await sheet.protect(sheetOption.protect.password, sheetOption.protect.options); + } + // 单元格样式处理 + if (sheetOption.attrs.length) { + sheetOption.attrs.forEach((item) => { + const attr = item.attr || {}; + // 获取开始行-结束行; 开始列-结束列 + const rowStart = item.rowStart; + const rowEnd = item.rowEnd; + const colStart = item.colStart; + const colEnd = item.colEnd; + if (rowStart) { + // 设置行 + for (let r = rowStart; r <= rowEnd; r++) { + // 获取当前行 + const row = sheet.getRow(r); + if (colStart) { + // 列设置 + for (let c = colStart; c <= colEnd; c++) { + // 获取当前单元格 + const cell = row.getCell(c); + Object.keys(attr).forEach((key) => { + // 给当前单元格设置定义的样式 + cell[key] = attr[key]; + }); + } + } else { + // 未设置列,整行设置【大纲级别】 + Object.keys(attr).forEach((key) => { + row[key] = attr[key]; + }); + } + } + } else if (colStart) { + // 未设置行,只设置了列 + for (let c = colStart; c <= colEnd; c++) { + // 获取当前列,整列设置【大纲级别】 + const column = sheet.getColumn(c); + Object.keys(attr).forEach((key) => { + column[key] = attr[key]; + }); + } + } else { + // 没有设置具体的行列,则为整表设置 + Object.keys(attr).forEach((key) => { + sheet[key] = attr[key]; + }); + } + }); + } + // 列宽设置 + if (sheetOption.columnsWidth) { + for (let i = 0; i < sheet.columns.length; i++) { + sheet.columns[i].width = sheetOption.columnsWidth[i]; + } + } + } + // 生成excel文件 + workbook.xlsx.writeBuffer().then((buffer) => { + // application/octet-stream 二进制数据 + FileSaver.saveAs(new Blob([buffer], { type: 'application/octet-stream' }), options.fileName); + }); +} diff --git a/src/utils/exportExcel.ts b/src/utils/exportExcel.ts new file mode 100644 index 0000000..ecd7a74 --- /dev/null +++ b/src/utils/exportExcel.ts @@ -0,0 +1,212 @@ +import { exportSalary } from '@/api/project/projectTeam'; +import { exportDataToExcel } from '@/utils/exportDataToExcel.js'; + +export function useExcelExport() { + // 数据整合函数 + const exportConfig = (obj, proxy, times) => { + // 如果导出前要处理数据,需要深克隆一份表格数据,然后进行处理 + let time = proxy.parseTime(new Date(times), '{y}年{m}月'); // 当前年月 + let header1 = ['建筑施工企业现场人员考勤表(' + time + ')']; + let projectName = '项目部名称:' + obj.projectName; + let teamName = '班组类别:' + obj.teamName; + let header2 = []; + let header3 = [projectName + ' ' + teamName]; + const header = ['序号', '姓名/日期', '身份证号']; + let columnsWidth = [6, 10, 26]; // 表格宽度 + let obj1 = { index: '', name: '', identity_card: '' }; + let fields = ['index', 'row', 'identity_card']; + + // 计算当前月天数 + let years = times.split('-')[0]; + let month = times.split('-')[1]; + let listLength = new Date(years, month, 0).getDate(); + + for (let index = 0; index < listLength; index++) { + obj1['day' + index] = ''; + fields.push('day' + index); + header.push(index + 1); + columnsWidth.push(4); + } + + header.push('合计'); + fields.push('sum'); + header.push('是否离场'); + fields.push('type'); + header.push('签字'); + fields.push('sign'); + + // 上方共用 + let data = []; + if (!(obj.team && obj.team.length)) return; + + obj.team.forEach((item, index) => { + let obj = { row: '', index: '', identity_card: '' }; + + for (let key in item.attendance) { + let j = parseInt(key.split('-')[2]) - 1; + obj['day' + j] = item.attendance[key]; + } + + obj.row = item.row; + obj.index = index + 1; + obj.identity_card = item.identity_card; + + let start = ''; // 从表格那一列哪一行开始 + let end = ''; // 从表格那一列哪一行结束 + let cols = 5 + index; // 行数 + start = 'D' + cols; + + // 判断当月天数 获取表格中最后一天的列标识 + if (listLength == 28) { + end = 'AE' + cols; + } else if (listLength == 29) { + end = 'AF' + cols; + } else if (listLength == 30) { + end = 'AG' + cols; + } else { + end = 'AH' + cols; + } + + obj.sum = { formula: 'SUM(' + start + ':' + end + ')', result: 0 }; + obj.sign = ''; + obj.type = item.type ? '离场' : '未离场'; + data.push(obj); + }); + + const merges = [ + // 单元格合并 + { row: 0, col: 0, rowspan: 1, colspan: listLength + 5 }, + { row: 2, col: 0, rowspan: 1, colspan: listLength + 5 }, + { row: obj.team.length + 5, col: 0, rowspan: 1, colspan: 3 }, + { row: obj.team.length + 5, col: 3, rowspan: 1, colspan: 10 }, + { row: obj.team.length + 5, col: 13, rowspan: 1, colspan: 10 }, + { row: obj.team.length + 5, col: 23, rowspan: 1, colspan: 10 } + ]; + + data.push({}); + // 表格尾部标题 + data.push({ + index: '制表人:', + day0: '班组负责人', + day10: '项目负责人', + day20: '制表日期' + }); + data.push({ + index: '注:', + row: '1、本考勤表必须按照每日实际工时进行填写;' + }); + data.push({ + row: '2、本考勤表作为工资计发的重要依据。' + }); + + const config = { + data, + fields, + headers: [header1, header2, header3, header], + merges, + attrs: [], + view: [], + columnsWidth, + sheetName: obj.teamName + }; + + // 设置全表单元格边框,居中布局 + config.attrs.push({ + rowStart: 3, + rowEnd: config.data.length - 1, + colStart: 0, + colEnd: config.fields.length - 1, + attr: { + alignment: { vertical: 'middle', horizontal: 'center' }, + border: { + top: { style: 'thin' }, + left: { style: 'thin' }, + bottom: { style: 'thin' }, + right: { style: 'thin' } + } + } + }); + + // 设置表头字体加粗 + config.attrs.push({ + rowStart: 0, + rowEnd: 0, + colStart: 0, + colEnd: config.fields.length - 1, + attr: { + alignment: { vertical: 'middle', horizontal: 'center' }, + font: { + bold: true, + size: '16' + } + } + }); + + config.attrs.push({ + rowStart: 2, + rowEnd: 2, + colStart: 0, + colEnd: config.fields.length - 1, + attr: { + alignment: { vertical: 'middle', horizontal: 'center' } + } + }); + + return config; + }; + + // 导出函数 + const exportExcel = async (obj, proxy, name = undefined) => { + try { + const res = await exportSalary(obj); + + if (res.code === 0 && res.data.AttendanceAllOne) { + let config = []; + let AttendanceAllOne = res.data.AttendanceAllOne; + + // 处理每个表格 + AttendanceAllOne.forEach((item) => { + let datas = exportConfig(item, proxy, obj.years); + if (datas) { + config.push(datas); + } + }); + + // 获取项目名 + let projectName = ''; + if (name) { + projectName = res.data.AttendanceAllOne[0].projectName + '-' + name; + } else { + projectName = res.data.AttendanceAllOne[0].projectName; + } + + let year = obj.years.split('-')[0]; + let month = obj.years.split('-')[1]; + + // 导出Excel + exportDataToExcel(config, `${projectName}-${year}年${month}月考勤表.xlsx`); + } else if (res.code === 0) { + ElMessage({ + message: '暂无考勤数据', + type: 'warning' + }); + } else { + ElMessage({ + message: res.message || '导出失败', + type: 'error' + }); + } + } catch (error) { + ElMessage({ + message: '导出过程出错', + type: 'error' + }); + console.error('Excel导出错误:', error); + } + }; + + return { + exportConfig, + exportExcel + }; +} diff --git a/src/utils/projectTeam.ts b/src/utils/projectTeam.ts index c0c8d23..37cf7fb 100644 --- a/src/utils/projectTeam.ts +++ b/src/utils/projectTeam.ts @@ -7,18 +7,18 @@ export const getProjectTeam = async () => { const isPermission = useUserStore().permissions.some((item) => item == 'project:team:list'); if (!isPermission && useUserStore().permissions[0] != '*:*:*') return; - const { id } = $cache.local.getJSON('selectedProject'); + const { goId } = $cache.local.getJSON('selectedProject'); const res = await listProjectTeam({ pageNum: 1, pageSize: 20, orderByColumn: 'createTime', isAsc: 'desc', - projectId: id + projectId: goId }); - const list = res.rows.map((projectTeam: ProjectTeamVO) => ({ + const list = res.data.list.map((projectTeam: ProjectTeamVO) => ({ value: projectTeam.id, - label: projectTeam.teamName + label: projectTeam.name })); $cache.local.setJSON('ProjectTeamList', list); }; diff --git a/src/utils/request-go.ts b/src/utils/request-go.ts new file mode 100644 index 0000000..2eeaa5a --- /dev/null +++ b/src/utils/request-go.ts @@ -0,0 +1,271 @@ +import $cache from '@/plugins/cache'; +import useUserStore from '@/store/modules/user'; +import request from '@/utils/request'; +import axios from 'axios'; +import sign from '@/utils/sign.js'; +import CryptoJS from 'crypto-js'; +/** + * 包装 request 请求,统一使用 Go 服务地址作为 baseURL + * @param config 原始请求配置 + */ + +const BASE_GO_URL = import.meta.env.VITE_APP_BASE_API_GO; + +interface RequestGo extends Function { + (config: any): Promise; + download?: (url: string, params: any, filename: string) => void; +} + +// 加密密钥 +const corySecretKey = 'happyCoryOrTieHanHan202410151415'; + +// 配置新建一个 axios 实例 +const service = axios.create({ + baseURL: BASE_GO_URL as any, + timeout: 120000, + headers: { 'Content-Type': 'application/json' } +}); + +// 不需要修改项目id的接口数组 +const whiteUrl = [ + '/api/wxApplet/wxApplet/sysProjectTeam/list', + '/api/wxApplet/wxApplet/sysProjectTeam/add', + '/api/wxApplet/wxApplet/sysProjectTeam/edit', + '/api/v1/test/testFollowInfo/add', + '/api/wxApplet/wxApplet/busConstructionUser/changePay', + // 获取项目资料文件夹 + '/api/v1/system/documentData/treeStructureData', + '/api/v1/system/busConstructionUser/exportSalary', + '/api/v1/system/busSalaryDetails/list', + '/api/v1/system/ys7Devices/add', + '/api/v1/system/ys7Devices/edit', + '/api/v1/system/subProject/add', + '/api/v1/system/subProject/edit', + '/api/v1/system/subProject/list', + '/api/v1/system/workStatus/getTree', + '/api/v1/system/sysProjectIntroduce/list', + '/api/v1/system/sysProjectIntroduce/add', + '/api/v1/system/sysProjectIntroduce/edit', + '/video/hat/manage/api/v1/video/device/list', + '/video/hat/manage/api/v1/video/project/bind', + '/api/v1/system/notifications/publish', + '/api/v1/system/notifications/list', + '/api/v1/system/notifications/edit', + '/webodm/api/v1/taskCreate', + '/webodm/api/v1/taskProcess', + '/webodm/api/v1/download', + '/api/v1/system/manageTaskRecord/upDataResource', + '/api/v1/system/ys7Devices/list', + '/api/v1/system/busFolderFile/add', + '/api/v1/system/manageTaskRecordResource/voluntarilyReq', + '/api/v1/system/busAttendanceMachine/edit', + '/api/v1/system/qianqiFangzhen/add', + '/api/v1/system/qianqiNibianqi/add' +]; + +const exceptionStr = '/api/v1/test/'; // /api/v1/test/*接口拦截 + +// 添加请求拦截器 +service.interceptors.request.use( + (config: any) => { + // 在发送请求之前做些什么 token + const token = $cache.local.get('goToken'); + if (token) { + config.headers = config.headers || {}; + (config.headers as any)['Authorization'] = `Bearer ${token}`; + } + + const stores = useUserStore(); + if (!whiteUrl.includes(config.url) && !config.url.includes(exceptionStr)) { + if (config.params && Reflect.has(config.params, 'projectId')) { + config.params.projectId = stores.selectedProject.goId; + } + // 处理FormData中的projectId + if (config.data instanceof FormData && config.data.has('projectId')) { + config.data.set('projectId', stores.selectedProject.goId); + } + } + let dataInfoReq = {}; + if (config.method === 'get' || config.method === 'delete') { + config.params = config.params || {}; + dataInfoReq = JSON.parse(JSON.stringify(config.params)); + const encryptedParam = encryptAES256(JSON.stringify(dataInfoReq), corySecretKey); + if ($cache.local.get('i18n') != null) { + config.params = { coryKey: encryptedParam, corySimplifiedToTraditional: $cache.local.get('i18n') }; + } else { + config.params = { coryKey: encryptedParam }; + } + } else { + // 处理FormData类型 + if (config.data instanceof FormData) { + // 将FormData转换为普通对象 + dataInfoReq = Object.fromEntries(config.data.entries()); + // 重新创建一个新的FormData实例 + const newFormData = new FormData(); + const encryptedData = encryptAES256(JSON.stringify(dataInfoReq), corySecretKey); + + newFormData.append('coryKey', encryptedData); + if ($cache.local.get('i18n') != null) { + newFormData.append('corySimplifiedToTraditional', $cache.local.get('i18n')); + } + + // 如果有文件,需要重新添加 + for (let [key, value] of config.data.entries()) { + if (value instanceof File) { + newFormData.append(key, value); + } + } + + config.data = newFormData; + // 设置Content-Type为undefined,让浏览器自动设置boundary + config.headers['Content-Type'] = undefined; + } else { + dataInfoReq = config.data; + const encryptedData = encryptAES256(JSON.stringify(dataInfoReq), corySecretKey); + if ($cache.local.get('i18n') != null) { + config.data = { coryKey: encryptedData, corySimplifiedToTraditional: $cache.local.get('i18n') }; + } else { + config.data = { coryKey: encryptedData }; + } + } + } + + const { timestamp, nonce, sign: signature } = sign(dataInfoReq); + config.headers.timestamp = timestamp; + config.headers.nonce = nonce; + config.headers.sign = signature; + + return config; + }, + (error) => { + // 对请求错误做些什么 + return Promise.reject(error); + } +); +// 添加响应拦截器 +service.interceptors.response.use( + (response) => { + // 对响应数据进行解密操作 + try { + // 处理特殊情况:data为空值或不需要解密的情况 + if (response.data.data === null || response.data.data === '' || response.data.data === undefined) { + return response.data; + } + + // 检查响应数据格式 + if (typeof response.data.data !== 'string') { + // 尝试将非字符串数据转换为字符串 + try { + response.data.data = JSON.stringify(response.data.data); + } catch (convertError) { + throw new Error('响应数据格式不正确,无法转换为字符串'); + } + } + // 执行解密 + const decryptedData = decryptAES256(response.data.data, corySecretKey); + // 正确处理解密后的数据 + if (decryptedData && typeof decryptedData === 'object') { + // 保持response.data的结构不变,只替换data字段的内容 + response.data = { + ...response.data, + data: decryptedData + }; + } else { + // 如果解密后的数据不是对象,可能需要特殊处理 + response.data.data = decryptedData; + } + if (response.data.code !== 0) { + ElMessage.error(response.data.message); + } + return response.data; + } catch (decryptError) { + // 提供更友好的错误信息 + if (decryptError.message.includes('无效的Base64格式')) { + ElMessage.error('数据格式错误:接收到无效的加密数据'); + } else { + ElMessage.error('数据解密失败,请联系管理员'); + } + + return Promise.reject(decryptError); + } + }, + (error) => { + // 对响应错误做点什么 + if (error.message.indexOf('timeout') !== -1) { + ElMessage.error('网络超时'); + } else if (error.message === 'Network Error') { + ElMessage.error('网络连接错误'); + } else { + console.log(error, '网络错误'); + + if (error.response.data) ElMessage.error(error.response.statusText); + else { + ElMessage.error('接口路径找不到'); + console.log(error, '接口路径找不到'); + } + } + return Promise.reject(error); + } +); + +// 加密函数 +function encryptAES256(plainText: string, key: string): string | null { + try { + const parsedKey = CryptoJS.enc.Utf8.parse(key); + const iv = CryptoJS.lib.WordArray.random(16); + const plainTextWordArray = CryptoJS.enc.Utf8.parse(plainText); + const encrypted = CryptoJS.AES.encrypt(plainTextWordArray, parsedKey, { + iv: iv, + mode: CryptoJS.mode.CBC, + padding: CryptoJS.pad.Pkcs7 + }); + const encryptedData = iv.concat(encrypted.ciphertext); + return encryptedData.toString(CryptoJS.enc.Base64); + } catch (err) { + console.error('Encryption error:', err.message); + return null; + } +} + +// 增强的解密函数,处理各种输入情况 +function decryptAES256(encryptedData: string, key: string): any { + // eslint-disable-next-line no-useless-catch + try { + // 检查输入是否为有效的Base64字符串 + if (!/^[A-Za-z0-9+/=]+$/.test(encryptedData)) { + // 尝试对非标准Base64字符串进行处理 + // 移除可能的前缀 + const cleanData = encryptedData.replace(/^data:.*?;base64,/, '').replace(/\s/g, ''); // 移除空格 + + if (!/^[A-Za-z0-9+/=]+$/.test(cleanData)) { + throw new Error('无效的Base64格式'); + } + + return decryptAES256(cleanData, key); + } + + const decodedData = CryptoJS.enc.Base64.parse(encryptedData); + const iv = CryptoJS.lib.WordArray.create(decodedData.words.slice(0, 4)); + const encryptedText = CryptoJS.lib.WordArray.create(decodedData.words.slice(4)); + const parsedKey = CryptoJS.enc.Utf8.parse(key); + + const decrypted = CryptoJS.AES.decrypt({ ciphertext: encryptedText }, parsedKey, { + iv: iv, + mode: CryptoJS.mode.CBC, + padding: CryptoJS.pad.Pkcs7 + }); + + const decryptedStr = decrypted.toString(CryptoJS.enc.Utf8); + + // 尝试解析为JSON + try { + return JSON.parse(decryptedStr); + } catch (jsonError) { + return decryptedStr; + } + } catch (err) { + throw err; + } +} +// 导出 axios 实例 +export default service; diff --git a/src/utils/request.ts b/src/utils/request.ts index 66780df..20b51ac 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -45,7 +45,7 @@ service.interceptors.request.use( // 是否需要加密 const isEncrypt = config.headers?.isEncrypt === 'true'; - if (getToken() && !isToken) { + if (getToken() && !isToken && !config.headers?.Authorization) { config.headers['Authorization'] = 'Bearer ' + getToken(); // 让每个请求携带自定义token 请根据实际情况自行修改 } // get请求映射params参数 diff --git a/src/utils/sign.js b/src/utils/sign.js new file mode 100644 index 0000000..13df2cd --- /dev/null +++ b/src/utils/sign.js @@ -0,0 +1,50 @@ +import crypto from 'crypto-js'; +let coyr = 'coyrOrtiehanhan1223202409111457'; +// 生成 nonce(随机生成一个16位的字符串) +function generateNonce() { + const chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; + let nonce = ''; + for (let i = 0; i < 16; i++) { + nonce += chars.charAt(Math.floor(Math.random() * chars.length)); + } + return nonce; +} +// 生成当前时间戳(格式为 yyyyMMddHHmmss) +function generateTimestamp() { + return new Date().getTime(); +} +// 生成 MD5 哈希(需要引入第三方库,如 crypto-js) +function md5Hash(str) { + return crypto.MD5(str).toString(); +} + +// 生成 SHA-256 哈希(需要引入第三方库,如 crypto-js) +function sha256Hash(str) { + return crypto.SHA256(str).toString(); +} +// 生成签名 +function generateSignature(params, timestamp, nonce) { + // 加密 + let coyr1 = md5Hash(coyr); + // 拼接时间戳、nonce 和 secretKey + let signStr = coyr1 + timestamp + nonce; + // MD5 加密 + const md5Str = md5Hash(signStr); + // SHA-256 加密 + let aaaa = sha256Hash(md5Str); + return aaaa; +} +function sign(data) { + // 生成签名 + const timestamp = generateTimestamp(); + const nonce = generateNonce(); + const sign = generateSignature(data, timestamp, nonce); + return { + timestamp, + nonce, + sign, + }; +} +// 封装 + +export default sign; diff --git a/src/utils/storage.ts b/src/utils/storage.ts new file mode 100644 index 0000000..a983f80 --- /dev/null +++ b/src/utils/storage.ts @@ -0,0 +1,59 @@ +import Cookies from 'js-cookie'; + +/** + * window.localStorage 浏览器永久缓存 + * @method set 设置永久缓存 + * @method get 获取永久缓存 + * @method remove 移除永久缓存 + * @method clear 移除全部永久缓存 + */ +export const Local = { + // 设置永久缓存 + set(key: string, val: any) { + window.localStorage.setItem(key, JSON.stringify(val)); + }, + // 获取永久缓存 + get(key: string) { + let json: any = window.localStorage.getItem(key); + return JSON.parse(json); + }, + // 移除永久缓存 + remove(key: string) { + window.localStorage.removeItem(key); + }, + // 移除全部永久缓存 + clear() { + window.localStorage.clear(); + }, +}; + +/** + * window.sessionStorage 浏览器临时缓存 + * @method set 设置临时缓存 + * @method get 获取临时缓存 + * @method remove 移除临时缓存 + * @method clear 移除全部临时缓存 + */ +export const Session = { + // 设置临时缓存 + set(key: string, val: any) { + if (key === 'token') return Cookies.set(key, val); + window.sessionStorage.setItem(key, JSON.stringify(val)); + }, + // 获取临时缓存 + get(key: string) { + if (key === 'token') return Cookies.get(key); + let json: any = window.sessionStorage.getItem(key); + return JSON.parse(json); + }, + // 移除临时缓存 + remove(key: string) { + if (key === 'token') return Cookies.remove(key); + window.sessionStorage.removeItem(key); + }, + // 移除全部临时缓存 + clear() { + Cookies.remove('token'); + window.sessionStorage.clear(); + }, +}; 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/demo/components/qixiang.vue b/src/views/demo/components/qixiang.vue index 58629bb..966a713 100644 --- a/src/views/demo/components/qixiang.vue +++ b/src/views/demo/components/qixiang.vue @@ -1,224 +1,218 @@ - + diff --git a/src/views/demo3/components/line2.vue b/src/views/demo3/components/line2.vue deleted file mode 100644 index e69de29..0000000 diff --git a/src/views/design/technicalStandard/component/documentsDeails.vue b/src/views/design/technicalStandard/component/documentsDeails.vue index 99e9705..9fa82db 100644 --- a/src/views/design/technicalStandard/component/documentsDeails.vue +++ b/src/views/design/technicalStandard/component/documentsDeails.vue @@ -3,8 +3,8 @@
- - + +
diff --git a/src/views/design/technicalStandard/component/documentsEdit.vue b/src/views/design/technicalStandard/component/documentsEdit.vue index 3a0754b..d282d99 100644 --- a/src/views/design/technicalStandard/component/documentsEdit.vue +++ b/src/views/design/technicalStandard/component/documentsEdit.vue @@ -3,8 +3,8 @@
- - + +
diff --git a/src/views/enterpriseLarge/digitalizationScreen/components/leftPage.vue b/src/views/enterpriseLarge/digitalizationScreen/components/leftPage.vue index 6264c41..32112dc 100644 --- a/src/views/enterpriseLarge/digitalizationScreen/components/leftPage.vue +++ b/src/views/enterpriseLarge/digitalizationScreen/components/leftPage.vue @@ -118,21 +118,21 @@ const indicators = ref([ name: '风电项目', value: '288.88', unit: '个', - iconPath: '/src/assets/images/contract.png' + iconPath: '/assets/demo/contract.png' }, { id: '3', name: '光伏项目总容量', value: '158.88', unit: 'MW', - iconPath: '/src/assets/images/totalCapacity.png' + iconPath: '/assets/demo/totalCapacity.png' }, { id: '4', name: '风电项目总容量', value: '18', unit: 'MW', - iconPath: '/src/assets/images/todayConstruction.png' + iconPath: '/assets/demo/todayConstruction.png' } ]); diff --git a/src/views/enterpriseLarge/digitalizationScreen/components/rightPage.vue b/src/views/enterpriseLarge/digitalizationScreen/components/rightPage.vue index ad7f90b..f32bc55 100644 --- a/src/views/enterpriseLarge/digitalizationScreen/components/rightPage.vue +++ b/src/views/enterpriseLarge/digitalizationScreen/components/rightPage.vue @@ -107,6 +107,7 @@ const processedDataList = ref([]); //获取数据 const getData = async () => { const res = await projectProgress(); + console.log('🚀 ~ getData ~ res:', res); if (res.code == 200) { capacityData.value = res.data; // processedDataList.value = res.data.projectProgressDetailList; @@ -143,7 +144,7 @@ const initPieChart = () => { }; }); pieOption.series.data = data; - + console.log(data); // pieOption.graphic[0].style.text = totalPercent.value + '%'; pieChart = echarts.init(pieChartRef.value, null, { renderer: 'canvas', diff --git a/src/views/enterpriseLarge/digitalizationScreen/index.vue b/src/views/enterpriseLarge/digitalizationScreen/index.vue index fead15c..f7e3a4e 100644 --- a/src/views/enterpriseLarge/digitalizationScreen/index.vue +++ b/src/views/enterpriseLarge/digitalizationScreen/index.vue @@ -31,15 +31,15 @@ const isHideOther = ref(false); * 切换中心页面全屏 */ const handleChangePage = () => { - if (isFull.value) { - isFull.value = false; - setTimeout(() => { - isHideOther.value = false; - }, 500); - } else { - isFull.value = true; - isHideOther.value = true; - } + // if (isFull.value) { + // isFull.value = false; + // setTimeout(() => { + // isHideOther.value = false; + // }, 500); + // } else { + // isFull.value = true; + // isHideOther.value = true; + // } }; diff --git a/src/views/formalities/formalitiesAreConsolidated/index.vue b/src/views/formalities/formalitiesAreConsolidated/index.vue index 1b7bdad..952c7d8 100644 --- a/src/views/formalities/formalitiesAreConsolidated/index.vue +++ b/src/views/formalities/formalitiesAreConsolidated/index.vue @@ -95,8 +95,8 @@
- +
-
- -
03-18 15:00
-
未佩戴安全帽
+
+ +
{{ parseTime(item.createdAt, '{m}-{d} {h}:{i}') }}
+
{{ item.describe }}
- +
- + 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 @@ - diff --git a/src/views/project/reissueCard/index.vue b/src/views/project/reissueCard/index.vue index 73081b0..dc5c70d 100644 --- a/src/views/project/reissueCard/index.vue +++ b/src/views/project/reissueCard/index.vue @@ -4,30 +4,15 @@
- - - - - - - + + - - + + + - - - - - - - - - - - 搜索 重置 @@ -38,75 +23,41 @@ - + - + - + + - + + - - - - - - - - - - --> - - + + - - -
- - - 同意 - 拒绝 - - - - - -
- - -
补卡申请 @@ -173,15 +124,13 @@ diff --git a/src/views/project/salaryExcel/component/detail.vue b/src/views/project/salaryExcel/component/detail.vue new file mode 100644 index 0000000..02388d2 --- /dev/null +++ b/src/views/project/salaryExcel/component/detail.vue @@ -0,0 +1,233 @@ + + + diff --git a/src/views/project/salaryExcel/component/documentsDetail/index.vue b/src/views/project/salaryExcel/component/documentsDetail/index.vue new file mode 100644 index 0000000..3a64ee2 --- /dev/null +++ b/src/views/project/salaryExcel/component/documentsDetail/index.vue @@ -0,0 +1,190 @@ + + + diff --git a/src/views/project/salaryExcel/component/uploadSalary.vue b/src/views/project/salaryExcel/component/uploadSalary.vue new file mode 100644 index 0000000..695d8e7 --- /dev/null +++ b/src/views/project/salaryExcel/component/uploadSalary.vue @@ -0,0 +1,167 @@ + + + diff --git a/src/views/project/salaryExcel/index.vue b/src/views/project/salaryExcel/index.vue index 3bc4c76..7f784ed 100644 --- a/src/views/project/salaryExcel/index.vue +++ b/src/views/project/salaryExcel/index.vue @@ -43,23 +43,23 @@ - +
diff --git a/src/views/project/subManagementUser/component/ConstructionUserDetail.vue b/src/views/project/subManagementUser/component/ConstructionUserDetail.vue index 73907f6..596718e 100644 --- a/src/views/project/subManagementUser/component/ConstructionUserDetail.vue +++ b/src/views/project/subManagementUser/component/ConstructionUserDetail.vue @@ -6,7 +6,11 @@ - + diff --git a/src/views/project/subManagementUser/index.vue b/src/views/project/subManagementUser/index.vue index ddc5af4..aa34d46 100644 --- a/src/views/project/subManagementUser/index.vue +++ b/src/views/project/subManagementUser/index.vue @@ -517,6 +517,7 @@ const { proxy } = getCurrentInstance() as any; 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 中获取项目列表和当前选中的项目 @@ -573,7 +574,7 @@ const initFormData: ConstructionUserForm = { nickName: undefined, facePic: undefined, userName: undefined, - projectId: currentProject.value?.id, + projectId: currentProject.value.id, contractorId: undefined, teamId: undefined, status: undefined, @@ -610,7 +611,7 @@ const data = reactive>({ openid: undefined, nickName: undefined, userName: undefined, - projectId: currentProject.value?.id, + projectId: currentProject.value.id, contractorId: undefined, teamId: undefined, status: undefined, @@ -778,7 +779,7 @@ const getContractorList = async () => { const res = await listContractor({ pageNum: 1, pageSize: 20, - projectId: currentProject.value?.id + projectId: currentProject.value.id }); contractorOpt.value = res.rows.map((contractor: ContractorVO) => ({ value: contractor.id, @@ -904,7 +905,7 @@ const downloadTemplate = async () => { text: 'Loading', background: 'rgba(0, 0, 0, 0.7)' }); - const res = await dowloadConstructionUserTemplate({ projectId: currentProject.value?.id }); + const res = await dowloadConstructionUserTemplate({ projectId: currentProject.value.id }); loadingInstance.close(); }; @@ -954,7 +955,7 @@ const submitForm = () => { console.log(valid); if (valid) { buttonLoading.value = true; - form.value.projectId = currentProject.value?.id; + form.value.projectId = currentProject.value.id; if (form.value.id) { await updateConstructionUser(form.value).finally(() => (buttonLoading.value = false)); } else { @@ -975,7 +976,7 @@ const handleJoinBlacklist = async (row?: ConstructionUserVO) => { await proxy?.$modal.confirm('确认要将该员工加入黑名单吗?').finally(() => (loading.value = false)); await addConstructionBlacklist({ userId: row.id, - projectId: currentProject.value?.id + projectId: currentProject.value.id }); proxy?.$modal.msgSuccess('加入成功'); await getList(); @@ -1049,7 +1050,7 @@ const setSalary = async () => { const handlePlayCardStatus = async (e) => { playCardLoding.value = true; const clock = e ? 1 : 0; - await updateConstructionUserPlayCardStatus({ projectId: currentProject.value?.id, clock }); + await updateConstructionUserPlayCardStatus({ projectId: currentProject.value.id, clock }); proxy?.$modal.msgSuccess('修改成功'); getList(); playCardLoding.value = false; @@ -1066,7 +1067,7 @@ const handleClockStatus = async (row: ConstructionUserVO) => { //监听项目id刷新数据 const listeningProject = watch( - () => currentProject.value?.id, + () => currentProject.value.id, (nid, oid) => { queryParams.value.projectId = nid; form.value.projectId = nid; diff --git a/src/views/project/subcontract/index.vue b/src/views/project/subcontract/index.vue index 28a9c25..292ff57 100644 --- a/src/views/project/subcontract/index.vue +++ b/src/views/project/subcontract/index.vue @@ -231,7 +231,8 @@ const reset = () => { /** 搜索按钮操作 */ const handleQuery = () => { queryParams.value.pageNum = 1; - if (contractorList.value.length == 1) queryParams.value.contractorId = contractorList.value[0].id; + console.log('🚀 ~ handleQuery ~ contractorList.value:', contractorList.value); + if (contractorList.value?.length == 1) queryParams.value.contractorId = contractorList.value[0].id; getList(); }; diff --git a/src/views/project/workWage/index.vue b/src/views/project/workWage/index.vue index caecbf2..38ccf87 100644 --- a/src/views/project/workWage/index.vue +++ b/src/views/project/workWage/index.vue @@ -4,16 +4,16 @@
- - + + - + - - - - - - - + - - - - - - - - + + diff --git a/src/views/safety/safetyLog/component/SafetyLogDetailDialog.vue b/src/views/safety/safetyLog/component/SafetyLogDetailDialog.vue index 2d57f1e..3646189 100644 --- a/src/views/safety/safetyLog/component/SafetyLogDetailDialog.vue +++ b/src/views/safety/safetyLog/component/SafetyLogDetailDialog.vue @@ -2,70 +2,63 @@

安全日志

- 记录人:{{ safetyLogDetail?.creator?.name }} - 记录时间:{{ safetyLogDetail?.createTime }} + 记录人:{{ safetyLogDetail?.fill }} + 记录时间:{{ safetyLogDetail?.createdAt }} - {{ currentProject?.name }} + {{ safetyLogDetail?.projectName }} + {{ safetyLogDetail?.dateOfOccurrence }} - {{ safetyLogDetail?.dateOfOccurrence }} - - + 最高:{{ safetyLogDetail?.airTemperatureMax }}(℃) 最低:{{ safetyLogDetail?.airTemperatureMin }}(℃) - - + + {{ safetyLogDetail?.climateName }} - + {{ safetyLogDetail?.progress }} - + {{ safetyLogDetail?.jobContent }} - - {{ safetyLogDetail?.discloseCondition }} + + {{ safetyLogDetail?.discloseTheFacts }} - - {{ safetyLogDetail?.activityCondition }} + + {{ safetyLogDetail?.progressOfActivity }} - - {{ safetyLogDetail?.examineCondition }} + + {{ safetyLogDetail?.examine }} - - {{ safetyLogDetail?.implementCondition }} + + {{ safetyLogDetail?.implementation }} - - {{ safetyLogDetail?.safetyInspectionCondition }} + + {{ safetyLogDetail?.safetyInspectionSituation }} - {{ safetyLogDetail?.stoppageOrOvertime }} + {{ safetyLogDetail?.stoppageOrOvertime }} - - {{ safetyLogDetail?.otherCondition }} + + {{ safetyLogDetail?.otherRecords }} - + - - + + {{ item.name }} + - {{ safetyLogDetail?.remark }} - +
@@ -88,6 +81,8 @@ import { OssVO } from '@/api/system/oss/types'; interface Props { safetyLogId?: string | number; } +const BASE_URL = import.meta.env.VITE_APP_BASE_API_GO; +console.log('🚀 ~ BASE_URL:', BASE_URL); const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { weather_type } = toRefs(proxy?.useDict('weather_type')); @@ -105,7 +100,7 @@ const fileUrl = ref(''); const get = async () => { loading.value = true; const res = await getSafetyLog(props.safetyLogId); - if (res.data && res.code === 200) { + if (res.data && res.code === 0) { safetyLogDetail.value = res.data; if (res.data.fileId) { const fileRes = await listByIds(res.data.fileId.split(',')); diff --git a/src/views/safety/safetyLog/index.vue b/src/views/safety/safetyLog/index.vue index 97b253b..3328c84 100644 --- a/src/views/safety/safetyLog/index.vue +++ b/src/views/safety/safetyLog/index.vue @@ -1,16 +1,11 @@
- - - + + - +
- + - - + - - + + + + - - + + + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + + @@ -148,11 +190,13 @@ import { addSafetyLog, delSafetyLog, getSafetyLog, listSafetyLog, updateSafetyLo import { SafetyLogForm, SafetyLogQuery, SafetyLogVO } from '@/api/safety/safetyLog/types'; import { useUserStoreHook } from '@/store/modules/user'; import { dayjs } from 'element-plus'; +import { busHseSecurityLogList } from '@/api/project/goUser/index'; import SafetyLogDetailDialog from '@/views/safety/safetyLog/component/SafetyLogDetailDialog.vue'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { weather_type } = toRefs(proxy?.useDict('weather_type')); + // 获取用户 store const userStore = useUserStoreHook(); // 从 store 中获取项目列表和当前选中的项目 @@ -173,9 +217,10 @@ const dialog = reactive({ title: '' }); -const initFormData: SafetyLogForm = { +const initFormData: any = { id: undefined, - projectId: currentProject.value?.id, + projectId: currentProject.value.goId, + file: undefined, dateOfOccurrence: undefined, airTemperatureMax: undefined, airTemperatureMin: undefined, @@ -198,7 +243,7 @@ const data = reactive>({ queryParams: { pageNum: 1, pageSize: 10, - projectId: currentProject.value?.id, + projectId: currentProject.value.goId, dateOfOccurrence: undefined, airTemperatureMax: undefined, airTemperatureMin: undefined, @@ -214,8 +259,8 @@ const data = reactive>({ otherCondition: undefined, remark: undefined, creatorName: undefined, - orderByColumn: "createTime", - isAsc: "desc", + orderByColumn: 'createTime', + isAsc: 'desc', params: {} }, rules: { @@ -229,9 +274,9 @@ const { queryParams, form, rules } = toRefs(data); /** 查询安全日志列表 */ const getList = async () => { loading.value = true; - const res = await listSafetyLog(queryParams.value); - safetyLogList.value = res.rows; - total.value = res.total; + const res = await busHseSecurityLogList(queryParams.value); + safetyLogList.value = res.data.list; + total.value = res.data.total; loading.value = false; }; @@ -273,32 +318,17 @@ const handleShowDialog = (row?: SafetyLogVO) => { currentSafetyLogId.value = row.id; showDetailDialog.value = true; }; - -/** 新增按钮操作 */ -const handleAdd = () => { - reset(); - dialog.visible = true; - dialog.title = '添加安全日志'; -}; - -/** 修改按钮操作 */ -const handleUpdate = async (row?: SafetyLogVO) => { - reset(); - const _id = row?.id || ids.value[0]; - const res = await getSafetyLog(_id); - Object.assign(form.value, res.data); - dialog.visible = true; - dialog.title = '修改安全日志'; -}; - /** 提交按钮 */ +const uploadRef = ref(); const submitForm = () => { safetyLogFormRef.value?.validate(async (valid: boolean) => { if (valid) { buttonLoading.value = true; - form.value.projectId = currentProject.value?.id; - if (form.value.id) { - await updateSafetyLog(form.value).finally(() => (buttonLoading.value = false)); + form.value.projectId = currentProject.value?.goId; + if (fileStatus.value) { + await uploadRef.value.submitUpload().finally((res) => { + buttonLoading.value = false; + }); } else { await addSafetyLog(form.value).finally(() => (buttonLoading.value = false)); } @@ -318,20 +348,28 @@ const handleDelete = async (row?: SafetyLogVO) => { await getList(); }; -/** 导出按钮操作 */ -const handleExport = () => { - proxy?.download( - 'safety/safetyLog/export', - { - ...queryParams.value - }, - `safetyLog_${new Date().getTime()}.xlsx` - ); +/** 新增按钮操作 */ +const fileStatus = ref(false); +const handleAdd = (type?: string) => { + reset(); + if (weather_type.value.length == 5) { + weather_type.value = weather_type.value.filter((item) => item.value != '3'); + weather_type.value[2].value = '3'; + } + console.log('🚀 ~ handleAdd ~ type:', type); + if (type == 'file') { + fileStatus.value = true; + } else { + fileStatus.value = false; + } + + dialog.visible = true; + dialog.title = '添加安全日志'; }; //监听项目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/safety/safetyWeeklyReport/component/add.vue b/src/views/safety/safetyWeeklyReport/component/add.vue new file mode 100644 index 0000000..4083477 --- /dev/null +++ b/src/views/safety/safetyWeeklyReport/component/add.vue @@ -0,0 +1,110 @@ + + + diff --git a/src/views/safety/safetyWeeklyReport/component/documentsDetail/index.vue b/src/views/safety/safetyWeeklyReport/component/documentsDetail/index.vue new file mode 100644 index 0000000..5d5fbaa --- /dev/null +++ b/src/views/safety/safetyWeeklyReport/component/documentsDetail/index.vue @@ -0,0 +1,186 @@ + + + diff --git a/src/views/safety/safetyWeeklyReport/component/documentsEdit/index.vue b/src/views/safety/safetyWeeklyReport/component/documentsEdit/index.vue new file mode 100644 index 0000000..3059b35 --- /dev/null +++ b/src/views/safety/safetyWeeklyReport/component/documentsEdit/index.vue @@ -0,0 +1,186 @@ + + + diff --git a/src/views/safety/safetyWeeklyReport/component/icon/full.png b/src/views/safety/safetyWeeklyReport/component/icon/full.png new file mode 100644 index 0000000..973cf14 Binary files /dev/null and b/src/views/safety/safetyWeeklyReport/component/icon/full.png differ diff --git a/src/views/safety/safetyWeeklyReport/component/icon/suo.png b/src/views/safety/safetyWeeklyReport/component/icon/suo.png new file mode 100644 index 0000000..80f2233 Binary files /dev/null and b/src/views/safety/safetyWeeklyReport/component/icon/suo.png differ diff --git a/src/views/safety/safetyWeeklyReport/component/model.ts b/src/views/safety/safetyWeeklyReport/component/model.ts new file mode 100644 index 0000000..90873c4 --- /dev/null +++ b/src/views/safety/safetyWeeklyReport/component/model.ts @@ -0,0 +1,58 @@ +export interface BusWeeklySecurityReportTableColumns { + id:number; // 主键ID + projectId:number; // 项目ID + projectName:string; // 项目名称 + scope:string; // 周期范围 + scopeEnd:string; // 周期范围结束 + path:string; // 文件位置 + createBy:string; // 创建者 + updateBy:string; // 更新者 + createdAt:string; // 创建时间 +} + + +export interface BusWeeklySecurityReportInfoData { + id:number|undefined; // 主键ID + projectId:number|undefined; // 项目ID + projectName:string|undefined; // 项目名称 + scope:string|undefined; // 周期范围 + scopeEnd:string|undefined; // 周期范围结束 + path:string|undefined; // 文件位置 + createBy:string|undefined; // 创建者 + updateBy:string|undefined; // 更新者 + createdAt:string|undefined; // 创建时间 + updatedAt:string|undefined; // 更新时间 + deletedAt:string|undefined; // 删除时间 +} + + +export interface BusWeeklySecurityReportTableDataState { + ids:any[]; + tableData: { + data: Array; + total: number; + loading: boolean; + param: { + pageNum: number; + pageSize: number; + id: number|undefined; + projectId: number|undefined; + projectName: string|undefined; + scope: string|undefined; + scopeEnd: string|undefined; + path: string|undefined; + createBy: string|undefined; + updateBy: string|undefined; + createdAt: string|undefined; + dateRange: string[]; + }; + }; +} + + +export interface BusWeeklySecurityReportEditState{ + loading:boolean; + isShowDialog: boolean; + formData:BusWeeklySecurityReportInfoData; + rules: object; +} \ No newline at end of file diff --git a/src/views/safety/safetyWeeklyReport/index.vue b/src/views/safety/safetyWeeklyReport/index.vue index 2ac4adf..670cfb7 100644 --- a/src/views/safety/safetyWeeklyReport/index.vue +++ b/src/views/safety/safetyWeeklyReport/index.vue @@ -1,112 +1,95 @@ - - + diff --git a/src/views/safety/teamMeeting/component/TeamMeetingDetailDrawer.vue b/src/views/safety/teamMeeting/component/TeamMeetingDetailDrawer.vue index 7ead441..b344963 100644 --- a/src/views/safety/teamMeeting/component/TeamMeetingDetailDrawer.vue +++ b/src/views/safety/teamMeeting/component/TeamMeetingDetailDrawer.vue @@ -3,19 +3,17 @@ {{ teamMeetingDetail?.compereName }} - - {{teamMeetingDetail?.participantList.map(item => item.name).join(",")}} + {{ item }}, {{ teamMeetingDetail?.teamName }} - {{ teamMeetingDetail?.contractorName }} - {{ dayjs(teamMeetingDetail?.meetingDate).format('YYYY 年 MM 月 DD 日') - }} - {{ teamMeetingDetail?.createTime }} + {{ teamMeetingDetail?.labourserviceName }} + {{ dayjs(teamMeetingDetail?.meetingDate).format('YYYY 年 MM 月 DD 日') }} + {{ teamMeetingDetail?.createdAt }} {{ teamMeetingDetail?.content }} - - + + @@ -37,9 +35,10 @@ const loading = ref(false); const teamMeetingDetail = ref(); const get = async () => { loading.value = true; - const res = await getTeamMeeting(props.teamMeetingId); - if (res.data && res.code === 200) { + const res = await getTeamMeeting({ id: props.teamMeetingId }); + if (res.data && res.code === 0) { teamMeetingDetail.value = res.data; + teamMeetingDetail.value.pictureUrlList = res.data?.picture.split(','); } loading.value = false; }; diff --git a/src/views/safety/teamMeeting/index.vue b/src/views/safety/teamMeeting/index.vue index 5a45dfa..a6e4c2c 100644 --- a/src/views/safety/teamMeeting/index.vue +++ b/src/views/safety/teamMeeting/index.vue @@ -1,13 +1,11 @@ - - - + - - + - + @@ -99,14 +73,12 @@ - + - + @@ -136,9 +108,7 @@ diff --git a/src/views/system/user/comm/roleInfo.vue b/src/views/system/user/comm/roleInfo.vue index c4f4ce5..6867a26 100644 --- a/src/views/system/user/comm/roleInfo.vue +++ b/src/views/system/user/comm/roleInfo.vue @@ -274,6 +274,7 @@ const initData = async () => { try { // 获取项目列表 const projectRes = await listProject(); + console.log('🚀 ~ initData ~ projectRes:', projectRes); projectOptions.value = projectRes.rows.map((item: any) => ({ id: item.id, projectName: item.projectName, diff --git a/src/views/tender/supplierInput/index.vue b/src/views/tender/supplierInput/index.vue index 4c35487..86ed4f0 100644 --- a/src/views/tender/supplierInput/index.vue +++ b/src/views/tender/supplierInput/index.vue @@ -812,7 +812,7 @@ onUnmounted(() => { } } -.upload-file-list .ele-upload-list__item-content { +.upload-file-list .upload-list__item-content { display: flex; justify-content: space-between; align-items: center; diff --git a/src/views/tool/gen/index.vue b/src/views/tool/gen/index.vue index b4df31b..451895d 100644 --- a/src/views/tool/gen/index.vue +++ b/src/views/tool/gen/index.vue @@ -113,8 +113,8 @@