Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
29a04e66
Commit
29a04e66
authored
Jan 17, 2025
by
“yiyousong”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 优化
parent
58fef6c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
99 additions
and
57 deletions
+99
-57
base-manager-ui/admin/src/pages/basicset/appmarket/components/AppDetailsPage.vue
...rc/pages/basicset/appmarket/components/AppDetailsPage.vue
+99
-57
No files found.
base-manager-ui/admin/src/pages/basicset/appmarket/components/AppDetailsPage.vue
View file @
29a04e66
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
width=
"50"
width=
"50"
height=
"50"
height=
"50"
v-if=
"appInfo.appIconPath"
v-if=
"appInfo.appIconPath"
:src=
"ap
i + ap
pInfo.appIconPath"
:src=
"appInfo.appIconPath"
/>
/>
<div
class=
"name"
>
{{
appInfo
.
appName
}}
</div>
<div
class=
"name"
>
{{
appInfo
.
appName
}}
</div>
<div
class=
"version"
>
当前版本:v
{{
appInfo
.
version
}}
</div>
<div
class=
"version"
>
当前版本:v
{{
appInfo
.
version
}}
</div>
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
:wrapper-col="{ span: 22 }"
:wrapper-col="{ span: 22 }"
>
>
<a-form-model-item
label=
"应用主题"
>
<a-form-model-item
label=
"应用主题"
>
{{
filterItems
(
appInfo
.
appThemeName
,
appDict
.
appThemeName
)
}}
{{
filterItems
(
appInfo
.
appThemeName
)
}}
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"应用简介"
>
<a-form-model-item
label=
"应用简介"
>
{{
appInfo
.
summary
}}
{{
appInfo
.
summary
}}
...
@@ -45,60 +45,63 @@
...
@@ -45,60 +45,63 @@
<div
class=
"version-manage flex1"
>
<div
class=
"version-manage flex1"
>
<div
class=
"title"
>
版本管理
</div>
<div
class=
"title"
>
版本管理
</div>
<div
class=
"table-content"
>
<div
class=
"table-content"
>
<a-table
<y-table
:loading=
"loading"
size=
"small"
size=
"small"
bordered
bordered
:scroll=
"
{ y: 350 }"
:scroll=
"
{ y: 350 }"
:columns="columns"
:columns="columns"
:pagination="{
:data="tableData"
showTotal: (total) => `共 ${total} 条`,
:pageSize.sync="size"
current: current,
:page.sync="page"
total: total,
:total="total"
pageSize: size,
:loading="loading"
showSizeChanger: true,
@changePagination="getVersions"
showQuickJumper: true,
size: 'small',
pageSizeOptions: pageSizeOptions,
onChange: handleChange,
onShowSizeChange: showSizeChange,
}"
:data-source="tableData"
:rowKey="(record) => record.id"
>
>
<!-- 序号 -->
<span
slot=
"index"
slot-scope=
"
{ index }">
{{
<span
slot=
"num"
slot-scope=
"text, record, index"
>
{{
(
page
-
1
)
*
size
+
index
+
1
(
current
-
1
)
*
size
+
index
+
1
}}
</span>
}}
</span>
<!-- 版本号 -->
<!-- 版本号 -->
<template
slot=
"version"
slot-scope=
"
text
"
>
<template
slot=
"version"
slot-scope=
"
{ record }
">
v
{{
text
.
version
}}
v
{{
record
.
version
}}
</
template
>
</
template
>
<!-- 应用包 -->
<!-- 应用包 -->
<
template
slot=
"fileName"
slot-scope=
"
text
"
>
<
template
slot=
"fileName"
slot-scope=
"
{ record }
"
>
<a
v-if=
"
text.fileName"
class=
"primary"
>
{{
text
.
fileName
}}
</a>
<a
v-if=
"
record.fileName"
class=
"primary"
>
{{
record
.
fileName
}}
</a>
<span
v-else
>
--
</span>
<span
v-else
>
--
</span>
</
template
>
</
template
>
<!-- 当前是否使用 -->
<!-- 当前是否使用 -->
<
template
slot=
"used"
slot-scope=
"
text
"
>
<
template
slot=
"used"
slot-scope=
"
{ record }
"
>
<a-tag
v-if=
"
text
.used"
color=
"blue"
>
正在使用
</a-tag>
<a-tag
v-if=
"
record
.used"
color=
"blue"
>
正在使用
</a-tag>
<span
v-else
>
否
</span>
<span
v-else
>
否
</span>
</
template
>
</
template
>
<!-- 操作 -->
<!-- 操作 -->
<
template
slot=
"action"
slot-scope=
"
text
"
>
<
template
slot=
"action"
slot-scope=
"
{ record }
"
>
<a-space
size=
"middle"
>
<a-space
size=
"middle"
>
<span
<a-button
type=
"link"
class=
"primary pointer"
:disabled=
"record.used ? true : false"
@
click=
"handleUse(record.id)"
>
使用
</a-button
>
<a-button
type=
"link"
class=
"primary pointer"
class=
"primary pointer"
:disabled=
"
text.used ? true : fals
e"
:disabled=
"
record.used ? false : tru
e"
@
click=
"handle
Use(text
.id)"
@
click=
"handle
Preview(record
.id)"
>
使用
</spa
n
>
预览
</a-butto
n
>
>
<span
class=
"primary pointer"
@
click=
"handlePreview(text.id)"
<a-button
>
预览
</span
type=
"link"
class=
"delete pointer"
v-permission=
"[1]"
@
click=
"handleDel(record.id)"
>
删除
</a-button
>
>
</a-space>
</a-space>
</
template
>
</
template
>
</
a
-table>
</
y
-table>
</div>
</div>
</div>
</div>
<!-- 站点树弹窗 -->
<!-- 站点树弹窗 -->
...
@@ -117,11 +120,12 @@ import {
...
@@ -117,11 +120,12 @@ import {
getVersionList
,
getVersionList
,
usedVersion
,
usedVersion
,
previewVersion
,
previewVersion
,
getCategoryList
,
deleteVersion
,
}
from
"
@/services/market
"
;
}
from
"
@/services/market
"
;
import
CheckSite
from
"
../modal/CheckSite.vue
"
;
import
CheckSite
from
"
../modal/CheckSite.vue
"
;
import
{
pageSizeOptions
}
from
"
@/config/pageConfig.js
"
;
import
{
filterItems
}
from
"
@/utils
"
;
import
{
mapGetters
}
from
"
vuex
"
;
import
{
mapGetters
}
from
"
vuex
"
;
import
YTable
from
"
@/components/YTable.vue
"
;
export
default
{
export
default
{
props
:
{
props
:
{
// 应用信息
// 应用信息
...
@@ -135,15 +139,15 @@ export default {
...
@@ -135,15 +139,15 @@ export default {
},
},
components
:
{
components
:
{
CheckSite
,
CheckSite
,
YTable
,
},
},
data
()
{
data
()
{
const
columns
=
[
const
columns
=
[
{
{
title
:
"
序号
"
,
title
:
"
序号
"
,
dataIndex
:
"
num
"
,
width
:
"
65px
"
,
width
:
"
65px
"
,
scopedSlots
:
{
scopedSlots
:
{
customRender
:
"
num
"
,
customRender
:
"
index
"
,
},
},
},
},
{
{
...
@@ -153,9 +157,7 @@ export default {
...
@@ -153,9 +157,7 @@ export default {
{
{
title
:
"
更新说明
"
,
title
:
"
更新说明
"
,
width
:
"
40%
"
,
width
:
"
40%
"
,
customRender
:
(
text
)
=>
{
dataIndex
:
"
notes
"
,
return
<
span
>
{
text
.
notes
?
text
.
notes
:
"
--
"
}
<
/span>
;
},
},
},
{
{
title
:
"
应用包
"
,
title
:
"
应用包
"
,
...
@@ -172,29 +174,41 @@ export default {
...
@@ -172,29 +174,41 @@ export default {
},
},
];
];
return
{
return
{
filterItems
,
api
:
process
.
env
.
VUE_APP_API_BASE_URL
+
"
/
"
,
api
:
process
.
env
.
VUE_APP_API_BASE_URL
+
"
/
"
,
columns
,
columns
,
appId
:
this
.
$route
.
query
.
id
,
appId
:
this
.
$route
.
query
.
id
,
appInfo
:
{},
// 应用信息
appInfo
:
{},
// 应用信息
current
:
1
,
page
:
1
,
size
:
10
,
size
:
10
,
total
:
0
,
total
:
0
,
loading
:
false
,
loading
:
false
,
pageSizeOptions
,
form
:
{},
form
:
{},
tableData
:
[],
tableData
:
[],
siteVisible
:
false
,
siteVisible
:
false
,
categoryList
:
[],
};
};
},
},
computed
:
{
computed
:
{
...
mapGetters
(
"
site
"
,
[
"
appDict
"
]),
...
mapGetters
(
"
site
"
,
[
"
appDict
"
]),
},
},
created
()
{
created
()
{
this
.
getCategoryList
();
this
.
getAppInfo
();
this
.
getAppInfo
();
this
.
getVersions
();
this
.
getVersions
();
},
},
methods
:
{
methods
:
{
// 获取分类列表
async
getCategoryList
()
{
let
res
=
await
getCategoryList
({
page
:
1
,
size
:
-
1
,
siteId
:
this
.
siteId
,
});
if
(
res
.
data
.
code
===
1
)
{
let
{
data
}
=
res
.
data
.
data
;
this
.
categoryList
=
data
;
}
},
// 获取应用详情
// 获取应用详情
async
getAppInfo
()
{
async
getAppInfo
()
{
let
res
=
await
getAppInfo
({
id
:
this
.
appId
});
let
res
=
await
getAppInfo
({
id
:
this
.
appId
});
...
@@ -206,7 +220,7 @@ export default {
...
@@ -206,7 +220,7 @@ export default {
async
getVersions
()
{
async
getVersions
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
let
res
=
await
getVersionList
({
let
res
=
await
getVersionList
({
page
:
this
.
current
,
page
:
this
.
page
,
size
:
this
.
size
,
size
:
this
.
size
,
appId
:
this
.
appId
,
appId
:
this
.
appId
,
});
});
...
@@ -259,22 +273,47 @@ export default {
...
@@ -259,22 +273,47 @@ export default {
window
.
open
(
routeUrl
.
href
,
"
_blank
"
);
window
.
open
(
routeUrl
.
href
,
"
_blank
"
);
}
}
},
},
// 翻页
handleChange
(
cur
)
{
// 删除
this
.
current
=
cur
;
handleDel
(
id
)
{
this
.
getVersions
();
let
_this
=
this
;
},
_this
.
$confirm
({
// 改变每页显示数量
title
:
"
系统提示
"
,
showSizeChange
(
cur
,
size
)
{
content
:
"
删除不可恢复,确定要删除吗?
"
,
this
.
current
=
cur
;
okText
:
"
确定
"
,
this
.
size
=
size
;
okType
:
"
danger
"
,
this
.
getVersions
();
cancelText
:
"
取消
"
,
centered
:
true
,
icon
:
"
exclamation-circle
"
,
maskClosable
:
true
,
async
onOk
()
{
let
res
=
await
deleteVersion
({
id
});
let
{
code
,
msg
}
=
res
.
data
;
if
(
code
===
1
)
{
_this
.
$message
.
success
(
msg
);
_this
.
getVersions
();
}
},
onCancel
()
{
console
.
log
(
"
Cancel
"
);
},
});
},
},
// 查看试用范围详情
// 查看试用范围详情
checkSite
(
siteList
)
{
checkSite
(
siteList
)
{
this
.
$refs
.
CheckSite
.
getSiteList
(
siteList
);
this
.
$refs
.
CheckSite
.
getSiteList
(
siteList
);
this
.
siteVisible
=
true
;
this
.
siteVisible
=
true
;
},
},
filterItems
(
appThemeName
)
{
if
(
!
appThemeName
)
return
;
let
arr
=
this
.
categoryList
.
find
((
v
)
=>
v
.
id
==
appThemeName
);
if
(
arr
)
{
return
arr
.
categoryName
;
}
else
{
return
"
--
"
;
}
},
},
},
};
};
</
script
>
</
script
>
...
@@ -333,4 +372,7 @@ export default {
...
@@ -333,4 +372,7 @@ export default {
/deep/.ant-form-item {
/deep/.ant-form-item {
align-items: flex-start;
align-items: flex-start;
}
}
</
style
>
/deep/.ant-btn-link {
\ No newline at end of file
padding: 0px;
}
</
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