From abc4c37e2d9333419d575ff213dc2e544729f8e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=8B=E4=BA=8E=E5=88=9D=E8=A7=81?= <752204717@qq.com> Date: Thu, 20 Nov 2025 14:23:07 +0800 Subject: [PATCH] tijiao --- src/components/page/ReferenceEditor.vue | 185 ++++++++++++++++++------ 1 file changed, 141 insertions(+), 44 deletions(-) diff --git a/src/components/page/ReferenceEditor.vue b/src/components/page/ReferenceEditor.vue index 62ae9db..f5d1a41 100644 --- a/src/components/page/ReferenceEditor.vue +++ b/src/components/page/ReferenceEditor.vue @@ -142,6 +142,7 @@
+ 删除 - -
- - - - - - -
-

-   The above is the citation data identified according to your - uploaded file, you can choose to import, or discard this data and upload again. -

-
-
- - Abandon and Reimport - Import - -
- + +
+ +
+
- + -
+

-   We are currently identifying the citation data you uploaded. Please be patient. +   The above is the citation data identified according to your + uploaded file, you can choose to import, or discard this data and upload again. + We are currently identifying the citation data you uploaded. Please be patient. + +

- +
+
+ Cancel +
+ +
+
@@ -467,6 +455,10 @@ export default { data() { return { + uploadTimer: null,//调取进度条的轮询定时器 + isUpload: false,//文件是否上传中 + progressPercent: 0,//进度条当前进度 + curPercentage: 0, user_name: localStorage.getItem('U_relname'), holeLoading: false, // 进入页面的loading importIoading: false, @@ -563,7 +555,55 @@ export default { this.getRefData(); this.holeLoading = true; }, + beforeDestroy() { + clearInterval(this.uploadTimer); + }, methods: { + async getProgress() { + var that = this; + + var progress = 0; + + // await axios + // .get('获取进度条接口地址') + // .then(async (res) => { + //percent是后端返回的进度 + progress = Number(this.progressPercent+1); + if (progress == this.Tempredable.length) { + + this.isUpload = false; + clearInterval(this.uploadTimer); + that.uploadTimer = null; + + + this.$forceUpdate(); + } + // }); + + return progress; + }, + + // 删除部分引用 + deleteSomeRefs() { + var ids = []; + ids = this.tableData.map((item) => { + + return item.p_refer_id; + }); + console.log('ids at line 570:', ids) + + this.$api + .post('api/Preaccept/delRefers', { + ids: ids + }) + .then((res) => { + + + }) + .catch((err) => { + + }); + }, tableRowStyle({ row }) { if (row.is_repeat === 1) { return { backgroundColor: '#ffecec' }; // 浅红色 @@ -632,7 +672,7 @@ export default { this.helpVisible = true; }, handleparse() { - this.linVisible = false; + // this.linVisible = false; // setTimeout(() => { this.getParseData(); // }, 1000); @@ -647,6 +687,7 @@ export default { }); setTimeout(() => {loading.close() this.parseVisible = true; + this.isUpload=true }, 2000); @@ -1074,6 +1115,8 @@ export default { return this.baseUrl + 'api/Preaccept/up_refer_file'; } }, + + watch: { SourceType: { handler(newVal, oldVal) { @@ -1086,7 +1129,22 @@ export default { }, // immediate: true, deep: true // 可以深度检测到 person 对象的属性值的变化 + }, + //监听文件是否上传 + isUpload: { + handler(val, oldVal) { + if (this.isUpload) { + this.uploadTimer = setInterval(async () => { + //需要定时执行的代码 + this.progressPercent = await this.getProgress(); + }, 1000); + } else { + clearInterval(this.uploadTimer); + this.currentFile = {}; } + }, + deep: true, + }, } }; @@ -1238,4 +1296,43 @@ p { /deep/ .el-table tr:nth-child(2n) { background: #fff; } +::v-deep .reference-dialog .el-dialog__body{ + padding: 0 20px !important; +} +.newpro .el-progress-bar__inner:before { + content: ""; + width: 100%; + height: 100%; + display: block; + background-image: repeating-linear-gradient( + -45deg, + hsla(0, 0%, 100%, 0.15) 25%, + transparent 0, + transparent 50%, + hsla(0, 0%, 100%, 0.15) 0, + hsla(0, 0%, 100%, 0.15) 75%, + transparent 0, + transparent + ); + background-size: 40px 40px; + animation: mymove 2s linear infinite; +} +@keyframes mymove { + 0% { + background-position: 0; + } + 25% { + background-position: 50px; + } + 50% { + background-position: 100px; + } + 75% { + background-position: 150px; + } + 100% { + background-position: 200px; + } +} +