From 947d0ed1a628353f42ac4c2aa817a4579cdf126d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 05 十一月 2023 11:29:04 +0800 Subject: [PATCH] Merge branch 'positec' into dms --- src/menu/components/table/edit-table/columns/editColumn/index.jsx | 21 ++++++++------------- 1 files changed, 8 insertions(+), 13 deletions(-) diff --git a/src/menu/components/table/edit-table/columns/editColumn/index.jsx b/src/menu/components/table/edit-table/columns/editColumn/index.jsx index baca4f6..1077a06 100644 --- a/src/menu/components/table/edit-table/columns/editColumn/index.jsx +++ b/src/menu/components/table/edit-table/columns/editColumn/index.jsx @@ -6,6 +6,7 @@ import Api from '@/api' import Utils from '@/utils/utils.js' +import { checkSQL } from '@/utils/utils-custom.js' import { getColumnForm } from './formconfig' import asyncComponent from '@/utils/asyncComponent' import { formRule } from '@/utils/option.js' @@ -30,6 +31,7 @@ class EdiTableColumn extends Component { static propTpyes = { column: PropTypes.object, + wrap: PropTypes.object, columns: PropTypes.array, fields: PropTypes.array, submitCol: PropTypes.func, // 鎻愪氦浜嬩欢 @@ -76,7 +78,7 @@ } else if (this.record.editType === 'date') { _options.push('required', 'precision', 'enter', 'declareType') } else if (this.record.editType === 'popSelect') { - _options.push('required', 'enter', 'linkSubField', 'columns', 'dataSource', 'primaryKey', 'order', 'showField', 'controlField', 'searchKey', 'popWidth') + _options.push('required', 'enter', 'linkSubField', 'columns', 'dataSource', 'primaryKey', 'order', 'controlField', 'searchKey', 'popWidth', 'laypage', 'cache', 'onload') } else if (this.record.editType === 'select') { _options.push('required', 'enter', 'resourceType', 'linkSubField', 'dropdown') @@ -89,7 +91,7 @@ _options.push('required', 'enter') } } else if (this.record.type === 'number') { - _options.push('max', 'min', 'enter') + _options.push('max', 'min', 'enter', 'clearField') } } if (this.record.type === 'formula' && this.record.eval === 'true') { @@ -110,7 +112,7 @@ return item }) - let formlist = getColumnForm(column, fields, this.props.columns) + let formlist = getColumnForm(column, fields, this.props.columns, this.props.wrap) this.record = {} formlist.forEach(item => { @@ -520,16 +522,9 @@ } if (values.dataSource) { - let error = Utils.verifySql(values.dataSource) - - if (error) { - notification.warning({ - top: 92, - message: '鏁版嵁婧愪腑涓嶅彲浣跨敤' + error, - duration: 5 - }) - return - } + let pass = checkSQL(values.dataSource) + + if (!pass) return } if (values.editType === 'select' && values.resourceType === '1' && values.dataSource) { -- Gitblit v1.8.0