Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
711b434c
authored
Aug 12, 2025
by
孙美琪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面菜单调整
parent
83910851
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
149 additions
and
253 deletions
+149
-253
src/styles/index.scss
+11
-3
src/views/biz/bannerinfo/BannerInfoForm.vue
+2
-2
src/views/biz/bannerinfo/index.vue
+31
-95
src/views/biz/computilityinformation/ComputilityInformationForm.vue
+50
-54
src/views/biz/computilityinformation/index.vue
+55
-99
No files found.
src/styles/index.scss
View file @
711b434c
...
@@ -25,9 +25,8 @@
...
@@ -25,9 +25,8 @@
}
}
&
.peg
{
&
.peg
{
box-shadow
:
box-shadow
:
0
0
10px
var
(
--
el-color-primary
)
,
0
0
10px
var
(
--
el-color-primary
)
,
0
0
5px
var
(
--
el-color-primary
)
!
important
;
0
0
5px
var
(
--
el-color-primary
)
!
important
;
}
}
&
.spinner-icon
{
&
.spinner-icon
{
...
@@ -35,3 +34,12 @@
...
@@ -35,3 +34,12 @@
border-left-color
:
var
(
--
el-color-primary
);
border-left-color
:
var
(
--
el-color-primary
);
}
}
}
}
.bt-b10
{
padding-bottom
:
10px
;
}
.upload-box
{
display
:
flex
;
flex-direction
:
column
;
}
src/views/biz/bannerinfo/BannerInfoForm.vue
View file @
711b434c
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<!--
<UploadImg
v-model=
"formData.image"
/>
-->
<!--
<UploadImg
v-model=
"formData.image"
/>
-->
<!--
</el-form-item>
-->
<!--
</el-form-item>
-->
<el-form-item
label=
"轮播图地址"
prop=
"images"
>
<el-form-item
label=
"轮播图地址"
prop=
"images"
>
<div
class=
"
dialog
-box"
>
<div
class=
"
upload
-box"
>
<el-upload
<el-upload
v-model:file-list=
"formData.images"
v-model:file-list=
"formData.images"
:action=
"uploadUrl"
:action=
"uploadUrl"
...
@@ -249,7 +249,7 @@ const handleUploadError = (err, file, fileList) => {
...
@@ -249,7 +249,7 @@ const handleUploadError = (err, file, fileList) => {
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.
dialog
-box
{
.
upload
-box
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
}
}
...
...
src/views/biz/bannerinfo/index.vue
View file @
711b434c
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
:model=
"queryParams"
:model=
"queryParams"
ref=
"queryFormRef"
ref=
"queryFormRef"
:inline=
"true"
:inline=
"true"
label-width=
"68px"
>
>
<el-form-item
label=
"内容"
prop=
"information"
>
<el-form-item
label=
"内容"
prop=
"information"
>
<el-input
<el-input
...
@@ -26,25 +25,6 @@
...
@@ -26,25 +25,6 @@
class=
"!w-200px"
class=
"!w-200px"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"链接地址"
prop=
"url"
>
<el-input
v-model=
"queryParams.url"
placeholder=
"请输入链接地址"
clearable
@
keyup
.
enter=
"handleQuery"
class=
"!w-200px"
/>
</el-form-item>
<!--
<el-form-item
label=
"排序值"
prop=
"orderNum"
>
-->
<!--
<el-input-->
<!-- v-model="queryParams.orderNum"-->
<!-- placeholder="请输入排序值"-->
<!-- clearable-->
<!-- @keyup.enter="handleQuery"-->
<!-- class="!w-160px"-->
<!-- />-->
<!--
</el-form-item>
-->
<el-form-item
label=
"状态"
prop=
"showStatus"
>
<el-form-item
label=
"状态"
prop=
"showStatus"
>
<el-select
<el-select
v-model=
"queryParams.showStatus"
v-model=
"queryParams.showStatus"
...
@@ -60,37 +40,6 @@
...
@@ -60,37 +40,6 @@
/>
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<!--
<el-form-item
label=
"状态"
prop=
"showStatus"
>
-->
<!--
<el-select-->
<!-- v-model="queryParams.showStatus"-->
<!-- placeholder="请选择状态:0-已隐藏,1-已显示"-->
<!-- clearable-->
<!-- class="!w-240px"-->
<!-- >-->
<!--
<el-option
label=
"请选择字典生成"
value=
""
/>
-->
<!--
</el-select>
-->
<!--
</el-form-item>
-->
<!--
<el-form-item
label=
"创建时间"
prop=
"createTime"
>
-->
<!--
<el-date-picker-->
<!-- v-model="queryParams.createTime"-->
<!-- value-format="YYYY-MM-DD HH:mm:ss"-->
<!-- type="daterange"-->
<!-- start-placeholder="开始日期"-->
<!-- end-placeholder="结束日期"-->
<!-- :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"-->
<!-- class="!w-220px"-->
<!-- />-->
<!--
</el-form-item>
-->
<!--
<el-form-item
label=
"备注"
prop=
"remark"
>
-->
<!--
<el-input-->
<!-- v-model="queryParams.remark"-->
<!-- placeholder="请输入备注"-->
<!-- clearable-->
<!-- @keyup.enter="handleQuery"-->
<!-- class="!w-240px"-->
<!-- />-->
<!--
</el-form-item>
-->
<el-form-item>
<el-form-item>
<el-button
@
click=
"handleQuery"
>
<el-button
@
click=
"handleQuery"
>
<Icon
icon=
"ep:search"
class=
"mr-5px"
/>
<Icon
icon=
"ep:search"
class=
"mr-5px"
/>
...
@@ -100,41 +49,43 @@
...
@@ -100,41 +49,43 @@
<Icon
icon=
"ep:refresh"
class=
"mr-5px"
/>
<Icon
icon=
"ep:refresh"
class=
"mr-5px"
/>
重置
重置
</el-button>
</el-button>
<el-button
type=
"primary"
plain
@
click=
"openForm('bannerCreate')"
v-hasPermi=
"['biz:banner-info:create']"
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
新增
</el-button>
<el-button
type=
"success"
plain
@
click=
"handleExport"
:loading=
"exportLoading"
v-hasPermi=
"['biz:banner-info:export']"
>
<Icon
icon=
"ep:download"
class=
"mr-5px"
/>
导出
</el-button>
<el-button
type=
"danger"
plain
:disabled=
"isEmpty(checkedIds)"
@
click=
"handleDeleteBatch"
v-hasPermi=
"['biz:banner-info:delete']"
>
<Icon
icon=
"ep:delete"
class=
"mr-5px"
/>
批量删除
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</ContentWrap>
</ContentWrap>
<!-- 列表 -->
<!-- 列表 -->
<ContentWrap>
<ContentWrap>
<div
class=
"bt-b10"
>
<el-button
type=
"primary"
plain
@
click=
"openForm('bannerCreate')"
v-hasPermi=
"['biz:banner-info:create']"
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
新增
</el-button>
<el-button
type=
"success"
plain
@
click=
"handleExport"
:loading=
"exportLoading"
v-hasPermi=
"['biz:banner-info:export']"
>
<Icon
icon=
"ep:download"
class=
"mr-5px"
/>
导出
</el-button>
<el-button
type=
"danger"
plain
:disabled=
"isEmpty(checkedIds)"
@
click=
"handleDeleteBatch"
v-hasPermi=
"['biz:banner-info:delete']"
>
<Icon
icon=
"ep:delete"
class=
"mr-5px"
/>
批量删除
</el-button>
</div>
<el-table
<el-table
row-key=
"id"
row-key=
"id"
v-loading=
"loading"
v-loading=
"loading"
...
@@ -145,12 +96,6 @@
...
@@ -145,12 +96,6 @@
>
>
<el-table-column
type=
"selection"
width=
"55"
/>
<el-table-column
type=
"selection"
width=
"55"
/>
<el-table-column
label=
"排序值"
align=
"center"
prop=
"orderNum"
/>
<el-table-column
label=
"排序值"
align=
"center"
prop=
"orderNum"
/>
<!--
<el-table-column
label=
"轮播图地址"
align=
"center"
prop=
"image"
/>
-->
<!--
<el-table-column
label=
"轮播图地址"
align=
"center"
prop=
"images"
width=
"100"
>
-->
<!--
<template
#
default=
"scope"
>
-->
<!--
<img
:src=
"scope.row.images"
alt=
"轮播图"
class=
"h-36px"
/>
-->
<!--
</
template
>
-->
<!-- </el-table-column>-->
<el-table-column
label=
"轮播图地址"
align=
"center"
prop=
"images"
width=
"100"
>
<el-table-column
label=
"轮播图地址"
align=
"center"
prop=
"images"
width=
"100"
>
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
<!-- 只显示第一张图片 -->
<!-- 只显示第一张图片 -->
...
@@ -168,20 +113,11 @@
...
@@ -168,20 +113,11 @@
<el-table-column
label=
"标题"
align=
"center"
prop=
"title"
/>
<el-table-column
label=
"标题"
align=
"center"
prop=
"title"
/>
<el-table-column
label=
"链接地址"
align=
"center"
prop=
"url"
/>
<el-table-column
label=
"链接地址"
align=
"center"
prop=
"url"
/>
<el-table-column
label=
"描述内容"
align=
"center"
prop=
"description"
/>
<el-table-column
label=
"描述内容"
align=
"center"
prop=
"description"
/>
<!-- <el-table-column label="状态" align="center" prop="showStatus" />-->
<el-table-column
label=
"状态"
align=
"center"
prop=
"showStatus"
>
<el-table-column
label=
"状态"
align=
"center"
prop=
"showStatus"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.HOME_INFO_STATUS"
:value=
"scope.row.showStatus"
/>
<dict-tag
:type=
"DICT_TYPE.HOME_INFO_STATUS"
:value=
"scope.row.showStatus"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<!-- <el-table-column-->
<!-- label="创建时间"-->
<!-- align="center"-->
<!-- prop="createTime"-->
<!-- :formatter="dateFormatter"-->
<!-- width="180px"-->
<!-- />-->
<el-table-column
label=
"备注"
align=
"center"
prop=
"remark"
/>
<el-table-column
label=
"备注"
align=
"center"
prop=
"remark"
/>
<el-table-column
label=
"操作"
align=
"center"
min-width=
"120px"
>
<el-table-column
label=
"操作"
align=
"center"
min-width=
"120px"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
...
...
src/views/biz/computilityinformation/ComputilityInformationForm.vue
View file @
711b434c
...
@@ -4,34 +4,37 @@
...
@@ -4,34 +4,37 @@
ref=
"formRef"
ref=
"formRef"
:model=
"formData"
:model=
"formData"
:rules=
"formRules"
:rules=
"formRules"
label-width=
"1
0
0px"
label-width=
"1
4
0px"
v-loading=
"formLoading"
v-loading=
"formLoading"
>
>
<!--
<el-form-item
label=
"展示图地址"
prop=
"images"
>
-->
<!--
<UploadImg
v-model=
"formData.images"
/>
-->
<!--
</el-form-item>
-->
<el-form-item
label=
"展示图地址"
prop=
"images"
>
<el-form-item
label=
"展示图地址"
prop=
"images"
>
<el-upload
<div
class=
"upload-box"
>
v-model:file-list=
"formData.images"
<el-upload
:action=
"uploadUrl"
v-model:file-list=
"formData.images"
:http-request=
"httpRequest"
:action=
"uploadUrl"
list-type=
"picture-card"
:http-request=
"httpRequest"
:on-preview=
"handlePictureCardPreview"
list-type=
"picture-card"
:on-remove=
"handleRemove"
:on-preview=
"handlePictureCardPreview"
:on-success=
"handleUploadSuccess"
:on-remove=
"handleRemove"
:on-error=
"handleUploadError"
:on-success=
"handleUploadSuccess"
multiple
:on-error=
"handleUploadError"
>
multiple
<el-icon><Plus
/></el-icon>
>
</el-upload>
<el-icon>
<!-- 添加预览对话框 -->
<Plus
/>
<el-dialog
v-model=
"previewVisible"
append-to-body
>
</el-icon>
<img
style=
"width: 100%"
:src=
"dialogImageUrl"
alt=
"Preview Image"
/>
</el-upload>
</el-dialog>
<!-- 添加预览对话框 -->
<!-- 添加提示信息 -->
<el-dialog
v-model=
"previewVisible"
append-to-body
>
<p
class=
"upload-tips"
>
<img
style=
"width: 100%"
:src=
"dialogImageUrl"
alt=
"Preview Image"
/>
请上传 大小不超过
<span
class=
"red-text"
>
5MB
</span>
格式为
<span
class=
"red-text"
>
png/jpg/jpeg
</span>
的文件
</el-dialog>
</p>
<!-- 添加提示信息 -->
<p
class=
"upload-tips"
>
请上传 大小不超过
<span
class=
"red-text"
>
5MB
</span>
格式为
<span
class=
"red-text"
>
png/jpg/jpeg
</span>
的文件
</p>
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"内容"
prop=
"information"
>
<el-form-item
label=
"内容"
prop=
"information"
>
...
@@ -46,14 +49,14 @@
...
@@ -46,14 +49,14 @@
<el-form-item
label=
"描述内容"
prop=
"description"
>
<el-form-item
label=
"描述内容"
prop=
"description"
>
<Editor
v-model=
"formData.description"
height=
"150px"
/>
<Editor
v-model=
"formData.description"
height=
"150px"
/>
</el-form-item>
</el-form-item>
<!--
<el-form-item
label=
"计算资源应用类别"
prop=
"category"
>
-->
<!--
<el-select
v-model=
"formData.category"
placeholder=
"请选择计算资源应用类别"
>
-->
<!--
<el-option
label=
"请选择字典生成"
value=
""
/>
-->
<!--
</el-select>
-->
<!--
</el-form-item>
-->
<el-form-item
label=
"计算资源应用类别"
prop=
"category"
>
<el-form-item
label=
"计算资源应用类别"
prop=
"category"
>
<el-select
v-model=
"formData.category"
placeholder=
"请选择应用类别"
clearable
class=
"!w-160px"
>
<el-select
v-model=
"formData.category"
placeholder=
"请选择计算资源应用类别"
clearable
class=
"!w-160px"
>
<el-option
<el-option
v-for=
"dict in getIntDictOptions(DICT_TYPE.HOME_INFO_COMPUTILITY_TYPE)"
v-for=
"dict in getIntDictOptions(DICT_TYPE.HOME_INFO_COMPUTILITY_TYPE)"
:key=
"dict.value"
:key=
"dict.value"
...
@@ -63,12 +66,6 @@
...
@@ -63,12 +66,6 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<!--
<el-form-item
label=
"状态"
prop=
"showStatus"
>
-->
<!--
<el-radio-group
v-model=
"formData.showStatus"
>
-->
<!--
<el-radio
value=
"1"
>
请选择字典生成
</el-radio>
-->
<!--
</el-radio-group>
-->
<!--
</el-form-item>
-->
<el-form-item
label=
"状态"
prop=
"showStatus"
>
<el-form-item
label=
"状态"
prop=
"showStatus"
>
<el-radio-group
v-model=
"formData.showStatus"
>
<el-radio-group
v-model=
"formData.showStatus"
>
<el-radio
<el-radio
...
@@ -96,7 +93,7 @@ import { ComputilityInformationApi, ComputilityInformation } from '@/api/biz/com
...
@@ -96,7 +93,7 @@ import { ComputilityInformationApi, ComputilityInformation } from '@/api/biz/com
import
{
DICT_TYPE
,
getIntDictOptions
}
from
'@/utils/dict'
import
{
DICT_TYPE
,
getIntDictOptions
}
from
'@/utils/dict'
import
{
useUpload
}
from
'@/components/UploadFile/src/useUpload'
import
{
useUpload
}
from
'@/components/UploadFile/src/useUpload'
import
{
Plus
}
from
"@element-plus/icons-vue"
;
import
{
Plus
}
from
'@element-plus/icons-vue'
// 添加预览相关的响应式变量
// 添加预览相关的响应式变量
const
previewVisible
=
ref
(
false
)
const
previewVisible
=
ref
(
false
)
...
@@ -153,12 +150,11 @@ const open = async (type: string, id?: number) => {
...
@@ -153,12 +150,11 @@ const open = async (type: string, id?: number) => {
// 将 images 字段转换为 file-list 需要的格式
// 将 images 字段转换为 file-list 需要的格式
if
(
data
.
images
&&
Array
.
isArray
(
data
.
images
))
{
if
(
data
.
images
&&
Array
.
isArray
(
data
.
images
))
{
formData
.
value
.
images
=
data
.
images
.
map
(
url
=>
({
url
,
name
:
'image.jpg'
}))
// 添加 name 属性
formData
.
value
.
images
=
data
.
images
.
map
(
(
url
)
=>
({
url
,
name
:
'image.jpg'
}))
// 添加 name 属性
}
else
{
}
else
{
formData
.
value
.
images
=
[]
formData
.
value
.
images
=
[]
}
}
formData
.
value
=
{
...
data
,
images
:
formData
.
value
.
images
}
// 确保 image 是数组
formData
.
value
=
{
...
data
,
images
:
formData
.
value
.
images
}
// 确保 image 是数组
}
finally
{
}
finally
{
formLoading
.
value
=
false
formLoading
.
value
=
false
}
}
...
@@ -174,25 +170,26 @@ const submitForm = async () => {
...
@@ -174,25 +170,26 @@ const submitForm = async () => {
// 提交请求
// 提交请求
formLoading
.
value
=
true
formLoading
.
value
=
true
try
{
try
{
// 确保只提取真实的 URL,而不是本地的 Blob URL
// 确保只提取真实的 URL,而不是本地的 Blob URL
const
imageUrls
=
formData
.
value
.
images
const
imageUrls
=
formData
.
value
.
images
.
filter
(
item
=>
item
.
url
&&
!
item
.
url
.
startsWith
(
'blob:'
))
// 过滤掉 Blob URL
.
filter
(
(
item
)
=>
item
.
url
&&
!
item
.
url
.
startsWith
(
'blob:'
))
// 过滤掉 Blob URL
.
map
(
item
=>
item
.
url
);
.
map
(
(
item
)
=>
item
.
url
)
// 如果还有 Blob URL,说明有文件还未上传完成
// 如果还有 Blob URL,说明有文件还未上传完成
const
hasBlobUrls
=
formData
.
value
.
images
.
some
(
item
=>
item
.
url
&&
item
.
url
.
startsWith
(
'blob:'
));
const
hasBlobUrls
=
formData
.
value
.
images
.
some
(
(
item
)
=>
item
.
url
&&
item
.
url
.
startsWith
(
'blob:'
)
)
if
(
hasBlobUrls
)
{
if
(
hasBlobUrls
)
{
message
.
warning
(
'请等待图片上传完成后再提交'
)
;
message
.
warning
(
'请等待图片上传完成后再提交'
)
formLoading
.
value
=
false
;
formLoading
.
value
=
false
return
;
return
}
}
// 构造最终数据
// 构造最终数据
const
data
=
{
const
data
=
{
...
formData
.
value
,
...
formData
.
value
,
images
:
imageUrls
images
:
imageUrls
}
;
}
if
(
formType
.
value
===
'computilityCreate'
)
{
if
(
formType
.
value
===
'computilityCreate'
)
{
await
ComputilityInformationApi
.
createComputilityInformation
(
data
)
await
ComputilityInformationApi
.
createComputilityInformation
(
data
)
...
@@ -243,25 +240,24 @@ const handleUploadSuccess = (response, file, fileList) => {
...
@@ -243,25 +240,24 @@ const handleUploadSuccess = (response, file, fileList) => {
// 从响应中提取真实的URL并更新文件对象
// 从响应中提取真实的URL并更新文件对象
if
(
response
&&
response
.
data
)
{
if
(
response
&&
response
.
data
)
{
// 根据 useUpload.ts 的实现,可能是 response.data.url 或直接是 response.data
// 根据 useUpload.ts 的实现,可能是 response.data.url 或直接是 response.data
const
realUrl
=
response
.
data
.
url
||
response
.
data
;
const
realUrl
=
response
.
data
.
url
||
response
.
data
if
(
realUrl
)
{
if
(
realUrl
)
{
file
.
url
=
realUrl
;
file
.
url
=
realUrl
}
}
}
}
// 更新 formData.images
// 更新 formData.images
formData
.
value
.
images
=
fileList
;
formData
.
value
.
images
=
fileList
}
}
// 上传失败处理函数
// 上传失败处理函数
const
handleUploadError
=
(
err
,
file
,
fileList
)
=>
{
const
handleUploadError
=
(
err
,
file
,
fileList
)
=>
{
message
.
error
(
'图片上传失败: '
+
(
err
.
message
||
'未知错误'
))
message
.
error
(
'图片上传失败: '
+
(
err
.
message
||
'未知错误'
))
}
}
</
script
>
</
script
>
<
style
scoped
>
.upload-tips
{
<
style
scoped
>
.upload-tips
{
font-size
:
12px
;
font-size
:
12px
;
color
:
#999
;
color
:
#999
;
margin-top
:
10px
;
margin-top
:
10px
;
...
...
src/views/biz/computilityinformation/index.vue
View file @
711b434c
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
:model=
"queryParams"
:model=
"queryParams"
ref=
"queryFormRef"
ref=
"queryFormRef"
:inline=
"true"
:inline=
"true"
label-width=
"68px"
>
>
<el-form-item
label=
"内容"
prop=
"information"
>
<el-form-item
label=
"内容"
prop=
"information"
>
<el-input
<el-input
...
@@ -17,7 +16,6 @@
...
@@ -17,7 +16,6 @@
class=
"!w-160px"
class=
"!w-160px"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"标题"
prop=
"title"
>
<el-form-item
label=
"标题"
prop=
"title"
>
<el-input
<el-input
v-model=
"queryParams.title"
v-model=
"queryParams.title"
...
@@ -27,28 +25,7 @@
...
@@ -27,28 +25,7 @@
class=
"!w-160px"
class=
"!w-160px"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"计算资源应用类别"
prop=
"category"
>
<el-form-item
label=
"链接地址"
prop=
"url"
>
<el-input
v-model=
"queryParams.url"
placeholder=
"请输入链接地址"
clearable
@
keyup
.
enter=
"handleQuery"
/>
</el-form-item>
<!--
<el-form-item
label=
"计算资源应用类别"
prop=
"category"
>
-->
<!--
<el-select-->
<!-- v-model="queryParams.category"-->
<!-- placeholder="请选择计算资源应用类别"-->
<!-- clearable-->
<!-- class="!w-240px"-->
<!-- >-->
<!--
<el-option
label=
"请选择字典生成"
value=
""
/>
-->
<!--
</el-select>
-->
<!--
</el-form-item>
-->
<el-form-item
label=
"应用类别"
prop=
"category"
>
<el-select
v-model=
"queryParams.category"
placeholder=
"请选择计算资源应用类别"
clearable
class=
"!w-200px"
>
<el-select
v-model=
"queryParams.category"
placeholder=
"请选择计算资源应用类别"
clearable
class=
"!w-200px"
>
<el-option
<el-option
v-for=
"dict in getIntDictOptions(DICT_TYPE.HOME_INFO_COMPUTILITY_TYPE)"
v-for=
"dict in getIntDictOptions(DICT_TYPE.HOME_INFO_COMPUTILITY_TYPE)"
...
@@ -60,7 +37,12 @@
...
@@ -60,7 +37,12 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"showStatus"
>
<el-form-item
label=
"状态"
prop=
"showStatus"
>
<el-select
v-model=
"queryParams.showStatus"
placeholder=
"请选择状态"
clearable
class=
"!w-120px"
>
<el-select
v-model=
"queryParams.showStatus"
placeholder=
"请选择状态"
clearable
class=
"!w-120px"
>
<el-option
<el-option
v-for=
"dict in getIntDictOptions(DICT_TYPE.HOME_INFO_STATUS)"
v-for=
"dict in getIntDictOptions(DICT_TYPE.HOME_INFO_STATUS)"
:key=
"dict.value"
:key=
"dict.value"
...
@@ -69,55 +51,14 @@
...
@@ -69,55 +51,14 @@
/>
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<!--
<el-form-item
label=
"创建时间"
prop=
"createTime"
>
-->
<!--
<el-date-picker-->
<!-- v-model="queryParams.createTime"-->
<!-- value-format="YYYY-MM-DD HH:mm:ss"-->
<!-- type="daterange"-->
<!-- start-placeholder="开始日期"-->
<!-- end-placeholder="结束日期"-->
<!-- :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"-->
<!-- class="!w-220px"-->
<!-- />-->
<!--
</el-form-item>
-->
<!--
<el-form-item
label=
"备注"
prop=
"remark"
>
-->
<!--
<el-input-->
<!-- v-model="queryParams.remark"-->
<!-- placeholder="请输入备注"-->
<!-- clearable-->
<!-- @keyup.enter="handleQuery"-->
<!-- class="!w-240px"-->
<!-- />-->
<!--
</el-form-item>
-->
<el-form-item>
<el-form-item>
<el-button
@
click=
"handleQuery"
><Icon
icon=
"ep:search"
class=
"mr-5px"
/>
搜索
</el-button>
<el-button
@
click=
"handleQuery"
>
<el-button
@
click=
"resetQuery"
><Icon
icon=
"ep:refresh"
class=
"mr-5px"
/>
重置
</el-button>
<Icon
icon=
"ep:search"
class=
"mr-5px"
/>
<el-button
搜索
type=
"primary"
plain
@
click=
"openForm('computilityCreate')"
v-hasPermi=
"['biz:computility-information:create']"
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
新增
</el-button>
<el-button
type=
"success"
plain
@
click=
"handleExport"
:loading=
"exportLoading"
v-hasPermi=
"['biz:computility-information:export']"
>
<Icon
icon=
"ep:download"
class=
"mr-5px"
/>
导出
</el-button>
</el-button>
<el-button
<el-button
@
click=
"resetQuery"
>
type=
"danger"
<Icon
icon=
"ep:refresh"
class=
"mr-5px"
/>
plain
重置
:disabled=
"isEmpty(checkedIds)"
@
click=
"handleDeleteBatch"
v-hasPermi=
"['biz:computility-information:delete']"
>
<Icon
icon=
"ep:delete"
class=
"mr-5px"
/>
批量删除
</el-button>
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -125,21 +66,46 @@
...
@@ -125,21 +66,46 @@
<!-- 列表 -->
<!-- 列表 -->
<ContentWrap>
<ContentWrap>
<div
class=
"bt-b10"
>
<el-button
type=
"primary"
plain
@
click=
"openForm('computilityCreate')"
v-hasPermi=
"['biz:computility-information:create']"
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
新增
</el-button>
<el-button
type=
"success"
plain
@
click=
"handleExport"
:loading=
"exportLoading"
v-hasPermi=
"['biz:computility-information:export']"
>
<Icon
icon=
"ep:download"
class=
"mr-5px"
/>
导出
</el-button>
<el-button
type=
"danger"
plain
:disabled=
"isEmpty(checkedIds)"
@
click=
"handleDeleteBatch"
v-hasPermi=
"['biz:computility-information:delete']"
>
<Icon
icon=
"ep:delete"
class=
"mr-5px"
/>
批量删除
</el-button>
</div>
<el-table
<el-table
row-key=
"id"
row-key=
"id"
v-loading=
"loading"
v-loading=
"loading"
:data=
"list"
:data=
"list"
:stripe=
"true"
:stripe=
"true"
:show-overflow-tooltip=
"true"
:show-overflow-tooltip=
"true"
@
selection-change=
"handleRowCheckboxChange"
@
selection-change=
"handleRowCheckboxChange"
>
>
<el-table-column
type=
"selection"
width=
"55"
/>
<el-table-column
type=
"selection"
width=
"55"
/>
<!--
<el-table-column
label=
"展示图地址"
align=
"center"
prop=
"image"
/>
-->
<!--
<el-table-column
label=
"展示图地址"
align=
"center"
prop=
"images"
width=
"100"
>
-->
<!--
<template
#
default=
"scope"
>
-->
<!--
<img
:src=
"scope.row.images"
alt=
"资源展示图"
class=
"h-36px"
/>
-->
<!--
</
template
>
-->
<!-- </el-table-column>-->
<el-table-column
label=
"展示图地址"
align=
"center"
prop=
"images"
width=
"100"
>
<el-table-column
label=
"展示图地址"
align=
"center"
prop=
"images"
width=
"100"
>
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
<!-- 只显示第一张图片 -->
<!-- 只显示第一张图片 -->
...
@@ -157,26 +123,16 @@
...
@@ -157,26 +123,16 @@
<el-table-column
label=
"标题"
align=
"center"
prop=
"title"
/>
<el-table-column
label=
"标题"
align=
"center"
prop=
"title"
/>
<el-table-column
label=
"链接地址"
align=
"center"
prop=
"url"
/>
<el-table-column
label=
"链接地址"
align=
"center"
prop=
"url"
/>
<el-table-column
label=
"描述内容"
align=
"center"
prop=
"description"
/>
<el-table-column
label=
"描述内容"
align=
"center"
prop=
"description"
/>
<!-- <el-table-column label="计算资源应用类别" align="center" prop="category" />-->
<el-table-column
label=
"计算资源应用类别"
align=
"center"
prop=
"category"
>
<el-table-column
label=
"计算资源应用类别"
align=
"center"
prop=
"category"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.HOME_INFO_COMPUTILITY_TYPE"
:value=
"scope.row.category"
/>
<dict-tag
:type=
"DICT_TYPE.HOME_INFO_COMPUTILITY_TYPE"
:value=
"scope.row.category"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<!-- <el-table-column label="状态" align="center" prop="showStatus" />-->
<el-table-column
label=
"状态"
align=
"center"
prop=
"showStatus"
>
<el-table-column
label=
"状态"
align=
"center"
prop=
"showStatus"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.HOME_INFO_STATUS"
:value=
"Number(scope.row.showStatus)"
/>
<dict-tag
:type=
"DICT_TYPE.HOME_INFO_STATUS"
:value=
"Number(scope.row.showStatus)"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
:formatter=
"dateFormatter"
width=
"180px"
/>
<el-table-column
label=
"备注"
align=
"center"
prop=
"remark"
/>
<el-table-column
label=
"备注"
align=
"center"
prop=
"remark"
/>
<el-table-column
label=
"操作"
align=
"center"
min-width=
"120px"
>
<el-table-column
label=
"操作"
align=
"center"
min-width=
"120px"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
...
@@ -237,7 +193,7 @@ const queryParams = reactive({
...
@@ -237,7 +193,7 @@ const queryParams = reactive({
showStatus
:
undefined
,
showStatus
:
undefined
,
createTime
:
[],
createTime
:
[],
remark
:
undefined
,
remark
:
undefined
,
description
:
''
,
description
:
''
})
})
const
queryFormRef
=
ref
()
// 搜索的表单
const
queryFormRef
=
ref
()
// 搜索的表单
const
exportLoading
=
ref
(
false
)
// 导出的加载中
const
exportLoading
=
ref
(
false
)
// 导出的加载中
...
@@ -290,15 +246,15 @@ const handleDeleteBatch = async () => {
...
@@ -290,15 +246,15 @@ const handleDeleteBatch = async () => {
try
{
try
{
// 删除的二次确认
// 删除的二次确认
await
message
.
delConfirm
()
await
message
.
delConfirm
()
await
ComputilityInformationApi
.
deleteComputilityInformationList
(
checkedIds
.
value
)
;
await
ComputilityInformationApi
.
deleteComputilityInformationList
(
checkedIds
.
value
)
message
.
success
(
t
(
'common.delSuccess'
))
message
.
success
(
t
(
'common.delSuccess'
))
await
getList
()
;
await
getList
()
}
catch
{}
}
catch
{}
}
}
const
checkedIds
=
ref
<
number
[]
>
([])
const
checkedIds
=
ref
<
number
[]
>
([])
const
handleRowCheckboxChange
=
(
records
:
ComputilityInformation
[])
=>
{
const
handleRowCheckboxChange
=
(
records
:
ComputilityInformation
[])
=>
{
checkedIds
.
value
=
records
.
map
((
item
)
=>
item
.
id
)
;
checkedIds
.
value
=
records
.
map
((
item
)
=>
item
.
id
)
}
}
/** 导出按钮操作 */
/** 导出按钮操作 */
...
...
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