Compare commits
43 Commits
main
...
fd80e2d3c7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd80e2d3c7 | ||
|
|
b52c96fa67 | ||
|
|
3d202e32c2 | ||
| dcb63f88ae | |||
|
|
8dd9ddc93e | ||
|
|
2dc6bd1346 | ||
|
|
703d9cf781 | ||
| a89c199ea8 | |||
| 5dc7514f05 | |||
| 925541ab99 | |||
| b800ca6b74 | |||
| 4a4afc4b10 | |||
| 26a55cea1d | |||
| 5e68456707 | |||
| e992aa0ecd | |||
|
|
69c32905e1 | ||
|
|
c582de3f60 | ||
|
|
0a8074eef8 | ||
| 4b90bd5928 | |||
| 4376c8c313 | |||
| 4746ff22a1 | |||
| 68f8a413bf | |||
| c10d05ead2 | |||
| de641d18d7 | |||
|
|
8a0beee181 | ||
|
|
3dcb6330e3 | ||
|
|
4bd8a54b34 | ||
|
|
8368c9382a | ||
| f2463da8cc | |||
| 6b8027f449 | |||
|
|
8c3fea8a24 | ||
|
|
819093db8c | ||
|
|
7dcfc3e705 | ||
|
|
7bb8b227b4 | ||
|
|
3d2fddbe7b | ||
|
|
9662610b1b | ||
|
|
56f958173b | ||
|
|
0e57e4de46 | ||
|
|
b0e365dcde | ||
|
|
5497f4fdbc | ||
|
|
3d6b622eef | ||
|
|
38ac7da504 | ||
|
|
1c895710d8 |
@@ -1,90 +0,0 @@
|
|||||||
name: git commit 控制 AiDA WEB-Node.js 开发分支构建部署
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- dev_vite
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: "contains(github.event.head_commit.message, '[run build]')"
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [ 18.18.0 ]
|
|
||||||
env:
|
|
||||||
REMOTE_DEPLOY_PATH: /workspace/workspace_aida/DevelopVersion/develop-aida-web-front
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 0.记录开始时间
|
|
||||||
id: build_start_time
|
|
||||||
run: echo "current_time=$(TZ='Asia/Hong_Kong' date '+%Y-%m-%d %H:%M:%S %Z')" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: 1.检出代码
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: dev_vite
|
|
||||||
|
|
||||||
- name: 2.设置 Node.js 环境
|
|
||||||
uses: actions/setup-node@v6
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
- run: npm install
|
|
||||||
- run: npm run build:dev
|
|
||||||
- run: ls -l
|
|
||||||
|
|
||||||
- name: 3.同步文件到远程服务器
|
|
||||||
uses: appleboy/scp-action@v0.1.7
|
|
||||||
with:
|
|
||||||
host: ${{ secrets.SERVER_HOST }}
|
|
||||||
username: ${{ secrets.SERVER_USER }}
|
|
||||||
key: ${{ secrets.SSH_KEY }}
|
|
||||||
source: "./dist/*"
|
|
||||||
target: ${{ env.REMOTE_DEPLOY_PATH }}
|
|
||||||
ssh_options: "-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
|
|
||||||
strip_components: 0
|
|
||||||
|
|
||||||
- name: 4. 远程重载 Nginx 配置
|
|
||||||
uses: appleboy/ssh-action@v1.0.3
|
|
||||||
with:
|
|
||||||
host: ${{ secrets.SERVER_HOST }}
|
|
||||||
username: ${{ secrets.SERVER_USER }}
|
|
||||||
key: ${{ secrets.SSH_KEY }}
|
|
||||||
# 核心:执行 Nginx 重载命令
|
|
||||||
script: |
|
|
||||||
echo "尝试重载 Nginx 服务..."
|
|
||||||
# 💡 注意:执行此命令需要服务器用户具有 sudo 权限,并且配置了 NOPASSWD。
|
|
||||||
# 否则工作流可能会因为权限不足而失败。
|
|
||||||
sudo systemctl reload nginx
|
|
||||||
echo "Nginx 重载命令已发送。"
|
|
||||||
|
|
||||||
- name: 5.发送构建结果邮件
|
|
||||||
if: always() # 无论上一步是否失败,都执行此步骤
|
|
||||||
uses: dawidd6/action-send-mail@v3
|
|
||||||
with:
|
|
||||||
|
|
||||||
from: ${{ secrets.MAIL_USERNAME }}
|
|
||||||
# --- 邮件配置 ---
|
|
||||||
server_address: smtp.gmail.com # 替换为你的SMTP服务器地址
|
|
||||||
server_port: 465 # 替换为你的SMTP端口 (通常是465或587)
|
|
||||||
username: ${{ secrets.MAIL_USERNAME }} # 存储在Secrets中的邮箱用户名
|
|
||||||
password: ${{ secrets.MAIL_PASSWORD }} # 存储在Secrets中的邮箱密码
|
|
||||||
subject: 'Gitea Actions 构建通知: ${{ job.status }} - AiDA back-java Develop'
|
|
||||||
# 收件人列表,可以根据需要更改
|
|
||||||
to: 'xupei3360@163.com,txli@aidlab.hk,cgzhou@aidlab.hk,zchengrong@yeah.net' # 替换为实际收件人邮箱
|
|
||||||
|
|
||||||
# --- 邮件正文内容 ---
|
|
||||||
body: |
|
|
||||||
项目: AiDA back-java Develop
|
|
||||||
分支: dev/3.1_release_merge
|
|
||||||
|
|
||||||
🎉 构建结果: ${{ job.status }}
|
|
||||||
|
|
||||||
📅 构建时间: ${{ steps.build_start_time.outputs.current_time }}
|
|
||||||
|
|
||||||
🔗 构建链接: ${{ gitea.server_url }}/${{ gitea.repository.owner.name }}/${{ gitea.repository.name }}/actions/runs/${{ gitea.run_id }}
|
|
||||||
|
|
||||||
# 确保邮件内容为纯文本,或者你可以设置为 html: true 并调整 body
|
|
||||||
content_type: text/plain
|
|
||||||
@@ -1,85 +0,0 @@
|
|||||||
name: 手动触发 AiDA WEB-Node.js 开发分支构建部署
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [ 18.18.0 ]
|
|
||||||
env:
|
|
||||||
REMOTE_DEPLOY_PATH: /workspace/workspace_aida/DevelopVersion/develop-aida-web-front
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 0.记录开始时间
|
|
||||||
id: build_start_time
|
|
||||||
run: echo "current_time=$(TZ='Asia/Hong_Kong' date '+%Y-%m-%d %H:%M:%S %Z')" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: 1.检出代码
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: dev_vite
|
|
||||||
|
|
||||||
- name: 2.设置 Node.js 环境
|
|
||||||
uses: actions/setup-node@v6
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
- run: npm install
|
|
||||||
- run: npm run build:dev
|
|
||||||
- run: ls -l
|
|
||||||
|
|
||||||
- name: 3.同步文件到远程服务器
|
|
||||||
uses: appleboy/scp-action@v0.1.7
|
|
||||||
with:
|
|
||||||
host: ${{ secrets.SERVER_HOST }}
|
|
||||||
username: ${{ secrets.SERVER_USER }}
|
|
||||||
key: ${{ secrets.SSH_KEY }}
|
|
||||||
source: "./dist/*"
|
|
||||||
target: ${{ env.REMOTE_DEPLOY_PATH }}
|
|
||||||
ssh_options: "-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
|
|
||||||
strip_components: 0
|
|
||||||
|
|
||||||
- name: 4. 远程重载 Nginx 配置
|
|
||||||
uses: appleboy/ssh-action@v1.0.3
|
|
||||||
with:
|
|
||||||
host: ${{ secrets.SERVER_HOST }}
|
|
||||||
username: ${{ secrets.SERVER_USER }}
|
|
||||||
key: ${{ secrets.SSH_KEY }}
|
|
||||||
# 核心:执行 Nginx 重载命令
|
|
||||||
script: |
|
|
||||||
echo "尝试重载 Nginx 服务..."
|
|
||||||
# 💡 注意:执行此命令需要服务器用户具有 sudo 权限,并且配置了 NOPASSWD。
|
|
||||||
# 否则工作流可能会因为权限不足而失败。
|
|
||||||
sudo systemctl reload nginx
|
|
||||||
echo "Nginx 重载命令已发送。"
|
|
||||||
|
|
||||||
- name: 5.发送构建结果邮件
|
|
||||||
if: always() # 无论上一步是否失败,都执行此步骤
|
|
||||||
uses: dawidd6/action-send-mail@v3
|
|
||||||
with:
|
|
||||||
|
|
||||||
from: ${{ secrets.MAIL_USERNAME }}
|
|
||||||
# --- 邮件配置 ---
|
|
||||||
server_address: smtp.gmail.com # 替换为你的SMTP服务器地址
|
|
||||||
server_port: 465 # 替换为你的SMTP端口 (通常是465或587)
|
|
||||||
username: ${{ secrets.MAIL_USERNAME }} # 存储在Secrets中的邮箱用户名
|
|
||||||
password: ${{ secrets.MAIL_PASSWORD }} # 存储在Secrets中的邮箱密码
|
|
||||||
subject: 'Gitea Actions 构建通知: ${{ job.status }} - AiDA back-java Develop'
|
|
||||||
# 收件人列表,可以根据需要更改
|
|
||||||
to: 'xupei3360@163.com,txli@aidlab.hk,cgzhou@aidlab.hk,zchengrong@yeah.net' # 替换为实际收件人邮箱
|
|
||||||
|
|
||||||
# --- 邮件正文内容 ---
|
|
||||||
body: |
|
|
||||||
项目: AiDA back-java Develop
|
|
||||||
分支: dev/3.1_release_merge
|
|
||||||
|
|
||||||
🎉 构建结果: ${{ job.status }}
|
|
||||||
|
|
||||||
📅 构建时间: ${{ steps.build_start_time.outputs.current_time }}
|
|
||||||
|
|
||||||
🔗 构建链接: ${{ gitea.server_url }}/${{ gitea.repository.owner.name }}/${{ gitea.repository.name }}/actions/runs/${{ gitea.run_id }}
|
|
||||||
|
|
||||||
# 确保邮件内容为纯文本,或者你可以设置为 html: true 并调整 body
|
|
||||||
content_type: text/plain
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
name: AiDA WEB-Node.js 生产分支构建部署
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [ 18.18.0 ]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 0.记录开始时间
|
|
||||||
id: build_start_time
|
|
||||||
run: echo "current_time=$(TZ='Asia/Hong_Kong' date '+%Y-%m-%d %H:%M:%S %Z')" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: 1.检出代码
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: StableVersion
|
|
||||||
|
|
||||||
- name: 2.设置 Node.js 环境
|
|
||||||
uses: actions/setup-node@v6
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
- run: npm install
|
|
||||||
- run: npm run build
|
|
||||||
- run: ls -l
|
|
||||||
|
|
||||||
- name: 3.5. 手动安装 AWS CLI v2 # 新增步骤:确保 aws 命令可用
|
|
||||||
run: |
|
|
||||||
echo "安装 AWS CLI V2..."
|
|
||||||
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
|
|
||||||
unzip awscliv2.zip
|
|
||||||
sudo ./aws/install --update
|
|
||||||
aws --version
|
|
||||||
echo "AWS CLI V2 安装完成。"
|
|
||||||
|
|
||||||
- name: 4.配置 AWS 凭证
|
|
||||||
uses: aws-actions/configure-aws-credentials@main
|
|
||||||
with:
|
|
||||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
||||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
||||||
aws-region: 'ap-east-1'
|
|
||||||
|
|
||||||
- name: 5.同步 dist 目录到 S3
|
|
||||||
run: |
|
|
||||||
aws s3 sync dist/ s3://${{ secrets.S3_BUCKET_NAME }}/ --acl public-read
|
|
||||||
|
|
||||||
- name: 6.发送构建结果邮件
|
|
||||||
if: always() # 无论上一步是否失败,都执行此步骤
|
|
||||||
uses: dawidd6/action-send-mail@v3
|
|
||||||
with:
|
|
||||||
|
|
||||||
from: ${{ secrets.MAIL_USERNAME }}
|
|
||||||
# --- 邮件配置 ---
|
|
||||||
server_address: smtp.gmail.com # 替换为你的SMTP服务器地址
|
|
||||||
server_port: 465 # 替换为你的SMTP端口 (通常是465或587)
|
|
||||||
username: ${{ secrets.MAIL_USERNAME }} # 存储在Secrets中的邮箱用户名
|
|
||||||
password: ${{ secrets.MAIL_PASSWORD }} # 存储在Secrets中的邮箱密码
|
|
||||||
subject: 'Gitea Actions 构建通知: ${{ job.status }} - AiDA back-java Develop'
|
|
||||||
# 收件人列表,可以根据需要更改
|
|
||||||
to: 'xupei3360@163.com,txli@aidlab.hk,cgzhou@aidlab.hk,zchengrong@yeah.net' # 替换为实际收件人邮箱
|
|
||||||
|
|
||||||
# --- 邮件正文内容 ---
|
|
||||||
body: |
|
|
||||||
项目: AiDA back-java Develop
|
|
||||||
分支: dev/3.1_release_merge
|
|
||||||
|
|
||||||
🎉 构建结果: ${{ job.status }}
|
|
||||||
|
|
||||||
📅 构建时间: ${{ steps.build_start_time.outputs.current_time }}
|
|
||||||
|
|
||||||
🔗 构建链接: ${{ gitea.server_url }}/${{ gitea.repository.owner.name }}/${{ gitea.repository.name }}/actions/runs/${{ gitea.run_id }}
|
|
||||||
|
|
||||||
# 确保邮件内容为纯文本,或者你可以设置为 html: true 并调整 body
|
|
||||||
content_type: text/plain
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
name: AiDA WEB-Node.js 生产分支构建部署
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
# cron为UTC时区,构建时间=部署时间-8小时 {*分 (-8)时 *日 *月 *周} ---
|
|
||||||
# 示例: 1月1日22点22分触发构建 cron写作 - '22 14 1 1 *'
|
|
||||||
- cron: '00 14 23 3 *'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [ 18.18.0 ]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 0.记录开始时间
|
|
||||||
id: build_start_time
|
|
||||||
run: echo "current_time=$(TZ='Asia/Hong_Kong' date '+%Y-%m-%d %H:%M:%S %Z')" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: 1.检出代码
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: StableVersion
|
|
||||||
|
|
||||||
- name: 2.设置 Node.js 环境
|
|
||||||
uses: actions/setup-node@v6
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
- run: npm install
|
|
||||||
- run: npm run build
|
|
||||||
- run: ls -l
|
|
||||||
|
|
||||||
- name: 3.5. 手动安装 AWS CLI v2 # 新增步骤:确保 aws 命令可用
|
|
||||||
run: |
|
|
||||||
echo "安装 AWS CLI V2..."
|
|
||||||
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
|
|
||||||
unzip awscliv2.zip
|
|
||||||
sudo ./aws/install --update
|
|
||||||
aws --version
|
|
||||||
echo "AWS CLI V2 安装完成。"
|
|
||||||
|
|
||||||
- name: 4.配置 AWS 凭证
|
|
||||||
uses: aws-actions/configure-aws-credentials@main
|
|
||||||
with:
|
|
||||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
||||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
||||||
aws-region: 'ap-east-1'
|
|
||||||
|
|
||||||
- name: 5.同步 dist 目录到 S3
|
|
||||||
run: |
|
|
||||||
aws s3 sync dist/ s3://${{ secrets.S3_BUCKET_NAME }}/ --acl public-read
|
|
||||||
|
|
||||||
- name: 6.发送构建结果邮件
|
|
||||||
if: always() # 无论上一步是否失败,都执行此步骤
|
|
||||||
uses: dawidd6/action-send-mail@v3
|
|
||||||
with:
|
|
||||||
|
|
||||||
from: ${{ secrets.MAIL_USERNAME }}
|
|
||||||
# --- 邮件配置 ---
|
|
||||||
server_address: smtp.gmail.com # 替换为你的SMTP服务器地址
|
|
||||||
server_port: 465 # 替换为你的SMTP端口 (通常是465或587)
|
|
||||||
username: ${{ secrets.MAIL_USERNAME }} # 存储在Secrets中的邮箱用户名
|
|
||||||
password: ${{ secrets.MAIL_PASSWORD }} # 存储在Secrets中的邮箱密码
|
|
||||||
subject: 'Gitea Actions 构建通知: ${{ job.status }} - AiDA back-java Develop'
|
|
||||||
# 收件人列表,可以根据需要更改
|
|
||||||
to: 'cgzhou@aidlab.hk,zchengrong@yeah.net' # 替换为实际收件人邮箱
|
|
||||||
|
|
||||||
# --- 邮件正文内容 ---
|
|
||||||
body: |
|
|
||||||
项目: AiDA WEB-Node.js 生产分支构建部署
|
|
||||||
分支: StableVersion
|
|
||||||
|
|
||||||
🎉 构建结果: ${{ job.status }}
|
|
||||||
|
|
||||||
📅 构建时间: ${{ steps.build_start_time.outputs.current_time }}
|
|
||||||
|
|
||||||
🔗 构建链接: ${{ gitea.server_url }}/${{ gitea.repository.owner.name }}/${{ gitea.repository.name }}/actions/runs/${{ gitea.run_id }}
|
|
||||||
|
|
||||||
# 确保邮件内容为纯文本,或者你可以设置为 html: true 并调整 body
|
|
||||||
content_type: text/plain
|
|
||||||
@@ -1,85 +0,0 @@
|
|||||||
name: 手动触发 AiDA WEB-Node.js 开发分支构建部署
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [ 18.18.0 ]
|
|
||||||
env:
|
|
||||||
REMOTE_DEPLOY_PATH: /workspace/workspace_aida/Research/research-aida-web-front
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 0.记录开始时间
|
|
||||||
id: build_start_time
|
|
||||||
run: echo "current_time=$(TZ='Asia/Hong_Kong' date '+%Y-%m-%d %H:%M:%S %Z')" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: 1.检出代码
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: research
|
|
||||||
|
|
||||||
- name: 2.设置 Node.js 环境
|
|
||||||
uses: actions/setup-node@v6
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
- run: npm install
|
|
||||||
- run: npm run build:dev
|
|
||||||
- run: ls -l
|
|
||||||
|
|
||||||
- name: 3.同步文件到远程服务器
|
|
||||||
uses: appleboy/scp-action@v0.1.7
|
|
||||||
with:
|
|
||||||
host: ${{ secrets.SERVER_HOST }}
|
|
||||||
username: ${{ secrets.SERVER_USER }}
|
|
||||||
key: ${{ secrets.SSH_KEY }}
|
|
||||||
source: "./dist/*"
|
|
||||||
target: ${{ env.REMOTE_DEPLOY_PATH }}
|
|
||||||
ssh_options: "-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
|
|
||||||
strip_components: 0
|
|
||||||
|
|
||||||
- name: 4. 远程重载 Nginx 配置
|
|
||||||
uses: appleboy/ssh-action@v1.0.3
|
|
||||||
with:
|
|
||||||
host: ${{ secrets.SERVER_HOST }}
|
|
||||||
username: ${{ secrets.SERVER_USER }}
|
|
||||||
key: ${{ secrets.SSH_KEY }}
|
|
||||||
# 核心:执行 Nginx 重载命令
|
|
||||||
script: |
|
|
||||||
echo "尝试重载 Nginx 服务..."
|
|
||||||
# 💡 注意:执行此命令需要服务器用户具有 sudo 权限,并且配置了 NOPASSWD。
|
|
||||||
# 否则工作流可能会因为权限不足而失败。
|
|
||||||
sudo systemctl reload nginx
|
|
||||||
echo "Nginx 重载命令已发送。"
|
|
||||||
|
|
||||||
- name: 5.发送构建结果邮件
|
|
||||||
if: always() # 无论上一步是否失败,都执行此步骤
|
|
||||||
uses: dawidd6/action-send-mail@v3
|
|
||||||
with:
|
|
||||||
|
|
||||||
from: ${{ secrets.MAIL_USERNAME }}
|
|
||||||
# --- 邮件配置 ---
|
|
||||||
server_address: smtp.gmail.com # 替换为你的SMTP服务器地址
|
|
||||||
server_port: 465 # 替换为你的SMTP端口 (通常是465或587)
|
|
||||||
username: ${{ secrets.MAIL_USERNAME }} # 存储在Secrets中的邮箱用户名
|
|
||||||
password: ${{ secrets.MAIL_PASSWORD }} # 存储在Secrets中的邮箱密码
|
|
||||||
subject: 'Gitea Actions 构建通知: ${{ job.status }} - AiDA back-java Develop'
|
|
||||||
# 收件人列表,可以根据需要更改
|
|
||||||
to: 'xupei3360@163.com,txli@aidlab.hk,cgzhou@aidlab.hk,zchengrong@yeah.net' # 替换为实际收件人邮箱
|
|
||||||
|
|
||||||
# --- 邮件正文内容 ---
|
|
||||||
body: |
|
|
||||||
项目: AiDA back-java Develop
|
|
||||||
分支: dev/3.1_release_merge
|
|
||||||
|
|
||||||
🎉 构建结果: ${{ job.status }}
|
|
||||||
|
|
||||||
📅 构建时间: ${{ steps.build_start_time.outputs.current_time }}
|
|
||||||
|
|
||||||
🔗 构建链接: ${{ gitea.server_url }}/${{ gitea.repository.owner.name }}/${{ gitea.repository.name }}/actions/runs/${{ gitea.run_id }}
|
|
||||||
|
|
||||||
# 确保邮件内容为纯文本,或者你可以设置为 html: true 并调整 body
|
|
||||||
content_type: text/plain
|
|
||||||
53
prod_build_manual.yaml
Normal file
53
prod_build_manual.yaml
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
name: AiDA WEB-Node.js StableVersion 分支构建部署
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version: [ 18.18.0 ]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: 1.检出代码
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: StableVersion
|
||||||
|
|
||||||
|
- name: 2.打印当前分支信息
|
||||||
|
run: |
|
||||||
|
echo "Current branch being deployed is: $(git rev-parse --abbrev-ref HEAD)"
|
||||||
|
echo "The code is from the 'main' branch, as specified in 'actions/checkout'."
|
||||||
|
|
||||||
|
- name: 3.设置 Node.js 环境 ${{ matrix.node-version }}
|
||||||
|
uses: actions/setup-node@v6
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
|
- run: npm install
|
||||||
|
- run: npm run build
|
||||||
|
- run: ls -l
|
||||||
|
|
||||||
|
- name: 3.5. 手动安装 AWS CLI v2 # 新增步骤:确保 aws 命令可用
|
||||||
|
run: |
|
||||||
|
echo "安装 AWS CLI V2..."
|
||||||
|
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
|
||||||
|
unzip awscliv2.zip
|
||||||
|
sudo ./aws/install --update
|
||||||
|
aws --version
|
||||||
|
echo "AWS CLI V2 安装完成。"
|
||||||
|
|
||||||
|
- name: 4.配置 AWS 凭证
|
||||||
|
uses: aws-actions/configure-aws-credentials@main
|
||||||
|
with:
|
||||||
|
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
aws-region: 'ap-east-1'
|
||||||
|
|
||||||
|
- name: 5.同步 dist 目录到 S3
|
||||||
|
run: |
|
||||||
|
aws s3 sync dist/ s3://${{ secrets.S3_BUCKET_NAME }}/ --acl public-read
|
||||||
|
|
||||||
|
- name: 6.部署完成
|
||||||
|
run: echo "构建和部署到 S3 任务完成。"
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 313 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 370 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 68 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 191 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 7.4 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 299 KiB |
@@ -168,7 +168,6 @@ li {
|
|||||||
}
|
}
|
||||||
.ant-modal-mask {
|
.ant-modal-mask {
|
||||||
background-color: #666666;
|
background-color: #666666;
|
||||||
opacity: 0.5;
|
|
||||||
}
|
}
|
||||||
.select_block {
|
.select_block {
|
||||||
height: 4rem;
|
height: 4rem;
|
||||||
|
|||||||
@@ -173,7 +173,6 @@ input:focus{
|
|||||||
}
|
}
|
||||||
.ant-modal-mask{
|
.ant-modal-mask{
|
||||||
background-color: #666666;
|
background-color: #666666;
|
||||||
opacity: .5;
|
|
||||||
}
|
}
|
||||||
.select_block{
|
.select_block{
|
||||||
height: 4rem;
|
height: 4rem;
|
||||||
|
|||||||
@@ -902,7 +902,7 @@ const changeCanvas = async (command) => {
|
|||||||
...command, // 传递完整的命令数据
|
...command, // 传递完整的命令数据
|
||||||
};
|
};
|
||||||
emit("changeCanvas", commandData);
|
emit("changeCanvas", commandData);
|
||||||
if (command.canUndo || command.canRedo) {
|
if ((command.canUndo || command.canRedo) && props.enabledRedGreenMode) {
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
const imageData = await canvasManager.exportImage({
|
const imageData = await canvasManager.exportImage({
|
||||||
restoreOpacityInRedGreen: true, // 恢复红绿图模式下的透明度
|
restoreOpacityInRedGreen: true, // 恢复红绿图模式下的透明度
|
||||||
|
|||||||
@@ -555,23 +555,17 @@ export class ExportManager {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取固定图层对象的边界矩形(包含位置、尺寸、缩放等信息)
|
|
||||||
const fixedBounds = fixedLayerObject?.getBoundingRect?.();
|
|
||||||
|
|
||||||
// 使用固定图层的实际显示尺寸作为导出画布尺寸
|
// 使用固定图层的实际显示尺寸作为导出画布尺寸
|
||||||
const canvasWidth = Math.round(fixedBounds.width);
|
const canvasWidth = Math.round(fixedLayerObject.width * fixedLayerObject.scaleX);
|
||||||
const canvasHeight = Math.round(fixedBounds.height);
|
const canvasHeight = Math.round(fixedLayerObject.height * fixedLayerObject.scaleY);
|
||||||
|
|
||||||
console.log(`红绿图模式导出,画布尺寸: ${canvasWidth}x${canvasHeight}`);
|
console.log(`红绿图模式导出,画布尺寸: ${canvasWidth}x${canvasHeight}`);
|
||||||
console.log("固定图层边界:", fixedBounds);
|
|
||||||
|
|
||||||
// 创建固定尺寸的临时画布
|
// 创建固定尺寸的临时画布
|
||||||
const scaleFactor = 2; // 高清导出
|
const scaleFactor = 2; // 高清导出
|
||||||
const tempCanvas = document.createElement("canvas");
|
const tempCanvas = document.createElement("canvas");
|
||||||
tempCanvas.width = canvasWidth * scaleFactor;
|
tempCanvas.width = canvasWidth * scaleFactor;
|
||||||
tempCanvas.height = canvasHeight * scaleFactor;
|
tempCanvas.height = canvasHeight * scaleFactor;
|
||||||
tempCanvas.style.width = canvasWidth + "px";
|
|
||||||
tempCanvas.style.height = canvasHeight + "px";
|
|
||||||
|
|
||||||
const tempFabricCanvas = new fabric.StaticCanvas(tempCanvas, {
|
const tempFabricCanvas = new fabric.StaticCanvas(tempCanvas, {
|
||||||
width: canvasWidth,
|
width: canvasWidth,
|
||||||
@@ -584,8 +578,7 @@ export class ExportManager {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// 获取裁剪路径对象(如果存在)
|
// 获取裁剪路径对象(如果存在)
|
||||||
const clipPathObject = await this._getClipPathObject(fixedBounds);
|
const clipPathObject = await this._getClipPathObject(fixedLayerObject);
|
||||||
|
|
||||||
// 克隆并添加所有对象到临时画布,需要调整位置相对于固定图层
|
// 克隆并添加所有对象到临时画布,需要调整位置相对于固定图层
|
||||||
for (let i = 0; i < objectsToExport.length; i++) {
|
for (let i = 0; i < objectsToExport.length; i++) {
|
||||||
const obj = objectsToExport[i];
|
const obj = objectsToExport[i];
|
||||||
@@ -594,19 +587,20 @@ export class ExportManager {
|
|||||||
restoreOpacityInRedGreen && true
|
restoreOpacityInRedGreen && true
|
||||||
);
|
);
|
||||||
if (cloned) {
|
if (cloned) {
|
||||||
// 调整对象位置:将原画布坐标转换为以固定图层为原点的相对坐标
|
|
||||||
cloned.set({
|
cloned.set({
|
||||||
left: cloned.left - fixedBounds.left,
|
left: 0,
|
||||||
top: cloned.top - fixedBounds.top,
|
top: 0,
|
||||||
|
originX: "left",
|
||||||
|
originY: "top",
|
||||||
});
|
});
|
||||||
|
|
||||||
// 更新对象坐标
|
// 更新对象坐标
|
||||||
cloned.setCoords();
|
cloned.setCoords();
|
||||||
|
|
||||||
// 设置裁剪路径到对象
|
// 设置裁剪路径到对象
|
||||||
if (clipPathObject) {
|
// if (clipPathObject) {
|
||||||
cloned.clipPath = clipPathObject;
|
// cloned.clipPath = clipPathObject;
|
||||||
}
|
// }
|
||||||
|
|
||||||
tempFabricCanvas.add(cloned);
|
tempFabricCanvas.add(cloned);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ export default defineComponent({
|
|||||||
let size = {
|
let size = {
|
||||||
...detailData.canvasConfig,
|
...detailData.canvasConfig,
|
||||||
}
|
}
|
||||||
|
store.commit('DesignDetail/updataDetailItem',{maskUrl:value})
|
||||||
segmentImage(value,full,size).then(async (rv)=>{
|
segmentImage(value,full,size).then(async (rv)=>{
|
||||||
let front = detailData.frontBack.front[detailData.imgDomIndex]
|
let front = detailData.frontBack.front[detailData.imgDomIndex]
|
||||||
let back = detailData.frontBack.back[detailData.imgDomIndex]
|
let back = detailData.frontBack.back[detailData.imgDomIndex]
|
||||||
@@ -243,7 +243,7 @@ export default defineComponent({
|
|||||||
let base64 = await resizeImageWithNativeCanvas(front.oldMaskUrl,value)
|
let base64 = await resizeImageWithNativeCanvas(front.oldMaskUrl,value)
|
||||||
front.maskUrl = base64
|
front.maskUrl = base64
|
||||||
back.imageUrl = rv.targetBackUrl
|
back.imageUrl = rv.targetBackUrl
|
||||||
store.commit('DesignDetail/updataDetailItem',{maskUrl:value})
|
// store.commit('DesignDetail/updataDetailItem',{maskUrl:value})
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -350,7 +350,6 @@ export default defineComponent({
|
|||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-content: flex-start;
|
align-content: flex-start;
|
||||||
padding-bottom: 2rem;
|
|
||||||
// &::-webkit-scrollbar{display: none;}
|
// &::-webkit-scrollbar{display: none;}
|
||||||
> .content_img_item{
|
> .content_img_item{
|
||||||
width: calc((50% - 1rem));
|
width: calc((50% - 1rem));
|
||||||
@@ -369,12 +368,9 @@ export default defineComponent({
|
|||||||
> .material_content_list_loding{
|
> .material_content_list_loding{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
aspect-ratio: 1/1;
|
aspect-ratio: 1/1;
|
||||||
height: 4rem;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
> img{
|
> img{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
|
||||||
object-fit: contain;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
:outputSize="option.size"
|
:outputSize="option.size"
|
||||||
:outputType="option.outputType"
|
:outputType="option.outputType"
|
||||||
:auto-crop="option.autoCrop"
|
:auto-crop="option.autoCrop"
|
||||||
:fixedBox="isRound"
|
:fixedBox="!isRound"
|
||||||
:movable="true"
|
:movable="true"
|
||||||
:fixed="isRound"
|
:fixed="isRound"
|
||||||
:auto-crop-width="option.autoCropWidth"
|
:auto-crop-width="option.autoCropWidth"
|
||||||
@@ -333,7 +333,6 @@ export default defineComponent({
|
|||||||
.cut_picture_review_block{
|
.cut_picture_review_block{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - 6.8rem*1.2);
|
height: calc(100% - 6.8rem*1.2);
|
||||||
min-height: calc(100% - 6.8rem*1.2);
|
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
.next_step_button{
|
.next_step_button{
|
||||||
margin-top: 2rem;
|
margin-top: 2rem;
|
||||||
|
|||||||
@@ -276,6 +276,7 @@ import { Modal,message } from "ant-design-vue";
|
|||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||||
import fullScreenImg from '@/component/HomePage/fullScreenImg.vue'
|
import fullScreenImg from '@/component/HomePage/fullScreenImg.vue'
|
||||||
|
import { debounce } from 'lodash-es'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components:{fullScreenImg},
|
components:{fullScreenImg},
|
||||||
@@ -437,35 +438,25 @@ export default defineComponent({
|
|||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
let flag = true
|
let setChoose = debounce(async()=>{
|
||||||
let setChoose = async()=>{
|
if(userDetail.value.systemList.indexOf(1) == -1){
|
||||||
if(!flag) return
|
return message.info(t('newScaleImage.jsContent1'))
|
||||||
flag = false
|
}
|
||||||
try {
|
|
||||||
if(userDetail.value.systemList.indexOf(1) == -1){
|
|
||||||
message.info(t('newScaleImage.jsContent1'))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
const targetDate = new Date('2025-09-01T00:00:00');
|
const targetDate = new Date('2025-09-01T00:00:00');
|
||||||
// 解析输入日期字符串
|
// 解析输入日期字符串
|
||||||
const inputDate = new Date(imgData.scaleImageData.createDate);
|
const inputDate = new Date(imgData.scaleImageData.createDate);
|
||||||
if(inputDate < targetDate){
|
if(inputDate < targetDate){
|
||||||
message.info(t('newScaleImage.jsContent2'))
|
return message.info(t('newScaleImage.jsContent2'))
|
||||||
return
|
}
|
||||||
}
|
if(imgData.scaleImageData.openSource == 0){
|
||||||
if(imgData.scaleImageData.openSource == 0){
|
return message.info(t('newScaleImage.jsContent2'))
|
||||||
message.info(t('newScaleImage.jsContent2'))
|
}
|
||||||
return
|
let id = await getWorks(imgData.scaleImageData.id)
|
||||||
}
|
router.push(`/home/history/${id}`)
|
||||||
let id = await getWorks(imgData.scaleImageData.id)
|
// router.push({name:'home',params: {id:imgData.scaleImageData.id,type:'Works'}})
|
||||||
await router.push(`/home/history/${id}`)
|
store.commit('setChooseIsDesign',false)
|
||||||
store.commit('setChooseIsDesign',false)
|
},300)
|
||||||
} finally {
|
|
||||||
// 函数执行完成后恢复为 true,确保无论成功还是失败都能再次点击
|
|
||||||
flag = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let setCommentReply = (value:any,str:any)=>{
|
let setCommentReply = (value:any,str:any)=>{
|
||||||
imgData.commentReply.leve1Id = value.id
|
imgData.commentReply.leve1Id = value.id
|
||||||
|
|||||||
@@ -711,9 +711,10 @@ export default defineComponent({
|
|||||||
top: 50%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%,-50%);
|
transform: translate(-50%,-50%);
|
||||||
// float: left;
|
float: left;
|
||||||
// user-select:none;
|
object-fit: contain;
|
||||||
// -webkit-user-drag: none;
|
user-select:none;
|
||||||
|
-webkit-user-drag: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.wh1{
|
.wh1{
|
||||||
|
|||||||
@@ -145,7 +145,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 取消请求 -->
|
<!-- 取消请求 -->
|
||||||
<scaleImage ref="scaleImage"></scaleImage>
|
<scaleImage ref="scaleImage"></scaleImage>
|
||||||
<Cropper ref="Cropper" @handleCropperSuccess="handleCropperSuccess" @closeCropper="deletUploadFile()" :cropperFileData="cropperFileData" :isRound="false" :isUpload="isUpload"></Cropper>
|
<Cropper ref="Cropper" @handleCropperSuccess="handleCropperSuccess" @closeCropper="deletUploadFile()" :cropperFileData="cropperFileData" :isUpload="isUpload"></Cropper>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
|||||||
@@ -682,6 +682,7 @@ export default defineComponent({
|
|||||||
store.commit("cancelDeleteDesignCollectionList",index);
|
store.commit("cancelDeleteDesignCollectionList",index);
|
||||||
}
|
}
|
||||||
const designMousedown = (e:any,design:any,str:string)=>{
|
const designMousedown = (e:any,design:any,str:string)=>{
|
||||||
|
collItemSize.isMove = false
|
||||||
if(str != 'disLike'){
|
if(str != 'disLike'){
|
||||||
if(design.resultType != 'Design' || designData.isUnfold)return
|
if(design.resultType != 'Design' || designData.isUnfold)return
|
||||||
if(str != 'like' && showDesignMark.value) return
|
if(str != 'like' && showDesignMark.value) return
|
||||||
@@ -695,7 +696,6 @@ export default defineComponent({
|
|||||||
startY = e.clientY,
|
startY = e.clientY,
|
||||||
left = item.el.offsetLeft,
|
left = item.el.offsetLeft,
|
||||||
top = item.el.offsetTop;
|
top = item.el.offsetTop;
|
||||||
collItemSize.isMove = false
|
|
||||||
let moveFun = (e:any) => {
|
let moveFun = (e:any) => {
|
||||||
collItemSize.isMove = true
|
collItemSize.isMove = true
|
||||||
let X = e.clientX - startX + left;
|
let X = e.clientX - startX + left;
|
||||||
@@ -1200,6 +1200,11 @@ export default defineComponent({
|
|||||||
likeDesignCollectionList.value.forEach((likeItem:any,index:any)=>{
|
likeDesignCollectionList.value.forEach((likeItem:any,index:any)=>{
|
||||||
if(likeItem?.childList?.length > 0){
|
if(likeItem?.childList?.length > 0){
|
||||||
let index = likeItem.childList.findIndex((item:any)=>{return item.taskId == listItem})
|
let index = likeItem.childList.findIndex((item:any)=>{return item.taskId == listItem})
|
||||||
|
likeItem.childList.forEach((item)=>{
|
||||||
|
if(item.sort > likeItem.childList[index].sort){
|
||||||
|
item.sort -= 1
|
||||||
|
}
|
||||||
|
})
|
||||||
likeItem.childList.splice(index,1)
|
likeItem.childList.splice(index,1)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="style marginBottom" v-if="show.style">
|
<div class="style marginBottom" v-if="show.style">
|
||||||
<div class="text">{{$t('Habit.Style')}}:</div>
|
<div class="text">{{$t('Habit.Style')}}:</div>
|
||||||
<div class="center">{{ selectObject?.styleName?selectObject?.styleName:$t('Header.All') }}</div>
|
<div class="center">{{ selectObject?.styleName?selectObject?.styleName:'All' }}</div>
|
||||||
<div class="gallery_btn" @click="setStyle">{{ $t('Habit.Select') }}</div>
|
<div class="gallery_btn" @click="setStyle">{{ $t('Habit.Select') }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="style brand marginBottom">
|
<div class="style brand marginBottom">
|
||||||
|
|||||||
@@ -1250,15 +1250,13 @@ export default defineComponent({
|
|||||||
|
|
||||||
> .item {
|
> .item {
|
||||||
margin-right: 1rem;
|
margin-right: 1rem;
|
||||||
// width: calc(100% / 2 - 0.5rem);
|
width: calc(100% / 2 - 0.5rem);
|
||||||
// height: 25rem;
|
|
||||||
width: 12.7rem;
|
|
||||||
height: 17.8rem;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
height: 25rem;
|
||||||
position: relative;
|
position: relative;
|
||||||
// &.active{
|
// &.active{
|
||||||
// border: 2px solid;
|
// border: 2px solid;
|
||||||
@@ -1534,8 +1532,6 @@ export default defineComponent({
|
|||||||
.ant-upload-select-picture-card {
|
.ant-upload-select-picture-card {
|
||||||
width: 12.7rem;
|
width: 12.7rem;
|
||||||
height: 17.8rem;
|
height: 17.8rem;
|
||||||
border-width: 1px;
|
|
||||||
background: #fff;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
<ul
|
<ul
|
||||||
class="product_detail"
|
class="product_detail"
|
||||||
:class="[
|
:class="[
|
||||||
{ academic: item.type == 'academic' && !isSelectSuccessively },
|
{ academic: item.type == 'academic' },
|
||||||
{ chinese: isSelectSuccessively }
|
{ chinese: isSelectSuccessively }
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -453,8 +453,7 @@ export default {
|
|||||||
jsContent4: '图片必须小于5MB',
|
jsContent4: '图片必须小于5MB',
|
||||||
jsContent5: '图片已经上传是否继续上传',
|
jsContent5: '图片已经上传是否继续上传',
|
||||||
jsContent6: '输入的内容超过允许输入的最大长度',
|
jsContent6: '输入的内容超过允许输入的最大长度',
|
||||||
jsContent7: '请输入内容~',
|
jsContent7: '请输入内容~'
|
||||||
jsContent8: '请输入项目名字~'
|
|
||||||
},
|
},
|
||||||
ModelPlacement: {
|
ModelPlacement: {
|
||||||
Registration: '新增模特',
|
Registration: '新增模特',
|
||||||
|
|||||||
@@ -466,8 +466,7 @@ export default {
|
|||||||
jsContent4: 'Image must smaller than 5MB!',
|
jsContent4: 'Image must smaller than 5MB!',
|
||||||
jsContent5: 'This picture has been uploaded whether to continue uploading?',
|
jsContent5: 'This picture has been uploaded whether to continue uploading?',
|
||||||
jsContent6: 'The entered content exceeds the maximum length.',
|
jsContent6: 'The entered content exceeds the maximum length.',
|
||||||
jsContent7: 'Please enter content',
|
jsContent7: 'Please enter content'
|
||||||
jsContent8: 'Please enter the project name.'
|
|
||||||
},
|
},
|
||||||
ModelPlacement: {
|
ModelPlacement: {
|
||||||
Registration: 'Registration',
|
Registration: 'Registration',
|
||||||
|
|||||||
@@ -393,27 +393,6 @@
|
|||||||
<span class="fi fi-rr-book-user"></span>
|
<span class="fi fi-rr-book-user"></span>
|
||||||
<span class="select_item_des">{{ $t('Header.Tutorial') }}</span>
|
<span class="select_item_des">{{ $t('Header.Tutorial') }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="select_item logo">
|
|
||||||
<a href="https://www.tiktok.com" target="_blank" >
|
|
||||||
<img src="@/assets/images/socialMediaLogo/tikTokIcon.png" alt="">
|
|
||||||
</a>
|
|
||||||
<a href="https://www.instagram.com" target="_blank" >
|
|
||||||
<img src="@/assets/images/socialMediaLogo/instagramIcon.png" alt="">
|
|
||||||
</a>
|
|
||||||
<a href="https://www.youtube.com" target="_blank" >
|
|
||||||
<img src="@/assets/images/socialMediaLogo/youTubeIcon.png" alt="">
|
|
||||||
</a>
|
|
||||||
<a href="https://www.xiaohongshu.com" target="_blank" >
|
|
||||||
<img src="@/assets/images/socialMediaLogo/xiaoHongShuIcon.png" alt="">
|
|
||||||
</a>
|
|
||||||
<a href="https://www.zhihu.com" target="_blank" >
|
|
||||||
<img src="@/assets/images/socialMediaLogo/zhiHuIcon.png" alt="">
|
|
||||||
</a>
|
|
||||||
<a href="https://www.bilibili.com/" target="_blank" >
|
|
||||||
<img src="@/assets/images/socialMediaLogo/biliBliIcon.png" alt="">
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="select_item_long"></div>
|
<div class="select_item_long"></div>
|
||||||
<div class="select_item" @click="logout()">
|
<div class="select_item" @click="logout()">
|
||||||
<span class="icon iconfont icon-tuichu"></span>
|
<span class="icon iconfont icon-tuichu"></span>
|
||||||
@@ -582,7 +561,7 @@ export default defineComponent({
|
|||||||
const getIdExistToHistory = async () => {
|
const getIdExistToHistory = async () => {
|
||||||
return await new Promise((resolve, reject) => {
|
return await new Promise((resolve, reject) => {
|
||||||
let value = {
|
let value = {
|
||||||
id: Number(route.params?.id || route.query?.history)
|
id: Number(route.query?.id || route.query?.history)
|
||||||
}
|
}
|
||||||
Https.axiosPost(Https.httpUrls.historyProject, value)
|
Https.axiosPost(Https.httpUrls.historyProject, value)
|
||||||
.then(rv => {
|
.then(rv => {
|
||||||
@@ -603,9 +582,9 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
const key = Object.keys(query)?.[0]
|
const key = Object.keys(query)?.[0]
|
||||||
if (key) {
|
if (key) {
|
||||||
if (route.params?.id && !query.tools) {
|
if (query.id && !query.tools) {
|
||||||
homeMainData.openType = 'history'
|
homeMainData.openType = 'history'
|
||||||
homeMainData.openTypeChild = route.params?.id
|
homeMainData.openTypeChild = query.id
|
||||||
} else {
|
} else {
|
||||||
homeMainData.openType = Object.keys(query)[0]
|
homeMainData.openType = Object.keys(query)[0]
|
||||||
homeMainData.openTypeChild = query[Object.keys(query)[0]]
|
homeMainData.openTypeChild = query[Object.keys(query)[0]]
|
||||||
@@ -614,6 +593,10 @@ export default defineComponent({
|
|||||||
homeMainData.openTypeChild = ''
|
homeMainData.openTypeChild = ''
|
||||||
homeMainData.openType = ''
|
homeMainData.openType = ''
|
||||||
}
|
}
|
||||||
|
if ((query?.id || query?.history) && !(await getIdExistToHistory())) {
|
||||||
|
router.push('/home')
|
||||||
|
return
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
homeMainData.openType = ''
|
homeMainData.openType = ''
|
||||||
homeMainData.openTypeChild = ''
|
homeMainData.openTypeChild = ''
|
||||||
@@ -933,12 +916,12 @@ export default defineComponent({
|
|||||||
rv.content.forEach((item, index) => {
|
rv.content.forEach((item, index) => {
|
||||||
let str = categorizeDate(item.updateTime) + 'list'
|
let str = categorizeDate(item.updateTime) + 'list'
|
||||||
homeMainData.navTypeList.history[str].push(item)
|
homeMainData.navTypeList.history[str].push(item)
|
||||||
if (item.id == (route.params?.id || route.query?.history)) {
|
if (item.id == (route.query?.id || route.query?.history)) {
|
||||||
existToHistoryIndex = rv.page * rv.size + index + 1 - rv.size
|
existToHistoryIndex = rv.page * rv.size + index + 1 - rv.size
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
homeMainData.historyData.isNull = false
|
homeMainData.historyData.isNull = false
|
||||||
if ((route.params?.id || route.query?.history) && isFound < 1) setScrollTop()
|
if ((route.query?.id || route.query?.history) && isFound < 1) setScrollTop()
|
||||||
} else {
|
} else {
|
||||||
homeMainData.historyData.isNoData = true
|
homeMainData.historyData.isNoData = true
|
||||||
}
|
}
|
||||||
@@ -2036,25 +2019,6 @@ export default defineComponent({
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.logo{
|
|
||||||
padding: 1rem 0.5rem;
|
|
||||||
gap: 1rem;
|
|
||||||
cursor: auto;
|
|
||||||
> a{
|
|
||||||
width: 2.5rem;
|
|
||||||
height: 2.5rem;
|
|
||||||
border-radius: .5rem;
|
|
||||||
overflow: hidden;
|
|
||||||
display: flex;
|
|
||||||
> img{
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&:hover {
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.select_item_long {
|
.select_item_long {
|
||||||
border-bottom: 1px solid #eceaea;
|
border-bottom: 1px solid #eceaea;
|
||||||
margin: 2rem 0;
|
margin: 2rem 0;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
:placeholder="t('batchGeneration.Search')"
|
:placeholder="t('batchGeneration.Search')"
|
||||||
@search="searchHistoryList"
|
@search="searchHistoryList"
|
||||||
/>
|
/>
|
||||||
<div class="history_table_content" ref="historyTable" @click.stop>
|
<div class="history_table_content" ref="historyTable">
|
||||||
<a-config-provider :locale="tableLocale">
|
<a-config-provider :locale="tableLocale">
|
||||||
<a-table
|
<a-table
|
||||||
row-class-name="history_table_row"
|
row-class-name="history_table_row"
|
||||||
@@ -28,14 +28,6 @@
|
|||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<template #bodyCell="{ column, text, record, index }">
|
<template #bodyCell="{ column, text, record, index }">
|
||||||
<div class="update_name" v-if="column?.key === 'collectionName'">
|
|
||||||
<div v-if="updateName.selectIndex === index">
|
|
||||||
<input type="text" v-model="updateName.currentName">
|
|
||||||
</div>
|
|
||||||
<div v-show="updateName.selectIndex !== index">{{ record.name }}</div>
|
|
||||||
<i @click="setUpdateName(record.name,index)" v-show="updateName.selectIndex !== index" class="fi fi-rr-edit"></i>
|
|
||||||
<i @click="submitUpdateName" v-show="updateName.selectIndex === index" class="fi fi-sr-check-circle"></i>
|
|
||||||
</div>
|
|
||||||
<div class="operate_list" v-if="column?.Operations">
|
<div class="operate_list" v-if="column?.Operations">
|
||||||
<div
|
<div
|
||||||
class="operate_item"
|
class="operate_item"
|
||||||
@@ -221,39 +213,6 @@ export default defineComponent({
|
|||||||
selectCode: selectCode,
|
selectCode: selectCode,
|
||||||
designType: ''
|
designType: ''
|
||||||
}
|
}
|
||||||
const updateName = ref({
|
|
||||||
currentName:'',
|
|
||||||
selectIndex:-1,
|
|
||||||
})
|
|
||||||
const clearUpdateName = () => {
|
|
||||||
updateName.value.currentName = ''
|
|
||||||
updateName.value.selectIndex = -1
|
|
||||||
document.removeEventListener('click',clearUpdateName)
|
|
||||||
}
|
|
||||||
const setUpdateName = (name,index) => {
|
|
||||||
updateName.value.currentName = name
|
|
||||||
updateName.value.selectIndex = index
|
|
||||||
document.addEventListener('click',clearUpdateName)
|
|
||||||
}
|
|
||||||
const submitUpdateName = ()=>{
|
|
||||||
if(updateName.value.currentName === collectionList.value[updateName.value.selectIndex].name){
|
|
||||||
clearUpdateName()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if(updateName.value.selectIndex != -1){
|
|
||||||
if(!updateName.value.currentName)return message.info(t('HistoryPage.jsContent8'))
|
|
||||||
let data = {
|
|
||||||
id: collectionList.value[updateName.value.selectIndex].id, //library名字
|
|
||||||
name: updateName.value.currentName //history id
|
|
||||||
}
|
|
||||||
Https.axiosPost(Https.httpUrls.projectSaveOrUpdate, data)
|
|
||||||
.then(rv => {
|
|
||||||
collectionList.value[updateName.value.selectIndex].name = updateName.value.currentName
|
|
||||||
clearUpdateName()
|
|
||||||
})
|
|
||||||
.catch(res => {})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
provide('type', type)
|
provide('type', type)
|
||||||
return {
|
return {
|
||||||
store,
|
store,
|
||||||
@@ -273,10 +232,7 @@ export default defineComponent({
|
|||||||
tableLocale,
|
tableLocale,
|
||||||
projectSetting,
|
projectSetting,
|
||||||
tableSearchBar,
|
tableSearchBar,
|
||||||
currentProjectPath,
|
currentProjectPath
|
||||||
updateName,
|
|
||||||
setUpdateName,
|
|
||||||
submitUpdateName,
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -652,7 +608,6 @@ export default defineComponent({
|
|||||||
customTableRow(record: any) {
|
customTableRow(record: any) {
|
||||||
return {
|
return {
|
||||||
onDblclick: () => {
|
onDblclick: () => {
|
||||||
if(this.updateName.selectIndex !== -1)return
|
|
||||||
this.retrieveHome(record)
|
this.retrieveHome(record)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -771,11 +726,6 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
:deep(.ant-table-tbody > tr:hover) {
|
:deep(.ant-table-tbody > tr:hover) {
|
||||||
background: #ededed;
|
background: #ededed;
|
||||||
.update_name{
|
|
||||||
> .fi-rr-edit{
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
:deep(.ant-table-tbody > tr > td) {
|
:deep(.ant-table-tbody > tr > td) {
|
||||||
border: none;
|
border: none;
|
||||||
@@ -830,26 +780,7 @@ export default defineComponent({
|
|||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.update_name{
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
> div{
|
|
||||||
> input{
|
|
||||||
width: 12rem;
|
|
||||||
border-radius: .8rem;
|
|
||||||
padding-left: 1.5rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
> i{
|
|
||||||
margin-left: 1.5rem;
|
|
||||||
cursor: pointer;
|
|
||||||
font-size: 2rem;
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
> .fi-rr-edit{
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.operate_list {
|
.operate_list {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -857,7 +788,7 @@ export default defineComponent({
|
|||||||
padding: 0 1rem;
|
padding: 0 1rem;
|
||||||
|
|
||||||
.operate_item {
|
.operate_item {
|
||||||
// font-size: 1.4rem;
|
font-size: 1.6rem;
|
||||||
font-family: Roboto;
|
font-family: Roboto;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #007ee5;
|
color: #007ee5;
|
||||||
|
|||||||
@@ -147,11 +147,11 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
//储存所有用户id和name
|
//储存所有用户id和name
|
||||||
// Https.axiosGet(Https.httpUrls.getAllUserId,).then((rv: any) => {
|
Https.axiosGet(Https.httpUrls.getAllUserId,).then((rv: any) => {
|
||||||
// if (rv) {
|
if (rv) {
|
||||||
// store.commit('setAllUserList',rv);
|
store.commit('setAllUserList',rv);
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
let allCountry = country
|
let allCountry = country
|
||||||
sessionStorage.setItem('allCountry',JSON.stringify(allCountry));
|
sessionStorage.setItem('allCountry',JSON.stringify(allCountry));
|
||||||
// state.nowPageName = state.rootSubmenuKeys[0].name
|
// state.nowPageName = state.rootSubmenuKeys[0].name
|
||||||
|
|||||||
Reference in New Issue
Block a user