fix:预定页面调整
This commit is contained in:
parent
db46b1d878
commit
4b50910cdd
|
@ -13,7 +13,7 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="会议室" prop="mroom">
|
<el-form-item label="会议室" prop="mroom">
|
||||||
<el-select v-model="form.mroom" placeholder="请选择" style="width: 100%;">
|
<el-select v-model="form.mroom" placeholder="请选择" @change="mRoomChange" style="width: 100%;">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in mRoomList"
|
v-for="item in mRoomList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
@ -65,20 +65,32 @@ export default {
|
||||||
ticketd_b_start, ticketd
|
ticketd_b_start, ticketd
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: "add",
|
||||||
|
},
|
||||||
|
editId: {
|
||||||
|
type: String,
|
||||||
|
default: "add",
|
||||||
|
},
|
||||||
|
bookingIitem: {
|
||||||
|
type: String,
|
||||||
|
default: "add",
|
||||||
|
},
|
||||||
t_id: {
|
t_id: {
|
||||||
type: String,
|
type: String,
|
||||||
default: null
|
default: null
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
apiObj: this.$API.ofm.mroombooking.list,
|
apiObj: this.$API.ofm.mroombooking.list,
|
||||||
bookingTitle: "会议预定",
|
bookingTitle: "会议预定",
|
||||||
query: {},
|
query: {},
|
||||||
editId: null,
|
mroomName:'',
|
||||||
isSaving: false,
|
isSaving: false,
|
||||||
limitedVisible: false,
|
limitedVisible: false,
|
||||||
type: "add",
|
|
||||||
titleMap: {
|
titleMap: {
|
||||||
add: "新增会议预定",
|
add: "新增会议预定",
|
||||||
edit: "编辑会议预定",
|
edit: "编辑会议预定",
|
||||||
|
@ -147,12 +159,20 @@ export default {
|
||||||
{value:46,label:'23:00-23:30',isSelect:false},
|
{value:46,label:'23:00-23:30',isSelect:false},
|
||||||
{value:47,label:'23:30-24:00',isSelect:false}
|
{value:47,label:'23:30-24:00',isSelect:false}
|
||||||
],
|
],
|
||||||
mRoomList: []
|
mRoomList: [],
|
||||||
|
timeselectList: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getmRoomList();
|
let that = this;
|
||||||
this.getTid();
|
that.getmRoomList();
|
||||||
|
that.getTid();
|
||||||
|
if(that.type=='edit'){
|
||||||
|
that.form = that.bookingIitem;
|
||||||
|
that.mroomName = that.bookingIitem.mroom_name;
|
||||||
|
that.bookingTitle = that.mroomName+"预定";
|
||||||
|
that.handleEidt(that.editId);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getmRoomList(){
|
getmRoomList(){
|
||||||
|
@ -177,6 +197,15 @@ export default {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mRoomChange(){
|
||||||
|
let that = this;
|
||||||
|
that.mRoomList.forEach(item=>{
|
||||||
|
if(item.id == that.form.mroom){
|
||||||
|
that.mroomName = item.name;
|
||||||
|
that.bookingTitle = item.name+"预定";
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
selectTime(index){
|
selectTime(index){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.form.slots = [];
|
that.form.slots = [];
|
||||||
|
@ -221,24 +250,20 @@ export default {
|
||||||
that.isSaving = false;
|
that.isSaving = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleEidt(row) {
|
handleEidt(id) {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.type = "edit";
|
that.$API.ofm.mroomslot.list.req({booking:id,page:0}).then(res=>{
|
||||||
that.editId = row.id;
|
|
||||||
that.$API.ofm.mroomslot.list.req({booking:row.id,page:0}).then(res=>{
|
|
||||||
console.log('mroomslotres',res);
|
|
||||||
res.forEach(item=>{
|
res.forEach(item=>{
|
||||||
that.timesList[item.slot].isSelect = true;
|
that.timesList[item.slot].isSelect = true;
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
that.limitedVisible = true;
|
|
||||||
that.form = Object.assign({}, row);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
//搜索
|
//搜索
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.$refs.table.queryData(this.query);
|
this.$refs.table.queryData(this.query);
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
@ -9,17 +9,23 @@
|
||||||
></el-button>
|
></el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<el-input
|
<el-date-picker
|
||||||
v-model="query.search"
|
v-model="query.slot_b__mdate"
|
||||||
placeholder="会议室名称"
|
type="date"
|
||||||
clearable
|
value-format="YYYY-MM-DD" />
|
||||||
@keyup.enter="handleQuery"
|
<el-select v-model="query.slot_b__mroom" clearable placeholder="请选择会议室">
|
||||||
></el-input>
|
<el-option
|
||||||
<el-button
|
v-for="item in mRoomList"
|
||||||
type="primary"
|
:key="item.id"
|
||||||
icon="el-icon-search"
|
:label="item.name"
|
||||||
@click="handleQuery"
|
:value="item.id"
|
||||||
></el-button>
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
|
@ -41,12 +47,6 @@
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleEidt(scope.row)"
|
@click="handleEidt(scope.row)"
|
||||||
>编辑</el-button>
|
>编辑</el-button>
|
||||||
<!-- <el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row, scope.$index)">
|
|
||||||
<template #reference>
|
|
||||||
<el-button link size="small">删除</el-button>
|
|
||||||
</template>
|
|
||||||
</el-popconfirm> -->
|
|
||||||
|
|
||||||
<el-popconfirm title="确定删除吗?" @confirm="handleDel(scope.row)">
|
<el-popconfirm title="确定删除吗?" @confirm="handleDel(scope.row)">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button link size="small" type="danger">删除</el-button>
|
<el-button link size="small" type="danger">删除</el-button>
|
||||||
|
@ -60,8 +60,8 @@
|
||||||
<el-drawer :title="titleMap[type]" v-model="limitedVisible" :size="'80%'">
|
<el-drawer :title="titleMap[type]" v-model="limitedVisible" :size="'80%'">
|
||||||
<bookingDialog
|
<bookingDialog
|
||||||
:type="type"
|
:type="type"
|
||||||
:id="editId"
|
:editId="editId"
|
||||||
:timeselectList="timeselectList"
|
:bookingIitem="bookingIitem"
|
||||||
@success="handleSuccess"
|
@success="handleSuccess"
|
||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
></bookingDialog>
|
></bookingDialog>
|
||||||
|
@ -86,11 +86,19 @@ export default {
|
||||||
edit: "编辑会议预定",
|
edit: "编辑会议预定",
|
||||||
show: "查看会议预定",
|
show: "查看会议预定",
|
||||||
},
|
},
|
||||||
|
mRoomList: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.getmRoomList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getmRoomList(){
|
||||||
|
let that = this;
|
||||||
|
that.$API.ofm.mroom.list.req({page:0}).then(res=>{
|
||||||
|
that.mRoomList = res;
|
||||||
|
})
|
||||||
|
},
|
||||||
//添加
|
//添加
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.type = "add";
|
this.type = "add";
|
||||||
|
@ -104,11 +112,7 @@ export default {
|
||||||
that.type = "edit";
|
that.type = "edit";
|
||||||
that.editId = row.id;
|
that.editId = row.id;
|
||||||
that.bookingIitem = row;
|
that.bookingIitem = row;
|
||||||
that.$API.ofm.mroomslot.list.req({booking:row.id,page:0}).then(res=>{
|
|
||||||
that.timeselectList = res;
|
|
||||||
})
|
|
||||||
that.limitedVisible = true;
|
that.limitedVisible = true;
|
||||||
that.form = Object.assign({}, row);
|
|
||||||
},
|
},
|
||||||
async handleDel(row) {
|
async handleDel(row) {
|
||||||
var id = row.id;
|
var id = row.id;
|
||||||
|
|
Loading…
Reference in New Issue