Commit bcc1f503 authored by 田翔's avatar 田翔

fix: 增加移动端预览

parent daf6d641
......@@ -2558,13 +2558,6 @@ const advancedWidgets = [
type: 'string',
widget: 'htmlInput',
},
disabled: {
title: '只读',
type: 'boolean',
widget: 'checkbox',
default: false,
width: '33%',
},
'台账名称': {
title: '台账名称',
type: 'string',
......@@ -2577,6 +2570,11 @@ const advancedWidgets = [
default: [],
dependencies: ['台账名称'],
},
'控制规则': {
title: '控制规则',
type: 'string',
widget: 'ControlRules',
},
'默认显示': {
title: '默认显示',
type: 'boolean',
......@@ -2585,10 +2583,17 @@ const advancedWidgets = [
displayType: 'row',
labelWidth: 80,
},
'控制规则': {
title: '控制规则',
type: 'string',
widget: 'ControlRules',
// otherAccount: {
// title: '数据来源',
// type: 'string',
// widget: 'OtherAccount',
// },
disabled: {
title: '只读',
type: 'boolean',
widget: 'checkbox',
default: false,
width: '33%',
},
groupStyle: {
title: '控件样式',
......
import React, { useRef, useState, forwardRef, useImperativeHandle, useMemo, useLayoutEffect } from 'react'
import { message, Modal, Button } from 'antd'
import { message, Modal, Button, Popover } from 'antd'
import { ExclamationCircleOutlined } from '@ant-design/icons'
import QRcode from 'qrcode.react'
import Generator, { defaultSettings, defaultCommonSettings, defaultGlobalSettings } from 'fr-generator'
import { settings, baseSettings, globalSettings } from './config'
import widgets from '../widgets'
......@@ -26,6 +27,7 @@ const FormDesigner = (props, ref) => {
const [schema, setSchema] = useState({})
const [fieldName, setFieldName] = useState([])
const [textShow, setTextShow] = useState(false)
const [open, setOpen] = useState(false)
const designerRef = useRef(null)
const formRenderRef = useRef(null)
......@@ -330,6 +332,10 @@ const FormDesigner = (props, ref) => {
return true
}
const onOpenChange = (value) => {
console.log('value', value)
}
if (!tableName) {
return null
}
......@@ -365,6 +371,18 @@ const FormDesigner = (props, ref) => {
<div>
<span style={{ color: '#18b918', fontSize: '14px', paddingRight: '10px', display: textShow ? 'inline-block' : 'none' }}>该表单内容校验通过,可正常使用!</span>
<Button onClick={() => setVisible(false)}>取消</Button>
<Popover
trigger="click"
open={open}
onOpenChange={onOpenChange}
content={
<div>
<QRcode value={`${window.origin}/civ_mobile/product/workflow/formTest?env=dev&tableName=${tableName}`} />
</div>
}
>
<Button>移动端预览</Button>
</Popover>
<Button type='primary' onClick={testSubmit}>测试提交</Button>
</div>
}
......
......@@ -73,15 +73,9 @@ const FileUpload = (props) => {
action: `${window.location.origin}${uploadFileUrl}`,
listType: showType,
withCredentials: true,
// showUploadList: download ?
// {
// showDownloadIcon: '下载',
// downloadIcon: <ArrowDownOutlined style={{ color: fileType === '图片' ? 'white' : '' }} />,
// } : {},
showUploadList: {
showRemoveIcon: !disabled,
showDownloadIcon: download,
// downloadIcon: <ArrowDownOutlined style={{ color: fileType === '图片' ? 'white' : '' }} />,
},
beforeUpload(file, fileList) {
/** @Tips: 解决提交文件中存在特殊字符的问题 */
......
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