Commit 42192f24 by kyle

pdf上传

parent a4914849
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
export default { export default {
name: "uploadFile", name: "uploadFile",
props: ['requestVO','deformats','opacity','instantly'], props: ['requestVO','deformats','opacity','instantly'],
emits:['sendPath'], emits:['sendPath','sendFileName'],
data() { data() {
return { return {
// 上传接口参数 // 上传接口参数
...@@ -135,8 +135,9 @@ ...@@ -135,8 +135,9 @@
// 演示上传完成后取服务端数据 // 演示上传完成后取服务端数据
if (item['responseText']) { if (item['responseText']) {
console.log('演示服务器返回的字符串JSON转对象'); console.log('演示服务器返回的字符串JSON转对象');
console.log(item.responseText)
// this.files.get(item.name).responseText = JSON.parse(item.responseText); // this.files.get(item.name).responseText = JSON.parse(item.responseText);
this.$emit('sendPath',item.responseText) this.$emit('sendPath',JSON.stringify(item.responseText),item.name)
} }
// 微信小程序Map对象for循环不显示,所以转成普通数组,不要问为什么,我也不知道 // 微信小程序Map对象for循环不显示,所以转成普通数组,不要问为什么,我也不知道
...@@ -148,12 +149,12 @@ ...@@ -148,12 +149,12 @@
this.$forceUpdate(); this.$forceUpdate();
// ---可删除--演示判断是否所有文件均已上传成功 // ---可删除--演示判断是否所有文件均已上传成功
let isAll = [...this.files.values()].find(item => item.type !== 'success'); // let isAll = [...this.files.values()].find(item => item.type !== 'success');
if (!isAll) { // if (!isAll) {
console.log('已全部上传完毕'); // console.log('已全部上传完毕');
} else { // } else {
console.log(isAll.name + '待上传'); // console.log(isAll.name + '待上传');
} // }
}, },
// 上传进度回调 // 上传进度回调
......
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
fileList: [], fileList: [],
fileForm: {}, fileForm: {},
erplizeList: null, erplizeList: null,
status:'' status:'',
} }
}, },
onLoad(option) { onLoad(option) {
...@@ -104,8 +104,10 @@ ...@@ -104,8 +104,10 @@
}, },
methods: { methods: {
getPath(e){ getPath(e,a){
console.log(e,'=======================') const param = JSON.parse(JSON.parse(e));
this.openForm.fileName = a;
this.openForm.planBookPdfUrl = param.data.filePath;
}, },
async getquerySignUpInfo() { async getquerySignUpInfo() {
let UserSignUpInfoQueryRequestVO = { let UserSignUpInfoQueryRequestVO = {
...@@ -200,7 +202,7 @@ ...@@ -200,7 +202,7 @@
.uploadimg { .uploadimg {
position: relative; position: relative;
height: 320rpx; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment