合并
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request-go';
|
||||||
import { AxiosPromise } from 'axios';
|
import { AxiosPromise } from 'axios';
|
||||||
import {
|
import {
|
||||||
QualityVO,
|
QualityVO,
|
||||||
@ -12,15 +12,29 @@ import {
|
|||||||
weatherVO,
|
weatherVO,
|
||||||
safetyDayVO
|
safetyDayVO
|
||||||
} from './type';
|
} from './type';
|
||||||
|
/**
|
||||||
|
* 查询大屏质量列表
|
||||||
|
* @param query
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
|
||||||
|
export const getQualityList = (query?: any): AxiosPromise<QualityVO> => {
|
||||||
|
return request({
|
||||||
|
url: '/zm/api/v1/system/busInspectionTicket/gisQualityManagementList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询大屏质量信息
|
* 查询大屏质量信息
|
||||||
* @param query
|
* @param query
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const getQualityList = (query?: Query): AxiosPromise<QualityVO> => {
|
export const getQualityMsg = (query?: any): AxiosPromise<QualityVO> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/quality/qualityInspection/gis',
|
url: '/zm/api/v1/system/busInspectionTicket/gisQualityManagement',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
@ -32,14 +46,27 @@ export const getQualityList = (query?: Query): AxiosPromise<QualityVO> => {
|
|||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const getprojectNewsList = (query?: Query): AxiosPromise<projectNewsVO[]> => {
|
export const getprojectNewsList = (query?: any): AxiosPromise<projectNewsVO[]> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/project/projectNews/list/gis',
|
url: '/zm/api/v1/system/sysProjectIntroduce/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询进度管理列表
|
||||||
|
* @param query
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export const getProgressList = (): AxiosPromise<any> => {
|
||||||
|
return request({
|
||||||
|
url: '/zm/api/v1/system/workStatus/getParentProgress',
|
||||||
|
method: 'get',
|
||||||
|
params: { fangzhenId: 22034 }
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取项目新闻详细信息
|
* 获取项目新闻详细信息
|
||||||
* @param query
|
* @param query
|
||||||
@ -48,8 +75,9 @@ export const getprojectNewsList = (query?: Query): AxiosPromise<projectNewsVO[]>
|
|||||||
|
|
||||||
export const getprojectNewsDetailList = (id: number): AxiosPromise<projectNewsDetailVO> => {
|
export const getprojectNewsDetailList = (id: number): AxiosPromise<projectNewsDetailVO> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/project/projectNews/' + id,
|
url: '/zm/api/v1/system/sysProjectIntroduce/get',
|
||||||
method: 'get'
|
method: 'get',
|
||||||
|
params: { id }
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -59,9 +87,23 @@ export const getprojectNewsDetailList = (id: number): AxiosPromise<projectNewsDe
|
|||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const getsafetyInspectionList = (query?: Query): AxiosPromise<safetyInspectionVO> => {
|
export const getsafetyInspectionMsg = (query?: Query): AxiosPromise<safetyInspectionVO> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/safety/safetyInspection/gis',
|
url: '/zm/api/v1/system/busHseManagement/gisSafetyManagement',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询大屏安全列表
|
||||||
|
* @param query
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
|
||||||
|
export const getsafetyInspectionList = (query?: any): AxiosPromise<safetyInspectionVO> => {
|
||||||
|
return request({
|
||||||
|
url: '/zm/api/v1/system/busHseManagement/gisSafetyManagementList',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
@ -75,7 +117,7 @@ export const getsafetyInspectionList = (query?: Query): AxiosPromise<safetyInspe
|
|||||||
|
|
||||||
export const getConstructionUserList = (query?: Query): AxiosPromise<ConstructionUserVO> => {
|
export const getConstructionUserList = (query?: Query): AxiosPromise<ConstructionUserVO> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/project/constructionUser/gis',
|
url: '/zm/api/wxApplet/wxApplet/busConstructionUser/attendanceCount',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
@ -89,7 +131,7 @@ export const getConstructionUserList = (query?: Query): AxiosPromise<Constructio
|
|||||||
|
|
||||||
export const getMachineryrList = (query?: Query): AxiosPromise<MachineryrVO[]> => {
|
export const getMachineryrList = (query?: Query): AxiosPromise<MachineryrVO[]> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/machinery/machinery/list/gis',
|
url: '/zm/api/v1/system/busMachinery/mechanicalCondition',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
@ -103,7 +145,7 @@ export const getMachineryrList = (query?: Query): AxiosPromise<MachineryrVO[]> =
|
|||||||
|
|
||||||
export const getMaterialsList = (query?: Query): AxiosPromise<MaterialsVO[]> => {
|
export const getMaterialsList = (query?: Query): AxiosPromise<MaterialsVO[]> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/materials/materials/list/gis',
|
url: '/zm/api/v1/system/busEquipmentMaterialsInventory/excelindex',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
@ -115,10 +157,11 @@ export const getMaterialsList = (query?: Query): AxiosPromise<MaterialsVO[]> =>
|
|||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const getweatherList = (id?: string): AxiosPromise<weatherVO[]> => {
|
export const getweatherList = (): AxiosPromise<weatherVO[]> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/project/project/weather/' + id,
|
url: '/zm/api/wxApplet/wxApplet/busConstructionUser/weather',
|
||||||
method: 'get'
|
method: 'get',
|
||||||
|
params: { location: '106.54,23.47' }
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -134,3 +177,16 @@ export const getSafetyDay = (id?: string): AxiosPromise<safetyDayVO> => {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目Ai检测
|
||||||
|
* @param query
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export const getAISafetyInspectionList = (query?: any): AxiosPromise<any> => {
|
||||||
|
return request({
|
||||||
|
url: '/zm/api/v1/system/busTour/tourSearchAllList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import request, { download } from '@/utils/request';
|
import request from '@/utils/request-go';
|
||||||
import { AxiosPromise } from 'axios';
|
import { AxiosPromise } from 'axios';
|
||||||
import {
|
import {
|
||||||
ConstructionUserForm,
|
ConstructionUserForm,
|
||||||
@ -177,7 +177,7 @@ export const getConstructionUserExit = (query: ConstructionUserExitForm) => {
|
|||||||
export const dowloadConstructionUserTemplate = (query: ConstructionUserTemplateForm) => {
|
export const dowloadConstructionUserTemplate = (query: ConstructionUserTemplateForm) => {
|
||||||
let { projectId } = query;
|
let { projectId } = query;
|
||||||
const fileName = projectId + '_project.zip';
|
const fileName = projectId + '_project.zip';
|
||||||
return download('/contractor/constructionUserFile/exportFileTemplate', query, fileName);
|
return request.download('/contractor/constructionUserFile/exportFileTemplate', query, fileName);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -186,8 +186,8 @@ export const dowloadConstructionUserTemplate = (query: ConstructionUserTemplateF
|
|||||||
*/
|
*/
|
||||||
export const delConstructionUserMember = (data: ConstructionUserMembeForm) => {
|
export const delConstructionUserMember = (data: ConstructionUserMembeForm) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/contractor/projectTeamMember/',
|
url: '/zm/api/v1/system/busConstructionUser/departure',
|
||||||
method: 'delete',
|
method: 'post',
|
||||||
data
|
data
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request-go';
|
||||||
import { AxiosPromise } from 'axios';
|
import { AxiosPromise } from 'axios';
|
||||||
import { ProjectTeamForemanResp, ProjectTeamForm, ProjectTeamQuery, ProjectTeamVO } from '@/api/project/projectTeam/types';
|
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<ProjectTeamVO[]> => {
|
export const listProjectTeam = (query?: ProjectTeamQuery): AxiosPromise<ProjectTeamVO[]> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/project/projectTeam/list',
|
url: '/zm/api/wxApplet/wxApplet/sysProjectTeam/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
@ -22,8 +22,9 @@ export const listProjectTeam = (query?: ProjectTeamQuery): AxiosPromise<ProjectT
|
|||||||
*/
|
*/
|
||||||
export const listProjectTeamForeman = (projectId: string | number): AxiosPromise<ProjectTeamForemanResp[]> => {
|
export const listProjectTeamForeman = (projectId: string | number): AxiosPromise<ProjectTeamForemanResp[]> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/project/projectTeam/listForeman/' + projectId,
|
url: '/zm/api/wxApplet/wxApplet/sysProjectTeam/get',
|
||||||
method: 'get'
|
method: 'get',
|
||||||
|
params: { projectId }
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -33,8 +34,9 @@ export const listProjectTeamForeman = (projectId: string | number): AxiosPromise
|
|||||||
*/
|
*/
|
||||||
export const getProjectTeam = (id: string | number): AxiosPromise<ProjectTeamVO> => {
|
export const getProjectTeam = (id: string | number): AxiosPromise<ProjectTeamVO> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/project/projectTeam/' + id,
|
url: '/zm/api/wxApplet/wxApplet/sysProjectTeam/get',
|
||||||
method: 'get'
|
method: 'get',
|
||||||
|
params: { id }
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -44,7 +46,7 @@ export const getProjectTeam = (id: string | number): AxiosPromise<ProjectTeamVO>
|
|||||||
*/
|
*/
|
||||||
export const addProjectTeam = (data: ProjectTeamForm): AxiosPromise<string | number> => {
|
export const addProjectTeam = (data: ProjectTeamForm): AxiosPromise<string | number> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/project/projectTeam',
|
url: '/zm/api/wxApplet/wxApplet/sysProjectTeam/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
@ -56,7 +58,7 @@ export const addProjectTeam = (data: ProjectTeamForm): AxiosPromise<string | num
|
|||||||
*/
|
*/
|
||||||
export const updateProjectTeam = (data: ProjectTeamForm) => {
|
export const updateProjectTeam = (data: ProjectTeamForm) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/project/projectTeam',
|
url: '/zm/api/wxApplet/wxApplet/sysProjectTeam/edit',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
@ -66,9 +68,10 @@ export const updateProjectTeam = (data: ProjectTeamForm) => {
|
|||||||
* 删除项目班组
|
* 删除项目班组
|
||||||
* @param id
|
* @param id
|
||||||
*/
|
*/
|
||||||
export const delProjectTeam = (id: string | number | Array<string | number>) => {
|
export const delProjectTeam = (ids: string | number | Array<string | number>) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/project/projectTeam/' + id,
|
url: '/zm/api/wxApplet/wxApplet/sysProjectTeam/delete',
|
||||||
method: 'delete'
|
method: 'delete',
|
||||||
|
params: { ids }
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request-go';
|
||||||
import { AxiosPromise } from 'axios';
|
import { AxiosPromise } from 'axios';
|
||||||
import { ProjectTeamMemberForm, ProjectTeamMemberQuery, ProjectTeamMemberVO } from '@/api/project/projectTeamMember/types';
|
import { ProjectTeamMemberForm, ProjectTeamMemberQuery, ProjectTeamMemberVO } from '@/api/project/projectTeamMember/types';
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ import { ProjectTeamMemberForm, ProjectTeamMemberQuery, ProjectTeamMemberVO } fr
|
|||||||
|
|
||||||
export const listProjectTeamMember = (query?: ProjectTeamMemberQuery): AxiosPromise<ProjectTeamMemberVO[]> => {
|
export const listProjectTeamMember = (query?: ProjectTeamMemberQuery): AxiosPromise<ProjectTeamMemberVO[]> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/project/projectTeamMember/list',
|
url: '/zm/api/wxApplet/wxApplet/sysProjectTeamMember/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
@ -22,8 +22,9 @@ export const listProjectTeamMember = (query?: ProjectTeamMemberQuery): AxiosProm
|
|||||||
*/
|
*/
|
||||||
export const getProjectTeamMember = (id: string | number): AxiosPromise<ProjectTeamMemberVO> => {
|
export const getProjectTeamMember = (id: string | number): AxiosPromise<ProjectTeamMemberVO> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/project/projectTeamMember/' + id,
|
url: '/zm/api/wxApplet/wxApplet/sysProjectTeamMember/get',
|
||||||
method: 'get'
|
method: 'get',
|
||||||
|
params: { id }
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -33,7 +34,7 @@ export const getProjectTeamMember = (id: string | number): AxiosPromise<ProjectT
|
|||||||
*/
|
*/
|
||||||
export const addProjectTeamMember = (data: ProjectTeamMemberForm): AxiosPromise<string | number> => {
|
export const addProjectTeamMember = (data: ProjectTeamMemberForm): AxiosPromise<string | number> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/project/projectTeamMember',
|
url: '/zm/api/wxApplet/wxApplet/sysProjectTeamMember/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
@ -45,7 +46,7 @@ export const addProjectTeamMember = (data: ProjectTeamMemberForm): AxiosPromise<
|
|||||||
*/
|
*/
|
||||||
export const updateProjectTeamMember = (data: ProjectTeamMemberForm) => {
|
export const updateProjectTeamMember = (data: ProjectTeamMemberForm) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/project/projectTeamMember',
|
url: '/zm/api/wxApplet/wxApplet/sysProjectTeamMember/edit',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
@ -57,7 +58,8 @@ export const updateProjectTeamMember = (data: ProjectTeamMemberForm) => {
|
|||||||
*/
|
*/
|
||||||
export const delProjectTeamMember = (id: string | number | Array<string | number>) => {
|
export const delProjectTeamMember = (id: string | number | Array<string | number>) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/project/projectTeamMember/' + id,
|
url: '/zm/api/wxApplet/wxApplet/sysProjectTeamMember/delete',
|
||||||
method: 'delete'
|
method: 'delete',
|
||||||
|
params: { ids: id }
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request-go';
|
||||||
import { AxiosPromise } from 'axios';
|
import { AxiosPromise } from 'axios';
|
||||||
import { QualityConstructionLogVO, QualityConstructionLogForm, QualityConstructionLogQuery } from '@/api/quality/qualityConstructionLog/types';
|
import { QualityConstructionLogVO, QualityConstructionLogForm, QualityConstructionLogQuery } from '@/api/quality/qualityConstructionLog/types';
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ import { QualityConstructionLogVO, QualityConstructionLogForm, QualityConstructi
|
|||||||
|
|
||||||
export const listQualityConstructionLog = (query?: QualityConstructionLogQuery): AxiosPromise<QualityConstructionLogVO[]> => {
|
export const listQualityConstructionLog = (query?: QualityConstructionLogQuery): AxiosPromise<QualityConstructionLogVO[]> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/quality/qualityConstructionLog/list',
|
url: '/zm/api/v1/system/busConstructionLog/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
@ -22,8 +22,9 @@ export const listQualityConstructionLog = (query?: QualityConstructionLogQuery):
|
|||||||
*/
|
*/
|
||||||
export const getQualityConstructionLog = (id: string | number): AxiosPromise<QualityConstructionLogVO> => {
|
export const getQualityConstructionLog = (id: string | number): AxiosPromise<QualityConstructionLogVO> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/quality/qualityConstructionLog/' + id,
|
url: 'zm/api/v1/system/busConstructionLog/get',
|
||||||
method: 'get'
|
method: 'get',
|
||||||
|
params: { id }
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request-go';
|
||||||
import { AxiosPromise } from 'axios';
|
import { AxiosPromise } from 'axios';
|
||||||
import { QualityInspectionVO, QualityInspectionForm, QualityInspectionQuery } from '@/api/quality/qualityInspection/types';
|
import { QualityInspectionVO, QualityInspectionForm, QualityInspectionQuery } from '@/api/quality/qualityInspection/types';
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ import { QualityInspectionVO, QualityInspectionForm, QualityInspectionQuery } fr
|
|||||||
|
|
||||||
export const listQualityInspection = (query?: QualityInspectionQuery): AxiosPromise<QualityInspectionVO[]> => {
|
export const listQualityInspection = (query?: QualityInspectionQuery): AxiosPromise<QualityInspectionVO[]> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/quality/qualityInspection/list',
|
url: '/zm/api/v1/system/busInspectionTicket/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
@ -22,8 +22,9 @@ export const listQualityInspection = (query?: QualityInspectionQuery): AxiosProm
|
|||||||
*/
|
*/
|
||||||
export const getQualityInspection = (id: string | number): AxiosPromise<QualityInspectionVO> => {
|
export const getQualityInspection = (id: string | number): AxiosPromise<QualityInspectionVO> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/quality/qualityInspection/' + id,
|
url: '/zm/api/v1/system/busInspectionTicket/get',
|
||||||
method: 'get'
|
method: 'get',
|
||||||
|
params: { id }
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -33,7 +34,7 @@ export const getQualityInspection = (id: string | number): AxiosPromise<QualityI
|
|||||||
*/
|
*/
|
||||||
export const addQualityInspection = (data: QualityInspectionForm) => {
|
export const addQualityInspection = (data: QualityInspectionForm) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/quality/qualityInspection',
|
url: '/zm/api/v1/system/busInspectionTicket/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
@ -61,3 +62,8 @@ export const delQualityInspection = (id: string | number | Array<string | number
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 下载OSS对象存储
|
||||||
|
export function downLoadOss(ossId: { id?: string | number; idList?: string | number | Array<string | number> }, url: string, fileName: string) {
|
||||||
|
return request.download(url, ossId, fileName);
|
||||||
|
}
|
||||||
|
@ -67,6 +67,7 @@ export interface UserProject {
|
|||||||
projectId: string;
|
projectId: string;
|
||||||
projectName: string;
|
projectName: string;
|
||||||
shortName: string;
|
shortName: string;
|
||||||
|
goId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IdAndNameVO {
|
export interface IdAndNameVO {
|
||||||
|
@ -38,6 +38,8 @@ watch(
|
|||||||
);
|
);
|
||||||
|
|
||||||
const handleSelect = (projectId: string) => {
|
const handleSelect = (projectId: string) => {
|
||||||
|
console.log(projects.value);
|
||||||
|
|
||||||
const selectedProject = projects.value.find((p) => p.id === projectId);
|
const selectedProject = projects.value.find((p) => p.id === projectId);
|
||||||
if (selectedProject) {
|
if (selectedProject) {
|
||||||
userStore.setSelectedProject(selectedProject);
|
userStore.setSelectedProject(selectedProject);
|
||||||
|
@ -42,9 +42,9 @@ export const useUserStore = defineStore('user', () => {
|
|||||||
const roles = ref<Array<string>>([]); // 用户角色编码集合 → 判断路由权限
|
const roles = ref<Array<string>>([]); // 用户角色编码集合 → 判断路由权限
|
||||||
const permissions = ref<Array<string>>([]); // 用户权限编码集合 → 判断按钮权限
|
const permissions = ref<Array<string>>([]); // 用户权限编码集合 → 判断按钮权限
|
||||||
|
|
||||||
const projects = ref<Array<{ id: string; name: string }>>([]);
|
const projects = ref<Array<{ id: string; name: string; goId: string }>>([]);
|
||||||
// 从localStorage获取缓存的项目,如果没有则默认为null
|
// 从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<SpecialType[] | null>(getProjectTeamListFromStorage());
|
const ProjectTeamList = ref<SpecialType[] | null>(getProjectTeamListFromStorage());
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -126,11 +126,11 @@ export const useUserStore = defineStore('user', () => {
|
|||||||
avatar.value = value;
|
avatar.value = value;
|
||||||
};
|
};
|
||||||
|
|
||||||
const setProjects = (projectList: Array<{ id: string; name: string }>) => {
|
const setProjects = (projectList: Array<{ id: string; name: string; goId: string }>) => {
|
||||||
projects.value = projectList;
|
projects.value = projectList;
|
||||||
};
|
};
|
||||||
|
|
||||||
const setSelectedProject = (project: { id: string; name: string }) => {
|
const setSelectedProject = (project: { id: string; name: string; goId: string }) => {
|
||||||
selectedProject.value = project;
|
selectedProject.value = project;
|
||||||
saveSelectedProjectToStorage(project);
|
saveSelectedProjectToStorage(project);
|
||||||
};
|
};
|
||||||
|
@ -12,9 +12,9 @@ export const getProjectTeam = async () => {
|
|||||||
projectId: id
|
projectId: id
|
||||||
});
|
});
|
||||||
|
|
||||||
const list = res.rows.map((projectTeam: ProjectTeamVO) => ({
|
const list = res.data.list.map((projectTeam: ProjectTeamVO) => ({
|
||||||
value: projectTeam.id,
|
value: projectTeam.id,
|
||||||
label: projectTeam.teamName
|
label: projectTeam.name
|
||||||
}));
|
}));
|
||||||
$cache.local.setJSON('ProjectTeamList', list);
|
$cache.local.setJSON('ProjectTeamList', list);
|
||||||
};
|
};
|
||||||
|
@ -1,14 +1,19 @@
|
|||||||
import $cache from '@/plugins/cache';
|
import $cache from '@/plugins/cache';
|
||||||
// src/utils/request-go.ts
|
|
||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
|
|
||||||
const BASE_GO_URL = import.meta.env.VITE_APP_BASE_API_GO;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 包装 request 请求,统一使用 Go 服务地址作为 baseURL
|
* 包装 request 请求,统一使用 Go 服务地址作为 baseURL
|
||||||
* @param config 原始请求配置
|
* @param config 原始请求配置
|
||||||
*/
|
*/
|
||||||
export default function requestGo(config: any) {
|
|
||||||
|
const BASE_GO_URL = import.meta.env.VITE_APP_BASE_API_GO;
|
||||||
|
|
||||||
|
interface RequestGo extends Function {
|
||||||
|
(config: any): Promise<any>;
|
||||||
|
download?: (url: string, params: any, filename: string) => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
const requestGo: RequestGo = (config: any) => {
|
||||||
return request({
|
return request({
|
||||||
baseURL: BASE_GO_URL,
|
baseURL: BASE_GO_URL,
|
||||||
...config,
|
...config,
|
||||||
@ -16,4 +21,30 @@ export default function requestGo(config: any) {
|
|||||||
'Authorization': `Bearer ${$cache.local.get('goToken') || ''}`
|
'Authorization': `Bearer ${$cache.local.get('goToken') || ''}`
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
|
requestGo.download = function (url: string, params: any, filename: string) {
|
||||||
|
return request({
|
||||||
|
url,
|
||||||
|
method: 'post',
|
||||||
|
baseURL: BASE_GO_URL,
|
||||||
|
data: params,
|
||||||
|
headers: {
|
||||||
|
'Authorization': `Bearer ${$cache.local.get('goToken') || ''}`
|
||||||
|
},
|
||||||
|
responseType: 'blob'
|
||||||
|
}).then((response) => {
|
||||||
|
// ✅ 只取 response.data
|
||||||
|
const blob = new Blob([response.data]);
|
||||||
|
const link = document.createElement('a');
|
||||||
|
link.style.display = 'none';
|
||||||
|
link.href = URL.createObjectURL(blob);
|
||||||
|
link.setAttribute('download', filename);
|
||||||
|
document.body.appendChild(link);
|
||||||
|
link.click();
|
||||||
|
document.body.removeChild(link);
|
||||||
|
URL.revokeObjectURL(link.href);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export default requestGo;
|
||||||
|
@ -71,7 +71,10 @@ function onMouseEnter() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onMouseLeave() {
|
function onMouseLeave() {
|
||||||
if (!manualControl && props.autoScroll) startScroll();
|
// ✅ 仅在 scrollEnabled 才重新开始滚动
|
||||||
|
if (!manualControl && props.autoScroll && scrollEnabled.value) {
|
||||||
|
startScroll();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onWheel(e: WheelEvent) {
|
function onWheel(e: WheelEvent) {
|
||||||
|
@ -15,23 +15,39 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="carousellist flex items-center">
|
<div class="carousellist flex items-center">
|
||||||
<div>
|
<div>
|
||||||
<img src="@/assets/images/toleft.png" alt="" />
|
<!-- <img src="@/assets/images/toleft.png" alt="" /> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="carouselcontainer flex justify-between">
|
<div class="carouselcontainer flex justify-between">
|
||||||
<div class="carouselItem flex flex-col justify-between" v-for="item in 5">
|
<div class="carouselItem flex flex-col justify-between" v-for="item in AIImg">
|
||||||
<img src="@/assets/images/carousel.png" alt="" />
|
<img :src="BASE + item.picture" alt="" />
|
||||||
<div class="time">03-18 15:00</div>
|
<div class="time">{{ parseTime(item.createdAt, '{m}-{d} {h}:{i}') }}</div>
|
||||||
<div class="remark">未佩戴安全帽</div>
|
<div class="remark">{{ item.describe }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<img src="@/assets/images/toright.png" alt="" />
|
<!-- <img src="@/assets/images/toright.png" alt="" /> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup></script>
|
<script lang="ts" setup>
|
||||||
|
import { useUserStoreHook } from '@/store/modules/user';
|
||||||
|
import { getAISafetyInspectionList } from '@/api/gis';
|
||||||
|
const AIImg = ref([]);
|
||||||
|
const BASE = 'http://58.17.134.85:7363';
|
||||||
|
const store = useUserStoreHook();
|
||||||
|
const currentProject = computed(() => store.selectedProject);
|
||||||
|
const getAIImg = async () => {
|
||||||
|
const res = await getAISafetyInspectionList({
|
||||||
|
projectId: currentProject.value.goId
|
||||||
|
});
|
||||||
|
AIImg.value = res.data.list.slice(0, 5);
|
||||||
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
getAIImg();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import '../css/gis.scss';
|
@import '../css/gis.scss';
|
||||||
|
@ -22,7 +22,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<p>总人数</p>
|
<p>总人数</p>
|
||||||
<div class="peopleNum">
|
<div class="peopleNum">
|
||||||
<span>{{ constructionUserData?.peopleCount }} </span>人
|
<span>{{ constructionUserData?.headcount }}</span
|
||||||
|
>人
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
@ -31,7 +32,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<p>出勤人</p>
|
<p>出勤人</p>
|
||||||
<div class="peopleNum">
|
<div class="peopleNum">
|
||||||
<span>{{ constructionUserData?.attendanceCount }} </span>人
|
<span>{{ constructionUserData?.responseCunt }}</span
|
||||||
|
>人
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
@ -40,7 +42,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<p>出勤率</p>
|
<p>出勤率</p>
|
||||||
<div class="peopleNum">
|
<div class="peopleNum">
|
||||||
<span>{{ constructionUserData?.attendanceRate }} </span>%
|
<span>{{ constructionUserData?.ratio }} </span>%
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -97,35 +99,48 @@ const machineryOption = ref<MachineryrVO[]>([]); //机械
|
|||||||
const orderOption = ref<MaterialsVO[]>([]); //材料
|
const orderOption = ref<MaterialsVO[]>([]); //材料
|
||||||
const stopMachineryScroll = ref(null);
|
const stopMachineryScroll = ref(null);
|
||||||
const stopOrderScroll = ref(null);
|
const stopOrderScroll = ref(null);
|
||||||
const machineryDataAxis = computed(() => machineryOption.value.map((item) => item.machineryName)); //x轴数据
|
const machineryDataAxis = computed(() => machineryOption.value.map((item) => item.statusName)); //x轴数据
|
||||||
const machineryData = computed(() => machineryOption.value.map((item) => item.machineryCount)); //柱状图数据
|
const machineryData = computed(() => machineryOption.value.map((item) => item.statusNumber)); //柱状图数据
|
||||||
const orderDataAxis = computed(() => orderOption.value.map((item) => item.materialsName)); //材料x轴数据
|
const orderDataAxis = computed(() => orderOption.value.map((item) => item.equipmentMaterialsName)); //材料x轴数据
|
||||||
const orderPutData = computed(() => orderOption.value.map((item) => item.putCount)); //柱状图领用量数据
|
const orderPutData = computed(() => orderOption.value.map((item) => item.inventoryNumber)); //柱状图领用量数据
|
||||||
const orderOutData = computed(() => orderOption.value.map((item) => item.outCount)); //柱状图出库量数据
|
const orderOutData = computed(() => orderOption.value.map((item) => item.outboundNumber)); //柱状图出库量数据
|
||||||
const orderRankingData = computed(() => orderOption.value.map((item) => item.value)); //柱状图库存数据
|
const orderRankingData = computed(() => orderOption.value.map((item) => item.value)); //柱状图库存数据
|
||||||
// 从 store 中获取项目列表和当前选中的项目
|
// 从 store 中获取项目列表和当前选中的项目
|
||||||
const currentProject = computed(() => userStore.selectedProject);
|
const currentProject = computed(() => userStore.selectedProject);
|
||||||
|
|
||||||
//获取施工人员信息
|
//获取施工人员信息
|
||||||
const getConstructionUserData = async () => {
|
const getConstructionUserData = async () => {
|
||||||
const res = await getConstructionUserList({ projectId: currentProject.value.id });
|
const res = await getConstructionUserList({ projectId: currentProject.value.goId });
|
||||||
if (res.code !== 200) return;
|
if (res.code !== 0) return;
|
||||||
constructionUserData.value = res.data;
|
constructionUserData.value = res.data;
|
||||||
};
|
};
|
||||||
|
|
||||||
//查询大屏机械列表
|
//查询大屏机械列表
|
||||||
const getMachineryData = async () => {
|
const getMachineryData = async () => {
|
||||||
const res = await getMachineryrList({ projectId: currentProject.value.id });
|
const res = await getMachineryrList({ projectId: currentProject.value.goId });
|
||||||
if (res.code !== 200) return;
|
if (res.code !== 0) return;
|
||||||
machineryOption.value = res.data;
|
const merged = Object.values(
|
||||||
|
res.data.list.reduce(
|
||||||
|
(acc, item) => {
|
||||||
|
if (!acc[item.statusName]) {
|
||||||
|
acc[item.statusName] = { ...item };
|
||||||
|
} else {
|
||||||
|
acc[item.statusName].statusNumber += item.statusNumber;
|
||||||
|
}
|
||||||
|
return acc;
|
||||||
|
},
|
||||||
|
{} as Record<string, { statusName: string; statusNumber: number }>
|
||||||
|
)
|
||||||
|
);
|
||||||
|
machineryOption.value = merged as any;
|
||||||
initMachinerycharts();
|
initMachinerycharts();
|
||||||
};
|
};
|
||||||
|
|
||||||
//查询大屏材料信息
|
//查询大屏材料信息
|
||||||
const getOrderData = async () => {
|
const getOrderData = async () => {
|
||||||
const res = await getMaterialsList({ projectId: currentProject.value.id });
|
const res = await getMaterialsList({ projectId: currentProject.value.goId });
|
||||||
if (res.code !== 200) return;
|
if (res.code !== 0) return;
|
||||||
orderOption.value = res.data;
|
orderOption.value = res.data.list;
|
||||||
initOrderChart();
|
initOrderChart();
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -133,7 +148,7 @@ const initMachinerycharts = () => {
|
|||||||
let chartDom = document.getElementById('machineryMain');
|
let chartDom = document.getElementById('machineryMain');
|
||||||
myMachineryChart.value = markRaw(echarts.init(chartDom));
|
myMachineryChart.value = markRaw(echarts.init(chartDom));
|
||||||
let option: EChartsOption;
|
let option: EChartsOption;
|
||||||
|
const { max, interval, splitNumber } = calcYAxisOptions(machineryData.value);
|
||||||
option = {
|
option = {
|
||||||
title: {
|
title: {
|
||||||
subtext: '单位:台数'
|
subtext: '单位:台数'
|
||||||
@ -149,8 +164,17 @@ const initMachinerycharts = () => {
|
|||||||
// inside: true,
|
// inside: true,
|
||||||
color: 'rgba(202, 218, 226, 1)',
|
color: 'rgba(202, 218, 226, 1)',
|
||||||
|
|
||||||
fontSize: 10,
|
fontSize: 13,
|
||||||
interval: 0
|
interval: 0,
|
||||||
|
formatter: function (value: string) {
|
||||||
|
// 每5个字符换行(你可以根据需要改成4或6)
|
||||||
|
const maxLineLength = 5;
|
||||||
|
let result = '';
|
||||||
|
for (let i = 0; i < value.length; i += maxLineLength) {
|
||||||
|
result += value.slice(i, i + maxLineLength) + '\n';
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: false
|
show: false
|
||||||
@ -162,6 +186,9 @@ const initMachinerycharts = () => {
|
|||||||
z: 10
|
z: 10
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
|
max,
|
||||||
|
interval,
|
||||||
|
splitNumber,
|
||||||
axisLine: {
|
axisLine: {
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
@ -172,8 +199,6 @@ const initMachinerycharts = () => {
|
|||||||
color: '#999',
|
color: '#999',
|
||||||
fontSize: 12
|
fontSize: 12
|
||||||
},
|
},
|
||||||
interval: 1,
|
|
||||||
splitNumber: 5,
|
|
||||||
splitLine: {
|
splitLine: {
|
||||||
show: true,
|
show: true,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
@ -237,7 +262,7 @@ const initMachinerycharts = () => {
|
|||||||
},
|
},
|
||||||
start: 0,
|
start: 0,
|
||||||
// 计算初始结束百分比
|
// 计算初始结束百分比
|
||||||
end: (6 / machineryData.value.length) * 100
|
end: (3 / machineryData.value.length) * 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
@ -261,6 +286,21 @@ const initMachinerycharts = () => {
|
|||||||
stopMachineryScroll.value = enableEchartsAutoScroll(myMachineryChart.value, machineryDataAxis.value.length, 6, 2000);
|
stopMachineryScroll.value = enableEchartsAutoScroll(myMachineryChart.value, machineryDataAxis.value.length, 6, 2000);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const calcYAxisOptions = (data: number[]) => {
|
||||||
|
const maxValue = Math.max(...data);
|
||||||
|
const paddedMax = Math.ceil(maxValue * 1.2); // 给柱子顶部留空间
|
||||||
|
|
||||||
|
// 自动控制 Y 轴分几段:比如让每段差不多 2~5 个单位
|
||||||
|
let interval = Math.ceil(paddedMax / 5);
|
||||||
|
let splitNumber = Math.ceil(paddedMax / interval);
|
||||||
|
|
||||||
|
return {
|
||||||
|
max: paddedMax,
|
||||||
|
interval,
|
||||||
|
splitNumber
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
const initOrderChart = () => {
|
const initOrderChart = () => {
|
||||||
let chartDom = document.getElementById('orderMain');
|
let chartDom = document.getElementById('orderMain');
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<AutoScroller :items="projectNewsData" class="events-list" ref="newsScroller">
|
<AutoScroller :items="projectNewsData" class="events-list" ref="newsScroller">
|
||||||
<template #default="{ item, index }">
|
<template #default="{ item, index }">
|
||||||
<li>
|
<li>
|
||||||
<span class="text detail" style="display: inline"> {{ item.title }}</span>
|
<span class="text detail" style="display: inline"> {{ item.headline }}</span>
|
||||||
<span class="more" v-if="!item.show" @click="onMore(index, true, item.id)">查看详情</span>
|
<span class="more" v-if="!item.show" @click="onMore(index, true, item.id)">查看详情</span>
|
||||||
<span class="more" style="color: #ffb100eb" v-else @click="onMore(index, false)">关闭详情</span>
|
<span class="more" style="color: #ffb100eb" v-else @click="onMore(index, false)">关闭详情</span>
|
||||||
</li>
|
</li>
|
||||||
@ -46,7 +46,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="safetyData">
|
<div class="safetyData">
|
||||||
<div class="head flex justify-around">
|
<div class="head flex justify-around">
|
||||||
<div class="safetyData-item flex items-center">
|
<div class="safetyData-item flex items-center" @click="getsafetyInspectionData('1')">
|
||||||
<div>
|
<div>
|
||||||
<img src="@/assets/images/danggerNum.png" alt="" />
|
<img src="@/assets/images/danggerNum.png" alt="" />
|
||||||
</div>
|
</div>
|
||||||
@ -55,7 +55,7 @@
|
|||||||
<p>{{ safetyInspectionData.teamMeetingCount }}<span> 件</span></p>
|
<p>{{ safetyInspectionData.teamMeetingCount }}<span> 件</span></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="safetyData-item flex items-center">
|
<div class="safetyData-item flex items-center" @click="getsafetyInspectionData('3')">
|
||||||
<div>
|
<div>
|
||||||
<img src="@/assets/images/record.png" alt="" />
|
<img src="@/assets/images/record.png" alt="" />
|
||||||
</div>
|
</div>
|
||||||
@ -64,13 +64,13 @@
|
|||||||
<p>{{ safetyInspectionData.safetyInspectionCount }}<span> 件</span></p>
|
<p>{{ safetyInspectionData.safetyInspectionCount }}<span> 件</span></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="safetyData-item flex items-center">
|
<div class="safetyData-item flex items-center" @click="getsafetyInspectionData('2')">
|
||||||
<div>
|
<div>
|
||||||
<img src="@/assets/images/situation.png" alt="" />
|
<img src="@/assets/images/situation.png" alt="" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span>整改情况</span>
|
<span>整改情况</span>
|
||||||
<p>{{ safetyInspectionData.correctSituationCount }}<span> 件</span></p>
|
<p>{{ safetyInspectionData.correctSituationCount }}<span> %</span></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -79,15 +79,15 @@
|
|||||||
<span class="teamWidth">班组</span>
|
<span class="teamWidth">班组</span>
|
||||||
<span class="teamWidth">名称</span>
|
<span class="teamWidth">名称</span>
|
||||||
<span class="teamWidth">时间</span>
|
<span class="teamWidth">时间</span>
|
||||||
<span class="statusWidth">操作</span>
|
<!-- <span class="statusWidth">操作</span> -->
|
||||||
</div>
|
</div>
|
||||||
<AutoScroller :items="safetyInspectionData.teamMeetingList" class="tbody" safety>
|
<AutoScroller :items="safetyInspectionData.teamMeetingList" class="tbody" safety>
|
||||||
<template #default="{ item }">
|
<template #default="{ item }">
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<span class="teamWidth">{{ item.teamName }}</span>
|
<span class="teamWidth">{{ item.studyTypeName }}</span>
|
||||||
<span class="teamWidth">{{ item.name }}</span>
|
<span class="teamWidth">{{ item.tourTypeName }}</span>
|
||||||
<span class="teamWidth time">{{ item.meetingDate }}</span>
|
<span class="teamWidth time">{{ parseTime(item.createdAt, '{y}-{m}-{d}') }}</span>
|
||||||
<span class="statusWidth">查看</span>
|
<!-- <span class="statusWidth">查看</span> -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</AutoScroller>
|
</AutoScroller>
|
||||||
@ -112,11 +112,11 @@
|
|||||||
<div>
|
<div>
|
||||||
<img src="@/assets/images/qualityLogo.png" alt="" />
|
<img src="@/assets/images/qualityLogo.png" alt="" />
|
||||||
</div>
|
</div>
|
||||||
<div class="qualityNum">
|
<div class="qualityNum" @click="getQualityData('2')">
|
||||||
<div>巡检记录 <b></b></div>
|
<div>巡检记录 <b></b></div>
|
||||||
<p>{{ qualityData?.count }}<span> 件</span></p>
|
<p>{{ qualityData?.count }}<span> 件</span></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="qualityNum ml-15">
|
<div class="qualityNum ml-15" @click="getQualityData('1')">
|
||||||
<div>整改情况 <b></b></div>
|
<div>整改情况 <b></b></div>
|
||||||
<p>{{ qualityData?.correctSituation }}<span> %</span></p>
|
<p>{{ qualityData?.correctSituation }}<span> %</span></p>
|
||||||
</div>
|
</div>
|
||||||
@ -126,9 +126,9 @@
|
|||||||
<div class="qualityItem flex items-center">
|
<div class="qualityItem flex items-center">
|
||||||
<div>
|
<div>
|
||||||
<img src="@/assets/images/timeIcon.png" alt="" />
|
<img src="@/assets/images/timeIcon.png" alt="" />
|
||||||
<span class="text-white qualityTime">{{ item.createTime }}</span>
|
<span class="text-white qualityTime">{{ parseTime(item.createdAt, '{y}-{m}-{d}') }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-#43E2CB record">{{ item.inspectionTypeLabel }}</div>
|
<div class="text-#43E2CB record">{{ item.dictLabel }}</div>
|
||||||
<div class="text-#E6F7FF text-truncate">
|
<div class="text-#E6F7FF text-truncate">
|
||||||
<el-tooltip :content="item.inspectionHeadline" placement="top"> {{ item.inspectionHeadline }}</el-tooltip>
|
<el-tooltip :content="item.inspectionHeadline" placement="top"> {{ item.inspectionHeadline }}</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
@ -162,8 +162,17 @@ import * as echarts from 'echarts';
|
|||||||
|
|
||||||
import { projectNewsVO, QualityVO, safetyInspectionVO } from '@/api/gis/type';
|
import { projectNewsVO, QualityVO, safetyInspectionVO } from '@/api/gis/type';
|
||||||
import { useUserStoreHook } from '@/store/modules/user';
|
import { useUserStoreHook } from '@/store/modules/user';
|
||||||
import { getQualityList, getprojectNewsDetailList, getprojectNewsList, getsafetyInspectionList } from '@/api/gis';
|
import {
|
||||||
|
getProgressList,
|
||||||
|
getQualityList,
|
||||||
|
getQualityMsg,
|
||||||
|
getprojectNewsDetailList,
|
||||||
|
getprojectNewsList,
|
||||||
|
getsafetyInspectionList,
|
||||||
|
getsafetyInspectionMsg
|
||||||
|
} from '@/api/gis';
|
||||||
import AutoScroller from './autoScroller.vue';
|
import AutoScroller from './autoScroller.vue';
|
||||||
|
import { formatDate, formatTime } from '@/utils';
|
||||||
const userStore = useUserStoreHook();
|
const userStore = useUserStoreHook();
|
||||||
type EChartsOption = echarts.EChartsOption;
|
type EChartsOption = echarts.EChartsOption;
|
||||||
const option = ref<EChartsOption>(null);
|
const option = ref<EChartsOption>(null);
|
||||||
@ -192,6 +201,10 @@ const currentProject = computed(() => userStore.selectedProject);
|
|||||||
const qualityData = ref<QualityVO>({ list: [], correctSituation: null, count: null });
|
const qualityData = ref<QualityVO>({ list: [], correctSituation: null, count: null });
|
||||||
const projectNewsData = ref<projectNewsVO[]>([]);
|
const projectNewsData = ref<projectNewsVO[]>([]);
|
||||||
const NewsDetailMain = ref<string>(null);
|
const NewsDetailMain = ref<string>(null);
|
||||||
|
const progressData = ref<any[]>([]); // 进度管理数据
|
||||||
|
const progressDataAxis = computed(() => progressData.value.map((item) => item.name)); //材料x轴数据
|
||||||
|
const progressPutData = computed(() => progressData.value.map((item) => item.total)); //柱状图领用量数据
|
||||||
|
const progressOutData = computed(() => progressData.value.map((item) => item.finished)); //柱状图出库量数据
|
||||||
const safetyInspectionData = ref<safetyInspectionVO>({
|
const safetyInspectionData = ref<safetyInspectionVO>({
|
||||||
teamMeetingCount: null,
|
teamMeetingCount: null,
|
||||||
safetyInspectionCount: null,
|
safetyInspectionCount: null,
|
||||||
@ -205,42 +218,49 @@ const classOptions = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//获取质量信息
|
//获取质量信息
|
||||||
const getQualityData = async () => {
|
const getQualityData = async (type: string) => {
|
||||||
const res = await getQualityList({ projectId: currentProject.value.id });
|
const res = await getQualityList({ projectId: currentProject.value.goId, type });
|
||||||
if (res.code !== 200) return;
|
if (res.code !== 0) return;
|
||||||
qualityData.value = res.data;
|
qualityData.value.list = res.data.list ? res.data.list : [];
|
||||||
|
const resCounts = await getQualityMsg({ projectId: currentProject.value.goId });
|
||||||
|
if (resCounts.code !== 0) return;
|
||||||
|
qualityData.value.count = resCounts.data.inspectionRecord;
|
||||||
|
qualityData.value.correctSituation = resCounts.data.reorganizeTheSituation;
|
||||||
};
|
};
|
||||||
|
|
||||||
//获取大屏项目新闻列表
|
//获取大屏项目新闻列表
|
||||||
const getProjectNewsData = async () => {
|
const getProjectNewsData = async () => {
|
||||||
const res = await getprojectNewsList({ projectId: currentProject.value.id });
|
const res = await getprojectNewsList({ projectId: currentProject.value.goId, pageSize: 100000000, pageNum: 1 });
|
||||||
if (res.code !== 200) return;
|
if (res.code !== 0) return;
|
||||||
projectNewsData.value = res.data;
|
projectNewsData.value = res.data.list;
|
||||||
|
};
|
||||||
|
|
||||||
|
//进度管理
|
||||||
|
const getProgressData = async () => {
|
||||||
|
const res = await getProgressList();
|
||||||
|
if (res.code !== 0) return;
|
||||||
|
progressData.value = res.data.progress;
|
||||||
|
initUserChart();
|
||||||
};
|
};
|
||||||
|
|
||||||
//查询大屏安全信息
|
//查询大屏安全信息
|
||||||
const getsafetyInspectionData = async () => {
|
const getsafetyInspectionData = async (type: string) => {
|
||||||
const res = await getsafetyInspectionList({ projectId: currentProject.value.id });
|
const res = await getsafetyInspectionList({ projectId: currentProject.value.goId, type });
|
||||||
if (res.code !== 200) return;
|
if (res.code !== 0) return;
|
||||||
safetyInspectionData.value = res.data;
|
safetyInspectionData.value.teamMeetingList = res.data.list ? res.data.list : [];
|
||||||
|
const resCounts = await getsafetyInspectionMsg({ projectId: currentProject.value.goId });
|
||||||
|
if (resCounts.code !== 0) return;
|
||||||
|
safetyInspectionData.value.teamMeetingCount = resCounts.data.teamMeeting;
|
||||||
|
safetyInspectionData.value.safetyInspectionCount = resCounts.data.inspectionRecord;
|
||||||
|
safetyInspectionData.value.correctSituationCount = resCounts.data.reorganizeTheSituation;
|
||||||
};
|
};
|
||||||
|
|
||||||
const safetyData = ref([]);
|
|
||||||
new Array(10).fill(0).forEach((item) => {
|
|
||||||
safetyData.value.push({
|
|
||||||
id: 1,
|
|
||||||
name: '站班会',
|
|
||||||
teamName: '测试组',
|
|
||||||
meetingDate: '2024-03-18'
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
const onMore = async (index, isShow, id?) => {
|
const onMore = async (index, isShow, id?) => {
|
||||||
if (isShow) {
|
if (isShow) {
|
||||||
newsScroller.value.pause();
|
newsScroller.value.pause();
|
||||||
projectNewsData.value[index].show = true;
|
projectNewsData.value[index].show = true;
|
||||||
const res = await getprojectNewsDetailList(id);
|
const res = await getprojectNewsDetailList(id);
|
||||||
NewsDetailMain.value = res.data.content;
|
NewsDetailMain.value = res.data.richText;
|
||||||
newsDetailDialog.value = true;
|
newsDetailDialog.value = true;
|
||||||
} else {
|
} else {
|
||||||
newsScroller.value.resume();
|
newsScroller.value.resume();
|
||||||
@ -253,7 +273,7 @@ const initUserChart = () => {
|
|||||||
let chartDom = document.getElementById('userMain');
|
let chartDom = document.getElementById('userMain');
|
||||||
myMachineryChart.value = echarts.init(chartDom);
|
myMachineryChart.value = echarts.init(chartDom);
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
let dataAxis = ['桩点浇筑', '支架安装', '组件安装', '箱变安装'];
|
let dataAxis = progressDataAxis.value;
|
||||||
option.value = {
|
option.value = {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
@ -320,7 +340,7 @@ const initUserChart = () => {
|
|||||||
emphasis: {
|
emphasis: {
|
||||||
focus: 'series'
|
focus: 'series'
|
||||||
},
|
},
|
||||||
data: [120, 132, 101, 134],
|
data: progressOutData.value,
|
||||||
showBackground: true,
|
showBackground: true,
|
||||||
barWidth: 8,
|
barWidth: 8,
|
||||||
backgroundStyle: {
|
backgroundStyle: {
|
||||||
@ -353,10 +373,10 @@ const handleResize = () => {
|
|||||||
const debouncedHandleResize = debounce(handleResize, 300);
|
const debouncedHandleResize = debounce(handleResize, 300);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
initUserChart();
|
getProgressData();
|
||||||
getQualityData();
|
getQualityData('2');
|
||||||
getProjectNewsData();
|
getProjectNewsData();
|
||||||
getsafetyInspectionData();
|
getsafetyInspectionData('1');
|
||||||
window.addEventListener('resize', debouncedHandleResize);
|
window.addEventListener('resize', debouncedHandleResize);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -485,6 +505,7 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
.qualityNum {
|
.qualityNum {
|
||||||
width: vw(99);
|
width: vw(99);
|
||||||
|
cursor: pointer;
|
||||||
height: vh(53);
|
height: vh(53);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
div {
|
div {
|
||||||
@ -577,7 +598,7 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
.safetyData-item {
|
.safetyData-item {
|
||||||
height: vh(53);
|
height: vh(53);
|
||||||
|
cursor: pointer;
|
||||||
> div {
|
> div {
|
||||||
> span {
|
> span {
|
||||||
font-size: vw(14);
|
font-size: vw(14);
|
||||||
@ -756,7 +777,12 @@ p {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.teamWidth {
|
.teamWidth {
|
||||||
width: vw(114);
|
width: vw(144);
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,24 +13,24 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="title">XXX智慧工地管理平台</div>
|
<div class="title">XXX智慧工地管理平台</div>
|
||||||
<div class="calendar flex items-center">
|
<div class="calendar flex items-center">
|
||||||
<WeatherListScroll :items="weatherData" class="weatherList" :interval="3500" v-if="weatherData.length">
|
<!-- <WeatherListScroll :items="weatherData" class="weatherList" :interval="3500" v-if="weatherData.length">
|
||||||
<template #default="{ item, index }">
|
<template #default="{ item, index }">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<div class="Weather text-white flex items-center">
|
<div class="Weather text-white flex items-center">
|
||||||
<img :src="`../../../src/assets/images/${weatherimgUrl(item)}.png`" alt="" />
|
<img :src="`../../../src/assets/images/${weatherimgUrl(item)}.png`" alt="" />
|
||||||
<div>
|
<div>
|
||||||
<div class="textBlack">{{ item.dayStatus + ' ' }} </div>
|
<div class="textBlack">{{ item.textDay + ' ' }} </div>
|
||||||
<div class="robotocondensed">{{ item.tempMin }}°/{{ item.tempMax }}°</div>
|
<div class="robotocondensed">{{ item.tempMin }}°/{{ item.tempMax }}°</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="weeks">
|
<div class="weeks">
|
||||||
<span class="textBlack">{{ item.week }} (</span>
|
<span class="textBlack">{{ week(item.fxDate) }} (</span>
|
||||||
<span class="robotocondensed">{{ item.date }}</span>
|
<span class="robotocondensed">{{ item.fxDate }}</span>
|
||||||
<span class="textBlack">)</span>
|
<span class="textBlack">)</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</WeatherListScroll>
|
</WeatherListScroll> -->
|
||||||
<div class="Segmentation">
|
<div class="Segmentation">
|
||||||
<div class="bg-#43E2CB"></div>
|
<div class="bg-#43E2CB"></div>
|
||||||
<div class="bg-#43E2CB"></div>
|
<div class="bg-#43E2CB"></div>
|
||||||
@ -72,6 +72,11 @@ const userStore = useUserStoreHook();
|
|||||||
const currentProject = computed(() => userStore.selectedProject);
|
const currentProject = computed(() => userStore.selectedProject);
|
||||||
const weatherData = ref([]);
|
const weatherData = ref([]);
|
||||||
const safetyDay = ref(null);
|
const safetyDay = ref(null);
|
||||||
|
const week = computed(() => (time: string) => {
|
||||||
|
const date = new Date(time);
|
||||||
|
const days = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
|
||||||
|
return days[date.getDay()];
|
||||||
|
});
|
||||||
const goHome = () => {
|
const goHome = () => {
|
||||||
let routeUrl = router.resolve({
|
let routeUrl = router.resolve({
|
||||||
path: '/index'
|
path: '/index'
|
||||||
@ -79,45 +84,52 @@ const goHome = () => {
|
|||||||
window.open(routeUrl.href, 'index');
|
window.open(routeUrl.href, 'index');
|
||||||
};
|
};
|
||||||
//获取天气
|
//获取天气
|
||||||
const getweatherData = async () => {
|
// const getweatherData = async () => {
|
||||||
const res = await getweatherList(currentProject.value.id);
|
// const res = await getweatherList();
|
||||||
weatherData.value = res.data;
|
// weatherData.value = res.data.daily;
|
||||||
};
|
// };
|
||||||
//获取生产天数
|
//获取生产天数
|
||||||
const getProductionDays = async () => {
|
const getProductionDays = async () => {
|
||||||
const res = await getSafetyDay(currentProject.value.id);
|
const start = new Date('2024-01-01');
|
||||||
safetyDay.value = res.data.safetyDay.toLocaleString();
|
const today = new Date();
|
||||||
|
|
||||||
|
// 去除时分秒影响,仅比对日期
|
||||||
|
start.setHours(0, 0, 0, 0);
|
||||||
|
today.setHours(0, 0, 0, 0);
|
||||||
|
|
||||||
|
const diffTime = today.getTime() - start.getTime();
|
||||||
|
safetyDay.value = Math.floor(diffTime / (1000 * 60 * 60 * 24));
|
||||||
};
|
};
|
||||||
//获取白天或夜晚
|
//获取白天或夜晚
|
||||||
const weatherimgUrl = computed(() => (item) => {
|
// const weatherimgUrl = computed(() => (item) => {
|
||||||
let startTime = item.sunRise; // 开始时间
|
// let startTime = item.sunrise; // 开始时间
|
||||||
let endTime = item.sunSet; // 结束时间
|
// let endTime = item.sunset; // 结束时间
|
||||||
// 获取当前时间
|
// // 获取当前时间
|
||||||
const now = new Date();
|
// const now = new Date();
|
||||||
|
|
||||||
// 解析开始时间和结束时间(格式:HH:MM)
|
// // 解析开始时间和结束时间(格式:HH:MM)
|
||||||
const [startHours, startMinutes] = startTime.split(':').map(Number);
|
// const [startHours, startMinutes] = startTime.split(':').map(Number);
|
||||||
const [endHours, endMinutes] = endTime.split(':').map(Number);
|
// const [endHours, endMinutes] = endTime.split(':').map(Number);
|
||||||
|
|
||||||
// 创建今天的开始时间和结束时间对象
|
// // 创建今天的开始时间和结束时间对象
|
||||||
const start = new Date(now.getFullYear(), now.getMonth(), now.getDate(), startHours, startMinutes);
|
// const start = new Date(now.getFullYear(), now.getMonth(), now.getDate(), startHours, startMinutes);
|
||||||
const end = new Date(now.getFullYear(), now.getMonth(), now.getDate(), endHours, endMinutes);
|
// const end = new Date(now.getFullYear(), now.getMonth(), now.getDate(), endHours, endMinutes);
|
||||||
|
|
||||||
// 如果结束时间早于开始时间,将结束时间设为明天
|
// // 如果结束时间早于开始时间,将结束时间设为明天
|
||||||
if (end <= start) {
|
// if (end <= start) {
|
||||||
end.setDate(end.getDate() + 1);
|
// end.setDate(end.getDate() + 1);
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 判断当前时间是否在区间内
|
// // 判断当前时间是否在区间内
|
||||||
if (now >= start && now <= end) {
|
// if (now >= start && now <= end) {
|
||||||
return item.dayIcon;
|
// return item.dayIcon;
|
||||||
} else {
|
// } else {
|
||||||
return item.nightIcon;
|
// return item.nightIcon;
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getweatherData();
|
// getweatherData();
|
||||||
getProductionDays();
|
getProductionDays();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||||
<el-form-item label="施工人员" prop="memberName">
|
<el-form-item label="施工人员" prop="userName">
|
||||||
<el-input v-model="queryParams.memberName" placeholder="请输入施工人员" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.userName" placeholder="请输入施工人员" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="岗位" prop="postId">
|
<el-form-item label="岗位" prop="postId">
|
||||||
<el-select v-model="queryParams.postId" clearable placeholder="请选择岗位">
|
<el-select v-model="queryParams.postId" clearable placeholder="请选择岗位">
|
||||||
@ -53,25 +53,12 @@
|
|||||||
<el-table size="small" v-loading="loading" :data="projectTeamMemberList" @selection-change="handleSelectionChange">
|
<el-table size="small" v-loading="loading" :data="projectTeamMemberList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="序号" type="index" width="60" align="center" />
|
<el-table-column label="序号" type="index" width="60" align="center" />
|
||||||
<el-table-column label="施工人员" align="center" prop="memberName" />
|
<el-table-column label="施工人员" align="center" prop="userName" />
|
||||||
<el-table-column label="岗位" align="center" prop="postId">
|
<el-table-column label="岗位" align="center" prop="postId">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="user_post_type" :value="scope.row.postId" />
|
<dict-tag :options="user_post_type" :value="scope.row.postId" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-space wrap>
|
|
||||||
<el-button link type="success" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['project:projectTeamMember:edit']">
|
|
||||||
修改
|
|
||||||
</el-button>
|
|
||||||
<el-button link type="danger" icon="Position" @click="handleExit(scope.row)" v-hasPermi="['project:projectTeamMember:remove']">
|
|
||||||
退场
|
|
||||||
</el-button>
|
|
||||||
</el-space>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination
|
<pagination
|
||||||
size="small"
|
size="small"
|
||||||
@ -100,12 +87,10 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="岗位" prop="postId">
|
<el-form-item label="岗位" prop="postId">
|
||||||
<el-select v-model="form.postId" clearable placeholder="请选择岗位">
|
<el-select v-model="form.postId" clearable placeholder="请选择岗位">
|
||||||
<el-option v-for="item in user_post_type" :key="item.value" :label="item.label" :value="item.value" />
|
<el-option :key="4" label="普通员工" :value="4" />
|
||||||
|
<el-option :key="10" label="班组长" :value="10" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="remark">
|
|
||||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
@ -174,7 +159,7 @@ const props = defineProps<Props>();
|
|||||||
// 是否可见
|
// 是否可见
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const initFormData: ProjectTeamMemberForm = {
|
const initFormData: ProjectTeamMemberForm = {
|
||||||
projectId: currentProject.value.id
|
projectId: currentProject.value.goId
|
||||||
};
|
};
|
||||||
const data = reactive<PageData<ProjectTeamMemberForm, ProjectTeamMemberQuery>>({
|
const data = reactive<PageData<ProjectTeamMemberForm, ProjectTeamMemberQuery>>({
|
||||||
form: { ...initFormData },
|
form: { ...initFormData },
|
||||||
@ -183,7 +168,7 @@ const data = reactive<PageData<ProjectTeamMemberForm, ProjectTeamMemberQuery>>({
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
orderByColumn: 'createTime',
|
orderByColumn: 'createTime',
|
||||||
isAsc: 'desc',
|
isAsc: 'desc',
|
||||||
projectId: currentProject.value.id
|
projectId: currentProject.value.goId
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
id: [{ required: true, message: '主键id不能为空', trigger: 'blur' }]
|
id: [{ required: true, message: '主键id不能为空', trigger: 'blur' }]
|
||||||
@ -210,10 +195,12 @@ const { queryParams, form, rules, memberRules } = toRefs(data);
|
|||||||
const projectTeamMemberList = ref<ProjectTeamMemberVO[]>([]);
|
const projectTeamMemberList = ref<ProjectTeamMemberVO[]>([]);
|
||||||
/** 查询项目班组下的成员列表 */
|
/** 查询项目班组下的成员列表 */
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
|
console.log(111);
|
||||||
|
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const res = await listProjectTeamMember({ ...queryParams.value, teamId: props.projectTeamVo.id });
|
const res = await listProjectTeamMember({ ...queryParams.value, teamId: props.projectTeamVo.id });
|
||||||
projectTeamMemberList.value = res.rows;
|
projectTeamMemberList.value = res.data.list;
|
||||||
total.value = res.total;
|
total.value = res.data.total;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -263,7 +250,7 @@ const userQueryParams = ref<ConstructionUserQuery>({
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
orderByColumn: 'createTime',
|
orderByColumn: 'createTime',
|
||||||
isAsc: 'desc',
|
isAsc: 'desc',
|
||||||
projectId: currentProject.value.id
|
projectId: currentProject.value.goId
|
||||||
});
|
});
|
||||||
|
|
||||||
// 获取不在当前班组的成员
|
// 获取不在当前班组的成员
|
||||||
@ -327,7 +314,7 @@ const submitMemberForm = async () => {
|
|||||||
/** 退场按钮操作 */
|
/** 退场按钮操作 */
|
||||||
const handleExit = async (row?: ProjectTeamMemberVO) => {
|
const handleExit = async (row?: ProjectTeamMemberVO) => {
|
||||||
const _ids = row?.id || ids.value;
|
const _ids = row?.id || ids.value;
|
||||||
memberForm.userName = row?.memberName;
|
memberForm.userName = row?.userName;
|
||||||
console.log('🚀 ~ handleDelete ~ row:', row);
|
console.log('🚀 ~ handleDelete ~ row:', row);
|
||||||
memberForm.id = row?.id;
|
memberForm.id = row?.id;
|
||||||
memberStatus.value = true;
|
memberStatus.value = true;
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||||
<el-form-item label="班组名称" prop="teamName">
|
<el-form-item label="班组名称" prop="name">
|
||||||
<el-input v-model="queryParams.teamName" placeholder="请输入班组名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.name" placeholder="请输入班组名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
@ -42,18 +42,17 @@
|
|||||||
<el-table v-loading="loading" :data="projectTeamList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="projectTeamList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="序号" type="index" width="60" align="center" />
|
<el-table-column label="序号" type="index" width="60" align="center" />
|
||||||
<el-table-column label="班组名称" align="center" prop="teamName" />
|
<el-table-column label="班组名称" align="center" prop="name" />
|
||||||
<el-table-column label="班组人数" align="center" prop="peopleNumber">
|
<!-- <el-table-column label="班组人数" align="center" prop="peopleNumber">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-link type="primary" :underline="false" @click="handleUserList(scope.row)"> {{ scope.row.peopleNumber }}</el-link>
|
<el-link type="primary" :underline="false" @click="handleUserList(scope.row)"> {{ scope.row.peopleNumber }}</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column label="打卡范围" align="center" prop="isClockIn">
|
<el-table-column label="打卡范围" align="center" prop="isClockIn">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="team_clock_type" :value="scope.row.isClockIn" />
|
<dict-tag :options="team_clock_type" :value="scope.row.isClockIn" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180" />
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@ -72,17 +71,14 @@
|
|||||||
<!-- 添加或修改项目班组对话框 -->
|
<!-- 添加或修改项目班组对话框 -->
|
||||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||||
<el-form ref="projectTeamFormRef" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="projectTeamFormRef" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="班组名称" prop="teamName">
|
<el-form-item label="班组名称" prop="name">
|
||||||
<el-input v-model="form.teamName" placeholder="请输入班组名称" />
|
<el-input v-model="form.name" placeholder="请输入班组名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="打卡范围" prop="isClockIn">
|
<el-form-item label="打卡范围" prop="isClockIn">
|
||||||
<el-select v-model="form.isClockIn" clearable placeholder="请选择打卡范围">
|
<el-select v-model="form.isClockIn" clearable placeholder="请选择打卡范围">
|
||||||
<el-option v-for="item in team_clock_type" :key="item.value" :label="item.label" :value="item.value" />
|
<el-option v-for="item in team_clock_type" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="remark">
|
|
||||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
@ -91,7 +87,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog :title="currentRow.teamName" v-model="visible" width="1000px">
|
<el-dialog :title="currentRow.name" v-model="visible" width="1000px">
|
||||||
<user-list-dialog :projectTeamVo="currentRow" />
|
<user-list-dialog :projectTeamVo="currentRow" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
@ -120,7 +116,7 @@ const total = ref(0);
|
|||||||
const currentRow = ref<ProjectTeamVO>({
|
const currentRow = ref<ProjectTeamVO>({
|
||||||
id: undefined,
|
id: undefined,
|
||||||
projectId: undefined,
|
projectId: undefined,
|
||||||
teamName: undefined,
|
name: undefined,
|
||||||
isClockIn: undefined,
|
isClockIn: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
createTime: undefined
|
createTime: undefined
|
||||||
@ -136,8 +132,8 @@ const dialog = reactive<DialogOption>({
|
|||||||
|
|
||||||
const initFormData: ProjectTeamForm = {
|
const initFormData: ProjectTeamForm = {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
projectId: currentProject.value.id,
|
projectId: currentProject.value.goId,
|
||||||
teamName: undefined,
|
name: undefined,
|
||||||
isClockIn: undefined,
|
isClockIn: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
peopleNumber: undefined
|
peopleNumber: undefined
|
||||||
@ -149,8 +145,8 @@ const data = reactive<PageData<ProjectTeamForm, ProjectTeamQuery>>({
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
orderByColumn: 'createTime',
|
orderByColumn: 'createTime',
|
||||||
isAsc: 'desc',
|
isAsc: 'desc',
|
||||||
projectId: currentProject.value.id,
|
projectId: currentProject.value.goId,
|
||||||
teamName: undefined,
|
name: undefined,
|
||||||
isClockIn: undefined,
|
isClockIn: undefined,
|
||||||
params: {},
|
params: {},
|
||||||
peopleNumber: undefined
|
peopleNumber: undefined
|
||||||
@ -167,8 +163,8 @@ const { queryParams, form, rules } = toRefs(data);
|
|||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const res = await listProjectTeam(queryParams.value);
|
const res = await listProjectTeam(queryParams.value);
|
||||||
projectTeamList.value = res.rows;
|
projectTeamList.value = res.data.list;
|
||||||
total.value = res.total;
|
total.value = res.data.total;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -232,7 +228,7 @@ const submitForm = () => {
|
|||||||
projectTeamFormRef.value?.validate(async (valid: boolean) => {
|
projectTeamFormRef.value?.validate(async (valid: boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
buttonLoading.value = true;
|
buttonLoading.value = true;
|
||||||
form.value.projectId = currentProject.value.id;
|
form.value.projectId = currentProject.value.goId;
|
||||||
if (form.value.id) {
|
if (form.value.id) {
|
||||||
await updateProjectTeam(form.value).finally(() => (buttonLoading.value = false));
|
await updateProjectTeam(form.value).finally(() => (buttonLoading.value = false));
|
||||||
} else {
|
} else {
|
||||||
@ -266,7 +262,7 @@ const handleExport = () => {
|
|||||||
};
|
};
|
||||||
//监听项目id刷新数据
|
//监听项目id刷新数据
|
||||||
const listeningProject = watch(
|
const listeningProject = watch(
|
||||||
() => currentProject.value.id,
|
() => currentProject.value.goId,
|
||||||
(nid, oid) => {
|
(nid, oid) => {
|
||||||
queryParams.value.projectId = nid;
|
queryParams.value.projectId = nid;
|
||||||
form.value.projectId = nid;
|
form.value.projectId = nid;
|
||||||
|
@ -5,18 +5,18 @@
|
|||||||
<!-- <div class="resultIcon"><img src="../../../../assets/icons/svg/successLogo.png" alt="" /></div> -->
|
<!-- <div class="resultIcon"><img src="../../../../assets/icons/svg/successLogo.png" alt="" /></div> -->
|
||||||
<h2 style="text-align: center; margin-top: 5px; font-weight: bold">施工日志</h2>
|
<h2 style="text-align: center; margin-top: 5px; font-weight: bold">施工日志</h2>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12" style="text-align: left">记录人:{{ safetyInspectionDetail?.createBy }}</el-col>
|
<el-col :span="12" style="text-align: left">记录人:{{ safetyInspectionDetail?.createdBy }}</el-col>
|
||||||
<el-col :span="12" style="text-align: right">记录时间:{{ safetyInspectionDetail?.createTime }}</el-col>
|
<el-col :span="12" style="text-align: right">记录时间:{{ safetyInspectionDetail?.createdAt }}</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-descriptions :column="2" border style="margin-top: 8px" label-width="160px" size="large">
|
<el-descriptions :column="2" border style="margin-top: 8px" label-width="160px" size="large">
|
||||||
<el-descriptions-item label-align="center" label="项目名称" :span="2" class-name="zebra"
|
<el-descriptions-item label-align="center" label="项目名称" :span="2" class-name="zebra"
|
||||||
>{{ safetyInspectionDetail?.projectName }}
|
>{{ safetyInspectionDetail?.projectName }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label-align="center" label="发生日期" :span="2" label-class-name="white">
|
<el-descriptions-item label-align="center" label="发生日期" :span="2" label-class-name="white">
|
||||||
{{ parseTime(safetyInspectionDetail?.happenDate, '{y}-{m}-{d}') }}
|
{{ parseTime(safetyInspectionDetail?.dateOfOccurrence, '{y}-{m}-{d}') }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label-align="center" :span="2" label="生产情况记录" class-name="zebra">
|
<el-descriptions-item label-align="center" :span="2" label="生产情况记录" class-name="zebra">
|
||||||
{{ safetyInspectionDetail?.productionStatus }}
|
{{ safetyInspectionDetail?.condition }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label-align="center" label="技术质量安全工作" :span="2" label-class-name="white"
|
<el-descriptions-item label-align="center" label="技术质量安全工作" :span="2" label-class-name="white"
|
||||||
>{{ safetyInspectionDetail?.technologyQuality }}
|
>{{ safetyInspectionDetail?.technologyQuality }}
|
||||||
@ -26,102 +26,25 @@
|
|||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label-align="center" :span="2" label="附件" label-class-name="white"
|
<el-descriptions-item label-align="center" :span="2" label="附件" label-class-name="white"
|
||||||
><el-space wrap>
|
><el-space wrap>
|
||||||
<div v-for="item in checkFileList" :key="item.ossId">
|
<div>
|
||||||
<span v-if="['.png', '.jpg', '.jpeg'].includes(item.fileSuffix)">
|
<span>
|
||||||
<image-preview :src="item.url" width="200px" />
|
<image-preview :src="BASE_URL + safetyInspectionDetail?.path" width="200px" />
|
||||||
</span>
|
|
||||||
<span v-else>
|
|
||||||
<el-link :href="`${item.url}`" type="primary" :underline="false" target="_blank">
|
|
||||||
<span> {{ item.originalName }} </span>
|
|
||||||
</el-link>
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</el-space>
|
</el-space>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<!-- <el-descriptions border direction="vertical" size="large">
|
|
||||||
<el-descriptions-item label-align="center" label="巡检结果" class-name="none"></el-descriptions-item>
|
|
||||||
</el-descriptions>
|
|
||||||
<el-descriptions :column="2" border label-width="160px" size="large">
|
|
||||||
<el-descriptions-item label-align="center" label="内容" :span="2" label-class-name="white"
|
|
||||||
>{{ safetyInspectionDetail?.hiddenDanger }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label-align="center" label="检查附件" :span="2" label-class-name="white">
|
|
||||||
<el-space wrap>
|
|
||||||
<div v-for="item in checkFileList" :key="item.ossId">
|
|
||||||
<span v-if="['.png', '.jpg', '.jpeg'].includes(item.fileSuffix)">
|
|
||||||
<image-preview :src="item.url" width="200px" />
|
|
||||||
</span>
|
|
||||||
<span v-else>
|
|
||||||
<el-link :href="`${item.url}`" type="primary" :underline="false" target="_blank">
|
|
||||||
<span> {{ item.originalName }} </span>
|
|
||||||
</el-link>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</el-space>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label-align="center" label="检查状态" :span="2" label-class-name="white">
|
|
||||||
<el-steps style="max-width: 200px" :active="Number(safetyInspectionDetail?.status)" finish-status="success">
|
|
||||||
<el-step v-for="item in safety_inspection_type" :key="item.value" :title="item.label" />
|
|
||||||
</el-steps>
|
|
||||||
</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
|
||||||
<el-descriptions border direction="vertical" size="large">
|
|
||||||
<el-descriptions-item label-align="center" label="整改情况" class-name="none"></el-descriptions-item>
|
|
||||||
</el-descriptions>
|
|
||||||
<el-descriptions :column="2" border label-width="160px" size="large">
|
|
||||||
<el-descriptions-item label-align="center" label="班组" label-class-name="white"
|
|
||||||
>{{ safetyInspectionDetail?.teamName }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label-align="center" label="整改日期" label-class-name="white"
|
|
||||||
>{{ safetyInspectionDetail?.rectificationTime }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label-align="center" label="整改措施及完成情况" :span="2" label-class-name="white">
|
|
||||||
{{ safetyInspectionDetail?.measure }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label-align="center" label="整改附件" :span="2" label-class-name="white">
|
|
||||||
<el-space wrap>
|
|
||||||
<div v-for="item in rectificationFileList" :key="item.ossId">
|
|
||||||
<span v-if="['.png', '.jpg', '.jpeg'].includes(item.fileSuffix)">
|
|
||||||
<image-preview :src="item.url" width="200px" />
|
|
||||||
</span>
|
|
||||||
<span v-else>
|
|
||||||
<el-link :href="`${item.url}`" :underline="false" target="_blank">
|
|
||||||
<span> {{ item.originalName }} </span>
|
|
||||||
</el-link>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</el-space>
|
|
||||||
</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
|
||||||
<el-descriptions border direction="vertical" size="large">
|
|
||||||
<el-descriptions-item label-align="center" label="复查结果" class-name="none"></el-descriptions-item>
|
|
||||||
</el-descriptions>
|
|
||||||
<el-descriptions :column="2" border label-width="160px" size="large">
|
|
||||||
<el-descriptions-item label-align="center" label="复查人" label-class-name="white"
|
|
||||||
>{{ safetyInspectionDetail?.creatorName }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label-align="center" label="复查日期" label-class-name="white"
|
|
||||||
>{{ safetyInspectionDetail?.reviewTime }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label-align="center" label="复查情况" :span="2" label-class-name="white"
|
|
||||||
>{{ safetyInspectionDetail?.review }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
</el-descriptions> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- </el-card> -->
|
<!-- </el-card> -->
|
||||||
<div class="dialog-footer">
|
<!-- <div class="dialog-footer">
|
||||||
<div class="btn-item" @click="handleExport">
|
<div class="btn-item" @click="handleExport">
|
||||||
<img src="../../../../assets/icons/svg/derived.png" />
|
<img src="../../../../assets/icons/svg/derived.png" />
|
||||||
<span>导出</span>
|
<span>导出</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="btn-item" v-print="'#printMe'">
|
|
||||||
<img src="../../../../assets/icons/svg/print.png" />
|
</div> -->
|
||||||
<span>打印</span>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
@ -140,19 +63,15 @@ const currentProject = computed(() => userStore.selectedProject);
|
|||||||
interface Props {
|
interface Props {
|
||||||
qualityConstructionId?: string | number;
|
qualityConstructionId?: string | number;
|
||||||
}
|
}
|
||||||
|
const BASE_URL = import.meta.env.VITE_BASE_URL_GO;
|
||||||
const props = defineProps<Props>();
|
const props = defineProps<Props>();
|
||||||
|
|
||||||
//获取详情
|
//获取详情
|
||||||
const get = async () => {
|
const get = async () => {
|
||||||
const res = await getQualityConstructionLog(props.qualityConstructionId);
|
const res = await getQualityConstructionLog(props.qualityConstructionId);
|
||||||
if (res.data && res.code === 200) {
|
if (res.data && res.code === 0) {
|
||||||
safetyInspectionDetail.value = res.data;
|
safetyInspectionDetail.value = res.data.dataEntity;
|
||||||
|
|
||||||
if (res.data.fileList) {
|
|
||||||
const checkFileRes = await listByIds(res.data.file.split(','));
|
|
||||||
checkFileList.value = checkFileRes.data;
|
|
||||||
}
|
|
||||||
// if (res.data.rectificationFile) {
|
// if (res.data.rectificationFile) {
|
||||||
// const rectificationFileRes = await listByIds(res.data.rectificationFile.split(','));
|
// const rectificationFileRes = await listByIds(res.data.rectificationFile.split(','));
|
||||||
// rectificationFileList.value = rectificationFileRes.data;
|
// rectificationFileList.value = rectificationFileRes.data;
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||||
<el-form-item label="发生日期" prop="happenDate">
|
<el-form-item label="发生日期" prop="dateOfOccurrence">
|
||||||
<el-date-picker clearable v-model="queryParams.happenDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择发生日期" />
|
<el-date-picker clearable v-model="queryParams.dateOfOccurrence" type="date" value-format="YYYY-MM-DD" placeholder="请选择发生日期" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
@ -19,42 +19,21 @@
|
|||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<!-- <el-col :span="1.5">
|
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['quality:qualityConstructionLog:add']">新增</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['quality:qualityConstructionLog:edit']">修改</el-button>
|
|
||||||
</el-col> -->
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="Delete"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete()"
|
|
||||||
v-hasPermi="['quality:qualityConstructionLog:remove']"
|
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
|
||||||
<!-- <el-col :span="1.5">
|
|
||||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['quality:qualityConstructionLog:export']">导出</el-button>
|
|
||||||
</el-col> -->
|
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="qualityConstructionLogList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="qualityConstructionLogList">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
|
||||||
<el-table-column label="序号" align="center" type="index" width="70" />
|
<el-table-column label="序号" align="center" type="index" width="70" />
|
||||||
|
|
||||||
<el-table-column label="生产情况" align="center" prop="productionStatus" width="410">
|
<el-table-column label="生产情况" align="center" prop="condition" width="410">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tooltip placement="top" effect="dark">
|
<el-tooltip placement="top" effect="dark">
|
||||||
<template #content>
|
<template #content>
|
||||||
<div class="w-670px">{{ scope.row.productionStatus }}</div>
|
<div class="w-670px">{{ scope.row.condition }}</div>
|
||||||
</template>
|
</template>
|
||||||
<el-text truncated>
|
<el-text truncated>
|
||||||
{{ scope.row.productionStatus }}
|
{{ scope.row.condition }}
|
||||||
</el-text>
|
</el-text>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</template>
|
</template>
|
||||||
@ -71,19 +50,15 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="发生日期" align="center" prop="happenDate" width="180">
|
<el-table-column label="发生日期" align="center" prop="dateOfOccurrence" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ parseTime(scope.row.happenDate, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.dateOfOccurrence, '{y}-{m}-{d}') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创建者" align="center" prop="createBy" />
|
<el-table-column label="创建者" align="center" prop="createdBy" />
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" icon="View" @click="handleUpdate(scope.row)">详情</el-button>
|
<el-button link type="primary" icon="View" @click="handleUpdate(scope.row)">详情</el-button>
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['quality:qualityConstructionLog:remove']">
|
|
||||||
删除
|
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -133,7 +108,7 @@ const dialog = reactive<DialogOption>({
|
|||||||
|
|
||||||
const initFormData: QualityConstructionLogForm = {
|
const initFormData: QualityConstructionLogForm = {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
projectId: currentProject.value.id,
|
projectId: currentProject.value.goId,
|
||||||
happenDate: undefined,
|
happenDate: undefined,
|
||||||
productionStatus: undefined,
|
productionStatus: undefined,
|
||||||
technologyQuality: undefined,
|
technologyQuality: undefined,
|
||||||
@ -145,7 +120,7 @@ const data = reactive<PageData<QualityConstructionLogForm, QualityConstructionLo
|
|||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
projectId: currentProject.value.id,
|
projectId: currentProject.value.goId,
|
||||||
happenDate: undefined,
|
happenDate: undefined,
|
||||||
params: {}
|
params: {}
|
||||||
},
|
},
|
||||||
@ -162,8 +137,8 @@ const { queryParams, form, rules } = toRefs(data);
|
|||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const res = await listQualityConstructionLog(queryParams.value);
|
const res = await listQualityConstructionLog(queryParams.value);
|
||||||
qualityConstructionLogList.value = res.rows;
|
qualityConstructionLogList.value = res.data.list;
|
||||||
total.value = res.total;
|
total.value = res.data.total;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -251,7 +226,7 @@ const handleExport = () => {
|
|||||||
|
|
||||||
//监听项目id刷新数据
|
//监听项目id刷新数据
|
||||||
const listeningProject = watch(
|
const listeningProject = watch(
|
||||||
() => currentProject.value.id,
|
() => currentProject.value.goId,
|
||||||
(nid, oid) => {
|
(nid, oid) => {
|
||||||
queryParams.value.projectId = nid;
|
queryParams.value.projectId = nid;
|
||||||
form.value.projectId = nid;
|
form.value.projectId = nid;
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
<div class="resultIcon"><img :src="'../../../../../src/assets/icons/svg/' + inspectionType + '.png'" alt="" /></div>
|
<div class="resultIcon"><img :src="'../../../../../src/assets/icons/svg/' + inspectionType + '.png'" alt="" /></div>
|
||||||
<h2 style="text-align: center; margin-top: 5px; font-weight: bold">整改通知单</h2>
|
<h2 style="text-align: center; margin-top: 5px; font-weight: bold">整改通知单</h2>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12" style="text-align: left">填报人:{{ safetyInspectionDetail?.createBy }}</el-col>
|
<el-col :span="12" style="text-align: left">填报人:{{ safetyInspectionDetail?.fill }}</el-col>
|
||||||
<el-col :span="12" style="text-align: right">填报时间:{{ safetyInspectionDetail?.createTime }}</el-col>
|
<el-col :span="12" style="text-align: right">填报时间:{{ safetyInspectionDetail?.createdAt }}</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-descriptions :column="2" border style="margin-top: 8px" label-width="160px" size="large">
|
<el-descriptions :column="2" border style="margin-top: 8px" label-width="160px" size="large">
|
||||||
<el-descriptions-item label-align="center" label="检查项目" :span="2" class-name="zebra"
|
<el-descriptions-item label-align="center" label="检查项目" :span="2" class-name="zebra"
|
||||||
@ -16,22 +16,18 @@
|
|||||||
{{ safetyInspectionDetail?.inspectionHeadline }}
|
{{ safetyInspectionDetail?.inspectionHeadline }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label-align="center" label="整改人" class-name="zebra">
|
<el-descriptions-item label-align="center" label="整改人" class-name="zebra">
|
||||||
{{ safetyInspectionDetail?.correctorName }}
|
{{ safetyInspectionDetail?.abarbeitung }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label-align="center" label="整改日期" class-name="zebra">
|
<el-descriptions-item label-align="center" label="整改日期" class-name="zebra">
|
||||||
{{ safetyInspectionDetail?.rectificationTime }}
|
{{ safetyInspectionDetail?.rectificationTime }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label-align="center" label="巡检类型" label-class-name="white">
|
<el-descriptions-item label-align="center" label="巡检类型" label-class-name="white">
|
||||||
<dict-tag :options="quality_inspection_check_type" :value="safetyInspectionDetail?.inspectionType" />
|
{{ safetyInspectionDetail?.dictLabel }}
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label-align="center" label="填报人" label-class-name="white"
|
|
||||||
>{{ safetyInspectionDetail?.createBy }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label-align="center" label="填报日期" class-name="zebra"
|
|
||||||
>{{ safetyInspectionDetail?.createTime }}
|
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label-align="center" label="填报人" label-class-name="white">{{ safetyInspectionDetail?.fill }} </el-descriptions-item>
|
||||||
|
<el-descriptions-item label-align="center" label="填报日期" class-name="zebra">{{ safetyInspectionDetail?.createdAt }} </el-descriptions-item>
|
||||||
<el-descriptions-item label-align="center" label="要求回复期限" class-name="zebra"
|
<el-descriptions-item label-align="center" label="要求回复期限" class-name="zebra"
|
||||||
>{{ parseTime(safetyInspectionDetail?.replyPeriodDate, '{y}-{m}-{d}') }}
|
>{{ parseTime(safetyInspectionDetail?.replyDate, '{y}-{m}-{d}') }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<el-descriptions border direction="vertical" size="large">
|
<el-descriptions border direction="vertical" size="large">
|
||||||
@ -43,13 +39,13 @@
|
|||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label-align="center" label="检查附件" :span="2" label-class-name="white">
|
<el-descriptions-item label-align="center" label="检查附件" :span="2" label-class-name="white">
|
||||||
<el-space wrap>
|
<el-space wrap>
|
||||||
<div v-for="item in checkFileList" :key="item.ossId">
|
<div v-for="item in safetyInspectionDetail?.inspectionccessories" :key="item.id">
|
||||||
<span v-if="['.png', '.jpg', '.jpeg'].includes(item.fileSuffix)">
|
<span v-if="['.png', '.jpg', '.jpeg'].includes(item.fileType)">
|
||||||
<image-preview :src="item.url" width="200px" />
|
<image-preview :src="BASE + item.path" width="200px" />
|
||||||
</span>
|
</span>
|
||||||
<span v-else>
|
<span v-else>
|
||||||
<el-link :href="`${item.url}`" type="primary" :underline="false" target="_blank">
|
<el-link :href="`${BASE + item.path}`" type="primary" :underline="false" target="_blank">
|
||||||
<span> {{ item.originalName }} </span>
|
<span> {{ item.name }} </span>
|
||||||
</el-link>
|
</el-link>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -96,10 +92,10 @@
|
|||||||
|
|
||||||
<!-- </el-card> -->
|
<!-- </el-card> -->
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<div class="btn-item" @click="handleExport">
|
<!-- <div class="btn-item" @click="handleExport">
|
||||||
<img src="../../../../assets/icons/svg/derived.png" />
|
<img src="../../../../assets/icons/svg/derived.png" />
|
||||||
<span>导出</span>
|
<span>导出</span>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="btn-item" v-print="'#printMe'">
|
<div class="btn-item" v-print="'#printMe'">
|
||||||
<img src="../../../../assets/icons/svg/print.png" />
|
<img src="../../../../assets/icons/svg/print.png" />
|
||||||
<span>打印</span>
|
<span>打印</span>
|
||||||
@ -108,9 +104,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { getQualityInspection } from '@/api/quality/qualityInspection';
|
import { downLoadOss, getQualityInspection } from '@/api/quality/qualityInspection';
|
||||||
import { QualityInspectionVO } from '@/api/quality/qualityInspection/types';
|
import { QualityInspectionVO } from '@/api/quality/qualityInspection/types';
|
||||||
import { downLoadOss, listByIds } from '@/api/system/oss';
|
import { listByIds } from '@/api/system/oss';
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
import { dayjs } from 'element-plus';
|
import { dayjs } from 'element-plus';
|
||||||
const { quality_inspection_check_type, quality_inspection_status_type } = toRefs<any>(
|
const { quality_inspection_check_type, quality_inspection_status_type } = toRefs<any>(
|
||||||
@ -124,11 +120,11 @@ const props = defineProps<Props>();
|
|||||||
const safetyInspectionDetail = ref<QualityInspectionVO>();
|
const safetyInspectionDetail = ref<QualityInspectionVO>();
|
||||||
const checkFileList = ref<any[]>();
|
const checkFileList = ref<any[]>();
|
||||||
const rectificationFileList = ref<any[]>();
|
const rectificationFileList = ref<any[]>();
|
||||||
|
const BASE = import.meta.env.VITE_APP_BASE_API_GO;
|
||||||
//检查状态图片
|
//检查状态图片
|
||||||
const inspectionType = computed(() => {
|
const inspectionType = computed(() => {
|
||||||
let imgName = 'successLogo';
|
let imgName = 'successLogo';
|
||||||
if (safetyInspectionDetail.value?.inspectionStatus == '2') imgName = 'rectification';
|
if (safetyInspectionDetail.value?.status == '2') imgName = 'rectification';
|
||||||
if (safetyInspectionDetail.value?.verificationType == '1') imgName = 'successVerification';
|
if (safetyInspectionDetail.value?.verificationType == '1') imgName = 'successVerification';
|
||||||
if (safetyInspectionDetail.value?.verificationType == '2') imgName = 'danggerVerification';
|
if (safetyInspectionDetail.value?.verificationType == '2') imgName = 'danggerVerification';
|
||||||
return imgName;
|
return imgName;
|
||||||
@ -137,8 +133,8 @@ const inspectionType = computed(() => {
|
|||||||
//获取详情
|
//获取详情
|
||||||
const get = async () => {
|
const get = async () => {
|
||||||
const res = await getQualityInspection(props.qualityInspectionDetailId);
|
const res = await getQualityInspection(props.qualityInspectionDetailId);
|
||||||
if (res.data && res.code === 200) {
|
if (res.data && res.code === 0) {
|
||||||
safetyInspectionDetail.value = res.data;
|
safetyInspectionDetail.value = res.data.details;
|
||||||
|
|
||||||
if (res.data.rectificationFileList) {
|
if (res.data.rectificationFileList) {
|
||||||
const checkFileRes = await listByIds(res.data.inspectionFile.split(','));
|
const checkFileRes = await listByIds(res.data.inspectionFile.split(','));
|
||||||
@ -195,7 +191,7 @@ watch(
|
|||||||
}
|
}
|
||||||
|
|
||||||
.dialog-footer {
|
.dialog-footer {
|
||||||
height: 200px;
|
height: 100px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
<el-option v-for="dict in quality_inspection_check_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
<el-option v-for="dict in quality_inspection_check_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="工单状态" prop="inspectionStatus">
|
<el-form-item label="工单状态" prop="status">
|
||||||
<el-select v-model="queryParams.inspectionStatus" placeholder="全部" clearable>
|
<el-select v-model="queryParams.status" placeholder="全部" clearable>
|
||||||
<el-option v-for="dict in quality_inspection_status_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
<el-option v-for="dict in quality_inspection_status_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -26,14 +26,9 @@
|
|||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['quality:qualityInspection:add']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['quality:qualityInspection:add']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="1.5">
|
|
||||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['quality:qualityInspection:edit']"
|
|
||||||
>修改</el-button
|
|
||||||
>
|
|
||||||
</el-col> -->
|
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
@ -47,7 +42,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['quality:qualityInspection:export']">导出</el-button>
|
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['quality:qualityInspection:export']">导出</el-button>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
@ -55,10 +50,10 @@
|
|||||||
<el-table v-loading="loading" :data="qualityInspectionList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="qualityInspectionList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="主键id" align="center" prop="id" v-if="false" />
|
<el-table-column label="主键id" align="center" prop="id" v-if="false" />
|
||||||
<el-table-column label="填报人" align="center" prop="createBy" />
|
<el-table-column label="填报人" align="center" prop="one" />
|
||||||
<el-table-column label="填报时间" align="center" prop="createTime" width="180">
|
<el-table-column label="填报时间" align="center" prop="createdAt" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {hh}:{mm}:{ss}') }}</span>
|
<span>{{ parseTime(scope.row.createdAt, '{y}-{m}-{d} {hh}:{mm}:{ss}') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="巡检标题" align="center" prop="inspectionHeadline" />
|
<el-table-column label="巡检标题" align="center" prop="inspectionHeadline" />
|
||||||
@ -79,14 +74,13 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="整改人" align="center" prop="correctorName" />
|
<el-table-column label="整改人" align="center" prop="two" />
|
||||||
<!-- <el-table-column label="工单状态" align="center" prop="inspectionStatus">
|
<!-- <el-table-column label="工单状态" align="center" prop="status">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="quality_inspection_status_type" :value="scope.row.inspectionStatus" />
|
<dict-tag :options="quality_inspection_status_type" :value="scope.row.status" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<!-- <el-table-column label="创建者" align="center" prop="createBy" /> -->
|
||||||
<el-table-column label="创建者" align="center" prop="createBy" />
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<!-- <el-tooltip content="验证" placement="top">
|
<!-- <el-tooltip content="验证" placement="top">
|
||||||
@ -101,61 +95,12 @@
|
|||||||
<el-button link type="primary" icon="View" @click="handleDetail(scope.row)" v-hasPermi="['quality:qualityInspection:edit']">
|
<el-button link type="primary" icon="View" @click="handleDetail(scope.row)" v-hasPermi="['quality:qualityInspection:edit']">
|
||||||
详情
|
详情
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['quality:qualityInspection:remove']">
|
|
||||||
删除
|
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
</el-card>
|
</el-card>
|
||||||
<!-- 添加或修改质量-检查工单对话框 -->
|
|
||||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="700px" append-to-body>
|
|
||||||
<el-form ref="qualityInspectionFormRef" :model="form" :rules="rules" label-width="80px">
|
|
||||||
<el-form-item label="巡检标题" prop="inspectionHeadline">
|
|
||||||
<el-input v-model="form.inspectionHeadline" placeholder="请输入巡检标题" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="巡检结果" prop="inspectionResult">
|
|
||||||
<el-input v-model="form.inspectionResult" placeholder="请输入巡检结果" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="巡检类型" prop="inspectionType">
|
|
||||||
<el-select v-model="form.inspectionType" placeholder="请选择巡检类型">
|
|
||||||
<el-option v-for="dict in quality_inspection_check_type" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="所在班组" prop="teamId">
|
|
||||||
<el-select v-model="form.teamId" placeholder="请选择所在班组">
|
|
||||||
<el-option
|
|
||||||
v-for="dict in teamOpt"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
@click="changeForeman(dict.value)"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="整改人" prop="corrector">
|
|
||||||
<el-select v-model="form.corrector" placeholder="请输入整改人" :disabled="!form.teamId">
|
|
||||||
<el-option v-for="dict in foremanOpt" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<!-- <el-form-item label="工单状态" prop="inspectionStatus">
|
|
||||||
<el-radio-group v-model="form.inspectionStatus">
|
|
||||||
<el-radio v-for="dict in quality_inspection_status_type" :key="dict.value" :value="dict.value">{{ dict.label }}</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item> -->
|
|
||||||
<el-form-item label="附件" prop="inspectionFile">
|
|
||||||
<file-upload v-model="form.inspectionFile" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<template #footer>
|
|
||||||
<div class="dialog-footer">
|
|
||||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
<el-dialog title="质量工单详情" v-model="dialog.details" width="60vw">
|
<el-dialog title="质量工单详情" v-model="dialog.details" width="60vw">
|
||||||
<quality-inspection-detail :quality-inspection-detail-id="currentId" />
|
<quality-inspection-detail :quality-inspection-detail-id="currentId" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -204,11 +149,11 @@ const dialog = reactive<DialogOption>({
|
|||||||
|
|
||||||
const initFormData: QualityInspectionForm = {
|
const initFormData: QualityInspectionForm = {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
projectId: currentProject.value?.id,
|
projectId: currentProject.value?.goId,
|
||||||
inspectionType: undefined,
|
inspectionType: undefined,
|
||||||
inspectionHeadline: undefined,
|
inspectionHeadline: undefined,
|
||||||
inspectionResult: undefined,
|
inspectionResult: undefined,
|
||||||
inspectionStatus: undefined,
|
status: undefined,
|
||||||
inspectionFile: undefined,
|
inspectionFile: undefined,
|
||||||
teamId: undefined,
|
teamId: undefined,
|
||||||
corrector: undefined,
|
corrector: undefined,
|
||||||
@ -227,9 +172,9 @@ const data = reactive<PageData<QualityInspectionForm, QualityInspectionQuery>>({
|
|||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
projectId: currentProject.value?.id,
|
projectId: currentProject.value?.goId,
|
||||||
inspectionType: undefined,
|
inspectionType: undefined,
|
||||||
inspectionStatus: undefined,
|
status: undefined,
|
||||||
teamId: undefined,
|
teamId: undefined,
|
||||||
params: {}
|
params: {}
|
||||||
},
|
},
|
||||||
@ -245,33 +190,15 @@ const data = reactive<PageData<QualityInspectionForm, QualityInspectionQuery>>({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const { queryParams, form, rules } = toRefs(data);
|
const { queryParams, form, rules } = toRefs(data);
|
||||||
const teamOpt = ref([]);
|
|
||||||
const foremanOpt = ref([]);
|
|
||||||
const teamList = ref<ProjectTeamForemanResp[]>();
|
|
||||||
/** 查询质量-检查工单列表 */
|
/** 查询质量-检查工单列表 */
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const res = await listQualityInspection(queryParams.value);
|
const res = await listQualityInspection(queryParams.value);
|
||||||
qualityInspectionList.value = res.rows;
|
qualityInspectionList.value = res.data.list;
|
||||||
total.value = res.total;
|
total.value = res.data.total;
|
||||||
// 获取项目班组信息
|
|
||||||
const teamRes = await listProjectTeamForeman(currentProject.value.id);
|
|
||||||
teamList.value = teamRes.data;
|
|
||||||
teamOpt.value = teamList.value.map((team: ProjectTeamForemanResp) => ({
|
|
||||||
label: team.teamName,
|
|
||||||
value: team.id
|
|
||||||
}));
|
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
const changeForeman = (value: string) => {
|
|
||||||
const team = teamList.value.filter((team) => team.id === value)[0];
|
|
||||||
foremanOpt.value = team.foremanList?.map((foreman: foremanQuery) => ({
|
|
||||||
label: foreman.foremanName,
|
|
||||||
value: foreman.foremanId
|
|
||||||
}));
|
|
||||||
form.value.corrector = '';
|
|
||||||
};
|
|
||||||
/** 取消按钮 */
|
/** 取消按钮 */
|
||||||
const cancel = () => {
|
const cancel = () => {
|
||||||
reset();
|
reset();
|
||||||
@ -366,7 +293,7 @@ const handleExport = () => {
|
|||||||
|
|
||||||
//监听项目id刷新数据
|
//监听项目id刷新数据
|
||||||
const listeningProject = watch(
|
const listeningProject = watch(
|
||||||
() => currentProject.value.id,
|
() => currentProject.value.goId,
|
||||||
(nid, oid) => {
|
(nid, oid) => {
|
||||||
queryParams.value.projectId = nid;
|
queryParams.value.projectId = nid;
|
||||||
form.value.projectId = nid;
|
form.value.projectId = nid;
|
||||||
|
@ -65,8 +65,12 @@ import ApprovalRecord from '@/components/Process/approvalRecord.vue';
|
|||||||
import ApprovalButton from '@/components/Process/approvalButton.vue';
|
import ApprovalButton from '@/components/Process/approvalButton.vue';
|
||||||
import { AxiosResponse } from 'axios';
|
import { AxiosResponse } from 'axios';
|
||||||
import { StartProcessBo } from '@/api/workflow/workflowCommon/types';
|
import { StartProcessBo } from '@/api/workflow/workflowCommon/types';
|
||||||
|
import { useUserStoreHook } from '@/store/modules/user';
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
// 获取用户 store
|
||||||
|
const userStore = useUserStoreHook();
|
||||||
|
// 从 store 中获取项目列表和当前选中的项目
|
||||||
|
const currentProject = computed(() => userStore.selectedProject);
|
||||||
const buttonLoading = ref(false);
|
const buttonLoading = ref(false);
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
const leaveTime = ref<Array<string>>([]);
|
const leaveTime = ref<Array<string>>([]);
|
||||||
@ -92,27 +96,27 @@ const options = [
|
|||||||
];
|
];
|
||||||
const flowCodeOptions = [
|
const flowCodeOptions = [
|
||||||
{
|
{
|
||||||
value: 'leave1',
|
value: currentProject.value.id + '_leave1',
|
||||||
label: '请假申请-普通'
|
label: '请假申请-普通'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'leave2',
|
value: currentProject.value.id + '_leave2',
|
||||||
label: '请假申请-排他网关'
|
label: '请假申请-排他网关'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'leave3',
|
value: currentProject.value.id + '_leave3',
|
||||||
label: '请假申请-并行网关'
|
label: '请假申请-并行网关'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'leave4',
|
value: currentProject.value.id + '_leave4',
|
||||||
label: '请假申请-会签'
|
label: '请假申请-会签'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'leave5',
|
value: currentProject.value.id + '_leave5',
|
||||||
label: '请假申请-并行会签网关'
|
label: '请假申请-并行会签网关'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'leave6',
|
value: currentProject.value.id + '_leave6',
|
||||||
label: '请假申请-排他并行会签'
|
label: '请假申请-排他并行会签'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
@ -27,9 +27,11 @@ const iframeLoaded = () => {
|
|||||||
};
|
};
|
||||||
//baseUrl +
|
//baseUrl +
|
||||||
const open = async (definitionId, disabled) => {
|
const open = async (definitionId, disabled) => {
|
||||||
const url = baseUrl + `/warm-flow-ui/index.html?id=${definitionId}&disabled=${disabled}`;
|
const url = import.meta.env.DEV
|
||||||
|
? `/warm-flow-ui/index.html?id=${definitionId}&disabled=${disabled}`
|
||||||
|
: baseUrl + `/warm-flow-ui/index.html?id=${definitionId}&disabled=${disabled}`;
|
||||||
iframeUrl.value = url + '&Authorization=Bearer ' + getToken() + '&clientid=' + import.meta.env.VITE_APP_CLIENT_ID;
|
iframeUrl.value = url + '&Authorization=Bearer ' + getToken() + '&clientid=' + import.meta.env.VITE_APP_CLIENT_ID;
|
||||||
console.log('🚀 ~ open ~ iframeUrl:', iframeUrl.value);
|
console.log('🚀 ~ open ~ iframeUrl:', import.meta.env);
|
||||||
};
|
};
|
||||||
/** 关闭按钮 */
|
/** 关闭按钮 */
|
||||||
function close() {
|
function close() {
|
||||||
|
Reference in New Issue
Block a user