Commit 83e6af93 authored by Mac's avatar Mac
parents 51c1bb03 34c75fbb
...@@ -92,7 +92,28 @@ ...@@ -92,7 +92,28 @@
ActivityTitle: [] ActivityTitle: []
}, },
activeBaseData: { activeBaseData: {
Id: 0, //活动编号(主键)
ActivityName: "", //活动名称
StartTime: "", //开始时间
EndTime: "", //结束时间
CoverImg: "", //封面图
ActivityType: 0, //活动类型
ActivityInfo: "", //活动详情
SignStartTime: "", //报名开始时间
SignEndTime: "", //报名截止时间
IsFree: 1, //是否免费 1是 2否
Price: 0, //价格
PointNum: 0, //点数
IsCancelConfirm: 1, //取消确定1是 2否
Distinguish: 1, //是否区别性别 0区分 1不区分
ManNum: 0, //男数量
WoManNum: 0, //女数量
AgeLimit: 1, //是否区别年龄 0区分 1不区分
StartAge: 0, //最小年龄
EndAge: 0, //最大年龄
LnsideLimit: 1, //内部限制0-否,1-是
LonLat: '', //经纬度(逗号分隔)
LocationName: '',
}, },
ActivityTitle: [{ ActivityTitle: [{
Title: "", //活动大标题 Title: "", //活动大标题
...@@ -121,7 +142,10 @@ ...@@ -121,7 +142,10 @@
this.getActiveTypeList(); this.getActiveTypeList();
if (this.$route.query.Id) { if (this.$route.query.Id) {
this.msg.Id = this.$route.query.Id this.msg.Id = this.$route.query.Id
this.getDetail() if(this.msg.Id>0){
this.getDetail()
}
} }
}, },
methods: { methods: {
...@@ -175,7 +199,8 @@ ...@@ -175,7 +199,8 @@
this.apipostDS("/api/Education/SetActivity", msg, (res) => { this.apipostDS("/api/Education/SetActivity", msg, (res) => {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.Success(res.data.message); this.Success(res.data.message);
this.getDetail() // this.getDetail()
this.$router.push("/activity/activityList")
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
......
...@@ -179,7 +179,8 @@ ...@@ -179,7 +179,8 @@
<div class="col-2 q-table__title">活动列表</div> <div class="col-2 q-table__title">活动列表</div>
<q-space /> <q-space />
<div class="page-option"> <div class="page-option">
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增" @click="editQuotation(null)" /> <q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增"
@click="goUrl('/activity/activeDetail',null)" />
</div> </div>
</template> </template>
<template v-slot:body-cell-activeName="props"> <template v-slot:body-cell-activeName="props">
...@@ -484,12 +485,22 @@ ...@@ -484,12 +485,22 @@
this.showForm = false; this.showForm = false;
}, },
goUrl(url, item) { goUrl(url, item) {
this.$router.push({ if (item) {
path: url, this.$router.push({
query: { path: url,
Id: item.Id query: {
} Id: item.Id
}) }
})
} else {
this.$router.push({
path: url,
query: {
Id: 0
}
})
}
} }
} }
} }
......
...@@ -62,13 +62,19 @@ ...@@ -62,13 +62,19 @@
<div class="q-mt-lg q-mb-lg listTitle"> <div class="q-mt-lg q-mb-lg listTitle">
活动列表 活动列表
</div> </div>
<div v-for="(item,index) in ActivityTitle" :key="item.id" class="flex "> <div v-if="ActivityTitle.length==0">
暂无活动安排
</div>
<div v-if="ActivityTitle.length>0">
<div v-for="(item,index) in ActivityTitle" :key="item.id" class="flex ">
<DetailItem :itemData="item" :index="index+1" @success="getItemData($event,index)" ref="child" /> <DetailItem :itemData="item" :index="index+1" @success="getItemData($event,index)" ref="child" />
<el-tooltip class="item" effect="dark" content="删除当前活动" placement="top" v-if="index>0"> <el-tooltip class="item" effect="dark" content="删除当前活动" placement="top" v-if="index>0">
<i class="iconfont icon-img_delete_small q-ml-sm" style="color: #2961FE" @click="delActiveList(index)"></i> <i class="iconfont icon-img_delete_small q-ml-sm" style="color: #2961FE" @click="delActiveList(index)"></i>
</el-tooltip> </el-tooltip>
</div> </div>
</div>
</div> </div>
</div> </div>
......
...@@ -64,6 +64,14 @@ ...@@ -64,6 +64,14 @@
.tbody::-webkit-scrollbar-thumb:hover{ .tbody::-webkit-scrollbar-thumb:hover{
background: #333; background: #333;
} }
.mainSummary th:first-child,
td:first-child {
position: sticky;
left: 0;
z-index: 1;
}
</style> </style>
<template> <template>
<div class="flexOne comSummary"> <div class="flexOne comSummary">
...@@ -81,7 +89,7 @@ ...@@ -81,7 +89,7 @@
<colgroup> <colgroup>
<col width='105px'/> <col width='105px'/>
<col width='10px'/> <col width='10px'/>
<col width='215px'/> <col width='215px'/>
<col width='215px'/> <col width='215px'/>
<col width='215px'/> <col width='215px'/>
<col width='215px'/> <col width='215px'/>
...@@ -129,7 +137,7 @@ ...@@ -129,7 +137,7 @@
</thead> </thead>
</table> </table>
<div class="tbody " style="width:1680px" > <div class="tbody" style="width:1680px" >
<colgroup> <colgroup>
<col width='140px'/> <col width='140px'/>
<col width='215px'/> <col width='215px'/>
...@@ -201,18 +209,9 @@ export default { ...@@ -201,18 +209,9 @@ export default {
handler(val){ handler(val){
val.forEach(e=>{ val.forEach(e=>{
e.InfoList.forEach(_e=>{ e.InfoList.forEach(_e=>{
if(_e){ _e.height=_e.IntervalNum*41+'px'
this.activities.forEach((x,i)=>{ let gap= this.getGap("09:30",_e.StartTime,15)
if(x.timestamp==_e.StartTime) { _e.offSetTop=gap*41
let top= this.getOffSet(i)
_e.offSetTop=top-190
}
// let res=this.timeDifference(_e.StartTime,_e.EndTime)
_e.height=_e.IntervalNum*41+'px'
})
}
}) })
}) })
}, },
...@@ -446,11 +445,20 @@ export default { ...@@ -446,11 +445,20 @@ export default {
getDayInfo(Y, M, D) { getDayInfo(Y, M, D) {
}, },
getOffSet(index){ /**
let el=document.getElementsByClassName('el-timeline-item')[index] * //计算间隔多少个分钟
let top=el.getBoundingClientRect().top * @param s 开始时间
return top * e 结束时间
}, * gap 间隔分钟
*/
getGap(s,e,gap){
let stimeArr=s.split(':')
let stime=parseInt(stimeArr[0])*60+parseInt(stimeArr[1])
let etimeArr=e.split(":")
let etime=parseInt(etimeArr[0])*60+parseInt(etimeArr[1])
let res=(etime-stime)/gap
return res
}
}, },
mounted() { mounted() {
......
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