2.0 alpha
2
admin-web/typescript-ant-design-vue/.env
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
VITE_APP_PROJECT_TITLE = 'SmartAdmin'
|
||||
7
admin-web/typescript-ant-design-vue/.env.development
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
VITE_APP_API_URL = 'http://localhost:10086/api'
|
||||
|
||||
VITE_APP_PROJECT_TITLE = 'SmartAdmin Dev'
|
||||
|
||||
VITE_APP_PROFILE = 'dev'
|
||||
VITE_APP_MODE = 'development'
|
||||
7
admin-web/typescript-ant-design-vue/.env.localhost
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
VITE_APP_API_URL = 'http://127.0.0.1:10086/admin'
|
||||
|
||||
VITE_APP_PROJECT_TITLE = 'SmartAdmin Localhost'
|
||||
|
||||
VITE_APP_PROFILE = 'local'
|
||||
VITE_APP_MODE = 'local'
|
||||
8
admin-web/typescript-ant-design-vue/.env.pre
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
VITE_APP_API_URL = 'http://localhost:10086/api'
|
||||
|
||||
VITE_APP_PROJECT_TITLE = 'SmartAdmin PRE'
|
||||
|
||||
VITE_APP_PROFILE = 'pre'
|
||||
|
||||
VITE_APP_MODE = 'development'
|
||||
6
admin-web/typescript-ant-design-vue/.env.production
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
VITE_APP_API_URL = 'http://localhost:10086/api'
|
||||
|
||||
VITE_APP_PROFILE = 'prod'
|
||||
|
||||
VITE_APP_MODE = 'production'
|
||||
7
admin-web/typescript-ant-design-vue/.env.sit
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
VITE_APP_API_URL = 'http://sit-xmf-crm.renminyixue.cn/api/admin'
|
||||
|
||||
VITE_APP_PROJECT_TITLE = 'SmartAdmin Sit'
|
||||
|
||||
VITE_APP_PROFILE = 'sit'
|
||||
VITE_APP_MODE = 'development'
|
||||
17
admin-web/typescript-ant-design-vue/.eslintignore
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
*.sh
|
||||
node_modules
|
||||
lib
|
||||
*.md
|
||||
*.woff
|
||||
*.ttf
|
||||
.vscode
|
||||
.idea
|
||||
dist
|
||||
public
|
||||
/docs
|
||||
.husky
|
||||
.local
|
||||
/bin
|
||||
Dockerfile
|
||||
src/assets
|
||||
76
admin-web/typescript-ant-design-vue/.eslintrc.js
Normal file
@@ -0,0 +1,76 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
browser: true,
|
||||
es2021: true,
|
||||
node: true,
|
||||
},
|
||||
parser: 'vue-eslint-parser',
|
||||
parserOptions: {
|
||||
ecmaVersion: 12,
|
||||
parser: '@typescript-eslint/parser',
|
||||
sourceType: 'module',
|
||||
},
|
||||
extends: [
|
||||
'plugin:vue/vue3-essential',
|
||||
'eslint:recommended',
|
||||
'plugin:vue/base'
|
||||
],
|
||||
globals: {
|
||||
defineProps: "readonly",
|
||||
defineEmits: "readonly",
|
||||
defineExpose: "readonly",
|
||||
withDefaults: "readonly"
|
||||
},
|
||||
plugins: ['vue', '@typescript-eslint'],
|
||||
rules: {
|
||||
'@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',
|
||||
// we are only using this rule to check for unused arguments since TS
|
||||
// catches unused variables but not args.
|
||||
{ varsIgnorePattern: '.*', args: 'none' }
|
||||
],
|
||||
'no-unused-vars': [
|
||||
'error',
|
||||
// we are only using this rule to check for unused arguments since TS
|
||||
// catches unused variables but not args.
|
||||
{ varsIgnorePattern: '.*', args: 'none' }
|
||||
],
|
||||
'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/html-self-closing': [
|
||||
'error',
|
||||
{
|
||||
html: {
|
||||
void: 'always',
|
||||
normal: 'never',
|
||||
component: 'always',
|
||||
},
|
||||
svg: 'always',
|
||||
math: 'always',
|
||||
},
|
||||
],
|
||||
// Enable vue/script-setup-uses-vars rule
|
||||
'vue/script-setup-uses-vars': 'error',
|
||||
}
|
||||
};
|
||||
6
admin-web/typescript-ant-design-vue/.gitignore
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
node_modules
|
||||
.DS_Store
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
.idea
|
||||
21
admin-web/typescript-ant-design-vue/.prettierrc.js
Normal file
@@ -0,0 +1,21 @@
|
||||
module.exports = {
|
||||
printWidth: 150,// 每行字符长度
|
||||
tabWidth: 2,// 缩进空格数
|
||||
useTabs: false,//不用tab缩进
|
||||
semi: true,//// 在语句末尾打印分号
|
||||
singleQuote: true,// 使用单引号而不是双引号
|
||||
vueIndentScriptAndStyle: true,//Vue文件脚本和样式标签缩进
|
||||
quoteProps: 'as-needed',// 更改引用对象属性的时间 可选值"<as-needed|consistent|preserve>"
|
||||
jsxSingleQuote: false,// 在JSX中使用单引号而不是双引号
|
||||
trailingComma: 'es5',//多行时尽可能打印尾随逗号。(例如,单行数组永远不会出现逗号结尾。) 可选值"<none|es5|all>",默认none
|
||||
bracketSpacing: true,// 在对象文字中的括号之间打印空格
|
||||
jsxBracketSameLine: false,//jsx 标签的反尖括号需要换行
|
||||
arrowParens: 'always',// 在单独的箭头函数参数周围包括括号 always:(x) => x \ avoid:x => x
|
||||
rangeStart: 0,// 这两个选项可用于格式化以给定字符偏移量(分别包括和不包括)开始和结束的代码
|
||||
rangeEnd: Infinity,
|
||||
requirePragma: false,// 指定要使用的解析器,不需要写文件开头的 @prettier
|
||||
insertPragma: false,// 不需要自动在文件开头插入 @prettier
|
||||
proseWrap: 'preserve',// 使用默认的折行标准 always\never\preserve
|
||||
htmlWhitespaceSensitivity: 'css',// 指定HTML文件的全局空格敏感度 css\strict\ignore
|
||||
endOfLine: 'lf',// 换行符使用 lf 结尾是 可选值"<auto|lf|crlf|cr>"
|
||||
};
|
||||
3
admin-web/typescript-ant-design-vue/.stylelintignore
Normal file
@@ -0,0 +1,3 @@
|
||||
/dist/*
|
||||
/public/*
|
||||
public/*
|
||||
70
admin-web/typescript-ant-design-vue/.stylelintrc.js
Normal file
@@ -0,0 +1,70 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
plugins: ['stylelint-order'],
|
||||
extends: ['stylelint-config-standard', 'stylelint-config-prettier'],
|
||||
rules: {
|
||||
'selector-pseudo-class-no-unknown': [
|
||||
true,
|
||||
{
|
||||
ignorePseudoClasses: ['global'],
|
||||
},
|
||||
],
|
||||
'selector-pseudo-element-no-unknown': [
|
||||
true,
|
||||
{
|
||||
ignorePseudoElements: ['v-deep'],
|
||||
},
|
||||
],
|
||||
'at-rule-no-unknown': [
|
||||
true,
|
||||
{
|
||||
ignoreAtRules: [
|
||||
'tailwind',
|
||||
'apply',
|
||||
'variants',
|
||||
'responsive',
|
||||
'screen',
|
||||
'function',
|
||||
'if',
|
||||
'each',
|
||||
'include',
|
||||
'mixin',
|
||||
],
|
||||
},
|
||||
],
|
||||
'no-empty-source': null,
|
||||
'named-grid-areas-no-invalid': null,
|
||||
'unicode-bom': 'never',
|
||||
'no-descending-specificity': null,
|
||||
'font-family-no-missing-generic-family-keyword': null,
|
||||
'declaration-colon-space-after': 'always-single-line',
|
||||
'declaration-colon-space-before': 'never',
|
||||
// 'declaration-block-trailing-semicolon': 'always',
|
||||
'rule-empty-line-before': [
|
||||
'always',
|
||||
{
|
||||
ignore: ['after-comment', 'first-nested'],
|
||||
},
|
||||
],
|
||||
'unit-no-unknown': [true, { ignoreUnits: ['rpx'] }],
|
||||
'order/order': [
|
||||
[
|
||||
'dollar-variables',
|
||||
'custom-properties',
|
||||
'at-rules',
|
||||
'declarations',
|
||||
{
|
||||
type: 'at-rule',
|
||||
name: 'supports',
|
||||
},
|
||||
{
|
||||
type: 'at-rule',
|
||||
name: 'media',
|
||||
},
|
||||
'rules',
|
||||
],
|
||||
{ severity: 'warning' },
|
||||
],
|
||||
},
|
||||
ignoreFiles: ['**/*.js', '**/*.jsx', '**/*.tsx', '**/*.ts'],
|
||||
};
|
||||
36
admin-web/typescript-ant-design-vue/README.en.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# smart-admin2
|
||||
|
||||
#### Description
|
||||
{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}
|
||||
|
||||
#### Software Architecture
|
||||
Software architecture description
|
||||
|
||||
#### Installation
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Instructions
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Contribution
|
||||
|
||||
1. Fork the repository
|
||||
2. Create Feat_xxx branch
|
||||
3. Commit your code
|
||||
4. Create Pull Request
|
||||
|
||||
|
||||
#### Gitee Feature
|
||||
|
||||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
||||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
||||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
||||
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
||||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
||||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
||||
0
admin-web/typescript-ant-design-vue/README.md
Normal file
24
admin-web/typescript-ant-design-vue/index.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<!--
|
||||
* @Description:
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-03
|
||||
* @LastEditTime: 2021-09-01
|
||||
* @LastEditors: zhuoda
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" id="htmlRoot">
|
||||
<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>SmartAdmin</title>
|
||||
<link rel="icon" href="/favicon.ico"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
5012
admin-web/typescript-ant-design-vue/package-lock.json
generated
Normal file
68
admin-web/typescript-ant-design-vue/package.json
Normal file
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"version": "0.0.0",
|
||||
"author": {
|
||||
"name": "1024lab",
|
||||
"email": "1024lab@sina.com",
|
||||
"url": "https://1024lab.net"
|
||||
},
|
||||
"license": "MIT",
|
||||
"homepage": "https://smartadmin.1024lab.net",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"sit": "vite build --base=/manage/ --mode sit",
|
||||
"localhost": "vite --mode localhost",
|
||||
"build": "vue-tsc --noEmit && vite build",
|
||||
"serve": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/js-cookie": "^2.2.7",
|
||||
"ant-design-vue": "2.2.4",
|
||||
"axios": "^0.21.1",
|
||||
"clipboard": "^2.0.8",
|
||||
"crypto-js": "^4.0.0",
|
||||
"echarts": "^5.1.2",
|
||||
"js-cookie": "^2.2.1",
|
||||
"mitt": "^3.0.0",
|
||||
"moment": "2.29.1",
|
||||
"nprogress": "^0.2.0",
|
||||
"pinia": "^2.0.0-beta.3",
|
||||
"vue": "^3.2.1",
|
||||
"vue-i18n": "9.1.6",
|
||||
"vue-router": "^4.0.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/nprogress": "^0.2.0",
|
||||
"@typescript-eslint/eslint-plugin": "^4.28.0",
|
||||
"@typescript-eslint/parser": "^4.28.0",
|
||||
"@vitejs/plugin-legacy": "^1.5.1",
|
||||
"@vitejs/plugin-vue": "^1.4.0",
|
||||
"@vue/compiler-sfc": "^3.2.1",
|
||||
"dotenv": "^10.0.0",
|
||||
"eslint": "^7.29.0",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint-plugin-prettier": "^3.4.0",
|
||||
"eslint-plugin-vue": "^7.16.0",
|
||||
"less": "^4.1.1",
|
||||
"less-loader": "^10.0.1",
|
||||
"postcss": "^8.3.5",
|
||||
"prettier": "^2.3.1",
|
||||
"rimraf": "^3.0.2",
|
||||
"stylelint": "^13.13.1",
|
||||
"stylelint-config-prettier": "^8.0.2",
|
||||
"stylelint-config-standard": "^22.0.0",
|
||||
"stylelint-order": "^4.1.0",
|
||||
"typescript": "^4.3.4",
|
||||
"v-viewer": "^1.5.1",
|
||||
"vite": "^2.4.4",
|
||||
"vite-plugin-mock": "^2.9.4",
|
||||
"vite-plugin-style-import": "^1.1.1",
|
||||
"vue-eslint-parser": "^7.10.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/1024-lab/smart-admin.git"
|
||||
}
|
||||
}
|
||||
5
admin-web/typescript-ant-design-vue/postcss.config.js
Normal file
@@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
autoprefixer: {},
|
||||
},
|
||||
};
|
||||
BIN
admin-web/typescript-ant-design-vue/public/favicon.ico
Normal file
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 27 KiB |
BIN
admin-web/typescript-ant-design-vue/public/images/ali-icon.png
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
BIN
admin-web/typescript-ant-design-vue/public/images/login-bg.png
Normal file
|
After Width: | Height: | Size: 1.7 MiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 98 KiB |
BIN
admin-web/typescript-ant-design-vue/public/images/login-qr.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
admin-web/typescript-ant-design-vue/public/images/logo-min.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
admin-web/typescript-ant-design-vue/public/images/logo.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
admin-web/typescript-ant-design-vue/public/images/qq-icon.png
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
BIN
admin-web/typescript-ant-design-vue/public/images/weibo-icon.png
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
50
admin-web/typescript-ant-design-vue/src/App.vue
Normal file
@@ -0,0 +1,50 @@
|
||||
<!--
|
||||
* @Description: App
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-03
|
||||
* @LastEditTime: 2021-08-28
|
||||
* @LastEditors: zhuoda
|
||||
-->
|
||||
<template>
|
||||
<a-config-provider :locale="zh_CN">
|
||||
<!---全局loading,常用于表单提交--->
|
||||
<a-spin :spinning="spinning" size="large">
|
||||
<RouterView />
|
||||
</a-spin>
|
||||
</a-config-provider>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import zh_CN from "ant-design-vue/lib/locale-provider/zh_CN";
|
||||
import { onMounted, computed } from "vue";
|
||||
import { loginApi } from "./api/system/login/login";
|
||||
import { useUserStore } from "./store/modules/system/user";
|
||||
import { useAppConfigStore } from "/@/store/modules/system/app-config";
|
||||
import { useSpinStore } from "/@/store/modules/system/spin";
|
||||
|
||||
let spinStore = useSpinStore();
|
||||
const spinning = computed(() => spinStore.loading);
|
||||
|
||||
async function getLoginInfo() {
|
||||
let token = useUserStore().getToken;
|
||||
if (!token) return;
|
||||
const res = await loginApi.getLogin();
|
||||
useUserStore().setUserMenu(res.data);
|
||||
}
|
||||
|
||||
// 更新屏幕宽度,以判断是否为isMobile模式,进行适配
|
||||
let appConfigStore = useAppConfigStore();
|
||||
function triggerReSize() {
|
||||
appConfigStore.setCurrentScreenWidth(document.body.clientWidth);
|
||||
}
|
||||
onMounted(() => {
|
||||
//获取登录信息
|
||||
getLoginInfo();
|
||||
//更新屏幕宽度
|
||||
triggerReSize();
|
||||
});
|
||||
|
||||
window.onresize = () => {
|
||||
triggerReSize();
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* @Description: 分页查询你参数
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-12
|
||||
* @LastEditTime: 2021-08-14
|
||||
* @LastEditors: zhuoda
|
||||
*/
|
||||
import { SortItemModel } from './sort-item-model';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface PageResultDto
|
||||
*/
|
||||
export interface PageParamModel {
|
||||
/**
|
||||
* 页码(不能为空)
|
||||
* @type {number}
|
||||
* @memberof ClueUserQueryForm
|
||||
*/
|
||||
pageNum: number;
|
||||
/**
|
||||
* 每页数量(不能为空)
|
||||
* @type {number}
|
||||
* @memberof ClueUserQueryForm
|
||||
*/
|
||||
pageSize: number;
|
||||
|
||||
/**
|
||||
* 排序字段集合
|
||||
* @type {Array<SortItemDto>}
|
||||
* @memberof ClueUserQueryForm
|
||||
*/
|
||||
sortItemList?: Array<SortItemModel>;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* @Description:
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-11 18:12:07
|
||||
* @LastEditTime: 2021-08-12 15:11:54
|
||||
* @LastEditors: zhuoda
|
||||
*/
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface PageResultModel
|
||||
*/
|
||||
export interface PageResultModel<T> {
|
||||
/**
|
||||
* 是否为空
|
||||
* @type {boolean}
|
||||
* @memberof PageResultModel
|
||||
*/
|
||||
emptyFlag?: boolean;
|
||||
/**
|
||||
* 结果集
|
||||
* @type {Array<T>}
|
||||
* @memberof PageResultModel
|
||||
*/
|
||||
list: Array<T>;
|
||||
/**
|
||||
* 当前页
|
||||
* @type {number}
|
||||
* @memberof PageResultModel
|
||||
*/
|
||||
pageNum?: number;
|
||||
/**
|
||||
* 每页的数量
|
||||
* @type {number}
|
||||
* @memberof PageResultModel
|
||||
*/
|
||||
pageSize?: number;
|
||||
/**
|
||||
* 总页数
|
||||
* @type {number}
|
||||
* @memberof PageResultModel
|
||||
*/
|
||||
pages?: number;
|
||||
/**
|
||||
* 总记录数
|
||||
* @type {number}
|
||||
* @memberof PageResultModel
|
||||
*/
|
||||
total: number;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ResponseModel<T> {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ResponseDtoOfLoginDetailVo
|
||||
*/
|
||||
code: number;
|
||||
/**
|
||||
*
|
||||
* @type {LoginDetailVo}
|
||||
* @memberof ResponseDtoOfLoginDetailVo
|
||||
*/
|
||||
data: T;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ResponseDtoOfLoginDetailVo
|
||||
*/
|
||||
msg?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ResponseDtoOfLoginDetailVo
|
||||
*/
|
||||
success: boolean;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* @Description:
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-11
|
||||
* @LastEditTime: 2021-08-14
|
||||
* @LastEditors: zhuoda
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface SortItemModel {
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof SortItemModel
|
||||
*/
|
||||
asc: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SortItemModel
|
||||
*/
|
||||
column: string;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* @Description:
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-12 16:46:21
|
||||
* @LastEditTime: 2021-08-12 16:47:04
|
||||
* @LastEditors: zhuoda
|
||||
*/
|
||||
import { ResponseModel } from '../../base-model/response-model';
|
||||
import { CategoryAddForm } from './model/category-add-form';
|
||||
import { CategoryTreeQueryForm } from './model/category-tree-query-form';
|
||||
import { CategoryTreeVo } from './model/category-tree-vo';
|
||||
import { CategoryUpdateForm } from './model/category-update-form';
|
||||
import { getRequest, postRequest } from '/@/lib/axios';
|
||||
|
||||
export const categoryApi = {
|
||||
// 添加类目 by zhuoda
|
||||
addCategory: (param: CategoryAddForm) => {
|
||||
return postRequest<ResponseModel<string>>('/category/add', param);
|
||||
},
|
||||
// GET
|
||||
// 删除类目 by zhuoda
|
||||
deleteCategoryById: (categoryId: number) => {
|
||||
return getRequest<ResponseModel<string>>(`/category/del/${categoryId}`);
|
||||
},
|
||||
// 查询类目层级树 by zhuoda
|
||||
queryCategoryTree: (param: CategoryTreeQueryForm) => {
|
||||
return postRequest<ResponseModel<CategoryTreeVo[]>>('/category/tree', param);
|
||||
},
|
||||
// 更新类目 by zhuoda
|
||||
updateCategory: (param: CategoryUpdateForm) => {
|
||||
return postRequest<ResponseModel<string>>('/category/update', param);
|
||||
},
|
||||
// 查询类目详情 by zhuoda
|
||||
getCategory: (categoryId: number) => {
|
||||
// POST /admin/clue/user/track/add
|
||||
return getRequest<ResponseModel<string>>(`/category/${categoryId}`);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface CategoryAddDto
|
||||
*/
|
||||
export interface CategoryAddForm {
|
||||
/**
|
||||
* 类目名称
|
||||
* @type {string}
|
||||
* @memberof CategoryAddDto
|
||||
*/
|
||||
categoryName: string;
|
||||
/**
|
||||
* 分类类型: <br> export const <br> CATEGORY_TYPE_ENUM = <BR> <br>
|
||||
* @type {number}
|
||||
* @memberof CategoryAddDto
|
||||
*/
|
||||
categoryType: number;
|
||||
/**
|
||||
* 禁用状态
|
||||
* @type {boolean}
|
||||
* @memberof CategoryAddDto
|
||||
*/
|
||||
disabledFlag?: boolean;
|
||||
/**
|
||||
* 父级类目id|可选
|
||||
* @type {number}
|
||||
* @memberof CategoryAddDto
|
||||
*/
|
||||
parentId?: number;
|
||||
/**
|
||||
* 备注|可选
|
||||
* @type {string}
|
||||
* @memberof CategoryAddDto
|
||||
*/
|
||||
remark?: string;
|
||||
/**
|
||||
* 排序|可选
|
||||
* @type {number}
|
||||
* @memberof CategoryAddDto
|
||||
*/
|
||||
sort?: number;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface CategoryTreeQueryDto
|
||||
*/
|
||||
export interface CategoryTreeQueryForm {
|
||||
/**
|
||||
* 分类类型|可选: <br> export const <br> CATEGORY_TYPE_ENUM <br>
|
||||
* @type {number}
|
||||
* @memberof CategoryTreeQueryDto
|
||||
*/
|
||||
categoryType: number;
|
||||
/**
|
||||
* 父级类目id|可选
|
||||
* @type {number}
|
||||
* @memberof CategoryTreeQueryDto
|
||||
*/
|
||||
parentId?: number;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface CategoryTreeVo
|
||||
*/
|
||||
export interface CategoryTreeVo {
|
||||
/**
|
||||
* 类目层级全称
|
||||
* @type {string}
|
||||
* @memberof CategoryTreeVo
|
||||
*/
|
||||
categoryFullName?: string;
|
||||
/**
|
||||
* 类目id
|
||||
* @type {number}
|
||||
* @memberof CategoryTreeVo
|
||||
*/
|
||||
categoryId?: number;
|
||||
/**
|
||||
* 类目名称
|
||||
* @type {string}
|
||||
* @memberof CategoryTreeVo
|
||||
*/
|
||||
categoryName?: string;
|
||||
/**
|
||||
* 子类
|
||||
* @type {Array<CategoryTreeVo>}
|
||||
* @memberof CategoryTreeVo
|
||||
*/
|
||||
children?: Array<CategoryTreeVo>;
|
||||
/**
|
||||
* 类目名称
|
||||
* @type {string}
|
||||
* @memberof CategoryTreeVo
|
||||
*/
|
||||
label?: string;
|
||||
/**
|
||||
* 父级id
|
||||
* @type {number}
|
||||
* @memberof CategoryTreeVo
|
||||
*/
|
||||
parentId?: number;
|
||||
/**
|
||||
* 类目id
|
||||
* @type {number}
|
||||
* @memberof CategoryTreeVo
|
||||
*/
|
||||
value?: number;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface CategoryUpdateDto
|
||||
*/
|
||||
export interface CategoryUpdateForm {
|
||||
/**
|
||||
* 类目id
|
||||
* @type {number}
|
||||
* @memberof CategoryUpdateDto
|
||||
*/
|
||||
categoryId?: number;
|
||||
/**
|
||||
* 类目名称
|
||||
* @type {string}
|
||||
* @memberof CategoryUpdateDto
|
||||
*/
|
||||
categoryName: string;
|
||||
/**
|
||||
* 分类类型: <br> export const <br> CATEGORY_TYPE_ENUM <br>
|
||||
* @type {number}
|
||||
* @memberof CategoryUpdateDto
|
||||
*/
|
||||
categoryType: number;
|
||||
/**
|
||||
* 禁用状态
|
||||
* @type {boolean}
|
||||
* @memberof CategoryUpdateDto
|
||||
*/
|
||||
disabledFlag?: boolean;
|
||||
/**
|
||||
* 父级类目id|可选
|
||||
* @type {number}
|
||||
* @memberof CategoryUpdateDto
|
||||
*/
|
||||
parentId?: number;
|
||||
/**
|
||||
* 备注|可选
|
||||
* @type {string}
|
||||
* @memberof CategoryUpdateDto
|
||||
*/
|
||||
remark?: string;
|
||||
/**
|
||||
* 排序|可选
|
||||
* @type {number}
|
||||
* @memberof CategoryUpdateDto
|
||||
*/
|
||||
sort?: number;
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface CategoryVo
|
||||
*/
|
||||
export interface CategoryVo {
|
||||
/**
|
||||
* 类目id
|
||||
* @type {number}
|
||||
* @memberof CategoryVo
|
||||
*/
|
||||
categoryId?: number;
|
||||
/**
|
||||
* 类目名称
|
||||
* @type {string}
|
||||
* @memberof CategoryVo
|
||||
*/
|
||||
categoryName: string;
|
||||
/**
|
||||
* 分类类型: <br> export const <br> CATEGORY_TYPE_ENUM<br>
|
||||
* @type {number}
|
||||
* @memberof CategoryVo
|
||||
*/
|
||||
categoryType: number;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof CategoryVo
|
||||
*/
|
||||
createTime?: Date;
|
||||
/**
|
||||
* 禁用状态
|
||||
* @type {boolean}
|
||||
* @memberof CategoryVo
|
||||
*/
|
||||
disabledFlag?: boolean;
|
||||
/**
|
||||
* 父级类目id|可选
|
||||
* @type {number}
|
||||
* @memberof CategoryVo
|
||||
*/
|
||||
parentId?: number;
|
||||
/**
|
||||
* 备注|可选
|
||||
* @type {string}
|
||||
* @memberof CategoryVo
|
||||
*/
|
||||
remark?: string;
|
||||
/**
|
||||
* 排序|可选
|
||||
* @type {number}
|
||||
* @memberof CategoryVo
|
||||
*/
|
||||
sort?: number;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof CategoryVo
|
||||
*/
|
||||
updateTime?: Date;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* @Description:
|
||||
* @version:
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-17 23:32:36
|
||||
* @LastEditors: zhuoda
|
||||
* @LastEditTime: 2021-08-18 14:35:52
|
||||
*/
|
||||
import { ResponseModel } from '../../base-model/response-model';
|
||||
import { FileUploadVo } from './model/file-upload-vo';
|
||||
import { postRequest } from '/@/lib/axios';
|
||||
|
||||
export const fileApi = {
|
||||
// 文件上传 by zhuoda
|
||||
uploadUrl: '/file/upload',
|
||||
uploadFile: (param: any, folder: number) => {
|
||||
return postRequest<ResponseModel<FileUploadVo>>(`/file/upload?folder=${folder}`, param);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* @Description:
|
||||
* @version:
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-18 10:41:31
|
||||
* @LastEditors: zhuoda
|
||||
* @LastEditTime: 2021-08-18 18:02:18
|
||||
*/
|
||||
export interface FileUploadVo {
|
||||
/**
|
||||
* 文件id
|
||||
*/
|
||||
fileId?: number;
|
||||
/**
|
||||
* fileKey
|
||||
*/
|
||||
fileKey: string;
|
||||
/**
|
||||
* 文件名称
|
||||
*/
|
||||
fileName?: string;
|
||||
/**
|
||||
* 文件大小
|
||||
*/
|
||||
fileSize?: number;
|
||||
/**
|
||||
* 文件类型
|
||||
*/
|
||||
fileType?: string;
|
||||
/**
|
||||
* fileUrl
|
||||
*/
|
||||
fileUrl?: string;
|
||||
/**
|
||||
* 自定义的url用于文件上传的展示
|
||||
*/
|
||||
url?: string;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import { postRequest } from '/@/lib/axios';
|
||||
import { ResponseModel } from '/@/api/base-model/response-model';
|
||||
import {GoodsAddForm} from "./model/goods-add-form";
|
||||
import {GoodsDelDto} from "./model/goods-del-dto";
|
||||
import {GoodsQueryDto} from "./model/goods-query-dto";
|
||||
import { GoodsUpdateForm } from './model/goods-update-form';
|
||||
import { GoodsAdminVo } from './model/goods-admin-vo';
|
||||
import { PageResultModel } from '../../base-model/page-result-model';
|
||||
|
||||
export const goodsApi = {
|
||||
// 添加商品 by zhuoda
|
||||
addGoods: (param: GoodsAddForm) => {
|
||||
return postRequest<ResponseModel<String>>('/goods/add', param);
|
||||
},
|
||||
// POST /admin/goods/del
|
||||
// 删除 by zhuoda
|
||||
deleteGoods: (param: GoodsDelDto) => {
|
||||
return postRequest<ResponseModel<String>>('/goods/del', param);
|
||||
},
|
||||
// POST /admin/goods/query
|
||||
// 分页查询 by zhuoda
|
||||
queryGoodsList: (param: GoodsQueryDto) => {
|
||||
return postRequest<ResponseModel<PageResultModel<GoodsAdminVo>>>('/goods/query', param);
|
||||
},
|
||||
// POST /admin/goods/update
|
||||
// 更新商品 by zhuoda
|
||||
updateGoods: (param: GoodsUpdateForm) => {
|
||||
return postRequest<ResponseModel<String>>('/goods/update', param);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface GoodsAddDto
|
||||
*/
|
||||
export interface GoodsAddForm {
|
||||
/**
|
||||
* 商品分类
|
||||
* @type {number}
|
||||
* @memberof GoodsAddDto
|
||||
*/
|
||||
categoryId?: number;
|
||||
/**
|
||||
* 商品封面
|
||||
* @type {string}
|
||||
* @memberof GoodsAddDto
|
||||
*/
|
||||
coverPic?: string;
|
||||
/**
|
||||
* 商品简介
|
||||
* @type {string}
|
||||
* @memberof GoodsAddDto
|
||||
*/
|
||||
goodsIntro?: string;
|
||||
/**
|
||||
* 商品名称
|
||||
* @type {string}
|
||||
* @memberof GoodsAddDto
|
||||
*/
|
||||
goodsName?: string;
|
||||
/**
|
||||
* 商品类型|可选: <br> export const <br> GOODS_TYPE_ENUM<br>
|
||||
* @type {number}
|
||||
* @memberof GoodsAddDto
|
||||
*/
|
||||
goodsType?: number;
|
||||
/**
|
||||
* 商品分组: <br> export const <br> GOODS_GROUP_TYPE_ENUM =<br>
|
||||
* @type {number}
|
||||
* @memberof GoodsAddDto
|
||||
*/
|
||||
groupType?: number;
|
||||
/**
|
||||
* 商品价格
|
||||
* @type {number}
|
||||
* @memberof GoodsAddDto
|
||||
*/
|
||||
price?: number;
|
||||
/**
|
||||
* 上架状态
|
||||
* @type {boolean}
|
||||
* @memberof GoodsAddDto
|
||||
*/
|
||||
shelvesFlag?: boolean;
|
||||
/**
|
||||
* 第三方商品id|可选
|
||||
* @type {number}
|
||||
* @memberof GoodsAddDto
|
||||
*/
|
||||
thirdGoodsId?: number;
|
||||
/**
|
||||
* 备注|可选
|
||||
* @type {string}
|
||||
* @memberof GoodsUpdateDto
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-12 18:10:22
|
||||
* @LastEditTime: 2021-09-01 21:25:35
|
||||
* @LastEditors: zhuoda
|
||||
* @Description:
|
||||
* @FilePath: /smart-admin/src/api/business/goods/model/goods-admin-vo.ts
|
||||
*/
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface GoodsAdminVo
|
||||
*/
|
||||
export interface GoodsAdminVo {
|
||||
/**
|
||||
* 商品分类
|
||||
* @type {number}
|
||||
* @memberof GoodsAdminVo
|
||||
*/
|
||||
categoryId?: number;
|
||||
/**
|
||||
* 商品封面
|
||||
* @type {string}
|
||||
* @memberof GoodsAdminVo
|
||||
*/
|
||||
coverPic?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof GoodsAdminVo
|
||||
*/
|
||||
createTime?: Date;
|
||||
/**
|
||||
* 商品id
|
||||
* @type {number}
|
||||
* @memberof GoodsAdminVo
|
||||
*/
|
||||
goodsId: number;
|
||||
/**
|
||||
* 商品简介
|
||||
* @type {string}
|
||||
* @memberof GoodsAdminVo
|
||||
*/
|
||||
goodsIntro?: string;
|
||||
/**
|
||||
* 商品名称
|
||||
* @type {string}
|
||||
* @memberof GoodsAdminVo
|
||||
*/
|
||||
goodsName?: string;
|
||||
/**
|
||||
* 商品类型|可选: <br> export const <br> GOODS_TYPE_ENUM <br>
|
||||
* @type {number}
|
||||
* @memberof GoodsAdminVo
|
||||
*/
|
||||
goodsType: number;
|
||||
/**
|
||||
* 商品分组: <br> export const <br> GOODS_GROUP_TYPE_ENUM <br>
|
||||
* @type {number}
|
||||
* @memberof GoodsAdminVo
|
||||
*/
|
||||
groupType: number;
|
||||
/**
|
||||
* 商品价格
|
||||
* @type {number}
|
||||
* @memberof GoodsAdminVo
|
||||
*/
|
||||
price?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof GoodsAdminVo
|
||||
*/
|
||||
remark?: string;
|
||||
/**
|
||||
* 上架状态
|
||||
* @type {boolean}
|
||||
* @memberof GoodsAdminVo
|
||||
*/
|
||||
shelvesFlag?: boolean;
|
||||
/**
|
||||
* 第三方商品id|可选
|
||||
* @type {number}
|
||||
* @memberof GoodsAdminVo
|
||||
*/
|
||||
thirdGoodsId?: number;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof GoodsAdminVo
|
||||
*/
|
||||
updateTime?: Date;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface GoodsDelDto
|
||||
*/
|
||||
export interface GoodsDelDto {
|
||||
/**
|
||||
* 商品id集合
|
||||
* @type {Array<number>}
|
||||
* @memberof GoodsDelDto
|
||||
*/
|
||||
goodsIdList?: Array<number>;
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
import {
|
||||
SortItemModel
|
||||
} from '../../../base-model/sort-item-model';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface GoodsQueryDto
|
||||
*/
|
||||
export interface GoodsQueryDto {
|
||||
/**
|
||||
* 商品分类
|
||||
* @type {number}
|
||||
* @memberof GoodsQueryDto
|
||||
*/
|
||||
categoryId?: number;
|
||||
/**
|
||||
* 商品类型|可选: <br> export const <br> GOODS_TYPE_ENUM <br>
|
||||
* @type {number}
|
||||
* @memberof GoodsQueryDto
|
||||
*/
|
||||
goodsType?: number;
|
||||
/**
|
||||
* 商品分组: <br> export const <br> GOODS_GROUP_TYPE_ENUM <br>
|
||||
* @type {number}
|
||||
* @memberof GoodsQueryDto
|
||||
*/
|
||||
groupType?: number;
|
||||
/**
|
||||
* 页码(不能为空)
|
||||
* @type {number}
|
||||
* @memberof GoodsQueryDto
|
||||
*/
|
||||
pageNum: number;
|
||||
/**
|
||||
* 每页数量(不能为空)
|
||||
* @type {number}
|
||||
* @memberof GoodsQueryDto
|
||||
*/
|
||||
pageSize: number;
|
||||
/**
|
||||
* 搜索词
|
||||
* @type {string}
|
||||
* @memberof GoodsQueryDto
|
||||
*/
|
||||
searchWord?: string;
|
||||
/**
|
||||
* 上架状态
|
||||
* @type {boolean}
|
||||
* @memberof GoodsQueryDto
|
||||
*/
|
||||
shelvesFlag?: boolean | string;
|
||||
/**
|
||||
* 排序字段集合
|
||||
* @type {Array<SortItemDto>}
|
||||
* @memberof GoodsQueryDto
|
||||
*/
|
||||
sortItemList?: Array<SortItemModel>;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface GoodsUpdateDto
|
||||
*/
|
||||
export interface GoodsUpdateForm {
|
||||
/**
|
||||
* 商品分类
|
||||
* @type {number}
|
||||
* @memberof GoodsUpdateDto
|
||||
*/
|
||||
categoryId?: number;
|
||||
/**
|
||||
* 商品封面
|
||||
* @type {string}
|
||||
* @memberof GoodsUpdateDto
|
||||
*/
|
||||
coverPic?: string;
|
||||
/**
|
||||
* 商品id
|
||||
* @type {number}
|
||||
* @memberof GoodsUpdateDto
|
||||
*/
|
||||
goodsId?: number;
|
||||
/**
|
||||
* 商品简介
|
||||
* @type {string}
|
||||
* @memberof GoodsUpdateDto
|
||||
*/
|
||||
goodsIntro?: string;
|
||||
/**
|
||||
* 商品名称
|
||||
* @type {string}
|
||||
* @memberof GoodsUpdateDto
|
||||
*/
|
||||
goodsName?: string;
|
||||
/**
|
||||
* 商品类型|可选: <br> export const <br> GOODS_TYPE_ENUM <br>
|
||||
* @type {number}
|
||||
* @memberof GoodsUpdateDto
|
||||
*/
|
||||
goodsType?: number;
|
||||
/**
|
||||
* 商品分组: <br> export const <br> GOODS_GROUP_TYPE_ENUM <br>
|
||||
* @type {number}
|
||||
* @memberof GoodsUpdateDto
|
||||
*/
|
||||
groupType?: number;
|
||||
/**
|
||||
* 商品价格
|
||||
* @type {number}
|
||||
* @memberof GoodsUpdateDto
|
||||
*/
|
||||
price?: number;
|
||||
/**
|
||||
* 上架状态
|
||||
* @type {boolean}
|
||||
* @memberof GoodsUpdateDto
|
||||
*/
|
||||
shelvesFlag?: boolean;
|
||||
/**
|
||||
* 第三方商品id|可选
|
||||
* @type {number}
|
||||
* @memberof GoodsUpdateDto
|
||||
*/
|
||||
thirdGoodsId?: number;
|
||||
/**
|
||||
* 备注|可选
|
||||
* @type {string}
|
||||
* @memberof GoodsUpdateDto
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface Goods
|
||||
*/
|
||||
export interface GoodsVo {
|
||||
/**
|
||||
* 实际销售单价
|
||||
* @type {number}
|
||||
* @memberof Goods
|
||||
*/
|
||||
actualSalePrice?: number;
|
||||
/**
|
||||
* 件数
|
||||
* @type {number}
|
||||
* @memberof Goods
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
* 商品id
|
||||
* @type {number}
|
||||
* @memberof Goods
|
||||
*/
|
||||
goodsId?: number;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
export interface Goods {
|
||||
/**
|
||||
* 实际销售单价
|
||||
*/
|
||||
actualSalePrice?: number;
|
||||
/**
|
||||
* 件数
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
* 商品id
|
||||
*/
|
||||
goodsId?: number;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-12 17:56:25
|
||||
* @LastEditTime: 2021-08-16 10:45:05
|
||||
* @LastEditors: zhuoda
|
||||
* @Description:
|
||||
* @FilePath: /smart-admin/src/api/system/department/department-api.ts
|
||||
*/
|
||||
import { ResponseModel } from '../../base-model/response-model';
|
||||
import { DepartmentCreateDto } from './model/department-create-dto';
|
||||
import { DepartmentTreeVo } from './model/department-tree-vo';
|
||||
import { DepartmentVo } from './model/department-vo';
|
||||
import { getRequest, postRequest } from '/@/lib/axios';
|
||||
export const departmentApi = {
|
||||
/**
|
||||
* @description: 查询部门列表
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
queryAllDepartment: (): Promise<ResponseModel<DepartmentVo[]>> => {
|
||||
return getRequest<ResponseModel<Array<DepartmentVo>>>('/department/listAll');
|
||||
},
|
||||
|
||||
/**
|
||||
* @description: 查询部门树形列表
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
departmentTree: (): Promise<ResponseModel<DepartmentTreeVo[]>> => {
|
||||
return getRequest<ResponseModel<Array<DepartmentTreeVo>>>('/department/treeList');
|
||||
},
|
||||
|
||||
/**
|
||||
* @description: 获取校区列表 by zhuoda
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
querySchoolDepartmentList: (): Promise<ResponseModel<DepartmentVo[]>> => {
|
||||
return getRequest<ResponseModel<DepartmentVo[]>>('/department/querySchoolList');
|
||||
},
|
||||
|
||||
/**
|
||||
* @description: 添加部门 by zhuoda
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
addDepartment: (param: DepartmentCreateDto) => {
|
||||
return postRequest<ResponseModel<String>>('/department/add', param);
|
||||
},
|
||||
/**
|
||||
* @description: 更新部门信息 by zhuoda
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
updateDepartment: (param: DepartmentCreateDto) => {
|
||||
return postRequest<ResponseModel<String>>('/department/update', param);
|
||||
},
|
||||
/**
|
||||
* @description: 获取校区列表 by zhuoda
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
deleteDepartment: (deptId: number) => {
|
||||
return getRequest<ResponseModel<String>>(`/department/delete/${deptId}`);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* smart-admin-local
|
||||
* http://localhost:50110/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface DepartmentCreateDto {
|
||||
/**
|
||||
* 部门负责人id
|
||||
*/
|
||||
managerId?: number;
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* 上级部门id (可选)
|
||||
*/
|
||||
parentId?: number;
|
||||
/**
|
||||
* 部门简称
|
||||
*/
|
||||
shortName?: string;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* @Description:
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-12 18:19:34
|
||||
* @LastEditTime: 2021-09-01
|
||||
* @LastEditors: zhuoda
|
||||
*/
|
||||
/**
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface DepartmentSimpleVo {
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* 部门简称
|
||||
*/
|
||||
shortName?: string;
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-12 17:53:15
|
||||
* @LastEditTime: 2021-09-01
|
||||
* @LastEditors: zhuoda
|
||||
* @Description:
|
||||
* @FilePath: /smart-admin/src/api/system/department/model/department-tree-vo.ts
|
||||
*/
|
||||
/**
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface DepartmentTreeVo {
|
||||
/**
|
||||
* 子部门
|
||||
*/
|
||||
children?: Array<DepartmentTreeVo>;
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* 部门负责人id
|
||||
*/
|
||||
managerId?: number;
|
||||
/**
|
||||
* 部门负责人姓名
|
||||
*/
|
||||
managerName?: string;
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* 同级下一个元素id
|
||||
*/
|
||||
nextId?: number;
|
||||
/**
|
||||
* 父级部门id
|
||||
*/
|
||||
parentId?: number;
|
||||
/**
|
||||
* 父级部门名称
|
||||
*/
|
||||
parentName?: string;
|
||||
/**
|
||||
* 同级上一个元素id
|
||||
*/
|
||||
preId?: number;
|
||||
/**
|
||||
* 部门简称
|
||||
*/
|
||||
shortName?: string;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
sort?: number;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* smart-admin-local
|
||||
* http://localhost:50110/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface DepartmentUpdateDto {
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
id?: number;
|
||||
/**
|
||||
* 部门负责人id
|
||||
*/
|
||||
managerId?: number;
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* 上级部门id (可选)
|
||||
*/
|
||||
parentId?: number;
|
||||
/**
|
||||
* 部门简称
|
||||
*/
|
||||
shortName?: string;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-12 18:51:32
|
||||
* @LastEditTime: 2021-09-01
|
||||
* @LastEditors: zhuoda
|
||||
* @Description:
|
||||
* @FilePath: /smart-admin/src/api/system/department/model/department-vo.ts
|
||||
*/
|
||||
/**
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface DepartmentVo {
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* 部门负责人id
|
||||
*/
|
||||
managerId?: number;
|
||||
/**
|
||||
* 部门负责人姓名
|
||||
*/
|
||||
managerName?: string;
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* 同级下一个元素id
|
||||
*/
|
||||
nextId?: number;
|
||||
/**
|
||||
* 父级部门id
|
||||
*/
|
||||
parentId?: number;
|
||||
/**
|
||||
* 父级部门名称
|
||||
*/
|
||||
parentName?: string;
|
||||
/**
|
||||
* 同级上一个元素id
|
||||
*/
|
||||
preId?: number;
|
||||
/**
|
||||
* 部门简称
|
||||
*/
|
||||
shortName?: string;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
sort?: number;
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
* @Description: 员工api
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-12 18:00:56
|
||||
* @LastEditTime: 2021-08-25 11:24:51
|
||||
* @LastEditors: zhuoda
|
||||
*/
|
||||
|
||||
import { PageResultModel } from '../../base-model/page-result-model';
|
||||
import { ResponseModel } from '../../base-model/response-model';
|
||||
import { EmployeeAddDto } from './model/employee-add-dto';
|
||||
import { EmployeeDepartmentUpdateDto } from './model/employee-department-update-dto';
|
||||
import { EmployeeQueryDto } from './model/employee-query-dto';
|
||||
import { EmployeeUpdateDto } from './model/employee-update-dto';
|
||||
import { EmployeeVo } from './model/employee-vo';
|
||||
import { getRequest, postRequest } from '/@/lib/axios';
|
||||
export const employeeApi = {
|
||||
/**
|
||||
* @description: 查询所有员工 by zhuoda
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
queryAll: (): Promise<ResponseModel<EmployeeVo[]>> => {
|
||||
return getRequest<ResponseModel<EmployeeVo[]>>('/employee/queryAll');
|
||||
},
|
||||
/**
|
||||
* @description: 员工管理查询
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
queryEmployee: (params: EmployeeQueryDto): Promise<ResponseModel<PageResultModel<EmployeeVo>>> => {
|
||||
return postRequest<ResponseModel<PageResultModel<EmployeeVo>>>('/employee/query', params);
|
||||
},
|
||||
/**
|
||||
* @description: 添加员工
|
||||
* @param {EmployeeAddDto} params
|
||||
* @return {*}
|
||||
*/
|
||||
addEmployee: (params: EmployeeAddDto) => {
|
||||
return postRequest<ResponseModel<string>>('/employee/add', params);
|
||||
},
|
||||
/**
|
||||
* @description: 更新员工信息
|
||||
* @param {EmployeeUpdateDto} params
|
||||
* @return {*}
|
||||
*/
|
||||
updateEmployee: (params: EmployeeUpdateDto) => {
|
||||
return postRequest<ResponseModel<string>>('/employee/update', params);
|
||||
},
|
||||
/**
|
||||
* @description: 删除员工
|
||||
* @param {number} employeeId
|
||||
* @return {*}
|
||||
*/
|
||||
deleteEmployee: (employeeId: number) => {
|
||||
return getRequest<ResponseModel<string>>(`/employee/delete/${employeeId}`);
|
||||
},
|
||||
/**
|
||||
* @description: 批量删除员工
|
||||
* @param {number} employeeIdList
|
||||
* @return {*}
|
||||
*/
|
||||
batchDeleteEmployee: (employeeIdList: number[]) => {
|
||||
return getRequest<ResponseModel<string>>(`/employee/update/batch/delete?employeeIdList=${employeeIdList}`);
|
||||
},
|
||||
/**
|
||||
* @description: 批量调整员工部门
|
||||
* @param {EmployeeDepartmentUpdateDto} updateDto
|
||||
* @return {*}
|
||||
*/
|
||||
batchUpdateDepartmentEmployee: (updateDto: EmployeeDepartmentUpdateDto) => {
|
||||
return postRequest<ResponseModel<string>>('/employee/update/batch/department', updateDto);
|
||||
},
|
||||
/**
|
||||
* @description: 重置员工密码
|
||||
* @param {number} employeeId
|
||||
* @return {*}
|
||||
*/
|
||||
resetPassword: (employeeId: number) => {
|
||||
return getRequest<ResponseModel<string>>(`employee/update/pwd/reset/${employeeId}`);
|
||||
},
|
||||
/**
|
||||
* @description: 更新员工禁用状态
|
||||
* @param {number} employeeId
|
||||
* @return {*}
|
||||
*/
|
||||
updateDisabled: (employeeId: number) => {
|
||||
return getRequest<ResponseModel<string>>(`employee/update/disabled/${employeeId}`);
|
||||
},
|
||||
/**
|
||||
* @description: 查询员工-根据校区id
|
||||
* @param {number} deptId
|
||||
* @return {*}
|
||||
*/
|
||||
querySchoolEmployee: (deptId: number) => {
|
||||
return getRequest<ResponseModel<EmployeeVo[]>>(`/employee/query/school/${deptId}`);
|
||||
},
|
||||
// 查询员工-根据部门id
|
||||
queryEmployeeByDeptId: (deptId: number) => {
|
||||
return getRequest<ResponseModel<EmployeeVo[]>>(`/employee/query/dept/${deptId}`);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-16 15:10:08
|
||||
* @LastEditTime: 2021-09-01
|
||||
* @LastEditors: zhuoda
|
||||
* @Description:
|
||||
* @FilePath: /smart-admin/src/api/system/employee/model/employee-add-dto.ts
|
||||
*/
|
||||
/**
|
||||
* smart-admin-local
|
||||
* http://localhost:50110/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface EmployeeAddDto {
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
actualName?: string;
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
departmentId?: number;
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
disabledFlag?: boolean;
|
||||
/**
|
||||
* : <br> export const <br> GenderEnum = <BR> {<br> UNKNOWN:{<br> value:0,<br> desc:\'未知\'<br> },<br> MAN:{<br> value:1,<br> desc:\'男\'<br> },<br> WOMAN:{<br> value:2,<br> desc:\'女\'<br> }<br>} <br>
|
||||
*/
|
||||
gender?: number;
|
||||
/**
|
||||
* 登录账号
|
||||
*/
|
||||
loginName?: string;
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
phone?: string;
|
||||
/**
|
||||
* 角色列表
|
||||
*/
|
||||
roleIdList?: Array<number>;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* smart-admin-local
|
||||
* http://localhost:50110/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface EmployeeDepartmentUpdateDto {
|
||||
/**
|
||||
* 部门ID集合
|
||||
*/
|
||||
departmentId?: number;
|
||||
/**
|
||||
* 员工id
|
||||
*/
|
||||
employeeIdList?: Array<number>;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-14 16:52:13
|
||||
* @LastEditTime: 2021-08-14 16:53:58
|
||||
* @LastEditors: zhuoda
|
||||
* @Description:
|
||||
* @FilePath: /smart-admin/src/api/system/employee/model/employee-query-dto.ts
|
||||
*/
|
||||
/**
|
||||
* smart-admin-local
|
||||
* http://localhost:50110/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { PageParamModel } from "/@/api/base-model/page-param-model";
|
||||
|
||||
export interface EmployeeQueryDto extends PageParamModel{
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
departmentId?: number;
|
||||
/**
|
||||
* 是否禁用
|
||||
*/
|
||||
disabledFlag?: boolean;
|
||||
/**
|
||||
* 员工id集合
|
||||
*/
|
||||
employeeIdList?: Array<number>;
|
||||
/**
|
||||
* 搜索词
|
||||
*/
|
||||
keyword?: string;
|
||||
/**
|
||||
* 是否查询总条数
|
||||
*/
|
||||
searchCount?: boolean;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-16 15:10:08
|
||||
* @LastEditTime: 2021-09-01
|
||||
* @LastEditors: zhuoda
|
||||
* @Description:
|
||||
* @FilePath: /smart-admin/src/api/system/employee/model/employee-update-dto.ts
|
||||
*/
|
||||
/**
|
||||
* smart-admin-local
|
||||
* http://localhost:50110/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface EmployeeUpdateDto {
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
actualName?: string;
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
departmentId?: number;
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
disabledFlag?: boolean | number;
|
||||
/**
|
||||
* : <br> export const <br> GenderEnum = <BR> {<br> UNKNOWN:{<br> value:0,<br> desc:\'未知\'<br> },<br> MAN:{<br> value:1,<br> desc:\'男\'<br> },<br> WOMAN:{<br> value:2,<br> desc:\'女\'<br> }<br>} <br>
|
||||
*/
|
||||
gender?: number;
|
||||
/**
|
||||
* 员工id
|
||||
*/
|
||||
id?: number;
|
||||
/**
|
||||
* 登录账号
|
||||
*/
|
||||
loginName?: string;
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
phone?: string;
|
||||
/**
|
||||
* 角色列表
|
||||
*/
|
||||
roleIdList?: Array<number>;
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* @Description:
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-12 18:07:31
|
||||
* @LastEditTime: 2021-09-01
|
||||
* @LastEditors: zhuoda
|
||||
*/
|
||||
/**
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { DepartmentSimpleVo } from '/@/api/system/department/model/department-simple-vo';
|
||||
|
||||
export interface EmployeeVo {
|
||||
/**
|
||||
* 员工名称
|
||||
*/
|
||||
actualName?: string;
|
||||
/**
|
||||
* 出生日期
|
||||
*/
|
||||
birthday?: string;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime?: string;
|
||||
/**
|
||||
* 部门
|
||||
*/
|
||||
department?: Array<DepartmentSimpleVo>;
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
departmentId?: string;
|
||||
/**
|
||||
* 是否被禁用
|
||||
*/
|
||||
disabledFlag?: boolean;
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
email?: string;
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* 身份证
|
||||
*/
|
||||
idCard?: string;
|
||||
/**
|
||||
* 是否离职
|
||||
*/
|
||||
leaveFlag?: boolean;
|
||||
/**
|
||||
* 登录账号
|
||||
*/
|
||||
loginName?: string;
|
||||
/**
|
||||
* 别名
|
||||
*/
|
||||
nickName?: string;
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
phone?: string;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-24 17:21:35
|
||||
* @LastEditTime: 2021-08-24 17:24:31
|
||||
* @LastEditors: zhuoda
|
||||
* @Description:
|
||||
* @FilePath: /smart-admin/src/api/system/home/home-api.ts
|
||||
*/
|
||||
import { ResponseModel } from '../../base-model/response-model';
|
||||
import { HomeAmountStatisticsVo } from './model/home-amount-statistics-vo';
|
||||
import { HomeWaitHandleVo } from './model/home-wait-handle-vo';
|
||||
import { getRequest, postRequest } from '/@/lib/axios';
|
||||
export const homeApi = {
|
||||
/**
|
||||
* @description: 首页-金额统计(业绩、收款、订单数等) by zhuoda
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
homeAmountStatistics: () => {
|
||||
return getRequest<ResponseModel<HomeAmountStatisticsVo>>('/home/amount/statistics');
|
||||
},
|
||||
/**
|
||||
* @description: 首页-待办信息 by zhuoda
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
homeWaitHandle: () => {
|
||||
return getRequest<ResponseModel<HomeWaitHandleVo>>('home/wait/handle');
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* smart-admin-local
|
||||
* http://localhost:50110/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { HomeEmployeeReceiveVo } from './home-employee-receive-vo';
|
||||
import { HomeEmployeeOrderVo } from './home-employee-order-vo';
|
||||
import { HomeEmployeeSaleTargetVo } from './home-employee-sale-target-vo';
|
||||
|
||||
|
||||
export interface HomeAmountStatisticsVo {
|
||||
orderVO?: HomeEmployeeOrderVo;
|
||||
receiveVO?: HomeEmployeeReceiveVo;
|
||||
saleTargetVO?: HomeEmployeeSaleTargetVo;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* smart-admin-local
|
||||
* http://localhost:50110/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface HomeEmployeeOrderVo {
|
||||
/**
|
||||
* 上月订单数
|
||||
*/
|
||||
lastMonthNum?: number;
|
||||
/**
|
||||
* 本月订单数
|
||||
*/
|
||||
thisMonthNum?: number;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* smart-admin-local
|
||||
* http://localhost:50110/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface HomeEmployeeReceiveVo {
|
||||
/**
|
||||
* 上月收款金额
|
||||
*/
|
||||
lastMonthAmount?: number;
|
||||
/**
|
||||
* 本月收款金额
|
||||
*/
|
||||
thisMonthAmount?: number;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* smart-admin-local
|
||||
* http://localhost:50110/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface HomeEmployeeSaleTargetVo {
|
||||
/**
|
||||
* 日均金额
|
||||
*/
|
||||
averageAmount?: number;
|
||||
/**
|
||||
* 月度销售金额(完成金额)
|
||||
*/
|
||||
salesAmount?: number;
|
||||
/**
|
||||
* 月度目标金额
|
||||
*/
|
||||
targetAmount?: number;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* smart-admin-local
|
||||
* http://localhost:50110/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface HomeWaitHandleVo {
|
||||
/**
|
||||
* 驳回完成收款单数
|
||||
*/
|
||||
rejectCompleteReceiveOrderNum?: number;
|
||||
/**
|
||||
* 驳回收款单数
|
||||
*/
|
||||
rejectReceiveOrderNum?: number;
|
||||
/**
|
||||
* 驳回退款单数
|
||||
*/
|
||||
rejectRefundOrderNum?: number;
|
||||
/**
|
||||
* 签订合同数
|
||||
*/
|
||||
signContractNum?: number;
|
||||
/**
|
||||
* 关联线索欠款(余额)总金额
|
||||
*/
|
||||
userTotalAmount?: number;
|
||||
/**
|
||||
* 待跟进数量
|
||||
*/
|
||||
waitTrackNum?: number;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-03 10:27:11
|
||||
* @LastEditTime: 2021-08-18 20:03:44
|
||||
* @LastEditors: zhuoda
|
||||
* @Description:
|
||||
* @FilePath: /smart-admin/src/api/system/login/login-model.ts
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface EmployeeLoginFormDto
|
||||
*/
|
||||
export interface EmployeeLoginFormDto {
|
||||
/**
|
||||
* 验证码
|
||||
* @type {string}
|
||||
* @memberof EmployeeLoginFormDto
|
||||
*/
|
||||
code?: string;
|
||||
/**
|
||||
* 验证码uuid
|
||||
* @type {string}
|
||||
* @memberof EmployeeLoginFormDto
|
||||
*/
|
||||
codeUuid?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof EmployeeLoginFormDto
|
||||
*/
|
||||
loginName: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof EmployeeLoginFormDto
|
||||
*/
|
||||
loginPwd: string;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-03 10:27:11
|
||||
* @LastEditTime: 2021-08-18 20:04:05
|
||||
* @LastEditors: zhuoda
|
||||
* @Description:
|
||||
* @FilePath: /smart-admin/src/api/system/login/login.ts
|
||||
*/
|
||||
import { EmployeeLoginVo } from './model/employee-login-vo';
|
||||
import { ResponseModel } from '/@/api/base-model/response-model';
|
||||
import { EmployeeLoginFormDto } from '/@/api/system/login/login-model';
|
||||
import { getRequest, postRequest } from '/@/lib/axios';
|
||||
|
||||
export const loginApi = {
|
||||
/**
|
||||
* 登录
|
||||
* @param param
|
||||
*/
|
||||
login: (param: EmployeeLoginFormDto) => {
|
||||
return postRequest<ResponseModel<EmployeeLoginVo>>('/login', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取登录信息
|
||||
* @param param
|
||||
*/
|
||||
getLogin: () => {
|
||||
return getRequest<ResponseModel<EmployeeLoginVo>>('/login/get');
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-18 20:02:35
|
||||
* @LastEditTime: 2021-09-01
|
||||
* @LastEditors: zhuoda
|
||||
* @Description:
|
||||
* @FilePath: /smart-admin/src/api/system/login/model/employee-login-vo.ts
|
||||
*/
|
||||
/**
|
||||
* smart-admin-local
|
||||
* http://localhost:50110/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { MenuTreeVo } from '../../menu/model/menu-tree-vo';
|
||||
|
||||
export interface EmployeeLoginVo {
|
||||
/**
|
||||
* 员工名称
|
||||
*/
|
||||
actualName: string;
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
departmentId?: number;
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
departmentName?: string;
|
||||
/**
|
||||
* 是否被禁用
|
||||
*/
|
||||
disabledFlag?: boolean;
|
||||
/**
|
||||
* 员工id
|
||||
*/
|
||||
employeeId?: number;
|
||||
/**
|
||||
* : <br> export const <br> GenderEnum = <BR> {<br> UNKNOWN:{<br> value:0,<br> desc:\'未知\'<br> },<br> MAN:{<br> value:1,<br> desc:\'男\'<br> },<br> WOMAN:{<br> value:2,<br> desc:\'女\'<br> }<br>} <br>
|
||||
*/
|
||||
gender?: number;
|
||||
/**
|
||||
* 是否为超管
|
||||
*/
|
||||
isSuperMan?: boolean;
|
||||
/**
|
||||
* 登录账号
|
||||
*/
|
||||
loginName?: string;
|
||||
/**
|
||||
* 菜单树
|
||||
*/
|
||||
menuTree?: Array<MenuTreeVo>;
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
phone?: string;
|
||||
/**
|
||||
* 功能点权限列表
|
||||
*/
|
||||
pointsList?: Array<string>;
|
||||
/**
|
||||
* 角色列表
|
||||
*/
|
||||
roleList?: Array<number>;
|
||||
/**
|
||||
* token
|
||||
*/
|
||||
token?: string;
|
||||
/**
|
||||
* 所属校区
|
||||
*/
|
||||
schoolId?: number;
|
||||
/**
|
||||
* 所属校区名称
|
||||
*/
|
||||
schoolName?: string;
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-11 22:15:04
|
||||
* @LastEditTime: 2021-09-01 20:21:29
|
||||
* @LastEditors: zhuoda
|
||||
* @Description:
|
||||
* @FilePath: /smart-admin/src/api/system/menu/menu-api.ts
|
||||
*/
|
||||
import { getRequest, postRequest } from '/@/lib/axios';
|
||||
import { MenuAddForm } from '/@/api/system/menu/model/menu-add-form';
|
||||
import { ResponseModel } from '/@/api/base-model/response-model';
|
||||
import { MenuUpdateForm } from '/@/api/system/menu/model/menu-update-form';
|
||||
import { MenuVo } from '/@/api/system/menu/model/menu-vo';
|
||||
import { MenuTreeVo } from '/@/api/system/menu/model/menu-tree-vo';
|
||||
import { RequestUrlVo } from './model/request-url-vo';
|
||||
|
||||
export const menuApi = {
|
||||
/**
|
||||
* 添加菜单
|
||||
*/
|
||||
addMenu: (param: MenuAddForm) => {
|
||||
return postRequest<ResponseModel<String>>('/menu/add', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 更新菜单
|
||||
*/
|
||||
updateMenu: (param: MenuUpdateForm) => {
|
||||
return postRequest<ResponseModel<String>>('/menu/update', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 批量删除菜单
|
||||
*/
|
||||
batchDeleteMenu: (menuIdList: Array<number | undefined>) => {
|
||||
return getRequest<ResponseModel<String>>(`/menu/batchDelete?menuIdList=${menuIdList}`);
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询所有菜单列表
|
||||
*/
|
||||
queryMenu: (): Promise<ResponseModel<MenuVo[]>> => {
|
||||
return getRequest<ResponseModel<MenuVo[]>>('/menu/query');
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询菜单树
|
||||
*/
|
||||
queryMenuTree: (onlyMenu?: boolean): Promise<ResponseModel<MenuTreeVo[]>> => {
|
||||
return getRequest<ResponseModel<MenuTreeVo[]>>(`/menu/tree?onlyMenu=${onlyMenu}`);
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取所有请求路径
|
||||
*/
|
||||
getAllUrl: () => {
|
||||
return getRequest<ResponseModel<RequestUrlVo[]>>('/menu/getAllUrl');
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-03 10:27:11
|
||||
* @LastEditTime: 2021-09-01 20:57:32
|
||||
* @LastEditors: zhuoda
|
||||
* @Description:
|
||||
* @FilePath: /smart-admin/src/api/system/menu/model/menu-add-form.ts
|
||||
*/
|
||||
/**
|
||||
* smart-admin-java-2.0-admin
|
||||
* http://localhost:20086/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { MenuPointsOperateForm } from './menu-points-operate-form';
|
||||
|
||||
export interface MenuAddForm {
|
||||
/**
|
||||
* 是否缓存
|
||||
*/
|
||||
cacheFlag?: boolean;
|
||||
/**
|
||||
* 组件路径
|
||||
*/
|
||||
component?: string;
|
||||
/**
|
||||
* 功能点关联菜单ID
|
||||
*/
|
||||
contextMenuId?: number;
|
||||
/**
|
||||
* 禁用状态
|
||||
*/
|
||||
disabledFlag?: boolean;
|
||||
/**
|
||||
* 是否为外链
|
||||
*/
|
||||
frameFlag?: boolean;
|
||||
/**
|
||||
* 菜单图标
|
||||
*/
|
||||
icon?: string;
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
menuName?: string;
|
||||
/**
|
||||
* 类型: <br> export const <br> MENU_TYPE_ENUM = <BR> {<br> CATALOG:{<br> value:1,<br> desc:\'目录\'<br> },<br> MENU:{<br> value:2,<br> desc:\'菜单\'<br> },<br> POINTS:{<br> value:3,<br> desc:\'功能点\'<br> }<br>} <br>
|
||||
*/
|
||||
menuType: string | number;
|
||||
/**
|
||||
* 父菜单ID
|
||||
*/
|
||||
parentId?: number;
|
||||
/**
|
||||
* 路由地址
|
||||
*/
|
||||
path?: string;
|
||||
/**
|
||||
* 接口权限
|
||||
*/
|
||||
perms?: string;
|
||||
/**
|
||||
* 接口权限(拆分)
|
||||
*/
|
||||
permsList?: string[];
|
||||
/**
|
||||
* 功能点列表
|
||||
*/
|
||||
pointList?: Array<MenuPointsOperateForm>;
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
sort?: number;
|
||||
/**
|
||||
* 显示状态
|
||||
*/
|
||||
visibleFlag?: boolean;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-03 10:27:11
|
||||
* @LastEditTime: 2021-09-01 20:56:03
|
||||
* @LastEditors: zhuoda
|
||||
* @Description:
|
||||
* @FilePath: /smart-admin/src/api/system/menu/model/menu-points-operate-form.ts
|
||||
*/
|
||||
/**
|
||||
* smart-admin-java-2.0-admin
|
||||
* http://localhost:20086/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface MenuPointsOperateForm {
|
||||
/**
|
||||
* 功能点关联菜单ID
|
||||
*/
|
||||
contextMenuId?: number;
|
||||
/**
|
||||
* 禁用状态
|
||||
*/
|
||||
disabledFlag?: boolean;
|
||||
/**
|
||||
* 菜单ID
|
||||
*/
|
||||
menuId?: number;
|
||||
/**
|
||||
* 功能点名称
|
||||
*/
|
||||
menuName?: string;
|
||||
/**
|
||||
* 接口权限
|
||||
*/
|
||||
permsList?: string[];
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-28 14:19:22
|
||||
* @LastEditTime: 2021-08-28 15:08:02
|
||||
* @LastEditors: zhuoda
|
||||
* @Description:
|
||||
* @FilePath: /smart-admin/src/api/system/menu/model/menu-simple-tree-vo.ts
|
||||
*/
|
||||
/**
|
||||
* smart-admin-local
|
||||
* http://localhost:50110/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface MenuSimpleTreeVo {
|
||||
/**
|
||||
* 子菜单
|
||||
*/
|
||||
children?: Array<MenuSimpleTreeVo>;
|
||||
/**
|
||||
* 功能点关联菜单ID
|
||||
*/
|
||||
contextMenuId?: number;
|
||||
/**
|
||||
* 菜单ID
|
||||
*/
|
||||
menuId?: number;
|
||||
/**
|
||||
* 父菜单ID
|
||||
*/
|
||||
parentId?: number;
|
||||
/**
|
||||
* 菜单类型
|
||||
*/
|
||||
menuType?:number;
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
menuName?: string;
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
* @Description:
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-10
|
||||
* @LastEditTime: 2021-09-01 21:16:00
|
||||
* @LastEditors: zhuoda
|
||||
*/
|
||||
/**
|
||||
* http://localhost:50110/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface MenuTreeVo {
|
||||
/**
|
||||
* 是否缓存
|
||||
*/
|
||||
cacheFlag?: boolean;
|
||||
/**
|
||||
* 菜单子集
|
||||
*/
|
||||
children?: Array<MenuTreeVo>;
|
||||
/**
|
||||
* 组件路径
|
||||
*/
|
||||
component?: string;
|
||||
/**
|
||||
* 功能点关联菜单ID
|
||||
*/
|
||||
contextMenuId?: number;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime?: string;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
createUserId?: number;
|
||||
/**
|
||||
* 禁用状态
|
||||
*/
|
||||
disabledFlag?: boolean;
|
||||
/**
|
||||
* 是否为外链
|
||||
*/
|
||||
frameFlag?: boolean;
|
||||
/**
|
||||
* 菜单图标
|
||||
*/
|
||||
icon?: string;
|
||||
/**
|
||||
* 菜单ID
|
||||
*/
|
||||
menuId: number;
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
menuName?: string;
|
||||
/**
|
||||
* 类型: <br> export const <br> MENU_TYPE_ENUM = <BR> {<br> CATALOG:{<br> value:1,<br> desc:\'目录\'<br> },<br> MENU:{<br> value:2,<br> desc:\'菜单\'<br> },<br> POINTS:{<br> value:3,<br> desc:\'功能点\'<br> }<br>} <br>
|
||||
*/
|
||||
menuType: number;
|
||||
/**
|
||||
* 父菜单ID 无上级可传0
|
||||
*/
|
||||
parentId?: number;
|
||||
/**
|
||||
* 路由地址
|
||||
*/
|
||||
path?: string;
|
||||
/**
|
||||
* 接口权限
|
||||
*/
|
||||
perms?: string;
|
||||
/**
|
||||
* 接口权限
|
||||
*/
|
||||
permsList?: string[];
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
sort?: number;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
updateTime?: string;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
updateUserId?: number;
|
||||
/**
|
||||
* 显示状态
|
||||
*/
|
||||
visibleFlag?: boolean;
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-03 10:27:11
|
||||
* @LastEditTime: 2021-09-01 20:57:27
|
||||
* @LastEditors: zhuoda
|
||||
* @Description:
|
||||
* @FilePath: /smart-admin/src/api/system/menu/model/menu-update-form.ts
|
||||
*/
|
||||
/**
|
||||
* smart-admin-java-2.0-admin
|
||||
* http://localhost:20086/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { MenuPointsOperateForm } from './menu-points-operate-form';
|
||||
|
||||
export interface MenuUpdateForm {
|
||||
/**
|
||||
* 是否缓存
|
||||
*/
|
||||
cacheFlag?: boolean;
|
||||
/**
|
||||
* 组件路径
|
||||
*/
|
||||
component?: string;
|
||||
/**
|
||||
* 功能点关联菜单ID
|
||||
*/
|
||||
contextMenuId?: number;
|
||||
/**
|
||||
* 禁用状态
|
||||
*/
|
||||
disabledFlag?: boolean;
|
||||
/**
|
||||
* 是否为外链
|
||||
*/
|
||||
frameFlag?: boolean;
|
||||
/**
|
||||
* 菜单图标
|
||||
*/
|
||||
icon?: string;
|
||||
/**
|
||||
* 菜单ID
|
||||
*/
|
||||
menuId?: number;
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
menuName?: string;
|
||||
/**
|
||||
* 类型: <br> export const <br> MENU_TYPE_ENUM = <BR> {<br> CATALOG:{<br> value:1,<br> desc:\'目录\'<br> },<br> MENU:{<br> value:2,<br> desc:\'菜单\'<br> },<br> POINTS:{<br> value:3,<br> desc:\'功能点\'<br> }<br>} <br>
|
||||
*/
|
||||
menuType: string | number;
|
||||
/**
|
||||
* 父菜单ID
|
||||
*/
|
||||
parentId?: number;
|
||||
/**
|
||||
* 路由地址
|
||||
*/
|
||||
path?: string;
|
||||
/**
|
||||
* 接口权限
|
||||
*/
|
||||
perms?: string;
|
||||
/**
|
||||
* 接口权限(拆分)
|
||||
*/
|
||||
permsList?: string[];
|
||||
/**
|
||||
* 功能点列表
|
||||
*/
|
||||
pointList?: Array<MenuPointsOperateForm>;
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
sort?: number;
|
||||
/**
|
||||
* 显示状态
|
||||
*/
|
||||
visibleFlag?: boolean;
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-11 11:52:11
|
||||
* @LastEditTime: 2021-09-01 20:55:06
|
||||
* @LastEditors: zhuoda
|
||||
* @Description:
|
||||
* @FilePath: /smart-admin/src/api/system/menu/model/menu-vo.ts
|
||||
*/
|
||||
/**
|
||||
* smart-admin-java-2.0-admin
|
||||
* http://localhost:20086/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface MenuVo {
|
||||
/**
|
||||
* 是否缓存
|
||||
*/
|
||||
cacheFlag?: boolean;
|
||||
/**
|
||||
* 组件路径
|
||||
*/
|
||||
component?: string;
|
||||
/**
|
||||
* 功能点关联菜单ID
|
||||
*/
|
||||
contextMenuId?: number;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime?: string;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
createUser?: number;
|
||||
/**
|
||||
* 禁用状态
|
||||
*/
|
||||
disabledFlag?: boolean;
|
||||
/**
|
||||
* 是否为外链
|
||||
*/
|
||||
frameFlag?: boolean;
|
||||
/**
|
||||
* 菜单图标
|
||||
*/
|
||||
icon?: string;
|
||||
/**
|
||||
* 菜单ID
|
||||
*/
|
||||
menuId?: number;
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
menuName?: string;
|
||||
/**
|
||||
* 类型: <br> export const <br> MENU_TYPE_ENUM = <BR> {<br> CATALOG:{<br> value:1,<br> desc:\'目录\'<br> },<br> MENU:{<br> value:2,<br> desc:\'菜单\'<br> },<br> POINTS:{<br> value:3,<br> desc:\'功能点\'<br> }<br>} <br>
|
||||
*/
|
||||
menuType: number;
|
||||
/**
|
||||
* 父菜单ID
|
||||
*/
|
||||
parentId?: number;
|
||||
/**
|
||||
* 路由地址
|
||||
*/
|
||||
path?: string;
|
||||
/**
|
||||
* 接口权限
|
||||
*/
|
||||
perms?: string;
|
||||
/**
|
||||
* 接口权限(拆分)
|
||||
*/
|
||||
permsList?: string[];
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
sort?: number;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
updateTime?: string;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
updateUser?: number;
|
||||
/**
|
||||
* 显示状态
|
||||
*/
|
||||
visibleFlag?: boolean;
|
||||
|
||||
/**
|
||||
* 孩子
|
||||
*/
|
||||
children?: MenuVo[];
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export * from './menu-add-form';
|
||||
export * from './menu-points-operate-form';
|
||||
export * from './response-dto-ofstring';
|
||||
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* smart-admin-local
|
||||
* http://localhost:50110/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface RequestUrlVo {
|
||||
/**
|
||||
* 注释说明
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
* controller.method
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* url
|
||||
*/
|
||||
url?: string;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* smart-admin-local
|
||||
* http://localhost:50110/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface RoleMenuDto {
|
||||
/**
|
||||
* 菜单ID集合
|
||||
*/
|
||||
menuIdList?: Array<number>;
|
||||
/**
|
||||
* 角色id
|
||||
*/
|
||||
roleId?: number;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-28 14:19:33
|
||||
* @LastEditTime: 2021-08-28 14:19:46
|
||||
* @LastEditors: zhuoda
|
||||
* @Description:
|
||||
* @FilePath: /smart-admin/src/api/system/role-menu/modal/role-menu-tree-vo.ts
|
||||
*/
|
||||
/**
|
||||
* smart-admin-local
|
||||
* http://localhost:50110/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { MenuSimpleTreeVo } from "../../menu/model/menu-simple-tree-vo";
|
||||
|
||||
|
||||
export interface RoleMenuTreeVo {
|
||||
/**
|
||||
* 菜单列表
|
||||
*/
|
||||
menuTreeList?: Array<MenuSimpleTreeVo>;
|
||||
/**
|
||||
* 角色ID
|
||||
*/
|
||||
roleId?: number;
|
||||
/**
|
||||
* 选中的菜单ID
|
||||
*/
|
||||
selectedMenuId?: Array<number>;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-28 14:16:46
|
||||
* @LastEditTime: 2021-08-28 14:25:36
|
||||
* @LastEditors: zhuoda
|
||||
* @Description:
|
||||
* @FilePath: /smart-admin/src/api/system/role-menu/role-menu-api.ts
|
||||
*/
|
||||
import { ResponseModel } from '../../base-model/response-model';
|
||||
import { RoleMenuDto } from './modal/role-menu-dto';
|
||||
import { RoleMenuTreeVo } from './modal/role-menu-tree-vo';
|
||||
import { getRequest, postRequest } from '/@/lib/axios';
|
||||
export const roleMenuApi = {
|
||||
/**
|
||||
* @description: 获取角色关联菜单权限
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
getRoleSelectedMenu: (roleId: number) => {
|
||||
return getRequest<ResponseModel<RoleMenuTreeVo>>(`role/menu/getRoleSelectedMenu/${roleId}`);
|
||||
},
|
||||
/**
|
||||
* @description: 更新角色权限
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
updateRoleMenu: (data: RoleMenuDto) => {
|
||||
return postRequest<ResponseModel<string>>('role/menu/updateRoleMenu', data);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* smart-admin-local
|
||||
* http://localhost:50110/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { DataScopeViewTypeVo } from './data-scope-view-type-vo';
|
||||
|
||||
|
||||
export interface DataScopeAndViewTypeVo {
|
||||
/**
|
||||
* 数据范围类型
|
||||
*/
|
||||
dataScopeType?: number;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
dataScopeTypeDesc?: string;
|
||||
/**
|
||||
* 数据范围名称
|
||||
*/
|
||||
dataScopeTypeName?: string;
|
||||
/**
|
||||
* 顺序
|
||||
*/
|
||||
dataScopeTypeSort?: number;
|
||||
/**
|
||||
* 可见范围列表
|
||||
*/
|
||||
viewTypeList?: Array<DataScopeViewTypeVo>;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* smart-admin-local
|
||||
* http://localhost:50110/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface DataScopeBatchSetDto {
|
||||
/**
|
||||
* 数据范围类型
|
||||
*/
|
||||
dataScopeType?: number;
|
||||
/**
|
||||
* 可见范围
|
||||
*/
|
||||
viewType?: number;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* smart-admin-local
|
||||
* http://localhost:50110/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { DataScopeBatchSetDto } from './data-scope-batch-set-dto';
|
||||
|
||||
|
||||
export interface DataScopeBatchSetRoleDto {
|
||||
/**
|
||||
* 设置信息
|
||||
*/
|
||||
batchSetList?: Array<DataScopeBatchSetDto>;
|
||||
/**
|
||||
* 角色id
|
||||
*/
|
||||
roleId?: number;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* smart-admin-local
|
||||
* http://localhost:50110/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface DataScopeSelectVo {
|
||||
/**
|
||||
* 数据范围id
|
||||
*/
|
||||
dataScopeType?: number;
|
||||
/**
|
||||
* 可见范围
|
||||
*/
|
||||
viewType?: number;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* smart-admin-local
|
||||
* http://localhost:50110/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface DataScopeViewTypeVo {
|
||||
/**
|
||||
* 可见范围
|
||||
*/
|
||||
viewType?: number;
|
||||
/**
|
||||
* 级别,用于表示范围大小
|
||||
*/
|
||||
viewTypeLevel?: number;
|
||||
/**
|
||||
* 可见范围名称
|
||||
*/
|
||||
viewTypeName?: string;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* smart-admin-local
|
||||
* http://localhost:50110/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface RoleAddDto {
|
||||
/**
|
||||
* 角色描述
|
||||
*/
|
||||
remark?: string;
|
||||
/**
|
||||
* 角色名称
|
||||
*/
|
||||
roleName?: string;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* smart-admin-local
|
||||
* http://localhost:50110/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface RoleEmployeeBatchDto {
|
||||
/**
|
||||
* 员工id集合
|
||||
*/
|
||||
employeeIdList?: Array<number>;
|
||||
/**
|
||||
* 角色id
|
||||
*/
|
||||
roleId?: number;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-30 11:10:09
|
||||
* @LastEditTime: 2021-08-30 11:20:04
|
||||
* @LastEditors: zhuoda
|
||||
* @Description:
|
||||
* @FilePath: /smart-admin/src/api/system/role/model/role-query-dto.ts
|
||||
*/
|
||||
/**
|
||||
* smart-admin-local
|
||||
* http://localhost:50110/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { SortItemDto } from './sort-item-dto';
|
||||
|
||||
|
||||
export interface RoleQueryDto {
|
||||
/**
|
||||
* 页码(不能为空)
|
||||
*/
|
||||
pageNum: number;
|
||||
/**
|
||||
* 每页数量(不能为空)
|
||||
*/
|
||||
pageSize: number;
|
||||
/**
|
||||
* 角色id
|
||||
*/
|
||||
roleId?: number;
|
||||
/**
|
||||
* 角色名称
|
||||
*/
|
||||
roleName?: string;
|
||||
/**
|
||||
* 是否查询总条数
|
||||
*/
|
||||
searchCount?: boolean;
|
||||
/**
|
||||
* 排序字段集合
|
||||
*/
|
||||
sortItemList?: Array<SortItemDto>;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* smart-admin-local
|
||||
* http://localhost:50110/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface RoleUpdateDto {
|
||||
/**
|
||||
* 角色id
|
||||
*/
|
||||
id?: number;
|
||||
/**
|
||||
* 角色描述
|
||||
*/
|
||||
remark?: string;
|
||||
/**
|
||||
* 角色名称
|
||||
*/
|
||||
roleName?: string;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* smart-admin-local
|
||||
* http://localhost:50110/v2/api-docs?group=Admin
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface RoleVo {
|
||||
/**
|
||||
* 角色ID
|
||||
*/
|
||||
id?: number;
|
||||
/**
|
||||
* 角色备注
|
||||
*/
|
||||
remark?: string;
|
||||
/**
|
||||
* 角色名称
|
||||
*/
|
||||
roleName?: string;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
/*
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-08-16 15:53:46
|
||||
* @LastEditTime: 2021-08-30 15:18:18
|
||||
* @LastEditors: zhuoda
|
||||
* @Description:
|
||||
* @FilePath: /smart-admin/src/api/system/role/role-api.ts
|
||||
*/
|
||||
import { PageResultModel } from '../../base-model/page-result-model';
|
||||
import { ResponseModel } from '../../base-model/response-model';
|
||||
import { EmployeeVo } from '../employee/model/employee-vo';
|
||||
import { DataScopeAndViewTypeVo } from './model/data-scope-and-view-type-vo';
|
||||
import { DataScopeBatchSetRoleDto } from './model/data-scope-batch-set-role-dto';
|
||||
import { DataScopeSelectVo } from './model/data-scope-select-vo';
|
||||
import { RoleAddDto } from './model/role-add-dto';
|
||||
import { RoleEmployeeBatchDto } from './model/role-employee-batch-dto';
|
||||
import { RoleQueryDto } from './model/role-query-dto';
|
||||
import { RoleUpdateDto } from './model/role-update-dto';
|
||||
import { RoleVo } from './model/role-vo';
|
||||
import { getRequest, postRequest } from '/@/lib/axios';
|
||||
export const roleApi = {
|
||||
/**
|
||||
* @description: 获取所有角色
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
queryAll: (): Promise<ResponseModel<RoleVo[]>> => {
|
||||
return getRequest<ResponseModel<RoleVo[]>>('role/getAll');
|
||||
},
|
||||
/**
|
||||
* @description:添加角色
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
addRole: (data: RoleAddDto) => {
|
||||
return postRequest<ResponseModel<string>>('role/add', data);
|
||||
},
|
||||
/**
|
||||
* @description:更新角色
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
updateRole: (data: RoleUpdateDto) => {
|
||||
return postRequest<ResponseModel<string>>('role/update', data);
|
||||
},
|
||||
/**
|
||||
* @description: 删除角色
|
||||
* @param {number} roleId
|
||||
* @return {*}
|
||||
*/
|
||||
deleteRole: (roleId: number) => {
|
||||
return getRequest<ResponseModel<string>>(`role/delete/${roleId}`);
|
||||
},
|
||||
/**
|
||||
* @description: 批量设置某角色数据范围
|
||||
* @param {DataScopeBatchSetRoleDto} data
|
||||
* @return {*}
|
||||
*/
|
||||
updateDataScope: (data: DataScopeBatchSetRoleDto) => {
|
||||
return postRequest<ResponseModel<string>>('/dataScope/batchSet', data);
|
||||
},
|
||||
/**
|
||||
* @description: 获取当前系统所配置的所有数据范围
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
getDataScopeList: () => {
|
||||
return getRequest<ResponseModel<DataScopeAndViewTypeVo[]>>('/dataScope/list');
|
||||
},
|
||||
/**
|
||||
* @description: 获取某角色所设置的数据范围
|
||||
* @param {number} roleId
|
||||
* @return {*}
|
||||
*/
|
||||
getDataScopeByRoleId: (roleId: number) => {
|
||||
return getRequest<ResponseModel<DataScopeSelectVo[]>>(`/dataScope/listByRole/${roleId}`);
|
||||
},
|
||||
/**
|
||||
* @description: 获取角色成员-员工列表
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
queryRoleEmployee: (params: RoleQueryDto) => {
|
||||
return postRequest<ResponseModel<PageResultModel<EmployeeVo>>>('/role/listEmployee', params);
|
||||
},
|
||||
/**
|
||||
* @description: 从角色成员列表中移除员工
|
||||
* @param {number} employeeId
|
||||
* @param {number} roleId
|
||||
* @return {*}
|
||||
*/
|
||||
deleteEmployeeRole: (employeeId: number, roleId: number) => {
|
||||
return getRequest<ResponseModel<string>>('/role/removeEmployee?employeeId=' + employeeId + '&roleId=' + roleId);
|
||||
},
|
||||
/**
|
||||
* @description: 从角色成员列表中批量移除员工
|
||||
* @param {RoleEmployeeBatchDto} data
|
||||
* @return {*}
|
||||
*/
|
||||
deleteEmployeeList: (data: RoleEmployeeBatchDto) => {
|
||||
return postRequest<ResponseModel<string>>('/role/removeEmployeeList', data);
|
||||
},
|
||||
/**
|
||||
* @description: 根据角色id获取角色员工列表(无分页)
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
getRoleAllEmployee: (roleId: number) => {
|
||||
return getRequest<ResponseModel<EmployeeVo[]>>(`role/listAllEmployee/${roleId}`);
|
||||
},
|
||||
/**
|
||||
* @description: 角色成员列表中批量添加员工
|
||||
* @param {RoleEmployeeBatchDto} data
|
||||
* @return {*}
|
||||
*/
|
||||
addRoleEmployeeList: (data: RoleEmployeeBatchDto) => {
|
||||
return postRequest<ResponseModel<string>>('/role/addEmployeeList', data);
|
||||
},
|
||||
};
|
||||
BIN
admin-web/typescript-ant-design-vue/src/assets/img/logo.png
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
BIN
admin-web/typescript-ant-design-vue/src/assets/logo.png
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
@@ -0,0 +1,70 @@
|
||||
<template>
|
||||
<h1>{{ msg }}</h1>
|
||||
|
||||
<p>
|
||||
Recommended IDE setup:
|
||||
<a href="https://code.visualstudio.com/" target="_blank">VSCode</a>
|
||||
+
|
||||
<a
|
||||
href="https://marketplace.visualstudio.com/items?itemName=octref.vetur"
|
||||
target="_blank"
|
||||
>
|
||||
Vetur
|
||||
</a>
|
||||
or
|
||||
<a href="https://github.com/johnsoncodehk/volar" target="_blank">Volar</a>
|
||||
(if using
|
||||
<code><script setup></code>)
|
||||
</p>
|
||||
|
||||
<p>See <code>README.md</code> for more information.</p>
|
||||
|
||||
<p>
|
||||
<a href="https://vitejs.dev/guide/features.html" target="_blank">
|
||||
Vite Docs
|
||||
</a>
|
||||
|
|
||||
<a href="https://v3.vuejs.org/" target="_blank">Vue 3 Docs</a>
|
||||
</p>
|
||||
|
||||
<button type="button" @click="count++">count is: {{ count }}</button>
|
||||
<p>
|
||||
Edit
|
||||
<code>components/HelloWorld.vue</code> to test hot module replacement.
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { ref, defineComponent } from 'vue'
|
||||
export default defineComponent({
|
||||
name: 'HelloWorld',
|
||||
props: {
|
||||
msg: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
setup: () => {
|
||||
const count = ref(0)
|
||||
return { count }
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
a {
|
||||
color: #42b983;
|
||||
}
|
||||
|
||||
label {
|
||||
margin: 0 0.5em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
code {
|
||||
background-color: #eee;
|
||||
padding: 2px 4px;
|
||||
border-radius: 4px;
|
||||
color: #304455;
|
||||
}
|
||||
</style>
|
||||