|
@@ -365,13 +365,13 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
- getFileList() {
|
|
|
- getFileList().then((resp) => {
|
|
|
- this.fileList = resp.data;
|
|
|
- console.info(resp);
|
|
|
- console.info(this);
|
|
|
- });
|
|
|
- },
|
|
|
+ // getFileList() {
|
|
|
+ // getFileList().then((resp) => {
|
|
|
+ // this.fileList = resp.data;
|
|
|
+ // console.info(resp);
|
|
|
+ // console.info(this);
|
|
|
+ // });
|
|
|
+ // },
|
|
|
|
|
|
getInputFileList() {
|
|
|
getInputFileList(this.form.subTypeId).then((resp) => {
|
|
@@ -545,8 +545,12 @@ export default {
|
|
|
filePath = item.path;
|
|
|
}
|
|
|
}
|
|
|
- const response = await axios.get(this.realSrc(filePath), { responseType: 'text' });
|
|
|
- this.fileContent = response.data;
|
|
|
+ if (filePath) {
|
|
|
+ const response = await axios.get(this.realSrc(filePath), { responseType: 'text' });
|
|
|
+ this.fileContent = response.data;
|
|
|
+ }
|
|
|
+ // const response = await axios.get(this.realSrc(filePath), { responseType: 'text' });
|
|
|
+ // this.fileContent = response.data;
|
|
|
} catch (error) {
|
|
|
console.error("Error fetching the file:", error);
|
|
|
alert('无法加载文件内容');
|