Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
罗超
SuperMan
Commits
d6b3b4f6
Commit
d6b3b4f6
authored
Jun 28, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增页面
parent
091e64c5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
221 additions
and
0 deletions
+221
-0
WebSiteService.vue
src/components/WebSet/WebSiteService.vue
+213
-0
config.js
src/router/config.js
+8
-0
No files found.
src/components/WebSet/WebSiteService.vue
0 → 100644
View file @
d6b3b4f6
<
style
>
.WebSiteService
.el-button.is-circle
{
padding
:
6px
;
}
.WebSiteService
.preview
{
color
:
#409eff
;
text-decoration
:
underline
}
</
style
>
<
template
>
<!--服务管理-->
<div
class=
"WebSiteService"
>
<div
class=
"query-box"
>
<ul>
<li>
<label>
名称
</label>
<el-input
v-model=
"msg.Name"
:placeholder=
"$t('system.ph_in')"
@
keyup
.
native
.
enter=
"getData"
class=
"w210"
>
</el-input>
</li>
<li>
<input
type=
"button"
class=
"hollowFixedBtn"
:value=
"$t('pub.searchBtn')"
@
click=
"resetPageIndex(),getData()"
/>
<input
type=
"button"
class=
"normalBtn"
@
click=
"outerVisible=true,clearMsg()"
value=
"添加服务"
/>
</li>
</ul>
</div>
<div>
<el-table
:data=
"dataList"
style=
"width: 100%"
v-loading=
"loading"
:default-sort=
"
{prop: 'date', order: 'descending'}">
<el-table-column
prop=
"Name"
label=
"名称"
sortable
>
</el-table-column>
<el-table-column
prop=
"Mobile"
label=
"聯絡電話"
sortable
>
</el-table-column>
<el-table-column
prop=
"EMail"
label=
"聯絡E-Mail"
sortable
>
</el-table-column>
<el-table-column
prop=
"Remarks"
label=
"備註"
sortable
>
</el-table-column>
<el-table-column
label=
"操作"
>
<template
slot-scope=
"scope"
>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"$t('system.table_edit')"
placement=
"top-start"
>
<el-button
type=
"primary"
icon=
"el-icon-edit"
circle
@
click=
"outerVisible = true,updateData(scope.row)"
>
</el-button>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"$t('system.table_delete')"
placement=
"top-start"
>
<el-button
type=
"danger"
icon=
"el-icon-delete"
circle
@
click=
"deleteData(scope.row)"
></el-button>
</el-tooltip>
</
template
>
</el-table-column>
</el-table>
<el-pagination
background
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"currentPage"
layout=
"total,prev, pager, next, jumper"
:page-size=
'msg.pageSize'
:total=
total
>
</el-pagination>
</div>
<el-dialog
title=
"服务管理"
:visible
.
sync=
"outerVisible"
center
width=
"500px"
>
<el-form
:model=
"addMsg"
ref=
"addMsg"
label-width=
"120px"
>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"名称"
>
<el-input
type=
"text"
v-model=
"addMsg.Name"
maxlength=
"50"
placeholder=
"名称"
>
</el-input>
</el-form-item>
<el-form-item
label=
"聯絡電話"
>
<el-input
type=
"text"
v-model=
"addMsg.Mobile"
maxlength=
"50"
placeholder=
"聯絡電話"
>
</el-input>
</el-form-item>
<el-form-item
label=
"聯絡E-Mail"
>
<el-input
type=
"text"
v-model=
"addMsg.EMail"
maxlength=
"50"
placeholder=
"聯絡E-Mail"
>
</el-input>
</el-form-item>
<el-form-item
label=
"備註"
>
<el-input
type=
"textarea"
:autosize=
"{ minRows: 10}"
placeholder=
"備註"
v-model=
"addMsg.Remarks"
>
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<button
class=
"normalBtn"
type=
"primary"
@
click=
"submitForm('addMsg')"
>
{{$t('pub.saveBtn')}}
</button>
<button
class=
"hollowFixedBtn"
@
click=
"outerVisible = false"
>
{{$t('pub.cancelBtn')}}
</button>
</div>
</el-dialog>
</div>
</template>
<
script
>
export
default
{
data
()
{
return
{
loading
:
false
,
msg
:
{
Name
:
''
,
//名称
pageSize
:
15
,
pageIndex
:
1
,
},
total
:
0
,
currentPage
:
1
,
//弹窗
outerVisible
:
false
,
dataList
:
[],
addMsg
:
{
Id
:
0
,
//编号
Name
:
''
,
//名称
Mobile
:
''
,
//电话
EMail
:
''
,
//邮箱
Remarks
:
""
//备注
},
}
},
mounted
()
{
this
.
getData
();
},
methods
:
{
//获取配置
getData
()
{
//获取现有线路列表
this
.
loading
=
true
;
this
.
apipost
(
"ws_get_GetServicePageList"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
dataList
=
res
.
data
.
data
.
pageData
;
this
.
total
=
res
.
data
.
data
.
count
}
else
{
this
.
loading
=
false
;
}
},
err
=>
{}
);
},
handleCurrentChange
(
val
)
{
//翻页功能按钮
this
.
msg
.
pageIndex
=
val
;
this
.
getData
();
},
resetPageIndex
()
{
//查询初始化页码
this
.
msg
.
pageIndex
=
1
;
this
.
currentPage
=
1
;
},
//修改
updateData
(
item
)
{
this
.
apipost
(
"ws_get_GetService"
,
{
Id
:
item
.
Id
,
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
var
tempData
=
res
.
data
.
data
;
this
.
addMsg
.
Id
=
tempData
.
Id
;
this
.
addMsg
.
Name
=
tempData
.
Name
;
this
.
addMsg
.
Mobile
=
tempData
.
Mobile
;
this
.
addMsg
.
EMail
=
tempData
.
EMail
;
this
.
addMsg
.
Remarks
=
tempData
.
Remarks
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{}
);
},
//删除
deleteData
(
item
)
{
var
that
=
this
;
that
.
Confirm
(
"是否删除?"
,
function
()
{
that
.
apipost
(
"ws_post_RemoveService"
,
{
Id
:
item
.
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
Success
(
res
.
data
.
message
);
that
.
getData
();
}
else
{
that
.
Error
(
res
.
data
.
message
);
}
},
null
);
});
},
//清空数据
clearMsg
()
{
this
.
addMsg
.
Id
=
0
;
this
.
addMsg
.
Name
=
""
;
this
.
addMsg
.
Mobile
=
""
;
this
.
addMsg
.
EMail
=
""
;
this
.
addMsg
.
Remarks
=
""
;
},
//新增、修改广告
submitForm
(
addMsg
)
{
this
.
apipost
(
"ws_post_SetService"
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
getData
();
this
.
clearMsg
();
this
.
Success
(
res
.
data
.
message
);
this
.
outerVisible
=
false
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{}
);
}
}
}
</
script
>
src/router/config.js
View file @
d6b3b4f6
...
...
@@ -4545,6 +4545,14 @@ export default {
title
:
'搜索管理'
},
},
{
path
:
'/WebSiteService'
,
//前台网站搜索管理【服务信息】
name
:
'WebSiteService'
,
component
:
resolve
=>
require
([
'@/components/WebSet/WebSiteService'
],
resolve
),
meta
:
{
title
:
'服务信息'
},
},
{
path
:
'/WebSiteAbout'
,
//前台网站关于我们【自定义前端网站】
name
:
'WebSiteAbout'
,
...
...
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