Commit e1fa51d3 authored by 黄奎's avatar 黄奎

页面修改

parent 0846dd7b
...@@ -10,88 +10,58 @@ ...@@ -10,88 +10,58 @@
} }
</style> </style>
<template> <template>
<q-dialog <q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale" transition-hide="scale">
v-model="persistent" <q-card style="width: 500px;max-width:500px;">
content-class="bg-grey-1"
persistent
transition-show="scale"
transition-hide="scale"
>
<q-card style="width: 800px;max-width:800px;">
<q-card-section> <q-card-section>
<div class="text-h6">{{addMsg.ID==0?'新增学员':'修改学员'}}</div> <div class="text-h6">{{addMsg.ID==0?'选择学员':'修改学员'}}</div>
</q-card-section> </q-card-section>
<q-card-section class="q-pt-none scroll" style="max-height: 70vh"> <q-card-section class="q-pt-none scroll" style="max-height: 70vh">
<div class="row wrap"> <div class="row wrap">
<!-- <q-select filled stack-label option-value="Id" option-label="Name" v-model="addMsg.SurveyType" <q-select filled stack-label clearable use-input option-value="Id" option-label="AccountName"
:options="platList" label="客户类型" ref="SurveyType" @input="getPlat()" :rules="[val => !!val || '请选择类型']" class="col-12 q-pb-lg" emit-value map-options /> v-model="addMsg.GuestId" :options="filterstudentList" @filter="filterStudentFn" label="学员编号" ref="GuestId"
--> :rules="[val => !!val || '请选择学员']" class="col-12 q-pb-lg" emit-value map-options />
<q-select filled stack-label clearable use-input option-value="Id" option-label="AccountName" v-model="addMsg.GuestId"
:options="filterstudentList" @filter="filterStudentFn" label="学员编号" ref="GuestId" :rules="[val => !!val || '请选择学员']" class="col-12 q-pb-lg" emit-value map-options />
<div class="col-12 q-pb-lg"> <div class="col-12 q-pb-lg">
<q-input <q-input filled v-model="addMsg.StartTime" mask="####-##-## ##:##:##" ref="StartTime" label="开始时间"
filled :rules="[val => !!val || '请选择开始时间']">
v-model="addMsg.StartTime"
mask="####-##-## ##:##:##"
ref="StartTime"
label="开始时间"
:rules="[val => !!val || '请选择开始时间']"
>
<template v-slot:append> <template v-slot:append>
<q-icon name="event" class="cursor-pointer"> <q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="StartTime" transition-show="scale" transition-hide="scale"> <q-popup-proxy ref="StartTime" transition-show="scale" transition-hide="scale">
<div class="q-gutter-md row items-start"> <div class="q-gutter-md row items-start">
<q-date <q-date v-model="addMsg.StartTime" mask="YYYY-MM-DD HH:mm:ss" @input="startDate" />
v-model="addMsg.StartTime" <q-time v-model="addMsg.StartTime" format24h mask="YYYY-MM-DD HH:mm:ss" @input="startTime" />
mask="YYYY-MM-DD HH:mm:ss"
@input="date"
/>
<q-time
v-model="addMsg.StartTime"
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" />
</q-popup-proxy> </q-popup-proxy>
</q-icon> </q-icon>
</template> </template>
</q-input> </q-input>
</div> </div>
<div class="col-12 q-pb-lg"> <div class="col-12 q-pb-lg">
<q-input filled v-model="addMsg.EndTime" mask="####-##-## ##:##:##" ref="EndTime" label="结束时间" :rules="[val => !!val || '请选择结束时间']"> <q-input filled v-model="addMsg.EndTime" mask="####-##-## ##:##:##" ref="EndTime" label="结束时间"
:rules="[val => !!val || '请选择结束时间']">
<template v-slot:append> <template v-slot:append>
<q-icon name="event" class="cursor-pointer"> <q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="EndTime" transition-show="scale" transition-hide="scale"> <q-popup-proxy ref="EndTime" transition-show="scale" transition-hide="scale">
<div class="q-gutter-md row items-start"> <div class="q-gutter-md row items-start">
<q-date <q-date v-model="addMsg.EndTime" mask="YYYY-MM-DD HH:mm:ss" @input="endDate" />
v-model="addMsg.EndTime" <q-time v-model="addMsg.EndTime" format24h mask="YYYY-MM-DD HH:mm:ss" @input="endTime" />
mask="YYYY-MM-DD HH:mm:ss"
@input="endDate"
/>
<q-time
v-model="addMsg.EndTime"
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" />
</q-popup-proxy> </q-popup-proxy>
</q-icon> </q-icon>
</template> </template>
</q-input> </q-input>
</div> </div>
</div> </div>
</q-card-section> </q-card-section>
<q-separator /> <q-separator />
<q-card-actions align="right" class="bg-white"> <q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeSaveForm" /> <q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeSaveForm" />
<q-btn label="立即提交" color="accent q-px-md" style="font-weight:400 !important" :loading="saveLoading" @click="saveActive" /> <q-btn label="立即提交" color="accent q-px-md" style="font-weight:400 !important" :loading="saveLoading"
</q-card-actions> @click="saveActive" />
</q-card> </q-card-actions>
</q-dialog> </q-card>
</q-dialog>
</template> </template>
<script> <script>
import { import {
...@@ -117,13 +87,10 @@ ...@@ -117,13 +87,10 @@
Id: 0, //新增传0 Id: 0, //新增传0
GuestType: 2, //客户类型(1-小程序用户,2-学员用户) GuestType: 2, //客户类型(1-小程序用户,2-学员用户)
GuestId: '', //学员编号 GuestId: '', //学员编号
StartTime: "2022-04-20 00:00:00", //开始时间 StartTime: "", //开始时间
EndTime: "2022-04-25 18:00:00", //结束时间 EndTime: "", //结束时间
SurveyId: 0 //意见调查表编号 SurveyId: 0 //意见调查表编号
}, },
platList: [],
dateList: [],
FormTypeList: [],
saveLoading: false, saveLoading: false,
studentAccountList: [], studentAccountList: [],
filterstudentList: [], filterstudentList: [],
...@@ -134,24 +101,9 @@ ...@@ -134,24 +101,9 @@
this.initObj(); this.initObj();
}, },
methods: { methods: {
// 选择报名开始时间
date(val) {
this.addMsg.SignStartTime = val;
},
time(val) {
this.addMsg.SignStartTime = val;
},
// 选择报名结束时间
endDate(val) {
this.addMsg.SignEndTime = val;
},
endTime(val) {
this.addMsg.SignEndTime = val;
},
//初始化表单 //初始化表单
initObj() { initObj() {
this.addMsg.SurveyId = this.ID this.addMsg.SurveyId = this.ID
console.log("this.saveObj", this.saveObj);
if (this.saveObj && this.saveObj.Id > 0) { if (this.saveObj && this.saveObj.Id > 0) {
getActivitySurveyGuestModule({ getActivitySurveyGuestModule({
Id: this.saveObj.Id Id: this.saveObj.Id
...@@ -161,8 +113,6 @@ ...@@ -161,8 +113,6 @@
this.addMsg.GuestId = tempData.GuestId; this.addMsg.GuestId = tempData.GuestId;
this.addMsg.StartTime = tempData.StartTime; this.addMsg.StartTime = tempData.StartTime;
this.addMsg.EndTime = tempData.EndTime; this.addMsg.EndTime = tempData.EndTime;
// this.addMsg =
console.log("tempData", tempData);
}) })
} else { } else {
this.addMsg.Id = 0; this.addMsg.Id = 0;
...@@ -171,6 +121,20 @@ ...@@ -171,6 +121,20 @@
this.addMsg.EndTime = ''; this.addMsg.EndTime = '';
} }
}, },
//意见调查开始时间
startDate(val) {
this.addMsg.StartTime = val;
},
startTime(val) {
this.addMsg.StartTime = val;
},
//意见调查结束时间
endDate(val) {
this.addMsg.EndTime = val;
},
endTime(val) {
this.addMsg.EndTime = val;
},
//关闭弹窗 //关闭弹窗
closeSaveForm() { closeSaveForm() {
this.$emit("close"); this.$emit("close");
...@@ -202,13 +166,14 @@ ...@@ -202,13 +166,14 @@
} }
}) })
} }
}, },
// 学生编号 // 学生编号
studentAccount() { studentAccount() {
getAccountStudentList({}).then(res => { getAccountStudentList({}).then(res => {
if (res.Code == 1) {
this.studentAccountList = res.Data; this.studentAccountList = res.Data;
this.filterstudentList = res.Data; this.filterstudentList = res.Data;
}
}) })
}, },
//学生筛选 //学生筛选
...@@ -218,10 +183,10 @@ ...@@ -218,10 +183,10 @@
this.filterstudentList = JSON.parse(JSON.stringify(this.studentAccountList)) this.filterstudentList = JSON.parse(JSON.stringify(this.studentAccountList))
} else { } else {
const needle = val.toLowerCase(); const needle = val.toLowerCase();
this.filterstudentList = this.studentAccountList.filter(v => v.AccountName.toLowerCase().indexOf(needle) > -1) this.filterstudentList = this.studentAccountList.filter(v => v.AccountName.toLowerCase().indexOf(
needle) > -1)
} }
}) })
}, },
} }
}; };
......
...@@ -8,26 +8,26 @@ ...@@ -8,26 +8,26 @@
<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" icon="add" label="新增" @click="addObj(null)"/> <q-btn color="accent" size="sm" icon="add" label="新增" @click="addObj(null)" />
</div> </div>
</template> </template>
<template v-slot:body-cell-IsRequired="props"> <template v-slot:body-cell-IsRequired="props">
<q-td :props="props"> <q-td :props="props">
<span v-if="props.row.IsRequired==0"></span> <span v-if="props.row.IsRequired==0"></span>
<span v-if="props.row.IsRequired==1"></span> <span v-if="props.row.IsRequired==1"></span>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-IsShow="props"> <template v-slot:body-cell-IsShow="props">
<q-td :props="props"> <q-td :props="props">
<span v-if="props.row.IsShow==0"></span> <span v-if="props.row.IsShow==0"></span>
<span v-if="props.row.IsShow==1"></span> <span v-if="props.row.IsShow==1"></span>
</q-td> </q-td>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount" <q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" /> :input="true" @input="changePage" />
</template> </template>
<template v-slot:body-cell-optioned="props"> <template v-slot:body-cell-optioned="props">
<q-td :props="props"> <q-td :props="props">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑" <q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑"
@click="addObj(props.row)" /> @click="addObj(props.row)" />
...@@ -35,10 +35,11 @@ ...@@ -35,10 +35,11 @@
@click="delQuestion(props.row)" /> @click="delQuestion(props.row)" />
</q-td> </q-td>
</template> </template>
</q-table> </q-table>
<student-form v-if="isShowWenjuan" :save-obj="objOption" :ID="msg.ActivitySurveyId" @close="closeSaveForm" @success="resetSearch"></student-form> <student-form v-if="isShowWenjuan" :save-obj="objOption" :ID="msg.SurveyId" @close="closeSaveForm"
</div> @success="resetSearch"></student-form>
</div> </div>
</div>
</template> </template>
<script> <script>
import studentForm from '../../components/activity/student-from' import studentForm from '../../components/activity/student-from'
...@@ -89,9 +90,8 @@ ...@@ -89,9 +90,8 @@
pageIndex: 1, pageIndex: 1,
pageSize: 12, pageSize: 12,
rowsPerPage: 12, rowsPerPage: 12,
SurveyId: 1, SurveyId: 0,
}, },
pageCount: 0, pageCount: 0,
isShowWenjuan: false, isShowWenjuan: false,
objOption: null, objOption: null,
...@@ -99,15 +99,13 @@ ...@@ -99,15 +99,13 @@
}, },
created() { created() {
if (this.$route.query && this.$route.query.ID) { if (this.$route.query && this.$route.query.ID) {
this.msg.ActivitySurveyId = this.$route.query.ID; this.msg.SurveyId = this.$route.query.ID;
} }
}, },
mounted() { mounted() {
this.getList(); this.getList();
}, },
methods: { methods: {
resetSearch() { resetSearch() {
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
this.getList(); this.getList();
...@@ -120,9 +118,7 @@ ...@@ -120,9 +118,7 @@
this.dataList = res.Data.PageData; this.dataList = res.Data.PageData;
this.pageCount = res.Data.PageCount; this.pageCount = res.Data.PageCount;
} }
console.log("res", res);
}); });
}, },
addObj(obj) { addObj(obj) {
if (obj) { if (obj) {
...@@ -151,9 +147,6 @@ ...@@ -151,9 +147,6 @@
removeActivitySurveyGuest({ removeActivitySurveyGuest({
Id: row.Id Id: row.Id
}).then(res => { }).then(res => {
this.dataList = '';
this.pageCount = '';
console.log(res + '111111')
if (res.Code == 1) { if (res.Code == 1) {
that.$q.notify({ that.$q.notify({
icon: 'iconfont icon-chenggong', icon: 'iconfont icon-chenggong',
...@@ -173,7 +166,6 @@ ...@@ -173,7 +166,6 @@
}) })
}) })
}, },
closeSaveForm() { closeSaveForm() {
this.isShowWenjuan = false; this.isShowWenjuan = false;
}, },
......
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