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
2023-03-03 09:50:56 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
bf45c0fa638502de568e79ca7d6f89530510c965
bf45c0fa
1 parent
7b07d889
fix 表单规则设置判断和字段位置调整
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
src/views/index.vue
src/views/index.vue
View file @
bf45c0f
<!--
* @Date: 2022-07-18 10:22:22
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-03-0
1 18:19:28
* @LastEditTime: 2023-03-0
3 09:47:53
* @FilePath: /data-table/src/views/index.vue
* @Description: 首页
-->
...
...
@@ -339,15 +339,13 @@ const checkUserPassword = async () => {
// 根据规则隐藏相应字段
const checkRules = async () => {
// 数据收集设置
const { data } = await getFormSettingAPI({ form_code: $route.query.code });
let rule_list = [];
if (data.length) {
rule_list = [...data[0]['rules']]
}
const { data } = await queryFormAPI({ form_code: $route.query.code });
const rule_list = [...data['rule_list']];
formData.value.forEach(item => {
// 给受作用的字段绑定判断规则
// 规则失效需要踢出
rule_list.forEach(rule => {
if (rule.field_names?.includes(item.key)) {
if (rule.field_names?.includes(item.key)
&& !rule.is_invalid
) {
item.field_rules = {
mode: rule.mode,
logical_op: rule.logical_op,
...
...
Please
register
or
login
to post a comment