提交 1d03c58e 编写于 作者: WodahsOrez's avatar WodahsOrez

lxm--表格文件上传信息显示

上级 58f1586a
<template>
<codelist v-if="tag" :tag="tag" :value="value" :codelistType="codelistType" :renderMode="renderMode" :valueSeparator="valueSeparator" :textSeparator="textSeparator"></codelist>
<app-upload-file-info v-else-if="Object.is(this.editorType,'PICTURE') || Object.is(this.editorType,'PICTURE_ONE') || Object.is(this.editorType,'FILEUPLOADER')" :value="value" :name="name"></app-upload-file-info>
<span class="app-span" v-else >{{text}}</span>
</template>
......@@ -18,6 +19,14 @@ export default class DropDownList extends Vue {
*/
@Prop() public value?: any;
/**
* 当前表单项名称
*
* @type {*}
* @memberof AppSpan
*/
@Prop() public name?: any;
/**
* 代码表标识
*
......@@ -99,15 +108,6 @@ export default class DropDownList extends Vue {
public load(){
if(!this.value || this.tag){
return; //代码表走codelist组件
} else if(Object.is(this.editorType,'PICTURE') || Object.is(this.editorType,'PICTURE_ONE') || Object.is(this.editorType,'FILEUPLOADER')){
let files: any[] = JSON.parse(this.value);
let names: any[] = [];
if(files.length && files.length > 0){
files.forEach((item:any) => {
names.push(item.name);
});
this.text = names.join(',');
}
}else{
this.text = this.value;
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册