feat: 优化会议室预定页面
This commit is contained in:
parent
def8713e8e
commit
84f0cef581
|
|
@ -10,12 +10,12 @@
|
|||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="会议名称" prop="title">
|
||||
<el-input v-model="form.title" clearable placeholder="请输入会议名称" :readonly="mode === 'show'"></el-input>
|
||||
<el-input v-model="form.title" clearable placeholder="请输入会议名称" :readonly="localMode === 'show'"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="会议室" prop="mroom">
|
||||
<el-select v-model="form.mroom" placeholder="请选择会议室" @change="mRoomChange" style="width: 100%;" :readonly="mode === 'show'">
|
||||
<el-select v-model="form.mroom" placeholder="请选择会议室" @change="mRoomChange" style="width: 100%;" :readonly="localMode === 'show'">
|
||||
<el-option
|
||||
v-for="item in mRoomList"
|
||||
:key="item.id"
|
||||
|
|
@ -27,17 +27,17 @@
|
|||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="参会领导" prop="key_participants">
|
||||
<el-input v-model="form.key_participants" clearable placeholder="请输入参会领导" :readonly="mode === 'show'"></el-input>
|
||||
<el-input v-model="form.key_participants" clearable placeholder="请输入参会领导" :readonly="localMode === 'show'"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="会议人数" prop="participant_count">
|
||||
<el-input-number v-model="form.participant_count" clearable style="width: 100%;" :precision="0" :step="1" :min="1" :readonly="mode === 'show'"></el-input-number>
|
||||
<el-input-number v-model="form.participant_count" clearable style="width: 100%;" :precision="0" :step="1" :min="1" :readonly="localMode === 'show'"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="会议日期" prop="mdate">
|
||||
<el-date-picker v-model="form.mdate" type="date" value-format="YYYY-MM-DD" style="width: 100%;" placeholder="请选择会议日期" :readonly="mode === 'show'" @change="mdateChange"></el-date-picker>
|
||||
<el-date-picker v-model="form.mdate" type="date" value-format="YYYY-MM-DD" style="width: 100%;" placeholder="请选择会议日期" :readonly="localMode === 'show'" @change="mdateChange"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="24">
|
||||
<el-form-item label="会议时间段" prop="slots" required v-if="mode != 'show'">
|
||||
<el-form-item label="会议时间段" prop="slots" required v-if="localMode != 'show'">
|
||||
<div v-for="(item,$index) in timesList" :key="item.value">
|
||||
<div v-if="item.isSelect" class="timeBlock selectedTimeBlock" @click="selectTime($index)">{{ item.label }}</div>
|
||||
<div v-else class="timeBlock" @click="selectTime($index)">{{ item.label }}</div>
|
||||
|
|
@ -68,7 +68,7 @@
|
|||
<el-footer>
|
||||
<el-button @click="$emit('closed')" style="margin-right: 4px">取消</el-button>
|
||||
<ticketd_b
|
||||
:workflow_key="'booking'"
|
||||
:workflow_key="'mroombooking.create'"
|
||||
:title="form.title+'-会议室预定'"
|
||||
:t_id="form.id"
|
||||
:ticket_="form.ticket_"
|
||||
|
|
@ -97,10 +97,6 @@ export default {
|
|||
mode: {
|
||||
type: String,
|
||||
default: "show",
|
||||
},
|
||||
bookingIitem: {
|
||||
type: Object,
|
||||
default: null,
|
||||
},
|
||||
t_id: {
|
||||
type: String,
|
||||
|
|
@ -181,6 +177,7 @@ export default {
|
|||
],
|
||||
mRoomList: [],
|
||||
timeselectList: [],
|
||||
localMode: this.mode,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -190,13 +187,9 @@ export default {
|
|||
that.getTid();
|
||||
}
|
||||
else {
|
||||
if(that.mode=='add'){
|
||||
that.localMode = "add";
|
||||
that.form.belong_dept = that.$TOOL.data.get("USER_INFO").belong_dept;
|
||||
}
|
||||
else if (that.mode=='edit'||that.mode=='show'){
|
||||
that.form = that.bookingIitem;
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -212,9 +205,9 @@ export default {
|
|||
that.form = res;
|
||||
that.handleEidt(that.t_id);
|
||||
if(res.ticket_.state_.type == 1 && res.create_by == that.$TOOL.data.get("USER_INFO").id ) {
|
||||
that.$emit("changeMode", "edit");
|
||||
that.localMode = "edit";
|
||||
}else{
|
||||
that.$emit("changeMode", "show");
|
||||
that.localMode = "show";
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
@ -263,11 +256,11 @@ export default {
|
|||
},
|
||||
async submit_b_func() {
|
||||
let that = this;
|
||||
if(that.mode == "add") {
|
||||
if(that.localMode == "add") {
|
||||
that.form.belong_dept = that.$TOOL.data.get("USER_INFO").belong_dept;
|
||||
let res = await that.$API.ofm.mroombooking.create.req(that.form);
|
||||
that.form.id = res.id;
|
||||
} else if (that.mode == "edit") {
|
||||
} else if (that.localMode == "edit") {
|
||||
await that.$API.ofm.mroombooking.update.req(that.form.id, that.form);
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -71,8 +71,6 @@
|
|||
v-if="limitedVisible"
|
||||
:mode="mode"
|
||||
:t_id="t_id"
|
||||
:bookingIitem="bookingIitem"
|
||||
@changeMode="(mode)=>{this.mode=mode;}"
|
||||
@success="handleSuccess"
|
||||
@closed="handleCancel"
|
||||
></bookingDialog>
|
||||
|
|
@ -116,7 +114,6 @@ export default {
|
|||
handleAdd() {
|
||||
this.mode = "add";
|
||||
this.t_id = null;
|
||||
this.bookingIitem = {};
|
||||
this.limitedVisible = true;
|
||||
},
|
||||
handleCancel() {
|
||||
|
|
@ -130,17 +127,15 @@ export default {
|
|||
let that = this;
|
||||
that.mode = "show";
|
||||
that.t_id = row.id;
|
||||
that.bookingIitem = row;
|
||||
that.limitedVisible = true;
|
||||
},
|
||||
async handleDel(row) {
|
||||
var id = row.id;
|
||||
var res = await this.$API.ofm.mroombooking.delete.req(id);
|
||||
if (res.err_msg) {
|
||||
this.$message.error(res.err_msg);
|
||||
} else {
|
||||
this.$refs.table.refresh();
|
||||
try {
|
||||
await this.$API.ofm.mroombooking.checkDelete.req(id);
|
||||
this.$message.success("删除成功");
|
||||
this.$refs.table.refresh();
|
||||
} catch (error) {
|
||||
}
|
||||
},
|
||||
//搜索
|
||||
|
|
|
|||
Loading…
Reference in New Issue