feat: 代码提交
@ -0,0 +1,21 @@
|
||||
node_modules
|
||||
.DS_Store
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
.eslintcache
|
||||
report.html
|
||||
|
||||
yarn.lock
|
||||
npm-debug.log*
|
||||
.pnpm-error.log*
|
||||
.pnpm-debug.log
|
||||
tests/**/coverage/
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
tsconfig.tsbuildinfo
|
@ -0,0 +1,14 @@
|
||||
# http://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
insert_final_newline = false
|
||||
trim_trailing_whitespace = false
|
@ -0,0 +1,11 @@
|
||||
public
|
||||
dist
|
||||
*.d.ts
|
||||
/src/assets
|
||||
package.json
|
||||
.eslintrc.js
|
||||
.prettierrc.js
|
||||
commitlint.config.js
|
||||
postcss.config.js
|
||||
tailwind.config.js
|
||||
stylelint.config.js
|
@ -0,0 +1,121 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
node: true
|
||||
},
|
||||
globals: {
|
||||
// Ref sugar (take 2)
|
||||
$: "readonly",
|
||||
$$: "readonly",
|
||||
$ref: "readonly",
|
||||
$shallowRef: "readonly",
|
||||
$computed: "readonly",
|
||||
|
||||
// index.d.ts
|
||||
// global.d.ts
|
||||
Fn: "readonly",
|
||||
PromiseFn: "readonly",
|
||||
RefType: "readonly",
|
||||
LabelValueOptions: "readonly",
|
||||
EmitType: "readonly",
|
||||
TargetContext: "readonly",
|
||||
ComponentElRef: "readonly",
|
||||
ComponentRef: "readonly",
|
||||
ElRef: "readonly",
|
||||
global: "readonly",
|
||||
ForDataType: "readonly",
|
||||
ComponentRoutes: "readonly",
|
||||
|
||||
// script setup
|
||||
defineProps: "readonly",
|
||||
defineEmits: "readonly",
|
||||
defineExpose: "readonly",
|
||||
withDefaults: "readonly",
|
||||
DC: false
|
||||
},
|
||||
extends: [
|
||||
"plugin:vue/vue3-essential",
|
||||
"eslint:recommended",
|
||||
"@vue/typescript/recommended",
|
||||
"@vue/prettier",
|
||||
"@vue/eslint-config-typescript"
|
||||
],
|
||||
parser: "vue-eslint-parser",
|
||||
parserOptions: {
|
||||
parser: "@typescript-eslint/parser",
|
||||
ecmaVersion: 2020,
|
||||
sourceType: "module",
|
||||
jsxPragma: "React",
|
||||
ecmaFeatures: {
|
||||
jsx: true
|
||||
}
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: ["*.ts", "*.vue"],
|
||||
rules: {
|
||||
"no-undef": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
files: ["*.vue"],
|
||||
parser: "vue-eslint-parser",
|
||||
parserOptions: {
|
||||
parser: "@typescript-eslint/parser",
|
||||
extraFileExtensions: [".vue"],
|
||||
ecmaVersion: "latest",
|
||||
ecmaFeatures: {
|
||||
jsx: true
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
"no-undef": "off"
|
||||
}
|
||||
}
|
||||
],
|
||||
rules: {
|
||||
"vue/no-v-html": "off",
|
||||
"vue/require-default-prop": "off",
|
||||
"vue/require-explicit-emits": "off",
|
||||
"vue/multi-word-component-names": "off",
|
||||
"@typescript-eslint/no-explicit-any": "off", // any
|
||||
"no-debugger": "off",
|
||||
"@typescript-eslint/explicit-module-boundary-types": "off", // setup()
|
||||
"@typescript-eslint/ban-types": "off",
|
||||
"@typescript-eslint/ban-ts-comment": "off",
|
||||
"@typescript-eslint/no-empty-function": "off",
|
||||
"@typescript-eslint/no-non-null-assertion": "off",
|
||||
"vue/html-self-closing": [
|
||||
"error",
|
||||
{
|
||||
html: {
|
||||
void: "always",
|
||||
normal: "always",
|
||||
component: "always"
|
||||
},
|
||||
svg: "always",
|
||||
math: "always"
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/no-unused-vars": [
|
||||
"error",
|
||||
{
|
||||
argsIgnorePattern: "^_",
|
||||
varsIgnorePattern: "^_"
|
||||
}
|
||||
],
|
||||
"no-unused-vars": [
|
||||
"error",
|
||||
{
|
||||
argsIgnorePattern: "^_",
|
||||
varsIgnorePattern: "^_"
|
||||
}
|
||||
],
|
||||
"prettier/prettier": [
|
||||
"error",
|
||||
{
|
||||
endOfLine: "auto"
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
@ -1,11 +1,21 @@
|
||||
# ---> Vue
|
||||
# gitignore template for Vue.js projects
|
||||
#
|
||||
# Recommended template: Node.gitignore
|
||||
node_modules
|
||||
.DS_Store
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
.eslintcache
|
||||
report.html
|
||||
|
||||
# TODO: where does this rule come from?
|
||||
docs/_book
|
||||
|
||||
# TODO: where does this rule come from?
|
||||
test/
|
||||
yarn.lock
|
||||
npm-debug.log*
|
||||
.pnpm-error.log*
|
||||
.pnpm-debug.log
|
||||
tests/**/coverage/
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
tsconfig.tsbuildinfo
|
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
# shellcheck source=./_/husky.sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npx --no-install commitlint --edit "$1"
|
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
command_exists () {
|
||||
command -v "$1" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
# Workaround for Windows 10, Git Bash and Pnpm
|
||||
if command_exists winpty && test -t 1; then
|
||||
exec < /dev/tty
|
||||
fi
|
@ -0,0 +1,8 @@
|
||||
module.exports = {
|
||||
"*.{js,jsx,ts,tsx}": ["eslint --fix", "prettier --write"],
|
||||
"{!(package)*.json}": ["prettier --write--parser json"],
|
||||
"package.json": ["prettier --write"],
|
||||
"*.vue": ["eslint --fix", "prettier --write", "stylelint --fix"],
|
||||
"*.{vue,css,scss,postcss,less}": ["stylelint --fix", "prettier --write"],
|
||||
"*.md": ["prettier --write"]
|
||||
};
|
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
. "$(dirname "$0")/common.sh"
|
||||
|
||||
[ -n "$CI" ] && exit 0
|
||||
|
||||
# Format and submit code according to lintstagedrc.js configuration
|
||||
npm run lint:lint-staged
|
||||
|
||||
npm run lint:pretty
|
@ -0,0 +1,11 @@
|
||||
{
|
||||
"default": true,
|
||||
"MD003": false,
|
||||
"MD033": false,
|
||||
"MD013": false,
|
||||
"MD001": false,
|
||||
"MD025": false,
|
||||
"MD024": false,
|
||||
"MD007": { "indent": 4 },
|
||||
"no-hard-tabs": false
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
shamefully-hoist=true
|
||||
strict-peer-dependencies=false
|
||||
shell-emulator=true
|
@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
bracketSpacing: true,
|
||||
singleQuote: false,
|
||||
arrowParens: "avoid",
|
||||
trailingComma: "none"
|
||||
};
|
@ -0,0 +1,4 @@
|
||||
/dist/*
|
||||
/public/*
|
||||
public/*
|
||||
src/style/reset.scss
|
@ -0,0 +1,18 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"christian-kohler.path-intellisense",
|
||||
"vscode-icons-team.vscode-icons",
|
||||
"davidanson.vscode-markdownlint",
|
||||
"ms-azuretools.vscode-docker",
|
||||
"stylelint.vscode-stylelint",
|
||||
"bradlc.vscode-tailwindcss",
|
||||
"dbaeumer.vscode-eslint",
|
||||
"esbenp.prettier-vscode",
|
||||
"redhat.vscode-yaml",
|
||||
"csstools.postcss",
|
||||
"mikestead.dotenv",
|
||||
"eamodio.gitlens",
|
||||
"antfu.iconify",
|
||||
"Vue.volar"
|
||||
]
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
{
|
||||
"editor.formatOnType": true,
|
||||
"editor.formatOnSave": true,
|
||||
"[vue]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"editor.tabSize": 2,
|
||||
"editor.formatOnPaste": true,
|
||||
"editor.guides.bracketPairs": "active",
|
||||
"files.autoSave": "off",
|
||||
"git.confirmSync": false,
|
||||
"workbench.startupEditor": "newUntitledFile",
|
||||
"editor.suggestSelection": "first",
|
||||
"editor.acceptSuggestionOnCommitCharacter": false,
|
||||
"css.lint.propertyIgnoredDueToDisplay": "ignore",
|
||||
"editor.quickSuggestions": {
|
||||
"other": true,
|
||||
"comments": true,
|
||||
"strings": true
|
||||
},
|
||||
"files.associations": {
|
||||
"editor.snippetSuggestions": "top"
|
||||
},
|
||||
"[css]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": "explicit"
|
||||
},
|
||||
"iconify.excludes": ["el"]
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
{
|
||||
"Vue3.0快速生成模板": {
|
||||
"scope": "vue",
|
||||
"prefix": "Vue3.0",
|
||||
"body": [
|
||||
"<template>",
|
||||
"\t<div>test</div>",
|
||||
"</template>\n",
|
||||
"<script lang='ts'>",
|
||||
"export default {",
|
||||
"\tsetup() {",
|
||||
"\t\treturn {}",
|
||||
"\t}",
|
||||
"}",
|
||||
"</script>\n",
|
||||
"<style lang='scss' scoped>\n",
|
||||
"</style>",
|
||||
"$2"
|
||||
],
|
||||
"description": "Vue3.0"
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"Vue3.2+快速生成模板": {
|
||||
"scope": "vue",
|
||||
"prefix": "Vue3.2+",
|
||||
"body": [
|
||||
"<script setup lang='ts'>",
|
||||
"</script>\n",
|
||||
"<template>",
|
||||
"\t<div>test</div>",
|
||||
"</template>\n",
|
||||
"<style lang='scss' scoped>\n",
|
||||
"</style>",
|
||||
"$2"
|
||||
],
|
||||
"description": "Vue3.2+"
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
{
|
||||
"Vue3.3+defineOptions快速生成模板": {
|
||||
"scope": "vue",
|
||||
"prefix": "Vue3.3+",
|
||||
"body": [
|
||||
"<script setup lang='ts'>",
|
||||
"defineOptions({",
|
||||
"\tname: ''",
|
||||
"})",
|
||||
"</script>\n",
|
||||
"<template>",
|
||||
"\t<div>test</div>",
|
||||
"</template>\n",
|
||||
"<style lang='scss' scoped>\n",
|
||||
"</style>",
|
||||
"$2"
|
||||
],
|
||||
"description": "Vue3.3+defineOptions快速生成模板"
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
FROM node:16-alpine as build-stage
|
||||
|
||||
WORKDIR /app
|
||||
RUN corepack enable
|
||||
RUN corepack prepare pnpm@7.32.1 --activate
|
||||
|
||||
RUN npm config set registry https://registry.npmmirror.com
|
||||
|
||||
COPY .npmrc package.json pnpm-lock.yaml ./
|
||||
RUN pnpm install --frozen-lockfile
|
||||
|
||||
COPY . .
|
||||
RUN pnpm build
|
||||
|
||||
FROM nginx:stable-alpine as production-stage
|
||||
|
||||
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
@ -1,3 +1,3 @@
|
||||
# KBQA-WEB
|
||||
# know_sub_web
|
||||
|
||||
深圳人社-知识图谱问答前端
|
||||
知识报送前端页面
|
@ -0,0 +1,31 @@
|
||||
/** 处理环境变量 */
|
||||
const warpperEnv = (envConf: Recordable): ViteEnv => {
|
||||
/** 此处为默认值 */
|
||||
const ret: ViteEnv = {
|
||||
VITE_PORT: 8848,
|
||||
VITE_PUBLIC_PATH: "",
|
||||
VITE_ROUTER_HISTORY: "",
|
||||
VITE_CDN: false,
|
||||
VITE_HIDE_HOME: "false",
|
||||
VITE_COMPRESSION: "none"
|
||||
};
|
||||
|
||||
for (const envName of Object.keys(envConf)) {
|
||||
let realName = envConf[envName].replace(/\\n/g, "\n");
|
||||
realName =
|
||||
realName === "true" ? true : realName === "false" ? false : realName;
|
||||
|
||||
if (envName === "VITE_PORT") {
|
||||
realName = Number(realName);
|
||||
}
|
||||
ret[envName] = realName;
|
||||
if (typeof realName === "string") {
|
||||
process.env[envName] = realName;
|
||||
} else if (typeof realName === "object") {
|
||||
process.env[envName] = JSON.stringify(realName);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
};
|
||||
|
||||
export { warpperEnv };
|
@ -0,0 +1,56 @@
|
||||
import { cdn } from "./cdn";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import { viteBuildInfo } from "./info";
|
||||
import svgLoader from "vite-svg-loader";
|
||||
import vueJsx from "@vitejs/plugin-vue-jsx";
|
||||
import { viteMockServe } from "vite-plugin-mock";
|
||||
import { configCompressPlugin } from "./compress";
|
||||
// import ElementPlus from "unplugin-element-plus/vite";
|
||||
import { visualizer } from "rollup-plugin-visualizer";
|
||||
import removeConsole from "vite-plugin-remove-console";
|
||||
import themePreprocessorPlugin from "@pureadmin/theme";
|
||||
import { genScssMultipleScopeVars } from "../src/layout/theme";
|
||||
|
||||
export function getPluginsList(
|
||||
command: string,
|
||||
VITE_CDN: boolean,
|
||||
VITE_COMPRESSION: ViteCompression
|
||||
) {
|
||||
const prodMock = true;
|
||||
const lifecycle = process.env.npm_lifecycle_event;
|
||||
return [
|
||||
vue(),
|
||||
// jsx、tsx语法支持
|
||||
vueJsx(),
|
||||
VITE_CDN ? cdn : null,
|
||||
configCompressPlugin(VITE_COMPRESSION),
|
||||
// 线上环境删除console
|
||||
removeConsole({ external: ["src/assets/iconfont/iconfont.js"] }),
|
||||
viteBuildInfo(),
|
||||
// 自定义主题
|
||||
themePreprocessorPlugin({
|
||||
scss: {
|
||||
multipleScopeVars: genScssMultipleScopeVars(),
|
||||
extract: true
|
||||
}
|
||||
}),
|
||||
// svg组件化支持
|
||||
svgLoader(),
|
||||
// ElementPlus({}),
|
||||
// mock支持
|
||||
viteMockServe({
|
||||
mockPath: "mock",
|
||||
localEnabled: command === "serve",
|
||||
prodEnabled: command !== "serve" && prodMock,
|
||||
injectCode: `
|
||||
import { setupProdMockServer } from './mockProdServer';
|
||||
setupProdMockServer();
|
||||
`,
|
||||
logger: false
|
||||
}),
|
||||
// 打包分析
|
||||
lifecycle === "report"
|
||||
? visualizer({ open: true, brotliSize: true, filename: "report.html" })
|
||||
: null
|
||||
];
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
module.exports = {
|
||||
ignores: [commit => commit.includes("init")],
|
||||
extends: ["@commitlint/config-conventional"],
|
||||
rules: {
|
||||
"body-leading-blank": [2, "always"],
|
||||
"footer-leading-blank": [1, "always"],
|
||||
"header-max-length": [2, "always", 108],
|
||||
"subject-empty": [2, "never"],
|
||||
"type-empty": [2, "never"],
|
||||
"type-enum": [
|
||||
2,
|
||||
"always",
|
||||
[
|
||||
"feat",
|
||||
"fix",
|
||||
"perf",
|
||||
"style",
|
||||
"docs",
|
||||
"test",
|
||||
"refactor",
|
||||
"build",
|
||||
"ci",
|
||||
"chore",
|
||||
"revert",
|
||||
"wip",
|
||||
"workflow",
|
||||
"types",
|
||||
"release"
|
||||
]
|
||||
]
|
||||
}
|
||||
};
|
@ -0,0 +1,88 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<meta name="renderer" content="webkit" />
|
||||
<meta name="viewport"
|
||||
content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" />
|
||||
<title>知识报送</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<script>
|
||||
window.process = {};
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app">
|
||||
<style>
|
||||
html,
|
||||
body,
|
||||
#app {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.loader,
|
||||
.loader::before,
|
||||
.loader::after {
|
||||
width: 2.5em;
|
||||
height: 2.5em;
|
||||
border-radius: 50%;
|
||||
animation: load-animation 1.8s infinite ease-in-out;
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
|
||||
.loader {
|
||||
position: relative;
|
||||
top: 0;
|
||||
margin: 80px auto;
|
||||
font-size: 10px;
|
||||
color: #406eeb;
|
||||
text-indent: -9999em;
|
||||
transform: translateZ(0);
|
||||
transform: translate(-50%, 0);
|
||||
animation-delay: -0.16s;
|
||||
}
|
||||
|
||||
.loader::before,
|
||||
.loader::after {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.loader::before {
|
||||
left: -3.5em;
|
||||
animation-delay: -0.32s;
|
||||
}
|
||||
|
||||
.loader::after {
|
||||
left: 3.5em;
|
||||
}
|
||||
|
||||
@keyframes load-animation {
|
||||
|
||||
0%,
|
||||
80%,
|
||||
100% {
|
||||
box-shadow: 0 2.5em 0 -1.3em;
|
||||
}
|
||||
|
||||
40% {
|
||||
box-shadow: 0 2.5em 0 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<div class="loader"></div>
|
||||
</div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -0,0 +1,66 @@
|
||||
// 根据角色动态生成路由
|
||||
import { MockMethod } from "vite-plugin-mock";
|
||||
|
||||
export default [
|
||||
{
|
||||
url: "/login",
|
||||
method: "post",
|
||||
response: ({ body }) => {
|
||||
if (body.username === "admin" && body.password === "admin123") {
|
||||
return {
|
||||
success: true,
|
||||
data: {
|
||||
username: "admin",
|
||||
// 一个用户可能有多个角色
|
||||
roles: ["admin"],
|
||||
accessToken: "eyJhbGciOiJIUzUxMiJ9.admin",
|
||||
refreshToken: "eyJhbGciOiJIUzUxMiJ9.adminRefresh",
|
||||
expires: "2023/10/30 00:00:00"
|
||||
}
|
||||
};
|
||||
} else if (body.username === "common" && body.password === "common123") {
|
||||
return {
|
||||
success: true,
|
||||
data: {
|
||||
username: "common",
|
||||
// 一个用户可能有多个角色
|
||||
roles: ["common"],
|
||||
accessToken: "eyJhbGciOiJIUzUxMiJ9.common",
|
||||
refreshToken: "eyJhbGciOiJIUzUxMiJ9.commonRefresh",
|
||||
expires: "2023/10/30 00:00:00"
|
||||
}
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
success: false,
|
||||
msg: "用户名密码错误"
|
||||
};
|
||||
}
|
||||
// if (body.username === "admin") {
|
||||
// return {
|
||||
// success: true,
|
||||
// data: {
|
||||
// username: "admin",
|
||||
// // 一个用户可能有多个角色
|
||||
// roles: ["admin"],
|
||||
// accessToken: "eyJhbGciOiJIUzUxMiJ9.admin",
|
||||
// refreshToken: "eyJhbGciOiJIUzUxMiJ9.adminRefresh",
|
||||
// expires: "2023/10/30 00:00:00"
|
||||
// }
|
||||
// };
|
||||
// } else {
|
||||
// return {
|
||||
// success: true,
|
||||
// data: {
|
||||
// username: "common",
|
||||
// // 一个用户可能有多个角色
|
||||
// roles: ["common"],
|
||||
// accessToken: "eyJhbGciOiJIUzUxMiJ9.common",
|
||||
// refreshToken: "eyJhbGciOiJIUzUxMiJ9.commonRefresh",
|
||||
// expires: "2023/10/30 00:00:00"
|
||||
// }
|
||||
// };
|
||||
// }
|
||||
}
|
||||
}
|
||||
] as MockMethod[];
|
@ -0,0 +1,27 @@
|
||||
import { MockMethod } from "vite-plugin-mock";
|
||||
|
||||
// 模拟刷新token接口
|
||||
export default [
|
||||
{
|
||||
url: "/refreshToken",
|
||||
method: "post",
|
||||
response: ({ body }) => {
|
||||
if (body.refreshToken) {
|
||||
return {
|
||||
success: true,
|
||||
data: {
|
||||
accessToken: "eyJhbGciOiJIUzUxMiJ9.newAdmin",
|
||||
refreshToken: "eyJhbGciOiJIUzUxMiJ9.newAdminRefresh",
|
||||
// `expires`选择这种日期格式是为了方便调试,后端直接设置时间戳或许更方便(每次都应该递增)。如果后端返回的是时间戳格式,前端开发请来到这个目录`src/utils/auth.ts`,把第`38`行的代码换成expires = data.expires即可。
|
||||
expires: "2023/10/30 23:59:59"
|
||||
}
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
success: false,
|
||||
data: {}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
] as MockMethod[];
|
@ -0,0 +1,145 @@
|
||||
{
|
||||
"name": "test-project",
|
||||
"version": "2.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "NODE_OPTIONS=--max-old-space-size=4096 vite",
|
||||
"serve": "pnpm dev",
|
||||
"build": "rimraf dist && NODE_OPTIONS=--max-old-space-size=8192 vite build",
|
||||
"build:staging": "rimraf dist && vite build --mode staging",
|
||||
"report": "rimraf dist && vite build",
|
||||
"preview": "vite preview",
|
||||
"preview:build": "pnpm build && vite preview",
|
||||
"typecheck": "tsc --noEmit && vue-tsc --noEmit --skipLibCheck",
|
||||
"svgo": "svgo -f src/assets/svg -o src/assets/svg",
|
||||
"cloc": "NODE_OPTIONS=--max-old-space-size=4096 cloc . --exclude-dir=node_modules --exclude-lang=YAML",
|
||||
"clean:cache": "rimraf node_modules && rimraf .eslintcache && pnpm install",
|
||||
"lint:eslint": "eslint --cache --max-warnings 0 \"{src,mock,build}/**/*.{vue,js,ts,tsx}\" --fix",
|
||||
"lint:prettier": "prettier --write \"src/**/*.{js,ts,json,tsx,css,scss,vue,html,md}\"",
|
||||
"lint:stylelint": "stylelint \"**/*.{html,vue,css,scss}\" --fix --cache --cache-location node_modules/.cache/stylelint/",
|
||||
"lint:lint-staged": "lint-staged -c ./.husky/lintstagedrc.js",
|
||||
"lint:pretty": "pretty-quick --staged",
|
||||
"lint": "pnpm lint:eslint && pnpm lint:prettier && pnpm lint:stylelint",
|
||||
"prepare": "husky install",
|
||||
"preinstall": "npx only-allow pnpm"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"not ie 11",
|
||||
"not op_mini all"
|
||||
],
|
||||
"dependencies": {
|
||||
"@antv/g6": "^4.8.24",
|
||||
"@pureadmin/descriptions": "^1.1.1",
|
||||
"@pureadmin/table": "^2.3.2",
|
||||
"@pureadmin/utils": "^1.9.6",
|
||||
"@vue/composition-api": "^1.7.2",
|
||||
"@vueuse/core": "^10.2.0",
|
||||
"@vueuse/motion": "^2.0.0",
|
||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||
"animate.css": "^4.1.1",
|
||||
"axios": "^1.4.0",
|
||||
"dayjs": "^1.11.8",
|
||||
"echarts": "^5.5.0",
|
||||
"element-plus": "2.3.6",
|
||||
"js-audio-recorder": "^1.0.7",
|
||||
"js-cookie": "^3.0.5",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
"mitt": "^3.0.0",
|
||||
"nprogress": "^0.2.0",
|
||||
"path": "^0.12.7",
|
||||
"pinia": "^2.1.4",
|
||||
"pinyin-pro": "^3.15.2",
|
||||
"qs": "^6.11.2",
|
||||
"recorder-js": "^1.0.7",
|
||||
"recorderx": "^2.0.2",
|
||||
"responsive-storage": "^2.2.0",
|
||||
"sortablejs": "^1.15.0",
|
||||
"uuid": "^9.0.1",
|
||||
"vue": "^3.3.4",
|
||||
"vue-echarts": "^6.6.9",
|
||||
"vue-router": "^4.2.2",
|
||||
"vue-types": "^5.1.0",
|
||||
"vue3-seamless-scroll": "^2.0.1",
|
||||
"wangeditor": "^4.7.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^17.6.6",
|
||||
"@commitlint/config-conventional": "^17.6.6",
|
||||
"@iconify-icons/ant-design": "^1.2.7",
|
||||
"@iconify-icons/ep": "^1.2.12",
|
||||
"@iconify-icons/icon-park-outline": "^1.2.11",
|
||||
"@iconify-icons/ri": "^1.2.9",
|
||||
"@iconify/vue": "^4.1.1",
|
||||
"@pureadmin/theme": "^3.1.0",
|
||||
"@types/js-cookie": "^3.0.3",
|
||||
"@types/mockjs": "^1.0.7",
|
||||
"@types/node": "^20.3.1",
|
||||
"@types/nprogress": "0.2.0",
|
||||
"@types/qs": "^6.9.7",
|
||||
"@types/sortablejs": "^1.15.1",
|
||||
"@typescript-eslint/eslint-plugin": "^5.60.0",
|
||||
"@typescript-eslint/parser": "^5.60.0",
|
||||
"@vitejs/plugin-vue": "^4.2.3",
|
||||
"@vitejs/plugin-vue-jsx": "^3.0.1",
|
||||
"@vue/eslint-config-prettier": "^7.1.0",
|
||||
"@vue/eslint-config-typescript": "^11.0.3",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"cloc": "^2.11.0",
|
||||
"cssnano": "^6.0.1",
|
||||
"eslint": "^8.43.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-vue": "^9.15.1",
|
||||
"husky": "^8.0.3",
|
||||
"lint-staged": "^13.2.2",
|
||||
"picocolors": "^1.0.0",
|
||||
"postcss": "^8.4.24",
|
||||
"postcss-html": "^1.5.0",
|
||||
"postcss-import": "^15.1.0",
|
||||
"postcss-scss": "^4.0.6",
|
||||
"prettier": "^2.8.8",
|
||||
"pretty-quick": "^3.1.3",
|
||||
"rimraf": "^5.0.1",
|
||||
"rollup-plugin-visualizer": "^5.9.2",
|
||||
"sass": "^1.63.6",
|
||||
"sass-loader": "^13.3.2",
|
||||
"stylelint": "^15.9.0",
|
||||
"stylelint-config-html": "^1.1.0",
|
||||
"stylelint-config-recess-order": "^4.2.0",
|
||||
"stylelint-config-recommended": "^12.0.0",
|
||||
"stylelint-config-recommended-scss": "^12.0.0",
|
||||
"stylelint-config-recommended-vue": "^1.4.0",
|
||||
"stylelint-config-standard": "^33.0.0",
|
||||
"stylelint-config-standard-scss": "^9.0.0",
|
||||
"stylelint-order": "^6.0.3",
|
||||
"stylelint-prettier": "^3.0.0",
|
||||
"stylelint-scss": "^5.0.1",
|
||||
"svgo": "^3.0.2",
|
||||
"tailwindcss": "^3.3.2",
|
||||
"terser": "^5.18.1",
|
||||
"typescript": "5.0.4",
|
||||
"vite": "^4.3.9",
|
||||
"vite-plugin-cdn-import": "^0.3.5",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-mock": "2.9.6",
|
||||
"vite-plugin-remove-console": "^2.1.1",
|
||||
"vite-svg-loader": "^4.0.0",
|
||||
"vue-eslint-parser": "^9.3.1",
|
||||
"vue-tsc": "^1.8.1"
|
||||
},
|
||||
"pnpm": {
|
||||
"peerDependencyRules": {
|
||||
"ignoreMissing": [
|
||||
"rollup",
|
||||
"webpack",
|
||||
"core-js"
|
||||
]
|
||||
},
|
||||
"allowedDeprecatedVersions": {
|
||||
"sourcemap-codec": "*",
|
||||
"w3c-hr-time": "*",
|
||||
"stable": "*"
|
||||
}
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
"postcss-import": {},
|
||||
"tailwindcss/nesting": {},
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
...(process.env.NODE_ENV === "production" ? { cssnano: {} } : {})
|
||||
}
|
||||
};
|
After Width: | Height: | Size: 1.1 KiB |
@ -0,0 +1,11 @@
|
||||
<svg width="30" height="32" viewBox="0 0 30 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M29.262 16.7252L23.5229 11.0259L20.9578 8.47347C20.9217 8.43538 20.8781 8.40503 20.8298 8.38428C20.7815 8.36354 20.7294 8.35284 20.6767 8.35284C20.6241 8.35284 20.572 8.36354 20.5237 8.38428C20.4753 8.40503 20.4318 8.43538 20.3956 8.47347L9.11646 19.6972C9.0244 19.7875 8.90027 19.8382 8.77094 19.8382C8.6416 19.8382 8.51747 19.7875 8.42542 19.6972L6.08291 17.3662C5.99207 17.2746 5.94114 17.151 5.94114 17.0224C5.94114 16.8937 5.99207 16.7701 6.08291 16.6785L15.4529 7.3546C15.5254 7.27699 15.5656 7.17499 15.5656 7.06906C15.5656 6.96313 15.5254 6.86112 15.4529 6.78351L12.9816 4.3826C12.9455 4.3445 12.9019 4.31415 12.8536 4.29341C12.8052 4.27267 12.7531 4.26196 12.7005 4.26196C12.6479 4.26196 12.5958 4.27267 12.5474 4.29341C12.4991 4.31415 12.4555 4.3445 12.4194 4.3826L0.121232 16.6203C0.0829476 16.6562 0.0524462 16.6996 0.0315998 16.7477C0.0107533 16.7958 0 16.8476 0 16.9C0 16.9524 0.0107533 17.0042 0.0315998 17.0523C0.0524462 17.1004 0.0829476 17.1437 0.121232 17.1797L5.83695 22.8906L8.40199 25.4314C8.47999 25.5035 8.5825 25.5435 8.68895 25.5435C8.7954 25.5435 8.89791 25.5035 8.97591 25.4314L20.2551 14.2077C20.2997 14.1633 20.3526 14.1281 20.4109 14.104C20.4692 14.08 20.5317 14.0676 20.5947 14.0676C20.6578 14.0676 20.7203 14.08 20.7786 14.104C20.8369 14.1281 20.8898 14.1633 20.9344 14.2077L23.2769 16.5387C23.3245 16.5813 23.3626 16.6334 23.3887 16.6916C23.4148 16.7499 23.4283 16.8129 23.4283 16.8767C23.4283 16.9404 23.4148 17.0035 23.3887 17.0617C23.3626 17.1199 23.3245 17.172 23.2769 17.2147L11.9977 28.45C11.9234 28.5243 11.8816 28.6249 11.8816 28.7297C11.8816 28.8346 11.9234 28.9352 11.9977 29.0094L14.4339 31.422C14.4701 31.4601 14.5136 31.4904 14.562 31.5112C14.6103 31.5319 14.6624 31.5426 14.715 31.5426C14.7677 31.5426 14.8198 31.5319 14.8681 31.5112C14.9164 31.4904 14.96 31.4601 14.9961 31.422L29.262 17.2962C29.3345 17.2186 29.3747 17.1166 29.3747 17.0107C29.3747 16.9048 29.3345 16.8028 29.262 16.7252Z" fill="url(#paint0_linear_562_16235)"/>
|
||||
<path d="M17.7134 1.99314L13.86 2.79733C13.839 2.80347 13.8199 2.81483 13.8045 2.83035C13.7892 2.84587 13.778 2.86504 13.7722 2.88603C13.7663 2.90703 13.7659 2.92917 13.771 2.95035C13.7762 2.97154 13.7866 2.99108 13.8015 3.00712L16.8467 6.02574C16.8572 6.04261 16.8719 6.05653 16.8893 6.06618C16.9067 6.07583 16.9263 6.0809 16.9463 6.0809C16.9662 6.0809 16.9858 6.07583 17.0032 6.06618C17.0207 6.05653 17.0353 6.04261 17.0458 6.02574L17.8657 2.19128C17.884 2.16893 17.8942 2.14109 17.8947 2.11226C17.8951 2.08343 17.8858 2.05529 17.8682 2.03238C17.8506 2.00948 17.8257 1.99315 17.7977 1.98603C17.7696 1.97891 17.7399 1.98141 17.7134 1.99314Z" fill="#C50F08"/>
|
||||
<path d="M19.5056 0.0356277L14.5278 1.35263C14.4812 1.36466 14.4387 1.3889 14.4047 1.42283C14.3707 1.45675 14.3464 1.49912 14.3345 1.54553C14.3225 1.59193 14.3233 1.64068 14.3367 1.6867C14.3501 1.73271 14.3756 1.77431 14.4107 1.80717L18.0533 5.43185C18.0849 5.46742 18.1258 5.49356 18.1715 5.50735C18.2171 5.52115 18.2657 5.52205 18.3119 5.50996C18.358 5.49788 18.3999 5.47328 18.4328 5.43891C18.4657 5.40454 18.4884 5.36175 18.4983 5.3153L19.8921 0.361966C19.9116 0.310297 19.9145 0.253924 19.9005 0.200539C19.8865 0.147153 19.8564 0.0993544 19.8141 0.0636642C19.7718 0.027974 19.7195 0.00612861 19.6643 0.00111125C19.6091 -0.00390611 19.5537 0.00814786 19.5056 0.0356277Z" fill="#FAEC18"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_562_16235" x1="12.2203" y1="25.3498" x2="17.9654" y2="5.36981" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#3785B7"/>
|
||||
<stop offset="0.69" stop-color="#2F3E8F"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 27 KiB |
@ -0,0 +1,22 @@
|
||||
{
|
||||
"Version": "1.0.0",
|
||||
"Title": "Admin",
|
||||
"FixedHeader": true,
|
||||
"HiddenSideBar": false,
|
||||
"MultiTagsCache": false,
|
||||
"KeepAlive": true,
|
||||
"Layout": "vertical",
|
||||
"Theme": "default",
|
||||
"DarkMode": false,
|
||||
"Grey": false,
|
||||
"Weak": false,
|
||||
"HideTabs": true,
|
||||
"SidebarStatus": true,
|
||||
"EpThemeColor": "#0052D9",
|
||||
"ShowLogo": true,
|
||||
"ShowModel": "smart",
|
||||
"MenuArrowIconNoTransition": true,
|
||||
"CachingAsyncRoutes": false,
|
||||
"TooltipEffect": "light",
|
||||
"ResponsiveStorageNameSpace": "responsive-"
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<el-config-provider :locale="currentLocale">
|
||||
<router-view />
|
||||
<ReDialog />
|
||||
</el-config-provider>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from "vue";
|
||||
import { ElConfigProvider } from "element-plus";
|
||||
import zhCn from "element-plus/lib/locale/lang/zh-cn";
|
||||
import { ReDialog } from "@/components/ReDialog";
|
||||
export default defineComponent({
|
||||
name: "app",
|
||||
components: {
|
||||
[ElConfigProvider.name]: ElConfigProvider,
|
||||
ReDialog
|
||||
},
|
||||
computed: {
|
||||
currentLocale() {
|
||||
return zhCn;
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
@ -0,0 +1,76 @@
|
||||
import { http } from "@/utils/http";
|
||||
|
||||
type Result = {
|
||||
success: boolean;
|
||||
data: Array<any>;
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 分页查询流程列表
|
||||
*/
|
||||
export const getFlowList = (data?: object) => {
|
||||
return http.request<Result>("get", "/know-sub/flow/list", {
|
||||
params: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 分页查询流程列表
|
||||
*/
|
||||
export const getFlowDetail = (data?: object) => {
|
||||
return http.request<Result>("get", "/know-sub/flow/getFlowDetail", {
|
||||
params: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 查询可选择的子库信息列表
|
||||
*/
|
||||
export const getOptionalBaseList = (data?: object) => {
|
||||
return http.request<Result>("get", "/know-sub/flow/optionalBaseList", {
|
||||
params: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 查看角色列表
|
||||
*/
|
||||
export const getRoleManageList = (data?: object) => {
|
||||
return http.request<Result>("get", "/know-sub/roleManage/list", {
|
||||
params: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 查看用户信息列表
|
||||
*/
|
||||
export const getUserList = (data?: object) => {
|
||||
return http.request<Result>("get", "/know-sub/user/list", {
|
||||
params: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 新建流程
|
||||
*/
|
||||
export const createProcess = (data?: object) => {
|
||||
return http.request<Result>("post", "/know-sub/flow/save", {
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 修改流程
|
||||
*/
|
||||
export const updateProcess = (data?: object) => {
|
||||
return http.request<Result>("post", "/know-sub/flow/update", {
|
||||
data
|
||||
});
|
||||
};
|
@ -0,0 +1,16 @@
|
||||
import { http } from "@/utils/http";
|
||||
|
||||
type Result = {
|
||||
success: boolean;
|
||||
data: Array<any>;
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 查询我的知识
|
||||
*/
|
||||
export const queryMyKnowledgeList = (data?: object) => {
|
||||
return http.request<Result>("get", "/know-sub/homepage/queryMyKnowledge", {
|
||||
params: data
|
||||
});
|
||||
};
|
@ -0,0 +1,81 @@
|
||||
import { http } from "@/utils/http";
|
||||
|
||||
/** 查询知识库分页 */
|
||||
|
||||
export const queryKnowledgePage = (data?: object) => {
|
||||
return http.request("get", "/know-sub/knowledge/queryKnowledgePage", {
|
||||
params: data
|
||||
});
|
||||
};
|
||||
/** 新增知识库*/
|
||||
export const saveKnowledge = (data?: object) => {
|
||||
return http.request("post", "/know-sub/knowledge/saveKnowledge", {
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
/** 修改知识库(*/
|
||||
export const updateKnowledge = (data?: object) => {
|
||||
return http.request("post", "/know-sub/knowledge/updateKnowledge", {
|
||||
data
|
||||
});
|
||||
};
|
||||
/** 分页查询部门信息列表 */
|
||||
|
||||
export const queryDeptManageList = (data?: object) => {
|
||||
return http.request("get", "/know-sub/deptManage/list", {
|
||||
params: data
|
||||
});
|
||||
};
|
||||
/** 分页查询应用子库 */
|
||||
|
||||
export const queryApplicationSubLibrary = (data?: object) => {
|
||||
return http.request("get", "/know-sub/applicationSubLibrary/list", {
|
||||
params: data
|
||||
});
|
||||
};
|
||||
/** 删除知识库 */
|
||||
|
||||
export const deleteKnowledge = (data?: object) => {
|
||||
return http.request("get", "/know-sub/knowledge/deleteKnowledge", {
|
||||
params: data
|
||||
});
|
||||
};
|
||||
/** 查看知识的详细信息 */
|
||||
|
||||
export const queryKnowledgeDetail = (data?: object) => {
|
||||
return http.request("get", "/know-sub/knowledge/queryKnowledgeDetail", {
|
||||
params: data
|
||||
});
|
||||
};
|
||||
/** 撤回知识库( */
|
||||
|
||||
export const recallKnowledge = (data?: object) => {
|
||||
return http.request("get", "/know-sub/knowledge/recallKnowledge", {
|
||||
params: data
|
||||
});
|
||||
};
|
||||
/** 撤回知识库( */
|
||||
|
||||
export const queryKnowledgeFlowRecord = (data?: object) => {
|
||||
return http.request(
|
||||
"get",
|
||||
"/know-sub/knowledgeFlow/queryKnowledgeFlowRecord",
|
||||
{
|
||||
params: data
|
||||
}
|
||||
);
|
||||
};
|
||||
/** 分页查询知识审批流程( */
|
||||
|
||||
export const queryKnowledgeFlowPage = (data?: object) => {
|
||||
return http.request("get", "/know-sub/knowledgeFlow/queryKnowledgeFlowPage", {
|
||||
params: data
|
||||
});
|
||||
};
|
||||
/** 审批知识流程(*/
|
||||
export const processKnowledgeFlow = (data?: object) => {
|
||||
return http.request("post", "/know-sub/knowledgeFlow/processKnowledgeFlow", {
|
||||
data
|
||||
});
|
||||
};
|
@ -0,0 +1,24 @@
|
||||
import { http } from "@/utils/http";
|
||||
|
||||
type Result = {
|
||||
success: boolean;
|
||||
data?: {
|
||||
/** 列表数据 */
|
||||
list: Array<any>;
|
||||
};
|
||||
};
|
||||
|
||||
/** 卡片列表 */
|
||||
export const getCardList = (data?: object) => {
|
||||
return http.request<Result>("post", "/getCardList", { data });
|
||||
};
|
||||
|
||||
/** 版本日志 */
|
||||
export const getReleases = () => {
|
||||
return http.request<Result>("get", "/releases");
|
||||
};
|
||||
|
||||
/** 平台算法库 */
|
||||
export const getAlgorithmList = (data?: object) => {
|
||||
return http.request<Result>("post", "/algorithmList", { data });
|
||||
};
|
@ -0,0 +1,10 @@
|
||||
import { http } from "@/utils/http";
|
||||
|
||||
type Result = {
|
||||
success: boolean;
|
||||
data: Array<any>;
|
||||
};
|
||||
|
||||
export const getAsyncRoutes = () => {
|
||||
return http.request<Result>("get", "/getAsyncRoutes");
|
||||
};
|
@ -0,0 +1,240 @@
|
||||
import { http } from "@/utils/http";
|
||||
|
||||
type Result = {
|
||||
success: boolean;
|
||||
data: Array<any>;
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 分页查询应用子库
|
||||
*/
|
||||
export const getSubLibraryList = (data?: object) => {
|
||||
return http.request<Result>("get", "/know-sub/applicationSubLibrary/list", {
|
||||
params: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 分页查询部门信息列表
|
||||
*/
|
||||
export const getDeptManageList = (data?: object) => {
|
||||
return http.request<Result>("get", "/know-sub/deptManage/list", {
|
||||
params: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 新建子库
|
||||
*/
|
||||
export const createSubLibrary = (data?: object) => {
|
||||
return http.request<Result>("post", "/know-sub/applicationSubLibrary/save", {
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 修改子库
|
||||
*/
|
||||
export const updateSubLibrary = (data?: object) => {
|
||||
return http.request<Result>(
|
||||
"post",
|
||||
"/know-sub/applicationSubLibrary/update",
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 查看用户信息列表
|
||||
*/
|
||||
export const getUserList = (data?: object) => {
|
||||
return http.request<Result>("get", "/know-sub/user/list", {
|
||||
params: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 新增用户信息
|
||||
*/
|
||||
export const saveUserInfo = (data?: object) => {
|
||||
return http.request<Result>("post", "/know-sub/user/saveUserInfo", {
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 修改用户信息
|
||||
*/
|
||||
export const updateUserInfo = (data?: object) => {
|
||||
return http.request<Result>("post", "/know-sub/user/update", {
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 下载文件
|
||||
*/
|
||||
export function downloadFile(id) {
|
||||
return `/know-sub/file/downloadFile?fileId=${id}`;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 重置用户密码
|
||||
*/
|
||||
export const resetPW = (data?: object) => {
|
||||
return http.request<Result>("put", "/know-sub/user/resetPW", {
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 删除用户
|
||||
*/
|
||||
export const deletePW = (data?: object) => {
|
||||
return http.request<Result>("delete", "/know-sub/user/delete", {
|
||||
params: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 新建部门
|
||||
*/
|
||||
export const createDeptManage = (data?: object) => {
|
||||
return http.request<Result>("post", "/know-sub/deptManage/save", {
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 修改部门
|
||||
*/
|
||||
export const updateDeptManage = (data?: object) => {
|
||||
return http.request<Result>("post", "/know-sub/deptManage/update", {
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 删除部门
|
||||
*/
|
||||
export const deleteDeptManage = (data?: object) => {
|
||||
return http.request<Result>("delete", "/know-sub/deptManage/delete", {
|
||||
params: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 分页查询字典信息列表
|
||||
*/
|
||||
export const getDicManageList = (data?: object) => {
|
||||
return http.request<Result>("get", "/know-sub/dicManage/list", {
|
||||
params: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 增加字典信息
|
||||
*/
|
||||
export const createSaveDic = (data?: object) => {
|
||||
return http.request<Result>("post", "/know-sub/dicManage/saveDic", {
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 查询字典配置信息列表
|
||||
*/
|
||||
export const queryDicDateList = (data?: object) => {
|
||||
return http.request<Result>("get", "/know-sub/dicManage/queryDicDate", {
|
||||
params: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 保存字典值配置信息
|
||||
*/
|
||||
export const createSaveDicData = (data?: object) => {
|
||||
return http.request<Result>(
|
||||
"post",
|
||||
`/know-sub/dicManage/saveDicData?dicId=${
|
||||
(data as { dicId: string }).dicId
|
||||
}`,
|
||||
{
|
||||
data: (data as { dicDataReqVos: object }).dicDataReqVos
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 删除字典信息
|
||||
*/
|
||||
export const deleteDicManage = (data?: object) => {
|
||||
return http.request<Result>("delete", "/know-sub/dicManage/delete", {
|
||||
params: data
|
||||
});
|
||||
};
|
||||
/**
|
||||
*
|
||||
* @returns 新增角色
|
||||
*/
|
||||
export const createRole = (data?: object) => {
|
||||
return http.request<Result>("post", "/know-sub/roleManage/save", {
|
||||
data
|
||||
});
|
||||
};
|
||||
/**
|
||||
*
|
||||
* @returns 查看角色列表
|
||||
*/
|
||||
export const queryRoleDateList = (data?: object) => {
|
||||
return http.request<Result>("get", "/know-sub/roleManage/list", {
|
||||
params: data
|
||||
});
|
||||
};
|
||||
/**
|
||||
*
|
||||
* @returns 修改角色
|
||||
*/
|
||||
export const updateRole = (data?: object) => {
|
||||
return http.request<Result>("post", "/know-sub/roleManage/update", {
|
||||
data
|
||||
});
|
||||
};
|
||||
/**
|
||||
*
|
||||
* @returns 删除角色
|
||||
*/
|
||||
export const deleteRole = (data?: object) => {
|
||||
return http.request<Result>("delete", "/know-sub/roleManage/delete", {
|
||||
params: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 修改用户状态
|
||||
*/
|
||||
export const updateUserStatus = (data?: object) => {
|
||||
return http.request<Result>("post", "/know-sub/user/updateUserStatus", {
|
||||
data
|
||||
});
|
||||
};
|
@ -0,0 +1,32 @@
|
||||
import { http } from "@/utils/http";
|
||||
|
||||
/** 查询字典树 */
|
||||
export const queryCommonDictTree = (data?: object) => {
|
||||
return http.request(
|
||||
"get",
|
||||
"/virtual-patient-manage/commonDic/queryCommonDictTree",
|
||||
{
|
||||
params: data
|
||||
}
|
||||
);
|
||||
};
|
||||
/** 上传文件*/
|
||||
|
||||
export const uploadFile = (data?: object) => {
|
||||
return http.request(
|
||||
"post",
|
||||
"/know-sub/file/upload",
|
||||
{ data },
|
||||
{ headers: { "Content-Type": "multipart/form-data" } }
|
||||
);
|
||||
};
|
||||
|
||||
export const loadFileBase64 = (data?: object) => {
|
||||
return http.request(
|
||||
"get",
|
||||
"/virtual-patient-manage/fileManage/loadFileBase64",
|
||||
{
|
||||
params: data
|
||||
}
|
||||
);
|
||||
};
|
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 609 B |
After Width: | Height: | Size: 1.1 MiB |
After Width: | Height: | Size: 190 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 1.3 KiB |
@ -0,0 +1,26 @@
|
||||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 2208059 */
|
||||
src: url("iconfont.woff2?t=1671895108120") format("woff2"),
|
||||
url("iconfont.woff?t=1671895108120") format("woff"),
|
||||
url("iconfont.ttf?t=1671895108120") format("truetype");
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.pure-iconfont-tabs:before {
|
||||
content: "\e63e";
|
||||
}
|
||||
|
||||
.pure-iconfont-logo:before {
|
||||
content: "\e620";
|
||||
}
|
||||
|
||||
.pure-iconfont-new:before {
|
||||
content: "\e615";
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
{
|
||||
"id": "2208059",
|
||||
"name": "pure-admin",
|
||||
"font_family": "iconfont",
|
||||
"css_prefix_text": "pure-iconfont-",
|
||||
"description": "pure-admin-iconfont",
|
||||
"glyphs": [
|
||||
{
|
||||
"icon_id": "20594647",
|
||||
"name": "Tabs",
|
||||
"font_class": "tabs",
|
||||
"unicode": "e63e",
|
||||
"unicode_decimal": 58942
|
||||
},
|
||||
{
|
||||
"icon_id": "22129506",
|
||||
"name": "PureLogo",
|
||||
"font_class": "logo",
|
||||
"unicode": "e620",
|
||||
"unicode_decimal": 58912
|
||||
},
|
||||
{
|
||||
"icon_id": "7795615",
|
||||
"name": "New",
|
||||
"font_class": "new",
|
||||
"unicode": "e615",
|
||||
"unicode_decimal": 58901
|
||||
}
|
||||
]
|
||||
}
|
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 515 B |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 512 B |
After Width: | Height: | Size: 1.3 KiB |
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" class="icon" viewBox="0 0 1024 1024"><path fill="#386BF3" d="M410.558.109c0 210.974-300.876 361.752-300.876 633.548 0 174.943 134.704 316.787 300.876 316.787s300.877-141.817 300.877-316.787C711.408 361.752 410.558 210.974 410.558.109z"/><path fill="#C3D2FB" d="M613.469 73.665c0 211.055-300.877 361.914-300.877 633.547C312.592 882.156 447.296 1024 613.47 1024s300.876-141.817 300.876-316.788C914.29 435.58 613.469 284.72 613.469 73.665z"/><path fill="#303F5B" d="M312.592 707.212c0-183.713 137.636-312.171 226.723-441.39 81.702 106.112 172.12 218.74 172.12 367.726A309.755 309.755 0 0 1 420.36 950.064a323.114 323.114 0 0 1-107.769-242.852z"/></svg>
|
After Width: | Height: | Size: 712 B |
After Width: | Height: | Size: 191 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 133 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 2.0 MiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 9.2 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 13 KiB |