Commit 556facb9 authored by 田翔's avatar 田翔

fix: 关联表单编辑状态下点击不进行处理

parent 6016b0c6
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "5.2.1", "version": "5.2.2",
"description": "5.2.1 图片显示缩略图异常问题", "description": "5.2.2 关联表单编辑状态下点击不进行处理",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -288,6 +288,9 @@ const getAutoWatch = ({ schema, form, startTime, initField }) => { ...@@ -288,6 +288,9 @@ const getAutoWatch = ({ schema, form, startTime, initField }) => {
const getSelectItemList = async (params) => { const getSelectItemList = async (params) => {
if ((new Date().getTime() - params.startTime) < 2000) return if ((new Date().getTime() - params.startTime) < 2000) return
const { sourcePath, form, targetPath, dictionary, value } = params const { sourcePath, form, targetPath, dictionary, value } = params
//只读情况下不做处理
const { disabled } = form.getSchemaByPath(targetPath)
if (!disabled) {
const { code, data, msg } = await GetSelectItemList({ nodeName: dictionary }) const { code, data, msg } = await GetSelectItemList({ nodeName: dictionary })
if (code === 0) { if (code === 0) {
let array = data.filter(v => v.nodeName === value) let array = data.filter(v => v.nodeName === value)
...@@ -295,6 +298,7 @@ const getSelectItemList = async (params) => { ...@@ -295,6 +298,7 @@ const getSelectItemList = async (params) => {
form.setValueByPath(targetPath, array[0].nodeValue) form.setValueByPath(targetPath, array[0].nodeValue)
} }
} }
}
} }
//关联选择监听 //关联选择监听
......
...@@ -249,10 +249,10 @@ const RelationForm = (props) => { ...@@ -249,10 +249,10 @@ const RelationForm = (props) => {
} }
const addClick = () => { const addClick = () => {
if (addons) {
if (!localForm.length) { if (!localForm.length) {
return message.info('台账添加字段未配置!') return message.info('台账添加字段未配置!')
} }
if (addons) {
setRow({ ID: `前端ID${new Date().getTime()}` }) setRow({ ID: `前端ID${new Date().getTime()}` })
setFormState('添加') setFormState('添加')
setSchemaValues(localForm) setSchemaValues(localForm)
...@@ -295,6 +295,7 @@ const RelationForm = (props) => { ...@@ -295,6 +295,7 @@ const RelationForm = (props) => {
} }
const addRow = () => { const addRow = () => {
if (addons) {
let array = [] let array = []
let field = config?.accountFieids?.filter(v => v.webDisplay).map(v => v.fieldName) let field = config?.accountFieids?.filter(v => v.webDisplay).map(v => v.fieldName)
let obj = {} let obj = {}
...@@ -325,6 +326,7 @@ const RelationForm = (props) => { ...@@ -325,6 +326,7 @@ const RelationForm = (props) => {
onChange(value && value.includes(' ') ? `${array.length}` : `${array.length} `) onChange(value && value.includes(' ') ? `${array.length}` : `${array.length} `)
}, 0) }, 0)
} }
}
const addRows = () => { const addRows = () => {
getConfigOther() getConfigOther()
......
...@@ -10,8 +10,8 @@ import * as XLSX from 'xlsx' ...@@ -10,8 +10,8 @@ import * as XLSX from 'xlsx'
import { convertUrlToBase64 } from '../../../../utils/index' import { convertUrlToBase64 } from '../../../../utils/index'
const accepts = { 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', '.mp3'],
'图片': ['.bmp', '.gif', '.jpeg', 'tiff', '.png', '.svg', '.jpg'], '图片': ['.bmp', '.gif', '.jpeg', '.tiff', '.png', '.svg', '.jpg'],
'文档': ['.docx', '.xlsx', '.pdf'], '文档': ['.docx', '.xlsx', '.pdf'],
'视频': ['.mp4'], '视频': ['.mp4'],
'音频': ['.mp3'], '音频': ['.mp3'],
......
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