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
632a44c9
Commit
632a44c9
authored
Aug 20, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
f1688136
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
99 additions
and
9 deletions
+99
-9
shareFriend.vue
src/components/Share/shareFriend.vue
+72
-9
choiceMaterial.vue
src/components/common/choiceMaterial.vue
+27
-0
No files found.
src/components/Share/shareFriend.vue
View file @
632a44c9
...
@@ -10,7 +10,11 @@
...
@@ -10,7 +10,11 @@
<div
class=
"content"
>
<div
class=
"content"
>
<div>
<div>
<span>
素材类型
</span>
<span>
素材类型
</span>
<el-select
size=
"small"
v-model=
"msg.CateId"
></el-select>
<div
style=
"display:inline-block;"
>
<el-input
type=
"text"
size=
"small"
v-model=
"msg.CateId"
>
<el-button
slot=
"append"
@
click=
"CateDialog=true,isSearch=1"
>
选择分类
</el-button>
</el-input>
</div>
<span
style=
"margin-left:10px;"
>
添加时间
</span>
<span
style=
"margin-left:10px;"
>
添加时间
</span>
<el-date-picker
size=
"small"
class=
"indataPicker"
type=
"daterange"
v-model=
"dateStr"
range-separator=
"至"
<el-date-picker
size=
"small"
class=
"indataPicker"
type=
"daterange"
v-model=
"dateStr"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd"
>
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd"
>
...
@@ -23,6 +27,7 @@
...
@@ -23,6 +27,7 @@
<span
class=
"el-icon-search"
style=
"color:#979dad;font-size:14px;position:relative;top:1px"
<span
class=
"el-icon-search"
style=
"color:#979dad;font-size:14px;position:relative;top:1px"
@
click=
"msg.pageIndex=1,getList()"
>
</span>
@
click=
"msg.pageIndex=1,getList()"
>
</span>
</div>
</div>
<el-button
@
click=
"getList()"
size=
"small"
type=
"primary"
>
查询
</el-button>
</div>
</div>
<br>
<br>
<el-table
:data=
"dataList"
v-loading=
"loading"
border
style=
"width: 100%;margin:20px 0"
>
<el-table
:data=
"dataList"
v-loading=
"loading"
border
style=
"width: 100%;margin:20px 0"
>
...
@@ -38,10 +43,12 @@
...
@@ -38,10 +43,12 @@
<el-table-column
prop=
"MaterialInfo"
label=
"发圈文案"
width=
"300"
>
<el-table-column
prop=
"MaterialInfo"
label=
"发圈文案"
width=
"300"
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"MaterialImg"
label=
"图片视频"
width=
"300"
>
<el-table-column
prop=
"MaterialImg"
label=
"图片视频"
width=
"300"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<div
v-for=
"(item,index) in scope.row.ImgList"
:key=
"index"
>
<div
flex=
"dir:left"
style=
"flex-wrap: wrap;"
>
<img
:src=
"item"
/>
<div
style=
"width:80px;height:80px;margin-right:5px;"
v-for=
"(item,index) in scope.row.ImgList"
:key=
"index"
>
<img
style=
"width:100%;height:100%;"
:src=
"item"
/>
</div>
</div>
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"GoodsId"
label=
"商品信息"
width=
"220"
>
<el-table-column
prop=
"GoodsId"
label=
"商品信息"
width=
"220"
>
...
@@ -100,6 +107,10 @@
...
@@ -100,6 +107,10 @@
<div
class=
"content"
>
<div
class=
"content"
>
<div
class=
"conten_indder"
>
<div
class=
"conten_indder"
>
<el-form
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
label-width=
"150px"
>
<el-form
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
label-width=
"150px"
>
<el-form-item
label=
"选择商品"
>
<el-button
type=
"text"
>
(
{{
addMsg
.
GoodsId
}}
)
{{
goodsName
}}
</el-button>
<el-button
type=
"text"
@
click=
"isShowGoods=true"
>
选择商品
</el-button>
</el-form-item>
<el-form-item
label=
"动态文案"
prop=
"MaterialInfo"
>
<el-form-item
label=
"动态文案"
prop=
"MaterialInfo"
>
<el-input
type=
"textarea"
:rows=
"6"
v-model=
"addMsg.MaterialInfo"
></el-input>
<el-input
type=
"textarea"
:rows=
"6"
v-model=
"addMsg.MaterialInfo"
></el-input>
</el-form-item>
</el-form-item>
...
@@ -153,9 +164,15 @@
...
@@ -153,9 +164,15 @@
<el-input
type=
"text"
size=
"small"
v-model=
"addMsg.SortNum"
<el-input
type=
"text"
size=
"small"
v-model=
"addMsg.SortNum"
@
keyup
.
native=
"checkInteger(addMsg,'SortNum')"
></el-input>
@
keyup
.
native=
"checkInteger(addMsg,'SortNum')"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"一级分类"
v-if=
"LevelOne"
>
<span>
{{LevelOne}}
</span>
</el-form-item>
<el-form-item
label=
"二级分类"
v-if=
"LevelTwo"
>
<span>
{{LevelTwo}}
</span>
</el-form-item>
<el-form-item
label=
"分类编号"
>
<el-form-item
label=
"分类编号"
>
<el-input
type=
"text"
size=
"small"
v-model=
"addMsg.CateId"
>
<el-input
type=
"text"
size=
"small"
v-model=
"addMsg.CateId"
>
<el-button
slot=
"append"
@
click=
"CateDialog=true"
>
选择分类
</el-button>
<el-button
slot=
"append"
@
click=
"CateDialog=true
,isSearch=-1
"
>
选择分类
</el-button>
</el-input>
</el-input>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -177,16 +194,26 @@
...
@@ -177,16 +194,26 @@
<el-button
type=
"primary"
size=
"small"
@
click=
"getCkedMater"
>
确定
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"getCkedMater"
>
确定
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
<!-- 选择商品 -->
<el-dialog
title=
"选择商品"
:visible
.
sync=
"isShowGoods"
custom-class=
"goodsDialog"
width=
"800px"
>
<choiceGood
ref=
"choiceGood"
:isSingle=
"true"
:IsGetSpec=
"1"
></choiceGood>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"isShowGoods=false"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"danger"
@
click=
"getGoodsChoice()"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
ChooseImg
from
"@/components/global/ChooseImg.vue"
;
import
ChooseImg
from
"@/components/global/ChooseImg.vue"
;
import
choiceMaterial
from
"@/components/common/choiceMaterial.vue"
;
import
choiceMaterial
from
"@/components/common/choiceMaterial.vue"
;
import
choiceGood
from
"@/components/common/choiceGood.vue"
;
export
default
{
export
default
{
components
:
{
components
:
{
ChooseImg
,
ChooseImg
,
choiceMaterial
choiceMaterial
,
choiceGood
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -226,6 +253,12 @@
...
@@ -226,6 +253,12 @@
}]
}]
},
},
CateDialog
:
false
,
//选择分类弹窗
CateDialog
:
false
,
//选择分类弹窗
LevelOne
:
''
,
//一级分类
LevelTwo
:
''
,
//二级分类
isSearch
:
-
1
,
//判断选择查询还是新增的
isShowGoods
:
false
,
//选择商品弹窗
goodsName
:
''
,
//商品名称
};
};
},
},
methods
:
{
methods
:
{
...
@@ -245,7 +278,6 @@
...
@@ -245,7 +278,6 @@
if
(
res
.
data
.
resultCode
===
1
)
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
dataList
=
res
.
data
.
data
.
pageData
;
this
.
dataList
=
res
.
data
.
data
.
pageData
;
this
.
msg
.
total
=
res
.
data
.
data
.
count
;
this
.
msg
.
total
=
res
.
data
.
data
.
count
;
console
.
log
(
"this.dataList"
,
this
.
dataList
);
}
}
},
},
null
null
...
@@ -423,9 +455,40 @@
...
@@ -423,9 +455,40 @@
//选择分类
//选择分类
getCkedMater
(){
getCkedMater
(){
var
obj
=
this
.
$refs
.
choiceMater
.
getMaterial
();
var
obj
=
this
.
$refs
.
choiceMater
.
getMaterial
();
if
(
this
.
isSearch
==
1
){
this
.
msg
.
CateId
=
obj
.
Id
}
else
{
this
.
LevelOne
=
''
;
this
.
LevelTwo
=
''
;
if
(
obj
.
Level
==
1
){
this
.
LevelOne
=
obj
.
Name
;
}
if
(
obj
.
Level
==
2
){
this
.
LevelOne
=
obj
.
LevelOne
;
this
.
LevelTwo
=
obj
.
Name
;
}
if
(
obj
.
Level
==
3
){
this
.
LevelOne
=
obj
.
LevelOne
;
this
.
LevelTwo
=
obj
.
LevelTwo
;
}
this
.
addMsg
.
CateId
=
obj
.
Id
;
}
this
.
CateDialog
=
false
;
this
.
CateDialog
=
false
;
this
.
addMsg
.
CateId
=
obj
.
Id
;
},
}
//选择商品
getGoodsChoice
()
{
var
chooseGoods
=
this
.
$refs
.
choiceGood
.
getChoicedGoods
();
if
(
chooseGoods
&&
chooseGoods
[
0
].
CarouselImageList
.
length
>
0
){
chooseGoods
[
0
].
CarouselImageList
.
forEach
(
x
=>
{
this
.
addMsg
.
ImgList
.
push
(
x
.
Path
);
})
}
this
.
goodsName
=
chooseGoods
[
0
].
Name
;
this
.
addMsg
.
GoodsId
=
chooseGoods
[
0
].
Id
this
.
isShowGoods
=
false
;
this
.
$refs
.
choiceGood
.
toggleSelection
();
},
},
},
mounted
()
{
mounted
()
{
this
.
getList
();
this
.
getList
();
...
...
src/components/common/choiceMaterial.vue
View file @
632a44c9
...
@@ -68,6 +68,33 @@
...
@@ -68,6 +68,33 @@
},
},
//父组件调用方法
//父组件调用方法
getMaterial
(){
getMaterial
(){
if
(
this
.
checkedObj
.
Level
==
2
){
this
.
dataList
.
forEach
(
x
=>
{
if
(
x
.
children
.
length
>
0
){
x
.
children
.
forEach
(
y
=>
{
if
(
y
.
Id
==
this
.
checkedObj
.
Id
){
this
.
checkedObj
.
LevelOne
=
x
.
Name
;
}
})
}
})
}
if
(
this
.
checkedObj
.
Level
==
3
){
this
.
dataList
.
forEach
(
x
=>
{
if
(
x
.
children
.
length
>
0
){
x
.
children
.
forEach
(
y
=>
{
if
(
y
.
children
.
length
>
0
){
y
.
children
.
forEach
(
z
=>
{
if
(
z
.
Id
==
this
.
checkedObj
.
Id
){
this
.
checkedObj
.
LevelOne
=
x
.
Name
;
this
.
checkedObj
.
LevelTwo
=
y
.
Name
;
}
})
}
})
}
})
}
return
this
.
checkedObj
;
return
this
.
checkedObj
;
},
},
...
...
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