提交 487ffca2 编写于 作者: tony001's avatar tony001

上传图片组件修改

上级 5b72929e
......@@ -135,6 +135,7 @@ export default class AppImageUpload extends Vue {
if (this.ignorefieldvaluechange) {
return;
}
this.getParams();
this.setFiles(newval)
this.dataProcess();
}
......@@ -294,6 +295,7 @@ export default class AppImageUpload extends Vue {
this.formStateEvent = this.formState.subscribe(($event: any) => {
// 表单加载完成
if (Object.is($event.type, 'load')) {
this.getParams();
this.setFiles(this.value);
this.dataProcess();
}
......@@ -308,26 +310,37 @@ export default class AppImageUpload extends Vue {
*/
public mounted() {
this.appData = this.$store.getters.getAppData();
this.getParams();
this.setFiles(this.value);
this.dataProcess();
}
let uploadparams: any = {};
let exportparams: any = {};
/**
*获取上传,导出参数
*
*@memberof AppImageUpload
*/
public getParams(){
let uploadparams: any = JSON.parse(JSON.stringify(this.uploadparams));
let exportparams: any = JSON.parse(JSON.stringify(this.exportparams));
let upload_params: Array<string> = [];
let export_params: Array<string> = [];
let custom_arr: Array<string> = [];
let param:any = this.viewparams;
let context:any = this.context;
let _data:any = JSON.parse(this.data);
if (this.uploadparams && !Object.is(this.uploadparams, '')) {
uploadparams = this.uploadparams;
upload_params = this.$util.computedNavData(_data,param,context,uploadparams);
upload_params = this.$util.computedNavData(_data,param,context,uploadparams);
}
if (this.exportparams && !Object.is(this.exportparams, '')) {
exportparams = this.exportparams;
export_params = this.$util.computedNavData(_data,param,context,exportparams);
}
this.upload_params = [];
this.export_params = [];
for (const item in upload_params) {
this.upload_params.push({
[item]:upload_params[item]
......@@ -338,9 +351,6 @@ export default class AppImageUpload extends Vue {
[item]:export_params[item]
})
}
this.setFiles(this.value);
this.dataProcess();
}
/**
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册