Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
data-table
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2024-07-22 18:57:14 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8046fb0d99f8d16401d5caf92b64ca6fb2e769ac
8046fb0d
1 parent
4158e27b
fix 报错处理
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
src/views/index.vue
src/views/index.vue
View file @
8046fb0
<!--
* @Date: 2022-07-18 10:22:22
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-07-22 1
7:30:54
* @LastEditTime: 2024-07-22 1
8:56:55
* @FilePath: /data-table/src/views/index.vue
* @Description: 首页
-->
...
...
@@ -835,7 +835,7 @@ const checkRules = () => {
let condition = '';
// 多个规则的满足条件,为全且或者全或
const op = item.field_rules?.logical_op === 'AND' ? '&&' : '||';
item.field_rules?.expr_list.forEach(expr => {
item.field_rules?.expr_list
?
.forEach(expr => {
let form_submission_value = postData.value[expr['field_name']]; // 表单提交值, field_12 : "" || field_13 : []
let rule_matching_value = expr['values']; // 规则匹配值 values : ['x']
if (typeof form_submission_value === 'string') { // 表单值为字符串(单选,下拉)
...
...
@@ -849,7 +849,7 @@ const checkRules = () => {
}
if (typeof form_submission_value === 'object') { // 表单值为数组(多选)
// 处理多选项带补充信息时判断,去除补充信息
form_submission_value = form_submission_value.map(item => {
form_submission_value = form_submission_value
?
.map(item => {
if (item.includes(':')) {
return item.split(':')[0].trim(); // 去除冒号及其后面的部分并去除前后空格
}
...
...
Please
register
or
login
to post a comment