This commit is contained in:
吴红兵
2025-12-02 10:37:49 +08:00
commit 1f645dad3e
1183 changed files with 147673 additions and 0 deletions

View File

@@ -0,0 +1,126 @@
---
description:
globs:
alwaysApply: false
---
# AI Agent Protocol: Self-Contained Mandatory Interactive Final Review Loop with Auto-Script Creation (Version 3)
## 0. User Advisory & Safety:
This is an advanced, experimental rule. It instructs the AI Agent to check for, potentially create, and then execute a Python script (`final_review_gate.py`) in your project's root directory to facilitate an interactive review loop. By using this rule, you acknowledge that the AI will attempt file system operations (read, write, execute) as directed. Ensure the AI's execution environment has appropriate permissions if you expect script auto-creation to work, and be aware of the security implications.
## 1. Core Principle & Context:
Your primary task processing includes a **mandatory final interactive review stage** driven by user input through a specific Python script (`final_review_gate.py`). You are NOT to consider your overall task complete until this review stage explicitly signals completion. This protocol leverages your known capability to run commands in a sub-terminal (displayed within the chat interface) and read their output.
## Phase 0: Ensure `final_review_gate.py` Script Exists
(This phase is executed ONCE per user request that triggers this overall protocol, or if the script is missing or its content is incorrect.)
1. **Define Script Details:**
* **Script Name:** `final_review_gate.py`
* **Target Location:** Directly in the root of the current project/workspace.
* **Python Script Content (ensure this exact content is used):**
```python
# final_review_gate.py
import sys
import os
if __name__ == "__main__":
# Try to make stdout unbuffered for more responsive interaction.
# This might not work on all platforms or if stdout is not a TTY,
# but it's a good practice for this kind of interactive script.
try:
sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', buffering=1)
except Exception:
pass # Ignore if unbuffering fails, e.g., in certain environments
try:
sys.stderr = os.fdopen(sys.stderr.fileno(), 'w', buffering=1)
except Exception:
pass # Ignore
print("--- FINAL REVIEW GATE ACTIVE ---", flush=True)
print("AI has completed its primary actions. Awaiting your review or further sub-prompts.", flush=True)
print("Type your sub-prompt, or one of: 'TASK_COMPLETE', 'Done', 'Quit', 'q' to signal completion.", flush=True) # MODIFIED
active_session = True
while active_session:
try:
# Signal that the script is ready for input.
# The AI doesn't need to parse this, but it's good for user visibility.
print("REVIEW_GATE_AWAITING_INPUT:", end="", flush=True)
line = sys.stdin.readline()
if not line: # EOF
print("--- REVIEW GATE: STDIN CLOSED (EOF), EXITING SCRIPT ---", flush=True)
active_session = False
break
user_input = line.strip()
# Check for exit conditions
if user_input.upper() in ['TASK_COMPLETE', 'DONE', 'QUIT', 'Q']: # MODIFIED: Empty string no longer exits
print(f"--- REVIEW GATE: USER SIGNALED COMPLETION WITH '{user_input.upper()}' ---", flush=True)
active_session = False
break
elif user_input: # If there's any other non-empty input (and not a completion command)
# This is the critical line the AI will "listen" for.
print(f"USER_REVIEW_SUB_PROMPT: {user_input}", flush=True)
# If user_input was empty (and not a completion command),
# the loop simply continues, and "REVIEW_GATE_AWAITING_INPUT:" will be printed again.
except KeyboardInterrupt:
print("--- REVIEW GATE: SESSION INTERRUPTED BY USER (KeyboardInterrupt) ---", flush=True)
active_session = False
break
except Exception as e:
print(f"--- REVIEW GATE SCRIPT ERROR: {e} ---", flush=True)
active_session = False
break
print("--- FINAL REVIEW GATE SCRIPT EXITED ---", flush=True)
```
2. **Ensure Script Existence and Correctness:**
a. Use your file system tools to check if the file `final_review_gate.py` exists in the project root.
b. **If the file `final_review_gate.py` does NOT exist OR if its content does not EXACTLY match the Python script provided in section "Phase 0.1.Python Script Content" (you may need to read the existing file and compare):**
i. You MUST create or overwrite the `final_review_gate.py` file in the project root.
ii. The content of this file MUST be *exactly* the Python script content provided above. Ensure all indentation, comments, and lines are preserved perfectly. Use your "create file" or "edit file" tool.
iii. After creating/overwriting it, announce: "The `final_review_gate.py` script has been created/updated in the project root with the latest interaction enhancements."
c. **If the file `final_review_gate.py` already exists and its content is correct:** You may skip announcing its creation.
d. If you encounter any errors checking for, reading, or creating/writing the file (e.g., permission issues), you MUST report this to the user. State clearly: "Error managing `final_review_gate.py`: [specific error]. Cannot proceed with interactive review." and then conclude the interaction for the main task as best as you can without this interactive step.
## Phase 1: Primary Task Execution
1. Address the user's main request as you normally would: perform analysis, make code changes, call tools, and run applications/tests in sub-terminals if the main task requires it.
* **Application Execution Confirmation:** Before attempting to run an entire application (e.g., a web server, a full front-end build, a long-running background process), you MUST ask the user for explicit confirmation. For example: "I am about to run the [application name/command]. Is it okay to proceed, or is it possibly already running?"
* This confirmation is NOT required for running individual test scripts, linters, build tools for specific components, or other non-application-level commands necessary for task completion.
* If the user indicates an application is already running or denies permission, adapt your strategy accordingly (e.g., focus on tests or specific file executions).
2. Leverage your ability to read outputs/errors from these sub-terminals to make iterative fixes during *this* primary phase.
## Phase 2: Mandatory Final Interactive Review Script Execution
1. **Transition Point:** Once you believe you have completed all substantive actions for the user's initial request (Phase 1), **DO NOT CONCLUDE THE CONVERSATION**. You MUST now transition to this Final Interactive Review phase.
2. **Action:** Execute the `final_review_gate.py` script (which you ensured exists and is correct in Phase 0) from the project root.
* Determine the correct Python interpreter command (e.g., `python`, `python3`) available in the execution environment. A robust command attempt would be `python3 ./final_review_gate.py` and if that fails, try `python ./final_review_gate.py`.
* **Crucially, the terminal for this script MUST run directly within the chat window, and its output MUST be continuously visible to the user as it is generated.** It must NOT pop open as a separate window or run hidden in the background. You MUST wait for the script (and its terminal interaction) to fully complete and exit before you proceed with any further actions or attempt to conclude the overall task. Your processing will be blocked by this script's execution.
3. **Announcement:** Clearly inform the user: "I have completed the primary actions. Now initiating the mandatory Final Interactive Review by running `./final_review_gate.py`. The review terminal is now active **in this chat window, and its output will be displayed live**. Please provide any sub-prompts directly into that script's input area, or type 'TASK_COMPLETE', 'Done', 'Quit', or 'q' when satisfied." (MODIFIED: Removed "or simply press Enter")
## Phase 3: Interactive Review Loop (Monitoring Script Output)
1. **Active Monitoring & Display:** Continuously monitor the standard output (stdout) of the launched `final_review_gate.py` script **as it appears live in the chat window**. Ensure the user sees all script output, including the `REVIEW_GATE_AWAITING_INPUT:` prompt. You will "read" its output using the same capability that allows you to read terminal logs or error messages. The script will loop and re-prompt if an empty input is given.
2. **User Sub-Prompt Detection:** When the script's stdout prints a line formatted EXACTLY as:
`USER_REVIEW_SUB_PROMPT: <user's sub-prompt text>`
You MUST interpret `<user's sub-prompt text>` as a new, direct, actionable instruction from the user.
3. **Processing Sub-Prompts:**
a. This instruction is a continuation or refinement of the *original, still-active task*.
b. Analyze the sub-prompt. Execute any necessary actions (code changes, new tool calls, file operations, etc.). **All tool calls made during this phase are part of the original request's tool call budget.** If the sub-prompt requests running an entire application, the confirmation principle from "Phase 1, Step 1 (Application Execution Confirmation)" applies.
c. Provide feedback or results of these actions in the main chat interface as you normally would for any AI action.
d. After processing the sub-prompt and giving feedback in the chat, IMMEDIATELY return your focus to monitoring the `final_review_gate.py` script's terminal output (which remains live and visible in the chat) for the next user instruction or completion signal. This loop is critical.
4. **Completion Signal Detection:** The interactive review loop continues until the script's stdout (visible in the chat window) prints a line containing:
* `--- REVIEW GATE: USER SIGNALED COMPLETION WITH 'TASK_COMPLETE' ---` (or 'DONE', 'QUIT', 'Q' as per script logic)
* OR `--- FINAL REVIEW GATE SCRIPT EXITED ---` (or any other script exit/error message like `REVIEW GATE: STDIN CLOSED` or `REVIEW GATE SCRIPT ERROR:`)
(MODIFIED: Removed specific "EMPTY INPUT RECEIVED" as a completion signal, as the script no longer behaves this way for completion.)
## Phase 4: True Task Conclusion
1. Only after the `final_review_gate.py` script has terminated (as observed by its terminal session in the chat window closing and its final exit messages being printed and visible) are you permitted to consider the user's original request fully satisfied.
2. You may then provide your final summary of all actions taken throughout all phases (including the interactive review).
## Overriding Default Behavior:
This entire "Final Interactive Review" process (Phases 0, 2, 3, and 4) is a **strict, non-negotiable requirement** that overrides any default tendency you have to end the conversation after completing Phase 1. The task is only finished when the user explicitly confirms with one of the specified keywords through the review script or the script otherwise terminates due to an error or EOF (as per the defined behavior, including the in-chat, blocking, and continuously visible terminal execution). Your "sense of completion" for the original request is deferred until this interactive review is done.

