Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pet-business-web
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
刘怀志
pet-business-web
Commits
823c64d2
Commit
823c64d2
authored
Jun 02, 2023
by
小费同学阿
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文章管理
parent
663556a7
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
529 additions
and
495 deletions
+529
-495
index.js
src/router/index.js
+69
-69
article-detail.vue
src/views/article-management/article-detail.vue
+30
-26
article-edit.vue
src/views/article-management/article-edit.vue
+26
-22
article-insert.vue
src/views/article-management/article-insert.vue
+26
-28
article-management.vue
src/views/article-management/article-management.vue
+237
-210
login.vue
src/views/login.vue
+42
-42
index.vue
src/views/tool/gen/index.vue
+85
-85
vue.config.js
vue.config.js
+14
-13
No files found.
src/router/index.js
View file @
823c64d2
...
@@ -67,14 +67,14 @@ export const constantRoutes = [
...
@@ -67,14 +67,14 @@ export const constantRoutes = [
component
:
()
=>
import
(
'@/views/document-management/privacy-policy/privacy-policy'
),
component
:
()
=>
import
(
'@/views/document-management/privacy-policy/privacy-policy'
),
hidden
:
true
hidden
:
true
},
},
//设备详情页路由
//
设备详情页路由
{
{
path
:
'/equipment-management'
,
path
:
'/equipment-management'
,
component
:
Layout
,
component
:
Layout
,
hidden
:
true
,
hidden
:
true
,
permissions
:
[
'*:*:*'
],
permissions
:
[
'*:*:*'
],
children
:
[
children
:
[
//设备
//
设备
{
{
path
:
'equipment-management/equipment-detail:id'
,
path
:
'equipment-management/equipment-detail:id'
,
props
:
true
,
props
:
true
,
...
@@ -84,19 +84,19 @@ export const constantRoutes = [
...
@@ -84,19 +84,19 @@ export const constantRoutes = [
meta
:
{
meta
:
{
title
:
'设备详情'
,
title
:
'设备详情'
,
icon
:
'dashboard'
,
icon
:
'dashboard'
,
activeMenu
:
'/equipment-management/equipment-management'
,
activeMenu
:
'/equipment-management/equipment-management'
}
}
}
},
]
]
},
},
{
{
path
:
'/customer-management'
,
path
:
'/customer-management'
,
component
:
Layout
,
component
:
Layout
,
hidden
:
true
,
hidden
:
true
,
permissions
:
[
'*:*:*'
],
permissions
:
[
'*:*:*'
],
children
:
[
children
:
[
//设备
//
设备
{
{
path
:
'pet-owner-management'
,
path
:
'pet-owner-management'
,
props
:
true
,
props
:
true
,
...
@@ -106,9 +106,9 @@ export const constantRoutes = [
...
@@ -106,9 +106,9 @@ export const constantRoutes = [
meta
:
{
meta
:
{
title
:
'宠主管理'
,
title
:
'宠主管理'
,
icon
:
'dashboard'
,
icon
:
'dashboard'
,
activeMenu
:
'/customer-management/pet-owner-management'
,
activeMenu
:
'/customer-management/pet-owner-management'
}
}
}
},
]
]
},
},
...
@@ -178,7 +178,7 @@ export const constantRoutes = [
...
@@ -178,7 +178,7 @@ export const constantRoutes = [
name
:
'ArticleDetail'
,
name
:
'ArticleDetail'
,
props
:
true
,
props
:
true
,
meta
:
{
meta
:
{
title
:
'文章详情'
,
icon
:
'component'
title
:
'文章详情'
,
icon
:
'component'
}
}
},
},
// 文章添加路由
// 文章添加路由
...
@@ -195,26 +195,26 @@ export const constantRoutes = [
...
@@ -195,26 +195,26 @@ export const constantRoutes = [
]
]
},
},
//行政详情路由
//
行政详情路由
{
{
path
:
'/administrative-management'
,
path
:
'/administrative-management'
,
component
:
Layout
,
component
:
Layout
,
hidden
:
true
,
hidden
:
true
,
permissions
:
[
'*:*:*'
],
permissions
:
[
'*:*:*'
],
children
:
[
children
:
[
{
{
"name"
:
"Department-management"
,
'name'
:
'Department-management'
,
"path"
:
"department-management"
,
'path'
:
'department-management'
,
"hidden"
:
false
,
'hidden'
:
false
,
component
:
()
=>
import
(
'@/views/administrative-management/department-management/department-management'
),
component
:
()
=>
import
(
'@/views/administrative-management/department-management/department-management'
),
"meta"
:
{
'meta'
:
{
"title"
:
"科室管理"
,
'title'
:
'科室管理'
,
"icon"
:
"download"
,
'icon'
:
'download'
,
"noCache"
:
false
,
'noCache'
:
false
,
"link"
:
null
'link'
:
null
}
}
},
},
//兽医
//
兽医
{
{
path
:
'veterinary-management/veterinary-detail/:id'
,
path
:
'veterinary-management/veterinary-detail/:id'
,
props
:
true
,
props
:
true
,
...
@@ -224,10 +224,10 @@ export const constantRoutes = [
...
@@ -224,10 +224,10 @@ export const constantRoutes = [
meta
:
{
meta
:
{
title
:
'兽医详情'
,
title
:
'兽医详情'
,
icon
:
'dashboard'
,
icon
:
'dashboard'
,
activeMenu
:
'/administrative-management/veterinary-management'
,
activeMenu
:
'/administrative-management/veterinary-management'
}
}
},
},
//人员
//
人员
{
{
path
:
'personnel-management/personnel-detail/:id'
,
path
:
'personnel-management/personnel-detail/:id'
,
props
:
true
,
props
:
true
,
...
@@ -237,10 +237,10 @@ export const constantRoutes = [
...
@@ -237,10 +237,10 @@ export const constantRoutes = [
meta
:
{
meta
:
{
title
:
'人员详情'
,
title
:
'人员详情'
,
icon
:
'dashboard'
,
icon
:
'dashboard'
,
activeMenu
:
'/administrative-management/personnel-management'
,
activeMenu
:
'/administrative-management/personnel-management'
}
}
},
},
//科室
//
科室
{
{
path
:
'department-management/department-detail/:id'
,
path
:
'department-management/department-detail/:id'
,
props
:
true
,
props
:
true
,
...
@@ -250,7 +250,7 @@ export const constantRoutes = [
...
@@ -250,7 +250,7 @@ export const constantRoutes = [
meta
:
{
meta
:
{
title
:
'科室详情'
,
title
:
'科室详情'
,
icon
:
'dashboard'
,
icon
:
'dashboard'
,
activeMenu
:
'/administrative-management/department-management'
,
activeMenu
:
'/administrative-management/department-management'
}
}
},
},
// 诊室
// 诊室
...
@@ -263,7 +263,7 @@ export const constantRoutes = [
...
@@ -263,7 +263,7 @@ export const constantRoutes = [
meta
:
{
meta
:
{
title
:
'诊室详情'
,
title
:
'诊室详情'
,
icon
:
'dashboard'
,
icon
:
'dashboard'
,
activeMenu
:
'/administrative-management/consulting-room-management'
,
activeMenu
:
'/administrative-management/consulting-room-management'
}
}
},
},
// 诊室新增
// 诊室新增
...
@@ -276,21 +276,21 @@ export const constantRoutes = [
...
@@ -276,21 +276,21 @@ export const constantRoutes = [
meta
:
{
meta
:
{
title
:
'诊室新增'
,
title
:
'诊室新增'
,
icon
:
'dashboard'
,
icon
:
'dashboard'
,
activeMenu
:
'/administrative-management/consulting-room-management'
,
activeMenu
:
'/administrative-management/consulting-room-management'
}
}
}
}
]
]
},
},
//病历路由
//
病历路由
{
{
path
:
''
,
path
:
''
,
hidden
:
true
,
hidden
:
true
,
component
:
Layout
,
component
:
Layout
,
redirect
:
'index'
,
redirect
:
'index'
,
children
:
[
children
:
[
//病历详情页
//
病历详情页
{
{
path
:
'/medical-detail/:id'
,
path
:
'/medical-detail/:id'
,
props
:
true
,
props
:
true
,
permissions
:
[
'*:*:*'
],
permissions
:
[
'*:*:*'
],
component
:
()
=>
import
(
'@/views/medical-record-management/medical-detail'
),
component
:
()
=>
import
(
'@/views/medical-record-management/medical-detail'
),
...
@@ -298,20 +298,20 @@ export const constantRoutes = [
...
@@ -298,20 +298,20 @@ export const constantRoutes = [
meta
:
{
meta
:
{
title
:
'病历详情'
,
title
:
'病历详情'
,
icon
:
'dashboard'
,
icon
:
'dashboard'
,
activeMenu
:
'/medical-record-management'
,
activeMenu
:
'/medical-record-management'
}
}
},
},
//预约设备页面
//
预约设备页面
{
{
path
:
'/reservation-equipment/:id:pet'
,
path
:
'/reservation-equipment/:id:pet'
,
props
:
true
,
props
:
true
,
permissions
:
[
'*:*:*'
],
permissions
:
[
'*:*:*'
],
component
:
()
=>
import
(
'@/views/medical-record-management/reservation-equipment'
),
component
:
()
=>
import
(
'@/views/medical-record-management/reservation-equipment'
),
name
:
'ReservationEquipment'
,
name
:
'ReservationEquipment'
,
meta
:{
meta
:
{
title
:
'预约设备'
,
title
:
'预约设备'
,
icom
:
'dashboard'
,
icom
:
'dashboard'
,
activeMenu
:
'/medical-record-management/medical-detail'
,
activeMenu
:
'/medical-record-management/medical-detail'
}
}
}
}
]
]
...
@@ -343,7 +343,7 @@ export const constantRoutes = [
...
@@ -343,7 +343,7 @@ export const constantRoutes = [
component
:
()
=>
import
(
'@/views/hospital-management/hospital-update'
),
component
:
()
=>
import
(
'@/views/hospital-management/hospital-update'
),
name
:
'HospitalUpdate'
,
name
:
'HospitalUpdate'
,
meta
:
{
title
:
'医院修改页'
,
icon
:
'dashboard'
,
activeMenu
:
'/hospital-management'
}
meta
:
{
title
:
'医院修改页'
,
icon
:
'dashboard'
,
activeMenu
:
'/hospital-management'
}
}
,
}
]
]
},
},
{
{
...
@@ -448,7 +448,7 @@ export const dynamicRoutes = [
...
@@ -448,7 +448,7 @@ export const dynamicRoutes = [
meta
:
{
meta
:
{
title
:
'宠物主人详情'
,
title
:
'宠物主人详情'
,
icon
:
'dashboard'
,
icon
:
'dashboard'
,
activeMenu
:
'/customer-management/pet-owner-management'
,
activeMenu
:
'/customer-management/pet-owner-management'
}
}
},
{
},
{
path
:
'pet-management/pet-detail/:id'
,
path
:
'pet-management/pet-detail/:id'
,
...
@@ -459,18 +459,18 @@ export const dynamicRoutes = [
...
@@ -459,18 +459,18 @@ export const dynamicRoutes = [
meta
:
{
meta
:
{
title
:
'宠物详情'
,
title
:
'宠物详情'
,
icon
:
'dashboard'
,
icon
:
'dashboard'
,
activeMenu
:
'/customer-management/pet-management'
,
activeMenu
:
'/customer-management/pet-management'
}
}
}]
}]
},
},
//行政详情路由
//
行政详情路由
{
{
path
:
'/administrative-management'
,
path
:
'/administrative-management'
,
component
:
Layout
,
component
:
Layout
,
hidden
:
true
,
hidden
:
true
,
permissions
:
[
'*:*:*'
],
permissions
:
[
'*:*:*'
],
children
:
[
children
:
[
//兽医
//
兽医
{
{
path
:
'veterinary-management/veterinary-detail/:id'
,
path
:
'veterinary-management/veterinary-detail/:id'
,
props
:
true
,
props
:
true
,
...
@@ -480,10 +480,10 @@ export const dynamicRoutes = [
...
@@ -480,10 +480,10 @@ export const dynamicRoutes = [
meta
:
{
meta
:
{
title
:
'兽医详情'
,
title
:
'兽医详情'
,
icon
:
'dashboard'
,
icon
:
'dashboard'
,
activeMenu
:
'/administrative-management/veterinary-management'
,
activeMenu
:
'/administrative-management/veterinary-management'
}
}
},
},
//人员
//
人员
{
{
path
:
'personnel-management/personnel-detail/:id'
,
path
:
'personnel-management/personnel-detail/:id'
,
props
:
true
,
props
:
true
,
...
@@ -493,10 +493,10 @@ export const dynamicRoutes = [
...
@@ -493,10 +493,10 @@ export const dynamicRoutes = [
meta
:
{
meta
:
{
title
:
'人员详情'
,
title
:
'人员详情'
,
icon
:
'dashboard'
,
icon
:
'dashboard'
,
activeMenu
:
'/administrative-management/personnel-management'
,
activeMenu
:
'/administrative-management/personnel-management'
}
}
},
},
//科室
//
科室
{
{
path
:
'department-management/department-detail/:id'
,
path
:
'department-management/department-detail/:id'
,
props
:
true
,
props
:
true
,
...
@@ -506,16 +506,16 @@ export const dynamicRoutes = [
...
@@ -506,16 +506,16 @@ export const dynamicRoutes = [
meta
:
{
meta
:
{
title
:
'科室详情'
,
title
:
'科室详情'
,
icon
:
'dashboard'
,
icon
:
'dashboard'
,
activeMenu
:
'/administrative-management/department-management'
,
activeMenu
:
'/administrative-management/department-management'
}
}
}
}
]
]
}
,
}
]
]
// 防止连续点击多次路由报错
// 防止连续点击多次路由报错
let
routerPush
=
Router
.
prototype
.
push
;
const
routerPush
=
Router
.
prototype
.
push
Router
.
prototype
.
push
=
function
push
(
location
)
{
Router
.
prototype
.
push
=
function
push
(
location
)
{
return
routerPush
.
call
(
this
,
location
).
catch
(
err
=>
err
)
return
routerPush
.
call
(
this
,
location
).
catch
(
err
=>
err
)
}
}
...
...
src/views/article-management/article-detail.vue
View file @
823c64d2
...
@@ -4,15 +4,17 @@
...
@@ -4,15 +4,17 @@
<el-card
class=
"box-card"
>
<el-card
class=
"box-card"
>
<!-- 头部标题-->
<!-- 头部标题-->
<div
style=
"padding-top:32px;text-align: center;"
>
<div
style=
"padding-top:32px;text-align: center;"
>
<span
style=
"font-size: 24px;
<span
style=
"font-size: 24px;
font-family: Microsoft YaHei-Bold, Microsoft YaHei;
font-family: Microsoft YaHei-Bold, Microsoft YaHei;
font-weight: bold;
font-weight: bold;
color: #333333;"
>
查看
</span>
color: #333333;"
>
查看
</span>
</div>
</div>
<div
style=
"padding: 20px;"
>
<div
style=
"padding: 20px;"
>
<div
style=
"display: flex"
>
<div
style=
"display: flex"
>
<!-- 文章信息 -->
<!-- 文章信息 -->
<div
class=
"tip-green"
/>
<div
class=
"tip-green"
/>
<div
<div
style=
"padding-left: 13px;font-size: 16px;font-family: Microsoft YaHei-Bold, Microsoft YaHei;font-weight: bold;color: #333333;"
style=
"padding-left: 13px;font-size: 16px;font-family: Microsoft YaHei-Bold, Microsoft YaHei;font-weight: bold;color: #333333;"
>
文章信息
>
文章信息
...
@@ -23,18 +25,23 @@ color: #333333;">查看</span>
...
@@ -23,18 +25,23 @@ color: #333333;">查看</span>
<div
style=
"display:flex;"
>
<div
style=
"display:flex;"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
style=
"padding-top: 32px;"
label=
"文章标题"
prop=
"articleTitle"
>
<el-form-item
style=
"padding-top: 32px;"
label=
"文章标题"
prop=
"articleTitle"
>
<el-input
disabled
v-model=
"form.articleTitle"
placeholder=
"请输入文章标题"
/>
<el-input
v-model=
"form.articleTitle"
disabled
placeholder=
"请输入文章标题"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"权重"
prop=
"articleWeight"
>
<el-form-item
label=
"权重"
prop=
"articleWeight"
>
<el-input-number
disabled
v-model=
"form.articleWeight"
:max=
"9999"
:min=
"1"
controls-position=
"right"
<el-input-number
></el-input-number>
v-model=
"form.articleWeight"
disabled
:max=
"9999"
:min=
"1"
controls-position=
"right"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"文章封面"
prop=
"articleCover"
>
<el-form-item
label=
"文章封面"
prop=
"articleCover"
>
<!-- 0-- 文章信息的页面--文章封面 -->
<!-- 0-- 文章信息的页面--文章封面 -->
<div
class=
"base-msg"
>
<div
class=
"base-msg"
>
<div
class=
"petPicture"
style=
"padding-bottom: 20px;"
>
<div
class=
"petPicture"
style=
"padding-bottom: 20px;"
>
<el-card
shadow=
"hover"
style=
"width: 150px;height: 150px;position: center"
>
<el-card
shadow=
"hover"
style=
"width: 150px;height: 150px;position: center"
>
<el-image
:src=
"baseURL+form.articleCover"
fit=
"cover"
/>
<el-image
:src=
"baseURL+form.articleCover"
fit=
"cover"
/>
</el-card>
</el-card>
</div>
</div>
</div>
</div>
...
@@ -43,14 +50,13 @@ color: #333333;">查看</span>
...
@@ -43,14 +50,13 @@ color: #333333;">查看</span>
<div
style=
"display: flex; "
>
<div
style=
"display: flex; "
>
<div
style=
"padding-right: 15px;"
>
<div
style=
"padding-right: 15px;"
>
<el-switch
<el-switch
disabled
v-model=
"form.articleStatus"
v-model=
"form.articleStatus"
disabled
active-color=
"#13ce66"
active-color=
"#13ce66"
active-value=
"0"
active-value=
"0"
inactive-color=
"#ff4949"
inactive-color=
"#ff4949"
inactive-value=
"1"
inactive-value=
"1"
>
/>
</el-switch>
</div>
</div>
<div
v-if=
"form.articleStatus==='0'"
style=
"padding-top: 1px;"
>
已上架
</div>
<div
v-if=
"form.articleStatus==='0'"
style=
"padding-top: 1px;"
>
已上架
</div>
<div
v-else-if=
"form.articleStatus==='1'"
style=
"padding-top: 1px;"
>
已下架
</div>
<div
v-else-if=
"form.articleStatus==='1'"
style=
"padding-top: 1px;"
>
已下架
</div>
...
@@ -59,7 +65,7 @@ color: #333333;">查看</span>
...
@@ -59,7 +65,7 @@ color: #333333;">查看</span>
<!-- 2-- 文章信息--文章内容 -->
<!-- 2-- 文章信息--文章内容 -->
<div
style=
"display: flex"
>
<div
style=
"display: flex"
>
<!-- 文章内容-->
<!-- 文章内容-->
<div
class=
"tip-green"
/>
<div
class=
"tip-green"
/>
<div
<div
style=
"padding-left: 13px;font-size: 16px;font-family: Microsoft YaHei-Bold, Microsoft YaHei;font-weight: bold;color: #333333;"
style=
"padding-left: 13px;font-size: 16px;font-family: Microsoft YaHei-Bold, Microsoft YaHei;font-weight: bold;color: #333333;"
>
文章内容
>
文章内容
...
@@ -68,7 +74,7 @@ color: #333333;">查看</span>
...
@@ -68,7 +74,7 @@ color: #333333;">查看</span>
<!-- 2-- 文章信息的页面--文章内容 -->
<!-- 2-- 文章信息的页面--文章内容 -->
<div
class=
"base-msg"
style=
"padding-top: 32px; padding-bottom: 20px; padding-left: 1%;"
>
<div
class=
"base-msg"
style=
"padding-top: 32px; padding-bottom: 20px; padding-left: 1%;"
>
<el-row>
<el-row>
<div
v-html=
"form.articleContent"
></div
>
<div
v-html=
"form.articleContent"
/
>
</el-row>
</el-row>
</div>
</div>
</el-form>
</el-form>
...
@@ -84,13 +90,13 @@ color: #333333;">查看</span>
...
@@ -84,13 +90,13 @@ color: #333333;">查看</span>
</
template
>
</
template
>
<
script
>
<
script
>
//导入获取文章信息的接口
//
导入获取文章信息的接口
import
{
checkRole
}
from
'@/utils/permission'
import
{
checkRole
}
from
'@/utils/permission'
import
{
selectDictLabel
}
from
'@/utils/ruoyi'
import
{
selectDictLabel
}
from
'@/utils/ruoyi'
import
{
addArticle
,
getArticle
,
listArticle
,
updateArticle
}
from
'@/api/business/article'
import
{
addArticle
,
getArticle
,
updateArticle
}
from
'@/api/business/article'
export
default
{
export
default
{
name
:
'
article-e
dit'
,
name
:
'
ArticleE
dit'
,
// 数据字典
// 数据字典
dicts
:
[
'article_status'
],
dicts
:
[
'article_status'
],
...
@@ -112,7 +118,7 @@ export default {
...
@@ -112,7 +118,7 @@ export default {
open
:
false
,
open
:
false
,
// 状态位
// 状态位
value
:
true
,
value
:
true
,
// 表单参数
// 表单参数
form
:
{},
form
:
{},
// 表单校验
// 表单校验
rules
:
{
rules
:
{
...
@@ -187,7 +193,6 @@ export default {
...
@@ -187,7 +193,6 @@ export default {
.box-card
{
.box-card
{
}
}
//模块tip样式--绿色
//模块tip样式--绿色
.tip-green
{
.tip-green
{
height
:
30px
;
height
:
30px
;
...
@@ -222,7 +227,6 @@ export default {
...
@@ -222,7 +227,6 @@ export default {
//margin-left: 5%;
//margin-left: 5%;
}
}
//表格内容选中后的样式-all
//表格内容选中后的样式-all
::v-deep
.el-table--enable-row-hover
.el-table__body
tr
:hover
>
td
.el-table__cell
{
::v-deep
.el-table--enable-row-hover
.el-table__body
tr
:hover
>
td
.el-table__cell
{
background-color
:
#F6FCF5
!
important
;
background-color
:
#F6FCF5
!
important
;
...
...
src/views/article-management/article-edit.vue
View file @
823c64d2
...
@@ -4,15 +4,17 @@
...
@@ -4,15 +4,17 @@
<el-card
class=
"box-card"
>
<el-card
class=
"box-card"
>
<!-- 头部标题-->
<!-- 头部标题-->
<div
style=
"padding-top:32px;text-align: center;"
>
<div
style=
"padding-top:32px;text-align: center;"
>
<span
style=
"font-size: 24px;
<span
style=
"font-size: 24px;
font-family: Microsoft YaHei-Bold, Microsoft YaHei;
font-family: Microsoft YaHei-Bold, Microsoft YaHei;
font-weight: bold;
font-weight: bold;
color: #333333;"
>
编辑
</span>
color: #333333;"
>
编辑
</span>
</div>
</div>
<div
style=
"padding: 20px;"
>
<div
style=
"padding: 20px;"
>
<div
style=
"display: flex"
>
<div
style=
"display: flex"
>
<!-- 0-- 文章信息--标签头 -->
<!-- 0-- 文章信息--标签头 -->
<div
class=
"tip-green"
/>
<div
class=
"tip-green"
/>
<div
style=
"padding-top: 3px;padding-left: 18px; color: #666666; font-weight: 600; font-size: 17px;"
>
文章信息
<div
style=
"padding-top: 3px;padding-left: 18px; color: #666666; font-weight: 600; font-size: 17px;"
>
文章信息
</div>
</div>
</div>
</div>
...
@@ -21,32 +23,36 @@ color: #333333;">编辑</span>
...
@@ -21,32 +23,36 @@ color: #333333;">编辑</span>
<div
style=
"display:flex;"
>
<div
style=
"display:flex;"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"文章标题"
prop=
"articleTitle"
>
<el-form-item
label=
"文章标题"
prop=
"articleTitle"
>
<el-input
v-model=
"form.articleTitle"
placeholder=
"请输入文章标题"
/>
<el-input
v-model=
"form.articleTitle"
placeholder=
"请输入文章标题"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"权重"
prop=
"articleWeight"
>
<el-form-item
label=
"权重"
prop=
"articleWeight"
>
<el-input-number
v-model=
"form.articleWeight"
:max=
"9999"
:min=
"1"
controls-position=
"right"
<el-input-number
></el-input-number>
v-model=
"form.articleWeight"
:max=
"9999"
:min=
"1"
controls-position=
"right"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"文章封面"
prop=
"articleCover"
>
<el-form-item
label=
"文章封面"
prop=
"articleCover"
>
<image-upload
v-model=
"form.articleCover"
limit=
"1"
/>
<image-upload
v-model=
"form.articleCover"
limit=
"1"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"articleStatus"
>
<el-form-item
label=
"状态"
prop=
"articleStatus"
>
<div
style=
"display: flex;"
>
<div
style=
"display: flex;"
>
<div
style=
"padding-right: 15px;"
>
<div
style=
"padding-right: 15px;"
>
<el-switch
v-model=
"form.articleStatus"
<el-switch
v-model=
"form.articleStatus"
active-color=
"#13ce66"
active-color=
"#13ce66"
active-value=
"0"
active-value=
"0"
inactive-color=
"#ff4949"
inactive-color=
"#ff4949"
inactive-value=
"1"
inactive-value=
"1"
>
/>
</el-switch>
</div>
</div>
<div
v-if=
"form.articleStatus==='0'"
style=
"padding-top: 1px;"
>
已上架
</div>
<div
v-if=
"form.articleStatus==='0'"
style=
"padding-top: 1px;"
>
已上架
</div>
<div
v-else-if=
"form.articleStatus==='1'"
style=
"padding-top: 1px;"
>
已下架
</div>
<div
v-else-if=
"form.articleStatus==='1'"
style=
"padding-top: 1px;"
>
已下架
</div>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"文章内容"
>
<el-form-item
label=
"文章内容"
>
<editor
v-model=
"form.articleContent"
:min-height=
"192"
/>
<editor
v-model=
"form.articleContent"
:min-height=
"192"
/>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
...
@@ -62,13 +68,13 @@ color: #333333;">编辑</span>
...
@@ -62,13 +68,13 @@ color: #333333;">编辑</span>
</
template
>
</
template
>
<
script
>
<
script
>
//导入获取文章信息的接口
//
导入获取文章信息的接口
import
{
checkRole
}
from
'@/utils/permission'
import
{
checkRole
}
from
'@/utils/permission'
import
{
selectDictLabel
}
from
'@/utils/ruoyi'
import
{
selectDictLabel
}
from
'@/utils/ruoyi'
import
{
addArticle
,
getArticle
,
listArticle
,
updateArticle
}
from
'@/api/business/article'
import
{
addArticle
,
getArticle
,
updateArticle
}
from
'@/api/business/article'
export
default
{
export
default
{
name
:
'
article-e
dit'
,
name
:
'
ArticleE
dit'
,
// 数据字典
// 数据字典
dicts
:
[
'article_status'
],
dicts
:
[
'article_status'
],
...
@@ -87,7 +93,7 @@ export default {
...
@@ -87,7 +93,7 @@ export default {
open
:
false
,
open
:
false
,
// 状态位
// 状态位
value
:
true
,
value
:
true
,
// 表单参数
// 表单参数
form
:
{},
form
:
{},
// 表单校验
// 表单校验
rules
:
{
rules
:
{
...
@@ -163,7 +169,6 @@ export default {
...
@@ -163,7 +169,6 @@ export default {
margin
:
20px
20px
20px
20px
;
margin
:
20px
20px
20px
20px
;
}
}
//模块tip样式--绿色
//模块tip样式--绿色
.tip-green
{
.tip-green
{
height
:
30px
;
height
:
30px
;
...
@@ -198,7 +203,6 @@ export default {
...
@@ -198,7 +203,6 @@ export default {
margin-left
:
5%
;
margin-left
:
5%
;
}
}
//表格内容选中后的样式-all
//表格内容选中后的样式-all
::v-deep
.el-table--enable-row-hover
.el-table__body
tr
:hover
>
td
.el-table__cell
{
::v-deep
.el-table--enable-row-hover
.el-table__body
tr
:hover
>
td
.el-table__cell
{
background-color
:
#F6FCF5
!
important
;
background-color
:
#F6FCF5
!
important
;
...
...
src/views/article-management/article-insert.vue
View file @
823c64d2
...
@@ -4,15 +4,17 @@
...
@@ -4,15 +4,17 @@
<el-card
class=
"box-card"
>
<el-card
class=
"box-card"
>
<!-- 头部标题-->
<!-- 头部标题-->
<div
style=
"padding-top:32px;text-align: center;"
>
<div
style=
"padding-top:32px;text-align: center;"
>
<span
style=
"font-size: 24px;
<span
style=
"font-size: 24px;
font-family: Microsoft YaHei-Bold, Microsoft YaHei;
font-family: Microsoft YaHei-Bold, Microsoft YaHei;
font-weight: bold;
font-weight: bold;
color: #333333;"
>
新增
</span>
color: #333333;"
>
新增
</span>
</div>
</div>
<div
style=
"padding: 20px;"
>
<div
style=
"padding: 20px;"
>
<div
style=
"display: flex"
>
<div
style=
"display: flex"
>
<!-- 0-- 文章信息--标签头 -->
<!-- 0-- 文章信息--标签头 -->
<div
class=
"tip-green"
/>
<div
class=
"tip-green"
/>
<div
style=
"padding-top: 3px;padding-left: 18px; color: #666666; font-weight: 600; font-size: 17px;"
>
文章信息
<div
style=
"padding-top: 3px;padding-left: 18px; color: #666666; font-weight: 600; font-size: 17px;"
>
文章信息
</div>
</div>
</div>
</div>
...
@@ -21,31 +23,31 @@ color: #333333;">新增</span>
...
@@ -21,31 +23,31 @@ color: #333333;">新增</span>
<div
style=
"display:flex;"
>
<div
style=
"display:flex;"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"文章标题"
prop=
"articleTitle"
>
<el-form-item
label=
"文章标题"
prop=
"articleTitle"
>
<el-input
v-model=
"form.articleTitle"
maxlength=
"40"
show-word-limit
placeholder=
"请输入文章标题"
/>
<el-input
v-model=
"form.articleTitle"
maxlength=
"40"
show-word-limit
placeholder=
"请输入文章标题"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"权重"
prop=
"articleWeight"
>
<el-form-item
label=
"权重"
prop=
"articleWeight"
>
<el-input-number
v-model=
"form.articleWeight"
:min=
"1"
:max=
"9999"
controls-position=
"right"
></el-input-number
>
<el-input-number
v-model=
"form.articleWeight"
:min=
"1"
:max=
"9999"
controls-position=
"right"
/
>
</el-form-item>
</el-form-item>
<el-form-item
label=
"文章封面"
prop=
"articleCover"
>
<el-form-item
label=
"文章封面"
prop=
"articleCover"
>
<image-upload
v-model=
"form.articleCover"
limit=
"1"
/>
<image-upload
v-model=
"form.articleCover"
limit=
"1"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"articleStatus"
>
<el-form-item
label=
"状态"
prop=
"articleStatus"
>
<div
style=
"display: flex;"
>
<div
style=
"display: flex;"
>
<div
style=
"padding-right: 15px;"
>
<div
style=
"padding-right: 15px;"
>
<el-switch
v-model=
"form.articleStatus"
<el-switch
v-model=
"form.articleStatus"
active-color=
"#13ce66"
active-color=
"#13ce66"
active-value=
"0"
active-value=
"0"
inactive-color=
"#ff4949"
inactive-color=
"#ff4949"
inactive-value=
"1"
inactive-value=
"1"
>
/>
</el-switch>
</div>
</div>
<div
v-if=
"form.articleStatus==='0'"
style=
"padding-top: 1px;"
>
已上架
</div>
<div
v-if=
"form.articleStatus==='0'"
style=
"padding-top: 1px;"
>
已上架
</div>
<div
v-else-if=
"form.articleStatus==='1'"
style=
"padding-top: 1px;"
>
已下架
</div>
<div
v-else-if=
"form.articleStatus==='1'"
style=
"padding-top: 1px;"
>
已下架
</div>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"文章内容"
>
<el-form-item
label=
"文章内容"
>
<editor
v-model=
"form.articleContent"
:min-height=
"192"
/>
<editor
v-model=
"form.articleContent"
:min-height=
"192"
/>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
...
@@ -61,13 +63,12 @@ color: #333333;">新增</span>
...
@@ -61,13 +63,12 @@ color: #333333;">新增</span>
</
template
>
</
template
>
<
script
>
<
script
>
//导入获取文章信息的接口
// 导入获取文章信息的接口
import
{
checkRole
}
from
'@/utils/permission'
import
{
selectDictLabel
}
from
'@/utils/ruoyi'
import
{
selectDictLabel
}
from
'@/utils/ruoyi'
import
{
addArticle
,
getArticle
,
listArticle
,
updateArticle
}
from
'@/api/business/article'
import
{
addArticle
}
from
'@/api/business/article'
export
default
{
export
default
{
name
:
'
article-i
nsert'
,
name
:
'
ArticleI
nsert'
,
// 数据字典
// 数据字典
dicts
:
[
'article_status'
],
dicts
:
[
'article_status'
],
...
@@ -86,14 +87,14 @@ export default {
...
@@ -86,14 +87,14 @@ export default {
open
:
false
,
open
:
false
,
// 状态位
// 状态位
value
:
true
,
value
:
true
,
// 表单参数
// 表单参数
form
:
{
form
:
{
// 权重
// 权重
articleWeight
:
'0'
,
articleWeight
:
'0'
,
// 状态位
// 状态位
articleStatus
:
'0'
,
articleStatus
:
'0'
,
// 创建时间
// 创建时间
articleCreateTime
:
''
articleCreateTime
:
''
},
},
// 表单校验
// 表单校验
rules
:
{
rules
:
{
...
@@ -107,7 +108,7 @@ export default {
...
@@ -107,7 +108,7 @@ export default {
this
.
addDate
()
this
.
addDate
()
},
},
methods
:
{
methods
:
{
//获取当前年月日
//
获取当前年月日
addDate
()
{
addDate
()
{
const
nowDate
=
new
Date
()
const
nowDate
=
new
Date
()
const
date
=
{
const
date
=
{
...
@@ -118,7 +119,6 @@ export default {
...
@@ -118,7 +119,6 @@ export default {
const
newmonth
=
date
.
month
>
10
?
date
.
month
:
'0'
+
date
.
month
const
newmonth
=
date
.
month
>
10
?
date
.
month
:
'0'
+
date
.
month
const
day
=
date
.
date
>
10
?
date
.
date
:
'0'
+
date
.
date
const
day
=
date
.
date
>
10
?
date
.
date
:
'0'
+
date
.
date
this
.
form
.
articleCreateTime
=
date
.
year
+
'-'
+
newmonth
+
'-'
+
day
this
.
form
.
articleCreateTime
=
date
.
year
+
'-'
+
newmonth
+
'-'
+
day
},
},
/** 提交按钮 */
/** 提交按钮 */
submitForm
()
{
submitForm
()
{
...
@@ -149,7 +149,6 @@ export default {
...
@@ -149,7 +149,6 @@ export default {
margin
:
20px
20px
20px
20px
;
margin
:
20px
20px
20px
20px
;
}
}
//模块tip样式--绿色
//模块tip样式--绿色
.tip-green
{
.tip-green
{
height
:
30px
;
height
:
30px
;
...
@@ -184,7 +183,6 @@ export default {
...
@@ -184,7 +183,6 @@ export default {
margin-left
:
5%
;
margin-left
:
5%
;
}
}
//表格内容选中后的样式-all
//表格内容选中后的样式-all
::v-deep
.el-table--enable-row-hover
.el-table__body
tr
:hover
>
td
.el-table__cell
{
::v-deep
.el-table--enable-row-hover
.el-table__body
tr
:hover
>
td
.el-table__cell
{
background-color
:
#F6FCF5
!
important
;
background-color
:
#F6FCF5
!
important
;
...
...
src/views/article-management/article-management.vue
View file @
823c64d2
This diff is collapsed.
Click to expand it.
src/views/login.vue
View file @
823c64d2
...
@@ -3,15 +3,15 @@
...
@@ -3,15 +3,15 @@
<el-form
ref=
"loginForm"
:model=
"loginForm"
:rules=
"loginRules"
class=
"login-form"
>
<el-form
ref=
"loginForm"
:model=
"loginForm"
:rules=
"loginRules"
class=
"login-form"
>
<el-row>
<el-row>
<el-col
:span=
"12"
class=
"left-login"
>
<el-col
:span=
"12"
class=
"left-login"
>
<img
class=
"logo-login"
src=
"../assets/images/logo1.png"
/
>
<img
class=
"logo-login"
src=
"../assets/images/logo1.png"
>
<div
class=
"chinese-title"
>
萌宠医院信息管理系统
</div>
<div
class=
"chinese-title"
>
萌宠医院信息管理系统
</div>
<span
class=
"english-title"
>
Pet Hospital Information Management System
</span>
<span
class=
"english-title"
>
Pet Hospital Information Management System
</span>
<img
class=
"picture-login"
src=
"../assets/images/pic1.png"
/
>
<img
class=
"picture-login"
src=
"../assets/images/pic1.png"
>
</el-col>
</el-col>
<el-col
:span=
"12"
class=
"right-login"
>
<el-col
:span=
"12"
class=
"right-login"
>
<div
class=
"right-layout"
>
<div
class=
"right-layout"
>
<div
class=
"top"
>
<div
class=
"top"
>
<img
class=
"question-mark"
src=
"../assets/images/shuoming.png"
/
>
登录说明
<img
class=
"question-mark"
src=
"../assets/images/shuoming.png"
>
登录说明
</div>
</div>
<h3
class=
"title"
>
用户登录 User Login
</h3>
<h3
class=
"title"
>
用户登录 User Login
</h3>
<div
class=
"welcome"
>
欢迎来到萌宠医院信息管理系统平台,请登录您的账号!
</div>
<div
class=
"welcome"
>
欢迎来到萌宠医院信息管理系统平台,请登录您的账号!
</div>
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
</el-input>
</el-input>
</el-form-item>
</el-form-item>
<div
class=
"input-prompt"
>
验证码
</div>
<div
class=
"input-prompt"
>
验证码
</div>
<el-form-item
prop=
"code"
v-if=
"captchaEnabled
"
>
<el-form-item
v-if=
"captchaEnabled"
prop=
"code
"
>
<el-input
<el-input
v-model=
"loginForm.code"
v-model=
"loginForm.code"
auto-complete=
"off"
auto-complete=
"off"
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
<svg-icon
slot=
"prefix"
icon-class=
"validCode"
class=
"el-input__icon input-icon"
/>
<svg-icon
slot=
"prefix"
icon-class=
"validCode"
class=
"el-input__icon input-icon"
/>
</el-input>
</el-input>
<div
class=
"login-code"
>
<div
class=
"login-code"
>
<img
:src=
"codeUrl"
@
click=
"getCode"
class=
"login-code-img"
/
>
<img
:src=
"codeUrl"
class=
"login-code-img"
@
click=
"getCode"
>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
style=
"width:100%;"
>
<el-form-item
style=
"width:100%;"
>
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
</el-button>
</el-button>
<el-checkbox
v-model=
"loginForm.rememberMe"
style=
"margin:0px 0px 25px 0px;"
>
记住密码
</el-checkbox>
<el-checkbox
v-model=
"loginForm.rememberMe"
style=
"margin:0px 0px 25px 0px;"
>
记住密码
</el-checkbox>
<el-button
style=
"position: absolute; right: 40px"
type=
"text"
>
忘记密码
</el-button>
<el-button
style=
"position: absolute; right: 40px"
type=
"text"
>
忘记密码
</el-button>
<div
style=
"float: right;"
v-if=
"register
"
>
<div
v-if=
"register"
style=
"float: right;
"
>
<router-link
class=
"link-type"
:to=
"'/register'"
>
立即注册
</router-link>
<router-link
class=
"link-type"
:to=
"'/register'"
>
立即注册
</router-link>
</div>
</div>
</el-form-item>
</el-form-item>
...
@@ -83,30 +83,30 @@
...
@@ -83,30 +83,30 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getCodeImg
}
from
"@/api/login"
;
import
{
getCodeImg
}
from
'@/api/login'
import
Cookies
from
"js-cookie"
;
import
Cookies
from
'js-cookie'
import
{
encrypt
,
decrypt
}
from
'@/utils/jsencrypt'
import
{
encrypt
,
decrypt
}
from
'@/utils/jsencrypt'
export
default
{
export
default
{
name
:
"Login"
,
name
:
'Login'
,
data
()
{
data
()
{
return
{
return
{
codeUrl
:
""
,
codeUrl
:
''
,
loginForm
:
{
loginForm
:
{
username
:
"admin"
,
username
:
'admin'
,
password
:
"admin123"
,
password
:
'admin123'
,
rememberMe
:
false
,
rememberMe
:
false
,
code
:
""
,
code
:
''
,
uuid
:
""
uuid
:
''
},
},
loginRules
:
{
loginRules
:
{
username
:
[
username
:
[
{
required
:
true
,
trigger
:
"blur"
,
message
:
"请输入您的账号"
}
{
required
:
true
,
trigger
:
'blur'
,
message
:
'请输入您的账号'
}
],
],
password
:
[
password
:
[
{
required
:
true
,
trigger
:
"blur"
,
message
:
"请输入您的密码"
}
{
required
:
true
,
trigger
:
'blur'
,
message
:
'请输入您的密码'
}
],
],
code
:
[{
required
:
true
,
trigger
:
"change"
,
message
:
"请输入验证码"
}]
code
:
[{
required
:
true
,
trigger
:
'change'
,
message
:
'请输入验证码'
}]
},
},
loading
:
false
,
loading
:
false
,
// 验证码开关
// 验证码开关
...
@@ -114,66 +114,66 @@ export default {
...
@@ -114,66 +114,66 @@ export default {
// 注册开关
// 注册开关
register
:
false
,
register
:
false
,
redirect
:
undefined
redirect
:
undefined
}
;
}
},
},
watch
:
{
watch
:
{
$route
:
{
$route
:
{
handler
:
function
(
route
)
{
handler
:
function
(
route
)
{
this
.
redirect
=
route
.
query
&&
route
.
query
.
redirect
;
this
.
redirect
=
route
.
query
&&
route
.
query
.
redirect
},
},
immediate
:
true
immediate
:
true
}
}
},
},
created
()
{
created
()
{
this
.
getCode
()
;
this
.
getCode
()
this
.
getCookie
()
;
this
.
getCookie
()
},
},
methods
:
{
methods
:
{
getCode
()
{
getCode
()
{
getCodeImg
().
then
(
res
=>
{
getCodeImg
().
then
(
res
=>
{
this
.
captchaEnabled
=
res
.
captchaEnabled
===
undefined
?
true
:
res
.
captchaEnabled
;
this
.
captchaEnabled
=
res
.
captchaEnabled
===
undefined
?
true
:
res
.
captchaEnabled
if
(
this
.
captchaEnabled
)
{
if
(
this
.
captchaEnabled
)
{
this
.
codeUrl
=
"data:image/gif;base64,"
+
res
.
img
;
this
.
codeUrl
=
'data:image/gif;base64,'
+
res
.
img
this
.
loginForm
.
uuid
=
res
.
uuid
;
this
.
loginForm
.
uuid
=
res
.
uuid
}
}
})
;
})
},
},
getCookie
()
{
getCookie
()
{
const
username
=
Cookies
.
get
(
"username"
);
const
username
=
Cookies
.
get
(
'username'
)
const
password
=
Cookies
.
get
(
"password"
);
const
password
=
Cookies
.
get
(
'password'
)
const
rememberMe
=
Cookies
.
get
(
'rememberMe'
)
const
rememberMe
=
Cookies
.
get
(
'rememberMe'
)
this
.
loginForm
=
{
this
.
loginForm
=
{
username
:
username
===
undefined
?
this
.
loginForm
.
username
:
username
,
username
:
username
===
undefined
?
this
.
loginForm
.
username
:
username
,
password
:
password
===
undefined
?
this
.
loginForm
.
password
:
decrypt
(
password
),
password
:
password
===
undefined
?
this
.
loginForm
.
password
:
decrypt
(
password
),
rememberMe
:
rememberMe
===
undefined
?
false
:
Boolean
(
rememberMe
)
rememberMe
:
rememberMe
===
undefined
?
false
:
Boolean
(
rememberMe
)
}
;
}
},
},
handleLogin
()
{
handleLogin
()
{
this
.
$refs
.
loginForm
.
validate
(
valid
=>
{
this
.
$refs
.
loginForm
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
this
.
loading
=
true
;
this
.
loading
=
true
if
(
this
.
loginForm
.
rememberMe
)
{
if
(
this
.
loginForm
.
rememberMe
)
{
Cookies
.
set
(
"username"
,
this
.
loginForm
.
username
,
{
expires
:
30
});
Cookies
.
set
(
'username'
,
this
.
loginForm
.
username
,
{
expires
:
30
})
Cookies
.
set
(
"password"
,
encrypt
(
this
.
loginForm
.
password
),
{
expires
:
30
});
Cookies
.
set
(
'password'
,
encrypt
(
this
.
loginForm
.
password
),
{
expires
:
30
})
Cookies
.
set
(
'rememberMe'
,
this
.
loginForm
.
rememberMe
,
{
expires
:
30
})
;
Cookies
.
set
(
'rememberMe'
,
this
.
loginForm
.
rememberMe
,
{
expires
:
30
})
}
else
{
}
else
{
Cookies
.
remove
(
"username"
);
Cookies
.
remove
(
'username'
)
Cookies
.
remove
(
"password"
);
Cookies
.
remove
(
'password'
)
Cookies
.
remove
(
'rememberMe'
)
;
Cookies
.
remove
(
'rememberMe'
)
}
}
this
.
$store
.
dispatch
(
"Login"
,
this
.
loginForm
).
then
(()
=>
{
this
.
$store
.
dispatch
(
'Login'
,
this
.
loginForm
).
then
(()
=>
{
this
.
$router
.
push
({
path
:
this
.
redirect
||
"/"
}).
catch
(()
=>
{});
this
.
$router
.
push
({
path
:
this
.
redirect
||
'/'
}).
catch
(()
=>
{})
}).
catch
(()
=>
{
}).
catch
(()
=>
{
this
.
loading
=
false
;
this
.
loading
=
false
if
(
this
.
captchaEnabled
)
{
if
(
this
.
captchaEnabled
)
{
this
.
getCode
()
;
this
.
getCode
()
}
}
})
;
})
}
}
})
;
})
}
}
}
}
}
;
}
</
script
>
</
script
>
<
style
>
<
style
>
...
...
src/views/tool/gen/index.vue
View file @
823c64d2
This diff is collapsed.
Click to expand it.
vue.config.js
View file @
823c64d2
...
@@ -33,13 +33,13 @@ module.exports = {
...
@@ -33,13 +33,13 @@ module.exports = {
}
}
}
}
// vue.config.js 配置说明
// vue.config.js 配置说明
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
//
官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
// 这里只列一部分,具体配置参考文档
// 这里只列一部分,具体配置参考文档
module
.
exports
=
{
module
.
exports
=
{
// 部署生产环境和开发环境下的URL。
// 部署生产环境和开发环境下的URL。
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
publicPath
:
process
.
env
.
NODE_ENV
===
"production"
?
"/"
:
"/"
,
publicPath
:
process
.
env
.
NODE_ENV
===
'production'
?
'/'
:
'/'
,
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
outputDir
:
'dist'
,
outputDir
:
'dist'
,
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
...
@@ -64,12 +64,13 @@ module.exports = {
...
@@ -64,12 +64,13 @@ module.exports = {
port
:
port
,
port
:
port
,
open
:
true
,
open
:
true
,
headers
:
{
headers
:
{
'Access-Control-Allow-Origin'
:
'*'
,
'Access-Control-Allow-Origin'
:
'*'
},
},
proxy
:
{
proxy
:
{
// detail: https://cli.vuejs.org/config/#devserver-proxy
// detail: https://cli.vuejs.org/config/#devserver-proxy
[
process
.
env
.
VUE_APP_BASE_API
]:
{
[
process
.
env
.
VUE_APP_BASE_API
]:
{
target
:
`http://localhost:8091`
,
// target: `http://localhost:8091`,
target
:
`http://114.67.241.140:8091`
,
changeOrigin
:
true
,
changeOrigin
:
true
,
pathRewrite
:
{
pathRewrite
:
{
[
'^'
+
process
.
env
.
VUE_APP_BASE_API
]:
''
[
'^'
+
process
.
env
.
VUE_APP_BASE_API
]:
''
...
@@ -90,7 +91,7 @@ module.exports = {
...
@@ -90,7 +91,7 @@ module.exports = {
output
:
{
output
:
{
library
:
'pet-business-web'
,
library
:
'pet-business-web'
,
libraryTarget
:
'umd'
,
// 把微应用打包成 umd 库格式
libraryTarget
:
'umd'
,
// 把微应用打包成 umd 库格式
jsonpFunction
:
`webpackJsonp_pet-business-web`
,
jsonpFunction
:
`webpackJsonp_pet-business-web`
},
},
resolve
:
{
resolve
:
{
alias
:
{
alias
:
{
...
@@ -106,7 +107,7 @@ module.exports = {
...
@@ -106,7 +107,7 @@ module.exports = {
algorithm
:
'gzip'
,
// 使用gzip压缩
algorithm
:
'gzip'
,
// 使用gzip压缩
minRatio
:
0.8
// 压缩率小于1才会压缩
minRatio
:
0.8
// 压缩率小于1才会压缩
})
})
]
,
]
},
},
chainWebpack
(
config
)
{
chainWebpack
(
config
)
{
config
.
plugins
.
delete
(
'preload'
)
// TODO: need test
config
.
plugins
.
delete
(
'preload'
)
// TODO: need test
...
@@ -166,8 +167,8 @@ module.exports = {
...
@@ -166,8 +167,8 @@ module.exports = {
})
})
config
.
optimization
.
runtimeChunk
(
'single'
),
config
.
optimization
.
runtimeChunk
(
'single'
),
{
{
from
:
path
.
resolve
(
__dirname
,
'./public/robots.txt'
),
//
防爬虫文件
from
:
path
.
resolve
(
__dirname
,
'./public/robots.txt'
),
//
防爬虫文件
to
:
'./'
//
到根目录下
to
:
'./'
//
到根目录下
}
}
}
}
)
)
...
...
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