Commit b325d3dd authored by 黄奎's avatar 黄奎

页面修改

parent f51b09fb
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<div style="margin-bottom:20px;"> <div style="margin-bottom:20px;">
<div class="Appoint_Line"></div>预约申请 <div class="Appoint_Line"></div>预约申请
</div> </div>
<q-btn color="primary" label="选择试听课" @click="isShowTeacher=true" style="margin-bottom:20px;" />
<q-input filled v-model="addMsg.ClassDate" class="col-6 q-pb-lg" :rules="[val => !!val || '请选择预约日期']" <q-input filled v-model="addMsg.ClassDate" class="col-6 q-pb-lg" :rules="[val => !!val || '请选择预约日期']"
ref="ClassDate" mask="date" label="预约日期"> ref="ClassDate" mask="date" label="预约日期">
<template v-slot:append> <template v-slot:append>
...@@ -57,12 +58,9 @@ ...@@ -57,12 +58,9 @@
<q-select filled stack-label option-value="Name" option-label="Name" v-model="addMsg.ClassContent" <q-select filled stack-label option-value="Name" option-label="Name" v-model="addMsg.ClassContent"
ref="ClassContent" :options="ContentList" :rules="[val => !!val || '请选择主讲内容']" label="主讲内容" :dense="false" ref="ClassContent" :options="ContentList" :rules="[val => !!val || '请选择主讲内容']" label="主讲内容" :dense="false"
class="col-6 q-pb-lg" emit-value map-options /> class="col-6 q-pb-lg" emit-value map-options />
<div style="display:flex;align-items:center;"> <q-select filled stack-label option-value="TId" option-label="TeacherName" v-model="addMsg.TeacherId"
<q-select filled stack-label option-value="TId" style="width:90%" option-label="TeacherName" ref="TeacherId" :options="TeacherList" label="选择教师" :dense="false" class="col-6 q-pb-lg" emit-value
v-model="addMsg.TeacherId" ref="TeacherId" :options="TeacherList" label="选择教师" :dense="false" map-options />
class="col-6 q-pb-lg" emit-value map-options />
<div style="margin:-20px 0 0 9px;cursor:pointer;" @click="isShowTeacher=true">选择</div>
</div>
<q-select filled stack-label option-value="RoomId" option-label="RoomName" v-model="addMsg.ClassRoomId" <q-select filled stack-label option-value="RoomId" option-label="RoomName" v-model="addMsg.ClassRoomId"
ref="ClassRoomId" :options="ClassRoomList" label="关联教室" :dense="false" class="col-6 q-pb-lg" emit-value ref="ClassRoomId" :options="ClassRoomList" label="关联教室" :dense="false" class="col-6 q-pb-lg" emit-value
map-options /> map-options />
...@@ -180,7 +178,6 @@ ...@@ -180,7 +178,6 @@
if (this.saveObj) { if (this.saveObj) {
this.addMsg.Visitor_Id = this.saveObj.Id; this.addMsg.Visitor_Id = this.saveObj.Id;
} }
this.$refs.ClassDate.validate(); this.$refs.ClassDate.validate();
this.$refs.ClassContent.validate(); this.$refs.ClassContent.validate();
if (this.addMsg.ClassTime == '') { if (this.addMsg.ClassTime == '') {
...@@ -192,7 +189,7 @@ ...@@ -192,7 +189,7 @@
}) })
return; return;
} }
if(this.addMsg.EndTime == ''){ if (this.addMsg.EndTime == '') {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
position: "top", position: "top",
...@@ -212,7 +209,7 @@ ...@@ -212,7 +209,7 @@
position: 'top' position: 'top'
}) })
this.$emit('success'); this.$emit('success');
}else{ } else {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
position: "top", position: "top",
...@@ -226,9 +223,15 @@ ...@@ -226,9 +223,15 @@
}, },
//子组件选中传值 //子组件选中传值
getchildInfo(obj) { getchildInfo(obj) {
if (obj) {
this.addMsg.TeacherId = obj.TeacherId; this.addMsg.TeacherId = obj.TeacherId;
this.addMsg.ClassRoomId = obj.ClassRoomId; this.addMsg.ClassRoomId = obj.ClassRoomId;
this.addMsg.ReserveClassId = obj.ReserveClassId; this.addMsg.ReserveClassId = obj.ReserveClassId;
this.addMsg.ClassDate = obj.ClassDateStr;
this.addMsg.ClassTime = obj.ClassTime;
this.addMsg.EndTime = obj.EndTime;
this.addMsg.ClassContent = obj.ClassContent;
}
} }
} }
} }
......
<template> <template>
<q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale" transition-hide="scale"> <q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale" transition-hide="scale">
<q-card style="width: 800px;max-width:900px;"> <q-card style="width: 800px;max-width:900px;">
<q-card-section>
<div class="text-h6">试听课信息</div>
</q-card-section>
<q-card-section>
<div class="row wrap">
<div class="col-6 q-pb-lg q-pr-lg auditionformdate">
<q-field borderless>
 <template v-slot:prepend>
