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
9d96a6c9
Commit
9d96a6c9
authored
Dec 12, 2024
by
罗林杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改公共代码
parent
cc6afbd8
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
319 additions
and
237 deletions
+319
-237
AddCodeValueModal.vue
src/views/dataStandards/publicCode/AddCodeValueModal.vue
+52
-34
detailPublicCodeModal.vue
src/views/dataStandards/publicCode/detailPublicCodeModal.vue
+48
-11
editDetail.vue
src/views/dataStandards/publicCode/editDetail.vue
+172
-153
editPublicCodeModal.vue
src/views/dataStandards/publicCode/editPublicCodeModal.vue
+42
-10
publicCode.data.ts
src/views/dataStandards/publicCode/publicCode.data.ts
+0
-24
optionPage.vue
src/views/realTimeSync/dataBaseToDataBase/optionPage.vue
+5
-5
No files found.
src/views/dataStandards/publicCode/AddCodeValueModal.vue
View file @
9d96a6c9
<
template
>
<
template
>
<BasicModal
width=
"50%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicModal
width=
"50%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
/>
<BasicForm
@
register=
"registerForm"
/>
<BasicTable
@
register=
"registerTable"
/>
<BasicTable
@
register=
"registerTable"
/>
</BasicModal>
</BasicModal>
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
,
unref
,
reactive
}
from
'vue'
;
import
{
ref
,
computed
,
unref
,
reactive
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
addValueColumns
,
addValueFormSchema
,
addValueSearchSchema
,
searchFormSchema
}
from
'./publicCode.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
import
{
addValueData
,
TreeData
addValueColumns
,
}
from
"./publicCodeData"
;
addValueFormSchema
,
addValueSearchSchema
,
searchFormSchema
,
}
from
'./publicCode.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
addValueData
,
TreeData
}
from
'./publicCodeData'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
defineOptions
({
name
:
'AccountModal'
});
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
{
createMessage
}
=
useMessage
();
const
rowId
=
ref
(
''
);
const
rowId
=
ref
(
''
);
const
getTitle
=
computed
(()
=>
(
'添加值'
)
);
const
getTitle
=
computed
(()
=>
'添加值'
);
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
...
@@ -37,13 +47,13 @@
...
@@ -37,13 +47,13 @@
setModalProps
({
confirmLoading
:
false
});
setModalProps
({
confirmLoading
:
false
});
setFieldsValue
({
setFieldsValue
({
...
data
.
record
,
...
data
.
record
,
})
})
;
const
treeList
=
handleTree
(
TreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
const
treeList
=
handleTree
(
TreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
);
updateSchema
([
updateSchema
([
{
{
field
:
'QualityId'
,
field
:
'QualityId'
,
componentProps
:
{
componentProps
:
{
treeData
:
treeList
treeData
:
treeList
,
},
},
},
},
]);
]);
...
@@ -53,22 +63,22 @@
...
@@ -53,22 +63,22 @@
title
:
'源系统码值'
,
title
:
'源系统码值'
,
api
:
async
(
params
)
=>
{
api
:
async
(
params
)
=>
{
const
response
=
{
const
response
=
{
pageNu
:
"1"
,
pageNu
:
'1'
,
pageSize
:
"10"
,
pageSize
:
'10'
,
pages
:
"1"
,
pages
:
'1'
,
total
:
addValueData
.
length
,
total
:
addValueData
.
length
,
code
:
''
,
code
:
''
,
message
:
''
,
message
:
''
,
data
:
[],
data
:
[],
};
};
//过滤data中的数据,取出等于params.deptId的数据
//过滤data中的数据,取出等于params.deptId的数据
return
{
...
response
,
data
:
addValueData
};
return
{
...
response
,
data
:
addValueData
};
},
},
columns
:
addValueColumns
,
columns
:
addValueColumns
,
useSearchForm
:
true
,
useSearchForm
:
true
,
showTableSetting
:
false
,
showTableSetting
:
false
,
showIndexColumn
:
false
,
showIndexColumn
:
false
,
pagination
:
false
,
pagination
:
false
,
bordered
:
true
,
bordered
:
true
,
formConfig
:
{
formConfig
:
{
labelWidth
:
120
,
labelWidth
:
120
,
...
@@ -80,27 +90,35 @@
...
@@ -80,27 +90,35 @@
/**确定按钮*/
/**确定按钮*/
async
function
handleSubmit
()
{
async
function
handleSubmit
()
{
createMessage
.
success
(
'添加成功'
);
createMessage
.
success
(
'添加成功'
);
closeModal
()
closeModal
()
;
}
}
/**数组对象转成树*/
/**数组对象转成树*/
function
handleTree
(
data
,
id
,
parentId
,
children
,
rootId
)
{
function
handleTree
(
data
,
id
,
parentId
,
children
,
rootId
)
{
id
=
id
||
'id'
id
=
id
||
'id'
;
parentId
=
parentId
||
'parentId'
parentId
=
parentId
||
'parentId'
;
children
=
children
||
'children'
children
=
children
||
'children'
;
rootId
=
rootId
||
Math
.
min
.
apply
(
Math
,
data
.
map
(
item
=>
{
return
item
[
parentId
]
}))
||
0
rootId
=
rootId
||
Math
.
min
.
apply
(
Math
,
data
.
map
((
item
)
=>
{
return
item
[
parentId
];
}),
)
||
0
;
// 对源数据深度克隆
// 对源数据深度克隆
const
cloneData
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
const
cloneData
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
;
// 循环所有项
// 循环所有项
const
treeData
=
cloneData
.
filter
(
father
=>
{
const
treeData
=
cloneData
.
filter
(
(
father
)
=>
{
const
branchArr
=
cloneData
.
filter
(
child
=>
{
const
branchArr
=
cloneData
.
filter
(
(
child
)
=>
{
// 返回每一项的子级数组
// 返回每一项的子级数组
return
father
[
id
]
===
child
[
parentId
]
return
father
[
id
]
===
child
[
parentId
]
;
})
})
;
branchArr
.
length
>
0
?
father
.
children
=
branchArr
:
''
branchArr
.
length
>
0
?
(
father
.
children
=
branchArr
)
:
''
;
// 返回第一层
// 返回第一层
return
father
[
parentId
]
===
rootId
return
father
[
parentId
]
===
rootId
;
})
})
;
return
treeData
!==
''
?
treeData
:
data
return
treeData
!==
''
?
treeData
:
data
;
}
}
</
script
>
</
script
>
src/views/dataStandards/publicCode/detailPublicCodeModal.vue
View file @
9d96a6c9
<
template
>
<
template
>
<BasicModal
width=
"50%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicModal
width=
"50%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
/>
<BasicForm
@
register=
"registerForm"
/>
<BasicTable
@
register=
"registerTable"
/>
</BasicModal>
</BasicModal>
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
,
unref
,
reactive
}
from
'vue'
;
import
{
ref
,
computed
,
unref
,
reactive
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
detailPublicCodeSchema
,
editPublicCodeSchema
}
from
'./publicCode.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
import
{
addValueData
addValueColumns
,
}
from
"./publicCodeData"
;
addValueSearchSchema
,
detailPublicCodeSchema
,
editPublicCodeSchema
,
}
from
'./publicCode.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
addValueData
}
from
'./publicCodeData'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
defineOptions
({
name
:
'AccountModal'
});
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
{
createMessage
}
=
useMessage
();
const
rowId
=
ref
(
''
);
const
rowId
=
ref
(
''
);
const
getTitle
=
computed
(()
=>
(
'查看详情'
)
);
const
getTitle
=
computed
(()
=>
'查看详情'
);
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
...
@@ -30,19 +41,45 @@
...
@@ -30,19 +41,45 @@
span
:
23
,
span
:
23
,
},
},
});
});
const
[
registerTable
]
=
useTable
({
title
:
'源系统码值'
,
api
:
async
(
params
)
=>
{
const
response
=
{
pageNu
:
'1'
,
pageSize
:
'10'
,
pages
:
'1'
,
total
:
addValueData
.
length
,
code
:
''
,
message
:
''
,
data
:
[],
};
//过滤data中的数据,取出等于params.deptId的数据
return
{
...
response
,
data
:
addValueData
};
},
columns
:
addValueColumns
,
useSearchForm
:
false
,
showTableSetting
:
false
,
showIndexColumn
:
false
,
pagination
:
false
,
bordered
:
true
,
formConfig
:
{
labelWidth
:
120
,
schemas
:
addValueSearchSchema
,
autoSubmitOnEnter
:
true
,
},
});
//初始化弹框
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
resetFields
();
setModalProps
({
confirmLoading
:
false
,
showOkBtn
:
false
,
showCancelBtn
:
false
});
setModalProps
({
confirmLoading
:
false
,
showOkBtn
:
false
,
showCancelBtn
:
false
});
setFieldsValue
({
setFieldsValue
({
...
data
.
record
,
...
data
.
record
,
})
})
;
});
});
/**确定按钮*/
/**确定按钮*/
async
function
handleSubmit
()
{
async
function
handleSubmit
()
{
createMessage
.
success
(
'编辑成功'
);
createMessage
.
success
(
'编辑成功'
);
closeModal
()
closeModal
()
;
}
}
</
script
>
</
script
>
src/views/dataStandards/publicCode/editDetail.vue
View file @
9d96a6c9
<
template
>
<
template
>
<div
style=
"background-color: white"
>
<div
style=
"background-color: white"
>
<Divider
/>
<Divider
/>
<div
style=
"display: flex;justify-content: space-between; align-items: center;margin-bottom: 10px;margin-left: 12px"
>
<div
<div
style=
"margin-top: 10px;display: flex;font-weight: bold;font-size: 25px"
>
style=
"
{{
title
}}
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>
<div
style=
"margin-top: 10px;display: flex"
>
<div
style=
"margin-top: 10px;
display: flex"
>
<a-button
type=
"primary"
@
click=
"publishButton"
>
发布
</a-button>
<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=
"saveButton"
>
保存修改
</a-button>
<a-button
type=
"primary"
style=
"margin-left: 10px"
@
click=
"exitEditButton"
>
退出编辑
</a-button>
<a-button
type=
"primary"
style=
"margin-left: 10px"
@
click=
"exitEditButton"
>
退出编辑
</a-button
>
</div>
</div>
</div>
</div>
<Divider
/>
<Divider
/>
...
@@ -47,177 +57,186 @@
...
@@ -47,177 +57,186 @@
</span>
</span>
</
template
>
</
template
>
</BasicTable>
</BasicTable>
<!-- 发布 弹窗-->
<!-- 发布 弹窗-->
<PublishModal
@
register=
"registerModalPublish"
/>
<PublishModal
@
register=
"registerModalPublish"
/>
<AddCodeValueModal
@
register=
"registerModal"
@
success=
"handleSuccess"
/>
<AddCodeValueModal
@
register=
"registerModal"
@
success=
"handleSuccess"
/>
<EditPublicCodeModal
@
register=
"registerEditPublicCodeModal"
@
success=
"handleSuccess"
/>
<EditPublicCodeModal
@
register=
"registerEditPublicCodeModal"
@
success=
"handleSuccess"
/>
</div>
</div>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
Description
}
from
'@/components/Description'
;
import
{
Description
}
from
'@/components/Description'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
{
Divider
}
from
'ant-design-vue'
;
import
{
Divider
}
from
'ant-design-vue'
;
import
{
detailData
,
TreeData
,
referenceDocumentTreeData
}
from
'./publicCodeData'
;
import
{
detailData
,
TreeData
,
referenceDocumentTreeData
}
from
'./publicCodeData'
;
import
{
router
}
from
"@/router"
;
import
{
router
}
from
'@/router'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
import
{
detailColumns
,
detailFormSchema
,
detailColumns
,
editStandardsDetailFormSchema
,
detailFormSchema
,
}
from
'./publicCode.data'
;
editStandardsDetailFormSchema
,
import
{
onMounted
,
ref
}
from
"vue"
;
}
from
'./publicCode.data'
;
import
{
useRoute
}
from
"vue-router"
;
import
{
onMounted
,
ref
}
from
'vue'
;
import
{
useModal
}
from
"@/components/Modal"
;
import
{
useRoute
}
from
'vue-router'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
AddCodeValueModal
from
'./AddCodeValueModal.vue'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
EditPublicCodeModal
from
'./editPublicCodeModal.vue'
;
import
AddCodeValueModal
from
'./AddCodeValueModal.vue'
;
import
PublishModal
from
'./publishModal.vue'
import
EditPublicCodeModal
from
'./editPublicCodeModal.vue'
;
import
PublishModal
from
'./publishModal.vue'
;
const
route
=
useRoute
()
const
title
=
ref
(
''
)
const
route
=
useRoute
();
const
formData
=
ref
({})
const
title
=
ref
(
''
);
const
businessId
=
ref
(
''
)
const
formData
=
ref
({});
const
{
createMessage
,
createConfirm
}
=
useMessage
();
const
businessId
=
ref
(
''
);
const
[
registerModalPublish
,
{
openModal
:
openModalPublish
}]
=
useModal
();
const
{
createMessage
,
createConfirm
}
=
useMessage
();
const
[
registerModal
,
{
openModal
:
openModal
}]
=
useModal
();
const
[
registerModalPublish
,
{
openModal
:
openModalPublish
}]
=
useModal
();
const
[
registerEditPublicCodeModal
,
{
openModal
:
openEditPublicCodeModal
}]
=
useModal
();
const
[
registerModal
,
{
openModal
:
openModal
}]
=
useModal
();
const
[
registerForm1
,
{
setFieldsValue
:
setFieldsValue1
,
updateSchema
}]
=
useForm
({
const
[
registerEditPublicCodeModal
,
{
openModal
:
openEditPublicCodeModal
}]
=
useModal
();
labelWidth
:
100
,
const
[
registerForm1
,
{
setFieldsValue
:
setFieldsValue1
,
updateSchema
}]
=
useForm
({
baseColProps
:
{
lg
:
12
,
md
:
24
},
labelWidth
:
100
,
schemas
:
editStandardsDetailFormSchema
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
showActionButtonGroup
:
false
,
schemas
:
editStandardsDetailFormSchema
,
actionColOptions
:
{
showActionButtonGroup
:
false
,
span
:
23
,
actionColOptions
:
{
},
span
:
23
,
});
const
[
registerTable
,
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
,
getRowSelection
}]
=
useTable
({
title
:
'公共代码'
,
api
:
async
(
params
)
=>
{
const
response
=
{
pageNu
:
"1"
,
pageSize
:
"10"
,
pages
:
"1"
,
total
:
detailData
.
length
,
code
:
''
,
message
:
''
,
data
:
[],
};
//过滤data中的数据,取出等于params.deptId的数据
return
{
...
response
,
data
:
detailData
};
},
columns
:
detailColumns
,
scroll
:
{
y
:
600
},
formConfig
:
{
labelWidth
:
120
,
schemas
:
detailFormSchema
,
autoSubmitOnEnter
:
true
,
},
useSearchForm
:
true
,
showTableSetting
:
false
,
showIndexColumn
:
false
,
bordered
:
true
,
actionColumn
:
{
width
:
250
,
title
:
'操作'
,
dataIndex
:
'action'
,
},
});
/**编辑标准*/
function
exitEditButton
(
record
)
{
router
.
push
({
path
:
'/dataStandards/publicCode/detailPublicCode'
,
query
:
{
businessId
:
businessId
.
value
,
},
},
});
});
}
const
[
registerTable
,
/**保存*/
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
,
getRowSelection
},
function
saveButton
(
record
)
{
]
=
useTable
({
createMessage
.
success
(
'保存成功'
)
title
:
'公共代码'
,
router
.
push
({
api
:
async
(
params
)
=>
{
path
:
'/dataStandards/publicCode/detailPublicCode'
,
const
response
=
{
query
:
{
pageNu
:
'1'
,
businessId
:
businessId
.
value
,
pageSize
:
'10'
,
pages
:
'1'
,
total
:
detailData
.
length
,
code
:
''
,
message
:
''
,
data
:
[],
};
//过滤data中的数据,取出等于params.deptId的数据
return
{
...
response
,
data
:
detailData
};
},
columns
:
detailColumns
,
scroll
:
{
y
:
600
},
formConfig
:
{
labelWidth
:
120
,
schemas
:
detailFormSchema
,
autoSubmitOnEnter
:
true
,
},
useSearchForm
:
true
,
showTableSetting
:
false
,
showIndexColumn
:
false
,
bordered
:
true
,
actionColumn
:
{
width
:
250
,
title
:
'操作'
,
dataIndex
:
'action'
,
},
},
});
});
}
/**编辑标准*/
function
exitEditButton
(
record
)
{
router
.
push
({
path
:
'/dataStandards/publicCode/detailPublicCode'
,
query
:
{
businessId
:
businessId
.
value
,
},
});
}
/**编辑*/
/**保存*/
function
editButton
(
record
)
{
function
saveButton
(
record
)
{
openEditPublicCodeModal
(
true
,{
createMessage
.
success
(
'保存成功'
);
record
:
record
router
.
push
({
})
path
:
'/dataStandards/publicCode/detailPublicCode'
,
}
query
:
{
businessId
:
businessId
.
value
,
},
/**添加值*/
});
function
addValueButton
(
record
)
{
}
openModal
(
true
,{
})
}
/**删除*/
function
deleteButton
(
record
)
{
createMessage
.
success
(
'删除成功!'
)
}
/**编辑*/
function
editButton
(
record
)
{
openEditPublicCodeModal
(
true
,
{
record
:
record
,
});
}
/**发布*/
/**添加值*/
function
publishButton
(
record
)
{
function
addValueButton
(
record
)
{
openModalPublish
(
true
,{
openModal
(
true
,
{});
}
})
/**删除*/
}
function
deleteButton
(
record
)
{
createMessage
.
success
(
'删除成功!'
);
}
/**发布*/
function
publishButton
(
record
)
{
openModalPublish
(
true
,
{});
}
/**初始化*/
/**初始化*/
onMounted
(()
=>
{
onMounted
(()
=>
{
businessId
.
value
=
route
.
query
.
businessId
businessId
.
value
=
route
.
query
.
businessId
;
const
data
=
TreeData
.
filter
(
item
=>
item
.
businessId
==
businessId
.
value
)
const
data
=
TreeData
.
filter
((
item
)
=>
item
.
businessId
==
businessId
.
value
);
title
.
value
=
data
[
0
].
standardChineseName
title
.
value
=
data
[
0
].
standardChineseName
;
const
treeList
=
handleTree
(
referenceDocumentTreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
const
treeList
=
handleTree
(
updateSchema
([
referenceDocumentTreeData
,
{
'businessId'
,
field
:
'documentTree'
,
undefined
,
componentProps
:
{
undefined
,
treeData
:
treeList
undefined
,
);
updateSchema
([
{
field
:
'documentTree'
,
componentProps
:
{
treeData
:
treeList
,
},
},
},
},
]);
]);
setFieldsValue1
({
setFieldsValue1
({
...
data
[
0
],
...
data
[
0
]
});
})
});
});
/**数组对象转成树*/
/**数组对象转成树*/
function
handleTree
(
data
,
id
,
parentId
,
children
,
rootId
)
{
function
handleTree
(
data
,
id
,
parentId
,
children
,
rootId
)
{
id
=
id
||
'id'
id
=
id
||
'id'
;
parentId
=
parentId
||
'parentId'
parentId
=
parentId
||
'parentId'
;
children
=
children
||
'children'
children
=
children
||
'children'
;
rootId
=
rootId
||
Math
.
min
.
apply
(
Math
,
data
.
map
(
item
=>
{
return
item
[
parentId
]
}))
||
0
rootId
=
rootId
||
Math
.
min
.
apply
(
Math
,
data
.
map
((
item
)
=>
{
return
item
[
parentId
];
}),
)
||
0
;
// 对源数据深度克隆
// 对源数据深度克隆
const
cloneData
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
const
cloneData
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
;
// 循环所有项
// 循环所有项
const
treeData
=
cloneData
.
filter
(
father
=>
{
const
treeData
=
cloneData
.
filter
(
(
father
)
=>
{
const
branchArr
=
cloneData
.
filter
(
child
=>
{
const
branchArr
=
cloneData
.
filter
(
(
child
)
=>
{
// 返回每一项的子级数组
// 返回每一项的子级数组
return
father
[
id
]
===
child
[
parentId
]
return
father
[
id
]
===
child
[
parentId
]
;
})
})
;
branchArr
.
length
>
0
?
father
.
children
=
branchArr
:
''
branchArr
.
length
>
0
?
(
father
.
children
=
branchArr
)
:
''
;
// 返回第一层
// 返回第一层
return
father
[
parentId
]
===
rootId
return
father
[
parentId
]
===
rootId
;
})
})
;
return
treeData
!==
''
?
treeData
:
data
return
treeData
!==
''
?
treeData
:
data
;
}
}
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.desc-wrap {
.desc-wrap {
padding: 16px;
padding: 16px;
background-color: @component-background;
background-color: @component-background;
}
}
</
style
>
</
style
>
src/views/dataStandards/publicCode/editPublicCodeModal.vue
View file @
9d96a6c9
<
template
>
<
template
>
<BasicModal
width=
"50%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicModal
width=
"50%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
/>
<BasicForm
@
register=
"registerForm"
/>
<BasicTable
@
register=
"registerTable"
/>
</BasicModal>
</BasicModal>
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
,
unref
,
reactive
}
from
'vue'
;
import
{
ref
,
computed
,
unref
,
reactive
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
editPublicCodeSchema
}
from
'./publicCode.data'
;
import
{
addValueColumns
,
addValueSearchSchema
,
editPublicCodeSchema
}
from
'./publicCode.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
import
{
addValueData
}
from
'./publicCodeData'
;
addValueData
}
from
"./publicCodeData"
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
defineOptions
({
name
:
'AccountModal'
});
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
{
createMessage
}
=
useMessage
();
const
rowId
=
ref
(
''
);
const
rowId
=
ref
(
''
);
const
getTitle
=
computed
(()
=>
(
'编辑公共代码'
)
);
const
getTitle
=
computed
(()
=>
'编辑公共代码'
);
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
...
@@ -30,19 +36,45 @@
...
@@ -30,19 +36,45 @@
span
:
23
,
span
:
23
,
},
},
});
});
const
[
registerTable
]
=
useTable
({
title
:
'源系统码值'
,
api
:
async
(
params
)
=>
{
const
response
=
{
pageNu
:
'1'
,
pageSize
:
'10'
,
pages
:
'1'
,
total
:
addValueData
.
length
,
code
:
''
,
message
:
''
,
data
:
[],
};
//过滤data中的数据,取出等于params.deptId的数据
return
{
...
response
,
data
:
addValueData
};
},
columns
:
addValueColumns
,
useSearchForm
:
true
,
showTableSetting
:
false
,
showIndexColumn
:
false
,
pagination
:
false
,
bordered
:
true
,
formConfig
:
{
labelWidth
:
120
,
schemas
:
addValueSearchSchema
,
autoSubmitOnEnter
:
true
,
},
});
//初始化弹框
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
resetFields
();
setModalProps
({
confirmLoading
:
false
});
setModalProps
({
confirmLoading
:
false
});
setFieldsValue
({
setFieldsValue
({
...
data
.
record
,
...
data
.
record
,
})
})
;
});
});
/**确定按钮*/
/**确定按钮*/
async
function
handleSubmit
()
{
async
function
handleSubmit
()
{
createMessage
.
success
(
'编辑成功'
);
createMessage
.
success
(
'编辑成功'
);
closeModal
()
closeModal
()
;
}
}
</
script
>
</
script
>
src/views/dataStandards/publicCode/publicCode.data.ts
View file @
9d96a6c9
...
@@ -907,16 +907,6 @@ export const editPublicCodeSchema: FormSchema[] = [
...
@@ -907,16 +907,6 @@ export const editPublicCodeSchema: FormSchema[] = [
},
},
colProps
:
{
lg
:
24
,
md
:
24
},
colProps
:
{
lg
:
24
,
md
:
24
},
},
},
{
field
:
'sourceSystemCodeValue'
,
label
:
'源系统码值'
,
component
:
'Input'
,
required
:
true
,
componentProps
:
{
placeholder
:
'请输入源系统码值'
,
},
colProps
:
{
lg
:
24
,
md
:
24
},
},
];
];
/**详情公共代码 表单5*/
/**详情公共代码 表单5*/
export
const
detailPublicCodeSchema
:
FormSchema
[]
=
[
export
const
detailPublicCodeSchema
:
FormSchema
[]
=
[
...
@@ -962,20 +952,6 @@ export const detailPublicCodeSchema: FormSchema[] = [
...
@@ -962,20 +952,6 @@ export const detailPublicCodeSchema: FormSchema[] = [
},
},
colProps
:
{
lg
:
24
,
md
:
24
},
colProps
:
{
lg
:
24
,
md
:
24
},
},
},
{
field
:
'sourceSystemCodeValue'
,
label
:
'源系统码值'
,
component
:
'Input'
,
required
:
true
,
componentProps
:
{
style
:
{
border
:
'none'
,
},
readonly
:
true
,
placeholder
:
'请输入源系统码值'
,
},
colProps
:
{
lg
:
24
,
md
:
24
},
},
];
];
/**编辑公共代码 列表表头*/
/**编辑公共代码 列表表头*/
export
const
addValueColumns
:
BasicColumn
[]
=
[
export
const
addValueColumns
:
BasicColumn
[]
=
[
...
...
src/views/realTimeSync/dataBaseToDataBase/optionPage.vue
View file @
9d96a6c9
...
@@ -549,7 +549,7 @@
...
@@ -549,7 +549,7 @@
/>
/>
</
template
>
</
template
>
</Description>
</Description>
<textarea
v-model=
"jsonData"
style=
"width: 100%; height: 250px"
></textarea>
<textarea
v-model=
"jsonData"
disabled
style=
"width: 100%; height: 250px"
></textarea>
</div>
</div>
<div
style=
"width: 50%; border: rgb(217, 217, 217) 1px solid"
>
<div
style=
"width: 50%; border: rgb(217, 217, 217) 1px solid"
>
<span
style=
"font-size: 18px; font-weight: bold; margin-left: 10px"
>
目标端配置
</span>
<span
style=
"font-size: 18px; font-weight: bold; margin-left: 10px"
>
目标端配置
</span>
...
@@ -587,14 +587,14 @@
...
@@ -587,14 +587,14 @@
@
click=
"handleCopy"
@
click=
"handleCopy"
/>
/>
<Icon
<Icon
style=
"font-size: 25px !important; margin-right: 5px
; marin-left: 5px
"
style=
"font-size: 25px !important; margin-right: 5px"
icon=
"tabler:reload"
icon=
"tabler:reload"
:color=
"'rgb(136, 141, 156)'"
:color=
"'rgb(136, 141, 156)'"
@
click=
"handleReload"
@
click=
"handleReload"
/>
/>
</
template
>
</
template
>
</Description>
</Description>
<textarea
v-model=
"jsonData"
style=
"width: 100%; height: 250px"
></textarea>
<textarea
v-model=
"jsonData"
disabled
style=
"width: 100%; height: 250px"
></textarea>
</div>
</div>
</div>
</div>
<div
v-if=
"scene === 'message'"
>
<div
v-if=
"scene === 'message'"
>
...
@@ -636,14 +636,14 @@
...
@@ -636,14 +636,14 @@
@
click=
"handleCopy"
@
click=
"handleCopy"
/>
/>
<Icon
<Icon
style=
"font-size: 25px !important; margin-right: 5px; marin-left: 5px"
style=
"font-size: 25px !important; margin-right: 5px; mar
g
in-left: 5px"
icon=
"tabler:reload"
icon=
"tabler:reload"
:color=
"'rgb(136, 141, 156)'"
:color=
"'rgb(136, 141, 156)'"
@
click=
"handleReload"
@
click=
"handleReload"
/>
/>
</
template
>
</
template
>
</Description>
</Description>
<textarea
v-model=
"jsonData"
style=
"width: 100%; height: 250px"
></textarea>
<textarea
v-model=
"jsonData"
disabled
style=
"width: 100%; height: 250px"
></textarea>
</div>
</div>
</TabPane>
</TabPane>
<TabPane
v-if=
"tabKey === '5'"
key=
"10"
tab=
"数据流向"
>
<TabPane
v-if=
"tabKey === '5'"
key=
"10"
tab=
"数据流向"
>
...
...
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