View File

@@ -0,0 +1,8 @@
---
description: Best practices for Axios HTTP requests
globs: *.ts,*.vue
alwaysApply: false
---
- Refer to `src/api/admin/audit.ts` as a template to make an API call with the same effect
- The API method must be called using the synchronous syntax await, and then the result is deconstructed
- All axios call logic needs to be placed in `src/api`

View File

@@ -0,0 +1,10 @@
---
description: Best practices for Daisy UI
globs: *.vue
alwaysApply: false
---
- Use Daisy UI classes for consistent theming
- All colors and themes should be consistent with the overall UI element-plus. Please refer to `src/theme/element.scss`
- Implement Daisy UI buttons and form controls for UI consistency
- Customize themes using Daisy UI's theme system
- Ensure responsive design with Daisy UI's responsive classes

View File

@@ -0,0 +1,9 @@
---
description: Best practices for using Element Plus components
globs: *.vue
alwaysApply: false
---
- Use Element Plus components for rich UI functionality
- Implement proper form validation with Element Plus forms
- Customize Element Plus themes using SCSS variables
- Utilize Element Plus's built-in internationalization support

View File

@@ -0,0 +1,11 @@
---
description:
globs:
alwaysApply: true
---
# MCP Interactive Feedback 规则
1. 在任何流程、任务、对话进行时,无论是询问、回复、或完成阶段性任务,皆必须调用 MCP mcp-feedback-enhanced。
2. 每当收到用户反馈,若反馈内容非空,必须再次调用 MCP mcp-feedback-enhanced并根据反馈内容调整行为。
3. 仅当用户明确表示「结束」或「不再需要交互」时,才可停止调用 MCP mcp-feedback-enhanced流程才算结束。
4. 除非收到结束指令,否则所有步骤都必须重复调用 MCP mcp-feedback-enhanced。

