Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
commit
0327937f02
|
|
@ -1,32 +1,4 @@
|
||||||
kind: pipeline
|
|
||||||
type: ssh
|
|
||||||
name: ssh-linux-uat-irc-publish
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: Linux
|
|
||||||
arch: 386
|
|
||||||
|
|
||||||
clone:
|
|
||||||
disable: true #禁用默认克隆
|
|
||||||
|
|
||||||
server:
|
|
||||||
host: 47.117.164.182
|
|
||||||
user: root
|
|
||||||
password:
|
|
||||||
from_secret: local_pwd
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: uat-branch-publish-irc-vue
|
|
||||||
commands:
|
|
||||||
- cd /opt/1panel/vue-devops/Uat_IRC/Uat-To-Uat
|
|
||||||
- sh uat-to-uat.sh v${DRONE_BUILD_NUMBER}
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
- uat
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: ssh
|
type: ssh
|
||||||
name: ssh-linux-test-irc-publish
|
name: ssh-linux-test-irc-publish
|
||||||
|
|
@ -45,12 +17,17 @@ server:
|
||||||
from_secret: local_pwd
|
from_secret: local_pwd
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: publish-test-irc-vue
|
- name: publish-test-irc-web
|
||||||
commands:
|
commands:
|
||||||
- echo start publish test-irc-vue
|
- bash /opt/1panel/xc-deploy-new/devops-center/build-vue-then-publish.sh IRC_Web main
|
||||||
- cd /opt/1panel/hang/vue/test-irc
|
- name: notify-wecom
|
||||||
- sh test-irc.sh v${DRONE_BUILD_NUMBER}
|
commands:
|
||||||
|
- echo $DRONE_COMMIT_AUTHOR "$DRONE_COMMIT_MESSAGE"
|
||||||
|
- bash /opt/1panel/xc-deploy-new/devops-center/drone-notify-wecom.sh "$DRONE_BUILD_STATUS" "$DRONE_REPO_NAME" "$DRONE_BRANCH" "$DRONE_BUILD_NUMBER" "4355b98e-1e72-4678-8dfb-2fc6ad0bf449" "$DRONE_COMMIT_MESSAGE" "$DRONE_COMMIT_AUTHOR" "Test_IRC_WEB" "irc.test.extimaging.com"
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- success
|
||||||
|
- failure
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- main
|
- main
|
||||||
|
|
|
||||||
|
|
@ -712,11 +712,12 @@ export default {
|
||||||
this.model_cfg.visible = false
|
this.model_cfg.visible = false
|
||||||
this.model_cfg.showClose = true
|
this.model_cfg.showClose = true
|
||||||
console.log(res.Result)
|
console.log(res.Result)
|
||||||
for (let i = 0; res.Result.length > i; i++) {
|
this.downloadAllInOneZip(res.Result)
|
||||||
let item = res.Result[i]
|
// for (let i = 0; res.Result.length > i; i++) {
|
||||||
console.log(item)
|
// let item = res.Result[i]
|
||||||
await this.handleBatchDown(item)
|
// console.log(item)
|
||||||
}
|
// await this.handleBatchDown(item)
|
||||||
|
// }
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
|
|
@ -736,6 +737,54 @@ export default {
|
||||||
// this.model_cfg.showClose = true
|
// this.model_cfg.showClose = true
|
||||||
// })
|
// })
|
||||||
},
|
},
|
||||||
|
async downloadAllInOneZip(arr) {
|
||||||
|
if (!arr.length) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const zip = new JSZip()
|
||||||
|
const allTasks = []
|
||||||
|
arr.forEach((reviewer) => {
|
||||||
|
if (!reviewer?.FileList?.length) return
|
||||||
|
|
||||||
|
reviewer.FileList.forEach((fileItem) => {
|
||||||
|
const fileUrl = this.OSSclientConfig.basePath + fileItem.Path
|
||||||
|
const zipPath = `${reviewer.Name}_${fileItem.FileName}`
|
||||||
|
|
||||||
|
const task = this.getFileData(fileUrl)
|
||||||
|
.then((response) => {
|
||||||
|
zip.file(zipPath, response.data, { binary: true })
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.error(`文件下载失败 [${zipPath}]:`, err)
|
||||||
|
});
|
||||||
|
allTasks.push(task)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
if (allTasks.length === 0) {
|
||||||
|
console.log('无可下载的文件')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
await Promise.all(allTasks)
|
||||||
|
|
||||||
|
// 生成 ZIP
|
||||||
|
const zipBlob = await zip.generateAsync({
|
||||||
|
type: 'blob',
|
||||||
|
compression: 'DEFLATE',
|
||||||
|
compressionOptions: { level: 9 },
|
||||||
|
})
|
||||||
|
|
||||||
|
// 下载
|
||||||
|
saveAs(zipBlob, `CV_${new Date().getTime()}.zip`)
|
||||||
|
|
||||||
|
console.error('ZIP 生成成功')
|
||||||
|
} catch (err) {
|
||||||
|
console.error('ZIP 生成失败:', err)
|
||||||
|
} finally {
|
||||||
|
}
|
||||||
|
},
|
||||||
// 查询
|
// 查询
|
||||||
handleSelectSearch() {
|
handleSelectSearch() {
|
||||||
this.searchData.PageIndex = 1
|
this.searchData.PageIndex = 1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue