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
e7166801
Commit
e7166801
authored
Sep 29, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加课程
parent
44388bb5
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
3597 additions
and
6 deletions
+3597
-6
App.vue
src/App.vue
+1
-1
materialMan.vue
src/components/CommodityMan/materialMan.vue
+84
-1
CourseManagement.vue
src/components/education/CourseManagement.vue
+878
-0
educationEdit.vue
src/components/education/educationEdit.vue
+2141
-0
educationIndex.vue
src/components/education/educationIndex.vue
+3
-0
ChooseFile.vue
src/components/global/ChooseFile.vue
+467
-0
Choosevideo.vue
src/components/global/Choosevideo.vue
+3
-1
index.js
src/plug/index.js
+8
-1
index.js
src/router/index.js
+12
-2
No files found.
src/App.vue
View file @
e7166801
...
...
@@ -11,7 +11,7 @@ export default {
</
script
>
<
style
>
@import
"//at.alicdn.com/t/font_1769104_
vde3fa04to
r.css"
;
@import
"//at.alicdn.com/t/font_1769104_
8xxy5gj3qz
r.css"
;
@import
"./assets/css/common.css"
;
@import
"./assets/css/zkcss.css"
;
html
,
...
...
src/components/CommodityMan/materialMan.vue
View file @
e7166801
...
...
@@ -10,6 +10,7 @@
<div
class=
"TabDiv"
>
<span
:class=
"commonType==1?'spanActive':''"
@
click=
"handleClick(1)"
>
图片
</span>
<span
:class=
"commonType==2?'spanActive':''"
@
click=
"handleClick(2)"
>
视频
</span>
<span
:class=
"commonType==3?'spanActive':''"
@
click=
"handleClick(3)"
>
其他
</span>
</div>
<div>
<div
style=
"height: 718px;"
flex=
"box:first"
>
...
...
@@ -132,6 +133,42 @@
</div>
</el-tooltip>
</
template
>
<
template
v-if=
"PageMsg.Type==3"
>
<div
class=
"material-item material-upload"
>
<div
class=
"app-upload"
flex=
"main:center cross:center"
style=
"width: 140px; height: 140px;"
>
<el-upload
class=
"avatar-uploader"
action=
""
accept=
"video/mp4,video/ogg,video/webm"
:show-file-list=
"false"
:http-request=
"UploadpdfFile"
multiple
>
<i
class=
"el-icon-upload"
></i>
</el-upload>
</div>
</div>
<el-tooltip
v-for=
"(item,index) in PageList"
:key=
"index"
class=
"item"
effect=
"dark"
:content=
"item.Name"
placement=
"top-start"
>
<div
@
click=
"PageSelect(item,index)"
:class=
"item.Selected ? 'selected' :''"
class=
"el-tooltip item material-item "
>
<div
class=
"mater_FileType"
v-if=
"getFileType(item.Name)==1"
>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/WORD.png"
alt=
""
>
</div>
<div
class=
"mater_FileType"
v-if=
"getFileType(item.Name)==2"
>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/PPT.png"
alt=
""
>
</div>
<div
class=
"mater_FileType"
v-if=
"getFileType(item.Name)==3"
>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/pdf.png"
alt=
""
>
</div>
<div
flex=
"dir:left"
style=
"margin-top: 5px;"
>
<div
class=
"material-name"
>
{{
item
.
Name
}}
</div>
<div
style=
"margin: 0px 5px;"
>
|
</div>
<div>
<button
type=
"button"
class=
"el-button el-button--text"
style=
"padding: 0px;"
>
<span
@
click=
"EditPage(item)"
>
编辑
</span>
</button>
</div>
</div>
</div>
</el-tooltip>
</
template
>
</div>
<div
style=
"padding-right:10px"
>
<el-pagination
style=
"text-align:right"
background
:current-page=
"currentPage4"
...
...
@@ -477,6 +514,24 @@
}
})
},
//上传附件doc docx pdf ppt pptx
UploadpdfFile
(
file
){
var
that
=
this
;
var
flieType
=
file
.
file
.
name
.
split
(
'.'
)[
1
];
if
(
flieType
!=
'doc'
&&
flieType
!=
'docx'
&&
flieType
!=
'pdf'
&&
flieType
!=
'ppt'
&&
flieType
!=
'pptx'
){
this
.
Error
(
'请上传word ppt pdf文件'
);
return
;
}
this
.
UploadSelfFile
(
this
.
FileType
().
GoodsImg
,
file
.
file
,
res
=>
{
if
(
res
.
resultCode
==
1
)
{
that
.
addpageMsg
.
Image
=
res
.
VideoCoverImg
;
that
.
addpageMsg
.
Path
=
res
.
FileUrl
;
that
.
addpageMsg
.
Name
=
res
.
FileName
;
that
.
addPageList
();
that
.
$forceUpdate
();
}
})
},
// 新增素材信息
addPageList
()
{
this
.
apipost
(
"/api/product/SetMaterialInfo"
,
this
.
addpageMsg
,
res
=>
{
...
...
@@ -579,6 +634,7 @@
}
},
GroupsubmitForm
(
formName
)
{
console
.
log
(
this
.
addGroupMsg
,
'this.addGroupMsg'
);
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
apipost
(
'/api/product/SetMaterialGroupInfo'
,
this
.
addGroupMsg
,
...
...
@@ -634,6 +690,23 @@
this
.
PageMsg
.
pageIndex
=
val
;
this
.
GetPageList
();
},
//拆分后缀
getFileType
(
item
){
var
num
=
0
;
if
(
item
){
var
name
=
item
.
split
(
'.'
)[
1
]
}
if
(
name
==
'doc'
||
name
==
'docx'
){
num
=
1
}
if
(
name
==
'ppt'
||
name
==
'pptx'
){
num
=
2
}
if
(
name
==
'pdf'
){
num
=
3
}
return
num
;
}
},
}
...
...
@@ -743,5 +816,15 @@
border-left
:
none
;
padding
:
0
15px
;
}
.mater_FileType
{
width
:
140px
;
height
:
140px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.mater_FileType
img
{
width
:
80%
;
height
:
80%
;
}
</
style
>
src/components/education/CourseManagement.vue
0 → 100644
View file @
e7166801
<
template
>
<div
class=
"goodsList"
>
<div
class=
"head-title"
>
商品列表
<el-button
@
click=
"Export"
style=
"float:right;margin-top: -5px;margin-left:20px;"
size=
"small"
type=
"primary"
>
商品导出
</el-button>
<el-button
@
click=
"CommonJump('educationEdit',
{hpState:hpState,FxState:FxState})"
style="float:right;margin-top: -5px;margin-left:20px;" size="small" type="primary">添加商品
</el-button>
</div>
<div
class=
"content"
>
<div>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-tab-pane
:dataId=
"0"
label=
"全部"
name=
"first"
></el-tab-pane>
<el-tab-pane
:dataId=
"1"
label=
"上架中"
name=
"second"
></el-tab-pane>
<el-tab-pane
:dataId=
"2"
label=
"下架中"
name=
"third"
></el-tab-pane>
</el-tabs>
</div>
<div>
<el-button
@
click=
"flDig=true"
style=
"margin-right:10px;"
size=
"small"
>
分类筛选
</el-button>
<el-button
v-show=
"checkList.length>0"
@
click=
"checkList=[],msg.CategoryIds='',msg.pageIndex=1,getList()"
type=
"danger"
style=
"margin-right:10px;"
size=
"small"
>
清除分类
</el-button>
<span>
添加时间:
</span>
<el-date-picker
v-model=
"dateList"
@
change=
"msg.pageIndex=1,getList()"
size=
"small"
type=
"datetimerange"
range-separator=
"至"
value-format=
"yyyy-MM-dd HH:mm:ss"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
</el-date-picker>
<div
class=
"searchInput"
style=
"width:250px;margin-right: 0px;"
>
<el-input
@
keyup
.
enter
.
native=
"msg.pageIndex=1,getList()"
style=
"display:inline-block;width:225px;height:30px"
placeholder=
"请输入名称搜索"
v-model=
"msg.Name"
@
clear=
"msg.pageIndex=1,getList()"
size=
"small"
clearable
>
</el-input>
<span
@
click=
"msg.pageIndex=1,getList()"
class=
"el-icon-search"
style=
"color:#979dad;font-size:14px;position:relative;top:1px"
></span>
</div>
<div
class=
"searchInput"
style=
"width:250px"
>
<el-input
@
keyup
.
enter
.
native=
"msg.pageIndex=1,getList()"
style=
"display:inline-block;width:225px;height:30px"
placeholder=
"请输入ID搜索"
v-model=
"msg.Id"
@
clear=
"msg.pageIndex=1,getList()"
size=
"small"
clearable
>
</el-input>
<span
@
click=
"msg.pageIndex=1,getList()"
class=
"el-icon-search"
style=
"color:#979dad;font-size:14px;position:relative;top:1px"
></span>
</div>
<span
@
click=
"Clearconditions"
v-if=
"msg.Name!='' || msg.CategoryIds!='' || (dateList && dateList.length>0)"
class=
'blue point'
>
清空筛选条件
</span>
</div>
<div
style=
"margin-top:15px"
>
<el-button
@
click=
"tableSet(4)"
style=
"margin-left:10px;"
size=
"mini"
>
上架
</el-button>
<el-button
@
click=
"tableSet(5)"
style=
"margin-left:10px;"
size=
"mini"
>
下架
</el-button>
<el-button
@
click=
"tableSet(6)"
style=
"margin-left:10px;"
size=
"mini"
>
删除
</el-button>
<!--
<el-button
@
click=
"plsetBtn"
style=
"margin-left:10px;"
size=
"mini"
>
批量设置
</el-button>
-->
</div>
<el-table
:data=
"tableData"
v-loading=
"loading"
border
sortable=
'custom'
@
sort-change=
'getSort'
@
selection-change=
"tableSelect"
style=
"width: 100%;margin:20px 0"
>
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
<el-table-column
prop=
"Id"
width=
"80"
sortable
label=
"ID"
>
</el-table-column>
<el-table-column
prop=
"address"
sortable
label=
"排序"
>
<template
slot-scope=
"scope"
>
<template
v-if=
"!scope.row.editsort"
>
<span>
{{
scope
.
row
.
Sort
}}
</span>
<img
@
click=
"scope.row.editsort=true,scope.row.SortNew=scope.row.Sort"
style=
"width:15px;height:15px;margin-left:7px"
src=
"../../assets/img/userman/edit1.png"
alt=
""
>
</
template
>
<
template
v-else
>
<el-input
v-model=
"scope.row.SortNew"
type=
"number"
min=
"1"
size=
"small"
style=
"display:inline-block;width:70px"
></el-input>
<span
@
click=
"scope.row.editsort=false"
class=
"el-icon-error"
style=
"color: rgb(245, 108, 108);"
></span>
<span
@
click=
"Edit(scope.row,1)"
class=
"el-icon-success"
style=
"color:#67c23a"
></span>
</
template
>
</template>
</el-table-column>
<el-table-column
prop=
"Remark"
label=
"分类"
>
<
template
slot-scope=
"scope"
>
<el-tag
size=
"mini"
v-if=
"scope.row.CategoryList && scope.row.CategoryList.length>0"
>
{{
scope
.
row
.
CategoryList
[
0
].
CategoryName
}}
</el-tag>
<el-tooltip
class=
"item"
effect=
"dark"
placement=
"top"
>
<div
slot=
"content"
>
<span
v-for=
"(item,index) in scope.row.CategoryList"
:key=
"index"
>
{{
item
.
CategoryName
}}
</span>
</div>
<span
v-if=
"scope.row.CategoryList.length>1 && index==0"
v-for=
"(item,index) in scope.row.CategoryList"
:key=
"index"
>
...
</span>
</el-tooltip>
</
template
>
</el-table-column>
<el-table-column
prop=
"address"
width=
"300"
label=
"商品名称"
>
<
template
slot-scope=
"scope"
>
<div
flex=
"box:first"
>
<el-image
title=
"点击查看大图"
style=
"width:50px;height:50px;margin-right:1px"
:src=
"scope.row.CoverImage"
:preview-src-list=
"scope.row.CarouselImageList"
>
</el-image>
<template
v-if=
"!scope.row.editname"
>
<div
flex=
"cross:top"
style=
"display:inline-flex"
>
<div
flex=
"dir:left"
>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"scope.row.Name"
placement=
"top"
>
<div
class=
"vue-line-clamp"
style=
"word-break: break-all; -webkit-line-clamp: 2;"
>
<span>
{{
scope
.
row
.
Name
}}
</span>
</div>
</el-tooltip>
<img
@
click=
"scope.row.editname=true,scope.row.NameNew=scope.row.Name"
style=
"width:15px;height:15px;margin-left:7px"
src=
"../../assets/img/userman/edit1.png"
alt=
""
>
</div>
</div>
</
template
>
<
template
v-else
>
<el-input
v-model=
"scope.row.NameNew"
size=
"small"
style=
"display:inline-block;width:150px"
></el-input>
<span
@
click=
"scope.row.editname=false"
class=
"el-icon-error"
style=
"margin-left:5px;color: rgb(245, 108, 108);position: relative;top: 9px;"
></span>
<span
@
click=
"Edit(scope.row,2)"
class=
"el-icon-success"
style=
"color:#67c23a;position: relative;top: 9px;"
></span>
</
template
>
</div>
<div
flex=
"dir:left"
style=
"margin-top:5px;color:#F56C6C;font-size:12px;"
v-if=
"scope.row.Remark"
>
<div
style=
"width:38px;"
>
备注:
</div>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"scope.row.Remark"
placement=
"top"
>
<div
class=
"vue-line-clamp"
style=
"word-break: break-all; -webkit-line-clamp: 2;width:90%;margin-left:0;"
>
<span>
{{scope.row.Remark}}
</span>
</div>
</el-tooltip>
</div>
</template>
</el-table-column>
<el-table-column
prop=
"SellingPrice"
width=
"100"
sortable
label=
"售价"
>
</el-table-column>
<el-table-column
width=
"120"
>
<
template
slot=
"header"
>
已出售量
<el-tooltip
effect=
"dark"
content=
"已出售量=实际销量+虚拟销量,按实际销量排序"
placement=
"top"
>
<i
class=
"el-icon-info"
></i>
</el-tooltip>
</
template
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
GoodsBuyNum
}}
+
{{
scope
.
row
.
SalesNum
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"CreateDate"
width=
"160"
label=
"添加时间"
>
</el-table-column>
<el-table-column
prop=
"UpdateDate"
width=
"100"
label=
"状态"
>
<
template
slot-scope=
"scope"
>
<el-tag
v-if=
"scope.row.GoodsStatus==1"
type=
"success"
>
销售中
</el-tag>
<el-tag
v-if=
"scope.row.GoodsStatus==2"
type=
"warning"
>
下架中
</el-tag>
</
template
>
</el-table-column>
<el-table-column
prop=
"address"
width=
"200"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<img
@
click=
"goGoodsEdit(scope.row.Id)"
style=
"width:32px;height:32px;margin:0 10px"
src=
"../../assets/img/userman/edit.png"
alt=
""
>
<img
@
click=
"Delete(scope.row)"
style=
"width:32px;height:32px;margin:0 10px"
src=
"../../assets/img/userman/del.png"
alt=
""
>
</
template
>
</el-table-column>
</el-table>
<el-pagination
style=
"text-align:right"
background
@
current-change=
"handleCurrentChange"
:page-size=
"msg.pageSize"
layout=
"prev, pager, next"
:current-page
.
sync=
"msg.pageIndex"
:total=
"total"
>
</el-pagination>
</div>
<!-- 选择分类 -->
<el-dialog
custom-class=
"app-add-cat"
title=
"选择分类"
:visible
.
sync=
"flDig"
width=
"1100px"
>
<el-row>
<el-col
:span=
"8"
style=
"padding:0 10px;box-sizing:border-box"
>
<h3
style=
"padding:15px 0"
>
一级分类
</h3>
<div
class=
"app-goods-cat-list active"
>
<el-checkbox-group
v-model=
"checkList"
>
<div
v-for=
"(item,index) in fenleiData"
:key=
"index"
flex=
"dir:left box:first"
class=
"cat-item"
>
<el-checkbox
:label=
"item"
>
<span
style=
"display: none;"
>
{{item.Name}}
</span>
</el-checkbox>
<div
flex=
"box:last cross:center"
>
<span>
{{item.Name}}
</span>
<i
v-if=
"item.ChildList.length>0"
@
click=
"getChild2(item.ChildList)"
class=
"el-icon-arrow-right"
></i>
</div>
</div>
</el-checkbox-group>
</div>
</el-col>
<el-col
v-show=
"childList2.length>0"
:span=
"8"
style=
"padding:0 10px;box-sizing:border-box"
>
<h3
style=
"padding:15px 0"
>
二级分类
</h3>
<div
class=
"app-goods-cat-list active"
>
<el-checkbox-group
v-model=
"checkList"
>
<div
v-for=
"(item,index) in childList2"
:key=
"index"
flex=
"dir:left box:first"
class=
"cat-item"
>
<el-checkbox
:label=
"item"
>
<span
style=
"display: none;"
>
{{item.Name}}
</span>
</el-checkbox>
<div
flex=
"box:last cross:center"
>
<span>
{{item.Name}}
</span>
<i
v-if=
"item.ChildList.length>0"
@
click=
"getChild3(item.ChildList)"
class=
"el-icon-arrow-right"
></i>
</div>
</div>
</el-checkbox-group>
</div>
</el-col>
<el-col
v-show=
"childList3.length>0"
:span=
"8"
style=
"padding:0 10px;box-sizing:border-box"
>
<h3
style=
"padding:15px 0"
>
三级分类
</h3>
<div
class=
"app-goods-cat-list active"
>
<el-checkbox-group
v-model=
"checkList"
>
<div
v-for=
"(item,index) in childList3"
:key=
"index"
flex=
"dir:left box:first"
class=
"cat-item"
>
<el-checkbox
:label=
"item"
>
<span
style=
"display: none;"
>
{{item.Name}}
</span>
</el-checkbox>
<div
flex=
"box:last cross:center"
>
<span>
{{item.Name}}
</span>
<i
class=
"el-icon-arrow-right"
></i>
</div>
</div>
</el-checkbox-group>
</div>
</el-col>
</el-row>
<div
class=
"tag-box"
>
<el-tag
@
close=
"exitCheck(item)"
v-for=
"(item,index) in checkList"
:key=
"index"
type=
"warning"
closable
style=
"margin-right:5px"
>
{{item.Name}}
</el-tag>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"flDig = false"
>
取 消
</el-button>
<el-button
@
click=
"chooseFl"
size=
"small"
type=
"primary"
>
确 定
</el-button>
</span>
</el-dialog>
<!-- 批量修改 -->
<el-dialog
custom-class=
"plxg"
title=
"批量修改"
:visible
.
sync=
"plDig"
width=
"960px"
>
<span
class=
"absoSpan"
>
已选商品{{GoodsIds.length}}个
</span>
<div
class=
"batch-remark c99 f14"
>
注:每次只能修改一项,修改后点击确定即可生效。如需修改多项,需多次操作。
</div>
<div
style=
"margin-top:15px"
flex=
"dir:left box:first"
>
<div
flex=
"dir:top"
class=
"batch-box-left"
>
<div
flex=
"main:center"
@
click=
"ClearSelect(7)"
:class=
"plszMsg.Type==7?'batch-div-active':''"
>
运费
</div>
<div
flex=
"main:center"
@
click=
"ClearSelect(8)"
:class=
"plszMsg.Type==8?'batch-div-active':''"
>
限购
</div>
<div
flex=
"main:center"
@
click=
"ClearSelect(9)"
:class=
"plszMsg.Type==9?'batch-div-active':''"
>
积分
</div>
<div
flex=
"main:center"
@
click=
"ClearSelect(10)"
:class=
"plszMsg.Type==10?'batch-div-active':''"
>
快速购买
</div>
<div
flex=
"main:center"
@
click=
"ClearSelect(11)"
:class=
"plszMsg.Type==11?'batch-div-active':''"
>
面议
</div>
<div
flex=
"main:center"
@
click=
"ClearSelect(12)"
:class=
"plszMsg.Type==12?'batch-div-active':''"
>
供应商
</div>
</div>
<div
class=
"batch-box-right"
>
<el-form
class=
"app-batch"
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
label-width=
"100px"
>
<el-form-item
v-if=
"plszMsg.Type==7"
label=
"运费设置"
>
<el-tag
v-if=
"ruleSelect.RulesName"
@
close=
"plszMsg.FreightId=0,ruleSelect={}"
closable
>
{{ruleSelect.RulesName}}
</el-tag>
<el-button
@
click=
"chooseyfDig=true"
style=
"margin-left:10px;"
size=
"small"
>
选择运费
</el-button>
</el-form-item>
<el-form-item
v-if=
"plszMsg.Type==8"
label=
"每人限购"
>
<el-form-item
label-width=
"50px"
label=
"商品"
>
<el-input
:disabled=
"BuyGoodsNumState"
v-model=
"plszMsg.LimitBuyGoodsNum"
style=
"width:254px;margin-left:15px"
type=
"number"
min=
"1"
size=
"small"
placeholder=
"请输入内容"
class=
"input-with-select"
>
<el-button
slot=
"append"
>
件
</el-button>
</el-input>
<el-checkbox
@
change=
"goodChange(BuyGoodsNumState,1)"
style=
"margin-left:10px"
v-model=
"BuyGoodsNumState"
>
不限制
</el-checkbox>
</el-form-item>
<el-form-item
label-width=
"50px"
label=
"订单"
>
<el-input
:disabled=
"BuyOrderNumState"
v-model=
"plszMsg.LimitBuyOrderNum"
style=
"width:254px;margin-left:15px"
type=
"number"
min=
"1"
size=
"small"
placeholder=
"请输入内容"
class=
"input-with-select"
>
<el-button
slot=
"append"
>
单
</el-button>
</el-input>
<el-checkbox
@
change=
"goodChange(BuyOrderNumState,2)"
style=
"margin-left:10px"
v-model=
"BuyOrderNumState"
>
不限制
</el-checkbox>
</el-form-item>
</el-form-item>
<
template
v-if=
"plszMsg.Type==9"
>
<el-form-item
label=
"积分赠送"
>
<el-tooltip
class=
"item"
effect=
"dark"
placement=
"top"
style=
"position: absolute;left: -10px;top:12px"
>
<div
slot=
"content"
>
用户购物赠送的积分, 如果不填写或填写0,则默认为不赠送积分
<br
/>
如果为百分比则为按成交价格的比例计算积分
<br
/>
如: 购买2件,设置10 积分, 不管成交价格是多少, 则购买后获得20积分
<br
/>
如: 购买2件,设置10%积分, 成交价格2 * 200= 400, 则购买后获得 40 积分(400*10%)
<br
/>
</div>
<i
class=
"el-tooltip el-icon-info"
></i>
</el-tooltip>
<el-input
v-model=
"plszMsg.IntegralPresent"
style=
"width:670px;margin-left:15px"
type=
"number"
min=
"1"
size=
"small"
placeholder=
"请输入内容"
class=
"input-with-select"
>
<el-button
slot=
"append"
>
分
<el-radio
v-model=
"plszMsg.IntegralPresentType"
:label=
"2"
>
固定值
</el-radio>
<el-radio
v-model=
"plszMsg.IntegralPresentType"
:label=
"1"
>
百分比
</el-radio>
</el-button>
</el-input>
</el-form-item>
<el-form-item
label=
"积分抵扣"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"如果设置0,则不支持积分抵扣 如果带%则为按成交价格的比例计算抵扣多少元"
placement=
"top"
style=
"position: absolute;left: -10px;top:12px"
>
<i
class=
"el-tooltip el-icon-info"
></i>
</el-tooltip>
<el-input
v-model=
"plszMsg.PointsDeduction"
style=
"width:670px;margin-left:15px"
type=
"number"
min=
"1"
size=
"small"
placeholder=
"请输入内容"
class=
"input-with-select"
>
<template
slot=
"prepend"
>
最多抵扣
</
template
>
<el-button
slot=
"append"
>
分
<el-radio
v-model=
"plszMsg.PointsDeductionType"
:label=
"2"
>
固定值
</el-radio>
<el-radio
v-model=
"plszMsg.PointsDeductionType"
:label=
"1"
>
百分比
</el-radio>
</el-button>
</el-input>
</el-form-item>
<el-form-item
label-width=
"110px"
>
<el-checkbox
v-model=
"plszMsg.IsMultipleDeduction"
:true-label=
"1"
:false-label=
"2"
>
允许多件抵扣
</el-checkbox>
</el-form-item>
</template>
<el-form-item
v-if=
"plszMsg.Type==10"
label-width=
"160px"
label=
"是否加入快速购买"
>
<el-switch
v-model=
"plszMsg.IsQuickBuy"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"0"
>
</el-switch>
</el-form-item>
<el-form-item
class=
"spmy"
v-if=
"plszMsg.Type==11"
label-width=
"160px"
label=
"是否加入商品面议"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"如果开启面议,则商品无法在线支付"
placement=
"top"
style=
"position: absolute;left: -22px;top:12px"
>
<i
class=
"el-tooltip el-icon-info"
></i>
</el-tooltip>
<el-switch
v-model=
"plszMsg.IsGoodsNegotiable"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"0"
>
</el-switch>
</el-form-item>
<el-form-item
class=
"spmy"
v-if=
"plszMsg.Type==12"
label-width=
"160px"
label=
"供应商"
>
<el-select
class=
"w150"
style=
"margin-right: 10px;"
v-model=
"plszMsg.SupplierId"
size=
"small"
placeholder=
"请选择"
@
change=
'changeSupplier'
>
<el-option
v-for=
"item in options"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
</div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"plDig = false"
>
取 消
</el-button>
<el-button
@
click=
"plsetOk"
size=
"small"
type=
"primary"
>
确 定
</el-button>
</span>
</el-dialog>
<!-- 选择运费 -->
<el-dialog
title=
"选择运费"
top=
"2%"
:modal=
"false"
:modal-append-to-body=
'false'
:visible
.
sync=
"chooseyfDig"
width=
"25%"
>
<div>
<el-radio-group
v-model=
"val"
>
<el-radio
@
change=
"YfSelect"
class=
"yfradio"
v-for=
"(item,index) in ruleList"
:key=
"index"
:label=
"item"
>
{{item.RulesName}}
</el-radio>
</el-radio-group>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"chooseyfDig = false,ruleSelect={},plszMsg.FreightId=0"
>
取 消
</el-button>
<el-button
size=
"small"
@
click=
"chooseyfDig = false"
type=
"primary"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
export
default
{
name
:
"quickBuy"
,
data
()
{
return
{
chooseyfDig
:
false
,
plDig
:
false
,
flDig
:
false
,
val
:
''
,
dateList
:
[],
activeName
:
'first'
,
editState
:
false
,
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
Name
:
''
,
GoodsStatus
:
0
,
IsSelectSellOut
:
0
,
CategoryIds
:
''
,
Id
:
''
,
StartTime
:
''
,
EndTime
:
''
,
OrderBy
:
0
,
},
total
:
0
,
tableData
:
[],
loading
:
false
,
options
:
[],
addMsg
:
{
Id
:
0
,
Sort
:
''
,
Name
:
''
,
IsDefault
:
1
,
Remark
:
''
,
UpdateType
:
1
,
},
rules
:
{
CategoryIdNew
:
[{
required
:
true
,
message
:
'分类不能为空'
,
trigger
:
'change'
}],
Sort
:
[{
required
:
true
,
message
:
'请输入排序'
,
trigger
:
'blur'
}],
},
fenleiData
:
[],
checkList
:
[],
childList2
:
[],
childList3
:
[],
GoodsIds
:
[],
plszMsg
:
{
GoodsIds
:
''
,
Type
:
7
,
FreightId
:
0
,
LimitBuyGoodsNum
:
-
1
,
LimitBuyOrderNum
:
-
1
,
IntegralPresent
:
0
,
IntegralPresentType
:
2
,
PointsDeduction
:
0
,
PointsDeductionType
:
2
,
IsMultipleDeduction
:
2
,
IsQuickBuy
:
2
,
IsGoodsNegotiable
:
2
,
SupplierId
:
''
},
ruleList
:
[],
ruleSelect
:
{},
keepGoodsIds
:
''
,
BuyGoodsNumState
:
true
,
BuyOrderNumState
:
true
,
hpState
:
0
,
FxState
:
0
}
},
created
()
{
this
.
getList
();
this
.
getTree
();
this
.
getRule
();
this
.
getHpState
();
this
.
getFxState
();
this
.
getSupplierList
()
//获取供应商
},
methods
:
{
//获取是否开启和平返佣
getHpState
()
{
this
.
apipost
(
"/api/user/GetHpDistributorIsEnabled"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
hpState
=
res
.
data
.
data
;
}
})
},
//是否开启粉象返佣
getFxState
()
{
this
.
apipost
(
"/api/user/GetIsEnableFXDistributorGrade"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
FxState
=
res
.
data
.
data
;
}
})
},
goodChange
(
val
,
num
)
{
if
(
!
val
)
{
if
(
num
==
1
)
{
this
.
plszMsg
.
LimitBuyGoodsNum
=
0
;
}
else
if
(
num
==
2
)
{
this
.
plszMsg
.
LimitBuyOrderNum
=
0
;
}
}
},
Export
()
{
let
msg
=
this
.
msg
;
if
(
msg
.
Id
==
''
)
{
msg
.
Id
=
0
}
msg
=
JSON
.
parse
(
JSON
.
stringify
(
msg
));
msg
.
pageSize
=
999
;
this
.
GetLocalFile
(
"/api/Education/GetProductGoodsListToExcel"
,
msg
,
"课程列表.xls"
);
},
plsetOk
()
{
if
(
this
.
plszMsg
.
Type
==
7
)
{
// if(this.plszMsg.FreightId==0){
// this.Error("请选择运费规则");
// return;
// }
}
if
(
this
.
plszMsg
.
Type
==
8
)
{
if
(
this
.
plszMsg
.
BuyGoodsNumState
)
{
this
.
plszMsg
.
LimitBuyGoodsNum
=
-
1
}
if
(
this
.
plszMsg
.
BuyOrderNumState
)
{
this
.
plszMsg
.
LimitBuyOrderNum
=
-
1
}
}
let
mall_userInfo
=
JSON
.
parse
(
localStorage
.
mall_userInfo
)
if
(
mall_userInfo
.
TenantId
==
1
&&
mall_userInfo
.
MallBaseId
==
1
)
{
if
(
this
.
plszMsg
.
SupplierId
==
''
)
{
this
.
Error
(
"请选择供应商!"
);
return
}
else
{
this
.
commonSet
(
this
.
plszMsg
);
}
}
else
{
if
(
this
.
plszMsg
.
SupplierId
==
''
)
{
this
.
plszMsg
.
SupplierId
=
0
this
.
commonSet
(
this
.
plszMsg
)
}
else
{
this
.
commonSet
(
this
.
plszMsg
);
}
}
},
plsetBtn
()
{
if
(
this
.
GoodsIds
.
length
==
0
)
{
this
.
Error
(
"请先勾选要设置的商品!"
);
return
;
}
let
idList
=
[];
this
.
GoodsIds
.
forEach
(
item
=>
{
idList
.
push
(
item
.
Id
)
})
this
.
keepGoodsIds
=
idList
.
join
(
','
);
this
.
plszMsg
.
GoodsIds
=
this
.
keepGoodsIds
;
this
.
plszMsg
.
SupplierId
=
''
this
.
plDig
=
true
;
},
ClearSelect
(
type
)
{
this
.
plszMsg
=
{
GoodsIds
:
this
.
keepGoodsIds
,
Type
:
type
,
FreightId
:
0
,
LimitBuyGoodsNum
:
-
1
,
LimitBuyOrderNum
:
-
1
,
IntegralPresent
:
0
,
IntegralPresentType
:
2
,
PointsDeduction
:
0
,
PointsDeductionType
:
2
,
IsMultipleDeduction
:
2
,
IsQuickBuy
:
2
,
IsGoodsNegotiable
:
2
,
SupplierId
:
''
}
},
YfSelect
(
val
)
{
this
.
ruleSelect
=
val
;
this
.
plszMsg
.
FreightId
=
val
.
ID
;
},
tableSelect
(
val
)
{
this
.
GoodsIds
=
val
;
},
// 上架 下架 删除
tableSet
(
num
)
{
if
(
this
.
GoodsIds
.
length
==
0
)
{
this
.
Error
(
"请先勾选要设置的商品!"
);
return
;
}
let
idList
=
[];
this
.
GoodsIds
.
forEach
(
item
=>
{
idList
.
push
(
item
.
Id
)
})
let
GoodsIds
=
idList
.
join
(
','
);
let
msg
=
{
GoodsIds
:
GoodsIds
,
Type
:
num
,
}
let
str
=
""
;
if
(
num
==
4
)
{
str
=
"批量上架,是否继续"
;
}
if
(
num
==
5
)
{
str
=
"批量下架,是否继续"
;
}
if
(
num
==
6
)
{
str
=
"是否确认删除选中的商品?"
;
}
let
that
=
this
;
that
.
$confirm
(
str
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
commonSet
(
msg
);
}).
catch
(()
=>
{
});
},
Edit
(
row
,
num
)
{
let
addMsg
=
{
GoodsIds
:
row
.
Id
,
Type
:
num
,
Sort
:
row
.
SortNew
,
GoodsName
:
row
.
NameNew
,
IsQuickBuy
:
row
.
IsQuickBuy
};
this
.
commonSet
(
addMsg
)
},
commonSet
(
addMsg
)
{
this
.
apipost
(
'/api/product/SetProductGoodsQuickUpdate'
,
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
getList
();
this
.
Success
(
res
.
data
.
message
)
this
.
plDig
=
false
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
},
chooseFl
()
{
let
CategoryIds
=
[];
this
.
checkList
.
forEach
(
item
=>
{
CategoryIds
.
push
(
item
.
Id
)
})
this
.
msg
.
pageIndex
=
1
this
.
msg
.
CategoryIds
=
CategoryIds
.
join
(
","
);
this
.
getList
();
this
.
flDig
=
false
;
},
getChild3
(
ChildList
)
{
this
.
childList3
=
ChildList
;
},
getChild2
(
ChildList
)
{
this
.
childList2
=
ChildList
;
},
exitCheck
(
item
,
index
)
{
this
.
checkList
.
forEach
((
list
,
k
)
=>
{
if
(
list
.
Id
==
item
.
Id
)
{
this
.
checkList
.
splice
(
k
,
1
);
}
})
},
handleCheckChange
(
val
)
{},
Clearconditions
()
{
this
.
msg
.
Name
=
''
;
this
.
msg
.
CategoryIds
=
''
;
this
.
dateList
=
[];
this
.
checkList
=
[];
this
.
getList
();
},
handleClick
(
val
)
{
let
dataId
=
val
.
$attrs
.
dataId
;
if
(
dataId
==
0
)
{
this
.
msg
.
GoodsStatus
=
0
;
this
.
msg
.
IsSelectSellOut
=
0
;
}
if
(
dataId
==
1
)
{
this
.
msg
.
GoodsStatus
=
1
;
this
.
msg
.
IsSelectSellOut
=
0
;
}
if
(
dataId
==
2
)
{
this
.
msg
.
GoodsStatus
=
2
;
this
.
msg
.
IsSelectSellOut
=
0
;
}
this
.
msg
.
pageIndex
=
1
this
.
getList
();
},
Delete
(
item
)
{
let
that
=
this
;
that
.
$confirm
(
'是否删除?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
apipost
(
'/api/Education/DelGoodsInfo'
,
{
GoodsId
:
item
.
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
getList
();
this
.
Success
(
res
.
data
.
message
)
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
}).
catch
(()
=>
{
});
},
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
getList
()
{
if
(
this
.
dateList
&&
this
.
dateList
.
length
>
0
)
{
this
.
msg
.
StartTime
=
this
.
dateList
[
0
];
this
.
msg
.
EndTime
=
this
.
dateList
[
1
];
}
else
{
this
.
msg
.
StartTime
=
''
;
this
.
msg
.
EndTime
=
''
;
}
let
msg
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
msg
))
if
(
msg
.
Id
==
''
)
{
msg
.
Id
=
0
;
}
this
.
loading
=
true
;
this
.
apipost
(
"/api/Education/GetGoodsPageList"
,
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
total
=
res
.
data
.
data
.
count
;
let
pageData
=
res
.
data
.
data
.
pageData
;
pageData
.
forEach
(
item
=>
{
item
.
SortNew
=
item
.
Sort
;
item
.
NameNew
=
item
.
Name
;
item
.
editsort
=
false
;
item
.
editname
=
false
;
})
this
.
tableData
=
pageData
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
},
getTree
()
{
let
msg1
=
{
Id
:
0
,
Name
:
''
,
Tier
:
0
,
ParentId
:
0
,
Enabled
:
1
,
IsShow
:
1
,
}
this
.
apipost
(
"/api/product/GetProductCategoryTreeList"
,
msg1
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
pageData
=
res
.
data
.
data
;
this
.
fenleiData
=
pageData
;
}
})
},
getRule
()
{
let
msg1
=
{
pageIndex
:
1
,
pageSize
:
999
,
RulesName
:
''
,
}
this
.
apipost
(
"/api/MallBase/GetLogisticsRulesPage"
,
msg1
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
pageData
=
res
.
data
.
data
.
pageData
;
this
.
ruleList
=
pageData
;
}
})
},
changeSupplier
(
val
)
{},
getSupplierList
()
{
this
.
apipost
(
"/api/Supplier/GetSupplierAllList"
,
{},
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
options
=
res
.
data
.
data
;
}
});
},
getSort
(
val
)
{
//列表的升序降序
if
(
val
.
prop
==
'Id'
)
{
if
(
val
.
order
==
'ascending'
)
{
this
.
msg
.
OrderBy
=
1
}
else
if
(
val
.
order
==
'descending'
)
{
this
.
msg
.
OrderBy
=
2
}
else
{
this
.
msg
.
OrderBy
=
0
}
}
else
if
(
val
.
prop
==
'address'
)
{
if
(
val
.
order
==
'ascending'
)
{
this
.
msg
.
OrderBy
=
3
}
else
if
(
val
.
order
==
'descending'
)
{
this
.
msg
.
OrderBy
=
4
}
else
{
this
.
msg
.
OrderBy
=
0
}
}
else
if
(
val
.
prop
==
'SellingPrice'
)
{
if
(
val
.
order
==
'ascending'
)
{
this
.
msg
.
OrderBy
=
5
}
else
if
(
val
.
order
==
'descending'
)
{
this
.
msg
.
OrderBy
=
6
}
else
{
this
.
msg
.
OrderBy
=
0
}
}
else
if
(
val
.
prop
==
'InventoryNum'
)
{
if
(
val
.
order
==
'ascending'
)
{
this
.
msg
.
OrderBy
=
7
}
else
if
(
val
.
order
==
'descending'
)
{
this
.
msg
.
OrderBy
=
8
}
else
{
this
.
msg
.
OrderBy
=
0
}
}
this
.
getList
()
},
//新窗口跳转
goGoodsEdit
(
Id
)
{
let
routeData
=
this
.
$router
.
resolve
({
name
:
'educationEdit'
,
query
:
{
GoodsId
:
Id
,
hpState
:
this
.
hpState
,
FxState
:
this
.
FxState
}
});
window
.
open
(
routeData
.
href
,
"_blank"
);
}
},
};
</
script
>
<
style
>
.plxg
.spmy
.el-form-item__label
{
padding-right
:
26px
;
}
.yfradio
{
display
:
block
;
padding
:
10px
;
}
.plxg
.batch-div-active
{
background-color
:
#e2e2e2
;
}
.plxg
.batch-box-left
div
{
padding
:
5px
0
;
margin
:
5px
0
;
cursor
:
pointer
;
-webkit-border-radius
:
5px
;
-moz-border-radius
:
5px
;
border-radius
:
5px
;
}
.plxg
.batch-box-left
{
width
:
120px
;
border-right
:
1px
solid
#e2e2e2
;
padding
:
0
20px
;
}
.plxg
.el-dialog__body
{
padding-top
:
10px
!important
;
}
.plxg
.absoSpan
{
position
:
absolute
;
top
:
22px
;
left
:
100px
;
}
.app-add-cat
.el-checkbox-group
{
font-size
:
14px
!important
;
}
.app-add-cat
.el-checkbox
{
margin-right
:
0
;
}
.app-add-cat
.el-dialog__body
{
padding
:
10px
20px
!important
;
}
.app-add-cat
.tag-box
.tag-item
{
margin-right
:
5px
;
}
.app-add-cat
.tag-box
{
margin
:
20px
0
;
}
.app-add-cat
.app-goods-cat-list
.active
{
background
:
#FAFAFA
;
}
.app-add-cat
.app-goods-cat-list
.cat-item
{
cursor
:
pointer
;
padding
:
5px
10px
;
}
.app-add-cat
.app-goods-cat-list
{
border
:
1px
solid
#E8EAEE
;
border-radius
:
5px
;
margin-top
:
-5px
;
padding
:
10px
0
;
overflow
:
scroll
;
height
:
400px
;
}
.goodsList
.vue-line-clamp
{
display
:
block
;
display
:
-webkit-box
;
-webkit-box-orient
:
vertical
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.goodsList
.content
{
background
:
#fff
;
margin-top
:
10px
;
padding
:
20px
;
box-sizing
:
border-box
;
}
</
style
>
src/components/education/educationEdit.vue
0 → 100644
View file @
e7166801
<
template
>
<div
class=
"directorGoodsEdit"
>
<div
class=
"head-title"
>
<span
@
click=
"CommonJump('CourseManagement')"
class=
"blue point"
>
商品列表
</span>
/ 添加商品
</div>
<div
style=
"background:#fff;margin-top:10px;padding:10px 20px 20px"
>
<el-form
class=
"app-batch"
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
label-width=
"180px"
>
<el-tabs
v-model=
"activeName"
>
<el-tab-pane
label=
"商品设置"
name=
"first"
>
<el-card
shadow=
"never"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
选择分类
</span>
</div>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"上架版面"
>
<el-radio-group
v-model=
"addMsg.GoodsPageType"
@
change=
"getGoodType(addMsg.GoodsPageType)"
>
<el-radio
v-for=
"(item,index) in My_cateList"
:key=
"index"
:label=
"item.Id"
>
{{
item
.
Name
}}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"商品分类"
>
<template
v-if=
"
addMsg.CategoryList && addMsg.CategoryList.length > 0
"
>
<el-tag
type=
"warning"
style=
"margin-right:10px;"
@
close=
"exitCheck(item, index)"
v-for=
"(item, index) in addMsg.CategoryList"
:key=
"index+'1'"
closable
>
{{
item
.
CategoryName
}}
</el-tag>
</
template
>
<el-button
type=
"primary"
@
click=
"
(flDig = true), (keepCategoryList = addMsg.CategoryList)
"
style=
"margin:0 10px;"
size=
"small"
>
选择分类
</el-button>
<span
@
click=
"CommonJump('addGoodsClass')"
class=
"blue point"
>
添加分类
</span>
</el-form-item>
</el-col>
</el-row>
</el-card>
<el-card
style=
"margin-top:20px"
shadow=
"never"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
基本信息
</span>
</div>
<el-row>
<el-col
:span=
"12"
>
<el-form-item>
<label
slot=
"label"
>
课程编码
<el-tooltip
class=
"item"
effect=
"dark"
content=
"只能从商城中获取商品信息,且基本信息与商城商品保持一致"
placement=
"top"
>
<i
class=
"el-icon-info"
></i>
</el-tooltip>
</label>
<el-input
v-model=
"addMsg.Id"
type=
"number"
min=
"1"
size=
"small"
placeholder=
"请输入内容"
class=
"input-with-select"
>
<el-button
slot=
"append"
@
click=
"getcode()"
>
获取
</el-button>
</el-input>
</el-form-item>
<el-form-item
label=
"课程名称"
prop=
"Name"
>
<el-input
v-model=
"addMsg.Name"
size=
"small"
placeholder=
"请输入内容"
maxlength=
"100"
show-word-limit
>
</el-input>
</el-form-item>
<el-form-item
label=
"课程副标题"
>
<el-input
v-model=
"addMsg.SubName"
size=
"small"
placeholder=
"请输入内容"
maxlength=
"100"
show-word-limit
>
</el-input>
</el-form-item>
<el-form-item
label=
"供应商"
prop=
"SupplierId"
>
<el-select
class=
"w150"
style=
"margin-right: 10px;"
v-model=
"SupplierId"
size=
"small"
placeholder=
"请选择"
>
<el-option
v-for=
"item in options"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<label
slot=
"label"
>
课程封面图(单张)
<el-tooltip
class=
"item"
effect=
"dark"
content=
"课程封面图"
placement=
"top"
>
<i
class=
"el-icon-info"
></i>
</el-tooltip>
</label>
<div
class=
"nav_Main"
>
<div
class=
"nav_IconContent"
>
<div
v-for=
"(item, index) in addMsg.CarouselImageList"
:key=
"index+'2'"
style=
"margin-right: 20px; position: relative; "
>
<div
class=
"colapp-image"
:style=
"{
backgroundImage: 'url(' + item.Path + ')'
}"
></div>
<el-button
@
click=
"ClearCarouse(index)"
class=
"delBtn"
type=
"danger"
icon=
"el-icon-close"
circle
></el-button>
</div>
</div>
<div
@
click=
"openChangeDig(1)"
v-if=
"addMsg.CarouselImageList.length==0"
class=
"add-image-btn 2222"
>
+ 添加图片
</div>
</div>
</el-form-item>
<el-form-item
label=
"课程封面视频"
>
<el-input
v-model=
"addMsg.VideoAddress"
size=
"small"
placeholder=
"请输入内容"
>
<el-button
@
click=
"changeState1 = true,videoType=1"
slot=
"append"
>
添加视频
</el-button>
</el-input>
<a
v-if=
"addMsg.VideoAddress != ''"
class=
"blue noline"
:href=
"addMsg.VideoAddress"
target=
"_blank"
>
视频链接
</a>
</el-form-item>
<el-form-item>
<label
slot=
"label"
>
自定义分享标题
<el-tooltip
class=
"item"
effect=
"dark"
content=
"分享给好友时,作为商品名称"
placement=
"top"
>
<i
class=
"el-icon-info"
></i>
</el-tooltip>
</label>
<el-input
v-model=
"addMsg.CustomShareTitles"
size=
"small"
placeholder=
"请输入内容"
class=
"input-with-select"
></el-input>
<p
class=
"blue point"
@
click=
"imgDig = true"
>
查看图例
</p>
</el-form-item>
<el-form-item
class=
"commonLabel discount"
>
<label
slot=
"label"
>
自定义分享封面图
<el-tooltip
class=
"item"
effect=
"dark"
content=
"分享给好友时,作为分享图片"
placement=
"top"
>
<i
class=
"el-icon-info"
></i>
</el-tooltip>
</label>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"建议尺寸420*336"
placement=
"top"
>
<el-button
@
click=
"openChangeDig(2)"
size=
"small"
>
选择图片
</el-button>
</el-tooltip>
<div
class=
"app-gallery-item"
style=
"position: relative;width: 100px;margin-top: 10px;border:none"
>
<img
v-if=
"
!addMsg.CustomShareImage ||
addMsg.CustomShareImage == ''
"
src=
"../../assets/img/default.png"
style=
"width:80px;height:80px"
alt=
""
/>
<el-button
@
click=
"clearCustom"
style=
"position: absolute;right: 6px;top: -10px;"
v-if=
"
addMsg.CustomShareImage &&
addMsg.CustomShareImage != ''
"
size=
"mini"
type=
"danger"
icon=
"el-icon-close"
circle
></el-button>
<img
v-if=
"addMsg.CustomShareImage ||addMsg.CustomShareImage !=''"
style=
"width:80px;height:80px"
:src=
"addMsg.CustomShareImage"
alt=
""
/>
</div>
<p
style=
"margin-top:-15px"
class=
"blue f12"
>
<span
class=
"point"
@
click=
"imgDig = true"
>
查看图例
</span>
</p>
</el-form-item>
<el-form-item
label=
"关联讲师"
>
<
template
v-if=
"addMsg.TeacherList.length>0"
>
<el-tag
v-for=
"(item,index) in addMsg.TeacherList"
closable
size=
"small"
@
close=
"yichuTeacher(index)"
style=
"margin-right:5px;"
:key=
"index"
>
{{
item
.
Name
}}
</el-tag>
</
template
>
<el-button
@
click=
"choosejsDig=true"
size=
"mini"
>
选择教师
</el-button>
</el-form-item>
<el-form-item
label=
"直播商品"
>
<el-switch
v-model=
"addMsg.IsLiveGoods"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"2"
>
</el-switch>
</el-form-item>
<el-form-item
label=
"上架状态"
>
<el-switch
v-model=
"addMsg.GoodsStatus"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"2"
>
</el-switch>
</el-form-item>
</el-col>
</el-row>
</el-card>
<el-card
style=
"margin-top:20px"
shadow=
"never"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
课程信息
</span>
<el-button
style=
"margin-left:50%"
@
click=
"courseDialog=true,isReplace=0"
size=
"mini"
>
添加课程
</el-button>
</div>
<el-row>
<el-col
:span=
"24"
>
<div
class=
"courseInfo"
>
<div
class=
"courseHeader"
>
<div
style=
"width:100px;"
>
章节排序
</div>
<div
style=
"width:120px;"
>
章节排序名称
</div>
<div>
名称
</div>
<div>
类型
</div>
<div>
试看
</div>
<div
style=
"width:16%;overflow:hidden"
>
试看视频秒/word pdf页
</div>
<div>
缓存
</div>
<div>
附件
</div>
<div>
操作
</div>
</div>
<div
class=
"courseContent"
>
<draggable
v-model=
"addMsg.CourseList"
@
end=
'allow'
>
<div
class=
"courseList"
v-for=
"(subItem,index) in addMsg.CourseList"
:key=
"index"
>
<div
style=
"width:100px;"
>
{{subItem.Sort}}
</div>
<div
style=
"width:120px;"
>
{{subItem.SortName}}
</div>
<div>
{{subItem.Name}}
</div>
<div>
<span
v-if=
"subItem.Type==1"
>
视频
</span>
<span
v-if=
"subItem.Type==2"
>
WORD
</span>
<span
v-if=
"subItem.Type==3"
>
PDF
</span>
<span
v-if=
"subItem.Type==4"
>
PPT
</span>
</div>
<div>
<span
v-if=
"subItem.IsTrySee==1"
>
可以
</span>
<span
v-if=
"subItem.IsTrySee==2"
>
不可以
</span>
</div>
<div
style=
"width:16%"
>
{{subItem.Number}}
</div>
<div>
<span
v-if=
"subItem.IsCache==1"
>
可以
</span>
<span
v-if=
"subItem.IsCache==2"
>
不可以
</span>
</div>
<div
class=
"courseFileDiv"
>
<div
class=
"eduFileDiv"
>
<img
v-if=
"getFileType(subItem.FilePath)==1"
@
click=
"goUrlVideo(subItem.FilePath)"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/z_video.png"
alt=
""
>
<img
v-if=
"getFileType(subItem.FilePath)==2"
@
click=
"showUpLoadFileT(subItem.FilePath)"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/WORD.png"
alt=
""
>
<img
v-if=
"getFileType(subItem.FilePath)==3"
@
click=
"showUpLoadFileT(subItem.FilePath)"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/pdf.png"
alt=
""
>
<img
v-if=
"getFileType(subItem.FilePath)==4"
@
click=
"showUpLoadFileT(subItem.FilePath)"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/PPT.png"
alt=
""
>
</div>
</div>
<div>
<img
@
click=
"updateCourse(subItem,index)"
style=
"width:32px;height:32px"
src=
"../../assets/img/userman/edit.png"
alt=
""
>
<img
@
click=
"deleteCourse(index)"
style=
"width:32px;height:32px;margin:0 10px"
src=
"../../assets/img/userman/del.png"
alt=
""
>
</div>
</div>
</draggable>
</div>
</div>
</el-col>
</el-row>
</el-card>
<el-card
style=
"margin-top:20px"
shadow=
"never"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
价格库存
</span>
</div>
<el-row>
<el-col
:span=
"12"
>
<el-form-item>
<label
slot=
"label"
>
排序
<el-tooltip
class=
"item"
effect=
"dark"
content=
"排序值越小排序越靠前"
placement=
"top"
>
<i
class=
"el-icon-info"
></i>
</el-tooltip>
</label>
<el-input
v-model=
"addMsg.Sort"
type=
"number"
min=
"1"
size=
"small"
placeholder=
"请输入内容"
class=
"input-with-select"
></el-input>
</el-form-item>
<el-form-item
label=
"售价"
prop=
"SellingPrice"
>
<el-input
v-model=
"addMsg.SellingPrice"
type=
"number"
min=
"1"
size=
"small"
placeholder=
"请输入内容"
class=
"input-with-select"
>
<el-button
slot=
"append"
>
元
</el-button>
</el-input>
</el-form-item>
<el-form-item
label=
"原价"
prop=
"OriginalPrice"
>
<el-input
v-model=
"addMsg.OriginalPrice"
type=
"number"
min=
"1"
size=
"small"
placeholder=
"请输入内容"
class=
"input-with-select"
>
<el-button
slot=
"append"
>
元
</el-button>
</el-input>
</el-form-item>
<el-form-item
label=
"成本价"
>
<el-input
@
change=
"getSuggestPrice"
v-model=
"addMsg.CostPrice"
type=
"number"
min=
"1"
size=
"small"
placeholder=
"请输入内容"
class=
"input-with-select"
>
<el-button
slot=
"append"
>
元
</el-button>
</el-input>
<span
v-if=
"
SuggestPriceInfo.Status && SuggestPriceInfo.Status == 1
"
class=
"cred"
style=
"position: absolute;width: 400px;margin-left: 15px;"
>
建议零售价:¥{{ SuggestPriceInfo.MPrice }}
</span>
</el-form-item>
<!-- 判断是开启了粉象返佣 -->
<el-form-item
label=
"返佣总金额"
prop=
"Commission"
v-if=
"FxState==1"
>
<el-input
v-model=
"addMsg.Commission"
@
keyup
.
native=
"checkPrice(addMsg,'Commission')"
size=
"small"
placeholder=
"请输入内容"
class=
"input-with-select"
>
<el-button
slot=
"append"
>
元
</el-button>
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-card>
<el-card
style=
"margin-top:20px"
shadow=
"never"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
营销设置
</span>
</div>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"积分赠送"
>
<el-tooltip
class=
"item"
effect=
"dark"
placement=
"top"
style=
"position: absolute;left: -10px;top:12px"
>
<div
slot=
"content"
>
用户购物赠送的积分,
如果不填写或填写0,则默认为不赠送积分
<br
/>
如果为百分比则为按成交价格的比例计算积分
<br
/>
如: 购买2件,设置10 积分, 不管成交价格是多少,
则购买后获得20积分
<br
/>
如: 购买2件,设置10%积分, 成交价格2 * 200= 400,
则购买后获得 40 积分(400*10%)
<br
/>
</div>
<i
class=
"el-tooltip el-icon-info"
></i>
</el-tooltip>
<el-input
v-model=
"addMsg.IntegralPresent"
style=
"width:100%;margin-left:15px"
type=
"number"
min=
"1"
size=
"small"
placeholder=
"请输入内容"
class=
"input-with-select"
>
<el-button
slot=
"append"
>
分
<el-radio
v-model=
"addMsg.IntegralPresentType"
:label=
"2"
>
固定值
</el-radio>
<el-radio
v-model=
"addMsg.IntegralPresentType"
:label=
"1"
>
百分比
</el-radio>
</el-button>
</el-input>
</el-form-item>
<el-form-item
label=
"积分抵扣"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"如果设置0,则不支持积分抵扣 如果带%则为按成交价格的比例计算抵扣多少元"
placement=
"top"
style=
"position: absolute;left: -10px;top:12px"
>
<i
class=
"el-tooltip el-icon-info"
></i>
</el-tooltip>
<el-input
v-model=
"addMsg.PointsDeduction"
style=
"width:100%;margin-left:15px"
type=
"number"
min=
"1"
size=
"small"
placeholder=
"请输入内容"
class=
"input-with-select"
>
<
template
slot=
"prepend"
>
最多抵扣
</
template
>
<el-button
slot=
"append"
>
元
<el-radio
v-model=
"addMsg.PointsDeductionType"
:label=
"2"
>
固定值
</el-radio>
<el-radio
v-model=
"addMsg.PointsDeductionType"
:label=
"1"
>
百分比
</el-radio>
</el-button>
</el-input>
</el-form-item>
<el-form-item
label-width=
"200px"
>
<el-checkbox
v-model=
"addMsg.IsMultipleDeduction"
:true-label=
"1"
:false-label=
"2"
>
允许多件抵扣
</el-checkbox>
</el-form-item>
<el-form-item
label=
"广告词"
>
<el-input
v-model=
"addMsg.Advertising"
style=
"width:100%;margin-left:15px"
type=
"textarea"
:rows=
"3"
size=
"small"
placeholder=
"请输入内容"
class=
"input-with-select"
></el-input>
</el-form-item>
<el-form-item
label=
"标签类型"
>
<el-radio
v-model=
"addMsg.MarketingLogo.iswords"
:label=
"1"
>
文字模式
</el-radio>
<el-radio
v-model=
"addMsg.MarketingLogo.iswords"
:label=
"2"
>
图片模式
</el-radio>
<el-radio
v-model=
"addMsg.MarketingLogo.iswords"
:label=
"0"
>
无模式
</el-radio>
</el-form-item>
<el-form-item
label=
"标签文字"
v-if=
"addMsg.MarketingLogo.iswords==1"
>
<el-input
v-model=
"addMsg.MarketingLogo.words"
style=
"width:100%;margin-left:15px"
size=
"small"
placeholder=
"请输入内容"
class=
"input-with-select"
maxlength=
'10'
show-word-limit
></el-input>
</el-form-item>
<el-form-item
label=
"标签字体颜色"
v-if=
"addMsg.MarketingLogo.iswords==1"
>
<el-color-picker
style=
"width:100%;margin-left:15px"
v-model=
"addMsg.MarketingLogo.wordsColor"
show-alpha
:predefine=
"predefineColors"
>
</el-color-picker>
</el-form-item>
<el-form-item
label=
"标签背景颜色"
v-if=
"addMsg.MarketingLogo.iswords==1"
>
<el-color-picker
style=
"width:100%;margin-left:15px"
v-model=
"addMsg.MarketingLogo.wordsBack"
show-alpha
:predefine=
"predefineColors"
>
</el-color-picker>
</el-form-item>
<el-form-item
class=
"commonLabel discount"
label=
"标签图片"
v-if=
"addMsg.MarketingLogo.iswords==2"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"建议尺寸"
placement=
"top"
>
<el-button
@
click=
"openChangeDig(4)"
size=
"small"
>
选择图片
</el-button>
</el-tooltip>
<div
class=
"app-gallery-item"
style=
"position: relative;width: 100px;margin-top: 10px;border:none"
>
<img
v-if=
"
!addMsg.MarketingLogo.ico ||
addMsg.MarketingLogo.ico == ''
"
src=
"../../assets/img/default.png"
style=
"width:80px;height:80px"
alt=
""
/>
<el-button
@
click=
"addMsg.MarketingLogo.ico = ''"
style=
"position: absolute;right: 6px;top: -10px;"
v-if=
"
addMsg.MarketingLogo.ico &&
addMsg.MarketingLogo.ico != ''
"
size=
"mini"
type=
"danger"
icon=
"el-icon-close"
circle
></el-button>
<img
style=
"width:80px;height:80px"
:src=
"addMsg.MarketingLogo.ico"
alt=
""
/>
</div>
</el-form-item>
</el-col>
</el-row>
</el-card>
<el-card
style=
"margin-top:20px"
shadow=
"never"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
商品详情
</span>
</div>
<el-row>
<el-col
:span=
"242"
>
<UE
style=
"width:750px;"
:defaultMsg=
"defaultMsg"
:config=
"config"
:IsMultiple=
"true"
ref=
"ue"
></UE>
</el-col>
</el-row>
</el-card>
</el-tab-pane>
<el-tab-pane
label=
"分销价设置"
name=
"second"
>
<el-form-item
label=
"是否开启单独分销"
>
<el-switch
@
change=
"HpChange"
v-model=
"addMsg.SeparateDistribution"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"0"
>
</el-switch>
</el-form-item>
<
template
v-if=
"addMsg.SeparateDistribution == 1"
>
<el-form-item
label=
"分销佣金类型"
>
<el-radio
v-model=
"addMsg.SeparateDistributionMoneyType"
:label=
"2"
>
固定金额
</el-radio>
<el-radio
v-model=
"addMsg.SeparateDistributionMoneyType"
:label=
"1"
>
百分比
</el-radio>
</el-form-item>
<el-form-item
class=
"111"
>
<div
v-if=
"addMsg.SeparateDistributionType == 1"
class=
"app-attr"
>
<div
class=
"box"
>
<el-form-item
label-width=
"90px"
style=
"display:inline-block"
label=
"批量设置"
>
<el-select
style=
"width:130px"
v-model=
"pusetVal"
size=
"small"
>
<el-option
v-for=
"(item, index) in butorInt"
:label=
"`$
{index + 1}级分销`" :value="index + 1"
:key="index+'8'">
</el-option>
</el-select>
<el-input
style=
"width:150px;position:relative;top:5px"
size=
"small"
v-model=
"ptinput"
placeholder=
"请输入内容"
>
<el-button
slot=
"append"
>
<span
v-if=
"addMsg.SeparateDistributionMoneyType == 2"
>
元
</span>
<span
v-if=
"addMsg.SeparateDistributionMoneyType == 1"
>
%
</span>
</el-button>
</el-input>
<el-button
@
click=
"PuSet"
style=
"position:relative;"
size=
"small"
type=
"primary"
>
设置
</el-button>
</el-form-item>
</div>
<el-table
ref=
"table"
:data=
"GradeCommissionList"
border
style=
"width: 100%"
@
selection-change=
"TbaleSelectionChange2"
>
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
<el-table-column
width=
"100"
label=
"等级名称"
>
<template
slot-scope=
"scope"
>
<template
v-for=
"(item2, index) in DropdownList"
>
<span
:key=
"index+'9'"
v-if=
"scope.row.DistributorGrade == item2.Id"
>
{{
item2
.
Name
}}
</span>
</
template
>
</template>
</el-table-column>
<
template
v-for=
"(item, index) in butorIntList"
>
<el-table-column
:key=
"index+'10'"
:label=
"item.Name"
>
<template
slot-scope=
"scope"
>
<span>
<el-input
v-model=
"scope.row.OneCommission"
v-if=
"index == 0"
size=
"small"
>
<el-button
slot=
"append"
>
<span
v-if=
"
addMsg.SeparateDistributionMoneyType == 2
"
>
元
</span>
<span
v-if=
"
addMsg.SeparateDistributionMoneyType == 1
"
>
%
</span>
</el-button>
</el-input>
<el-input
v-model=
"scope.row.TwoCommission"
v-if=
"index == 1"
size=
"small"
>
<el-button
slot=
"append"
>
<span
v-if=
"
addMsg.SeparateDistributionMoneyType == 2
"
>
元
</span>
<span
v-if=
"
addMsg.SeparateDistributionMoneyType == 1
"
>
%
</span>
</el-button>
</el-input>
<el-input
v-model=
"scope.row.ThreeCommission"
v-if=
"index == 2"
size=
"small"
>
<el-button
slot=
"append"
>
<span
v-if=
"
addMsg.SeparateDistributionMoneyType == 2
"
>
元
</span>
<span
v-if=
"
addMsg.SeparateDistributionMoneyType == 1
"
>
%
</span>
</el-button>
</el-input>
</span>
</
template
>
</el-table-column>
</template>
</el-table>
</div>
</el-form-item>
</template>
<
template
v-if=
"hpState==1"
>
<table
class=
"fen-table"
>
<thead>
<tr>
<th>
结算对象
</th>
<th>
结算成本(毛利)
</th>
<th>
预计返佣金额
</th>
</tr>
</thead>
<tbody>
<tr
v-for=
"(x, i) in shareSettings"
:key=
"i"
>
<td>
{{
x
.
GradeName
}}
</td>
<td>
{{
x
.
cb
}}
(
{{
x
.
CommissionRatio
}}
%)
</td>
<td>
{{
x
.
commission
}}
</td>
</tr>
</tbody>
</table>
<div
class=
"fen-sumg"
>
<span
style=
"margin-right:30px"
>
直客卖价:
{{
addMsg
.
SellingPrice
}}
</span>
<span
style=
"margin-right:30px"
>
成本:
{{
addMsg
.
CostPrice
}}
</span>
<span
style=
"margin-right:30px;color:red;"
>
预计公司利润:
{{
companyCommission
}}
</span>
</div>
</
template
>
</el-tab-pane>
<el-tab-pane
label=
"会员价设置"
name=
"third"
>
<el-form-item
label=
"是否享受会员功能"
>
<el-switch
v-model=
"addMsg.EnjoyMember"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"0"
>
</el-switch>
</el-form-item>
<el-form-item
label=
"是否单独设置会员价"
>
<el-switch
v-model=
"addMsg.SeparateSetMember"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"0"
>
</el-switch>
</el-form-item>
<el-form-item
v-if=
"addMsg.SeparateSetMember == 1 && huiyList.length == 0"
label=
"会员价设置"
>
<el-button
@
click=
"CommonJump('setMember')"
size=
"small"
type=
"danger"
>
如需设置请先添加会员
</el-button>
</el-form-item>
<el-form-item
v-if=
"addMsg.SeparateSetMember == 1
"
label=
"默认规格会员价设置"
>
<
template
v-if=
"memberList1&&memberList1[0].GradePriceList.length>0"
>
<div
v-for=
"(item, index) in memberList1[0].GradePriceList"
:key=
"index+'15'"
>
<el-input
style=
"width:700px"
placeholder=
"请输入内容"
v-model=
"item.MemberPrice"
size=
"small"
class=
"input-with-select"
>
<el-button
slot=
"prepend"
>
{{
item
.
MemberGrade
}}
级会员
</el-button>
<el-button
slot=
"append"
>
元
</el-button>
</el-input>
</div>
</
template
>
</el-form-item>
</el-tab-pane>
</el-tabs>
</el-form>
<div
class=
"bottom-div"
style=
"margin-top:20px"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"Save('addMsg')"
>
保存
</el-button>
<!-- <el-button size="small">预览</el-button> -->
</div>
</div>
<!-- 选择分类 -->
<el-dialog
custom-class=
"app-add-cat"
title=
"选择分类"
:visible
.
sync=
"flDig"
width=
"1100px"
>
<el-row>
<el-col
:span=
"8"
style=
"padding:0 10px;box-sizing:border-box"
>
<h3
style=
"padding:15px 0"
>
一级分类
</h3>
<div
class=
"app-goods-cat-list active"
>
<el-checkbox-group
v-model=
"NewCategoryList"
@
change=
"handleCheckChange"
>
<div
v-for=
"(item, index) in fenleiData"
:key=
"index+'19'"
flex=
"dir:left box:first"
class=
"cat-item"
>
<el-checkbox
:label=
"item.Id"
>
<span
style=
"display: none;"
>
{{ item.Name }}
</span>
</el-checkbox>
<div
flex=
"box:last cross:center"
>
<span>
{{ item.Name }}
</span>
<i
v-if=
"item.ChildList.length > 0"
@
click=
"getChild2(item.ChildList)"
class=
"el-icon-arrow-right"
></i>
</div>
</div>
</el-checkbox-group>
</div>
</el-col>
<el-col
v-show=
"childList2.length > 0"
:span=
"8"
style=
"padding:0 10px;box-sizing:border-box"
>
<h3
style=
"padding:15px 0"
>
二级分类
</h3>
<div
class=
"app-goods-cat-list active"
>
<el-checkbox-group
v-model=
"NewCategoryList"
@
change=
"handleCheckChange"
>
<div
v-for=
"(item, index) in childList2"
:key=
"index+'20'"
flex=
"dir:left box:first"
class=
"cat-item"
>
<el-checkbox
:label=
"item.Id"
>
<span
style=
"display: none;"
>
{{ item.Name }}
</span>
</el-checkbox>
<div
flex=
"box:last cross:center"
>
<span>
{{ item.Name }}
</span>
<i
v-if=
"item.ChildList.length > 0"
@
click=
"getChild3(item.ChildList)"
class=
"el-icon-arrow-right"
></i>
</div>
</div>
</el-checkbox-group>
</div>
</el-col>
<el-col
v-show=
"childList3.length > 0"
:span=
"8"
style=
"padding:0 10px;box-sizing:border-box"
>
<h3
style=
"padding:15px 0"
>
三级分类
</h3>
<div
class=
"app-goods-cat-list active"
>
<el-checkbox-group
v-model=
"NewCategoryList"
@
change=
"handleCheckChange"
>
<div
v-for=
"(item, index) in childList3"
:key=
"index+'21'"
flex=
"dir:left box:first"
class=
"cat-item"
>
<el-checkbox
:label=
"item.Id"
>
<span
style=
"display: none;"
>
{{ item.Name }}
</span>
</el-checkbox>
<div
flex=
"box:last cross:center"
>
<span>
{{ item.Name }}
</span>
<i
class=
"el-icon-arrow-right"
></i>
</div>
</div>
</el-checkbox-group>
</div>
</el-col>
</el-row>
<div
class=
"tag-box"
>
<el-tag
@
close=
"exitCheck(item)"
v-for=
"(item, index) in addMsg.CategoryList"
:key=
"index+'22'"
type=
"warning"
closable
style=
"margin-right:5px"
>
{{ item.Name }}
</el-tag>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"
(flDig = false),
(addMsg.CategoryList = keepCategoryList),
ExitCateList()
"
>
取 消
</el-button>
<el-button
@
click=
"(flDig = false), getSuggestPrice()"
size=
"small"
type=
"primary"
>
确 定
</el-button>
</span>
</el-dialog>
<!-- 查看图例 -->
<el-dialog
title=
"查看自定义分享图片图例"
:visible
.
sync=
"imgDig"
width=
"30%"
>
<div
class=
"center"
>
<img
style=
" width: 310px;height: 360px;"
src=
"../../assets/img/userman/app-share-name.png"
alt=
""
/>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"imgDig = false"
size=
"small"
type=
"primary"
>
我知道了
</el-button>
</span>
</el-dialog>
<!-- 选择图片 -->
<el-dialog
title=
"选择图片"
:visible
.
sync=
"changeState"
width=
"1240px"
>
<ChooseImg
@
SelectId=
"SelectId"
:IsMultiple=
"true"
></ChooseImg>
</el-dialog>
<!-- 选择视频 -->
<el-dialog
title=
"选择视频"
:visible
.
sync=
"changeState1"
width=
"1240px"
>
<Choosevideo
@
Selectvideo=
"Selectvideo"
></Choosevideo>
</el-dialog>
<!-- 选择其他文件 -->
<el-dialog
title=
"选择文件"
:visible
.
sync=
"fileDialog"
width=
"1240px"
>
<ChooseFile
@
SelectFile=
"SelectFile"
></ChooseFile>
</el-dialog>
<!-- 选择表单 -->
<el-dialog
title=
"选择表单"
top=
"2%"
:visible
.
sync=
"choosebdDig"
width=
"30%"
>
<div>
<el-radio-group
v-model=
"val1"
>
<el-radio
@
change=
"YfSelect1"
style=
"padding-bottom:10px"
class=
"yfradio"
:label=
"{ Name: '默认运费', Id: 0 }"
>
默认表单
</el-radio>
</el-radio-group>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"(choosebdDig = false), (addMsg.FormsId = keepFormsId)"
>
取 消
</el-button>
<el-button
size=
"small"
@
click=
"choosebdDig = false"
type=
"primary"
>
确 定
</el-button>
</span>
</el-dialog>
<!--区域-->
<el-dialog
custom-class=
"regionDig"
title=
"区域"
:visible
.
sync=
"dialogFormVisible"
width=
"950px"
>
<region
_Choice
@
event1=
"change($event)"
:List=
"AreaList"
ref=
"child"
></region
_Choice
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"Addto"
>
确 定
</el-button>
</div>
</el-dialog>
<!-- 选择教师 -->
<el-dialog
title=
"选择教师"
top=
"2%"
:visible
.
sync=
"choosejsDig"
width=
"30%"
>
<div>
<el-checkbox-group
v-model=
"ckedTeacher"
>
<el-checkbox
v-for=
"(item,index) in teacherList"
:label=
"item.ID"
:key=
"index"
>
{{item.Name}}
</el-checkbox>
</el-checkbox-group>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"choosejsDig = false"
>
取 消
</el-button>
<el-button
size=
"small"
@
click=
"getckedTeachArr"
type=
"primary"
>
确 定
</el-button>
</span>
</el-dialog>
<!-- 课程弹窗 -->
<el-dialog
title=
"新增课程"
:visible
.
sync=
"courseDialog"
width=
"500px"
>
<el-form
label-width=
"100px"
>
<el-form-item
label=
"名称"
>
<el-input
v-model=
"courseMsg.Name"
size=
"small"
></el-input>
</el-form-item>
<el-form-item
label=
"类型"
>
<el-select
style=
"margin-right: 10px;"
v-model=
"courseMsg.Type"
size=
"small"
placeholder=
"请选择"
>
<el-option
v-for=
"item in fileList"
:key=
"item.Id"
:label=
"item.Name"
:value=
"item.Id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"试看"
size=
"small"
>
<el-switch
v-model=
"courseMsg.IsTrySee"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"2"
>
</el-switch>
</el-form-item>
<el-form-item
label=
"试看"
>
<el-input
v-model=
"courseMsg.Number"
@
keyup
.
native=
"checkInteger(courseMsg,'Number')"
size=
"small"
></el-input>
</el-form-item>
<el-form-item
label=
"缓存"
>
<el-switch
v-model=
"courseMsg.IsCache"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"2"
>
</el-switch>
</el-form-item>
<el-form-item
label=
"附件路径"
>
<el-input
v-model=
"courseMsg.FilePath"
size=
"small"
placeholder=
"请输入内容"
>
<
template
v-if=
"courseMsg.Type==1"
>
<el-button
@
click=
"changeState1 = true,videoType=2"
slot=
"append"
>
添加视频
</el-button>
</
template
>
<
template
v-else
>
<el-button
@
click=
"fileDialog = true"
slot=
"append"
>
<span
v-if=
"courseMsg.Type==2"
>
添加WORD
</span>
<span
v-if=
"courseMsg.Type==3"
>
添加PDF
</span>
<span
v-if=
"courseMsg.Type==4"
>
添加PPT
</span>
</el-button>
</
template
>
</el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"courseDialog = false"
>
取 消
</el-button>
<el-button
size=
"small"
@
click=
"getCourseList"
v-if=
"isReplace==0"
type=
"primary"
>
确 定
</el-button>
<el-button
size=
"small"
@
click=
"resetCourse"
v-else
type=
"primary"
>
确 定
</el-button>
</span>
</el-dialog>
<a
id=
'groupTourOrder_DownLoad'
target=
"_blank"
style=
"display:none"
>
1不要删除
</a>
<div
class=
"videoDiv"
v-show=
"videoDivState"
>
<div
style=
"text-align:right;padding-right:15px;cursor:pointer"
>
<span
@
click=
"Setvideo"
style=
"font-size:30px;color:#fff"
class=
"iconfont icon-weibiaoti4"
></span>
</div>
<video
ref=
"myVideo"
autoplay=
"autoplay"
width=
"100%"
height=
"90%"
:src=
"thisVideoAddress"
controls=
"controls"
>
<source
:src=
"thisVideoAddress"
type=
"video/mp4"
>
<source
:src=
"thisVideoAddress"
type=
"video/ogg"
>
</video>
</div>
</div>
</template>
<
script
>
import
ChooseImg
from
"@/components/global/ChooseImg.vue"
;
import
Choosevideo
from
"@/components/global/Choosevideo.vue"
;
import
ChooseFile
from
"@/components/global/ChooseFile.vue"
;
import
region_Choice
from
"@/components/setup/view/regionChoice"
;
import
UE
from
"@/components/global/UE.vue"
;
import
draggable
from
"vuedraggable"
export
default
{
components
:
{
ChooseImg
,
Choosevideo
,
ChooseFile
,
region_Choice
,
UE
,
draggable
},
data
()
{
return
{
ComTreeList
:
[],
thisType
:
0
,
tableData
:
[],
SpecificationList
:
[],
SpecificationPriceList
:
[],
speciDigActive
:
-
1
,
newSpecificationValueList
:
[],
SpecificationValueList
:
[],
speciList
:
[],
choosebdDig
:
false
,
val2
:
""
,
defaultMsg
:
""
,
config
:
{
initialFrameWidth
:
null
,
initialFrameHeight
:
350
},
changeState1
:
false
,
changeState
:
false
,
imgDig
:
false
,
activeName
:
"first"
,
flDig
:
false
,
addMsg
:
{
Id
:
0
,
CategoryList
:
[],
//分类列表
Name
:
""
,
//商品名称
CarouselImageList
:
[],
//轮播图
VideoAddress
:
""
,
//视频地址
CustomShareTitles
:
""
,
// 分享标题
CustomShareImage
:
""
,
//分享图片
GoodsStatus
:
0
,
//商品状态 1销售中 2下架
IsLiveGoods
:
2
,
//是否直播商品 1是 2否
Sort
:
0
,
//排序
SellingPrice
:
0
,
//销售价格
OriginalPrice
:
0
,
//原价
CostPrice
:
0
,
//成本价格
IsAreaBuy
:
2
,
//是否区域购买 1是 2否
IntegralPresent
:
0
,
//积分赠送
IntegralPresentType
:
2
,
//积分赠送类型
PointsDeduction
:
0
,
//积分抵扣
PointsDeductionType
:
2
,
//积分抵扣类型
IsMultipleDeduction
:
2
,
//是否可以多件累计抵扣 1是 2否
GoodsDetails
:
""
,
//商品描述
SeparateDistribution
:
2
,
//分销
SeparateDistributionType
:
1
,
SeparateDistributionMoneyType
:
2
,
//默认显示固定金额
EnjoyMember
:
1
,
//会员价
SeparateSetMember
:
0
,
SupplierId
:
''
,
//供应商id
Commission
:
0
,
// 返佣总金额 (粉象模式开启 才显示)
AreaList
:
[],
//区域列表
DistributionCommissionList
:
[],
//分销佣金
DistributionCommissionTreeList
:
[],
MemberPriceList
:
[],
//会员价格
Advertising
:
''
,
//广告词
SubName
:
''
,
//副标题
MarketingLogo
:
{
//图标
iswords
:
0
,
words
:
""
,
wordsColor
:
""
,
wordsBack
:
""
,
ico
:
""
},
MemberPriceTreeList
:
[],
TeacherList
:
[],
//教师
CourseList
:
[],
//课程
},
predefineColors
:
[
'#000000'
,
'#FFFFFF'
,
'#888888'
,
'#FF4544'
,
],
SupplierId
:
''
,
fenleiData
:
[],
checkList
:
[],
childList2
:
[],
childList3
:
[],
keepCategoryList
:
[],
rules
:
{
CategoryIdNew
:
[{
required
:
true
,
message
:
"分类不能为空"
,
trigger
:
"change"
}],
Name
:
[{
required
:
true
,
message
:
"请输入商品名称"
,
trigger
:
"blur"
}],
SellingPrice
:
[{
required
:
true
,
message
:
"请输入商品售价"
,
trigger
:
"blur"
}],
OriginalPrice
:
[{
required
:
true
,
message
:
"请输入原价"
,
trigger
:
"blur"
}],
Commission
:
[{
required
:
true
,
message
:
"返佣总金额"
,
trigger
:
"blur"
}],
CarNumber
:
[{
required
:
true
,
message
:
"请输入车牌号"
,
trigger
:
"blur"
}],
UseDay
:
[{
required
:
true
,
message
:
"请输入使用天数"
,
trigger
:
"blur"
}],
RideNum
:
[{
required
:
true
,
message
:
"请输入乘坐人数"
,
trigger
:
"blur"
}],
AdvanceDay
:
[{
required
:
true
,
message
:
"请输入提前预定天数"
,
trigger
:
"blur"
}],
LineName
:
[{
required
:
true
,
message
:
"请输入线路名称"
,
trigger
:
"blur"
}]
},
imgType
:
1
,
ruleList
:
[],
val
:
{},
val1
:
{},
AreaList
:
[],
skuList
:
[],
GoodsId
:
""
,
butorInt
:
0
,
butorIntList
:
[],
DropdownList
:
[],
DistributionCommissionTreeList
:
[],
disList1
:
[{
SpecificationSort
:
""
,
GradeCommissionList
:
[]
}],
disList2
:
[],
GradeCommissionList
:
[],
ggpl
:
""
,
ggplList
:
[],
valpl
:
""
,
pusetVal
:
""
,
pusetList
:
[],
ptinput
:
""
,
fxVal
:
""
,
gradeVal
:
""
,
xxList
:
[],
huiyList
:
[],
memberList1
:
[{
Id
:
0
,
SpecificationSort
:
""
,
GradePriceList
:
[]
}],
memberList2
:
[],
memberinput
:
""
,
memberVal
:
""
,
memberCheck
:
[],
imgListIndex1
:
0
,
imgListIndex2
:
0
,
NewCategoryList
:
[],
hpState
:
0
,
FxState
:
0
,
SuggestPriceInfo
:
{},
shareSettings
:
[],
companyCommission
:
0
,
options
:
[],
giveDate
:
false
,
My_cateList
:
[],
dialogFormVisible
:
false
,
choosejsDig
:
false
,
// 选择教师弹窗
teacherList
:
[],
//教师下拉数据
ckedTeacher
:
[],
//选中教师数组
courseDialog
:
false
,
courseMsg
:
{
Id
:
0
,
Sort
:
1
,
SortName
:
''
,
//章节排序名称
Name
:
''
,
//名称
Type
:
1
,
//类型
IsTrySee
:
1
,
//试看 1可以 2不可以
Number
:
1
,
//试看 视频秒/word pdf页
IsCache
:
1
,
//缓存 1可以 2不可以
FilePath
:
''
,
//附件路径
PathType
:
1
,
//文件存储类型 1腾讯云 2阿里云
VideoImage
:
''
,
//视频图片地址
VideoTime
:
''
,
//视频时长
},
fileList
:
[],
//附件枚举
videoType
:
1
,
fileDialog
:
false
,
//选择文件弹窗
isReplace
:
0
,
//是否替换
videoDivState
:
false
,
//视频预览
thisVideoAddress
:
""
,
};
},
created
()
{
if
(
this
.
$route
.
query
.
hpState
)
{
this
.
hpState
=
this
.
$route
.
query
.
hpState
;
}
if
(
this
.
$route
.
query
.
FxState
)
{
this
.
FxState
=
this
.
$route
.
query
.
FxState
;
}
this
.
gethuiyList
();
this
.
getRule
();
this
.
getSpeciList
();
this
.
getDistributor
();
this
.
getSupplierList
()
this
.
getCateList
();
this
.
getTeacherList
();
this
.
getFileList
();
},
mounted
()
{
this
.
$refs
.
ue
.
loadUe
();
if
(
this
.
$route
.
query
.
GoodsId
)
{
this
.
GoodsId
=
this
.
$route
.
query
.
GoodsId
;
this
.
getData
();
}
else
{
this
.
getTree
();
}
},
methods
:
{
initShareSettings
()
{
let
arr
=
[];
this
.
addMsg
.
CategoryList
.
forEach
(
item
=>
{
item
.
Name
=
item
.
CategoryName
;
arr
.
push
(
item
.
CategoryId
);
});
let
CategoryIds
=
arr
.
join
(
","
);
this
.
apipost
(
"/api/user/GetHpDistributorGoodsInfo"
,
{
CategoryIds
:
CategoryIds
,
CostPrice
:
"10"
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
shareSettings
=
res
.
data
.
data
.
RatioList
||
[]
this
.
calcCommission
(
0
)
}
}
);
},
calcCommission
(
t
)
{
if
(
t
==
0
)
{
let
maxratio
=
0
let
minratio
=
100
if
(
this
.
shareSettings
.
length
>
0
)
{
this
.
shareSettings
.
forEach
(
x
=>
{
if
(
x
.
CommissionRatio
>
maxratio
)
{
maxratio
=
x
.
CommissionRatio
}
})
}
if
(
this
.
shareSettings
.
length
>
0
)
{
this
.
shareSettings
.
forEach
(
x
=>
{
x
.
cb
=
parseFloat
(
this
.
addMsg
.
CostPrice
)
/
(
1.00
-
(
parseFloat
(
x
.
CommissionRatio
)
/
100.00
))
x
.
commission
=
(
this
.
addMsg
.
SellingPrice
-
x
.
cb
).
toFixed
(
2
)
x
.
cb
=
x
.
cb
.
toFixed
(
2
)
if
(
x
.
CommissionRatio
<
minratio
)
{
this
.
companyCommission
=
(
this
.
addMsg
.
SellingPrice
-
(
parseFloat
(
x
.
commission
)
+
parseFloat
(
this
.
addMsg
.
CostPrice
))).
toFixed
(
2
)
minratio
=
x
.
CommissionRatio
}
})
}
}
},
HpChange
()
{
if
(
this
.
FxState
==
1
)
{
this
.
Error
(
"已开启粉象分销,请在粉象分销里面配置!"
);
this
.
addMsg
.
SeparateDistribution
=
0
;
}
else
if
(
this
.
hpState
==
1
)
{
this
.
Error
(
"已开启和平分销,请在和平分销里面配置!"
);
this
.
addMsg
.
SeparateDistribution
=
0
;
}
},
//
HySet
()
{
this
.
memberList2
.
forEach
(
item
=>
{
this
.
memberCheck
.
forEach
(
check
=>
{
if
(
item
.
Id
==
check
.
Id
)
{
item
.
GradePriceList
.
forEach
(
list1
=>
{
if
(
list1
.
MemberGrade
==
this
.
memberVal
)
{
list1
.
MemberPrice
=
this
.
memberinput
;
}
});
}
});
});
},
TbaleSelectionChange4
(
val
)
{
this
.
memberCheck
=
val
;
},
gethuiyList
()
{
let
msg
=
{
Grade
:
0
,
Name
:
""
,
Enabled
:
1
};
this
.
apipost
(
"/api/user/GetMemberGradeList"
,
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
let
pageData
=
res
.
data
.
data
;
this
.
huiyList
=
pageData
;
this
.
huiyList
.
forEach
(
item
=>
{
let
obj
=
{
Name
:
item
.
Name
,
MemberGrade
:
item
.
Grade
,
MemberPrice
:
0
};
this
.
memberList1
[
0
].
GradePriceList
.
push
(
obj
);
});
}
});
},
TbaleSelectionChange3
(
val
)
{
this
.
xxList
=
val
;
},
PuSet
()
{
this
.
GradeCommissionList
.
forEach
(
item
=>
{
this
.
pusetList
.
forEach
(
list
=>
{
if
(
item
.
DistributorGrade
==
list
.
DistributorGrade
)
{
if
(
this
.
pusetVal
==
1
)
{
item
.
OneCommission
=
this
.
ptinput
;
}
if
(
this
.
pusetVal
==
2
)
{
item
.
TwoCommission
=
this
.
ptinput
;
}
if
(
this
.
pusetVal
==
3
)
{
item
.
ThreeCommission
=
this
.
ptinput
;
}
}
});
});
},
TbaleSelectionChange2
(
val
)
{
this
.
pusetList
=
val
;
},
Save
(
formName
)
{
this
.
$refs
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
let
content
=
this
.
$refs
.
ue
.
getUEContent
();
this
.
addMsg
.
GoodsDetails
=
content
;
if
(
this
.
addMsg
.
CategoryList
.
length
==
0
)
{
this
.
Error
(
'请选择商品分类'
);
return
false
}
if
(
this
.
addMsg
.
SeparateDistributionType
==
1
)
{
this
.
disList1
=
[{
SpecificationSort
:
""
,
GradeCommissionList
:
this
.
GradeCommissionList
}],
this
.
addMsg
.
DistributionCommissionList
=
this
.
disList1
;
}
if
(
this
.
addMsg
.
SeparateSetMember
==
1
)
{
this
.
addMsg
.
MemberPriceList
=
this
.
memberList1
;
this
.
addMsg
.
MemberPriceTreeList
=
this
.
memberList1
;
}
let
mall_userInfo
=
JSON
.
parse
(
localStorage
.
mall_userInfo
)
if
(
mall_userInfo
.
TenantId
==
1
&&
mall_userInfo
.
MallBaseId
==
1
&&
this
.
SupplierId
==
''
)
{
this
.
Error
(
"请选择供应商!"
);
return
}
else
{
this
.
addMsg
.
SupplierId
=
this
.
SupplierId
!=
''
?
this
.
SupplierId
:
0
;
}
if
(
this
.
addMsg
.
PresentFXGrade
==
''
)
{
//没选择的时候默认为0
this
.
addMsg
.
PresentFXGrade
=
0
}
//标签的判断和处理
if
(
this
.
addMsg
.
MarketingLogo
.
iswords
==
0
)
{
this
.
addMsg
.
MarketingLogo
=
{
iswords
:
0
,
words
:
""
,
wordsColor
:
""
,
wordsBack
:
""
,
ico
:
""
}
}
else
if
(
this
.
addMsg
.
MarketingLogo
.
iswords
==
1
)
{
this
.
addMsg
.
MarketingLogo
.
ico
=
''
}
else
if
(
this
.
addMsg
.
MarketingLogo
.
iswords
==
2
)
{
this
.
addMsg
.
MarketingLogo
.
words
=
''
;
this
.
addMsg
.
MarketingLogo
.
wordsColor
=
''
;
this
.
addMsg
.
MarketingLogo
.
wordsBack
=
''
;
}
this
.
addMsg
.
MarketingLogo
=
JSON
.
stringify
(
this
.
addMsg
.
MarketingLogo
)
this
.
apipost
(
"/api/Education/SetGoodsInfo"
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
Success
(
res
.
data
.
message
);
this
.
CommonJump
(
"CourseManagement"
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
});
}
else
{
return
false
;
}
});
},
getSpeciList
()
{
let
msg
=
{
pageIndex
:
1
,
pageSize
:
999
,
Name
:
""
,
Id
:
0
,
Content
:
""
};
this
.
apipost
(
"/api/product/GetProductSpecificationPageList"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
pageData
=
res
.
data
.
data
.
pageData
;
this
.
speciList
=
pageData
;
this
.
speciList
.
forEach
(
item
=>
{
item
.
NewSpecList
=
[];
item
.
checkAll
=
false
;
item
.
SpecList
.
forEach
(
val
=>
{
let
obj
=
{
Id
:
item
.
Id
,
Name
:
val
};
item
.
NewSpecList
.
push
(
obj
);
});
});
}
});
},
editQy
()
{
this
.
dialogFormVisible
=
true
;
setTimeout
(()
=>
{
this
.
$refs
.
child
.
Receive
(
this
.
AreaList
);
},
1000
);
},
Addto
()
{
this
.
addMsg
.
AreaList
=
[];
this
.
AreaList
.
forEach
(
item
=>
{
let
obj
=
{
Id
:
item
.
RegionId
,
AreaId
:
item
.
RegionId
,
AreaName
:
item
.
RegionName
};
this
.
addMsg
.
AreaList
.
push
(
obj
);
});
this
.
dialogFormVisible
=
false
;
},
addOf
()
{
this
.
dialogFormVisible
=
true
;
this
.
AreaList
=
[];
this
.
addMsg
.
AreaList
=
[];
setTimeout
(()
=>
{
this
.
$refs
.
child
.
Receive
(
this
.
AreaList
);
},
1000
);
},
change
(
data
)
{
this
.
AreaList
=
data
;
},
YfSelect1
(
val
)
{
this
.
addMsg
.
FormsId
=
val
.
Id
;
this
.
addMsg
.
FormsName
=
val
.
Name
;
},
clearCustom
()
{
this
.
addMsg
.
CustomShareImage
=
""
;
},
Selectvideo
(
val
)
{
if
(
this
.
videoType
==
1
)
{
this
.
addMsg
.
VideoAddress
=
val
.
Path
;
}
else
{
this
.
courseMsg
.
FilePath
=
val
.
Path
;
this
.
courseMsg
.
VideoImage
=
val
.
Image
;
this
.
courseMsg
.
VideoTime
=
val
.
VideoTime
;
}
this
.
changeState1
=
false
;
},
//选择文件
SelectFile
(
msg
)
{
var
type
=
msg
.
name
.
split
(
'.'
)[
1
];
if
(
this
.
courseMsg
.
Type
==
2
)
{
if
(
type
!=
'doc'
&&
type
!=
'docx'
)
{
this
.
Error
(
'请选择word文件'
);
}
else
{
this
.
courseMsg
.
FilePath
=
msg
.
url
}
}
if
(
this
.
courseMsg
.
Type
==
3
)
{
if
(
type
!=
'pdf'
)
{
this
.
Error
(
'请选择pdf文件'
);
}
else
{
this
.
courseMsg
.
FilePath
=
msg
.
url
}
}
if
(
this
.
courseMsg
.
Type
==
4
)
{
if
(
type
!=
'ppt'
)
{
this
.
Error
(
'请选择ppt文件'
);
}
else
{
this
.
courseMsg
.
FilePath
=
msg
.
url
}
}
this
.
fileDialog
=
false
;
},
ClearCarouse
(
index
)
{
this
.
addMsg
.
CarouselImageList
.
splice
(
index
,
1
);
},
openggImg
(
item
,
index
,
item2
,
index2
)
{
this
.
changeState
=
true
;
this
.
imgType
=
3
;
this
.
imgListIndex1
=
index
;
this
.
imgListIndex2
=
index2
;
},
openChangeDig
(
val
)
{
this
.
changeState
=
true
;
this
.
imgType
=
val
;
},
//选择图片
SelectId
(
msg
)
{
let
that
=
this
;
if
(
msg
&&
msg
.
length
>
0
)
{
if
(
this
.
imgType
==
1
)
{
msg
.
forEach
(
item
=>
{
let
obj
=
{
Id
:
item
.
selectId
,
Path
:
that
.
getIconLink
(
item
.
url
),
};
this
.
addMsg
.
CarouselImageList
.
push
(
obj
);
})
}
if
(
this
.
imgType
==
2
)
{
this
.
addMsg
.
CustomShareImage
=
that
.
getIconLink
(
msg
[
0
].
url
);
}
if
(
this
.
imgType
==
3
)
{
let
imgListIndex1
=
this
.
imgListIndex1
;
let
imgListIndex2
=
this
.
imgListIndex2
;
this
.
SpecificationList
[
imgListIndex1
].
SpecificationValueList
[
imgListIndex2
].
Image
=
that
.
getIconLink
(
msg
[
0
].
url
);
}
if
(
this
.
imgType
==
4
)
{
that
.
addMsg
.
MarketingLogo
.
ico
=
that
.
getIconLink
(
msg
[
0
].
url
)
}
}
this
.
changeState
=
false
;
},
getChild3
(
ChildList
)
{
this
.
childList3
=
ChildList
;
},
getChild2
(
ChildList
)
{
this
.
childList2
=
ChildList
;
},
ExitCateList
()
{
this
.
NewCategoryList
=
[];
this
.
addMsg
.
CategoryList
.
forEach
(
item
=>
{
item
.
Name
=
item
.
CategoryName
;
this
.
NewCategoryList
.
push
(
item
.
CategoryId
);
});
},
handleCheckChange
()
{
this
.
addMsg
.
CategoryList
=
[];
this
.
NewCategoryList
.
forEach
(
list
=>
{
this
.
fenleiData
.
forEach
(
item
=>
{
if
(
list
==
item
.
Id
)
{
item
.
CategoryId
=
item
.
Id
;
this
.
addMsg
.
CategoryList
.
push
(
item
);
}
item
.
ChildList
.
forEach
(
item2
=>
{
if
(
list
==
item2
.
Id
)
{
item2
.
CategoryId
=
item2
.
Id
;
this
.
addMsg
.
CategoryList
.
push
(
item2
);
}
item2
.
ChildList
.
forEach
(
item3
=>
{
if
(
list
==
item3
.
Id
)
{
item3
.
CategoryId
=
item3
.
Id
;
this
.
addMsg
.
CategoryList
.
push
(
item3
);
}
});
});
});
});
},
exitCheck
(
item
,
index
)
{
this
.
addMsg
.
CategoryList
.
forEach
((
list
,
k
)
=>
{
if
(
list
.
Id
==
item
.
Id
)
{
this
.
addMsg
.
CategoryList
.
splice
(
k
,
1
);
}
});
this
.
ExitCateList
();
this
.
getSuggestPrice
();
},
getTree
()
{
let
msg1
=
{
Id
:
0
,
Name
:
""
,
Tier
:
0
,
ParentId
:
0
,
Enabled
:
1
,
IsShow
:
0
,
CategoryPageType
:
this
.
addMsg
.
GoodsPageType
};
this
.
apipost
(
"/api/product/GetProductCategoryTreeList"
,
msg1
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
pageData
=
res
.
data
.
data
;
this
.
fenleiData
=
pageData
;
this
.
fenleiData
.
forEach
(
item
=>
{
item
.
CategoryName
=
item
.
Name
;
item
.
ChildList
.
forEach
(
item2
=>
{
item2
.
CategoryName
=
item2
.
Name
;
item2
.
ChildList
.
forEach
(
item3
=>
{
item3
.
CategoryName
=
item3
.
Name
;
});
});
});
}
});
},
getcode
()
{
//编码获取详情
this
.
GoodsId
=
this
.
addMsg
.
Id
;
this
.
getData
()
},
getData
()
{
this
.
apipost
(
"/api/Education/GetGoodsInfo"
,
{
GoodsId
:
this
.
GoodsId
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
addMsg
=
res
.
data
.
data
;
if
(
this
.
addMsg
.
SupplierId
!=
0
)
{
this
.
SupplierId
=
this
.
addMsg
.
SupplierId
;
}
if
(
!
this
.
$route
.
query
.
GoodsId
)
{
this
.
addMsg
.
Id
=
0
}
this
.
initShareSettings
();
this
.
ComTreeList
=
this
.
addMsg
.
DistributionCommissionTreeList
;
if
(
this
.
addMsg
.
SeparateDistributionType
==
1
)
{
this
.
disList1
=
this
.
addMsg
.
DistributionCommissionTreeList
;
if
(
this
.
addMsg
.
DistributionCommissionTreeList
.
length
>
0
)
{
this
.
GradeCommissionList
=
this
.
addMsg
.
DistributionCommissionTreeList
[
0
].
GradeCommissionList
;
}
}
if
(
this
.
addMsg
.
MemberPriceTreeList
.
length
>
0
)
{
this
.
memberList1
=
this
.
addMsg
.
MemberPriceTreeList
;
}
this
.
thisType
=
1
;
this
.
disList1
=
[];
let
objNew
=
{
SpecificationSort
:
""
,
GradeCommissionList
:
this
.
GradeCommissionList
};
this
.
disList1
.
push
(
objNew
);
if
(
this
.
addMsg
.
GoodsDetails
&&
this
.
addMsg
.
GoodsDetails
!=
""
)
{
this
.
defaultMsg
=
this
.
addMsg
.
GoodsDetails
;
}
this
.
NewCategoryList
=
[];
this
.
addMsg
.
CategoryList
.
forEach
(
item
=>
{
item
.
Name
=
item
.
CategoryName
;
this
.
NewCategoryList
.
push
(
item
.
CategoryId
);
});
if
(
this
.
hpState
==
1
)
{
this
.
addMsg
.
SeparateDistribution
=
0
;
}
if
(
this
.
addMsg
.
PresentFXGrade
==
0
)
{
this
.
addMsg
.
PresentFXGrade
=
''
}
if
(
!
this
.
addMsg
.
MarketingLogo
||
this
.
addMsg
.
MarketingLogo
==
null
)
{
this
.
addMsg
.
MarketingLogo
=
{
iswords
:
0
,
words
:
""
,
wordsColor
:
""
,
wordsBack
:
""
,
ico
:
""
}
}
else
{
let
MarketingLogo
=
JSON
.
parse
(
this
.
addMsg
.
MarketingLogo
)
let
obj
=
MarketingLogo
this
.
addMsg
.
MarketingLogo
=
obj
}
this
.
getSuggestPrice
();
this
.
getFXDGradeList2
();
this
.
getTree
();
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
}
);
},
getSuggestPrice
()
{
//获取和平分销商品建议价格
if
(
this
.
hpState
==
1
&&
Number
(
this
.
addMsg
.
CostPrice
)
>
0
)
{
let
arr
=
[];
this
.
addMsg
.
CategoryList
.
forEach
(
item
=>
{
item
.
Name
=
item
.
CategoryName
;
arr
.
push
(
item
.
CategoryId
);
});
let
CategoryIds
=
arr
.
join
(
","
);
let
msg
=
{
CategoryIds
:
CategoryIds
,
CostPrice
:
this
.
addMsg
.
CostPrice
};
this
.
apipost
(
"/api/user/GetHpGoodsSuggestPrice"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
SuggestPriceInfo
=
res
.
data
.
data
;
}
});
}
},
getRule
()
{
let
msg1
=
{
pageIndex
:
1
,
pageSize
:
999
,
RulesName
:
""
};
this
.
apipost
(
"/api/MallBase/GetLogisticsRulesPage"
,
msg1
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
pageData
=
res
.
data
.
data
.
pageData
;
this
.
ruleList
=
pageData
;
}
});
},
getDistributor
()
{
this
.
loading
=
true
;
this
.
apipost
(
"/api/user/GetDistributorBasicsInfo"
,
{},
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
butorInt
=
res
.
data
.
data
.
DistributorTier
;
this
.
butorIntList
=
[];
for
(
let
i
=
0
;
i
<
res
.
data
.
data
.
DistributorTier
;
i
++
)
{
let
msg
=
{
Name
:
i
+
1
+
"级分销"
};
this
.
butorIntList
.
push
(
msg
);
}
this
.
GetDropdownList
();
}
});
},
GetDropdownList
()
{
let
msg
=
{
Id
:
0
,
Grade
:
0
,
Name
:
""
,
Enabled
:
1
};
this
.
apipost
(
"/api/user/GetDistributorGradeDropdownList"
,
msg
,
res
=>
{
this
.
DropdownList
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
.
data
));
let
msg
=
{
Grade
:
0
,
GradeCommissionList
:
[],
Name
:
"默认等级"
,
SpecificationSort
:
""
,
Id
:
0
};
this
.
DropdownList
.
unshift
(
msg
);
this
.
disList1
.
GradeCommissionList
=
[];
this
.
disList1
.
SpecificationSort
=
""
;
this
.
DropdownList
.
forEach
(
item
=>
{
item
.
GradeCommissionList
=
[];
item
.
SpecificationSort
=
""
;
for
(
let
i
=
0
;
i
<
this
.
butorInt
;
i
++
)
{
let
obj
=
{
DistributorGrade
:
item
.
Id
,
OneCommission
:
0
,
TwoCommission
:
0
,
ThreeCommission
:
0
};
item
.
GradeCommissionList
.
push
(
obj
);
}
});
this
.
DropdownList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
DropdownList
));
if
(
!
this
.
$route
.
query
.
GoodsId
||
(
this
.
addMsg
.
DistributionCommissionTreeList
&&
this
.
addMsg
.
DistributionCommissionTreeList
.
length
==
0
)
||
this
.
thisType
==
1
)
{
this
.
GradeCommissionList
=
[];
this
.
DropdownList
.
forEach
(
item
=>
{
let
obj2
=
{
DistributorGrade
:
item
.
Id
,
OneCommission
:
0
,
TwoCommission
:
0
,
ThreeCommission
:
0
,
Name
:
item
.
Name
};
this
.
GradeCommissionList
.
push
(
obj2
);
});
this
.
GradeCommissionList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
GradeCommissionList
)
);
this
.
disList2
=
[];
if
(
this
.
$route
.
query
.
GoodsId
)
{
if
(
this
.
addMsg
.
SeparateDistributionType
==
1
)
{
this
.
disList1
=
this
.
addMsg
.
DistributionCommissionTreeList
;
if
(
this
.
addMsg
.
DistributionCommissionTreeList
.
length
>
0
)
{
this
.
GradeCommissionList
=
this
.
addMsg
.
DistributionCommissionTreeList
[
0
].
GradeCommissionList
;
}
}
}
else
{
this
.
disList1
=
[];
let
objNew
=
{
SpecificationSort
:
""
,
GradeCommissionList
:
this
.
GradeCommissionList
};
this
.
disList1
.
push
(
objNew
);
}
this
.
skuList
=
[];
}
});
},
getSupplierList
()
{
this
.
apipost
(
"/api/Supplier/GetSupplierAllList"
,
{},
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
options
=
res
.
data
.
data
;
}
});
},
getFXDGradeList2
()
{
//获取粉象等级下拉列表
this
.
apipost
(
"/api/user/GetFXDistributorGradeList"
,
{
GradeName
:
''
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
data
!=
null
)
{
res
.
data
.
data
.
forEach
(
x
=>
{
if
(
x
.
Id
==
this
.
addMsg
.
PresentFXGrade
)
{
if
(
x
.
IsGuest
==
3
)
{
this
.
giveDate
=
true
;
}
else
{
this
.
giveDate
=
false
;
this
.
addMsg
.
PresentFXMonth
=
0
;
}
}
})
}
}
});
},
//获取上架版面下拉
getCateList
()
{
this
.
apipost
(
"/api/Product/GoodsPageTypeEnumList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
My_cateList
=
res
.
data
.
data
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
});
},
//选择上架版面
getGoodType
(
num
)
{
if
(
num
!=
0
)
{
this
.
addMsg
.
CategoryList
=
[];
}
this
.
getTree
()
},
//获取教师下拉数据
getTeacherList
()
{
this
.
apipost
(
"/api/Education/GetTeacherList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
teacherList
=
res
.
data
.
data
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
});
},
getckedTeachArr
()
{
this
.
addMsg
.
TeacherList
=
[];
this
.
ckedTeacher
.
forEach
(
x
=>
{
this
.
teacherList
.
forEach
(
y
=>
{
if
(
x
==
y
.
ID
)
{
this
.
addMsg
.
TeacherList
.
push
({
TeacherId
:
y
.
ID
,
Name
:
y
.
Name
})
}
})
})
this
.
choosejsDig
=
false
;
},
//移除
yichuTeacher
(
index
)
{
this
.
ckedTeacher
=
[];
this
.
addMsg
.
TeacherList
.
splice
(
index
,
1
);
if
(
this
.
addMsg
.
TeacherList
.
length
>
0
)
{
this
.
addMsg
.
TeacherList
.
forEach
(
x
=>
{
this
.
ckedTeacher
.
push
(
x
.
TeacherId
);
})
}
},
//获取附件枚举
getFileList
()
{
this
.
apipost
(
"/api/Education/GetGoodsCourseTypeEnumList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
fileList
=
res
.
data
.
data
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
});
},
//点击确定追加课程
getCourseList
()
{
var
CouLength
=
this
.
addMsg
.
CourseList
.
length
;
this
.
courseMsg
.
Sort
=
CouLength
+
1
;
this
.
courseMsg
.
SortName
=
'第'
+
this
.
getNumParse
(
this
.
courseMsg
.
Sort
)
+
'章'
;
this
.
addMsg
.
CourseList
.
push
(
this
.
courseMsg
);
this
.
courseDialog
=
false
;
var
obj
=
{
Id
:
0
,
Sort
:
1
,
SortName
:
''
,
//章节排序名称
Name
:
''
,
//名称
Type
:
1
,
//类型
IsTrySee
:
1
,
//试看 1可以 2不可以
Number
:
1
,
//试看 视频秒/word pdf页
IsCache
:
1
,
//缓存 1可以 2不可以
FilePath
:
''
,
//附件路径
PathType
:
1
,
//文件存储
VideoImage
:
''
,
VideoTime
:
''
}
this
.
courseMsg
=
JSON
.
parse
(
JSON
.
stringify
(
obj
));
},
//数字转中文
getNumParse
(
num
)
{
let
changeNum
=
[
'零'
,
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
,
'七'
,
'八'
,
'九'
];
let
unit
=
[
""
,
"十"
,
"百"
,
"千"
,
"万"
];
num
=
parseInt
(
num
);
let
getWan
=
(
temp
)
=>
{
let
strArr
=
temp
.
toString
().
split
(
""
).
reverse
();
let
newNum
=
""
;
for
(
var
i
=
0
;
i
<
strArr
.
length
;
i
++
)
{
newNum
=
(
i
==
0
&&
strArr
[
i
]
==
0
?
""
:
(
i
>
0
&&
strArr
[
i
]
==
0
&&
strArr
[
i
-
1
]
==
0
?
""
:
changeNum
[
strArr
[
i
]]
+
(
strArr
[
i
]
==
0
?
unit
[
0
]
:
unit
[
i
])))
+
newNum
;
}
return
newNum
;
}
let
overWan
=
Math
.
floor
(
num
/
10000
);
let
noWan
=
num
%
10000
;
if
(
noWan
.
toString
().
length
<
4
)
{
noWan
=
"0"
+
noWan
;
}
return
overWan
?
getWan
(
overWan
)
+
"万"
+
getWan
(
noWan
)
:
getWan
(
num
);
},
//拖动完成
allow
(
evt
)
{
this
.
addMsg
.
CourseList
.
forEach
((
x
,
index
)
=>
{
x
.
Sort
=
index
+
1
;
x
.
SortName
=
'第'
+
this
.
getNumParse
(
x
.
Sort
)
+
'章'
;
})
this
.
$forceUpdate
();
},
//获取文件类型
getFileType
(
file
)
{
var
num
=
0
;
var
index
=
file
.
lastIndexOf
(
'.'
);
var
str
=
file
.
substring
(
index
+
1
,
file
.
length
);
if
(
str
==
'mp4'
||
str
==
'AVI'
||
str
==
'WMV'
)
{
num
=
1
;
}
if
(
str
==
'doc'
||
str
==
'docx'
)
{
num
=
2
;
}
if
(
str
==
'pdf'
)
{
num
=
3
;
}
if
(
str
==
'ppt'
)
{
num
=
4
;
}
return
num
;
},
//修改课件
updateCourse
(
subItem
,
index
)
{
this
.
isReplace
=
index
;
this
.
courseDialog
=
true
;
this
.
courseMsg
.
Id
=
subItem
.
Id
;
this
.
courseMsg
.
Sort
=
subItem
.
Sort
;
this
.
courseMsg
.
SortName
=
subItem
.
SortName
;
this
.
courseMsg
.
Name
=
subItem
.
Name
;
this
.
courseMsg
.
Type
=
subItem
.
Type
;
this
.
courseMsg
.
IsTrySee
=
subItem
.
IsTrySee
;
this
.
courseMsg
.
Number
=
subItem
.
Number
;
this
.
courseMsg
.
IsCache
=
subItem
.
IsCache
;
this
.
courseMsg
.
FilePath
=
subItem
.
FilePath
;
this
.
courseMsg
.
PathType
=
subItem
.
PathType
;
this
.
courseMsg
.
VideoImage
=
subItem
.
VideoImage
;
this
.
courseMsg
.
VideoTime
=
subItem
.
VideoTime
;
},
//删除课件
deleteCourse
(
index
)
{
this
.
addMsg
.
CourseList
.
splice
(
index
,
1
);
this
.
allow
();
},
//修改课程
resetCourse
()
{
this
.
addMsg
.
CourseList
.
splice
(
this
.
isReplace
,
1
,
this
.
courseMsg
);
this
.
courseDialog
=
false
;
var
obj
=
{
Id
:
0
,
Sort
:
1
,
SortName
:
''
,
//章节排序名称
Name
:
''
,
//名称
Type
:
1
,
//类型
IsTrySee
:
1
,
//试看 1可以 2不可以
Number
:
1
,
//试看 视频秒/word pdf页
IsCache
:
1
,
//缓存 1可以 2不可以
FilePath
:
''
,
//附件路径
PathType
:
1
,
//文件存储
VideoImage
:
''
,
VideoTime
:
''
}
this
.
courseMsg
=
JSON
.
parse
(
JSON
.
stringify
(
obj
));
},
deleteUploadFile
(
i
)
{
// 删除上传文件
this
.
saveMsg
.
splice
(
i
,
1
);
},
showUpLoadFileT
(
Url
)
{
// 预览上传文件
if
(
Url
.
substring
(
Url
.
lastIndexOf
(
'.'
)
+
1
,
Url
.
length
).
toUpperCase
()
==
'PDF'
)
{
this
.
previewPDF
(
Url
)
}
else
{
let
dom
=
document
.
querySelector
(
"#groupTourOrder_DownLoad"
);
dom
.
href
=
Url
;
dom
.
click
();
// window.open("https://view.officeapps.live.com/op/view.aspx?src="+Url)
}
},
//预览视频
goUrlVideo
(
path
){
let
that
=
this
;
that
.
videoDivState
=
true
;
that
.
thisVideoAddress
=
path
;
let
myVideo
=
this
.
$refs
.
myVideo
;
myVideo
.
play
();
},
Setvideo
(){
this
.
videoDivState
=
false
;
let
myVideo
=
this
.
$refs
.
myVideo
;
myVideo
.
pause
();
},
}
};
</
script
>
<
style
>
.app-attr-group
.close
{
position
:
absolute
;
top
:
-4px
;
right
:
-4px
;
font-size
:
16px
;
cursor
:
pointer
;
}
.directorGoodsEdit
.el-image
{
position
:
relative
;
display
:
inline-block
;
overflow
:
hidden
;
}
.directorGoodsEdit
.pendSelect
{
width
:
100px
;
}
.directorGoodsEdit
.el-table
th
>
.cell
{
padding-left
:
20px
!important
;
}
.directorGoodsEdit
.app-attr
.box
{
line-height
:
64px
;
border-top
:
1px
solid
#e8eaee
;
border-left
:
1px
solid
#e8eaee
;
border-right
:
1px
solid
#e8eaee
;
padding
:
0
16px
;
}
.speciDig
.tpl-scrollbar
.el-checkbox
{
display
:
flex
;
-webkit-align-items
:
center
;
align-items
:
center
;
padding
:
10px
0
;
}
.speciDig
.tpl-scrollbar
{
height
:
calc
(
440px
-
44px
-
10px
);
}
.speciDig
.tpl-box
.tpl-head
{
padding
:
0
20px
;
font-size
:
15px
;
color
:
#909399
;
margin-bottom
:
10px
;
line-height
:
44px
;
background
:
#f5f7fa
;
}
.speciDig
.tpl-box
{
width
:
300px
;
height
:
440px
;
}
.directorGoodsEdit
.app-attr-group
.attr-jt
{
background
:
#ffffff
;
width
:
6px
;
height
:
6px
;
border-top
:
1px
solid
rgb
(
235
,
238
,
245
);
border-right
:
1px
solid
#ebeef5
;
transform
:
rotate
(
-45deg
);
-o-transform
:
rotate
(
-45deg
);
-webkit-transform
:
rotate
(
-45deg
);
-moz-transform
:
rotate
(
-45deg
);
-ms-transform
:
rotate
(
-45deg
);
position
:
absolute
;
top
:
-5px
;
}
.directorGoodsEdit
.app-attr-group
.img-box
{
position
:
relative
;
height
:
100px
;
width
:
100px
;
margin-top
:
8px
;
border
:
1px
solid
#ebeef5
;
}
.directorGoodsEdit
.close
{
position
:
absolute
;
top
:
-4px
;
right
:
-4px
;
font-size
:
16px
;
cursor
:
pointer
;
}
.directorGoodsEdit
.attr-list
{
display
:
inline-block
;
margin-right
:
10px
;
margin-bottom
:
10px
;
position
:
relative
;
cursor
:
move
;
}
.directorGoodsEdit
.box-grow-0
{
min-width
:
0
;
-webkit-box-flex
:
0
;
-webkit-flex-grow
:
0
;
-ms-flex-positive
:
0
;
flex-grow
:
0
;
-webkit-flex-shrink
:
0
;
-ms-flex-negative
:
0
;
flex-shrink
:
0
;
}
.directorGoodsEdit
.app-attr-group
.del-img
{
height
:
20px
;
width
:
20px
;
cursor
:
pointer
;
}
.directorGoodsEdit
.app-attr-group
.bg
{
height
:
44px
;
padding
:
0
10px
;
background
:
#f8f8f8
;
}
.regionDig
.regionChoice
.item_b
{
margin-bottom
:
10px
;
}
.directorGoodsEdit
.app-attr-group
.bg
{
height
:
44px
;
padding
:
0
10px
;
background
:
#f8f8f8
;
}
.directorGoodsEdit
.app-attr-group
{
border
:
1px
solid
#ebeef5
;
padding
:
10px
;
}
.directorGoodsEdit
.delBtn
{
position
:
absolute
;
right
:
-8px
;
top
:
-8px
;
padding
:
4px
4px
!important
;
}
.directorGoodsEdit
.add-image-btn
{
width
:
100px
;
height
:
100px
;
line-height
:
100px
;
color
:
#419efb
;
border
:
1px
solid
#e2e2e2
;
cursor
:
pointer
;
text-align
:
center
;
}
.directorGoodsEdit
.colapp-image
{
background-size
:
cover
;
background-position
:
center
center
;
width
:
100px
;
height
:
100px
;
border-radius
:
0%
;
}
.app-add-cat
.el-checkbox-group
{
font-size
:
14px
!important
;
}
.app-add-cat
.el-checkbox
{
margin-right
:
0
;
}
.app-add-cat
.el-dialog__body
{
padding
:
10px
20px
!important
;
}
.app-add-cat
.tag-box
.tag-item
{
margin-right
:
5px
;
}
.app-add-cat
.tag-box
{
margin
:
20px
0
;
}
.app-add-cat
.app-goods-cat-list
.active
{
background
:
#fafafa
;
}
.app-add-cat
.app-goods-cat-list
.cat-item
{
cursor
:
pointer
;
padding
:
5px
10px
;
}
.app-add-cat
.app-goods-cat-list
{
border
:
1px
solid
#e8eaee
;
border-radius
:
5px
;
margin-top
:
-5px
;
padding
:
10px
0
;
overflow
:
scroll
;
height
:
400px
;
}
.directorGoodsEdit
.bottom-div
{
border-top
:
1px
solid
#e3e3e3
;
position
:
fixed
;
bottom
:
0
;
background-color
:
#ffffff
;
z-index
:
999
;
padding
:
10px
;
width
:
80%
;
}
.directorGoodsEdit
.fen-table
{
width
:
100%
;
border-collapse
:
collapse
;
border-spacing
:
0
;
border
:
1px
solid
#eee
;
}
.directorGoodsEdit
.fen-table
td
,
.directorGoodsEdit
.fen-table
th
{
border
:
1px
solid
#eee
;
padding
:
10px
0
;
padding-left
:
10px
;
}
.directorGoodsEdit
.fen-table
td
{
font-size
:
12px
;
}
.directorGoodsEdit
.fen-table
th
{
background
:
#ddd
;
font-weight
:
500
;
}
.directorGoodsEdit
.fen-sumg
{
margin
:
20px
0
;
font-size
:
12px
;
}
@media
(
max-width
:
1920px
)
and
(
min-width
:
1300px
)
{
.directorGoodsEdit
.el-col-12
{
width
:
50%
;
}
}
@media
(
max-width
:
1910px
)
and
(
min-width
:
1200px
)
{
.directorGoodsEdit
.el-col-12
{
width
:
66.66667%
;
}
}
@media
(
max-width
:
1199px
)
and
(
min-width
:
200px
)
{
.directorGoodsEdit
.el-col-12
{
width
:
80%
;
}
}
.edui1_imagescale
img
{
max-width
:
100%
;
}
.directorGoodsEdit
.nav_Main
{
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
flex-start
;
}
.directorGoodsEdit
.nav_IconContent
{
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
flex-start
;
}
.directorGoodsEdit
.nav_IconContent
div
>
div
{
display
:
inline-block
;
}
.directorGoodsEdit
.w90
{
width
:
90px
!important
;
}
.directorGoodsEdit
.w130
{
width
:
130px
!important
;
}
.courseInfo
{
width
:
100%
;
height
:
560px
;
border
:
1px
solid
#EBEEF5
;
}
.courseHeader
{
width
:
100%
;
height
:
60px
;
display
:
flex
;
}
.courseHeader
>
div
{
width
:
12%
;
height
:
100%
;
text-align
:
center
;
line-height
:
60px
;
border-right
:
1px
solid
#EBEEF5
;
border-bottom
:
1px
solid
#EBEEF5
;
}
.courseHeader
>
div
:last-child
{
border-right
:
0
;
}
.courseContent
{
width
:
100%
;
height
:
500px
;
}
.courseList
{
width
:
100%
;
height
:
40px
;
display
:
flex
;
}
.courseList
:hover
{
cursor
:
move
;
}
.courseList
>
div
{
width
:
12%
;
height
:
100%
;
text-align
:
center
;
line-height
:
40px
;
border-right
:
1px
solid
#EBEEF5
;
border-bottom
:
1px
solid
#EBEEF5
;
}
.courseList
>
div
:last-child
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
border-right
:
0
;
cursor
:
default
;
}
.courseFileDiv
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
cursor
:
default
;
}
.eduFileDiv
{
width
:
25px
;
height
:
25px
;
}
.eduFileDiv
img
{
width
:
100%
;
height
:
100%
;
}
.videoDiv
{
position
:
fixed
;
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
z-index
:
999999999
;
background
:
#000
;
}
</
style
>
src/components/education/educationIndex.vue
View file @
e7166801
...
...
@@ -169,6 +169,9 @@
<li
class=
"menu_item"
:class=
"
{'Fchecked':isChecked=='/lecturermanage'}" @click="isChecked='/lecturermanage',CommonJump('lecturermanage')">
<i
class=
"el-icon-menu"
></i><span>
讲师管理
</span>
</li>
<li
class=
"menu_item"
:class=
"
{'Fchecked':isChecked=='/CourseManagement'}" @click="isChecked='/CourseManagement',CommonJump('CourseManagement')">
<i
class=
"el-icon-menu"
></i><span>
课程管理
</span>
</li>
<li
class=
"menu_item"
:class=
"
{'Fchecked':isChecked=='/courseCardManage'}" @click="isChecked='/courseCardManage',CommonJump('courseCardManage')">
<i
class=
"el-icon-menu"
></i><span>
课程卡管理
</span>
</li>
...
...
src/components/global/ChooseFile.vue
0 → 100644
View file @
e7166801
<
template
>
<div
class=
"ChooseImg"
>
<el-row
v-loading=
"loading"
style=
"border: 1px solid rgb(227, 227, 227);"
>
<el-col
:span=
"6"
style=
"border-right: 1px solid rgb(227, 227, 227);"
>
<el-button
@
click=
"addGroup"
style=
"margin-top: 12px;margin-left: 5%;"
type=
"primary"
size=
"small"
>
添加分组
</el-button>
<div
style=
"margin:20px 0"
>
<el-input
v-model=
"searchVal"
style=
"width:90%;margin:0 5%"
placeholder=
"请输入分类名称搜索"
size=
"small"
></el-input>
</div>
<div
class=
"el-scrollbar"
style=
"height: 450px; width: 100%;"
>
<div
class=
"el-scrollbar__wrap"
style=
"margin-bottom: -8px; margin-right: -8px;"
>
<div
class=
"el-scrollbar__view"
>
<li
:class=
"PageMsg.GroupId==0?'selectActive' : ''"
@
click=
"SelectGroup(0)"
class=
"el-menu-item"
style=
"padding-left: 10px;padding-right: 10px;"
>
<i
class=
"el-icon-tickets"
></i>
<span>
全部
</span>
</li>
<li
:class=
"PageMsg.GroupId==item.Id?'selectActive' : ''"
@
click=
"SelectGroup(item.Id)"
v-for=
"(item,index) in NewItems"
:key=
"index"
class=
"el-menu-item"
style=
"padding-left: 10px;padding-right: 10px;"
>
<div
flex=
"dir:left box:last"
>
<el-col
:span=
"18"
style=
"overflow: hidden; text-overflow: ellipsis;"
>
<i
class=
"el-icon-tickets"
></i>
<span>
{{
item
.
Name
}}
</span>
</el-col>
<el-col
class=
"blue"
:span=
"6"
>
<span
v-if=
"scgroupMsg.Recycled==1"
@
click
.
prevent=
"EditGroup(item)"
>
编辑
</span>
|
<span
v-if=
"scgroupMsg.Recycled==1"
@
click
.
prevent=
"HsGroup(item)"
>
删除
</span>
</el-col>
</div>
</li>
</div>
</div>
</div>
</el-col>
<el-col
:span=
"18"
>
<div
style=
"margin-top: 10px;margin-left: 20px;"
class=
"appendInput"
>
<el-input
size=
"small"
style=
"width:250px"
placeholder=
"请输入内容"
v-model=
"PageMsg.Name"
>
<el-button
@
click=
"GetPageList"
slot=
"append"
icon=
"el-icon-search"
></el-button>
</el-input>
</div>
<div
class=
"basefix app-attachment-list"
>
<div
class=
"app-attachment-item app-attachment-upload"
>
<el-upload
class=
"avatar-uploader"
action=
""
accept=
"image/jpeg,image/gif,image/png,image/bmp"
:show-file-list=
"false"
:http-request=
"UploadpdfFile"
multiple
>
<div
class=
"app-upload"
flex=
"main:center cross:center"
style=
"width: 100px; height: 100px;"
>
<i
class=
"el-icon-upload"
></i>
</div>
</el-upload>
</div>
<el-tooltip
v-for=
"(item,index) in PageList"
:key=
"index"
class=
"item"
effect=
"dark"
:content=
"'双击选中【'+item.Name+'】'"
placement=
"top-start"
>
<div
@
click=
"PageSelect(item,1)"
@
dblclick=
"PageSelect(item,2)"
:class=
"getChecked(item) ? 'selected' :''"
class=
"el-tooltip item app-attachment-item"
>
<div
class=
"mater_FileType"
v-if=
"getFileType(item.Name)==1"
>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/WORD.png"
alt=
""
>
</div>
<div
class=
"mater_FileType"
v-if=
"getFileType(item.Name)==2"
>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/PPT.png"
alt=
""
>
</div>
<div
class=
"mater_FileType"
v-if=
"getFileType(item.Name)==3"
>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/pdf.png"
alt=
""
>
</div>
<div
class=
"app-attachment-name"
>
{{
item
.
Name
}}
</div>
</div>
</el-tooltip>
</div>
<div
style=
"padding-right:10px"
>
<el-pagination
style=
"text-align:right"
background
:current-page=
"currentPage4"
@
current-change=
"handleCurrentChange"
:page-size=
"msg.pageSize"
layout=
"prev, pager, next,jumper"
:total=
"total"
>
</el-pagination>
</div>
</el-col>
</el-row>
<div
style=
"margin-top:20px;text-align:right"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"SelectImgId"
>
选定
</el-button>
</div>
<!-- 新增分组 -->
<el-dialog
:modal=
"false"
:modal-append-to-body=
'false'
title=
"分组管理"
:visible
.
sync=
"addGroupMsgDig"
width=
"400px"
>
<el-form
:model=
"addGroupMsg"
:rules=
"addGroupMsgrules"
ref=
"addGroupMsg"
label-width=
"100px"
>
<el-form-item
label=
"分组名称"
prop=
"Name"
>
<el-input
size=
"small"
type=
"text"
placeholder=
"请输入内容"
v-model=
"addGroupMsg.Name"
maxlength=
"8"
show-word-limit
>
</el-input>
</el-form-item>
<el-form-item
label=
"排序"
prop=
"Sort"
>
<el-input
@
keyup
.
native=
"checkInteger(addGroupMsg,'Sort')"
size=
"small"
v-model=
"addGroupMsg.Sort"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"addGroupMsgDig = false"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"GroupsubmitForm('addGroupMsg')"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</
template
>
<
script
>
export
default
{
//是否多选
props
:
[
"IsMultiple"
],
name
:
'ChooseImg'
,
data
()
{
return
{
czType
:
0
,
searchVal
:
''
,
val
:
''
,
Id
:
''
,
currentPage4
:
1
,
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
},
total
:
0
,
loading
:
false
,
scgroupMsg
:
{
Id
:
0
,
Name
:
''
,
Type
:
3
,
Recycled
:
1
,
},
groupList
:
[],
PageMsg
:
{
Id
:
0
,
Name
:
''
,
Type
:
3
,
Recycled
:
1
,
pageIndex
:
1
,
pageSize
:
17
,
GroupId
:
0
,
},
PageList
:
[],
addGroupMsgDig
:
false
,
pageMsgDig
:
false
,
addGroupMsg
:
{
Id
:
0
,
Name
:
''
,
Type
:
''
,
Sort
:
''
,
},
addGroupMsgrules
:
{
Name
:
[{
required
:
true
,
message
:
'请填写分组名称'
,
trigger
:
'blur'
}],
Sort
:
[{
required
:
true
,
message
:
'请填写排序'
,
trigger
:
'blur'
}],
},
addpageMsg
:
{
Id
:
0
,
Name
:
''
,
Type
:
3
,
GroupId
:
0
,
Path
:
''
,
Image
:
''
,
VideoTime
:
0
,
WithHeight
:
0
,
},
selectId
:
-
1
,
emitmsg
:
[],
}
},
created
()
{},
computed
:
{
NewItems
()
{
var
_this
=
this
;
var
NewItems
=
[];
this
.
groupList
.
map
(
function
(
item
)
{
if
(
item
.
Name
.
search
(
_this
.
searchVal
)
!=
-
1
)
{
NewItems
.
push
(
item
);
}
});
return
NewItems
;
}
},
mounted
()
{
this
.
GetMemberGradeList
();
this
.
GetPageList
();
},
methods
:
{
getChecked
(
item
)
{
var
isChecked
=
false
;
if
(
this
.
emitmsg
&&
this
.
emitmsg
.
length
>
0
)
{
this
.
emitmsg
.
forEach
(
eItem
=>
{
if
(
eItem
.
selectId
==
item
.
Id
&&
!
isChecked
)
{
isChecked
=
true
;
}
});
}
return
isChecked
;
},
InitData
(
Type
)
{
this
.
czType
=
Type
;
this
.
selectId
=
-
1
;
},
SelectImgId
()
{
//多选
if
(
this
.
IsMultiple
)
{
this
.
$emit
(
'SelectFile'
,
this
.
emitmsg
)
}
//单选
else
{
if
(
this
.
emitmsg
&&
this
.
emitmsg
.
length
>
0
)
{
var
result
=
{
selectId
:
this
.
emitmsg
[
0
].
selectId
,
url
:
this
.
emitmsg
[
0
].
url
,
name
:
this
.
emitmsg
[
0
].
name
};
this
.
$emit
(
'SelectFile'
,
result
)
}
}
this
.
selectId
=
-
1
;
this
.
emitmsg
=
[];
},
//上传附件doc docx pdf ppt pptx
UploadpdfFile
(
file
){
var
that
=
this
;
var
flieType
=
file
.
file
.
name
.
split
(
'.'
)[
1
];
if
(
flieType
!=
'doc'
&&
flieType
!=
'docx'
&&
flieType
!=
'pdf'
&&
flieType
!=
'ppt'
&&
flieType
!=
'pptx'
){
this
.
Error
(
'请上传word ppt pdf文件'
);
return
;
}
this
.
UploadSelfFile
(
this
.
FileType
().
GoodsImg
,
file
.
file
,
res
=>
{
if
(
res
.
resultCode
==
1
)
{
that
.
addpageMsg
.
Image
=
res
.
VideoCoverImg
;
that
.
addpageMsg
.
Path
=
res
.
FileUrl
;
that
.
addpageMsg
.
Name
=
res
.
FileName
;
that
.
addPageList
();
that
.
$forceUpdate
();
}
})
},
// 新增素材信息
addPageList
()
{
this
.
apipost
(
"/api/product/SetMaterialInfo"
,
this
.
addpageMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
GetPageList
();
}
})
},
//选择图片 clickType 1单击 2双击
PageSelect
(
item
,
clickType
)
{
//多选
if
(
this
.
IsMultiple
)
{
var
findIndex
=
this
.
emitmsg
.
findIndex
(
eItem
=>
eItem
.
selectId
==
item
.
Id
);
if
(
findIndex
>
-
1
)
{
//第二次点击相同图片就删除
this
.
emitmsg
.
splice
(
findIndex
,
1
)
}
else
{
this
.
emitmsg
.
push
({
selectId
:
item
.
Id
,
url
:
item
.
Path
,
name
:
item
.
Name
});
}
}
else
{
this
.
emitmsg
=
[];
this
.
emitmsg
.
push
({
selectId
:
item
.
Id
,
url
:
item
.
Path
,
name
:
item
.
Name
});
}
this
.
selectId
=
item
.
Id
;
if
(
clickType
==
2
)
{
this
.
SelectImgId
();
}
},
addGroup
()
{
this
.
addGroupMsgDig
=
true
;
this
.
addGroupMsg
=
{
Id
:
0
,
Name
:
''
,
Type
:
3
,
Sort
:
''
,
}
},
//删除分组
HsGroup
(
item
)
{
let
that
=
this
;
that
.
$confirm
(
'是否删除?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
apipost
(
'/api/product/SetMaterialGroupRecycled'
,
{
GroupId
:
item
.
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
GetMemberGradeList
();
this
.
Success
(
res
.
data
.
message
)
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
}
);
}).
catch
(()
=>
{});
},
EditGroup
(
item
)
{
this
.
addGroupMsgDig
=
true
;
this
.
addGroupMsg
=
{
Id
:
item
.
Id
,
Name
:
item
.
Name
,
Type
:
item
.
Type
,
Sort
:
item
.
Sort
,
}
},
GroupsubmitForm
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
apipost
(
'/api/product/SetMaterialGroupInfo'
,
this
.
addGroupMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
GetMemberGradeList
();
this
.
Success
(
res
.
data
.
message
)
this
.
addGroupMsgDig
=
false
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
}
);
}
else
{
return
false
;
}
});
},
SelectGroup
(
id
)
{
this
.
PageMsg
.
GroupId
=
id
;
this
.
addpageMsg
.
GroupId
=
id
;
this
.
GetPageList
();
},
handleCurrentChange
(
val
)
{
this
.
PageMsg
.
pageIndex
=
val
;
this
.
GetPageList
();
},
GetMemberGradeList
()
{
this
.
loading
=
true
;
this
.
apipost
(
"/api/product/GetMaterialGroupList"
,
this
.
scgroupMsg
,
res
=>
{
this
.
loading
=
false
;
this
.
groupList
=
res
.
data
.
data
;
})
},
GetPageList
()
{
this
.
loading
=
true
;
this
.
apipost
(
"/api/product/GetMaterialInfoPageList"
,
this
.
PageMsg
,
res
=>
{
this
.
loading
=
false
;
this
.
total
=
res
.
data
.
data
.
count
;
let
data
=
res
.
data
.
data
.
pageData
;
this
.
PageList
=
data
;
})
},
//拆分后缀
getFileType
(
item
){
var
num
=
0
;
if
(
item
){
var
name
=
item
.
split
(
'.'
)[
1
]
}
if
(
name
==
'doc'
||
name
==
'docx'
){
num
=
1
}
if
(
name
==
'ppt'
||
name
==
'pptx'
){
num
=
2
}
if
(
name
==
'pdf'
){
num
=
3
}
return
num
;
}
},
}
</
script
>
<
style
>
.ChooseImg
.el-input.is-active
.el-input__inner
,
.ChooseImg
.el-input__inner
:focus
{
border-color
:
#DCDFE6
;
}
.ChooseImg
.app-attachment-list
.selected
{
box-shadow
:
0
0
0
1px
#1ed0ff
;
background
:
#daf5ff
;
border-radius
:
5px
;
}
.ChooseImg
.selectActive
.el-icon-tickets
{
color
:
#409EFF
;
}
.ChooseImg
.selectActive
{
color
:
#409EFF
;
}
.ChooseImg
.app-attachment-name
{
color
:
#666666
;
margin-top
:
5px
;
font-size
:
13px
;
word-break
:
break-all
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-box-orient
:
vertical
;
-webkit-line-clamp
:
1
;
overflow
:
hidden
;
}
.ChooseImg
.app-attachment-item
.app-attachment-img
{
display
:
block
;
}
.ChooseImg
.app-attachment-upload
i
{
font-size
:
30px
;
color
:
#909399
;
}
.ChooseImg
.app-attachment-item
{
display
:
inline-block
;
cursor
:
pointer
;
position
:
relative
;
float
:
left
;
width
:
120px
;
height
:
140px
;
margin
:
7.5px
;
text-align
:
center
;
padding
:
10px
10px
0
;
}
.ChooseImg
.app-attachment-upload
{
box-shadow
:
none
;
border
:
1px
dashed
#b2b6bd
;
height
:
100px
;
width
:
100px
;
margin
:
17.5px
;
padding
:
0
;
}
.ChooseImg
.app-attachment-list
{
padding
:
5px
;
min-height
:
475px
;
}
.ChooseImg
.appendInput
.el-input__inner
{
border-right
:
none
;
}
.ChooseImg
.appendInput
.el-input-group__append
{
background-color
:
#fff
!important
;
border-left
:
none
;
padding
:
0
15px
;
}
.mater_FileType
{
height
:
100px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.mater_FileType
img
{
width
:
100%
;
}
</
style
>
src/components/global/Choosevideo.vue
View file @
e7166801
...
...
@@ -240,7 +240,9 @@
PageSelect
(
item
)
{
this
.
emitmsg
=
{
Path
:
item
.
Path
,
Id
:
item
.
Id
Id
:
item
.
Id
,
Image
:
item
.
Image
,
VideoTime
:
item
.
VideoTime
}
this
.
selectId
=
item
.
Id
;
},
...
...
src/plug/index.js
View file @
e7166801
...
...
@@ -57,7 +57,10 @@ export default {
let
domainUrl
=
''
;
let
javaUrl
=
'http://192.168.2.65:8018'
;
domainUrl
=
"http://192.168.1.27:8200"
;
// domainUrl = "http://192.168.1.27:8200";
domainUrl
=
"http://192.168.1.9:8088"
;
//domainUrl = "http://192.168.1.21";
//domainUrl = "https://localhost:5001";
let
vtUploadUrl
=
"http://192.168.1.214:8120"
;
let
vtViewUrl
=
"http://192.168.1.214:8130"
;
...
...
@@ -171,6 +174,10 @@ export default {
console
.
log
(
reason
)
});
},
//PDF预览
Vue
.
prototype
.
previewPDF
=
function
(
url
)
{
window
.
open
(
url
);
},
//上传文件到云存储
Vue
.
prototype
.
UploadFileToTencent
=
function
(
path
,
fileObj
,
callback
)
{
// debugger;
...
...
src/router/index.js
View file @
e7166801
...
...
@@ -307,8 +307,18 @@ export default new Router({
name
:
'informationEvalution'
,
component
:
resolve
=>
require
([
'@/components/education/informationEvalution'
],
resolve
),
},
//网课 教育-课程管理
{
path
:
'/CourseManagement'
,
name
:
'CourseManagement'
,
component
:
resolve
=>
require
([
'@/components/education/CourseManagement'
],
resolve
),
},
//网课 教育-新增修改
{
path
:
'/educationEdit'
,
name
:
'educationEdit'
,
component
:
resolve
=>
require
([
'@/components/education/educationEdit'
],
resolve
),
}
]
},
{
...
...
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