View File

@@ -0,0 +1,9 @@
---
description: Best practices for state management with Pinia
globs: src/stores/*.ts
alwaysApply: false
---
- Use Pinia stores for global state management
- Implement getters for computed state
- Use actions for side effects and asynchronous operations
- Utilize `defineStore` with `id` for better store organization

View File

@@ -0,0 +1,9 @@
---
description: Best practices for Tailwind CSS
globs: *.vue
alwaysApply: false
---
- Implement responsive design with Tailwind's responsive modifiers
- All colors and themes should be consistent with the overall UI element-plus. Please refer to `src/theme/element.scss`
- Customize Tailwind's default theme using `tailwind.config.js`
- Use `@apply` directive for component-level styling

View File

@@ -0,0 +1,10 @@
---
description: TypeScript coding standards and type safety guidelines
globs: *.vue,*.ts
alwaysApply: false
---
- Use strict null checks for better type safety
- Prefer interfaces over types for object shapes
- Use type guards and assertions for runtime type checking
- Implement proper type inference for cleaner code
- Use enums for a set of named constants

View File

@@ -0,0 +1,10 @@
---
description: Best practices for Vue 3 applications
globs: *.vue
alwaysApply: false
---
- Use Vue3 Composition API for better code organization and reusability
- Components should be automatically split into multiple small components that are easy to maintain
- parseTime/parseDate/baseURL are global properties and can be used directly
- Leverage Vue's built-in directives like `v-model` for form handling
- Implement proper error handling with `try/catch` in component setup

View File

@@ -0,0 +1,10 @@
---
description: Best practices for Vue I18n internationalization
globs: *.vue,*.ts
alwaysApply: false
---
- Use Vue I18n for managing translations
- Use `const { t } = useI18n()` in Vue components to use t('area.areaType') as a placeholder
- The global I18N translation files are in `src/i18n`
- The Chinese and English I18N file names use 'zh-cn.ts' and' en.ts' and save them in the 'i18n' folder in the current directory
- The key values in the language file are named by the hump

View File

@@ -0,0 +1,9 @@
---
description: Best practices for Vue Router 4 configuration and usage
globs: src/router/*.ts
alwaysApply: false
---
- Use named routes for better maintainability
- Implement route-level code-splitting for performance
- Use navigation guards for route protection and redirection
- Leverage route meta fields for additional route information

View File

@@ -0,0 +1,8 @@
---
description: Best practices for using VueUse composables
globs: *.ts,*.vue
alwaysApply: false
---
- Use VueUse composables to enhance reactivity and performance
- Consider reusing existing utility classes including vueuse to avoid duplication of code
- The current tool package is in `src/utils/*.ts`

59
.env Normal file
View File

@@ -0,0 +1,59 @@
# 网站主标题
VITE_GLOBAL_TITLE= 'PIGX AI'
# footer
VITE_FOOTER_TITLE= '©2025 pig4cloud.com'
# 是否是微服务架构(重要)
VITE_IS_MICRO= true
# 前端访问前缀
VITE_PUBLIC_PATH = /
# 后端请求前缀
VITE_API_URL = /api
# ADMIN 服务地址
VITE_ADMIN_PROXY_PATH = http://localhost:9999
# 前端加密密钥
VITE_PWD_ENC_KEY='pigxpigxpigxpigx'
# OAUTH2 密码模式客户端信息
VITE_OAUTH2_PASSWORD_CLIENT='pig:pig'
# OAUTH2 短信客户端信息
VITE_OAUTH2_MOBILE_CLIENT='app:app'
# OAUTH2 社交登录客户端信息
VITE_OAUTH2_SOCIAL_CLIENT='social:social'
# 是否开启前端滑块验证码
VITE_VERIFY_ENABLE = true
# 是否开启前端图形验证码
VITE_VERIFY_IMAGE_ENABLE = false
# 是否开启websocket 消息接受,
VITE_WEBSOCKET_ENABLE = false
# 是否开启JsonFlow 消息接受,
VITE_JSON_FLOW_ENABLE = true
# 是否开启注册
VITE_REGISTER_ENABLE = true
# 是否开启租户自动选择 (根据租户域名)
VITE_AUTO_TENANT = false
# 是否开启多语言切换
VITE_I18N_ENABLE = true
# 是否开启暗黑模式切换
VITE_DARK_MODE_ENABLE = true
# 是否启用禁用浏览器调试功能(反爬)
VITE_ENABLE_ANTI_DEBUG=false
# 绕过反爬参数值 url?ddtk=参数值
VITE_ANTI_DEBUG_KEY=pig

11
.env.development Normal file
View File

@@ -0,0 +1,11 @@
# port 端口号
VITE_PORT = 8888
#浏览器自动打开
VITE_OPEN = true
# 本地环境
ENV = 'development'
# ADMIN 服务地址
VITE_ADMIN_PROXY_PATH = http://localhost:9999

18
.eslintignore Normal file
View File

@@ -0,0 +1,18 @@
*.sh
node_modules
lib
*.md
*.scss
*.woff
*.ttf
.vscode
.idea
dist
mock
public
bin
build
config
index.html
src/assets

78
.eslintrc.js Normal file
View File

@@ -0,0 +1,78 @@
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
node: true,
},
parser: 'vue-eslint-parser',
parserOptions: {
ecmaVersion: 12,
parser: '@typescript-eslint/parser',
sourceType: 'module',
},
extends: ['plugin:vue/vue3-essential', 'plugin:vue/essential', 'eslint:recommended'],
plugins: ['vue', '@typescript-eslint'],
overrides: [
{
files: ['*.ts', '*.tsx', '*.vue'],
rules: {
'no-undef': 'off',
},
},
],
rules: {
// http://eslint.cn/docs/rules/
// https://eslint.vuejs.org/rules/
// https://typescript-eslint.io/rules/no-unused-vars/
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-redeclare': 'error',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
'@typescript-eslint/no-unused-vars': [2],
'vue/custom-event-name-casing': 'off',
'vue/attributes-order': 'off',
'vue/one-component-per-file': 'off',
'vue/html-closing-bracket-newline': 'off',
'vue/max-attributes-per-line': 'off',
'vue/multiline-html-element-content-newline': 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/attribute-hyphenation': 'off',
'vue/html-self-closing': 'off',
'vue/no-multiple-template-root': 'off',
'vue/require-default-prop': 'off',
'vue/no-v-model-argument': 'off',
'vue/no-arrow-functions-in-watch': 'off',
'vue/no-template-key': 'off',
'vue/no-v-html': 'off',
'vue/comment-directive': 'off',
'vue/no-mutating-props': 'off',
'vue/no-parsing-error': 'off',
'vue/no-deprecated-v-on-native-modifier': 'off',
'vue/multi-word-component-names': 'off',
'no-useless-escape': 'off',
'no-sparse-arrays': 'off',
'no-prototype-builtins': 'off',
'no-constant-condition': 'off',
'no-use-before-define': 'off',
'no-restricted-globals': 'off',
'no-restricted-syntax': 'off',
'generator-star-spacing': 'off',
'no-unreachable': 'off',
'no-multiple-template-root': 'off',
'no-unused-vars': 'error',
'no-v-model-argument': 'off',
'no-case-declarations': 'off',
'no-console': 'error',
'no-redeclare': 'off',
'no-mixed-spaces-and-tabs': 'off',
},
};

33
.gitignore vendored Normal file
View File

@@ -0,0 +1,33 @@
.DS_Store
node_modules
/dist
dist.zip
docker/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
# lock
package-lock.json
yarn.lock
pnpm-lock.yaml
# cursor review
final_review_gate.py

39
.prettierrc.js Normal file
View File

@@ -0,0 +1,39 @@
module.exports = {
// 一行最多多少个字符
printWidth: 150,
// 指定每个缩进级别的空格数
tabWidth: 2,
// 使用制表符而不是空格缩进行
useTabs: true,
// 在语句末尾打印分号
semi: true,
// 使用单引号而不是双引号
singleQuote: true,
// 更改引用对象属性的时间 可选值"<as-needed|consistent|preserve>"
quoteProps: 'as-needed',
// 在JSX中使用单引号而不是双引号
jsxSingleQuote: false,
// 多行时尽可能打印尾随逗号。(例如,单行数组永远不会出现逗号结尾。) 可选值"<none|es5|all>"默认none
trailingComma: 'es5',
// 在对象文字中的括号之间打印空格
bracketSpacing: true,
// jsx 标签的反尖括号需要换行
jsxBracketSameLine: false,
// 在单独的箭头函数参数周围包括括号 always(x) => x \ avoidx => x
arrowParens: 'always',
// 这两个选项可用于格式化以给定字符偏移量(分别包括和不包括)开始和结束的代码
rangeStart: 0,
rangeEnd: Infinity,
// 指定要使用的解析器,不需要写文件开头的 @prettier
requirePragma: false,
// 不需要自动在文件开头插入 @prettier
insertPragma: false,
// 使用默认的折行标准 always\never\preserve
proseWrap: 'preserve',
// 指定HTML文件的全局空格敏感度 css\strict\ignore
htmlWhitespaceSensitivity: 'css',
// Vue文件脚本和样式标签缩进
vueIndentScriptAndStyle: false,
// 换行符使用 lf 结尾是 可选值"<auto|lf|crlf|cr>"
endOfLine: 'lf',
};

73
auto-imports.d.ts vendored Normal file
View File

@@ -0,0 +1,73 @@
// Generated by 'unplugin-auto-import'
export {}
declare global {
const EffectScope: typeof import('vue')['EffectScope']
const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate']
const computed: typeof import('vue')['computed']
const createApp: typeof import('vue')['createApp']
const createPinia: typeof import('pinia')['createPinia']
const customRef: typeof import('vue')['customRef']
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
const defineComponent: typeof import('vue')['defineComponent']
const defineStore: typeof import('pinia')['defineStore']
const effectScope: typeof import('vue')['effectScope']
const getActivePinia: typeof import('pinia')['getActivePinia']
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
const getCurrentScope: typeof import('vue')['getCurrentScope']
const h: typeof import('vue')['h']
const inject: typeof import('vue')['inject']
const isProxy: typeof import('vue')['isProxy']
const isReactive: typeof import('vue')['isReactive']
const isReadonly: typeof import('vue')['isReadonly']
const isRef: typeof import('vue')['isRef']
const mapActions: typeof import('pinia')['mapActions']
const mapGetters: typeof import('pinia')['mapGetters']
const mapState: typeof import('pinia')['mapState']
const mapStores: typeof import('pinia')['mapStores']
const mapWritableState: typeof import('pinia')['mapWritableState']
const markRaw: typeof import('vue')['markRaw']
const nextTick: typeof import('vue')['nextTick']
const onActivated: typeof import('vue')['onActivated']
const onBeforeMount: typeof import('vue')['onBeforeMount']
const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave']
const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate']
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
const onDeactivated: typeof import('vue')['onDeactivated']
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
const onMounted: typeof import('vue')['onMounted']
const onRenderTracked: typeof import('vue')['onRenderTracked']
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
const onScopeDispose: typeof import('vue')['onScopeDispose']
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
const onUnmounted: typeof import('vue')['onUnmounted']
const onUpdated: typeof import('vue')['onUpdated']
const provide: typeof import('vue')['provide']
const reactive: typeof import('vue')['reactive']
const readonly: typeof import('vue')['readonly']
const ref: typeof import('vue')['ref']
const resolveComponent: typeof import('vue')['resolveComponent']
const resolveDirective: typeof import('vue')['resolveDirective']
const setActivePinia: typeof import('pinia')['setActivePinia']
const setMapStoreSuffix: typeof import('pinia')['setMapStoreSuffix']
const shallowReactive: typeof import('vue')['shallowReactive']
const shallowReadonly: typeof import('vue')['shallowReadonly']
const shallowRef: typeof import('vue')['shallowRef']
const storeToRefs: typeof import('pinia')['storeToRefs']
const toRaw: typeof import('vue')['toRaw']
const toRef: typeof import('vue')['toRef']
const toRefs: typeof import('vue')['toRefs']
const triggerRef: typeof import('vue')['triggerRef']
const unref: typeof import('vue')['unref']
const useAttrs: typeof import('vue')['useAttrs']
const useCssModule: typeof import('vue')['useCssModule']
const useCssVars: typeof import('vue')['useCssVars']
const useLink: typeof import('vue-router')['useLink']
const useRoute: typeof import('vue-router')['useRoute']
const useRouter: typeof import('vue-router')['useRouter']
const useSlots: typeof import('vue')['useSlots']
const watch: typeof import('vue')['watch']
const watchEffect: typeof import('vue')['watchEffect']
const watchPostEffect: typeof import('vue')['watchPostEffect']
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
}

9
docker/Dockerfile Normal file
View File

@@ -0,0 +1,9 @@
FROM registry.cn-hangzhou.aliyuncs.com/dockerhub_mirror/nginx
COPY ./dist /data
RUN rm /etc/nginx/conf.d/default.conf
ADD cloud-ui.conf /etc/nginx/conf.d/default.conf
RUN /bin/bash -c 'echo init ok'

44
docker/cloud-ui.conf Normal file
View File

@@ -0,0 +1,44 @@
server_tokens off; # Nginx 版本信息关闭,避免攻击
client_max_body_size 64m; # 最大上传文件大小!
server {
listen 80;
server_name localhost;
gzip on;
gzip_static on; # 需要http_gzip_static_module 模块
gzip_min_length 1k;
gzip_comp_level 4;
gzip_proxied any;
gzip_types text/plain text/xml text/css;
gzip_vary on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
# 前端打包好的dist目录文件
root /data/;
location ^~/api/ {
proxy_pass http://cloud-gateway:9999/; #注意/后缀
proxy_connect_timeout 60s;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
proxy_set_header from "";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto http;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header from "";
# 取消缓冲,确保数据实时传输到客户端
proxy_buffering off;
proxy_cache off;
chunked_transfer_encoding off;
}
# 屏蔽所有敏感路径,不用改代码配置开关,双重保护
location ~* ^/(actuator|swagger-ui|v3/api-docs|swagger-resources|webjars|doc.html) {
return 403; # 禁止访问
}
}

View File

@@ -0,0 +1,19 @@
version: '3'
services:
cloud-ui:
build:
context: .
restart: always
container_name: cloud-ui
image: cloud-ui
networks:
- spring_cloud_default
external_links:
- cloud-gateway
ports:
- 80:80
# 加入到后端网络, 默认为 cloud_default | docker network ls 查看
networks:
spring_cloud_default:
external: true

28
index.html Normal file
View File

@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta
name="keywords"
content="
微服务,pig开发平台,oauth2,微服务框架,java微服务框架,微服务开发框架,微服务治理框架,开源微服务框架,微服务器框架,微服务框架图,微服务快速开发框架,微服务java框架,微服务开源框架,微服务开源框架,微服务架构框架,微服务基础框架,微服务常见框架,主流微服务框架,微服务框架搭建,java主流微服务框架,java微服务开发框架,微服务前端框架,Spring
Boot,Spring Cloud,Spring"
/>
<meta
name="description"
content="PIG应用微服务、容器、DevOps等云原生技术封装了大量技术开发包、技术应用组件、技术场景实现能力并支持SaaS模式应用提供了一个可支持企业各业务系统或产品快速开发实现的微服务应用数字化融合平台富含各类开箱即用的组件、微服务业务系统助力企业跨越CloudIaaS/PaaS与自身数字化的鸿沟共享业务服务的组合重用为企业服务化中台整合、数字化转型提供强力支撑也为企业提供了最佳架构实践。"
/>
<!--避免微信管理防盗链机制-->
<meta name="referrer" content="no-referrer"/>
<link rel="icon" href="/favicon.ico"/>
<title>PIGX 微服务快速开发平台</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>

128
package.json Normal file
View File

@@ -0,0 +1,128 @@
{
"name": "cloud-ui",
"version": "5.9.0",
"description": "PIGCLOUD微服务开发平台",
"author": "pig4cloud",
"license": "不对外分发 pig4cloud 版权所有,请购买商业版权",
"scripts": {
"dev": "vite --force",
"build": "cross-env NODE_OPTIONS=--max-old-space-size=8192 vite build",
"build:docker": "cross-env NODE_OPTIONS=--max-old-space-size=8192 vite build --outDir ./docker/dist/",
"lint:eslint": "eslint --fix --ext .js,.ts,.vue ./src",
"prettier": "prettier --write ."
},
"dependencies": {
"@axolo/json-editor-vue": "^0.3.2",
"@chenfengyuan/vue-qrcode": "^2.0.0",
"@element-plus/icons-vue": "^2.0.10",
"@jackrolling/jsonflow3": "2.3.0",
"@tinymce/tinymce-vue": "^4.0.5",
"@form-create/element-ui": "3.2.20",
"@microsoft/fetch-event-source": "^2.0.1",
"@popperjs/core": "2.11.8",
"@vue-office/docx": "1.6.3",
"@vueuse/core": "^10.4.1",
"@wangeditor/editor": "5.1.23",
"@wangeditor/editor-for-vue": "5.1.12",
"aurora-editor": "1.0.3",
"autoprefixer": "^10.4.7",
"axios": "^1.3.3",
"cherry-markdown": "0.8.58",
"codemirror": "5.65.5",
"crypto-js": "^3.1.9-1",
"disable-devtool": "^0.3.8",
"driver.js": "^0.9.8",
"echarts": "^5.4.1",
"element-plus": "2.5.5",
"form-create-designer": "3.2.11-oem",
"highlight.js": "^11.7.0",
"html-to-image": "^1.11.13",
"js-base64": "^3.7.7",
"js-cookie": "^3.0.1",
"json-editor-vue3": "^1.1.1",
"jsplumb": "2.15.6",
"lodash": "^4.17.21",
"marked": "^12.0.2",
"markmap-common": "0.15.6",
"markmap-lib": "0.15.8",
"markmap-view": "0.15.8",
"mitt": "^3.0.0",
"nprogress": "^0.2.0",
"pinia": "2.0.32",
"print-js": "^1.6.0",
"postcss": "8.4.40",
"qrcode": "1.5.1",
"qs": "^6.11.0",
"screenfull": "^6.0.2",
"sm-crypto": "^0.3.12",
"sortablejs": "^1.15.0",
"splitpanes": "^3.1.5",
"tinymce": "^5.10.2",
"tailwindcss": "3.4.17",
"v-calendar": "3.1.2",
"vue": "3.4.15",
"vue-audio-record": "0.0.7",
"vue-clipboard3": "^2.0.0",
"vue-echarts": "7.0.3",
"vue-i18n": "9.2.2",
"vue-json-viewer": "^3.0.4",
"vue-router": "^4.1.6",
"vue3-tree-org": "^4.2.2",
"vue3-video-play": "1.3.1-beta.6",
"vuedraggable": "^4.1.0"
},
"devDependencies": {
"@swc/core": "1.6.13",
"@types/crypto-js": "^4.2.2",
"@types/markdown-it": "^14.1.1",
"@types/node": "^18.14.0",
"@types/nprogress": "^0.2.0",
"@types/sm-crypto": "^0.3.4",
"@types/sortablejs": "^1.15.0",
"@typescript-eslint/eslint-plugin": "^5.53.0",
"@typescript-eslint/parser": "^5.53.0",
"@vitejs/plugin-vue": "^4.0.0",
"@vue/compiler-sfc": "^3.2.47",
"consola": "^2.15.3",
"cross-env": "7.0.3",
"daisyui": "4.12.10",
"eslint": "^8.34.0",
"eslint-plugin-vue": "^9.9.0",
"pinia-plugin-persist": "^1.0.0",
"prettier": "2.8.4",
"sass": "1.58.3",
"terser": "^5.31.1",
"typescript": "^4.9.5",
"unplugin-auto-import": "^0.13.0",
"vite": "^4.3.3",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-mock": "^3.0.2",
"vite-plugin-style-import": "^2.0.0",
"vite-plugin-top-level-await": "^1.3.0",
"vite-plugin-vue-setup-extend": "^0.4.0",
"vue-eslint-parser": "^9.1.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
],
"bugs": {
"url": "https://pig4cloud.com"
},
"engines": {
"node": ">=16.0.0",
"npm": ">= 7.0.0"
},
"keywords": [
"vue",
"vue3",
"vuejs/vue-next",
"element-ui",
"element-plus"
],
"repository": {
"type": "git",
"url": "https://gitee.com/log4j/pig"
}
}

6
postcss.config.js Normal file
View File

@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 434 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1 @@
function o(e){for(var c=e.length/6|0,n=new Array(c),a=0;a<c;)n[a]="#"+e.slice(a*6,++a*6);return n}const r=o("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");export{r as s};

View File

@@ -0,0 +1 @@
const s=(t,r)=>{const o=t.__vccOpts||t;for(const[c,e]of r)o[c]=e;return o};export{s as _};

View File

@@ -0,0 +1 @@
import{w as ln,c as k}from"./path-53f90ab3.js";import{ac as an,ad as F,ae as j,af as rn,ag as g,Q as on,ah as J,ai as _,aj as un,ak as t,al as sn,am as tn,an as fn}from"./index-0e3b96e2.js";function cn(l){return l.innerRadius}function gn(l){return l.outerRadius}function yn(l){return l.startAngle}function mn(l){return l.endAngle}function pn(l){return l&&l.padAngle}function dn(l,h,E,q,v,A,z,a){var I=E-l,i=q-h,n=z-v,m=a-A,r=m*I-n*i;if(!(r*r<g))return r=(n*(h-A)-m*(l-v))/r,[l+r*I,h+r*i]}function V(l,h,E,q,v,A,z){var a=l-E,I=h-q,i=(z?A:-A)/J(a*a+I*I),n=i*I,m=-i*a,r=l+n,s=h+m,f=E+n,c=q+m,B=(r+f)/2,o=(s+c)/2,p=f-r,y=c-s,R=p*p+y*y,T=v-A,P=r*c-f*s,O=(y<0?-1:1)*J(fn(0,T*T*R-P*P)),Q=(P*y-p*O)/R,S=(-P*p-y*O)/R,w=(P*y+p*O)/R,d=(-P*p+y*O)/R,x=Q-B,e=S-o,u=w-B,C=d-o;return x*x+e*e>u*u+C*C&&(Q=w,S=d),{cx:Q,cy:S,x01:-n,y01:-m,x11:Q*(v/T-1),y11:S*(v/T-1)}}function vn(){var l=cn,h=gn,E=k(0),q=null,v=yn,A=mn,z=pn,a=null,I=ln(i);function i(){var n,m,r=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-rn,c=A.apply(this,arguments)-rn,B=un(c-f),o=c>f;if(a||(a=n=I()),s<r&&(m=s,s=r,r=m),!(s>g))a.moveTo(0,0);else if(B>on-g)a.moveTo(s*F(f),s*j(f)),a.arc(0,0,s,f,c,!o),r>g&&(a.moveTo(r*F(c),r*j(c)),a.arc(0,0,r,c,f,o));else{var p=f,y=c,R=f,T=c,P=B,O=B,Q=z.apply(this,arguments)/2,S=Q>g&&(q?+q.apply(this,arguments):J(r*r+s*s)),w=_(un(s-r)/2,+E.apply(this,arguments)),d=w,x=w,e,u;if(S>g){var C=sn(S/r*j(Q)),K=sn(S/s*j(Q));(P-=C*2)>g?(C*=o?1:-1,R+=C,T-=C):(P=0,R=T=(f+c)/2),(O-=K*2)>g?(K*=o?1:-1,p+=K,y-=K):(O=0,p=y=(f+c)/2)}var G=s*F(p),H=s*j(p),L=r*F(T),M=r*j(T);if(w>g){var N=s*F(y),U=s*j(y),W=r*F(R),X=r*j(R),D;if(B<an)if(D=dn(G,H,W,X,N,U,L,M)){var Y=G-D[0],Z=H-D[1],$=N-D[0],b=U-D[1],nn=1/j(tn((Y*$+Z*b)/(J(Y*Y+Z*Z)*J($*$+b*b)))/2),en=J(D[0]*D[0]+D[1]*D[1]);d=_(w,(r-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else d=x=0}O>g?x>g?(e=V(W,X,G,H,s,x,o),u=V(N,U,L,M,s,x,o),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,t(e.y01,e.x01),t(u.y01,u.x01),!o):(a.arc(e.cx,e.cy,x,t(e.y01,e.x01),t(e.y11,e.x11),!o),a.arc(0,0,s,t(e.cy+e.y11,e.cx+e.x11),t(u.cy+u.y11,u.cx+u.x11),!o),a.arc(u.cx,u.cy,x,t(u.y11,u.x11),t(u.y01,u.x01),!o))):(a.moveTo(G,H),a.arc(0,0,s,p,y,!o)):a.moveTo(G,H),!(r>g)||!(P>g)?a.lineTo(L,M):d>g?(e=V(L,M,N,U,r,-d,o),u=V(G,H,W,X,r,-d,o),a.lineTo(e.cx+e.x01,e.cy+e.y01),d<w?a.arc(e.cx,e.cy,d,t(e.y01,e.x01),t(u.y01,u.x01),!o):(a.arc(e.cx,e.cy,d,t(e.y01,e.x01),t(e.y11,e.x11),!o),a.arc(0,0,r,t(e.cy+e.y11,e.cx+e.x11),t(u.cy+u.y11,u.cx+u.x11),o),a.arc(u.cx,u.cy,d,t(u.y11,u.x11),t(u.y01,u.x01),!o))):a.arc(0,0,r,T,R,o)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,m=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[F(m)*n,j(m)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:k(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:k(+n),i):h},i.cornerRadius=function(n){return arguments.length?(E=typeof n=="function"?n:k(+n),i):E},i.padRadius=function(n){return arguments.length?(q=n==null?null:typeof n=="function"?n:k(+n),i):q},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:k(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:k(+n),i):A},i.padAngle=function(n){return arguments.length?(z=typeof n=="function"?n:k(+n),i):z},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{vn as a};

View File

@@ -0,0 +1 @@
function t(r){return typeof r=="object"&&"length"in r?r:Array.from(r)}export{t as a};

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
import{ao as o,ap as r}from"./index-0e3b96e2.js";const s=(a,n)=>o.lang.round(r.parse(a)[n]),e=s;export{e as c};

Some files were not shown because too many files have changed in this diff Show More