初始化项目
3
.browserslistrc
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
> 1%
|
||||||
|
last 2 versions
|
||||||
|
not ie <= 10
|
39
.editorconfig
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
[*]
|
||||||
|
charset=utf-8
|
||||||
|
end_of_line=lf
|
||||||
|
insert_final_newline=false
|
||||||
|
indent_style=space
|
||||||
|
indent_size=2
|
||||||
|
|
||||||
|
[{*.ng,*.sht,*.html,*.shtm,*.shtml,*.htm}]
|
||||||
|
indent_style=space
|
||||||
|
indent_size=2
|
||||||
|
|
||||||
|
[{*.jhm,*.xslt,*.xul,*.rng,*.xsl,*.xsd,*.ant,*.tld,*.fxml,*.jrxml,*.xml,*.jnlp,*.wsdl}]
|
||||||
|
indent_style=space
|
||||||
|
indent_size=2
|
||||||
|
|
||||||
|
[{.babelrc,.stylelintrc,jest.config,.eslintrc,.prettierrc,*.json,*.jsb3,*.jsb2,*.bowerrc}]
|
||||||
|
indent_style=space
|
||||||
|
indent_size=2
|
||||||
|
|
||||||
|
[*.svg]
|
||||||
|
indent_style=space
|
||||||
|
indent_size=2
|
||||||
|
|
||||||
|
[*.js.map]
|
||||||
|
indent_style=space
|
||||||
|
indent_size=2
|
||||||
|
|
||||||
|
[*.less]
|
||||||
|
indent_style=space
|
||||||
|
indent_size=2
|
||||||
|
|
||||||
|
[*.vue]
|
||||||
|
indent_style=space
|
||||||
|
indent_size=2
|
||||||
|
|
||||||
|
[{.analysis_options,*.yml,*.yaml}]
|
||||||
|
indent_style=space
|
||||||
|
indent_size=2
|
||||||
|
|
4
.env
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
NODE_ENV=production
|
||||||
|
VUE_APP_PREVIEW=false
|
||||||
|
VUE_APP_API_BASE_URL=/api
|
||||||
|
VUE_APP_MODEL_BASE_URL=http://127.0.0.1:8080
|
4
.env.development
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
NODE_ENV=development
|
||||||
|
VUE_APP_PREVIEW=true
|
||||||
|
VUE_APP_API_BASE_URL=/api
|
||||||
|
VUE_APP_MODEL_BASE_URL=http://127.0.0.1:8080
|
4
.env.preview
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
NODE_ENV=production
|
||||||
|
VUE_APP_PREVIEW=true
|
||||||
|
VUE_APP_API_BASE_URL=/api
|
||||||
|
VUE_APP_MODEL_BASE_URL=http://127.0.0.1:8080
|
75
.eslintrc.js
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
module.exports = {
|
||||||
|
root: true,
|
||||||
|
env: {
|
||||||
|
node: true
|
||||||
|
},
|
||||||
|
'extends': [
|
||||||
|
'plugin:vue/strongly-recommended',
|
||||||
|
'@vue/standard'
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
'no-console': 'off',
|
||||||
|
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
||||||
|
'generator-star-spacing': 'off',
|
||||||
|
'no-mixed-operators': 0,
|
||||||
|
'vue/max-attributes-per-line': [
|
||||||
|
2,
|
||||||
|
{
|
||||||
|
'singleline': 5,
|
||||||
|
'multiline': {
|
||||||
|
'max': 1,
|
||||||
|
'allowFirstLine': false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'vue/attribute-hyphenation': 0,
|
||||||
|
'vue/html-self-closing': 0,
|
||||||
|
'vue/component-name-in-template-casing': 0,
|
||||||
|
'vue/html-closing-bracket-spacing': 0,
|
||||||
|
'vue/singleline-html-element-content-newline': 0,
|
||||||
|
'vue/no-unused-components': 0,
|
||||||
|
'vue/multiline-html-element-content-newline': 0,
|
||||||
|
'vue/no-use-v-if-with-v-for': 0,
|
||||||
|
'vue/html-closing-bracket-newline': 0,
|
||||||
|
'vue/no-parsing-error': 0,
|
||||||
|
'no-tabs': 0,
|
||||||
|
'quotes': [
|
||||||
|
2,
|
||||||
|
'single',
|
||||||
|
{
|
||||||
|
'avoidEscape': true,
|
||||||
|
'allowTemplateLiterals': true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'semi': [
|
||||||
|
2,
|
||||||
|
'never',
|
||||||
|
{
|
||||||
|
'beforeStatementContinuationChars': 'never'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'no-delete-var': 2,
|
||||||
|
'prefer-const': [
|
||||||
|
2,
|
||||||
|
{
|
||||||
|
'ignoreReadBeforeAssign': false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'template-curly-spacing': 'off',
|
||||||
|
'indent': ['error']
|
||||||
|
},
|
||||||
|
parserOptions: {
|
||||||
|
parser: 'babel-eslint'
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: [
|
||||||
|
'**/__tests__/*.{j,t}s?(x)',
|
||||||
|
'**/tests/unit/**/*.spec.{j,t}s?(x)'
|
||||||
|
],
|
||||||
|
env: {
|
||||||
|
jest: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
1
.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
public/* linguist-vendored
|
21
.gitignore
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
.DS_Store
|
||||||
|
node_modules
|
||||||
|
/dist
|
||||||
|
|
||||||
|
# local env files
|
||||||
|
.env.local
|
||||||
|
.env.*.local
|
||||||
|
|
||||||
|
# Log files
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
|
||||||
|
# Editor directories and files
|
||||||
|
.idea
|
||||||
|
.vscode
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
|
*.sw*
|
5
.prettierrc
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"printWidth": 120,
|
||||||
|
"semi": false,
|
||||||
|
"singleQuote": true
|
||||||
|
}
|
7
.travis.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
language: node_js
|
||||||
|
node_js:
|
||||||
|
- 10.15.0
|
||||||
|
cache: yarn
|
||||||
|
script:
|
||||||
|
- yarn
|
||||||
|
- yarn run lint --no-fix && yarn run build
|
58
README.md
@ -1,39 +1,31 @@
|
|||||||
# dbd-meeting-html
|
<h1 align="center">ICS Ant</h1>
|
||||||
|
|
||||||
#### 介绍
|
Overview
|
||||||
{**以下是 Gitee 平台说明,您可以替换此简介**
|
----
|
||||||
Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台
|
项目下载和运行
|
||||||
无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)}
|
----
|
||||||
|
|
||||||
#### 软件架构
|
- 拉取项目代码
|
||||||
软件架构说明
|
```bash
|
||||||
|
cd ics-ui
|
||||||
|
```
|
||||||
|
|
||||||
|
- 安装依赖
|
||||||
|
```
|
||||||
|
yarn install
|
||||||
|
```
|
||||||
|
|
||||||
#### 安装教程
|
- 开发模式运行
|
||||||
|
```
|
||||||
|
yarn run serve
|
||||||
|
```
|
||||||
|
|
||||||
1. xxxx
|
- 编译项目
|
||||||
2. xxxx
|
```
|
||||||
3. xxxx
|
yarn run build
|
||||||
|
```
|
||||||
|
|
||||||
#### 使用说明
|
- Lints and fixes files
|
||||||
|
```
|
||||||
1. xxxx
|
yarn run lint
|
||||||
2. xxxx
|
```
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### 参与贡献
|
|
||||||
|
|
||||||
1. Fork 本仓库
|
|
||||||
2. 新建 Feat_xxx 分支
|
|
||||||
3. 提交代码
|
|
||||||
4. 新建 Pull Request
|
|
||||||
|
|
||||||
|
|
||||||
#### 特技
|
|
||||||
|
|
||||||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
|
||||||
2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
|
|
||||||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
|
|
||||||
4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
|
|
||||||
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
|
||||||
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
|
26
babel.config.js
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
const plugins = []
|
||||||
|
// if your use import on Demand, Use this code,but can't use the cdn together
|
||||||
|
// plugins.push(
|
||||||
|
// [ 'import', {
|
||||||
|
// 'libraryName': 'ant-design-vue',
|
||||||
|
// 'libraryDirectory': 'es',
|
||||||
|
// 'style': true // `style: true` 会加载 less 文件
|
||||||
|
// } ]
|
||||||
|
// )
|
||||||
|
if (['production', 'prod'].includes(process.env.NODE_ENV)) {
|
||||||
|
plugins.push('transform-remove-console')
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
presets: [
|
||||||
|
'@vue/app',
|
||||||
|
[
|
||||||
|
'@babel/preset-env',
|
||||||
|
{
|
||||||
|
'useBuiltIns': 'entry',
|
||||||
|
'corejs': 3
|
||||||
|
}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
plugins: plugins
|
||||||
|
}
|
49
config/plugin.config.js
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
const ThemeColorReplacer = require('webpack-theme-color-replacer')
|
||||||
|
const generate = require('@ant-design/colors/lib/generate').default
|
||||||
|
|
||||||
|
const getAntdSerials = (color) => {
|
||||||
|
// 淡化(即less的tint)
|
||||||
|
const lightens = new Array(9).fill().map((t, i) => {
|
||||||
|
return ThemeColorReplacer.varyColor.lighten(color, i / 10)
|
||||||
|
})
|
||||||
|
const colorPalettes = generate(color)
|
||||||
|
const rgb = ThemeColorReplacer.varyColor.toNum3(color.replace('#', '')).join(',')
|
||||||
|
return lightens.concat(colorPalettes).concat(rgb)
|
||||||
|
}
|
||||||
|
|
||||||
|
const themePluginOption = {
|
||||||
|
fileName: 'css/theme-colors-[contenthash:8].css',
|
||||||
|
matchColors: getAntdSerials('#1890ff'), // 主色系列
|
||||||
|
// 改变样式选择器,解决样式覆盖问题
|
||||||
|
changeSelector (selector) {
|
||||||
|
switch (selector) {
|
||||||
|
case '.ant-calendar-today .ant-calendar-date':
|
||||||
|
return ':not(.ant-calendar-selected-date):not(.ant-calendar-selected-day)' + selector
|
||||||
|
case '.ant-btn:focus,.ant-btn:hover':
|
||||||
|
return '.ant-btn:focus:not(.ant-btn-primary):not(.ant-btn-danger),.ant-btn:hover:not(.ant-btn-primary):not(.ant-btn-danger)'
|
||||||
|
case '.ant-btn.active,.ant-btn:active':
|
||||||
|
return '.ant-btn.active:not(.ant-btn-primary):not(.ant-btn-danger),.ant-btn:active:not(.ant-btn-primary):not(.ant-btn-danger)'
|
||||||
|
case '.ant-steps-item-process .ant-steps-item-icon > .ant-steps-icon':
|
||||||
|
case '.ant-steps-item-process .ant-steps-item-icon>.ant-steps-icon':
|
||||||
|
return ':not(.ant-steps-item-process)' + selector
|
||||||
|
// fixed https://github.com/vueComponent/ant-design-vue-pro/issues/876
|
||||||
|
case '.ant-steps-item-process .ant-steps-item-icon':
|
||||||
|
return ':not(.ant-steps-item-custom)' + selector
|
||||||
|
case '.ant-menu-horizontal>.ant-menu-item-active,.ant-menu-horizontal>.ant-menu-item-open,.ant-menu-horizontal>.ant-menu-item-selected,.ant-menu-horizontal>.ant-menu-item:hover,.ant-menu-horizontal>.ant-menu-submenu-active,.ant-menu-horizontal>.ant-menu-submenu-open,.ant-menu-horizontal>.ant-menu-submenu-selected,.ant-menu-horizontal>.ant-menu-submenu:hover':
|
||||||
|
case '.ant-menu-horizontal > .ant-menu-item-active,.ant-menu-horizontal > .ant-menu-item-open,.ant-menu-horizontal > .ant-menu-item-selected,.ant-menu-horizontal > .ant-menu-item:hover,.ant-menu-horizontal > .ant-menu-submenu-active,.ant-menu-horizontal > .ant-menu-submenu-open,.ant-menu-horizontal > .ant-menu-submenu-selected,.ant-menu-horizontal > .ant-menu-submenu:hover':
|
||||||
|
return '.ant-menu-horizontal > .ant-menu-item-active,.ant-menu-horizontal > .ant-menu-item-open,.ant-menu-horizontal > .ant-menu-item-selected,.ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-item:hover,.ant-menu-horizontal > .ant-menu-submenu-active,.ant-menu-horizontal > .ant-menu-submenu-open,.ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-submenu-selected,.ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-submenu:hover'
|
||||||
|
case '.ant-menu-horizontal > .ant-menu-item-selected > a':
|
||||||
|
case '.ant-menu-horizontal>.ant-menu-item-selected>a':
|
||||||
|
return '.ant-menu-horizontal:not(ant-menu-light):not(.ant-menu-dark) > .ant-menu-item-selected > a'
|
||||||
|
case '.ant-menu-horizontal > .ant-menu-item > a:hover':
|
||||||
|
case '.ant-menu-horizontal>.ant-menu-item>a:hover':
|
||||||
|
return '.ant-menu-horizontal:not(ant-menu-light):not(.ant-menu-dark) > .ant-menu-item > a:hover'
|
||||||
|
default :
|
||||||
|
return selector
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const createThemeColorReplacerPlugin = () => new ThemeColorReplacer(themePluginOption)
|
||||||
|
|
||||||
|
module.exports = createThemeColorReplacerPlugin
|
115
config/themePluginConfig.js
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
export default {
|
||||||
|
theme: [
|
||||||
|
{
|
||||||
|
key: 'dark',
|
||||||
|
fileName: 'dark.css',
|
||||||
|
theme: 'dark'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: '#F5222D',
|
||||||
|
fileName: '#F5222D.css',
|
||||||
|
modifyVars: {
|
||||||
|
'@primary-color': '#F5222D'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: '#FA541C',
|
||||||
|
fileName: '#FA541C.css',
|
||||||
|
modifyVars: {
|
||||||
|
'@primary-color': '#FA541C'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: '#FAAD14',
|
||||||
|
fileName: '#FAAD14.css',
|
||||||
|
modifyVars: {
|
||||||
|
'@primary-color': '#FAAD14'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: '#13C2C2',
|
||||||
|
fileName: '#13C2C2.css',
|
||||||
|
modifyVars: {
|
||||||
|
'@primary-color': '#13C2C2'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: '#52C41A',
|
||||||
|
fileName: '#52C41A.css',
|
||||||
|
modifyVars: {
|
||||||
|
'@primary-color': '#52C41A'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: '#2F54EB',
|
||||||
|
fileName: '#2F54EB.css',
|
||||||
|
modifyVars: {
|
||||||
|
'@primary-color': '#2F54EB'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: '#722ED1',
|
||||||
|
fileName: '#722ED1.css',
|
||||||
|
modifyVars: {
|
||||||
|
'@primary-color': '#722ED1'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
key: '#F5222D',
|
||||||
|
theme: 'dark',
|
||||||
|
fileName: 'dark-#F5222D.css',
|
||||||
|
modifyVars: {
|
||||||
|
'@primary-color': '#F5222D'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: '#FA541C',
|
||||||
|
theme: 'dark',
|
||||||
|
fileName: 'dark-#FA541C.css',
|
||||||
|
modifyVars: {
|
||||||
|
'@primary-color': '#FA541C'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: '#FAAD14',
|
||||||
|
theme: 'dark',
|
||||||
|
fileName: 'dark-#FAAD14.css',
|
||||||
|
modifyVars: {
|
||||||
|
'@primary-color': '#FAAD14'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: '#13C2C2',
|
||||||
|
theme: 'dark',
|
||||||
|
fileName: 'dark-#13C2C2.css',
|
||||||
|
modifyVars: {
|
||||||
|
'@primary-color': '#13C2C2'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: '#52C41A',
|
||||||
|
theme: 'dark',
|
||||||
|
fileName: 'dark-#52C41A.css',
|
||||||
|
modifyVars: {
|
||||||
|
'@primary-color': '#52C41A'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: '#2F54EB',
|
||||||
|
theme: 'dark',
|
||||||
|
fileName: 'dark-#2F54EB.css',
|
||||||
|
modifyVars: {
|
||||||
|
'@primary-color': '#2F54EB'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: '#722ED1',
|
||||||
|
theme: 'dark',
|
||||||
|
fileName: 'dark-#722ED1.css',
|
||||||
|
modifyVars: {
|
||||||
|
'@primary-color': '#722ED1'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
31
docs/add-page-loading-animate.md
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
为首屏增加 加载动画
|
||||||
|
====
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## 需求
|
||||||
|
|
||||||
|
> 为了缓解用户第一次访问时,加载 JS 过大所导致用户等待白屏时间过长导致的用户体验不好,进行的一个优化动效。
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## 实现方案
|
||||||
|
|
||||||
|
1. 将 动画加载 dom 元素放在 #app 内,Vue 生命周期开始时,会自动清掉 #app 下的所有元素。
|
||||||
|
2. 将 动画加载 dom 元素放在 body 下,Vue 生命周期开始时 App.vue (created, mounted) 调用 `@/utils/utll` 下的 removeLoadingAnimate(#id, timeout) 则会移除加载动画
|
||||||
|
|
||||||
|
最后一步:
|
||||||
|
将样式插入到 `public/index.html` 文件的 `<head></head>` 最好写成内联 `<style>动画样式</style>`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
目前提供有两个样式,均在 `public/loading` 文件夹内。且 pro 已经默认使用了一套 loading 动画方案,可以直接参考 `public/index.html`
|
||||||
|
|
||||||
|
|
||||||
|
## 写在最后
|
||||||
|
|
||||||
|
目前 pro 有页面 overflow 显示出浏览器滚动条时,页面会抖动一下的问题。
|
||||||
|
|
||||||
|
欢迎各位提供能解决的方案和实现 demo。如果在条件允许的情况下,建议请直接使用 pro 进行改造,也欢迎直接 PR 到 pro 的仓库
|
101
docs/load-on-demand.md
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
按需加载 减小打包
|
||||||
|
====
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## 按需引入组件依赖
|
||||||
|
|
||||||
|
`Ant Design Pro Vue` 默认编码工作并不支持按需引入,不过可以通过以下操作结合 [Ant Design Of Vue](https://vuecomponent.github.io/ant-design-vue/docs/vue/introduce-cn/) 官方文档来进行按需引入。
|
||||||
|
|
||||||
|
- 增加项目按需引入依赖
|
||||||
|
- 修改引入组件方式
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1. 增加按需引入所需依赖 `babel-plugin-import`
|
||||||
|
并且修改文件 `babel.config.js`
|
||||||
|
```ecmascript 6
|
||||||
|
module.exports = {
|
||||||
|
presets: [
|
||||||
|
'@vue/app'
|
||||||
|
],
|
||||||
|
plugins: [
|
||||||
|
[ "import", {
|
||||||
|
"libraryName": "ant-design-vue",
|
||||||
|
"libraryDirectory": "es",
|
||||||
|
"style": "css"
|
||||||
|
} ]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
2. 修改引入组件方式 (注意,这只是一个例子,请完整引入你所需要的组件)
|
||||||
|
|
||||||
|
文件 `@/components/use.js`
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
import Vue from 'vue'
|
||||||
|
import {
|
||||||
|
Input,
|
||||||
|
Button,
|
||||||
|
Select,
|
||||||
|
Card,
|
||||||
|
Form,
|
||||||
|
Row,
|
||||||
|
Col,
|
||||||
|
Modal,
|
||||||
|
Table,
|
||||||
|
notification
|
||||||
|
} from 'ant-design-vue'
|
||||||
|
|
||||||
|
Vue.use(Input)
|
||||||
|
Vue.use(Button)
|
||||||
|
Vue.use(Select)
|
||||||
|
Vue.use(Card)
|
||||||
|
Vue.use(Form)
|
||||||
|
Vue.use(Row)
|
||||||
|
Vue.use(Col)
|
||||||
|
Vue.use(Modal)
|
||||||
|
Vue.use(Table)
|
||||||
|
Vue.use(notification)
|
||||||
|
|
||||||
|
Vue.prototype.$notification = notification;
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
3. 最后在 `main.js` 中引入 `@/components/use.js` 文件即可,如下
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
|
||||||
|
import Vue from 'vue'
|
||||||
|
import App from './App'
|
||||||
|
|
||||||
|
// 引入 按需组件的统一引入文件
|
||||||
|
import './components/use'
|
||||||
|
|
||||||
|
import './style/index.less'
|
||||||
|
|
||||||
|
|
||||||
|
Vue.config.productionTip = false
|
||||||
|
|
||||||
|
new Vue({
|
||||||
|
render: h => h(App),
|
||||||
|
}).$mount('#app')
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
**具体完整实现可参考分支 [feature/demand_load](https://github.com/sendya/ant-design-pro-vue/tree/feature/demand_load)**
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## 其他 减少打包大小
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1. Ant Design Vue 1.2.x 版本起,采用的 ant-design 官方方案 svg Icon 组件,整个项目打包会变大很多,图标进行按需加载可参考 https://github.com/HeskeyBaozi/reduce-antd-icons-bundle-demo
|
||||||
|
2. moment 按需加载 可参考 https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
|
20
docs/multi-tabs.md
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
多(页签)标签 模式
|
||||||
|
====
|
||||||
|
|
||||||
|
|
||||||
|
## 让框架支持打开的页面增加多标签,可随时切换
|
||||||
|
|
||||||
|
### 关于如何移除该功能 组件
|
||||||
|
1. 移除 `/src/components/layouts/BasicLayout.vue` L3, L12, L19
|
||||||
|
```vue
|
||||||
|
<multi-tab v-if="$store.getters.multiTab"></multi-tab>
|
||||||
|
```
|
||||||
|
2. 移除 `/src/config/defaultSettings.js` L25
|
||||||
|
|
||||||
|
3. 移除 `src/store/modules/app.js` L27, L76-L79, L118-L120
|
||||||
|
|
||||||
|
4. 移除 `src/utils/mixin.js` L21
|
||||||
|
|
||||||
|
5. 删除组件目录 `src/components/MultiTab`
|
||||||
|
|
||||||
|
> 以上 `L x` 均代表行N ,如 L3 = 行3
|
40
docs/webpack-bundle-analyzer.md
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
先增加依赖
|
||||||
|
|
||||||
|
```bash
|
||||||
|
// npm
|
||||||
|
$ npm install --save-dev webpack-bundle-analyzer
|
||||||
|
|
||||||
|
// or yarn
|
||||||
|
$ yarn add webpack-bundle-analyzer -D
|
||||||
|
```
|
||||||
|
|
||||||
|
配置文件 `vue.config.js` 增加 `configureWebpack.plugins` 参数
|
||||||
|
|
||||||
|
```
|
||||||
|
const path = require('path')
|
||||||
|
const webpack = require('webpack')
|
||||||
|
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
|
||||||
|
|
||||||
|
function resolve (dir) {
|
||||||
|
return path.join(__dirname, dir)
|
||||||
|
}
|
||||||
|
|
||||||
|
// vue.config.js
|
||||||
|
module.exports = {
|
||||||
|
configureWebpack: {
|
||||||
|
plugins: [
|
||||||
|
// Ignore all locale files of moment.js
|
||||||
|
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
|
||||||
|
// 依赖大小分析工具
|
||||||
|
new BundleAnalyzerPlugin(),
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
...
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
启动 `cli` 的 `build` 命令进行项目编译,编译完成时,会自动运行一个 http://localhost:8888 的地址,完整显示了支持库依赖
|
23
jest.config.js
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
module.exports = {
|
||||||
|
moduleFileExtensions: [
|
||||||
|
'js',
|
||||||
|
'jsx',
|
||||||
|
'json',
|
||||||
|
'vue'
|
||||||
|
],
|
||||||
|
transform: {
|
||||||
|
'^.+\\.vue$': 'vue-jest',
|
||||||
|
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
|
||||||
|
'^.+\\.jsx?$': 'babel-jest'
|
||||||
|
},
|
||||||
|
moduleNameMapper: {
|
||||||
|
'^@/(.*)$': '<rootDir>/src/$1'
|
||||||
|
},
|
||||||
|
snapshotSerializers: [
|
||||||
|
'jest-serializer-vue'
|
||||||
|
],
|
||||||
|
testMatch: [
|
||||||
|
'**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)'
|
||||||
|
],
|
||||||
|
testURL: 'http://localhost/'
|
||||||
|
}
|
18
jsconfig.json
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "es6",
|
||||||
|
"baseUrl": ".",
|
||||||
|
"paths": {
|
||||||
|
"@/*": [
|
||||||
|
"src/*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"exclude": [
|
||||||
|
"node_modules",
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
|
"include": [
|
||||||
|
"src/**/*"
|
||||||
|
]
|
||||||
|
}
|
16184
package-lock.json
generated
Normal file
79
package.json
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
{
|
||||||
|
"name": "ruoyi-ant",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"serve": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
|
||||||
|
"build": "vue-cli-service build",
|
||||||
|
"report": "vue-cli-service build --report",
|
||||||
|
"build:preview": "vue-cli-service build --mode preview",
|
||||||
|
"lint": "vue-cli-service lint",
|
||||||
|
"lint:nofix": "vue-cli-service lint --no-fix"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@ant-design-vue/pro-layout": "^1.0.1",
|
||||||
|
"@antv/data-set": "^0.10.2",
|
||||||
|
"@jiaminghi/data-view": "^2.10.0",
|
||||||
|
"@tinymce/tinymce-vue": "^3.2.0",
|
||||||
|
"ant-design-vue": "1.6.2",
|
||||||
|
"axios": "^0.19.0",
|
||||||
|
"core-js": "^3.6.4",
|
||||||
|
"crypto-js": "^4.0.0",
|
||||||
|
"echarts": "^5.1.1",
|
||||||
|
"enquire.js": "^2.1.6",
|
||||||
|
"js-cookie": "^2.2.0",
|
||||||
|
"lodash.clonedeep": "^4.5.0",
|
||||||
|
"lodash.get": "^4.4.2",
|
||||||
|
"lodash.pick": "^4.4.0",
|
||||||
|
"md5": "^2.2.1",
|
||||||
|
"mockjs2": "1.0.8",
|
||||||
|
"moment": "^2.24.0",
|
||||||
|
"nprogress": "^0.2.0",
|
||||||
|
"store": "^2.0.12",
|
||||||
|
"tinymce": "^5.2.0",
|
||||||
|
"viser-vue": "^2.4.6",
|
||||||
|
"vue": "^2.6.10",
|
||||||
|
"vue-clipboard2": "^0.2.1",
|
||||||
|
"vue-cropper": "0.4.9",
|
||||||
|
"vue-i18n": "^8.17.4",
|
||||||
|
"vue-quill-editor": "^3.0.6",
|
||||||
|
"vue-router": "^3.1.2",
|
||||||
|
"vue-svg-component-runtime": "^1.0.1",
|
||||||
|
"vuex": "^3.1.1",
|
||||||
|
"wangeditor": "^3.1.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@ant-design/colors": "^3.2.1",
|
||||||
|
"@babel/core": "^7.10.2",
|
||||||
|
"@babel/preset-env": "^7.10.2",
|
||||||
|
"@vue/babel-preset-app": "^4.4.1",
|
||||||
|
"@vue/cli-plugin-babel": "^4.0.4",
|
||||||
|
"@vue/cli-plugin-eslint": "^4.0.4",
|
||||||
|
"@vue/cli-plugin-router": "^4.0.4",
|
||||||
|
"@vue/cli-plugin-unit-jest": "^4.0.4",
|
||||||
|
"@vue/cli-plugin-vuex": "^4.0.4",
|
||||||
|
"@vue/cli-service": "^4.0.4",
|
||||||
|
"@vue/eslint-config-standard": "^4.0.0",
|
||||||
|
"@vue/test-utils": "^1.0.0-beta.29",
|
||||||
|
"babel-eslint": "^10.0.1",
|
||||||
|
"babel-loader": "^8.1.0",
|
||||||
|
"babel-plugin-import": "^1.12.2",
|
||||||
|
"babel-plugin-transform-remove-console": "^6.9.4",
|
||||||
|
"eslint": "^5.16.0",
|
||||||
|
"eslint-plugin-html": "^5.0.0",
|
||||||
|
"eslint-plugin-vue": "^5.2.3",
|
||||||
|
"git-revision-webpack-plugin": "^3.0.6",
|
||||||
|
"less": "^3.0.4",
|
||||||
|
"less-loader": "^5.0.0",
|
||||||
|
"opencollective": "^1.0.3",
|
||||||
|
"opencollective-postinstall": "^2.0.2",
|
||||||
|
"vue-svg-icon-loader": "^2.1.1",
|
||||||
|
"vue-template-compiler": "^2.6.10",
|
||||||
|
"webpack": "^4.43.0",
|
||||||
|
"webpack-theme-color-replacer": "^1.3.12"
|
||||||
|
},
|
||||||
|
"collective": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "http://doc.rycloud.zmrit.com/#/donate"
|
||||||
|
}
|
||||||
|
}
|
5
postcss.config.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
module.exports = {
|
||||||
|
plugins: {
|
||||||
|
autoprefixer: {}
|
||||||
|
}
|
||||||
|
}
|
BIN
public/avatar2.jpg
vendored
Normal file
After Width: | Height: | Size: 78 KiB |
34
public/index.html
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-cmn-Hans">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||||
|
<link rel="icon" href="<%= BASE_URL %>logo.png">
|
||||||
|
<title>园区管理系统</title>
|
||||||
|
<style>.first-loading-wrp{display:flex;justify-content:center;align-items:center;flex-direction:column;min-height:420px;height:100%}.first-loading-wrp>h1{font-size:128px}.first-loading-wrp .loading-wrp{padding:98px;display:flex;justify-content:center;align-items:center}.dot{animation:antRotate 1.2s infinite linear;transform:rotate(45deg);position:relative;display:inline-block;font-size:32px;width:32px;height:32px;box-sizing:border-box}.dot i{width:14px;height:14px;position:absolute;display:block;background-color:#1890ff;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s infinite linear alternate}.dot i:nth-child(1){top:0;left:0}.dot i:nth-child(2){top:0;right:0;-webkit-animation-delay:.4s;animation-delay:.4s}.dot i:nth-child(3){right:0;bottom:0;-webkit-animation-delay:.8s;animation-delay:.8s}.dot i:nth-child(4){bottom:0;left:0;-webkit-animation-delay:1.2s;animation-delay:1.2s}@keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@-webkit-keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@keyframes antSpinMove{to{opacity:1}}@-webkit-keyframes antSpinMove{to{opacity:1}}</style>
|
||||||
|
<!-- require cdn assets css -->
|
||||||
|
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
|
||||||
|
<link rel="stylesheet" href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" />
|
||||||
|
<% } %>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<noscript>
|
||||||
|
<strong>We're sorry but vue-antd-pro doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||||
|
</noscript>
|
||||||
|
<div id="app">
|
||||||
|
<div class="first-loading-wrp">
|
||||||
|
<h1>Pro</h1>
|
||||||
|
<div class="loading-wrp">
|
||||||
|
<span class="dot dot-spin"><i></i><i></i><i></i><i></i></span>
|
||||||
|
</div>
|
||||||
|
<div style="display: flex; justify-content: center; align-items: center;">ICS Ant</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- require cdn assets js -->
|
||||||
|
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
|
||||||
|
<script type="text/javascript" src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
|
||||||
|
<% } %>
|
||||||
|
<!-- built files will be auto injected -->
|
||||||
|
</body>
|
||||||
|
</html>
|
3
public/js/antd-with-locales.min.js
vendored
Normal file
9
public/js/axios.min.js
vendored
Normal file
1
public/js/data-set.min.js
vendored
Normal file
1
public/js/g2.min.js
vendored
Normal file
8
public/js/moment.min.js
vendored
Normal file
6
public/js/vue-router.min.js
vendored
Normal file
6
public/js/vue.min.js
vendored
Normal file
6
public/js/vuex.min.js
vendored
Normal file
8
public/js/zh-cn.min.js
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
/**
|
||||||
|
* Minified by jsDelivr using UglifyJS v3.4.4.
|
||||||
|
* Original file: /npm/moment@2.24.0/locale/zh-cn.js
|
||||||
|
*
|
||||||
|
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
||||||
|
*/
|
||||||
|
!function(e,d){"object"==typeof exports&&"undefined"!=typeof module&&"function"==typeof require?d(require("../moment")):"function"==typeof define&&define.amd?define(["../moment"],d):d(e.moment)}(this,function(e){"use strict";return e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,d){return 12===e&&(e=0),"凌晨"===d||"早上"===d||"上午"===d?e:"下午"===d||"晚上"===d?e+12:11<=e?e:e+12},meridiem:function(e,d,t){var _=100*e+d;return _<600?"凌晨":_<900?"早上":_<1130?"上午":_<1230?"中午":_<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,d){switch(d){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s内",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}})});
|
||||||
|
//# sourceMappingURL=/sm/fd4162f4c81398284f99474e4cba12860ae95ccc9941b38acbf1fe350449a8bc.map
|
BIN
public/logo.png
vendored
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
public/pageBg.png
vendored
Normal file
After Width: | Height: | Size: 289 KiB |
26
src/App.vue
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<template>
|
||||||
|
<a-config-provider :locale="locale">
|
||||||
|
<div id="app">
|
||||||
|
<router-view/>
|
||||||
|
</div>
|
||||||
|
</a-config-provider>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { domTitle, setDocumentTitle } from '@/utils/domUtil'
|
||||||
|
import { i18nRender } from '@/locales'
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
locale () {
|
||||||
|
// 只是为了切换语言时,更新标题
|
||||||
|
const { title } = this.$route.meta
|
||||||
|
title && (setDocumentTitle(`${i18nRender(title)} - ${domTitle}`))
|
||||||
|
return this.$i18n.getLocaleMessage(this.$store.getters.lang).antLocale
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
53
src/api/admin/activity.js
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
activity: '/admin/activity'
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getActivityList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.activity + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveActivity (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.activity + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delActivity (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.activity + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getActivity (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.activity + '/get/' + parameter,
|
||||||
|
method: 'get',
|
||||||
|
params: ''
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function changMarketable (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.activity + '/changeMarketable',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const activityExport = api.activity + '/export'
|
34
src/api/admin/activityDetail.js
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
activityDetail: '/admin/activityDetail'
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getActivityDetailList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.activityDetail + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveActivityDetail (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.activityDetail + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delActivityDetail (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.activityDetail + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const activityDetailExport = api.activityDetail + '/export'
|
60
src/api/admin/applyMoveIn.js
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
applyMoveIn: '/admin/applyMoveIn'
|
||||||
|
}
|
||||||
|
|
||||||
|
// 详情
|
||||||
|
export function getApplyMoveIn (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.applyMoveIn + '/get/' + parameter,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getApplyMoveInList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.applyMoveIn + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveApplyMoveIn (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.applyMoveIn + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delApplyMoveIn (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.applyMoveIn + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 批量审批
|
||||||
|
export function approveApplyMoveIn (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.applyMoveIn + '/approve',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 取消审批
|
||||||
|
export function cancelApplyMoveIn (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.applyMoveIn + '/cancelApprove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const applyMoveInExport = api.applyMoveIn + '/export'
|
59
src/api/admin/applyPark.js
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
applyPark: '/admin/applyPark'
|
||||||
|
}
|
||||||
|
// 详情
|
||||||
|
export function getApplyPark (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.applyPark + '/get/' + parameter,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getApplyParkList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.applyPark + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveApplyPark (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.applyPark + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delApplyPark (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.applyPark + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 批量审批
|
||||||
|
export function approveApplyPark (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.applyPark + '/approve',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 取消审批
|
||||||
|
export function cancelApplyPark (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.applyPark + '/cancelApprove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const applyParkExport = api.applyPark + '/export'
|
58
src/api/admin/applySettle.js
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
applySettle: '/admin/settle'
|
||||||
|
}
|
||||||
|
|
||||||
|
// 详情
|
||||||
|
export function getApplySettle (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.applySettle + '/get/' + parameter,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getApplySettleList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.applySettle + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveApplySettle (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.applySettle + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delApplySettle (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.applySettle + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 批量审批
|
||||||
|
export function approveApplySettle (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.applySettle + '/approve',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 取消审批
|
||||||
|
export function cancelApplySettle (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.applySettle + '/cancelApprove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export const applySettleExport = api.applySettle + '/export'
|
34
src/api/admin/building.js
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
building: '/admin/building'
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getBuildingList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.building + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveBuilding (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.building + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delBuilding (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.building + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const buildingExport = api.building + '/export'
|
34
src/api/admin/buildingDetail.js
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
buildingDetail: '/admin/buildingDetail'
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getBuildingDetailList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.buildingDetail + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveBuildingDetail (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.buildingDetail + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delBuildingDetail (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.buildingDetail + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const buildingDetailExport = api.buildingDetail + '/export'
|
100
src/api/admin/clue.js
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
clue: '/admin/clue'
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getClueList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.clue + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getClueActivationList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.clue + '/ClueActivationList',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getClueMyList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.clue + '/ClueMyList',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getClueAssignmentList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.clue + '/ClueAssignmentList',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveClue (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.clue + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getClue (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.clue + '/get/' + parameter,
|
||||||
|
method: 'get',
|
||||||
|
params: ''
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delClue (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.clue + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function review (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.clue + '/review',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function closeClue (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.clue + '/closeClue',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const excelClue = (params) => {
|
||||||
|
return axios({
|
||||||
|
method: 'get',
|
||||||
|
url: api.clue + '/excelClue',
|
||||||
|
params: params,
|
||||||
|
responseType: 'blob',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const clueExport = api.clue + '/export'
|
42
src/api/admin/clueInvestigation.js
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
clueInvestigation: '/admin/clueInvestigation'
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getClueInvestigationList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.clueInvestigation + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getClueInvestigationMyList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.clueInvestigation + '/myList',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveClueInvestigation (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.clueInvestigation + '/save',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delClueInvestigation (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.clueInvestigation + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const clueInvestigationExport = api.clueInvestigation + '/export'
|
111
src/api/admin/customer.js
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
customer: '/admin/customer', // 客户管理
|
||||||
|
customerContacts: 'admin/contacts', // 客户管理-联系人
|
||||||
|
customerAttachments: '/admin/attachments' // 客户管理-相关文件
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getCustomerList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customer + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveCustomer (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customer + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delCustomer (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customer + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getCustomer (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customer + '/get/' + parameter,
|
||||||
|
method: 'get',
|
||||||
|
params: ''
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getQiXinBasicInfo (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customer + '/getBasicInfo',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getCustomerContacts (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContacts + '/get/' + parameter,
|
||||||
|
method: 'get',
|
||||||
|
params: ''
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getCustomerContactsList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContacts + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveCustomerContacts (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContacts + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delCustomerContacts (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContacts + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getCustomerAttachmentsList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerAttachments + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveCustomerAttachments (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerAttachments + '/save',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delCustomerAttachments (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerAttachments + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const customerExport = api.customer + '/export'
|
130
src/api/admin/customerContract.js
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
customerContract: '/admin/contract'
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getCustomerContractList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContract + '/list',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getCustomerContractSearchList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContract + '/searchList',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveCustomerContract (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContract + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delCustomerContract (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContract + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getCustomerContract (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContract + '/get',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getCustomerallList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: '/admin/customer/allList',
|
||||||
|
method: 'GET',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function customerContractSave (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContract + '/save',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function customerContractUpdate (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContract + '/update',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function findByCustomerId (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: '/admin/customer/findByCustomerId',
|
||||||
|
method: 'GET',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function initBill (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: '/admin/contract/bill/init_bill',
|
||||||
|
method: 'GET',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function initNewBill (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: '/admin/contract/bill/init_new_bill',
|
||||||
|
method: 'POST',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function customerContractCommit (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContract + '/commit',
|
||||||
|
method: 'POST',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function customerContractApprove (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContract + '/approve',
|
||||||
|
method: 'POST',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function customerContractCancel (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContract + '/cancel',
|
||||||
|
method: 'POST',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function customerContractChange (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContract + '/change',
|
||||||
|
method: 'POST',
|
||||||
|
data: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const customerContractExport = api.customerContract + '/export'
|
182
src/api/admin/customerContractBill.js
Normal file
@ -0,0 +1,182 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
customerContractBill: '/admin/contract/bill'
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getCustomerContractBillList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContractBill + '/list',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveCustomerContractBill (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContractBill + (parameter.billId > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveOtherBill (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContractBill + '/batchSave',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function confirmReceiveRent (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContractBill + '/confirmReceiveRent',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function batchConfirmReceiveAmount (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContractBill + '/batch_confirm_receive_amount',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function confirmReceiveAmount (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContractBill + '/confirm_receive_amount',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 确认收到其他费用
|
||||||
|
export function confirmReceiveOtherAmount (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContractBill + '/confirm_receive_other_amount',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delCustomerContractBill (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContractBill + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function cancelConfirm (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContractBill + '/cancelConfirm',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getCustomerContractBill (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContractBill + '/get',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updateCustomerContractBill (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContractBill + '/update',
|
||||||
|
method: 'POST',
|
||||||
|
data: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function reportCustomerContractBill (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContractBill + '/report/list',
|
||||||
|
method: 'GET',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function customerContractBillConfirmDetail (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContractBill + '/confirm_detail',
|
||||||
|
method: 'GET',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function importPowerWaterFee (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContractBill + '/importPowerWaterFee',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function importRent (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContractBill + '/import_rent',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const customerContractBillExport = api.customerContractBill + '/export'
|
||||||
|
|
||||||
|
export const exportFileRequest = (params) => {
|
||||||
|
return axios({
|
||||||
|
method: 'get',
|
||||||
|
url: api.customerContractBill + '/export',
|
||||||
|
params: params,
|
||||||
|
responseType: 'blob',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const exportPowerWaterFee = (params) => {
|
||||||
|
return axios({
|
||||||
|
method: 'get',
|
||||||
|
url: api.customerContractBill + '/exportPowerWaterFee',
|
||||||
|
params: params,
|
||||||
|
responseType: 'blob',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const exportRent = (params) => {
|
||||||
|
return axios({
|
||||||
|
method: 'get',
|
||||||
|
url: api.customerContractBill + '/export_rent',
|
||||||
|
params: params,
|
||||||
|
responseType: 'blob',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const reportExportFileRequest = (params) => {
|
||||||
|
return axios({
|
||||||
|
method: 'get',
|
||||||
|
url: api.customerContractBill + '/report/export',
|
||||||
|
params: params,
|
||||||
|
responseType: 'blob',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
58
src/api/admin/customerContractRefund.js
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
customerContractRefund: '/admin/customerContractRefund'
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getCustomerContractRefundList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContractRefund + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveCustomerContractRefund (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContractRefund + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function customerContractRefundSave (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContractRefund + (parameter.createBy === undefined ? '/save' : '/update'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getCustomerContractRefund (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContractRefund + '/get',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function customerContractCancel (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContractRefund + '/determine',
|
||||||
|
method: 'POST',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delCustomerContractRefund (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContractRefund + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const customerContractRefundExport = api.customerContractRefund + '/export'
|
89
src/api/admin/customerIntentionContract.js
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
customerContract: '/admin/intentionContract'
|
||||||
|
}
|
||||||
|
export function getCustomerIntententionContractList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContract + '/list',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveCustomerContract (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContract + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delCustomerContract (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContract + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getCustomerContract (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContract + '/get',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getCustomerallList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: '/admin/customer/allList',
|
||||||
|
method: 'GET',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function customerContractSave (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContract + '/save',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function customerContractUpdate (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContract + '/update',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function customerUpdateStatus (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.customerContract + '/updateStatus',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function findByCustomerId (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: '/admin/customer/findByCustomerId',
|
||||||
|
method: 'GET',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function initBill (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: '/admin/contract/bill/init_bill',
|
||||||
|
method: 'GET',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const customerContractExport = api.customerContract + '/export'
|
53
src/api/admin/dj.js
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
dj: '/admin/dj'
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getDjList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.dj + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveDj (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.dj + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delDj (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.dj + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getDj (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.dj + '/get/' + parameter,
|
||||||
|
method: 'get',
|
||||||
|
params: ''
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function changMarketable (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.dj + '/changeMarketable',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const djExport = api.dj + '/export'
|
53
src/api/admin/djBanner.js
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
djBanner: '/admin/djBanner'
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getDjBannerList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.djBanner + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveDjBanner (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.djBanner + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delDjBanner (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.djBanner + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getDjBanner (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.djBanner + '/get/' + parameter,
|
||||||
|
method: 'get',
|
||||||
|
params: ''
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function changMarketable (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.djBanner + '/changeMarketable',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const djBannerExport = api.djBanner + '/export'
|
53
src/api/admin/expenseSettings.js
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
expenseSettings: '/admin/expenseSettings'
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getExpenseSettingsList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.expenseSettings + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getExpenseSettingsAllList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.expenseSettings + '/allList',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveExpenseSettings (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.expenseSettings + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delExpenseSettings (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.expenseSettings + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function enabled (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.expenseSettings + '/enabled',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const expenseSettingsExport = api.expenseSettings + '/export'
|
34
src/api/admin/fileManagement.js
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
fileManagement: '/admin/fileManagement'
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getFileManagementList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.fileManagement + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveFileManagement (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.fileManagement + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delFileManagement (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.fileManagement + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const fileManagementExport = api.fileManagement + '/export'
|
59
src/api/admin/park.js
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
park: '/admin/park'
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getParkById (id) {
|
||||||
|
return axios({
|
||||||
|
url: api.park + '/get/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getCurrentPark () {
|
||||||
|
return axios({
|
||||||
|
url: api.park + '/getCurrentPark/',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getParkList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.park + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function savePark (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.park + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delPark (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.park + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function changMarketable (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.park + '/changeMarketable',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const parkExport = api.park + '/export'
|
53
src/api/admin/policy.js
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
policy: '/admin/policy'
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getPolicyList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.policy + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function savePolicy (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.policy + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delPolicy (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.policy + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getPolicy (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.policy + '/get/' + parameter,
|
||||||
|
method: 'get',
|
||||||
|
params: ''
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function changMarketable (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.policy + '/changeMarketable',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const policyExport = api.policy + '/export'
|
53
src/api/admin/policyBanner.js
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
policyBanner: '/admin/policyBanner'
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getPolicyBannerList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.policyBanner + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function savePolicyBanner (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.policyBanner + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delPolicyBanner (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.policyBanner + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getPolicyBanner (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.policyBanner + '/get/' + parameter,
|
||||||
|
method: 'get',
|
||||||
|
params: ''
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function changMarketable (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.policyBanner + '/changeMarketable',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const policyBannerExport = api.policyBanner + '/export'
|
63
src/api/admin/repair.js
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
repair: '/admin/repair'
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getRepair (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.repair + '/get/' + parameter,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getRepairList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.repair + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveRepair (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.repair + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function review (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.repair + '/review',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function complete (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.repair + '/complete',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delRepair (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.repair + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const repairExport = api.repair + '/export'
|
60
src/api/admin/room.js
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
room: '/admin/room'
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getRoomById (id) {
|
||||||
|
return axios({
|
||||||
|
url: api.room + '/get/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getRoomList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.room + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveRoom (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.room + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delRoom (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.room + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function changMarketable (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.room + '/changeMarketable',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getRoomAll (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.room + '/map',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const parkExport = api.room + '/export'
|
64
src/api/admin/serviceBanner.js
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
serviceBanner: '/admin/sBanner'
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getServiceBannerList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.serviceBanner + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getServiceBanner (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.serviceBanner + '/get/' + parameter,
|
||||||
|
method: 'get',
|
||||||
|
params: ''
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveServiceBanner (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.serviceBanner + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delServiceBanner (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.serviceBanner + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function changMarketable (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.serviceBanner + '/changeMarketable',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function changTop (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.serviceBanner + '/changeTop',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const serviceBannerExport = api.serviceBanner + '/export'
|
53
src/api/admin/serviceManage.js
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
serviceManage: '/admin/manage'
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getServiceManageList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.serviceManage + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveServiceManage (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.serviceManage + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delServiceManage (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.serviceManage + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getServiceManage (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.serviceManage + '/get/' + parameter,
|
||||||
|
method: 'get',
|
||||||
|
params: ''
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function changMarketable (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.serviceManage + '/changeMarketable',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const serviceManageExport = api.serviceManage + '/export'
|
53
src/api/admin/serviceMenu.js
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
serviceMenu: '/admin/menu'
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getServiceMenuList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.serviceMenu + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getServiceMenu (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.serviceMenu + '/get/' + parameter,
|
||||||
|
method: 'get',
|
||||||
|
params: ''
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveServiceMenu (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.serviceMenu + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delServiceMenu (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.serviceMenu + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function changMarketable (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.serviceMenu + '/changeMarketable',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const serviceMenuExport = api.serviceMenu + '/export'
|
34
src/api/admin/serviceOrder.js
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
serviceOrder: '/admin/order'
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getServiceOrderList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.serviceOrder + '/list',
|
||||||
|
method: 'get',
|
||||||
|
data: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveServiceOrder (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.serviceOrder + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delServiceOrder (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.serviceOrder + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const serviceOrderExport = api.serviceOrder + '/export'
|
50
src/api/admin/serviceSupplier.js
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
serviceSupplier: '/admin/supplier'
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getServiceSupplierList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.serviceSupplier + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getAllServiceSupplierList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.serviceSupplier + '/allList',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveServiceSupplier (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.serviceSupplier + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delServiceSupplier (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.serviceSupplier + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getServiceSupplier (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.serviceSupplier + '/get/' + parameter,
|
||||||
|
method: 'get',
|
||||||
|
params: ''
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const serviceSupplierExport = api.serviceSupplier + '/export'
|
63
src/api/admin/suggestion.js
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
suggestion: '/admin/suggestion'
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getSuggestion (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.suggestion + '/get/' + parameter,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getSuggestionList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.suggestion + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveSuggestion (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.suggestion + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delSuggestion (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.suggestion + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function review (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.suggestion + '/review',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function complete (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.suggestion + '/complete',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const suggestionExport = api.suggestion + '/export'
|
77
src/api/dashboard/analysis.js
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
dashboard: '/dashboard/analysis'
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getBillData (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.dashboard + '/bill_data',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getBillRentData (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.dashboard + '/bill_rent_data',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getBillManagementData (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.dashboard + '/bill_management_data',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getBillPwData (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.dashboard + '/bill_pw_data',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getBillYearData (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.dashboard + '/bill_year_data',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getRankList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.dashboard + '/rank_list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getCountApprovingContracts (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.dashboard + '/count_approving_contracts',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getCountNoPayBills (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.dashboard + '/count_no_pay_bills',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getCountRentArea (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.dashboard + '/count_rent_area',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
61
src/api/gen.js
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
gen: '/gen'
|
||||||
|
}
|
||||||
|
|
||||||
|
export default api
|
||||||
|
|
||||||
|
export function getGenList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.gen + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function getDbList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.gen + '/db/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function delGen (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.gen + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function editGen (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.gen + '/edit',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function editSaveGen (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.gen + '/edit',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function importTable (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.gen + '/importTable',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function preview (tebleId) {
|
||||||
|
return axios({
|
||||||
|
url: api.gen + '/preview/' + `${tebleId}`,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const batchGenCode = api.gen + '/batchGenCode'
|
67
src/api/login.js
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* login func
|
||||||
|
* parameter: {
|
||||||
|
* username: '',
|
||||||
|
* password: '',
|
||||||
|
* remember_me: true,
|
||||||
|
* captcha: '12345'
|
||||||
|
* }
|
||||||
|
* @param parameter
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export function login (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: '/login/slide',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getLoginSms (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: '/system/sms/send',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getInfo () {
|
||||||
|
return axios({
|
||||||
|
url: '/system/user/info',
|
||||||
|
method: 'get',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function logout (token) {
|
||||||
|
return axios({
|
||||||
|
url: '/login/logout',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8',
|
||||||
|
'token': token
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取验证图片 以及token
|
||||||
|
export function getCaptcha (data) {
|
||||||
|
return axios({
|
||||||
|
url: '/captcha/get',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 滑动或者点选验证
|
||||||
|
export function captchaCheck (data) {
|
||||||
|
return axios({
|
||||||
|
url: '/captcha/check',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
70
src/api/manage.js
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
user: '/user',
|
||||||
|
role: '/mock/role',
|
||||||
|
service: '/service',
|
||||||
|
permission: '/permission',
|
||||||
|
permissionNoPager: '/permission/no-pager',
|
||||||
|
orgTree: '/org/tree'
|
||||||
|
}
|
||||||
|
|
||||||
|
export default api
|
||||||
|
|
||||||
|
export function getUserList (parameter) {
|
||||||
|
return request({
|
||||||
|
url: api.user,
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getRoleList (parameter) {
|
||||||
|
return request({
|
||||||
|
url: api.role,
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getServiceList (parameter) {
|
||||||
|
return request({
|
||||||
|
url: api.service,
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getPermissions (parameter) {
|
||||||
|
return request({
|
||||||
|
url: api.permissionNoPager,
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getOrgTree (parameter) {
|
||||||
|
return request({
|
||||||
|
url: api.orgTree,
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// id == 0 add post
|
||||||
|
// id != 0 update put
|
||||||
|
export function saveService (parameter) {
|
||||||
|
return request({
|
||||||
|
url: api.service,
|
||||||
|
method: parameter.id === 0 ? 'post' : 'put',
|
||||||
|
data: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveSub (sub) {
|
||||||
|
return request({
|
||||||
|
url: '/sub',
|
||||||
|
method: sub.id === 0 ? 'post' : 'put',
|
||||||
|
data: sub
|
||||||
|
})
|
||||||
|
}
|
119
src/api/monitor.js
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
operLog: '/monitor/operLog',
|
||||||
|
loginLog: '/monitor/loginInfo',
|
||||||
|
job: '/monitor/job',
|
||||||
|
online: '/monitor/online'
|
||||||
|
}
|
||||||
|
|
||||||
|
// OperLog
|
||||||
|
export function getOperLogList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.operLog + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delOperLog (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.operLog + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function cleanOperLog () {
|
||||||
|
return axios({
|
||||||
|
url: api.operLog + '/clean',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// LoginLog
|
||||||
|
export function getLoginLogList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.loginLog + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function delLoginLog (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.loginLog + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function cleanLoginLog () {
|
||||||
|
return axios({
|
||||||
|
url: api.loginLog + '/clean',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// Job
|
||||||
|
export function getJobList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.job + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveJob (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.job + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delJob (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.job + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function changStatus (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.job + '/changeStatus',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 定时任务立即执行一次
|
||||||
|
export function runJob (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.job + '/run',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询在线用户列表
|
||||||
|
export function getOnlineList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.online + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 强退用户
|
||||||
|
export function forceLogout (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.online + '/forceLogout',
|
||||||
|
method: 'post',
|
||||||
|
params: {
|
||||||
|
userId: parameter.userId,
|
||||||
|
accessToken: parameter.tokenId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const operLogExport = api.operLog + '/export'
|
24
src/api/register.js
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
register: '/user/register'
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getRegisterSms (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: '/system/sms/send',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function registerSubmit (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.register + '/submit',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
409
src/api/system.js
Normal file
@ -0,0 +1,409 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
user: '/system/user',
|
||||||
|
profile: '/system/profile',
|
||||||
|
role: '/system/role',
|
||||||
|
permission: '/system/menu',
|
||||||
|
dept: '/system/dept',
|
||||||
|
dictType: '/system/dict/type',
|
||||||
|
dictData: '/system/dict/data',
|
||||||
|
dist: '/system/districts',
|
||||||
|
config: '/system/config',
|
||||||
|
oss: '/system/oss',
|
||||||
|
notice: '/system/notice',
|
||||||
|
park: '/admin/park'
|
||||||
|
}
|
||||||
|
|
||||||
|
export default api
|
||||||
|
|
||||||
|
export function getUserList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.user + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getUser (userId) {
|
||||||
|
return axios({
|
||||||
|
url: api.user + '/get/' + `${userId}`,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function saveUser (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.user + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function delUser (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.user + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function changUserStatus (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.user + '/status',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function resetPwd (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.user + '/resetPwd',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// profile
|
||||||
|
export function updataProfile (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.profile + '/update',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function updataPassword (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.profile + '/reset',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getSmsCaptcha (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: '/system/sms/send',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function binding (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.profile + '/binding',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// role
|
||||||
|
export function getRoleList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.role + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function getRoleAll (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.role + '/all',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveRole (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.role + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delRole (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.role + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function changRoleStatus (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.role + '/status',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function authDataScope (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.role + '/authDataScope',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// menu
|
||||||
|
export function getPermissionAll (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.permission + '/all',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function getPermissions (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.permission + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function getRolePermIds (roleId) {
|
||||||
|
return axios({
|
||||||
|
url: api.permission + '/role/' + `${roleId}`,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function savePerm (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.permission + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delPerm (deptId) {
|
||||||
|
return axios({
|
||||||
|
url: api.permission + '/remove/' + `${deptId}`,
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// dept
|
||||||
|
export function getDeptList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.dept + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function getDeptListEnable (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.dept + '/list/enable',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function getRoleDeptIds (roleId) {
|
||||||
|
return axios({
|
||||||
|
url: api.dept + '/role/' + `${roleId}`,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function saveDept (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.dept + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function savePark (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.park + (parameter.id > 0 ? '/updatePark' : '/initSavePark'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delDept (deptId) {
|
||||||
|
return axios({
|
||||||
|
url: api.dept + '/remove/' + `${deptId}`,
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// dictType
|
||||||
|
export function getDictTypeList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.dictType + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function saveDictType (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.dictType + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function delDictType (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.dictType + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// dictData
|
||||||
|
export function getDictDataList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.dictData + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function saveDictData (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.dictData + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function delDictData (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.dictData + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// dist 地区
|
||||||
|
|
||||||
|
export function getDistVOList () {
|
||||||
|
return axios({
|
||||||
|
url: api.dist + '/tree',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getDistList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.dist + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function saveDist (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.dist + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function delDist (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.dist + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// config 配置
|
||||||
|
export function getConfigList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.config + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function saveConfig (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.config + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function delConfig (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.config + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// oss
|
||||||
|
export function getOssList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.oss + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function saveOss (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.oss + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function delOss (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.oss + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function getOssConfig () {
|
||||||
|
return axios({
|
||||||
|
url: api.oss + '/config',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function saveOssConfig (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.oss + '/saveConfig',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// notice
|
||||||
|
export function getNoticeList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.notice + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveNotice (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.notice + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delNotice (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.notice + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
45
src/api/tenant.js
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
import { axios } from '@/utils/request'
|
||||||
|
|
||||||
|
const api = {
|
||||||
|
tenant: '/system/tenant'
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getTenantList (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.tenant + '/list',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveTenant (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.tenant + (parameter.id > 0 ? '/update' : '/save'),
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delTenant (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.tenant + '/remove',
|
||||||
|
method: 'post',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function resetPassword (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.tenant + '/resetPwd',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const tenantExport = api.tenant + '/export'
|
69
src/assets/background.svg
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg width="1361px" height="609px" viewBox="0 0 1361 609" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch -->
|
||||||
|
<title>Group 21</title>
|
||||||
|
<desc>Created with Sketch.</desc>
|
||||||
|
<defs></defs>
|
||||||
|
<g id="Ant-Design-Pro-3.0" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="账户密码登录-校验" transform="translate(-79.000000, -82.000000)">
|
||||||
|
<g id="Group-21" transform="translate(77.000000, 73.000000)">
|
||||||
|
<g id="Group-18" opacity="0.8" transform="translate(74.901416, 569.699158) rotate(-7.000000) translate(-74.901416, -569.699158) translate(4.901416, 525.199158)">
|
||||||
|
<ellipse id="Oval-11" fill="#CFDAE6" opacity="0.25" cx="63.5748792" cy="32.468367" rx="21.7830479" ry="21.766008"></ellipse>
|
||||||
|
<ellipse id="Oval-3" fill="#CFDAE6" opacity="0.599999964" cx="5.98746479" cy="13.8668601" rx="5.2173913" ry="5.21330997"></ellipse>
|
||||||
|
<path d="M38.1354514,88.3520215 C43.8984227,88.3520215 48.570234,83.6838647 48.570234,77.9254015 C48.570234,72.1669383 43.8984227,67.4987816 38.1354514,67.4987816 C32.3724801,67.4987816 27.7006688,72.1669383 27.7006688,77.9254015 C27.7006688,83.6838647 32.3724801,88.3520215 38.1354514,88.3520215 Z" id="Oval-3-Copy" fill="#CFDAE6" opacity="0.45"></path>
|
||||||
|
<path d="M64.2775582,33.1704963 L119.185836,16.5654915" id="Path-12" stroke="#CFDAE6" stroke-width="1.73913043" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||||
|
<path d="M42.1431708,26.5002681 L7.71190162,14.5640702" id="Path-16" stroke="#E0B4B7" stroke-width="0.702678964" opacity="0.7" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="1.405357899873153,2.108036953469981"></path>
|
||||||
|
<path d="M63.9262187,33.521561 L43.6721326,69.3250951" id="Path-15" stroke="#BACAD9" stroke-width="0.702678964" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="1.405357899873153,2.108036953469981"></path>
|
||||||
|
<g id="Group-17" transform="translate(126.850922, 13.543654) rotate(30.000000) translate(-126.850922, -13.543654) translate(117.285705, 4.381889)" fill="#CFDAE6">
|
||||||
|
<ellipse id="Oval-4" opacity="0.45" cx="9.13482653" cy="9.12768076" rx="9.13482653" ry="9.12768076"></ellipse>
|
||||||
|
<path d="M18.2696531,18.2553615 C18.2696531,13.2142826 14.1798519,9.12768076 9.13482653,9.12768076 C4.08980114,9.12768076 0,13.2142826 0,18.2553615 L18.2696531,18.2553615 Z" id="Oval-4" transform="translate(9.134827, 13.691521) scale(-1, -1) translate(-9.134827, -13.691521) "></path>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g id="Group-14" transform="translate(216.294700, 123.725600) rotate(-5.000000) translate(-216.294700, -123.725600) translate(106.294700, 35.225600)">
|
||||||
|
<ellipse id="Oval-2" fill="#CFDAE6" opacity="0.25" cx="29.1176471" cy="29.1402439" rx="29.1176471" ry="29.1402439"></ellipse>
|
||||||
|
<ellipse id="Oval-2" fill="#CFDAE6" opacity="0.3" cx="29.1176471" cy="29.1402439" rx="21.5686275" ry="21.5853659"></ellipse>
|
||||||
|
<ellipse id="Oval-2-Copy" stroke="#CFDAE6" opacity="0.4" cx="179.019608" cy="138.146341" rx="23.7254902" ry="23.7439024"></ellipse>
|
||||||
|
<ellipse id="Oval-2" fill="#BACAD9" opacity="0.5" cx="29.1176471" cy="29.1402439" rx="10.7843137" ry="10.7926829"></ellipse>
|
||||||
|
<path d="M29.1176471,39.9329268 L29.1176471,18.347561 C23.1616351,18.347561 18.3333333,23.1796097 18.3333333,29.1402439 C18.3333333,35.1008781 23.1616351,39.9329268 29.1176471,39.9329268 Z" id="Oval-2" fill="#BACAD9"></path>
|
||||||
|
<g id="Group-9" opacity="0.45" transform="translate(172.000000, 131.000000)" fill="#E6A1A6">
|
||||||
|
<ellipse id="Oval-2-Copy-2" cx="7.01960784" cy="7.14634146" rx="6.47058824" ry="6.47560976"></ellipse>
|
||||||
|
<path d="M0.549019608,13.6219512 C4.12262681,13.6219512 7.01960784,10.722722 7.01960784,7.14634146 C7.01960784,3.56996095 4.12262681,0.670731707 0.549019608,0.670731707 L0.549019608,13.6219512 Z" id="Oval-2-Copy-2" transform="translate(3.784314, 7.146341) scale(-1, 1) translate(-3.784314, -7.146341) "></path>
|
||||||
|
</g>
|
||||||
|
<ellipse id="Oval-10" fill="#CFDAE6" cx="218.382353" cy="138.685976" rx="1.61764706" ry="1.61890244"></ellipse>
|
||||||
|
<ellipse id="Oval-10-Copy-2" fill="#E0B4B7" opacity="0.35" cx="179.558824" cy="175.381098" rx="1.61764706" ry="1.61890244"></ellipse>
|
||||||
|
<ellipse id="Oval-10-Copy" fill="#E0B4B7" opacity="0.35" cx="180.098039" cy="102.530488" rx="2.15686275" ry="2.15853659"></ellipse>
|
||||||
|
<path d="M28.9985381,29.9671598 L171.151018,132.876024" id="Path-11" stroke="#CFDAE6" opacity="0.8"></path>
|
||||||
|
</g>
|
||||||
|
<g id="Group-10" opacity="0.799999952" transform="translate(1054.100635, 36.659317) rotate(-11.000000) translate(-1054.100635, -36.659317) translate(1026.600635, 4.659317)">
|
||||||
|
<ellipse id="Oval-7" stroke="#CFDAE6" stroke-width="0.941176471" cx="43.8135593" cy="32" rx="11.1864407" ry="11.2941176"></ellipse>
|
||||||
|
<g id="Group-12" transform="translate(34.596774, 23.111111)" fill="#BACAD9">
|
||||||
|
<ellipse id="Oval-7" opacity="0.45" cx="9.18534718" cy="8.88888889" rx="8.47457627" ry="8.55614973"></ellipse>
|
||||||
|
<path d="M9.18534718,17.4450386 C13.8657264,17.4450386 17.6599235,13.6143199 17.6599235,8.88888889 C17.6599235,4.16345787 13.8657264,0.332739156 9.18534718,0.332739156 L9.18534718,17.4450386 Z" id="Oval-7"></path>
|
||||||
|
</g>
|
||||||
|
<path d="M34.6597385,24.809694 L5.71666084,4.76878945" id="Path-2" stroke="#CFDAE6" stroke-width="0.941176471"></path>
|
||||||
|
<ellipse id="Oval" stroke="#CFDAE6" stroke-width="0.941176471" cx="3.26271186" cy="3.29411765" rx="3.26271186" ry="3.29411765"></ellipse>
|
||||||
|
<ellipse id="Oval-Copy" fill="#F7E1AD" cx="2.79661017" cy="61.1764706" rx="2.79661017" ry="2.82352941"></ellipse>
|
||||||
|
<path d="M34.6312443,39.2922712 L5.06366663,59.785082" id="Path-10" stroke="#CFDAE6" stroke-width="0.941176471"></path>
|
||||||
|
</g>
|
||||||
|
<g id="Group-19" opacity="0.33" transform="translate(1282.537219, 446.502867) rotate(-10.000000) translate(-1282.537219, -446.502867) translate(1142.537219, 327.502867)">
|
||||||
|
<g id="Group-17" transform="translate(141.333539, 104.502742) rotate(275.000000) translate(-141.333539, -104.502742) translate(129.333539, 92.502742)" fill="#BACAD9">
|
||||||
|
<circle id="Oval-4" opacity="0.45" cx="11.6666667" cy="11.6666667" r="11.6666667"></circle>
|
||||||
|
<path d="M23.3333333,23.3333333 C23.3333333,16.8900113 18.1099887,11.6666667 11.6666667,11.6666667 C5.22334459,11.6666667 0,16.8900113 0,23.3333333 L23.3333333,23.3333333 Z" id="Oval-4" transform="translate(11.666667, 17.500000) scale(-1, -1) translate(-11.666667, -17.500000) "></path>
|
||||||
|
</g>
|
||||||
|
<circle id="Oval-5-Copy-6" fill="#CFDAE6" cx="201.833333" cy="87.5" r="5.83333333"></circle>
|
||||||
|
<path d="M143.5,88.8126685 L155.070501,17.6038544" id="Path-17" stroke="#BACAD9" stroke-width="1.16666667"></path>
|
||||||
|
<path d="M17.5,37.3333333 L127.466252,97.6449735" id="Path-18" stroke="#BACAD9" stroke-width="1.16666667"></path>
|
||||||
|
<polyline id="Path-19" stroke="#CFDAE6" stroke-width="1.16666667" points="143.902597 120.302281 174.935455 231.571342 38.5 147.510847 126.366941 110.833333"></polyline>
|
||||||
|
<path d="M159.833333,99.7453842 L195.416667,89.25" id="Path-20" stroke="#E0B4B7" stroke-width="1.16666667" opacity="0.6"></path>
|
||||||
|
<path d="M205.333333,82.1372105 L238.719406,36.1666667" id="Path-24" stroke="#BACAD9" stroke-width="1.16666667"></path>
|
||||||
|
<path d="M266.723424,132.231988 L207.083333,90.4166667" id="Path-25" stroke="#CFDAE6" stroke-width="1.16666667"></path>
|
||||||
|
<circle id="Oval-5" fill="#C1D1E0" cx="156.916667" cy="8.75" r="8.75"></circle>
|
||||||
|
<circle id="Oval-5-Copy-3" fill="#C1D1E0" cx="39.0833333" cy="148.75" r="5.25"></circle>
|
||||||
|
<circle id="Oval-5-Copy-2" fill-opacity="0.6" fill="#D1DEED" cx="8.75" cy="33.25" r="8.75"></circle>
|
||||||
|
<circle id="Oval-5-Copy-4" fill-opacity="0.6" fill="#D1DEED" cx="243.833333" cy="30.3333333" r="5.83333333"></circle>
|
||||||
|
<circle id="Oval-5-Copy-5" fill="#E0B4B7" cx="175.583333" cy="232.75" r="5.25"></circle>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 8.7 KiB |
1
src/assets/icons/bx-analyse.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1551058675966" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7872" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M85.333333 512h85.333334a340.736 340.736 0 0 1 99.712-241.621333 337.493333 337.493333 0 0 1 108.458666-72.96 346.453333 346.453333 0 0 1 261.546667-1.749334A106.154667 106.154667 0 0 0 746.666667 298.666667C805.802667 298.666667 853.333333 251.136 853.333333 192S805.802667 85.333333 746.666667 85.333333c-29.397333 0-55.978667 11.776-75.221334 30.933334-103.722667-41.514667-222.848-40.874667-325.76 2.517333a423.594667 423.594667 0 0 0-135.68 91.264 423.253333 423.253333 0 0 0-91.306666 135.637333A426.88 426.88 0 0 0 85.333333 512z m741.248 133.205333c-17.109333 40.618667-41.685333 77.141333-72.96 108.416s-67.797333 55.850667-108.458666 72.96a346.453333 346.453333 0 0 1-261.546667 1.749334A106.154667 106.154667 0 0 0 277.333333 725.333333C218.197333 725.333333 170.666667 772.864 170.666667 832S218.197333 938.666667 277.333333 938.666667c29.397333 0 55.978667-11.776 75.221334-30.933334A425.173333 425.173333 0 0 0 512 938.666667a425.941333 425.941333 0 0 0 393.258667-260.352A426.325333 426.325333 0 0 0 938.666667 512h-85.333334a341.034667 341.034667 0 0 1-26.752 133.205333z" p-id="7873"></path><path d="M512 318.378667c-106.752 0-193.621333 86.869333-193.621333 193.621333S405.248 705.621333 512 705.621333s193.621333-86.869333 193.621333-193.621333S618.752 318.378667 512 318.378667z m0 301.909333c-59.690667 0-108.288-48.597333-108.288-108.288S452.309333 403.712 512 403.712s108.288 48.597333 108.288 108.288-48.597333 108.288-108.288 108.288z" p-id="7874"></path></svg>
|
After Width: | Height: | Size: 1.8 KiB |
BIN
src/assets/logo.png
Normal file
After Width: | Height: | Size: 37 KiB |
29
src/assets/logo.svg
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg viewBox="0 0 128 128" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<!-- Generator: Sketch 52.6 (67491) - http://www.bohemiancoding.com/sketch -->
|
||||||
|
<title>Vue</title>
|
||||||
|
<desc>Created with Sketch.</desc>
|
||||||
|
<defs>
|
||||||
|
<linearGradient x1="69.644116%" y1="0%" x2="69.644116%" y2="100%" id="linearGradient-1">
|
||||||
|
<stop stop-color="#29CDFF" offset="0%"></stop>
|
||||||
|
<stop stop-color="#148EFF" offset="37.8600687%"></stop>
|
||||||
|
<stop stop-color="#0A60FF" offset="100%"></stop>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient x1="-19.8191553%" y1="-36.7931464%" x2="138.57919%" y2="157.637507%" id="linearGradient-2">
|
||||||
|
<stop stop-color="#29CDFF" offset="0%"></stop>
|
||||||
|
<stop stop-color="#0F78FF" offset="100%"></stop>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient x1="68.1279872%" y1="-35.6905737%" x2="30.4400914%" y2="114.942679%" id="linearGradient-3">
|
||||||
|
<stop stop-color="#FA8E7D" offset="0%"></stop>
|
||||||
|
<stop stop-color="#F74A5C" offset="51.2635191%"></stop>
|
||||||
|
<stop stop-color="#F51D2C" offset="100%"></stop>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<g id="Vue" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="Group" transform="translate(19.000000, 9.000000)">
|
||||||
|
<path d="M89.96,90.48 C78.58,93.48 68.33,83.36 67.62,82.48 L46.6604487,62.2292258 C45.5023849,61.1103236 44.8426845,59.5728835 44.8296987,57.9626396 L44.5035564,17.5209948 C44.4948861,16.4458744 44.0537714,15.4195095 43.2796864,14.6733517 L29.6459999,1.53153737 C28.055475,-0.00160504005 25.5232423,0.0449126588 23.9900999,1.63543756 C23.2715121,2.38092066 22.87,3.37600834 22.87,4.41143746 L22.87,64.3864751 C22.87,67.0807891 23.9572233,69.6611067 25.885409,71.5429748 L63.6004615,108.352061 C65.9466323,110.641873 69.6963584,110.624605 72.0213403,108.313281" id="Path-Copy" fill="url(#linearGradient-1)" fill-rule="nonzero" transform="translate(56.415000, 54.831157) scale(-1, 1) translate(-56.415000, -54.831157) "></path>
|
||||||
|
<path d="M68,90.1163122 C56.62,93.1163122 45.46,83.36 44.75,82.48 L23.7904487,62.2292258 C22.6323849,61.1103236 21.9726845,59.5728835 21.9596987,57.9626396 L21.6335564,17.5209948 C21.6248861,16.4458744 21.1837714,15.4195095 20.4096864,14.6733517 L6.7759999,1.53153737 C5.185475,-0.00160504005 2.65324232,0.0449126588 1.12009991,1.63543756 C0.401512125,2.38092066 3.90211878e-13,3.37600834 3.90798505e-13,4.41143746 L3.94351218e-13,64.3864751 C3.94681177e-13,67.0807891 1.08722326,69.6611067 3.01540903,71.5429748 L40.7807092,108.401101 C43.1069304,110.671444 46.8180151,110.676525 49.1504445,108.412561" id="Path" fill="url(#linearGradient-2)" fill-rule="nonzero"></path>
|
||||||
|
<path d="M43.2983488,19.0991931 L27.5566079,3.88246244 C26.7624281,3.11476967 26.7409561,1.84862177 27.5086488,1.05444194 C27.8854826,0.664606611 28.4044438,0.444472651 28.9466386,0.444472651 L60.3925021,0.444472651 C61.4970716,0.444472651 62.3925021,1.33990315 62.3925021,2.44447265 C62.3925021,2.9858375 62.1730396,3.50407742 61.7842512,3.88079942 L46.0801285,19.0975301 C45.3051579,19.8484488 44.0742167,19.8491847 43.2983488,19.0991931 Z" id="Path" fill="url(#linearGradient-3)"></path>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 3.1 KiB |
89
src/components/ArticleListContent/ArticleListContent.vue
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
<template>
|
||||||
|
<div class="antd-pro-components-article-list-content-index-listContent">
|
||||||
|
<div class="description">
|
||||||
|
<slot>
|
||||||
|
{{ description }}
|
||||||
|
</slot>
|
||||||
|
</div>
|
||||||
|
<div class="extra">
|
||||||
|
<a-avatar :src="avatar" size="small" />
|
||||||
|
<a :href="href">{{ owner }}</a> 发布在 <a :href="href">{{ href }}</a>
|
||||||
|
<em>{{ updateAt | moment }}</em>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'ArticleListContent',
|
||||||
|
props: {
|
||||||
|
prefixCls: {
|
||||||
|
type: String,
|
||||||
|
default: 'antd-pro-components-article-list-content-index-listContent'
|
||||||
|
},
|
||||||
|
description: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
owner: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
avatar: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
href: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
updateAt: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
@import '../index.less';
|
||||||
|
|
||||||
|
.antd-pro-components-article-list-content-index-listContent {
|
||||||
|
.description {
|
||||||
|
max-width: 720px;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
.extra {
|
||||||
|
margin-top: 16px;
|
||||||
|
color: @text-color-secondary;
|
||||||
|
line-height: 22px;
|
||||||
|
|
||||||
|
& /deep/ .ant-avatar {
|
||||||
|
position: relative;
|
||||||
|
top: 1px;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
margin-right: 8px;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > em {
|
||||||
|
margin-left: 16px;
|
||||||
|
color: @disabled-color;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: @screen-xs) {
|
||||||
|
.antd-pro-components-article-list-content-index-listContent {
|
||||||
|
.extra {
|
||||||
|
& > em {
|
||||||
|
display: block;
|
||||||
|
margin-top: 8px;
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
3
src/components/ArticleListContent/index.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
import ArticleListContent from './ArticleListContent'
|
||||||
|
|
||||||
|
export default ArticleListContent
|
24
src/components/AvatarList/Item.jsx
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import PropTypes from 'ant-design-vue/es/_util/vue-types'
|
||||||
|
import { Tooltip, Avatar } from 'ant-design-vue'
|
||||||
|
import { getSlotOptions } from 'ant-design-vue/lib/_util/props-util'
|
||||||
|
import { warning } from 'ant-design-vue/lib/vc-util/warning'
|
||||||
|
|
||||||
|
export const AvatarListItemProps = {
|
||||||
|
tips: PropTypes.string.def(null),
|
||||||
|
src: PropTypes.string.def('')
|
||||||
|
}
|
||||||
|
|
||||||
|
const Item = {
|
||||||
|
__ANT_AVATAR_CHILDREN: true,
|
||||||
|
name: 'AvatarListItem',
|
||||||
|
props: AvatarListItemProps,
|
||||||
|
created () {
|
||||||
|
warning(getSlotOptions(this.$parent).__ANT_AVATAR_LIST, 'AvatarListItem must be a subcomponent of AvatarList')
|
||||||
|
},
|
||||||
|
render () {
|
||||||
|
const AvatarDom = <Avatar size={this.$parent.size} src={this.src} />
|
||||||
|
return this.tips && <Tooltip title={this.tips}>{AvatarDom}</Tooltip> || <AvatarDom />
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Item
|
72
src/components/AvatarList/List.jsx
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
import './index.less'
|
||||||
|
|
||||||
|
import PropTypes from 'ant-design-vue/es/_util/vue-types'
|
||||||
|
import Avatar from 'ant-design-vue/es/avatar'
|
||||||
|
import Item from './Item.jsx'
|
||||||
|
import { filterEmpty } from '@/components/_util/util'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* size: `number`、 `large`、`small`、`default` 默认值: default
|
||||||
|
* maxLength: number
|
||||||
|
* excessItemsStyle: CSSProperties
|
||||||
|
*/
|
||||||
|
const AvatarListProps = {
|
||||||
|
prefixCls: PropTypes.string.def('ant-pro-avatar-list'),
|
||||||
|
size: {
|
||||||
|
validator: val => {
|
||||||
|
return typeof val === 'number' || ['small', 'large', 'default'].includes(val)
|
||||||
|
},
|
||||||
|
default: 'default'
|
||||||
|
},
|
||||||
|
maxLength: PropTypes.number.def(0),
|
||||||
|
excessItemsStyle: PropTypes.object.def({
|
||||||
|
color: '#f56a00',
|
||||||
|
backgroundColor: '#fde3cf'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const AvatarList = {
|
||||||
|
__ANT_AVATAR_LIST: true,
|
||||||
|
Item,
|
||||||
|
name: 'AvatarList',
|
||||||
|
props: AvatarListProps,
|
||||||
|
render (h) {
|
||||||
|
const { prefixCls, size } = this.$props
|
||||||
|
const className = {
|
||||||
|
[`${prefixCls}`]: true,
|
||||||
|
[`${size}`]: true
|
||||||
|
}
|
||||||
|
const items = filterEmpty(this.$slots.default)
|
||||||
|
const itemsDom = items && items.length ? <ul class={`${prefixCls}-items`}>{this.getItems(items)}</ul> : null
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div class={className}>
|
||||||
|
{itemsDom}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getItems (items) {
|
||||||
|
const className = {
|
||||||
|
[`${this.prefixCls}-item`]: true,
|
||||||
|
[`${this.size}`]: true
|
||||||
|
}
|
||||||
|
const totalSize = items.length
|
||||||
|
|
||||||
|
if (this.maxLength > 0) {
|
||||||
|
items = items.slice(0, this.maxLength)
|
||||||
|
items.push((<Avatar size={this.size} style={this.excessItemsStyle}>{`+${totalSize - this.maxLength}`}</Avatar>))
|
||||||
|
}
|
||||||
|
return items.map((item) => (
|
||||||
|
<li class={className}>{item}</li>
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
AvatarList.install = function (Vue) {
|
||||||
|
Vue.component(AvatarList.name, AvatarList)
|
||||||
|
Vue.component(AvatarList.Item.name, AvatarList.Item)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AvatarList
|
9
src/components/AvatarList/index.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import AvatarList from './List'
|
||||||
|
import Item from './Item'
|
||||||
|
|
||||||
|
export {
|
||||||
|
AvatarList,
|
||||||
|
Item as AvatarListItem
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AvatarList
|
60
src/components/AvatarList/index.less
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
@import "../index";
|
||||||
|
|
||||||
|
@avatar-list-prefix-cls: ~"@{ant-pro-prefix}-avatar-list";
|
||||||
|
@avatar-list-item-prefix-cls: ~"@{ant-pro-prefix}-avatar-list-item";
|
||||||
|
|
||||||
|
.@{avatar-list-prefix-cls} {
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
ul {
|
||||||
|
list-style: none;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0 0 0 8px;
|
||||||
|
font-size: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.@{avatar-list-item-prefix-cls} {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: @font-size-base;
|
||||||
|
margin-left: -8px;
|
||||||
|
width: @avatar-size-base;
|
||||||
|
height: @avatar-size-base;
|
||||||
|
|
||||||
|
:global {
|
||||||
|
.ant-avatar {
|
||||||
|
border: 1px solid #fff;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.large {
|
||||||
|
width: @avatar-size-lg;
|
||||||
|
height: @avatar-size-lg;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.small {
|
||||||
|
width: @avatar-size-sm;
|
||||||
|
height: @avatar-size-sm;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.mini {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
|
||||||
|
:global {
|
||||||
|
.ant-avatar {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
line-height: 20px;
|
||||||
|
|
||||||
|
.ant-avatar-string {
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 18px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
64
src/components/AvatarList/index.md
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
# AvatarList 用户头像列表
|
||||||
|
|
||||||
|
|
||||||
|
一组用户头像,常用在项目/团队成员列表。可通过设置 `size` 属性来指定头像大小。
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
引用方式:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
import AvatarList from '@/components/AvatarList'
|
||||||
|
const AvatarListItem = AvatarList.Item
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
AvatarList,
|
||||||
|
AvatarListItem
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## 代码演示 [demo](https://pro.loacg.com/test/home)
|
||||||
|
|
||||||
|
```html
|
||||||
|
<avatar-list size="mini">
|
||||||
|
<avatar-list-item tips="Jake" src="https://gw.alipayobjects.com/zos/rmsportal/zOsKZmFRdUtvpqCImOVY.png" />
|
||||||
|
<avatar-list-item tips="Andy" src="https://gw.alipayobjects.com/zos/rmsportal/sfjbOqnsXXJgNCjCzDBL.png" />
|
||||||
|
<avatar-list-item tips="Niko" src="https://gw.alipayobjects.com/zos/rmsportal/kZzEzemZyKLKFsojXItE.png" />
|
||||||
|
</avatar-list>
|
||||||
|
```
|
||||||
|
或
|
||||||
|
```html
|
||||||
|
<avatar-list :max-length="3">
|
||||||
|
<avatar-list-item tips="Jake" src="https://gw.alipayobjects.com/zos/rmsportal/zOsKZmFRdUtvpqCImOVY.png" />
|
||||||
|
<avatar-list-item tips="Andy" src="https://gw.alipayobjects.com/zos/rmsportal/sfjbOqnsXXJgNCjCzDBL.png" />
|
||||||
|
<avatar-list-item tips="Niko" src="https://gw.alipayobjects.com/zos/rmsportal/kZzEzemZyKLKFsojXItE.png" />
|
||||||
|
<avatar-list-item tips="Niko" src="https://gw.alipayobjects.com/zos/rmsportal/kZzEzemZyKLKFsojXItE.png" />
|
||||||
|
<avatar-list-item tips="Niko" src="https://gw.alipayobjects.com/zos/rmsportal/kZzEzemZyKLKFsojXItE.png" />
|
||||||
|
<avatar-list-item tips="Niko" src="https://gw.alipayobjects.com/zos/rmsportal/kZzEzemZyKLKFsojXItE.png" />
|
||||||
|
<avatar-list-item tips="Niko" src="https://gw.alipayobjects.com/zos/rmsportal/kZzEzemZyKLKFsojXItE.png" />
|
||||||
|
</avatar-list>
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
### AvatarList
|
||||||
|
|
||||||
|
| 参数 | 说明 | 类型 | 默认值 |
|
||||||
|
| ---------------- | -------- | ---------------------------------- | --------- |
|
||||||
|
| size | 头像大小 | `large`、`small` 、`mini`, `default` | `default` |
|
||||||
|
| maxLength | 要显示的最大项目 | number | - |
|
||||||
|
| excessItemsStyle | 多余的项目风格 | CSSProperties | - |
|
||||||
|
|
||||||
|
### AvatarList.Item
|
||||||
|
|
||||||
|
| 参数 | 说明 | 类型 | 默认值 |
|
||||||
|
| ---- | ------ | --------- | --- |
|
||||||
|
| tips | 头像展示文案 | string | - |
|
||||||
|
| src | 头像图片连接 | string | - |
|
||||||
|
|
62
src/components/Charts/Bar.vue
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
<template>
|
||||||
|
<div :style="{ padding: '0 0 32px 32px' }">
|
||||||
|
<h4 :style="{ marginBottom: '20px' }">{{ title }}</h4>
|
||||||
|
<v-chart
|
||||||
|
height="254"
|
||||||
|
:data="data"
|
||||||
|
:forceFit="true"
|
||||||
|
:padding="['auto', 'auto', '40', '50']">
|
||||||
|
<v-tooltip />
|
||||||
|
<v-axis />
|
||||||
|
<v-bar position="x*y"/>
|
||||||
|
</v-chart>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'Bar',
|
||||||
|
props: {
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
type: Array,
|
||||||
|
default: () => {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
scale: {
|
||||||
|
type: Array,
|
||||||
|
default: () => {
|
||||||
|
return [{
|
||||||
|
dataKey: 'x',
|
||||||
|
min: 2
|
||||||
|
}, {
|
||||||
|
dataKey: 'y',
|
||||||
|
title: '时间',
|
||||||
|
min: 1,
|
||||||
|
max: 22
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
type: Array,
|
||||||
|
default: () => {
|
||||||
|
return [
|
||||||
|
'x*y',
|
||||||
|
(x, y) => ({
|
||||||
|
name: x,
|
||||||
|
value: y
|
||||||
|
})
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
120
src/components/Charts/ChartCard.vue
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<template>
|
||||||
|
<a-card :loading="loading" :body-style="{ padding: '20px 24px 8px' }" :bordered="false">
|
||||||
|
<div class="chart-card-header">
|
||||||
|
<div class="meta">
|
||||||
|
<span class="chart-card-title">
|
||||||
|
<slot name="title">
|
||||||
|
{{ title }}
|
||||||
|
</slot>
|
||||||
|
</span>
|
||||||
|
<span class="chart-card-action">
|
||||||
|
<slot name="action"></slot>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="total">
|
||||||
|
<slot name="total">
|
||||||
|
<span>{{ typeof total === 'function' && total() || total }}</span>
|
||||||
|
</slot>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="chart-card-content">
|
||||||
|
<div class="content-fix">
|
||||||
|
<slot></slot>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="chart-card-footer">
|
||||||
|
<div class="field">
|
||||||
|
<slot name="footer"></slot>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'ChartCard',
|
||||||
|
props: {
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
total: {
|
||||||
|
type: [Function, Number, String],
|
||||||
|
required: false,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
loading: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.chart-card-header {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.meta {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
width: 100%;
|
||||||
|
color: rgba(0, 0, 0, .45);
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.chart-card-action {
|
||||||
|
cursor: pointer;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chart-card-footer {
|
||||||
|
border-top: 1px solid #e8e8e8;
|
||||||
|
padding-top: 9px;
|
||||||
|
margin-top: 8px;
|
||||||
|
|
||||||
|
> * {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.field {
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.chart-card-content {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
position: relative;
|
||||||
|
height: 46px;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.content-fix {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.total {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
word-break: break-all;
|
||||||
|
white-space: nowrap;
|
||||||
|
color: #000;
|
||||||
|
margin-top: 4px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
font-size: 30px;
|
||||||
|
line-height: 38px;
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
</style>
|
67
src/components/Charts/Liquid.vue
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<v-chart
|
||||||
|
:forceFit="true"
|
||||||
|
:height="height"
|
||||||
|
:width="width"
|
||||||
|
:data="data"
|
||||||
|
:scale="scale"
|
||||||
|
:padding="0">
|
||||||
|
<v-tooltip />
|
||||||
|
<v-interval
|
||||||
|
:shape="['liquid-fill-gauge']"
|
||||||
|
position="transfer*value"
|
||||||
|
color=""
|
||||||
|
:v-style="{
|
||||||
|
lineWidth: 10,
|
||||||
|
opacity: 0.75
|
||||||
|
}"
|
||||||
|
:tooltip="[
|
||||||
|
'transfer*value',
|
||||||
|
(transfer, value) => {
|
||||||
|
return {
|
||||||
|
name: transfer,
|
||||||
|
value,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
]"
|
||||||
|
></v-interval>
|
||||||
|
<v-guide
|
||||||
|
v-for="(row, index) in data"
|
||||||
|
:key="index"
|
||||||
|
type="text"
|
||||||
|
:top="true"
|
||||||
|
:position="{
|
||||||
|
gender: row.transfer,
|
||||||
|
value: 45
|
||||||
|
}"
|
||||||
|
:content="row.value + '%'"
|
||||||
|
:v-style="{
|
||||||
|
fontSize: 100,
|
||||||
|
textAlign: 'center',
|
||||||
|
opacity: 0.75,
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
</v-chart>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'Liquid',
|
||||||
|
props: {
|
||||||
|
height: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
|
width: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
56
src/components/Charts/MiniArea.vue
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
<template>
|
||||||
|
<div class="antv-chart-mini">
|
||||||
|
<div class="chart-wrapper" :style="{ height: 46 }">
|
||||||
|
<v-chart :force-fit="true" :height="height" :data="data" :padding="[36, 0, 18, 0]">
|
||||||
|
<v-tooltip />
|
||||||
|
<v-smooth-area position="x*y" />
|
||||||
|
</v-chart>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import moment from 'moment'
|
||||||
|
const data = []
|
||||||
|
const beginDay = new Date().getTime()
|
||||||
|
|
||||||
|
for (let i = 0; i < 10; i++) {
|
||||||
|
data.push({
|
||||||
|
x: moment(new Date(beginDay + 1000 * 60 * 60 * 24 * i)).format('YYYY-MM-DD'),
|
||||||
|
y: Math.round(Math.random() * 10)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const tooltip = [
|
||||||
|
'x*y',
|
||||||
|
(x, y) => ({
|
||||||
|
name: x,
|
||||||
|
value: y
|
||||||
|
})
|
||||||
|
]
|
||||||
|
const scale = [{
|
||||||
|
dataKey: 'x',
|
||||||
|
min: 2
|
||||||
|
}, {
|
||||||
|
dataKey: 'y',
|
||||||
|
title: '时间',
|
||||||
|
min: 1,
|
||||||
|
max: 22
|
||||||
|
}]
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'MiniArea',
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
data,
|
||||||
|
tooltip,
|
||||||
|
scale,
|
||||||
|
height: 100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
@import "chart";
|
||||||
|
</style>
|
57
src/components/Charts/MiniBar.vue
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
<template>
|
||||||
|
<div class="antv-chart-mini">
|
||||||
|
<div class="chart-wrapper" :style="{ height: 46 }">
|
||||||
|
<v-chart :force-fit="true" :height="height" :data="data" :padding="[36, 5, 18, 5]">
|
||||||
|
<v-tooltip />
|
||||||
|
<v-bar position="x*y" />
|
||||||
|
</v-chart>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import moment from 'moment'
|
||||||
|
const data = []
|
||||||
|
const beginDay = new Date().getTime()
|
||||||
|
|
||||||
|
for (let i = 0; i < 10; i++) {
|
||||||
|
data.push({
|
||||||
|
x: moment(new Date(beginDay + 1000 * 60 * 60 * 24 * i)).format('YYYY-MM-DD'),
|
||||||
|
y: Math.round(Math.random() * 10)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const tooltip = [
|
||||||
|
'x*y',
|
||||||
|
(x, y) => ({
|
||||||
|
name: x,
|
||||||
|
value: y
|
||||||
|
})
|
||||||
|
]
|
||||||
|
|
||||||
|
const scale = [{
|
||||||
|
dataKey: 'x',
|
||||||
|
min: 2
|
||||||
|
}, {
|
||||||
|
dataKey: 'y',
|
||||||
|
title: '时间',
|
||||||
|
min: 1,
|
||||||
|
max: 30
|
||||||
|
}]
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'MiniBar',
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
data,
|
||||||
|
tooltip,
|
||||||
|
scale,
|
||||||
|
height: 100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
@import "chart";
|
||||||
|
</style>
|
75
src/components/Charts/MiniProgress.vue
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
<template>
|
||||||
|
<div class="chart-mini-progress">
|
||||||
|
<div class="target" :style="{ left: target + '%'}">
|
||||||
|
<span :style="{ backgroundColor: color }" />
|
||||||
|
<span :style="{ backgroundColor: color }"/>
|
||||||
|
</div>
|
||||||
|
<div class="progress-wrapper">
|
||||||
|
<div class="progress" :style="{ backgroundColor: color, width: percentage + '%', height: height }"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'MiniProgress',
|
||||||
|
props: {
|
||||||
|
target: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
|
height: {
|
||||||
|
type: String,
|
||||||
|
default: '10px'
|
||||||
|
},
|
||||||
|
color: {
|
||||||
|
type: String,
|
||||||
|
default: '#13C2C2'
|
||||||
|
},
|
||||||
|
percentage: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.chart-mini-progress {
|
||||||
|
padding: 5px 0;
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.target {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
|
||||||
|
span {
|
||||||
|
border-radius: 100px;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
height: 4px;
|
||||||
|
width: 2px;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
top: auto;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.progress-wrapper {
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.progress {
|
||||||
|
transition: all .4s cubic-bezier(.08,.82,.17,1) 0s;
|
||||||
|
border-radius: 1px 0 0 1px;
|
||||||
|
background-color: #1890ff;
|
||||||
|
width: 0;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
40
src/components/Charts/MiniSmoothArea.vue
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<template>
|
||||||
|
<div :class="prefixCls">
|
||||||
|
<div class="chart-wrapper" :style="{ height: 46 }">
|
||||||
|
<v-chart :force-fit="true" :height="100" :data="dataSource" :scale="scale" :padding="[36, 0, 18, 0]">
|
||||||
|
<v-tooltip />
|
||||||
|
<v-smooth-line position="x*y" :size="2" />
|
||||||
|
<v-smooth-area position="x*y" />
|
||||||
|
</v-chart>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'MiniSmoothArea',
|
||||||
|
props: {
|
||||||
|
prefixCls: {
|
||||||
|
type: String,
|
||||||
|
default: 'ant-pro-smooth-area'
|
||||||
|
},
|
||||||
|
scale: {
|
||||||
|
type: [Object, Array],
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
dataSource: {
|
||||||
|
type: Array,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
height: 100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
@import "smooth.area.less";
|
||||||
|
</style>
|
68
src/components/Charts/Radar.vue
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
<template>
|
||||||
|
<v-chart :forceFit="true" height="400" :data="data" :padding="[20, 20, 95, 20]" :scale="scale">
|
||||||
|
<v-tooltip></v-tooltip>
|
||||||
|
<v-axis :dataKey="axis1Opts.dataKey" :line="axis1Opts.line" :tickLine="axis1Opts.tickLine" :grid="axis1Opts.grid" />
|
||||||
|
<v-axis :dataKey="axis2Opts.dataKey" :line="axis2Opts.line" :tickLine="axis2Opts.tickLine" :grid="axis2Opts.grid" />
|
||||||
|
<v-legend dataKey="user" marker="circle" :offset="30" />
|
||||||
|
<v-coord type="polar" radius="0.8" />
|
||||||
|
<v-line position="item*score" color="user" :size="2" />
|
||||||
|
<v-point position="item*score" color="user" :size="4" shape="circle" />
|
||||||
|
</v-chart>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const axis1Opts = {
|
||||||
|
dataKey: 'item',
|
||||||
|
line: null,
|
||||||
|
tickLine: null,
|
||||||
|
grid: {
|
||||||
|
lineStyle: {
|
||||||
|
lineDash: null
|
||||||
|
},
|
||||||
|
hideFirstLine: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const axis2Opts = {
|
||||||
|
dataKey: 'score',
|
||||||
|
line: null,
|
||||||
|
tickLine: null,
|
||||||
|
grid: {
|
||||||
|
type: 'polygon',
|
||||||
|
lineStyle: {
|
||||||
|
lineDash: null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const scale = [
|
||||||
|
{
|
||||||
|
dataKey: 'score',
|
||||||
|
min: 0,
|
||||||
|
max: 80
|
||||||
|
}, {
|
||||||
|
dataKey: 'user',
|
||||||
|
alias: '类型'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Radar',
|
||||||
|
props: {
|
||||||
|
data: {
|
||||||
|
type: Array,
|
||||||
|
default: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
axis1Opts,
|
||||||
|
axis2Opts,
|
||||||
|
scale
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
77
src/components/Charts/RankList.vue
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
<template>
|
||||||
|
<div class="rank">
|
||||||
|
<h4 class="title">{{ title }}</h4>
|
||||||
|
<ul class="list">
|
||||||
|
<li :key="index" v-for="(item, index) in list">
|
||||||
|
<span :class="index < 3 ? 'active' : null">{{ index + 1 }}</span>
|
||||||
|
<span>{{ item.name }}</span>
|
||||||
|
<span>{{ item.total }}</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'RankList',
|
||||||
|
// ['title', 'list']
|
||||||
|
props: {
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
list: {
|
||||||
|
type: Array,
|
||||||
|
default: null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
|
||||||
|
.rank {
|
||||||
|
padding: 0 32px 32px 72px;
|
||||||
|
|
||||||
|
.list {
|
||||||
|
margin: 25px 0 0;
|
||||||
|
padding: 0;
|
||||||
|
list-style: none;
|
||||||
|
|
||||||
|
li {
|
||||||
|
margin-top: 16px;
|
||||||
|
|
||||||
|
span {
|
||||||
|
color: rgba(0, 0, 0, .65);
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 22px;
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
border-radius: 20px;
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 600;
|
||||||
|
margin-right: 24px;
|
||||||
|
height: 20px;
|
||||||
|
line-height: 20px;
|
||||||
|
width: 20px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
&.active {
|
||||||
|
background-color: #314659;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
&:last-child {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile .rank {
|
||||||
|
padding: 0 32px 32px 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
113
src/components/Charts/TagCloud.vue
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
<template>
|
||||||
|
<v-chart :width="width" :height="height" :padding="[0]" :data="data" :scale="scale">
|
||||||
|
<v-tooltip :show-title="false" />
|
||||||
|
<v-coord type="rect" direction="TL" />
|
||||||
|
<v-point position="x*y" color="category" shape="cloud" tooltip="value*category" />
|
||||||
|
</v-chart>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { registerShape } from 'viser-vue'
|
||||||
|
const DataSet = require('@antv/data-set')
|
||||||
|
|
||||||
|
const imgUrl = 'https://gw.alipayobjects.com/zos/rmsportal/gWyeGLCdFFRavBGIDzWk.png'
|
||||||
|
|
||||||
|
const scale = [
|
||||||
|
{ dataKey: 'x', nice: false },
|
||||||
|
{ dataKey: 'y', nice: false }
|
||||||
|
]
|
||||||
|
|
||||||
|
registerShape('point', 'cloud', {
|
||||||
|
draw (cfg, container) {
|
||||||
|
return container.addShape('text', {
|
||||||
|
attrs: {
|
||||||
|
fillOpacity: cfg.opacity,
|
||||||
|
fontSize: cfg.origin._origin.size,
|
||||||
|
rotate: cfg.origin._origin.rotate,
|
||||||
|
text: cfg.origin._origin.text,
|
||||||
|
textAlign: 'center',
|
||||||
|
fontFamily: cfg.origin._origin.font,
|
||||||
|
fill: cfg.color,
|
||||||
|
textBaseline: 'Alphabetic',
|
||||||
|
...cfg.style,
|
||||||
|
x: cfg.x,
|
||||||
|
y: cfg.y
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'TagCloud',
|
||||||
|
props: {
|
||||||
|
tagList: {
|
||||||
|
type: Array,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
height: {
|
||||||
|
type: Number,
|
||||||
|
default: 400
|
||||||
|
},
|
||||||
|
width: {
|
||||||
|
type: Number,
|
||||||
|
default: 640
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
data: [],
|
||||||
|
scale
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
tagList: function (val) {
|
||||||
|
if (val.length > 0) {
|
||||||
|
this.initTagCloud(val)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
if (this.tagList.length > 0) {
|
||||||
|
this.initTagCloud(this.tagList)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initTagCloud (dataSource) {
|
||||||
|
const { height, width } = this
|
||||||
|
|
||||||
|
const dv = new DataSet.View().source(dataSource)
|
||||||
|
const range = dv.range('value')
|
||||||
|
const min = range[0]
|
||||||
|
const max = range[1]
|
||||||
|
const imageMask = new Image()
|
||||||
|
imageMask.crossOrigin = ''
|
||||||
|
imageMask.src = imgUrl
|
||||||
|
imageMask.onload = () => {
|
||||||
|
dv.transform({
|
||||||
|
type: 'tag-cloud',
|
||||||
|
fields: ['name', 'value'],
|
||||||
|
size: [width, height],
|
||||||
|
imageMask,
|
||||||
|
font: 'Verdana',
|
||||||
|
padding: 0,
|
||||||
|
timeInterval: 5000, // max execute time
|
||||||
|
rotate () {
|
||||||
|
let random = ~~(Math.random() * 4) % 4
|
||||||
|
if (random === 2) {
|
||||||
|
random = 0
|
||||||
|
}
|
||||||
|
return random * 90 // 0, 90, 270
|
||||||
|
},
|
||||||
|
fontSize (d) {
|
||||||
|
if (d.value) {
|
||||||
|
return ((d.value - min) / (max - min)) * (32 - 8) + 8
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.data = dv.rows
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
64
src/components/Charts/TransferBar.vue
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
<template>
|
||||||
|
<div :style="{ padding: '0 0 32px 32px' }">
|
||||||
|
<h4 :style="{ marginBottom: '20px' }">{{ title }}</h4>
|
||||||
|
<v-chart
|
||||||
|
height="254"
|
||||||
|
:data="data"
|
||||||
|
:scale="scale"
|
||||||
|
:forceFit="true"
|
||||||
|
:padding="['auto', 'auto', '40', '50']">
|
||||||
|
<v-tooltip />
|
||||||
|
<v-axis />
|
||||||
|
<v-bar position="x*y"/>
|
||||||
|
</v-chart>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const tooltip = [
|
||||||
|
'x*y',
|
||||||
|
(x, y) => ({
|
||||||
|
name: x,
|
||||||
|
value: y
|
||||||
|
})
|
||||||
|
]
|
||||||
|
const scale = [{
|
||||||
|
dataKey: 'x',
|
||||||
|
title: '日期(天)',
|
||||||
|
alias: '日期(天)',
|
||||||
|
min: 2
|
||||||
|
}, {
|
||||||
|
dataKey: 'y',
|
||||||
|
title: '流量(Gb)',
|
||||||
|
alias: '流量(Gb)',
|
||||||
|
min: 1
|
||||||
|
}]
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Bar',
|
||||||
|
props: {
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
data: [],
|
||||||
|
scale,
|
||||||
|
tooltip
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
this.getMonthBar()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getMonthBar () {
|
||||||
|
this.$http.get('/analysis/month-bar')
|
||||||
|
.then(res => {
|
||||||
|
this.data = res.result
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
82
src/components/Charts/Trend.vue
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
<template>
|
||||||
|
<div class="chart-trend">
|
||||||
|
{{ term }}
|
||||||
|
<span>{{ rate }}%</span>
|
||||||
|
<span :class="['trend-icon', trend]"><a-icon :type="'caret-' + trend"/></span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'Trend',
|
||||||
|
props: {
|
||||||
|
term: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
percentage: {
|
||||||
|
type: Number,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: Boolean,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
target: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
|
value: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
|
fixed: {
|
||||||
|
type: Number,
|
||||||
|
default: 2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
trend: this.type && 'up' || 'down',
|
||||||
|
rate: this.percentage
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
const type = this.type === null ? this.value >= this.target : this.type
|
||||||
|
this.trend = type ? 'up' : 'down'
|
||||||
|
this.rate = (this.percentage === null ? Math.abs(this.value - this.target) * 100 / this.target : this.percentage).toFixed(this.fixed)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.chart-trend {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 22px;
|
||||||
|
|
||||||
|
.trend-icon {
|
||||||
|
font-size: 12px;
|
||||||
|
|
||||||
|
&.up, &.down {
|
||||||
|
margin-left: 4px;
|
||||||
|
position: relative;
|
||||||
|
top: 1px;
|
||||||
|
|
||||||
|
i {
|
||||||
|
font-size: 12px;
|
||||||
|
transform: scale(.83);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.up {
|
||||||
|
color: #f5222d;
|
||||||
|
}
|
||||||
|
&.down {
|
||||||
|
color: #52c41a;
|
||||||
|
top: -1px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
13
src/components/Charts/chart.less
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
.antv-chart-mini {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.chart-wrapper {
|
||||||
|
position: absolute;
|
||||||
|
bottom: -28px;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
/* margin: 0 -5px;
|
||||||
|
overflow: hidden;*/
|
||||||
|
}
|
||||||
|
}
|
14
src/components/Charts/smooth.area.less
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
@import "../index";
|
||||||
|
|
||||||
|
@smoothArea-prefix-cls: ~"@{ant-pro-prefix}-smooth-area";
|
||||||
|
|
||||||
|
.@{smoothArea-prefix-cls} {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.chart-wrapper {
|
||||||
|
position: absolute;
|
||||||
|
bottom: -28px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
113
src/components/Dialog.js
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
import Modal from 'ant-design-vue/es/modal'
|
||||||
|
export default (Vue) => {
|
||||||
|
function dialog (component, componentProps, modalProps) {
|
||||||
|
const _vm = this
|
||||||
|
modalProps = modalProps || {}
|
||||||
|
if (!_vm || !_vm._isVue) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let dialogDiv = document.querySelector('body>div[type=dialog]')
|
||||||
|
if (!dialogDiv) {
|
||||||
|
dialogDiv = document.createElement('div')
|
||||||
|
dialogDiv.setAttribute('type', 'dialog')
|
||||||
|
document.body.appendChild(dialogDiv)
|
||||||
|
}
|
||||||
|
|
||||||
|
const handle = function (checkFunction, afterHandel) {
|
||||||
|
if (checkFunction instanceof Function) {
|
||||||
|
const res = checkFunction()
|
||||||
|
if (res instanceof Promise) {
|
||||||
|
res.then(c => {
|
||||||
|
c && afterHandel()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
res && afterHandel()
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// checkFunction && afterHandel()
|
||||||
|
checkFunction || afterHandel()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const dialogInstance = new Vue({
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
visible: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
router: _vm.$router,
|
||||||
|
store: _vm.$store,
|
||||||
|
mounted () {
|
||||||
|
this.$on('close', (v) => {
|
||||||
|
this.handleClose()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleClose () {
|
||||||
|
handle(this.$refs._component.onCancel, () => {
|
||||||
|
this.visible = false
|
||||||
|
this.$refs._component.$emit('close')
|
||||||
|
this.$refs._component.$emit('cancel')
|
||||||
|
dialogInstance.$destroy()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleOk () {
|
||||||
|
handle(this.$refs._component.onOK || this.$refs._component.onOk, () => {
|
||||||
|
this.visible = false
|
||||||
|
this.$refs._component.$emit('close')
|
||||||
|
this.$refs._component.$emit('ok')
|
||||||
|
dialogInstance.$destroy()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
render: function (h) {
|
||||||
|
const that = this
|
||||||
|
const modalModel = modalProps && modalProps.model
|
||||||
|
if (modalModel) {
|
||||||
|
delete modalProps.model
|
||||||
|
}
|
||||||
|
const ModalProps = Object.assign({}, modalModel && { model: modalModel } || {}, {
|
||||||
|
attrs: Object.assign({}, {
|
||||||
|
...(modalProps.attrs || modalProps)
|
||||||
|
}, {
|
||||||
|
visible: this.visible
|
||||||
|
}),
|
||||||
|
on: Object.assign({}, {
|
||||||
|
...(modalProps.on || modalProps)
|
||||||
|
}, {
|
||||||
|
ok: () => {
|
||||||
|
that.handleOk()
|
||||||
|
},
|
||||||
|
cancel: () => {
|
||||||
|
that.handleClose()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
const componentModel = componentProps && componentProps.model
|
||||||
|
if (componentModel) {
|
||||||
|
delete componentProps.model
|
||||||
|
}
|
||||||
|
const ComponentProps = Object.assign({}, componentModel && { model: componentModel } || {}, {
|
||||||
|
ref: '_component',
|
||||||
|
attrs: Object.assign({}, {
|
||||||
|
...((componentProps && componentProps.attrs) || componentProps)
|
||||||
|
}),
|
||||||
|
on: Object.assign({}, {
|
||||||
|
...((componentProps && componentProps.on) || componentProps)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
return h(Modal, ModalProps, [h(component, ComponentProps)])
|
||||||
|
}
|
||||||
|
}).$mount(dialogDiv)
|
||||||
|
}
|
||||||
|
|
||||||
|
Object.defineProperty(Vue.prototype, '$dialog', {
|
||||||
|
get: () => {
|
||||||
|
return function () {
|
||||||
|
dialog.apply(this, arguments)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|