Commit b4c08a31 authored by 罗超's avatar 罗超

1

parent 499b22f7
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<q-icon name="event" class="cursor-pointer"> <q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy" transition-show="scale" transition-hide="scale"> <q-popup-proxy ref="qDateProxy" transition-show="scale" transition-hide="scale">
<div class="q-gutter-md row items-start"> <div class="q-gutter-md row items-start">
<q-date v-model="addMsg.StartTime" mask="YYYY-MM-DD HH:mm:ss"></q-date> <q-date v-model="addMsg.StartTime" :options="StartTimeOptions" mask="YYYY-MM-DD HH:mm:ss"></q-date>
<q-time v-model="addMsg.StartTime" format24h mask="YYYY-MM-DD HH:mm:ss" /> <q-time v-model="addMsg.StartTime" format24h mask="YYYY-MM-DD HH:mm:ss" />
</div> </div>
<q-btn v-close-popup label="关闭" color="primary" flat style="float:right" /> <q-btn v-close-popup label="关闭" color="primary" flat style="float:right" />
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<q-icon name="event" class="cursor-pointer"> <q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy" transition-show="scale" transition-hide="scale"> <q-popup-proxy ref="qDateProxy" transition-show="scale" transition-hide="scale">
<div class="q-gutter-md row items-start"> <div class="q-gutter-md row items-start">
<q-date v-model="addMsg.EndTimeStr" mask="YYYY-MM-DD HH:mm:ss" @input="edate"></q-date> <q-date v-model="addMsg.EndTimeStr" :options="EndTimeOptions" mask="YYYY-MM-DD HH:mm:ss" @input="edate"></q-date>
<q-time v-model="addMsg.EndTimeStr" format24h mask="YYYY-MM-DD HH:mm:ss" @input="etime" /> <q-time v-model="addMsg.EndTimeStr" format24h mask="YYYY-MM-DD HH:mm:ss" @input="etime" />
</div> </div>
<q-btn v-close-popup label="关闭" color="primary" flat style="float:right" /> <q-btn v-close-popup label="关闭" color="primary" flat style="float:right" />
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<q-icon name="event" class="cursor-pointer"> <q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy" transition-show="scale" transition-hide="scale"> <q-popup-proxy ref="qDateProxy" transition-show="scale" transition-hide="scale">
<div class="q-gutter-md row items-start"> <div class="q-gutter-md row items-start">
<q-date v-model="addMsg.SignStartTimeStr" mask="YYYY-MM-DD HH:mm:ss" @input="date" /> <q-date v-model="addMsg.SignStartTimeStr" :options="SignStartTimeOptions" mask="YYYY-MM-DD HH:mm:ss" @input="date" />
<q-time v-model="addMsg.SignStartTimeStr" format24h mask="YYYY-MM-DD HH:mm:ss" @input="time" /> <q-time v-model="addMsg.SignStartTimeStr" format24h mask="YYYY-MM-DD HH:mm:ss" @input="time" />
</div> </div>
<q-btn v-close-popup label="关闭" color="primary" flat style="float:right" /> <q-btn v-close-popup label="关闭" color="primary" flat style="float:right" />
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<q-icon name="event" class="cursor-pointer"> <q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy" transition-show="scale" transition-hide="scale"> <q-popup-proxy ref="qDateProxy" transition-show="scale" transition-hide="scale">
<div class="q-gutter-md row items-start"> <div class="q-gutter-md row items-start">
<q-date v-model="addMsg.SignEndTimeStr" mask="YYYY-MM-DD HH:mm:ss" @input="endDate" /> <q-date v-model="addMsg.SignEndTimeStr" :options="SignEndTimeOptions" mask="YYYY-MM-DD HH:mm:ss" @input="endDate" />
<q-time v-model="addMsg.SignEndTimeStr" format24h mask="YYYY-MM-DD HH:mm:ss" @input="endTime" /> <q-time v-model="addMsg.SignEndTimeStr" format24h mask="YYYY-MM-DD HH:mm:ss" @input="endTime" />
</div> </div>
<q-btn v-close-popup label="关闭" color="primary" flat style="float:right" /> <q-btn v-close-popup label="关闭" color="primary" flat style="float:right" />
...@@ -395,6 +395,22 @@ ...@@ -395,6 +395,22 @@
this.addMsg.StartAge = val.min this.addMsg.StartAge = val.min
this.addMsg.EndAge = val.max this.addMsg.EndAge = val.max
}, },
//限制活动开始时间小于结束时间
StartTimeOptions(date){
return Date.parse(date) <= Date.parse(this.addMsg.EndTime)
},
//限制活动结束时间大于开始时间
EndTimeOptions(date){
return Date.parse(date) >= Date.parse(this.addMsg.StartTime)
},
//限制活动报名开始时间小于报名结束时间
SignStartTimeOptions(date){
return Date.parse(date) <= Date.parse(this.addMsg.SignEndTime)
},
//限制活动报名结束时间大于报名开始时间
SignEndTimeOptions(date){
return Date.parse(date) >= Date.parse(this.addMsg.SignStartTime)
},
uploadFile(files) { uploadFile(files) {
UploadSelfFile("course", files[0], res => { UploadSelfFile("course", files[0], res => {
if (res.Code == 1) { if (res.Code == 1) {
...@@ -402,7 +418,7 @@ ...@@ -402,7 +418,7 @@
} }
}); });
}, },
//保存信息 //表单验证
saveRule() { saveRule() {
this.$refs.Name.validate(); this.$refs.Name.validate();
this.$refs.StartTime.validate(); this.$refs.StartTime.validate();
...@@ -415,15 +431,6 @@ ...@@ -415,15 +431,6 @@
!this.$refs.SignStartTime.hasError && !this.$refs.SignStartTime.hasError &&
!this.$refs.SignEndTime.hasError) { !this.$refs.SignEndTime.hasError) {
return true return true
// this.apipostDS("/api/Education/SetActivity", this.addMsg, (res) => {
// if (res.data.resultCode === 1) {
// this.Success(res.data.message);
// this.closeRuleForm();
// this.$emit('success');
// } else {
// this.Error(res.data.message);
// }
// })
} else } else
return false return false
}, },
......
...@@ -109,6 +109,7 @@ ...@@ -109,6 +109,7 @@
line-height: 25px; line-height: 25px;
background-color: #004d40; background-color: #004d40;
} }
.activeType .app-image { .activeType .app-image {
background-position: center center; background-position: center center;
width: 50px; width: 50px;
...@@ -117,7 +118,8 @@ ...@@ -117,7 +118,8 @@
float: left; float: left;
margin-right: 8px; margin-right: 8px;
} }
.Sysuser_Date .el-input {
.Sysuser_Date .el-input {
width: 100%; width: 100%;
border: none; border: none;
background-color: transparent; background-color: transparent;
...@@ -133,25 +135,22 @@ ...@@ -133,25 +135,22 @@
padding: 0 3px; padding: 0 3px;
min-height: 0 !important; min-height: 0 !important;
} }
</style> </style>
<template> <template>
<div class="page-body activeType"> <div class="page-body activeType">
<div class="page-search row items-center flex"> <div class="page-search row items-center flex">
<div class="col row wrap q-mr-lg q-col-gutter-md"> <div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3"> <div class="col-3">
<q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.ActivityName" label="活动名称" <q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.ActivityName"
@clear="resetSearch" maxlength="20" /> label="活动名称" @clear="resetSearch" maxlength="20" />
</div> </div>
<div class="col-3 Sysuser_Date"> <div class="col-3 Sysuser_Date">
<q-field filled> <q-field filled>
 <template v-slot:control>  <template v-slot:control>
