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
730b91b8
Commit
730b91b8
authored
Aug 19, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
d5115a51
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
144 additions
and
45 deletions
+144
-45
shareFriend.vue
src/components/Share/shareFriend.vue
+144
-45
No files found.
src/components/Share/shareFriend.vue
View file @
730b91b8
...
@@ -8,35 +8,40 @@
...
@@ -8,35 +8,40 @@
</el-button>
</el-button>
</div>
</div>
<div
class=
"content"
>
<div
class=
"content"
>
<div
class=
"searchInput"
>
<div>
素材类型
<el-select
v-model=
"msg.CateId"
></el-select>
<span>
素材类型
</span>
添加时间
<el-date-picker
class=
"indataPicker"
type=
"daterange"
v-model=
"dateStr"
range-separator=
"至"
<el-select
size=
"small"
v-model=
"msg.CateId"
></el-select>
<span
style=
"margin-left:10px;"
>
添加时间
</span>
<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"
>
</el-date-picker>
</el-date-picker>
<el-input
style=
"display:inline-block;width:225px;height:30px"
placeholder=
"请输入文案关键字搜索"
v-model=
"msg.KeyWords"
<div
class=
"searchInput"
style=
"margin-left:10px;"
>
size=
"small"
clearable
@
keyup
.
enter
.
native=
"msg.pageIndex=1,getList()"
@
clear=
"msg.pageIndex=1,getList()"
>
<el-input
style=
"display:inline-block;width:225px;height:30px"
placeholder=
"请输入文案关键字搜索"
</el-input>
v-model=
"msg.KeyWords"
size=
"small"
clearable
@
keyup
.
enter
.
native=
"msg.pageIndex=1,getList()"
<span
class=
"el-icon-search"
style=
"color:#979dad;font-size:14px;position:relative;top:1px"
@
clear=
"msg.pageIndex=1,getList()"
>
@
click=
"msg.pageIndex=1,getList()"
>
</span>
</el-input>
<span
class=
"el-icon-search"
style=
"color:#979dad;font-size:14px;position:relative;top:1px"
@
click=
"msg.pageIndex=1,getList()"
>
</span>
</div>
</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"
>
<el-table-column
prop=
"Id"
label=
"ID"
width=
"
10
0"
>
<el-table-column
prop=
"Id"
label=
"ID"
width=
"
6
0"
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"分类名称"
width=
"1
0
0"
>
<el-table-column
label=
"分类名称"
width=
"1
5
0"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<el-tag
v-for=
"tag in scope.row.CateList"
:key=
"tag.Id"
>
<el-tag
v-for=
"tag in scope.row.CateList"
size=
"small"
:key=
"tag.Id"
>
{{
tag
.
Name
}}
{{
tag
.
Name
}}
</el-tag>
</el-tag>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"MaterialInfo"
label=
"发圈文案"
width=
"
1
00"
>
<el-table-column
prop=
"MaterialInfo"
label=
"发圈文案"
width=
"
3
00"
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"MaterialImg"
label=
"图片视频"
width=
"
1
00"
>
<el-table-column
prop=
"MaterialImg"
label=
"图片视频"
width=
"
3
00"
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"GoodsId"
label=
"商品信息"
width=
"
10
0"
>
<el-table-column
prop=
"GoodsId"
label=
"商品信息"
width=
"
22
0"
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"SortNum"
label=
"排序"
width=
"1
5
0"
>
<el-table-column
prop=
"SortNum"
label=
"排序"
width=
"1
2
0"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"sort_goods_id != scope.row.Id"
flex=
"dir:left cross:center"
>
<div
v-if=
"sort_goods_id != scope.row.Id"
flex=
"dir:left cross:center"
>
<span>
{{
scope
.
row
.
SortNum
}}
</span>
<span>
{{
scope
.
row
.
SortNum
}}
</span>
...
@@ -45,7 +50,7 @@
...
@@ -45,7 +50,7 @@
</el-button>
</el-button>
</div>
</div>
<div
style=
"display: flex;align-items: center"
v-else
>
<div
style=
"display: flex;align-items: center"
v-else
>
<el-input
style=
"min-width:
7
0px"
type=
"text"
size=
"mini"
<el-input
style=
"min-width:
5
0px"
type=
"text"
size=
"mini"
@
keyup
.
native=
"checkInteger(scope.row,'SortNum')"
v-model=
"scope.row.SortNum"
></el-input>
@
keyup
.
native=
"checkInteger(scope.row,'SortNum')"
v-model=
"scope.row.SortNum"
></el-input>
<el-button
class=
"change-quit"
type=
"text"
style=
"color: #F56C6C;padding: 0 5px"
icon=
"el-icon-error"
<el-button
class=
"change-quit"
type=
"text"
style=
"color: #F56C6C;padding: 0 5px"
icon=
"el-icon-error"
circle
@
click=
"sort_goods_id=0"
></el-button>
circle
@
click=
"sort_goods_id=0"
></el-button>
...
@@ -55,23 +60,23 @@
...
@@ -55,23 +60,23 @@
</div>
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"IsTop"
label=
"是否置顶"
width=
"
10
0"
>
<el-table-column
prop=
"IsTop"
label=
"是否置顶"
width=
"
8
0"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-switch
v-model=
"scope.row.IsTop"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"0"
<el-switch
v-model=
"scope.row.IsTop"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"0"
@
change=
"updateIsTop(scope.row)"
>
@
change=
"updateIsTop(scope.row)"
>
</el-switch>
</el-switch>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"IsUse"
label=
"状态"
width=
"
10
0"
>
<el-table-column
prop=
"IsUse"
label=
"状态"
width=
"
8
0"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-switch
v-model=
"scope.row.IsUse"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"0"
<el-switch
v-model=
"scope.row.IsUse"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"0"
@
change=
"updateIsUse(scope.row)"
>
@
change=
"updateIsUse(scope.row)"
>
</el-switch>
</el-switch>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"CreateDateStr"
label=
"添加时间"
width=
"1
6
0"
>
<el-table-column
prop=
"CreateDateStr"
label=
"添加时间"
width=
"1
8
0"
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
width=
"180"
>
<el-table-column
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<img
@
click=
"getCategory(scope.row.Id)"
style=
"width:32px;height:32px;margin:0 10px"
<img
@
click=
"getCategory(scope.row.Id)"
style=
"width:32px;height:32px;margin:0 10px"
src=
"../../assets/img/userman/edit.png"
alt=
""
>
src=
"../../assets/img/userman/edit.png"
alt=
""
>
...
@@ -89,29 +94,84 @@
...
@@ -89,29 +94,84 @@
</div>
</div>
<div
class=
"content"
>
<div
class=
"content"
>
<div
class=
"conten_indder"
>
<div
class=
"conten_indder"
>
<el-form
label-width=
"150px"
>
<el-form
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
label-width=
"150px"
>
<el-form-item
label=
"
分类名称
"
>
<el-form-item
label=
"
动态文案"
prop=
"MaterialInfo
"
>
<el-input
type=
"text
"
size=
"small"
v-model=
"addMsg.Name
"
></el-input>
<el-input
type=
"text
area"
:rows=
"6"
v-model=
"addMsg.MaterialInfo
"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"选择分类级别"
>
<el-form-item>
<el-radio
v-model=
"addMsg.Level"
:label=
"1"
>
一级分类
</el-radio>
<label
slot=
"label"
>
动态图片
<el-radio
v-model=
"addMsg.Level"
:label=
"2"
>
二级分类
</el-radio>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"最多9图"
placement=
"top"
>
<el-radio
v-model=
"addMsg.Level"
:label=
"3"
>
三级分类
</el-radio>
<i
class=
"el-icon-info"
></i>
</el-tooltip>
</label>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"建议尺寸:750 * 750"
placement=
"top"
>
<el-button
size=
"mini"
@
click=
"imgDialog=true"
>
选择文件
</el-button>
</el-tooltip>
<div>
<div
class=
"zk_pic_box"
v-if=
"dynamicArr.length==0"
style=
"width:90px;height:90px;"
flex=
"main:center cross:center"
>
<i
class=
"el-icon-picture-outline"
></i>
</div>
<div
v-else
class=
"zk_pic_box"
v-for=
"(item,index) in dynamicArr"
:key=
"index"
style=
"width:90px;height:90px;display:inline-block;margin-right:10px;"
flex=
"main:center cross:center"
:style=
"
{backgroundImage:'url(' + item + ')'}">
<i
v-if=
"item==''"
class=
"el-icon-picture-outline"
></i>
<el-button
type=
"danger"
v-if=
"item!=''"
@
click=
"delImgArr(index)"
class=
"image-delete"
size=
"mini"
icon=
"el-icon-close"
circle
></el-button>
</div>
</div>
</el-form-item>
<el-form-item
style=
"display:none;"
>
<label
slot=
"label"
>
动态视频
<el-tooltip
class=
"item"
effect=
"dark"
content=
"当动态视频和动态图片均有素材添加时,前端只展示视频"
placement=
"top"
>
<i
class=
"el-icon-info"
></i>
</el-tooltip>
</label>
<el-input
size=
"small"
v-model=
"addMsg.LinkUrl"
placeholder=
"选择上传视频"
disabled
>
<template
slot=
"append"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"支持格式mp4;支持编码H.264;视频大小不能超过10 MB"
placement=
"top"
>
<el-button
size=
"mini"
>
选择文件
</el-button>
</el-tooltip>
</
template
>
</el-input>
</el-form-item>
<el-form-item
label=
"是否置顶"
>
<el-switch
v-model=
"addMsg.IsTop"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"0"
>
</el-switch>
</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
type=
"text"
size=
"small"
v-model=
"addMsg.SortNum"
@
keyup
.
native=
"checkInteger(addMsg,'SortNum')"
></el-input>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
</div>
</div>
<el-button
size=
"small"
style=
"margin-top:20px;padding:9px 25px;"
type=
"primary"
@
click=
"submit
form(
)"
>
保存
<el-button
size=
"small"
style=
"margin-top:20px;padding:9px 25px;"
type=
"primary"
@
click=
"submit
Form('addMsg'
)"
>
保存
</el-button>
</el-button>
</template>
</template>
<!-- 选择图片 -->
<el-dialog
title=
"选择文件"
:visible
.
sync=
"imgDialog"
width=
"1240px"
>
<ChooseImg
@
SelectId=
"SelectId"
:IsMultiple=
"true"
></ChooseImg>
</el-dialog>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
ChooseImg
from
"@/components/global/ChooseImg.vue"
;
export
default
{
export
default
{
components
:
{
ChooseImg
},
data
()
{
data
()
{
return
{
return
{
sort_goods_id
:
0
,
sort_goods_id
:
0
,
dateStr
:
""
,
dateStr
:
[]
,
loading
:
false
,
loading
:
false
,
//是否显示新增分类
//是否显示新增分类
IsShowCategory
:
true
,
IsShowCategory
:
true
,
...
@@ -125,6 +185,7 @@
...
@@ -125,6 +185,7 @@
pageSize
:
10
,
pageSize
:
10
,
total
:
0
,
total
:
0
,
},
},
dynamicArr
:
[],
//动态图片数组
addMsg
:
{
addMsg
:
{
Id
:
0
,
//编号
Id
:
0
,
//编号
CateId
:
0
,
//分类编号
CateId
:
0
,
//分类编号
...
@@ -136,11 +197,26 @@
...
@@ -136,11 +197,26 @@
IsTop
:
0
,
//是否置顶
IsTop
:
0
,
//是否置顶
SortNum
:
0
,
//排序
SortNum
:
0
,
//排序
},
},
imgDialog
:
false
,
//图片弹窗
rules
:
{
MaterialInfo
:
[{
required
:
true
,
message
:
"请输入动态文案"
,
trigger
:
"change"
}]
},
};
};
},
},
methods
:
{
methods
:
{
//获取分类列表
//获取分类列表
getList
()
{
getList
()
{
if
(
this
.
dateStr
&&
this
.
dateStr
.
length
>
0
)
{
this
.
msg
.
QStartDate
=
this
.
dateStr
[
0
];
this
.
msg
.
QEndDate
=
this
.
dateStr
[
1
];
}
else
{
this
.
msg
.
QStartDate
=
''
;
this
.
msg
.
QEndDate
=
''
;
}
this
.
loading
=
true
;
this
.
loading
=
true
;
this
.
apipost
(
"/api/Share/GetShareFriendPageList"
,
this
.
msg
,
this
.
apipost
(
"/api/Share/GetShareFriendPageList"
,
this
.
msg
,
res
=>
{
res
=>
{
...
@@ -155,21 +231,28 @@
...
@@ -155,21 +231,28 @@
);
);
},
},
//新增修改分类
//新增修改分类
submitform
()
{
submitForm
(
formName
)
{
this
.
apipost
(
"/api/Share/SetShareFriend"
,
this
.
addMsg
,
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
res
=>
{
if
(
valid
)
{
this
.
loading
=
false
;
this
.
addMsg
.
MaterialImg
=
this
.
dynamicArr
.
toString
();
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
apipost
(
"/api/Share/SetShareFriend"
,
this
.
addMsg
,
this
.
getList
();
res
=>
{
this
.
Success
(
res
.
data
.
message
);
this
.
loading
=
false
;
this
.
IsShowCategory
=
true
;
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
clearMsg
();
this
.
getList
();
}
else
{
this
.
Success
(
res
.
data
.
message
);
this
.
Error
(
res
.
data
.
message
);
this
.
IsShowCategory
=
true
;
}
this
.
clearMsg
();
},
}
else
{
null
this
.
Error
(
res
.
data
.
message
);
);
}
},
null
);
}
else
{
return
false
;
}
});
},
},
//获取实体
//获取实体
getShareFriend
(
Id
)
{
getShareFriend
(
Id
)
{
...
@@ -263,6 +346,7 @@
...
@@ -263,6 +346,7 @@
},
},
//更新排序
//更新排序
updateSortNum
(
item
)
{
updateSortNum
(
item
)
{
console
.
log
(
item
,
'item'
);
this
.
apipost
(
"/api/Share/SetShareFriendSortNum"
,
{
this
.
apipost
(
"/api/Share/SetShareFriendSortNum"
,
{
Id
:
item
.
Id
,
Id
:
item
.
Id
,
SortNum
:
item
.
SortNum
SortNum
:
item
.
SortNum
...
@@ -294,7 +378,22 @@
...
@@ -294,7 +378,22 @@
},
},
null
null
);
);
}
},
//选择图片
SelectId
(
msg
)
{
let
that
=
this
;
if
(
this
.
dynamicArr
.
length
<
9
)
{
this
.
dynamicArr
.
push
(
that
.
getIconLink
(
msg
[
0
].
url
));
}
else
{
this
.
Error
(
'最多选择9张图片哟!'
);
}
this
.
imgDialog
=
false
;
},
//删除图片
delImgArr
(
index
)
{
this
.
dynamicArr
.
splice
(
index
,
1
);
},
},
},
mounted
()
{
mounted
()
{
this
.
getList
();
this
.
getList
();
...
...
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