Commit 3683972f authored by 田翔's avatar 田翔

fix: 增加压缩文件配置默认为压缩

parent 68cda385
{
"name": "panda-xform",
"version": "5.9.2",
"description": "5.9.2 身份认证bug",
"version": "5.9.3",
"description": "5.9.3 增加压缩文件配置默认为压缩",
"keywords": [
"panda-xform"
],
......
......@@ -3,7 +3,8 @@ import { commonSettings, switchSettings, elementSettings } from './otherSettings
import { GroupOutlined } from '@ant-design/icons'
import IconPack from '../../components/IconPack'
const disabled = '{{formData.tableTypeParent === "物联设备表" && formData.IsSystemField}}'
// const disabled = '{{formData.tableTypeParent === "物联设备表" && formData.IsSystemField}}'
const disabled = '{{formData.tableTypeParent === "物联设备表" && formData.$id === "编码"}}'
const groupStyle = {
groupStyle: {
......@@ -35,10 +36,6 @@ const layoutWidgets = [
required: true,
disabled: '{{formData.title === "物联数据"}}',
},
// description: {
// title: '分组说明',
// type: 'string',
// },
},
},
{
......@@ -1906,6 +1903,7 @@ const fileWidgets = [
widget: 'FileUpload',
width: '100%',
preview: true,
isUncompressed: true,
},
setting: {
widget: {
......@@ -1978,14 +1976,20 @@ const fileWidgets = [
type: 'boolean',
widget: 'checkbox',
default: true,
width: '33%',
width: '50%',
},
download: {
title: '下载',
type: 'boolean',
widget: 'checkbox',
default: true,
width: '33%',
width: '50%',
},
isUncompressed: {
title: '压缩',
type: 'boolean',
widget: 'BooleanSwitch',
description: '附件是否压缩(压缩后清晰度会降低)',
},
photo: {
title: '允许从相册选取',
......
......@@ -320,16 +320,20 @@ const FormDesigner = (props, ref) => {
const canDelete = (values) => {
const { $id, tableTypeParent, IsSystemField, title, type } = values
if (tableTypeParent === '物联设备表' && IsSystemField) {
if (fieldName.some(v => v.name === $id)) {
message.info(`表类型为:【物联设备表】内部字段【${$id}】不允许删除!`)
return false
}
}
if (type === 'object' && ($id === '#/物联数据' || $id === '物联数据')) {
message.info(`表类型为:【物联设备表】包含内部字段不允许删除`)
if (tableTypeParent === '物联设备表' && $id === '编码') {
message.info(`表类型为:【物联设备表】内部字段【编码】不允许删除!`)
return false
}
// if (tableTypeParent === '物联设备表' && IsSystemField) {
// if (fieldName.some(v => v.name === $id)) {
// message.info(`表类型为:【物联设备表】内部字段【${$id}】不允许删除!`)
// return false
// }
// }
// if (type === 'object' && ($id === '#/物联数据' || $id === '物联数据')) {
// message.info(`表类型为:【物联设备表】包含内部字段不允许删除`)
// return false
// }
return true
}
......
......@@ -75,7 +75,7 @@ const XRender = (props, ref) => {
}
childObj[s] = {
...child[s],
labelWidth: 110,
labelWidth: child[s].widget === 'RelationForm' ? 1 : 110,
presetValue: value || child[s].presetValue || '',
textDefalut: child[s].presetValue,
formDisabled: disabled,
......@@ -99,6 +99,7 @@ const XRender = (props, ref) => {
displayType: schemaForm.displayType === 'column' ? 'column' : 'row',//未知原因出现存储'左右'/'上下'
properties: parentObj
}
console.log('json', json)
setInitField(array)
return json
}, [formJson, values, disabledFields, disabled])
......
......@@ -69,7 +69,7 @@ const FileUpload = (props) => {
const site = window.globalConfig?.userInfo?.site || window.globalConfig?.userInfo?.LocalSite
const { addons, value, schema, onChange } = props
const { disabled, fileType, presetValue, placeholder, preview, download } = schema
const { disabled, fileType, presetValue, placeholder, preview, download, isUncompressed } = schema
const [imgVisible, setImgVisible] = useState(false)
const [showList, setShowList] = useState([])
......@@ -92,7 +92,7 @@ const FileUpload = (props) => {
const option = {
name: 'file',
action: `${window.location.origin}${uploadFileUrl}`,
action: `${window.location.origin}${uploadFileUrl}?isUncompressed=${!isUncompressed}`,
listType: showType,
withCredentials: true,
showUploadList: {
......
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