Compare commits
12 Commits
main
...
652d89d3be
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
652d89d3be | ||
|
|
17edeef461 | ||
|
|
aad6919ec3 | ||
|
|
baf161e695 | ||
|
|
51751f6b5e | ||
|
|
c1b051a185 | ||
| 1a5e285f09 | |||
| 911d1d8477 | |||
| e0261d4a37 | |||
| 50cb33ac43 | |||
| 261064bd23 | |||
| a1e8f3295e |
@@ -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
|
||||
@@ -1250,10 +1250,14 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
|
||||
background: #000 !important;
|
||||
border-color: #000 !important;
|
||||
}
|
||||
.ant-spin .ant-spin-dot {
|
||||
width: 1.5em;
|
||||
height: 1.5em;
|
||||
}
|
||||
.ant-spin-dot-item {
|
||||
background-color: #000000 !important;
|
||||
width: 9px !important;
|
||||
height: 9px !important;
|
||||
width: 0.9em !important;
|
||||
height: 0.9em !important;
|
||||
}
|
||||
.ant-spin {
|
||||
color: #000;
|
||||
|
||||
@@ -1378,10 +1378,14 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
|
||||
}
|
||||
}
|
||||
//loding样式
|
||||
.ant-spin .ant-spin-dot{
|
||||
width: 1.5em;
|
||||
height: 1.5em;
|
||||
}
|
||||
.ant-spin-dot-item{
|
||||
background-color: #000000 !important;
|
||||
width: 9px !important;
|
||||
height: 9px !important;
|
||||
width: .9em !important;
|
||||
height: .9em !important;
|
||||
}
|
||||
.ant-spin{
|
||||
color: #000;
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="layout_centent" :class="{active:flex_direction}" id="layoutCentent">
|
||||
<div v-for="item,index in layoutList" :key="item" :class="moodbClassName[index]" class="modal_imgItem" v-layout="item" @mousedown="setpitch(item,index)" @touchstart="setpitch(item,index)" ref="content" >
|
||||
<img crossOrigin="anonymous" :src="item.imgUrl" :style="{'transform':`translate(-50%, -50%) scale(${item.zoom?item.zoom:1}) rotateZ(${item.angle?item.angle:0}deg)`}" draggable="false" :class="moodbClassName[index]" v-modelImg>
|
||||
<div v-for="item,index in layoutList" :key="item" :class="moodbClassName[index]" class="modal_imgItem" v-layout="item" @mousedown="setpitch(item,index)" @touchstart="setpitch(item,index)" ref="content" :style="{'background-image':`url(${item.imgUrl})`,'transform':`scale(${item.zoom?item.zoom:1}) rotateZ(${item.angle?item.angle:0}deg)`}">
|
||||
<!-- <img crossOrigin="anonymous" :src="item.imgUrl" :style="{'transform':`translate(-50%, -50%) scale(${item.zoom?item.zoom:1}) rotateZ(${item.angle?item.angle:0}deg)`}" draggable="false" :class="moodbClassName[index]" v-modelImg> -->
|
||||
<ul v-show="item.setPitch" class="layout_btn" >
|
||||
<li class="layout_btn_top" v-compile.stop="'top'"></li>
|
||||
<li class="layout_btn_bottom" v-compile.stop="'bottom'"></li>
|
||||
@@ -736,6 +736,7 @@ export default defineComponent({
|
||||
setmoodb(item:any){
|
||||
this.moodbClassName = item
|
||||
this.$emit('setmoodbClass',this.moodbClassName)
|
||||
this.styleObj.class = this.moodbClassName
|
||||
if(this.content){
|
||||
for (item of (this.content as any)) {
|
||||
item.classList.remove('active')
|
||||
@@ -772,7 +773,7 @@ export default defineComponent({
|
||||
initDomStyle(){
|
||||
nextTick(()=>{
|
||||
this.content.forEach((item:any,index:any) => {
|
||||
if(this.styleObj.domStyle[index]){
|
||||
if(this.styleObj.domStyle[index]?.left){
|
||||
item.classList.add('active')
|
||||
this.initStyle(item,this.styleObj.domStyle[index])
|
||||
}
|
||||
@@ -794,7 +795,7 @@ export default defineComponent({
|
||||
})
|
||||
},
|
||||
initStyle(dom:any,style:any){
|
||||
if(!style)return
|
||||
if(!style || !dom)return
|
||||
for (const [property, value] of Object.entries(style)) {
|
||||
|
||||
dom.style.setProperty(property, value);
|
||||
@@ -806,7 +807,7 @@ export default defineComponent({
|
||||
this.styleObj.domStyle.push(this.setStyle(item.style))
|
||||
this.domObj.dom.forEach((domName:any,index:any) => {
|
||||
let style = this.domObj.domStyle[index]
|
||||
let dom = item.querySelector(domName)
|
||||
let dom = item.querySelector(domName) || item
|
||||
this.styleObj[style].push(this.setStyle(dom.style))
|
||||
})
|
||||
});
|
||||
@@ -840,7 +841,6 @@ export default defineComponent({
|
||||
let config:any = {headers:{'Content-Type':'multipart/form-data','Accept':'*/*' }}
|
||||
Https.axiosPost(Https.httpUrls.elementUpload,param,config)
|
||||
.then((rv: any) => {
|
||||
// console.log(rv);
|
||||
rv.imgUrl = rv.url
|
||||
this.layout = false
|
||||
this.loadingShow = false
|
||||
@@ -1062,27 +1062,12 @@ export default defineComponent({
|
||||
// height: 100%;
|
||||
// }
|
||||
overflow: hidden;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
&.active{
|
||||
position: absolute;
|
||||
}
|
||||
img{
|
||||
// object-fit: cover;
|
||||
// width: 100%;
|
||||
// height: 100%;
|
||||
pointer-events: none;
|
||||
float: left;
|
||||
user-select:none;
|
||||
-webkit-user-drag: none;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%,-50%) scale(1);
|
||||
}
|
||||
::selection {
|
||||
// background: rgba(0,0,0,0);
|
||||
// background: yellow;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
.wh1{
|
||||
|
||||
@@ -458,6 +458,7 @@ export default defineComponent({
|
||||
message.info(t('newScaleImage.jsContent2'))
|
||||
return
|
||||
}
|
||||
store.state.Workspace.cachedRoutes = [];
|
||||
let id = await getWorks(imgData.scaleImageData.id)
|
||||
await router.push(`/home/history/${id}`)
|
||||
store.commit('setChooseIsDesign',false)
|
||||
|
||||
@@ -132,8 +132,8 @@
|
||||
</div>
|
||||
<div class="modal_img_max">
|
||||
<div v-if="!modalImg[0]?.id" class="modal_img" id="modal_img" :class="{active:flex_direction}">
|
||||
<div v-for="item,index in layoutList" :class="[moodb_className[index]]" class="modal_imgItem">
|
||||
<img :src="item.imgUrl" v-modelImg>
|
||||
<!-- <div class="modal_img" id="modal_img" :class="{active:flex_direction}"> -->
|
||||
<div v-for="item,index in layoutList" :class="[moodb_className[index]]" :style="{'background-image':`url(${item.imgUrl})`}" class="modal_imgItem">
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="modal_img">
|
||||
@@ -244,30 +244,6 @@ export default defineComponent({
|
||||
this.token = getCookie("token") || "";
|
||||
this.uploadUrl = getUploadUrl();
|
||||
},
|
||||
directives:{
|
||||
modelImg:{
|
||||
mounted(el) {
|
||||
let parentNode = el.parentNode
|
||||
if(parentNode.offsetHeight >= parentNode.offsetWidth){
|
||||
el.style.height = 100+'%'
|
||||
el.style.width = 'auto'
|
||||
}else{
|
||||
el.style.width = 100+'%'
|
||||
el.style.height = 'auto'
|
||||
}
|
||||
},
|
||||
updated (el) {
|
||||
let parentNode = el.parentNode
|
||||
if(parentNode.offsetHeight >= parentNode.offsetWidth){
|
||||
el.style.height = 100+'%'
|
||||
el.style.width = 'auto'
|
||||
}else{
|
||||
el.style.width = 100+'%'
|
||||
el.style.height = 'auto'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(num: Number) {
|
||||
this.openClick = num;
|
||||
@@ -445,7 +421,7 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
this.edieShow = true
|
||||
if(this.moodb_[arr.length-1].length == 2){
|
||||
if(this.moodb_[arr.length-1].length == 1){
|
||||
this.moodb_className = this.moodb_[arr.length-1][0]
|
||||
}else{
|
||||
this.moodb_className = this.moodb_[arr.length-1][random]
|
||||
@@ -628,6 +604,7 @@ export default defineComponent({
|
||||
height: calc(5rem*1.2);
|
||||
overflow-x: hidden;
|
||||
display: flex;
|
||||
|
||||
&.modal_img::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
@@ -706,15 +683,9 @@ export default defineComponent({
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
text-align: center;
|
||||
img{
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%,-50%);
|
||||
// float: left;
|
||||
// user-select:none;
|
||||
// -webkit-user-drag: none;
|
||||
}
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
}
|
||||
.wh1{
|
||||
width: 23%;
|
||||
|
||||
@@ -242,7 +242,16 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="prompt-input-container" v-show="!showMotion">
|
||||
<div class="title">{{ $t('ProductImg.Prompt') }}</div>
|
||||
<div class="title">
|
||||
<span>{{ $t('ProductImg.Prompt') }}</span>
|
||||
<SvgIcon
|
||||
class="cursor-icon"
|
||||
@click="handleNavigateHelp"
|
||||
name="CHelpFlip"
|
||||
size="18"
|
||||
color="#000"
|
||||
/>
|
||||
</div>
|
||||
<promptInput :content="prompt" ref="promptInputRef" />
|
||||
</div>
|
||||
<div class="transferPose" v-show="showMotion">
|
||||
@@ -380,7 +389,7 @@
|
||||
<a-spin size="large" />
|
||||
</div>
|
||||
<template>
|
||||
<Prompt v-if="scaleImageList[scaleImageIndex]?.resultType === 'ToProductImage'" v-model:showModal="showPromptAssist" isDesignPage />
|
||||
<Prompt v-if="scaleImageList[scaleImageIndex]?.resultType === 'ToProductImage'" v-model:showModal="showPromptAssist" />
|
||||
<PromptEditProduct v-if="scaleImageList[scaleImageIndex]?.resultType === 'Relight'" v-model:showModal="showPromptAssist" />
|
||||
</template>
|
||||
<Product
|
||||
@@ -450,7 +459,7 @@ export default defineComponent({
|
||||
let userDetail: any = computed(() => {
|
||||
return store.state.UserHabit.userDetail
|
||||
})
|
||||
let { t } = useI18n()
|
||||
let { t, locale } = useI18n()
|
||||
const textareaRef = useTemplateRef<HTMLTextAreaElement>('textareaRef')
|
||||
const videoType = ref(2)
|
||||
const showMotion = computed(() => videoType.value === 1)
|
||||
@@ -599,13 +608,13 @@ export default defineComponent({
|
||||
})
|
||||
const showPromptAssist = ref(false)
|
||||
const handleClickAssistBtn = () => {
|
||||
const { httpType } = store.state.Workspace.probjects
|
||||
const isSingleDesign = httpType === 'SINGLE_DESIGN'
|
||||
if (!isSingleDesign) {
|
||||
const promptText = t('ProductImg.Series')
|
||||
productimg.productimgSearchName = promptText
|
||||
return
|
||||
}
|
||||
// const { httpType } = store.state.Workspace.probjects
|
||||
// const isSingleDesign = httpType === 'SINGLE_DESIGN'
|
||||
// if (!isSingleDesign) {
|
||||
// const promptText = t('ProductImg.Series')
|
||||
// productimg.productimgSearchName = promptText
|
||||
// return
|
||||
// }
|
||||
showPromptAssist.value = true
|
||||
}
|
||||
|
||||
@@ -1310,7 +1319,13 @@ export default defineComponent({
|
||||
return videoType.value === 3 ? false : true
|
||||
}
|
||||
})
|
||||
|
||||
const handleNavigateHelp = () => {
|
||||
const url =
|
||||
locale === 'CHINESE_SIMPLIFIED'
|
||||
? 'https://aida-user-manual-chinese.super.site/2b08f755cedd80a985cffdf2af80c538'
|
||||
: 'https://aida-user-manual.super.site/advanced-tool/animated-product-image/to-product-video-prompt-assist '
|
||||
window.open(url,'_blank')
|
||||
}
|
||||
onBeforeUnmount(() => {
|
||||
clearInterval(prductimgTime)
|
||||
clearInterval(remPrductimgTime)
|
||||
@@ -1374,7 +1389,8 @@ export default defineComponent({
|
||||
handlePlayNewVideo,
|
||||
isNewVideoPlaying,
|
||||
showDropdown,
|
||||
inputPlaceholder
|
||||
inputPlaceholder,
|
||||
handleNavigateHelp
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -1786,12 +1802,16 @@ export default defineComponent({
|
||||
:deep(.promptInput) {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.title {
|
||||
font-weight: 500;
|
||||
color: #000;
|
||||
font-size: 1.7rem;
|
||||
margin-bottom: 1.4rem;
|
||||
}
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
column-gap: 1rem;
|
||||
.cursor-icon {
|
||||
display: flex;
|
||||
width: auto;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
.prompt-container {
|
||||
margin-top: 4rem;
|
||||
|
||||
@@ -55,13 +55,16 @@ export default defineComponent({
|
||||
const data = reactive({
|
||||
openType:'',
|
||||
componentKey:null,
|
||||
isShowMark:false,
|
||||
isShowMark:true,
|
||||
routeQuery:{} as any,
|
||||
selectObject:computed(()=>store.state.Workspace.probjects) as any,//选择的项目
|
||||
chatData:null as any,
|
||||
dataLoad:true as any,
|
||||
cachedRoutes:computed(()=>store.state.Workspace.cachedRoutes),//
|
||||
})
|
||||
onMounted(()=>{
|
||||
data.isShowMark = false
|
||||
})
|
||||
let settingGetHistory:any = inject('settingGetHistory')
|
||||
const setIsShowMark = (boolean:boolean)=>{
|
||||
data.isShowMark = boolean
|
||||
|
||||
@@ -121,7 +121,7 @@ const promptList = computed(() => {
|
||||
return [t('ProductImg.UploadWithoutModel'), t('ProductImg.UploadWithModel')]
|
||||
} else {
|
||||
// 如果是从design来的
|
||||
if (isSingleDesign) {
|
||||
if (props.isDesignPage) {
|
||||
// SINGLE_DESIGN: 两个提示词
|
||||
// 根据年龄和性别选择对应的提示词
|
||||
let firstPrompt: string // 不带模特的提示词
|
||||
@@ -255,8 +255,8 @@ const exampleList = computed(() => {
|
||||
}
|
||||
} else {
|
||||
const { ageGroup, httpType, sex } = store.state.Workspace.probjects
|
||||
const isSingleDesign = httpType === 'SINGLE_DESIGN'
|
||||
if (!isSingleDesign) return {}
|
||||
// const isSingleDesign = httpType === 'SINGLE_DESIGN'
|
||||
// if (!isSingleDesign) return {}
|
||||
const isAdult = ageGroup === 'Adult'
|
||||
const isFemale = sex === 'Female'
|
||||
if (isAdult) {
|
||||
|
||||
@@ -1101,13 +1101,13 @@ export default defineComponent({
|
||||
|
||||
const showPromptAssist = ref(false)
|
||||
const handleClickAssistBtn = () => {
|
||||
const { httpType } = store.state.Workspace.probjects
|
||||
const isSingleDesign = httpType === 'SINGLE_DESIGN'
|
||||
if (props.isDesignPage && !isSingleDesign) {
|
||||
const promptText = t('ProductImg.Series')
|
||||
productImgData.searchName[props.productimgMenu.value] = promptText
|
||||
return
|
||||
}
|
||||
// const { httpType } = store.state.Workspace.probjects
|
||||
// const isSingleDesign = httpType === 'SINGLE_DESIGN'
|
||||
// if (props.isDesignPage && !isSingleDesign) {
|
||||
// const promptText = t('ProductImg.Series')
|
||||
// productImgData.searchName[props.productimgMenu.value] = promptText
|
||||
// return
|
||||
// }
|
||||
showPromptAssist.value = true
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<ul
|
||||
class="product_detail"
|
||||
:class="[
|
||||
{ academic: item.type == 'academic' && !isSelectSuccessively },
|
||||
{ academic: item.type == 'academic' },
|
||||
{ chinese: isSelectSuccessively }
|
||||
]"
|
||||
>
|
||||
@@ -106,12 +106,12 @@ export default defineComponent({
|
||||
Yearly: '年度',
|
||||
monthly: [
|
||||
{
|
||||
title: '免费版',
|
||||
title: '使用版',
|
||||
img: CChargeIcon,
|
||||
type: 'personal',
|
||||
info: '您的AI时尚设计助手',
|
||||
price: 'HK$0',
|
||||
detail: '5天·50积分',
|
||||
detail: '自注册之日起 5 天内 · 50 个积分',
|
||||
highlight: '',
|
||||
discounts: '9折优惠',
|
||||
detailList: [
|
||||
@@ -185,12 +185,12 @@ export default defineComponent({
|
||||
],
|
||||
yearl: [
|
||||
{
|
||||
title: '免费版',
|
||||
title: '试用版',
|
||||
img: CChargeIcon,
|
||||
type: 'personal',
|
||||
info: '您的AI时尚设计助手',
|
||||
price: 'HK$0',
|
||||
detail: '5天·50积分',
|
||||
detail: '自注册之日起 5 天内 · 50 个积分',
|
||||
highlight: '',
|
||||
discounts: '9折优惠',
|
||||
detailList: [
|
||||
@@ -250,12 +250,12 @@ export default defineComponent({
|
||||
Yearly: 'Yearly',
|
||||
monthly: [
|
||||
{
|
||||
title: 'Free',
|
||||
title: 'Trial',
|
||||
img: CChargeIcon,
|
||||
type: 'personal',
|
||||
info: 'Your AI Fashion Design Assistant',
|
||||
price: 'HK$0',
|
||||
detail: '5 days · 50 credits',
|
||||
detail: '5 days from sign-up · 50 credits',
|
||||
highlight: '',
|
||||
discounts: '10% off',
|
||||
detailList: [
|
||||
@@ -329,12 +329,12 @@ export default defineComponent({
|
||||
],
|
||||
yearl: [
|
||||
{
|
||||
title: 'Free',
|
||||
title: 'Trial',
|
||||
img: CChargeIcon,
|
||||
type: 'free',
|
||||
type: 'personal',
|
||||
info: 'Your AI Fashion Design Assistant',
|
||||
price: 'HK$0',
|
||||
detail: '5 days · 50 credits',
|
||||
detail: '5 days from sign-up · 50 credits',
|
||||
highlight: '',
|
||||
discounts: '10% off',
|
||||
detailList: [
|
||||
|
||||
Reference in New Issue
Block a user