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
66436236
authored
Aug 21, 2025
by
孙美琪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决方案管理
parent
7f2db94a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
66 deletions
+85
-66
src/utils/dict.ts
+5
-0
src/views/biz/solution/SolutionForm.vue
+10
-5
src/views/biz/solution/index.vue
+70
-61
No files found.
src/utils/dict.ts
View file @
66436236
...
...
@@ -253,4 +253,9 @@ export enum DICT_TYPE {
INDUSTRY_APPLICATION_TYPE
=
'industry_application_type'
,
HOME_INFO_INFORMATION_CATEGORY
=
'home_info_information_category'
,
HOME_INFO_INDUSTRY_CATEGORY
=
'home_info_industry_category'
,
// 解决方案
GROUNDING_STATUS
=
'grounding_status'
,
// 上架状态
SOLUTION_CATEGORY
=
'solution_category'
,
// 类别
INDUSTRY_CATEGORY
=
'industry_category'
// 行业类别
}
src/views/biz/solution/SolutionForm.vue
View file @
66436236
...
...
@@ -4,7 +4,7 @@
ref=
"formRef"
:model=
"formData"
:rules=
"formRules"
label-width=
"1
0
0px"
label-width=
"1
4
0px"
v-loading=
"formLoading"
>
<el-form-item
label=
"主标题"
prop=
"title"
>
...
...
@@ -45,9 +45,15 @@
<el-form-item
label=
"解决方案详情"
prop=
"solutionInfo"
>
<Editor
v-model=
"formData.solutionInfo"
height=
"150px"
/>
</el-form-item>
<el-form-item
label=
"状态
:0-已下架,1-已上架
"
prop=
"status"
>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-radio-group
v-model=
"formData.status"
>
<el-radio
value=
"1"
>
请选择字典生成
</el-radio>
<el-radio
v-for=
"dict in getIntDictOptions(DICT_TYPE.GROUNDING_STATUS)"
:key=
"dict.value"
:label=
"dict.value"
>
{{
dict
.
label
}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remark"
>
...
...
@@ -155,4 +161,4 @@ const resetForm = () => {
}
formRef
.
value
?.
resetFields
()
}
</
script
>
\ No newline at end of file
</
script
>
src/views/biz/solution/index.vue
View file @
66436236
...
...
@@ -6,7 +6,6 @@
:model=
"queryParams"
ref=
"queryFormRef"
:inline=
"true"
label-width=
"68px"
>
<el-form-item
label=
"主标题"
prop=
"title"
>
<el-input
...
...
@@ -47,55 +46,30 @@
/>
</el-select>
</el-form-item>
<el-form-item
label=
"状态:0-已下架,1-已上架"
prop=
"status"
>
<el-select
v-model=
"queryParams.status"
placeholder=
"请选择状态:0-已下架,1-已上架"
clearable
class=
"!w-240px"
>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-select
v-model=
"queryParams.status"
placeholder=
"请选择状态"
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=
"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>
<el-button
@
click=
"handleQuery"
><Icon
icon=
"ep:search"
class=
"mr-5px"
/>
搜索
</el-button>
<el-button
@
click=
"resetQuery"
><Icon
icon=
"ep:refresh"
class=
"mr-5px"
/>
重置
</el-button>
<el-button
type=
"primary"
plain
@
click=
"openForm('create')"
v-hasPermi=
"['biz:solution:create']"
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
新增
</el-button>
<el-button
type=
"success"
plain
@
click=
"handleExport"
:loading=
"exportLoading"
v-hasPermi=
"['biz:solution:export']"
>
<Icon
icon=
"ep:download"
class=
"mr-5px"
/>
导出
<el-button
type=
"primary"
@
click=
"handleQuery"
>
<Icon
icon=
"ep:search"
class=
"mr-5px"
/>
搜索
</el-button>
<el-button
type=
"danger"
plain
:disabled=
"isEmpty(checkedIds)"
@
click=
"handleDeleteBatch"
v-hasPermi=
"['biz:solution:delete']"
>
<Icon
icon=
"ep:delete"
class=
"mr-5px"
/>
批量删除
<el-button
@
click=
"resetQuery"
>
<Icon
icon=
"ep:refresh"
class=
"mr-5px"
/>
重置
</el-button>
</el-form-item>
</el-form>
...
...
@@ -103,16 +77,47 @@
<!-- 列表 -->
<ContentWrap>
<div
class=
"bt-b10"
>
<el-button
type=
"primary"
plain
@
click=
"openForm('create')"
v-hasPermi=
"['biz:solution:create']"
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
新增
</el-button>
<el-button
type=
"success"
plain
@
click=
"handleExport"
:loading=
"exportLoading"
v-hasPermi=
"['biz:solution:export']"
>
<Icon
icon=
"ep:download"
class=
"mr-5px"
/>
导出
</el-button>
<el-button
type=
"danger"
plain
:disabled=
"isEmpty(checkedIds)"
@
click=
"handleDeleteBatch"
v-hasPermi=
"['biz:solution:delete']"
>
<Icon
icon=
"ep:delete"
class=
"mr-5px"
/>
批量删除
</el-button>
</div>
<el-table
row-key=
"id"
v-loading=
"loading"
:data=
"list"
:stripe=
"true"
:show-overflow-tooltip=
"true"
@
selection-change=
"handleRowCheckboxChange"
row-key=
"id"
v-loading=
"loading"
:data=
"list"
:stripe=
"true"
:show-overflow-tooltip=
"true"
@
selection-change=
"handleRowCheckboxChange"
>
<el-table-column
type=
"selection"
width=
"55"
/>
<
el-table-column
label=
"主键"
align=
"center"
prop=
"id"
/
>
<el-table-column
type=
"selection"
width=
"55"
/>
<
!--
<el-table-column
label=
"主键"
align=
"center"
prop=
"id"
/>
--
>
<el-table-column
label=
"主标题"
align=
"center"
prop=
"title"
/>
<el-table-column
label=
"介绍"
align=
"center"
prop=
"introduction"
/>
<el-table-column
label=
"方案类别"
align=
"center"
prop=
"category"
>
...
...
@@ -127,7 +132,12 @@
</el-table-column>
<el-table-column
label=
"行业概述副标题"
align=
"center"
prop=
"titleIndustry"
/>
<el-table-column
label=
"解决方案副标题"
align=
"center"
prop=
"titleSolution"
/>
<el-table-column
label=
"状态:0-已下架,1-已上架"
align=
"center"
prop=
"status"
/>
<!-- <el-table-column label="状态" align="center" prop="status" />-->
<el-table-column
label=
"状态"
align=
"center"
prop=
"status"
>
<
template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.GROUNDING_STATUS"
:value=
"Number(scope.row.status)"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
...
...
@@ -192,8 +202,8 @@ const queryParams = reactive({
title
:
undefined
,
category
:
undefined
,
industryCategory
:
undefined
,
status
:
undefined
,
createTime
:
[]
status
:
undefined
//
createTime: []
})
const
queryFormRef
=
ref
()
// 搜索的表单
const
exportLoading
=
ref
(
false
)
// 导出的加载中
...
...
@@ -246,15 +256,15 @@ const handleDeleteBatch = async () => {
try
{
// 删除的二次确认
await
message
.
delConfirm
()
await
SolutionApi
.
deleteSolutionList
(
checkedIds
.
value
)
;
await
SolutionApi
.
deleteSolutionList
(
checkedIds
.
value
)
message
.
success
(
t
(
'common.delSuccess'
))
await
getList
()
;
await
getList
()
}
catch
{}
}
const
checkedIds
=
ref
<
number
[]
>
([])
const
handleRowCheckboxChange
=
(
records
:
Solution
[])
=>
{
checkedIds
.
value
=
records
.
map
((
item
)
=>
item
.
id
)
;
checkedIds
.
value
=
records
.
map
((
item
)
=>
item
.
id
)
}
/** 导出按钮操作 */
...
...
@@ -276,4 +286,4 @@ const handleExport = async () => {
onMounted
(()
=>
{
getList
()
})
</
script
>
\ No newline at end of file
</
script
>
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