From fb4cd39a7624588791a960f5774986e92a341591 Mon Sep 17 00:00:00 2001
From: "@fawn-nine" <1271023382@qq.com>
Date: Thu, 17 Aug 2023 14:46:51 +0800
Subject: [PATCH] =?UTF-8?q?=E9=99=84=E5=8A=A0=E6=96=87=E4=BB=B6=E4=B8=8A?=
=?UTF-8?q?=E4=BC=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/page/articleListEditor_B1.vue | 72 ++++++++++++++++++++
1 file changed, 72 insertions(+)
diff --git a/src/components/page/articleListEditor_B1.vue b/src/components/page/articleListEditor_B1.vue
index 06c88bc..2e9a095 100644
--- a/src/components/page/articleListEditor_B1.vue
+++ b/src/components/page/articleListEditor_B1.vue
@@ -374,6 +374,19 @@
Only pdf or word files can be
uploaded.
+
+
+ upload
+
+ Only zip files can be
+ uploaded.
+
@@ -1050,6 +1063,7 @@
file_picF: [],
fileL_sub: [],
fileL_sub2: [],
+ fileL_sub41:[],
fileL_Note: [],
fileL_Tex: [],
fileL_Icm: [],
@@ -1292,6 +1306,12 @@
this.fileL_Icm[0].name = 'articleCDF';
this.fileL_Icm[0].url = this.mediaUrl + 'articleCDF/' + res.data.production.file_cdf;
}
+
+ if (res.data.production.file_original != "") {
+ this.fileL_sub41 = [{}];
+ this.fileL_sub41[0].name = 'Original';
+ this.fileL_sub41[0].url = this.mediaUrl + 'Original/' + res.data.production.file_original;
+ }
// if (this.detailMes.main != '') {
@@ -2226,6 +2246,11 @@
this.fileL_sub2 = [fileList[fileList.length - 1]]
}
},
+ handleChange41(file, fileList) {
+ if (fileList.length > 0) {
+ this.fileL_sub41 = [fileList[fileList.length - 1]]
+ }
+ },
handleChange5(file, fileList) {
if (fileList.length > 0) {
this.fileL_Note = [fileList[fileList.length - 1]]
@@ -2290,6 +2315,30 @@
this.$message.error(res.msg);
}
},
+ handleFileSuccess41(res, file) {
+ if (res.code == 0) {
+ this.$api
+ .post('api/Production/editArticleFile', {
+ 'p_article_id': this.p_article_id,
+ 'filetype': 'Original',
+ 'fileURL': res.upurl
+ })
+ .then(res => {
+ if (res.code == 0) {
+ this.$message.success('Original Data File upload succeeded!');
+ this.getData();
+ } else {
+ this.$message.error(res.msg);
+ }
+ })
+ .catch(err => {
+ this.$message.error(err);
+ });
+ } else {
+ this.$message.error(res.msg);
+ }
+
+ },
handleFileSuccess5(res, file) {
if (res.code == 0) {
this.$api
@@ -2393,6 +2442,7 @@
});
});
},
+
beforeRemove4(file, fileList) {
return this.$confirm(`Are you sure to remove ${ file.name }?`).then(() => {
this.$api
@@ -2414,6 +2464,28 @@
});
});
},
+ beforeRemove41(file, fileList) {
+ return this.$confirm(`Are you sure to remove ${ file.name }?`).then(() => {
+ this.$api
+ .post('master/Article/editArticleFile', {
+ 'p_article_id': this.p_article_id,
+ 'filetype': 'Original',
+ 'fileURL': ''
+ })
+ .then(res => {
+ if (res.code == 0) {
+ this.$message.success('Original Data File deleted successfully!');
+ this.getData();
+ } else {
+ this.$message.error(res.msg);
+ }
+ })
+ .catch(err => {
+ this.$message.error(err);
+ });
+ // console.log('删除附加文件')
+ });
+ },
beforeRemove5(file, fileList) {
return this.$confirm(`Are you sure to remove ${ file.name }?`).then(() => {
this.$api