Commit 190d747e authored by zhengke's avatar zhengke

修改

parent 807eb83a
<style>
.activityMain {
background: #fff;
width: 740px;
min-height: 500px;
}
.activityTitle {
font-size: 16px;
font-weight: 400;
color: #000;
}
.activityContent {
font-size: 14px;
line-height: 24px;
color: #333;
margin: 20px 0;
}
.activeImgContent {
width: 100%;
}
.activeImgContent img {
max-width: 100%;
}
.activityFlex {
display: flex;
padding: 20px;
border-bottom: 1px solid #E1E4E6;
}
.aImg {
width: 88px;
height: 88px;
position: relative;
}
.aUserName {
margin: 5px 0;
color: #2d64b3;
text-align: center;
}
.active_NameLeft {
flex-shrink: 0;
margin-right: 20px;
}
.activeComment {
width: 100%;
background-color: #f7f8fa;
margin-top: 10px;
padding: 15px;
}
.activeComList {
display: flex;
padding-bottom: 10px;
border-bottom: 1px #d7d7d7 dotted;
display: flex;
margin-bottom: 10px;
position: relative;
}
.compentImg {
width: 32px;
height: 32px;
padding: 1px;
border: 1px solid #ccc;
flex-shrink: 0;
}
.compentRight {
color: #333;
font-size: 14px;
line-height: 20px;
margin-left: 10px;
width: 100%;
}
.compentName {
color: #2d64b3;
}
.commonDate {
font-size: 12px;
color: #999;
}
.activeDel {
width: 25px;
position: absolute;
right: -8px;
top: -8px;
display: none;
cursor: pointer;
}
.activeDel img {
width: 100%;
}
.activeComList:hover .activeDel {
display: block;
}
.activeLouzhu {
position: absolute;
right: 0;
top: 0;
}
</style>
<template>
<div class="activityInfo">
<div class="activityMain">
<div class="activityFlex">
<div class="active_NameLeft">
<div class="aImg">
<img style="width:100%;height:100%;" :src="dataList.Photo" />
<img src="../../assets/img/userman/louzhu.png" class="activeLouzhu" alt="" />
</div>
<div class="aUserName">{{dataList.UserName}}</div>
</div>
<div>
<div class="activityTitle">{{dataList.ActivityTitle}}</div>
<div class="activityContent">
{{dataList.Content}}
</div>
<div class="activeImgContent" v-for="(item,index) in dataList.ImageList" :key="index">
<img :src="item" alt="" />
</div>
</div>
</div>
<div>
<div class="activityFlex" v-for="(subItem,cindex) in compentList" :key="cindex">
<div class="active_NameLeft">
<div class="aImg">
<img style="width:100%;height:100%;" :src="subItem.Photo" />
<img src="../../assets/img/userman/louzhu.png" v-if="subItem.UserId==dataList.UserId" class="activeLouzhu" alt="" />
</div>
<div class="aUserName">{{subItem.UserName}}</div>
</div>
<div style="width:100%;">
<div class="activityContent" style="margin-top:0;">
{{subItem.Content}}
</div>
<div class="activeImgContent" v-for="(item,index) in subItem.ImageList" :key="index">
<img :src="item" alt="" />
</div>
<div class="activeComment" v-if="subItem.ReplyNum>0">
<div class="activeComList" v-for="(cItem,cindex) in subItem.ReplyList" :key="cindex">
<div class="compentImg">
<img style="width:100%;height:100%;" :src="cItem.Photo" alt="" />
</div>
<div class="compentRight">
<div>
<span class="compentName">{{cItem.UserName}}</span>{{cItem.Content}}
</div>
<div style="text-align:right;">
<span class="commonDate">{{cItem.CreateDate}}</span>
</div>
</div>
</div>
<div>
</div>
</div>
</div>
</div>
<!-- <div class="activeComment">
<div class="activeComList" v-for="(item,cindex) in compentList" :key="cindex">
<div class="compentImg">
<img style="width:100%;height:100%;" :src="item.Photo" alt="" />
</div>
<div class="compentRight">
<div>
<span class="compentName">{{item.UserName}}</span>{{item.Content}}
</div>
<div style="text-align:right;">
<span class="commonDate">{{item.CreateDate}}</span>
</div>
</div>
<div class="activeDel" @click="delCompent(item)">
<img src="../../assets/img/userman/del.png" alt="" />
</div>
</div>
<div class="activeComList" v-for="(subItem,subIndex) in replayList" :key="subIndex+100">
<div class="compentImg">
<img style="width:100%;height:100%;" :src="subItem.Photo" alt="" />
</div>
<div class="compentRight">
<div>
<span class="compentName">{{subItem.UserName}}</span><span>回复</span><span
style="margin-left:5px;color:#2d64b3">{{subItem.ReplyUserName}}</span>{{subItem.Content}}
</div>
<div style="text-align:right;">
<span class="commonDate">{{subItem.CreateDate}}</span>
</div>
</div>
<div class="activeDel" @click="delCompent(subItem)">
<img src="../../assets/img/userman/del.png" alt="" />
</div>
</div>
<el-pagination style="text-align:right" background v-if="pageCount>0" @current-change="handleCurrentChange"
:page-size="comMsg.pageSize" layout="prev, pager, next" :current-page.sync="comMsg.pageIndex"
:total="pageCount">
</el-pagination>
</div> -->
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
msg: {
ActivityId: 0
},
comMsg: {
pageIndex: 1,
pageSize: 20,
ActivityId: 0
},
replayMsg: {
pageIndex: 1,
pageSize: 20,
ParentId: 0
},
dataList: {},
compentList: [],
pageCount: 0,
replayList: []
}
},
created() {},
mounted() {
if (this.$route.query.Id) {
this.msg.ActivityId = this.$route.query.Id;
this.comMsg.ActivityId = this.$route.query.Id;
this.replayMsg.ParentId = this.$route.query.Id;
}
this.getList();
this.getCommentList();
this.getSecondReply();
},
methods: {
//获取帖子头部数据
getList() {
this.apipost("/api/Miai/GetActivityInfo", this.msg, res => {
if (res.data.resultCode == 1) {
console.log(res, '数据');
this.dataList = res.data.data;
} else {
this.Error(res.data.message);
}
})
},
//获取评论
getCommentList() {
this.apipost("/api/Miai/GetActivityDiscussPageList", this.comMsg, res => {
if (res.data.resultCode == 1) {
console.log(res, '评论数据');
this.pageCount = res.data.data.pageCount;
this.compentList = res.data.data.pageData;
} else {
this.Error(res.data.message);
}
})
},
//评论翻页
handleCurrentChange(val) {
this.comMsg.pageIndex = val;
this.getCommentList();
this.replayMsg.pageIndex = val;
this.getSecondReply();
},
//获取二级回复
getSecondReply() {
this.apipost("/api/Miai/GetActivityReplyPageList", this.replayMsg, res => {
if (res.data.resultCode == 1) {
console.log(res, '回复数据');
// this.pageCount = res.data.data.pageCount;
// this.compentList = res.data.data.pageData;
this.replayList = res.data.data.pageData;
} else {
this.Error(res.data.message);
}
})
},
//删除评论
delCompent(item) {
let that = this;
that.$confirm('是否删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let msg = {
DiscussId: item.Id
}
this.apipost("/api/Miai/DelActivityDiscussInfo", msg, res => {
if (res.data.resultCode == 1) {
this.getCommentList();
this.getSecondReply();
} else {
this.Error(res.data.message);
}
})
}).catch(() => {
});
}
}
}
</script>
......@@ -172,8 +172,10 @@
<li class="menu_item" :class="{'Fchecked':isChecked=='/plateList'}" @click="isChecked='/plateList',CommonJump('plateList')">
<i class="el-icon-menu"></i><span>版块列表</span>
</li>
<li class="menu_item" :class="{'Fchecked':isChecked=='/recruitStick'}" @click="isChecked='/recruitStick',CommonJump('recruitStick')">
<i class="el-icon-menu"></i><span>招募贴</span>
</li>
</ul>
</div>
</div>
......
......@@ -8,168 +8,119 @@
</div>
<div class="content">
<div style="display: flex;flex-direction: row;align-items: center">
<div class="block" >
<div class="block">
<div class="searchInput" style="width:200px">
<el-input style="display:inline-block;width:170px;height:30px"
placeholder="请输入板块名称搜索"
v-model="msg.Name"
size="small"
@clear="getList"
@keyup.enter.native="getList"
clearable>
<el-input style="display:inline-block;width:170px;height:30px" placeholder="请输入板块名称搜索" v-model="msg.Name"
size="small" @clear="getList" @keyup.enter.native="getList" clearable>
</el-input>
<span @click="getList" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
<span @click="getList" class="el-icon-search"
style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div>
<span>是否显示</span>
<el-select class="w100" @change="getList()" style="margin-right: 10px;"
v-model="msg.PrizeType" size="small" placeholder="请选择">
<el-select class="w100" @change="getList()" style="margin-right: 10px;" v-model="msg.PrizeType" size="small"
placeholder="请选择">
<el-option label="不限" :value="0"></el-option>
<el-option label="是" :value="1"></el-option>
<el-option label="否" :value="2"></el-option>
</el-select>
</div>
</div>
</div>
<div style="padding: 20px;background: #fff;">
<el-table
:data="tableData"
header-cell-class-name="headClass"
style="width: 100%"
border
>
<el-table-column
prop="Id"
label="ID"
width="100">
<el-table :data="tableData" header-cell-class-name="headClass" style="width: 100%" border>
<el-table-column prop="Id" label="ID" width="100">
<template slot-scope="scope">
<span class="plateGoId" @click="goRecruit(scope.row.Id)">{{scope.row.Id}}</span>
</template>
</el-table-column>
<el-table-column
prop="Name"
label="信息">
<el-table-column prop="Name" label="信息">
<template slot-scope="scope">
<div class="app-image" :style="{backgroundImage:'url(' + scope.row.Icon + ')',backgroundSize:'cover'}"></div>
<div class="app-image" :style="{backgroundImage:'url(' + scope.row.Icon + ')',backgroundSize:'cover'}">
</div>
<div flex="dir:left cross:center">
{{scope.row.Name}}
</div>
</template>
</el-table-column>
<el-table-column
prop="Sort"
label="排序"
>
<el-table-column prop="Sort" label="排序">
</el-table-column>
<el-table-column
prop="IsShow"
label="是否显示">
<el-table-column prop="IsShow" label="是否显示">
<template slot-scope="scope">
<!-- <div flex="dir:left cross:center">-->
<!-- {{scope.row.IsShow==1?'是':'否'}}-->
<!-- </div>-->
<el-switch
v-model="scope.row.IsShow"
:active-value="1"
:inactive-value="2"
@change="setshow(scope.row)"
>
<!-- <div flex="dir:left cross:center">-->
<!-- {{scope.row.IsShow==1?'是':'否'}}-->
<!-- </div>-->
<el-switch v-model="scope.row.IsShow" :active-value="1" :inactive-value="2" @change="setshow(scope.row)">
</el-switch>
</template>
</el-table-column>
<el-table-column
prop="CreateDate"
label="创建时间"
>
<el-table-column prop="CreateDate" label="创建时间">
</el-table-column>
<el-table-column
fixed="right"
label="操作"
width="180"
>
<el-table-column fixed="right" label="操作" width="180">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="编辑" placement="top" >
<el-tooltip class="item" effect="dark" content="编辑" placement="top">
<img src="../../assets/img/setup/edit.png" alt="" class="imgstyle" @click="Edit(scope.row)">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top" >
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<img src="../../assets/img/setup/del.png" alt="" class="imgstyle" @click="delete_b(scope.row)">
</el-tooltip>
</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="count">
<el-pagination style="text-align:right" background @current-change="handleCurrentChange" :page-size="msg.pageSize"
layout="prev, pager, next" :current-page.sync="msg.pageIndex" :total="count">
</el-pagination>
</div>
</div>
</template>
<script>
export default {
name: "plateList",
data(){
return{
msg:{
pageIndex:1,
pageSize:20,
Name:'',
IsShow:0,
data() {
return {
msg: {
pageIndex: 1,
pageSize: 20,
Name: '',
IsShow: 0,
},
changeState:false,
dateList:[],
tableData:[],
count:0,
loading:false,
EnableMsg:{
Ids:'',
TeacherStatus:0,
changeState: false,
dateList: [],
tableData: [],
count: 0,
loading: false,
EnableMsg: {
Ids: '',
TeacherStatus: 0,
},
}
},
created(){
created() {
this.getDateList();
},
methods:{
getDateList(){
methods: {
getDateList() {
let msg = JSON.parse(JSON.stringify(this.msg))
this.loading=true;
this.loading = true;
this.apipost("/api/Miai/GetForumPageList", msg, res => {
this.loading=false;
if(res.data.resultCode==1){
this.loading = false;
if (res.data.resultCode == 1) {
this.tableData = res.data.data.pageData;
this.count = res.data.data.count;
}else {
} else {
this.Info(res.data.message);
}
})
},
addRecharge(){
addRecharge() {
this.$router.push('/addplate');
},
setshow(row){
setshow(row) {
this.apipost(
"/api/Miai/SetForumState",
{ForumId:row.Id,Type:1},
"/api/Miai/SetForumState", {
ForumId: row.Id,
Type: 1
},
res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
......@@ -179,22 +130,24 @@
},
);
},
Edit(row){
let arr=encodeURIComponent(JSON.stringify(row))
Edit(row) {
let arr = encodeURIComponent(JSON.stringify(row))
this.$router.push({
name: 'addplate',
query: {
arr:arr,
arr: arr,
blank: "y"
}
});
},
delete_b(row){
let that=this;
delete_b(row) {
let that = this;
that.Confirm("是否删除?", function () {
that.apipost(
"/api/Miai/SetForumState",
{ForumId:row.Id,Type:2},
"/api/Miai/SetForumState", {
ForumId: row.Id,
Type: 2
},
res => {
if (res.data.resultCode == 1) {
that.Success(res.data.message);
......@@ -208,9 +161,9 @@
},
//勾选导游
handleSelectionChange(val){
handleSelectionChange(val) {
var selectRow = JSON.parse(JSON.stringify(val));
let array= [];
let array = [];
selectRow.forEach(x => {
let obj = {}
obj = x.ID;
......@@ -220,7 +173,7 @@
},
getList(){
getList() {
this.msg.pageIndex = 1
this.getDateList()
},
......@@ -229,12 +182,22 @@
this.msg.pageIndex = val;
this.getDateList();
},
goRecruit(Id){
this.$router.push({
name: 'recruitStick',
query: {
Id:Id,
blank: "y"
}
});
},
},
}
</script>
<style >
.plateList .el-card__header{
<style>
.plateList .el-card__header {
display: flex;
flex-direction: row;
align-items: center;
......@@ -242,41 +205,53 @@
background: #fff;
}
.plateList .el-button--small{
.plateList .el-button--small {
padding: 9px 15px;
}
.plateList .content .searchInput{
.plateList .content .searchInput {
border: 1px solid #DCDFE6;
border-radius: 4px;
/*margin-left: 10px;*/
}
.plateList .content .searchInput .el-input__inner{
border:none;outline:none;
.plateList .content .searchInput .el-input__inner {
border: none;
outline: none;
height: 30px;
line-height: 30px;
}
.plateList .content .searchInput{
.plateList .content .searchInput {
line-height: normal;
display: inline-table;
border-collapse: separate;
border-spacing: 0;
width:250px;
width: 250px;
}
.plateList .content{
.plateList .content {
background: #fff;
margin-top:10px;
margin-top: 10px;
padding: 15px;
box-sizing: border-box;
}
.plateList .el-tag{
.plateList .el-tag {
margin-right: 5px;
}
.plateList .app-image{
.plateList .app-image {
background-position: center center;
width: 50px;
height: 50px;
border-radius:0%;
border-radius: 0%;
float: left;
margin-right: 8px;
}
.plateList .plateGoId{
color:#409EFF;
cursor: pointer;
}
</style>
<style>
.recruitStick .content {
background: #fff;
margin-top: 10px;
padding: 15px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.recruitContent {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
</style>
<template>
<div class="recruitStick">
<div class="content">
<div style="display: flex;flex-direction: row;align-items: center">
<div class="block">
<div class="searchInput" style="width:200px">
<el-input style="display:inline-block;width:170px;height:30px" placeholder="请输入标题搜索"
v-model="msg.ActivityTitle" size="small" @clear="getList" @keyup.enter.native="getList" clearable>
</el-input>
<span @click="getList" class="el-icon-search"
style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div>
</div>
</div>
</div>
<div style="padding: 20px;background: #fff;">
<el-table :data="tableData" header-cell-class-name="headClass" style="width: 100%" border>
<el-table-column prop="Id" label="ID" width="100">
</el-table-column>
<el-table-column prop="ActivityTitle" label="标题">
</el-table-column>
<el-table-column prop="UserName" label="用户名称">
</el-table-column>
<el-table-column prop="Photo" label="头像">
<template slot-scope="scope">
<img :src="scope.row.Photo" style="width:35px;height:35px;border-radius:50%;" />
</template>
</el-table-column>
<el-table-column prop="Content" label="内容">
<template slot-scope="scope">
<div class="recruitContent">{{scope.row.Content}}</div>
</template>
</el-table-column>
<!-- <el-table-column prop="ImageList" label="图片">
</el-table-column> -->
<el-table-column prop="ReplyNum" label="回复数量">
</el-table-column>
<el-table-column prop="Deadline" label="截止报名日期">
</el-table-column>
<el-table-column fixed="right" label="操作" width="180">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<img src="../../assets/img/setup/del.png" alt="" class="imgstyle" @click="delete_b(scope.row)">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="报名列表" placement="top">
<img src="../../assets/img/userman/order.png" alt="" class="imgstyle" @click="goorderList(scope.row)">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="查看详情" placement="top">
<img src="../../assets/img/userman/icon-show.png" alt="" class="imgstyle" @click="goDetail(scope.row)">
</el-tooltip>
</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="count">
</el-pagination>
</div>
</div>
</template>
<script>
export default {
data() {
return {
count: 0,
msg: {
pageIndex: 1,
pageSize: 20,
ForumId: 0,
ActivityTitle: '',
},
tableData: []
}
},
created() {},
mounted() {
if (this.$route.query.Id) {
this.msg.ForumId = this.$route.query.Id;
}
this.getList()
},
methods: {
getList() {
this.apipost("/api/Miai/GetActivityPageList", this.msg, res => {
if (res.data.resultCode == 1) {
console.log(res, '数据');
this.count = res.data.data.pageCount;
this.tableData = res.data.data.pageData;
} else {
this.Error(res.data.message);
}
})
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
//删除帖子
delete_b(item) {
let that = this;
that.$confirm('是否删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let msg = {
ActivityId: item.Id
}
this.apipost("/api/Miai/DelActivityInfo", msg, res => {
if (res.data.resultCode == 1) {
this.getList();
} else {
this.Error(res.data.message);
}
})
}).catch(() => {
});
},
//招募贴报名列表
goorderList(item){
this.$router.push({
name: 'registrationList',
query: {
Id:item.Id,
blank: "y"
}
});
},
//查看详情
goDetail(item){
this.$router.push({
name: 'activityInfo',
query: {
Id:item.Id,
blank: "y"
}
});
}
},
}
</script>
<style>
.recruitStick .content {
background: #fff;
margin-top: 10px;
padding: 15px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.recruitContent {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
</style>
<template>
<div class="recruitStick">
<div style="padding: 20px;background: #fff;">
<el-table :data="tableData" header-cell-class-name="headClass" style="width: 100%" border>
<el-table-column prop="Name" label="姓名">
<template slot-scope="scope">
<div style="display:flex;align-items:center;">
<img :src="scope.row.Photo" alt="" style="width:30px;height:30px;border-radius:50%;margin-right:5px;" />{{scope.row.Name}}
</div>
</template>
</el-table-column>
<el-table-column prop="Mobile" label="电话">
</el-table-column>
<el-table-column prop="UserName" label="用户名">
</el-table-column>
<el-table-column prop="Remark" label="内容">
<template slot-scope="scope">
<div class="recruitContent">{{scope.row.Remark}}</div>
</template>
</el-table-column>
<el-table-column prop="CreateDate" label="创建时间">
</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="count">
</el-pagination>
</div>
</div>
</template>
<script>
export default {
data() {
return {
count: 0,
msg: {
pageIndex: 1,
pageSize: 20,
ActivityId: 0
},
tableData: []
}
},
created() {},
mounted() {
if (this.$route.query.Id) {
this.msg.ActivityId = this.$route.query.Id;
}
this.getList()
},
methods: {
getList() {
this.apipost("/api/Miai/GetActivityEnrollPageList", this.msg, res => {
if (res.data.resultCode == 1) {
console.log(res, '数据');
this.count = res.data.data.pageCount;
this.tableData = res.data.data.pageData;
} else {
this.Error(res.data.message);
}
})
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
}
},
}
</script>
<template>
<div>
<el-input size="mini" v-model="msg.Name" placeholder="根据名称搜索" :clearable="true" @clear="msg.pageIndex=1,getList()"
@keyup.enter.native="msg.pageIndex=1,getList()">
<el-button slot="append" @click="msg.pageIndex=1,getList()">搜索</el-button>
</el-input>
<el-table ref="multipleTable" :data="dataList" tooltip-effect="dark" height="450" style="width: 100%"
@selection-change="handleSelectionChange">
<template v-if="isSingle">
<el-table-column width="50px" label="">
<template slot-scope="scope">
<el-radio v-model="scope.row.IsChecked" @change.native="getTemplateRow(scope.$index,scope.row)">&nbsp;
</el-radio>
</template>
</el-table-column>
</template>
<template v-else>
<el-table-column type="selection" width="50px">
</el-table-column>
</template>
<el-table-column label="ID" width="80px">
<template slot-scope="scope">{{ scope.row.Id }}</template>
</el-table-column>
<el-table-column prop="name" label="名称">
<template slot-scope="scope">
<div flex="cross:center dir:left">
<img style="width:50px;height:50px;margin-right:10px;" :src="getIconLink(scope.row.Photo)" />
<div>{{ scope.row.Name }}</div>
</div>
</template>
</el-table-column>
<el-table-column label="姓名" width="80px">
<template slot-scope="scope">{{ scope.row.RealName }}</template>
</el-table-column>
<el-table-column label="性别" width="80px">
<template slot-scope="scope">{{ scope.row.SexStr }}</template>
</el-table-column>
<el-table-column label="身高" width="80px">
<template slot-scope="scope">{{ scope.row.Height }}</template>
</el-table-column>
<el-table-column label="体重" width="80px">
<template slot-scope="scope">{{ scope.row.Weight }}</template>
</el-table-column>
<el-table-column label="学历" width="80px">
<template slot-scope="scope">{{ scope.row.EducationType }}</template>
</el-table-column>
<el-table-column label="婚姻状态" width="80px">
<template slot-scope="scope">{{ scope.row.Marriage }}</template>
</el-table-column>
<el-table-column label="生日" width="80px">
<template slot-scope="scope">{{ scope.row.Birthday }}</template>
</el-table-column>
</el-table>
<el-pagination style="text-align:center" background @current-change="handleCurrentChange" :page-size="msg.pageSize"
layout="prev, pager, next" :total="total">
</el-pagination>
</div>
</template>
<script>
export default {
props: ['ckGoods', "isSingle", "IsGetSpec"],
data() {
return {
dataList: [],
msg: {
pageIndex: 1,
pageSize: 15,
Name: '', //姓名
RealName: '', //真实姓名
},
total: 0,
selectRow: [],
};
},
created() {
if (this.IsGetSpec) {
this.msg.IsGetSpec = this.IsGetSpec;
}
},
methods: {
//获取所有菜单
getList() {
this.apipost("/api/Miai/GetBaseInfoPageList", this.msg, res => {
if (res.data.resultCode == 1) {
console.log(res,'人物数据');
this.total = res.data.data.count;
var tempArray = res.data.data.pageData;
if (tempArray && tempArray.length > 0) {
tempArray.forEach(item => {
item.IsChecked = false;
});
}
this.dataList = JSON.parse(JSON.stringify(tempArray));
} else {
this.Info(res.data.message);
}
})
},
handleSelectionChange(val) {
this.selectRow = JSON.parse(JSON.stringify(val));
},
getTemplateRow(index, row) {
this.selectRow = [];
if (this.dataList && this.dataList.length > 0) {
this.dataList.forEach(item => {
if (item.Id != row.Id) {
item.IsChecked = false;
}
})
}
this.selectRow.push(JSON.parse(JSON.stringify(row)));
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
//父组件调用方法
getChoicedGoods() {
return this.selectRow;
},
//清空多选方法
toggleSelection(rows) {
if (rows) {
rows.forEach(row => {
this.$refs.multipleTable.toggleRowSelection(row);
});
} else {
this.$refs.multipleTable.clearSelection();
}
},
},
mounted() {
this.getList();
}
};
</script>
<template>
<div>
<el-input size="mini" v-model="msg.Name" placeholder="根据名称搜索" :clearable="true" @clear="msg.pageIndex=1,getList()"
@keyup.enter.native="msg.pageIndex=1,getList()">
<el-button slot="append" @click="msg.pageIndex=1,getList()">搜索</el-button>
</el-input>
<el-table ref="multipleTable" :data="dataList" tooltip-effect="dark" height="450" style="width: 100%"
@selection-change="handleSelectionChange">
<template v-if="isSingle">
<el-table-column width="50px" label="">
<template slot-scope="scope">
<el-radio v-model="scope.row.IsChecked" @change.native="getTemplateRow(scope.$index,scope.row)">&nbsp;
</el-radio>
</template>
</el-table-column>
</template>
<template v-else>
<el-table-column type="selection" width="50px">
</el-table-column>
</template>
<el-table-column label="ID" width="80px">
<template slot-scope="scope">{{ scope.row.Id }}</template>
</el-table-column>
<el-table-column prop="CategoryList" label="分类" width="150px">
<template slot-scope="scope">
<div v-for="(subItem,SubIndex) in scope.row.CategoryList" :key="SubIndex">
{{subItem.CategoryName}}
</div>
</template>
</el-table-column>
<el-table-column prop="name" label="名称">
<template slot-scope="scope">
<div flex="cross:center dir:left">
<img style="width:50px;height:50px;margin-right:10px;" :src="getIconLink(scope.row.CoverImage)" />
<div>{{ scope.row.Name }}</div>
</div>
</template>
</el-table-column>
</el-table>
<el-pagination style="text-align:center" background @current-change="handleCurrentChange" :page-size="msg.pageSize"
layout="prev, pager, next" :total="total">
</el-pagination>
</div>
</template>
<script>
export default {
props: ['ckGoods', "isSingle", "IsGetSpec"],
data() {
return {
dataList: [],
msg: {
pageIndex: 1,
pageSize: 15,
Name: '',
GoodsStatus: 1, //上架中
IsGetSpec: 0
},
total: 0,
selectRow: [],
};
},
created() {
if (this.IsGetSpec) {
this.msg.IsGetSpec = this.IsGetSpec;
}
},
methods: {
//获取所有菜单
getList() {
this.apipost("/api/product/GetProductGoodsDialogList", this.msg, res => {
if (res.data.resultCode == 1) {
this.total = res.data.data.count;
var tempArray = res.data.data.pageData;
if (tempArray && tempArray.length > 0) {
tempArray.forEach(item => {
item.IsChecked = false;
});
}
this.dataList = JSON.parse(JSON.stringify(tempArray));
} else {
this.Info(res.data.message);
}
})
},
handleSelectionChange(val) {
this.selectRow = JSON.parse(JSON.stringify(val));
},
getTemplateRow(index, row) {
this.selectRow = [];
if (this.dataList && this.dataList.length > 0) {
this.dataList.forEach(item => {
if (item.Id != row.Id) {
item.IsChecked = false;
}
})
}
this.selectRow.push(JSON.parse(JSON.stringify(row)));
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
//父组件调用方法
getChoicedGoods() {
return this.selectRow;
},
//清空多选方法
toggleSelection(rows) {
if (rows) {
rows.forEach(row => {
this.$refs.multipleTable.toggleRowSelection(row);
});
} else {
this.$refs.multipleTable.clearSelection();
}
},
},
mounted() {
this.getList();
}
};
</script>
<style>
/*-----------------设置部分--------------*/
.diy-goods .diy-component-edit .diy-goods-label {
width: 85px;
}
.diy-goods .diy-component-edit .cat-item {
border: 1px solid #e2e2e2;
margin-bottom: 5px;
padding: 15px;
max-width: 400px;
}
.diy-goods .diy-component-edit .goods-list {
flex-wrap: wrap;
}
.diy-goods .diy-component-edit .goods-item,
.diy-goods .diy-component-edit .goods-add {
width: 50px;
height: 50px;
position: relative;
margin-right: 15px;
margin-bottom: 15px;
}
.diy-goods .diy-component-edit .goods-add .el-button {
width: 100%;
height: 100%;
border-radius: 0;
padding: 0;
}
.diy-goods .diy-component-edit .goods-pic {
width: 100%;
height: 100%;
background-size: cover;
background-position: center;
}
.diy-goods .diy-component-edit .goods-delete {
position: absolute;
left: calc(100% - 10px);
top: -10px;
width: 20px;
height: 20px;
line-height: 20px;
padding: 0 0;
visibility: hidden;
z-index: 1;
}
.diy-goods .diy-component-edit .goods-item:hover .goods-delete {
visibility: visible;
}
.diy-goods .diy-component-edit .cat-item-options {
position: relative;
}
.diy-goods .diy-component-edit .cat-item-options .el-button {
height: 25px;
line-height: 25px;
width: 25px;
padding: 0;
text-align: center;
border: none;
border-radius: 0;
position: absolute;
margin-left: 0;
top: -16px;
right: -40px;
}
/*-----------------预览部分--------------*/
.diy-goods .diy-component-preview .cat-list {}
.diy-goods .diy-component-preview .cat-list-top {}
.diy-goods .diy-component-preview .cat-list-left {
width: 160px;
}
.diy-goods .diy-component-preview .cat-item {
height: 104px;
padding: 0 10px;
text-align: center;
max-width: 100%;
white-space: nowrap;
}
.diy-goods .diy-component-preview .cat-list-left .cat-name {
overflow: hidden;
text-overflow: ellipsis;
}
.diy-goods .diy-component-preview .cat-item.active {
color: #ff4544;
}
.diy-goods .diy-component-preview .cat-list-top .cat-item {
margin: 0 20px;
}
.diy-goods .diy-component-preview .cat-list-top {
overflow-x: auto;
}
.diy-goods .diy-component-preview .cat-list-top.cat-style-1 .cat-item {
border-bottom: 4px solid transparent;
}
.diy-goods .diy-component-preview .cat-list-top.cat-style-2 .cat-name {
background: #ff4544;
color: #fff;
border-radius: 100px;
padding: 0 18px;
}
.diy-goods .diy-component-preview .cat-list-top .cat-item.active {
border-bottom-color: #ff4544;
}
.diy-goods .diy-component-preview .cat-list-left .cat-item {
border-left: 2px solid transparent;
}
.diy-goods .diy-component-preview .cat-list-left .cat-item.active {
border-left-color: #ff4544;
}
.diy-goods .diy-component-preview .goods-list {
padding: 11px;
}
.diy-goods .diy-component-preview .goods-item {
padding: 11px;
}
.diy-goods .diy-component-preview .goods-pic {
background-size: cover;
background-position: center;
width: 99.8%;
height: 700px;
background-color: #f6f6f6;
background-repeat: no-repeat;
position: relative;
border-radius: 10px 10px 0 0;
}
.diy-goods .diy-component-preview .goods-pic-3-2 {
height: 471px;
}
.diy-goods .diy-component-preview .goods-name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 10px;
}
.diy-goods .diy-component-preview .goods-name-static {
height: 94px;
}
.diy-goods .diy-component-preview .goods-name-staticList {
white-space: normal !important;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
min-height: 76px;
}
.diy-goods .diy-component-preview .goods-name-StaticName {
margin-top: 40px;
height: 32px;
}
.diy-goods .diy-component-preview .goods-price {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: #ff4544;
line-height: 48px;
}
.diy-goods .diy-component-preview .goods-list-style--1 .goods-item,
.diy-goods .diy-component-preview .goods-list-style-1 .goods-item,
.diy-goods .diy-component-preview .goods-list-style-4 .goods-item {
width: 100%;
}
.diy-goods .diy-component-preview .goods-list-style-2 .goods-item {
width: 50%;
}
.diy-goods .diy-component-preview .goods-list-style-3 .goods-item {
width: 33.333333%;
}
.diy-goods .diy-component-preview .goods-list-style-0 .goods-item {
width: 249px;
}
.diy-goods .diy-component-preview .goods-list-style--1 .goods-pic {
width: 200px;
height: 200px;
border-radius: 10px 0 0 10px;
}
.diy-goods .diy-component-preview .goods-list-style-4 .goods-pic {
width: 250px;
height: 170px;
border-radius: 10px;
}
.diy-goods .diy-component-preview .goods-list-style-2 .goods-pic {
height: 342px;
border-radius: 10px 10px 0 0;
}
.diy-goods .diy-component-preview .goods-list-style-0 .goods-pic,
.diy-goods .diy-component-preview .goods-list-style-3 .goods-pic {
height: 200px;
border-radius: 10px 10px 0 0;
}
.diy-goods .diy-component-preview .goods-pic-fill-0 {
background-size: contain;
}
.diy-goods .diy-component-preview .buy-btn {
border-color: #ff4544;
color: #ff4544;
padding: 0 20px;
height: 48px;
line-height: 50px;
font-size: 24px;
}
.diy-goods .diy-component-preview .buy-btn.el-button--primary {
background-color: #ff4544;
color: #fff;
}
.diy-goods .diy-component-preview .goods-tag {
position: absolute;
top: 0;
left: 0;
width: 64px;
height: 64px;
z-index: 1;
background-size: 100% 100%;
background-position: center;
background-repeat: no-repeat;
}
.diy-goods hr {
border: none;
height: 1px;
background-color: #e2e2e2;
}
.diy-goods .diy-component-preview .goods-item .buy-btn.is-round {
border-radius: 24px;
}
.diy-goods .goods-item.goods-cat-list {
border-top: 1px solid #e2e2e2;
}
.diy-goods .goods-item.goods-cat-list:first-of-type {
border-top: 0;
}
.diy-goods .cat-list {
max-height: 500px;
overflow: auto;
}
.Goodspic-box {
width: 70px;
height: 70px;
border: 1px solid #ccc;
cursor: pointer;
background-color: #fff;
background-size: contain;
background-position: center;
background-repeat: no-repeat;
position: relative;
}
.Goodspic-box i {
font-size: 22px;
color: #909399;
}
.Goodspic-box .size-tip {
line-height: 1.35;
text-align: center;
position: absolute;
bottom: 0;
left: 0;
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 12px;
color: #fff;
background: rgba(0, 0, 0, 0.2);
letter-spacing: -1px;
}
.goodsDialog .el-dialog__body {
padding: 10px 20px;
}
.goods-priceScore {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: 48px;
}
.goods-price .el-rate__icon {
font-size: 30px;
}
.diy-goods .gd_Price {
font-size: 12px !important;
}
</style>
<template>
<div :class="{'active':pData.isCked}">
<div class="diy-component-options" v-if="pData.isCked">
<el-button type="primary" icon="el-icon-delete" style="left: -25px; top: 0px;" @click="delPlugin()"></el-button>
<el-button type="primary" icon="el-icon-document-copy" style="left: -25px; top: 30px;"></el-button>
<el-button type="primary" icon="el-icon-arrow-up" v-if="index>0" @click="resetSord(0)"
style="right: -25px; top: 0;"></el-button>
<el-button type="primary" icon="el-icon-arrow-down" v-if="index!=dataLeng-1" @click="resetSord(1)"
style="right: -25px; top: 30px;"></el-button>
</div>
<div class="diy-goods">
<div class="diy-component-preview" :style="cListStyle">
<div :flex="cMainFlex">
<div :flex="cCatFlex" class="cat-list"
v-if="data.showCat && (data.catPosition=='left'||(data.catPosition=='top'&&cCatList.length>1))"
:class="'cat-list-'+data.catPosition+' cat-style-'+data.catStyle">
<div class="cat-item" v-for="(item,index) in cCatList" :class="index===0?'active':''" :key="index"
flex="main:center cross:center">
<div class="cat-name">{{item.menuName}}</div>
</div>
</div>
<div class="goods-list" :class="'goods-list-style-'+data.listStyle">
<div v-for="(cat,catIndex) in cCatList" :key="catIndex">
<div v-if="data.catPosition==='left'" style="color: #666666;margin: 24px 11px;font-size: 24px">
{{cat.menuName}}
</div>
<div :style="cGoodsListStyle" flex>
<div v-for="(goods,goodsIndex) in cCatGoodsList(cat, catIndex)" class="goods-item" :key="goodsIndex"
:class="data.catPosition==='left'?'goods-cat-list':''">
<div style="display: inline-block;" :style="cGoodsItemWidth">
<div :style="cGoodsItemStyle" :flex="cGoodsItemFlex" style="position: relative;">
<div class="goods-pic"
:class="'goods-pic-'+data.goodsCoverProportion+' goods-pic-fill-'+data.fill"
:style="'background-image: url('+getIconLink(goods.picUrl)+')'">
<div v-if="data.showGoodsTag" class="goods-tag"
:style="'background-image: url('+ getIconLink(data.goodsTagPicUrl)+')'"></div>
</div>
<div :style="cGoodsItemInfoStyle">
<div class="goods-name"
:class="{'goods-name-static':data.listStyle===-1,'goods-name-staticList':data.listStyle===4}">
<template v-if="data.showGoodsName">{{goods.name}}</template>
</div>
<div flex="box:last" :class="{'goods-name-StaticName':data.listStyle===4}">
<div class="goods-price">
<template v-if="data.showGoodsPrice&&data.listStyle!=4">{{goods.price}}</template>
<template v-if="data.showScore&&data.listStyle==4">
<el-rate v-model="ScoreStar" disabled show-score :colors="ScoreArr"
:text-color="ScoreArr[0]" score-template="{value}分">
</el-rate>
</template>
</div>
<div>
<div v-if="data.showGoodsPrice&&data.listStyle==4" style="color:#FF003F;">
<span class="gd_Price"></span>{{goods.price}}
</div>
<template v-if="cShowBuyBtn">
<template v-if="data.buyBtn==='cart'">
<i style="font-size: 48px;color: #ff4544;" class="el-icon-shopping-cart-1"></i>
</template>
<template v-if="data.buyBtn==='add'">
<i style="font-size: 48px;color: #ff4544;" class="el-icon-circle-plus-outline"></i>
</template>
<template v-if="data.buyBtn==='text'">
<div :style="cButtonStyle" style="font-size: 24px;border: 1px solid;color: #ffffff;">
{{data.buyBtnText}}</div>
</template>
</template>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="diy-component-edit" v-if="pData.isCked">
<el-form label-width='150px' @submit.native.prevent>
<el-form-item label="人数数量">
<el-input v-model.number="data.goodsLength" type="number" min="1" max="30" size="small"></el-input>
</el-form-item>
<el-form-item label="商品添加">
<el-radio v-model="data.addUserType" :label="0">自定义</el-radio>
<el-radio v-model="data.addUserType" :label="1">按照匹配度</el-radio>
<el-radio v-model="data.addUserType" :label="2">按照热度</el-radio>
<el-radio v-model="data.addUserType" :label="3">按照最新</el-radio>
</el-form-item>
<el-form-item v-show="data.addUserType == 0" label="人物列表">
<draggable v-model="data.list" class="goods-list" style="display:flex;">
<div class="goods-item" v-for="(goods,goodsIndex) in data.list" :key="goodsIndex">
<el-tooltip effect="dark" content="移除人物" placement="top">
<el-button @click="deleteGoods(goodsIndex,null)" circle class="goods-delete" type="danger"
icon="el-icon-close"></el-button>
</el-tooltip>
<div class="goods-pic" :style="'background-image:url('+getIconLink(goods.picUrl)+')'"></div>
</div>
</draggable>
<div class="goods-add">
<el-button size="small" @click="showGoodsDialog(null)" icon="el-icon-plus"></el-button>
</div>
</el-form-item>
<template v-if="data.addUserType==2">
<el-form-item label="浏览权重">
<el-input v-model.number="data.BrowseRate" type="number" min="1" max="30" size="small"></el-input>
</el-form-item>
<el-form-item label="关注权重">
<el-input v-model.number="data.FollowRate" type="number" min="1" max="30" size="small"></el-input>
</el-form-item>
</template>
<hr>
<el-form-item label="列表样式">
<el-radio v-model="data.listStyle" :label="-1">列表模式</el-radio>
<el-radio v-model="data.listStyle" :label="0">左右滑动</el-radio>
<el-radio v-model="data.listStyle" :label="1">一行一个</el-radio>
<el-radio v-model="data.listStyle" :label="2">一行两个</el-radio>
<el-radio v-model="data.listStyle" :label="3">一行三个</el-radio>
</el-form-item>
<el-form-item label="背景颜色">
<el-color-picker v-model="data.backgroundColor"></el-color-picker>
</el-form-item>
<el-form-item label="上边距">
<el-input type="number" size="small" :min="0" v-model="data.PaddingTop">
<template slot="append">px</template>
</el-input>
</el-form-item>
<el-form-item label="下边距">
<el-input type="number" size="small" :min="0" v-model="data.PaddingBottom">
<template slot="append">px</template>
</el-input>
</el-form-item>
<el-form-item label="左边距">
<el-input type="number" size="small" :min="0" v-model="data.PaddingLeft">
<template slot="append">px</template>
</el-input>
</el-form-item>
<el-form-item label="右边距">
<el-input type="number" size="small" :min="0" v-model="data.PaddingRight">
<template slot="append">px</template>
</el-input>
</el-form-item>
<el-form-item label="搜索圆角" size="small">
<el-input type="number" v-model="data.SearchFilletPX"></el-input>
</el-form-item>
</el-form>
</div>
</div>
<!-- 选择图片文件 -->
<el-dialog title="选择文件" :visible.sync="choicImg" width="1240px">
<ChooseImg @SelectId="SelectId"></ChooseImg>
</el-dialog>
<!-- 选择分类 -->
<el-dialog title="选择分类" :visible.sync="isFenlei" width="800px">
<ChooseFenlei ref="ChooseFenlei"></ChooseFenlei>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="quxiaoFenlei()">取 消</el-button>
<el-button size="small" type="danger" @click="getChoiceFenlei()">确 定</el-button>
</span>
</el-dialog>
<!-- 选择商品 -->
<el-dialog title="选择商品" :visible.sync="isShowGoods" custom-class="goodsDialog">
<choicePeople ref="choicePeople"></choicePeople>
<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>
</template>
<script>
import draggable from "vuedraggable"
import ChooseImg from "@/components/global/ChooseImg.vue";
import ChooseFenlei from "../../common/choiceFenlei.vue";
import choicePeople from "../../common/choicePeople.vue";
export default {
props: ["pData", "index", "dataLeng"],
components: {
draggable,
ChooseImg,
ChooseFenlei,
choicePeople
},
data() {
return {
//可以选择的商品数
ckGoods: 0,
data: this.pData.data,
position: 'center center',
repeat: 'no-repeat',
choicImg: false,
isFenlei: false,
isShowGoods: false,
ScoreStar: 5, //分数
ScoreArr: [], //颜色数组
//添加的下标
comIndex: -1,
};
},
created() {
},
methods: {
//向父组件传值 并调用排序
resetSord(IsUp) {
this.$emit('getSord', this.index, IsUp);
},
//点击触发父组件删除
delPlugin() {
this.$emit('comDelPlugin', this.index);
},
cCatGoodsList(cat, catIndex) {
const goodsList = cat.goodsList;
let newList = [];
if (this.data.catPosition == 'top' && catIndex > 0) {
newList = [];
} else {
if (goodsList && goodsList.length) {
newList = goodsList;
} else {
const defaultGoodsItem = {
id: 0,
name: '商品名称',
picUrl: '',
price: '100.00',
};
newList = new Array(cat.goodsNum).fill(defaultGoodsItem);
}
}
return newList;
},
goodsTagChange(e) {
this.data.goodsTagPicUrl = e;
this.data.customizeGoodsTag = false;
},
catPositionChange(e) {
if (e === 'left') {
this.data.listStyle = -1;
}
},
customizeGoodsTagChange(e) {
this.data.goodsTagPicUrl = '';
this.data.customizeGoodsTag = true;
},
deleteCat(index) {
this.data.catList.splice(index, 1);
},
showGoodsDialog(catIndex) {
if (catIndex !== null) {
this.comIndex = catIndex
} else {
this.comIndex = null;
}
this.isShowGoods = true;
},
deleteGoods(goodsIndex, catIndex) {
if (catIndex !== null) {
this.data.catList[catIndex].goodsList.splice(goodsIndex, 1);
} else {
this.data.list.splice(goodsIndex, 1);
}
},
listStyleChange(listStyle) {
if (listStyle === -1 && this.data.textStyle === 2) {
this.data.textStyle = 1;
}
if (this.data.textStyle === 2 && this.data.buyBtn === 'text') {
this.data.buyBtn = 'cart';
}
},
catGoodsNumChange(catIndex) {
// if (this.data.catList[catIndex].goodsNum > 3) {
// this.data.catList[catIndex].goodsNum = 3;
// }
// if (this.data.catList[catIndex].goodsNum < 1) {
// this.data.catList[catIndex].goodsNum = 1;
// }
},
showCatChange(value) {
if (!value) {
this.data.catPosition = 'top';
}
},
//选择图片
SelectId(msg) {
this.data.goodsTagPicUrl = msg.url;
this.choicImg = false;
},
//选择商品分类
getChoiceFenlei() {
var ckedArr = this.$refs.ChooseFenlei.getChoicedFenlei();
var myCatArray = [];
if (ckedArr && ckedArr.length > 0) {
ckedArr.forEach(item => {
myCatArray.push({
goodsList: [],
goodsNum: 3,
id: item.id,
menuName: item.menuName,
name: item.name,
staticGoods: false
});
});
}
this.data.catList = this.data.catList.concat(myCatArray);
this.isFenlei = false;
this.$refs.ChooseFenlei.toggleSelection();
},
//取消商品分类选择
quxiaoFenlei() {
this.isFenlei = false;
this.$refs.ChooseFenlei.toggleSelection();
},
//选择商品
getGoodsChoice() {
var ckedArr = this.$refs.choiceGood.getChoicedGoods();
var myArray = [];
if (ckedArr && ckedArr.length > 0) {
ckedArr.forEach(element => {
myArray.push({
id: element.Id,
name: element.Name,
picUrl: element.CoverImage,
price: element.SellingPrice
});
});
}
if (this.comIndex !== null) {
this.data.catList[this.comIndex].goodsList = this.data.catList[this.comIndex].goodsList.concat(myArray);
} else {
this.data.list = this.data.list.concat(myArray);
}
this.isShowGoods = false;
this.$refs.choiceGood.toggleSelection();
},
//取消选择商品
quxiaoGoods() {
this.isShowGoods = false;
this.$refs.choiceGood.toggleSelection();
}
},
computed: {
cListStyle() {
if (this.data.backgroundColor) {
return `background-color:${this.data.backgroundColor};background-image:url(${this.data.backgroundPicUrl});background-size:${this.data.backgroundWidth}% ${this.data.backgroundHeight}%;background-repeat:${this.repeat};background-position:${this.position}`
} else {
return `background-image:url(${this.data.backgroundPicUrl});background-size:${this.data.backgroundWidth}% ${this.data.backgroundHeight}%;background-repeat:${this.repeat};background-position:${this.position}`
}
},
cMainFlex() {
if (this.data.catPosition === 'left') {
return 'dir:left box:first';
}
if (this.data.catPosition === 'top') {
return 'dir:top';
}
},
cCatFlex() {
if (this.data.catPosition === 'left') {
return 'dir:top';
}
if (this.data.catPosition === 'top') {
return 'dir:left';
}
},
cCatList() {
if (this.data.showCat) {
if (this.data.catList && this.data.catList.length) {
return this.data.catList;
} else {
const defaultCatItem = {
id: 0,
name: '分类名称',
menuName: '分类名称',
goodsList: [],
goodsNum: 3,
};
return [defaultCatItem, defaultCatItem];
}
} else {
return [{
id: null,
name: null,
menuName: null,
goodsList: this.data.list,
}];
}
},
cCatStyle() {},
cGoodsListStyle() {
if (this.data.listStyle === 0) {
return 'flex-wrap: nowrap;overflow-x:auto;';
} else {
return 'flex-wrap: wrap;';
}
},
cGoodsItemFlex() {
if (this.data.listStyle === -1 || this.data.listStyle === 4) {
return 'dir:left box:first cross:center';
}
return 'dir:top';
},
cGoodsItemStyle() {
let style;
if (this.data.goodsStyle != 3) {
if (this.data.listStyle === -1) {
style = 'border: 1px solid #e2e2e2;border-radius:10px;background:#fff;'
} else {
style = 'border: 1px solid #e2e2e2;border-radius:10px;background:#fff;'
}
} else {
return style
}
if (this.data.goodsStyle === 2) {
return style
} else if (this.data.goodsStyle === 1) {
if (this.data.listStyle === -1) {
return 'border-radius:10px;background:#fff;'
} else {
return 'border-radius:10px;background:#fff;'
}
} else {
return 'background:#fff;';
}
},
cShowBuyBtn() {
if (!this.data.showBuyBtn) {
return false;
}
if (this.data.textStyle === 2 || this.data.listStyle === 0) {
return false;
}
if (this.data.listStyle == 4) {
return false;
}
return true;
},
cGoodsItemInfoStyle() {
let style = '';
if (this.data.textStyle === 2) {
style += `text-align: center;`;
}
if (this.data.listStyle === -1 || this.data.listStyle === 4) {
style += `height: 200px;padding: 20px 24px 20px 32px;`;
} else {
style += `padding:24px 24px;`;
}
return style;
},
cGoodsItemWidth() {
if (this.data.listStyle === 0) {
return 'width: 200px;';
}
return 'width: 100%;';
},
cButtonStyle() {
let style =
`background: ${this.data.buttonColor};border-color: ${this.data.buttonColor};height:48px;line-height:46px;padding:0 20px;`;
if (this.data.buyBtnStyle === 3 || this.data.buyBtnStyle === 4) {
style += `border-radius:999px;`;
}
if (this.data.buyBtnStyle === 2 || this.data.buyBtnStyle === 4) {
style += `background:#fff;color:${this.data.buttonColor}`;
}
return style;
},
},
mounted() {
if (this.data.scoreColor) {
this.ScoreArr.push(this.data.scoreColor);
this.ScoreArr.push(this.data.scoreColor);
this.ScoreArr.push(this.data.scoreColor);
}
},
watch: {
"data.scoreColor"(val) {
this.ScoreArr = [];
this.ScoreArr.push(val);
this.ScoreArr.push(val);
this.ScoreArr.push(val);
this.$forceUpdate();
},
"data.listStyle"(val) {
if (val == 4) {
this.data.showBuyBtn = false;
} else {
this.data.showBuyBtn = true;
}
}
},
};
</script>
......@@ -279,6 +279,18 @@ export default new Router({
name: 'plateList',
component: resolve => require(['@/components/blindDate/plateList'], resolve),
}, {
path: '/recruitStick',
name: 'recruitStick',
component: resolve => require(['@/components/blindDate/recruitStick'], resolve),
}, {
path: '/registrationList',
name: 'registrationList',
component: resolve => require(['@/components/blindDate/registrationList'], resolve),
}, {
path: '/activityInfo',
name: 'activityInfo',
component: resolve => require(['@/components/blindDate/activityInfo'], resolve),
},{
path: '/addplate',
name: 'addplate',
component: resolve => require(['@/components/blindDate/addplate'], resolve),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment