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

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

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