|
@@ -57,8 +57,8 @@
|
|
}
|
|
}
|
|
|
|
|
|
.el-dialog__body {
|
|
.el-dialog__body {
|
|
- height: 60vh;
|
|
|
|
- overflow: scroll;
|
|
|
|
|
|
+ height: 50vh;
|
|
|
|
+ overflow: hidden;
|
|
/* 你想要的高度 */
|
|
/* 你想要的高度 */
|
|
}
|
|
}
|
|
|
|
|
|
@@ -91,7 +91,7 @@
|
|
<div class="topBg" style="background-image: url(images/indexbg-yy.png);" id="topBg">
|
|
<div class="topBg" style="background-image: url(images/indexbg-yy.png);" id="topBg">
|
|
<div class="topButton" style="background-image: url(images/button-yy.png);" @click="dialogVisible = true">我要预约
|
|
<div class="topButton" style="background-image: url(images/button-yy.png);" @click="dialogVisible = true">我要预约
|
|
</div>
|
|
</div>
|
|
- <el-dialog title="周六预约“加班办”报名表" :visible.sync="dialogVisible" width="50%" @close="handleClose"
|
|
|
|
|
|
+ <el-dialog title="周六预约“加班办”报名表" :visible.sync="dialogVisible" width="40vw" @close="handleClose"
|
|
:close-on-click-modal="false">
|
|
:close-on-click-modal="false">
|
|
<!-- 表单内容 -->
|
|
<!-- 表单内容 -->
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
@@ -111,7 +111,7 @@
|
|
<el-form-item label="验证码" prop="imgCode">
|
|
<el-form-item label="验证码" prop="imgCode">
|
|
<div style="display: flex;">
|
|
<div style="display: flex;">
|
|
<el-input v-model="form.imgCode" placeholder="请输入验证码"></el-input>
|
|
<el-input v-model="form.imgCode" placeholder="请输入验证码"></el-input>
|
|
- <el-image :src="imageCode"></el-image>
|
|
|
|
|
|
+ <el-image :src="imageCode" @click="getVerifyCode"></el-image>
|
|
</div>
|
|
</div>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item class="subButton">
|
|
<el-form-item class="subButton">
|
|
@@ -165,6 +165,7 @@
|
|
data: function () {
|
|
data: function () {
|
|
return {
|
|
return {
|
|
dialogVisible: false,
|
|
dialogVisible: false,
|
|
|
|
+ reqPtah: 'http://172.16.99.105:8082',
|
|
form: {
|
|
form: {
|
|
overtimeName: '',
|
|
overtimeName: '',
|
|
overtimeAge: '',
|
|
overtimeAge: '',
|
|
@@ -215,17 +216,18 @@
|
|
const formData = this.form;
|
|
const formData = this.form;
|
|
// AJAX 请求
|
|
// AJAX 请求
|
|
$.ajax({
|
|
$.ajax({
|
|
- url: 'http://localhost:8082/reserveOvertime',
|
|
|
|
|
|
+ url: this.reqPtah + '/reserveOvertime',
|
|
type: 'post',
|
|
type: 'post',
|
|
contentType: 'application/json; charset=utf-8',
|
|
contentType: 'application/json; charset=utf-8',
|
|
data: JSON.stringify(formData), // 传递表单数据
|
|
data: JSON.stringify(formData), // 传递表单数据
|
|
dataType: 'json',
|
|
dataType: 'json',
|
|
success: function (data) {
|
|
success: function (data) {
|
|
if (data.result === 'ok') {
|
|
if (data.result === 'ok') {
|
|
- alert('添加成功!');
|
|
|
|
|
|
+ this.$message.success('预约成功!');
|
|
this.dialogVisible = false; // 关闭对话框
|
|
this.dialogVisible = false; // 关闭对话框
|
|
} else {
|
|
} else {
|
|
- alert(data.success || '操作失败!');
|
|
|
|
|
|
+ this.getVerifyCode();
|
|
|
|
+ this.$message.error(data.success || '预约失败!');
|
|
}
|
|
}
|
|
}.bind(this), // 确保 `this` 指向 Vue 实例
|
|
}.bind(this), // 确保 `this` 指向 Vue 实例
|
|
error: function (error) {
|
|
error: function (error) {
|
|
@@ -261,7 +263,7 @@
|
|
sessionStorage.setItem("registerImageCodeKey", imageCodeKey);
|
|
sessionStorage.setItem("registerImageCodeKey", imageCodeKey);
|
|
}
|
|
}
|
|
$.ajax({
|
|
$.ajax({
|
|
- url: 'http://localhost:8082/reserveOvertime/code/' + imageCodeKey,
|
|
|
|
|
|
+ url: that.reqPtah + '/reserveOvertime/code/' + imageCodeKey,
|
|
type: 'post',
|
|
type: 'post',
|
|
dataType: 'json',
|
|
dataType: 'json',
|
|
success: function (data) {
|
|
success: function (data) {
|