Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bigDataSystem
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
bigDataSystem
Commits
61392af5
Commit
61392af5
authored
Nov 14, 2024
by
chenjiahao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据质量-主体类-质量主体
parent
621ba672
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
518 additions
and
106 deletions
+518
-106
dataQualityMainBodyData.ts
...ataQuality/agentClass/mainBody/dataQualityMainBodyData.ts
+165
-0
index.vue
src/views/dataQuality/agentClass/mainBody/index.vue
+1
-1
mainBodyEdit.vue
src/views/dataQuality/agentClass/mainBody/mainBodyEdit.vue
+258
-23
moveFile.vue
src/views/dataQuality/agentClass/mainBody/moveFile.vue
+94
-82
No files found.
src/views/dataQuality/agentClass/mainBody/dataQualityMainBodyData.ts
View file @
61392af5
...
...
@@ -120,6 +120,10 @@ export const TreeData: any[] = [
updateDate
:
'2024-10-22 8:04:04'
,
icon
:
'ant-design:partition-outlined'
,
originalPrincipal
:
'贫困毕业生'
,
dimensionCodeColumn
:
'code'
,
questionTablePrefix
:
'quailty_'
,
dimensionMeaningColumn
:
'code'
,
isIndependent
:
true
,
},
{
delFlag
:
'0'
,
...
...
@@ -470,4 +474,165 @@ export const addUserData: any[] = [
},
];
export
const
infoData
:
any
[]
=
[
{
tableName
:
'st'
,
columnsName
:
'user_id'
,
CNname
:
'用户ID'
,
type
:
'INT'
,
length
:
11
,
precision
:
null
,
isNull
:
'NO'
,
remark
:
'用户的唯一标识符'
,
primaryKey
:
'YES'
,
foreignKey
:
'NO'
,
dataType
:
'整数型'
,
safeLevel
:
'高'
,
sensitiveStatus
:
'敏感'
,
isFixation
:
'true'
,
},
{
tableName
:
'st'
,
columnsName
:
'username'
,
CNname
:
'用户名'
,
type
:
'VARCHAR'
,
length
:
50
,
precision
:
null
,
isNull
:
'NO'
,
remark
:
'用户的登录名称'
,
primaryKey
:
'NO'
,
foreignKey
:
'NO'
,
dataType
:
'字符串型'
,
safeLevel
:
'中'
,
sensitiveStatus
:
'非敏感'
,
isFixation
:
'true'
,
},
{
tableName
:
'st'
,
columnsName
:
'password'
,
CNname
:
'密码'
,
type
:
'VARCHAR'
,
length
:
100
,
precision
:
null
,
isNull
:
'NO'
,
remark
:
'用户登录密码(加密存储)'
,
primaryKey
:
'NO'
,
foreignKey
:
'NO'
,
dataType
:
'字符串型'
,
safeLevel
:
'极高'
,
sensitiveStatus
:
'非常敏感'
,
isFixation
:
'true'
,
},
{
tableName
:
'st'
,
columnsName
:
'email'
,
CNname
:
'邮箱地址'
,
type
:
'VARCHAR'
,
length
:
100
,
precision
:
null
,
isNull
:
'YES'
,
remark
:
'用户注册邮箱地址'
,
primaryKey
:
'NO'
,
foreignKey
:
'NO'
,
dataType
:
'字符串型'
,
safeLevel
:
'中'
,
sensitiveStatus
:
'敏感'
,
isFixation
:
'true'
,
},
{
tableName
:
'st'
,
columnsName
:
'created_at'
,
CNname
:
'创建时间'
,
type
:
'DATETIME'
,
length
:
null
,
precision
:
null
,
isNull
:
'NO'
,
remark
:
'账户创建的时间戳'
,
primaryKey
:
'NO'
,
foreignKey
:
'NO'
,
dataType
:
'日期时间型'
,
safeLevel
:
'低'
,
sensitiveStatus
:
'非敏感'
,
isFixation
:
'false'
,
},
{
tableName
:
'st'
,
columnsName
:
'updated_at'
,
CNname
:
'最后更新时间'
,
type
:
'DATETIME'
,
length
:
null
,
precision
:
null
,
isNull
:
'YES'
,
remark
:
'账户信息最后更新的时间戳'
,
primaryKey
:
'NO'
,
foreignKey
:
'NO'
,
dataType
:
'日期时间型'
,
safeLevel
:
'低'
,
sensitiveStatus
:
'非敏感'
,
isFixation
:
'true'
,
},
{
tableName
:
'st'
,
columnsName
:
'is_active'
,
CNname
:
'账户状态'
,
type
:
'TINYINT'
,
length
:
1
,
precision
:
null
,
isNull
:
'NO'
,
remark
:
'账户是否处于激活状态(0-未激活,1-已激活)'
,
primaryKey
:
'NO'
,
foreignKey
:
'NO'
,
dataType
:
'布尔型'
,
safeLevel
:
'中'
,
sensitiveStatus
:
'非敏感'
,
isFixation
:
'true'
,
},
{
tableName
:
'st'
,
columnsName
:
'is_deleted'
,
CNname
:
'删除标记'
,
type
:
'TINYINT'
,
length
:
1
,
precision
:
null
,
isNull
:
'NO'
,
remark
:
'账户是否被标记为删除(0-未删除,1-已删除)'
,
primaryKey
:
'NO'
,
foreignKey
:
'NO'
,
dataType
:
'布尔型'
,
safeLevel
:
'中'
,
sensitiveStatus
:
'非敏感'
,
isFixation
:
'true'
,
},
];
export
const
reviewData
:
any
[]
=
[
{
age
:
23
,
id
:
4
,
name
:
'戴瑞灰'
,
score
:
92
,
sex
:
'男'
,
},
{
age
:
30
,
id
:
8
,
name
:
'康再溪'
,
score
:
60
,
sex
:
'女'
,
},
{
age
:
23
,
id
:
1
,
name
:
'田欣慧'
,
score
:
100
,
sex
:
'女'
,
},
{
age
:
18
,
id
:
5
,
name
:
'宋艳'
,
score
:
99
,
sex
:
'女'
,
},
];
export
const
accountFormSchema
:
any
[]
=
[];
src/views/dataQuality/agentClass/mainBody/index.vue
View file @
61392af5
...
...
@@ -197,7 +197,7 @@
function
handleMainBodyEdit
(
record
)
{
openMainBodyEditModal
(
true
,
{
...
record
,
record
,
});
}
...
...
src/views/dataQuality/agentClass/mainBody/mainBodyEdit.vue
View file @
61392af5
This diff is collapsed.
Click to expand it.
src/views/dataQuality/agentClass/mainBody/moveFile.vue
View file @
61392af5
<
template
>
<BasicModal
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
minHeight=
"50"
>
<BasicModal
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
minHeight=
"50"
>
<BasicForm
@
register=
"registerForm"
/>
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
,
unref
,
reactive
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
accountFormSchema
,
MoveFormSchema
}
from
'./account.data'
;
import
{
getDeptList
}
from
'@/api/system/dept/dept'
;
import
{
resetUserPwd
}
from
'@/api/system/user/user'
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
TreeData
}
from
"./dataQualityMainBodyData"
;
defineOptions
({
name
:
'AccountModal'
});
import
{
ref
,
computed
,
unref
,
reactive
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
accountFormSchema
,
MoveFormSchema
}
from
'./account.data'
;
import
{
getDeptList
}
from
'@/api/system/dept/dept'
;
import
{
resetUserPwd
}
from
'@/api/system/user/user'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
TreeData
}
from
'./dataQualityMainBodyData'
;
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
isUpdate
=
ref
(
true
);
const
rowId
=
ref
(
''
);
const
idList
=
ref
([])
const
rowData
=
ref
([])
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
span
:
24
},
schemas
:
MoveFormSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
//每次点击弹窗 需要清空存储的数据
rowData
.
value
=
[]
//重置表单数据
resetFields
();
setModalProps
({
confirmLoading
:
false
});
if
(
data
.
idList
!=
null
&&
data
.
idList
!=
undefined
&&
data
.
idList
.
length
>
0
){
}
else
{
rowData
.
value
.
push
(
data
.
record
)
//单个移动
rowId
.
value
=
data
.
record
.
businessId
;
data
.
record
.
taskId
=
data
.
record
.
businessId
setFieldsValue
({
...
data
.
record
,
});
}
const
treeList
=
handleTree
(
TreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
updateSchema
([
{
field
:
'taskId'
,
componentProps
:
{
treeData
:
treeList
},
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
isUpdate
=
ref
(
true
);
const
rowId
=
ref
(
''
);
const
idList
=
ref
([]);
const
rowData
=
ref
([]);
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
span
:
24
},
schemas
:
MoveFormSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
]);
console
.
log
(
'treeList:'
,
treeList
)
});
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
//每次点击弹窗 需要清空存储的数据
rowData
.
value
=
[];
//重置表单数据
resetFields
();
setModalProps
({
confirmLoading
:
false
});
if
(
data
.
idList
!=
null
&&
data
.
idList
!=
undefined
&&
data
.
idList
.
length
>
0
)
{
}
else
{
rowData
.
value
.
push
(
data
.
record
);
//单个移动
rowId
.
value
=
data
.
record
.
businessId
;
data
.
record
.
taskId
=
data
.
record
.
businessId
;
setFieldsValue
({
...
data
.
record
,
});
}
const
treeList
=
handleTree
(
TreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
);
updateSchema
([
{
field
:
'taskId'
,
componentProps
:
{
treeData
:
treeList
,
},
},
]);
console
.
log
(
'treeList:'
,
treeList
);
});
const
getTitle
=
computed
(()
=>
(
'移动'
)
);
const
getTitle
=
computed
(()
=>
'移动'
);
/**确定按钮*/
async
function
handleSubmit
()
{
createMessage
.
success
(
'移动成功!'
)
closeModal
()
}
/**确定按钮*/
async
function
handleSubmit
()
{
createMessage
.
success
(
'移动成功!'
);
closeModal
();
}
/**数组对象转成树*/
function
handleTree
(
data
,
id
,
parentId
,
children
,
rootId
)
{
id
=
id
||
'id'
parentId
=
parentId
||
'parentId'
children
=
children
||
'children'
rootId
=
rootId
||
Math
.
min
.
apply
(
Math
,
data
.
map
(
item
=>
{
return
item
[
parentId
]
}))
||
0
// 对源数据深度克隆
const
cloneData
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
// 循环所有项
const
treeData
=
cloneData
.
filter
(
father
=>
{
const
branchArr
=
cloneData
.
filter
(
child
=>
{
// 返回每一项的子级数组
return
father
[
id
]
===
child
[
parentId
]
})
branchArr
.
length
>
0
?
father
.
children
=
branchArr
:
''
// 返回第一层
return
father
[
parentId
]
===
rootId
})
return
treeData
!==
''
?
treeData
:
data
}
/**数组对象转成树*/
function
handleTree
(
data
,
id
,
parentId
,
children
,
rootId
)
{
id
=
id
||
'id'
;
parentId
=
parentId
||
'parentId'
;
children
=
children
||
'children'
;
rootId
=
rootId
||
Math
.
min
.
apply
(
Math
,
data
.
map
((
item
)
=>
{
return
item
[
parentId
];
}),
)
||
0
;
// 对源数据深度克隆
const
cloneData
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
// 循环所有项
const
treeData
=
cloneData
.
filter
((
father
)
=>
{
const
branchArr
=
cloneData
.
filter
((
child
)
=>
{
// 返回每一项的子级数组
return
father
[
id
]
===
child
[
parentId
];
});
branchArr
.
length
>
0
?
(
father
.
children
=
branchArr
)
:
''
;
// 返回第一层
return
father
[
parentId
]
===
rootId
;
});
return
treeData
!==
''
?
treeData
:
data
;
}
</
script
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment