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
9d3d2784
Commit
9d3d2784
authored
Nov 18, 2024
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
服务开发页面
parent
c331c9f6
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
275 additions
and
126 deletions
+275
-126
index.ts
src/router/routes/index.ts
+11
-0
ApiDoc.vue
src/views/dataService/serviceDevelopment/ApiDoc.vue
+92
-0
CopyModal.vue
src/views/dataService/serviceDevelopment/CopyModal.vue
+4
-4
ImportModal.vue
src/views/dataService/serviceDevelopment/ImportModal.vue
+35
-9
ImportRelativeModal.vue
...ws/dataService/serviceDevelopment/ImportRelativeModal.vue
+0
-58
MoveModal.vue
src/views/dataService/serviceDevelopment/MoveModal.vue
+2
-2
api.data.ts
src/views/dataService/serviceDevelopment/api.data.ts
+87
-32
apiData.ts
src/views/dataService/serviceDevelopment/apiData.ts
+14
-12
index.vue
src/views/dataService/serviceDevelopment/index.vue
+30
-9
No files found.
src/router/routes/index.ts
View file @
9d3d2784
...
@@ -464,6 +464,7 @@ export const DataStandardRoute: AppRouteRecordRaw = {
...
@@ -464,6 +464,7 @@ export const DataStandardRoute: AppRouteRecordRaw = {
],
],
};
};
/**工作区*/
export
const
WorkSpaceRoute
:
AppRouteRecordRaw
=
{
export
const
WorkSpaceRoute
:
AppRouteRecordRaw
=
{
path
:
'/workspace'
,
path
:
'/workspace'
,
name
:
'Workspace'
,
name
:
'Workspace'
,
...
@@ -487,6 +488,7 @@ export const WorkSpaceRoute: AppRouteRecordRaw = {
...
@@ -487,6 +488,7 @@ export const WorkSpaceRoute: AppRouteRecordRaw = {
],
],
};
};
/**质量规则*/
export
const
QualityRuleRoute
:
AppRouteRecordRaw
=
{
export
const
QualityRuleRoute
:
AppRouteRecordRaw
=
{
path
:
'/dataQuality'
,
path
:
'/dataQuality'
,
name
:
'QualityRule'
,
name
:
'QualityRule'
,
...
@@ -573,6 +575,15 @@ export const serviceDevelopmentRoute: AppRouteRecordRaw = {
...
@@ -573,6 +575,15 @@ export const serviceDevelopmentRoute: AppRouteRecordRaw = {
icon
:
''
,
icon
:
''
,
},
},
},
},
{
path
:
'serviceDevelopment/ApiDoc'
,
name
:
'ApiDoc'
,
component
:
()
=>
import
(
'@/views/dataService/serviceDevelopment/ApiDoc.vue'
),
meta
:
{
title
:
'ApiDoc'
,
icon
:
''
,
},
},
],
],
};
};
...
...
src/views/dataService/serviceDevelopment/ApiDoc.vue
0 → 100644
View file @
9d3d2784
<
template
>
<PageWrapper
title=
"API测试"
contentFullHeight
contentBackground
>
<div>
<BasicTable
@
register=
"registerTable"
/>
</div>
<div>
<a-button
type=
"primary"
style=
"margin-bottom: 20px"
@
click=
"testButton"
>
测试
</a-button>
<div
style=
"margin-bottom: 10px;font-weight: bold;font-size: 16px"
>
请求报文
</div>
<CodeEditor
v-model:value=
"value1"
:mode=
"modeValue"
style=
"margin-bottom: 20px"
/>
<div
style=
"margin-bottom: 10px;font-weight: bold;font-size: 16px"
>
返回结果源码
</div>
<CodeEditor
v-model:value=
"value2"
:mode=
"modeValue"
/>
</div>
</PageWrapper>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
PageWrapper
}
from
'@/components/Page'
;
import
{
Divider
}
from
'ant-design-vue'
;
import
{
ref
,
computed
,
unref
,
reactive
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
apiDocColumns
}
from
'./api.data'
;
import
{
apiDocColumnsData
}
from
'./apiData'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
CodeEditor
,
JsonPreview
,
MODE
}
from
'@/components/CodeEditor'
;
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
modeValue
=
ref
<
MODE
>
(
MODE
.
JSON
);
const
jsonData1
=
'{"API_CONF_TEST_DATA_VALUE":{"id":"32e71d1a05eb42cca38a55438561a6af"}}'
;
const
jsonData2
=
{
"data"
:
{
"valueSize"
:
20
,
"columnNames"
:
[
"status"
,
"create_time"
],
"value"
:
[
{
"create_time"
:
"2023-07-19 17:15:23"
,
"status"
:
"1"
}
]
},
"code"
:
200
,
"message"
:
"success"
}
const
value1
=
ref
(
''
);
const
value2
=
ref
(
''
);
//初始化列表
const
[
registerTable
,
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
,
getRowSelection
}]
=
useTable
({
title
:
'请求参数'
,
api
:
async
(
params
)
=>
{
const
response
=
{
pageNu
:
"1"
,
pageSize
:
"10"
,
pages
:
"1"
,
total
:
apiDocColumnsData
.
length
,
code
:
''
,
message
:
''
,
data
:
[],
};
return
{
...
response
,
data
:
apiDocColumnsData
};
},
columns
:
apiDocColumns
,
useSearchForm
:
false
,
showTableSetting
:
false
,
showIndexColumn
:
false
,
bordered
:
true
,
scroll
:
{
y
:
300
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
setModalProps
({
confirmLoading
:
false
,
showCancelBtn
:
false
,
showOkBtn
:
false
});
});
/**测试 按钮*/
function
testButton
()
{
value1
.
value
=
jsonData1
value2
.
value
=
jsonData2
}
/**确定按钮*/
async
function
handleSubmit
()
{
closeModal
()
}
</
script
>
src/views/dataService/serviceDevelopment/CopyModal.vue
View file @
9d3d2784
...
@@ -7,9 +7,9 @@
...
@@ -7,9 +7,9 @@
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
{
move
FormSchema
}
from
'./api.data'
;
import
{
copy
FormSchema
}
from
'./api.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
TreeData
}
from
"
@/views/dataStandards/basicStandards/basicStandards
Data"
;
import
{
TreeData
}
from
"
./api
Data"
;
defineOptions
({
name
:
'AccountModal'
});
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
emit
=
defineEmits
([
'success'
,
'register'
]);
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
move
FormSchema
,
schemas
:
copy
FormSchema
,
showActionButtonGroup
:
false
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
actionColOptions
:
{
span
:
23
,
span
:
23
,
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
const
treeList
=
handleTree
(
TreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
const
treeList
=
handleTree
(
TreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
updateSchema
([
updateSchema
([
{
{
field
:
'
treeId
'
,
field
:
'
path
'
,
componentProps
:
{
componentProps
:
{
treeData
:
treeList
treeData
:
treeList
},
},
...
...
src/views/dataService/serviceDevelopment/Import
DataStandards
Modal.vue
→
src/views/dataService/serviceDevelopment/ImportModal.vue
View file @
9d3d2784
<
template
>
<
template
>
<BasicModal
width=
"40%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicModal
width=
"40%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
>
<BasicForm
@
register=
"registerForm"
/>
<template
#
formFooter
>
<a-Button
type=
"info"
@
click=
"handleDownByData"
style=
"margin-left: 150px;border-color: #4aabfe"
>
下载文件模版
</a-Button>
</
template
>
</BasicForm>
</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
{
importDataStandardsFormSchema
}
from
'./api.data'
;
import
{
importApiFormSchema
}
from
'./api.data'
;
import
{
TreeData
}
from
'./apiData'
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
BasicUpload
}
from
'@/components/Upload'
;
import
{
BasicUpload
}
from
'@/components/Upload'
;
import
{
uploadApi
}
from
'@/api/sys/upload'
;
import
{
uploadApi
}
from
'@/api/sys/upload'
;
...
@@ -20,13 +17,13 @@
...
@@ -20,13 +17,13 @@
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
{
createMessage
}
=
useMessage
();
const
getTitle
=
computed
(()
=>
(
'
标准导入
'
));
const
getTitle
=
computed
(()
=>
(
'
导入文件选择
'
));
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
import
DataStandards
FormSchema
,
schemas
:
import
Api
FormSchema
,
showActionButtonGroup
:
false
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
actionColOptions
:
{
span
:
23
,
span
:
23
,
...
@@ -37,7 +34,15 @@
...
@@ -37,7 +34,15 @@
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
resetFields
();
setModalProps
({
confirmLoading
:
false
});
setModalProps
({
confirmLoading
:
false
});
const
treeList
=
handleTree
(
TreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
updateSchema
([
{
field
:
'path'
,
componentProps
:
{
treeData
:
treeList
},
},
]);
});
});
/**下载*/
/**下载*/
...
@@ -55,4 +60,25 @@
...
@@ -55,4 +60,25 @@
createMessage
.
success
(
'导入成功!'
)
createMessage
.
success
(
'导入成功!'
)
closeModal
();
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
>
</
script
>
src/views/dataService/serviceDevelopment/ImportRelativeModal.vue
deleted
100644 → 0
View file @
c331c9f6
<
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
'./api.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/dataService/serviceDevelopment/MoveModal.vue
View file @
9d3d2784
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
moveFormSchema
}
from
'./api.data'
;
import
{
moveFormSchema
}
from
'./api.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
TreeData
}
from
"
@/views/dataStandards/basicStandards/basicStandards
Data"
;
import
{
TreeData
}
from
"
./api
Data"
;
defineOptions
({
name
:
'AccountModal'
});
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
emit
=
defineEmits
([
'success'
,
'register'
]);
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
const
treeList
=
handleTree
(
TreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
const
treeList
=
handleTree
(
TreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
updateSchema
([
updateSchema
([
{
{
field
:
'
treeId
'
,
field
:
'
path
'
,
componentProps
:
{
componentProps
:
{
treeData
:
treeList
treeData
:
treeList
},
},
...
...
src/views/dataService/serviceDevelopment/api.data.ts
View file @
9d3d2784
...
@@ -43,7 +43,6 @@ export const columns: BasicColumn[] = [
...
@@ -43,7 +43,6 @@ export const columns: BasicColumn[] = [
width
:
150
,
width
:
150
,
},
},
];
];
/**主页面搜索 表单*/
/**主页面搜索 表单*/
export
const
searchFormSchema
:
FormSchema
[]
=
[
export
const
searchFormSchema
:
FormSchema
[]
=
[
{
{
...
@@ -154,43 +153,43 @@ export const createDocumentFormSchema: FormSchema[] = [
...
@@ -154,43 +153,43 @@ export const createDocumentFormSchema: FormSchema[] = [
},
},
},
},
];
];
/**导入 表单*/
/**导入关联关系 表单*/
export
const
importApiFormSchema
:
FormSchema
[]
=
[
export
const
importRelativeFormSchema
:
FormSchema
[]
=
[
{
{
field
:
'file'
,
field
:
'importType'
,
component
:
'Upload'
,
label
:
'导入文件选择'
,
rules
:
[{
required
:
true
,
message
:
'请选择上传文件'
}],
componentProps
:
{
api
:
uploadApi
,
},
labelWidth
:
150
,
colProps
:
{
lg
:
24
,
md
:
24
},
},
{
field
:
'agreement'
,
component
:
'RadioGroup'
,
component
:
'RadioGroup'
,
label
:
'
关联关系重名
'
,
label
:
'
导入类型
'
,
colProps
:
{
lg
:
24
,
md
:
24
},
colProps
:
{
lg
:
24
,
md
:
24
},
labelWidth
:
150
,
labelWidth
:
150
,
componentProps
:
{
componentProps
:
{
defaultValue
:
'1'
,
defaultValue
:
'1'
,
options
:
[
options
:
[
{
{
label
:
'
全部放弃
'
,
label
:
'
同集群导入
'
,
value
:
'1'
,
value
:
'1'
,
},
},
{
{
label
:
'
全部替换
'
,
label
:
'
其他集群导入
'
,
value
:
'2'
,
value
:
'2'
,
},
},
],
],
},
},
},
},
];
{
/**导入数据标准 表单*/
field
:
'path'
,
export
const
importDataStandardsFormSchema
:
FormSchema
[]
=
[
label
:
'导入至'
,
component
:
'TreeSelect'
,
colProps
:
{
lg
:
24
,
md
:
24
},
labelWidth
:
150
,
componentProps
:
{
fieldNames
:
{
label
:
'apiName'
,
value
:
'businessId'
,
},
getPopupContainer
:
()
=>
document
.
body
,
},
required
:
true
,
},
{
{
field
:
'file'
,
field
:
'file'
,
component
:
'Upload'
,
component
:
'Upload'
,
...
@@ -204,11 +203,11 @@ export const importDataStandardsFormSchema: FormSchema[] = [
...
@@ -204,11 +203,11 @@ export const importDataStandardsFormSchema: FormSchema[] = [
{
{
field
:
'agreement'
,
field
:
'agreement'
,
component
:
'RadioGroup'
,
component
:
'RadioGroup'
,
label
:
'
标准
重名'
,
label
:
'
文件
重名'
,
colProps
:
{
lg
:
24
,
md
:
24
},
colProps
:
{
lg
:
24
,
md
:
24
},
labelWidth
:
150
,
labelWidth
:
150
,
componentProps
:
{
componentProps
:
{
defaultValue
:
'
1
'
,
defaultValue
:
'
3
'
,
options
:
[
options
:
[
{
{
label
:
'全部放弃'
,
label
:
'全部放弃'
,
...
@@ -229,13 +228,30 @@ export const importDataStandardsFormSchema: FormSchema[] = [
...
@@ -229,13 +228,30 @@ export const importDataStandardsFormSchema: FormSchema[] = [
/**移动 表单*/
/**移动 表单*/
export
const
moveFormSchema
:
any
[]
=
[
export
const
moveFormSchema
:
any
[]
=
[
{
{
field
:
'
treeId
'
,
field
:
'
path
'
,
label
:
'路径'
,
label
:
'路径'
,
component
:
'TreeSelect'
,
component
:
'TreeSelect'
,
colProps
:
{
lg
:
24
,
md
:
24
},
colProps
:
{
lg
:
24
,
md
:
24
},
componentProps
:
{
componentProps
:
{
fieldNames
:
{
fieldNames
:
{
label
:
'standardChineseName'
,
label
:
'apiName'
,
value
:
'businessId'
,
},
getPopupContainer
:
()
=>
document
.
body
,
},
required
:
true
,
},
]
/**复制 表单*/
export
const
copyFormSchema
:
any
[]
=
[
{
field
:
'path'
,
label
:
'路径'
,
component
:
'TreeSelect'
,
colProps
:
{
lg
:
24
,
md
:
24
},
componentProps
:
{
fieldNames
:
{
label
:
'apiName'
,
value
:
'businessId'
,
value
:
'businessId'
,
},
},
getPopupContainer
:
()
=>
document
.
body
,
getPopupContainer
:
()
=>
document
.
body
,
...
@@ -246,21 +262,62 @@ export const moveFormSchema: any[] = [
...
@@ -246,21 +262,62 @@ export const moveFormSchema: any[] = [
/**重命名 表单*/
/**重命名 表单*/
export
const
resetNameFormSchema
:
FormSchema
[]
=
[
export
const
resetNameFormSchema
:
FormSchema
[]
=
[
{
{
field
:
'
standardChinese
Name'
,
field
:
'
api
Name'
,
label
:
'
标准中文
名称'
,
label
:
'名称'
,
component
:
'Input'
,
component
:
'Input'
,
rules
:
[
rules
:
[
{
{
required
:
true
,
required
:
true
,
message
:
'请输入
标准中文
名称'
,
message
:
'请输入名称'
,
},
},
],
],
componentProps
:
{
componentProps
:
{
placeholder
:
'请输入
标准中文
名称'
,
placeholder
:
'请输入名称'
,
},
},
colProps
:
{
lg
:
24
,
md
:
24
},
colProps
:
{
lg
:
24
,
md
:
24
},
},
},
];
];
/**apiDoc列表 表头*/
export
const
apiDocColumns
:
BasicColumn
[]
=
[
{
"title"
:
"参数code"
,
"dataIndex"
:
"parameterCode"
,
"width"
:
120
},
{
"title"
:
"参数位置"
,
"dataIndex"
:
"parameterPosition"
,
"width"
:
120
},
{
"title"
:
"Xpath"
,
"dataIndex"
:
"xpath"
,
"width"
:
120
},
{
"title"
:
"参数类型"
,
"dataIndex"
:
"parameterType"
,
"width"
:
120
},
{
"title"
:
"注释"
,
"dataIndex"
:
"annotation"
,
"width"
:
120
},
{
"title"
:
"是否必填"
,
"dataIndex"
:
"isRequired"
,
"width"
:
120
},
{
"title"
:
"参数值"
,
"dataIndex"
:
"parameterValue"
,
"width"
:
120
,
"editable"
:
true
,
"edit"
:
true
}
];
/**基础公共代码表单*/
/**基础公共代码表单*/
...
@@ -808,8 +865,6 @@ export const addValueColumns: BasicColumn[] = [
...
@@ -808,8 +865,6 @@ export const addValueColumns: BasicColumn[] = [
width
:
150
width
:
150
},
},
];
];
/**版本对比 表单*/
/**版本对比 表单*/
export
const
contrastSchema
:
FormSchema
[]
=
[
export
const
contrastSchema
:
FormSchema
[]
=
[
{
{
...
...
src/views/dataService/serviceDevelopment/apiData.ts
View file @
9d3d2784
...
@@ -83,6 +83,7 @@ export const TreeData: any[] = [
...
@@ -83,6 +83,7 @@ export const TreeData: any[] = [
workGroup
:
'共享工作区'
workGroup
:
'共享工作区'
},
},
];
];
/**新增API 卡片数据*/
export
const
cardData
:
any
[]
=
[
export
const
cardData
:
any
[]
=
[
{
{
title
:
'向导模式'
,
title
:
'向导模式'
,
...
@@ -109,6 +110,19 @@ export const cardData: any[] = [
...
@@ -109,6 +110,19 @@ export const cardData: any[] = [
details
:
'将三方API托管至数据服务,对API进行统一发布和管理'
,
details
:
'将三方API托管至数据服务,对API进行统一发布和管理'
,
},
},
];
];
/**ApiDoc 列表 数据*/
export
const
apiDocColumnsData
:
any
[]
=
[
{
parameterCode
:
'id'
,
parameterPosition
:
'Body'
,
xpath
:
'^.id'
,
parameterType
:
'object'
,
annotation
:
''
,
isRequired
:
'是'
,
parameterValue
:
'32e71d1a05eb42cca38'
}
];
/**版本管理列表 表头*/
/**版本管理列表 表头*/
export
const
versionColumns
:
BasicColumn
[]
=
[
export
const
versionColumns
:
BasicColumn
[]
=
[
...
@@ -128,7 +142,6 @@ export const versionColumns: BasicColumn[] = [
...
@@ -128,7 +142,6 @@ export const versionColumns: BasicColumn[] = [
width
:
150
,
width
:
150
,
},
},
];
];
/**版本管理弹出框 搜索表头*/
/**版本管理弹出框 搜索表头*/
export
const
searchFormSchema
:
FormSchema
[]
=
[
export
const
searchFormSchema
:
FormSchema
[]
=
[
{
{
...
@@ -141,7 +154,6 @@ export const searchFormSchema: FormSchema[] = [
...
@@ -141,7 +154,6 @@ export const searchFormSchema: FormSchema[] = [
colProps
:
{
span
:
7
},
colProps
:
{
span
:
7
},
},
},
];
];
export
const
fileData
:
any
[]
=
[
export
const
fileData
:
any
[]
=
[
{
{
"delFlag"
:
"0"
,
"delFlag"
:
"0"
,
...
@@ -205,7 +217,6 @@ export const fileData: any[] = [
...
@@ -205,7 +217,6 @@ export const fileData: any[] = [
},
},
];
];
/**版本管理列表 数据*/
/**版本管理列表 数据*/
export
const
versionData
:
any
[]
=
[
export
const
versionData
:
any
[]
=
[
{
{
...
@@ -230,8 +241,6 @@ export const versionData: any[] = [
...
@@ -230,8 +241,6 @@ export const versionData: any[] = [
"remarks"
:
"标准导入"
"remarks"
:
"标准导入"
},
},
];
];
/**首页 新增表单树 数据*/
/**首页 新增表单树 数据*/
export
const
treeDataListTwo
=
[
export
const
treeDataListTwo
=
[
{
{
...
@@ -245,8 +254,6 @@ export const treeDataListTwo = [
...
@@ -245,8 +254,6 @@ export const treeDataListTwo = [
],
],
},
},
]
]
/**编辑页 选择字典树 数据*/
/**编辑页 选择字典树 数据*/
export
const
chooseDictoryTreeData
=
[
export
const
chooseDictoryTreeData
=
[
{
{
...
@@ -306,7 +313,6 @@ export const chooseDictoryTreeData = [
...
@@ -306,7 +313,6 @@ export const chooseDictoryTreeData = [
icon
:
'ion:settings-outline'
,
icon
:
'ion:settings-outline'
,
},
},
]
]
/**对比左侧列表 数据1*/
/**对比左侧列表 数据1*/
export
const
leftContrastTableData1
=
[
export
const
leftContrastTableData1
=
[
{
{
...
@@ -387,7 +393,6 @@ export const rightContrastTableData3 = [
...
@@ -387,7 +393,6 @@ export const rightContrastTableData3 = [
"comment"
:
''
,
"comment"
:
''
,
},
},
]
]
/**关联关系 表格3 数据*/
/**关联关系 表格3 数据*/
export
const
relatedRelationshipsData3
=
[
export
const
relatedRelationshipsData3
=
[
{
{
...
@@ -401,8 +406,6 @@ export const relatedRelationshipsData3 = [
...
@@ -401,8 +406,6 @@ export const relatedRelationshipsData3 = [
operatorUser
:
'DMP_admin'
,
operatorUser
:
'DMP_admin'
,
},
},
]
]
/**详情 表格 数据*/
/**详情 表格 数据*/
export
const
detailData
=
[
export
const
detailData
=
[
{
{
...
@@ -446,7 +449,6 @@ export const detailData = [
...
@@ -446,7 +449,6 @@ export const detailData = [
sourceSystemCodeValue
:
'-'
,
sourceSystemCodeValue
:
'-'
,
},
},
]
]
/**编辑公共代码 列表数据*/
/**编辑公共代码 列表数据*/
export
const
addValueData
=
[
export
const
addValueData
=
[
{
{
...
...
src/views/dataService/serviceDevelopment/index.vue
View file @
9d3d2784
...
@@ -20,6 +20,11 @@
...
@@ -20,6 +20,11 @@
// label: '重命名',
// label: '重命名',
onClick: resetNameButton.bind(null, record),
onClick: resetNameButton.bind(null, record),
},
},
{
icon: 'eos-icons:api-outlined',
// label: 'api doc',
onClick: apiDocButton.bind(null, record),
},
{
{
icon: 'ant-design:folder-open-outlined',
icon: 'ant-design:folder-open-outlined',
// label: '移动',
// label: '移动',
...
@@ -40,11 +45,6 @@
...
@@ -40,11 +45,6 @@
// label: '复制',
// label: '复制',
onClick: copyButton.bind(null, record),
onClick: copyButton.bind(null, record),
},
},
{
icon: 'ant-design:file-search-outlined',
// label: '查看详情',
onClick: detailButton.bind(null, record),
},
{
{
icon: 'ant-design:down-circle-outlined',
icon: 'ant-design:down-circle-outlined',
// label: '版本管理',
// label: '版本管理',
...
@@ -72,6 +72,8 @@
...
@@ -72,6 +72,8 @@
<ResetNameModal
@
register=
"registerResetNameModal"
@
success=
"handleSuccess"
/>
<ResetNameModal
@
register=
"registerResetNameModal"
@
success=
"handleSuccess"
/>
<!-- 版本管理 弹窗-->
<!-- 版本管理 弹窗-->
<VersionModal
@
register=
"registerVersionModal"
@
success=
"handleSuccess"
/>
<VersionModal
@
register=
"registerVersionModal"
@
success=
"handleSuccess"
/>
<!-- 导入 弹窗-->
<ImportModal
@
register=
"registerImportModal"
@
success=
"handleSuccess"
/>
</PageWrapper>
</PageWrapper>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
...
@@ -94,11 +96,12 @@
...
@@ -94,11 +96,12 @@
import
{
router
}
from
'@/router'
;
import
{
router
}
from
'@/router'
;
import
{
exportUserList
}
from
"@/api/system/user/user"
;
import
{
exportUserList
}
from
"@/api/system/user/user"
;
import
{
downloadByData
}
from
"@/utils/file/download"
;
import
{
downloadByData
}
from
"@/utils/file/download"
;
import
ImportModal
from
'./ImportModal.vue'
defineOptions
({
name
:
'AccountManagement'
});
defineOptions
({
name
:
'AccountManagement'
});
const
{
createMessage
,
createConfirm
}
=
useMessage
();
const
{
createMessage
,
createConfirm
}
=
useMessage
();
const
route
=
useRoute
();
const
route
=
useRoute
();
const
go
=
useGo
();
const
go
=
useGo
();
const
[
registerImportModal
,
{
openModal
:
openImportModal
}]
=
useModal
();
const
[
registerVersionModal
,
{
openModal
:
openVersionModal
}]
=
useModal
();
const
[
registerVersionModal
,
{
openModal
:
openVersionModal
}]
=
useModal
();
const
[
registerCreateDocumentModal
,
{
openModal
:
openCreateDocumentModal
}]
=
useModal
();
const
[
registerCreateDocumentModal
,
{
openModal
:
openCreateDocumentModal
}]
=
useModal
();
const
[
registerCreateAPIModal
,
{
openModal
:
openCreateAPIModal
}]
=
useModal
();
const
[
registerCreateAPIModal
,
{
openModal
:
openCreateAPIModal
}]
=
useModal
();
...
@@ -171,6 +174,13 @@
...
@@ -171,6 +174,13 @@
});
});
}
}
/**导入*/
function
importButton
()
{
openImportModal
(
true
,
{
});
}
/**重命名 按钮*/
/**重命名 按钮*/
function
resetNameButton
(
record
)
{
function
resetNameButton
(
record
)
{
openResetNameModal
(
true
,
{
openResetNameModal
(
true
,
{
...
@@ -178,6 +188,17 @@
...
@@ -178,6 +188,17 @@
});
});
}
}
/**apiDoc 按钮*/
function
apiDocButton
(
record
)
{
router
.
push
({
path
:
'/dataService/serviceDevelopment/ApiDoc'
,
query
:
{
},
})
}
/**复制到 按钮*/
/**复制到 按钮*/
function
copyButton1
()
{
function
copyButton1
()
{
openCopyModal
(
true
,
{
openCopyModal
(
true
,
{
...
@@ -222,11 +243,11 @@
...
@@ -222,11 +243,11 @@
});
});
}
}
/**导出
关联关系
*/
/**导出
按钮
*/
async
function
E
xportButton
()
{
async
function
e
xportButton
()
{
const
params
=
Object
.
assign
({},
getSearchInfo
(),
getForm
().
getFieldsValue
());
const
params
=
Object
.
assign
({},
getSearchInfo
(),
getForm
().
getFieldsValue
());
const
data
=
await
exportUserList
(
params
);
const
data
=
await
exportUserList
(
params
);
downloadByData
(
data
,
'
关联关系
信息'
+
'.xlsx'
);
downloadByData
(
data
,
'
API
信息'
+
'.xlsx'
);
}
}
function
handleSuccess
({
isUpdate
,
values
})
{
function
handleSuccess
({
isUpdate
,
values
})
{
...
...
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