Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
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
黄媛媛
ElectricitySheep
Commits
ad855a9c
Commit
ad855a9c
authored
Dec 25, 2020
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
6c849fbc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
903 additions
and
78 deletions
+903
-78
choicels.vue
src/components/common/choicels.vue
+131
-0
addLecturer.vue
src/components/education/addLecturer.vue
+15
-0
lecturermanage.vue
src/components/education/lecturermanage.vue
+1
-1
educationteacher.vue
src/components/sallCenter/plugin/educationteacher.vue
+643
-0
startupPage.vue
src/components/sallCenter/startupPage.vue
+81
-69
templateEdit.vue
src/components/sallCenter/templateEdit.vue
+32
-8
No files found.
src/components/common/choicels.vue
0 → 100644
View file @
ad855a9c
<
template
>
<div>
<el-input
size=
"mini"
v-model=
"msg.Name"
placeholder=
"根据名称搜索"
:clearable=
"true"
@
clear=
"msg.pageIndex=1,getList()"
@
keyup
.
enter
.
native=
"msg.pageIndex=1,getList()"
>
<el-button
slot=
"append"
@
click=
"msg.pageIndex=1,getList()"
>
搜索
</el-button>
</el-input>
<el-table
ref=
"multipleTable"
:data=
"dataList"
tooltip-effect=
"dark"
height=
"450"
style=
"width: 100%"
@
selection-change=
"handleSelectionChange"
>
<template
v-if=
"isSingle"
>
<el-table-column
width=
"50px"
label=
""
>
<template
slot-scope=
"scope"
>
<el-radio
v-model=
"scope.row.IsChecked"
@
change
.
native=
"getTemplateRow(scope.$index,scope.row)"
>
</el-radio>
</
template
>
</el-table-column>
</template>
<
template
v-else
>
<el-table-column
type=
"selection"
width=
"50px"
>
</el-table-column>
</
template
>
<el-table-column
label=
"编号"
width=
"80px"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
ID
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"Name"
label=
"信息"
>
<
template
slot-scope=
"scope"
>
<div
class=
"app-image"
:style=
"
{backgroundImage:'url(' + scope.row.TeacherLogo + ')',backgroundSize:'cover'}">
</div>
<div
flex=
"dir:left cross:center"
>
{{
scope
.
row
.
Name
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"Major"
label=
"专业"
>
</el-table-column>
</el-table>
<el-pagination
style=
"text-align:center"
background
@
current-change=
"handleCurrentChange"
:page-size=
"msg.pageSize"
layout=
"prev, pager, next"
:total=
"total"
>
</el-pagination>
</div>
</template>
<
script
>
export
default
{
props
:
[
'ckGoods'
,
"isSingle"
,
"IsGetSpec"
],
data
()
{
return
{
dataList
:
[],
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
Name
:
''
,
ID
:
0
,
Telephone
:
''
,
TeacherStatus
:
1
},
total
:
0
,
selectRow
:
[],
};
},
created
()
{
if
(
this
.
IsGetSpec
)
{
this
.
msg
.
IsGetSpec
=
this
.
IsGetSpec
;
}
},
methods
:
{
//获取所有菜单
getList
()
{
this
.
apipost
(
"/api/Education/GetTeacherPageList"
,
this
.
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
total
=
res
.
data
.
data
.
count
;
var
tempArray
=
res
.
data
.
data
.
pageData
;
if
(
tempArray
&&
tempArray
.
length
>
0
)
{
tempArray
.
forEach
(
item
=>
{
item
.
IsChecked
=
false
;
});
}
this
.
dataList
=
JSON
.
parse
(
JSON
.
stringify
(
tempArray
));
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
},
handleSelectionChange
(
val
)
{
this
.
selectRow
=
JSON
.
parse
(
JSON
.
stringify
(
val
));
},
getTemplateRow
(
index
,
row
)
{
this
.
selectRow
=
[];
if
(
this
.
dataList
&&
this
.
dataList
.
length
>
0
)
{
this
.
dataList
.
forEach
(
item
=>
{
if
(
item
.
ID
!=
row
.
ID
)
{
item
.
IsChecked
=
false
;
}
})
}
this
.
selectRow
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
row
)));
},
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
//父组件调用方法
getChoicedGoods
()
{
return
this
.
selectRow
;
},
//清空多选方法
toggleSelection
(
rows
)
{
if
(
rows
)
{
rows
.
forEach
(
row
=>
{
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
row
);
});
}
else
{
this
.
$refs
.
multipleTable
.
clearSelection
();
}
},
},
mounted
()
{
this
.
getList
();
}
};
</
script
>
<
style
>
.app-image
{
background-position
:
center
center
;
width
:
50px
;
height
:
50px
;
border-radius
:
0%
;
float
:
left
;
margin-right
:
8px
;
}
</
style
>
src/components/education/addLecturer.vue
View file @
ad855a9c
...
...
@@ -28,6 +28,14 @@
<el-form-item
label=
"工作年限"
prop=
"WorkYears"
class=
"is-required"
size=
"small"
>
<el-input
v-model=
"addMsg.WorkYears"
@
keyup
.
native=
"checkInteger(addMsg,'WorkYears')"
placeholder=
"请输入工作年限"
/>
</el-form-item>
<el-form-item
label=
"讲师国籍"
prop=
"Nationality"
class=
"is-required"
size=
"small"
>
<el-input
v-model=
"addMsg.Nationality"
/>
</el-form-item>
<el-form-item
label=
"是否外国人"
size=
"small"
>
<el-switch
v-model=
"addMsg.IsForeigners"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"0"
>
</el-switch>
</el-form-item>
<el-form-item
label=
"上架状态"
size=
"small"
>
<el-switch
v-model=
"addMsg.TeacherStatus"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"2"
>
...
...
@@ -92,6 +100,8 @@
WorkYears
:
''
,
TeacherStatus
:
2
,
LableNameList
:
''
,
IsForeigners
:
0
,
//是否外国人0-否,1-是
Nationality
:
''
,
//老师国籍
},
dynamicTags
:
[],
inputVisible
:
false
,
...
...
@@ -124,6 +134,11 @@
message
:
'请输入讲师专业'
,
trigger
:
'blur'
}],
Nationality
:
[{
required
:
true
,
message
:
'请输入讲师国籍'
,
trigger
:
'blur'
}],
WorkYears
:
[{
required
:
true
,
message
:
'请输入讲师年限'
,
...
...
src/components/education/lecturermanage.vue
View file @
ad855a9c
...
...
@@ -145,7 +145,7 @@
Name
:
''
,
ID
:
''
,
Telephone
:
''
,
TeacherStatus
:
-
1
},
changeState
:
false
,
dateList
:[],
...
...
src/components/sallCenter/plugin/educationteacher.vue
0 → 100644
View file @
ad855a9c
This diff is collapsed.
Click to expand it.
src/components/sallCenter/startupPage.vue
View file @
ad855a9c
...
...
@@ -8,8 +8,8 @@
<div
style=
"display:flex;"
flex=
"box:first"
>
<div
class=
"Auth_outside"
>
<div
flex=
"dir:left main:center cross:center"
class=
"inside"
>
<img
v-if=
"addMsg.
AuthUrl!=''"
class=
"authPic"
:src=
"getIconLink(addMsg.Auth
Url)"
alt=
""
>
<img
v-else
class=
"authPic"
:src=
"getIconLink(addMsg.
Auth
Url)"
alt=
""
/>
<img
v-if=
"addMsg.
PicUrl!=''"
class=
"authPic"
:src=
"getIconLink(addMsg.Pic
Url)"
alt=
""
>
<img
v-else
class=
"authPic"
:src=
"getIconLink(addMsg.
Pic
Url)"
alt=
""
/>
</div>
</div>
<div
class=
"Auth_right"
>
...
...
@@ -17,26 +17,35 @@
<div
slot=
"header"
>
设置
</div>
<el-form
label-width=
"100px"
>
<el-form-item
label=
"是否开启"
>
<el-switch
v-model=
"addMsg.IsOpenAuth"
:active-value=
"1"
:inactive-value=
"0"
></el-switch>
<el-switch
v-model=
"addMsg.IsShow"
:active-value=
"1"
:inactive-value=
"0"
></el-switch>
</el-form-item>
<el-form-item
label=
"是否开启"
>
<el-input
placeholder=
"请输入内容"
v-model=
"addMsg.Seconds"
size=
"small"
type=
"number"
:min=
"0"
style=
"max-width:600px"
>
<template
slot=
"append"
>
秒
</
template
>
</el-input>
</el-form-item>
<el-form-item
label=
"商品视频"
>
<el-input
v-model=
"addMsg.MusicUrl"
size=
"small"
placeholder=
"请输入内容"
style=
"max-width:600px"
>
<el-button
@
click=
"changevideo = true"
slot=
"append"
>
添加视频
</el-button>
</el-input>
</el-form-item>
<el-form-item
label=
"上传图片"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"推荐尺寸650*700"
placement=
"bottom"
>
<el-button
size=
"mini"
@
click=
"choicImg=true"
>
选择文件
</el-button>
</el-tooltip>
<div
class=
"Auth_imgList"
flex=
"main:center cross:center"
v-if=
"addMsg.AuthUrl!=''"
>
<img
:src=
"getIconLink(addMsg.AuthUrl)"
alt=
""
>
<el-button
type=
"danger"
v-if=
"addMsg.AuthUrl!=''"
class=
"image-delete"
size=
"mini"
icon=
"el-icon-close"
@
click
.
stop=
"addMsg.AuthUrl=''"
circle
></el-button>
</div>
<el-upload
class=
"avatar-uploader"
action=
""
accept=
"image/jpeg,image/gif,image/png,image/bmp"
:show-file-list=
"false"
:http-request=
"UploadImage"
:before-upload=
"beforeAvatarUpload"
>
<div
class=
"app-upload"
flex=
"main:center cross:center"
style=
"width: 100px; height: 40px;"
>
<el-button
size=
"mini"
>
选择文件
</el-button>
</div>
<div
class=
"Auth_imgList"
flex=
"main:center cross:center"
v-if=
"addMsg.PicUrl!=''"
>
<img
:src=
"getIconLink(addMsg.PicUrl)"
alt=
""
>
<el-button
type=
"danger"
v-if=
"addMsg.PicUrl!=''"
class=
"image-delete"
size=
"mini"
icon=
"el-icon-close"
@
click
.
stop=
"addMsg.PicUrl=''"
circle
></el-button>
</div>
</el-upload>
</el-form-item>
<!--
<el-form-item
label=
"热区"
>
-->
<!--
<choiceAreaAuth
ref=
"choiceAreaAuth"
:multiple=
"true"
:max=
"2"
:pic-url=
"getIconLink(addMsg.AuthUrl)"
--
>
<!-- mode='auth' :hotspotArray="addMsg.AuthDataList" width="650px" height="700px"-->
<!-- @confirm="selectHotspot" >-->
<!--
<el-button
size=
"mini"
>
划分热区
</el-button>
-->
<!--
</choiceAreaAuth>
-->
<!--
<div>
注:需要划分两个热区:一个是登录按钮热区,一个是暂不登录按钮热区
</div>
-->
<!--
</el-form-item>
-->
</el-form>
</el-card>
<el-button
type=
"primary"
style=
"margin-top:20px;padding:9px 25px"
size=
"small"
@
click=
"saveMsg"
>
保存
...
...
@@ -49,11 +58,16 @@
<el-dialog
title=
"选择文件"
:visible
.
sync=
"choicImg"
width=
"1240px"
>
<ChooseImg
@
SelectId=
"SelectId"
></ChooseImg>
</el-dialog>
<!-- 选择视频 -->
<el-dialog
title=
"选择文件"
:visible
.
sync=
"changevideo"
width=
"1240px"
>
<Choosevideo
@
Selectvideo=
"Selectvideo"
></Choosevideo>
</el-dialog>
</div>
</template>
<
script
>
import
ChooseImg
from
"@/components/global/ChooseImg.vue"
;
import
choiceAreaAuth
from
"../common/choiceAreaAuth.vue"
;
import
Choosevideo
from
"@/components/global/Choosevideo.vue"
;
export
default
{
data
()
{
return
{
...
...
@@ -64,12 +78,16 @@
pageSize
:
15
,
Name
:
""
,
},
changevideo
:
false
,
addMsg
:
{
MallBaseId
:
0
,
IsOpenAuth
:
0
,
//是否开启
AuthUrl
:
this
.
domainManager
().
ImageUrl
+
'/Static/auth-default.png'
,
//图片
AuthDataList
:
[
]
//热区
ID
:
0
,
MusicUrl
:
''
,
//音乐地址
Seconds
:
0
,
IsShow
:
0
,
//是否开启
PicUrl
:
this
.
domainManager
().
ImageUrl
+
'/Static/auth-default.png'
,
//图片
},
imgshow
:
true
,
};
},
created
()
{
...
...
@@ -77,61 +95,34 @@
},
components
:
{
ChooseImg
,
choiceAreaAuth
Choosevideo
},
methods
:
{
GetData
()
{
this
.
addMsg
.
MallBaseId
=
this
.
getLocalStorage
().
MallBaseId
;
this
.
apipost
(
"/api/Tenant/GetMiniPrograme"
,
{
MallBaseId
:
this
.
addMsg
.
MallBaseId
,
this
.
apipost
(
"/api/Education/GetEducationStartUpModel"
,
{
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
addMsg
.
IsOpenAuth
=
res
.
data
.
data
.
IsOpenAuth
;
if
(
res
.
data
.
data
.
AuthUrl
)
{
this
.
addMsg
.
AuthUrl
=
res
.
data
.
data
.
AuthUrl
;
this
.
addMsg
.
IsShow
=
res
.
data
.
data
.
IsShow
;
this
.
addMsg
.
ID
=
res
.
data
.
data
.
ID
;
this
.
addMsg
.
Seconds
=
res
.
data
.
data
.
Seconds
;
if
(
res
.
data
.
data
.
PicUrl
)
{
this
.
addMsg
.
PicUrl
=
res
.
data
.
data
.
PicUrl
;
}
if
(
res
.
data
.
data
.
AuthDataList
&&
res
.
data
.
data
.
AuthDataList
.
length
>
0
)
{
this
.
addMsg
.
AuthDataList
=
res
.
data
.
data
.
AuthDataList
;
}
else
{
this
.
GetDefaultSpot
();
if
(
res
.
data
.
data
.
MusicUrl
)
{
this
.
addMsg
.
MusicUrl
=
res
.
data
.
data
.
MusicUrl
;
}
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
//热区设置默认值
GetDefaultSpot
()
{
var
objCancel
=
{
width
:
224
,
height
:
80
,
left
:
84
,
top
:
566
,
defaultX
:
84
,
defaultY
:
566
,
link
:
""
,
open_type
:
"cancel"
,
IsChecked
:
false
,
};
this
.
addMsg
.
AuthDataList
.
push
(
objCancel
);
var
objLogin
=
{
width
:
224
,
height
:
80
,
left
:
340
,
top
:
566
,
defaultX
:
340
,
defaultY
:
566
,
link
:
""
,
open_type
:
"login"
,
IsChecked
:
false
,
};
this
.
addMsg
.
AuthDataList
.
push
(
objLogin
);
},
//保存
saveMsg
()
{
this
.
apipost
(
"/api/Tenant/SetMiniProgramMallAuth"
,
this
.
addMsg
,
res
=>
{
if
(
this
.
addMsg
.
Seconds
==
''
){
this
.
addMsg
.
Seconds
=
0
}
this
.
apipost
(
"/api/Education/AddOrUpdateEducationStartUp "
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
GetData
();
this
.
Success
(
res
.
data
.
message
);
...
...
@@ -142,14 +133,35 @@
},
//选择图片
SelectId
(
msg
)
{
this
.
addMsg
.
Auth
Url
=
this
.
getIconLink
(
msg
.
url
);
this
.
addMsg
.
Pic
Url
=
this
.
getIconLink
(
msg
.
url
);
this
.
choicImg
=
false
;
},
// 热区选择(edit)
selectHotspot
(
list
)
{
this
.
addMsg
.
AuthDataList
=
list
;
this
.
$refs
.
choiceAreaAuth
.
clearAll
();
Selectvideo
(
val
)
{
this
.
addMsg
.
MusicUrl
=
val
.
Path
;
this
.
changevideo
=
false
;
},
UploadImage
(
file
)
{
if
(
this
.
imgshow
==
true
){
this
.
UploadFileToTencent
(
this
.
FileType
().
GoodsImg
,
file
.
file
,
res
=>
{
if
(
res
.
resultCode
==
1
)
{
if
(
res
.
FileUrl
){
this
.
addMsg
.
PicUrl
=
res
.
FileUrl
;
}
}
})
}
},
beforeAvatarUpload
(
file
){
if
(
file
.
size
/
1024
>
170
){
this
.
Error
(
'图片大于170KB'
);
this
.
imgshow
=
false
}
else
{
this
.
imgshow
=
true
}
}
},
mounted
()
{
this
.
GetData
();
...
...
src/components/sallCenter/templateEdit.vue
View file @
ad855a9c
...
...
@@ -294,6 +294,8 @@
:index=
"index"
:dataLeng=
"dataList.length"
></reservestore>
<storeGoods
v-if=
"item.Id=='storeGoods'"
:storeData=
"item"
@
getSord=
"getSord"
@
comDelPlugin=
"comDelPlugin"
:index=
"index"
:dataLeng=
"dataList.length"
></storeGoods>
<educationteacher
v-if=
"item.Id=='educationteacher'"
:lsData=
"item"
@
getSord=
"getSord"
@
comDelPlugin=
"comDelPlugin"
:index=
"index"
:dataLeng=
"dataList.length"
></educationteacher>
</div>
</div>
</div>
...
...
@@ -404,6 +406,7 @@
import
sidao
from
"../sallCenter/plugin/sidao.vue"
import
education
from
"../sallCenter/plugin/education"
import
educationArticle
from
"../sallCenter/plugin/educationArticle"
import
educationteacher
from
"../sallCenter/plugin/educationteacher"
import
educationCustom
from
"../sallCenter/plugin/educationCustom"
import
reservestore
from
"../sallCenter/plugin/reservestore"
import
storeGoods
from
"../sallCenter/plugin/storeGoods"
...
...
@@ -482,7 +485,8 @@
educationArticle
,
educationCustom
,
reservestore
,
storeGoods
storeGoods
,
educationteacher
},
methods
:
{
//选择图片
...
...
@@ -629,9 +633,9 @@
background
:
'#f67f79'
,
//背景颜色
headerUrl
:
this
.
domainManager
().
ImageUrl
+
'/Static/icon-notice-title.png'
,
//头部图片
btnColor
:
'#ff4544'
,
//按钮颜色
btnWidth
:
500
,
//按钮宽度
btnHeight
:
80
,
//按钮高度
btnRadius
:
40
,
//按钮圆角
btnWidth
:
500
,
//按钮宽度
btnHeight
:
80
,
//按钮高度
btnRadius
:
40
,
//按钮圆角
btnText
:
'我知道了'
,
//按钮文本内容
btnTextColor
:
'#ffffff'
//按钮文本颜色
}
...
...
@@ -1276,8 +1280,8 @@
headName
:
"赞羊小店"
,
//用户信息
headInfo
:
"赞美生活,样样满意"
,
//用户介绍
backgroundPicUrl
:
''
,
//背景图片
backgroundColor
:
'#ffffff'
,
//背景颜色
bottonImg
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/1598255454000_522.png"
,
//按钮图片
backgroundColor
:
'#ffffff'
,
//背景颜色
bottonImg
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/1598255454000_522.png"
,
//按钮图片
fontColor
:
""
,
//字体颜色
fontName
:
""
,
//字体
fontSize
:
12
,
//字体大小
...
...
@@ -1341,7 +1345,7 @@
data
:{
goodsLength
:
10
,
//商品数量
addGoodsType
:
0
,
//商品添加方式【0-自定义,1-最新】
listStyle
:
-
1
,
//列表样式[-1-列表模式,0-左右滑动,1-一行一个]
listStyle
:
-
1
,
//列表样式[-1-列表模式,0-左右滑动,1-一行一个]
backgroundColor
:
'#fff'
,
//背景颜色
SearchFilletPX
:
0
,
//圆角
PaddingTop
:
0
,
//上边距
...
...
@@ -1360,7 +1364,7 @@
isCked
:
false
,
data
:{
goodsLength
:
10
,
//商品数量
listStyle
:
-
1
,
//列表样式[-1-列表模式,0-左右滑动,1-一行一个,2-一行两个3-一行三个]
listStyle
:
-
1
,
//列表样式[-1-列表模式,0-左右滑动,1-一行一个,2-一行两个3-一行三个]
backgroundColor
:
'#fff'
,
//背景颜色
PaddingTop
:
0
,
//上边距
PaddingBottom
:
0
,
//下边距
...
...
@@ -1427,6 +1431,26 @@
}
this
.
dataList
.
push
(
storeGoodObj
);
break
;
//老师
case
'educationteacher'
:
let
lsObj
=
{
Id
:
'educationteacher'
,
isCked
:
false
,
data
:{
addGoodsType
:
0
,
//商品添加方式【0-自定义,1-最新】
listStyle
:
0
,
//列表样式[-1-列表模式,0-左右滑动,1-一行一个]
backgroundColor
:
'#fff'
,
//背景颜色
SearchFilletPX
:
0
,
//圆角
PaddingTop
:
0
,
//上边距
PaddingBottom
:
0
,
//下边距
PaddingLeft
:
0
,
//左边距
PaddingRight
:
0
,
//右边距
list
:
[],
//商品列表
}
}
this
.
dataList
.
push
(
lsObj
);
break
;
}
},
//给子组件调用 重新排序上移下移
...
...
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