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
9ce28302
Commit
9ce28302
authored
Dec 06, 2024
by
chenjiahao
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
c02421cd
b804180c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
283 additions
and
38 deletions
+283
-38
index.vue
src/views/dataService/serviceMarket/myCall/apiTest/index.vue
+95
-0
test.data.ts
...ews/dataService/serviceMarket/myCall/apiTest/test.data.ts
+29
-0
testData.ts
...iews/dataService/serviceMarket/myCall/apiTest/testData.ts
+10
-0
detail.data.ts
...ws/dataService/serviceMarket/myCall/detail/detail.data.ts
+16
-4
index.vue
src/views/dataService/serviceMarket/myCall/detail/index.vue
+26
-4
index.vue
src/views/dataService/serviceMarket/myCall/index.vue
+56
-18
index.vue
src/views/mallResourceDevelopment/file/commonFile/index.vue
+51
-12
No files found.
src/views/dataService/serviceMarket/myCall/apiTest/index.vue
0 → 100644
View file @
9ce28302
<
template
>
<PageWrapper
dense
content-full-height
header-sticky
>
<template
#
footer
>
<BasicTable
@
register=
"queryTable"
>
<template
#
configValue=
"
{ text, record }">
<Input
v-model:value=
"record.configValue"
/>
</
template
>
</BasicTable>
<a-button
type=
"primary"
>
测试
</a-button>
<Tabs
v-model:activeKey=
"activeKey"
>
<TabPane
key=
"1"
tab=
"请求报文"
>
<div
class=
"flex"
style=
"margin: 15px 0"
>
<div
style=
"width: 4px; margin: 4px 0; background-color: #128afa"
></div>
<div
style=
"margin-left: 6px"
>
动态报文
</div>
</div>
<Textarea
:auto-size=
"{ minRow: 6 }"
v-model:value=
"message"
/>
</TabPane>
<TabPane
key=
"2"
tab=
"请求代码"
>
<div
class=
"flex"
style=
"margin: 15px 0"
>
<div
style=
"width: 4px; margin: 4px 0; background-color: #128afa"
></div>
<div
style=
"margin-left: 6px"
>
动态路由地址
</div>
</div>
<Textarea
:auto-size=
"{ minRow: 6 }"
v-model:value=
"address"
/>
<div
class=
"flex"
style=
"margin: 25px 0 15px 0"
>
<span>
返回结果源码
</span>
<BasicHelp
text=
"返回结果源码"
/>
</div>
<Textarea
:auto-size=
"{ minRow: 6 }"
v-model:value=
"resultTxt"
/>
</TabPane>
</Tabs>
</template>
</PageWrapper>
</template>
<
script
lang=
"ts"
setup
>
import
PageWrapper
from
'../../../../../components/Page/src/PageWrapper.vue'
;
import
BasicTable
from
'../../../../../components/Table/src/BasicTable.vue'
;
import
{
Input
,
Tabs
,
TabPane
,
Textarea
}
from
'ant-design-vue'
;
import
{
BasicTableProps
,
useTable
}
from
'@/components/Table'
;
import
{
ref
}
from
'vue'
;
import
{
testTableColumn
}
from
'@/views/dataService/serviceMarket/myCall/apiTest/test.data'
;
import
{
testTableData
}
from
'@/views/dataService/serviceMarket/myCall/apiTest/testData'
;
import
BasicHelp
from
'@/components/Basic/src/BasicHelp.vue'
;
const
address
=
"curl -X POST‘http://node322:28143/employee′-H'token:
\n
"
+
"7406056a00d65806200fe299d573a49b6bac08938e4ec73143d48caf110723bbc6d0e7efac9e01a2abbadada175b3c6ca3b251fd76cbbefed08f234998b5f7ac'-H'Content-Type:
\n
"
+
'application/json
\'
-H
\'
Accept:*/*’-d
\'
("departmentID":"1")}"'
;
const
resultTxt
=
'{
\
n'
+
'"success":true,
\
n'
+
'"code":200,
\
n'
+
'"message": "success",
\
n'
+
'“data":{
\
n'
+
'"valueSize": 70,
\
n'
+
'"columnNames":[
\
n'
+
'"LastName"
\
n'
+
'"FirstName"
\
n'
+
'}
\
n'
+
'}'
;
const
message
=
'POST /login HTTP/1.1
\
n'
+
'Host: www.example.com
\
n'
+
'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
\
n'
+
'Accept: application/json
\
n'
+
'Content-Type: application/x-www-form-urlencoded
\
n'
+
'
\
n'
+
'username=admin&password=123456'
;
const
activeKey
=
ref
();
const
[
queryTable
]
=
useTable
({
title
:
'请求参数'
,
scroll
:
{
y
:
200
},
api
:
async
(
params
)
=>
{
console
.
log
(
'params'
,
params
);
const
response
=
{
pageNu
:
'1'
,
pageSize
:
'10'
,
pages
:
'1'
,
total
:
testTableData
.
length
,
code
:
''
,
message
:
''
,
data
:
testTableData
,
};
return
{
...
response
};
},
columns
:
testTableColumn
,
useSearchForm
:
false
,
showTableSetting
:
false
,
showIndexColumn
:
false
,
pagination
:
false
,
rowKey
:
'id'
,
}
as
BasicTableProps
);
</
script
>
<
style
scoped
></
style
>
src/views/dataService/serviceMarket/myCall/apiTest/test.data.ts
0 → 100644
View file @
9ce28302
import
{
BasicColumn
}
from
'@/components/Table'
;
export
const
testTableColumn
:
BasicColumn
[]
=
[
{
title
:
'参数code'
,
dataIndex
:
'code'
,
},
{
title
:
'参数名称'
,
dataIndex
:
'name'
,
},
{
title
:
'参数类型'
,
dataIndex
:
'type'
,
},
{
title
:
'注释'
,
dataIndex
:
'remark'
,
},
{
title
:
'是否必填'
,
dataIndex
:
'required'
,
},
{
title
:
'参数值'
,
dataIndex
:
'configValue'
,
slots
:
{
customRender
:
'configValue'
},
},
];
src/views/dataService/serviceMarket/myCall/apiTest/testData.ts
0 → 100644
View file @
9ce28302
export
const
testTableData
=
[
{
code
:
'departmentID'
,
name
:
'departmentID'
,
type
:
'String'
,
remark
:
''
,
required
:
'否'
,
configValue
:
1
,
},
];
src/views/dataService/serviceMarket/myCall/detail/detail.data.ts
View file @
9ce28302
...
...
@@ -66,13 +66,13 @@ export const detailPageColumn: BasicColumn[] = [
];
export
const
detailReturnColumn
:
BasicColumn
[]
=
[
{
title
:
'
参数code
'
,
dataIndex
:
'
cod
e'
,
title
:
'
列名
'
,
dataIndex
:
'
nam
e'
,
width
:
150
,
},
{
title
:
'参数
名称
'
,
dataIndex
:
'
nam
e'
,
title
:
'参数
code
'
,
dataIndex
:
'
cod
e'
,
width
:
150
,
},
{
...
...
@@ -81,3 +81,15 @@ export const detailReturnColumn: BasicColumn[] = [
width
:
150
,
},
];
export
const
detailOrderColumn
:
BasicColumn
[]
=
[
{
title
:
'列名'
,
dataIndex
:
'field'
,
width
:
150
,
},
{
title
:
'排序方式'
,
dataIndex
:
'order'
,
width
:
150
,
},
];
src/views/dataService/serviceMarket/myCall/detail/index.vue
View file @
9ce28302
...
...
@@ -9,12 +9,15 @@
<Descriptions
.
Item
label=
"API模式"
>
向导模式
</Descriptions
.Item
>
<Descriptions
.
Item
label=
"数据源"
>
Kundb2.1.2-yl
</Descriptions
.Item
>
<Descriptions
.
Item
label=
"数据库"
>
bm_catalog1
</Descriptions
.Item
>
<Descriptions
.
Item
label=
"数据
库
"
>
employee
</Descriptions
.Item
>
<Descriptions
.
Item
label=
"数据
表
"
>
employee
</Descriptions
.Item
>
</Descriptions>
<Divider
/>
<BasicTable
@
register=
"queryTable"
/>
<BasicTable
@
register=
"pageTable"
/>
<BasicTable
@
register=
"returnTable"
/>
<div
class=
"flex"
style=
"gap: 20px; flex-direction: column"
>
<BasicTable
@
register=
"queryTable"
/>
<BasicTable
@
register=
"pageTable"
/>
<BasicTable
@
register=
"returnTable"
/>
<BasicTable
@
register=
"orderTable"
/>
</div>
</
template
>
<AddModel
@
register=
"addModel"
/>
</PageWrapper>
...
...
@@ -29,6 +32,7 @@
import
AddModel
from
'@/views/dataService/serviceMarket/serviceSearch/apiDetail/addModel.vue'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
detailOrderColumn
,
detailPageColumn
,
detailQueryColumn
,
detailReturnColumn
,
...
...
@@ -106,6 +110,24 @@
showIndexColumn
:
false
,
// striped: false,
});
const
[
orderTable
]
=
useTable
({
title
:
'排序参数'
,
// 定高
scroll
:
{
y
:
150
},
api
:
async
(
params
)
=>
{
console
.
log
(
'params'
,
params
);
const
response
=
{
code
:
''
,
message
:
''
,
data
:
[],
};
return
{
...
response
};
},
columns
:
detailOrderColumn
,
pagination
:
false
,
showIndexColumn
:
false
,
// striped: false,
});
</
script
>
<
style
scoped
></
style
>
src/views/dataService/serviceMarket/myCall/index.vue
View file @
9ce28302
...
...
@@ -2,25 +2,42 @@
<PageWrapper
title=
"我的调用"
contentBackground
headerSticky
>
<template
#
footer
>
<Descriptions
:column=
"2"
>
<Descriptions
.
Item
label=
"账号"
>
admin
</Descriptions
.Item
>
<Descriptions
.
Item
label=
"用户名称"
>
admin
</Descriptions
.Item
>
<Descriptions
.
Item
label=
"用户token"
:span=
"2"
>
<Descriptions
.
Item
>
<span
class=
"item-label"
>
账号:
</span>
admin
</Descriptions
.Item
>
<Descriptions
.
Item
>
<span
class=
"item-label"
>
用户名称:
</span>
admin
</Descriptions
.Item
>
<Descriptions
.
Item
:span=
"2"
>
<span
class=
"item-label"
>
用户token:
</span>
<span>
{{
token
}}
</span>
<CopyOutlined
@
click=
"copyText"
style=
"margin-left: 10px"
/>
<span
v-if=
"copySuccess"
style=
"color: #40c397"
>
文本已复制
!
</span>
<span
v-if=
"copySuccess"
style=
"color: #40c397"
>
复制成功
!
</span>
</Descriptions
.Item
>
<Descriptions
.
Item
:span=
"2"
>
<span
style=
"color: #979dae; margin-left: 76.2px"
>
一个用户只有一个token,token用于识别用户身份和安全性要求
</span
>
</Descriptions
.Item
>
<Descriptions
.
Item
label=
"用户密钥"
:span=
"2"
>
transwarp1234567
</Descriptions
.Item
>
<Descriptions
.
Item
:span=
"2"
>
<span
class=
"item-label"
>
用户密钥:
</span>
transwarp1234567
</Descriptions
.Item
>
</Descriptions>
<BasicTable
@
register=
"callTable"
>
<template
#
toolbar
>
<a-button
type=
"link"
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
><FileMarkdownOutlined
style=
"font-size: 18px"
/>
下载API Doc
</a-button
>
<div
class=
"flex-1 flex justify-between"
>
<Input
style=
"width: 200px"
placeholder=
"输入关键字搜索"
v-model:value=
"searchValue"
>
<template
#
suffix
>
<SearchOutlined
/>
</
template
>
</Input>
<a-button
type=
"link"
:disabled=
"getRowSelection().selectedRowKeys <= 0"
@
click=
"handleDownload"
><FileMarkdownOutlined
style=
"font-size: 18px"
/>
下载API Doc
</a-button
>
</div>
</template>
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.key === 'action'"
>
...
...
@@ -39,6 +56,7 @@
{
// api
icon: 'ant-design:api-outlined',
onClick: handleApi.bind(null, record),
},
]"
/>
...
...
@@ -90,8 +108,13 @@
import
{
useRoute
,
useRouter
}
from
'vue-router'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
AddModel
from
'@/views/dataService/serviceMarket/serviceSearch/apiDetail/addModel.vue'
;
import
BasicTable
from
'@/components/Table/src/BasicTable.vue'
;
import
{
BasicColumn
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
BasicColumn
,
useTable
,
TableAction
,
BasicTableProps
,
BasicTable
,
}
from
'@/components/Table'
;
import
{
entityData
}
from
'@/views/dataWarehousePlanning/logicalModel/modelDetail/modelData'
;
import
{
entityColumns
}
from
'@/views/dataWarehousePlanning/logicalModel/modelDetail/versionComparison/comparison.data'
;
import
{
...
...
@@ -99,7 +122,9 @@
callTableColumn
,
}
from
'@/views/dataService/serviceMarket/myCall/call.data'
;
import
{
callData
}
from
'@/views/dataService/serviceMarket/myCall/callData'
;
import
{
useMessage
}
from
"@/hooks/web/useMessage"
;
const
searchValue
=
ref
();
const
router
=
useRouter
();
const
token
=
ref
<
string
>
(
'fc68b6929ceb4aad5035d8805cac466716a7edf6f848c2b2e26dfcla47ea4a1241b640016b91eb90bfc0d57517cd7fa3b251fd76cbbefed08f234998b5f7ac'
,
...
...
@@ -125,6 +150,11 @@
query
:
record
,
});
}
function
handleApi
()
{
router
.
push
({
path
:
'/dataService/serviceMarket/myCall/apiTest'
,
});
}
function
handleMonitor
(
record
)
{
router
.
push
({
path
:
'/dataService/serviceMonitor/monitorInfo'
,
...
...
@@ -146,15 +176,15 @@
};
return
{
...
response
};
},
formConfig
:
{
labelWidth
:
80
,
schemas
:
callFormSchema
,
autoSubmitOnEnter
:
true
,
},
//
formConfig: {
//
labelWidth: 80,
//
schemas: callFormSchema,
//
autoSubmitOnEnter: true,
//
},
rowKey
:
'businessId'
,
// 列
columns
:
callTableColumn
,
useSearchForm
:
tru
e
,
useSearchForm
:
fals
e
,
showIndexColumn
:
false
,
showTableSetting
:
false
,
rowSelection
:
true
,
...
...
@@ -165,7 +195,15 @@
title
:
'操作'
,
dataIndex
:
'action'
,
}
as
BasicColumn
,
});
}
as
BasicTableProps
);
const
{
createMessage
}
=
useMessage
();
function
handleDownload
()
{
createMessage
.
success
(
'下载成功!'
);
}
</
script
>
<
style
scoped
></
style
>
<
style
scoped
>
.item-label
{
width
:
76.2px
;
}
</
style
>
src/views/mallResourceDevelopment/file/commonFile/index.vue
View file @
9ce28302
...
...
@@ -12,7 +12,7 @@
<!--
<div
class=
"path"
>
资源编目
</div>
-->
</div>
<div
class=
"buttonGroup"
>
<Segmented
v-model:value=
"value"
:options=
"data"
>
<Segmented
@
change=
"segmentedChange"
v-model:value=
"value"
:options=
"data"
>
<template
#
label=
"
{ payload, value: segmentValue }">
<div
class=
"icon-container"
>
<Icon
...
...
@@ -23,8 +23,12 @@
</div>
</
template
>
</Segmented>
<a-button
type=
"primary"
@
click=
"handleBulkDownload"
>
批量下载
</a-button>
<a-button
type=
"primary"
@
click=
"handleBatchPush"
>
批量推送
</a-button>
<a-button
:disabled=
"isDisabled"
type=
"primary"
@
click=
"handleBulkDownload"
>
批量下载
</a-button
>
<a-button
:disabled=
"isDisabled"
type=
"primary"
@
click=
"pushNotifications(selectedCard)"
>
批量推送
</a-button
>
</div>
</div>
</template>
...
...
@@ -108,11 +112,17 @@
<span
v-if=
"item.isShare"
>
有条件共享
</span>
<span
v-else
>
无条件共享
</span>
<div>
<a-button
style=
"padding: 0; border: none; box-shadow: none"
>
<a-button
style=
"padding: 0; border: none; box-shadow: none"
@
click=
"information(item)"
>
<Icon
icon=
"icon-park-outline:eyes"
/>
{{
item
.
view
}}
</a-button
>
<Divider
type=
"vertical"
/>
<a-button
style=
"padding: 0; border: none; box-shadow: none"
>
<a-button
style=
"padding: 0; border: none; box-shadow: none"
@
click=
"pushNotifications(item)"
>
<Icon
icon=
"icon-park-outline:hand-up"
/>
{{
item
.
edit
}}
</a-button
>
</div>
...
...
@@ -137,6 +147,8 @@
show-size-changer
show-quick-jumper
/>
<ApplyForPushNotificationsModal
@
register=
"registerApplyForPushNotificationsModal"
/>
<EditModal
@
register=
"registerEditModal"
/>
</PageWrapper>
</div>
</template>
...
...
@@ -164,6 +176,9 @@
import
{
useRouter
}
from
'vue-router'
;
import
GroupTree
from
'./GroupTree.vue'
;
import
{
Columns
}
from
'./commonDataSet.data'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
ApplyForPushNotificationsModal
from
'@/views/mallResourceDevelopment/dataSet/commonDataSet/applyForPushNotificationsModal.vue'
;
import
EditModal
from
'@/views/mallResourceDevelopment/dataSet/commonDataSet/editModal.vue'
;
const
{
createMessage
,
createConfirm
}
=
useMessage
();
const
route
=
useRouter
();
...
...
@@ -174,7 +189,7 @@
const
selectedCard
=
reactive
([]
as
any
[]);
const
cardListData
=
ref
([]);
const
workSpaceName
=
ref
(
'党建建设'
);
const
isDisabled
=
ref
();
const
data
=
ref
([
{
value
:
'cardList'
,
...
...
@@ -190,6 +205,12 @@
},
]);
const
[
registerApplyForPushNotificationsModal
,
{
openModal
:
openApplyForPushNotificationsModal
},
]
=
useModal
();
const
[
registerEditModal
,
{
openModal
:
openEditModal
}]
=
useModal
();
const
[
registerTable
,
{
reload
,
getRowSelection
}]
=
useTable
({
api
:
async
()
=>
{
let
filteredList
=
cardList
.
filter
((
item
)
=>
{
...
...
@@ -225,7 +246,10 @@
return
{
...
response
,
data
:
cardListData
.
value
};
},
columns
:
Columns
,
rowSelection
:
true
,
rowSelection
:
{
type
:
'checkbox'
,
onChange
:
onSelectionChange
,
},
showTableSetting
:
false
,
showIndexColumn
:
false
,
pagination
:
false
,
...
...
@@ -243,6 +267,23 @@
}
}
function
segmentedChange
()
{
isDisabled
.
value
=
true
;
}
function
isCardSelected
(
item
:
any
)
{
isDisabled
.
value
=
selectedCard
.
length
<=
0
;
return
selectedCard
.
includes
(
item
);
}
function
onSelectionChange
()
{
isDisabled
.
value
=
getRowSelection
().
selectedRowKeys
<=
0
;
}
/**批量推送推送*/
function
pushNotifications
(
record
)
{
openApplyForPushNotificationsModal
(
true
,
record
);
}
function
handleNewModal
(
scene
:
string
)
{}
function
handleSelectCard
(
item
:
any
)
{
...
...
@@ -262,13 +303,11 @@
}
}
function
isCardSelected
(
item
:
any
)
{
return
selectedCard
.
includes
(
item
);
}
function
handleBulkDownload
()
{}
function
handleBatchPush
()
{}
function
information
(
item
)
{
openEditModal
(
true
,
item
);
}
function
onSearch
()
{
let
filteredList
=
cardList
.
filter
((
item
)
=>
{
...
...
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