<q-input filled v-model="msg.StartClassDate" mask="date" label="开始日期">
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="StartClassDate" transition-show="scale" transition-hide="scale">
<q-date v-model="msg.StartClassDate" @input="() => $refs.StartClassDate.hide()" />
</q-popup-proxy>
</q-icon>
</template>
</q-input>
</template>
<template v-slot:append>
</template>
<template v-slot:append>
<q-input filled v-model="msg.EndClassDate" mask="date" label="结束日期">
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="EndClassDate" transition-show="scale" transition-hide="scale">
<q-date v-model="msg.EndClassDate" @input="() => $refs.EndClassDate.hide()" />
</q-popup-proxy>
</q-icon>
</template>
</q-input>
</template>
</q-field>
</div>
<div class="col-6 q-pr-lg q-pb-lg">
<q-select @input="resetSearch" filled option-value="TId" option-label="TeacherName" v-model="msg.TeacherId"
:options="TeacherList" emit-value map-options label="老师" clearable />
</div>
</div>
</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">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" style="margin-top:20px;" flat class="sticky-column-table sticky-right-column-table" <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" style="margin-top:20px;" flat
separator="none" :data="dataList" :columns="columns" row-key="name"> class="sticky-column-table sticky-right-column-table" separator="none" :data="dataList" :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 />
</template> </template>
<template v-slot:body-cell-ClassTime="props">
<q-td :props="props">
{{props.row.ClassTime}}-{{props.row.EndTime}}
</q-td>
</template>
<template v-slot:body-cell-Id="props"> <template v-slot:body-cell-Id="props">
<q-td :props="props"> <q-td :props="props">
<q-btn flat size="xs" icon="edit" color="accent" @click="getStuInfo(props.row)" style="font-weight:400" label="报入" /> <q-btn flat size="xs" icon="edit" color="accent" @click="getStuInfo(props.row)" style="font-weight:400"
label="报入" />
</q-td> </q-td>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
...@@ -21,7 +68,7 @@ ...@@ -21,7 +68,7 @@
</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-card-actions> </q-card-actions>
</q-card> </q-card>
</q-dialog> </q-dialog>
...@@ -31,7 +78,9 @@ ...@@ -31,7 +78,9 @@
import { import {
GetReserveClassPage GetReserveClassPage
} from '../../api/scheduling/schedu' } from '../../api/scheduling/schedu'
import {
getTeacherDropDownList
} from "../../api/school/index";
export default { export default {
components: {}, components: {},
data() { data() {
...@@ -39,12 +88,15 @@ ...@@ -39,12 +88,15 @@
persistent: true, persistent: true,
loading: false, loading: false,
msg: { msg: {
pageIndex:1, pageIndex: 1,
pageSize:10, pageSize: 6,
rowsPerPage: 10, rowsPerPage: 6,
StartClassDate:'' StartClassDate: "", //开始时间
EndClassDate: "", //结束时间
TeacherId: "", //教师编号
ClassRoomId: "", //教室编号
}, },
PageCount:0, PageCount: 0,
columns: [{ columns: [{
name: 'TeacherName', name: 'TeacherName',
label: '老师', label: '老师',
...@@ -86,17 +138,32 @@ ...@@ -86,17 +138,32 @@
label: '操作', label: '操作',
} }
], ],
dataList:[], TeacherList: [], //教师列表
StuObj:{} dataList: [],
StuObj: {}
} }
}, },
created() {}, created() {
this.GetTeacherList();
},
mounted() { mounted() {
var day = new Date(); let nowDay = new Date();
this.msg.StartClassDate = day.getFullYear()+"-" + (day.getMonth()+1) + "-" + day.getDate(); var year = nowDay.getFullYear(); //年
var month = nowDay.getMonth() + 1; //月
var day = nowDay.getDate(); //日
var currentDay = year + '-' + (month < 10 ? ('0' + month) : month) + '-' + day;
this.msg.StartClassDate = currentDay;
this.getList(); this.getList();
}, },
methods: { methods: {
//获取教师下拉
GetTeacherList() {
getTeacherDropDownList({}).then(res => {
if (res.Code == 1) {
this.TeacherList = res.Data;
}
});
},
closeSaveForm() { closeSaveForm() {
this.$emit('close') this.$emit('close')
this.persistent = false this.persistent = false
...@@ -113,26 +180,34 @@ ...@@ -113,26 +180,34 @@
//获取课程系列分页列表 //获取课程系列分页列表
getList() { getList() {
GetReserveClassPage(this.msg).then(res => { GetReserveClassPage(this.msg).then(res => {
if(res.Code==1){ if (res.Code == 1) {
this.dataList = res.Data.PageData; this.dataList = res.Data.PageData;
this.PageCount = res.Data.PageCount; this.PageCount = res.Data.PageCount;
} }
}) })
}, },
//点击报入 //点击报入
getStuInfo(item){ getStuInfo(item) {
if(item){ if (item) {
this.StuObj.ClassRoomId = item.ClassRoomId; this.StuObj.ClassRoomId = item.ClassRoomId;
this.StuObj.TeacherId = item.TeacherId; this.StuObj.TeacherId = item.TeacherId;
this.StuObj.ReserveClassId = item.ReserveClassId; this.StuObj.ReserveClassId = item.ReserveClassId;
this.StuObj.ClassDateStr = item.ClassDateStr;
this.StuObj.ClassTime = item.ClassTime;
this.StuObj.EndTime = item.EndTime;
this.StuObj.ClassContent = item.ClassContent;
} }
this.$emit('getchildInfo',this.StuObj); this.$emit('getchildInfo', this.StuObj);
this.closeSaveForm(); this.closeSaveForm();
} }
}, },
} }
</script> </script>
<style> <style>
.auditionformdate .el-input__inner {
background: transparent !important;
border: 0 !important;
}
</style> </style>
...@@ -156,7 +156,7 @@ export default { ...@@ -156,7 +156,7 @@ export default {
document.body.appendChild(link); document.body.appendChild(link);
link.click(); link.click();
successCall(res); successCall(res);
}).catch(function (res) { }); }).catch(function (res) {});
}, },
//HTTP提交数据 //HTTP提交数据
...@@ -261,7 +261,6 @@ export default { ...@@ -261,7 +261,6 @@ export default {
//HTTP提交数据-电商 //HTTP提交数据-电商
Vue.prototype.apipostDS = function (cmd, msg, successCall, faildCall) { Vue.prototype.apipostDS = function (cmd, msg, successCall, faildCall) {
var apiurl = this.domainManager().mallUrl + cmd; var apiurl = this.domainManager().mallUrl + cmd;
console.log(337, apiurl)
var postData = this.GetPostDataDS(cmd, msg, ""); var postData = this.GetPostDataDS(cmd, msg, "");
this.$http.post(apiurl, postData, { this.$http.post(apiurl, postData, {
headers: { headers: {
...@@ -270,7 +269,7 @@ export default { ...@@ -270,7 +269,7 @@ export default {
} }
}) })
.then(res => { .then(res => {
if (res.data.resultCode == 10000 || res.data.resultCode == 10001) { } else if (res.resultCode == 10005) { if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {} else if (res.resultCode == 10005) {
this.$router.go(-1); this.$router.go(-1);
} else { } else {
successCall(res); successCall(res);
...@@ -503,7 +502,7 @@ export default { ...@@ -503,7 +502,7 @@ export default {
Key: newFileName, //文件名 Key: newFileName, //文件名
StorageClass: 'STANDARD', StorageClass: 'STANDARD',
Body: fileObj, // 上传文件对象 Body: fileObj, // 上传文件对象
onProgress: function (progressData) { } onProgress: function (progressData) {}
}, function (err, data) { }, function (err, data) {
if (data && data.statusCode == 200) { if (data && data.statusCode == 200) {
var uploadResult = { var uploadResult = {
...@@ -542,7 +541,7 @@ export default { ...@@ -542,7 +541,7 @@ export default {
var newFileName = str + '/Upload/' + path + "/" + timestamp1 + "" + suffix; var newFileName = str + '/Upload/' + path + "/" + timestamp1 + "" + suffix;
this.Info('上传中...') this.Info('上传中...')
var result = oss.multipartUpload(newFileName, fileObj, { var result = oss.multipartUpload(newFileName, fileObj, {
progress: function* (p) { } progress: function* (p) {}
}).then(res => { }).then(res => {
var uploadResult = { var uploadResult = {
resultCode: 1, resultCode: 1,
......
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