Commit 9068b4b8 authored by 田翔's avatar 田翔

fix: 数据字段取名称

parent e20f3d0f
{
"name": "panda-xform",
"version": "4.5.4",
"description": "4.5.4 数值只读后缀样式修复",
"version": "4.5.5",
"description": "4.5.5 数据字典改为存名称",
"keywords": [
"panda-xform"
],
......
......@@ -8,7 +8,7 @@ import { filenameVerification } from '../../../../utils'
import Drag from '../../../components/Drag'
const accepts = {
'全部': [],
'全部': ['.bmp', '.gif', '.jpeg', 'tiff', '.png', '.svg', '.jpg', '.docx', '.xlsx', '.pdf', '.mp4', '.mp3'],
'图片': ['.bmp', '.gif', '.jpeg', 'tiff', '.png', '.svg', '.jpg'],
'文档': ['.docx', '.xlsx', '.pdf'],
'视频': ['.mp4'],
......@@ -40,6 +40,9 @@ const getFileType = (fileName) => {
if (fileName.includes('pdf')) {
return 'pdf'
}
if (fileName.includes('pptx')) {
return 'pptx'
}
//音频
if (fileName.includes('mp3')) {
return 'mp3'
......@@ -121,6 +124,8 @@ const FileUpload = (props) => {
if (fileType) {
setShowFile({ name: file.name, fileType: fileType, filePath: file.url })
setVisible(true)
} else {
message.info('不支持该类型预览')
}
}
}
......
......@@ -15,7 +15,7 @@ const CheckBox = (props) => {
case '手动输入':
return Array.isArray(options) ? options : []
case '数据字典':
return Array.isArray(dictionaryList) ? dictionaryList.map(v => v.nodeValue) : []
return Array.isArray(dictionaryList) ? dictionaryList.map(v => v.nodeName) : []
case '表数据':
return Array.isArray(tableData) ? tableData : []
default:
......
......@@ -38,7 +38,7 @@ const ComboBox = (props) => {
case '手动输入':
return Array.isArray(options) ? options : []
case '数据字典':
return Array.isArray(dictionaryList) ? dictionaryList.map(v => v.nodeValue) : []
return Array.isArray(dictionaryList) ? dictionaryList.map(v => v.nodeName) : []
case '表数据':
return Array.isArray(tableData) ? tableData : []
case '站点':
......
......@@ -81,7 +81,7 @@ const RadioButton = (props) => {
case '手动输入':
return Array.isArray(options) ? options : []
case '数据字典':
return Array.isArray(dictionaryList) ? dictionaryList.map(v => v.nodeValue) : []
return Array.isArray(dictionaryList) ? dictionaryList.map(v => v.nodeName) : []
case '表数据':
return Array.isArray(tableData) ? tableData : []
case '站点':
......
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