init:first commit of plus-ui
This commit is contained in:
38
src/App.vue
Normal file
38
src/App.vue
Normal file
@ -0,0 +1,38 @@
|
||||
<template loading="true">
|
||||
<el-config-provider :locale="appStore.locale" :size="appStore.size">
|
||||
<router-view />
|
||||
</el-config-provider>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import useSettingsStore from '@/store/modules/settings';
|
||||
import { handleThemeStyle } from '@/utils/theme';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import { getProjectTeam } from './utils/projectTeam';
|
||||
const appStore = useAppStore();
|
||||
|
||||
onMounted(() => {
|
||||
nextTick(() => {
|
||||
// 初始化主题样式
|
||||
handleThemeStyle(useSettingsStore().theme);
|
||||
getProjectTeam();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
* {
|
||||
-webkit-touch-callout: none; /*系统默认菜单被禁用*/
|
||||
-webkit-user-select: none; /*webkit浏览器*/
|
||||
-khtml-user-select: none; /*早期浏览器*/
|
||||
-moz-user-select: none; /*火狐*/
|
||||
-ms-user-select: none; /*IE10*/
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
input {
|
||||
-webkit-user-select: auto; /*webkit浏览器*/
|
||||
}
|
||||
textarea {
|
||||
-webkit-user-select: auto; /*webkit浏览器*/
|
||||
}
|
||||
</style>
|
48
src/animate.ts
Normal file
48
src/animate.ts
Normal file
@ -0,0 +1,48 @@
|
||||
// 前缀
|
||||
const animatePrefix = 'animate__animated ';
|
||||
// 开启随机动画 随机动画值
|
||||
const animateList: string[] = [
|
||||
animatePrefix + 'animate__pulse',
|
||||
animatePrefix + 'animate__rubberBand',
|
||||
animatePrefix + 'animate__bounceIn',
|
||||
animatePrefix + 'animate__bounceInLeft',
|
||||
animatePrefix + 'animate__fadeIn',
|
||||
animatePrefix + 'animate__fadeInLeft',
|
||||
animatePrefix + 'animate__fadeInDown',
|
||||
animatePrefix + 'animate__fadeInUp',
|
||||
animatePrefix + 'animate__flipInX',
|
||||
animatePrefix + 'animate__lightSpeedInLeft',
|
||||
animatePrefix + 'animate__rotateInDownLeft',
|
||||
animatePrefix + 'animate__rollIn',
|
||||
animatePrefix + 'animate__rotateInDownLeft',
|
||||
animatePrefix + 'animate__zoomIn',
|
||||
animatePrefix + 'animate__zoomInDown',
|
||||
animatePrefix + 'animate__slideInLeft',
|
||||
animatePrefix + 'animate__lightSpeedIn'
|
||||
];
|
||||
// 关闭随机动画后的默认效果
|
||||
const defaultAnimate = animatePrefix + 'animate__fadeIn';
|
||||
// 搜索隐藏显示动画
|
||||
const searchAnimate = {
|
||||
enter: '',
|
||||
leave: ''
|
||||
};
|
||||
|
||||
// 菜单搜索动画
|
||||
const menuSearchAnimate = {
|
||||
enter: animatePrefix + 'animate__fadeIn',
|
||||
leave: animatePrefix + 'animate__fadeOut'
|
||||
};
|
||||
// logo动画
|
||||
const logoAnimate = {
|
||||
enter: animatePrefix + 'animate__fadeIn',
|
||||
leave: animatePrefix + 'animate__fadeOut'
|
||||
};
|
||||
|
||||
export default {
|
||||
animateList,
|
||||
defaultAnimate,
|
||||
searchAnimate,
|
||||
menuSearchAnimate,
|
||||
logoAnimate
|
||||
};
|
430
src/api/air/index.ts
Normal file
430
src/api/air/index.ts
Normal file
@ -0,0 +1,430 @@
|
||||
import { request } from '../../utils/requset2.js';
|
||||
|
||||
// 开关空调
|
||||
export function airConditionerModeSwitch(data) {
|
||||
return request({
|
||||
url: '/dj/remote/debug/airConditionerModeSwitch',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 生成航线文件
|
||||
export function waypoint(data) {
|
||||
return request({
|
||||
url: '/dj/router/waypoint',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 创建任务 /dj/task/create
|
||||
export function taskCreate(data) {
|
||||
return request({
|
||||
url: '/dj/missions/create',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 下发任务 /dj/flightTaskPrepare
|
||||
export function flightTaskPrepare(data) {
|
||||
return request({
|
||||
url: '/dj/flightTaskPrepare',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 执行任务
|
||||
export function flightTaskExecute(data) {
|
||||
return request({
|
||||
url: '/dj/flightTaskExecute',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 取消任务
|
||||
export function flightTaskUndo(data) {
|
||||
return request({
|
||||
url: '/dj/flightTaskUndo',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 恢复航线
|
||||
export function flightTaskRecovery(data) {
|
||||
return request({
|
||||
url: '/dj/flightTaskRecovery',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 恢复航线
|
||||
export function flightTaskPause(data) {
|
||||
return request({
|
||||
url: '/dj/flightTaskPause',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 一键返航
|
||||
export function returnHome(data) {
|
||||
return request({
|
||||
url: '/dj/returnHome',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 无参飞行指令
|
||||
export function noDataFlight(data) {
|
||||
return request({
|
||||
url: '/dj/cmdFly/noDataFlight',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 有参飞行指令
|
||||
export function hasDataFlight(data) {
|
||||
return request({
|
||||
url: '/dj/cmdFly/hasDataFlight',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 开启指令
|
||||
export function drcModeEnte(data) {
|
||||
return request({
|
||||
url: '/dj/cmdFly/drcModeEnter',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 查询航线文件信息列表
|
||||
export function listPaths(query) {
|
||||
return request({
|
||||
url: '/system/paths/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 删除航线文件信息
|
||||
export function delPaths(id) {
|
||||
return request({
|
||||
url: '/system/paths/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 查询任务列表
|
||||
export function listTasks(query) {
|
||||
return request({
|
||||
url: '/system/tasks/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询无人机任务列表
|
||||
export function listMissions(query) {
|
||||
return request({
|
||||
url: '/system/missions/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 删除无人机任务
|
||||
export function delMissions(id) {
|
||||
return request({
|
||||
url: '/system/missions/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 远程调试
|
||||
export function remoteDebug(data) {
|
||||
return request({
|
||||
url: '/dj/remote/debug/service',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 增强图传
|
||||
export function sdrWorkmodeSwitch(data) {
|
||||
return request({
|
||||
url: '/dj/remote/debug/sdrWorkmodeSwitch',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 查询视频设备列表
|
||||
export function listInfo(query) {
|
||||
return request({
|
||||
url: '/system/info/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
// 登录
|
||||
export function login(data) {
|
||||
return request({
|
||||
url: '/login',
|
||||
headers: {
|
||||
isToken: false,
|
||||
repeatSubmit: false
|
||||
},
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 获取文件
|
||||
export function getFileByflightId(data) {
|
||||
return request({
|
||||
url: '/dj/getFileByflightId',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 机场列表
|
||||
export function droneList(data) {
|
||||
return request({
|
||||
url: '/system/drone/list',
|
||||
method: 'get',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 监听网关
|
||||
export function gatewaysAdd(data) {
|
||||
return request({
|
||||
url: '/dj/gateways/add',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 关闭网关
|
||||
export function gatewaysRemove(data) {
|
||||
return request({
|
||||
url: '/dj/gateways/remove',
|
||||
method: 'delete',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 添加航线
|
||||
export function routerAdd(data) {
|
||||
return request({
|
||||
url: '/dj/router/add',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 复制航线 /dj/router/copy/{id}
|
||||
export function routerCopy(id) {
|
||||
return request({
|
||||
url: '/dj/router/copy/' + id,
|
||||
method: 'post'
|
||||
});
|
||||
}
|
||||
// 重命名文件
|
||||
|
||||
export function routerRename(data) {
|
||||
return request({
|
||||
url: '/dj/router/rename',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 获取文件
|
||||
export function takeoffList(data) {
|
||||
return request({
|
||||
url: '/system/takeoff/list',
|
||||
method: 'get',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 切换直播流
|
||||
export function liveChange(data) {
|
||||
return request({
|
||||
url: '/dj/live/change',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 设置清晰度 /dj/live/quality
|
||||
export function liveChangeQuality(data) {
|
||||
return request({
|
||||
url: '/dj/live/quality',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 开启直播
|
||||
export function liveStart(data) {
|
||||
return request({
|
||||
url: '/dj/live/start',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 关闭直播
|
||||
export function liveStop(data) {
|
||||
return request({
|
||||
url: '/dj/live/stop',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 静音模式开关
|
||||
export function propertySet(data) {
|
||||
return request({
|
||||
url: '/property/set',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 直播相机切换
|
||||
export function cameraChange(data) {
|
||||
return request({
|
||||
url: '/dj/live/camera/change',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 新建计划
|
||||
export function taskAdd(data) {
|
||||
return request({
|
||||
url: '/dj/task/add',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 计划列表
|
||||
export function taskList(data) {
|
||||
return request({
|
||||
url: '/dj/task/list',
|
||||
method: 'get',
|
||||
params: data
|
||||
});
|
||||
}
|
||||
// 新暂停
|
||||
export function flightTaskPauseNew(data) {
|
||||
return request({
|
||||
url: '/dj/task/flightTaskPause',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 新恢复
|
||||
export function flightTaskRecoveryNew(data) {
|
||||
return request({
|
||||
url: '/dj/task/flightTaskRecovery',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 取消任务
|
||||
export function flightTaskUndoNew(data) {
|
||||
return request({
|
||||
url: '/dj/task/flightTaskUndo',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 一键返航 post
|
||||
export function returnHomeNew(data) {
|
||||
return request({
|
||||
url: '/dj/task/returnHome',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 删除
|
||||
export function delMissionsNew(id) {
|
||||
return request({
|
||||
url: '/system/new/missions/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// drc飞行控制 /dj/cmdFly/droneControl
|
||||
export function droneControl(data) {
|
||||
return request({
|
||||
url: '/dj/cmdFly/droneControl',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// drc急停 /dj/cmdFly/droneEmergencyStop
|
||||
export function droneEmergencyStop(data) {
|
||||
return request({
|
||||
url: '/dj/cmdFly/droneEmergencyStop',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 取消返航 /dj/returnHomeCancel
|
||||
export function returnHomeCancel(data) {
|
||||
return request({
|
||||
url: '/dj/returnHomeCancel',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 导入航线
|
||||
export function returnImport(data) {
|
||||
return request({
|
||||
url: '/dj/router/import',
|
||||
method: 'post',
|
||||
data,
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// DRC心跳
|
||||
export function heartBeat(data) {
|
||||
return request({
|
||||
url: '/dj/cmdFly/heartBeat',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// AI识别
|
||||
export function aiInfo(data) {
|
||||
return request({
|
||||
url: '/minio/ai/info',
|
||||
method: 'get',
|
||||
params: data
|
||||
});
|
||||
}
|
||||
|
||||
// 当前最新任务
|
||||
export function getLatest(data) {
|
||||
return request({
|
||||
url: '/dj/task/getLatest',
|
||||
method: 'get',
|
||||
params: data
|
||||
});
|
||||
}
|
118
src/api/fileMangement/index.ts
Normal file
118
src/api/fileMangement/index.ts
Normal file
@ -0,0 +1,118 @@
|
||||
import { request } from '../../utils/requset2';
|
||||
// 获取文件列表
|
||||
export function getFiles(data) {
|
||||
return request({
|
||||
url: '/minio/file',
|
||||
method: 'get',
|
||||
data,
|
||||
params: data
|
||||
});
|
||||
}
|
||||
// 获取ai文件列表
|
||||
export function getAiFiles(data) {
|
||||
return request({
|
||||
url: '/minio/ai/file',
|
||||
method: 'get',
|
||||
data,
|
||||
params: data
|
||||
});
|
||||
}
|
||||
// 获取文件信息
|
||||
export function getInfo(data) {
|
||||
return request({
|
||||
url: '/minio/info',
|
||||
method: 'get',
|
||||
data,
|
||||
params: data,
|
||||
timeout: 30000
|
||||
});
|
||||
}
|
||||
// 获取ai文件信息
|
||||
export function getAiInfo(data) {
|
||||
return request({
|
||||
url: '/minio/ai/info',
|
||||
method: 'get',
|
||||
data,
|
||||
params: data,
|
||||
timeout: 30000
|
||||
});
|
||||
}
|
||||
// 下载文件
|
||||
export function fileDownload(params, onProgress) {
|
||||
return request({
|
||||
url: '/minio/download',
|
||||
method: 'post',
|
||||
params,
|
||||
responseType: 'blob',
|
||||
timeout: 0,
|
||||
// header: {
|
||||
// "Content-Length": Buffer.byteLength(JSON.stringify(params)),
|
||||
// },
|
||||
onDownloadProgress: (progressEvent) => {
|
||||
if (onProgress && typeof onProgress === 'function') {
|
||||
const { loaded, total } = progressEvent;
|
||||
console.log('progressEvent', progressEvent);
|
||||
const percentage = Math.round((loaded / total) * 100); // 计算百分比
|
||||
onProgress(percentage); // 调用传入的 onProgress 回调函数
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
// 删除文件
|
||||
export function deleteFile(data) {
|
||||
return request({
|
||||
url: '/minio/deleteBatch',
|
||||
method: 'delete',
|
||||
data,
|
||||
timeout: 0
|
||||
});
|
||||
}
|
||||
// 删除ai文件
|
||||
export function deleteAiFile(data) {
|
||||
return request({
|
||||
url: '/minio/ai/deleteBatch',
|
||||
method: 'delete',
|
||||
data,
|
||||
timeout: 0
|
||||
});
|
||||
}
|
||||
// 批量下载文件或目录
|
||||
export function downloadBatch(data, onProgress) {
|
||||
return request({
|
||||
url: '/minio/downloadBatch',
|
||||
method: 'post',
|
||||
responseType: 'blob',
|
||||
data,
|
||||
timeout: 0,
|
||||
onDownloadProgress: (progressEvent) => {
|
||||
if (onProgress && typeof onProgress === 'function') {
|
||||
const { loaded, total } = progressEvent;
|
||||
console.log('progressEvent', progressEvent);
|
||||
const percentage = Math.round((loaded / total) * 100); // 计算百分比
|
||||
onProgress(percentage); // 调用传入的 onProgress 回调函数
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 获取某个目录下面的所有文件的URL列表
|
||||
export function getUrlList(data) {
|
||||
return request({
|
||||
url: '/minio/urlList',
|
||||
method: 'post',
|
||||
data,
|
||||
params: data,
|
||||
timeout: 0
|
||||
});
|
||||
}
|
||||
// 获取某个目录下面的所有文件的URL列表
|
||||
|
||||
export function getAiUrlList(data) {
|
||||
return request({
|
||||
url: '/minio/ai/urlList',
|
||||
method: 'post',
|
||||
data,
|
||||
params: data,
|
||||
timeout: 0
|
||||
});
|
||||
}
|
136
src/api/gis/index.ts
Normal file
136
src/api/gis/index.ts
Normal file
@ -0,0 +1,136 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import {
|
||||
QualityVO,
|
||||
Query,
|
||||
ConstructionUserVO,
|
||||
MachineryrVO,
|
||||
MaterialsVO,
|
||||
projectNewsVO,
|
||||
safetyInspectionVO,
|
||||
projectNewsDetailVO,
|
||||
weatherVO,
|
||||
safetyDayVO
|
||||
} from './type';
|
||||
/**
|
||||
* 查询大屏质量信息
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const getQualityList = (query?: Query): AxiosPromise<QualityVO> => {
|
||||
return request({
|
||||
url: '/quality/qualityInspection/gis',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询大屏项目新闻列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const getprojectNewsList = (query?: Query): AxiosPromise<projectNewsVO[]> => {
|
||||
return request({
|
||||
url: '/project/projectNews/list/gis',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取项目新闻详细信息
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const getprojectNewsDetailList = (id: number): AxiosPromise<projectNewsDetailVO> => {
|
||||
return request({
|
||||
url: '/project/projectNews/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询大屏安全信息
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const getsafetyInspectionList = (query?: Query): AxiosPromise<safetyInspectionVO> => {
|
||||
return request({
|
||||
url: '/safety/safetyInspection/gis',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询施工人员大屏数据
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const getConstructionUserList = (query?: Query): AxiosPromise<ConstructionUserVO> => {
|
||||
return request({
|
||||
url: '/project/constructionUser/gis',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询大屏机械列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const getMachineryrList = (query?: Query): AxiosPromise<MachineryrVO[]> => {
|
||||
return request({
|
||||
url: '/machinery/machinery/list/gis',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询大屏材料信息
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const getMaterialsList = (query?: Query): AxiosPromise<MaterialsVO[]> => {
|
||||
return request({
|
||||
url: '/materials/materials/list/gis',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询项目天气
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const getweatherList = (id?: string): AxiosPromise<weatherVO[]> => {
|
||||
return request({
|
||||
url: '/project/project/weather/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询项目安全天数
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const getSafetyDay = (id?: string): AxiosPromise<safetyDayVO> => {
|
||||
return request({
|
||||
url: '/project/project/safetyDay/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
92
src/api/gis/type.ts
Normal file
92
src/api/gis/type.ts
Normal file
@ -0,0 +1,92 @@
|
||||
export interface QualityVO {
|
||||
count: number;
|
||||
correctSituation: string;
|
||||
list: Qualitylist[];
|
||||
}
|
||||
export interface Qualitylist {
|
||||
id: number;
|
||||
inspectionTypeLabel: string;
|
||||
inspectionHeadline: string;
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface Query {
|
||||
projectId: string | number;
|
||||
pageSize?: string | number;
|
||||
}
|
||||
|
||||
export interface ConstructionUserVO {
|
||||
peopleCount: number;
|
||||
attendanceCount: number;
|
||||
attendanceRate: string;
|
||||
}
|
||||
|
||||
export interface MachineryrVO {
|
||||
//机械名称
|
||||
machineryName: string;
|
||||
//机械数量
|
||||
machineryCount: string;
|
||||
}
|
||||
|
||||
export interface MaterialsVO {
|
||||
//材料名称
|
||||
materialsName: string;
|
||||
//计量单位
|
||||
weightId: string;
|
||||
//预计材料数量
|
||||
quantityCount: string;
|
||||
//入库数量
|
||||
putCount: string;
|
||||
//出库数量
|
||||
outCount: string;
|
||||
value: number;
|
||||
}
|
||||
|
||||
export interface projectNewsVO {
|
||||
id: string;
|
||||
title: string;
|
||||
|
||||
show?: boolean;
|
||||
}
|
||||
|
||||
export interface projectNewsDetailVO {
|
||||
id: string;
|
||||
title: string;
|
||||
content: string;
|
||||
file: string;
|
||||
}
|
||||
|
||||
export interface safetyInspectionVO {
|
||||
//站班会总数
|
||||
teamMeetingCount: string;
|
||||
//安全巡检总数
|
||||
safetyInspectionCount: string;
|
||||
//整改情况
|
||||
correctSituationCount: string;
|
||||
//站班会列表
|
||||
teamMeetingList: safetyInspectionlist[];
|
||||
}
|
||||
|
||||
export interface safetyInspectionlist {
|
||||
id: string;
|
||||
teamName: string;
|
||||
name: string;
|
||||
meetingDate: string;
|
||||
}
|
||||
|
||||
export interface weatherVO {
|
||||
date: string;
|
||||
week: string;
|
||||
tempMax: string;
|
||||
tempMin: string;
|
||||
dayStatus: string;
|
||||
dayIcon: string;
|
||||
nightStatus: string;
|
||||
nightIcon: string;
|
||||
sunRise: string;
|
||||
sunSet: string;
|
||||
}
|
||||
|
||||
export interface safetyDayVO {
|
||||
safetyDay: string;
|
||||
}
|
121
src/api/login.ts
Normal file
121
src/api/login.ts
Normal file
@ -0,0 +1,121 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { LoginData, LoginResult, TenantInfo, UserProject, VerifyCodeResult } from './types';
|
||||
import { UserInfo } from '@/api/system/user/types';
|
||||
|
||||
// pc端固定客户端授权id
|
||||
const clientId = import.meta.env.VITE_APP_CLIENT_ID;
|
||||
|
||||
/**
|
||||
* @param data {LoginData}
|
||||
* @returns
|
||||
*/
|
||||
export function login(data: LoginData): AxiosPromise<LoginResult> {
|
||||
const params = {
|
||||
...data,
|
||||
clientId: data.clientId || clientId,
|
||||
grantType: data.grantType || 'password'
|
||||
};
|
||||
return request({
|
||||
url: '/auth/login',
|
||||
headers: {
|
||||
isToken: false,
|
||||
isEncrypt: true,
|
||||
repeatSubmit: false
|
||||
},
|
||||
method: 'post',
|
||||
data: params
|
||||
});
|
||||
}
|
||||
|
||||
// 注册方法
|
||||
export function register(data: any) {
|
||||
const params = {
|
||||
...data,
|
||||
clientId: clientId,
|
||||
grantType: 'password'
|
||||
};
|
||||
return request({
|
||||
url: '/auth/register',
|
||||
headers: {
|
||||
isToken: false,
|
||||
isEncrypt: true,
|
||||
repeatSubmit: false
|
||||
},
|
||||
method: 'post',
|
||||
data: params
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 注销
|
||||
*/
|
||||
export function logout() {
|
||||
if (import.meta.env.VITE_APP_SSE === 'true') {
|
||||
request({
|
||||
url: '/resource/sse/close',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
return request({
|
||||
url: '/auth/logout',
|
||||
method: 'post'
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取验证码
|
||||
*/
|
||||
export function getCodeImg(): AxiosPromise<VerifyCodeResult> {
|
||||
return request({
|
||||
url: '/auth/code',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'get',
|
||||
timeout: 20000
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 第三方登录
|
||||
*/
|
||||
export function callback(data: LoginData): AxiosPromise<any> {
|
||||
const LoginData = {
|
||||
...data,
|
||||
clientId: clientId,
|
||||
grantType: 'social'
|
||||
};
|
||||
return request({
|
||||
url: '/auth/social/callback',
|
||||
method: 'post',
|
||||
data: LoginData
|
||||
});
|
||||
}
|
||||
|
||||
// 获取用户详细信息
|
||||
export function getInfo(): AxiosPromise<UserInfo> {
|
||||
return request({
|
||||
url: '/system/user/getInfo',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 获取租户列表
|
||||
export function getTenantList(isToken: boolean): AxiosPromise<TenantInfo> {
|
||||
return request({
|
||||
url: '/auth/tenant/list',
|
||||
headers: {
|
||||
isToken: isToken
|
||||
},
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
//获取用户项目信息
|
||||
export function getUserProject(): AxiosPromise<UserProject[]> {
|
||||
return request({
|
||||
url: '/project/projectRelevancy/login/list',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
63
src/api/machinery/machinery/index.ts
Normal file
63
src/api/machinery/machinery/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { MachineryForm, MachineryQuery, MachineryVO } from '@/api/machinery/machinery/types';
|
||||
|
||||
/**
|
||||
* 查询机械列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listMachinery = (query?: MachineryQuery): AxiosPromise<MachineryVO[]> => {
|
||||
return request({
|
||||
url: '/machinery/machinery/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询机械详细
|
||||
* @param id
|
||||
*/
|
||||
export const getMachinery = (id: string | number): AxiosPromise<MachineryVO> => {
|
||||
return request({
|
||||
url: '/machinery/machinery/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增机械
|
||||
* @param data
|
||||
*/
|
||||
export const addMachinery = (data: MachineryForm): AxiosPromise<string | number> => {
|
||||
return request({
|
||||
url: '/machinery/machinery',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改机械
|
||||
* @param data
|
||||
*/
|
||||
export const updateMachinery = (data: MachineryForm) => {
|
||||
return request({
|
||||
url: '/machinery/machinery',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除机械
|
||||
* @param id
|
||||
*/
|
||||
export const delMachinery = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/machinery/machinery/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
117
src/api/machinery/machinery/types.ts
Normal file
117
src/api/machinery/machinery/types.ts
Normal file
@ -0,0 +1,117 @@
|
||||
export interface MachineryVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 机械名称
|
||||
*/
|
||||
machineryName: string;
|
||||
|
||||
/**
|
||||
* 机械型号
|
||||
*/
|
||||
machineryNumber: string;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
number: number;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
principal: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface MachineryForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
principalPhone: string | number;
|
||||
provider: string | number;
|
||||
/**
|
||||
* 机械名称
|
||||
*/
|
||||
machineryName?: string;
|
||||
|
||||
/**
|
||||
* 机械型号
|
||||
*/
|
||||
machineryNumber?: string;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
number?: number;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
principal?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface MachineryQuery extends PageQuery {
|
||||
/**
|
||||
* 机械名称
|
||||
*/
|
||||
machineryName?: string;
|
||||
principalPhone: string | number;
|
||||
provider: string | number;
|
||||
/**
|
||||
* 机械型号
|
||||
*/
|
||||
machineryNumber?: string;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
number?: number;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
principal?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
63
src/api/machinery/machineryDetail/index.ts
Normal file
63
src/api/machinery/machineryDetail/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { MachineryDetailForm, MachineryDetailQuery, MachineryDetailVO } from '@/api/machinery/machineryDetail/types';
|
||||
|
||||
/**
|
||||
* 查询机械详情列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listMachineryDetail = (query?: MachineryDetailQuery): AxiosPromise<MachineryDetailVO[]> => {
|
||||
return request({
|
||||
url: '/machinery/machineryDetail/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询机械详情详细
|
||||
* @param id
|
||||
*/
|
||||
export const getMachineryDetail = (id: string | number): AxiosPromise<MachineryDetailVO> => {
|
||||
return request({
|
||||
url: '/machinery/machineryDetail/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增机械详情
|
||||
* @param data
|
||||
*/
|
||||
export const addMachineryDetail = (data: MachineryDetailForm): AxiosPromise<string | number> => {
|
||||
return request({
|
||||
url: '/machinery/machineryDetail',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改机械详情
|
||||
* @param data
|
||||
*/
|
||||
export const updateMachineryDetail = (data: MachineryDetailForm) => {
|
||||
return request({
|
||||
url: '/machinery/machineryDetail',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除机械详情
|
||||
* @param id
|
||||
*/
|
||||
export const delMachineryDetail = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/machinery/machineryDetail/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
162
src/api/machinery/machineryDetail/types.ts
Normal file
162
src/api/machinery/machineryDetail/types.ts
Normal file
@ -0,0 +1,162 @@
|
||||
import { OssVO } from '@/api/system/oss/types';
|
||||
|
||||
export interface MachineryDetailVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 检验证编号
|
||||
*/
|
||||
checkoutNumber: string;
|
||||
|
||||
/**
|
||||
* 检验单位
|
||||
*/
|
||||
checkoutUnit: string;
|
||||
|
||||
/**
|
||||
* 检定日期/有效期
|
||||
*/
|
||||
checkoutDate: string;
|
||||
|
||||
/**
|
||||
* 施工类型状态(0正常 1停用)
|
||||
*/
|
||||
status: number;
|
||||
|
||||
/**
|
||||
* 0入场 1出场
|
||||
*/
|
||||
type: number;
|
||||
|
||||
/**
|
||||
* 入场时间
|
||||
*/
|
||||
entryTime: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 图片(英文逗号分隔)
|
||||
*/
|
||||
picture: string;
|
||||
|
||||
/**
|
||||
* 图片详情列表
|
||||
*/
|
||||
pictureList: OssVO;
|
||||
|
||||
/**
|
||||
* 机械主键id
|
||||
*/
|
||||
machineryId: string | number;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface MachineryDetailForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 检验证编号
|
||||
*/
|
||||
checkoutNumber?: string;
|
||||
|
||||
/**
|
||||
* 检验单位
|
||||
*/
|
||||
checkoutUnit?: string;
|
||||
|
||||
/**
|
||||
* 检定日期/有效期
|
||||
*/
|
||||
checkoutDate?: string;
|
||||
|
||||
/**
|
||||
* 施工类型状态(0正常 1停用)
|
||||
*/
|
||||
status?: number;
|
||||
|
||||
/**
|
||||
* 0入场 1出场
|
||||
*/
|
||||
type?: number;
|
||||
|
||||
/**
|
||||
* 入场时间
|
||||
*/
|
||||
entryTime?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
/**
|
||||
* 图片(英文逗号分隔)
|
||||
*/
|
||||
picture?: string;
|
||||
|
||||
/**
|
||||
* 机械主键id
|
||||
*/
|
||||
machineryId?: string | number;
|
||||
}
|
||||
|
||||
export interface MachineryDetailQuery extends PageQuery {
|
||||
/**
|
||||
* 检验证编号
|
||||
*/
|
||||
checkoutNumber?: string;
|
||||
|
||||
/**
|
||||
* 检验单位
|
||||
*/
|
||||
checkoutUnit?: string;
|
||||
|
||||
/**
|
||||
* 检定日期/有效期
|
||||
*/
|
||||
checkoutDate?: string;
|
||||
|
||||
/**
|
||||
* 施工类型状态(0正常 1停用)
|
||||
*/
|
||||
status?: number;
|
||||
|
||||
/**
|
||||
* 0入场 1出场
|
||||
*/
|
||||
type?: number;
|
||||
|
||||
/**
|
||||
* 入场时间
|
||||
*/
|
||||
entryTime?: string;
|
||||
|
||||
/**
|
||||
* 图片(英文逗号分隔)
|
||||
*/
|
||||
picture?: string;
|
||||
|
||||
/**
|
||||
* 机械主键id
|
||||
*/
|
||||
machineryId?: string | number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
63
src/api/materials/company/index.ts
Normal file
63
src/api/materials/company/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { CompanyForm, CompanyQuery, CompanyVO } from '@/api/materials/company/types';
|
||||
|
||||
/**
|
||||
* 查询公司列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listCompany = (query?: CompanyQuery): AxiosPromise<CompanyVO[]> => {
|
||||
return request({
|
||||
url: '/materials/company/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询公司详细
|
||||
* @param id
|
||||
*/
|
||||
export const getCompany = (id: string | number): AxiosPromise<CompanyVO> => {
|
||||
return request({
|
||||
url: '/materials/company/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增公司
|
||||
* @param data
|
||||
*/
|
||||
export const addCompany = (data: CompanyForm): AxiosPromise<string | number> => {
|
||||
return request({
|
||||
url: '/materials/company',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改公司
|
||||
* @param data
|
||||
*/
|
||||
export const updateCompany = (data: CompanyForm) => {
|
||||
return request({
|
||||
url: '/materials/company',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除公司
|
||||
* @param id
|
||||
*/
|
||||
export const delCompany = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/materials/company/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
99
src/api/materials/company/types.ts
Normal file
99
src/api/materials/company/types.ts
Normal file
@ -0,0 +1,99 @@
|
||||
export interface CompanyVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
companyName: string;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 帐号状态(0正常 1停用)
|
||||
*/
|
||||
status: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 资质情况
|
||||
*/
|
||||
qualification: string;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface CompanyForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
companyName?: string;
|
||||
principalPhone?: string;
|
||||
principal?: string;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 帐号状态(0正常 1停用)
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
/**
|
||||
* 资质情况
|
||||
*/
|
||||
qualification?: string;
|
||||
}
|
||||
|
||||
export interface CompanyQuery extends PageQuery {
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
companyName?: string;
|
||||
principalPhone?: string;
|
||||
principal?: string;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 帐号状态(0正常 1停用)
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
/**
|
||||
* 资质情况
|
||||
*/
|
||||
qualification?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
62
src/api/materials/materials/index.ts
Normal file
62
src/api/materials/materials/index.ts
Normal file
@ -0,0 +1,62 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { MaterialsForm, MaterialsQuery, MaterialsVO } from '@/api/materials/materials/types';
|
||||
|
||||
/**
|
||||
* 查询材料名称列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const listMaterials = (query?: MaterialsQuery): AxiosPromise<MaterialsVO[]> => {
|
||||
return request({
|
||||
url: '/materials/materials/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询材料名称详细
|
||||
* @param id
|
||||
*/
|
||||
export const getMaterials = (id: string | number): AxiosPromise<MaterialsVO> => {
|
||||
return request({
|
||||
url: '/materials/materials/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增材料名称
|
||||
* @param data
|
||||
*/
|
||||
export const addMaterials = (data: MaterialsForm): AxiosPromise<string | number> => {
|
||||
return request({
|
||||
url: '/materials/materials',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改材料名称
|
||||
* @param data
|
||||
*/
|
||||
export const updateMaterials = (data: MaterialsForm) => {
|
||||
return request({
|
||||
url: '/materials/materials',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除材料名称
|
||||
* @param id
|
||||
*/
|
||||
export const delMaterials = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/materials/materials/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
177
src/api/materials/materials/types.ts
Normal file
177
src/api/materials/materials/types.ts
Normal file
@ -0,0 +1,177 @@
|
||||
import { CompanyVO } from '@/api/materials/company/types';
|
||||
|
||||
export interface MaterialsVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 材料名称
|
||||
*/
|
||||
materialsName: string;
|
||||
|
||||
/**
|
||||
* 公司id
|
||||
*/
|
||||
companyId: string | number;
|
||||
|
||||
/**
|
||||
* 公司信息
|
||||
*/
|
||||
companyVo: CompanyVO;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 规格型号名称
|
||||
*/
|
||||
typeSpecificationName: string;
|
||||
|
||||
/**
|
||||
* 文件详情列表
|
||||
*/
|
||||
fileOssMap: Record<string, string>;
|
||||
|
||||
/**
|
||||
* 使用部位
|
||||
*/
|
||||
usePart: string;
|
||||
|
||||
/**
|
||||
* 计量单位
|
||||
*/
|
||||
weightId: string | number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 预计材料数量
|
||||
*/
|
||||
quantityCount: string;
|
||||
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
status: string;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface MaterialsForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 材料名称
|
||||
*/
|
||||
materialsName?: string;
|
||||
|
||||
/**
|
||||
* 公司id
|
||||
*/
|
||||
companyId?: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 规格型号名称
|
||||
*/
|
||||
typeSpecificationName?: string;
|
||||
|
||||
/**
|
||||
* 文件对象存储id列表
|
||||
*/
|
||||
fileOssIdMap?: Record<string, string | number>;
|
||||
|
||||
/**
|
||||
* 使用部位
|
||||
*/
|
||||
usePart?: string;
|
||||
|
||||
/**
|
||||
* 计量单位
|
||||
*/
|
||||
weightId?: string | number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
/**
|
||||
* 预计材料数量
|
||||
*/
|
||||
quantityCount?: string;
|
||||
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
status?: string;
|
||||
}
|
||||
|
||||
export interface MaterialsQuery extends PageQuery {
|
||||
/**
|
||||
* 材料名称
|
||||
*/
|
||||
materialsName?: string;
|
||||
|
||||
/**
|
||||
* 公司id
|
||||
*/
|
||||
companyId?: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 规格型号名称
|
||||
*/
|
||||
typeSpecificationName?: string;
|
||||
|
||||
/**
|
||||
* 文件对象存储id列表
|
||||
*/
|
||||
fileOssIdMap?: Map<string, string | number>;
|
||||
|
||||
/**
|
||||
* 使用部位
|
||||
*/
|
||||
usePart?: string;
|
||||
|
||||
/**
|
||||
* 计量单位
|
||||
*/
|
||||
weightId?: string | number;
|
||||
|
||||
/**
|
||||
* 预计材料数量
|
||||
*/
|
||||
quantityCount?: string;
|
||||
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
63
src/api/materials/materialsInventory/index.ts
Normal file
63
src/api/materials/materialsInventory/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { MaterialsInventoryForm, MaterialsInventoryQuery, MaterialsInventoryVO } from '@/api/materials/materialsInventory/types';
|
||||
|
||||
/**
|
||||
* 查询材料出/入库列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listMaterialsInventory = (query?: MaterialsInventoryQuery): AxiosPromise<MaterialsInventoryVO[]> => {
|
||||
return request({
|
||||
url: '/materials/materialsInventory/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询材料出/入库详细
|
||||
* @param id
|
||||
*/
|
||||
export const getMaterialsInventory = (id: string | number): AxiosPromise<MaterialsInventoryVO> => {
|
||||
return request({
|
||||
url: '/materials/materialsInventory/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增材料出/入库
|
||||
* @param data
|
||||
*/
|
||||
export const addMaterialsInventory = (data: MaterialsInventoryForm): AxiosPromise<string | number> => {
|
||||
return request({
|
||||
url: '/materials/materialsInventory',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改材料出/入库
|
||||
* @param data
|
||||
*/
|
||||
export const updateMaterialsInventory = (data: MaterialsInventoryForm) => {
|
||||
return request({
|
||||
url: '/materials/materialsInventory',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除材料出/入库
|
||||
* @param id
|
||||
*/
|
||||
export const delMaterialsInventory = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/materials/materialsInventory/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
212
src/api/materials/materialsInventory/types.ts
Normal file
212
src/api/materials/materialsInventory/types.ts
Normal file
@ -0,0 +1,212 @@
|
||||
import { MaterialsVO } from '@/api/materials/materials/types';
|
||||
|
||||
export interface MaterialsInventoryVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 材料id
|
||||
*/
|
||||
materialsId: string | number;
|
||||
|
||||
/**
|
||||
* 材料信息
|
||||
*/
|
||||
materialsVo: MaterialsVO;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 出入库状态
|
||||
*/
|
||||
outPut: string;
|
||||
|
||||
/**
|
||||
* 出/入库的数量
|
||||
*/
|
||||
number: number;
|
||||
|
||||
/**
|
||||
* 出/入库操作时间
|
||||
*/
|
||||
outPutTime: string;
|
||||
|
||||
/**
|
||||
* 剩余库存数量(记录最后一次操作留下的库存数)
|
||||
*/
|
||||
residue: string | number;
|
||||
|
||||
/**
|
||||
* 操作人(入库人、领料人)
|
||||
*/
|
||||
operator: string;
|
||||
|
||||
/**
|
||||
* 材料出入证明
|
||||
*/
|
||||
path: string;
|
||||
|
||||
/**
|
||||
* 处理方式
|
||||
*/
|
||||
disposition: string;
|
||||
|
||||
/**
|
||||
* 交接单位(班组)
|
||||
*/
|
||||
recipient: string;
|
||||
|
||||
/**
|
||||
* 领用人
|
||||
*/
|
||||
shipper: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface MaterialsInventoryForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 材料id
|
||||
*/
|
||||
materialsId?: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 出入库状态
|
||||
*/
|
||||
outPut?: string;
|
||||
|
||||
/**
|
||||
* 出/入库的数量
|
||||
*/
|
||||
number?: number;
|
||||
|
||||
/**
|
||||
* 出/入库操作时间
|
||||
*/
|
||||
outPutTime?: string;
|
||||
|
||||
/**
|
||||
* 剩余库存数量(记录最后一次操作留下的库存数)
|
||||
*/
|
||||
residue?: string | number;
|
||||
|
||||
/**
|
||||
* 操作人(入库人、领料人)
|
||||
*/
|
||||
operator?: string;
|
||||
|
||||
/**
|
||||
* 材料出入证明
|
||||
*/
|
||||
path?: string;
|
||||
|
||||
/**
|
||||
* 处理方式
|
||||
*/
|
||||
disposition?: string;
|
||||
|
||||
/**
|
||||
* 交接单位(班组)
|
||||
*/
|
||||
recipient?: string;
|
||||
|
||||
/**
|
||||
* 领用人
|
||||
*/
|
||||
shipper?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface MaterialsInventoryQuery extends PageQuery {
|
||||
/**
|
||||
* 材料id
|
||||
*/
|
||||
materialsId?: string | number;
|
||||
|
||||
/**
|
||||
* 材料名称
|
||||
*/
|
||||
materialsName?: string;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 出入库状态
|
||||
*/
|
||||
outPut?: string;
|
||||
|
||||
/**
|
||||
* 出/入库的数量
|
||||
*/
|
||||
number?: number;
|
||||
|
||||
/**
|
||||
* 出/入库操作时间
|
||||
*/
|
||||
outPutTime?: string;
|
||||
|
||||
/**
|
||||
* 剩余库存数量(记录最后一次操作留下的库存数)
|
||||
*/
|
||||
residue?: string | number;
|
||||
|
||||
/**
|
||||
* 操作人(入库人、领料人)
|
||||
*/
|
||||
operator?: string;
|
||||
|
||||
/**
|
||||
* 材料出入证明
|
||||
*/
|
||||
path?: string;
|
||||
|
||||
/**
|
||||
* 处理方式
|
||||
*/
|
||||
disposition?: string;
|
||||
|
||||
/**
|
||||
* 交接单位(班组)
|
||||
*/
|
||||
recipient?: string;
|
||||
|
||||
/**
|
||||
* 领用人
|
||||
*/
|
||||
shipper?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
11
src/api/menu.ts
Normal file
11
src/api/menu.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { RouteRecordRaw } from 'vue-router';
|
||||
|
||||
// 获取路由
|
||||
export function getRouters(): AxiosPromise<RouteRecordRaw[]> {
|
||||
return request({
|
||||
url: '/system/menu/getRouters',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
59
src/api/monitor/cache/index.ts
vendored
Normal file
59
src/api/monitor/cache/index.ts
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { CacheVO } from './types';
|
||||
|
||||
// 查询缓存详细
|
||||
export function getCache(): AxiosPromise<CacheVO> {
|
||||
return request({
|
||||
url: '/monitor/cache',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 查询缓存名称列表
|
||||
export function listCacheName() {
|
||||
return request({
|
||||
url: '/monitor/cache/getNames',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 查询缓存键名列表
|
||||
export function listCacheKey(cacheName: string) {
|
||||
return request({
|
||||
url: '/monitor/cache/getKeys/' + cacheName,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 查询缓存内容
|
||||
export function getCacheValue(cacheName: string, cacheKey: string) {
|
||||
return request({
|
||||
url: '/monitor/cache/getValue/' + cacheName + '/' + cacheKey,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 清理指定名称缓存
|
||||
export function clearCacheName(cacheName: string) {
|
||||
return request({
|
||||
url: '/monitor/cache/clearCacheName/' + cacheName,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 清理指定键名缓存
|
||||
export function clearCacheKey(cacheName: string, cacheKey: string) {
|
||||
return request({
|
||||
url: '/monitor/cache/clearCacheKey/' + cacheName + '/' + cacheKey,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 清理全部缓存
|
||||
export function clearCacheAll() {
|
||||
return request({
|
||||
url: '/monitor/cache/clearCacheAll',
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
7
src/api/monitor/cache/types.ts
vendored
Normal file
7
src/api/monitor/cache/types.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
export interface CacheVO {
|
||||
commandStats: Array<{ name: string; value: string }>;
|
||||
|
||||
dbSize: number;
|
||||
|
||||
info: { [key: string]: string };
|
||||
}
|
36
src/api/monitor/loginInfo/index.ts
Normal file
36
src/api/monitor/loginInfo/index.ts
Normal file
@ -0,0 +1,36 @@
|
||||
import request from '@/utils/request';
|
||||
import { LoginInfoQuery, LoginInfoVO } from './types';
|
||||
import { AxiosPromise } from 'axios';
|
||||
|
||||
// 查询登录日志列表
|
||||
export function list(query: LoginInfoQuery): AxiosPromise<LoginInfoVO[]> {
|
||||
return request({
|
||||
url: '/monitor/logininfor/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 删除登录日志
|
||||
export function delLoginInfo(infoId: string | number | Array<string | number>) {
|
||||
return request({
|
||||
url: '/monitor/logininfor/' + infoId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 解锁用户登录状态
|
||||
export function unlockLoginInfo(userName: string | Array<string>) {
|
||||
return request({
|
||||
url: '/monitor/logininfor/unlock/' + userName,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 清空登录日志
|
||||
export function cleanLoginInfo() {
|
||||
return request({
|
||||
url: '/monitor/logininfor/clean',
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
20
src/api/monitor/loginInfo/types.ts
Normal file
20
src/api/monitor/loginInfo/types.ts
Normal file
@ -0,0 +1,20 @@
|
||||
export interface LoginInfoVO {
|
||||
infoId: string | number;
|
||||
tenantId: string | number;
|
||||
userName: string;
|
||||
status: string;
|
||||
ipaddr: string;
|
||||
loginLocation: string;
|
||||
browser: string;
|
||||
os: string;
|
||||
msg: string;
|
||||
loginTime: string;
|
||||
}
|
||||
|
||||
export interface LoginInfoQuery extends PageQuery {
|
||||
ipaddr: string;
|
||||
userName: string;
|
||||
status: string;
|
||||
orderByColumn: string;
|
||||
isAsc: string;
|
||||
}
|
36
src/api/monitor/online/index.ts
Normal file
36
src/api/monitor/online/index.ts
Normal file
@ -0,0 +1,36 @@
|
||||
import request from '@/utils/request';
|
||||
import { OnlineQuery, OnlineVO } from './types';
|
||||
import { AxiosPromise } from 'axios';
|
||||
|
||||
// 查询在线用户列表
|
||||
export function list(query: OnlineQuery): AxiosPromise<OnlineVO[]> {
|
||||
return request({
|
||||
url: '/monitor/online/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 强退用户
|
||||
export function forceLogout(tokenId: string) {
|
||||
return request({
|
||||
url: '/monitor/online/' + tokenId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 获取当前用户登录在线设备
|
||||
export function getOnline() {
|
||||
return request({
|
||||
url: '/monitor/online',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 删除当前在线设备
|
||||
export function delOnline(tokenId: string) {
|
||||
return request({
|
||||
url: '/monitor/online/myself/' + tokenId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
15
src/api/monitor/online/types.ts
Normal file
15
src/api/monitor/online/types.ts
Normal file
@ -0,0 +1,15 @@
|
||||
export interface OnlineQuery extends PageQuery {
|
||||
ipaddr: string;
|
||||
userName: string;
|
||||
}
|
||||
|
||||
export interface OnlineVO extends BaseEntity {
|
||||
tokenId: string;
|
||||
deptName: string;
|
||||
userName: string;
|
||||
ipaddr: string;
|
||||
loginLocation: string;
|
||||
browser: string;
|
||||
os: string;
|
||||
loginTime: number;
|
||||
}
|
28
src/api/monitor/operlog/index.ts
Normal file
28
src/api/monitor/operlog/index.ts
Normal file
@ -0,0 +1,28 @@
|
||||
import request from '@/utils/request';
|
||||
import { OperLogQuery, OperLogVO } from './types';
|
||||
import { AxiosPromise } from 'axios';
|
||||
|
||||
// 查询操作日志列表
|
||||
export function list(query: OperLogQuery): AxiosPromise<OperLogVO[]> {
|
||||
return request({
|
||||
url: '/monitor/operlog/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 删除操作日志
|
||||
export function delOperlog(operId: string | number | Array<string | number>) {
|
||||
return request({
|
||||
url: '/monitor/operlog/' + operId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 清空操作日志
|
||||
export function cleanOperlog() {
|
||||
return request({
|
||||
url: '/monitor/operlog/clean',
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
53
src/api/monitor/operlog/types.ts
Normal file
53
src/api/monitor/operlog/types.ts
Normal file
@ -0,0 +1,53 @@
|
||||
export interface OperLogQuery extends PageQuery {
|
||||
operIp: string;
|
||||
title: string;
|
||||
operName: string;
|
||||
businessType: string;
|
||||
status: string;
|
||||
orderByColumn: string;
|
||||
isAsc: string;
|
||||
}
|
||||
|
||||
export interface OperLogVO extends BaseEntity {
|
||||
operId: string | number;
|
||||
tenantId: string;
|
||||
title: string;
|
||||
businessType: number;
|
||||
businessTypes: number[] | undefined;
|
||||
method: string;
|
||||
requestMethod: string;
|
||||
operatorType: number;
|
||||
operName: string;
|
||||
deptName: string;
|
||||
operUrl: string;
|
||||
operIp: string;
|
||||
operLocation: string;
|
||||
operParam: string;
|
||||
jsonResult: string;
|
||||
status: number;
|
||||
errorMsg: string;
|
||||
operTime: string;
|
||||
costTime: number;
|
||||
}
|
||||
|
||||
export interface OperLogForm {
|
||||
operId: number | string | undefined;
|
||||
tenantId: string | number | undefined;
|
||||
title: string;
|
||||
businessType: number;
|
||||
businessTypes: number[] | undefined;
|
||||
method: string;
|
||||
requestMethod: string;
|
||||
operatorType: number;
|
||||
operName: string;
|
||||
deptName: string;
|
||||
operUrl: string;
|
||||
operIp: string;
|
||||
operLocation: string;
|
||||
operParam: string;
|
||||
jsonResult: string;
|
||||
status: number;
|
||||
errorMsg: string;
|
||||
operTime: string;
|
||||
costTime: number;
|
||||
}
|
63
src/api/project/attendance/echarts.ts
Normal file
63
src/api/project/attendance/echarts.ts
Normal file
@ -0,0 +1,63 @@
|
||||
const grid = {
|
||||
left: 100,
|
||||
right: 100,
|
||||
top: 30,
|
||||
bottom: 50
|
||||
};
|
||||
|
||||
const color = ['#4FD6A9', '#409EFF', '#ECF5FF', '#FFC069'];
|
||||
const titleList = [
|
||||
{ name: '全勤人数', color: '#fff' },
|
||||
{ name: '半勤人数', color: '#fff' },
|
||||
{ name: '缺勤人数', color: '#000' },
|
||||
{ name: '请假人数', color: '#000' }
|
||||
];
|
||||
|
||||
// export const echartsConfig = (ref: any, list?: any) => {
|
||||
// const commandstatsIntance = echarts.init(ref, 'macarons');
|
||||
// };
|
||||
|
||||
export const option = (list?: any) => {
|
||||
const attendanceArray = list.map((item) => item.attendance);
|
||||
const halfAttendanceArray = list.map((item) => item.halfAttendance);
|
||||
const absenteeismArray = list.map((item) => item.absenteeism);
|
||||
const leaveArray = list.map((item) => item.leave);
|
||||
|
||||
const rawData = [attendanceArray, halfAttendanceArray, absenteeismArray, leaveArray];
|
||||
const series: any = titleList.map((item, sid) => {
|
||||
return {
|
||||
name: item.name,
|
||||
type: 'bar',
|
||||
stack: 'total',
|
||||
barWidth: '25',
|
||||
label: {
|
||||
show: true,
|
||||
color: item.color,
|
||||
fontSize: 10,
|
||||
formatter: function (params) {
|
||||
return params.value > 0 ? params.value : '';
|
||||
}
|
||||
},
|
||||
data: rawData[sid]
|
||||
};
|
||||
});
|
||||
const data = list.map((item) => item.clockDate);
|
||||
const option = {
|
||||
legend: {
|
||||
selectedMode: false,
|
||||
right: 0
|
||||
},
|
||||
grid,
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
show: false
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data
|
||||
},
|
||||
series,
|
||||
color
|
||||
};
|
||||
return option;
|
||||
};
|
99
src/api/project/attendance/index.ts
Normal file
99
src/api/project/attendance/index.ts
Normal file
@ -0,0 +1,99 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import {
|
||||
AttendanceVO,
|
||||
AttendanceForm,
|
||||
AttendanceQuery,
|
||||
AttendanceTwoWeekQuery,
|
||||
AttendanceTwoWeekVO,
|
||||
AttendanceMonthVO,
|
||||
AttendanceMonthQuery
|
||||
} from '@/api/project/attendance/types';
|
||||
|
||||
/**
|
||||
* 查询考勤列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listAttendance = (query?: AttendanceQuery): AxiosPromise<AttendanceVO[]> => {
|
||||
return request({
|
||||
url: '/project/constructionUser/list/attendance/total',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询近两周考勤列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listAttendanceTwoWeek = (query?: AttendanceTwoWeekQuery): AxiosPromise<AttendanceTwoWeekVO[]> => {
|
||||
return request({
|
||||
url: '/project/attendance/list/clockDate/twoWeek',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询施工人员月份考勤列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listAttendanceMonth = (query?: AttendanceMonthQuery): AxiosPromise<AttendanceMonthVO[]> => {
|
||||
return request({
|
||||
url: '/project/attendance/list/month/byUserId',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询考勤详细
|
||||
* @param id
|
||||
*/
|
||||
export const getAttendance = (id: string | number): AxiosPromise<AttendanceVO> => {
|
||||
return request({
|
||||
url: '/project/attendance/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增考勤
|
||||
* @param data
|
||||
*/
|
||||
export const addAttendance = (data: AttendanceForm) => {
|
||||
return request({
|
||||
url: '/project/attendance',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改考勤
|
||||
* @param data
|
||||
*/
|
||||
export const updateAttendance = (data: AttendanceForm) => {
|
||||
return request({
|
||||
url: '/project/attendance',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除考勤
|
||||
* @param id
|
||||
*/
|
||||
export const delAttendance = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/project/attendance/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
210
src/api/project/attendance/types.ts
Normal file
210
src/api/project/attendance/types.ts
Normal file
@ -0,0 +1,210 @@
|
||||
export interface AttendanceVO {
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
userName: string;
|
||||
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 人员id
|
||||
*/
|
||||
|
||||
/**
|
||||
* 上班打卡时间
|
||||
*/
|
||||
onClockTime: string;
|
||||
|
||||
/**
|
||||
* 下班打卡时间
|
||||
*/
|
||||
offClockTime: string;
|
||||
|
||||
/**
|
||||
* 打卡日期
|
||||
*/
|
||||
clockDate: string;
|
||||
|
||||
/**
|
||||
* 1正常,2迟到,3早退,4缺勤,5补卡
|
||||
*/
|
||||
clockStatus: string;
|
||||
|
||||
/**
|
||||
* 上下班(1上班,2下班)
|
||||
*/
|
||||
commuter: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
}
|
||||
|
||||
export interface AttendanceTwoWeekQuery {
|
||||
projectId?: string | number;
|
||||
}
|
||||
|
||||
export interface AttendanceMonthQuery {
|
||||
userId: string | number;
|
||||
clockMonth?: string;
|
||||
}
|
||||
|
||||
export interface AttendanceMonthVO {
|
||||
id: string | number;
|
||||
clockDate: string;
|
||||
status: string;
|
||||
attendanceList?: monthList[];
|
||||
clockList?: clockObject;
|
||||
}
|
||||
|
||||
interface clockObject {
|
||||
downClockTime?: string;
|
||||
downClockPic?: string;
|
||||
upClockTime?: string;
|
||||
upClockPic?: string;
|
||||
}
|
||||
|
||||
interface monthList {
|
||||
commuter: string;
|
||||
clockTime: string;
|
||||
clockStatus: string;
|
||||
}
|
||||
|
||||
export interface AttendanceTwoWeekVO {
|
||||
/**
|
||||
* 出勤人数
|
||||
*/
|
||||
attendance: string;
|
||||
|
||||
/**
|
||||
* 半勤人数
|
||||
|
||||
*/
|
||||
halfAttendance: string;
|
||||
|
||||
/**
|
||||
* 打卡日期
|
||||
*/
|
||||
clockDate: string;
|
||||
|
||||
/**
|
||||
* 缺勤人数
|
||||
|
||||
*/
|
||||
absenteeism: string;
|
||||
}
|
||||
|
||||
export interface AttendanceForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 人员id
|
||||
*/
|
||||
userId?: string | number;
|
||||
typeOfWork?: string;
|
||||
teamId?: string;
|
||||
clockDate?: string;
|
||||
|
||||
/**
|
||||
* 人脸照
|
||||
*/
|
||||
facePic?: string;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 上班打卡时间
|
||||
*/
|
||||
onClockTime?: string;
|
||||
|
||||
/**
|
||||
* 下班打卡时间
|
||||
*/
|
||||
offClockTime?: string;
|
||||
|
||||
/**
|
||||
* 打卡日期
|
||||
*/
|
||||
clockDate?: string;
|
||||
|
||||
/**
|
||||
* 1正常,2迟到,3早退,4缺勤,5补卡
|
||||
*/
|
||||
clockStatus?: string;
|
||||
|
||||
/**
|
||||
* 代打人员id
|
||||
*/
|
||||
pinchUserId?: string | number;
|
||||
|
||||
/**
|
||||
* 多次打卡时间记录
|
||||
*/
|
||||
clockRecord?: string;
|
||||
|
||||
/**
|
||||
* 上下班(1上班,2下班)
|
||||
*/
|
||||
commuter?: string;
|
||||
|
||||
/**
|
||||
* 日薪
|
||||
*/
|
||||
dailyWage?: number;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
lng?: string;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
lat?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface AttendanceQuery extends PageQuery {
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
userName?: string;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
typeOfWork?: string | number;
|
||||
teamId?: string | number;
|
||||
|
||||
/**
|
||||
* 打卡日期
|
||||
*/
|
||||
clockDate?: string;
|
||||
|
||||
/**
|
||||
* 1正常,2迟到,3早退,4缺勤,5补卡
|
||||
*/
|
||||
clockStatus?: string;
|
||||
|
||||
/**
|
||||
* 上下班(1上班,2下班)
|
||||
*/
|
||||
commuter?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
63
src/api/project/attendanceRecords/index.ts
Normal file
63
src/api/project/attendanceRecords/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { AttendanceVO, AttendanceForm, AttendanceQuery } from '@/api/project/attendance/types';
|
||||
|
||||
/**
|
||||
* 查询考勤列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listAttendance = (query?: AttendanceQuery): AxiosPromise<AttendanceVO[]> => {
|
||||
return request({
|
||||
url: '/project/attendance/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询考勤详细
|
||||
* @param id
|
||||
*/
|
||||
export const getAttendance = (id: string | number): AxiosPromise<AttendanceVO> => {
|
||||
return request({
|
||||
url: '/project/attendance/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增考勤
|
||||
* @param data
|
||||
*/
|
||||
export const addAttendance = (data: AttendanceForm) => {
|
||||
return request({
|
||||
url: '/project/attendance',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改考勤
|
||||
* @param data
|
||||
*/
|
||||
export const updateAttendance = (data: AttendanceForm) => {
|
||||
return request({
|
||||
url: '/project/attendance',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除考勤
|
||||
* @param id
|
||||
*/
|
||||
export const delAttendance = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/project/attendance/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
146
src/api/project/attendanceRecords/types.ts
Normal file
146
src/api/project/attendanceRecords/types.ts
Normal file
@ -0,0 +1,146 @@
|
||||
export interface AttendanceVO {
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
userName: string;
|
||||
|
||||
/**
|
||||
* 上班打卡时间
|
||||
*/
|
||||
onClockTime: string;
|
||||
|
||||
/**
|
||||
* 下班打卡时间
|
||||
*/
|
||||
offClockTime: string;
|
||||
|
||||
/**
|
||||
* 打卡日期
|
||||
*/
|
||||
clockDate: string;
|
||||
|
||||
/**
|
||||
* 1正常,2迟到,3早退,4缺勤,5补卡
|
||||
*/
|
||||
clockStatus: string;
|
||||
|
||||
/**
|
||||
* 上下班(1上班,2下班)
|
||||
*/
|
||||
commuter: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
}
|
||||
|
||||
export interface AttendanceForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 人员id
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 人脸照
|
||||
*/
|
||||
facePic?: string;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 上班打卡时间
|
||||
*/
|
||||
onClockTime?: string;
|
||||
|
||||
/**
|
||||
* 下班打卡时间
|
||||
*/
|
||||
offClockTime?: string;
|
||||
|
||||
/**
|
||||
* 打卡日期
|
||||
*/
|
||||
clockDate?: string;
|
||||
|
||||
/**
|
||||
* 1正常,2迟到,3早退,4缺勤,5补卡
|
||||
*/
|
||||
clockStatus?: string;
|
||||
|
||||
/**
|
||||
* 代打人员id
|
||||
*/
|
||||
pinchUserId?: string | number;
|
||||
|
||||
/**
|
||||
* 多次打卡时间记录
|
||||
*/
|
||||
clockRecord?: string;
|
||||
|
||||
/**
|
||||
* 上下班(1上班,2下班)
|
||||
*/
|
||||
commuter?: string;
|
||||
|
||||
/**
|
||||
* 日薪
|
||||
*/
|
||||
dailyWage?: number;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
lng?: string;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
lat?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface AttendanceQuery extends PageQuery {
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
userName?: string;
|
||||
teamId?: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 打卡日期
|
||||
*/
|
||||
clockDate?: string;
|
||||
|
||||
/**
|
||||
* 1正常,2迟到,3早退,4缺勤,5补卡
|
||||
*/
|
||||
clockStatus?: string;
|
||||
|
||||
/**
|
||||
* 上下班(1上班,2下班)
|
||||
*/
|
||||
commuter?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
63
src/api/project/constructionBlacklist/index.ts
Normal file
63
src/api/project/constructionBlacklist/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { ConstructionBlacklistVO, ConstructionBlacklistForm, ConstructionBlacklistQuery } from '@/api/project/constructionBlacklist/types';
|
||||
|
||||
/**
|
||||
* 查询黑名单列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listConstructionBlacklist = (query?: ConstructionBlacklistQuery): AxiosPromise<ConstructionBlacklistVO[]> => {
|
||||
return request({
|
||||
url: '/project/constructionBlacklist/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询黑名单详细
|
||||
* @param id
|
||||
*/
|
||||
export const getConstructionBlacklist = (id: string | number): AxiosPromise<ConstructionBlacklistVO> => {
|
||||
return request({
|
||||
url: '/project/constructionBlacklist/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增黑名单
|
||||
* @param data
|
||||
*/
|
||||
export const addConstructionBlacklist = (data: ConstructionBlacklistForm) => {
|
||||
return request({
|
||||
url: '/project/constructionBlacklist',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改黑名单
|
||||
* @param data
|
||||
*/
|
||||
export const updateConstructionBlacklist = (data: ConstructionBlacklistForm) => {
|
||||
return request({
|
||||
url: '/project/constructionBlacklist',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除黑名单
|
||||
* @param id
|
||||
*/
|
||||
export const delConstructionBlacklist = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/project/constructionBlacklist/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
69
src/api/project/constructionBlacklist/types.ts
Normal file
69
src/api/project/constructionBlacklist/types.ts
Normal file
@ -0,0 +1,69 @@
|
||||
export interface ConstructionBlacklistVO {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
id: string | number;
|
||||
/**
|
||||
* 名字
|
||||
*/
|
||||
userName: string;
|
||||
|
||||
/**
|
||||
* 身份证号码
|
||||
*/
|
||||
sfzNumber: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
}
|
||||
|
||||
export interface ConstructionBlacklistForm extends BaseEntity {
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface ConstructionBlacklistQuery extends PageQuery {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 名字
|
||||
*/
|
||||
userName?: string;
|
||||
|
||||
/**
|
||||
* 身份证号码
|
||||
*/
|
||||
sfzNumber?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
206
src/api/project/constructionUser/index.ts
Normal file
206
src/api/project/constructionUser/index.ts
Normal file
@ -0,0 +1,206 @@
|
||||
import request, { download } from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import {
|
||||
ConstructionUserForm,
|
||||
ConstructionUserQuery,
|
||||
ConstructionUserVO,
|
||||
skipType,
|
||||
ConstructionUserStatusForm,
|
||||
ConstructionUserPlayCardForm,
|
||||
ConstructionUserSalaryForm,
|
||||
ConstructionUserExitForm,
|
||||
ConstructionUserTemplateForm,
|
||||
ConstructionUserMembeForm,
|
||||
ConstructionMonthQuery
|
||||
} from '@/api/project/constructionUser/types';
|
||||
import { AttendanceMonthVO } from '../attendance/types';
|
||||
|
||||
/**
|
||||
* 查询施工人员月份考勤列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listConstructionMonth = (query?: ConstructionMonthQuery): AxiosPromise<AttendanceMonthVO[]> => {
|
||||
return request({
|
||||
url: '/project/constructionUser/list/attendance/month',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询施工人员列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listConstructionUser = (query?: ConstructionUserQuery): AxiosPromise<ConstructionUserVO[]> => {
|
||||
return request({
|
||||
url: '/project/constructionUser/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询施工人员详细
|
||||
* @param id
|
||||
*/
|
||||
export const getConstructionUser = (id: string | number): AxiosPromise<ConstructionUserVO> => {
|
||||
return request({
|
||||
url: '/project/constructionUser/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 人员迁移
|
||||
* @param data
|
||||
*/
|
||||
export const transferConstructionUser = (data: skipType) => {
|
||||
return request({
|
||||
url: '/project/constructionUser/change/project',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询项目以及项目下的分包公司列表
|
||||
*/
|
||||
export const getProjectContractorList = () => {
|
||||
return request({
|
||||
url: '/project/project/list/project/contractorList',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增施工人员
|
||||
* @param data
|
||||
*/
|
||||
export const addConstructionUser = (data: ConstructionUserForm): AxiosPromise<string | number> => {
|
||||
return request({
|
||||
url: '/project/constructionUser',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改施工人员
|
||||
* @param data
|
||||
*/
|
||||
export const updateConstructionUser = (data: ConstructionUserForm) => {
|
||||
return request({
|
||||
url: '/project/constructionUser',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除施工人员
|
||||
* @param id
|
||||
*/
|
||||
export const delConstructionUser = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/project/constructionUser/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改施工人员在职状态
|
||||
* @param data
|
||||
*/
|
||||
export const updateConstructionUserStatus = (data: ConstructionUserStatusForm) => {
|
||||
return request({
|
||||
url: '/project/constructionUser/batch/status',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据项目id批量修改施工人员打卡状态
|
||||
* @param data
|
||||
*/
|
||||
export const updateConstructionUserPlayCardStatus = (data: ConstructionUserPlayCardForm) => {
|
||||
return request({
|
||||
url: '/project/constructionUser/batch/clock',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改施工人员打卡状态
|
||||
* @param data
|
||||
*/
|
||||
export const updateConstructionUserPlayCardOneStatus = (data: ConstructionUserPlayCardForm) => {
|
||||
return request({
|
||||
url: '/project/constructionUser/clock',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改施工人员工资
|
||||
* @param data
|
||||
*/
|
||||
export const updateConstructionUserSalary = (data: ConstructionUserSalaryForm) => {
|
||||
return request({
|
||||
url: '/project/constructionUser/salary',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询施工人员入退场记录
|
||||
* @param query
|
||||
*/
|
||||
export const getConstructionUserExit = (query: ConstructionUserExitForm) => {
|
||||
return request({
|
||||
url: '/project/constructionUserExit/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 下载施工人员文件存储模板
|
||||
* @param query
|
||||
*/
|
||||
export const dowloadConstructionUserTemplate = (query: ConstructionUserTemplateForm) => {
|
||||
let { projectId } = query;
|
||||
const fileName = projectId + '_project.zip';
|
||||
return download('/project/constructionUserFile/exportFileTemplate', query, fileName);
|
||||
};
|
||||
|
||||
/**
|
||||
* 施工人员退场
|
||||
* @param data
|
||||
*/
|
||||
export const delConstructionUserMember = (data: ConstructionUserMembeForm) => {
|
||||
return request({
|
||||
url: '/project/projectTeamMember/',
|
||||
method: 'delete',
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 上传施工人员文件压缩包,批量导入存储施工人员文件
|
||||
* @param data
|
||||
*/
|
||||
export const importConstructionUserInfo = (file: string) => {
|
||||
return request({
|
||||
url: '/project/constructionUserFile/upload/zip',
|
||||
method: 'post',
|
||||
data: { file }
|
||||
});
|
||||
};
|
606
src/api/project/constructionUser/types.ts
Normal file
606
src/api/project/constructionUser/types.ts
Normal file
@ -0,0 +1,606 @@
|
||||
import { ContractorVO } from '@/api/project/contractor/types';
|
||||
import { ProjectTeamVO } from '@/api/project/projectTeam/types';
|
||||
import { S } from 'node_modules/vite/dist/node/types.d-aGj9QkWt';
|
||||
|
||||
export interface ConstructionUserVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 微信id
|
||||
*/
|
||||
openid: string | number;
|
||||
|
||||
/**
|
||||
* 微信名称
|
||||
*/
|
||||
nickName: string;
|
||||
|
||||
/**
|
||||
* 人脸照
|
||||
*/
|
||||
facePic: string;
|
||||
|
||||
/**
|
||||
* 人脸照url
|
||||
*/
|
||||
facePicUrl: string;
|
||||
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
userName: string;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 分包公司id
|
||||
*/
|
||||
contractorId: string | number;
|
||||
|
||||
/**
|
||||
* 分包公司
|
||||
*/
|
||||
contractorVo: ContractorVO;
|
||||
|
||||
/**
|
||||
* 班组id
|
||||
*/
|
||||
teamId: string | number;
|
||||
|
||||
/**
|
||||
* 班组
|
||||
*/
|
||||
teamVo: ProjectTeamVO;
|
||||
|
||||
/**
|
||||
* 状态(0在职 1离职)
|
||||
*/
|
||||
status: number;
|
||||
|
||||
/**
|
||||
* 是否代打
|
||||
*/
|
||||
isPinch: number;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
phone: string;
|
||||
|
||||
/**
|
||||
* 0:保密 1:男 2女
|
||||
*/
|
||||
sex: number;
|
||||
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
nation: string;
|
||||
|
||||
/**
|
||||
* 身份证正面照片
|
||||
*/
|
||||
sfzFrontPic: string;
|
||||
|
||||
/**
|
||||
* 身份证背面照片
|
||||
*/
|
||||
sfzBackPic: string;
|
||||
|
||||
/**
|
||||
* 身份证号码
|
||||
*/
|
||||
sfzNumber: string;
|
||||
|
||||
/**
|
||||
* 身份证有效开始期
|
||||
*/
|
||||
sfzStart: string;
|
||||
|
||||
/**
|
||||
* 身份证有效结束期
|
||||
*/
|
||||
sfzEnd: string;
|
||||
|
||||
/**
|
||||
* 身份证地址
|
||||
*/
|
||||
sfzSite: string;
|
||||
|
||||
/**
|
||||
* 身份证出生日期
|
||||
*/
|
||||
sfzBirth: string;
|
||||
|
||||
/**
|
||||
* 籍贯
|
||||
*/
|
||||
nativePlace: string;
|
||||
|
||||
/**
|
||||
* 银行卡图片
|
||||
*/
|
||||
yhkPic: string;
|
||||
|
||||
/**
|
||||
* 银行卡号
|
||||
*/
|
||||
yhkNumber: string;
|
||||
|
||||
/**
|
||||
* 开户行
|
||||
*/
|
||||
yhkOpeningBank: string;
|
||||
|
||||
/**
|
||||
* 持卡人
|
||||
*/
|
||||
yhkCardholder: string;
|
||||
|
||||
/**
|
||||
* 工种(字典type_of_work)
|
||||
*/
|
||||
typeOfWork: number;
|
||||
|
||||
/**
|
||||
* 特种工作证图片
|
||||
*/
|
||||
specialWorkPic: string;
|
||||
|
||||
/**
|
||||
* 打卡(0启用打卡 1禁止打卡)
|
||||
*/
|
||||
clock: number;
|
||||
|
||||
/**
|
||||
* 入场时间
|
||||
*/
|
||||
entryDate: string;
|
||||
|
||||
/**
|
||||
* 离场时间
|
||||
*/
|
||||
leaveDate: string;
|
||||
|
||||
/**
|
||||
* 薪水
|
||||
*/
|
||||
salary: number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface skipType {
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 分包id
|
||||
*/
|
||||
contractorId: string | number;
|
||||
id: string | number;
|
||||
}
|
||||
|
||||
export interface ConstructionMonthQuery {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
userId: string | number;
|
||||
|
||||
/**
|
||||
* 打卡月份
|
||||
|
||||
*/
|
||||
clockMonth?: string | number;
|
||||
}
|
||||
|
||||
export interface ConstructionUserMembeForm {
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
id: string | number;
|
||||
/**
|
||||
* 用户姓名
|
||||
*/
|
||||
userName: string | number;
|
||||
/**
|
||||
* 文件路径
|
||||
*/
|
||||
filePath: string;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string | number;
|
||||
}
|
||||
|
||||
export interface ConstructionUserTemplateForm {
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
}
|
||||
|
||||
export interface ConstructionUserExitForm {
|
||||
/**
|
||||
* userId
|
||||
*/
|
||||
userId: number | string;
|
||||
}
|
||||
|
||||
export interface ConstructionUserSalaryForm {
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
id: number | string;
|
||||
|
||||
/**
|
||||
* 工资
|
||||
*/
|
||||
salary?: number | string;
|
||||
}
|
||||
|
||||
export interface ConstructionUserPlayCardForm {
|
||||
/**
|
||||
* 项目
|
||||
*/
|
||||
projectId?: string | number;
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
id?: string | number;
|
||||
/**
|
||||
* 打卡状态
|
||||
*/
|
||||
clock: number | string;
|
||||
}
|
||||
|
||||
export interface skipOptionType {
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
projectName: string | number;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
id: string | number;
|
||||
/**
|
||||
* 子项
|
||||
*/
|
||||
contractorList: Array<skipTeamType>;
|
||||
}
|
||||
export interface skipTeamType {
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
name: string | number;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
id: string | number;
|
||||
}
|
||||
|
||||
export interface ConstructionUserForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 微信id
|
||||
*/
|
||||
openid?: string | number;
|
||||
|
||||
/**
|
||||
* 微信名称
|
||||
*/
|
||||
nickName?: string;
|
||||
|
||||
/**
|
||||
* 人脸照
|
||||
*/
|
||||
facePic?: string;
|
||||
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
userName?: string;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 分包公司id
|
||||
*/
|
||||
contractorId?: string | number;
|
||||
/**
|
||||
* 结算方式
|
||||
*/
|
||||
wageMeasureUnit?: string | number;
|
||||
|
||||
/**
|
||||
* 班组id
|
||||
*/
|
||||
teamId?: string | number;
|
||||
|
||||
/**
|
||||
* 状态(0在职 1离职)
|
||||
*/
|
||||
status?: number;
|
||||
|
||||
/**
|
||||
* 是否代打
|
||||
*/
|
||||
isPinch?: number;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
phone?: string;
|
||||
|
||||
/**
|
||||
* 0:保密 1:男 2女
|
||||
*/
|
||||
sex?: number;
|
||||
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
nation?: string;
|
||||
|
||||
/**
|
||||
* 身份证正面照片
|
||||
*/
|
||||
sfzFrontPic: string;
|
||||
|
||||
/**
|
||||
* 身份证背面照片
|
||||
*/
|
||||
sfzBackPic: string;
|
||||
|
||||
/**
|
||||
* 身份证号码
|
||||
*/
|
||||
sfzNumber?: string;
|
||||
|
||||
/**
|
||||
* 身份证有效开始期
|
||||
*/
|
||||
sfzStart?: string;
|
||||
|
||||
/**
|
||||
* 身份证有效结束期
|
||||
*/
|
||||
sfzEnd?: string;
|
||||
|
||||
/**
|
||||
* 身份证地址
|
||||
*/
|
||||
sfzSite?: string;
|
||||
|
||||
/**
|
||||
* 身份证出生日期
|
||||
*/
|
||||
sfzBirth?: string;
|
||||
|
||||
/**
|
||||
* 籍贯
|
||||
*/
|
||||
nativePlace?: string;
|
||||
|
||||
/**
|
||||
* 银行卡图片
|
||||
*/
|
||||
yhkPic: string;
|
||||
|
||||
/**
|
||||
* 银行卡号
|
||||
*/
|
||||
yhkNumber?: string;
|
||||
|
||||
/**
|
||||
* 开户行
|
||||
*/
|
||||
yhkOpeningBank?: string;
|
||||
|
||||
/**
|
||||
* 持卡人
|
||||
*/
|
||||
yhkCardholder?: string;
|
||||
|
||||
/**
|
||||
* 工种(字典type_of_work)
|
||||
*/
|
||||
typeOfWork?: number;
|
||||
|
||||
/**
|
||||
* 特种工作证图片
|
||||
*/
|
||||
specialWorkPic: string;
|
||||
|
||||
/**
|
||||
* 打卡(0启用打卡 1禁止打卡)
|
||||
*/
|
||||
clock?: number;
|
||||
|
||||
/**
|
||||
* 入场时间
|
||||
*/
|
||||
entryDate?: string;
|
||||
|
||||
/**
|
||||
* 离场时间
|
||||
*/
|
||||
leaveDate?: string;
|
||||
|
||||
/**
|
||||
* 薪水
|
||||
*/
|
||||
salary?: number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface ConstructionUserStatusForm {
|
||||
status: number | string;
|
||||
idList: Array<string | number>;
|
||||
}
|
||||
|
||||
export interface ConstructionUserQuery extends PageQuery {
|
||||
/**
|
||||
* 微信id
|
||||
*/
|
||||
openid?: string | number;
|
||||
|
||||
/**
|
||||
* 微信名称
|
||||
*/
|
||||
nickName?: string;
|
||||
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
userName?: string;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 分包公司id
|
||||
*/
|
||||
contractorId?: string | number;
|
||||
|
||||
/**
|
||||
* 班组id
|
||||
*/
|
||||
teamId?: string | number;
|
||||
|
||||
/**
|
||||
* 不在班组id
|
||||
*/
|
||||
notTeamId?: string | number;
|
||||
|
||||
/**
|
||||
* 状态(0在职 1离职)
|
||||
*/
|
||||
status?: number;
|
||||
|
||||
/**
|
||||
* 是否代打
|
||||
*/
|
||||
isPinch?: number;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
phone?: string;
|
||||
|
||||
/**
|
||||
* 0:保密 1:男 2女
|
||||
*/
|
||||
sex?: number;
|
||||
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
nation?: string;
|
||||
|
||||
/**
|
||||
* 身份证号码
|
||||
*/
|
||||
sfzNumber?: string;
|
||||
|
||||
/**
|
||||
* 身份证有效开始期
|
||||
*/
|
||||
sfzStart?: string;
|
||||
|
||||
/**
|
||||
* 身份证有效结束期
|
||||
*/
|
||||
sfzEnd?: string;
|
||||
|
||||
/**
|
||||
* 身份证地址
|
||||
*/
|
||||
sfzSite?: string;
|
||||
|
||||
/**
|
||||
* 身份证出生日期
|
||||
*/
|
||||
sfzBirth?: string;
|
||||
|
||||
/**
|
||||
* 籍贯
|
||||
*/
|
||||
nativePlace?: string;
|
||||
|
||||
/**
|
||||
* 银行卡号
|
||||
*/
|
||||
yhkNumber?: string;
|
||||
|
||||
/**
|
||||
* 开户行
|
||||
*/
|
||||
yhkOpeningBank?: string;
|
||||
|
||||
/**
|
||||
* 持卡人
|
||||
*/
|
||||
yhkCardholder?: string;
|
||||
|
||||
/**
|
||||
* 工种(字典type_of_work)
|
||||
*/
|
||||
typeOfWork?: number;
|
||||
|
||||
/**
|
||||
* 打卡(0启用打卡 1禁止打卡)
|
||||
*/
|
||||
clock?: number;
|
||||
|
||||
/**
|
||||
* 入场时间
|
||||
*/
|
||||
entryDate?: string;
|
||||
|
||||
/**
|
||||
* 离场时间
|
||||
*/
|
||||
leaveDate?: string;
|
||||
|
||||
/**
|
||||
* 薪水
|
||||
*/
|
||||
salary?: number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
40
src/api/project/constructionUserFile/index.ts
Normal file
40
src/api/project/constructionUserFile/index.ts
Normal file
@ -0,0 +1,40 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { ConstructionUserFileVO, ConstructionUserFileForm, ConstructionUserFileQuery } from '@/api/project/constructionUserFile/types';
|
||||
|
||||
/**
|
||||
* 查询施工人员文件存储列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listConstructionUserFile = (query?: ConstructionUserFileQuery): AxiosPromise<ConstructionUserFileVO[]> => {
|
||||
return request({
|
||||
url: '/project/constructionUserFile/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询施工人员文件存储详细
|
||||
* @param data
|
||||
*/
|
||||
export const setConstructionUserFile = (data: ConstructionUserFileForm): AxiosPromise<string | number> => {
|
||||
return request({
|
||||
url: '/project/constructionUserFile/save',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除施工人员文件存储
|
||||
* @param id
|
||||
*/
|
||||
export const delConstructionUserFile = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/project/constructionUserFile/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
137
src/api/project/constructionUserFile/types.ts
Normal file
137
src/api/project/constructionUserFile/types.ts
Normal file
@ -0,0 +1,137 @@
|
||||
export interface ConstructionUserFileVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId: string | number;
|
||||
|
||||
/**
|
||||
* 文件类型
|
||||
*/
|
||||
fileType: string;
|
||||
|
||||
/**
|
||||
* 文件名称
|
||||
*/
|
||||
fileName: string;
|
||||
|
||||
/**
|
||||
* 文件路径
|
||||
*/
|
||||
path: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
}
|
||||
|
||||
export interface ConstructionUserExitVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId: string | number;
|
||||
/**
|
||||
* 文件路径地址
|
||||
*/
|
||||
pathUrl: Array<string>;
|
||||
|
||||
/**
|
||||
* 身份证号码
|
||||
|
||||
*/
|
||||
sfzNumber: string;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string;
|
||||
/**
|
||||
* 班组id
|
||||
*/
|
||||
teamId: string;
|
||||
/**
|
||||
* 入场时间
|
||||
|
||||
*/
|
||||
entryDate: string;
|
||||
/**
|
||||
* 退场时间
|
||||
|
||||
*/
|
||||
leaveDate: string;
|
||||
|
||||
/**
|
||||
* 退场文件
|
||||
|
||||
*/
|
||||
path: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
}
|
||||
|
||||
export interface ConstructionUserFileForm extends BaseEntity {
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 文件类型
|
||||
*/
|
||||
fileList?: Array<fileListType>;
|
||||
}
|
||||
|
||||
interface fileListType {
|
||||
fileId: string | number;
|
||||
fileType: string | number;
|
||||
}
|
||||
|
||||
export interface ConstructionUserFileQuery {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 文件类型
|
||||
*/
|
||||
fileType?: string;
|
||||
|
||||
/**
|
||||
* 文件名称
|
||||
*/
|
||||
fileName?: string;
|
||||
|
||||
/**
|
||||
* 文件路径
|
||||
*/
|
||||
path?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
63
src/api/project/contractor/index.ts
Normal file
63
src/api/project/contractor/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { ContractorForm, ContractorQuery, ContractorVO } from '@/api/project/contractor/types';
|
||||
|
||||
/**
|
||||
* 查询分包单位列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listContractor = (query?: ContractorQuery): AxiosPromise<ContractorVO[]> => {
|
||||
return request({
|
||||
url: '/project/contractor/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询分包单位详细
|
||||
* @param id
|
||||
*/
|
||||
export const getContractor = (id: string | number): AxiosPromise<ContractorVO> => {
|
||||
return request({
|
||||
url: '/project/contractor/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增分包单位
|
||||
* @param data
|
||||
*/
|
||||
export const addContractor = (data: ContractorForm): AxiosPromise<string | number> => {
|
||||
return request({
|
||||
url: '/project/contractor',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改分包单位
|
||||
* @param data
|
||||
*/
|
||||
export const updateContractor = (data: ContractorForm) => {
|
||||
return request({
|
||||
url: '/project/contractor',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除分包单位
|
||||
* @param id
|
||||
*/
|
||||
export const delContractor = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/project/contractor/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
128
src/api/project/contractor/types.ts
Normal file
128
src/api/project/contractor/types.ts
Normal file
@ -0,0 +1,128 @@
|
||||
export interface ContractorVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
principal: string;
|
||||
|
||||
/**
|
||||
* 负责人联系电话
|
||||
*/
|
||||
principalPhone: string;
|
||||
|
||||
/**
|
||||
* 管理人
|
||||
*/
|
||||
custodian: string;
|
||||
|
||||
/**
|
||||
* 管理人联系电话
|
||||
*/
|
||||
custodianPhone: string;
|
||||
|
||||
/**
|
||||
* 公司相关文件
|
||||
*/
|
||||
fileMap: Record<string, string>;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface ContractorForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
principal?: string;
|
||||
|
||||
/**
|
||||
* 负责人联系电话
|
||||
*/
|
||||
principalPhone?: string;
|
||||
|
||||
/**
|
||||
* 管理人
|
||||
*/
|
||||
custodian?: string;
|
||||
|
||||
/**
|
||||
* 管理人联系电话
|
||||
*/
|
||||
custodianPhone?: string;
|
||||
|
||||
/**
|
||||
* 公司相关文件
|
||||
*/
|
||||
fileMap: Record<string, string | number>;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface ContractorQuery extends PageQuery {
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
principal?: string;
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
/**
|
||||
* 负责人联系电话
|
||||
*/
|
||||
principalPhone?: string;
|
||||
|
||||
/**
|
||||
* 管理人
|
||||
*/
|
||||
custodian?: string;
|
||||
|
||||
/**
|
||||
* 管理人联系电话
|
||||
*/
|
||||
custodianPhone?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
76
src/api/project/leave/index.ts
Normal file
76
src/api/project/leave/index.ts
Normal file
@ -0,0 +1,76 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { LeaveVO, LeaveForm, LeaveQuery } from '@/api/project/leave/types';
|
||||
import { AuditReissueCardForm } from '../reissueCard/types';
|
||||
|
||||
/**
|
||||
* 查询施工人员请假申请列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listLeave = (query?: LeaveQuery): AxiosPromise<LeaveVO[]> => {
|
||||
return request({
|
||||
url: '/project/leave/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询施工人员请假申请详细
|
||||
* @param id
|
||||
*/
|
||||
export const getLeave = (id: string | number): AxiosPromise<LeaveVO> => {
|
||||
return request({
|
||||
url: '/project/leave/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增施工人员请假申请
|
||||
* @param data
|
||||
*/
|
||||
export const addLeave = (data: LeaveForm) => {
|
||||
return request({
|
||||
url: '/project/leave',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改施工人员请假申请
|
||||
* @param data
|
||||
*/
|
||||
export const updateLeave = (data: LeaveForm) => {
|
||||
return request({
|
||||
url: '/project/leave',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除施工人员请假申请
|
||||
* @param id
|
||||
*/
|
||||
export const delLeave = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/project/leave/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 管理员审核施工人员请假申请
|
||||
* @param data
|
||||
*/
|
||||
export const AuditReissueCard = (data: AuditReissueCardForm) => {
|
||||
return request({
|
||||
url: '/project/leave/review/manager',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
206
src/api/project/leave/types.ts
Normal file
206
src/api/project/leave/types.ts
Normal file
@ -0,0 +1,206 @@
|
||||
export interface LeaveVO {
|
||||
/**
|
||||
* 申请人名字
|
||||
*/
|
||||
userName: string;
|
||||
id?: string | number;
|
||||
/**
|
||||
* 申请请假说明
|
||||
*/
|
||||
userExplain: string;
|
||||
status?: string;
|
||||
/**
|
||||
* 请假申请时间
|
||||
*/
|
||||
userTime: string;
|
||||
|
||||
/**
|
||||
* 请假类型(1事假 2病假)
|
||||
*/
|
||||
leaveType: string;
|
||||
|
||||
/**
|
||||
* 请假开始时间
|
||||
*/
|
||||
startTime: string;
|
||||
|
||||
/**
|
||||
* 请假结束时间
|
||||
*/
|
||||
endTime: string;
|
||||
|
||||
/**
|
||||
* 班组长名字
|
||||
*/
|
||||
gangerName: string;
|
||||
|
||||
/**
|
||||
* 班组长意见(1未读 2同意 3拒绝)
|
||||
*/
|
||||
gangerOpinion: string;
|
||||
|
||||
/**
|
||||
* 班组长说明
|
||||
*/
|
||||
gangerExplain: string;
|
||||
|
||||
/**
|
||||
* 班组长操作时间
|
||||
*/
|
||||
gangerTime: string;
|
||||
|
||||
/**
|
||||
* 管理员意见(1未读 2同意 3拒绝)
|
||||
*/
|
||||
managerOpinion: string;
|
||||
|
||||
/**
|
||||
* 管理员说明
|
||||
*/
|
||||
managerExplain: string;
|
||||
|
||||
/**
|
||||
* 管理员操作时间
|
||||
*/
|
||||
managerTime: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
managerName?: string;
|
||||
}
|
||||
|
||||
export interface LeaveForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 申请人id
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 申请人名字
|
||||
*/
|
||||
userName?: string;
|
||||
|
||||
/**
|
||||
* 申请请假说明
|
||||
*/
|
||||
userExplain?: string;
|
||||
|
||||
/**
|
||||
* 请假申请时间
|
||||
*/
|
||||
userTime?: string;
|
||||
|
||||
/**
|
||||
* 请假类型(1事假 2病假)
|
||||
*/
|
||||
leaveType?: string;
|
||||
|
||||
/**
|
||||
* 请假开始时间
|
||||
*/
|
||||
startTime?: string;
|
||||
|
||||
/**
|
||||
* 请假结束时间
|
||||
*/
|
||||
endTime?: string;
|
||||
|
||||
/**
|
||||
* 班组长
|
||||
*/
|
||||
gangerId?: string | number;
|
||||
|
||||
/**
|
||||
* 班组长名字
|
||||
*/
|
||||
gangerName?: string;
|
||||
|
||||
/**
|
||||
* 班组长意见(1未读 2同意 3拒绝)
|
||||
*/
|
||||
gangerOpinion?: string;
|
||||
|
||||
/**
|
||||
* 班组长说明
|
||||
*/
|
||||
gangerExplain?: string;
|
||||
|
||||
/**
|
||||
* 班组长操作时间
|
||||
*/
|
||||
gangerTime?: string;
|
||||
|
||||
/**
|
||||
* 管理员意见(1未读 2同意 3拒绝)
|
||||
*/
|
||||
managerOpinion?: string;
|
||||
|
||||
/**
|
||||
* 管理员说明
|
||||
*/
|
||||
managerExplain?: string;
|
||||
|
||||
/**
|
||||
* 管理员操作时间
|
||||
*/
|
||||
managerTime?: string;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 班组id
|
||||
*/
|
||||
teamId?: string | number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface LeaveQuery extends PageQuery {
|
||||
/**
|
||||
* 申请人名字
|
||||
*/
|
||||
userName?: string;
|
||||
|
||||
/**
|
||||
* 请假类型(1事假 2病假)
|
||||
*/
|
||||
leaveType?: string;
|
||||
|
||||
/**
|
||||
* 班组长意见(1未读 2同意 3拒绝)
|
||||
*/
|
||||
gangerOpinion?: string;
|
||||
|
||||
/**
|
||||
* 管理员意见(1未读 2同意 3拒绝)
|
||||
*/
|
||||
managerOpinion?: string;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 班组id
|
||||
*/
|
||||
teamId?: string | number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
124
src/api/project/project/index.ts
Normal file
124
src/api/project/project/index.ts
Normal file
@ -0,0 +1,124 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { ProjectForm, ProjectQuery, ProjectVO } from '@/api/project/project/types';
|
||||
|
||||
/**
|
||||
* 查询项目列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listProject = (query?: ProjectQuery): AxiosPromise<ProjectVO[]> => {
|
||||
return request({
|
||||
url: '/project/project/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询项目dxf
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listDXFProject = (id: string | number): AxiosPromise<any> => {
|
||||
return request({
|
||||
url: '/project/projectFile/json/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询项目详细
|
||||
* @param id
|
||||
*/
|
||||
export const getProject = (id: string | number): AxiosPromise<ProjectVO> => {
|
||||
return request({
|
||||
url: '/project/project/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增项目
|
||||
* @param data
|
||||
*/
|
||||
export const addProject = (data: ProjectForm): AxiosPromise<string | number> => {
|
||||
return request({
|
||||
url: '/project/project',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改项目
|
||||
* @param data
|
||||
*/
|
||||
export const updateProject = (data: ProjectForm) => {
|
||||
return request({
|
||||
url: '/project/project',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 上传dxf文件
|
||||
* @param data
|
||||
*/
|
||||
export const upLoadProjectDXF = (data: any) => {
|
||||
return request({
|
||||
url: '/project/projectFile/upload/dxf',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 通过GeoJson新增设施-光伏板
|
||||
* @param data
|
||||
*/
|
||||
export const addProjectFacilities = (data: any) => {
|
||||
return request({
|
||||
url: '/facility/photovoltaicPanel/geoJson',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 通过GeoJson新增设施-光伏板桩点、立柱、支架
|
||||
* @param data
|
||||
*/
|
||||
export const addProjectPilePoint = (data: any) => {
|
||||
return request({
|
||||
url: '/facility/photovoltaicPanelPoint/parts/geoJson',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 通过GeoJson新增设施-方阵
|
||||
* @param data
|
||||
*/
|
||||
export const addProjectSquare = (data: any) => {
|
||||
return request({
|
||||
url: '/facility/matrix/geoJson',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除项目
|
||||
* @param id
|
||||
*/
|
||||
export const delProject = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/project/project/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
378
src/api/project/project/types.ts
Normal file
378
src/api/project/project/types.ts
Normal file
@ -0,0 +1,378 @@
|
||||
export interface ProjectVO {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
projectName: string;
|
||||
|
||||
/**
|
||||
* 项目简称
|
||||
*/
|
||||
shortName: string;
|
||||
designId: string;
|
||||
/**
|
||||
* 父项目id
|
||||
*/
|
||||
pId: string | number;
|
||||
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
status: number;
|
||||
|
||||
/**
|
||||
* 项目图片
|
||||
*/
|
||||
picUrl: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
projectType: string;
|
||||
|
||||
/**
|
||||
* 项目类型(1光伏 2风电)
|
||||
*/
|
||||
projectCategory: number;
|
||||
|
||||
/**
|
||||
* 删除时间
|
||||
*/
|
||||
deletedAt: string;
|
||||
|
||||
/**
|
||||
* 项目地址
|
||||
*/
|
||||
projectSite: string;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
principal: string;
|
||||
|
||||
/**
|
||||
* 负责人电话
|
||||
*/
|
||||
principalPhone: string;
|
||||
|
||||
/**
|
||||
* 实际容量
|
||||
*/
|
||||
actual: string;
|
||||
|
||||
/**
|
||||
* 计划容量
|
||||
*/
|
||||
plan: string;
|
||||
|
||||
/**
|
||||
* 开工时间
|
||||
*/
|
||||
onStreamTime: string;
|
||||
|
||||
/**
|
||||
* 打卡范围(09:00,18:00)
|
||||
*/
|
||||
punchRange: string;
|
||||
|
||||
/**
|
||||
* 设计总量
|
||||
*/
|
||||
designTotal: number;
|
||||
|
||||
/**
|
||||
* 安全协议书
|
||||
*/
|
||||
securityAgreement: string;
|
||||
|
||||
/**
|
||||
* 排序字段
|
||||
*/
|
||||
sort: number;
|
||||
|
||||
/**
|
||||
* 显示隐藏(1显示 2隐藏)
|
||||
*/
|
||||
showHidden: string | number;
|
||||
|
||||
/**
|
||||
* 是否删除(0正常 1删除)
|
||||
*/
|
||||
isDelete: number;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
type?: string;
|
||||
}
|
||||
|
||||
export interface locationType {
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
lng: string;
|
||||
// 纬度
|
||||
lat: string;
|
||||
// 逆地理编码地址
|
||||
|
||||
projectSite: string;
|
||||
}
|
||||
|
||||
export interface ProjectForm extends BaseEntity {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
projectName?: string;
|
||||
|
||||
/**
|
||||
* 项目简称
|
||||
*/
|
||||
shortName?: string;
|
||||
|
||||
/**
|
||||
* 父项目id
|
||||
*/
|
||||
pId?: string | number;
|
||||
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
status?: number;
|
||||
|
||||
/**
|
||||
* 项目图片
|
||||
*/
|
||||
picUrl?: string;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
lng?: string;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
lat?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
projectType?: string;
|
||||
|
||||
/**
|
||||
* 项目类型(1光伏 2风电)
|
||||
*/
|
||||
projectCategory?: number;
|
||||
|
||||
/**
|
||||
* 删除时间
|
||||
*/
|
||||
deletedAt?: string;
|
||||
|
||||
/**
|
||||
* 项目地址
|
||||
*/
|
||||
projectSite?: string;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
principal?: string;
|
||||
|
||||
/**
|
||||
* 负责人电话
|
||||
*/
|
||||
principalPhone?: string;
|
||||
|
||||
/**
|
||||
* 实际容量
|
||||
*/
|
||||
actual?: string;
|
||||
|
||||
/**
|
||||
* 计划容量
|
||||
*/
|
||||
plan?: string;
|
||||
|
||||
/**
|
||||
* 开工时间
|
||||
*/
|
||||
onStreamTime?: string;
|
||||
|
||||
/**
|
||||
* 打卡开始时间(09:00,18:00)
|
||||
*/
|
||||
playCardStart?: string;
|
||||
|
||||
/**
|
||||
* 打卡结束时间(09:00,18:00)
|
||||
*/
|
||||
playCardEnd?: string;
|
||||
|
||||
/**
|
||||
* 设计总量
|
||||
*/
|
||||
designTotal?: number;
|
||||
|
||||
/**
|
||||
* 安全协议书
|
||||
*/
|
||||
securityAgreement?: string;
|
||||
|
||||
/**
|
||||
* 排序字段
|
||||
*/
|
||||
sort?: number;
|
||||
|
||||
/**
|
||||
* 显示隐藏(1显示 2隐藏)
|
||||
*/
|
||||
showHidden?: string | number;
|
||||
|
||||
/**
|
||||
* 是否删除(0正常 1删除)
|
||||
*/
|
||||
isDelete?: number;
|
||||
}
|
||||
|
||||
export interface ProjectQuery extends PageQuery {
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
projectName?: string;
|
||||
|
||||
/**
|
||||
* 项目简称
|
||||
*/
|
||||
shortName?: string;
|
||||
|
||||
/**
|
||||
* 父项目id
|
||||
*/
|
||||
pId?: string | number;
|
||||
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
status?: number;
|
||||
|
||||
/**
|
||||
* 项目图片
|
||||
*/
|
||||
picUrl?: string;
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
projectType?: string;
|
||||
|
||||
/**
|
||||
* 项目类型(1光伏 2风电)
|
||||
*/
|
||||
projectCategory?: number;
|
||||
|
||||
/**
|
||||
* 删除时间
|
||||
*/
|
||||
deletedAt?: string;
|
||||
|
||||
/**
|
||||
* 项目地址
|
||||
*/
|
||||
projectSite?: string;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
lng?: string;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
lat?: string;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
principal?: string;
|
||||
|
||||
/**
|
||||
* 负责人电话
|
||||
*/
|
||||
principalPhone?: string;
|
||||
|
||||
/**
|
||||
* 实际容量
|
||||
*/
|
||||
actual?: string;
|
||||
|
||||
/**
|
||||
* 计划容量
|
||||
*/
|
||||
plan?: string;
|
||||
|
||||
/**
|
||||
* 开工时间
|
||||
*/
|
||||
onStreamTime?: string;
|
||||
|
||||
/**
|
||||
* 打卡开始时间(09:00,18:00)
|
||||
*/
|
||||
playCardStart?: string;
|
||||
|
||||
/**
|
||||
* 打卡结束时间(09:00,18:00)
|
||||
*/
|
||||
playCardEnd?: string;
|
||||
|
||||
/**
|
||||
* 设计总量
|
||||
*/
|
||||
designTotal?: number;
|
||||
|
||||
/**
|
||||
* 安全协议书
|
||||
*/
|
||||
securityAgreement?: string;
|
||||
|
||||
/**
|
||||
* 排序字段
|
||||
*/
|
||||
sort?: number;
|
||||
|
||||
/**
|
||||
* 显示隐藏(1显示 2隐藏)
|
||||
*/
|
||||
showHidden?: string | number;
|
||||
|
||||
/**
|
||||
* 是否删除(0正常 1删除)
|
||||
*/
|
||||
isDelete?: number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
103
src/api/project/projectRelevancy/index.ts
Normal file
103
src/api/project/projectRelevancy/index.ts
Normal file
@ -0,0 +1,103 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { ProjectRelevancyForm, ProjectRelevancyQuery, ProjectRelevancyVO } from '@/api/project/projectRelevancy/types';
|
||||
|
||||
/**
|
||||
* 查询系统用户与项目关联列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listProjectRelevancy = (query?: ProjectRelevancyQuery): AxiosPromise<ProjectRelevancyVO[]> => {
|
||||
return request({
|
||||
url: '/project/projectRelevancy/login/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询系统用户与项目关联详细
|
||||
* @param id
|
||||
*/
|
||||
export const getProjectRelevancy = (id: string | number): AxiosPromise<ProjectRelevancyVO> => {
|
||||
return request({
|
||||
url: '/project/projectRelevancy/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增系统用户与项目关联
|
||||
* @param data
|
||||
*/
|
||||
export const addProjectRelevancy = (data: ProjectRelevancyForm): AxiosPromise<string | number> => {
|
||||
return request({
|
||||
url: '/project/projectRelevancy',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改系统用户与项目关联
|
||||
* @param data
|
||||
*/
|
||||
export const updateProjectRelevancy = (data: ProjectRelevancyForm) => {
|
||||
return request({
|
||||
url: '/project/projectRelevancy',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除系统用户与项目关联
|
||||
* @param id
|
||||
*/
|
||||
export const delProjectRelevancy = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/project/projectRelevancy/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 穿梭框接口
|
||||
*/
|
||||
|
||||
/**
|
||||
* 获取用户已关联的项目列表
|
||||
* @param params { userId: number }
|
||||
*/
|
||||
export function listUserProjects(params: { userId: number | string }) {
|
||||
return request({
|
||||
url: '/project/projectRelevancy/list',
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加项目关联
|
||||
* @param data { userId: number; projectIds: number[] }
|
||||
*/
|
||||
export function addNewProjectRelevancy(data: { userId: number | string; projectIdList: number[] }) {
|
||||
return request({
|
||||
url: '/project/projectRelevancy/add/project/list',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 移除项目关联
|
||||
* @param data { userId: number; projectIds: number[] }
|
||||
*/
|
||||
export function removeNewProjectRelevancy(data: { userId: number | string; projectIdList: number[] }) {
|
||||
return request({
|
||||
url: '/project/projectRelevancy/remove/project/list',
|
||||
method: 'delete',
|
||||
data
|
||||
});
|
||||
}
|
72
src/api/project/projectRelevancy/types.ts
Normal file
72
src/api/project/projectRelevancy/types.ts
Normal file
@ -0,0 +1,72 @@
|
||||
import { ProjectVO } from '@/api/project/project/types';
|
||||
|
||||
export interface ProjectRelevancyVO {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
userId: string | number;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 项目详情
|
||||
*/
|
||||
project: ProjectVO;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface ProjectRelevancyForm extends BaseEntity {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 删除时间
|
||||
*/
|
||||
deletedAt?: string;
|
||||
}
|
||||
|
||||
export interface ProjectRelevancyQuery extends PageQuery {
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 删除时间
|
||||
*/
|
||||
deletedAt?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
74
src/api/project/projectTeam/index.ts
Normal file
74
src/api/project/projectTeam/index.ts
Normal file
@ -0,0 +1,74 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { ProjectTeamForemanResp, ProjectTeamForm, ProjectTeamQuery, ProjectTeamVO } from '@/api/project/projectTeam/types';
|
||||
|
||||
/**
|
||||
* 查询项目班组列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listProjectTeam = (query?: ProjectTeamQuery): AxiosPromise<ProjectTeamVO[]> => {
|
||||
return request({
|
||||
url: '/project/projectTeam/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据项目id查询项目班组班组长信息列表
|
||||
* @param projectId
|
||||
*/
|
||||
export const listProjectTeamForeman = (projectId: string | number): AxiosPromise<ProjectTeamForemanResp[]> => {
|
||||
return request({
|
||||
url: '/project/projectTeam/listForeman/' + projectId,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询项目班组详细
|
||||
* @param id
|
||||
*/
|
||||
export const getProjectTeam = (id: string | number): AxiosPromise<ProjectTeamVO> => {
|
||||
return request({
|
||||
url: '/project/projectTeam/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增项目班组
|
||||
* @param data
|
||||
*/
|
||||
export const addProjectTeam = (data: ProjectTeamForm): AxiosPromise<string | number> => {
|
||||
return request({
|
||||
url: '/project/projectTeam',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改项目班组
|
||||
* @param data
|
||||
*/
|
||||
export const updateProjectTeam = (data: ProjectTeamForm) => {
|
||||
return request({
|
||||
url: '/project/projectTeam',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除项目班组
|
||||
* @param id
|
||||
*/
|
||||
export const delProjectTeam = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/project/projectTeam/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
109
src/api/project/projectTeam/types.ts
Normal file
109
src/api/project/projectTeam/types.ts
Normal file
@ -0,0 +1,109 @@
|
||||
export interface ProjectTeamVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 班组名称
|
||||
*/
|
||||
teamName: string;
|
||||
|
||||
/**
|
||||
* 范围内打卡(0范围内打卡 1任何地点打卡)默认为1
|
||||
*/
|
||||
isClockIn: number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface ProjectTeamForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
peopleNumber?: string | number;
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 班组名称
|
||||
*/
|
||||
teamName?: string;
|
||||
|
||||
/**
|
||||
* 范围内打卡(0范围内打卡 1任何地点打卡)默认为1
|
||||
*/
|
||||
isClockIn?: number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface ProjectTeamQuery extends PageQuery {
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
peopleNumber?: string | number;
|
||||
/**
|
||||
* 班组名称
|
||||
*/
|
||||
teamName?: string;
|
||||
|
||||
/**
|
||||
* 范围内打卡(0范围内打卡 1任何地点打卡)默认为1
|
||||
*/
|
||||
isClockIn?: number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
export interface ProjectTeamForemanResp {
|
||||
/**
|
||||
* 班组id
|
||||
*/
|
||||
id: string | number;
|
||||
foremanList: foremanQuery[];
|
||||
/**
|
||||
* 班组名称
|
||||
*/
|
||||
teamName: string;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
}
|
||||
|
||||
export interface foremanQuery {
|
||||
/**
|
||||
* 班组长id
|
||||
*/
|
||||
foremanId: string | number;
|
||||
|
||||
/**
|
||||
* 班组长名字
|
||||
*/
|
||||
foremanName: string;
|
||||
}
|
63
src/api/project/projectTeamMember/index.ts
Normal file
63
src/api/project/projectTeamMember/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { ProjectTeamMemberForm, ProjectTeamMemberQuery, ProjectTeamMemberVO } from '@/api/project/projectTeamMember/types';
|
||||
|
||||
/**
|
||||
* 查询项目班组下的成员列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listProjectTeamMember = (query?: ProjectTeamMemberQuery): AxiosPromise<ProjectTeamMemberVO[]> => {
|
||||
return request({
|
||||
url: '/project/projectTeamMember/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询项目班组下的成员详细
|
||||
* @param id
|
||||
*/
|
||||
export const getProjectTeamMember = (id: string | number): AxiosPromise<ProjectTeamMemberVO> => {
|
||||
return request({
|
||||
url: '/project/projectTeamMember/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增项目班组下的成员
|
||||
* @param data
|
||||
*/
|
||||
export const addProjectTeamMember = (data: ProjectTeamMemberForm): AxiosPromise<string | number> => {
|
||||
return request({
|
||||
url: '/project/projectTeamMember',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改项目班组下的成员
|
||||
* @param data
|
||||
*/
|
||||
export const updateProjectTeamMember = (data: ProjectTeamMemberForm) => {
|
||||
return request({
|
||||
url: '/project/projectTeamMember',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除项目班组下的成员
|
||||
* @param id
|
||||
*/
|
||||
export const delProjectTeamMember = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/project/projectTeamMember/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
105
src/api/project/projectTeamMember/types.ts
Normal file
105
src/api/project/projectTeamMember/types.ts
Normal file
@ -0,0 +1,105 @@
|
||||
export interface ProjectTeamMemberVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 班组id
|
||||
*/
|
||||
teamId: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 施工人员id
|
||||
*/
|
||||
memberId: string | number;
|
||||
|
||||
/**
|
||||
* 岗位(默认为0普通员工,1组长)
|
||||
*/
|
||||
postId: string | number;
|
||||
|
||||
/**
|
||||
* 施工人员姓名
|
||||
*/
|
||||
memberName: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface ProjectTeamMemberForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 班组id
|
||||
*/
|
||||
teamId?: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 施工人员id
|
||||
*/
|
||||
memberId?: string | number;
|
||||
|
||||
/**
|
||||
* 岗位(默认为0普通员工,1组长)
|
||||
*/
|
||||
postId?: string | number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface ProjectTeamMemberQuery extends PageQuery {
|
||||
/**
|
||||
* 班组id
|
||||
*/
|
||||
teamId?: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 施工人员id
|
||||
*/
|
||||
memberId?: string | number;
|
||||
|
||||
/**
|
||||
* 施工人员姓名
|
||||
*/
|
||||
memberName?: string;
|
||||
|
||||
/**
|
||||
* 岗位(默认为0普通员工,1组长)
|
||||
*/
|
||||
postId?: string | number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
75
src/api/project/reissueCard/index.ts
Normal file
75
src/api/project/reissueCard/index.ts
Normal file
@ -0,0 +1,75 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { ReissueCardVO, ReissueCardForm, ReissueCardQuery, AuditReissueCardForm } from '@/api/project/reissueCard/types';
|
||||
|
||||
/**
|
||||
* 查询施工人员补卡申请列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listReissueCard = (query?: ReissueCardQuery): AxiosPromise<ReissueCardVO[]> => {
|
||||
return request({
|
||||
url: '/project/reissueCard/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询施工人员补卡申请详细
|
||||
* @param id
|
||||
*/
|
||||
export const getReissueCard = (id: string | number): AxiosPromise<ReissueCardVO> => {
|
||||
return request({
|
||||
url: '/project/reissueCard/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增施工人员补卡申请
|
||||
* @param data
|
||||
*/
|
||||
export const addReissueCard = (data: ReissueCardForm) => {
|
||||
return request({
|
||||
url: '/project/reissueCard',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改施工人员补卡申请
|
||||
* @param data
|
||||
*/
|
||||
export const updateReissueCard = (data: ReissueCardForm) => {
|
||||
return request({
|
||||
url: '/project/reissueCard',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除施工人员补卡申请
|
||||
* @param id
|
||||
*/
|
||||
export const delReissueCard = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/project/reissueCard/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 管理员审核施工人员补卡申请
|
||||
* @param data
|
||||
*/
|
||||
export const AuditReissueCard = (data: AuditReissueCardForm) => {
|
||||
return request({
|
||||
url: '/project/reissueCard/review/manager',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
173
src/api/project/reissueCard/types.ts
Normal file
173
src/api/project/reissueCard/types.ts
Normal file
@ -0,0 +1,173 @@
|
||||
export interface ReissueCardVO {
|
||||
/**
|
||||
* 申请人名字
|
||||
*/
|
||||
userName: string;
|
||||
id?: string | number;
|
||||
status?: string;
|
||||
managerName?: string;
|
||||
/**
|
||||
* 申请补卡说明
|
||||
*/
|
||||
userExplain: string;
|
||||
|
||||
/**
|
||||
* 补卡申请时间
|
||||
*/
|
||||
userTime: string;
|
||||
|
||||
/**
|
||||
* 班组长名字
|
||||
*/
|
||||
gangerName: string;
|
||||
|
||||
/**
|
||||
* 班组长意见(1未读 2同意 3拒绝)
|
||||
*/
|
||||
gangerOpinion: string;
|
||||
|
||||
/**
|
||||
* 班组长说明
|
||||
*/
|
||||
gangerExplain: string;
|
||||
|
||||
/**
|
||||
* 班组长操作时间
|
||||
*/
|
||||
gangerTime: string;
|
||||
|
||||
/**
|
||||
* 管理员意见(1未读 2同意 3拒绝)
|
||||
*/
|
||||
managerOpinion: string;
|
||||
|
||||
/**
|
||||
* 管理员说明
|
||||
*/
|
||||
managerExplain: string;
|
||||
|
||||
/**
|
||||
* 管理员操作时间
|
||||
*/
|
||||
managerTime: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
}
|
||||
export interface AuditReissueCardForm {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 管理员意见
|
||||
*/
|
||||
managerOpinion?: string;
|
||||
|
||||
/**
|
||||
* 管理员说明
|
||||
*/
|
||||
managerExplain?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface ReissueCardForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 申请人id
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 申请补卡说明
|
||||
*/
|
||||
userExplain?: string;
|
||||
|
||||
/**
|
||||
* 班组长
|
||||
*/
|
||||
gangerId?: string | number;
|
||||
|
||||
/**
|
||||
* 班组长意见(1未读 2同意 3拒绝)
|
||||
*/
|
||||
gangerOpinion?: string;
|
||||
|
||||
/**
|
||||
* 班组长说明
|
||||
*/
|
||||
gangerExplain?: string;
|
||||
|
||||
/**
|
||||
* 管理员意见(1未读 2同意 3拒绝)
|
||||
*/
|
||||
managerOpinion?: string;
|
||||
|
||||
/**
|
||||
* 管理员说明
|
||||
*/
|
||||
managerExplain?: string;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 考勤表主键id
|
||||
*/
|
||||
attendanceId?: string | number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface ReissueCardQuery extends PageQuery {
|
||||
/**
|
||||
* 申请人名字
|
||||
*/
|
||||
userName?: string;
|
||||
|
||||
/**
|
||||
* 班组长意见(1未读 2同意 3拒绝)
|
||||
*/
|
||||
gangerOpinion?: string;
|
||||
|
||||
/**
|
||||
* 管理员意见(1未读 2同意 3拒绝)
|
||||
*/
|
||||
managerOpinion?: string;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 班组id
|
||||
*/
|
||||
teamId?: string | number;
|
||||
|
||||
/**
|
||||
* 补卡类型(1上班 2下班)
|
||||
*/
|
||||
reissueCardType?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
63
src/api/project/workWage/index.ts
Normal file
63
src/api/project/workWage/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { WorkWageVO, WorkWageForm, WorkWageQuery } from '@/api/project/workWage/types';
|
||||
|
||||
/**
|
||||
* 查询工种薪水列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listWorkWage = (query?: WorkWageQuery): AxiosPromise<WorkWageVO[]> => {
|
||||
return request({
|
||||
url: '/project/workWage/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询工种薪水详细
|
||||
* @param id
|
||||
*/
|
||||
export const getWorkWage = (id: string | number): AxiosPromise<WorkWageVO> => {
|
||||
return request({
|
||||
url: '/project/workWage/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增工种薪水
|
||||
* @param data
|
||||
*/
|
||||
export const addWorkWage = (data: WorkWageForm) => {
|
||||
return request({
|
||||
url: '/project/workWage',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改工种薪水
|
||||
* @param data
|
||||
*/
|
||||
export const updateWorkWage = (data: WorkWageForm) => {
|
||||
return request({
|
||||
url: '/project/workWage',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除工种薪水
|
||||
* @param id
|
||||
*/
|
||||
export const delWorkWage = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/project/workWage/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
131
src/api/project/workWage/types.ts
Normal file
131
src/api/project/workWage/types.ts
Normal file
@ -0,0 +1,131 @@
|
||||
export interface WorkWageVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 工种
|
||||
*/
|
||||
workType: string;
|
||||
|
||||
/**
|
||||
* 是否是特种兵(1是 2否)
|
||||
*/
|
||||
isSpecialType: string;
|
||||
|
||||
/**
|
||||
* 工资计算方式(1计时 2计件)
|
||||
*/
|
||||
wageCalculationType: string;
|
||||
|
||||
/**
|
||||
* 工资标准
|
||||
*/
|
||||
wage: number;
|
||||
|
||||
/**
|
||||
* 工资计量单位
|
||||
*/
|
||||
wageMeasureUnit: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
}
|
||||
|
||||
export interface SpecialType{
|
||||
label:string;//名称
|
||||
value:number | string;//id
|
||||
}
|
||||
|
||||
export interface WorkWageForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 工种
|
||||
*/
|
||||
workType?: string;
|
||||
|
||||
/**
|
||||
* 是否是特种兵(1是 2否)
|
||||
*/
|
||||
isSpecialType?: string;
|
||||
|
||||
/**
|
||||
* 工资计算方式(1计时 2计件)
|
||||
*/
|
||||
wageCalculationType?: string;
|
||||
|
||||
/**
|
||||
* 工资标准
|
||||
*/
|
||||
wage?: number;
|
||||
|
||||
/**
|
||||
* 工资计量单位
|
||||
*/
|
||||
wageMeasureUnit?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface WorkWageQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 工种
|
||||
*/
|
||||
workType?: string;
|
||||
|
||||
/**
|
||||
* 是否是特种兵(1是 2否)
|
||||
*/
|
||||
isSpecialType?: string;
|
||||
|
||||
/**
|
||||
* 工资计算方式(1计时 2计件)
|
||||
*/
|
||||
wageCalculationType?: string;
|
||||
|
||||
/**
|
||||
* 工资标准
|
||||
*/
|
||||
wage?: number;
|
||||
|
||||
/**
|
||||
* 工资计量单位
|
||||
*/
|
||||
wageMeasureUnit?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
|
||||
|
63
src/api/project/workerDailyReport/index.ts
Normal file
63
src/api/project/workerDailyReport/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { WorkerDailyReportVO, WorkerDailyReportForm, WorkerDailyReportQuery } from '@/api/project/workerDailyReport/types';
|
||||
|
||||
/**
|
||||
* 查询施工人员日报列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listWorkerDailyReport = (query?: WorkerDailyReportQuery): AxiosPromise<WorkerDailyReportVO[]> => {
|
||||
return request({
|
||||
url: '/project/workerDailyReport/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询施工人员日报详细
|
||||
* @param id
|
||||
*/
|
||||
export const getWorkerDailyReport = (id: string | number): AxiosPromise<WorkerDailyReportVO> => {
|
||||
return request({
|
||||
url: '/project/workerDailyReport/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增施工人员日报
|
||||
* @param data
|
||||
*/
|
||||
export const addWorkerDailyReport = (data: WorkerDailyReportForm) => {
|
||||
return request({
|
||||
url: '/project/workerDailyReport',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改施工人员日报
|
||||
* @param data
|
||||
*/
|
||||
export const updateWorkerDailyReport = (data: WorkerDailyReportForm) => {
|
||||
return request({
|
||||
url: '/project/workerDailyReport',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除施工人员日报
|
||||
* @param id
|
||||
*/
|
||||
export const delWorkerDailyReport = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/project/workerDailyReport/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
132
src/api/project/workerDailyReport/types.ts
Normal file
132
src/api/project/workerDailyReport/types.ts
Normal file
@ -0,0 +1,132 @@
|
||||
export interface WorkerDailyReportVO {
|
||||
/**
|
||||
* 申请人名字
|
||||
*/
|
||||
userName: string;
|
||||
userId?: string;
|
||||
id?: string;
|
||||
|
||||
/**
|
||||
* 今日完成工作
|
||||
*/
|
||||
todayCompletedWork: string;
|
||||
|
||||
/**
|
||||
* 未完成工作
|
||||
*/
|
||||
unfinishedWork: string;
|
||||
|
||||
/**
|
||||
* 明日工作
|
||||
*/
|
||||
tomorrowWork: string;
|
||||
|
||||
/**
|
||||
* 需协调与帮助
|
||||
*/
|
||||
coordinationHelp: string;
|
||||
}
|
||||
|
||||
export interface WorkerDailyReportForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
teamName?: string;
|
||||
resubmitReason?: string;
|
||||
reportDate?: string;
|
||||
isResubmit: string;
|
||||
|
||||
/**
|
||||
* 班组id
|
||||
*/
|
||||
teamId?: string | number;
|
||||
|
||||
/**
|
||||
* 申请人id
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 申请人名字
|
||||
*/
|
||||
userName?: string;
|
||||
|
||||
/**
|
||||
* 今日完成工作
|
||||
*/
|
||||
todayCompletedWork?: string;
|
||||
|
||||
/**
|
||||
* 未完成工作
|
||||
*/
|
||||
unfinishedWork?: string;
|
||||
|
||||
/**
|
||||
* 明日工作
|
||||
*/
|
||||
tomorrowWork?: string;
|
||||
|
||||
/**
|
||||
* 需协调与帮助
|
||||
*/
|
||||
coordinationHelp?: string;
|
||||
|
||||
/**
|
||||
* 附件
|
||||
*/
|
||||
fileList?: Array<string>;
|
||||
dailyPieceItemVoList?: dailyPieceItemVO[];
|
||||
}
|
||||
|
||||
interface dailyPieceItemVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 计件类型
|
||||
*/
|
||||
pieceType?: string;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
pieceCount?: number;
|
||||
pieceUnit?: string;
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface WorkerDailyReportQuery extends PageQuery {
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 班组id
|
||||
*/
|
||||
teamId?: string | number;
|
||||
|
||||
/**
|
||||
* 申请人id
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 申请人名字
|
||||
*/
|
||||
userName?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
isResubmit?: string;
|
||||
}
|
63
src/api/quality/qualityConstructionLog/index.ts
Normal file
63
src/api/quality/qualityConstructionLog/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { QualityConstructionLogVO, QualityConstructionLogForm, QualityConstructionLogQuery } from '@/api/quality/qualityConstructionLog/types';
|
||||
|
||||
/**
|
||||
* 查询质量-施工日志列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listQualityConstructionLog = (query?: QualityConstructionLogQuery): AxiosPromise<QualityConstructionLogVO[]> => {
|
||||
return request({
|
||||
url: '/quality/qualityConstructionLog/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询质量-施工日志详细
|
||||
* @param id
|
||||
*/
|
||||
export const getQualityConstructionLog = (id: string | number): AxiosPromise<QualityConstructionLogVO> => {
|
||||
return request({
|
||||
url: '/quality/qualityConstructionLog/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增质量-施工日志
|
||||
* @param data
|
||||
*/
|
||||
export const addQualityConstructionLog = (data: QualityConstructionLogForm) => {
|
||||
return request({
|
||||
url: '/quality/qualityConstructionLog',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改质量-施工日志
|
||||
* @param data
|
||||
*/
|
||||
export const updateQualityConstructionLog = (data: QualityConstructionLogForm) => {
|
||||
return request({
|
||||
url: '/quality/qualityConstructionLog',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除质量-施工日志
|
||||
* @param id
|
||||
*/
|
||||
export const delQualityConstructionLog = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/quality/qualityConstructionLog/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
84
src/api/quality/qualityConstructionLog/types.ts
Normal file
84
src/api/quality/qualityConstructionLog/types.ts
Normal file
@ -0,0 +1,84 @@
|
||||
export interface QualityConstructionLogVO {
|
||||
/**
|
||||
* 发生日期
|
||||
*/
|
||||
happenDate: string;
|
||||
id?: string | number;
|
||||
projectName: string;
|
||||
createTime: string;
|
||||
fileList: any[];
|
||||
file?: string;
|
||||
/**
|
||||
* 生产情况
|
||||
*/
|
||||
productionStatus: string;
|
||||
|
||||
/**
|
||||
* 技术质量安全工作
|
||||
*/
|
||||
technologyQuality: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
createBy: string;
|
||||
}
|
||||
|
||||
export interface QualityConstructionLogForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 发生日期
|
||||
*/
|
||||
happenDate?: string;
|
||||
|
||||
/**
|
||||
* 生产情况
|
||||
*/
|
||||
productionStatus?: string;
|
||||
|
||||
/**
|
||||
* 技术质量安全工作
|
||||
*/
|
||||
technologyQuality?: string;
|
||||
|
||||
/**
|
||||
* 附件
|
||||
*/
|
||||
file?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface QualityConstructionLogQuery extends PageQuery {
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 发生日期
|
||||
*/
|
||||
happenDate?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
63
src/api/quality/qualityInspection/index.ts
Normal file
63
src/api/quality/qualityInspection/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { QualityInspectionVO, QualityInspectionForm, QualityInspectionQuery } from '@/api/quality/qualityInspection/types';
|
||||
|
||||
/**
|
||||
* 查询质量-检查工单列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listQualityInspection = (query?: QualityInspectionQuery): AxiosPromise<QualityInspectionVO[]> => {
|
||||
return request({
|
||||
url: '/quality/qualityInspection/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询质量-检查工单详细
|
||||
* @param id
|
||||
*/
|
||||
export const getQualityInspection = (id: string | number): AxiosPromise<QualityInspectionVO> => {
|
||||
return request({
|
||||
url: '/quality/qualityInspection/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增质量-检查工单
|
||||
* @param data
|
||||
*/
|
||||
export const addQualityInspection = (data: QualityInspectionForm) => {
|
||||
return request({
|
||||
url: '/quality/qualityInspection',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改质量-检查工单
|
||||
* @param data
|
||||
*/
|
||||
export const updateQualityInspection = (data: QualityInspectionForm) => {
|
||||
return request({
|
||||
url: '/quality/qualityInspection',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除质量-检查工单
|
||||
* @param id
|
||||
*/
|
||||
export const delQualityInspection = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/quality/qualityInspection/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
168
src/api/quality/qualityInspection/types.ts
Normal file
168
src/api/quality/qualityInspection/types.ts
Normal file
@ -0,0 +1,168 @@
|
||||
export interface QualityInspectionVO {
|
||||
verificationType: string;
|
||||
measure: string;
|
||||
/**
|
||||
* 巡检类型
|
||||
*/
|
||||
inspectionType: string;
|
||||
id?: string | number;
|
||||
projectName: string;
|
||||
rectificationFileList: any[];
|
||||
inspectionFile: string;
|
||||
correctorName: string;
|
||||
replyPeriodDate: string;
|
||||
rectificationTime: string;
|
||||
rectificationFile: string;
|
||||
verificationResult: string;
|
||||
/**
|
||||
* 巡检附件
|
||||
*/
|
||||
/**
|
||||
* 巡检标题
|
||||
*/
|
||||
inspectionHeadline: string;
|
||||
|
||||
/**
|
||||
* 巡检结果
|
||||
*/
|
||||
inspectionResult: string;
|
||||
|
||||
/**
|
||||
* 工单状态(1通知 2整改 3验证)
|
||||
*/
|
||||
inspectionStatus: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
createBy: string;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface QualityInspectionForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 巡检类型
|
||||
*/
|
||||
inspectionType?: string;
|
||||
|
||||
/**
|
||||
* 巡检标题
|
||||
*/
|
||||
inspectionHeadline?: string;
|
||||
|
||||
/**
|
||||
* 巡检结果
|
||||
*/
|
||||
inspectionResult?: string;
|
||||
|
||||
/**
|
||||
* 工单状态(1通知 2整改 3验证)
|
||||
*/
|
||||
inspectionStatus?: string;
|
||||
|
||||
/**
|
||||
* 巡检附件
|
||||
*/
|
||||
inspectionFile?: string;
|
||||
|
||||
/**
|
||||
* 班组id
|
||||
*/
|
||||
teamId?: string | number;
|
||||
|
||||
/**
|
||||
* 整改人(班组长)
|
||||
*/
|
||||
corrector?: string;
|
||||
|
||||
/**
|
||||
* 是否回复(1回复 2不回复)
|
||||
*/
|
||||
isReply?: string;
|
||||
|
||||
/**
|
||||
* 回复期限日期
|
||||
*/
|
||||
replyPeriodDate?: string;
|
||||
|
||||
/**
|
||||
* 整改反馈
|
||||
*/
|
||||
rectificationResult?: string;
|
||||
|
||||
/**
|
||||
* 整改时间
|
||||
*/
|
||||
rectificationTime?: string;
|
||||
|
||||
/**
|
||||
* 整改附件
|
||||
*/
|
||||
rectificationFile?: string;
|
||||
|
||||
/**
|
||||
* 验证结果
|
||||
*/
|
||||
verificationResult?: string;
|
||||
|
||||
/**
|
||||
* 验证状态(1通过 2未通过)
|
||||
*/
|
||||
verificationType?: string;
|
||||
|
||||
/**
|
||||
* 验证时间
|
||||
*/
|
||||
verificationTime?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface QualityInspectionQuery extends PageQuery {
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 巡检类型
|
||||
*/
|
||||
inspectionType?: string;
|
||||
|
||||
/**
|
||||
* 工单状态(1通知 2整改 3验证)
|
||||
*/
|
||||
inspectionStatus?: string;
|
||||
|
||||
/**
|
||||
* 班组id
|
||||
*/
|
||||
teamId?: string | number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
87
src/api/safety/documentSafetyMeeting/index.ts
Normal file
87
src/api/safety/documentSafetyMeeting/index.ts
Normal file
@ -0,0 +1,87 @@
|
||||
import request from '@/utils/request';
|
||||
import {
|
||||
documentSafetyMeetingListFile,
|
||||
documentSafetyMeetingListFolder,
|
||||
documentSafetyMeetingListQuery,
|
||||
documentSafetyMeetingListVo,
|
||||
documentRecycleBinListQuery,
|
||||
documentRecycleBinListVO
|
||||
} from './type';
|
||||
import { AxiosPromise } from 'axios';
|
||||
// 查询安全会议结构
|
||||
export function documentCompletionTreeStructure(query: object) {
|
||||
return request({
|
||||
url: '/safety/documentSafetyMeeting/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
// 查询安全会议文件列表
|
||||
export function documentCompletionList(query: documentSafetyMeetingListQuery): AxiosPromise<documentSafetyMeetingListVo> {
|
||||
return request({
|
||||
url: '/safety/documentSafetyMeeting/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
// 安全会议添加
|
||||
export function documentCompletionAdd(data: documentSafetyMeetingListFile) {
|
||||
return request({
|
||||
url: '/safety/documentSafetyMeeting/file',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 安全会议修改文件名
|
||||
export function documentCompletionEdit(query: object) {
|
||||
return request({
|
||||
url: '/api/v1/system/documentSafetyMeeting/edit',
|
||||
method: 'put',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
// 安全会议删除文件
|
||||
export function documentCompletionDelete(id: string) {
|
||||
return request({
|
||||
url: '/safety/documentSafetyMeeting/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
// 安全会议获取指定id信息
|
||||
export function documentCompletionGet(id: string) {
|
||||
return request({
|
||||
url: '/safety/documentSafetyMeeting/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
// 新建文件夹
|
||||
export function newFolder(data: documentSafetyMeetingListFolder): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/safety/documentSafetyMeeting/folder',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 单文件下载
|
||||
export function uniFileDownload(query: object) {
|
||||
return request({
|
||||
url: '/api/v1/system/documentSafetyMeeting/safetyDataUniFileDownload',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
// 回收站恢复
|
||||
export function completionDataRecyclingStation(id: string[]) {
|
||||
return request({
|
||||
url: '/safety/documentSafetyMeeting/recovery/' + id,
|
||||
method: 'put'
|
||||
});
|
||||
}
|
||||
// 回收站列表数据
|
||||
export function documentRecycleBinList(query: documentRecycleBinListQuery): AxiosPromise<documentRecycleBinListVO> {
|
||||
return request({
|
||||
url: '/safety/documentSafetyMeeting/recycleBin/list',
|
||||
method: 'get',
|
||||
params: { ...query, fileType: '2' }
|
||||
});
|
||||
}
|
61
src/api/safety/documentSafetyMeeting/type.ts
Normal file
61
src/api/safety/documentSafetyMeeting/type.ts
Normal file
@ -0,0 +1,61 @@
|
||||
export interface documentSafetyMeetingListFolder {
|
||||
//新增文件夹
|
||||
projectId: string;
|
||||
pid?: string;
|
||||
fileName: string;
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface documentSafetyMeetingListFile {
|
||||
//新增文件
|
||||
file: any;
|
||||
req?: reqQuery;
|
||||
}
|
||||
|
||||
export interface reqQuery {
|
||||
projectId: string;
|
||||
pid?: string;
|
||||
}
|
||||
|
||||
export interface documentSafetyMeetingListQuery {
|
||||
projectId: string;
|
||||
pid?: string;
|
||||
//1文件 2文件夹 3图片
|
||||
fileType?: string;
|
||||
}
|
||||
|
||||
export interface documentSafetyMeetingListVo {
|
||||
projectId: string;
|
||||
id: string;
|
||||
pid: string;
|
||||
fileName: string;
|
||||
fileStatus?: string;
|
||||
filePath: string;
|
||||
fileSuffix: string;
|
||||
originalName: string;
|
||||
remark?: string;
|
||||
//1文件 2文件夹 3图片
|
||||
fileType?: string;
|
||||
}
|
||||
|
||||
export interface documentRecycleBinListQuery {
|
||||
projectId: string;
|
||||
pid?: string;
|
||||
fileType?: string;
|
||||
pageSize?: number;
|
||||
pageNum?: number;
|
||||
orderByColumn?: string;
|
||||
isAsc?: string;
|
||||
}
|
||||
|
||||
export interface documentRecycleBinListVO {
|
||||
id: string;
|
||||
projectId: string;
|
||||
pid?: string;
|
||||
fileName?: string;
|
||||
filePath?: number;
|
||||
fileSuffix?: number;
|
||||
fileStatus?: string;
|
||||
originalName?: string;
|
||||
remark?: string;
|
||||
}
|
63
src/api/safety/questionBank/index.ts
Normal file
63
src/api/safety/questionBank/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { QuestionBankVO, QuestionBankForm, QuestionBankQuery } from '@/api/safety/questionBank/types';
|
||||
|
||||
/**
|
||||
* 查询题库列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listQuestionBank = (query?: QuestionBankQuery): AxiosPromise<QuestionBankVO[]> => {
|
||||
return request({
|
||||
url: '/safety/questionBank/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询题库详细
|
||||
* @param id
|
||||
*/
|
||||
export const getQuestionBank = (id: string | number): AxiosPromise<QuestionBankVO> => {
|
||||
return request({
|
||||
url: '/safety/questionBank/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增题库
|
||||
* @param data
|
||||
*/
|
||||
export const addQuestionBank = (data: QuestionBankForm) => {
|
||||
return request({
|
||||
url: '/safety/questionBank',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改题库
|
||||
* @param data
|
||||
*/
|
||||
export const updateQuestionBank = (data: QuestionBankForm) => {
|
||||
return request({
|
||||
url: '/safety/questionBank',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除题库
|
||||
* @param id
|
||||
*/
|
||||
export const delQuestionBank = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/safety/questionBank/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
101
src/api/safety/questionBank/types.ts
Normal file
101
src/api/safety/questionBank/types.ts
Normal file
@ -0,0 +1,101 @@
|
||||
export interface QuestionBankVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 题目类别
|
||||
*/
|
||||
categoryType: string;
|
||||
|
||||
/**
|
||||
* 题目类型
|
||||
*/
|
||||
questionType: string;
|
||||
|
||||
/**
|
||||
* 题目内容
|
||||
*/
|
||||
questionContent: string;
|
||||
|
||||
/**
|
||||
* 选项(以JSON数组形式存储)
|
||||
*/
|
||||
optionList: Array<string>;
|
||||
|
||||
/**
|
||||
* 正确答案
|
||||
*/
|
||||
correctAnswer: string;
|
||||
|
||||
}
|
||||
|
||||
export interface QuestionBankForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 题目类别
|
||||
*/
|
||||
categoryType?: string;
|
||||
|
||||
/**
|
||||
* 题目类型
|
||||
*/
|
||||
questionType?: string;
|
||||
|
||||
/**
|
||||
* 题目内容
|
||||
*/
|
||||
questionContent?: string;
|
||||
|
||||
/**
|
||||
* 选项(以JSON数组形式存储)
|
||||
*/
|
||||
optionList?: Array<string>;
|
||||
|
||||
/**
|
||||
* 正确答案
|
||||
*/
|
||||
correctAnswer?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface QuestionBankQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 题目类别
|
||||
*/
|
||||
categoryType?: string;
|
||||
|
||||
/**
|
||||
* 题目类型
|
||||
*/
|
||||
questionType?: string;
|
||||
|
||||
/**
|
||||
* 题目内容
|
||||
*/
|
||||
questionContent?: string;
|
||||
|
||||
/**
|
||||
* 选项(以JSON数组形式存储)
|
||||
*/
|
||||
optionList?: Array<string>;
|
||||
|
||||
/**
|
||||
* 正确答案
|
||||
*/
|
||||
correctAnswer?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
|
||||
|
75
src/api/safety/questionUserAnswer/index.ts
Normal file
75
src/api/safety/questionUserAnswer/index.ts
Normal file
@ -0,0 +1,75 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { QuestionUserAnswerVO, QuestionUserAnswerForm, QuestionUserAnswerQuery } from '@/api/safety/questionUserAnswer/types';
|
||||
|
||||
/**
|
||||
* 查询用户试卷存储列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listQuestionUserAnswer = (query?: QuestionUserAnswerQuery): AxiosPromise<QuestionUserAnswerVO[]> => {
|
||||
return request({
|
||||
url: '/safety/questionUserAnswer/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询用户试卷存储详细
|
||||
* @param id
|
||||
*/
|
||||
export const getQuestionUserAnswer = (id: string | number): AxiosPromise<QuestionUserAnswerVO> => {
|
||||
return request({
|
||||
url: '/safety/questionUserAnswer/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增用户试卷存储
|
||||
* @param data
|
||||
*/
|
||||
export const addQuestionUserAnswer = (data: QuestionUserAnswerForm) => {
|
||||
return request({
|
||||
url: '/safety/questionUserAnswer',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改用户试卷存储
|
||||
* @param data
|
||||
*/
|
||||
export const updateQuestionUserAnswer = (data: QuestionUserAnswerForm) => {
|
||||
return request({
|
||||
url: '/safety/questionUserAnswer',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除用户试卷存储
|
||||
* @param id
|
||||
*/
|
||||
export const delQuestionUserAnswer = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/safety/questionUserAnswer/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 上传线下考试试卷存储
|
||||
* @param data
|
||||
*/
|
||||
export const uploadQuestionUserAnswer = (data: any) => {
|
||||
return request({
|
||||
url: '/safety/questionUserAnswer/upload/zip',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
97
src/api/safety/questionUserAnswer/types.ts
Normal file
97
src/api/safety/questionUserAnswer/types.ts
Normal file
@ -0,0 +1,97 @@
|
||||
export interface QuestionUserAnswerVO {
|
||||
/**
|
||||
* 得分
|
||||
*/
|
||||
score: number;
|
||||
id: string | number;
|
||||
file: string;
|
||||
/**
|
||||
* 考试类型(1线上考试 2线下考试)
|
||||
*/
|
||||
/**
|
||||
* 考试时间(时间戳/秒)
|
||||
*/
|
||||
examTime: number;
|
||||
|
||||
/**
|
||||
* 用时时间(时间戳/秒)
|
||||
*/
|
||||
takeTime: number;
|
||||
|
||||
/**
|
||||
* 及格线/总分(格式:60,100)
|
||||
*/
|
||||
pass: string;
|
||||
}
|
||||
|
||||
export interface QuestionUserAnswerForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
teamId?: string | number;
|
||||
userName?: string;
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 题库id列表
|
||||
*/
|
||||
bankId?: string | number;
|
||||
|
||||
/**
|
||||
* 答案列表
|
||||
*/
|
||||
answer?: string;
|
||||
|
||||
/**
|
||||
* 得分
|
||||
*/
|
||||
score?: number;
|
||||
|
||||
/**
|
||||
* 考试时间(时间戳/秒)
|
||||
*/
|
||||
examTime?: number;
|
||||
|
||||
/**
|
||||
* 用时时间(时间戳/秒)
|
||||
*/
|
||||
takeTime?: number;
|
||||
|
||||
/**
|
||||
* 及格线/总分(格式:60,100)
|
||||
*/
|
||||
pass?: string;
|
||||
|
||||
/**
|
||||
* 文件地址
|
||||
*/
|
||||
file?: string;
|
||||
}
|
||||
|
||||
export interface QuestionUserAnswerQuery extends PageQuery {
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId?: string | number;
|
||||
teamId?: string | number;
|
||||
userName?: string;
|
||||
projectId?: string | number;
|
||||
/**
|
||||
* 考试类型(1线上考试 2线下考试)
|
||||
*/
|
||||
examType?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
63
src/api/safety/questionsCategory/index.ts
Normal file
63
src/api/safety/questionsCategory/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { QuestionsCategoryVO, QuestionsCategoryForm, QuestionsCategoryQuery } from '@/api/safety/questionsCategory/types';
|
||||
|
||||
/**
|
||||
* 查询题库类别列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listQuestionsCategory = (query?: QuestionsCategoryQuery): AxiosPromise<QuestionsCategoryVO[]> => {
|
||||
return request({
|
||||
url: '/safety/questionsCategory/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询题库类别详细
|
||||
* @param id
|
||||
*/
|
||||
export const getQuestionsCategory = (id: string | number): AxiosPromise<QuestionsCategoryVO> => {
|
||||
return request({
|
||||
url: '/safety/questionsCategory/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增题库类别
|
||||
* @param data
|
||||
*/
|
||||
export const addQuestionsCategory = (data: QuestionsCategoryForm) => {
|
||||
return request({
|
||||
url: '/safety/questionsCategory',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改题库类别
|
||||
* @param data
|
||||
*/
|
||||
export const updateQuestionsCategory = (data: QuestionsCategoryForm) => {
|
||||
return request({
|
||||
url: '/safety/questionsCategory',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除题库类别
|
||||
* @param id
|
||||
*/
|
||||
export const delQuestionsCategory = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/safety/questionsCategory/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
41
src/api/safety/questionsCategory/types.ts
Normal file
41
src/api/safety/questionsCategory/types.ts
Normal file
@ -0,0 +1,41 @@
|
||||
export interface QuestionsCategoryVO {
|
||||
/**
|
||||
* 题库类别
|
||||
*/
|
||||
categoryName: string;
|
||||
id: string | number;
|
||||
}
|
||||
|
||||
export interface QuestionsCategoryForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 题库类别
|
||||
*/
|
||||
categoryName?: string;
|
||||
}
|
||||
|
||||
export interface QuestionsCategoryQuery extends PageQuery {
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 题库类别
|
||||
*/
|
||||
categoryName?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
63
src/api/safety/questionsConfig/index.ts
Normal file
63
src/api/safety/questionsConfig/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { QuestionsConfigVO, QuestionsConfigForm, QuestionsConfigQuery } from '@/api/safety/questionsConfig/types';
|
||||
|
||||
/**
|
||||
* 查询题库配置列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listQuestionsConfig = (query?: QuestionsConfigQuery): AxiosPromise<QuestionsConfigVO[]> => {
|
||||
return request({
|
||||
url: '/safety/questionsConfig/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询题库配置详细
|
||||
* @param id
|
||||
*/
|
||||
export const getQuestionsConfig = (id: string | number): AxiosPromise<QuestionsConfigVO> => {
|
||||
return request({
|
||||
url: '/safety/questionsConfig/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增题库配置
|
||||
* @param data
|
||||
*/
|
||||
export const addQuestionsConfig = (data: QuestionsConfigForm) => {
|
||||
return request({
|
||||
url: '/safety/questionsConfig',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改题库配置
|
||||
* @param data
|
||||
*/
|
||||
export const updateQuestionsConfig = (data: QuestionsConfigForm) => {
|
||||
return request({
|
||||
url: '/safety/questionsConfig',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除题库配置
|
||||
* @param id
|
||||
*/
|
||||
export const delQuestionsConfig = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/safety/questionsConfig/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
169
src/api/safety/questionsConfig/types.ts
Normal file
169
src/api/safety/questionsConfig/types.ts
Normal file
@ -0,0 +1,169 @@
|
||||
export interface QuestionsConfigVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 单选题(单位/道)
|
||||
*/
|
||||
singleChoice: number;
|
||||
|
||||
/**
|
||||
* 单选分数
|
||||
*/
|
||||
singleScore: number;
|
||||
|
||||
/**
|
||||
* 多选题(单位/道)
|
||||
*/
|
||||
multipleChoice: number;
|
||||
|
||||
/**
|
||||
* 多选分数
|
||||
*/
|
||||
multipleScore: number;
|
||||
|
||||
/**
|
||||
* 判断题(单位/道)
|
||||
*/
|
||||
estimate: number;
|
||||
|
||||
/**
|
||||
* 判断分数
|
||||
*/
|
||||
estimateScore: number;
|
||||
|
||||
/**
|
||||
* 满分
|
||||
*/
|
||||
fullMark: number;
|
||||
|
||||
/**
|
||||
* 及格线
|
||||
*/
|
||||
passScore: number;
|
||||
|
||||
/**
|
||||
* 答题最大时间(单位/分钟)
|
||||
*/
|
||||
answerTime: number;
|
||||
}
|
||||
|
||||
export interface QuestionsConfigForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 单选题(单位/道)
|
||||
*/
|
||||
singleChoice?: number;
|
||||
|
||||
/**
|
||||
* 单选分数
|
||||
*/
|
||||
singleScore?: number;
|
||||
|
||||
/**
|
||||
* 多选题(单位/道)
|
||||
*/
|
||||
multipleChoice?: number;
|
||||
|
||||
/**
|
||||
* 多选分数
|
||||
*/
|
||||
multipleScore?: number;
|
||||
|
||||
/**
|
||||
* 判断题(单位/道)
|
||||
*/
|
||||
estimate?: number;
|
||||
|
||||
/**
|
||||
* 判断分数
|
||||
*/
|
||||
estimateScore?: number;
|
||||
|
||||
/**
|
||||
* 满分
|
||||
*/
|
||||
fullMark?: number;
|
||||
|
||||
/**
|
||||
* 及格线
|
||||
*/
|
||||
passScore?: number;
|
||||
|
||||
/**
|
||||
* 答题最大时间(单位/分钟)
|
||||
*/
|
||||
answerTime?: number;
|
||||
}
|
||||
|
||||
export interface QuestionsConfigQuery extends PageQuery {
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
/**
|
||||
* 单选题(单位/道)
|
||||
*/
|
||||
singleChoice?: number;
|
||||
|
||||
/**
|
||||
* 单选分数
|
||||
*/
|
||||
singleScore?: number;
|
||||
|
||||
/**
|
||||
* 多选题(单位/道)
|
||||
*/
|
||||
multipleChoice?: number;
|
||||
|
||||
/**
|
||||
* 多选分数
|
||||
*/
|
||||
multipleScore?: number;
|
||||
|
||||
/**
|
||||
* 判断题(单位/道)
|
||||
*/
|
||||
estimate?: number;
|
||||
|
||||
/**
|
||||
* 判断分数
|
||||
*/
|
||||
estimateScore?: number;
|
||||
|
||||
/**
|
||||
* 满分
|
||||
*/
|
||||
fullMark?: number;
|
||||
|
||||
/**
|
||||
* 及格线
|
||||
*/
|
||||
passScore?: number;
|
||||
|
||||
/**
|
||||
* 答题最大时间(单位/分钟)
|
||||
*/
|
||||
answerTime?: number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
63
src/api/safety/safetyInspection/index.ts
Normal file
63
src/api/safety/safetyInspection/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { SafetyInspectionForm, SafetyInspectionQuery, SafetyInspectionVO } from '@/api/safety/safetyInspection/types';
|
||||
|
||||
/**
|
||||
* 查询安全巡检工单列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listSafetyInspection = (query?: SafetyInspectionQuery): AxiosPromise<SafetyInspectionVO[]> => {
|
||||
return request({
|
||||
url: '/safety/safetyInspection/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询安全巡检工单详细
|
||||
* @param id
|
||||
*/
|
||||
export const getSafetyInspection = (id: string | number): AxiosPromise<SafetyInspectionVO> => {
|
||||
return request({
|
||||
url: '/safety/safetyInspection/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增安全巡检工单
|
||||
* @param data
|
||||
*/
|
||||
export const addSafetyInspection = (data: SafetyInspectionForm) => {
|
||||
return request({
|
||||
url: '/safety/safetyInspection',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改安全巡检工单
|
||||
* @param data
|
||||
*/
|
||||
export const updateSafetyInspection = (data: SafetyInspectionForm) => {
|
||||
return request({
|
||||
url: '/safety/safetyInspection',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除安全巡检工单
|
||||
* @param id
|
||||
*/
|
||||
export const delSafetyInspection = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/safety/safetyInspection/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
350
src/api/safety/safetyInspection/types.ts
Normal file
350
src/api/safety/safetyInspection/types.ts
Normal file
@ -0,0 +1,350 @@
|
||||
export interface SafetyInspectionVO {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 父id(默认为0)
|
||||
*/
|
||||
pid: string | number;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 检查类型
|
||||
*/
|
||||
checkType: string;
|
||||
|
||||
/**
|
||||
* 违章类型
|
||||
*/
|
||||
violationType: string;
|
||||
|
||||
/**
|
||||
* 巡检结果
|
||||
*/
|
||||
inspectionResult: string;
|
||||
|
||||
/**
|
||||
* 整改班组id
|
||||
*/
|
||||
teamId: string | number;
|
||||
|
||||
/**
|
||||
* 整改班组名字
|
||||
*/
|
||||
teamName: string;
|
||||
|
||||
/**
|
||||
* 整改人(班组长)id
|
||||
*/
|
||||
correctorId: string | number;
|
||||
|
||||
/**
|
||||
* 整改人(班组长)名字
|
||||
*/
|
||||
correctorName: string;
|
||||
|
||||
/**
|
||||
* 整改期限
|
||||
*/
|
||||
rectificationDeadline: string;
|
||||
|
||||
/**
|
||||
* 是否回复(1回复 2不回复)
|
||||
*/
|
||||
isReply: string;
|
||||
|
||||
/**
|
||||
* 回复日期
|
||||
*/
|
||||
replyDate: string;
|
||||
|
||||
/**
|
||||
* 工单状态(1通知 2整改 3复查)
|
||||
*/
|
||||
status: string;
|
||||
|
||||
/**
|
||||
* 问题隐患
|
||||
*/
|
||||
hiddenDanger: string | number;
|
||||
|
||||
/**
|
||||
* 整改措施
|
||||
*/
|
||||
measure: string;
|
||||
|
||||
/**
|
||||
* 复查情况
|
||||
*/
|
||||
review: string;
|
||||
|
||||
/**
|
||||
* 复查状态(1通过 2未通过)
|
||||
*/
|
||||
reviewType: string;
|
||||
|
||||
/**
|
||||
* 检查时间
|
||||
*/
|
||||
checkTime: string;
|
||||
|
||||
/**
|
||||
* 整改时间
|
||||
*/
|
||||
rectificationTime: string;
|
||||
|
||||
/**
|
||||
* 复查时间
|
||||
*/
|
||||
reviewTime: string;
|
||||
|
||||
/**
|
||||
* 检查附件
|
||||
*/
|
||||
checkFile: string;
|
||||
|
||||
/**
|
||||
* 整改附件
|
||||
*/
|
||||
rectificationFile: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
creatorId: string | number;
|
||||
|
||||
/**
|
||||
* 创建人名字
|
||||
*/
|
||||
creatorName: string;
|
||||
}
|
||||
|
||||
export interface SafetyInspectionForm extends BaseEntity {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 父id(默认为0)
|
||||
*/
|
||||
pid?: string | number;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 检查类型
|
||||
*/
|
||||
checkType?: string;
|
||||
|
||||
/**
|
||||
* 违章类型
|
||||
*/
|
||||
violationType?: string;
|
||||
|
||||
/**
|
||||
* 巡检结果
|
||||
*/
|
||||
inspectionResult?: string;
|
||||
|
||||
/**
|
||||
* 整改班组id
|
||||
*/
|
||||
teamId?: string | number;
|
||||
|
||||
/**
|
||||
* 整改人(班组长)id
|
||||
*/
|
||||
correctorId?: string | number;
|
||||
|
||||
/**
|
||||
* 整改期限
|
||||
*/
|
||||
rectificationDeadline: string;
|
||||
|
||||
/**
|
||||
* 是否回复(1回复 2不回复)
|
||||
*/
|
||||
isReply?: string;
|
||||
|
||||
/**
|
||||
* 回复日期
|
||||
*/
|
||||
replyDate?: string;
|
||||
|
||||
/**
|
||||
* 工单状态(1通知 2整改 3复查)
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
/**
|
||||
* 问题隐患
|
||||
*/
|
||||
hiddenDanger?: string | number;
|
||||
|
||||
/**
|
||||
* 整改措施
|
||||
*/
|
||||
measure?: string;
|
||||
|
||||
/**
|
||||
* 复查情况
|
||||
*/
|
||||
review?: string;
|
||||
|
||||
/**
|
||||
* 复查状态(1通过 2未通过)
|
||||
*/
|
||||
reviewType?: string;
|
||||
|
||||
/**
|
||||
* 检查时间
|
||||
*/
|
||||
checkTime?: string;
|
||||
|
||||
/**
|
||||
* 整改时间
|
||||
*/
|
||||
rectificationTime?: string;
|
||||
|
||||
/**
|
||||
* 复查时间
|
||||
*/
|
||||
reviewTime?: string;
|
||||
|
||||
/**
|
||||
* 检查附件
|
||||
*/
|
||||
checkFile?: string;
|
||||
|
||||
/**
|
||||
* 整改附件
|
||||
*/
|
||||
rectificationFile?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface SafetyInspectionQuery extends PageQuery {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 父id(默认为0)
|
||||
*/
|
||||
pid?: string | number;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 检查类型
|
||||
*/
|
||||
checkType?: string;
|
||||
|
||||
/**
|
||||
* 违章类型
|
||||
*/
|
||||
violationType?: string;
|
||||
|
||||
/**
|
||||
* 巡检结果
|
||||
*/
|
||||
inspectionResult?: string;
|
||||
|
||||
/**
|
||||
* 整改班组id
|
||||
*/
|
||||
teamId?: string | number;
|
||||
|
||||
/**
|
||||
* 整改人(班组长)id
|
||||
*/
|
||||
correctorId?: string | number;
|
||||
|
||||
/**
|
||||
* 是否回复(1回复 2不回复)
|
||||
*/
|
||||
isReply?: string;
|
||||
|
||||
/**
|
||||
* 回复日期
|
||||
*/
|
||||
replyDate?: string;
|
||||
|
||||
/**
|
||||
* 工单状态(1通知 2整改 3复查)
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
/**
|
||||
* 问题隐患
|
||||
*/
|
||||
hiddenDanger?: string | number;
|
||||
|
||||
/**
|
||||
* 整改措施
|
||||
*/
|
||||
measure?: string;
|
||||
|
||||
/**
|
||||
* 复查情况
|
||||
*/
|
||||
review?: string;
|
||||
|
||||
/**
|
||||
* 复查状态(1通过 2未通过)
|
||||
*/
|
||||
reviewType?: string;
|
||||
|
||||
/**
|
||||
* 检查时间
|
||||
*/
|
||||
checkTime?: string;
|
||||
|
||||
/**
|
||||
* 整改时间
|
||||
*/
|
||||
rectificationTime?: string;
|
||||
|
||||
/**
|
||||
* 复查时间
|
||||
*/
|
||||
reviewTime?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
63
src/api/safety/safetyLog/index.ts
Normal file
63
src/api/safety/safetyLog/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { SafetyLogForm, SafetyLogQuery, SafetyLogVO } from '@/api/safety/safetyLog/types';
|
||||
|
||||
/**
|
||||
* 查询安全日志列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listSafetyLog = (query?: SafetyLogQuery): AxiosPromise<SafetyLogVO[]> => {
|
||||
return request({
|
||||
url: '/safety/safetyLog/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询安全日志详细
|
||||
* @param id
|
||||
*/
|
||||
export const getSafetyLog = (id: string | number): AxiosPromise<SafetyLogVO> => {
|
||||
return request({
|
||||
url: '/safety/safetyLog/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增安全日志
|
||||
* @param data
|
||||
*/
|
||||
export const addSafetyLog = (data: SafetyLogForm) => {
|
||||
return request({
|
||||
url: '/safety/safetyLog',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改安全日志
|
||||
* @param data
|
||||
*/
|
||||
export const updateSafetyLog = (data: SafetyLogForm) => {
|
||||
return request({
|
||||
url: '/safety/safetyLog',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除安全日志
|
||||
* @param id
|
||||
*/
|
||||
export const delSafetyLog = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/safety/safetyLog/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
269
src/api/safety/safetyLog/types.ts
Normal file
269
src/api/safety/safetyLog/types.ts
Normal file
@ -0,0 +1,269 @@
|
||||
import { IdAndNameVO } from '@/api/types';
|
||||
|
||||
export interface SafetyLogVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 发生日期
|
||||
*/
|
||||
dateOfOccurrence: string;
|
||||
|
||||
/**
|
||||
* 最高气温
|
||||
*/
|
||||
airTemperatureMax: number;
|
||||
|
||||
/**
|
||||
* 最低气温
|
||||
*/
|
||||
airTemperatureMin: number;
|
||||
|
||||
/**
|
||||
* 气候
|
||||
*/
|
||||
weather: string;
|
||||
|
||||
/**
|
||||
* 进展
|
||||
*/
|
||||
progress: string;
|
||||
|
||||
/**
|
||||
* 作业内容
|
||||
*/
|
||||
jobContent: string;
|
||||
|
||||
/**
|
||||
* 交底情况
|
||||
*/
|
||||
discloseCondition: string;
|
||||
|
||||
/**
|
||||
* 活动情况
|
||||
*/
|
||||
activityCondition: string;
|
||||
|
||||
/**
|
||||
* 检查情况
|
||||
*/
|
||||
examineCondition: string;
|
||||
|
||||
/**
|
||||
* 实施情况
|
||||
*/
|
||||
implementCondition: string;
|
||||
|
||||
/**
|
||||
* 安全检查情况
|
||||
*/
|
||||
safetyInspectionCondition: string;
|
||||
|
||||
/**
|
||||
* 停工或加班情况
|
||||
*/
|
||||
stoppageOrOvertime: string;
|
||||
|
||||
/**
|
||||
* 其他情况
|
||||
*/
|
||||
otherCondition: string;
|
||||
|
||||
/**
|
||||
* 文件id列表
|
||||
*/
|
||||
fileId: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
creator: IdAndNameVO;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface SafetyLogForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
creatorName?: string;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 发生日期
|
||||
*/
|
||||
dateOfOccurrence?: string;
|
||||
|
||||
/**
|
||||
* 最高气温
|
||||
*/
|
||||
airTemperatureMax?: number;
|
||||
|
||||
/**
|
||||
* 最低气温
|
||||
*/
|
||||
airTemperatureMin?: number;
|
||||
|
||||
/**
|
||||
* 气候
|
||||
*/
|
||||
weather?: string;
|
||||
|
||||
/**
|
||||
* 进展
|
||||
*/
|
||||
progress?: string;
|
||||
|
||||
/**
|
||||
* 作业内容
|
||||
*/
|
||||
jobContent?: string;
|
||||
|
||||
/**
|
||||
* 交底情况
|
||||
*/
|
||||
discloseCondition?: string;
|
||||
|
||||
/**
|
||||
* 活动情况
|
||||
*/
|
||||
activityCondition?: string;
|
||||
|
||||
/**
|
||||
* 检查情况
|
||||
*/
|
||||
examineCondition?: string;
|
||||
|
||||
/**
|
||||
* 实施情况
|
||||
*/
|
||||
implementCondition?: string;
|
||||
|
||||
/**
|
||||
* 安全检查情况
|
||||
*/
|
||||
safetyInspectionCondition?: string;
|
||||
|
||||
/**
|
||||
* 停工或加班情况
|
||||
*/
|
||||
stoppageOrOvertime?: string;
|
||||
|
||||
/**
|
||||
* 其他情况
|
||||
*/
|
||||
otherCondition?: string;
|
||||
|
||||
/**
|
||||
* 文件id列表
|
||||
*/
|
||||
fileId: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface SafetyLogQuery extends PageQuery {
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
creatorName?: string;
|
||||
|
||||
/**
|
||||
* 发生日期
|
||||
*/
|
||||
dateOfOccurrence?: string;
|
||||
|
||||
/**
|
||||
* 最高气温
|
||||
*/
|
||||
airTemperatureMax?: number;
|
||||
|
||||
/**
|
||||
* 最低气温
|
||||
*/
|
||||
airTemperatureMin?: number;
|
||||
|
||||
/**
|
||||
* 气候
|
||||
*/
|
||||
weather?: string;
|
||||
|
||||
/**
|
||||
* 进展
|
||||
*/
|
||||
progress?: string;
|
||||
|
||||
/**
|
||||
* 作业内容
|
||||
*/
|
||||
jobContent?: string;
|
||||
|
||||
/**
|
||||
* 交底情况
|
||||
*/
|
||||
discloseCondition?: string;
|
||||
|
||||
/**
|
||||
* 活动情况
|
||||
*/
|
||||
activityCondition?: string;
|
||||
|
||||
/**
|
||||
* 检查情况
|
||||
*/
|
||||
examineCondition?: string;
|
||||
|
||||
/**
|
||||
* 实施情况
|
||||
*/
|
||||
implementCondition?: string;
|
||||
|
||||
/**
|
||||
* 安全检查情况
|
||||
*/
|
||||
safetyInspectionCondition?: string;
|
||||
|
||||
/**
|
||||
* 停工或加班情况
|
||||
*/
|
||||
stoppageOrOvertime?: string;
|
||||
|
||||
/**
|
||||
* 其他情况
|
||||
*/
|
||||
otherCondition?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
63
src/api/safety/safetyWeeklyReport/index.ts
Normal file
63
src/api/safety/safetyWeeklyReport/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { SafetyWeeklyReportForm, SafetyWeeklyReportQuery, SafetyWeeklyReportVO } from '@/api/safety/safetyWeeklyReport/types';
|
||||
|
||||
/**
|
||||
* 查询安全周报列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listSafetyWeeklyReport = (query?: SafetyWeeklyReportQuery): AxiosPromise<SafetyWeeklyReportVO[]> => {
|
||||
return request({
|
||||
url: '/safety/safetyWeeklyReport/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询安全周报详细
|
||||
* @param id
|
||||
*/
|
||||
export const getSafetyWeeklyReport = (id: string | number): AxiosPromise<SafetyWeeklyReportVO> => {
|
||||
return request({
|
||||
url: '/safety/safetyWeeklyReport/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增安全周报
|
||||
* @param data
|
||||
*/
|
||||
export const addSafetyWeeklyReport = (data: SafetyWeeklyReportForm) => {
|
||||
return request({
|
||||
url: '/safety/safetyWeeklyReport',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改安全周报
|
||||
* @param data
|
||||
*/
|
||||
export const updateSafetyWeeklyReport = (data: SafetyWeeklyReportForm) => {
|
||||
return request({
|
||||
url: '/safety/safetyWeeklyReport',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除安全周报
|
||||
* @param id
|
||||
*/
|
||||
export const delSafetyWeeklyReport = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/safety/safetyWeeklyReport/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
112
src/api/safety/safetyWeeklyReport/types.ts
Normal file
112
src/api/safety/safetyWeeklyReport/types.ts
Normal file
@ -0,0 +1,112 @@
|
||||
import { IdAndNameVO } from '@/api/types';
|
||||
|
||||
export interface SafetyWeeklyReportVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 周期
|
||||
*/
|
||||
week: string;
|
||||
|
||||
/**
|
||||
* 周期范围
|
||||
*/
|
||||
scope: string;
|
||||
|
||||
/**
|
||||
* 周期范围结束
|
||||
*/
|
||||
scopeEnd: string;
|
||||
|
||||
/**
|
||||
* 文件位置
|
||||
*/
|
||||
pathUrl: IdAndNameVO;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface SafetyWeeklyReportForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 周期
|
||||
*/
|
||||
week?: string;
|
||||
|
||||
/**
|
||||
* 周期范围
|
||||
*/
|
||||
scope?: string;
|
||||
|
||||
/**
|
||||
* 周期范围结束
|
||||
*/
|
||||
scopeEnd?: string;
|
||||
|
||||
/**
|
||||
* 文件位置
|
||||
*/
|
||||
path?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface SafetyWeeklyReportQuery extends PageQuery {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 周期
|
||||
*/
|
||||
week?: string;
|
||||
|
||||
/**
|
||||
* 周期范围
|
||||
*/
|
||||
scopeDate?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
63
src/api/safety/teamMeeting/index.ts
Normal file
63
src/api/safety/teamMeeting/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { TeamMeetingForm, TeamMeetingQuery, TeamMeetingVO } from '@/api/safety/teamMeeting/types';
|
||||
|
||||
/**
|
||||
* 查询站班会列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listTeamMeeting = (query?: TeamMeetingQuery): AxiosPromise<TeamMeetingVO[]> => {
|
||||
return request({
|
||||
url: '/safety/teamMeeting/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询站班会详细
|
||||
* @param id
|
||||
*/
|
||||
export const getTeamMeeting = (id: string | number): AxiosPromise<TeamMeetingVO> => {
|
||||
return request({
|
||||
url: '/safety/teamMeeting/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增站班会
|
||||
* @param data
|
||||
*/
|
||||
export const addTeamMeeting = (data: TeamMeetingForm) => {
|
||||
return request({
|
||||
url: '/safety/teamMeeting',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改站班会
|
||||
* @param data
|
||||
*/
|
||||
export const updateTeamMeeting = (data: TeamMeetingForm) => {
|
||||
return request({
|
||||
url: '/safety/teamMeeting',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除站班会
|
||||
* @param id
|
||||
*/
|
||||
export const delTeamMeeting = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/safety/teamMeeting/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
152
src/api/safety/teamMeeting/types.ts
Normal file
152
src/api/safety/teamMeeting/types.ts
Normal file
@ -0,0 +1,152 @@
|
||||
import { IdAndNameVO } from '@/api/types';
|
||||
|
||||
export interface TeamMeetingVO {
|
||||
pictureUrlList: Array<string>;
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 班组
|
||||
*/
|
||||
teamName: IdAndNameVO;
|
||||
|
||||
/**
|
||||
* 分包公司
|
||||
*/
|
||||
contractorName: IdAndNameVO;
|
||||
|
||||
/**
|
||||
* 开会时间
|
||||
*/
|
||||
meetingDate: string;
|
||||
|
||||
/**
|
||||
* 宣讲人
|
||||
*/
|
||||
compereName: IdAndNameVO;
|
||||
|
||||
/**
|
||||
* 参与人列表
|
||||
*/
|
||||
participantList: Array<IdAndNameVO>;
|
||||
|
||||
/**
|
||||
* 班会内容
|
||||
*/
|
||||
content: string;
|
||||
|
||||
/**
|
||||
* 班会图片Url
|
||||
*/
|
||||
pictureUrl: Array<IdAndNameVO>;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface TeamMeetingForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 班组id
|
||||
*/
|
||||
teamId?: string | number;
|
||||
|
||||
/**
|
||||
* 分包公司id
|
||||
*/
|
||||
contractorId?: string | number;
|
||||
|
||||
/**
|
||||
* 开会时间
|
||||
*/
|
||||
meetingDate?: string;
|
||||
|
||||
/**
|
||||
* 宣讲人
|
||||
*/
|
||||
compereId?: string | number;
|
||||
|
||||
/**
|
||||
* 参与人id列表
|
||||
*/
|
||||
participantIdList?: Array<string | number>;
|
||||
|
||||
/**
|
||||
* 班会内容
|
||||
*/
|
||||
content?: string;
|
||||
|
||||
/**
|
||||
* 班会图片
|
||||
*/
|
||||
pictureList?: Array<string | number>;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface TeamMeetingQuery extends PageQuery {
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 班组id
|
||||
*/
|
||||
teamId?: string | number;
|
||||
|
||||
/**
|
||||
* 分包公司id
|
||||
*/
|
||||
contractorId?: string | number;
|
||||
|
||||
/**
|
||||
* 开会时间
|
||||
*/
|
||||
meetingDate?: string;
|
||||
|
||||
/**
|
||||
* 宣讲人
|
||||
*/
|
||||
compereId?: string | number;
|
||||
|
||||
/**
|
||||
* 参与人id
|
||||
*/
|
||||
participantIdList?: Array<string | number>;
|
||||
|
||||
/**
|
||||
* 班会内容
|
||||
*/
|
||||
content?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
80
src/api/system/client/index.ts
Normal file
80
src/api/system/client/index.ts
Normal file
@ -0,0 +1,80 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { ClientVO, ClientForm, ClientQuery } from '@/api/system/client/types';
|
||||
|
||||
/**
|
||||
* 查询客户端管理列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listClient = (query?: ClientQuery): AxiosPromise<ClientVO[]> => {
|
||||
return request({
|
||||
url: '/system/client/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询客户端管理详细
|
||||
* @param id
|
||||
*/
|
||||
export const getClient = (id: string | number): AxiosPromise<ClientVO> => {
|
||||
return request({
|
||||
url: '/system/client/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增客户端管理
|
||||
* @param data
|
||||
*/
|
||||
export const addClient = (data: ClientForm) => {
|
||||
return request({
|
||||
url: '/system/client',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改客户端管理
|
||||
* @param data
|
||||
*/
|
||||
export const updateClient = (data: ClientForm) => {
|
||||
return request({
|
||||
url: '/system/client',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除客户端管理
|
||||
* @param id
|
||||
*/
|
||||
export const delClient = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/system/client/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 状态修改
|
||||
* @param clientId 客户端id
|
||||
* @param status 状态
|
||||
*/
|
||||
export function changeStatus(clientId: string, status: string) {
|
||||
const data = {
|
||||
clientId,
|
||||
status
|
||||
};
|
||||
return request({
|
||||
url: '/system/client/changeStatus',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
135
src/api/system/client/types.ts
Normal file
135
src/api/system/client/types.ts
Normal file
@ -0,0 +1,135 @@
|
||||
export interface ClientVO {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 客户端id
|
||||
*/
|
||||
clientId: string;
|
||||
|
||||
/**
|
||||
* 客户端key
|
||||
*/
|
||||
clientKey: string;
|
||||
|
||||
/**
|
||||
* 客户端秘钥
|
||||
*/
|
||||
clientSecret: string;
|
||||
|
||||
/**
|
||||
* 授权类型
|
||||
*/
|
||||
grantTypeList: string[];
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
deviceType: string;
|
||||
|
||||
/**
|
||||
* token活跃超时时间
|
||||
*/
|
||||
activeTimeout: number;
|
||||
|
||||
/**
|
||||
* token固定超时
|
||||
*/
|
||||
timeout: number;
|
||||
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
status: string;
|
||||
}
|
||||
|
||||
export interface ClientForm extends BaseEntity {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 客户端id
|
||||
*/
|
||||
clientId?: string | number;
|
||||
|
||||
/**
|
||||
* 客户端key
|
||||
*/
|
||||
clientKey?: string;
|
||||
|
||||
/**
|
||||
* 客户端秘钥
|
||||
*/
|
||||
clientSecret?: string;
|
||||
|
||||
/**
|
||||
* 授权类型
|
||||
*/
|
||||
grantTypeList?: string[];
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
deviceType?: string;
|
||||
|
||||
/**
|
||||
* token活跃超时时间
|
||||
*/
|
||||
activeTimeout?: number;
|
||||
|
||||
/**
|
||||
* token固定超时
|
||||
*/
|
||||
timeout?: number;
|
||||
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
status?: string;
|
||||
}
|
||||
|
||||
export interface ClientQuery extends PageQuery {
|
||||
/**
|
||||
* 客户端id
|
||||
*/
|
||||
clientId?: string | number;
|
||||
|
||||
/**
|
||||
* 客户端key
|
||||
*/
|
||||
clientKey?: string;
|
||||
|
||||
/**
|
||||
* 客户端秘钥
|
||||
*/
|
||||
clientSecret?: string;
|
||||
|
||||
/**
|
||||
* 授权类型
|
||||
*/
|
||||
grantType?: string;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
deviceType?: string;
|
||||
|
||||
/**
|
||||
* token活跃超时时间
|
||||
*/
|
||||
activeTimeout?: number;
|
||||
|
||||
/**
|
||||
* token固定超时
|
||||
*/
|
||||
timeout?: number;
|
||||
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
status?: string;
|
||||
}
|
74
src/api/system/config/index.ts
Normal file
74
src/api/system/config/index.ts
Normal file
@ -0,0 +1,74 @@
|
||||
import request from '@/utils/request';
|
||||
import { ConfigForm, ConfigQuery, ConfigVO } from './types';
|
||||
import { AxiosPromise } from 'axios';
|
||||
|
||||
// 查询参数列表
|
||||
export function listConfig(query: ConfigQuery): AxiosPromise<ConfigVO[]> {
|
||||
return request({
|
||||
url: '/system/config/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询参数详细
|
||||
export function getConfig(configId: string | number): AxiosPromise<ConfigVO> {
|
||||
return request({
|
||||
url: '/system/config/' + configId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 根据参数键名查询参数值
|
||||
export function getConfigKey(configKey: string): AxiosPromise<string> {
|
||||
return request({
|
||||
url: '/system/config/configKey/' + configKey,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增参数配置
|
||||
export function addConfig(data: ConfigForm) {
|
||||
return request({
|
||||
url: '/system/config',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改参数配置
|
||||
export function updateConfig(data: ConfigForm) {
|
||||
return request({
|
||||
url: '/system/config',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改参数配置
|
||||
export function updateConfigByKey(key: string, value: any) {
|
||||
return request({
|
||||
url: '/system/config/updateByKey',
|
||||
method: 'put',
|
||||
data: {
|
||||
configKey: key,
|
||||
configValue: value
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 删除参数配置
|
||||
export function delConfig(configId: string | number | Array<string | number>) {
|
||||
return request({
|
||||
url: '/system/config/' + configId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 刷新参数缓存
|
||||
export function refreshCache() {
|
||||
return request({
|
||||
url: '/system/config/refreshCache',
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
23
src/api/system/config/types.ts
Normal file
23
src/api/system/config/types.ts
Normal file
@ -0,0 +1,23 @@
|
||||
export interface ConfigVO extends BaseEntity {
|
||||
configId: number | string;
|
||||
configName: string;
|
||||
configKey: string;
|
||||
configValue: string;
|
||||
configType: string;
|
||||
remark: string;
|
||||
}
|
||||
|
||||
export interface ConfigForm {
|
||||
configId: number | string | undefined;
|
||||
configName: string;
|
||||
configKey: string;
|
||||
configValue: string;
|
||||
configType: string;
|
||||
remark: string;
|
||||
}
|
||||
|
||||
export interface ConfigQuery extends PageQuery {
|
||||
configName: string;
|
||||
configKey: string;
|
||||
configType: string;
|
||||
}
|
73
src/api/system/dept/index.ts
Normal file
73
src/api/system/dept/index.ts
Normal file
@ -0,0 +1,73 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import {DeptForm, DeptQuery, DeptTreeVO, DeptVO} from './types';
|
||||
|
||||
// 查询部门列表
|
||||
export const listDept = (query?: DeptQuery) => {
|
||||
return request({
|
||||
url: '/system/dept/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 通过deptIds查询部门
|
||||
* @param deptIds
|
||||
*/
|
||||
export const optionSelect = (deptIds: (number | string)[]): AxiosPromise<DeptVO[]> => {
|
||||
return request({
|
||||
url: '/system/dept/optionselect?deptIds=' + deptIds,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
// 查询部门列表(排除节点)
|
||||
export const listDeptExcludeChild = (deptId: string | number): AxiosPromise<DeptVO[]> => {
|
||||
return request({
|
||||
url: '/system/dept/list/exclude/' + deptId,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
// 查询部门详细
|
||||
export const getDept = (deptId: string | number): AxiosPromise<DeptVO> => {
|
||||
return request({
|
||||
url: '/system/dept/' + deptId,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
// 查询部门下拉树结构
|
||||
export const treeselect = (): AxiosPromise<DeptTreeVO[]> => {
|
||||
return request({
|
||||
url: '/system/dept/treeselect',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
// 新增部门
|
||||
export const addDept = (data: DeptForm) => {
|
||||
return request({
|
||||
url: '/system/dept',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
// 修改部门
|
||||
export const updateDept = (data: DeptForm) => {
|
||||
return request({
|
||||
url: '/system/dept',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
// 删除部门
|
||||
export const delDept = (deptId: number | string) => {
|
||||
return request({
|
||||
url: '/system/dept/' + deptId,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
60
src/api/system/dept/types.ts
Normal file
60
src/api/system/dept/types.ts
Normal file
@ -0,0 +1,60 @@
|
||||
/**
|
||||
* 部门查询参数
|
||||
*/
|
||||
export interface DeptQuery extends PageQuery {
|
||||
deptName?: string;
|
||||
deptCategory?: string;
|
||||
status?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 部门类型
|
||||
*/
|
||||
export interface DeptVO extends BaseEntity {
|
||||
id: number | string;
|
||||
parentName: string;
|
||||
parentId: number | string;
|
||||
children: DeptVO[];
|
||||
deptId: number | string;
|
||||
deptName: string;
|
||||
deptCategory: string;
|
||||
orderNum: number;
|
||||
leader: string;
|
||||
phone: string;
|
||||
email: string;
|
||||
status: string;
|
||||
delFlag: string;
|
||||
ancestors: string;
|
||||
menuId: string | number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 部门类型
|
||||
*/
|
||||
export interface DeptTreeVO extends BaseEntity {
|
||||
id: number | string;
|
||||
label: string;
|
||||
parentId: number | string;
|
||||
weight: number;
|
||||
children: DeptTreeVO[];
|
||||
disabled: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* 部门表单类型
|
||||
*/
|
||||
export interface DeptForm {
|
||||
parentName?: string;
|
||||
parentId?: number | string;
|
||||
children?: DeptForm[];
|
||||
deptId?: number | string;
|
||||
deptName?: string;
|
||||
deptCategory?: string;
|
||||
orderNum?: number;
|
||||
leader?: string;
|
||||
phone?: string;
|
||||
email?: string;
|
||||
status?: string;
|
||||
delFlag?: string;
|
||||
ancestors?: string;
|
||||
}
|
53
src/api/system/dict/data/index.ts
Normal file
53
src/api/system/dict/data/index.ts
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { DictDataForm, DictDataQuery, DictDataVO } from './types';
|
||||
// 根据字典类型查询字典数据信息
|
||||
export function getDicts(dictType: string): AxiosPromise<DictDataVO[]> {
|
||||
return request({
|
||||
url: '/system/dict/data/type/' + dictType,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 查询字典数据列表
|
||||
export function listData(query: DictDataQuery): AxiosPromise<DictDataVO[]> {
|
||||
return request({
|
||||
url: '/system/dict/data/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询字典数据详细
|
||||
export function getData(dictCode: string | number): AxiosPromise<DictDataVO> {
|
||||
return request({
|
||||
url: '/system/dict/data/' + dictCode,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增字典数据
|
||||
export function addData(data: DictDataForm) {
|
||||
return request({
|
||||
url: '/system/dict/data',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改字典数据
|
||||
export function updateData(data: DictDataForm) {
|
||||
return request({
|
||||
url: '/system/dict/data',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除字典数据
|
||||
export function delData(dictCode: string | number | Array<string | number>) {
|
||||
return request({
|
||||
url: '/system/dict/data/' + dictCode,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
26
src/api/system/dict/data/types.ts
Normal file
26
src/api/system/dict/data/types.ts
Normal file
@ -0,0 +1,26 @@
|
||||
export interface DictDataQuery extends PageQuery {
|
||||
dictName: string;
|
||||
dictType: string;
|
||||
dictLabel: string;
|
||||
}
|
||||
|
||||
export interface DictDataVO extends BaseEntity {
|
||||
dictCode: string;
|
||||
dictLabel: string;
|
||||
dictValue: string;
|
||||
cssClass: string;
|
||||
listClass: ElTagType;
|
||||
dictSort: number;
|
||||
remark: string;
|
||||
}
|
||||
|
||||
export interface DictDataForm {
|
||||
dictType?: string;
|
||||
dictCode: string | undefined;
|
||||
dictLabel: string;
|
||||
dictValue: string;
|
||||
cssClass: string;
|
||||
listClass: ElTagType;
|
||||
dictSort: number;
|
||||
remark: string;
|
||||
}
|
62
src/api/system/dict/type/index.ts
Normal file
62
src/api/system/dict/type/index.ts
Normal file
@ -0,0 +1,62 @@
|
||||
import request from '@/utils/request';
|
||||
import { DictTypeForm, DictTypeVO, DictTypeQuery } from './types';
|
||||
import { AxiosPromise } from 'axios';
|
||||
|
||||
// 查询字典类型列表
|
||||
export function listType(query: DictTypeQuery): AxiosPromise<DictTypeVO[]> {
|
||||
return request({
|
||||
url: '/system/dict/type/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询字典类型详细
|
||||
export function getType(dictId: number | string): AxiosPromise<DictTypeVO> {
|
||||
return request({
|
||||
url: '/system/dict/type/' + dictId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增字典类型
|
||||
export function addType(data: DictTypeForm) {
|
||||
return request({
|
||||
url: '/system/dict/type',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改字典类型
|
||||
export function updateType(data: DictTypeForm) {
|
||||
return request({
|
||||
url: '/system/dict/type',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除字典类型
|
||||
export function delType(dictId: string | number | Array<string | number>) {
|
||||
return request({
|
||||
url: '/system/dict/type/' + dictId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 刷新字典缓存
|
||||
export function refreshCache() {
|
||||
return request({
|
||||
url: '/system/dict/type/refreshCache',
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 获取字典选择框列表
|
||||
export function optionselect(): AxiosPromise<DictTypeVO[]> {
|
||||
return request({
|
||||
url: '/system/dict/type/optionselect',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
18
src/api/system/dict/type/types.ts
Normal file
18
src/api/system/dict/type/types.ts
Normal file
@ -0,0 +1,18 @@
|
||||
export interface DictTypeVO extends BaseEntity {
|
||||
dictId: number | string;
|
||||
dictName: string;
|
||||
dictType: string;
|
||||
remark: string;
|
||||
}
|
||||
|
||||
export interface DictTypeForm {
|
||||
dictId: number | string | undefined;
|
||||
dictName: string;
|
||||
dictType: string;
|
||||
remark: string;
|
||||
}
|
||||
|
||||
export interface DictTypeQuery extends PageQuery {
|
||||
dictName: string;
|
||||
dictType: string;
|
||||
}
|
70
src/api/system/menu/index.ts
Normal file
70
src/api/system/menu/index.ts
Normal file
@ -0,0 +1,70 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { MenuQuery, MenuVO, MenuForm, MenuTreeOption, RoleMenuTree } from './types';
|
||||
|
||||
// 查询菜单列表
|
||||
export const listMenu = (query?: MenuQuery): AxiosPromise<MenuVO[]> => {
|
||||
return request({
|
||||
url: '/system/menu/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
// 查询菜单详细
|
||||
export const getMenu = (menuId: string | number): AxiosPromise<MenuVO> => {
|
||||
return request({
|
||||
url: '/system/menu/' + menuId,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
// 查询菜单下拉树结构
|
||||
export const treeselect = (): AxiosPromise<MenuTreeOption[]> => {
|
||||
return request({
|
||||
url: '/system/menu/treeselect',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
// 根据角色ID查询菜单下拉树结构
|
||||
export const roleMenuTreeselect = (roleId: string | number): AxiosPromise<RoleMenuTree> => {
|
||||
return request({
|
||||
url: '/system/menu/roleMenuTreeselect/' + roleId,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
// 根据角色ID查询菜单下拉树结构
|
||||
export const tenantPackageMenuTreeselect = (packageId: string | number): AxiosPromise<RoleMenuTree> => {
|
||||
return request({
|
||||
url: '/system/menu/tenantPackageMenuTreeselect/' + packageId,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
// 新增菜单
|
||||
export const addMenu = (data: MenuForm) => {
|
||||
return request({
|
||||
url: '/system/menu',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
// 修改菜单
|
||||
export const updateMenu = (data: MenuForm) => {
|
||||
return request({
|
||||
url: '/system/menu',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
// 删除菜单
|
||||
export const delMenu = (menuId: string | number) => {
|
||||
return request({
|
||||
url: '/system/menu/' + menuId,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
69
src/api/system/menu/types.ts
Normal file
69
src/api/system/menu/types.ts
Normal file
@ -0,0 +1,69 @@
|
||||
import { MenuTypeEnum } from '@/enums/MenuTypeEnum';
|
||||
|
||||
/**
|
||||
* 菜单树形结构类型
|
||||
*/
|
||||
export interface MenuTreeOption {
|
||||
id: string | number;
|
||||
label: string;
|
||||
parentId: string | number;
|
||||
weight: number;
|
||||
children?: MenuTreeOption[];
|
||||
}
|
||||
|
||||
export interface RoleMenuTree {
|
||||
menus: MenuTreeOption[];
|
||||
checkedKeys: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* 菜单查询参数类型
|
||||
*/
|
||||
export interface MenuQuery {
|
||||
keywords?: string;
|
||||
menuName?: string;
|
||||
status?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 菜单视图对象类型
|
||||
*/
|
||||
export interface MenuVO extends BaseEntity {
|
||||
parentName: string;
|
||||
parentId: string | number;
|
||||
children: MenuVO[];
|
||||
menuId: string | number;
|
||||
menuName: string;
|
||||
orderNum: number;
|
||||
path: string;
|
||||
component: string;
|
||||
queryParam: string;
|
||||
isFrame: string;
|
||||
isCache: string;
|
||||
menuType: MenuTypeEnum;
|
||||
visible: string;
|
||||
status: string;
|
||||
icon: string;
|
||||
remark: string;
|
||||
}
|
||||
|
||||
export interface MenuForm {
|
||||
parentName?: string;
|
||||
parentId?: string | number;
|
||||
children?: MenuForm[];
|
||||
menuId?: string | number;
|
||||
menuName: string;
|
||||
orderNum: number;
|
||||
path: string;
|
||||
component?: string;
|
||||
queryParam?: string;
|
||||
isFrame?: string;
|
||||
isCache?: string;
|
||||
menuType?: MenuTypeEnum;
|
||||
visible?: string;
|
||||
status?: string;
|
||||
icon?: string;
|
||||
remark?: string;
|
||||
query?: string;
|
||||
perms?: string;
|
||||
}
|
45
src/api/system/notice/index.ts
Normal file
45
src/api/system/notice/index.ts
Normal file
@ -0,0 +1,45 @@
|
||||
import request from '@/utils/request';
|
||||
import { NoticeForm, NoticeQuery, NoticeVO } from './types';
|
||||
import { AxiosPromise } from 'axios';
|
||||
// 查询公告列表
|
||||
export function listNotice(query: NoticeQuery): AxiosPromise<NoticeVO[]> {
|
||||
return request({
|
||||
url: '/system/notice/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询公告详细
|
||||
export function getNotice(noticeId: string | number): AxiosPromise<NoticeVO> {
|
||||
return request({
|
||||
url: '/system/notice/' + noticeId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增公告
|
||||
export function addNotice(data: NoticeForm) {
|
||||
return request({
|
||||
url: '/system/notice',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改公告
|
||||
export function updateNotice(data: NoticeForm) {
|
||||
return request({
|
||||
url: '/system/notice',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除公告
|
||||
export function delNotice(noticeId: string | number | Array<string | number>) {
|
||||
return request({
|
||||
url: '/system/notice/' + noticeId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
26
src/api/system/notice/types.ts
Normal file
26
src/api/system/notice/types.ts
Normal file
@ -0,0 +1,26 @@
|
||||
export interface NoticeVO extends BaseEntity {
|
||||
noticeId: number;
|
||||
noticeTitle: string;
|
||||
noticeType: string;
|
||||
noticeContent: string;
|
||||
status: string;
|
||||
remark: string;
|
||||
createByName: string;
|
||||
}
|
||||
|
||||
export interface NoticeQuery extends PageQuery {
|
||||
noticeTitle: string;
|
||||
createByName: string;
|
||||
status: string;
|
||||
noticeType: string;
|
||||
}
|
||||
|
||||
export interface NoticeForm {
|
||||
noticeId: number | string | undefined;
|
||||
noticeTitle: string;
|
||||
noticeType: string;
|
||||
noticeContent: string;
|
||||
status: string;
|
||||
remark: string;
|
||||
createByName: string;
|
||||
}
|
33
src/api/system/oss/index.ts
Normal file
33
src/api/system/oss/index.ts
Normal file
@ -0,0 +1,33 @@
|
||||
import request, { download } from '@/utils/request';
|
||||
import { OssQuery, OssVO } from './types';
|
||||
import { AxiosPromise } from 'axios';
|
||||
|
||||
// 查询OSS对象存储列表
|
||||
export function listOss(query: OssQuery): AxiosPromise<OssVO[]> {
|
||||
return request({
|
||||
url: '/resource/oss/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询OSS对象基于id串
|
||||
export function listByIds(ossId: string | number | string[]): AxiosPromise<OssVO[]> {
|
||||
return request({
|
||||
url: '/resource/oss/listByIds/' + ossId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 删除OSS对象存储
|
||||
export function delOss(ossId: string | number | Array<string | number>) {
|
||||
return request({
|
||||
url: '/resource/oss/' + ossId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 下载OSS对象存储
|
||||
export function downLoadOss(ossId: { id?: string | number; idList?: string | number | Array<string | number> }, url: string, fileName: string) {
|
||||
return download(url, ossId, fileName);
|
||||
}
|
22
src/api/system/oss/types.ts
Normal file
22
src/api/system/oss/types.ts
Normal file
@ -0,0 +1,22 @@
|
||||
export interface OssVO extends BaseEntity {
|
||||
ossId: string | number;
|
||||
fileName: string;
|
||||
originalName: string;
|
||||
fileSuffix: string;
|
||||
url: string;
|
||||
createByName: string;
|
||||
service: string;
|
||||
}
|
||||
|
||||
export interface OssQuery extends PageQuery {
|
||||
fileName: string;
|
||||
originalName: string;
|
||||
fileSuffix: string;
|
||||
createTime: string;
|
||||
service: string;
|
||||
orderByColumn: string;
|
||||
isAsc: string;
|
||||
}
|
||||
export interface OssForm {
|
||||
file: undefined | string;
|
||||
}
|
60
src/api/system/ossConfig/index.ts
Normal file
60
src/api/system/ossConfig/index.ts
Normal file
@ -0,0 +1,60 @@
|
||||
import request from '@/utils/request';
|
||||
import { OssConfigForm, OssConfigQuery, OssConfigVO } from './types';
|
||||
import { AxiosPromise } from 'axios';
|
||||
|
||||
// 查询对象存储配置列表
|
||||
export function listOssConfig(query: OssConfigQuery): AxiosPromise<OssConfigVO[]> {
|
||||
return request({
|
||||
url: '/resource/oss/config/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询对象存储配置详细
|
||||
export function getOssConfig(ossConfigId: string | number): AxiosPromise<OssConfigVO> {
|
||||
return request({
|
||||
url: '/resource/oss/config/' + ossConfigId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增对象存储配置
|
||||
export function addOssConfig(data: OssConfigForm) {
|
||||
return request({
|
||||
url: '/resource/oss/config',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改对象存储配置
|
||||
export function updateOssConfig(data: OssConfigForm) {
|
||||
return request({
|
||||
url: '/resource/oss/config',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除对象存储配置
|
||||
export function delOssConfig(ossConfigId: string | number | Array<string | number>) {
|
||||
return request({
|
||||
url: '/resource/oss/config/' + ossConfigId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 对象存储状态修改
|
||||
export function changeOssConfigStatus(ossConfigId: string | number, status: string, configKey: string) {
|
||||
const data = {
|
||||
ossConfigId,
|
||||
status,
|
||||
configKey
|
||||
};
|
||||
return request({
|
||||
url: '/resource/oss/config/changeStatus',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
38
src/api/system/ossConfig/types.ts
Normal file
38
src/api/system/ossConfig/types.ts
Normal file
@ -0,0 +1,38 @@
|
||||
export interface OssConfigVO extends BaseEntity {
|
||||
ossConfigId: number | string;
|
||||
configKey: string;
|
||||
accessKey: string;
|
||||
secretKey: string;
|
||||
bucketName: string;
|
||||
prefix: string;
|
||||
endpoint: string;
|
||||
domain: string;
|
||||
isHttps: string;
|
||||
region: string;
|
||||
status: string;
|
||||
ext1: string;
|
||||
remark: string;
|
||||
accessPolicy: string;
|
||||
}
|
||||
|
||||
export interface OssConfigQuery extends PageQuery {
|
||||
configKey: string;
|
||||
bucketName: string;
|
||||
status: string;
|
||||
}
|
||||
|
||||
export interface OssConfigForm {
|
||||
ossConfigId: string | number | undefined;
|
||||
configKey: string;
|
||||
accessKey: string;
|
||||
secretKey: string;
|
||||
bucketName: string;
|
||||
prefix: string;
|
||||
endpoint: string;
|
||||
domain: string;
|
||||
isHttps: string;
|
||||
accessPolicy: string;
|
||||
region: string;
|
||||
status: string;
|
||||
remark: string;
|
||||
}
|
58
src/api/system/post/index.ts
Normal file
58
src/api/system/post/index.ts
Normal file
@ -0,0 +1,58 @@
|
||||
import request from '@/utils/request';
|
||||
import { PostForm, PostQuery, PostVO } from './types';
|
||||
import { AxiosPromise } from 'axios';
|
||||
|
||||
// 查询岗位列表
|
||||
export function listPost(query: PostQuery): AxiosPromise<PostVO[]> {
|
||||
return request({
|
||||
url: '/system/post/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询岗位详细
|
||||
export function getPost(postId: string | number): AxiosPromise<PostVO> {
|
||||
return request({
|
||||
url: '/system/post/' + postId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 获取岗位选择框列表
|
||||
export function optionselect(deptId?: number | string, postIds?: (number | string)[]): AxiosPromise<PostVO[]> {
|
||||
return request({
|
||||
url: '/system/post/optionselect',
|
||||
method: 'get',
|
||||
params: {
|
||||
postIds: postIds,
|
||||
deptId: deptId
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 新增岗位
|
||||
export function addPost(data: PostForm) {
|
||||
return request({
|
||||
url: '/system/post',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改岗位
|
||||
export function updatePost(data: PostForm) {
|
||||
return request({
|
||||
url: '/system/post',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除岗位
|
||||
export function delPost(postId: string | number | (string | number)[]) {
|
||||
return request({
|
||||
url: '/system/post/' + postId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
31
src/api/system/post/types.ts
Normal file
31
src/api/system/post/types.ts
Normal file
@ -0,0 +1,31 @@
|
||||
export interface PostVO extends BaseEntity {
|
||||
postId: number | string;
|
||||
deptId: number | string;
|
||||
postCode: string;
|
||||
postName: string;
|
||||
postCategory: string;
|
||||
deptName: string;
|
||||
postSort: number;
|
||||
status: string;
|
||||
remark: string;
|
||||
}
|
||||
|
||||
export interface PostForm {
|
||||
postId: number | string | undefined;
|
||||
deptId: number | string | undefined;
|
||||
postCode: string;
|
||||
postName: string;
|
||||
postCategory: string;
|
||||
postSort: number;
|
||||
status: string;
|
||||
remark: string;
|
||||
}
|
||||
|
||||
export interface PostQuery extends PageQuery {
|
||||
deptId: number | string;
|
||||
belongDeptId: number | string;
|
||||
postCode: string;
|
||||
postName: string;
|
||||
postCategory: string;
|
||||
status: string;
|
||||
}
|
160
src/api/system/role/index.ts
Normal file
160
src/api/system/role/index.ts
Normal file
@ -0,0 +1,160 @@
|
||||
import { UserVO } from '@/api/system/user/types';
|
||||
import { UserQuery } from '@/api/system/user/types';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { RoleQuery, RoleVO, RoleDeptTree } from './types';
|
||||
import request from '@/utils/request';
|
||||
|
||||
export const listRole = (query: RoleQuery): AxiosPromise<RoleVO[]> => {
|
||||
return request({
|
||||
url: '/system/role/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 通过roleIds查询角色
|
||||
* @param roleIds
|
||||
*/
|
||||
export const optionSelect = (roleIds: (number | string)[]): AxiosPromise<RoleVO[]> => {
|
||||
return request({
|
||||
url: '/system/role/optionselect?roleIds=' + roleIds,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询角色详细
|
||||
*/
|
||||
export const getRole = (roleId: string | number): AxiosPromise<RoleVO> => {
|
||||
return request({
|
||||
url: '/system/role/' + roleId,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增角色
|
||||
*/
|
||||
export const addRole = (data: any) => {
|
||||
return request({
|
||||
url: '/system/role',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改角色
|
||||
* @param data
|
||||
*/
|
||||
export const updateRole = (data: any) => {
|
||||
return request({
|
||||
url: '/system/role',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 角色数据权限
|
||||
*/
|
||||
export const dataScope = (data: any) => {
|
||||
return request({
|
||||
url: '/system/role/dataScope',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 角色状态修改
|
||||
*/
|
||||
export const changeRoleStatus = (roleId: string | number, status: string) => {
|
||||
const data = {
|
||||
roleId,
|
||||
status
|
||||
};
|
||||
return request({
|
||||
url: '/system/role/changeStatus',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除角色
|
||||
*/
|
||||
export const delRole = (roleId: Array<string | number> | string | number) => {
|
||||
return request({
|
||||
url: '/system/role/' + roleId,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询角色已授权用户列表
|
||||
*/
|
||||
export const allocatedUserList = (query: UserQuery): AxiosPromise<UserVO[]> => {
|
||||
return request({
|
||||
url: '/system/role/authUser/allocatedList',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询角色未授权用户列表
|
||||
*/
|
||||
export const unallocatedUserList = (query: UserQuery): AxiosPromise<UserVO[]> => {
|
||||
return request({
|
||||
url: '/system/role/authUser/unallocatedList',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 取消用户授权角色
|
||||
*/
|
||||
export const authUserCancel = (data: any) => {
|
||||
return request({
|
||||
url: '/system/role/authUser/cancel',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 批量取消用户授权角色
|
||||
*/
|
||||
export const authUserCancelAll = (data: any) => {
|
||||
return request({
|
||||
url: '/system/role/authUser/cancelAll',
|
||||
method: 'put',
|
||||
params: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 授权用户选择
|
||||
*/
|
||||
export const authUserSelectAll = (data: any) => {
|
||||
return request({
|
||||
url: '/system/role/authUser/selectAll',
|
||||
method: 'put',
|
||||
params: data
|
||||
});
|
||||
};
|
||||
// 根据角色ID查询部门树结构
|
||||
export const deptTreeSelect = (roleId: string | number): AxiosPromise<RoleDeptTree> => {
|
||||
return request({
|
||||
url: '/system/role/deptTree/' + roleId,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
export default {
|
||||
optionSelect,
|
||||
listRole
|
||||
};
|
52
src/api/system/role/types.ts
Normal file
52
src/api/system/role/types.ts
Normal file
@ -0,0 +1,52 @@
|
||||
/**
|
||||
* 菜单树形结构类型
|
||||
*/
|
||||
export interface DeptTreeOption {
|
||||
id: string;
|
||||
label: string;
|
||||
parentId: string;
|
||||
weight: number;
|
||||
children?: DeptTreeOption[];
|
||||
}
|
||||
|
||||
export interface RoleDeptTree {
|
||||
checkedKeys: string[];
|
||||
depts: DeptTreeOption[];
|
||||
}
|
||||
|
||||
export interface RoleVO extends BaseEntity {
|
||||
roleId: string | number;
|
||||
roleName: string;
|
||||
roleKey: string;
|
||||
roleSort: number;
|
||||
dataScope: string;
|
||||
menuCheckStrictly: boolean;
|
||||
deptCheckStrictly: boolean;
|
||||
status: string;
|
||||
delFlag: string;
|
||||
remark?: any;
|
||||
flag: boolean;
|
||||
menuIds?: Array<string | number>;
|
||||
deptIds?: Array<string | number>;
|
||||
admin: boolean;
|
||||
}
|
||||
|
||||
export interface RoleQuery extends PageQuery {
|
||||
roleName: string;
|
||||
roleKey: string;
|
||||
status: string;
|
||||
}
|
||||
|
||||
export interface RoleForm {
|
||||
roleName: string;
|
||||
roleKey: string;
|
||||
roleSort: number;
|
||||
status: string;
|
||||
menuCheckStrictly: boolean;
|
||||
deptCheckStrictly: boolean;
|
||||
remark: string;
|
||||
dataScope?: string;
|
||||
roleId: string | undefined;
|
||||
menuIds: Array<string | number>;
|
||||
deptIds: Array<string | number>;
|
||||
}
|
28
src/api/system/social/auth.ts
Normal file
28
src/api/system/social/auth.ts
Normal file
@ -0,0 +1,28 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 绑定账号
|
||||
export function authBinding(source: string, tenantId: string) {
|
||||
return request({
|
||||
url: '/auth/binding/' + source,
|
||||
method: 'get',
|
||||
params: {
|
||||
tenantId: tenantId,
|
||||
domain: window.location.host
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 解绑账号
|
||||
export function authUnlock(authId: string) {
|
||||
return request({
|
||||
url: '/auth/unlock/' + authId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
//获取授权列表
|
||||
export function getAuthList() {
|
||||
return request({
|
||||
url: '/system/social/list',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user