Showing
1 changed file
with
5 additions
and
7 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2022-07-18 10:22:22 | 2 | * @Date: 2022-07-18 10:22:22 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2023-03-01 18:19:28 | 4 | + * @LastEditTime: 2023-03-03 09:47:53 |
| 5 | * @FilePath: /data-table/src/views/index.vue | 5 | * @FilePath: /data-table/src/views/index.vue |
| 6 | * @Description: 首页 | 6 | * @Description: 首页 |
| 7 | --> | 7 | --> |
| ... | @@ -339,15 +339,13 @@ const checkUserPassword = async () => { | ... | @@ -339,15 +339,13 @@ const checkUserPassword = async () => { |
| 339 | // 根据规则隐藏相应字段 | 339 | // 根据规则隐藏相应字段 |
| 340 | const checkRules = async () => { | 340 | const checkRules = async () => { |
| 341 | // 数据收集设置 | 341 | // 数据收集设置 |
| 342 | - const { data } = await getFormSettingAPI({ form_code: $route.query.code }); | 342 | + const { data } = await queryFormAPI({ form_code: $route.query.code }); |
| 343 | - let rule_list = []; | 343 | + const rule_list = [...data['rule_list']]; |
| 344 | - if (data.length) { | ||
| 345 | - rule_list = [...data[0]['rules']] | ||
| 346 | - } | ||
| 347 | formData.value.forEach(item => { | 344 | formData.value.forEach(item => { |
| 348 | // 给受作用的字段绑定判断规则 | 345 | // 给受作用的字段绑定判断规则 |
| 346 | + // 规则失效需要踢出 | ||
| 349 | rule_list.forEach(rule => { | 347 | rule_list.forEach(rule => { |
| 350 | - if (rule.field_names?.includes(item.key)) { | 348 | + if (rule.field_names?.includes(item.key) && !rule.is_invalid) { |
| 351 | item.field_rules = { | 349 | item.field_rules = { |
| 352 | mode: rule.mode, | 350 | mode: rule.mode, |
| 353 | logical_op: rule.logical_op, | 351 | logical_op: rule.logical_op, | ... | ... |
-
Please register or login to post a comment