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
6e968c68
Commit
6e968c68
authored
Jun 15, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
网站配置修改
parent
43c7903c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
272 additions
and
49 deletions
+272
-49
WebSiteConfig.vue
src/components/WebSet/WebSiteConfig.vue
+272
-49
No files found.
src/components/WebSet/WebSiteConfig.vue
View file @
6e968c68
...
...
@@ -330,7 +330,7 @@
<div
class=
"WebSite_Header"
>
網站選單設定
<div
class=
"Web_BtnDiv"
>
<el-button
type=
"primary"
size=
"small"
>
新增選單
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"OpType=1,OperateDialog(-1)"
>
新增選單
</el-button>
</div>
</div>
<div
class=
"WebSite_body"
>
...
...
@@ -343,8 +343,8 @@
<a
class=
"WebNav_link"
:href=
"headItem.NavUrl"
>
{{
headItem
.
NavTitle
}}
</a>
</span>
<div
class=
"WebSite_tools"
>
<i
class=
"iconfont icon-xiugai"
></i>
<i
class=
"iconfont icon-guanbi del-btn"
></i>
<i
class=
"iconfont icon-xiugai"
@
click=
"OpType=1,OperateDialog(headIndex)"
></i>
<i
class=
"iconfont icon-guanbi del-btn"
@
click=
"OpType=1,DeleteItem(headItem,headIndex)"
></i>
</div>
</li>
</ul>
...
...
@@ -356,21 +356,21 @@
<div
class=
"WebSite_Header"
>
刊尾選單設定
<div
class=
"Web_BtnDiv"
>
<el-button
type=
"primary"
size=
"small"
>
新增選單
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"OpType=2,OperateDialog(-1)"
>
新增選單
</el-button>
</div>
</div>
<div
class=
"WebSite_body"
>
<ul
class=
"todo-list"
>
<li
v-for=
"(
bottomItem,bottomIndex) in PostMsg.BottomNavList"
:key=
"bottom
Index"
>
<li
v-for=
"(
footItem,footIndex) in PostMsg.FooterNavList"
:key=
"foot
Index"
>
<span
class=
"handle"
>
<i
class=
"iconfont icon-diandiandian"
></i>
</span>
<span
class=
"WebSite_text"
>
<a
class=
"WebNav_link"
:href=
"
bottomItem.NavUrl"
>
{{
bottom
Item
.
NavTitle
}}
</a>
<a
class=
"WebNav_link"
:href=
"
footItem.NavUrl"
>
{{
foot
Item
.
NavTitle
}}
</a>
</span>
<div
class=
"WebSite_tools"
>
<i
class=
"iconfont icon-xiugai"
></i>
<i
class=
"iconfont icon-guanbi del-btn"
></i>
<i
class=
"iconfont icon-xiugai"
@
click=
"OpType=2,OperateDialog(footIndex)"
></i>
<i
class=
"iconfont icon-guanbi del-btn"
@
click=
"OpType=2,DeleteItem(footItem,footIndex)"
></i>
</div>
</li>
</ul>
...
...
@@ -383,21 +383,21 @@
<div>
刊尾小圖設定
</div>
<div
style=
"font-size:12px;"
>
(圖片尺寸:40x40或60x40(前台顯示高度40px)
</div>
<div
class=
"Web_BtnDiv"
>
<el-button
type=
"primary"
size=
"small"
>
新增選單
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"OpType=3,OperateDialog(-1)"
>
新增選單
</el-button>
</div>
</div>
<div
class=
"WebSite_body"
>
<ul
class=
"todo-list"
>
<li
v-for=
"(
footItem,footIndex) in PostMsg.FooterNavList"
:key=
"foot
Index"
>
<li
v-for=
"(
bottomItem,bottomIndex) in PostMsg.BottomNavList"
:key=
"bottom
Index"
>
<span
class=
"handle"
>
<i
class=
"iconfont icon-diandiandian"
></i>
</span>
<span
class=
"WebSite_text"
>
<a
class=
"WebNav_link"
:href=
"
footItem.NavUrl"
>
{{
foot
Item
.
NavTitle
}}
</a>
<a
class=
"WebNav_link"
:href=
"
bottomItem.NavUrl"
>
{{
bottom
Item
.
NavTitle
}}
</a>
</span>
<div
class=
"WebSite_tools"
>
<i
class=
"iconfont icon-xiugai"
></i>
<i
class=
"iconfont icon-guanbi del-btn"
></i>
<i
class=
"iconfont icon-xiugai"
@
click=
"OpType=3,OperateDialog(bottomIndex)"
></i>
<i
class=
"iconfont icon-guanbi del-btn"
@
click=
"OpType=3,DeleteItem(bottomItem,bottomIndex)"
></i>
</div>
</li>
</ul>
...
...
@@ -409,7 +409,7 @@
<div
class=
"WebSite_Header"
>
<div>
分公司資訊設定
</div>
<div
class=
"Web_BtnDiv"
>
<el-button
type=
"primary"
size=
"small"
>
新增選單
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"OpType=4,OperateDialog(-1)"
>
新增選單
</el-button>
</div>
</div>
<div
class=
"WebSite_body"
>
...
...
@@ -422,8 +422,8 @@
<a
class=
"WebNav_link"
>
{{
branchItem
.
BName
}}
</a>
</span>
<div
class=
"WebSite_tools"
>
<i
class=
"iconfont icon-xiugai"
></i>
<i
class=
"iconfont icon-guanbi del-btn"
></i>
<i
class=
"iconfont icon-xiugai"
@
click=
"OpType=4,OperateDialog(branchIndex)"
></i>
<i
class=
"iconfont icon-guanbi del-btn"
@
click=
"OpType=4,DeleteItem(branchItem,branchIndex)"
></i>
</div>
</li>
</ul>
...
...
@@ -435,7 +435,7 @@
<div
class=
"WebSite_Header"
>
表單簽核職位設定
<div
class=
"Web_BtnDiv"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"
isShowDialog=true
"
>
新增選單
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"
OpType=5,OperateDialog(-1)
"
>
新增選單
</el-button>
</div>
</div>
<div
class=
"WebSite_body"
>
...
...
@@ -448,8 +448,9 @@
<a
class=
"WebNav_link"
>
{{
positionItem
.
Name
}}
</a>
</span>
<div
class=
"WebSite_tools"
>
<i
class=
"iconfont icon-xiugai"
></i>
<i
class=
"iconfont icon-guanbi del-btn"
></i>
<i
class=
"iconfont icon-xiugai"
@
click=
"OpType=5,OperateDialog(positionIndex)"
></i>
<i
class=
"iconfont icon-guanbi del-btn"
@
click=
"OpType=5,DeleteItem(positionItem,positionIndex)"
></i>
</div>
</li>
</ul>
...
...
@@ -457,91 +458,97 @@
</div>
</el-col>
<el-col
:span=
"24"
style=
"text-align:right;padding-right:8%;margin-top:50px;"
>
<el-button
type=
"primary"
size=
"small"
>
儲存修改
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"saveData()"
>
儲存修改
</el-button>
</el-col>
</el-tab-pane>
</el-tabs>
</el-form>
<el-dialog
title=
"編輯選單
"
:visible
.
sync=
"isShowDialog"
width=
"500px"
>
<el-dialog
:title=
"editTitle
"
:visible
.
sync=
"isShowDialog"
width=
"500px"
>
<el-form
label-width=
"100px"
>
<!-- 第一个 -->
<template>
<template
v-if=
"OpType==1"
>
<el-form-item
label=
"顯示文字"
>
<el-input></el-input>
<el-input
v-model=
"MenuObj.NavTitle"
maxlength=
"50"
></el-input>
</el-form-item>
<el-form-item
label=
"連結"
>
<el-input></el-input>
<el-input
v-model=
"MenuObj.NavUrl"
maxlength=
"50"
></el-input>
</el-form-item>
<el-form-item
label=
"連結"
>
<el-select
style=
"width:100%"
>
<el-select
style=
"width:100%"
v-model=
"MenuObj.IsNewOpen"
>
<el-option
label=
"是"
:value=
"1"
:key=
"1"
></el-option>
<el-option
label=
"否"
:value=
"0"
:key=
"0"
></el-option>
</el-select>
</el-form-item>
</
template
>
<!-- 第二个 -->
<
template
>
<
template
v-if=
"OpType==2"
>
<el-form-item
label=
"顯示項目"
>
<el-select
style=
"width:100%"
>
<el-option
label=
"首页"
:value=
"1"
:key=
"1"
></el-option>
<el-select
style=
"width:100%"
v-model=
"MenuObj.MenuId"
@
change=
"changeMenu(1)"
>
<el-option
label=
"请选择"
:value=
"0"
:key=
"0"
></el-option>
<el-option
v-for=
"(homeItem,homeIndex) in HomePageList"
:key=
"homeIndex+1"
:label=
"homeItem.NavTitle"
:value=
"homeItem.Id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"開新分頁"
>
<el-select
style=
"width:100%"
>
<el-select
style=
"width:100%"
v-model=
"MenuObj.IsNewOpen"
>
<el-option
label=
"是"
:value=
"1"
:key=
"1"
></el-option>
<el-option
label=
"否"
:value=
"0"
:key=
"0"
></el-option>
</el-select>
</el-form-item>
</
template
>
<!-- 第三个 -->
<
template
>
<
template
v-if=
"OpType==3"
>
<el-form-item
label=
"顯示項目"
>
<el-select
style=
"width:100%"
>
<el-option
label=
"國際航空運輸協會"
:value=
"1"
:key=
"1"
></el-option>
<el-select
style=
"width:100%"
v-model=
"MenuObj.MenuId"
@
change=
"changeMenu(2)"
>
<el-option
label=
"请选择"
:value=
"0"
:key=
"0"
></el-option>
<el-option
v-for=
"(homeItem,homeIndex) in BottomTagPageList"
:key=
"homeIndex+1"
:label=
"homeItem.NavTitle"
:value=
"homeItem.Id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"連結"
>
<el-input></el-input>
<el-input
v-model=
"MenuObj.NavUrl"
maxlength=
"50"
></el-input>
</el-form-item>
<el-form-item
label=
"預覽圖片"
>
<img
src=
"http://manage.tripsaas.com/protected/img/white_label_front/logos/certifi_tata.png"
alt=
""
style=
"height:80px;"
>
<img
:src=
"MenuObj.Icon"
alt=
""
style=
"height:80px;"
>
</el-form-item>
</
template
>
<!-- 第四个 -->
<
template
>
<
template
v-if=
"OpType==4"
>
<el-form-item
label=
"公司名稱"
>
<el-input></el-input>
<el-input
v-model=
"BranchObj.BName"
></el-input>
</el-form-item>
<el-form-item
label=
"電話"
>
<el-input
>
</el-input>
<el-input
v-model=
"BranchObj.BTel"
>
</el-input>
</el-form-item>
<el-form-item
label=
"地址"
>
<el-input></el-input>
<el-input
v-model=
"BranchObj.BAddress"
></el-input>
</el-form-item>
<el-form-item
label=
"傳真"
>
<el-input></el-input>
<el-input
v-model=
"BranchObj.BFax"
></el-input>
</el-form-item>
<el-form-item
label=
"旅行社類型"
>
<el-input></el-input>
<el-select
v-model=
"BranchObj.BType"
style=
"width:100%"
>
<el-option
v-for=
"item in travelAgencyType"
:label=
"item.Name"
:value=
"item.Id"
:key=
"item.Id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"協會證號"
>
<el-input></el-input>
<el-input
v-model=
"BranchObj.BXieHuiCode"
></el-input>
</el-form-item>
<el-form-item
label=
"統一編號"
>
<el-input></el-input>
<el-input
v-model=
"BranchObj.BUnifyCode"
></el-input>
</el-form-item>
</
template
>
<!-- 第五个 -->
<
template
>
<
template
v-if=
"OpType==5"
>
<el-form-item
label=
"職位名稱"
>
<el-input></el-input>
<el-input
v-model=
"PositionObj.Name"
></el-input>
</el-form-item>
</
template
>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"isShowDialog = false"
size=
"small"
>
取 消
</el-button>
<el-button
type=
"danger"
@
click=
"saveData()"
size=
"small"
>
确 定
</el-button>
<el-button
type=
"danger"
@
click=
"save
Sub
Data()"
size=
"small"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
...
...
@@ -550,6 +557,7 @@
export
default
{
data
()
{
return
{
editTitle
:
"選單"
,
//弹窗
isShowDialog
:
false
,
//选项卡
...
...
@@ -629,13 +637,84 @@
PositionList
:
[]
},
//操作类型[1-網站選單設定,2-刊尾選單設定,3-刊尾小圖設定,4-分公司資訊設定,5-表單簽核職位設定]
OpType
:
0
OpType
:
0
,
OpIndex
:
0
,
//选中的当前项
//菜单对象
MenuObj
:
{
Id
:
0
,
//编号
Type
:
0
,
//导航类型(1-顶部导航,2-底部导航,3-底部图标导航)
Icon
:
""
,
//图标
NavTitle
:
""
,
//导航名称
NavUrl
:
""
,
//导航链接
IsNewOpen
:
0
,
//是否新开页面(1-是)
MenuId
:
0
,
//菜单编号
},
//分公司对象
BranchObj
:
{
Id
:
0
,
//编号
BName
:
""
,
//分公司名称
BTel
:
""
,
//分公司电话
BAddress
:
""
,
//分公司地址
BFax
:
""
,
//分公司传真
BType
:
0
,
//分公司类型
BXieHuiCode
:
""
,
//協會證號
BUnifyCode
:
""
,
//統一編號
},
//职位对象
PositionObj
:
{
Id
:
0
,
//编号
Name
:
''
,
//职位名称
},
HomePageList
:
[],
//首页菜单列表
BottomTagPageList
:
[],
//底部标签导航列表
};
},
mounted
()
{
this
.
getPageTypeList
();
this
.
getData
();
},
methods
:
{
//下拉选择
changeMenu
(
type
)
{
if
(
type
==
1
)
{
var
chooseItem
=
this
.
HomePageList
.
find
(
member
=>
{
return
member
.
Id
===
this
.
MenuObj
.
MenuId
;
});
this
.
MenuObj
.
NavTitle
=
chooseItem
.
NavTitle
;
this
.
MenuObj
.
NavUrl
=
chooseItem
.
NavUrl
;
}
else
{
var
chooseBoottomItem
=
this
.
BottomTagPageList
.
find
(
member
=>
{
return
member
.
Id
===
this
.
MenuObj
.
MenuId
;
});
this
.
MenuObj
.
NavTitle
=
chooseBoottomItem
.
NavTitle
;
this
.
MenuObj
.
NavUrl
=
chooseBoottomItem
.
NavUrl
;
this
.
MenuObj
.
Icon
=
chooseBoottomItem
.
Icon
;
}
},
//获取导航下拉列表
getPageTypeList
()
{
this
.
apipost
(
"ws_get_GetNavConfigListByHome"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
var
jsonData
=
res
.
data
.
data
;
if
(
jsonData
&&
jsonData
.
length
>
0
)
{
jsonData
.
forEach
(
item
=>
{
if
(
item
.
Type
==
2
)
{
this
.
HomePageList
=
item
.
subList
}
if
(
item
.
Type
==
3
)
{
this
.
BottomTagPageList
=
item
.
subList
;
}
});
}
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{}
);
},
//获取配置
getData
()
{
this
.
apipost
(
...
...
@@ -777,10 +856,154 @@
});
},
//操作项目
OperateDialog
(
index
)
{
OperateDialog
(
index
)
{
this
.
isShowDialog
=
true
;
this
.
OpIndex
=
index
;
switch
(
this
.
OpType
)
{
case
1
:
if
(
index
!=
-
1
)
{
this
.
MenuObj
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
PostMsg
.
HeaderNavList
[
index
]));
}
break
;
case
2
:
if
(
index
!=
-
1
)
{
this
.
MenuObj
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
PostMsg
.
FooterNavList
[
index
]));
}
break
;
case
3
:
if
(
index
!=
-
1
)
{
this
.
MenuObj
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
PostMsg
.
BottomNavList
[
index
]));
}
break
;
case
4
:
if
(
index
!=
-
1
)
{
this
.
BranchObj
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
PostMsg
.
WebSiteBranchConfigList
[
index
]));
}
break
;
case
5
:
if
(
index
!=
-
1
)
{
this
.
PositionObj
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
PostMsg
.
PositionList
[
index
]));
}
break
;
}
},
//删除项目
DeleteItem
(
item
,
index
)
{
var
that
=
this
;
that
.
Confirm
(
"是否删除?"
,
function
()
{
var
cmdStr
=
""
;
switch
(
that
.
OpType
)
{
case
1
:
if
(
item
.
Id
>
0
)
{
cmdStr
=
"ws_post_RemoveNav"
;
}
that
.
PostMsg
.
HeaderNavList
.
splice
(
index
,
1
);
break
;
case
2
:
if
(
item
.
Id
>
0
)
{
cmdStr
=
"ws_post_RemoveNav"
;
}
that
.
PostMsg
.
FooterNavList
.
splice
(
index
,
1
);
break
;
case
3
:
if
(
item
.
Id
>
0
)
{
cmdStr
=
"ws_post_RemoveNav"
;
}
that
.
PostMsg
.
BottomNavList
.
splice
(
index
,
1
);
break
;
case
4
:
if
(
item
.
Id
>
0
)
{
cmdStr
=
"ws_post_RemoveBranch"
;
}
that
.
PostMsg
.
WebSiteBranchConfigList
.
splice
(
index
,
1
);
break
;
case
5
:
if
(
item
.
Id
>
0
)
{
cmdStr
=
"ws_post_RemovePosition"
;
}
that
.
PostMsg
.
PositionList
.
splice
(
index
,
1
);
break
;
}
if
(
item
.
Id
>
0
)
{
that
.
apipost
(
cmdStr
,
{
Id
:
item
.
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
Success
(
res
.
data
.
message
);
that
.
getData
();
}
else
{
that
.
Error
(
res
.
data
.
message
);
}
},
null
);
}
});
},
//保存导航数据
saveSubData
()
{
switch
(
this
.
OpType
)
{
case
1
:
if
(
this
.
OpIndex
==
-
1
)
{
this
.
PostMsg
.
HeaderNavList
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
MenuObj
)));
}
else
{
this
.
PostMsg
.
HeaderNavList
[
this
.
OpIndex
]
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
MenuObj
));
}
break
;
case
2
:
if
(
this
.
OpIndex
==
-
1
)
{
this
.
PostMsg
.
FooterNavList
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
MenuObj
)));
}
else
{
this
.
PostMsg
.
FooterNavList
[
this
.
OpIndex
]
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
MenuObj
));
}
break
;
case
3
:
if
(
this
.
OpIndex
==
-
1
)
{
this
.
PostMsg
.
BottomNavList
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
MenuObj
)));
}
else
{
this
.
PostMsg
.
BottomNavList
[
this
.
OpIndex
]
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
MenuObj
));
}
break
;
case
4
:
if
(
this
.
OpIndex
==
-
1
)
{
this
.
PostMsg
.
WebSiteBranchConfigList
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
BranchObj
)));
}
else
{
this
.
PostMsg
.
WebSiteBranchConfigList
[
this
.
OpIndex
]
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
BranchObj
));
}
break
;
case
5
:
if
(
this
.
OpIndex
==
-
1
)
{
this
.
PostMsg
.
PositionList
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
PositionObj
)));
}
else
{
this
.
PostMsg
.
PositionList
[
this
.
OpIndex
]
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
PositionObj
));
}
break
;
}
this
.
clearMsg
();
this
.
isShowDialog
=
false
;
},
clearMsg
()
{
this
.
MenuObj
.
Id
=
0
;
this
.
MenuObj
.
Type
=
0
;
this
.
MenuObj
.
Icon
=
""
;
this
.
MenuObj
.
NavTitle
=
""
;
this
.
MenuObj
.
NavUrl
=
""
;
this
.
MenuObj
.
IsNewOpen
=
0
;
this
.
BranchObj
.
Id
=
0
;
this
.
BranchObj
.
BName
=
""
;
this
.
BranchObj
.
BTel
=
""
;
this
.
BranchObj
.
BAddress
=
""
;
this
.
BranchObj
.
BFax
=
""
;
this
.
BranchObj
.
BType
=
0
;
this
.
BranchObj
.
BXieHuiCode
=
""
;
this
.
BranchObj
.
BUnifyCode
=
""
;
this
.
PositionObj
.
Id
=
0
;
this
.
PositionObj
.
Name
=
""
;
}
}
}
...
...
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