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
53b915d2
Commit
53b915d2
authored
Nov 14, 2024
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加了指标标准页面
parent
cd34a76f
Changes
24
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
5846 additions
and
13 deletions
+5846
-13
index.ts
src/router/routes/index.ts
+42
-3
ChooseDictonaryTree.vue
.../dataStandards/IndicatorStandards/ChooseDictonaryTree.vue
+80
-0
ChooseNamingDictionaryModal.vue
...ndards/IndicatorStandards/ChooseNamingDictionaryModal.vue
+107
-0
CopyModal.vue
src/views/dataStandards/IndicatorStandards/CopyModal.vue
+74
-0
ImportDataStandardsModal.vue
...Standards/IndicatorStandards/ImportDataStandardsModal.vue
+58
-0
ImportRelativeModal.vue
.../dataStandards/IndicatorStandards/ImportRelativeModal.vue
+58
-0
IndicatorStandardsTree.vue
...taStandards/IndicatorStandards/IndicatorStandardsTree.vue
+175
-0
MoveModal.vue
src/views/dataStandards/IndicatorStandards/MoveModal.vue
+74
-0
ResetNameModal.vue
...views/dataStandards/IndicatorStandards/ResetNameModal.vue
+45
-0
VersionModal.vue
src/views/dataStandards/IndicatorStandards/VersionModal.vue
+127
-0
createIndicatorStandards.vue
...Standards/IndicatorStandards/createIndicatorStandards.vue
+124
-0
createStandardsType.vue
.../dataStandards/IndicatorStandards/createStandardsType.vue
+137
-0
detailStandard.vue
...views/dataStandards/IndicatorStandards/detailStandard.vue
+182
-0
editDetailStandard.vue
...s/dataStandards/IndicatorStandards/editDetailStandard.vue
+176
-0
index.vue
src/views/dataStandards/IndicatorStandards/index.vue
+265
-10
indicatorStandards.data.ts
...taStandards/IndicatorStandards/indicatorStandards.data.ts
+2192
-0
indicatorStandardsContrast.vue
...andards/IndicatorStandards/indicatorStandardsContrast.vue
+112
-0
indicatorStandardsData.ts
...ataStandards/IndicatorStandards/indicatorStandardsData.ts
+1092
-0
relatedBasicStandardModal.vue
...tandards/IndicatorStandards/relatedBasicStandardModal.vue
+76
-0
relatedIndicatorStandardsModal.vue
...rds/IndicatorStandards/relatedIndicatorStandardsModal.vue
+79
-0
relatedMetaDataModal.vue
...dataStandards/IndicatorStandards/relatedMetaDataModal.vue
+75
-0
relatedQualityModal.vue
.../dataStandards/IndicatorStandards/relatedQualityModal.vue
+104
-0
relatedRelationships.vue
...dataStandards/IndicatorStandards/relatedRelationships.vue
+330
-0
treeTwo.vue
src/views/dataStandards/IndicatorStandards/treeTwo.vue
+62
-0
No files found.
src/router/routes/index.ts
View file @
53b915d2
...
...
@@ -82,6 +82,7 @@ export const mainBodyRoute: AppRouteRecordRaw = {
],
};
/**数据源*/
export
const
DataSourceRoute
:
AppRouteRecordRaw
=
{
path
:
'/dataSourceManage'
,
name
:
'dataSourceManage'
,
...
...
@@ -238,6 +239,8 @@ export const DataWarehousephysicalModelRoute: AppRouteRecordRaw = {
},
],
};
/**元模型*/
export
const
ModelRoute
:
AppRouteRecordRaw
=
{
path
:
'/metaModel'
,
name
:
'metaModel'
,
...
...
@@ -341,7 +344,43 @@ export const DataStandardRoute: AppRouteRecordRaw = {
name
:
'relatedRelationships'
,
component
:
()
=>
import
(
'@/views/dataStandards/basicStandards/relatedRelationships.vue'
),
meta
:
{
title
:
'关联关系'
,
title
:
'基础标准关联关系'
,
icon
:
''
,
},
},
{
path
:
'IndicatorStandards/detailStandard'
,
name
:
'detailStandard1'
,
component
:
()
=>
import
(
'@/views/dataStandards/IndicatorStandards/detailStandard.vue'
),
meta
:
{
title
:
'指标标准详情'
,
icon
:
''
,
},
},
{
path
:
'IndicatorStandards/editDetailStandard'
,
name
:
'editDetailStandard1'
,
component
:
()
=>
import
(
'@/views/dataStandards/IndicatorStandards/editDetailStandard.vue'
),
meta
:
{
title
:
'指标标准编辑'
,
icon
:
''
,
},
},
{
path
:
'IndicatorStandards/basicStandardsContrast'
,
name
:
'basicStandardsContrast1'
,
component
:
()
=>
import
(
'@/views/dataStandards/IndicatorStandards/indicatorStandardsContrast.vue'
),
meta
:
{
title
:
'指标标准对比'
,
icon
:
''
,
},
},
{
path
:
'IndicatorStandards/relatedRelationships'
,
name
:
'relatedRelationships1'
,
component
:
()
=>
import
(
'@/views/dataStandards/IndicatorStandards/relatedRelationships.vue'
),
meta
:
{
title
:
'指标标准关联关系'
,
icon
:
''
,
},
},
...
...
@@ -380,13 +419,13 @@ export const QualityRuleRoute: AppRouteRecordRaw = {
title
:
'质量规则管理'
,
icon
:
''
,
hidden
:
true
,
currentActiveMenu
:
'/dataQuality/rule'
,
currentActiveMenu
:
'/dataQuality/
dataSheet/
rule'
,
},
children
:
[
{
path
:
'ruleMoreAdd'
,
name
:
'RuleMoreAdd'
,
component
:
()
=>
import
(
'@/views/dataQuality/rule/ruleMoreAdd.vue'
),
component
:
()
=>
import
(
'@/views/dataQuality/
dataSheet/
rule/ruleMoreAdd.vue'
),
meta
:
{
title
:
'质量规则批量创建'
,
icon
:
''
,
...
...
src/views/dataStandards/IndicatorStandards/ChooseDictonaryTree.vue
0 → 100644
View file @
53b915d2
<
template
>
<div
class=
"m-4 mr-0 overflow-hidden bg-white"
>
<BasicTree
title=
"命名字典"
ref=
"treeRef"
toolbar
search
treeWrapperClassName=
"h-[calc(100%-35px)] overflow-auto"
:clickRowToExpand=
"true"
:checkable=
"true"
:defaultExpandAll=
"true"
:treeData=
"treeData"
:fieldNames=
"
{ key: 'businessId', title: 'basicStandardName' }"
@select="handleSelect"
/>
</div>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
nextTick
,
onMounted
,
ref
,
unref
}
from
'vue'
;
import
{
BasicTree
,
TreeActionType
,
TreeItem
}
from
'@/components/Tree'
;
import
{
Nullable
}
from
"@vben/types"
;
import
{
chooseDictoryTreeData
}
from
"./indicatorStandardsData"
;
defineOptions
({
name
:
'DeptTree'
});
const
emit
=
defineEmits
([
'select'
]);
const
treeData
=
ref
<
TreeItem
[]
>
([]);
const
treeRef
=
ref
<
Nullable
<
TreeActionType
>>
(
null
);
async
function
fetch
()
{
treeData
.
value
=
handleTree
(
chooseDictoryTreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
await
nextTick
(()
=>
{
getTree
().
expandAll
(
true
)
})
}
function
getTree
()
{
const
tree
=
unref
(
treeRef
);
if
(
!
tree
)
{
throw
new
Error
(
'tree is null!'
);
}
return
tree
;
}
function
handleSelect
(
keys
)
{
emit
(
'select'
,
keys
[
0
]);
}
onMounted
(()
=>
{
fetch
();
});
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
>
<
style
lang=
"scss"
scoped
>
.bg-white
{
width
:
97%
;
}
::v-deep
(
.vben-tree
)
{
background-color
:
#E8ECF7
!
important
;
}
</
style
>
src/views/dataStandards/IndicatorStandards/ChooseNamingDictionaryModal.vue
0 → 100644
View file @
53b915d2
<
template
>
<BasicModal
width=
"40%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<div
class=
"addDialogBG"
>
<div
style=
"float: right"
>
<Icon
icon=
"ant-design:delete-outlined"
:size=
"25"
:color=
"'#ED6F6F'"
/>
</div>
<ChooseDictonaryTree
class=
"w-1/4 xl:w-1/5"
@
select=
"handleSelect"
/>
</div>
</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
{
moveFormSchema
}
from
'./indicatorStandards.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
TreeData
}
from
"./indicatorStandardsData"
;
import
ChooseDictonaryTree
from
'./ChooseDictonaryTree.vue'
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
rowId
=
ref
(
''
);
const
getTitle
=
computed
(()
=>
(
'选择命名字典'
));
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
moveFormSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
setModalProps
({
confirmLoading
:
false
});
setFieldsValue
({
...
data
.
record
,
})
const
treeList
=
handleTree
(
TreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
updateSchema
([
{
field
:
'treeId'
,
componentProps
:
{
treeData
:
treeList
},
},
]);
});
/**确定按钮*/
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
}
</
script
>
<
style
lang=
"scss"
scoped
>
.modalRow
{
padding
:
0
20px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
.clearAll
{
padding-right
:
10px
;
font-size
:
16px
;
}
.right
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
}
.addDialogBG
{
margin
:
10px
;
border-radius
:
10px
;
padding
:
20px
;
background-color
:
#E8ECF7
;
width
:
98%
;
height
:
400px
;
}
</
style
>
src/views/dataStandards/IndicatorStandards/CopyModal.vue
0 → 100644
View file @
53b915d2
<
template
>
<BasicModal
width=
"40%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<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
{
moveFormSchema
}
from
'./indicatorStandards.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
TreeData
}
from
"./indicatorStandardsData"
;
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
rowId
=
ref
(
''
);
const
getTitle
=
computed
(()
=>
(
'复制到'
));
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
moveFormSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
setModalProps
({
confirmLoading
:
false
});
setFieldsValue
({
...
data
.
record
,
})
const
treeList
=
handleTree
(
TreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
updateSchema
([
{
field
:
'treeId'
,
componentProps
:
{
treeData
:
treeList
},
},
]);
});
/**确定按钮*/
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
}
</
script
>
src/views/dataStandards/IndicatorStandards/ImportDataStandardsModal.vue
0 → 100644
View file @
53b915d2
<
template
>
<BasicModal
width=
"40%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
>
<template
#
formFooter
>
<a-Button
type=
"info"
@
click=
"handleDownByData"
style=
"margin-left: 150px;border-color: #4aabfe"
>
下载文件模版
</a-Button>
</
template
>
</BasicForm>
</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
{
importDataStandardsFormSchema
}
from
'./indicatorStandards.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
BasicUpload
}
from
'@/components/Upload'
;
import
{
uploadApi
}
from
'@/api/sys/upload'
;
import
{
downloadByData
}
from
"@/utils/file/download"
;
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
getTitle
=
computed
(()
=>
(
'标准导入'
));
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
importDataStandardsFormSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
setModalProps
({
confirmLoading
:
false
});
});
/**下载*/
function
handleDownByData
()
{
downloadByData
(
'text content'
,
'导入数据标准模版.xls'
);
}
/**上传事件*/
function
handleChange
(
list
:
string
[])
{
createMessage
.
success
(
`已上传文件
${
JSON
.
stringify
(
list
)}
`
);
}
/**提交按钮*/
function
handleSubmit
()
{
createMessage
.
success
(
'导入成功!'
)
closeModal
();
}
</
script
>
src/views/dataStandards/IndicatorStandards/ImportRelativeModal.vue
0 → 100644
View file @
53b915d2
<
template
>
<BasicModal
width=
"40%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
>
<template
#
formFooter
>
<a-Button
type=
"info"
@
click=
"handleDownByData"
style=
"margin-left: 150px;border-color: #4aabfe"
>
下载文件模版
</a-Button>
</
template
>
</BasicForm>
</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
{
importRelativeFormSchema
}
from
'./indicatorStandards.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
BasicUpload
}
from
'@/components/Upload'
;
import
{
uploadApi
}
from
'@/api/sys/upload'
;
import
{
downloadByData
}
from
"@/utils/file/download"
;
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
getTitle
=
computed
(()
=>
(
'导入关联关系'
));
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
importRelativeFormSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
setModalProps
({
confirmLoading
:
false
});
});
/**下载*/
function
handleDownByData
()
{
downloadByData
(
'text content'
,
'导入关联关系模版.xls'
);
}
/**上传事件*/
function
handleChange
(
list
:
string
[])
{
createMessage
.
success
(
`已上传文件
${
JSON
.
stringify
(
list
)}
`
);
}
/**提交按钮*/
function
handleSubmit
()
{
createMessage
.
success
(
'导入成功!'
)
closeModal
();
}
</
script
>
src/views/dataStandards/IndicatorStandards/IndicatorStandardsTree.vue
0 → 100644
View file @
53b915d2
<
template
>
<div
class=
"m-4 mr-0 overflow-hidden bg-white"
>
<BasicTree
title=
"指标标准"
ref=
"treeRef"
toolbar
search
treeWrapperClassName=
"h-[calc(100%-35px)] overflow-auto"
:clickRowToExpand=
"false"
:defaultExpandAll=
"true"
:treeData=
"treeData"
:fieldNames=
"
{ key: 'businessId', title: 'standardChineseName' }"
@select="handleSelect"
:beforeRightClick="getRightMenuList"
:actionList="actionList"
/>
</div>
<!-- 新建基础标准 弹窗-->
<CreateBasicStandards
@
register=
"registerCreateIndicatorStandardsModal"
@
success=
"handleSuccess"
/>
<!-- 新建标准分类 弹窗-->
<CreateStandardsType
@
register=
"registerCreateStandardsTypeModal"
@
success=
"handleSuccess"
/>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
h
,
nextTick
,
onMounted
,
ref
,
unref
}
from
'vue'
;
import
{
BasicTree
,
ContextMenuItem
,
TreeActionType
,
TreeItem
}
from
'@/components/Tree'
;
import
{
Nullable
}
from
"@vben/types"
;
import
{
TreeData
}
from
"./indicatorStandardsData"
;
import
{
EventDataNode
}
from
"ant-design-vue/es/vc-tree/interface"
;
import
{
PlusOutlined
,
EllipsisOutlined
}
from
"@ant-design/icons-vue"
;
import
{
useMessage
}
from
"@/hooks/web/useMessage"
;
import
{
Modal
}
from
"ant-design-vue"
;
import
{
useModal
}
from
"@/components/Modal"
;
import
{
router
}
from
"@/router"
;
import
CreateBasicStandards
from
'./createIndicatorStandards.vue'
;
import
CreateStandardsType
from
'./createStandardsType.vue'
;
defineOptions
({
name
:
'DeptTree'
});
const
emit
=
defineEmits
([
'select'
]);
const
treeData
=
ref
<
TreeItem
[]
>
([]);
const
treeRef
=
ref
<
Nullable
<
TreeActionType
>>
(
null
);
const
{
createMessage
,
createConfirm
}
=
useMessage
();
const
[
registerCreateIndicatorStandardsModal
,
{
openModal
:
openCreateIndicatorStandardsModal
}]
=
useModal
();
const
[
registerCreateStandardsTypeModal
,
{
openModal
:
openCreateStandardsTypeModal
}]
=
useModal
();
function
getTree
()
{
const
tree
=
unref
(
treeRef
);
if
(
!
tree
)
{
throw
new
Error
(
'tree is null!'
);
}
return
tree
;
}
async
function
fetch
()
{
const
data
=
TreeData
treeData
.
value
=
handleTree
(
data
,
'businessId'
,
undefined
,
undefined
,
undefined
)
await
nextTick
(()
=>
{
getTree
().
expandAll
(
true
)
})
}
/** 转成树 */
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
handleSelect
(
keys
)
{
emit
(
'select'
,
keys
[
0
]);
}
onMounted
(()
=>
{
fetch
();
});
// 树的操作列表
const
actionList
=
[
{
//全部操作按钮
render
:
(
node
)
=>
{
return
h
(
EllipsisOutlined
,
{
class
:
'ml-2'
,
onClick
:
()
=>
{
getRightMenuList
(
node
)
},
});
},
},
];
function
getRightMenuList
(
node
:
EventDataNode
):
Promise
<
ContextMenuItem
[]
>
{
const
menu
=
[
{
label
:
'查看详情'
,
handler
:
()
=>
{
detailButton
(
node
)
},
icon
:
'ant-design:file-search-outlined'
,
},
{
label
:
'新建标准分类'
,
handler
:
()
=>
{
createStandardsTypeButton
(
node
)
},
icon
:
'ant-design:file-add-outlined'
,
},
{
label
:
'新建指标标准'
,
handler
:
()
=>
{
createIndicatorStandardsButton
(
node
)
},
icon
:
'ant-design:file-add-outlined'
,
},
{
label
:
'刷新'
,
handler
:
()
=>
{
reloadButton
()
},
icon
:
'ant-design:sync-outlined'
,
},
];
return
new
Promise
((
resolve
)
=>
{
resolve
(
menu
);
});
}
/**查看详情*/
function
detailButton
(
record
)
{
router
.
push
({
path
:
'/dataStandards/IndicatorStandards/detailStandard'
,
query
:
{
businessId
:
record
.
businessId
,
},
});
}
/**新建标准分类*/
function
createStandardsTypeButton
(
record
)
{
openCreateStandardsTypeModal
(
true
,
{
record
});
}
/**新建指标标准*/
function
createIndicatorStandardsButton
(
record
)
{
openCreateIndicatorStandardsModal
(
true
,
{
record
});
}
/** 成功回调*/
function
reloadButton
()
{
createMessage
.
success
(
'刷新成功!'
)
}
/** 成功回调*/
function
handleSuccess
()
{
}
</
script
>
src/views/dataStandards/IndicatorStandards/MoveModal.vue
0 → 100644
View file @
53b915d2
<
template
>
<BasicModal
width=
"40%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<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
{
moveFormSchema
}
from
'./indicatorStandards.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
TreeData
}
from
"./indicatorStandardsData"
;
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
rowId
=
ref
(
''
);
const
getTitle
=
computed
(()
=>
(
'移动'
));
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
moveFormSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
setModalProps
({
confirmLoading
:
false
});
setFieldsValue
({
...
data
.
record
,
})
const
treeList
=
handleTree
(
TreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
updateSchema
([
{
field
:
'treeId'
,
componentProps
:
{
treeData
:
treeList
},
},
]);
});
/**确定按钮*/
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
}
</
script
>
src/views/dataStandards/IndicatorStandards/ResetNameModal.vue
0 → 100644
View file @
53b915d2
<
template
>
<BasicModal
width=
"40%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<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
{
resetNameFormSchema
}
from
'./indicatorStandards.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
TreeData
}
from
"./indicatorStandardsData"
;
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
rowId
=
ref
(
''
);
const
getTitle
=
computed
(()
=>
(
'重命名'
));
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
resetNameFormSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
setModalProps
({
confirmLoading
:
false
});
setFieldsValue
({
...
data
.
record
,
})
});
/**确定按钮*/
async
function
handleSubmit
()
{
createMessage
.
success
(
'移动成功'
);
closeModal
()
}
</
script
>
src/views/dataStandards/IndicatorStandards/VersionModal.vue
0 → 100644
View file @
53b915d2
<
template
>
<BasicModal
width=
"50%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
>
<BasicTable
@
register=
"registerTable"
>
<template
#
bodyCell=
"
{ column, record }">
<template
v-if=
"column.key === 'action'"
>
<TableAction
:actions=
"[
{
label: '对比',
onClick: contrastButton.bind(null, record),
},
{
label: '撤回',
onClick: withdrawButton.bind(null, record),
},
{
// icon: 'clarity:note-edit-line',
label: '查看',
onClick: detailButton.bind(null, record),
},
]"
/>
</
template
>
</template>
</BasicTable>
</BasicModal>
</template>
<
script
lang=
"ts"
setup
>
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
reactive
,
unref
,
onDeactivated
,
onMounted
,
ref
,
computed
}
from
'vue'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
searchFormSchema
,
versionColumns
,
versionData
}
from
'./indicatorStandardsData'
;
import
{
useGo
}
from
'@/hooks/web/usePage'
;
import
{
useRoute
}
from
'vue-router'
;
import
{
router
}
from
"@/router"
;
defineOptions
({
name
:
'AccountManagement'
});
const
{
createMessage
}
=
useMessage
();
const
route
=
useRoute
();
const
go
=
useGo
();
const
[
registerMoveUser
,
{
openModal
:
openMoveUserModal
}]
=
useModal
();
const
searchInfo
=
reactive
<
Recordable
>
({});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
getTitle
=
computed
(()
=>
(
'版本管理'
));
const
tableData
=
ref
([])
const
isAdd
=
ref
(
true
)
const
[
registerTable
,
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
,
getRowSelection
}]
=
useTable
({
api
:
async
(
params
)
=>
{
const
response
=
{
pageNu
:
"1"
,
pageSize
:
"10"
,
pages
:
"1"
,
total
:
tableData
.
value
.
length
,
code
:
''
,
message
:
''
,
data
:
[],
};
var
data
=
[]
data
=
tableData
.
value
if
(
params
.
name
!=
undefined
&&
params
.
name
!=
''
&&
params
.
name
!=
null
){
//过滤出名字包含params.name的数据
data
=
data
.
filter
((
item
)
=>
item
.
name
.
includes
(
params
.
name
));
}
if
(
params
.
username
!=
undefined
&&
params
.
username
!=
''
&&
params
.
username
!=
null
){
data
=
data
.
filter
((
item
)
=>
item
.
username
.
includes
(
params
.
username
));
}
return
{
...
response
,
data
:
data
};
},
rowKey
:
'businessId'
,
columns
:
versionColumns
,
rowSelection
:
true
,
formConfig
:
{
labelWidth
:
100
,
schemas
:
searchFormSchema
,
autoSubmitOnEnter
:
true
,
},
useSearchForm
:
true
,
showTableSetting
:
false
,
showIndexColumn
:
false
,
bordered
:
true
,
actionColumn
:
{
width
:
150
,
title
:
'操作'
,
dataIndex
:
'action'
,
},
handleSearchInfoFn
(
info
)
{
return
info
;
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
setModalProps
({
confirmLoading
:
false
,
showOkBtn
:
false
,
showCancelBtn
:
false
});
isAdd
.
value
=
!!
data
?.
isAdd
;
});
/** 对比成功*/
function
contrastButton
()
{
closeModal
()
router
.
push
({
path
:
'/dataStandards/IndicatorStandards/basicStandardsContrast'
,
query
:
{
businessId
:
route
.
query
.
businessId
,
},
});
}
/** 撤回成功*/
function
withdrawButton
()
{
createMessage
.
success
(
'撤回成功!'
)
}
/** 查看*/
function
detailButton
(
record
)
{
emit
(
'success'
,
{
values
:
{
...
record
}});
closeModal
();
}
onMounted
(()
=>
{
tableData
.
value
=
versionData
});
</
script
>
src/views/dataStandards/IndicatorStandards/createIndicatorStandards.vue
0 → 100644
View file @
53b915d2
<
template
>
<BasicModal
width=
"40%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
/>
<div
class=
"modalRow"
>
<div>
可见范围
</div>
</div>
<div
class=
"addDialogBG"
>
<div
style=
"float: right"
>
<Icon
icon=
"ant-design:delete-outlined"
:size=
"25"
:color=
"'#ED6F6F'"
/>
</div>
<TreeTwo
class=
"w-1/4 xl:w-1/5"
@
select=
"handleSelect"
/>
</div>
</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
{
resetNameFormSchema
}
from
'./indicatorStandards.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
TreeData
}
from
"./indicatorStandardsData"
;
import
{
createBasicStandardsFormSchema
}
from
'./indicatorStandards.data'
;
import
TreeTwo
from
'@/views/dataStandards/IndicatorStandards/TreeTwo.vue'
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
isUpdate
=
ref
(
true
);
const
isMove
=
ref
(
false
);
const
rowId
=
ref
(
''
);
const
getTitle
=
computed
(()
=>
(
'新建指标标准'
));
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
createBasicStandardsFormSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
setModalProps
({
confirmLoading
:
false
});
var
formData
=
{}
if
(
data
.
record
===
null
||
data
.
record
===
undefined
){
formData
=
{
standardsTree
:
'100'
}
}
else
{
formData
=
{
standardsTree
:
data
.
record
.
businessId
}
}
// 塞值
setFieldsValue
({
...
formData
,
});
const
treeList
=
handleTree
(
TreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
updateSchema
([
{
field
:
'standardsTree'
,
componentProps
:
{
treeData
:
treeList
},
},
]);
});
/**数组对象转成树*/
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
}
/**确定按钮*/
async
function
handleSubmit
()
{
closeModal
()
}
</
script
>
<
style
lang=
"scss"
scoped
>
.modalRow
{
padding
:
0
20px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
.clearAll
{
padding-right
:
10px
;
font-size
:
16px
;
}
.right
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
}
.addDialogBG
{
margin
:
10px
;
border-radius
:
10px
;
padding
:
20px
;
background-color
:
#E8ECF7
;
width
:
98%
;
height
:
400px
;
}
</
style
>
src/views/dataStandards/IndicatorStandards/createStandardsType.vue
0 → 100644
View file @
53b915d2
<
template
>
<BasicModal
width=
"50%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
/>
<div
class=
"modalRow"
>
<div>
可见范围
</div>
<div
class=
"right"
>
<div
class=
"clearAll"
>
清空
</div>
<div>
<a-button
type=
"primary"
>
添加工作组
</a-button>
</div>
</div>
</div>
<div
class=
"addDialogBG"
>
<div
style=
"float: right"
>
<Icon
icon=
"ant-design:delete-outlined"
:size=
"25"
:color=
"'#ED6F6F'"
/>
</div>
<TreeTwo
class=
"w-1/4 xl:w-1/5"
@
select=
"handleSelect"
/>
</div>
</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
{
resetNameFormSchema
}
from
'./indicatorStandards.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
createBasicTypeFormSchema
}
from
'./indicatorStandards.data'
;
import
{
TreeData
}
from
"./indicatorStandardsData"
;
import
TreeTwo
from
'./TreeTwo.vue'
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
isUpdate
=
ref
(
true
);
const
rowId
=
ref
(
''
);
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
createBasicTypeFormSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
setModalProps
({
confirmLoading
:
false
});
var
formData
=
{}
if
(
data
.
record
===
null
||
data
.
record
===
undefined
){
formData
=
{
standardsTree
:
'100'
}
}
else
{
formData
=
{
standardsTree
:
data
.
record
.
businessId
}
}
// 塞值
setFieldsValue
({
...
formData
,
});
const
treeList
=
handleTree
(
TreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
updateSchema
([
{
field
:
'standardsTree'
,
componentProps
:
{
treeData
:
treeList
},
},
{
field
:
'ModelTree'
,
componentProps
:
{
treeData
:
treeList
},
},
]);
});
const
getTitle
=
computed
(()
=>
(
'新建文件夹'
));
/**确定按钮*/
async
function
handleSubmit
()
{
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
}
</
script
>
<
style
lang=
"scss"
scoped
>
.modalRow
{
padding
:
0
20px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
.clearAll
{
padding-right
:
10px
;
font-size
:
16px
;
}
.right
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
}
.addDialogBG
{
margin
:
10px
;
border-radius
:
10px
;
padding
:
20px
;
background-color
:
#E8ECF7
;
width
:
98%
;
height
:
400px
;
}
</
style
>
src/views/dataStandards/IndicatorStandards/detailStandard.vue
0 → 100644
View file @
53b915d2
<
template
>
<div
style=
"background-color: white"
>
<div
style=
"display:flex;margin-top: 15px;margin-bottom: 15px;justify-content: space-between; align-items: center;"
v-if=
"isShow"
>
<div
style=
"margin-left: 15px;font-size: 15px;font-weight: bold"
>
查看版本
<Select
v-model:value=
"optionValue"
show-search
placeholder=
"请选择版本"
style=
"width: 200px"
:options=
"options"
@
change=
"handleChange"
></Select>
</div>
<div>
<a-button
type=
"primary"
@
click=
"contrastButton"
>
版本对比
</a-button>
<a-button
type=
"primary"
style=
"margin-left: 10px"
@
click=
"resetButton"
>
回滚
</a-button>
<a-button
type=
"primary"
style=
"margin-left: 10px"
@
click=
"exitButton"
>
退出查看
</a-button>
</div>
</div>
<Divider
/>
<div
style=
"display: flex;justify-content: space-between; align-items: center;margin-bottom: 10px;margin-left: 12px"
>
<div
style=
"margin-top: 10px;display: flex;font-weight: bold;font-size: 25px;margin-left: 10px"
>
{{
title
}}
<div
style=
"font-size: 15px;padding-top: 15px;padding-left: 10px"
>
版本:
{{
optionValue
}}
</div>
</div>
<div
style=
"margin-top: 10px;display: flex"
v-if=
"!isShow"
>
<a-button
type=
"primary"
@
click=
"editButton"
>
编辑标准
</a-button>
<a-button
type=
"primary"
style=
"margin-left: 10px"
@
click=
"versionButton"
>
版本管理
</a-button>
</div>
</div>
<Divider
/>
<BasicForm
@
register=
"registerForm1"
/>
<Divider
/>
<BasicForm
@
register=
"registerForm2"
/>
<Divider
/>
<BasicForm
@
register=
"registerForm3"
/>
<Divider
/>
<!-- 版本管理 弹窗-->
<VersionModal
@
register=
"registerModal"
@
success=
"handleSuccess"
/>
</div>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
Select
}
from
'ant-design-vue'
;
import
{
Description
}
from
'@/components/Description'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
{
Divider
}
from
'ant-design-vue'
;
import
{
TreeData
}
from
'./indicatorStandardsData'
;
import
{
router
}
from
"@/router"
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
detailSchema1
,
detailSchema2
,
detailSchema3
}
from
'./indicatorStandards.data'
;
import
{
onMounted
,
ref
}
from
"vue"
;
import
{
useRoute
}
from
"vue-router"
;
import
VersionModal
from
'./VersionModal.vue'
import
{
useModal
}
from
"@/components/Modal"
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
const
route
=
useRoute
()
const
title
=
ref
(
''
)
const
formData
=
ref
({})
const
businessId
=
ref
(
''
)
const
isShow
=
ref
(
false
)
const
optionValue
=
ref
(
''
)
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
{
createMessage
,
createConfirm
}
=
useMessage
();
const
[
registerForm1
,
{
setFieldsValue
:
setFieldsValue1
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
detailSchema1
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
const
[
registerForm2
,
{
setFieldsValue
:
setFieldsValue2
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
detailSchema2
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
const
[
registerForm3
,
{
setFieldsValue
:
setFieldsValue3
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
detailSchema3
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
const
options
=
ref
<
any
>
([
{
value
:
'V1'
,
label
:
'V1'
},
{
value
:
'V2'
,
label
:
'V2'
},
{
value
:
'V3'
,
label
:
'V3'
},
]);
/**编辑标准*/
function
editButton
(
record
)
{
router
.
push
({
path
:
'/dataStandards/IndicatorStandards/editDetailStandard'
,
query
:
{
businessId
:
businessId
.
value
,
},
});
}
/**基本标准对比*/
function
contrastButton
(
record
)
{
router
.
push
({
path
:
'/dataStandards/IndicatorStandards/basicStandardsContrast'
,
query
:
{
businessId
:
businessId
.
value
,
},
});
}
/**版本管理 弹窗*/
function
versionButton
(
record
)
{
openModal
(
true
,
{
});
}
/**下拉框改变事件*/
function
handleChange
(
value
)
{
}
/**回滚*/
function
resetButton
(
value
)
{
createMessage
.
success
(
'回滚成功!'
)
}
/**退出查看*/
function
exitButton
(
record
)
{
isShow
.
value
=
false
optionValue
.
value
=
'V3'
}
/**版本管理 弹出回调函数*/
function
handleSuccess
(
record
)
{
optionValue
.
value
=
record
.
values
.
versionName
isShow
.
value
=
true
}
/**初始化*/
onMounted
(()
=>
{
optionValue
.
value
=
'V3'
businessId
.
value
=
route
.
query
.
businessId
const
data
=
TreeData
.
filter
(
item
=>
item
.
businessId
==
businessId
.
value
)
title
.
value
=
data
[
0
].
standardChineseName
setFieldsValue1
({
...
data
[
0
]
})
setFieldsValue2
({
...
data
[
0
]
})
setFieldsValue3
({
...
data
[
0
]
})
});
</
script
>
<
style
lang=
"less"
scoped
>
.desc-wrap {
padding: 16px;
background-color: @component-background;
}
</
style
>
src/views/dataStandards/IndicatorStandards/editDetailStandard.vue
0 → 100644
View file @
53b915d2
<
template
>
<div
style=
"background-color: white"
>
<Divider
/>
<div
style=
"display: flex;justify-content: space-between; align-items: center;margin-bottom: 10px;margin-left: 12px"
>
<div
style=
"margin-top: 10px;display: flex;font-weight: bold;font-size: 25px"
>
{{
title
}}
</div>
<div
style=
"margin-top: 10px;display: flex"
>
<a-button
type=
"primary"
@
click=
"publishButton"
>
发布
</a-button>
<a-button
type=
"primary"
style=
"margin-left: 10px"
@
click=
"saveButton"
>
保存修改
</a-button>
<a-button
type=
"primary"
style=
"margin-left: 10px"
@
click=
"exitEditButton"
>
退出编辑
</a-button>
</div>
</div>
<Divider
/>
<BasicForm
@
register=
"registerForm1"
/>
<div
style=
"margin-left: 10px"
>
命名字典映射
<a-button
style=
"margin-left: 10px;border-color: #4aabfe"
@
click=
"chooseButton"
>
选择
</a-button>
</div>
<Divider
/>
<BasicForm
@
register=
"registerForm2"
/>
<Divider
/>
<BasicForm
@
register=
"registerForm3"
/>
<Divider
/>
<!-- 选择命名字典 弹窗-->
<ChooseNamingDictionaryModal
@
register=
"registerChooseNamingDictionaryModal"
@
success=
"handleSuccess"
/>
</div>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
Description
}
from
'@/components/Description'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
{
Divider
}
from
'ant-design-vue'
;
import
{
documentTreeData
,
publicCodeTreeData
,
TreeData
}
from
'./indicatorStandardsData'
;
import
{
router
}
from
"@/router"
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
editStandardsDetailFormSchema1
,
editStandardsDetailFormSchema2
,
editStandardsDetailFormSchema3
}
from
'./indicatorStandards.data'
;
import
{
onMounted
,
ref
}
from
"vue"
;
import
{
useRoute
}
from
"vue-router"
;
import
ChooseNamingDictionaryModal
from
'./ChooseNamingDictionaryModal.vue'
import
{
useModal
}
from
"@/components/Modal"
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
const
route
=
useRoute
()
const
title
=
ref
(
''
)
const
formData
=
ref
({})
const
businessId
=
ref
(
''
)
const
{
createMessage
,
createConfirm
}
=
useMessage
();
const
[
registerChooseNamingDictionaryModal
,
{
openModal
:
openChooseNamingDictonaryModal
}]
=
useModal
();
const
[
registerForm1
,
{
setFieldsValue
:
setFieldsValue1
,
updateSchema
:
updateSchema1
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
editStandardsDetailFormSchema1
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
const
[
registerForm2
,
{
setFieldsValue
:
setFieldsValue2
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
editStandardsDetailFormSchema2
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
const
[
registerForm3
,
{
setFieldsValue
:
setFieldsValue3
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
editStandardsDetailFormSchema3
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
/**编辑标准*/
function
exitEditButton
(
record
)
{
router
.
push
({
path
:
'/dataStandards/IndicatorStandards/detailStandard'
,
query
:
{
businessId
:
businessId
.
value
,
},
});
}
/**保存*/
function
saveButton
(
record
)
{
createMessage
.
success
(
'保存成功'
)
router
.
push
({
path
:
'/dataStandards/IndicatorStandards/detailStandard'
,
query
:
{
businessId
:
businessId
.
value
,
},
});
}
/**发布*/
function
publishButton
(
record
)
{
createMessage
.
success
(
'发布成功!'
)
router
.
push
({
path
:
'/dataStandards/IndicatorStandards/detailStandard'
,
query
:
{
businessId
:
businessId
.
value
,
},
});
}
/**选择按钮*/
function
chooseButton
(
record
)
{
openChooseNamingDictonaryModal
(
true
,
{
});
}
/**数组对象转成树*/
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
}
/**初始化*/
onMounted
(()
=>
{
const
treeList
=
handleTree
(
documentTreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
updateSchema1
([
{
field
:
'referenceDocument'
,
componentProps
:
{
treeData
:
treeList
},
},
]);
businessId
.
value
=
route
.
query
.
businessId
const
data
=
TreeData
.
filter
(
item
=>
item
.
businessId
==
businessId
.
value
)
title
.
value
=
data
[
0
].
standardChineseName
setFieldsValue1
({
...
data
[
0
]
})
setFieldsValue2
({
...
data
[
0
]
})
setFieldsValue3
({
...
data
[
0
]
})
});
</
script
>
<
style
lang=
"less"
scoped
>
.desc-wrap {
padding: 16px;
background-color: @component-background;
}
</
style
>
src/views/dataStandards/IndicatorStandards/index.vue
View file @
53b915d2
<
template
>
<div>
指标标准
</div>
<PageWrapper
dense
contentFullHeight
fixedHeight
contentClass=
"flex"
>
<IndicatorStandardsTree
class=
"w-1/4 xl:w-1/5"
@
select=
"handleSelect"
/>
<BasicTable
@
register=
"registerTable"
class=
"w-3/4 xl:w-4/5"
:searchInfo=
"searchInfo"
>
<template
#
toolbar
>
<a-button
type=
"primary"
@
click=
"copyButton"
>
复制到
</a-button>
<a-button
type=
"primary"
@
click=
"deleteBatchButton"
>
删除
</a-button>
<a-button
type=
"primary"
@
click=
"MoveButton"
>
移动
</a-button>
<a-button
type=
"primary"
@
click=
"ExportRelativeButton"
>
导出关联关系
</a-button>
<a-button
type=
"primary"
@
click=
"ExportDataStandardsButton"
>
导出数据标准
</a-button>
<a-button
type=
"primary"
@
click=
"batchPublishButton"
>
批量发布
</a-button>
<a-button
type=
"primary"
@
click=
"createStandardsTypeButton"
>
新建标准分类
</a-button>
<a-button
type=
"primary"
@
click=
"createIndicatorStandardsButton"
>
新建指标标准
</a-button>
</
template
>
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.key === 'action'"
>
<TableAction
:actions=
"[
{
icon: 'ant-design:form-outlined',
// label: '重命名',
onClick: resetNameButton.bind(null, record),
},
{
icon: 'ant-design:folder-open-outlined',
// label: '移动',
onClick: MoveButton.bind(null, record),
},
{
icon: 'ant-design:delete-outlined',
// label: '删除',
color: 'error',
popConfirm: {
title: '是否确认删除',
placement: 'left',
confirm: deleteButton.bind(null, record),
},
},
{
icon: 'ant-design:folder-outlined',
// label: '复制',
onClick: copyButton.bind(null, record),
},
{
icon: 'ant-design:file-search-outlined',
// label: '查看详情',
onClick: detailButton.bind(null, record),
},
{
icon: 'ant-design:api-outlined',
// label: '关联关系',
onClick: relatedRelationshipsButton.bind(null, record),
},
]"
/>
</
template
>
</template>
<
template
#
referenceStandard=
"{ text, record }"
>
<span
v-for=
"(item, index) in text"
:key=
"index"
>
{{
item
.
icon
}}
</span>
</
template
>
</BasicTable>
<!-- 新建基础标准 弹窗-->
<CreateIndicatorStandards
@
register=
"registerCreateIndicatorStandardsModal"
@
success=
"handleSuccess"
/>
<!-- 新建标准分类 弹窗-->
<CreateStandardsType
@
register=
"registerCreateStandardsTypeModal"
@
success=
"handleSuccess"
/>
<!-- 移动 弹窗-->
<MoveModal
@
register=
"registerMoveModal"
@
success=
"handleSuccess"
/>
<!-- 复制到 弹窗-->
<CopyModal
@
register=
"registerCopyModal"
@
success=
"handleSuccess"
/>
<!-- 重命名 弹窗-->
<ResetNameModal
@
register=
"registerResetNameModal"
@
success=
"handleSuccess"
/>
</PageWrapper>
</template>
<
script
lang=
"ts"
setup
>
import
{
reactive
,
unref
,
onDeactivated
,
onMounted
,
ref
}
from
'vue'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
IndicatorStandardsTree
from
'./IndicatorStandardsTree.vue'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
CreateIndicatorStandards
from
'./createIndicatorStandards.vue'
;
import
CreateStandardsType
from
'./createStandardsType.vue'
;
import
MoveModal
from
'./MoveModal.vue'
;
import
CopyModal
from
'./CopyModal.vue'
;
import
ResetNameModal
from
'./ResetNameModal.vue'
;
import
{
columns
,
searchFormSchema
}
from
'./indicatorStandards.data'
;
import
{
useGo
}
from
'@/hooks/web/usePage'
;
import
{
useRoute
}
from
'vue-router'
;
import
{
TreeData
}
from
'./indicatorStandardsData'
;
import
{
router
}
from
'@/router'
;
import
{
exportUserList
}
from
"@/api/system/user/user"
;
import
{
downloadByData
}
from
"@/utils/file/download"
;
<
script
>
export
default
{
name
:
"index"
}
</
script
>
defineOptions
({
name
:
'AccountManagement'
});
const
{
createMessage
,
createConfirm
}
=
useMessage
();
const
route
=
useRoute
();
const
go
=
useGo
();
const
[
registerCreateIndicatorStandardsModal
,
{
openModal
:
openCreateIndicatorStandardsModal
}]
=
useModal
();
const
[
registerCreateStandardsTypeModal
,
{
openModal
:
openCreateStandardsTypeModal
}]
=
useModal
();
const
[
registerMoveModal
,
{
openModal
:
openMoveModal
}]
=
useModal
();
const
[
registerCopyModal
,
{
openModal
:
openCopyModal
}]
=
useModal
();
const
[
registerResetNameModal
,
{
openModal
:
openResetNameModal
}]
=
useModal
();
const
searchInfo
=
reactive
<
Recordable
>
({});
const
tableData
=
ref
([])
const
[
registerTable
,
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
,
getRowSelection
}]
=
useTable
({
title
:
''
,
api
:
async
(
params
)
=>
{
//过滤掉tableData.value中,businessId等于100的
var
data
=
[];
if
(
params
.
taskId
==
undefined
||
params
.
taskId
==
''
){
data
=
tableData
.
value
.
filter
((
item
)
=>
item
.
businessId
>=
200
);
}
else
if
(
params
.
taskId
>=
200
){
data
=
tableData
.
value
.
filter
((
item
)
=>
item
.
businessId
==
params
.
taskId
);
}
else
{
data
=
tableData
.
value
.
filter
((
item
)
=>
item
.
parentId
==
params
.
taskId
);
}
const
response
=
{
pageNu
:
"1"
,
pageSize
:
"10"
,
pages
:
"1"
,
total
:
data
.
length
,
code
:
''
,
message
:
''
,
data
:
[],
};
//过滤data中的数据,取出等于params.deptId的数据
return
{
...
response
,
data
:
data
};
},
rowKey
:
'businessId'
,
columns
,
rowSelection
:
true
,
formConfig
:
{
labelWidth
:
120
,
schemas
:
searchFormSchema
,
autoSubmitOnEnter
:
true
,
resetFunc
:
()
=>
{
searchInfo
.
taskId
=
''
},
},
useSearchForm
:
true
,
showTableSetting
:
false
,
showIndexColumn
:
false
,
bordered
:
true
,
handleSearchInfoFn
(
info
)
{
return
info
;
},
actionColumn
:
{
width
:
250
,
title
:
'操作'
,
dataIndex
:
'action'
,
},
});
/**复制到 按钮*/
function
copyButton
()
{
openCopyModal
(
true
,
{
});
}
/**重命名 按钮*/
function
resetNameButton
(
record
)
{
openResetNameModal
(
true
,
{
record
});
}
/**复制到 按钮*/
function
copyButton1
()
{
openCopyModal
(
true
,
{
});
}
/**查看详情*/
function
detailButton
(
record
)
{
router
.
push
({
path
:
'/dataStandards/IndicatorStandards/detailStandard'
,
query
:
{
businessId
:
record
.
businessId
,
},
});
}
/**移动*/
function
MoveButton
()
{
openMoveModal
(
true
,
{
});
}
/**批量发布*/
function
batchPublishButton
()
{
createMessage
.
success
(
'发布成功!'
)
}
/**删除按钮*/
function
deleteBatchButton
()
{
createConfirm
({
iconType
:
'warning'
,
title
:
'确认删除'
,
content
:
'确认批量删除选中数据吗?'
,
onOk
()
{
createMessage
.
success
(
'删除成功!'
);
reload
();
},
});
}
<
style
scoped
>
/**删除按钮*/
function
deleteButton
()
{
createMessage
.
success
(
'删除成功!'
);
}
</
style
>
/**新建标准分类*/
function
createStandardsTypeButton
()
{
openCreateStandardsTypeModal
(
true
,
{
});
}
/**新建指标标准*/
function
createIndicatorStandardsButton
()
{
openCreateIndicatorStandardsModal
(
true
,
{
});
}
/**导出关联关系*/
async
function
ExportRelativeButton
()
{
const
params
=
Object
.
assign
({},
getSearchInfo
(),
getForm
().
getFieldsValue
());
const
data
=
await
exportUserList
(
params
);
downloadByData
(
data
,
'关联关系信息'
+
'.xlsx'
);
}
/**导出数据标准*/
async
function
ExportDataStandardsButton
()
{
const
params
=
Object
.
assign
({},
getSearchInfo
(),
getForm
().
getFieldsValue
());
const
data
=
await
exportUserList
(
params
);
downloadByData
(
data
,
'数据标准信息'
+
'.xlsx'
);
}
function
handleSuccess
({
isUpdate
,
values
})
{
}
/** 树的select*/
function
handleSelect
(
taskId
=
''
)
{
searchInfo
.
taskId
=
taskId
;
reload
();
}
/**关联关系*/
function
relatedRelationshipsButton
(
record
:
Recordable
)
{
router
.
push
({
path
:
'/dataStandards/IndicatorStandards/relatedRelationships'
,
query
:
{
businessId
:
record
.
businessId
,
},
});
}
onMounted
(()
=>
{
tableData
.
value
=
TreeData
});
</
script
>
src/views/dataStandards/IndicatorStandards/indicatorStandards.data.ts
0 → 100644
View file @
53b915d2
This diff is collapsed.
Click to expand it.
src/views/dataStandards/IndicatorStandards/indicatorStandardsContrast.vue
0 → 100644
View file @
53b915d2
<
template
>
<PageWrapper
title=
"版本对比"
contentFullHeight
contentBackground
contentClass=
"flex"
>
<template
#
footer
>
<div
style=
"display: flex; justify-content: flex-end; padding-bottom: 10px"
>
<a-button
style=
"margin-right: 5px"
type=
"primary"
@
click=
"startContrast"
>
开始对比
</a-button>
<a-button
style=
"margin-right: 5px"
type=
"primary"
@
click=
"endContrast"
>
结束对比
</a-button>
</div>
</
template
>
<div
class=
"w-1/2 xl:w-1/2 pl-4"
>
<div
style=
"display: flex;justify-content: space-between; align-items: center;margin-bottom: 10px;margin-left: 12px"
>
<div
style=
"margin-top: 10px;display: flex;font-weight: bold;font-size: 20px;margin-left: 10px"
>
<Icon
icon=
"ion:layers-outline"
:size=
"25"
:color=
"'#1091FE'"
/>
{{title}}
<div
style=
"font-size: 15px;padding-left: 10px;padding-left: 50px"
>
<div>
版本
<Select
v-model:value=
"optionValue"
show-search
placeholder=
"请选择版本"
style=
"width: 200px;margin-left: 10px"
:options=
"options"
@
change=
"handleChange"
></Select>
</div>
</div>
</div>
</div>
<div>
<BasicForm
@
register=
"registerLeftForm"
/>
</div>
</div>
<div
class=
"w-1/2 xl:w-1/2"
>
<div
style=
"display: flex;justify-content: space-between; align-items: center;margin-bottom: 10px;margin-left: 12px"
>
<div
style=
"margin-top: 10px;display: flex;font-weight: bold;font-size: 20px;margin-left: 10px"
>
<Icon
icon=
"ion:layers-outline"
:size=
"25"
:color=
"'#1091FE'"
/>
{{title}}
<div
style=
"font-size: 15px;padding-left: 10px;padding-left: 50px"
>
<div>
版本
<Select
v-model:value=
"optionValue"
show-search
placeholder=
"请选择版本"
style=
"width: 200px;margin-left: 10px"
:options=
"options"
@
change=
"handleChange"
></Select>
</div>
</div>
</div>
</div>
<div>
<BasicForm
@
register=
"registerRightForm"
/>
</div>
</div>
</PageWrapper>
</template>
<
script
lang=
"ts"
setup
>
import
{
BasicTable
,
useTable
}
from
'@/components/Table'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
{
contrastSchema
}
from
'@/views/dataStandards/IndicatorStandards/indicatorStandards.data'
;
import
{
leftContrastData
,
rightContrastData
}
from
'@/views/dataStandards/IndicatorStandards/indicatorStandardsData'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
onMounted
,
ref
}
from
"vue"
;
import
{
Select
}
from
'ant-design-vue'
;
import
Icon
from
'@/components/Icon/Icon.vue'
;
import
{
router
}
from
"@/router"
;
import
{
useRoute
,
onBeforeRouteLeave
}
from
'vue-router'
;
defineOptions
({
name
:
'Metadata'
});
const
route
=
useRoute
();
const
title
=
ref
(
'对外投资出资方式'
)
const
options
=
ref
<
any
>
([
{
value
:
'V1'
,
label
:
'V1'
},
{
value
:
'V2'
,
label
:
'V2'
},
{
value
:
'V3'
,
label
:
'V3'
},
]);
const
{
createMessage
}
=
useMessage
();
const
[
registerLeftForm
,{
setFieldsValue
:
setLeftFieldsValue
}]
=
useForm
({
labelWidth
:
100
,
schemas
:
contrastSchema
,
showActionButtonGroup
:
false
,
});
const
[
registerRightForm
,{
setFieldsValue
:
setRightFieldsValue
}]
=
useForm
({
labelWidth
:
100
,
schemas
:
contrastSchema
,
showActionButtonGroup
:
false
,
});
/**开始对比*/
function
startContrast
()
{
createMessage
.
success
(
'开始对比'
);
}
/**结束对比*/
function
endContrast
()
{
router
.
push
({
path
:
'/dataStandards/IndicatorStandards/detailStandard'
,
query
:
{
businessId
:
route
.
query
.
businessId
,
},
});
}
onMounted
(()
=>
{
setLeftFieldsValue
({
...
leftContrastData
[
0
],
})
setRightFieldsValue
({
...
rightContrastData
[
0
],
})
});
</
script
>
src/views/dataStandards/IndicatorStandards/indicatorStandardsData.ts
0 → 100644
View file @
53b915d2
This diff is collapsed.
Click to expand it.
src/views/dataStandards/IndicatorStandards/relatedBasicStandardModal.vue
0 → 100644
View file @
53b915d2
<
template
>
<BasicModal
width=
"40%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<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
{
relatedBasicStandardsSchema
}
from
'./indicatorStandards.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
qualityTreeData
,
TreeData
}
from
"./indicatorStandardsData"
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
rowId
=
ref
(
''
);
const
getTitle
=
computed
(()
=>
(
'关联基础标准'
));
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
relatedBasicStandardsSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
setModalProps
({
confirmLoading
:
false
});
setFieldsValue
({
...
data
.
record
,
})
const
treeList
=
handleTree
(
TreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
updateSchema
([
{
field
:
'basicStandardsTree'
,
componentProps
:
{
treeData
:
treeList
},
},
]);
});
/**确定按钮*/
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
}
</
script
>
src/views/dataStandards/IndicatorStandards/relatedIndicatorStandardsModal.vue
0 → 100644
View file @
53b915d2
<
template
>
<BasicModal
width=
"40%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<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
{
relatedDocumentSchema
,
relatedIndicatorStandardsSchema
}
from
'./indicatorStandards.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
documentTreeData
,
indicatorTreeData
,
qualityTreeData
}
from
"./indicatorStandardsData"
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
rowId
=
ref
(
''
);
const
getTitle
=
computed
(()
=>
(
'关联指标标准'
));
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
relatedIndicatorStandardsSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
setModalProps
({
confirmLoading
:
false
});
setFieldsValue
({
...
data
.
record
,
})
const
treeList
=
handleTree
(
indicatorTreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
updateSchema
([
{
field
:
'indicatorStandardsTree'
,
componentProps
:
{
treeData
:
treeList
},
},
]);
});
/**确定按钮*/
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
}
</
script
>
src/views/dataStandards/IndicatorStandards/relatedMetaDataModal.vue
0 → 100644
View file @
53b915d2
<
template
>
<BasicModal
width=
"40%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<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
{
relatedMeteDataSchema
}
from
'./indicatorStandards.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
meteDataTreeData
,
qualityTreeData
}
from
"./indicatorStandardsData"
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
rowId
=
ref
(
''
);
const
getTitle
=
computed
(()
=>
(
'关联元数据'
));
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
relatedMeteDataSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
setModalProps
({
confirmLoading
:
false
});
setFieldsValue
({
...
data
.
record
,
})
const
treeList
=
handleTree
(
meteDataTreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
updateSchema
([
{
field
:
'meteDataTree'
,
componentProps
:
{
treeData
:
treeList
},
},
]);
});
/**确定按钮*/
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
}
</
script
>
src/views/dataStandards/IndicatorStandards/relatedQualityModal.vue
0 → 100644
View file @
53b915d2
<
template
>
<BasicModal
width=
"40%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
/>
<BasicTable
@
register=
"registerTable1"
/>
</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
{
relatedQualityColumns
,
relatedQualitySchema
,
relatedRelationshipColumns1
}
from
'./indicatorStandards.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
qualityTreeData
,
relatedQualityData
,
relatedRelationshipsData1
,
TreeData
}
from
"./indicatorStandardsData"
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
rowId
=
ref
(
''
);
const
getTitle
=
computed
(()
=>
(
'关联质量模版'
));
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
relatedQualitySchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
setModalProps
({
confirmLoading
:
false
});
setFieldsValue
({
...
data
.
record
,
})
const
treeList
=
handleTree
(
qualityTreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
updateSchema
([
{
field
:
'QualityId'
,
componentProps
:
{
treeData
:
treeList
},
},
]);
});
const
[
registerTable1
]
=
useTable
({
title
:
'参数配置'
,
api
:
async
(
params
)
=>
{
const
response
=
{
pageNu
:
"1"
,
pageSize
:
"10"
,
pages
:
"1"
,
total
:
relatedQualityData
.
length
,
code
:
''
,
message
:
''
,
data
:
[],
};
//过滤data中的数据,取出等于params.deptId的数据
return
{
...
response
,
data
:
relatedQualityData
};
},
columns
:
relatedQualityColumns
,
useSearchForm
:
false
,
showTableSetting
:
false
,
showIndexColumn
:
false
,
pagination
:
false
,
bordered
:
true
,
});
/**确定按钮*/
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
}
</
script
>
src/views/dataStandards/IndicatorStandards/relatedRelationships.vue
0 → 100644
View file @
53b915d2
<
template
>
<PageWrapper
:title=
"title"
class=
"content-padding"
contentBackground
@
back=
"goBack"
>
<!--
<div
class=
"relatedRelationships_module"
>
-->
<BasicTable
@
register=
"registerTable1"
>
<template
#
toolbar
>
<a-button
type=
"primary"
@
click=
"createQualityButton"
>
创建质量规则
</a-button>
<a-button
type=
"primary"
@
click=
"lookQualityButton"
>
查看质量规则
</a-button>
<a-button
type=
"primary"
@
click=
"referenceTemplateButton"
>
引用模版
</a-button>
</
template
>
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.key === 'action'"
>
<TableAction
:actions=
"[
{
icon: 'ant-design:link-outlined',
onClick: Button.bind(null, record),
},
]"
/>
</
template
>
</template>
<
template
#
qualityTemplateName=
"{ text, record }"
>
<a
@
click=
"showDetails1(record)"
>
{{
text
}}
</a>
</
template
>
<
template
#
dataSource=
"{ text, record }"
>
<span
v-for=
"(item, index) in text"
:key=
"index"
>
{{
item
.
icon
}}
</span>
</
template
>
</BasicTable>
<BasicTable
@
register=
"registerTable2"
>
<
template
#
toolbar
>
<a-button
type=
"primary"
@
click=
"referenceBasicStandardsButton"
>
引用标准
</a-button>
</
template
>
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.key === 'action'"
>
<TableAction
:actions=
"[
{
icon: 'ant-design:link-outlined',
onClick: Button.bind(null, record),
},
]"
/>
</
template
>
</template>
<
template
#
standardName=
"{ text, record }"
>
<a
@
click=
"showDetails(record)"
>
{{
text
}}
</a>
</
template
>
</BasicTable>
<BasicTable
@
register=
"registerTable3"
>
<
template
#
toolbar
>
<a-button
type=
"primary"
@
click=
"referenceIndicatorStandardsButton"
>
引用标准
</a-button>
</
template
>
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.key === 'action'"
>
<TableAction
:actions=
"[
{
icon: 'ant-design:link-outlined',
onClick: Button.bind(null, record),
},
]"
/>
</
template
>
</template>
<
template
#
standardName=
"{ text, record }"
>
<a
@
click=
"showDetails(record)"
>
{{
text
}}
</a>
</
template
>
</BasicTable>
<BasicTable
@
register=
"registerTable4"
>
<
template
#
toolbar
>
<a-button
type=
"primary"
@
click=
"referenceMetaDataButton"
>
关联元数据
</a-button>
</
template
>
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.key === 'action'"
>
<TableAction
:actions=
"[
{
icon: 'ant-design:link-outlined',
onClick: Button.bind(null, record),
},
]"
/>
</
template
>
</template>
<
template
#
dataTable=
"{ text, record }"
>
<a
@
click=
"showDetails(record)"
>
{{
text
}}
</a>
</
template
>
</BasicTable>
<!-- </div>-->
<!-- 引用模版 弹窗-->
<RelatedQualityModal
@
register=
"registerRelatedQualityModal"
@
success=
"handleSuccess"
/>
<!-- 引用基础标准 弹窗-->
<RelatedBasicStandardModal
@
register=
"registerBasicStandardModal"
@
success=
"handleSuccess"
/>
<!-- 引用元数据 弹窗-->
<RelatedMetaDataModal
@
register=
"registerMetaDataModal"
@
success=
"handleSuccess"
/>
<!-- 引用指标标准 弹窗-->
<RelatedIndicatorStandardsModal
@
register=
"registerIndicatorStandardsModal"
@
success=
"handleSuccess"
/>
</PageWrapper>
</template>
<
script
lang=
"ts"
setup
>
import
{
Divider
}
from
'ant-design-vue'
;
import
{
router
}
from
"@/router"
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
onMounted
,
ref
}
from
"vue"
;
import
{
useRoute
}
from
"vue-router"
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
{
useGo
}
from
'@/hooks/web/usePage'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
RelatedQualityModal
from
'./relatedQualityModal.vue'
;
import
RelatedBasicStandardModal
from
'./relatedBasicStandardModal.vue'
;
import
RelatedMetaDataModal
from
'./relatedMetaDataModal.vue'
;
import
RelatedIndicatorStandardsModal
from
'./relatedIndicatorStandardsModal.vue'
;
import
{
relatedRelationshipColumns1
,
relatedRelationshipColumns2
,
relatedRelationshipColumns3
,
relatedRelationshipColumns4
,
}
from
"./indicatorStandards.data"
;
import
{
relatedRelationshipsData1
,
relatedRelationshipsData2
,
relatedRelationshipsData3
,
relatedRelationshipsData4
,
}
from
"./indicatorStandardsData"
;
import
{
useModal
}
from
"@/components/Modal"
;
const
go
=
useGo
();
const
route
=
useRoute
()
const
title
=
ref
(
'关联关系'
)
const
{
createMessage
,
createConfirm
}
=
useMessage
();
const
[
registerRelatedQualityModal
,
{
openModal
:
openRelatedQualityModal
}]
=
useModal
();
const
[
registerBasicStandardModal
,
{
openModal
:
openBasicStandardModal
}]
=
useModal
();
const
[
registerMetaDataModal
,
{
openModal
:
openMetaDataModal
}]
=
useModal
();
const
[
registerIndicatorStandardsModal
,
{
openModal
:
openIndicatorStandardsModal
}]
=
useModal
();
/**列表*/
const
[
registerTable1
]
=
useTable
({
title
:
'质量模版'
,
api
:
async
(
params
)
=>
{
const
response
=
{
pageNu
:
"1"
,
pageSize
:
"10"
,
pages
:
"1"
,
total
:
relatedRelationshipsData1
.
length
,
code
:
''
,
message
:
''
,
data
:
[],
};
//过滤data中的数据,取出等于params.deptId的数据
return
{
...
response
,
data
:
relatedRelationshipsData1
};
},
columns
:
relatedRelationshipColumns1
,
useSearchForm
:
false
,
showTableSetting
:
false
,
showIndexColumn
:
false
,
pagination
:
false
,
bordered
:
true
,
scroll
:
{
y
:
500
},
actionColumn
:
{
width
:
100
,
title
:
'操作'
,
dataIndex
:
'action'
,
},
});
const
[
registerTable2
]
=
useTable
({
title
:
'基础标准'
,
api
:
async
(
params
)
=>
{
const
response
=
{
pageNu
:
"1"
,
pageSize
:
"10"
,
pages
:
"1"
,
total
:
relatedRelationshipsData2
.
length
,
code
:
''
,
message
:
''
,
data
:
[],
};
//过滤data中的数据,取出等于params.deptId的数据
return
{
...
response
,
data
:
relatedRelationshipsData2
};
},
columns
:
relatedRelationshipColumns2
,
useSearchForm
:
false
,
showTableSetting
:
false
,
pagination
:
false
,
showIndexColumn
:
false
,
bordered
:
true
,
scroll
:
{
y
:
500
},
actionColumn
:
{
width
:
100
,
title
:
'操作'
,
dataIndex
:
'action'
,
},
});
const
[
registerTable3
]
=
useTable
({
title
:
'指标标准'
,
api
:
async
(
params
)
=>
{
const
response
=
{
pageNu
:
"1"
,
pageSize
:
"10"
,
pages
:
"1"
,
total
:
relatedRelationshipsData3
.
length
,
code
:
''
,
message
:
''
,
data
:
[],
};
//过滤data中的数据,取出等于params.deptId的数据
return
{
...
response
,
data
:
relatedRelationshipsData3
};
},
columns
:
relatedRelationshipColumns3
,
useSearchForm
:
false
,
showTableSetting
:
false
,
showIndexColumn
:
false
,
bordered
:
true
,
scroll
:
{
y
:
500
},
pagination
:
false
,
actionColumn
:
{
width
:
100
,
title
:
'操作'
,
dataIndex
:
'action'
,
},
});
const
[
registerTable4
]
=
useTable
({
title
:
'元数据'
,
api
:
async
(
params
)
=>
{
const
response
=
{
pageNu
:
"1"
,
pageSize
:
"10"
,
pages
:
"1"
,
total
:
relatedRelationshipsData4
.
length
,
code
:
''
,
message
:
''
,
data
:
[],
};
//过滤data中的数据,取出等于params.deptId的数据
return
{
...
response
,
data
:
relatedRelationshipsData4
};
},
columns
:
relatedRelationshipColumns4
,
useSearchForm
:
false
,
showTableSetting
:
false
,
showIndexColumn
:
false
,
bordered
:
true
,
pagination
:
false
,
scroll
:
{
y
:
500
},
actionColumn
:
{
width
:
100
,
title
:
'操作'
,
dataIndex
:
'action'
,
},
});
/**引用指标标准 按钮*/
function
referenceIndicatorStandardsButton
(
record
)
{
openIndicatorStandardsModal
(
true
,{
})
}
/**引用元数据 按钮*/
function
referenceMetaDataButton
(
record
)
{
openMetaDataModal
(
true
,{
})
}
/**引用基础标准 按钮*/
function
referenceBasicStandardsButton
(
record
)
{
openBasicStandardModal
(
true
,{
})
}
/**引用质量模版 按钮*/
function
referenceTemplateButton
(
record
)
{
openRelatedQualityModal
(
true
,{
})
}
/**按钮*/
function
Button
(
record
)
{
router
.
push
({
path
:
''
,
query
:
{
},
});
}
/**查看质量规则 按钮*/
function
lookQualityButton
(
record
)
{
router
.
push
({
path
:
'/dataQuality/rule'
,
query
:
{
},
});
}
/**创建质量规则 按钮*/
function
createQualityButton
(
record
)
{
router
.
push
({
path
:
'/dataQuality/rule'
,
query
:
{
},
});
}
/**表1 跳转*/
function
showDetails1
()
{
}
/**返回*/
function
goBack
()
{
// 本例的效果时点击返回始终跳转到账号列表页,实际应用时可返回上一页
go
(
'/dataStandards/IndicatorStandards/index'
);
}
/**初始化*/
onMounted
(()
=>
{
});
</
script
>
src/views/dataStandards/IndicatorStandards/treeTwo.vue
0 → 100644
View file @
53b915d2
<
template
>
<div
class=
"m-4 mr-0 overflow-hidden bg-white"
>
<BasicTree
title=
"工作组"
ref=
"treeRef"
toolbar
search
treeWrapperClassName=
"h-[calc(100%-35px)] overflow-auto"
:clickRowToExpand=
"true"
:checkable=
"true"
:defaultExpandAll=
"true"
:treeData=
"treeData"
:fieldNames=
"
{ key: 'businessId', title: 'label' }"
@select="handleSelect"
/>
</div>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
nextTick
,
onMounted
,
ref
,
unref
}
from
'vue'
;
import
{
BasicTree
,
TreeActionType
,
TreeItem
}
from
'@/components/Tree'
;
import
{
getDeptList
}
from
'@/api/system/dept/dept'
;
import
{
Nullable
}
from
"@vben/types"
;
import
{
treeDataListTwo
}
from
"./indicatorStandardsData"
;
defineOptions
({
name
:
'DeptTree'
});
const
emit
=
defineEmits
([
'select'
]);
const
treeData
=
ref
<
TreeItem
[]
>
([]);
const
treeRef
=
ref
<
Nullable
<
TreeActionType
>>
(
null
);
async
function
fetch
()
{
treeData
.
value
=
treeDataListTwo
await
nextTick
(()
=>
{
getTree
().
expandAll
(
true
)
})
}
function
getTree
()
{
const
tree
=
unref
(
treeRef
);
if
(
!
tree
)
{
throw
new
Error
(
'tree is null!'
);
}
return
tree
;
}
function
handleSelect
(
keys
)
{
emit
(
'select'
,
keys
[
0
]);
}
onMounted
(()
=>
{
fetch
();
});
</
script
>
<
style
lang=
"scss"
scoped
>
.bg-white
{
width
:
97%
;
}
::v-deep
(
.vben-tree
)
{
background-color
:
#E8ECF7
!
important
;
}
</
style
>
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