@ -0,0 +1,12 @@ |
||||
root = true |
||||
[*.{js,ts,vue}] |
||||
charset = utf-8 # 设置文件字符集为 utf-8 |
||||
end_of_line = lf # 控制换行类型(lf | cr | crlf) |
||||
insert_final_newline = true # 始终在文件末尾插入一个新行 |
||||
indent_style = space # 缩进风格(tab | space) |
||||
indent_size = 2 # 缩进大小 |
||||
max_line_length = 120 # 最大行长度 |
||||
|
||||
[*.md] # 仅 md 文件适用以下规则 |
||||
max_line_length = off # 关闭最大行长度限制 |
||||
trim_trailing_whitespace = false # 关闭末尾空格修剪 |
@ -0,0 +1,20 @@ |
||||
# 标题 |
||||
VITE_APP_TITLE=OA系统 |
||||
|
||||
# 开发环境 |
||||
VITE_NODE_ENV=development |
||||
|
||||
# 项目本地运行端口号 |
||||
VITE_PORT=8000 |
||||
|
||||
# open 运行 npm run dev 时自动打开浏览器 |
||||
VITE_OPEN=true |
||||
|
||||
# 租户开关 |
||||
VITE_APP_TENANT_ENABLE=false |
||||
|
||||
# 验证码的开关 |
||||
VITE_APP_CAPTCHA_ENABLE=true |
||||
|
||||
# 百度统计 |
||||
VITE_APP_BAIDU_CODE = a1ff8825baa73c3a78eb96aa40325abc |
@ -0,0 +1,21 @@ |
||||
# 本地开发环境 |
||||
VITE_NODE_ENV=development |
||||
|
||||
VITE_DEV=true |
||||
|
||||
# 请求路径 |
||||
VITE_BASE_URL='http://118.31.23.45:48080' |
||||
# VITE_BASE_URL='http://114.55.169.15:48080' |
||||
|
||||
# 上传路径 |
||||
VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload' |
||||
# VITE_UPLOAD_URL='http://114.55.169.15:48080/admin-api/system/file/upload' |
||||
|
||||
# 接口前缀 |
||||
VITE_API_BASEPATH=/crm-api |
||||
|
||||
# 接口地址 |
||||
VITE_API_URL=/admin-api |
||||
|
||||
# 打包路径 |
||||
VITE_BASE_PATH=/oa/ |
@ -0,0 +1,31 @@ |
||||
# 开发环境 |
||||
VITE_NODE_ENV=production |
||||
|
||||
VITE_DEV=false |
||||
|
||||
# 请求路径 |
||||
VITE_BASE_URL='http://localhost:48080' |
||||
|
||||
# 上传路径 |
||||
VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload' |
||||
|
||||
# 接口前缀 |
||||
VITE_API_BASEPATH=/crm-api |
||||
|
||||
# 接口地址 |
||||
VITE_API_URL=/admin-api |
||||
|
||||
# 打包路径 |
||||
VITE_BASE_PATH=/oa/ |
||||
|
||||
# 是否删除debugger |
||||
VITE_DROP_DEBUGGER=false |
||||
|
||||
# 是否删除console.log |
||||
VITE_DROP_CONSOLE=false |
||||
|
||||
# 是否sourcemap |
||||
VITE_SOURCEMAP=true |
||||
|
||||
# 输出路径 |
||||
VITE_OUT_DIR=dist-dev |
@ -0,0 +1,34 @@ |
||||
# 本地开发环境 |
||||
VITE_NODE_ENV=development |
||||
|
||||
VITE_DEV=true |
||||
|
||||
# 请求路径 |
||||
VITE_BASE_URL='http://118.31.23.45:48080' |
||||
|
||||
# 上传路径 |
||||
VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload' |
||||
|
||||
# 接口前缀 |
||||
VITE_API_BASEPATH=/crm-api |
||||
|
||||
# 接口地址 |
||||
VITE_API_URL=/admin-api |
||||
|
||||
# 打包路径 |
||||
VITE_BASE_PATH=/oa/ |
||||
|
||||
# 项目本地运行端口号, 与.vscode/launch.json配合 |
||||
VITE_PORT=80 |
||||
|
||||
# 是否删除debugger |
||||
VITE_DROP_DEBUGGER=false |
||||
|
||||
# 是否删除console.log |
||||
VITE_DROP_CONSOLE=false |
||||
|
||||
# 是否sourcemap |
||||
VITE_SOURCEMAP=true |
||||
|
||||
# 验证码的开关 |
||||
VITE_APP_CAPTCHA_ENABLE=false |
@ -0,0 +1,31 @@ |
||||
# 生产环境 |
||||
VITE_NODE_ENV=production |
||||
|
||||
VITE_DEV=false |
||||
|
||||
# 请求路径 |
||||
VITE_BASE_URL='/crm-api' |
||||
|
||||
# 上传路径 |
||||
VITE_UPLOAD_URL='/crm-api/admin-api/system/file/upload' |
||||
|
||||
# 接口前缀 |
||||
VITE_API_BASEPATH=/crm-api |
||||
|
||||
# 接口地址 |
||||
VITE_API_URL=/admin-api |
||||
|
||||
# 是否删除debugger |
||||
VITE_DROP_DEBUGGER=true |
||||
|
||||
# 是否删除console.log |
||||
VITE_DROP_CONSOLE=true |
||||
|
||||
# 是否sourcemap |
||||
VITE_SOURCEMAP=false |
||||
|
||||
# 打包路径 |
||||
VITE_BASE_PATH=/oa/ |
||||
|
||||
# 输出路径 |
||||
VITE_OUT_DIR=dist-pro |
@ -0,0 +1,31 @@ |
||||
# 生产环境 |
||||
VITE_NODE_ENV=production |
||||
|
||||
VITE_DEV=false |
||||
|
||||
# 请求路径 |
||||
VITE_BASE_URL='http://api-dashboard.yudao.iocoder.cn' |
||||
|
||||
# 上传路径 |
||||
VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload' |
||||
|
||||
# 接口前缀 |
||||
VITE_API_BASEPATH=/crm-api |
||||
|
||||
# 接口地址 |
||||
VITE_API_URL=/admin-api |
||||
|
||||
# 是否删除debugger |
||||
VITE_DROP_DEBUGGER=true |
||||
|
||||
# 是否删除console.log |
||||
VITE_DROP_CONSOLE=true |
||||
|
||||
# 是否sourcemap |
||||
VITE_SOURCEMAP=false |
||||
|
||||
# 打包路径 |
||||
VITE_BASE_PATH='/oa/' |
||||
|
||||
# 输出路径 |
||||
VITE_OUT_DIR=dist-stage |
@ -0,0 +1,31 @@ |
||||
# 开发环境 |
||||
VITE_NODE_ENV=production |
||||
|
||||
VITE_DEV=false |
||||
|
||||
# 请求路径 |
||||
VITE_BASE_URL='http://localhost:48080' |
||||
|
||||
# 上传路径 |
||||
VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload' |
||||
|
||||
# 接口前缀 |
||||
VITE_API_BASEPATH=/crm-api |
||||
|
||||
# 接口地址 |
||||
VITE_API_URL=/admin-api |
||||
|
||||
# 是否删除debugger |
||||
VITE_DROP_DEBUGGER=true |
||||
|
||||
# 是否删除console.log |
||||
VITE_DROP_CONSOLE=true |
||||
|
||||
# 是否sourcemap |
||||
VITE_SOURCEMAP=false |
||||
|
||||
# 打包路径 |
||||
VITE_BASE_PATH=/oa/ |
||||
|
||||
# 输出路径 |
||||
VITE_OUT_DIR=dist-dev |
@ -0,0 +1,31 @@ |
||||
# 测试环境 |
||||
VITE_NODE_ENV=production |
||||
|
||||
VITE_DEV=false |
||||
|
||||
# 请求路径 |
||||
VITE_BASE_URL='http://localhost:48080' |
||||
|
||||
# 上传路径 |
||||
VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload' |
||||
|
||||
# 接口前缀 |
||||
VITE_API_BASEPATH=/crm-api |
||||
|
||||
# 接口地址 |
||||
VITE_API_URL=/admin-api |
||||
|
||||
# 是否删除debugger |
||||
VITE_DROP_DEBUGGER=false |
||||
|
||||
# 是否删除console.log |
||||
VITE_DROP_CONSOLE=false |
||||
|
||||
# 是否sourcemap |
||||
VITE_SOURCEMAP=true |
||||
|
||||
# 打包路径 |
||||
VITE_BASE_PATH=/oa/ |
||||
|
||||
# 输出路径 |
||||
VITE_OUT_DIR=dist-test |
@ -0,0 +1,8 @@ |
||||
/build/ |
||||
/config/ |
||||
/dist/ |
||||
/*.js |
||||
/test/unit/coverage/ |
||||
/node_modules/* |
||||
/dist* |
||||
/src/main.ts |
@ -0,0 +1,259 @@ |
||||
{ |
||||
"globals": { |
||||
"EffectScope": true, |
||||
"ElMessage": true, |
||||
"ElMessageBox": true, |
||||
"ElTag": 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, |
||||
"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, |
||||
"useArrayJoin": true, |
||||
"useArrayMap": true, |
||||
"useArrayReduce": true, |
||||
"useArraySome": true, |
||||
"useAsyncQueue": true, |
||||
"useAsyncState": true, |
||||
"useAttrs": true, |
||||
"useBase64": true, |
||||
"useBattery": true, |
||||
"useBluetooth": true, |
||||
"useBreakpoints": true, |
||||
"useBroadcastChannel": true, |
||||
"useBrowserLocation": true, |
||||
"useCached": true, |
||||
"useClipboard": 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, |
||||
"usePointerSwipe": true, |
||||
"usePreferredColorScheme": true, |
||||
"usePreferredDark": true, |
||||
"usePreferredLanguages": true, |
||||
"useRafFn": true, |
||||
"useRefHistory": true, |
||||
"useResizeObserver": true, |
||||
"useRoute": true, |
||||
"useRouter": true, |
||||
"useScreenOrientation": true, |
||||
"useScreenSafeArea": true, |
||||
"useScriptTag": true, |
||||
"useScroll": true, |
||||
"useScrollLock": true, |
||||
"useSessionStorage": true, |
||||
"useShare": true, |
||||
"useSlots": 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, |
||||
"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 |
||||
} |
||||
} |
@ -0,0 +1,69 @@ |
||||
// @ts-check
|
||||
const { defineConfig } = require('eslint-define-config') |
||||
module.exports = defineConfig({ |
||||
root: true, |
||||
env: { |
||||
browser: true, |
||||
node: true, |
||||
es6: true |
||||
}, |
||||
parser: 'vue-eslint-parser', |
||||
parserOptions: { |
||||
parser: '@typescript-eslint/parser', |
||||
ecmaVersion: 2020, |
||||
sourceType: 'module', |
||||
jsxPragma: 'React', |
||||
ecmaFeatures: { |
||||
jsx: true |
||||
} |
||||
}, |
||||
extends: [ |
||||
'plugin:vue/vue3-recommended', |
||||
'plugin:@typescript-eslint/recommended', |
||||
'prettier', |
||||
'plugin:prettier/recommended', |
||||
'./.eslintrc-auto-import.json' |
||||
], |
||||
rules: { |
||||
'vue/script-setup-uses-vars': 'error', |
||||
'vue/no-reserved-component-names': 'off', |
||||
'@typescript-eslint/ban-ts-ignore': 'off', |
||||
'@typescript-eslint/explicit-function-return-type': 'off', |
||||
'@typescript-eslint/no-explicit-any': 'off', |
||||
'@typescript-eslint/no-var-requires': 'off', |
||||
'@typescript-eslint/no-empty-function': 'off', |
||||
'vue/custom-event-name-casing': 'off', |
||||
'no-use-before-define': 'off', |
||||
'@typescript-eslint/no-use-before-define': 'off', |
||||
'@typescript-eslint/ban-ts-comment': 'off', |
||||
'@typescript-eslint/ban-types': 'off', |
||||
'@typescript-eslint/no-non-null-assertion': 'off', |
||||
'@typescript-eslint/explicit-module-boundary-types': 'off', |
||||
'@typescript-eslint/no-unused-vars': 'error', |
||||
'no-unused-vars': 'error', |
||||
'space-before-function-paren': 'off', |
||||
|
||||
'vue/attributes-order': 'off', |
||||
'vue/one-component-per-file': 'off', |
||||
'vue/html-closing-bracket-newline': 'off', |
||||
'vue/max-attributes-per-line': 'off', |
||||
'vue/multiline-html-element-content-newline': 'off', |
||||
'vue/singleline-html-element-content-newline': 'off', |
||||
'vue/attribute-hyphenation': 'off', |
||||
'vue/require-default-prop': 'off', |
||||
'vue/require-explicit-emits': 'off', |
||||
'vue/html-self-closing': [ |
||||
'error', |
||||
{ |
||||
html: { |
||||
void: 'always', |
||||
normal: 'never', |
||||
component: 'always' |
||||
}, |
||||
svg: 'always', |
||||
math: 'always' |
||||
} |
||||
], |
||||
'vue/multi-word-component-names': 'off' |
||||
} |
||||
}) |
@ -0,0 +1,11 @@ |
||||
node_modules |
||||
.DS_Store |
||||
dist |
||||
dist-ssr |
||||
*.local |
||||
/dist* |
||||
*-lock.* |
||||
pnpm-debug |
||||
auto-*.d.ts |
||||
.idea |
||||
.history |
@ -0,0 +1,11 @@ |
||||
/node_modules/** |
||||
/dist/ |
||||
/dist* |
||||
/public/* |
||||
/docs/* |
||||
/vite.config.ts |
||||
/src/types/env.d.ts |
||||
/src/types/auto-components.d.ts |
||||
/src/types/auto-imports.d.ts |
||||
/docs/**/* |
||||
CHANGELOG |
@ -0,0 +1,6 @@ |
||||
/dist/* |
||||
/public/* |
||||
public/* |
||||
/dist* |
||||
/src/types/env.d.ts |
||||
/docs/**/* |
@ -0,0 +1,21 @@ |
||||
MIT License |
||||
|
||||
Copyright (c) 2021-present Archer |
||||
|
||||
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. |
@ -0,0 +1,109 @@ |
||||
import { resolve } from 'path' |
||||
import Vue from '@vitejs/plugin-vue' |
||||
import VueJsx from '@vitejs/plugin-vue-jsx' |
||||
import WindiCSS from 'vite-plugin-windicss' |
||||
import progress from 'vite-plugin-progress' |
||||
import EslintPlugin from 'vite-plugin-eslint' |
||||
import PurgeIcons from 'vite-plugin-purge-icons' |
||||
import { ViteEjsPlugin } from 'vite-plugin-ejs' |
||||
// @ts-ignore
|
||||
import ElementPlus from 'unplugin-element-plus/vite' |
||||
import AutoImport from 'unplugin-auto-import/vite' |
||||
import Components from 'unplugin-vue-components/vite' |
||||
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers' |
||||
import viteCompression from 'vite-plugin-compression' |
||||
import topLevelAwait from 'vite-plugin-top-level-await' |
||||
import vueSetupExtend from 'vite-plugin-vue-setup-extend-plus' |
||||
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite' |
||||
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons' |
||||
|
||||
export function createVitePlugins() { |
||||
const root = process.cwd() |
||||
|
||||
// 路径查找
|
||||
function pathResolve(dir: string) { |
||||
return resolve(root, '.', dir) |
||||
} |
||||
|
||||
return [ |
||||
Vue(), |
||||
VueJsx(), |
||||
WindiCSS(), |
||||
progress(), |
||||
PurgeIcons(), |
||||
vueSetupExtend(), |
||||
ElementPlus({}), |
||||
AutoImport({ |
||||
include: [ |
||||
/\.[tj]sx?$/, // .ts, .tsx, .js, .jsx
|
||||
/\.vue$/, |
||||
/\.vue\?vue/, // .vue
|
||||
/\.md$/ // .md
|
||||
], |
||||
imports: [ |
||||
'vue', |
||||
'vue-router', |
||||
// 可额外添加需要 autoImport 的组件
|
||||
{ |
||||
'@/hooks/web/useI18n': ['useI18n'], |
||||
'@/hooks/web/useMessage': ['useMessage'], |
||||
'@/hooks/web/useTable': ['useTable'], |
||||
'@/hooks/web/useCrudSchemas': ['useCrudSchemas'], |
||||
'@/utils/formRules': ['required'], |
||||
'@/utils/dict': ['DICT_TYPE'] |
||||
} |
||||
], |
||||
dts: 'src/types/auto-imports.d.ts', |
||||
resolvers: [ElementPlusResolver()], |
||||
eslintrc: { |
||||
enabled: false, // Default `false`
|
||||
filepath: './.eslintrc-auto-import.json', // Default `./.eslintrc-auto-import.json`
|
||||
globalsPropValue: true // Default `true`, (true | false | 'readonly' | 'readable' | 'writable' | 'writeable')
|
||||
} |
||||
}), |
||||
Components({ |
||||
// 要搜索组件的目录的相对路径
|
||||
dirs: ['src/components'], |
||||
// 组件的有效文件扩展名
|
||||
extensions: ['vue', 'md'], |
||||
// 搜索子目录
|
||||
deep: true, |
||||
include: [/\.vue$/, /\.vue\?vue/], |
||||
// 生成自定义 `auto-components.d.ts` 全局声明
|
||||
dts: 'src/types/auto-components.d.ts', |
||||
// 自定义组件的解析器
|
||||
resolvers: [ElementPlusResolver()], |
||||
exclude: [/[\\/]node_modules[\\/]/] |
||||
}), |
||||
EslintPlugin({ |
||||
cache: false, |
||||
include: ['src/**/*.vue', 'src/**/*.ts', 'src/**/*.tsx'] // 检查的文件
|
||||
}), |
||||
VueI18nPlugin({ |
||||
runtimeOnly: true, |
||||
compositionOnly: true, |
||||
include: [resolve(__dirname, 'src/locales/**')] |
||||
}), |
||||
createSvgIconsPlugin({ |
||||
iconDirs: [pathResolve('src/assets/svgs')], |
||||
symbolId: 'icon-[dir]-[name]', |
||||
svgoOptions: true |
||||
}), |
||||
viteCompression({ |
||||
verbose: true, // 是否在控制台输出压缩结果
|
||||
disable: false, // 是否禁用
|
||||
threshold: 10240, // 体积大于 threshold 才会被压缩,单位 b
|
||||
algorithm: 'gzip', // 压缩算法,可选 [ 'gzip' , 'brotliCompress' ,'deflate' , 'deflateRaw']
|
||||
ext: '.gz', // 生成的压缩包后缀
|
||||
deleteOriginFile: false //压缩后是否删除源文件
|
||||
}), |
||||
ViteEjsPlugin(), |
||||
topLevelAwait({ |
||||
// https://juejin.cn/post/7152191742513512485
|
||||
// The export name of top-level await promise for each chunk module
|
||||
promiseExportName: '__tla', |
||||
// The function to generate import names of top-level await promise in each chunk module
|
||||
promiseImportName: (i) => `__tla_${i}` |
||||
}) |
||||
] |
||||
} |
@ -0,0 +1,111 @@ |
||||
const include = [ |
||||
'qs', |
||||
'url', |
||||
'vue', |
||||
'sass', |
||||
'mitt', |
||||
'axios', |
||||
'pinia', |
||||
'dayjs', |
||||
'qrcode', |
||||
'windicss', |
||||
'vue-router', |
||||
'vue-types', |
||||
'vue-i18n', |
||||
'xe-utils', |
||||
'crypto-js', |
||||
'cropperjs', |
||||
'lodash-es', |
||||
'nprogress', |
||||
'web-storage-cache', |
||||
'@iconify/iconify', |
||||
'@vueuse/core', |
||||
'@zxcvbn-ts/core', |
||||
'echarts/core', |
||||
'echarts/charts', |
||||
'echarts/components', |
||||
'echarts/renderers', |
||||
'echarts-wordcloud', |
||||
'@wangeditor/editor', |
||||
'@wangeditor/editor-for-vue', |
||||
'element-plus', |
||||
'element-plus/es', |
||||
'element-plus/es/locale/lang/zh-cn', |
||||
'element-plus/es/locale/lang/en', |
||||
'element-plus/es/components/backtop/style/css', |
||||
'element-plus/es/components/form/style/css', |
||||
'element-plus/es/components/radio-group/style/css', |
||||
'element-plus/es/components/radio/style/css', |
||||
'element-plus/es/components/checkbox/style/css', |
||||
'element-plus/es/components/checkbox-group/style/css', |
||||
'element-plus/es/components/switch/style/css', |
||||
'element-plus/es/components/time-picker/style/css', |
||||
'element-plus/es/components/date-picker/style/css', |
||||
'element-plus/es/components/descriptions/style/css', |
||||
'element-plus/es/components/descriptions-item/style/css', |
||||
'element-plus/es/components/link/style/css', |
||||
'element-plus/es/components/tooltip/style/css', |
||||
'element-plus/es/components/drawer/style/css', |
||||
'element-plus/es/components/dialog/style/css', |
||||
'element-plus/es/components/checkbox-button/style/css', |
||||
'element-plus/es/components/option-group/style/css', |
||||
'element-plus/es/components/radio-button/style/css', |
||||
'element-plus/es/components/cascader/style/css', |
||||
'element-plus/es/components/color-picker/style/css', |
||||
'element-plus/es/components/input-number/style/css', |
||||
'element-plus/es/components/rate/style/css', |
||||
'element-plus/es/components/select-v2/style/css', |
||||
'element-plus/es/components/tree-select/style/css', |
||||
'element-plus/es/components/slider/style/css', |
||||
'element-plus/es/components/time-select/style/css', |
||||
'element-plus/es/components/autocomplete/style/css', |
||||
'element-plus/es/components/image-viewer/style/css', |
||||
'element-plus/es/components/upload/style/css', |
||||
'element-plus/es/components/col/style/css', |
||||
'element-plus/es/components/form-item/style/css', |
||||
'element-plus/es/components/alert/style/css', |
||||
'element-plus/es/components/breadcrumb/style/css', |
||||
'element-plus/es/components/select/style/css', |
||||
'element-plus/es/components/input/style/css', |
||||
'element-plus/es/components/breadcrumb-item/style/css', |
||||
'element-plus/es/components/tag/style/css', |
||||
'element-plus/es/components/pagination/style/css', |
||||
'element-plus/es/components/table/style/css', |
||||
'element-plus/es/components/table-v2/style/css', |
||||
'element-plus/es/components/table-column/style/css', |
||||
'element-plus/es/components/card/style/css', |
||||
'element-plus/es/components/row/style/css', |
||||
'element-plus/es/components/button/style/css', |
||||
'element-plus/es/components/menu/style/css', |
||||
'element-plus/es/components/sub-menu/style/css', |
||||
'element-plus/es/components/menu-item/style/css', |
||||
'element-plus/es/components/option/style/css', |
||||
'element-plus/es/components/dropdown/style/css', |
||||
'element-plus/es/components/dropdown-menu/style/css', |
||||
'element-plus/es/components/dropdown-item/style/css', |
||||
'element-plus/es/components/skeleton/style/css', |
||||
'element-plus/es/components/skeleton/style/css', |
||||
'element-plus/es/components/backtop/style/css', |
||||
'element-plus/es/components/menu/style/css', |
||||
'element-plus/es/components/sub-menu/style/css', |
||||
'element-plus/es/components/menu-item/style/css', |
||||
'element-plus/es/components/dropdown/style/css', |
||||
'element-plus/es/components/tree/style/css', |
||||
'element-plus/es/components/dropdown-menu/style/css', |
||||
'element-plus/es/components/dropdown-item/style/css', |
||||
'element-plus/es/components/badge/style/css', |
||||
'element-plus/es/components/breadcrumb/style/css', |
||||
'element-plus/es/components/breadcrumb-item/style/css', |
||||
'element-plus/es/components/image/style/css', |
||||
'element-plus/es/components/collapse-transition/style/css', |
||||
'element-plus/es/components/timeline/style/css', |
||||
'element-plus/es/components/timeline-item/style/css', |
||||
'element-plus/es/components/collapse/style/css', |
||||
'element-plus/es/components/collapse-item/style/css', |
||||
'element-plus/es/components/button-group/style/css', |
||||
'element-plus/es/components/text/style/css' |
||||
] |
||||
|
||||
const exclude = ['@iconify/json'] |
||||
|
||||
export { include, exclude } |
@ -0,0 +1,143 @@ |
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="UTF-8" /> |
||||
<link rel="icon" href="/favicon.ico" /> |
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
||||
<title>%VITE_APP_TITLE%</title> |
||||
</head> |
||||
<body> |
||||
<div id="app"> |
||||
<style> |
||||
.app-loading { |
||||
display: flex; |
||||
width: 100%; |
||||
height: 100%; |
||||
justify-content: center; |
||||
align-items: center; |
||||
flex-direction: column; |
||||
background: #f0f2f5; |
||||
} |
||||
|
||||
.app-loading .app-loading-wrap { |
||||
position: absolute; |
||||
top: 50%; |
||||
left: 50%; |
||||
display: flex; |
||||
-webkit-transform: translate3d(-50%, -50%, 0); |
||||
transform: translate3d(-50%, -50%, 0); |
||||
justify-content: center; |
||||
align-items: center; |
||||
flex-direction: column; |
||||
} |
||||
|
||||
.app-loading .app-loading-title { |
||||
margin-bottom: 30px; |
||||
font-size: 20px; |
||||
font-weight: bold; |
||||
text-align: center; |
||||
} |
||||
|
||||
.app-loading .app-loading-logo { |
||||
width: 100px; |
||||
margin: 0 auto 15px auto; |
||||
} |
||||
|
||||
.app-loading .app-loading-item { |
||||
position: relative; |
||||
display: inline-block; |
||||
width: 60px; |
||||
height: 60px; |
||||
vertical-align: middle; |
||||
border-radius: 50%; |
||||
} |
||||
|
||||
.app-loading .app-loading-outter { |
||||
position: absolute; |
||||
width: 100%; |
||||
height: 100%; |
||||
border: 4px solid #2d8cf0; |
||||
border-bottom: 0; |
||||
border-left-color: transparent; |
||||
border-radius: 50%; |
||||
animation: loader-outter 1s cubic-bezier(0.42, 0.61, 0.58, 0.41) infinite; |
||||
} |
||||
|
||||
.app-loading .app-loading-inner { |
||||
position: absolute; |
||||
top: calc(50% - 20px); |
||||
left: calc(50% - 20px); |
||||
width: 40px; |
||||
height: 40px; |
||||
border: 4px solid #87bdff; |
||||
border-right: 0; |
||||
border-top-color: transparent; |
||||
border-radius: 50%; |
||||
animation: loader-inner 1s cubic-bezier(0.42, 0.61, 0.58, 0.41) infinite; |
||||
} |
||||
|
||||
@-webkit-keyframes loader-outter { |
||||
0% { |
||||
-webkit-transform: rotate(0deg); |
||||
transform: rotate(0deg); |
||||
} |
||||
|
||||
100% { |
||||
-webkit-transform: rotate(360deg); |
||||
transform: rotate(360deg); |
||||
} |
||||
} |
||||
|
||||
@keyframes loader-outter { |
||||
0% { |
||||
-webkit-transform: rotate(0deg); |
||||
transform: rotate(0deg); |
||||
} |
||||
|
||||
100% { |
||||
-webkit-transform: rotate(360deg); |
||||
transform: rotate(360deg); |
||||
} |
||||
} |
||||
|
||||
@-webkit-keyframes loader-inner { |
||||
0% { |
||||
-webkit-transform: rotate(0deg); |
||||
transform: rotate(0deg); |
||||
} |
||||
|
||||
100% { |
||||
-webkit-transform: rotate(-360deg); |
||||
transform: rotate(-360deg); |
||||
} |
||||
} |
||||
|
||||
@keyframes loader-inner { |
||||
0% { |
||||
-webkit-transform: rotate(0deg); |
||||
transform: rotate(0deg); |
||||
} |
||||
|
||||
100% { |
||||
-webkit-transform: rotate(-360deg); |
||||
transform: rotate(-360deg); |
||||
} |
||||
} |
||||
</style> |
||||
<div class="app-loading"> |
||||
<div class="app-loading-wrap"> |
||||
<div class="app-loading-title"> |
||||
<img src="/logo.gif" class="app-loading-logo" alt="Logo" /> |
||||
<div class="app-loading-title">%VITE_APP_TITLE%</div> |
||||
</div> |
||||
<div class="app-loading-item"> |
||||
<div class="app-loading-outter"></div> |
||||
<div class="app-loading-inner"></div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<script type="module" src="/src/main.js"></script> |
||||
</body> |
||||
</html> |
@ -0,0 +1,141 @@ |
||||
{ |
||||
"name": "ss-oa-manage", |
||||
"version": "1.0.0", |
||||
"description": "莳松oa管理系统", |
||||
"author": "ss", |
||||
"private": false, |
||||
"scripts": { |
||||
"i": "pnpm install", |
||||
"dev": "vite --mode base", |
||||
"dev-front": "vite --mode front", |
||||
"front": "vite --mode front", |
||||
"ts:check": "vue-tsc --noEmit", |
||||
"build:pro": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode pro", |
||||
"build:dev": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode dev", |
||||
"build:stage": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode stage", |
||||
"build:test": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode test", |
||||
"build:static": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode static", |
||||
"build:front": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode front", |
||||
"serve:pro": "vite preview --mode pro", |
||||
"serve:dev": "vite preview --mode dev", |
||||
"serve:test": "vite preview --mode test", |
||||
"preview": "pnpm build && vite preview", |
||||
"npm:check": "npx npm-check-updates", |
||||
"clean": "npx rimraf node_modules", |
||||
"clean:cache": "npx rimraf node_modules/.cache", |
||||
"lint:eslint": "eslint --fix --ext .js,.ts,.vue ./src", |
||||
"lint:format": "prettier --write --loglevel warn \"src/**/*.{js,ts,json,tsx,css,less,scss,vue,html,md}\"", |
||||
"lint:style": "stylelint --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/", |
||||
"lint:lint-staged": "lint-staged -c ", |
||||
"lint:pretty": "pretty-quick --staged" |
||||
}, |
||||
"dependencies": { |
||||
"@amap/amap-jsapi-loader": "^1.0.1", |
||||
"@element-plus/icons-vue": "^2.1.0", |
||||
"@form-create/designer": "^3.1.0", |
||||
"@form-create/element-ui": "^3.1.17", |
||||
"@iconify/iconify": "^3.1.0", |
||||
"@videojs-player/vue": "^1.0.0", |
||||
"@vueuse/core": "^10.1.2", |
||||
"@wangeditor/editor": "^5.1.23", |
||||
"@wangeditor/editor-for-vue": "^5.1.10", |
||||
"@zxcvbn-ts/core": "^3.0.1", |
||||
"animate.css": "^4.1.1", |
||||
"axios": "^1.4.0", |
||||
"benz-amr-recorder": "^1.1.5", |
||||
"bpmn-js-token-simulation": "^0.10.0", |
||||
"camunda-bpmn-moddle": "^7.0.1", |
||||
"cropperjs": "^1.5.13", |
||||
"crypto-js": "^4.1.1", |
||||
"dayjs": "^1.11.7", |
||||
"diagram-js": "^11.6.0", |
||||
"echarts": "^5.4.2", |
||||
"echarts-wordcloud": "^2.1.0", |
||||
"element-plus": "2.3.4", |
||||
"fast-xml-parser": "^4.2.2", |
||||
"highlight.js": "^11.8.0", |
||||
"intro.js": "^7.0.1", |
||||
"jsencrypt": "^3.3.2", |
||||
"lodash-es": "^4.17.21", |
||||
"min-dash": "^4.1.1", |
||||
"mitt": "^3.0.0", |
||||
"nprogress": "^0.2.0", |
||||
"pinia": "^2.1.3", |
||||
"qrcode": "^1.5.3", |
||||
"qs": "^6.11.2", |
||||
"steady-xml": "^0.1.0", |
||||
"url": "^0.11.0", |
||||
"video.js": "^8.3.0", |
||||
"vue": "3.3.4", |
||||
"vue-amap": "^0.5.10", |
||||
"vue-dompurify-html": "^5.0.1", |
||||
"vue-i18n": "9.2.2", |
||||
"vue-router": "^4.2.1", |
||||
"vue-types": "^5.0.3", |
||||
"vuedraggable": "^4.1.0", |
||||
"web-storage-cache": "^1.1.1", |
||||
"xe-utils": "^3.5.7", |
||||
"xml-js": "^1.6.11" |
||||
}, |
||||
"devDependencies": { |
||||
"@commitlint/cli": "^17.6.3", |
||||
"@commitlint/config-conventional": "^17.6.3", |
||||
"@iconify/json": "^2.2.67", |
||||
"@intlify/unplugin-vue-i18n": "^0.10.0", |
||||
"@purge-icons/generated": "^0.9.0", |
||||
"@types/intro.js": "^5.1.1", |
||||
"@types/lodash-es": "^4.17.7", |
||||
"@types/node": "^18.16.0", |
||||
"@types/nprogress": "^0.2.0", |
||||
"@types/qrcode": "^1.5.0", |
||||
"@types/qs": "^6.9.7", |
||||
"@typescript-eslint/eslint-plugin": "^5.59.6", |
||||
"@typescript-eslint/parser": "^5.59.6", |
||||
"@vitejs/plugin-legacy": "^4.0.3", |
||||
"@vitejs/plugin-vue": "^4.2.3", |
||||
"@vitejs/plugin-vue-jsx": "^3.0.1", |
||||
"autoprefixer": "^10.4.14", |
||||
"bpmn-js": "^8.9.0", |
||||
"bpmn-js-properties-panel": "^0.46.0", |
||||
"consola": "^3.1.0", |
||||
"eslint": "^8.40.0", |
||||
"eslint-config-prettier": "^8.8.0", |
||||
"eslint-define-config": "^1.20.0", |
||||
"eslint-plugin-prettier": "^4.2.1", |
||||
"eslint-plugin-vue": "^9.13.0", |
||||
"lint-staged": "^13.2.2", |
||||
"postcss": "^8.4.23", |
||||
"postcss-html": "^1.5.0", |
||||
"postcss-scss": "^4.0.6", |
||||
"prettier": "^2.8.8", |
||||
"rimraf": "^5.0.1", |
||||
"rollup": "^3.22.0", |
||||
"sass": "^1.62.1", |
||||
"stylelint": "^15.6.2", |
||||
"stylelint-config-html": "^1.1.0", |
||||
"stylelint-config-recommended": "^12.0.0", |
||||
"stylelint-config-standard": "^33.0.0", |
||||
"stylelint-order": "^6.0.3", |
||||
"terser": "^5.17.4", |
||||
"typescript": "5.0.4", |
||||
"unplugin-auto-import": "^0.16.0", |
||||
"unplugin-element-plus": "^0.7.1", |
||||
"unplugin-vue-components": "^0.24.1", |
||||
"vite": "4.3.8", |
||||
"vite-plugin-compression": "^0.5.1", |
||||
"vite-plugin-ejs": "^1.6.4", |
||||
"vite-plugin-eslint": "^1.8.1", |
||||
"vite-plugin-progress": "^0.0.7", |
||||
"vite-plugin-purge-icons": "^0.9.2", |
||||
"vite-plugin-svg-icons": "^2.0.1", |
||||
"vite-plugin-top-level-await": "^1.3.0", |
||||
"vite-plugin-vue-setup-extend-plus": "^0.1.0", |
||||
"vite-plugin-windicss": "^1.9.0", |
||||
"vue-tsc": "^1.6.5", |
||||
"windicss": "^3.5.6" |
||||
}, |
||||
"engines": { |
||||
"node": ">=16.0.0" |
||||
}, |
||||
"license": "MIT" |
||||
} |
@ -0,0 +1,5 @@ |
||||
module.exports = { |
||||
plugins: { |
||||
autoprefixer: {} |
||||
} |
||||
} |
@ -0,0 +1,22 @@ |
||||
module.exports = { |
||||
printWidth: 100, // 每行代码长度(默认80)
|
||||
tabWidth: 2, // 每个tab相当于多少个空格(默认2)ab进行缩进(默认false)
|
||||
useTabs: false, // 是否使用tab
|
||||
semi: false, // 声明结尾使用分号(默认true)
|
||||
vueIndentScriptAndStyle: false, |
||||
singleQuote: true, // 使用单引号(默认false)
|
||||
quoteProps: 'as-needed', |
||||
bracketSpacing: true, // 对象字面量的大括号间使用空格(默认true)
|
||||
trailingComma: 'none', // 多行使用拖尾逗号(默认none)
|
||||
jsxSingleQuote: false, |
||||
// 箭头函数参数括号 默认avoid 可选 avoid| always
|
||||
// avoid 能省略括号的时候就省略 例如x => x
|
||||
// always 总是有括号
|
||||
arrowParens: 'always', |
||||
insertPragma: false, |
||||
requirePragma: false, |
||||
proseWrap: 'never', |
||||
htmlWhitespaceSensitivity: 'strict', |
||||
endOfLine: 'auto', |
||||
rangeStart: 0 |
||||
} |
After Width: | Height: | Size: 7.7 KiB |
After Width: | Height: | Size: 6.2 KiB |
@ -0,0 +1,54 @@ |
||||
<script lang="ts" name="APP" setup> |
||||
import { isDark } from '@/utils/is' |
||||
import { useAppStore } from '@/store/modules/app' |
||||
import { useDesign } from '@/hooks/web/useDesign' |
||||
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
||||
import routerSearch from '@/components/RouterSearch/index.vue' |
||||
|
||||
const { getPrefixCls } = useDesign() |
||||
const prefixCls = getPrefixCls('app') |
||||
const appStore = useAppStore() |
||||
const currentSize = computed(() => appStore.getCurrentSize) |
||||
const greyMode = computed(() => appStore.getGreyMode) |
||||
const { wsCache } = useCache() |
||||
|
||||
// 根据浏览器当前主题设置系统主题色 |
||||
const setDefaultTheme = () => { |
||||
let isDarkTheme = wsCache.get(CACHE_KEY.IS_DARK) |
||||
if (isDarkTheme === null) { |
||||
isDarkTheme = isDark() |
||||
} |
||||
appStore.setIsDark(isDarkTheme) |
||||
} |
||||
setDefaultTheme() |
||||
</script> |
||||
<template> |
||||
<ConfigGlobal :size="currentSize"> |
||||
<RouterView :class="greyMode ? `${prefixCls}-grey-mode` : ''" /> |
||||
<routerSearch /> |
||||
</ConfigGlobal> |
||||
</template> |
||||
<style lang="scss"> |
||||
$prefix-cls: #{$namespace}-app; |
||||
|
||||
.size { |
||||
width: 100%; |
||||
height: 100%; |
||||
} |
||||
|
||||
html, |
||||
body { |
||||
padding: 0 !important; |
||||
margin: 0; |
||||
overflow: hidden; |
||||
@extend .size; |
||||
|
||||
#app { |
||||
@extend .size; |
||||
} |
||||
} |
||||
|
||||
.#{$prefix-cls}-grey-mode { |
||||
filter: grayscale(100%); |
||||
} |
||||
</style> |
@ -0,0 +1,13 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
export default { |
||||
callLogin(data) { |
||||
return request.post({ url: '/call-api/openapi/V2.0.4/agentLogin', data }) |
||||
}, |
||||
callUserStatus(data) { |
||||
return request.post({ url: '/call-api/openapi/V2.0.4/getAgentStatus', data }) |
||||
}, |
||||
callNumber(data) { |
||||
return request.post({ url: '/call-api/openapi/V2.0.4/callNumber', data }) |
||||
} |
||||
} |
@ -0,0 +1,39 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
// 查询(精简)列表
|
||||
export const getAfterSaleList = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/sign-after-sale/list', params }) |
||||
} |
||||
|
||||
// 查询(精简)列表
|
||||
export const getAfterSalePage = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/sign-after-sale/page', params }) |
||||
} |
||||
|
||||
// 新增
|
||||
export const createAfterSale = async (data) => { |
||||
return await request.post({ |
||||
url: '/admin-api/crm/sign-after-sale/create', |
||||
data, |
||||
isSubmitForm: true |
||||
}) |
||||
} |
||||
|
||||
// 审核
|
||||
export const auditAfterSale = async (data) => { |
||||
return await request.post({ url: '/admin-api/crm/sign-after-sale/check', data }) |
||||
} |
||||
|
||||
export const batchAuditAfterSale = async (data) => { |
||||
return await request.post({ url: '/admin-api/crm/sign-after-sale/batch/check', data }) |
||||
} |
||||
|
||||
// 撤销
|
||||
export const cancelApplyAfterSale = async (data) => { |
||||
return await request.post({ url: '/admin-api/crm/sign-after-sale/revoke', params: data }) |
||||
} |
||||
|
||||
// 查询详情
|
||||
export const getAfterSaleDetail = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/sign-after-sale/get', params }) |
||||
} |
@ -0,0 +1,11 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
// 查询用户配置
|
||||
export const getClueCache = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/param-user-setting/get-by-user', params }) |
||||
} |
||||
|
||||
// 保存用户配置
|
||||
export const setClueCache = async (data) => { |
||||
return await request.post({ url: '/admin-api/crm/param-user-setting/save', data }) |
||||
} |
@ -0,0 +1,40 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
// 创建
|
||||
export const createField = (data) => { |
||||
return request.post({ url: '/admin-api/crm/param/create', data: { ...data, module: 1 } }) |
||||
} |
||||
|
||||
// 更新
|
||||
export const updateField = (data) => { |
||||
return request.put({ url: '/admin-api/crm/param/update', data }) |
||||
} |
||||
|
||||
// 删除
|
||||
export const deleteField = (id) => { |
||||
return request.delete({ url: `/admin-api/crm/param/delete?id=${id}` }) |
||||
} |
||||
|
||||
// 获得
|
||||
export const getField = (id) => { |
||||
return request.get({ url: `/admin-api/crm/param/get?id=${id}` }) |
||||
} |
||||
|
||||
// 获得精简信息列表
|
||||
export const getSimpleFieldList = () => { |
||||
return request.get({ url: '/admin-api/crm/param/simple-list', params: { module: 1 } }) |
||||
} |
||||
|
||||
// 获取自定义字段
|
||||
export const getDiyFieldList = () => { |
||||
return request.get({ url: '/admin-api/crm/param/get-diy-param', params: { module: 1 } }) |
||||
} |
||||
|
||||
// 状态修改
|
||||
export const updateFieldStatus = (signParamId, status) => { |
||||
const data = { |
||||
signParamId, |
||||
status |
||||
} |
||||
return request.put({ url: '/admin-api/crm/param/status/update', data: data }) |
||||
} |
@ -0,0 +1,26 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
// 线索获取规则
|
||||
export const getClueGainRuleList = () => { |
||||
return request.get({ url: '/admin-api/crm/sch-clue-gain-rule/list' }) |
||||
} |
||||
|
||||
// 删除
|
||||
export const deleteClueGainRule = (id) => { |
||||
return request.delete({ url: `/admin-api/crm/sch-clue-gain-rule/delete?id=${id}` }) |
||||
} |
||||
|
||||
// 线索获取规则保存
|
||||
export const saveClueGainRule = (data) => { |
||||
return request.put({ url: '/admin-api/crm/sch-clue-gain-rule/batchUpdate', data }) |
||||
} |
||||
|
||||
// 线索规则
|
||||
export const getClueDistributeRuleByUser = (params) => { |
||||
return request.get({ url: '/admin-api/crm/sch-clue-distribution-rule/queryByUserId', params }) |
||||
} |
||||
|
||||
// 删除
|
||||
export const deleteClueDistributeRule = (id) => { |
||||
return request.delete({ url: `/admin-api/crm/sch-clue-gain-rule/delete?id=${id}` }) |
||||
} |
@ -0,0 +1,21 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
// 查询(精简)列表
|
||||
export const getDeliveryList = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/sign-send/list', params }) |
||||
} |
||||
|
||||
// 查询分页列表
|
||||
export const getDeliveryPage = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/sign-send/page', params }) |
||||
} |
||||
|
||||
// 新增
|
||||
export const createDelivery = async (data) => { |
||||
return await request.post({ url: '/admin-api/crm/sign-send/create', data, isSubmitForm: true }) |
||||
} |
||||
|
||||
// 查询详情
|
||||
export const getDeliveryDetail = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/sign-send/get', params }) |
||||
} |
@ -0,0 +1,20 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
// 查询(精简)列表
|
||||
export const getFollowList = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/clue-follow-record/list', params }) |
||||
} |
||||
|
||||
// 新增
|
||||
export const createFollow = async (data) => { |
||||
return await request.post({ |
||||
url: '/admin-api/crm/clue-follow-record/create', |
||||
data: data, |
||||
isSubmitForm: true |
||||
}) |
||||
} |
||||
|
||||
// 删除
|
||||
export const deleteFollow = async (id) => { |
||||
return await request.delete({ url: '/admin-api/crm/clue-follow-record/delete?id=' + id }) |
||||
} |
@ -0,0 +1,60 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
// 查询(精简)列表
|
||||
export const getSimpleClueList = async () => { |
||||
return await request.get({ url: '/admin-api/crm/sch-clue/list-all-simple' }) |
||||
} |
||||
|
||||
// 查询列表
|
||||
export const getCluePage = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/sch-clue/page', params }) |
||||
} |
||||
|
||||
// 查询详情
|
||||
export const getClue = async (id) => { |
||||
return await request.get({ url: '/admin-api/crm/sch-clue/get?id=' + id }) |
||||
} |
||||
|
||||
// 新增
|
||||
export const createClue = async (data) => { |
||||
return await request.post({ |
||||
url: '/admin-api/crm/sch-clue/create', |
||||
data: data, |
||||
isSubmitForm: true |
||||
}) |
||||
} |
||||
|
||||
// 修改
|
||||
export const updateClue = async (params) => { |
||||
return await request.put({ url: '/admin-api/crm/sch-clue/update', data: params }) |
||||
} |
||||
|
||||
// 删除
|
||||
export const deleteClue = async (id) => { |
||||
return await request.delete({ url: '/admin-api/crm/sch-clue/delete?id=' + id }) |
||||
} |
||||
|
||||
// 释放
|
||||
export const releaseClue = async (data) => { |
||||
return await request.put({ url: '/admin-api/crm/sch-clue/public/save', data }) |
||||
} |
||||
|
||||
// 通用查询数量
|
||||
export const getClueCount = async () => { |
||||
return await request.get({ url: '/admin-api/crm/sch-clue/get-clue-num' }) |
||||
} |
||||
|
||||
// 获取操作记录
|
||||
export const getOpearateRecord = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/clue-operate-record/list', params }) |
||||
} |
||||
|
||||
// 获取公海线索
|
||||
export const getPublicClue = async (data) => { |
||||
return await request.put({ url: '/admin-api/crm/sch-clue/public/save', data }) |
||||
} |
||||
|
||||
// 获得线索跟进用户信息
|
||||
export const getFollowUserList = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/sch-clue/get-follow-user', params }) |
||||
} |
@ -0,0 +1,40 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
// 创建
|
||||
export const createField = (data) => { |
||||
return request.post({ url: '/admin-api/crm/param/create', data: { ...data, module: 2 } }) |
||||
} |
||||
|
||||
// 更新
|
||||
export const updateField = (data) => { |
||||
return request.put({ url: '/admin-api/crm/param/update', data }) |
||||
} |
||||
|
||||
// 删除
|
||||
export const deleteField = (id) => { |
||||
return request.delete({ url: `/admin-api/crm/param/delete?id=${id}` }) |
||||
} |
||||
|
||||
// 获得
|
||||
export const getField = (id) => { |
||||
return request.get({ url: `/admin-api/crm/param/get?id=${id}` }) |
||||
} |
||||
|
||||
// 获得精简信息列表
|
||||
export const getSimpleFieldList = () => { |
||||
return request.get({ url: '/admin-api/crm/param/simple-list', params: { module: 2 } }) |
||||
} |
||||
|
||||
// 获取自定义字段
|
||||
export const getDiyFieldList = () => { |
||||
return request.get({ url: '/admin-api/crm/param/get-diy-param', params: { module: 2 } }) |
||||
} |
||||
|
||||
// 状态修改
|
||||
export const updateFieldStatus = (signParamId, status) => { |
||||
const data = { |
||||
signParamId, |
||||
status |
||||
} |
||||
return request.put({ url: '/admin-api/crm/param/status/update', data: data }) |
||||
} |
@ -0,0 +1,39 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
// 查询(精简)列表
|
||||
export const getPaymentList = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/sign-pay-record/list', params }) |
||||
} |
||||
|
||||
// 查询(精简)列表
|
||||
export const getPaymentPage = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/sign-pay-record/page', params }) |
||||
} |
||||
|
||||
// 新增
|
||||
export const createPayment = async (data) => { |
||||
return await request.post({ |
||||
url: '/admin-api/crm/sign-pay-record/create', |
||||
data, |
||||
isSubmitForm: true |
||||
}) |
||||
} |
||||
|
||||
// 审核
|
||||
export const auditPayment = async (data) => { |
||||
return await request.post({ url: '/admin-api/crm/sign-pay-record/check', data }) |
||||
} |
||||
|
||||
export const batchAuditPayment = async (data) => { |
||||
return await request.post({ url: '/admin-api/crm/sign-pay-record/batch/check', data }) |
||||
} |
||||
|
||||
// 撤销
|
||||
export const cancelApplyPayment = async (data) => { |
||||
return await request.post({ url: '/admin-api/crm/sign-pay-record/revoke', params: data }) |
||||
} |
||||
|
||||
// 查询详情
|
||||
export const getPaymentDetail = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/sign-pay-record/get', params }) |
||||
} |
@ -0,0 +1,16 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
// 查询列表
|
||||
export const getSettlePage = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/sign-settlement/page', params }) |
||||
} |
||||
|
||||
// 查询详情
|
||||
export const getSettle = async (id) => { |
||||
return await request.get({ url: '/admin-api/crm/sign-settlement/get?id=' + id }) |
||||
} |
||||
|
||||
// 批量结算
|
||||
export const batchSaveSettle = async (data) => { |
||||
return await request.post({ url: '/admin-api/crm/sign-settlement/batch/save', data }) |
||||
} |
@ -0,0 +1,31 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
// 查询列表
|
||||
export const getSignPage = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/sign/page', params }) |
||||
} |
||||
|
||||
// 查询详情
|
||||
export const getSign = async (id) => { |
||||
return await request.get({ url: '/admin-api/crm/sign/get?id=' + id }) |
||||
} |
||||
|
||||
// 新增
|
||||
export const createSign = async (data) => { |
||||
return await request.post({ url: '/admin-api/crm/sign/create', data: data, isSubmitForm: true }) |
||||
} |
||||
|
||||
// 取消登记
|
||||
export const cancelDeal = async (id) => { |
||||
return await request.delete({ url: '/admin-api/crm/sign/delete?id=' + id }) |
||||
} |
||||
|
||||
// 新增支出
|
||||
export const signAddPay = async (data) => { |
||||
return await request.post({ url: '/admin-api/crm/sign/extra-pay/save', data: data }) |
||||
} |
||||
|
||||
// 查询支出
|
||||
export const getSignExtraPayList = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/sign/extra-pay/get', params }) |
||||
} |
@ -0,0 +1,26 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
// 获得列表
|
||||
export const getSkillPage = (params) => { |
||||
return request.get({ url: '/admin-api/crm/skill/page', params }) |
||||
} |
||||
|
||||
// 创建
|
||||
export const createSkill = (data) => { |
||||
return request.post({ url: '/admin-api/crm/skill/create', data, isSubmitForm: true }) |
||||
} |
||||
|
||||
// 更新
|
||||
export const updateSkill = (data) => { |
||||
return request.put({ url: '/admin-api/crm/skill/update', data }) |
||||
} |
||||
|
||||
// 删除
|
||||
export const deleteSkill = (id) => { |
||||
return request.delete({ url: `/admin-api/crm/skill/delete?id=${id}` }) |
||||
} |
||||
|
||||
// 获得
|
||||
export const getSkill = (id) => { |
||||
return request.get({ url: `/admin-api/crm/skill/get?id=${id}` }) |
||||
} |
@ -0,0 +1,31 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
// 查询(精简)列表
|
||||
export const getSimpleSourceList = async () => { |
||||
return await request.get({ url: '/admin-api/crm/source/list' }) |
||||
} |
||||
|
||||
// 查询列表
|
||||
export const getSourcePage = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/source/list', params }) |
||||
} |
||||
|
||||
// 查询详情
|
||||
export const getSource = async (id) => { |
||||
return await request.get({ url: '/admin-api/crm/source/get?id=' + id }) |
||||
} |
||||
|
||||
// 新增
|
||||
export const createSource = async (data) => { |
||||
return await request.post({ url: '/admin-api/crm/source/create', data: data, isSubmitForm: true }) |
||||
} |
||||
|
||||
// 修改
|
||||
export const updateSource = async (params) => { |
||||
return await request.put({ url: '/admin-api/crm/source/update', data: params }) |
||||
} |
||||
|
||||
// 删除
|
||||
export const deleteSource = async (id) => { |
||||
return await request.delete({ url: '/admin-api/crm/source/delete?id=' + id }) |
||||
} |
@ -0,0 +1,20 @@ |
||||
import request from '@/config/axios' |
||||
// 线索情况
|
||||
export const getUserClueCount = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/home/get-user-count', params }) |
||||
} |
||||
|
||||
// 成交率
|
||||
export const getClueSignSignRate = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/home/get-sign-rate', params }) |
||||
} |
||||
|
||||
// 成交率
|
||||
export const getClueSignSignRank = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/home/get-sign-top10', params }) |
||||
} |
||||
|
||||
// 成交率
|
||||
export const getClueFollowRank = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/home/get-follow-top10', params }) |
||||
} |
@ -0,0 +1,48 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
export interface ConfigVO { |
||||
id: number | undefined |
||||
category: string |
||||
name: string |
||||
key: string |
||||
value: string |
||||
type: number |
||||
visible: boolean |
||||
remark: string |
||||
createTime: Date |
||||
} |
||||
|
||||
// 查询参数列表
|
||||
export const getConfigPage = (params: PageParam) => { |
||||
return request.get({ url: '/admin-api/infra/config/page', params }) |
||||
} |
||||
|
||||
// 查询参数详情
|
||||
export const getConfig = (id: number) => { |
||||
return request.get({ url: '/admin-api/infra/config/get?id=' + id }) |
||||
} |
||||
|
||||
// 根据参数键名查询参数值
|
||||
export const getConfigKey = (configKey: string) => { |
||||
return request.get({ url: '/admin-api/infra/config/get-value-by-key?key=' + configKey }) |
||||
} |
||||
|
||||
// 新增参数
|
||||
export const createConfig = (data: ConfigVO) => { |
||||
return request.post({ url: '/admin-api/infra/config/create', data }) |
||||
} |
||||
|
||||
// 修改参数
|
||||
export const updateConfig = (data: ConfigVO) => { |
||||
return request.put({ url: '/admin-api/infra/config/update', data }) |
||||
} |
||||
|
||||
// 删除参数
|
||||
export const deleteConfig = (id: number) => { |
||||
return request.delete({ url: '/admin-api/infra/config/delete?id=' + id }) |
||||
} |
||||
|
||||
// 导出参数
|
||||
export const exportConfig = (params) => { |
||||
return request.download({ url: '/admin-api/infra/config/export', params }) |
||||
} |
@ -0,0 +1,45 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
export interface FilePageReqVO extends PageParam { |
||||
path?: string |
||||
type?: string |
||||
createTime?: Date[] |
||||
} |
||||
|
||||
// 文件预签名地址 Response VO
|
||||
export interface FilePresignedUrlRespVO { |
||||
// 文件配置编号
|
||||
configId: number |
||||
// 文件上传 URL
|
||||
uploadUrl: string |
||||
// 文件 URL
|
||||
url: string |
||||
} |
||||
|
||||
// 查询文件列表
|
||||
export const getFilePage = (params: FilePageReqVO) => { |
||||
return request.get({ url: '/infra/file/page', params }) |
||||
} |
||||
|
||||
// 删除文件
|
||||
export const deleteFile = (id: number) => { |
||||
return request.delete({ url: '/infra/file/delete?id=' + id }) |
||||
} |
||||
|
||||
// 获取文件预签名地址
|
||||
export const getFilePresignedUrl = (path: string) => { |
||||
return request.get<FilePresignedUrlRespVO>({ |
||||
url: '/infra/file/presigned-url', |
||||
params: { path } |
||||
}) |
||||
} |
||||
|
||||
// 创建文件
|
||||
export const createFile = (data: any) => { |
||||
return request.post({ url: '/infra/file/create', data }) |
||||
} |
||||
|
||||
// 上传文件
|
||||
export const updateFile = (data: any) => { |
||||
return request.upload({ url: '/admin-api/system/file/upload', data }) |
||||
} |
@ -0,0 +1,73 @@ |
||||
import request from '@/config/axios' |
||||
import { getRefreshToken } from '@/utils/auth' |
||||
import type { UserLoginVO } from './types' |
||||
|
||||
export interface SmsCodeVO { |
||||
mobile: string |
||||
scene: number |
||||
} |
||||
|
||||
export interface SmsLoginVO { |
||||
mobile: string |
||||
code: string |
||||
} |
||||
|
||||
// 登录
|
||||
export const login = (data: UserLoginVO) => { |
||||
return request.post({ url: '/admin-api/system/auth/login', data }) |
||||
} |
||||
|
||||
// 刷新访问令牌
|
||||
export const refreshToken = () => { |
||||
return request.post({ |
||||
url: '/admin-api/system/auth/refresh-token?refreshToken=' + getRefreshToken() |
||||
}) |
||||
} |
||||
|
||||
// 使用租户名,获得租户编号
|
||||
export const getTenantIdByName = (name: string) => { |
||||
return request.get({ url: '/admin-api/system/tenant/get-id-by-name?name=' + name }) |
||||
} |
||||
|
||||
// 登出
|
||||
export const loginOut = () => { |
||||
return request.post({ url: '/admin-api/system/auth/logout' }) |
||||
} |
||||
|
||||
// 获取用户权限信息
|
||||
export const getInfo = (params) => { |
||||
return request.get({ url: '/admin-api/system/auth/get-permission-info', params }) |
||||
} |
||||
|
||||
//获取登录验证码
|
||||
export const sendSmsCode = (data: SmsCodeVO) => { |
||||
return request.post({ url: '/admin-api/system/auth/send-sms-code', data }) |
||||
} |
||||
|
||||
// 短信验证码登录
|
||||
export const smsLogin = (data: SmsLoginVO) => { |
||||
return request.post({ url: '/admin-api/system/auth/sms-login', data }) |
||||
} |
||||
|
||||
// 社交授权的跳转
|
||||
export const socialAuthRedirect = (type: number, redirectUri: string) => { |
||||
return request.get({ |
||||
url: '/admin-api/system/auth/social-auth-redirect?type=' + type + '&redirectUri=' + redirectUri |
||||
}) |
||||
} |
||||
// 获取验证图片以及 token
|
||||
export const getCode = (data) => { |
||||
return request.postOriginal({ url: '/admin-api/system/captcha/get', data }) |
||||
} |
||||
|
||||
// 滑动或者点选验证
|
||||
export const reqCheck = (data) => { |
||||
return request.postOriginal({ url: '/admin-api/system/captcha/check', data }) |
||||
} |
||||
|
||||
// 获取应用信息
|
||||
export const getAppInfo = (instanceId: number) => { |
||||
return request.get({ |
||||
url: '/admin-api/system/serviceInstance/getInstanceInfo?instanceId=' + instanceId |
||||
}) |
||||
} |
@ -0,0 +1,41 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
// 获得授权信息
|
||||
export const getAuthorize = (clientId: string) => { |
||||
return request.get({ url: '/admin-api/system/oauth2/authorize?clientId=' + clientId }) |
||||
} |
||||
|
||||
// 发起授权
|
||||
export const authorize = ( |
||||
responseType: string, |
||||
clientId: string, |
||||
redirectUri: string, |
||||
state: string, |
||||
autoApprove: boolean, |
||||
checkedScopes: string[], |
||||
uncheckedScopes: string[] |
||||
) => { |
||||
// 构建 scopes
|
||||
const scopes = {} |
||||
for (const scope of checkedScopes) { |
||||
scopes[scope] = true |
||||
} |
||||
for (const scope of uncheckedScopes) { |
||||
scopes[scope] = false |
||||
} |
||||
// 发起请求
|
||||
return request.post({ |
||||
url: '/admin-api/system/oauth2/authorize', |
||||
headers: { |
||||
'Content-type': 'application/x-www-form-urlencoded' |
||||
}, |
||||
params: { |
||||
response_type: responseType, |
||||
client_id: clientId, |
||||
redirect_uri: redirectUri, |
||||
state: state, |
||||
auto_approve: autoApprove, |
||||
scope: JSON.stringify(scopes) |
||||
} |
||||
}) |
||||
} |
@ -0,0 +1,28 @@ |
||||
export type UserLoginVO = { |
||||
username: string |
||||
password: string |
||||
captchaVerification: string |
||||
} |
||||
|
||||
export type TokenType = { |
||||
id: number // 编号
|
||||
accessToken: string // 访问令牌
|
||||
refreshToken: string // 刷新令牌
|
||||
userId: number // 用户编号
|
||||
userType: number //用户类型
|
||||
clientId: string //客户端编号
|
||||
expiresTime: number //过期时间
|
||||
} |
||||
|
||||
export type UserVO = { |
||||
id: number |
||||
username: string |
||||
nickname: string |
||||
deptId: number |
||||
email: string |
||||
mobile: string |
||||
sex: number |
||||
avatar: string |
||||
loginIp: string |
||||
loginDate: string |
||||
} |
@ -0,0 +1,61 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
/** |
||||
* 商品品牌 |
||||
*/ |
||||
export interface BrandVO { |
||||
/** |
||||
* 品牌编号 |
||||
*/ |
||||
id?: number |
||||
/** |
||||
* 品牌名称 |
||||
*/ |
||||
name: string |
||||
/** |
||||
* 品牌图片 |
||||
*/ |
||||
picUrl: string |
||||
/** |
||||
* 品牌排序 |
||||
*/ |
||||
sort?: number |
||||
/** |
||||
* 品牌描述 |
||||
*/ |
||||
description?: string |
||||
/** |
||||
* 开启状态 |
||||
*/ |
||||
status: number |
||||
} |
||||
|
||||
// 创建商品品牌
|
||||
export const createBrand = (data: BrandVO) => { |
||||
return request.post({ url: '/admin-api/crm/erp-product-brand/create', data, isSubmitForm: true }) |
||||
} |
||||
|
||||
// 更新商品品牌
|
||||
export const updateBrand = (data: BrandVO) => { |
||||
return request.put({ url: '/admin-api/crm/erp-product-brand/update', data }) |
||||
} |
||||
|
||||
// 删除商品品牌
|
||||
export const deleteBrand = (id: number) => { |
||||
return request.delete({ url: `/admin-api/crm/erp-product-brand/delete?id=${id}` }) |
||||
} |
||||
|
||||
// 获得商品品牌
|
||||
export const getBrand = (id: number) => { |
||||
return request.get({ url: `/admin-api/crm/erp-product-brand/get?id=${id}` }) |
||||
} |
||||
|
||||
// 获得商品品牌列表
|
||||
export const getBrandParam = (params: PageParam) => { |
||||
return request.get({ url: '/admin-api/crm/erp-product-brand/page', params }) |
||||
} |
||||
|
||||
// 获得商品品牌精简信息列表
|
||||
export const getSimpleBrandList = () => { |
||||
return request.get({ url: '/admin-api/crm/erp-product-brand/simple-list' }) |
||||
} |
@ -0,0 +1,69 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
/** |
||||
* 产品分类 |
||||
*/ |
||||
export interface CategoryVO { |
||||
/** |
||||
* 分类编号 |
||||
*/ |
||||
id?: number |
||||
/** |
||||
* 父分类编号 |
||||
*/ |
||||
parentId?: number |
||||
/** |
||||
* 分类名称 |
||||
*/ |
||||
name: string |
||||
/** |
||||
* 移动端分类图 |
||||
*/ |
||||
picUrl: string |
||||
/** |
||||
* PC 端分类图 |
||||
*/ |
||||
bigPicUrl?: string |
||||
/** |
||||
* 分类排序 |
||||
*/ |
||||
sort: number |
||||
/** |
||||
* 开启状态 |
||||
*/ |
||||
status: number |
||||
} |
||||
|
||||
// 创建商品分类
|
||||
export const createCategory = (data: CategoryVO) => { |
||||
return request.post({ |
||||
url: '/admin-api/crm/erp-product-category/create', |
||||
data, |
||||
isSubmitForm: true |
||||
}) |
||||
} |
||||
|
||||
// 更新商品分类
|
||||
export const updateCategory = (data: CategoryVO) => { |
||||
return request.put({ url: '/admin-api/crm/erp-product-category/update', data }) |
||||
} |
||||
|
||||
// 删除商品分类
|
||||
export const deleteCategory = (id: number) => { |
||||
return request.delete({ url: `/admin-api/crm/erp-product-category/delete?id=${id}` }) |
||||
} |
||||
|
||||
// 获得商品分类
|
||||
export const getCategory = (id: number) => { |
||||
return request.get({ url: `/admin-api/crm/erp-product-category/get?id=${id}` }) |
||||
} |
||||
|
||||
// 获得商品分类列表
|
||||
export const getCategoryList = (params: any) => { |
||||
return request.get({ url: '/admin-api/crm/erp-product-category/list', params }) |
||||
} |
||||
|
||||
// 获得商品分类列表
|
||||
export const getCategorySimpleList = (params: any) => { |
||||
return request.get({ url: '/admin-api/crm/erp-product-category/simple-list', params }) |
||||
} |
@ -0,0 +1,33 @@ |
||||
import request from '@/config/axios' |
||||
// 查询列表
|
||||
export const getProductPage = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/erp-product/page', params }) |
||||
} |
||||
|
||||
// 查询详情
|
||||
export const getProduct = async (id) => { |
||||
return await request.get({ url: '/admin-api/crm/erp-product/get?id=' + id }) |
||||
} |
||||
|
||||
// 新增
|
||||
export const createProduct = async (data) => { |
||||
return await request.post({ |
||||
url: '/admin-api/crm/erp-product/create', |
||||
data: data, |
||||
isSubmitForm: true |
||||
}) |
||||
} |
||||
|
||||
// 修改
|
||||
export const updateProduct = async (params) => { |
||||
return await request.put({ url: '/admin-api/crm/erp-product/update', data: params }) |
||||
} |
||||
|
||||
// 删除
|
||||
export const deleteProduct = async (id) => { |
||||
return await request.delete({ url: '/admin-api/crm/erp-product/delete?id=' + id }) |
||||
} |
||||
|
||||
export const getSimpleProductList = async () => { |
||||
return await request.get({ url: '/admin-api/crm/erp-product/simple-list' }) |
||||
} |
@ -0,0 +1,44 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
// 创建
|
||||
export const createField = (data) => { |
||||
return request.post({ |
||||
url: '/admin-api/crm/param/create', |
||||
data: { ...data, module: 3 }, |
||||
isSubmitForm: true |
||||
}) |
||||
} |
||||
|
||||
// 更新
|
||||
export const updateField = (data) => { |
||||
return request.put({ url: '/admin-api/crm/param/update', data }) |
||||
} |
||||
|
||||
// 删除
|
||||
export const deleteField = (id) => { |
||||
return request.delete({ url: `/admin-api/crm/param/delete?id=${id}` }) |
||||
} |
||||
|
||||
// 获得
|
||||
export const getField = (id) => { |
||||
return request.get({ url: `/admin-api/crm/param/get?id=${id}` }) |
||||
} |
||||
|
||||
// 获得精简信息列表
|
||||
export const getSimpleFieldList = () => { |
||||
return request.get({ url: '/admin-api/crm/param/simple-list', params: { module: 3 } }) |
||||
} |
||||
|
||||
// 获取自定义字段
|
||||
export const getDiyFieldList = () => { |
||||
return request.get({ url: '/admin-api/crm/param/get-diy-param', params: { module: 3 } }) |
||||
} |
||||
|
||||
// 状态修改
|
||||
export const updateFieldStatus = (signParamId, status) => { |
||||
const data = { |
||||
signParamId, |
||||
status |
||||
} |
||||
return request.put({ url: '/admin-api/crm/param/status/update', data: data }) |
||||
} |
@ -0,0 +1,107 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
/** |
||||
* 商品属性 |
||||
*/ |
||||
export interface PropertyVO { |
||||
id?: number |
||||
/** 名称 */ |
||||
name: string |
||||
/** 备注 */ |
||||
remark?: string |
||||
} |
||||
|
||||
/** |
||||
* 属性值 |
||||
*/ |
||||
export interface PropertyValueVO { |
||||
id?: number |
||||
/** 属性项的编号 */ |
||||
propertyId?: number |
||||
/** 名称 */ |
||||
name: string |
||||
/** 备注 */ |
||||
remark?: string |
||||
} |
||||
|
||||
/** |
||||
* 商品属性值的明细 |
||||
*/ |
||||
export interface PropertyValueDetailVO { |
||||
/** 属性项的编号 */ |
||||
propertyId: number // 属性的编号
|
||||
/** 属性的名称 */ |
||||
propertyName: string |
||||
/** 属性值的编号 */ |
||||
valueId: number |
||||
/** 属性值的名称 */ |
||||
valueName: string |
||||
} |
||||
|
||||
// ------------------------ 属性项 -------------------
|
||||
|
||||
// 创建属性项
|
||||
export const createProperty = (data: PropertyVO) => { |
||||
return request.post({ |
||||
url: '/admin-api/crm/erp-product-property/create', |
||||
data, |
||||
isSubmitForm: true |
||||
}) |
||||
} |
||||
|
||||
// 更新属性项
|
||||
export const updateProperty = (data: PropertyVO) => { |
||||
return request.put({ url: '/product/property/update', data }) |
||||
} |
||||
|
||||
// 删除属性项
|
||||
export const deleteProperty = (id: number) => { |
||||
return request.delete({ url: `/product/property/delete?id=${id}` }) |
||||
} |
||||
|
||||
// 获得属性项
|
||||
export const getProperty = (id: number): Promise<PropertyVO> => { |
||||
return request.get({ url: `/product/property/get?id=${id}` }) |
||||
} |
||||
|
||||
// 获得属性项分页
|
||||
export const getPropertyPage = (params: PageParam) => { |
||||
return request.get({ url: '/product/property/page', params }) |
||||
} |
||||
|
||||
// 获得属性项列表
|
||||
export const getPropertyList = (params: any) => { |
||||
return request.get({ url: '/product/property/list', params }) |
||||
} |
||||
|
||||
// 获得属性项列表
|
||||
export const getPropertyListAndValue = (data: any) => { |
||||
return request.post({ url: '/product/property/get-value-list', data }) |
||||
} |
||||
|
||||
// ------------------------ 属性值 -------------------
|
||||
|
||||
// 获得属性值分页
|
||||
export const getPropertyValuePage = (params: PageParam & any) => { |
||||
return request.get({ url: '/product/property/value/page', params }) |
||||
} |
||||
|
||||
// 获得属性值
|
||||
export const getPropertyValue = (id: number): Promise<PropertyValueVO> => { |
||||
return request.get({ url: `/product/property/value/get?id=${id}` }) |
||||
} |
||||
|
||||
// 创建属性值
|
||||
export const createPropertyValue = (data: PropertyValueVO) => { |
||||
return request.post({ url: '/admin-api/crm/erp-product-property-value/create', data }) |
||||
} |
||||
|
||||
// 更新属性值
|
||||
export const updatePropertyValue = (data: PropertyValueVO) => { |
||||
return request.put({ url: '/product/property/value/update', data }) |
||||
} |
||||
|
||||
// 删除属性值
|
||||
export const deletePropertyValue = (id: number) => { |
||||
return request.delete({ url: `/product/property/value/delete?id=${id}` }) |
||||
} |
@ -0,0 +1,29 @@ |
||||
import request from '@/config/axios' |
||||
// 查询列表
|
||||
export const getPurchasePage = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/erp-purchase/page', params }) |
||||
} |
||||
|
||||
// 新增
|
||||
export const createPurchase = async (data) => { |
||||
return await request.post({ |
||||
url: '/admin-api/crm/erp-purchase/create', |
||||
data: data, |
||||
isSubmitForm: true |
||||
}) |
||||
} |
||||
|
||||
// 修改
|
||||
export const updatePurchase = async (params) => { |
||||
return await request.put({ url: '/admin-api/crm/erp-purchase/update', data: params }) |
||||
} |
||||
|
||||
// 删除
|
||||
export const deletePurchase = async (id) => { |
||||
return await request.delete({ url: '/admin-api/crm/erp-purchase/delete?id=' + id }) |
||||
} |
||||
|
||||
// 审核
|
||||
export const auditPurchase = async (data) => { |
||||
return await request.post({ url: '/admin-api/crm/erp-purchase/audit', data }) |
||||
} |
@ -0,0 +1,40 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
export interface DeliveryExpressVO { |
||||
id: number |
||||
code: string |
||||
name: string |
||||
logo: string |
||||
sort: number |
||||
status: number |
||||
} |
||||
|
||||
// 查询快递公司列表
|
||||
export const getDeliveryExpressPage = async (params: PageParam) => { |
||||
return await request.get({ url: '/trade/delivery/express/page', params }) |
||||
} |
||||
|
||||
// 查询快递公司详情
|
||||
export const getDeliveryExpress = async (id: number) => { |
||||
return await request.get({ url: '/trade/delivery/express/get?id=' + id }) |
||||
} |
||||
|
||||
// 新增快递公司
|
||||
export const createDeliveryExpress = async (data: DeliveryExpressVO) => { |
||||
return await request.post({ url: '/trade/delivery/express/create', data }) |
||||
} |
||||
|
||||
// 修改快递公司
|
||||
export const updateDeliveryExpress = async (data: DeliveryExpressVO) => { |
||||
return await request.put({ url: '/trade/delivery/express/update', data }) |
||||
} |
||||
|
||||
// 删除快递公司
|
||||
export const deleteDeliveryExpress = async (id: number) => { |
||||
return await request.delete({ url: '/trade/delivery/express/delete?id=' + id }) |
||||
} |
||||
|
||||
// 导出快递公司 Excel
|
||||
export const exportDeliveryExpressApi = async (params) => { |
||||
return await request.download({ url: '/trade/delivery/express/export-excel', params }) |
||||
} |
@ -0,0 +1,54 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
export interface DeliveryExpressTemplateVO { |
||||
id: number |
||||
name: string |
||||
chargeMode: number |
||||
sort: number |
||||
templateCharge: ExpressTemplateChargeVO[] |
||||
templateFree: ExpressTemplateFreeVO[] |
||||
} |
||||
|
||||
export declare type ExpressTemplateChargeVO = { |
||||
areaIds: number[] |
||||
startCount: number |
||||
startPrice: number |
||||
extraCount: number |
||||
extraPrice: number |
||||
} |
||||
|
||||
export declare type ExpressTemplateFreeVO = { |
||||
areaIds: number[] |
||||
freeCount: number |
||||
freePrice: number |
||||
} |
||||
|
||||
// 查询快递运费模板列表
|
||||
export const getDeliveryExpressTemplatePage = async (params: PageParam) => { |
||||
return await request.get({ url: '/trade/delivery/express-template/page', params }) |
||||
} |
||||
|
||||
// 查询快递运费模板详情
|
||||
export const getDeliveryExpressTemplate = async (id: number) => { |
||||
return await request.get({ url: '/trade/delivery/express-template/get?id=' + id }) |
||||
} |
||||
|
||||
// 新增快递运费模板
|
||||
export const createDeliveryExpressTemplate = async (data: DeliveryExpressTemplateVO) => { |
||||
return await request.post({ url: '/trade/delivery/express-template/create', data }) |
||||
} |
||||
|
||||
// 修改快递运费模板
|
||||
export const updateDeliveryExpressTemplate = async (data: DeliveryExpressTemplateVO) => { |
||||
return await request.put({ url: '/trade/delivery/express-template/update', data }) |
||||
} |
||||
|
||||
// 删除快递运费模板
|
||||
export const deleteDeliveryExpressTemplate = async (id: number) => { |
||||
return await request.delete({ url: '/trade/delivery/express-template/delete?id=' + id }) |
||||
} |
||||
|
||||
// 导出快递运费模板 Excel
|
||||
export const exportDeliveryExpressTemplateApi = async (params) => { |
||||
return await request.download({ url: '/trade/delivery/express-template/export-excel', params }) |
||||
} |
@ -0,0 +1,49 @@ |
||||
import request from '@/config/axios' |
||||
// 查询列表
|
||||
export const getWarehousePage = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/erp-warehouse/page', params }) |
||||
} |
||||
|
||||
// 新增
|
||||
export const createWarehouse = async (data) => { |
||||
return await request.post({ |
||||
url: '/admin-api/crm/erp-warehouse/create', |
||||
data: data, |
||||
isSubmitForm: true |
||||
}) |
||||
} |
||||
|
||||
// 修改
|
||||
export const updateWarehouse = async (params) => { |
||||
return await request.put({ url: '/admin-api/crm/erp-warehouse/update', data: params }) |
||||
} |
||||
|
||||
// 删除
|
||||
export const deleteWarehouse = async (id) => { |
||||
return await request.delete({ url: '/admin-api/crm/erp-warehouse/delete?id=' + id }) |
||||
} |
||||
|
||||
// 获取仓库
|
||||
export const getWarehouse = async (id) => { |
||||
return await request.get({ url: '/admin-api/crm/erp-warehouse/get?id=' + id }) |
||||
} |
||||
|
||||
// 获取仓库列表
|
||||
export const getSimpleWarehouseList = async () => { |
||||
return await request.get({ url: '/admin-api/crm/erp-warehouse/simple-list' }) |
||||
} |
||||
|
||||
// 获取库存
|
||||
export const getInventoryList = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/erp-inventory/page', params }) |
||||
} |
||||
|
||||
// 获取库存变动记录
|
||||
export const getInventoryRecord = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/erp-inventory-record/page', params }) |
||||
} |
||||
|
||||
// 获取剩余库存
|
||||
export const getRemainInventoryList = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/erp-inventory-detail/list', params }) |
||||
} |
@ -0,0 +1,54 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
// 查询列表-分页
|
||||
export const getClassTypePage = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/sch-class-type/page', params }) |
||||
} |
||||
|
||||
export const getClassTypeList = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/sch-class-type/list', params }) |
||||
} |
||||
|
||||
// 查询详情
|
||||
export const getClassType = async (id) => { |
||||
return await request.get({ url: '/admin-api/crm/sch-class-type/get?id=' + id }) |
||||
} |
||||
|
||||
// 新增
|
||||
export const createClassType = async (data) => { |
||||
return await request.post({ |
||||
url: '/admin-api/crm/sch-class-type/create', |
||||
data: data, |
||||
isSubmitForm: true |
||||
}) |
||||
} |
||||
|
||||
// 修改
|
||||
export const updateClassType = async (params) => { |
||||
return await request.put({ url: '/admin-api/crm/sch-class-type/update', data: params }) |
||||
} |
||||
|
||||
// 删除
|
||||
export const deleteClassType = async (id) => { |
||||
return await request.delete({ url: '/admin-api/crm/sch-class-type/delete?id=' + id }) |
||||
} |
||||
|
||||
// 修改状态
|
||||
export const updateClassTypeStatus = async (data) => { |
||||
return request.put({ url: '/admin-api/crm/sch-class-type/status/update', data }) |
||||
} |
||||
|
||||
// 批量修改状态
|
||||
export const batchUpdateClassTypeStatus = async (data) => { |
||||
return request.put({ url: '/admin-api/crm/sch-class-type/status/batch-update', data }) |
||||
} |
||||
|
||||
// 批量删除
|
||||
export const batchDeleteClassType = async (ids) => { |
||||
return await request.delete({ url: '/admin-api/crm/sch-class-type/batch-delete?ids=' + ids }) |
||||
} |
||||
|
||||
// 获取提成结算参数
|
||||
export const getCommissionParams = async () => { |
||||
return await request.get({ url: '/admin-api/crm/sch-class-type/get-percentage-param' }) |
||||
} |
@ -0,0 +1,43 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
// 查询列表-分页
|
||||
export const getPlacePage = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/sch-place/page', params }) |
||||
} |
||||
|
||||
// 查询列表-不分页
|
||||
export const getPlaceList = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/sch-place/list', params }) |
||||
} |
||||
|
||||
// 查询详情
|
||||
export const getPlace = async (id) => { |
||||
return await request.get({ url: '/admin-api/crm/sch-place/get?id=' + id }) |
||||
} |
||||
|
||||
// 新增
|
||||
export const createPlace = async (data) => { |
||||
return await request.post({ |
||||
url: '/admin-api/crm/sch-place/create', |
||||
data: data, |
||||
isSubmitForm: true |
||||
}) |
||||
} |
||||
|
||||
// 修改
|
||||
export const updatePlace = async (params) => { |
||||
return await request.put({ url: '/admin-api/crm/sch-place/update', data: params }) |
||||
} |
||||
|
||||
// 删除
|
||||
export const deletePlace = async (id) => { |
||||
return await request.delete({ url: '/admin-api/crm/sch-place/delete?id=' + id }) |
||||
} |
||||
|
||||
export const updatePlaceStatus = async (placeId, status) => { |
||||
const data = { |
||||
placeId, |
||||
status |
||||
} |
||||
return request.put({ url: '/admin-api/crm/sch-place/status/update', data: data }) |
||||
} |
@ -0,0 +1,37 @@ |
||||
import request from '@/config/axios' |
||||
// 查询列表
|
||||
export const getSchoolPage = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/sch-school/page', params }) |
||||
} |
||||
|
||||
// 查询详情
|
||||
export const getSchool = async (id) => { |
||||
return await request.get({ url: '/admin-api/crm/sch-school/get?id=' + id }) |
||||
} |
||||
|
||||
// 新增
|
||||
export const createSchool = async (data) => { |
||||
return await request.post({ |
||||
url: '/admin-api/crm/sch-school/create', |
||||
data: data, |
||||
isSubmitForm: true |
||||
}) |
||||
} |
||||
|
||||
// 修改
|
||||
export const updateSchool = async (params) => { |
||||
return await request.put({ url: '/admin-api/crm/sch-school/update', data: params }) |
||||
} |
||||
|
||||
// 删除
|
||||
export const deleteSchool = async (id) => { |
||||
return await request.delete({ url: '/admin-api/crm/sch-school/delete?id=' + id }) |
||||
} |
||||
|
||||
export const updateSchoolStatus = async (schoolId, status) => { |
||||
const data = { |
||||
schoolId, |
||||
status |
||||
} |
||||
return request.put({ url: '/admin-api/crm/sch-school/status/update', data: data }) |
||||
} |
@ -0,0 +1,43 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
export interface DeptVO { |
||||
id?: number |
||||
name: string |
||||
parentId: number |
||||
status: number |
||||
sort: number |
||||
leaderUserId: number |
||||
phone: string |
||||
email: string |
||||
createTime: Date |
||||
} |
||||
|
||||
// 查询部门(精简)列表
|
||||
export const getSimpleDeptList = async (): Promise<DeptVO[]> => { |
||||
return await request.get({ url: '/admin-api/system/dept/list-all-simple' }) |
||||
} |
||||
|
||||
// 查询部门列表
|
||||
export const getDeptPage = async (params) => { |
||||
return await request.get({ url: '/admin-api/system/dept/list', params }) |
||||
} |
||||
|
||||
// 查询部门详情
|
||||
export const getDept = async (id: number) => { |
||||
return await request.get({ url: '/admin-api/system/dept/get?id=' + id }) |
||||
} |
||||
|
||||
// 新增部门
|
||||
export const createDept = async (data: DeptVO) => { |
||||
return await request.post({ url: '/admin-api/system/dept/create', data: data }) |
||||
} |
||||
|
||||
// 修改部门
|
||||
export const updateDept = async (params: DeptVO) => { |
||||
return await request.put({ url: '/admin-api/system/dept/update', data: params }) |
||||
} |
||||
|
||||
// 删除部门
|
||||
export const deleteDept = async (id: number) => { |
||||
return await request.delete({ url: '/admin-api/system/dept/delete?id=' + id }) |
||||
} |
@ -0,0 +1,49 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
export type DictDataVO = { |
||||
id: number | undefined |
||||
sort: number | undefined |
||||
label: string |
||||
value: string |
||||
dictType: string |
||||
status: number |
||||
colorType: string |
||||
cssClass: string |
||||
remark: string |
||||
createTime: Date |
||||
} |
||||
|
||||
// 查询字典数据(精简)列表
|
||||
export const listSimpleDictData = () => { |
||||
return request.get({ url: '/admin-api/oa/dict-data/simple-list' }) |
||||
} |
||||
|
||||
// 查询字典数据列表
|
||||
export const getDictDataPage = (params: PageParam) => { |
||||
return request.get({ url: '/admin-api/oa/dict-data/page', params }) |
||||
} |
||||
|
||||
// 查询字典数据详情
|
||||
export const getDictData = (id: number) => { |
||||
return request.get({ url: '/admin-api/oa/dict-data/get?id=' + id }) |
||||
} |
||||
|
||||
// 新增字典数据
|
||||
export const createDictData = (data: DictDataVO) => { |
||||
return request.post({ url: '/admin-api/oa/dict-data/create', data }) |
||||
} |
||||
|
||||
// 修改字典数据
|
||||
export const updateDictData = (data: DictDataVO) => { |
||||
return request.put({ url: '/admin-api/oa/dict-data/update', data }) |
||||
} |
||||
|
||||
// 删除字典数据
|
||||
export const deleteDictData = (id: number) => { |
||||
return request.delete({ url: '/admin-api/oa/dict-data/delete?id=' + id }) |
||||
} |
||||
|
||||
// 导出字典类型数据
|
||||
export const exportDictData = (params) => { |
||||
return request.get({ url: '/admin-api/oa/dict-data/export', params }) |
||||
} |
@ -0,0 +1,44 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
export type DictTypeVO = { |
||||
id: number | undefined |
||||
name: string |
||||
type: string |
||||
status: number |
||||
remark: string |
||||
createTime: Date |
||||
} |
||||
|
||||
// 查询字典(精简)列表
|
||||
export const getSimpleDictTypeList = () => { |
||||
return request.get({ url: '/admin-api/oa/dict-type/list-all-simple' }) |
||||
} |
||||
|
||||
// 查询字典列表
|
||||
export const getDictTypePage = (params: PageParam) => { |
||||
return request.get({ url: '/admin-api/oa/dict-type/page', params }) |
||||
} |
||||
|
||||
// 查询字典详情
|
||||
export const getDictType = (id: number) => { |
||||
return request.get({ url: '/admin-api/oa/dict-type/get?id=' + id }) |
||||
} |
||||
|
||||
// 新增字典
|
||||
export const createDictType = (data: DictTypeVO) => { |
||||
return request.post({ url: '/admin-api/oa/dict-type/create', data }) |
||||
} |
||||
|
||||
// 修改字典
|
||||
export const updateDictType = (data: DictTypeVO) => { |
||||
return request.put({ url: '/admin-api/oa/dict-type/update', data }) |
||||
} |
||||
|
||||
// 删除字典
|
||||
export const deleteDictType = (id: number) => { |
||||
return request.delete({ url: '/admin-api/oa/dict-type/delete?id=' + id }) |
||||
} |
||||
// 导出字典类型
|
||||
export const exportDictType = (params) => { |
||||
return request.get({ url: '/admin-api/oa/dict-type/export', params }) |
||||
} |
@ -0,0 +1,26 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
// 查询知识库列表
|
||||
export const getLibraryPage = (params) => { |
||||
return request.get({ url: '/admin-api/crm/knowledge-lib/page', params }) |
||||
} |
||||
|
||||
// 查询知识库详情
|
||||
export const getLibrary = (id) => { |
||||
return request.get({ url: '/admin-api/crm/knowledge-lib/get?id=' + id }) |
||||
} |
||||
|
||||
// 新增知识库
|
||||
export const createLibrary = (data) => { |
||||
return request.post({ url: '/admin-api/crm/knowledge-lib/create', data }) |
||||
} |
||||
|
||||
// 修改知识库
|
||||
export const updateLibrary = (data) => { |
||||
return request.put({ url: '/admin-api/crm/knowledge-lib/update', data }) |
||||
} |
||||
|
||||
// 删除知识库
|
||||
export const deleteLibrary = (id) => { |
||||
return request.delete({ url: '/admin-api/crm/knowledge-lib/delete?id=' + id }) |
||||
} |
@ -0,0 +1,26 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
// 查询资源列表
|
||||
export const getResourcePage = (params) => { |
||||
return request.get({ url: '/admin-api/crm/knowledge-lib-info/page', params }) |
||||
} |
||||
|
||||
// 查询资源详情
|
||||
export const getResource = (id) => { |
||||
return request.get({ url: '/admin-api/crm/knowledge-lib-info/get?id=' + id }) |
||||
} |
||||
|
||||
// 新增资源
|
||||
export const createResource = (data) => { |
||||
return request.post({ url: '/admin-api/crm/knowledge-lib-info/create', data }) |
||||
} |
||||
|
||||
// 修改资源
|
||||
export const updateResource = (data) => { |
||||
return request.put({ url: '/admin-api/crm/knowledge-lib-info/update', data }) |
||||
} |
||||
|
||||
// 删除资源
|
||||
export const deleteResource = (id) => { |
||||
return request.delete({ url: '/admin-api/crm/knowledge-lib-info/delete?id=' + id }) |
||||
} |
@ -0,0 +1,54 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
export interface MenuVO { |
||||
id: number |
||||
name: string |
||||
permission: string |
||||
type: number |
||||
sort: number |
||||
parentId: number |
||||
path: string |
||||
icon: string |
||||
component: string |
||||
componentName?: string |
||||
status: number |
||||
visible: boolean |
||||
keepAlive: boolean |
||||
alwaysShow?: boolean |
||||
createTime: Date |
||||
} |
||||
|
||||
// 获取服务列表
|
||||
export const getServiceAppList = () => { |
||||
return request.get({ url: '/admin-api/system/service/list' }) |
||||
} |
||||
|
||||
// 查询菜单(精简)列表
|
||||
export const getSimpleMenusList = () => { |
||||
return request.get({ url: '/admin-api/system/menu/list-all-simple' }) |
||||
} |
||||
|
||||
// 查询菜单列表
|
||||
export const getMenuList = (params) => { |
||||
return request.get({ url: '/admin-api/system/menu/list', params }) |
||||
} |
||||
|
||||
// 获取菜单详情
|
||||
export const getMenu = (id: number) => { |
||||
return request.get({ url: '/admin-api/system/menu/get?id=' + id }) |
||||
} |
||||
|
||||
// 新增菜单
|
||||
export const createMenu = (data: MenuVO) => { |
||||
return request.post({ url: '/admin-api/system/menu/create', data }) |
||||
} |
||||
|
||||
// 修改菜单
|
||||
export const updateMenu = (data: MenuVO) => { |
||||
return request.put({ url: '/admin-api/system/menu/update', data }) |
||||
} |
||||
|
||||
// 删除菜单
|
||||
export const deleteMenu = (id: number) => { |
||||
return request.delete({ url: '/admin-api/system/menu/delete?id=' + id }) |
||||
} |
@ -0,0 +1,50 @@ |
||||
import request from '@/config/axios' |
||||
import qs from 'qs' |
||||
|
||||
export interface NotifyMessageVO { |
||||
id: number |
||||
userId: number |
||||
userType: number |
||||
templateId: number |
||||
templateCode: string |
||||
templateNickname: string |
||||
templateContent: string |
||||
templateType: number |
||||
templateParams: string |
||||
readStatus: boolean |
||||
readTime: Date |
||||
} |
||||
|
||||
// 查询站内信消息列表
|
||||
export const getNotifyMessagePage = async (params: PageParam) => { |
||||
return await request.get({ url: '/admin-api/system/notify-message/page', params }) |
||||
} |
||||
|
||||
// 获得我的站内信分页
|
||||
export const getMyNotifyMessagePage = async (params: PageParam) => { |
||||
return await request.get({ url: '/admin-api/system/notify-message/my-page', params }) |
||||
} |
||||
|
||||
// 批量标记已读
|
||||
export const updateNotifyMessageRead = async (ids) => { |
||||
return await request.put({ |
||||
url: |
||||
'/admin-api/system/notify-message/update-read?' + |
||||
qs.stringify({ ids: ids }, { indices: false }) |
||||
}) |
||||
} |
||||
|
||||
// 标记所有站内信为已读
|
||||
export const updateAllNotifyMessageRead = async () => { |
||||
return await request.put({ url: '/admin-api/system/notify-message/update-all-read' }) |
||||
} |
||||
|
||||
// 获取当前用户的最新站内信列表
|
||||
export const getUnreadNotifyMessageList = async () => { |
||||
return await request.get({ url: '/admin-api/system/notify-message/get-unread-list' }) |
||||
} |
||||
|
||||
// 获得当前用户的未读站内信数量
|
||||
export const getUnreadNotifyMessageCount = async () => { |
||||
return await request.get({ url: '/admin-api/system/notify-message/get-unread-count' }) |
||||
} |
@ -0,0 +1,49 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
export interface NotifyTemplateVO { |
||||
id?: number |
||||
name: string |
||||
nickname: string |
||||
code: string |
||||
content: string |
||||
type: number |
||||
params: string |
||||
status: number |
||||
remark: string |
||||
} |
||||
|
||||
export interface NotifySendReqVO { |
||||
userId: number | null |
||||
templateCode: string |
||||
templateParams: Map<String, Object> |
||||
} |
||||
|
||||
// 查询站内信模板列表
|
||||
export const getNotifyTemplatePage = async (params: PageParam) => { |
||||
return await request.get({ url: '/system/notify-template/page', params }) |
||||
} |
||||
|
||||
// 查询站内信模板详情
|
||||
export const getNotifyTemplate = async (id: number) => { |
||||
return await request.get({ url: '/system/notify-template/get?id=' + id }) |
||||
} |
||||
|
||||
// 新增站内信模板
|
||||
export const createNotifyTemplate = async (data: NotifyTemplateVO) => { |
||||
return await request.post({ url: '/system/notify-template/create', data }) |
||||
} |
||||
|
||||
// 修改站内信模板
|
||||
export const updateNotifyTemplate = async (data: NotifyTemplateVO) => { |
||||
return await request.put({ url: '/system/notify-template/update', data }) |
||||
} |
||||
|
||||
// 删除站内信模板
|
||||
export const deleteNotifyTemplate = async (id: number) => { |
||||
return await request.delete({ url: '/system/notify-template/delete?id=' + id }) |
||||
} |
||||
|
||||
// 发送站内信
|
||||
export const sendNotify = (data: NotifySendReqVO) => { |
||||
return request.post({ url: '/system/notify-template/send-notify', data }) |
||||
} |
@ -0,0 +1,42 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
export interface PermissionAssignUserRoleReqVO { |
||||
userId: number |
||||
roleIds: number[] |
||||
} |
||||
|
||||
export interface PermissionAssignRoleMenuReqVO { |
||||
roleId: number |
||||
menuIds: number[] |
||||
} |
||||
|
||||
export interface PermissionAssignRoleDataScopeReqVO { |
||||
roleId: number |
||||
dataScope: number |
||||
dataScopeDeptIds: number[] |
||||
} |
||||
|
||||
// 查询角色拥有的菜单权限
|
||||
export const getRoleMenuList = async (roleId: number) => { |
||||
return await request.get({ url: '/admin-api/system/permission/list-role-menus?roleId=' + roleId }) |
||||
} |
||||
|
||||
// 赋予角色菜单权限
|
||||
export const assignRoleMenu = async (data: PermissionAssignRoleMenuReqVO) => { |
||||
return await request.post({ url: '/admin-api/system/permission/assign-role-menu', data }) |
||||
} |
||||
|
||||
// 赋予角色数据权限
|
||||
export const assignRoleDataScope = async (data: PermissionAssignRoleDataScopeReqVO) => { |
||||
return await request.post({ url: '/admin-api/system/permission/assign-role-data-scope', data }) |
||||
} |
||||
|
||||
// 查询用户拥有的角色数组
|
||||
export const getUserRoleList = async (userId: number) => { |
||||
return await request.get({ url: '/admin-api/system/permission/list-user-roles?userId=' + userId }) |
||||
} |
||||
|
||||
// 赋予用户角色
|
||||
export const assignUserRole = async (data: PermissionAssignUserRoleReqVO) => { |
||||
return await request.post({ url: '/admin-api/system/permission/assign-user-role', data }) |
||||
} |
@ -0,0 +1,53 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
export interface RoleVO { |
||||
id: number |
||||
name: string |
||||
code: string |
||||
sort: number |
||||
status: number |
||||
type: number |
||||
dataScope: number |
||||
dataScopeDeptIds: number[] |
||||
createTime: Date |
||||
} |
||||
|
||||
export interface UpdateStatusReqVO { |
||||
id: number |
||||
status: number |
||||
} |
||||
|
||||
// 查询角色列表
|
||||
export const getRolePage = async (params: PageParam) => { |
||||
return await request.get({ url: '/admin-api/system/role/page', params }) |
||||
} |
||||
|
||||
// 查询角色(精简)列表
|
||||
export const getSimpleRoleList = async () => { |
||||
return await request.get({ url: '/admin-api/system/role/list-all-simple' }) |
||||
} |
||||
|
||||
// 查询角色详情
|
||||
export const getRole = async (id: number) => { |
||||
return await request.get({ url: '/admin-api/system/role/get?id=' + id }) |
||||
} |
||||
|
||||
// 新增角色
|
||||
export const createRole = async (data: RoleVO) => { |
||||
return await request.post({ url: '/admin-api/system/role/create', data }) |
||||
} |
||||
|
||||
// 修改角色
|
||||
export const updateRole = async (data: RoleVO) => { |
||||
return await request.put({ url: '/admin-api/system/role/update', data }) |
||||
} |
||||
|
||||
// 删除角色
|
||||
export const deleteRole = async (id: number) => { |
||||
return await request.delete({ url: '/admin-api/system/role/delete?id=' + id }) |
||||
} |
||||
|
||||
// 角色用户
|
||||
export const getRoleUsers = async (params) => { |
||||
return await request.get({ url: '/admin-api/system/role/getUserByRole', params }) |
||||
} |
@ -0,0 +1,16 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
// 通过key,查询内容
|
||||
export const getConfigByConfigKey = (params) => { |
||||
return request.get({ url: '/admin-api/crm/config/getConfigByConfigKey', params }) |
||||
} |
||||
|
||||
// 保存配置项
|
||||
export const updateConfig = (data) => { |
||||
return request.put({ url: '/admin-api/crm/config/batchUpdateConfigValue', data }) |
||||
} |
||||
|
||||
// 根据模块获取配置列表
|
||||
export const getConfigList = (params) => { |
||||
return request.get({ url: '/admin-api/crm/config/query', params }) |
||||
} |
@ -0,0 +1,76 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
export interface UserVO { |
||||
id: number |
||||
username: string |
||||
nickname: string |
||||
deptId: number |
||||
postIds: string[] |
||||
email: string |
||||
mobile: string |
||||
sex: number |
||||
avatar: string |
||||
loginIp: string |
||||
status: number |
||||
remark: string |
||||
loginDate: Date |
||||
createTime: Date |
||||
} |
||||
|
||||
// 查询用户管理列表
|
||||
export const getUserPage = (params: PageParam) => { |
||||
return request.get({ url: '/admin-api/system/user/page', params }) |
||||
} |
||||
|
||||
// 查询用户详情
|
||||
export const getUser = (id: number) => { |
||||
return request.get({ url: '/admin-api/system/user/get?id=' + id }) |
||||
} |
||||
|
||||
// 新增用户
|
||||
export const createUser = (data: UserVO) => { |
||||
return request.post({ url: '/admin-api/system/user/create', data }) |
||||
} |
||||
|
||||
// 修改用户
|
||||
export const updateUser = (data: UserVO) => { |
||||
return request.put({ url: '/admin-api/system/user/update', data }) |
||||
} |
||||
|
||||
// 删除用户
|
||||
export const deleteUser = (id: number) => { |
||||
return request.delete({ url: '/admin-api/system/user/delete?id=' + id }) |
||||
} |
||||
|
||||
// 导出用户
|
||||
export const exportUser = (params) => { |
||||
return request.download({ url: '/admin-api/system/user/export', params }) |
||||
} |
||||
|
||||
// 下载用户导入模板
|
||||
export const importUserTemplate = () => { |
||||
return request.download({ url: '/admin-api/system/user/get-import-template' }) |
||||
} |
||||
|
||||
// 用户密码重置
|
||||
export const resetUserPwd = (id: number, password: string) => { |
||||
const data = { |
||||
id, |
||||
password |
||||
} |
||||
return request.put({ url: '/admin-api/system/user/update-password', data: data }) |
||||
} |
||||
|
||||
// 用户状态修改
|
||||
export const updateUserStatus = (id: number, status: number) => { |
||||
const data = { |
||||
id, |
||||
status |
||||
} |
||||
return request.put({ url: '/admin-api/system/user/update-status', data: data }) |
||||
} |
||||
|
||||
// 获取用户精简信息列表
|
||||
export const getSimpleUserList = (): Promise<UserVO[]> => { |
||||
return request.get({ url: '/admin-api/system/user/list-all-simple' }) |
||||
} |
@ -0,0 +1,77 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
export interface ProfileDept { |
||||
id: number |
||||
name: string |
||||
} |
||||
export interface ProfileRole { |
||||
id: number |
||||
name: string |
||||
} |
||||
export interface ProfilePost { |
||||
id: number |
||||
name: string |
||||
} |
||||
export interface SocialUser { |
||||
id: number |
||||
type: number |
||||
openid: string |
||||
token: string |
||||
rawTokenInfo: string |
||||
nickname: string |
||||
avatar: string |
||||
rawUserInfo: string |
||||
code: string |
||||
state: string |
||||
} |
||||
export interface ProfileVO { |
||||
id: number |
||||
username: string |
||||
nickname: string |
||||
dept: ProfileDept |
||||
roles: ProfileRole[] |
||||
posts: ProfilePost[] |
||||
socialUsers: SocialUser[] |
||||
email: string |
||||
mobile: string |
||||
sex: number |
||||
avatar: string |
||||
status: number |
||||
remark: string |
||||
loginIp: string |
||||
loginDate: Date |
||||
createTime: Date |
||||
} |
||||
|
||||
export interface UserProfileUpdateReqVO { |
||||
nickname: string |
||||
email: string |
||||
mobile: string |
||||
sex: number |
||||
} |
||||
|
||||
// 查询用户个人信息
|
||||
export const getUserProfile = () => { |
||||
return request.get({ url: '/admin-api/system/user/profile/get' }) |
||||
} |
||||
|
||||
// 修改用户个人信息
|
||||
export const updateUserProfile = (data: UserProfileUpdateReqVO) => { |
||||
return request.put({ url: '/admin-api/system/user/profile/update', data }) |
||||
} |
||||
|
||||
// 用户密码重置
|
||||
export const updateUserPassword = (oldPassword: string, newPassword: string) => { |
||||
return request.put({ |
||||
url: '/admin-api/system/user/profile/update-password', |
||||
data: { |
||||
oldPassword: oldPassword, |
||||
newPassword: newPassword |
||||
} |
||||
}) |
||||
} |
||||
|
||||
// 用户头像上传
|
||||
export const uploadAvatar = (data) => { |
||||
return request.upload({ url: '/admin-api/system/user/profile/update-avatar', data: data }) |
||||
} |
@ -0,0 +1,31 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
// 社交绑定,使用 code 授权码
|
||||
export const socialBind = (type, code, state) => { |
||||
return request.post({ |
||||
url: '/admin-api/system/social-user/bind', |
||||
data: { |
||||
type, |
||||
code, |
||||
state |
||||
} |
||||
}) |
||||
} |
||||
|
||||
// 取消社交绑定
|
||||
export const socialUnbind = (type, openid) => { |
||||
return request.delete({ |
||||
url: '/admin-api/system/social-user/unbind', |
||||
data: { |
||||
type, |
||||
openid |
||||
} |
||||
}) |
||||
} |
||||
|
||||
// 社交授权的跳转
|
||||
export const socialAuthRedirect = (type, redirectUri) => { |
||||
return request.get({ |
||||
url: '/admin-api/system/auth/social-auth-redirect?type=' + type + '&redirectUri=' + redirectUri |
||||
}) |
||||
} |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 6.1 KiB |
After Width: | Height: | Size: 341 B |
After Width: | Height: | Size: 357 B |
After Width: | Height: | Size: 353 B |
After Width: | Height: | Size: 350 B |
After Width: | Height: | Size: 358 B |
After Width: | Height: | Size: 355 B |
After Width: | Height: | Size: 903 B |
After Width: | Height: | Size: 958 B |
After Width: | Height: | Size: 926 B |
After Width: | Height: | Size: 926 B |
After Width: | Height: | Size: 950 B |
After Width: | Height: | Size: 970 B |
After Width: | Height: | Size: 7.7 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 669 B |
After Width: | Height: | Size: 335 B |
After Width: | Height: | Size: 731 B |
After Width: | Height: | Size: 2.2 KiB |