<el-date-picker <el-date-picker v-model="msg.SelectStartTimeStr" type="date" placeholder="选择开始日期"
v-model="msg.SelectStartTimeStr" value-format="yyyy-MM-dd" @change="resetSearch">
type="date"
placeholder="选择开始日期"
value-format="yyyy-MM-dd"
@change="resetSearch">
</el-date-picker>     </el-date-picker>    
</template> </template>
</q-field> </q-field>
...@@ -159,26 +158,23 @@ ...@@ -159,26 +158,23 @@
<div class="col-3 Sysuser_Date"> <div class="col-3 Sysuser_Date">
<q-field filled> <q-field filled>
 <template v-slot:control>  <template v-slot:control>
<el-date-picker <el-date-picker v-model="msg.SelectEndTimeStr" type="date" placeholder="选择结束日期" value-format="yyyy-MM-dd"
v-model="msg.SelectEndTimeStr" @change="resetSearch">
type="date"
placeholder="选择结束日期"
value-format="yyyy-MM-dd"
@change="resetSearch"
>
</el-date-picker>     </el-date-picker>    
</template> </template>
</q-field> </q-field>
</div> </div>
<div class="col-3 "> <div class="col-3 ">
<q-select @input="resetSearch" standout="bg-primary text-white" v-model="msg.SelectIsEnd" class="col-6 q-pr-lg q-pr-lg" :options="statusOpts" <q-select @input="resetSearch" standout="bg-primary text-white" v-model="msg.SelectIsEnd"
emit-value map-options label="状态" @change="resetSearch"/> class="col-6 q-pr-lg q-pr-lg" :options="statusOpts" emit-value map-options label="状态"
@change="resetSearch" />
</div> </div>
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-tow-column-table sticky-right-column-table" <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
separator="none" :data="data" :columns="columns" row-key="name"> class="sticky-tow-column-table sticky-right-column-table" separator="none" :data="data" :columns="columns"
row-key="name">
<template v-slot:top="props"> <template v-slot:top="props">
<div class="col-2 q-table__title">活动列表</div> <div class="col-2 q-table__title">活动列表</div>
<q-space /> <q-space />
...@@ -215,7 +211,8 @@ ...@@ -215,7 +211,8 @@
<div v-if="props.row.AgeLimit==0">范围:{{props.row.StartAge}}岁~{{props.row.EndAge}}</div> <div v-if="props.row.AgeLimit==0">范围:{{props.row.StartAge}}岁~{{props.row.EndAge}}</div>
<div>报名人数</div> <div>报名人数</div>
<div v-if="props.row.Distinguish ==1">总人数:{{props.row.ManNum}}</div> <div v-if="props.row.Distinguish ==1">总人数:{{props.row.ManNum}}</div>
<div v-if="props.row.Distinguish ==0">男性:{{props.row.ManNum}}<span style="margin-left:10px">女性:{{props.row.WoManNum}}</span> </div> <div v-if="props.row.Distinguish ==0">男性:{{props.row.ManNum}}<span
style="margin-left:10px">女性:{{props.row.WoManNum}}</span> </div>
</div> </div>
</q-td> </q-td>
</template> </template>
...@@ -247,8 +244,8 @@ ...@@ -247,8 +244,8 @@
<template v-slot:body-cell-optioned="props"> <template v-slot:body-cell-optioned="props">
<q-td :props="props"> <q-td :props="props">
<div> <div>
<!-- <q-btn flat size="xs" icon="edit" <q-btn flat size="xs" color="accent" style="font-weight:400" label="复制"
color="accent" style="font-weight:400" label="编辑" @click="editQuotation(props.row)" /> --> @click="goUrl('/activity/copyActive',props.row)" />
<!-- <q-btn flat size="xs" icon="edit" <!-- <q-btn flat size="xs" icon="edit"
color="accent" style="font-weight:400" label="删除" @click="delActive(props.row)" /> --> color="accent" style="font-weight:400" label="删除" @click="delActive(props.row)" /> -->
<q-btn-dropdown flat size="xs" color="dark" label="更多" style="margin-left:10px;"> <q-btn-dropdown flat size="xs" color="dark" label="更多" style="margin-left:10px;">
...@@ -273,12 +270,14 @@ ...@@ -273,12 +270,14 @@
<q-item-label>活动详情</q-item-label> <q-item-label>活动详情</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item clickable v-close-popup @click="goUrl('/activity/activeSummary',props.row)" v-if="props.row.ActivityStatus==2"> <q-item clickable v-close-popup @click="goUrl('/activity/activeSummary',props.row)"
v-if="props.row.ActivityStatus==2">
<q-item-section> <q-item-section>
<q-item-label>活动总结</q-item-label> <q-item-label>活动总结</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item clickable v-close-popup @click="goUrl('/activity/materialMan',props.row)" v-if="props.row.ActivityStatus==2"> <q-item clickable v-close-popup @click="goUrl('/activity/materialMan',props.row)"
v-if="props.row.ActivityStatus==2">
<q-item-section> <q-item-section>
<q-item-label>活动图片与视频</q-item-label> <q-item-label>活动图片与视频</q-item-label>
</q-item-section> </q-item-section>
...@@ -302,7 +301,7 @@ ...@@ -302,7 +301,7 @@
</div> </div>
</template> </template>
<script> <script>
import ActiveForm from '../../components/activity/active-from' import ActiveForm from '../../components/activity/active-from'
export default { export default {
meta: { meta: {
title: "活动列表" title: "活动列表"
...@@ -318,14 +317,13 @@ import ActiveForm from '../../components/activity/active-from' ...@@ -318,14 +317,13 @@ import ActiveForm from '../../components/activity/active-from'
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
ActivityName: '', ActivityName: '',
SelectStartTimeStr:"", SelectStartTimeStr: "",
SelectEndTimeStr:"", SelectEndTimeStr: "",
SelectIsEnd:-1, SelectIsEnd: -1,
rowsPerPage:10 rowsPerPage: 10
}, },
pageCount: 0, pageCount: 0,
statusOpts:[ statusOpts: [{
{
label: "全部", label: "全部",
value: -1 value: -1
}, },
...@@ -348,19 +346,19 @@ import ActiveForm from '../../components/activity/active-from' ...@@ -348,19 +346,19 @@ import ActiveForm from '../../components/activity/active-from'
label: "编号", label: "编号",
field: "Id", field: "Id",
align: "left", align: "left",
required:true, required: true,
}, },
{ {
name: "activeName", name: "activeName",
label: "活动名称", label: "活动名称",
align: "left", align: "left",
required:true, required: true,
}, },
{ {
name: "ActivityTypeName", name: "ActivityTypeName",
label: "活动类型", label: "活动类型",
align: "left", align: "left",
field:"ActivityTypeName" field: "ActivityTypeName"
}, },
{ {
name: "ActivityTime", name: "ActivityTime",
...@@ -380,14 +378,14 @@ import ActiveForm from '../../components/activity/active-from' ...@@ -380,14 +378,14 @@ import ActiveForm from '../../components/activity/active-from'
{ {
name: "LocationName", name: "LocationName",
label: "位置", label: "位置",
field:"LocationName", field: "LocationName",
align: "left", align: "left",
style:"width:100px" style: "width:100px"
}, },
{ {
name: "activeStutes", name: "activeStutes",
label: "活动状态", label: "活动状态",
field:"ActivityStatusStr", field: "ActivityStatusStr",
align: "left" align: "left"
}, },
// { // {
...@@ -399,7 +397,7 @@ import ActiveForm from '../../components/activity/active-from' ...@@ -399,7 +397,7 @@ import ActiveForm from '../../components/activity/active-from'
{ {
name: 'optioned', name: 'optioned',
label: '操作', label: '操作',
required:true, required: true,
align: "left" align: "left"
} }
], ],
...@@ -412,8 +410,8 @@ import ActiveForm from '../../components/activity/active-from' ...@@ -412,8 +410,8 @@ import ActiveForm from '../../components/activity/active-from'
// ActivityId: 0 // ActivityId: 0
// }, // },
showForm:false, showForm: false,
typeObj:{} typeObj: {}
} }
}, },
...@@ -428,17 +426,17 @@ import ActiveForm from '../../components/activity/active-from' ...@@ -428,17 +426,17 @@ import ActiveForm from '../../components/activity/active-from'
getList(){ getList() {
this.loading = true; this.loading = true;
this.apipostDS("/api/Education/GetActivityPage",this.msg,(res)=>{ this.apipostDS("/api/Education/GetActivityPage", this.msg, (res) => {
this.loading = false this.loading = false
if(res.data.resultCode===1){ if (res.data.resultCode === 1) {
this.data = res.data.data.pageData; this.data = res.data.data.pageData;
this.pageCount = res.data.data.pageCount; this.pageCount = res.data.data.pageCount;
} }
}) })
}, },
delActive(item){ delActive(item) {
let that = this; let that = this;
that.Confirm("是否删除?", function () { that.Confirm("是否删除?", function () {
that.apipostDS( that.apipostDS(
...@@ -467,7 +465,7 @@ import ActiveForm from '../../components/activity/active-from' ...@@ -467,7 +465,7 @@ import ActiveForm from '../../components/activity/active-from'
this.showForm = true; this.showForm = true;
if (item) { if (item) {
this.typeObj = item; this.typeObj = item;
}else{ } else {
this.typeObj = {}; this.typeObj = {};
} }
}, },
...@@ -485,24 +483,14 @@ import ActiveForm from '../../components/activity/active-from' ...@@ -485,24 +483,14 @@ import ActiveForm from '../../components/activity/active-from'
closeruleset() { closeruleset() {
this.showForm = false; this.showForm = false;
}, },
goUrl(url,item,type=0){ goUrl(url, item) {
if(type===1){
this.$router.push({
path:url,
query:{
name:item.ActivityName
}
})
}else{
this.$router.push({ this.$router.push({
path:url, path: url,
query:{ query: {
Id:item.Id Id: item.Id
} }
}) })
} }
}
} }
} }
......
...@@ -190,7 +190,6 @@ ...@@ -190,7 +190,6 @@
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.ActivityTitle = res.data.data.ActivityTitleList this.ActivityTitle = res.data.data.ActivityTitleList
this.activedata = res.data.data this.activedata = res.data.data
console.log(192, this.activedata)
this.activedata.StartTime="" this.activedata.StartTime=""
this.activedata.StartTimeStr="" this.activedata.StartTimeStr=""
this.activedata.EndTime="" this.activedata.EndTime=""
......
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