init:first commit of plus-ui
This commit is contained in:
21
.editorconfig
Normal file
21
.editorconfig
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# 告诉EditorConfig插件,这是根文件,不用继续往上查找
|
||||||
|
root = true
|
||||||
|
|
||||||
|
# 匹配全部文件
|
||||||
|
[*]
|
||||||
|
# 缩进风格,可选space、tab
|
||||||
|
indent_style = space
|
||||||
|
# 缩进的空格数
|
||||||
|
indent_size = 2
|
||||||
|
# 设置字符集
|
||||||
|
charset = utf-8
|
||||||
|
# 结尾换行符,可选lf、cr、crlf
|
||||||
|
end_of_line = lf
|
||||||
|
# 在文件结尾插入新行
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
# 删除一行中的前后空格
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
insert_final_newline = false
|
||||||
|
trim_trailing_whitespace = false
|
39
.env.development
Normal file
39
.env.development
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# 页面标题
|
||||||
|
VITE_APP_TITLE = 新能源项目管理平台
|
||||||
|
|
||||||
|
# 开发环境配置
|
||||||
|
VITE_APP_ENV = 'development'
|
||||||
|
|
||||||
|
# 开发环境
|
||||||
|
VITE_APP_BASE_API = 'http://192.168.110.126:8899'
|
||||||
|
|
||||||
|
# 无人机接口地址
|
||||||
|
|
||||||
|
VITE_APP_BASE_DRONE_API = 'http://192.168.110.8:9136'
|
||||||
|
|
||||||
|
# 应用访问路径 例如使用前缀 /admin/
|
||||||
|
VITE_APP_CONTEXT_PATH = '/'
|
||||||
|
|
||||||
|
# 监控地址
|
||||||
|
VITE_APP_MONITOR_ADMIN = 'http://localhost:9090/admin/applications'
|
||||||
|
|
||||||
|
# SnailJob 控制台地址
|
||||||
|
VITE_APP_SNAILJOB_ADMIN = 'http://localhost:8800/snail-job'
|
||||||
|
|
||||||
|
VITE_APP_PORT = 7788
|
||||||
|
|
||||||
|
# 接口加密功能开关(如需关闭 后端也必须对应关闭)
|
||||||
|
VITE_APP_ENCRYPT = true
|
||||||
|
# 接口加密传输 RSA 公钥与后端解密私钥对应 如更换需前后端一同更换
|
||||||
|
VITE_APP_RSA_PUBLIC_KEY = 'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKoR8mX0rGKLqzcWmOzbfj64K8ZIgOdHnzkXSOVOZbFu/TJhZ7rFAN+eaGkl3C4buccQd/EjEsj9ir7ijT7h96MCAwEAAQ=='
|
||||||
|
# 接口响应解密 RSA 私钥与后端加密公钥对应 如更换需前后端一同更换
|
||||||
|
VITE_APP_RSA_PRIVATE_KEY = 'MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAmc3CuPiGL/LcIIm7zryCEIbl1SPzBkr75E2VMtxegyZ1lYRD+7TZGAPkvIsBcaMs6Nsy0L78n2qh+lIZMpLH8wIDAQABAkEAk82Mhz0tlv6IVCyIcw/s3f0E+WLmtPFyR9/WtV3Y5aaejUkU60JpX4m5xNR2VaqOLTZAYjW8Wy0aXr3zYIhhQQIhAMfqR9oFdYw1J9SsNc+CrhugAvKTi0+BF6VoL6psWhvbAiEAxPPNTmrkmrXwdm/pQQu3UOQmc2vCZ5tiKpW10CgJi8kCIFGkL6utxw93Ncj4exE/gPLvKcT+1Emnoox+O9kRXss5AiAMtYLJDaLEzPrAWcZeeSgSIzbL+ecokmFKSDDcRske6QIgSMkHedwND1olF8vlKsJUGK3BcdtM8w4Xq7BpSBwsloE='
|
||||||
|
|
||||||
|
# 客户端id
|
||||||
|
VITE_APP_CLIENT_ID = 'e5cd7e4891bf95d1d19206ce24a7b32e'
|
||||||
|
|
||||||
|
# websocket 开关 默认使用sse推送
|
||||||
|
VITE_APP_WEBSOCKET = false
|
||||||
|
|
||||||
|
# sse 开关
|
||||||
|
VITE_APP_SSE = true
|
38
.env.production
Normal file
38
.env.production
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# 页面标题
|
||||||
|
VITE_APP_TITLE = 新能源项目管理平台
|
||||||
|
|
||||||
|
# 生产环境配置
|
||||||
|
VITE_APP_ENV = 'production'
|
||||||
|
|
||||||
|
# 应用访问路径 例如使用前缀 /admin/
|
||||||
|
VITE_APP_CONTEXT_PATH = '/'
|
||||||
|
|
||||||
|
# 监控地址
|
||||||
|
VITE_APP_MONITOR_ADMIN = '/admin/applications'
|
||||||
|
|
||||||
|
# SnailJob 控制台地址
|
||||||
|
VITE_APP_SNAILJOB_ADMIN = '/snail-job'
|
||||||
|
|
||||||
|
# 生产环境
|
||||||
|
VITE_APP_BASE_API = 'http://192.168.110.5:8899'
|
||||||
|
|
||||||
|
# 是否在打包时开启压缩,支持 gzip 和 brotli
|
||||||
|
VITE_BUILD_COMPRESS = gzip
|
||||||
|
|
||||||
|
VITE_APP_PORT = 80
|
||||||
|
|
||||||
|
# 接口加密功能开关(如需关闭 后端也必须对应关闭)
|
||||||
|
VITE_APP_ENCRYPT = true
|
||||||
|
# 接口加密传输 RSA 公钥与后端解密私钥对应 如更换需前后端一同更换
|
||||||
|
VITE_APP_RSA_PUBLIC_KEY = 'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKoR8mX0rGKLqzcWmOzbfj64K8ZIgOdHnzkXSOVOZbFu/TJhZ7rFAN+eaGkl3C4buccQd/EjEsj9ir7ijT7h96MCAwEAAQ=='
|
||||||
|
# 接口响应解密 RSA 私钥与后端加密公钥对应 如更换需前后端一同更换
|
||||||
|
VITE_APP_RSA_PRIVATE_KEY = 'MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAmc3CuPiGL/LcIIm7zryCEIbl1SPzBkr75E2VMtxegyZ1lYRD+7TZGAPkvIsBcaMs6Nsy0L78n2qh+lIZMpLH8wIDAQABAkEAk82Mhz0tlv6IVCyIcw/s3f0E+WLmtPFyR9/WtV3Y5aaejUkU60JpX4m5xNR2VaqOLTZAYjW8Wy0aXr3zYIhhQQIhAMfqR9oFdYw1J9SsNc+CrhugAvKTi0+BF6VoL6psWhvbAiEAxPPNTmrkmrXwdm/pQQu3UOQmc2vCZ5tiKpW10CgJi8kCIFGkL6utxw93Ncj4exE/gPLvKcT+1Emnoox+O9kRXss5AiAMtYLJDaLEzPrAWcZeeSgSIzbL+ecokmFKSDDcRske6QIgSMkHedwND1olF8vlKsJUGK3BcdtM8w4Xq7BpSBwsloE='
|
||||||
|
|
||||||
|
# 客户端id
|
||||||
|
VITE_APP_CLIENT_ID = 'e5cd7e4891bf95d1d19206ce24a7b32e'
|
||||||
|
|
||||||
|
# websocket 开关 默认使用sse推送
|
||||||
|
VITE_APP_WEBSOCKET = false
|
||||||
|
|
||||||
|
# sse 开关
|
||||||
|
VITE_APP_SSE = true
|
312
.eslintrc-auto-import.json
Normal file
312
.eslintrc-auto-import.json
Normal file
@ -0,0 +1,312 @@
|
|||||||
|
{
|
||||||
|
"globals": {
|
||||||
|
"ComponentInternalInstance": true,
|
||||||
|
"TransferKey": true,
|
||||||
|
"ElFormRules": true,
|
||||||
|
"CheckboxValueType": true,
|
||||||
|
"PropType": true,
|
||||||
|
"DateModelType": true,
|
||||||
|
"UploadFile": true,
|
||||||
|
"ElFormInstance": true,
|
||||||
|
"ElTableInstance": true,
|
||||||
|
"ElTreeInstance": true,
|
||||||
|
"ElTreeSelectInstance": true,
|
||||||
|
"ElSelectInstance": true,
|
||||||
|
"ElUploadInstance": true,
|
||||||
|
"ElCardInstance": true,
|
||||||
|
"ElDialogInstance": true,
|
||||||
|
"ElInputInstance": true,
|
||||||
|
"ElInputNumberInstance": true,
|
||||||
|
"ElRadioInstance": true,
|
||||||
|
"ElRadioGroupInstance": true,
|
||||||
|
"ElRadioButtonInstance": true,
|
||||||
|
"ElCheckboxInstance": true,
|
||||||
|
"ElCheckboxGroupInstance": true,
|
||||||
|
"ElSwitchInstance": true,
|
||||||
|
"ElDatePickerInstance": true,
|
||||||
|
"ElTimePickerInstance": true,
|
||||||
|
"ElTimeSelectInstance": true,
|
||||||
|
"ElScrollbarInstance": true,
|
||||||
|
"ElCascaderInstance": true,
|
||||||
|
"ElColorPickerInstance": true,
|
||||||
|
"ElRateInstance": true,
|
||||||
|
"ElSliderInstance": true,
|
||||||
|
"useRouter": true,
|
||||||
|
"useRoute": true,
|
||||||
|
"EffectScope": true,
|
||||||
|
"ElTable": true,
|
||||||
|
"ElSelect": true,
|
||||||
|
"ElUpload": true,
|
||||||
|
"ElForm": true,
|
||||||
|
"ElTree": true,
|
||||||
|
"ElMessage": true,
|
||||||
|
"ElMessageBox": true,
|
||||||
|
"asyncComputed": true,
|
||||||
|
"autoResetRef": true,
|
||||||
|
"computed": true,
|
||||||
|
"computedAsync": true,
|
||||||
|
"computedEager": true,
|
||||||
|
"computedInject": true,
|
||||||
|
"computedWithControl": true,
|
||||||
|
"controlledComputed": true,
|
||||||
|
"controlledRef": true,
|
||||||
|
"createApp": true,
|
||||||
|
"createEventHook": true,
|
||||||
|
"createGlobalState": true,
|
||||||
|
"createInjectionState": true,
|
||||||
|
"createReactiveFn": true,
|
||||||
|
"createSharedComposable": true,
|
||||||
|
"createUnrefFn": true,
|
||||||
|
"customRef": true,
|
||||||
|
"debouncedRef": true,
|
||||||
|
"debouncedWatch": true,
|
||||||
|
"defineAsyncComponent": true,
|
||||||
|
"defineComponent": true,
|
||||||
|
"eagerComputed": true,
|
||||||
|
"effectScope": true,
|
||||||
|
"extendRef": true,
|
||||||
|
"getCurrentInstance": true,
|
||||||
|
"getCurrentScope": true,
|
||||||
|
"h": true,
|
||||||
|
"ignorableWatch": true,
|
||||||
|
"inject": true,
|
||||||
|
"isDefined": true,
|
||||||
|
"isProxy": true,
|
||||||
|
"isReactive": true,
|
||||||
|
"isReadonly": true,
|
||||||
|
"isRef": true,
|
||||||
|
"makeDestructurable": true,
|
||||||
|
"markRaw": true,
|
||||||
|
"nextTick": true,
|
||||||
|
"onActivated": true,
|
||||||
|
"onBeforeMount": true,
|
||||||
|
"onBeforeUnmount": true,
|
||||||
|
"onBeforeUpdate": true,
|
||||||
|
"onClickOutside": true,
|
||||||
|
"onDeactivated": true,
|
||||||
|
"onErrorCaptured": true,
|
||||||
|
"onKeyStroke": true,
|
||||||
|
"onLongPress": true,
|
||||||
|
"onMounted": true,
|
||||||
|
"onRenderTracked": true,
|
||||||
|
"onRenderTriggered": true,
|
||||||
|
"onScopeDispose": true,
|
||||||
|
"onServerPrefetch": true,
|
||||||
|
"onStartTyping": true,
|
||||||
|
"onUnmounted": true,
|
||||||
|
"onUpdated": true,
|
||||||
|
"pausableWatch": true,
|
||||||
|
"provide": true,
|
||||||
|
"reactify": true,
|
||||||
|
"reactifyObject": true,
|
||||||
|
"reactive": true,
|
||||||
|
"reactiveComputed": true,
|
||||||
|
"reactiveOmit": true,
|
||||||
|
"reactivePick": true,
|
||||||
|
"readonly": true,
|
||||||
|
"ref": true,
|
||||||
|
"refAutoReset": true,
|
||||||
|
"refDebounced": true,
|
||||||
|
"refDefault": true,
|
||||||
|
"refThrottled": true,
|
||||||
|
"refWithControl": true,
|
||||||
|
"resolveComponent": true,
|
||||||
|
"resolveDirective": true,
|
||||||
|
"resolveRef": true,
|
||||||
|
"resolveUnref": true,
|
||||||
|
"shallowReactive": true,
|
||||||
|
"shallowReadonly": true,
|
||||||
|
"shallowRef": true,
|
||||||
|
"syncRef": true,
|
||||||
|
"syncRefs": true,
|
||||||
|
"templateRef": true,
|
||||||
|
"throttledRef": true,
|
||||||
|
"throttledWatch": true,
|
||||||
|
"toRaw": true,
|
||||||
|
"toReactive": true,
|
||||||
|
"toRef": true,
|
||||||
|
"toRefs": true,
|
||||||
|
"triggerRef": true,
|
||||||
|
"tryOnBeforeMount": true,
|
||||||
|
"tryOnBeforeUnmount": true,
|
||||||
|
"tryOnMounted": true,
|
||||||
|
"tryOnScopeDispose": true,
|
||||||
|
"tryOnUnmounted": true,
|
||||||
|
"unref": true,
|
||||||
|
"unrefElement": true,
|
||||||
|
"until": true,
|
||||||
|
"useActiveElement": true,
|
||||||
|
"useArrayEvery": true,
|
||||||
|
"useArrayFilter": true,
|
||||||
|
"useArrayFind": true,
|
||||||
|
"useArrayFindIndex": true,
|
||||||
|
"useArrayFindLast": true,
|
||||||
|
"useArrayJoin": true,
|
||||||
|
"useArrayMap": true,
|
||||||
|
"useArrayReduce": true,
|
||||||
|
"useArraySome": true,
|
||||||
|
"useArrayUnique": true,
|
||||||
|
"useAsyncQueue": true,
|
||||||
|
"useAsyncState": true,
|
||||||
|
"useAttrs": true,
|
||||||
|
"useBase64": true,
|
||||||
|
"useBattery": true,
|
||||||
|
"useBluetooth": true,
|
||||||
|
"useBreakpoints": true,
|
||||||
|
"useBroadcastChannel": true,
|
||||||
|
"useBrowserLocation": true,
|
||||||
|
"useCached": true,
|
||||||
|
"useClipboard": true,
|
||||||
|
"useCloned": true,
|
||||||
|
"useColorMode": true,
|
||||||
|
"useConfirmDialog": true,
|
||||||
|
"useCounter": true,
|
||||||
|
"useCssModule": true,
|
||||||
|
"useCssVar": true,
|
||||||
|
"useCssVars": true,
|
||||||
|
"useCurrentElement": true,
|
||||||
|
"useCycleList": true,
|
||||||
|
"useDark": true,
|
||||||
|
"useDateFormat": true,
|
||||||
|
"useDebounce": true,
|
||||||
|
"useDebounceFn": true,
|
||||||
|
"useDebouncedRefHistory": true,
|
||||||
|
"useDeviceMotion": true,
|
||||||
|
"useDeviceOrientation": true,
|
||||||
|
"useDevicePixelRatio": true,
|
||||||
|
"useDevicesList": true,
|
||||||
|
"useDisplayMedia": true,
|
||||||
|
"useDocumentVisibility": true,
|
||||||
|
"useDraggable": true,
|
||||||
|
"useDropZone": true,
|
||||||
|
"useElementBounding": true,
|
||||||
|
"useElementByPoint": true,
|
||||||
|
"useElementHover": true,
|
||||||
|
"useElementSize": true,
|
||||||
|
"useElementVisibility": true,
|
||||||
|
"useEventBus": true,
|
||||||
|
"useEventListener": true,
|
||||||
|
"useEventSource": true,
|
||||||
|
"useEyeDropper": true,
|
||||||
|
"useFavicon": true,
|
||||||
|
"useFetch": true,
|
||||||
|
"useFileDialog": true,
|
||||||
|
"useFileSystemAccess": true,
|
||||||
|
"useFocus": true,
|
||||||
|
"useFocusWithin": true,
|
||||||
|
"useFps": true,
|
||||||
|
"useFullscreen": true,
|
||||||
|
"useGamepad": true,
|
||||||
|
"useGeolocation": true,
|
||||||
|
"useIdle": true,
|
||||||
|
"useImage": true,
|
||||||
|
"useInfiniteScroll": true,
|
||||||
|
"useIntersectionObserver": true,
|
||||||
|
"useInterval": true,
|
||||||
|
"useIntervalFn": true,
|
||||||
|
"useKeyModifier": true,
|
||||||
|
"useLastChanged": true,
|
||||||
|
"useLocalStorage": true,
|
||||||
|
"useMagicKeys": true,
|
||||||
|
"useManualRefHistory": true,
|
||||||
|
"useMediaControls": true,
|
||||||
|
"useMediaQuery": true,
|
||||||
|
"useMemoize": true,
|
||||||
|
"useMemory": true,
|
||||||
|
"useMounted": true,
|
||||||
|
"useMouse": true,
|
||||||
|
"useMouseInElement": true,
|
||||||
|
"useMousePressed": true,
|
||||||
|
"useMutationObserver": true,
|
||||||
|
"useNavigatorLanguage": true,
|
||||||
|
"useNetwork": true,
|
||||||
|
"useNow": true,
|
||||||
|
"useObjectUrl": true,
|
||||||
|
"useOffsetPagination": true,
|
||||||
|
"useOnline": true,
|
||||||
|
"usePageLeave": true,
|
||||||
|
"useParallax": true,
|
||||||
|
"usePermission": true,
|
||||||
|
"usePointer": true,
|
||||||
|
"usePointerLock": true,
|
||||||
|
"usePointerSwipe": true,
|
||||||
|
"usePreferredColorScheme": true,
|
||||||
|
"usePreferredContrast": true,
|
||||||
|
"usePreferredDark": true,
|
||||||
|
"usePreferredLanguages": true,
|
||||||
|
"usePreferredReducedMotion": true,
|
||||||
|
"usePrevious": true,
|
||||||
|
"useRafFn": true,
|
||||||
|
"useRefHistory": true,
|
||||||
|
"useResizeObserver": true,
|
||||||
|
"useScreenOrientation": true,
|
||||||
|
"useScreenSafeArea": true,
|
||||||
|
"useScriptTag": true,
|
||||||
|
"useScroll": true,
|
||||||
|
"useScrollLock": true,
|
||||||
|
"useSessionStorage": true,
|
||||||
|
"useShare": true,
|
||||||
|
"useSlots": true,
|
||||||
|
"useSorted": true,
|
||||||
|
"useSpeechRecognition": true,
|
||||||
|
"useSpeechSynthesis": true,
|
||||||
|
"useStepper": true,
|
||||||
|
"useStorage": true,
|
||||||
|
"useStorageAsync": true,
|
||||||
|
"useStyleTag": true,
|
||||||
|
"useSupported": true,
|
||||||
|
"useSwipe": true,
|
||||||
|
"useTemplateRefsList": true,
|
||||||
|
"useTextDirection": true,
|
||||||
|
"useTextSelection": true,
|
||||||
|
"useTextareaAutosize": true,
|
||||||
|
"useThrottle": true,
|
||||||
|
"useThrottleFn": true,
|
||||||
|
"useThrottledRefHistory": true,
|
||||||
|
"useTimeAgo": true,
|
||||||
|
"useTimeout": true,
|
||||||
|
"useTimeoutFn": true,
|
||||||
|
"useTimeoutPoll": true,
|
||||||
|
"useTimestamp": true,
|
||||||
|
"useTitle": true,
|
||||||
|
"useToNumber": true,
|
||||||
|
"useToString": true,
|
||||||
|
"useToggle": true,
|
||||||
|
"useTransition": true,
|
||||||
|
"useUrlSearchParams": true,
|
||||||
|
"useUserMedia": true,
|
||||||
|
"useVModel": true,
|
||||||
|
"useVModels": true,
|
||||||
|
"useVibrate": true,
|
||||||
|
"useVirtualList": true,
|
||||||
|
"useWakeLock": true,
|
||||||
|
"useWebNotification": true,
|
||||||
|
"useWebSocket": true,
|
||||||
|
"useWebWorker": true,
|
||||||
|
"useWebWorkerFn": true,
|
||||||
|
"useWindowFocus": true,
|
||||||
|
"useWindowScroll": true,
|
||||||
|
"useWindowSize": true,
|
||||||
|
"watch": true,
|
||||||
|
"watchArray": true,
|
||||||
|
"watchAtMost": true,
|
||||||
|
"watchDebounced": true,
|
||||||
|
"watchEffect": true,
|
||||||
|
"watchIgnorable": true,
|
||||||
|
"watchOnce": true,
|
||||||
|
"watchPausable": true,
|
||||||
|
"watchPostEffect": true,
|
||||||
|
"watchSyncEffect": true,
|
||||||
|
"watchThrottled": true,
|
||||||
|
"watchTriggerable": true,
|
||||||
|
"watchWithFilter": true,
|
||||||
|
"whenever": true,
|
||||||
|
"ImportOption": true,
|
||||||
|
"TreeType": true,
|
||||||
|
"FieldOption": true,
|
||||||
|
"PageData": true,
|
||||||
|
"storeToRefs": true,
|
||||||
|
"DictDataOption": true,
|
||||||
|
"UploadOption": true
|
||||||
|
}
|
||||||
|
}
|
29
.gitignore
vendored
Normal file
29
.gitignore
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
.DS_Store
|
||||||
|
.history
|
||||||
|
node_modules/
|
||||||
|
dist/
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
**/*.log
|
||||||
|
|
||||||
|
tests/**/coverage/
|
||||||
|
tests/e2e/reports
|
||||||
|
selenium-debug.log
|
||||||
|
|
||||||
|
# Editor directories and files
|
||||||
|
.idea
|
||||||
|
.vscode
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
|
*.local
|
||||||
|
|
||||||
|
package-lock.json
|
||||||
|
yarn.lock
|
||||||
|
pnpm-lock.yaml
|
||||||
|
|
||||||
|
# 编译生成的文件
|
||||||
|
auto-imports.d.ts
|
||||||
|
components.d.ts
|
9
.prettierignore
Normal file
9
.prettierignore
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
/dist/*
|
||||||
|
.local
|
||||||
|
.output.js
|
||||||
|
/node_modules/**
|
||||||
|
|
||||||
|
**/*.svg
|
||||||
|
**/*.sh
|
||||||
|
|
||||||
|
/public/*
|
20
.prettierrc
Normal file
20
.prettierrc
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"printWidth": 150,
|
||||||
|
"tabWidth": 2,
|
||||||
|
"useTabs": false,
|
||||||
|
"semi": true,
|
||||||
|
"singleQuote": true,
|
||||||
|
"quoteProps": "preserve",
|
||||||
|
"jsxSingleQuote": false,
|
||||||
|
"bracketSameLine": false,
|
||||||
|
"trailingComma": "none",
|
||||||
|
"bracketSpacing": true,
|
||||||
|
"embeddedLanguageFormatting": "auto",
|
||||||
|
"arrowParens": "always",
|
||||||
|
"requirePragma": false,
|
||||||
|
"insertPragma": false,
|
||||||
|
"proseWrap": "preserve",
|
||||||
|
"htmlWhitespaceSensitivity": "css",
|
||||||
|
"vueIndentScriptAndStyle": false,
|
||||||
|
"endOfLine": "auto"
|
||||||
|
}
|
20
LICENSE
Normal file
20
LICENSE
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2019 RuoYi-Vue-Plus
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
the Software without restriction, including without limitation the rights to
|
||||||
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
76
README.md
Normal file
76
README.md
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
## 平台简介
|
||||||
|
|
||||||
|
- 本仓库为前端技术栈 [Vue3](https://v3.cn.vuejs.org) + [TS](https://www.typescriptlang.org/) + [Element Plus](https://element-plus.org/zh-CN) + [Vite](https://cn.vitejs.dev) 版本。
|
||||||
|
- 成员项目: 基于 vben5(ant-design-vue) 的前端项目 [ruoyi-plus-vben5](https://gitee.com/dapppp/ruoyi-plus-vben5)
|
||||||
|
- 配套后端代码仓库地址
|
||||||
|
- [RuoYi-Vue-Plus 5.X(注意版本号)](https://gitee.com/dromara/RuoYi-Vue-Plus)
|
||||||
|
- [RuoYi-Cloud-Plus 2.X(注意版本号)](https://gitee.com/dromara/RuoYi-Cloud-Plus)
|
||||||
|
|
||||||
|
## 前端运行
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 克隆项目
|
||||||
|
git clone https://gitee.com/JavaLionLi/plus-ui.git
|
||||||
|
|
||||||
|
# 安装依赖
|
||||||
|
npm install --registry=https://registry.npmmirror.com
|
||||||
|
|
||||||
|
# 启动服务
|
||||||
|
npm run dev
|
||||||
|
|
||||||
|
# 构建生产环境
|
||||||
|
npm run build:prod
|
||||||
|
|
||||||
|
# 前端访问地址 http://localhost:80
|
||||||
|
```
|
||||||
|
|
||||||
|
## 本框架与RuoYi的业务差异
|
||||||
|
|
||||||
|
| 业务 | 功能说明 | 本框架 | RuoYi |
|
||||||
|
| ------------ | ------------------------------------------------------------- | ------ | ----------------------------- |
|
||||||
|
| 租户管理 | 系统内租户的管理 如:租户套餐、过期时间、用户数量、企业信息等 | 支持 | 无 |
|
||||||
|
| 租户套餐管理 | 系统内租户所能使用的套餐管理 如:套餐内所包含的菜单等 | 支持 | 无 |
|
||||||
|
| 用户管理 | 用户的管理配置 如:新增用户、分配用户所属部门、角色、岗位等 | 支持 | 支持 |
|
||||||
|
| 部门管理 | 配置系统组织机构(公司、部门、小组) 树结构展现支持数据权限 | 支持 | 支持 |
|
||||||
|
| 岗位管理 | 配置系统用户所属担任职务 | 支持 | 支持 |
|
||||||
|
| 菜单管理 | 配置系统菜单、操作权限、按钮权限标识等 | 支持 | 支持 |
|
||||||
|
| 角色管理 | 角色菜单权限分配、设置角色按机构进行数据范围权限划分 | 支持 | 支持 |
|
||||||
|
| 字典管理 | 对系统中经常使用的一些较为固定的数据进行维护 | 支持 | 支持 |
|
||||||
|
| 参数管理 | 对系统动态配置常用参数 | 支持 | 支持 |
|
||||||
|
| 通知公告 | 系统通知公告信息发布维护 | 支持 | 支持 |
|
||||||
|
| 操作日志 | 系统正常操作日志记录和查询 系统异常信息日志记录和查询 | 支持 | 支持 |
|
||||||
|
| 登录日志 | 系统登录日志记录查询包含登录异常 | 支持 | 支持 |
|
||||||
|
| 文件管理 | 系统文件展示、上传、下载、删除等管理 | 支持 | 无 |
|
||||||
|
| 文件配置管理 | 系统文件上传、下载所需要的配置信息动态添加、修改、删除等管理 | 支持 | 无 |
|
||||||
|
| 在线用户管理 | 已登录系统的在线用户信息监控与强制踢出操作 | 支持 | 支持 |
|
||||||
|
| 定时任务 | 运行报表、任务管理(添加、修改、删除)、日志管理、执行器管理等 | 支持 | 仅支持任务与日志管理 |
|
||||||
|
| 代码生成 | 多数据源前后端代码的生成(java、html、xml、sql)支持CRUD下载 | 支持 | 仅支持单数据源 |
|
||||||
|
| 系统接口 | 根据业务代码自动生成相关的api接口文档 | 支持 | 支持 |
|
||||||
|
| 服务监控 | 监视集群系统CPU、内存、磁盘、堆栈、在线日志、Spring相关配置等 | 支持 | 仅支持单机CPU、内存、磁盘监控 |
|
||||||
|
| 缓存监控 | 对系统的缓存信息查询,命令统计等。 | 支持 | 支持 |
|
||||||
|
| 在线构建器 | 拖动表单元素生成相应的HTML代码。 | 支持 | 支持 |
|
||||||
|
| 使用案例 | 系统的一些功能案例 | 支持 | 不支持 |
|
||||||
|
|
||||||
|
## 演示图例
|
||||||
|
|
||||||
|
| | |
|
||||||
|
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
|
||||||
|
|  |  |
|
||||||
|
|  |  |
|
||||||
|
|  |  |
|
||||||
|
|  |  |
|
||||||
|
|  |  |
|
||||||
|
|  |  |
|
||||||
|
|  |  |
|
||||||
|
|  |  |
|
||||||
|
|  |  |
|
||||||
|
|  |  |
|
||||||
|
|  |  |
|
||||||
|
|  |  |
|
||||||
|
|  |  |
|
||||||
|
|  |  |
|
||||||
|
|  |  |
|
||||||
|
|  |  |
|
||||||
|
|  |  |
|
||||||
|
|  |  |
|
||||||
|
|  |  |
|
12
bin/build.bat
Normal file
12
bin/build.bat
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
@echo off
|
||||||
|
echo.
|
||||||
|
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD>Web<65><62><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD>dist<73>ļ<EFBFBD><C4BC><EFBFBD>
|
||||||
|
echo.
|
||||||
|
|
||||||
|
%~d0
|
||||||
|
cd %~dp0
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
yarn build:prod
|
||||||
|
|
||||||
|
pause
|
12
bin/package.bat
Normal file
12
bin/package.bat
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
@echo off
|
||||||
|
echo.
|
||||||
|
echo [<5B><>Ϣ] <20><>װWeb<65><62><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD>node_modules<65>ļ<EFBFBD><C4BC><EFBFBD>
|
||||||
|
echo.
|
||||||
|
|
||||||
|
%~d0
|
||||||
|
cd %~dp0
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
yarn --registry=https://registry.npmmirror.com
|
||||||
|
|
||||||
|
pause
|
12
bin/run-web.bat
Normal file
12
bin/run-web.bat
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
@echo off
|
||||||
|
echo.
|
||||||
|
echo [<5B><>Ϣ] ʹ<><CAB9> Vite <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Web <20><><EFBFBD>̡<EFBFBD>
|
||||||
|
echo.
|
||||||
|
|
||||||
|
%~d0
|
||||||
|
cd %~dp0
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
yarn dev
|
||||||
|
|
||||||
|
pause
|
86
eslint.config.js
Normal file
86
eslint.config.js
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
import globals from 'globals';
|
||||||
|
import pluginJs from '@eslint/js';
|
||||||
|
import tseslint from 'typescript-eslint';
|
||||||
|
import pluginVue from 'eslint-plugin-vue';
|
||||||
|
import { readFile } from 'node:fs/promises';
|
||||||
|
import prettier from 'eslint-plugin-prettier';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* https://blog.csdn.net/sayUonly/article/details/123482912
|
||||||
|
* 自动导入的配置
|
||||||
|
*/
|
||||||
|
const autoImportFile = new URL('./.eslintrc-auto-import.json', import.meta.url);
|
||||||
|
const autoImportGlobals = JSON.parse(await readFile(autoImportFile, 'utf8'));
|
||||||
|
|
||||||
|
/** @type {import('eslint').Linter.Config[]} */
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 不需要.eslintignore文件 而是在这里配置
|
||||||
|
*/
|
||||||
|
ignores: [
|
||||||
|
'*.sh',
|
||||||
|
'node_modules',
|
||||||
|
'*.md',
|
||||||
|
'*.woff',
|
||||||
|
'*.ttf',
|
||||||
|
'.vscode',
|
||||||
|
'.idea',
|
||||||
|
'dist',
|
||||||
|
'/public',
|
||||||
|
'/docs',
|
||||||
|
'.husky',
|
||||||
|
'.local',
|
||||||
|
'/bin',
|
||||||
|
'.eslintrc.cjs',
|
||||||
|
'prettier.config.js',
|
||||||
|
'src/assets',
|
||||||
|
'tailwind.config.js'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{ files: ['**/*.{js,mjs,cjs,ts,vue}'] },
|
||||||
|
{
|
||||||
|
languageOptions: {
|
||||||
|
globals: globals.browser
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pluginJs.configs.recommended,
|
||||||
|
...tseslint.configs.recommended,
|
||||||
|
...pluginVue.configs['flat/essential'],
|
||||||
|
{
|
||||||
|
files: ['**/*.vue'],
|
||||||
|
languageOptions: {
|
||||||
|
parserOptions: {
|
||||||
|
parser: tseslint.parser
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
languageOptions: {
|
||||||
|
globals: {
|
||||||
|
// 自动导入的配置 undef
|
||||||
|
...autoImportGlobals.globals,
|
||||||
|
DialogOption: 'readonly',
|
||||||
|
LayoutSetting: 'readonly'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
plugins: { prettier },
|
||||||
|
rules: {
|
||||||
|
'@typescript-eslint/no-empty-function': 'off',
|
||||||
|
'@typescript-eslint/no-explicit-any': 'off',
|
||||||
|
'@typescript-eslint/no-unused-vars': 'off',
|
||||||
|
'@typescript-eslint/no-this-alias': 'off',
|
||||||
|
|
||||||
|
// vue
|
||||||
|
'vue/multi-word-component-names': 'off',
|
||||||
|
'vue/valid-define-props': 'off',
|
||||||
|
'vue/no-v-model-argument': 'off',
|
||||||
|
'prefer-rest-params': 'off',
|
||||||
|
// prettier
|
||||||
|
'prettier/prettier': 'error',
|
||||||
|
// 允许使用空Object类型 {}
|
||||||
|
'@typescript-eslint/no-empty-object-type': 'off',
|
||||||
|
'@typescript-eslint/no-unused-expressions': 'off'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
242
html/ie.html
Normal file
242
html/ie.html
Normal file
File diff suppressed because one or more lines are too long
216
index.html
Normal file
216
index.html
Normal file
@ -0,0 +1,216 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||||
|
<meta name="renderer" content="webkit" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0" />
|
||||||
|
<link rel="icon" href="/favicon.ico" />
|
||||||
|
<title>新能源项目管理平台</title>
|
||||||
|
<!--[if lt IE 11
|
||||||
|
]><script>
|
||||||
|
window.location.href = '/html/ie.html';
|
||||||
|
</script><!
|
||||||
|
[endif]-->
|
||||||
|
<style>
|
||||||
|
html,
|
||||||
|
body,
|
||||||
|
#app {
|
||||||
|
height: 100%;
|
||||||
|
margin: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chromeframe {
|
||||||
|
margin: 0.2em 0;
|
||||||
|
background: #ccc;
|
||||||
|
color: #000;
|
||||||
|
padding: 0.2em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#loader-wrapper {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
z-index: 999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
#loader {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
left: 50%;
|
||||||
|
top: 50%;
|
||||||
|
width: 150px;
|
||||||
|
height: 150px;
|
||||||
|
margin: -75px 0 0 -75px;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 3px solid transparent;
|
||||||
|
border-top-color: #fff;
|
||||||
|
-webkit-animation: spin 2s linear infinite;
|
||||||
|
-ms-animation: spin 2s linear infinite;
|
||||||
|
-moz-animation: spin 2s linear infinite;
|
||||||
|
-o-animation: spin 2s linear infinite;
|
||||||
|
animation: spin 2s linear infinite;
|
||||||
|
z-index: 1001;
|
||||||
|
}
|
||||||
|
|
||||||
|
#loader:before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 5px;
|
||||||
|
left: 5px;
|
||||||
|
right: 5px;
|
||||||
|
bottom: 5px;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 3px solid transparent;
|
||||||
|
border-top-color: #fff;
|
||||||
|
-webkit-animation: spin 3s linear infinite;
|
||||||
|
-moz-animation: spin 3s linear infinite;
|
||||||
|
-o-animation: spin 3s linear infinite;
|
||||||
|
-ms-animation: spin 3s linear infinite;
|
||||||
|
animation: spin 3s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
#loader:after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 15px;
|
||||||
|
left: 15px;
|
||||||
|
right: 15px;
|
||||||
|
bottom: 15px;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 3px solid transparent;
|
||||||
|
border-top-color: #fff;
|
||||||
|
-moz-animation: spin 1.5s linear infinite;
|
||||||
|
-o-animation: spin 1.5s linear infinite;
|
||||||
|
-ms-animation: spin 1.5s linear infinite;
|
||||||
|
-webkit-animation: spin 1.5s linear infinite;
|
||||||
|
animation: spin 1.5s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes spin {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: rotate(0deg);
|
||||||
|
-ms-transform: rotate(0deg);
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
-webkit-transform: rotate(360deg);
|
||||||
|
-ms-transform: rotate(360deg);
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes spin {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: rotate(0deg);
|
||||||
|
-ms-transform: rotate(0deg);
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
-webkit-transform: rotate(360deg);
|
||||||
|
-ms-transform: rotate(360deg);
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#loader-wrapper .loader-section {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
width: 51%;
|
||||||
|
height: 100%;
|
||||||
|
background: #7171c6;
|
||||||
|
z-index: 1000;
|
||||||
|
-webkit-transform: translateX(0);
|
||||||
|
-ms-transform: translateX(0);
|
||||||
|
transform: translateX(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
#loader-wrapper .loader-section.section-left {
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#loader-wrapper .loader-section.section-right {
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loaded #loader-wrapper .loader-section.section-left {
|
||||||
|
-webkit-transform: translateX(-100%);
|
||||||
|
-ms-transform: translateX(-100%);
|
||||||
|
transform: translateX(-100%);
|
||||||
|
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||||
|
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.loaded #loader-wrapper .loader-section.section-right {
|
||||||
|
-webkit-transform: translateX(100%);
|
||||||
|
-ms-transform: translateX(100%);
|
||||||
|
transform: translateX(100%);
|
||||||
|
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||||
|
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.loaded #loader {
|
||||||
|
opacity: 0;
|
||||||
|
-webkit-transition: all 0.3s ease-out;
|
||||||
|
transition: all 0.3s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loaded #loader-wrapper {
|
||||||
|
visibility: hidden;
|
||||||
|
-webkit-transform: translateY(-100%);
|
||||||
|
-ms-transform: translateY(-100%);
|
||||||
|
transform: translateY(-100%);
|
||||||
|
-webkit-transition: all 0.3s 1s ease-out;
|
||||||
|
transition: all 0.3s 1s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-js #loader-wrapper {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-js h1 {
|
||||||
|
color: #222222;
|
||||||
|
}
|
||||||
|
|
||||||
|
#loader-wrapper .load_title {
|
||||||
|
font-family: 'Open Sans';
|
||||||
|
color: #fff;
|
||||||
|
font-size: 19px;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
z-index: 9999999999999;
|
||||||
|
position: absolute;
|
||||||
|
top: 60%;
|
||||||
|
opacity: 1;
|
||||||
|
line-height: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#loader-wrapper .load_title span {
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: italic;
|
||||||
|
font-size: 13px;
|
||||||
|
color: #fff;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div id="app">
|
||||||
|
<div id="loader-wrapper">
|
||||||
|
<div id="loader"></div>
|
||||||
|
<div class="loader-section section-left"></div>
|
||||||
|
<div class="loader-section section-right"></div>
|
||||||
|
<div class="load_title">正在加载系统资源,请耐心等待</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="./src/assets/sdk/YJEarth.min.js"></script>
|
||||||
|
<script src="./src/utils/reconnecting-websocket.js"></script>
|
||||||
|
<script type="module" src="/src/main.ts"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
100
package.json
Normal file
100
package.json
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json.schemastore.org/tsconfig",
|
||||||
|
"name": "ruoyi-vue-plus",
|
||||||
|
"version": "5.3.0",
|
||||||
|
"description": "RuoYi-Vue-Plus多租户管理系统",
|
||||||
|
"author": "LionLi",
|
||||||
|
"license": "MIT",
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "vite serve --mode development",
|
||||||
|
"build:prod": "vite build --mode production",
|
||||||
|
"build:dev": "vite build --mode development",
|
||||||
|
"preview": "vite preview",
|
||||||
|
"lint:eslint": "eslint",
|
||||||
|
"lint:eslint:fix": "eslint --fix",
|
||||||
|
"prettier": "prettier --write ."
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://gitee.com/JavaLionLi/plus-ui.git"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@element-plus/icons-vue": "2.3.1",
|
||||||
|
"@highlightjs/vue-plugin": "2.1.0",
|
||||||
|
"@turf/turf": "^7.2.0",
|
||||||
|
"@vueup/vue-quill": "1.2.0",
|
||||||
|
"@vueuse/core": "11.3.0",
|
||||||
|
"animate.css": "4.1.1",
|
||||||
|
"await-to-js": "3.0.0",
|
||||||
|
"axios": "1.7.8",
|
||||||
|
"crypto-js": "4.2.0",
|
||||||
|
"diagram-js": "12.3.0",
|
||||||
|
"didi": "9.0.2",
|
||||||
|
"echarts": "5.5.0",
|
||||||
|
"element-plus": "2.8.8",
|
||||||
|
"esbuild": "^0.25.0",
|
||||||
|
"file-saver": "2.0.5",
|
||||||
|
"fuse.js": "7.0.0",
|
||||||
|
"highlight.js": "11.9.0",
|
||||||
|
"image-conversion": "2.1.1",
|
||||||
|
"js-cookie": "3.0.5",
|
||||||
|
"js-md5": "^0.8.3",
|
||||||
|
"jsencrypt": "3.3.2",
|
||||||
|
"jszip": "^3.10.1",
|
||||||
|
"lodash": "^4.17.21",
|
||||||
|
"md5": "^2.3.0",
|
||||||
|
"mitt": "^3.0.1",
|
||||||
|
"nprogress": "0.2.0",
|
||||||
|
"ol": "^10.5.0",
|
||||||
|
"pinia": "2.2.6",
|
||||||
|
"screenfull": "6.0.2",
|
||||||
|
"spark-md5": "^3.0.2",
|
||||||
|
"vue": "3.5.13",
|
||||||
|
"vue-cropper": "1.1.1",
|
||||||
|
"vue-i18n": "10.0.5",
|
||||||
|
"vue-json-pretty": "2.4.0",
|
||||||
|
"vue-print-nb": "^1.7.5",
|
||||||
|
"vue-router": "4.4.5",
|
||||||
|
"vue-types": "5.1.3",
|
||||||
|
"vue3-print-nb": "^0.1.4",
|
||||||
|
"vue3-scroll-seamless": "^1.0.6",
|
||||||
|
"vxe-table": "4.5.22"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@eslint/js": "9.15.0",
|
||||||
|
"@iconify/json": "2.2.276",
|
||||||
|
"@types/crypto-js": "4.2.2",
|
||||||
|
"@types/file-saver": "2.0.7",
|
||||||
|
"@types/js-cookie": "3.0.6",
|
||||||
|
"@types/node": "18.18.2",
|
||||||
|
"@types/nprogress": "0.2.3",
|
||||||
|
"@unocss/preset-attributify": "0.64.1",
|
||||||
|
"@unocss/preset-icons": "0.64.1",
|
||||||
|
"@unocss/preset-uno": "0.64.1",
|
||||||
|
"@vitejs/plugin-vue": "5.0.4",
|
||||||
|
"@vue/compiler-sfc": "3.4.23",
|
||||||
|
"autoprefixer": "10.4.18",
|
||||||
|
"eslint": "9.15.0",
|
||||||
|
"eslint-plugin-prettier": "^5.2.1",
|
||||||
|
"eslint-plugin-vue": "9.31.0",
|
||||||
|
"fast-glob": "3.3.2",
|
||||||
|
"globals": "15.12.0",
|
||||||
|
"postcss": "8.4.36",
|
||||||
|
"postcss-px-to-viewport": "^1.1.1",
|
||||||
|
"prettier": "3.2.5",
|
||||||
|
"sass": "1.72.0",
|
||||||
|
"typescript": "5.7.2",
|
||||||
|
"typescript-eslint": "8.16.0",
|
||||||
|
"unocss": "0.64.1",
|
||||||
|
"unplugin-auto-import": "0.17.5",
|
||||||
|
"unplugin-icons": "0.18.5",
|
||||||
|
"unplugin-vue-components": "0.26.0",
|
||||||
|
"unplugin-vue-setup-extend-plus": "1.0.1",
|
||||||
|
"vite": "5.4.11",
|
||||||
|
"vite-plugin-compression": "0.5.1",
|
||||||
|
"vite-plugin-svg-icons": "2.0.1",
|
||||||
|
"vitest": "1.5.0",
|
||||||
|
"vue-tsc": "2.0.13"
|
||||||
|
}
|
||||||
|
}
|
BIN
public/favicon.ico
Normal file
BIN
public/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.9 KiB |
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;
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user