@ -0,0 +1,28 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
.DS_Store
|
||||
dist
|
||||
dist-ssr
|
||||
coverage
|
||||
*.local
|
||||
|
||||
/cypress/videos/
|
||||
/cypress/screenshots/
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
@ -0,0 +1,9 @@
|
||||
/dist/*
|
||||
.local
|
||||
/node_modules/**
|
||||
|
||||
**/*.svg
|
||||
**/*.sh
|
||||
|
||||
/public/*
|
||||
stats.html
|
@ -0,0 +1,12 @@
|
||||
# 使用官方的 Nginx 镜像作为基础镜像
|
||||
FROM nginx:1.27.3
|
||||
LABEL authors="sz"
|
||||
|
||||
# 将前端项目静态文件复制到容器中
|
||||
COPY ./dist /usr/share/nginx/sz-admin
|
||||
|
||||
# 暴露 9800 端口
|
||||
EXPOSE 9800
|
||||
|
||||
# 启动 Nginx 服务
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
@ -0,0 +1,697 @@
|
||||
# 第三方库和许可证
|
||||
|
||||
本项目中引用了以下第三方开源项目及其许可证信息:
|
||||
|
||||
## 项目列表
|
||||
|
||||
### **[Geeker-Admin](https://github.com/HalseySpicy/Geeker-Admin)**
|
||||
|
||||
- **仓库地址**: https://github.com/HalseySpicy/Geeker-Admin
|
||||
|
||||
- **许可证类型**: MIT License
|
||||
|
||||
- **许可证内容:**
|
||||
|
||||
```
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 Halsey
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
```
|
||||
|
||||
### [Sa-Token](https://github.com/dromara/Sa-Token)
|
||||
|
||||
- **仓库地址**: https://github.com/dromara/Sa-Token
|
||||
|
||||
- **许可证类型**: Apache License 2.0
|
||||
|
||||
- **许可证内容:**
|
||||
|
||||
```
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
https://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2011-2019 hubin.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
```
|
||||
|
||||
### **[mybatis-flex](https://github.com/mybatis-flex/mybatis-flex)**
|
||||
|
||||
- **仓库地址**: https://github.com/mybatis-flex/mybatis-flex
|
||||
|
||||
- **许可证类型**: Apache License 2.0
|
||||
|
||||
- **许可证内容:**
|
||||
|
||||
```
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright {yyyy} {name of copyright owner}
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
```
|
||||
|
||||
### [knife4j](https://github.com/xiaoymin/knife4j)
|
||||
|
||||
- **仓库地址**: https://github.com/xiaoymin/knife4j
|
||||
|
||||
- **许可证类型**: Apache License 2.0
|
||||
|
||||
- **许可证内容:**
|
||||
|
||||
```
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction, and
|
||||
distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by the copyright
|
||||
owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all other entities
|
||||
that control, are controlled by, or are under common control with that entity.
|
||||
For the purposes of this definition, "control" means (i) the power, direct or
|
||||
indirect, to cause the direction or management of such entity, whether by
|
||||
contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity exercising
|
||||
permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications, including
|
||||
but not limited to software source code, documentation source, and configuration
|
||||
files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical transformation or
|
||||
translation of a Source form, including but not limited to compiled object code,
|
||||
generated documentation, and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or Object form, made
|
||||
available under the License, as indicated by a copyright notice that is included
|
||||
in or attached to the work (an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object form, that
|
||||
is based on (or derived from) the Work and for which the editorial revisions,
|
||||
annotations, elaborations, or other modifications represent, as a whole, an
|
||||
original work of authorship. For the purposes of this License, Derivative Works
|
||||
shall not include works that remain separable from, or merely link (or bind by
|
||||
name) to the interfaces of, the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including the original version
|
||||
of the Work and any modifications or additions to that Work or Derivative Works
|
||||
thereof, that is intentionally submitted to Licensor for inclusion in the Work
|
||||
by the copyright owner or by an individual or Legal Entity authorized to submit
|
||||
on behalf of the copyright owner. For the purposes of this definition,
|
||||
"submitted" means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems, and
|
||||
issue tracking systems that are managed by, or on behalf of, the Licensor for
|
||||
the purpose of discussing and improving the Work, but excluding communication
|
||||
that is conspicuously marked or otherwise designated in writing by the copyright
|
||||
owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
|
||||
of whom a Contribution has been received by Licensor and subsequently
|
||||
incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License.
|
||||
|
||||
Subject to the terms and conditions of this License, each Contributor hereby
|
||||
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
|
||||
irrevocable copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the Work and such
|
||||
Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License.
|
||||
|
||||
Subject to the terms and conditions of this License, each Contributor hereby
|
||||
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
|
||||
irrevocable (except as stated in this section) patent license to make, have
|
||||
made, use, offer to sell, sell, import, and otherwise transfer the Work, where
|
||||
such license applies only to those patent claims licensable by such Contributor
|
||||
that are necessarily infringed by their Contribution(s) alone or by combination
|
||||
of their Contribution(s) with the Work to which such Contribution(s) was
|
||||
submitted. If You institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
|
||||
Contribution incorporated within the Work constitutes direct or contributory
|
||||
patent infringement, then any patent licenses granted to You under this License
|
||||
for that Work shall terminate as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution.
|
||||
|
||||
You may reproduce and distribute copies of the Work or Derivative Works thereof
|
||||
in any medium, with or without modifications, and in Source or Object form,
|
||||
provided that You meet the following conditions:
|
||||
|
||||
You must give any other recipients of the Work or Derivative Works a copy of
|
||||
this License; and
|
||||
You must cause any modified files to carry prominent notices stating that You
|
||||
changed the files; and
|
||||
You must retain, in the Source form of any Derivative Works that You distribute,
|
||||
all copyright, patent, trademark, and attribution notices from the Source form
|
||||
of the Work, excluding those notices that do not pertain to any part of the
|
||||
Derivative Works; and
|
||||
If the Work includes a "NOTICE" text file as part of its distribution, then any
|
||||
Derivative Works that You distribute must include a readable copy of the
|
||||
attribution notices contained within such NOTICE file, excluding those notices
|
||||
that do not pertain to any part of the Derivative Works, in at least one of the
|
||||
following places: within a NOTICE text file distributed as part of the
|
||||
Derivative Works; within the Source form or documentation, if provided along
|
||||
with the Derivative Works; or, within a display generated by the Derivative
|
||||
Works, if and wherever such third-party notices normally appear. The contents of
|
||||
the NOTICE file are for informational purposes only and do not modify the
|
||||
License. You may add Your own attribution notices within Derivative Works that
|
||||
You distribute, alongside or as an addendum to the NOTICE text from the Work,
|
||||
provided that such additional attribution notices cannot be construed as
|
||||
modifying the License.
|
||||
You may add Your own copyright statement to Your modifications and may provide
|
||||
additional or different license terms and conditions for use, reproduction, or
|
||||
distribution of Your modifications, or for any such Derivative Works as a whole,
|
||||
provided Your use, reproduction, and distribution of the Work otherwise complies
|
||||
with the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions.
|
||||
|
||||
Unless You explicitly state otherwise, any Contribution intentionally submitted
|
||||
for inclusion in the Work by You to the Licensor shall be under the terms and
|
||||
conditions of this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify the terms of
|
||||
any separate license agreement you may have executed with Licensor regarding
|
||||
such Contributions.
|
||||
|
||||
6. Trademarks.
|
||||
|
||||
This License does not grant permission to use the trade names, trademarks,
|
||||
service marks, or product names of the Licensor, except as required for
|
||||
reasonable and customary use in describing the origin of the Work and
|
||||
reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, Licensor provides the
|
||||
Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
|
||||
including, without limitation, any warranties or conditions of TITLE,
|
||||
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
|
||||
solely responsible for determining the appropriateness of using or
|
||||
redistributing the Work and assume any risks associated with Your exercise of
|
||||
permissions under this License.
|
||||
|
||||
8. Limitation of Liability.
|
||||
|
||||
In no event and under no legal theory, whether in tort (including negligence),
|
||||
contract, or otherwise, unless required by applicable law (such as deliberate
|
||||
and grossly negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special, incidental,
|
||||
or consequential damages of any character arising as a result of this License or
|
||||
out of the use or inability to use the Work (including but not limited to
|
||||
damages for loss of goodwill, work stoppage, computer failure or malfunction, or
|
||||
any and all other commercial damages or losses), even if such Contributor has
|
||||
been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability.
|
||||
|
||||
While redistributing the Work or Derivative Works thereof, You may choose to
|
||||
offer, and charge a fee for, acceptance of support, warranty, indemnity, or
|
||||
other liability obligations and/or rights consistent with this License. However,
|
||||
in accepting such obligations, You may act only on Your own behalf and on Your
|
||||
sole responsibility, not on behalf of any other Contributor, and only if You
|
||||
agree to indemnify, defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason of your
|
||||
accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work
|
||||
|
||||
To apply the Apache License to your work, attach the following boilerplate
|
||||
notice, with the fields enclosed by brackets "{}" replaced with your own
|
||||
identifying information. (Don't include the brackets!) The text should be
|
||||
enclosed in the appropriate comment syntax for the file format. We also
|
||||
recommend that a file or class name and description of purpose be included on
|
||||
the same "printed page" as the copyright notice for easier identification within
|
||||
third-party archives.
|
||||
|
||||
Copyright 2017 小明
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
```
|
||||
|
||||
### [fastexcel](https://github.com/fast-excel/fastexcel)
|
||||
|
||||
- **仓库地址**: https://github.com/fast-excel/fastexcel
|
||||
- **许可证类型**: MIT License
|
||||
- **许可证内容:**
|
||||
|
||||
```
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2024 CodePhiliaX
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
```
|
||||
|
||||
## 其他
|
||||
|
||||
请确保您遵循每个项目的许可证要求,并在必要时进行相应的说明和归属。
|
@ -0,0 +1,10 @@
|
||||
/// <reference types="vite/client" />
|
||||
interface ImportMetaEnv {
|
||||
readonly VITE_APP_CLIENT_ID: string;
|
||||
readonly VITE_APP_HTTP_TIMEOUT: number;
|
||||
readonly VITE_SOCKET_URL: string;
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: ImportMetaEnv;
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Sz-Admin</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,41 @@
|
||||
server {
|
||||
listen 9800;
|
||||
listen [::]:9800;
|
||||
server_name localhost;
|
||||
access_log /var/log/nginx/default.access.log;
|
||||
error_log /var/log/nginx/default.error.log;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/sz-admin;
|
||||
try_files $uri $uri/ /index.html;
|
||||
index index.html;
|
||||
}
|
||||
|
||||
location /api {
|
||||
client_max_body_size 200M; # 设置最大文件上传大小
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header REMOTE-HOST $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
# proxy_pass $NGINX_PROXY_PASS;
|
||||
proxy_pass http://sz-service-admin:9991/api;
|
||||
}
|
||||
|
||||
# websocket 支持,如不需要请手动注释
|
||||
location /socket {
|
||||
proxy_pass http://sz-service-websocket:9993; # 后端 WebSocket 服务器的地址
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
|
||||
proxy_read_timeout 3600s; # 设置为1小时
|
||||
proxy_send_timeout 3600s; # 设置为1小时
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/sz-admin;
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
// 在 package.d.ts 文件中
|
||||
declare module 'package.json' {
|
||||
const content: {
|
||||
version: string;
|
||||
};
|
||||
export = content;
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
{
|
||||
"name": "sz-admin",
|
||||
"version": "1.2.0-beta",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "run-p type-check \"build-only {@}\" --",
|
||||
"preview": "vite preview",
|
||||
"build-only": "vite build",
|
||||
"type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false",
|
||||
"lint": "eslint --fix",
|
||||
"format": "prettier --write src/"
|
||||
},
|
||||
"dependencies": {
|
||||
"@element-plus/icons-vue": "^2.3.1",
|
||||
"@eslint/js": "^9.24.0",
|
||||
"@highlightjs/vue-plugin": "^2.1.0",
|
||||
"@rushstack/eslint-patch": "^1.11.0",
|
||||
"@vueuse/core": "^10.11.1",
|
||||
"axios": "^1.8.4",
|
||||
"element-plus": "^2.9.7",
|
||||
"eslint-plugin-prettier": "^5.2.6",
|
||||
"eslint-plugin-vue": "^9.0.0",
|
||||
"globals": "^16.0.0",
|
||||
"highlight.js": "^11.11.1",
|
||||
"mitt": "^3.0.1",
|
||||
"nprogress": "^0.2.0",
|
||||
"pinia": "^2.3.1",
|
||||
"pinia-plugin-persistedstate": "^3.2.3",
|
||||
"screenfull": "^6.0.2",
|
||||
"sortablejs": "^1.15.6",
|
||||
"typescript-eslint": "^8.29.0",
|
||||
"vite-plugin-svg-icons": "^2.0.1",
|
||||
"vue": "^3.5.13",
|
||||
"vue-eslint-parser": "^10.1.3",
|
||||
"vue-i18n": "^9.14.4",
|
||||
"vue-router": "^4.5.0",
|
||||
"jsencrypt": "^3.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tsconfig/node18": "^18.2.4",
|
||||
"@types/node": "^18.19.86",
|
||||
"@types/node-forge": "^1.3.11",
|
||||
"@types/nprogress": "^0.2.3",
|
||||
"@types/sortablejs": "^1.15.8",
|
||||
"@vitejs/plugin-vue": "^4.6.2",
|
||||
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
||||
"@vue/eslint-config-prettier": "^8.0.0",
|
||||
"@vue/eslint-config-typescript": "^12.0.0",
|
||||
"@vue/tsconfig": "^0.5.1",
|
||||
"eslint": "^8.57.0",
|
||||
"node-forge": "^1.3.1",
|
||||
"npm-run-all2": "^6.2.6",
|
||||
"prettier": "^3.5.3",
|
||||
"sass": "~1.79.6",
|
||||
"typescript": "~5.2.2",
|
||||
"vite": "^5.4.17",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-vue-devtools": "^7.7.2",
|
||||
"vue-tsc": "^2.2.8"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 4.2 KiB |
@ -0,0 +1,43 @@
|
||||
<template>
|
||||
<el-config-provider :locale="locale" :size="assemblySize" :button="buttonConfig">
|
||||
<RouterView />
|
||||
</el-config-provider>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useTheme } from '@/hooks/useTheme';
|
||||
import { useAppStore } from '@/stores/modules/app';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { getBrowserLang } from '@/utils';
|
||||
import en from 'element-plus/es/locale/lang/en';
|
||||
import zhCn from 'element-plus/es/locale/lang/zh-cn';
|
||||
import type { LanguageType } from '@/stores/interface/app';
|
||||
import { computed, onMounted, reactive } from 'vue';
|
||||
|
||||
const appStore = useAppStore();
|
||||
|
||||
// init theme
|
||||
const { initTheme } = useTheme();
|
||||
initTheme();
|
||||
|
||||
// init language
|
||||
const i18n = useI18n();
|
||||
onMounted(() => {
|
||||
const language = appStore.language ?? getBrowserLang();
|
||||
i18n.locale.value = language;
|
||||
appStore.changeLanguage(language as LanguageType);
|
||||
});
|
||||
|
||||
// element language
|
||||
const locale = computed(() => {
|
||||
if (appStore.language === 'zh') return zhCn;
|
||||
if (appStore.language === 'en') return en;
|
||||
return getBrowserLang() === 'zh' ? zhCn : en;
|
||||
});
|
||||
|
||||
// element assemblySize
|
||||
const assemblySize = computed(() => appStore.assemblySize);
|
||||
|
||||
// element button config
|
||||
const buttonConfig = reactive({ autoInsertSpace: false });
|
||||
</script>
|
@ -0,0 +1,61 @@
|
||||
import { ElMessage } from 'element-plus';
|
||||
|
||||
/**
|
||||
* 成功状态
|
||||
* @type {string}
|
||||
*/
|
||||
export const CODE_SUCCESS: number = 200;
|
||||
/**
|
||||
* 无效Token
|
||||
* @type {string}
|
||||
*/
|
||||
export const CODE_TOKEN_FAIL: string = 'C105';
|
||||
|
||||
/**
|
||||
* @description: 校验网络请求状态码
|
||||
* @param {Number} status
|
||||
* @return void
|
||||
*/
|
||||
export const checkStatus = (status: number, message?: string) => {
|
||||
switch (status) {
|
||||
case 400:
|
||||
ElMessage.error(message || '请求失败!请您稍后重试');
|
||||
break;
|
||||
case 401:
|
||||
ElMessage.error(message || '登录失效!请您重新登录');
|
||||
break;
|
||||
case 403:
|
||||
ElMessage.error(message || '当前账号无权限访问!');
|
||||
break;
|
||||
case 404:
|
||||
ElMessage.error(message || '你所访问的资源不存在!');
|
||||
break;
|
||||
case 405:
|
||||
ElMessage.error(message || '请求方式错误!请您稍后重试');
|
||||
break;
|
||||
case 408:
|
||||
ElMessage.error(message || '请求超时!请您稍后重试');
|
||||
break;
|
||||
case 422:
|
||||
ElMessage.error(message || '请求参数异常!');
|
||||
break;
|
||||
case 500:
|
||||
ElMessage.error(message || '服务异常!');
|
||||
break;
|
||||
case 502:
|
||||
ElMessage.error(message || '网关错误!');
|
||||
break;
|
||||
case 503:
|
||||
ElMessage.error(message || '服务不可用!');
|
||||
break;
|
||||
case 504:
|
||||
ElMessage.error(message || '网关超时!');
|
||||
break;
|
||||
// 自定义响应码,处理 blob流异常时的返回信息
|
||||
case 1004:
|
||||
ElMessage.error(message || '模板文件不存在!');
|
||||
break;
|
||||
default:
|
||||
ElMessage.error(message || '请求失败!');
|
||||
}
|
||||
};
|
@ -0,0 +1 @@
|
||||
export const ADMIN_MODULE: string = '/admin';
|
@ -0,0 +1,12 @@
|
||||
import http from '@/api';
|
||||
import { ADMIN_MODULE } from '@/api/helper/prefix';
|
||||
import type { Message } from '@/api/types/system/message';
|
||||
|
||||
/**
|
||||
* 发送消息
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const sendMessageApi = (params: Message) => {
|
||||
return http.post(ADMIN_MODULE + `/www/message/send`, params);
|
||||
};
|
@ -0,0 +1,16 @@
|
||||
import http from '@/api';
|
||||
import { ADMIN_MODULE } from '@/api/helper/prefix';
|
||||
import type { CaptchaInfo, CaptchaVerifyImageParams } from '@/api/types/system/captcha';
|
||||
|
||||
// 获取验证码是否启用
|
||||
export const getCaptchaStatus = () => {
|
||||
return http.get<boolean>(`/dsBase/captcha/status`, {});
|
||||
};
|
||||
// 获取滑块拼图验证码
|
||||
export const getImageCodeApi = () => {
|
||||
return http.post<CaptchaInfo>(ADMIN_MODULE + `/captcha/get`, {});
|
||||
};
|
||||
// 校验滑块拼图验证码
|
||||
export const verifyImageCodeApi = (params: CaptchaVerifyImageParams) => {
|
||||
return http.post(ADMIN_MODULE + `/captcha/check`, params);
|
||||
};
|
@ -0,0 +1,49 @@
|
||||
import http from '@/api';
|
||||
import { ADMIN_MODULE } from '@/api/helper/prefix';
|
||||
import type { IPage } from '@/api/types';
|
||||
import type { SysClientForm, SysClientQuery, SysClientRow } from '@/api/types/system/client';
|
||||
/**
|
||||
* 查询列表
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getSysClientListApi = (params: SysClientQuery) => {
|
||||
return http.get<IPage<SysClientRow>>(ADMIN_MODULE + `/sys-client`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 添加
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const createSysClientApi = (params: SysClientForm) => {
|
||||
return http.post(ADMIN_MODULE + `/sys-client`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const updateSysClientApi = (params: SysClientForm) => {
|
||||
return http.put(ADMIN_MODULE + `/sys-client`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const removeSysClientApi = (params: { ids: number[] }) => {
|
||||
return http.delete(ADMIN_MODULE + `/sys-client`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取详情
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getSysClientDetailApi = (params: { id: number }) => {
|
||||
const { id } = params;
|
||||
return http.get<SysClientRow>(ADMIN_MODULE + `/sys-client/${id}`);
|
||||
};
|
@ -0,0 +1,10 @@
|
||||
import http from '@/api';
|
||||
import { ADMIN_MODULE } from '@/api/helper/prefix';
|
||||
import type { CommonTemplateDown } from '@/api/types/system/common';
|
||||
|
||||
/**
|
||||
* 模版下载
|
||||
*/
|
||||
export const downloadTemplate = (params: CommonTemplateDown) => {
|
||||
return http.template(ADMIN_MODULE + `/common/download/templates`, params);
|
||||
};
|
@ -0,0 +1,40 @@
|
||||
import http from '@/api';
|
||||
import { ADMIN_MODULE } from '@/api/helper/prefix';
|
||||
import type { ConfigForm, ConfigInfo, ConfigQuery } from '@/api/types/system/config';
|
||||
import type { IPage } from '@/api/types';
|
||||
|
||||
/**
|
||||
* 获取列表
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getConfigList = (params: ConfigQuery) => {
|
||||
return http.get<IPage<ConfigInfo>>(ADMIN_MODULE + `/sys-config`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 添加
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const addConfig = (params: ConfigForm) => {
|
||||
return http.post(ADMIN_MODULE + `/sys-config`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const editConfig = (params: ConfigForm) => {
|
||||
return http.put(ADMIN_MODULE + `/sys-config`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const deleteConfig = (params: { ids: number[] }) => {
|
||||
return http.delete(ADMIN_MODULE + `/sys-config`, params);
|
||||
};
|
@ -0,0 +1,58 @@
|
||||
import http from '@/api';
|
||||
import { ADMIN_MODULE } from '@/api/helper/prefix';
|
||||
import type { IPage } from '@/api/types';
|
||||
import type { SysDataRoleQuery, SysDataRoleRow, SysDataRoleForm, SysDataRoleMeta } from '@/api/types/system/datarole';
|
||||
/**
|
||||
* 查询列表
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getSysDataRoleListApi = (params: SysDataRoleQuery) => {
|
||||
return http.get<IPage<SysDataRoleRow>>(ADMIN_MODULE + `/sys-data-role`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 添加
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const createSysDataRoleApi = (params: SysDataRoleForm) => {
|
||||
return http.post(ADMIN_MODULE + `/sys-data-role`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const updateSysDataRoleApi = (params: SysDataRoleForm) => {
|
||||
return http.put(ADMIN_MODULE + `/sys-data-role`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const removeSysDataRoleApi = (params: { ids: (string | number)[] }) => {
|
||||
return http.delete(ADMIN_MODULE + `/sys-data-role`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取详情
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getSysDataRoleDetailApi = (params: { id: number }) => {
|
||||
const { id } = params;
|
||||
return http.get<SysDataRoleRow>(ADMIN_MODULE + `/sys-data-role/${id}`);
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取数据角色初始菜单信息
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getSysDataRoleMenuApi = () => {
|
||||
return http.get<SysDataRoleMeta>(ADMIN_MODULE + `/sys-data-role/menu`);
|
||||
};
|
@ -0,0 +1,77 @@
|
||||
import http from '@/api';
|
||||
import { ADMIN_MODULE } from '@/api/helper/prefix';
|
||||
import type { IPage } from '@/api/types';
|
||||
import type { SysDeptQuery, SysDeptRow, SysDeptForm, SysDeptTree, SysDeptLeaderData, SysDeptDept } from '@/api/types/system/dept';
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getSysDeptListApi = (params: SysDeptQuery) => {
|
||||
return http.get<IPage<SysDeptRow>>(ADMIN_MODULE + `/sys-dept`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 添加
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const createSysDeptApi = (params: SysDeptForm) => {
|
||||
return http.post(ADMIN_MODULE + `/sys-dept`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const updateSysDeptApi = (params: SysDeptForm) => {
|
||||
return http.put(ADMIN_MODULE + `/sys-dept`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const removeSysDeptApi = (params: { ids: number[] }) => {
|
||||
return http.delete(ADMIN_MODULE + `/sys-dept`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取详情
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getSysDeptDetailApi = (params: { id: number }) => {
|
||||
const { id } = params;
|
||||
return http.get<SysDeptRow>(ADMIN_MODULE + `/sys-dept/${id}`);
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取上级菜单树
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getMenuTree = (params: { excludeNodeId?: number; appendRoot?: boolean }) => {
|
||||
return http.get<SysDeptTree[]>(ADMIN_MODULE + `/sys-dept/tree`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取部门负责人关系
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getSysDeptLeaderApi = () => {
|
||||
return http.get<SysDeptLeaderData>(ADMIN_MODULE + `/sys-dept/leader`);
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取部门树
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getDeptTrees = (params: { deptId?: number }) => {
|
||||
return http.get<SysDeptDept>(ADMIN_MODULE + `/sys-dept/datascope`, params);
|
||||
};
|
@ -0,0 +1,107 @@
|
||||
import http from '@/api';
|
||||
import { ADMIN_MODULE } from '@/api/helper/prefix';
|
||||
import type { DictTypeQuery, DictType, DictQuery, Dict, DictCustom } from '@/api/types/system/dict';
|
||||
import type { IPage } from '@/api/types';
|
||||
|
||||
/**
|
||||
* 字典类别列表
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getDictType = (params: DictTypeQuery) => {
|
||||
return http.get<IPage<DictType>>(ADMIN_MODULE + `/sys-dict-type`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 添加字典类别
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const addDictType = (params: DictType) => {
|
||||
return http.post(ADMIN_MODULE + `/sys-dict-type`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改字典类型
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const editDictType = (params: DictType) => {
|
||||
return http.put(ADMIN_MODULE + `/sys-dict-type`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除字典类型
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const deleteDictType = (params: { ids: number[] }) => {
|
||||
return http.delete(ADMIN_MODULE + `/sys-dict-type`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取字典数据列表
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getDictData = (params: DictQuery) => {
|
||||
return http.get<IPage<Dict>>(ADMIN_MODULE + `/sys-dict`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 添加字典类别
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const addDictData = (params: Dict) => {
|
||||
return http.post(ADMIN_MODULE + `/sys-dict`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改字典类型
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const editDictData = (params: Dict) => {
|
||||
return http.put(ADMIN_MODULE + `/sys-dict`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除字典
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const deleteDictData = (params: { ids: number[] }) => {
|
||||
return http.delete(ADMIN_MODULE + `/sys-dict`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取所有字典信息
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getAllDict = () => {
|
||||
return http.get<Record<string, DictCustom[]>>(ADMIN_MODULE + `/sys-dict/dict`, {});
|
||||
};
|
||||
|
||||
export const getDictTypeOptions = () => {
|
||||
return http.get<DictType[]>(ADMIN_MODULE + `/sys-dict-type/selectOptionsType`);
|
||||
};
|
||||
|
||||
/**
|
||||
* 导出字典sql
|
||||
* @param params
|
||||
*/
|
||||
export const exportDictSql = (params: { ids: number[] }) => {
|
||||
return http.post<string>(ADMIN_MODULE + `/sys-dict/sql/export`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取指定字典
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getDictByCode = (params: { typeCode: string[] }) => {
|
||||
const searchParams = new URLSearchParams();
|
||||
params.typeCode.forEach(code => searchParams.append('typeCode', code));
|
||||
return http.get<Record<string, DictCustom[]>>(ADMIN_MODULE + `/sys-dict/code?${searchParams.toString()}`);
|
||||
};
|
@ -0,0 +1,13 @@
|
||||
import http from '@/api';
|
||||
import { ADMIN_MODULE } from '@/api/helper/prefix';
|
||||
import type { IPage } from '@/api/types';
|
||||
import type { SysFileQuery, SysFileRow } from '@/api/types/system/file';
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getSysFileListApi = (params: SysFileQuery) => {
|
||||
return http.get<IPage<SysFileRow>>(ADMIN_MODULE + `/sys-file`, params);
|
||||
};
|
@ -0,0 +1,32 @@
|
||||
import http from '@/api';
|
||||
import { ADMIN_MODULE } from '@/api/helper/prefix';
|
||||
import type { LoginParams, LoginInfo } from '@/api/types/system/login';
|
||||
|
||||
// 用户登录
|
||||
export const loginApi = (params: LoginParams) => {
|
||||
return http.post(`/dsBase/loginPerson/doLogin`, params); // 正常 post json 请求 ==> application/json
|
||||
// return http.post(`/login`, params, { loading: false }); // 控制当前请求不显示 loading
|
||||
// return http.post(`/login`, {}, { params }); // post 请求携带 query 参数 ==> ?username=admin&password=123456
|
||||
// return http.post(`/login`, qs.stringify(params)); // post 请求携带表单参数 ==> application/x-www-form-urlencoded
|
||||
// return http.get(`/login?${qs.stringify(params, { arrayFormat: "repeat" })}`); // get 请求可以携带数组等复杂参数
|
||||
};
|
||||
|
||||
// 获取菜单列表
|
||||
export const getAuthMenuListApi = () => {
|
||||
return http.get<Menu.MenuOptions[]>(ADMIN_MODULE + `/sys-menu/menu`, {});
|
||||
};
|
||||
|
||||
// 获取按钮权限
|
||||
export const getAuthButtonListApi = () => {
|
||||
return http.get<string[]>(ADMIN_MODULE + `/sys-menu/btn/permissions`, {});
|
||||
};
|
||||
|
||||
// 用户退出登录
|
||||
export const logoutApi = () => {
|
||||
return http.post(ADMIN_MODULE + `/auth/logout`);
|
||||
};
|
||||
|
||||
// 获取用户角色
|
||||
export const getAuthRoleListApi = () => {
|
||||
return http.get<string[]>(ADMIN_MODULE + `/sys-menu/user/roles`, {});
|
||||
};
|
@ -0,0 +1,85 @@
|
||||
import http from '@/api';
|
||||
import { ADMIN_MODULE } from '@/api/helper/prefix';
|
||||
import type { MenuQuery, MenuForm, MenuTree, MenuPermissionQuery } from '@/api/types/system/menu';
|
||||
|
||||
/**
|
||||
* 获取菜单列表
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getMenuList = (params: MenuQuery) => {
|
||||
return http.get<Menu.MenuOptions[]>(ADMIN_MODULE + `/sys-menu`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 添加菜单
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const addMenu = (params: MenuForm) => {
|
||||
return http.post(ADMIN_MODULE + `/sys-menu`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改菜单
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const editMenu = (params: MenuForm) => {
|
||||
return http.put(ADMIN_MODULE + `/sys-menu`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除菜单
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const deleteMenu = (params: { ids: string[] }) => {
|
||||
return http.delete(ADMIN_MODULE + `/sys-menu`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取菜单详情
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getMenuInfo = (params: { id: string }) => {
|
||||
const { id } = params;
|
||||
return http.get(ADMIN_MODULE + `/sys-menu/${id}`);
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取上级菜单树
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getMenuTree = (params: { nodeId?: string }) => {
|
||||
return http.get<MenuTree[]>(ADMIN_MODULE + `/sys-menu/tree`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 菜单权限是否存在验证
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getBtnExits = (params: MenuPermissionQuery) => {
|
||||
return http.get<{ permissionCount: number }>(ADMIN_MODULE + `/sys-menu/btn/exists`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 导出菜单sql
|
||||
* @param params
|
||||
*/
|
||||
export const exportMenuSql = (params: { ids: string[] }) => {
|
||||
return http.post<string>(ADMIN_MODULE + `/sys-menu/sql/export`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改菜单数据权限
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const chaneDataRole = (params: { id: string }) => {
|
||||
const { id } = params;
|
||||
return http.put(ADMIN_MODULE + `/sys-menu/datarole/change/${id}`);
|
||||
};
|
@ -0,0 +1,39 @@
|
||||
import http from '@/api';
|
||||
import { ADMIN_MODULE } from '@/api/helper/prefix';
|
||||
import type { IPage } from '@/api/types';
|
||||
import type { MessageQuery, MessageRow, UnreadMessageCount } from '@/api/types/system/message';
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
export const getMessageListApi = (params: MessageQuery) => {
|
||||
return http.get<IPage<MessageRow>>(ADMIN_MODULE + `/sys-message`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
export const getMessageInfoApi = (id: string | number) => {
|
||||
return http.get<MessageRow>(ADMIN_MODULE + `/sys-message/${id}`);
|
||||
};
|
||||
|
||||
/**
|
||||
* 我的待办消息
|
||||
*/
|
||||
export const getTodoMessageListApi = () => {
|
||||
return http.get<MessageRow[]>(ADMIN_MODULE + `/sys-message/list/todo`);
|
||||
};
|
||||
|
||||
/**
|
||||
* 我的消息
|
||||
*/
|
||||
export const getNoticeMessageListApi = () => {
|
||||
return http.get<MessageRow[]>(ADMIN_MODULE + `/sys-message/list/msg`);
|
||||
};
|
||||
|
||||
/**
|
||||
* 未读消息数量
|
||||
*/
|
||||
export const getUnreadMessageCountApi = () => {
|
||||
return http.get<UnreadMessageCount>(ADMIN_MODULE + `/sys-message/count`);
|
||||
};
|
@ -0,0 +1,58 @@
|
||||
import http from '@/api';
|
||||
import { ADMIN_MODULE } from '@/api/helper/prefix';
|
||||
import type { RoleQuery, RoleInfo, RoleForm, RoleMenu, RoleMenuForm } from '@/api/types/system/role';
|
||||
import type { IPage } from '@/api/types';
|
||||
|
||||
/**
|
||||
* 获取角色列表
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getRoleList = (params: RoleQuery) => {
|
||||
return http.get<IPage<RoleInfo>>(ADMIN_MODULE + `/sys-role`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 添加角色
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const addRole = (params: RoleForm) => {
|
||||
return http.post(ADMIN_MODULE + `/sys-role`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改角色
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const editRole = (params: RoleForm) => {
|
||||
return http.put(ADMIN_MODULE + `/sys-role`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除角色
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const deleteRole = (params: { ids: number[] }) => {
|
||||
return http.delete(ADMIN_MODULE + `/sys-role`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取角色菜单权限
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getRoleMenus = (params: { roleId: number }) => {
|
||||
return http.get<RoleMenu>(ADMIN_MODULE + `/sys-role/menu`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 设置角色菜单权限
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const setRoleMenus = (params: RoleMenuForm) => {
|
||||
return http.put(ADMIN_MODULE + `/sys-role/menu`, params);
|
||||
};
|
@ -0,0 +1,64 @@
|
||||
import http from '@/api';
|
||||
import { ADMIN_MODULE } from '@/api/helper/prefix';
|
||||
import type { IPage } from '@/api/types';
|
||||
import type {
|
||||
SysTempFileQuery,
|
||||
SysTempFileRow,
|
||||
SysTempFileForm,
|
||||
SysTempFileHistoryQuery,
|
||||
SysTempFileHistory
|
||||
} from '@/api/types/system/sysTempFile';
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getSysTempFileListApi = (params: SysTempFileQuery) => {
|
||||
return http.get<IPage<SysTempFileRow>>(ADMIN_MODULE + `/sys-temp-file`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 添加
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const createSysTempFileApi = (params: SysTempFileForm) => {
|
||||
return http.post(ADMIN_MODULE + `/sys-temp-file`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const updateSysTempFileApi = (params: SysTempFileForm) => {
|
||||
return http.put(ADMIN_MODULE + `/sys-temp-file`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const removeSysTempFileApi = (params: { ids: (string | number)[] }) => {
|
||||
return http.delete(ADMIN_MODULE + `/sys-temp-file`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取详情
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getSysTempFileDetailApi = (params: { id: number }) => {
|
||||
const { id } = params;
|
||||
return http.get<SysTempFileRow>(ADMIN_MODULE + `/sys-temp-file/${id}`);
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取历史记录
|
||||
* @param params
|
||||
*/
|
||||
export const getSysTempFileHistoryListApi = (params: SysTempFileHistoryQuery) => {
|
||||
return http.get<IPage<SysTempFileHistory>>(ADMIN_MODULE + `/sys-temp-file-history/history`, params);
|
||||
};
|
@ -0,0 +1,23 @@
|
||||
import http from '@/api';
|
||||
import { ADMIN_MODULE } from '@/api/helper/prefix';
|
||||
import type { IUploadResult, UploadFile, UploadResult } from '@/api/types/system/upload';
|
||||
import type { AxiosRequestConfig } from 'axios';
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const uploadFile = (params: UploadFile, config?: AxiosRequestConfig<any> | undefined) => {
|
||||
return http.upload<UploadResult>(ADMIN_MODULE + `/sys-file/upload`, params, config);
|
||||
};
|
||||
|
||||
/**
|
||||
* 上传模板文件
|
||||
* @param params
|
||||
* @param config
|
||||
* @returns {*}
|
||||
*/
|
||||
export const uploadTmpFile = (params: UploadFile, config?: AxiosRequestConfig<any> | undefined) => {
|
||||
return http.upload<IUploadResult>(ADMIN_MODULE + `/sys-temp-file/upload`, params, config);
|
||||
};
|
@ -0,0 +1,77 @@
|
||||
import http from '@/api';
|
||||
import { ADMIN_MODULE } from '@/api/helper/prefix';
|
||||
import type { IPage } from '@/api/types';
|
||||
import type { TeacherStatisticsQuery, TeacherStatisticsRow, TeacherStatisticsForm } from '@/api/types/teacher/teacherStatistics';
|
||||
import type { UploadRawFile } from 'element-plus/es/components/upload/src/upload';
|
||||
import type { AxiosRequestConfig } from 'axios';
|
||||
/**
|
||||
* 查询列表
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getTeacherStatisticsListApi = (params: TeacherStatisticsQuery) => {
|
||||
return http.get<IPage<TeacherStatisticsRow>>(ADMIN_MODULE + `/teacher-statistics`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 添加
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const createTeacherStatisticsApi = (params: TeacherStatisticsForm) => {
|
||||
return http.post(ADMIN_MODULE + `/teacher-statistics`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const updateTeacherStatisticsApi = (params: TeacherStatisticsForm) => {
|
||||
return http.put(ADMIN_MODULE + `/teacher-statistics`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const removeTeacherStatisticsApi = (params: { ids: (string | number)[] }) => {
|
||||
return http.delete(ADMIN_MODULE + `/teacher-statistics`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取详情
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getTeacherStatisticsDetailApi = (params: { id: number }) => {
|
||||
const { id } = params;
|
||||
return http.get<TeacherStatisticsRow>(ADMIN_MODULE + `/teacher-statistics/${id}`);
|
||||
};
|
||||
|
||||
/**
|
||||
* 导入excel
|
||||
* @param params
|
||||
*/
|
||||
export const importTeacherStatisticsExcelApi = (params: UploadRawFile, config?: AxiosRequestConfig<any> | undefined) => {
|
||||
return http.upload(ADMIN_MODULE + `/teacher-statistics/import`, params, config);
|
||||
};
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
* @param params
|
||||
* @returns {*}
|
||||
*/
|
||||
export const exportTeacherStatisticsExcelApi = (params: TeacherStatisticsQuery) => {
|
||||
return http.download(ADMIN_MODULE + `/teacher-statistics/export`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 远程搜索
|
||||
* @param params
|
||||
*/
|
||||
export const remoteTeacherStaticsSearchApi = (params: { keyword: string }) => {
|
||||
const { keyword } = params;
|
||||
return http.get<string[]>(ADMIN_MODULE + `/teacher-statistics/remote/${keyword}`);
|
||||
};
|
@ -0,0 +1,16 @@
|
||||
// 登录模块
|
||||
export type CaptchaInfo = {
|
||||
bigImageBase64: string;
|
||||
bigWidth: number;
|
||||
bigHeight: number;
|
||||
smallImageBase64: string;
|
||||
smallWidth: number;
|
||||
smallHeight: number;
|
||||
requestId: string;
|
||||
posY: number;
|
||||
secretKey: string;
|
||||
};
|
||||
export type CaptchaVerifyImageParams = {
|
||||
requestId: string;
|
||||
moveEncrypted: string;
|
||||
};
|
@ -0,0 +1,41 @@
|
||||
import type { IPageQuery } from '@/api/types';
|
||||
|
||||
// 查询条件
|
||||
export type SysClientQuery = IPageQuery & {
|
||||
clientKey?: string;
|
||||
clientSecret?: string;
|
||||
grantTypeCd?: string;
|
||||
deviceTypeCd?: string;
|
||||
activeTimeout?: number;
|
||||
version?: number;
|
||||
};
|
||||
|
||||
// 编辑form表单
|
||||
export type SysClientForm = {
|
||||
clientKey?: string;
|
||||
clientSecret?: string;
|
||||
grantTypeCdList?: string[];
|
||||
grantTypeCd?: string;
|
||||
deviceTypeCd?: string;
|
||||
activeTimeout?: number;
|
||||
timeout?: number;
|
||||
clientStatusCd?: string;
|
||||
version?: number;
|
||||
remark?: string;
|
||||
};
|
||||
|
||||
// list或detail返回结构
|
||||
export type SysClientRow = {
|
||||
clientId?: string;
|
||||
clientKey?: string;
|
||||
clientSecret?: string;
|
||||
grantTypeCd?: string;
|
||||
grantTypeCdList?: string[];
|
||||
deviceTypeCd?: string;
|
||||
activeTimeout?: number;
|
||||
timeout?: number;
|
||||
clientStatusCd?: string;
|
||||
version?: number;
|
||||
remark?: string;
|
||||
isLock?: string;
|
||||
};
|
@ -0,0 +1,4 @@
|
||||
// 登录模块
|
||||
export type CommonTemplateDown = {
|
||||
templateName: string;
|
||||
};
|
@ -0,0 +1,27 @@
|
||||
import type { IPageQuery } from '@/api/types';
|
||||
|
||||
export type ConfigQuery = IPageQuery & {
|
||||
configName?: string;
|
||||
configKey?: string;
|
||||
};
|
||||
|
||||
export type ConfigForm = {
|
||||
id?: number;
|
||||
configName: string;
|
||||
configKey: string;
|
||||
configValue: string;
|
||||
remark: string;
|
||||
};
|
||||
|
||||
export type ConfigInfo = {
|
||||
id: number;
|
||||
configName: string;
|
||||
configKey: string;
|
||||
configValue: string;
|
||||
remark: string;
|
||||
createId: number;
|
||||
createTime: string;
|
||||
updateId: number;
|
||||
updateTime: string;
|
||||
isLock?: string;
|
||||
};
|
@ -0,0 +1,64 @@
|
||||
import type { IPageQuery } from '@/api/types';
|
||||
|
||||
// 查询条件
|
||||
export type SysDeptQuery = IPageQuery & {
|
||||
name?: string;
|
||||
};
|
||||
|
||||
// 编辑form表单
|
||||
export type SysDeptForm = {
|
||||
id?: number;
|
||||
name?: string;
|
||||
pid?: number;
|
||||
sort?: number;
|
||||
remark?: string;
|
||||
leaders: number[];
|
||||
};
|
||||
|
||||
// list或detail返回结构
|
||||
export type SysDeptRow = {
|
||||
id: number;
|
||||
pid: number;
|
||||
name: string;
|
||||
deep?: number;
|
||||
sort?: number;
|
||||
remark?: string;
|
||||
isLock?: string;
|
||||
leaders: number[];
|
||||
};
|
||||
|
||||
export type SysDeptTree = {
|
||||
id: number;
|
||||
pid: number;
|
||||
name: string;
|
||||
deep?: number;
|
||||
sort?: number;
|
||||
children: SysDeptTree[];
|
||||
userTotal?: number;
|
||||
};
|
||||
|
||||
export type SysDeptLeader = {
|
||||
id: number;
|
||||
nickname: string;
|
||||
};
|
||||
|
||||
export type SysDeptLeaderData = {
|
||||
leaderInfoVOS: SysDeptLeader[];
|
||||
};
|
||||
|
||||
export type SysDeptDeptSetting = {
|
||||
userIds: number[];
|
||||
deptIds: number[];
|
||||
};
|
||||
|
||||
export type SysDeptDept = {
|
||||
deptLists: SysDeptDeptTree[];
|
||||
selectIds: number[];
|
||||
};
|
||||
|
||||
export type SysDeptDeptTree = {
|
||||
id: number;
|
||||
pid: number;
|
||||
name: string;
|
||||
children: SysDeptDeptTree[];
|
||||
};
|
@ -0,0 +1,66 @@
|
||||
import type { IPageQuery } from '@/api/types';
|
||||
|
||||
// 获取所有字典信息
|
||||
export type DictCustom = {
|
||||
callbackShowStyle: string;
|
||||
codeName: string;
|
||||
id: string;
|
||||
isLock: string;
|
||||
isShow: string;
|
||||
sort: number;
|
||||
sysDictTypeId: number;
|
||||
alias?: string;
|
||||
};
|
||||
|
||||
// 字典类别列表查询
|
||||
export type DictTypeQuery = IPageQuery & {
|
||||
typeName: string;
|
||||
typeCode: string;
|
||||
};
|
||||
|
||||
// 字典类别列表
|
||||
export type DictType = {
|
||||
id?: number;
|
||||
typeName: string;
|
||||
typeCode: string;
|
||||
isLock?: string;
|
||||
isShow?: string;
|
||||
delFlag?: string;
|
||||
remark: string;
|
||||
createTime?: string;
|
||||
updateTime?: string;
|
||||
isDynamic: boolean;
|
||||
};
|
||||
|
||||
// 字典分类option
|
||||
export type DictOption = {
|
||||
value: string;
|
||||
label: string;
|
||||
};
|
||||
|
||||
// 字典分类类型
|
||||
export type DictCategory = {
|
||||
label: string;
|
||||
options: DictOption[];
|
||||
};
|
||||
|
||||
// 字典列表查询
|
||||
export type DictQuery = IPageQuery & {
|
||||
sysDictTypeId: number;
|
||||
codeName: string;
|
||||
};
|
||||
|
||||
export type Dict = {
|
||||
id?: number;
|
||||
sysDictTypeId?: number;
|
||||
codeName: string;
|
||||
alias?: string;
|
||||
sort?: number;
|
||||
callbackShowStyle: string;
|
||||
remark: string;
|
||||
isLock?: string;
|
||||
isShow?: string;
|
||||
delFlag?: string;
|
||||
createTime?: string;
|
||||
updateTime?: string;
|
||||
};
|
@ -0,0 +1,24 @@
|
||||
import type { IPageQuery } from '@/api/types';
|
||||
|
||||
// 查询条件
|
||||
export type SysFileQuery = IPageQuery & {
|
||||
filename?: string;
|
||||
dirTag?: string;
|
||||
objectName?: string;
|
||||
};
|
||||
|
||||
// 编辑form表单
|
||||
export type SysFileForm = {};
|
||||
|
||||
// list或detail返回结构
|
||||
export type SysFileRow = {
|
||||
id?: number;
|
||||
filename?: string;
|
||||
dirTag?: string;
|
||||
size?: number;
|
||||
url?: string;
|
||||
objectName?: string;
|
||||
contextType?: string;
|
||||
eTag?: string;
|
||||
fileId?: number;
|
||||
};
|
@ -0,0 +1,36 @@
|
||||
// 登录模块
|
||||
export type LoginParams = {
|
||||
username: string;
|
||||
password: string;
|
||||
platform: string;
|
||||
};
|
||||
|
||||
export type LoginInfo = {
|
||||
name: string;
|
||||
avatar: string;
|
||||
introduction: string;
|
||||
accessToken: string;
|
||||
refreshToken: string;
|
||||
roles: string[];
|
||||
userInfo: UserInfo;
|
||||
permissions: string[];
|
||||
};
|
||||
|
||||
export type UserInfo = {
|
||||
id?: number;
|
||||
username: string;
|
||||
phone?: string;
|
||||
nickname?: string;
|
||||
logo?: string;
|
||||
age?: number;
|
||||
sex?: number;
|
||||
idCard?: string;
|
||||
email?: string;
|
||||
accountStatusCd?: string;
|
||||
userTagCd?: string;
|
||||
lastLoginTime?: string;
|
||||
createTime?: string;
|
||||
updateTime?: string;
|
||||
identityId?: number;
|
||||
bureauId?: string;
|
||||
};
|
@ -0,0 +1,36 @@
|
||||
export type MenuQuery = {
|
||||
isShowButton: boolean;
|
||||
};
|
||||
|
||||
export type MenuForm = {
|
||||
id?: string;
|
||||
title?: string;
|
||||
pid?: string;
|
||||
path?: string;
|
||||
name?: string;
|
||||
icon?: string;
|
||||
component?: string;
|
||||
redirect?: string;
|
||||
sort?: number;
|
||||
deep?: number;
|
||||
menuTypeCd?: string;
|
||||
permissions?: string;
|
||||
isHidden?: string;
|
||||
hasChildren?: string;
|
||||
isLink?: string;
|
||||
isFull?: string;
|
||||
isAffix?: string;
|
||||
isKeepAlive?: string;
|
||||
};
|
||||
|
||||
export type MenuTree = {
|
||||
id: string;
|
||||
pid: string;
|
||||
title: string;
|
||||
children: MenuTree[];
|
||||
};
|
||||
|
||||
export type MenuPermissionQuery = {
|
||||
id: string;
|
||||
permissions: string;
|
||||
};
|
@ -0,0 +1,30 @@
|
||||
import type { IPageQuery } from '@/api/types';
|
||||
|
||||
export type MessageQuery = IPageQuery & {
|
||||
messageTypeCd?: string;
|
||||
readType?: string;
|
||||
};
|
||||
|
||||
export type MessageRow = {
|
||||
id: number;
|
||||
messageTypeCd: string;
|
||||
senderId: number;
|
||||
title: string;
|
||||
content: string;
|
||||
isRead: string;
|
||||
createTime: string;
|
||||
};
|
||||
|
||||
export type UnreadMessageCount = {
|
||||
all: number;
|
||||
todo: number;
|
||||
msg: number;
|
||||
};
|
||||
|
||||
export type Message = {
|
||||
messageTypeCd?: string;
|
||||
senderId?: number;
|
||||
title?: string;
|
||||
content?: string;
|
||||
receiverIds?: string[];
|
||||
};
|
@ -0,0 +1,39 @@
|
||||
import type { IPageQuery } from '@/api/types';
|
||||
|
||||
export type RoleQuery = IPageQuery & {
|
||||
roleName?: string;
|
||||
};
|
||||
|
||||
export type RoleForm = {
|
||||
id?: number;
|
||||
roleName: string;
|
||||
remark: string;
|
||||
};
|
||||
|
||||
export type RoleInfo = {
|
||||
id: number;
|
||||
roleName: string;
|
||||
remark: string;
|
||||
delFlag: string;
|
||||
createTime: string;
|
||||
updateTime: string;
|
||||
isLock?: string;
|
||||
permissions?: string;
|
||||
};
|
||||
|
||||
export type RoleMenu = {
|
||||
menuLists: RoleMenuTree[];
|
||||
selectIds: string[];
|
||||
};
|
||||
|
||||
export type RoleMenuTree = {
|
||||
id: string;
|
||||
pid: string;
|
||||
title: string;
|
||||
children: RoleMenuTree[];
|
||||
};
|
||||
|
||||
export type RoleMenuForm = {
|
||||
menuIds: string[];
|
||||
roleId: number;
|
||||
};
|
@ -0,0 +1,47 @@
|
||||
import type { IPageQuery } from '@/api/types';
|
||||
|
||||
// 查询条件
|
||||
export type SysTempFileQuery = IPageQuery & {
|
||||
tempName?: string;
|
||||
};
|
||||
|
||||
// 历史记录查询条件
|
||||
export type SysTempFileHistoryQuery = IPageQuery & {
|
||||
sysTempFileId: number;
|
||||
};
|
||||
|
||||
// 编辑form表单
|
||||
export type SysTempFileForm = {
|
||||
id?: number;
|
||||
sysFileId?: number;
|
||||
tempName?: string;
|
||||
url?: string;
|
||||
remark?: string;
|
||||
};
|
||||
|
||||
// list或detail返回结构
|
||||
export type SysTempFileRow = {
|
||||
id?: number;
|
||||
sysFileId?: number;
|
||||
tempName?: string;
|
||||
url?: string;
|
||||
remark?: string;
|
||||
delFlag?: string;
|
||||
createId?: number;
|
||||
createTime?: string;
|
||||
updateId?: number;
|
||||
updateTime?: string;
|
||||
};
|
||||
|
||||
// 历史记录
|
||||
export type SysTempFileHistory = {
|
||||
id?: number;
|
||||
sysTempFileId?: number;
|
||||
sysFileId?: number;
|
||||
tempName?: string;
|
||||
url?: string;
|
||||
remark?: string;
|
||||
delFlag?: string;
|
||||
createId?: number;
|
||||
createTime?: string;
|
||||
};
|
@ -0,0 +1,19 @@
|
||||
import type { UploadRawFile } from 'element-plus/es/components/upload/src/upload';
|
||||
|
||||
export type UploadFile = {
|
||||
file: UploadRawFile;
|
||||
dirTag?: string;
|
||||
};
|
||||
|
||||
export type UploadResult = {
|
||||
url: string;
|
||||
filename: string;
|
||||
eTag: string;
|
||||
objectName: string;
|
||||
dirTag: string;
|
||||
contextType: string;
|
||||
size: number;
|
||||
fileId: number;
|
||||
};
|
||||
|
||||
export type IUploadResult = UploadResult | null;
|
@ -0,0 +1,74 @@
|
||||
// 登录模块
|
||||
import type { IPageQuery } from '@/api/types';
|
||||
|
||||
export type UserQuery = IPageQuery & {
|
||||
username?: string;
|
||||
phone?: string;
|
||||
accountStatusCd?: string;
|
||||
startDate?: string;
|
||||
endDate?: string;
|
||||
nickname?: string;
|
||||
deptId?: number;
|
||||
isThisDeep?: boolean;
|
||||
};
|
||||
|
||||
export type UserForm = {
|
||||
id?: number;
|
||||
username?: string;
|
||||
pwd?: string;
|
||||
phone: string;
|
||||
nickname: string;
|
||||
logo: string;
|
||||
age: number;
|
||||
sex: number;
|
||||
idCard: string;
|
||||
email: string;
|
||||
accountStatusCd: string;
|
||||
userTagCd: string;
|
||||
birthday: string;
|
||||
};
|
||||
|
||||
export type UserInfo = {
|
||||
id?: number;
|
||||
username: string;
|
||||
phone: string;
|
||||
nickname: string;
|
||||
logo: string;
|
||||
age: number;
|
||||
sex: number;
|
||||
idCard: string;
|
||||
email: string;
|
||||
accountStatusCd: string;
|
||||
userTagCd: string;
|
||||
lastLoginTime: string;
|
||||
createTime: string;
|
||||
updateTime: string;
|
||||
delFlag: string;
|
||||
birthday: string;
|
||||
};
|
||||
|
||||
export type UserRoleForm = {
|
||||
roleIds: number[];
|
||||
userId: number;
|
||||
};
|
||||
|
||||
export type UserRoleData = {
|
||||
selectIds: number[];
|
||||
roleInfoVOS: UserRoleInfo[];
|
||||
};
|
||||
|
||||
export type UserRoleInfo = {
|
||||
id: number;
|
||||
roleName: string;
|
||||
};
|
||||
|
||||
export type UserPasswordForm = {
|
||||
oldPwd: string;
|
||||
newPwd: string;
|
||||
};
|
||||
|
||||
export type UserOptions = {
|
||||
id: number;
|
||||
username: string;
|
||||
nickname: string;
|
||||
};
|
@ -0,0 +1,50 @@
|
||||
import type { IPageQuery } from '@/api/types';
|
||||
|
||||
// 查询条件
|
||||
export type TeacherStatisticsQuery = IPageQuery & {
|
||||
year?: string;
|
||||
month?: string;
|
||||
duringTime?: string;
|
||||
teacherId?: string;
|
||||
teacherCommonType?: number;
|
||||
totalTeaching?: number;
|
||||
totalClassCount?: number;
|
||||
totalHours?: number;
|
||||
checkStatus?: number;
|
||||
checkTime?: string;
|
||||
lastSyncTime?: string;
|
||||
};
|
||||
|
||||
// 编辑form表单
|
||||
export type TeacherStatisticsForm = {
|
||||
id?: number;
|
||||
year?: string;
|
||||
month?: string;
|
||||
duringTime?: string;
|
||||
teacherId?: string;
|
||||
teacherCommonType?: number;
|
||||
totalTeaching?: number;
|
||||
totalClassCount?: number;
|
||||
totalHours?: number;
|
||||
checkStatus?: number;
|
||||
checkTime?: string;
|
||||
lastSyncTime?: string;
|
||||
remark?: string;
|
||||
};
|
||||
|
||||
// list或detail返回结构
|
||||
export type TeacherStatisticsRow = {
|
||||
id?: number;
|
||||
year?: string;
|
||||
month?: string;
|
||||
duringTime?: string;
|
||||
teacherId?: string;
|
||||
teacherCommonType?: number;
|
||||
totalTeaching?: number;
|
||||
totalClassCount?: number;
|
||||
totalHours?: number;
|
||||
checkStatus?: number;
|
||||
checkTime?: string;
|
||||
lastSyncTime?: string;
|
||||
remark?: string;
|
||||
};
|
@ -0,0 +1,103 @@
|
||||
import type { IPageQuery } from '@/api/types';
|
||||
|
||||
export type GeneratorQuery = IPageQuery & {
|
||||
tableName?: string;
|
||||
tableComment?: string;
|
||||
};
|
||||
|
||||
export type GeneratorInfo = {
|
||||
tableId: number;
|
||||
tableName: string;
|
||||
tableComment: string;
|
||||
className: string;
|
||||
camelClassName: string;
|
||||
tplCategory: string;
|
||||
packageName: string;
|
||||
moduleName: string;
|
||||
businessName: string;
|
||||
functionName: string;
|
||||
functionAuthor: string;
|
||||
type: string;
|
||||
options: string;
|
||||
path: string;
|
||||
createId: number;
|
||||
createTime: string;
|
||||
updateId: number;
|
||||
updateTime: string;
|
||||
};
|
||||
|
||||
export type GeneratorForm = {
|
||||
baseInfo: GeneratorBaseInfo;
|
||||
columns: GeneratorColumnInfo[];
|
||||
generatorInfo: GeneratorGeneratorInfo;
|
||||
};
|
||||
|
||||
export type GeneratorBaseInfo = {
|
||||
tableId?: number;
|
||||
tableName: string;
|
||||
tableComment: string;
|
||||
className: string;
|
||||
functionAuthor: string;
|
||||
remark: string;
|
||||
};
|
||||
|
||||
export type GeneratorColumnInfo = {
|
||||
autofillType: string;
|
||||
columnComment: string;
|
||||
columnId: number;
|
||||
columnName: string;
|
||||
columnType: string;
|
||||
dictType: string;
|
||||
htmlType: string;
|
||||
isAutofill: string;
|
||||
isEdit: string;
|
||||
isIncrement: string;
|
||||
isInsert: string;
|
||||
isList: string;
|
||||
isLogicDel: string;
|
||||
isPk: string;
|
||||
isQuery: string;
|
||||
isRequired: string;
|
||||
isUniqueValid: string;
|
||||
javaField: string;
|
||||
javaType: string;
|
||||
javaTypePackage: string;
|
||||
options: string;
|
||||
queryType: string;
|
||||
specialPackages: string;
|
||||
tableId: number;
|
||||
upCamelField: string;
|
||||
};
|
||||
|
||||
export type GeneratorGeneratorInfo = {
|
||||
tplCategory?: string;
|
||||
packageName: string;
|
||||
moduleName: string;
|
||||
businessName: string;
|
||||
functionName: string;
|
||||
options: string;
|
||||
type: string;
|
||||
parentMenuId: string;
|
||||
hasImport: string;
|
||||
hasExport: string;
|
||||
pathApi: string;
|
||||
pathWeb: string;
|
||||
generateType: string;
|
||||
menuInitType: string;
|
||||
btnPermissionType: string;
|
||||
isAutofill: string;
|
||||
};
|
||||
|
||||
export type GeneratorPreviewInfo = {
|
||||
name: string;
|
||||
code: string;
|
||||
language: string;
|
||||
alias: string;
|
||||
};
|
||||
|
||||
export type GeneratorCheckInfo = {
|
||||
checkedApiPath: boolean;
|
||||
checkedWebPath: boolean;
|
||||
pathApi: string;
|
||||
pathWeb: string;
|
||||
};
|
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 7.6 KiB |
After Width: | Height: | Size: 7.9 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 150 KiB |
After Width: | Height: | Size: 275 KiB |
After Width: | Height: | Size: 276 B |
After Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 74 KiB |
@ -0,0 +1,123 @@
|
||||
.sliderBox {
|
||||
user-select: none;
|
||||
width: 320px;
|
||||
padding: 20px;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 0 6px rgba(0, 0, 0, 0.2); // 盒阴影增强立体感
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.sliderBox_title {
|
||||
position: relative;
|
||||
font-size: 15px;
|
||||
text-align: center; // 居中标题
|
||||
}
|
||||
|
||||
.sliderBox_refresh {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
cursor: pointer;
|
||||
color: #ffffff;
|
||||
transition: color 0.3s; // 添加过渡效果
|
||||
&:hover {
|
||||
color: #007bff; // 悬停时改变颜色
|
||||
}
|
||||
.el-icon {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 18px; // 确保图标大小一致
|
||||
}
|
||||
}
|
||||
|
||||
.sliderBox_content {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 160px;
|
||||
border: 1px solid #c6dbf5; // 使用较浅的蓝色边框
|
||||
|
||||
.bigImg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover; // 确保图片覆盖整个容器
|
||||
}
|
||||
|
||||
.smallImg {
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.btnBox {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
margin-top: 22px;
|
||||
background-color: var(--el-color-primary-light-7); // 使用Element Plus的浅色主色
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.sliderBox_text {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.sliderBox_track {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
background-color: var(--el-color-primary-light-2); // 使用浅色主色
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.sliderBox_btn {
|
||||
position: absolute;
|
||||
top: -5px;
|
||||
left: 0;
|
||||
width: 50px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
background-color: var(--el-color-primary); // 使用主色
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 0 6px #ce9f7f; // 适度阴影
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.overlay {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
background-color: rgba(0, 0, 0, 0.5); // 半透明黑色背景
|
||||
transition: background-color 0.3s; // 添加过渡效果
|
||||
&.success {
|
||||
background-color: rgba(92, 184, 92, 0.5); // 成功时的背景颜色
|
||||
}
|
||||
&.failure {
|
||||
background-color: rgba(217, 83, 79, 0.5); // 失败时的背景颜色
|
||||
}
|
||||
}
|
||||
|
||||
.sliderBox_btn {
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
outline: none;
|
||||
}
|
||||
.sliderBox_btn:active {
|
||||
background: #eee;
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
.not-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
.not-img {
|
||||
margin-right: 120px;
|
||||
}
|
||||
|
||||
.not-detail {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
h2,
|
||||
h4 {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 60px;
|
||||
color: var(--el-text-color-primary);
|
||||
}
|
||||
|
||||
h4 {
|
||||
margin: 30px 0 20px;
|
||||
font-size: 19px;
|
||||
font-weight: normal;
|
||||
color: var(--el-text-color-regular);
|
||||
}
|
||||
|
||||
.el-button {
|
||||
width: 100px;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
<template>
|
||||
<div v-show="isShow" :style="style">
|
||||
<slot />
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { computed, inject, ref, useAttrs, watch } from 'vue';
|
||||
import type { Ref } from 'vue';
|
||||
import type { BreakPoint, Responsive } from '@/components/Grid/interface';
|
||||
|
||||
defineOptions({
|
||||
name: 'GridItem'
|
||||
});
|
||||
|
||||
type Props = {
|
||||
offset?: number;
|
||||
span?: number;
|
||||
suffix?: boolean;
|
||||
xs?: Responsive;
|
||||
sm?: Responsive;
|
||||
md?: Responsive;
|
||||
lg?: Responsive;
|
||||
xl?: Responsive;
|
||||
};
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
offset: 0,
|
||||
span: 1,
|
||||
suffix: false,
|
||||
xs: undefined,
|
||||
sm: undefined,
|
||||
md: undefined,
|
||||
lg: undefined,
|
||||
xl: undefined
|
||||
});
|
||||
|
||||
const attrs = useAttrs() as { index: string };
|
||||
const isShow = ref(true);
|
||||
|
||||
// 注入断点
|
||||
const breakPoint = inject<Ref<BreakPoint>>('breakPoint', ref('xl'));
|
||||
const shouldHiddenIndex = inject('shouldHiddenIndex', ref(-1));
|
||||
watch(
|
||||
() => [shouldHiddenIndex.value, breakPoint.value],
|
||||
n => {
|
||||
if (attrs.index) {
|
||||
isShow.value = !(n[0] !== -1 && parseInt(attrs.index) >= Number(n[0]));
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
const gap = inject('gap', 0);
|
||||
const cols = inject('cols', ref(4));
|
||||
const style = computed(() => {
|
||||
let span = props[breakPoint.value]?.span ?? props.span;
|
||||
let offset = props[breakPoint.value]?.offset ?? props.offset;
|
||||
if (props.suffix) {
|
||||
return {
|
||||
gridColumnStart: cols.value - span - offset + 1,
|
||||
gridColumnEnd: `span ${span + offset}`,
|
||||
marginLeft: offset !== 0 ? `calc(((100% + ${gap}px) / ${span + offset}) * ${offset})` : 'unset'
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
gridColumn: `span ${span + offset > cols.value ? cols.value : span + offset}/span ${
|
||||
span + offset > cols.value ? cols.value : span + offset
|
||||
}`,
|
||||
marginLeft: offset !== 0 ? `calc(((100% + ${gap}px) / ${span + offset}) * ${offset})` : 'unset'
|
||||
};
|
||||
}
|
||||
});
|
||||
</script>
|
@ -0,0 +1,159 @@
|
||||
<template>
|
||||
<div :style="style">
|
||||
<slot />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watch, useSlots, computed, provide, onBeforeMount, onMounted, onUnmounted, onDeactivated, onActivated } from 'vue';
|
||||
import type { VNode, VNodeArrayChildren } from 'vue';
|
||||
import type { BreakPoint } from '@/components/Grid/interface';
|
||||
|
||||
defineOptions({
|
||||
name: 'Grid'
|
||||
});
|
||||
|
||||
type Props = {
|
||||
cols?: number | Record<BreakPoint, number>;
|
||||
collapsed?: boolean;
|
||||
collapsedRows?: number;
|
||||
gap?: [number, number] | number;
|
||||
};
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
cols: () => ({ xs: 1, sm: 2, md: 2, lg: 3, xl: 4 }),
|
||||
collapsed: false,
|
||||
collapsedRows: 1,
|
||||
gap: 0
|
||||
});
|
||||
|
||||
onBeforeMount(() => props.collapsed && findIndex());
|
||||
onMounted(() => {
|
||||
resize({ target: { innerWidth: window.innerWidth } } as unknown as Event);
|
||||
window.addEventListener('resize', resize);
|
||||
});
|
||||
onActivated(() => {
|
||||
resize({ target: { innerWidth: window.innerWidth } } as unknown as Event);
|
||||
window.addEventListener('resize', resize);
|
||||
});
|
||||
onUnmounted(() => {
|
||||
window.removeEventListener('resize', resize);
|
||||
});
|
||||
onDeactivated(() => {
|
||||
window.removeEventListener('resize', resize);
|
||||
});
|
||||
|
||||
// 监听屏幕变化
|
||||
const resize = (e: Event) => {
|
||||
let width = (e.target as Window).innerWidth;
|
||||
switch (true) {
|
||||
case width < 768:
|
||||
breakPoint.value = 'xs';
|
||||
break;
|
||||
case width >= 768 && width < 992:
|
||||
breakPoint.value = 'sm';
|
||||
break;
|
||||
case width >= 992 && width < 1200:
|
||||
breakPoint.value = 'md';
|
||||
break;
|
||||
case width >= 1200 && width < 1920:
|
||||
breakPoint.value = 'lg';
|
||||
break;
|
||||
case width >= 1920:
|
||||
breakPoint.value = 'xl';
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
// 注入 gap 间距
|
||||
provide('gap', Array.isArray(props.gap) ? props.gap[0] : props.gap);
|
||||
|
||||
// 注入响应式断点
|
||||
let breakPoint = ref<BreakPoint>('xl');
|
||||
provide('breakPoint', breakPoint);
|
||||
|
||||
// 注入要开始折叠的 index
|
||||
const hiddenIndex = ref(-1);
|
||||
provide('shouldHiddenIndex', hiddenIndex);
|
||||
|
||||
// 注入 cols
|
||||
const gridCols = computed(() => {
|
||||
if (typeof props.cols === 'object') return props.cols[breakPoint.value] ?? props.cols;
|
||||
return props.cols;
|
||||
});
|
||||
provide('cols', gridCols);
|
||||
|
||||
// 寻找需要开始折叠的字段 index
|
||||
const slots = useSlots().default!();
|
||||
|
||||
const findIndex = () => {
|
||||
let fields: VNodeArrayChildren = [];
|
||||
let suffix: VNode | null = null;
|
||||
slots.forEach((slot: any) => {
|
||||
// suffix
|
||||
if (typeof slot.type === 'object' && slot.type.name === 'GridItem' && slot.props?.suffix !== undefined) suffix = slot;
|
||||
// slot children
|
||||
if (typeof slot.type === 'symbol' && Array.isArray(slot.children)) fields.push(...slot.children);
|
||||
});
|
||||
|
||||
// 计算 suffix 所占用的列
|
||||
let suffixCols = 0;
|
||||
if (suffix) {
|
||||
suffixCols =
|
||||
((suffix as VNode).props![breakPoint.value]?.span ?? (suffix as VNode).props?.span ?? 1) +
|
||||
((suffix as VNode).props![breakPoint.value]?.offset ?? (suffix as VNode).props?.offset ?? 0);
|
||||
}
|
||||
try {
|
||||
let find = false;
|
||||
fields.reduce((prev = 0, current, index) => {
|
||||
prev +=
|
||||
((current as VNode).props![breakPoint.value]?.span ?? (current as VNode).props?.span ?? 1) +
|
||||
((current as VNode).props![breakPoint.value]?.offset ?? (current as VNode).props?.offset ?? 0);
|
||||
if (Number(prev) > props.collapsedRows * (gridCols.value as number) - suffixCols) {
|
||||
hiddenIndex.value = index;
|
||||
find = true;
|
||||
throw new Error('find it');
|
||||
}
|
||||
return prev;
|
||||
}, 0);
|
||||
if (!find) hiddenIndex.value = -1;
|
||||
} catch (error) {
|
||||
console.warn(error);
|
||||
}
|
||||
};
|
||||
|
||||
// 断点变化时 执行 findIndex
|
||||
watch(
|
||||
() => breakPoint.value,
|
||||
() => {
|
||||
if (props.collapsed) findIndex();
|
||||
}
|
||||
);
|
||||
|
||||
// 监听 collapsed
|
||||
watch(
|
||||
() => props.collapsed,
|
||||
value => {
|
||||
if (value) return findIndex();
|
||||
hiddenIndex.value = -1;
|
||||
}
|
||||
);
|
||||
|
||||
// 设置间距
|
||||
const gridGap = computed(() => {
|
||||
if (typeof props.gap === 'number') return `${props.gap}px`;
|
||||
if (Array.isArray(props.gap)) return `${props.gap[1]}px ${props.gap[0]}px`;
|
||||
return 'unset';
|
||||
});
|
||||
|
||||
// 设置 style
|
||||
const style = computed(() => {
|
||||
return {
|
||||
display: 'grid',
|
||||
gridGap: gridGap.value,
|
||||
gridTemplateColumns: `repeat(${gridCols.value}, minmax(0, 1fr))`
|
||||
};
|
||||
});
|
||||
|
||||
defineExpose({ breakPoint });
|
||||
</script>
|
@ -0,0 +1,6 @@
|
||||
export type BreakPoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
||||
|
||||
export type Responsive = {
|
||||
span?: number;
|
||||
offset?: number;
|
||||
};
|
@ -0,0 +1,116 @@
|
||||
/* 语法高亮 */
|
||||
.hljs-container {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: max-content;
|
||||
overflow-x: hidden;
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
text-align: left;
|
||||
background: #21252b;
|
||||
|
||||
.hljs-header {
|
||||
width: 100%;
|
||||
background-color: #21252b;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.hljs-wrapper {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
/** 行数样式 */
|
||||
.hljs-code-number {
|
||||
padding: 17px 10px 0;
|
||||
color: #d1d8e6;
|
||||
font-size: 12px;
|
||||
list-style: none;
|
||||
background: #21252b;
|
||||
position: sticky;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
pre {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/** 3个点 */
|
||||
.hljs-container .hljs-header::before {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 15px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
overflow: visible;
|
||||
font-weight: 700;
|
||||
font-size: 16px;
|
||||
line-height: 12px;
|
||||
white-space: nowrap;
|
||||
text-indent: 75px;
|
||||
background-color: #fc625d;
|
||||
border-radius: 16px;
|
||||
box-shadow:
|
||||
20px 0 #fdbc40,
|
||||
40px 0 #35cd4b;
|
||||
content: attr(codetype);
|
||||
}
|
||||
|
||||
/** 滚动条 */
|
||||
:deep(.hljs) {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
:deep(.hljs::-webkit-scrollbar) {
|
||||
width: 12px !important;
|
||||
height: 12px !important;
|
||||
}
|
||||
|
||||
:deep(.hljs::-webkit-scrollbar-thumb) {
|
||||
height: 30px !important;
|
||||
background: #d1d8e6;
|
||||
background-clip: content-box;
|
||||
border: 2px solid transparent;
|
||||
border-radius: 19px;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
:deep(.hljs::-webkit-scrollbar-thumb:hover) {
|
||||
background: #a5b3cf;
|
||||
background-clip: content-box;
|
||||
border: 2px solid transparent;
|
||||
}
|
||||
|
||||
:deep(.hljs::-webkit-scrollbar-track-piece) {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
background: #333;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/** 复制样式 */
|
||||
.hljs-copy {
|
||||
width: auto;
|
||||
height: 30px;
|
||||
color: #d7d7e1;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
border-radius: 4px;
|
||||
transition: background-color 0.3s;
|
||||
margin: 0 2px;
|
||||
|
||||
.sql-box {
|
||||
text-align: unset;
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
import './code.scss';
|
||||
|
||||
const vCode = {
|
||||
mounted(el: any) {
|
||||
buildLineNumber(el);
|
||||
},
|
||||
updated(el: any) {
|
||||
buildLineNumber(el);
|
||||
}
|
||||
};
|
||||
|
||||
const buildLineNumber = (el: any) => {
|
||||
//获取代码片段
|
||||
const code = el.querySelector('code.hljs');
|
||||
const pre = el.querySelector('pre');
|
||||
const html = code?.innerHTML;
|
||||
const size = html.split('\n').length;
|
||||
const codeNumber = el.querySelector('.hljs-code-number');
|
||||
if (codeNumber) {
|
||||
el.removeChild(codeNumber);
|
||||
}
|
||||
//插入行数
|
||||
const ul = document.createElement('ul');
|
||||
for (let i = 1; i <= size; i++) {
|
||||
const li = document.createElement('li');
|
||||
li.innerText = i + '';
|
||||
ul.appendChild(li);
|
||||
}
|
||||
|
||||
ul.classList.add('hljs-code-number');
|
||||
|
||||
// 确保 pre 是 el 的子元素后再进行插入
|
||||
if (pre && pre.parentNode === el) {
|
||||
el.insertBefore(ul, pre);
|
||||
}
|
||||
};
|
||||
|
||||
export default vCode;
|
@ -0,0 +1,197 @@
|
||||
<template>
|
||||
<div class="choose-container">
|
||||
<el-input ref="refInput" v-model="internalValue" v-bind="$attrs" readonly @input="changeValue" @click="showPopover">
|
||||
<template #prepend>
|
||||
<el-icon size="30">
|
||||
<SvgIcon v-if="internalValue.startsWith('svg-')" :name="internalValue.substring(4)" />
|
||||
<component v-else-if="internalValue" :is="internalValue" />
|
||||
</el-icon>
|
||||
</template>
|
||||
</el-input>
|
||||
|
||||
<div ref="chooseDialogRef" class="choose-wrap" :class="{ show: isShow }">
|
||||
<el-input v-model="search" class="w-50 m-2" placeholder="搜索图标" :prefix-icon="Search" />
|
||||
|
||||
<el-tabs v-model="activeTab">
|
||||
<el-tab-pane label="Element" name="element">
|
||||
<el-scrollbar max-height="280">
|
||||
<div class="choose-box">
|
||||
<div class="choose-item" v-for="item in filteredElementIcons" :key="item">
|
||||
<div @click="chooseIcon(item)">
|
||||
<el-icon size="30">
|
||||
<component :is="item" />
|
||||
</el-icon>
|
||||
{{ item }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="Svg" name="svg">
|
||||
<el-scrollbar max-height="280">
|
||||
<div class="choose-box">
|
||||
<div class="choose-item" v-for="item in filteredSvgIcons" :key="item">
|
||||
<div @click="chooseIcon(item)">
|
||||
<el-icon size="30">
|
||||
<SvgIcon :name="item.substring(4)" />
|
||||
</el-icon>
|
||||
{{ item }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, ref } from 'vue';
|
||||
// element icons
|
||||
import * as Icons from '@element-plus/icons-vue';
|
||||
import { Search } from '@element-plus/icons-vue';
|
||||
import SvgIcon from '@/components/SvgIcon/index.vue';
|
||||
import { onClickOutside } from '@vueuse/core';
|
||||
|
||||
defineOptions({
|
||||
name: 'IconChoose'
|
||||
});
|
||||
type Props = {
|
||||
modelValue: string;
|
||||
};
|
||||
const props = defineProps<Props>();
|
||||
const emits = defineEmits<{
|
||||
'update:modelValue': [string];
|
||||
}>();
|
||||
|
||||
const internalValue = ref(props.modelValue);
|
||||
|
||||
const changeValue = () => {
|
||||
emits('update:modelValue', internalValue.value);
|
||||
};
|
||||
|
||||
const activeTab = ref('element');
|
||||
|
||||
// 图标搜索
|
||||
const search = ref('');
|
||||
const elementIcons = Object.keys(Icons).map(key => {
|
||||
return Icons[key as keyof typeof Icons].name;
|
||||
});
|
||||
|
||||
const svgIcons: string[] = [];
|
||||
const svgIconsFiles = import.meta.glob('@/assets/icons/**/*.svg');
|
||||
for (const key in svgIconsFiles) {
|
||||
const matchArray = key.match(/\/assets\/icons\/([^/]+)\.svg$/);
|
||||
if (matchArray && matchArray.length >= 2) {
|
||||
svgIcons.push(`svg-${matchArray[1]}`);
|
||||
}
|
||||
}
|
||||
|
||||
// 过滤图标
|
||||
const filteredElementIcons = computed(() => {
|
||||
return elementIcons.filter(item => item.toLowerCase().includes(search.value.toLowerCase()));
|
||||
});
|
||||
|
||||
const filteredSvgIcons = computed(() => {
|
||||
return svgIcons.filter(item => item.toLowerCase().includes(search.value.toLowerCase()));
|
||||
});
|
||||
|
||||
/**
|
||||
* 弹窗
|
||||
*/
|
||||
const isShow = ref(false);
|
||||
|
||||
/**
|
||||
* 显示
|
||||
*/
|
||||
const showPopover = () => {
|
||||
isShow.value = true;
|
||||
};
|
||||
|
||||
/**
|
||||
* 隐藏
|
||||
*/
|
||||
const hidePopover = () => {
|
||||
isShow.value = false;
|
||||
};
|
||||
|
||||
// 弹窗外部触发
|
||||
const chooseDialogRef = ref(null);
|
||||
onClickOutside(chooseDialogRef, () => {
|
||||
if (isShow.value) {
|
||||
hidePopover();
|
||||
}
|
||||
});
|
||||
|
||||
const chooseIcon = (name: string) => {
|
||||
hidePopover();
|
||||
internalValue.value = name;
|
||||
emits('update:modelValue', name);
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.choose-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
|
||||
.choose-wrap {
|
||||
position: absolute;
|
||||
margin-top: 6px;
|
||||
padding: 10px;
|
||||
z-index: 100;
|
||||
border: 1px solid #e4e7ed;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 0 12px rgb(0 0 0 / 5%);
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
opacity: 0;
|
||||
overflow: hidden;
|
||||
transition:
|
||||
height 0.3s,
|
||||
opacity 0.3s;
|
||||
box-sizing: border-box;
|
||||
|
||||
&.show {
|
||||
opacity: 1;
|
||||
height: 400px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.choose-box {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin: 0 10px;
|
||||
|
||||
.choose-item {
|
||||
width: 25%;
|
||||
padding: 5px;
|
||||
box-sizing: border-box;
|
||||
|
||||
> div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 5px;
|
||||
border: 1px solid rgba(204, 204, 204, 0.5);
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
> div {
|
||||
border-color: rgba(0, 150, 136, 0.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.close-box {
|
||||
position: absolute;
|
||||
top: -15px;
|
||||
right: -15px;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,3 @@
|
||||
.upload {
|
||||
width: 80%;
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
.loading-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
.loading-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 98px;
|
||||
}
|
||||
}
|
||||
|
||||
.dot {
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
font-size: 32px;
|
||||
transform: rotate(45deg);
|
||||
animation: ant-rotate 1.2s infinite linear;
|
||||
}
|
||||
|
||||
.dot i {
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
background-color: var(--el-color-primary);
|
||||
border-radius: 100%;
|
||||
opacity: 0.3;
|
||||
transform: scale(0.75);
|
||||
transform-origin: 50% 50%;
|
||||
animation: ant-spin-move 1s infinite linear alternate;
|
||||
}
|
||||
|
||||
.dot i:nth-child(1) {
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.dot i:nth-child(2) {
|
||||
top: 0;
|
||||
right: 0;
|
||||
animation-delay: 0.4s;
|
||||
}
|
||||
|
||||
.dot i:nth-child(3) {
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
animation-delay: 0.8s;
|
||||
}
|
||||
|
||||
.dot i:nth-child(4) {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
animation-delay: 1.2s;
|
||||
}
|
||||
|
||||
@keyframes ant-rotate {
|
||||
to {
|
||||
transform: rotate(405deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes ant-spin-move {
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
<template>
|
||||
<div class="loading-box">
|
||||
<div class="loading-wrap">
|
||||
<span class="dot dot-spin"><i /><i /><i /><i /></span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
defineOptions({
|
||||
name: 'Loading'
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@use './index';
|
||||
</style>
|