Browse Source

表单请求调整

FinalYu 7 months ago
parent
commit
db664bbaf9

+ 12 - 6
nngkxxdp/src/main/resources/static/naxsb/wybdb.html

@@ -153,7 +153,7 @@
         }
         }
 
 
         .el-dialog__body {
         .el-dialog__body {
-            height: 60vh;
+            height: 65vh;
             overflow: scroll;
             overflow: scroll;
             /* 你想要的高度 */
             /* 你想要的高度 */
         }
         }
@@ -167,6 +167,9 @@
             min-width: 90px;
             min-width: 90px;
             margin-left: 10px;
             margin-left: 10px;
         }
         }
+        .el-dialog {
+            margin-top: 10vh!important;
+        }
 
 
         .subButton {
         .subButton {
             display: flex;
             display: flex;
@@ -241,7 +244,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" style="width: 36%;" placeholder="请输入验证码"></el-input>
                         <el-input v-model="form.imgCode" style="width: 36%;" 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">
@@ -384,6 +387,7 @@
         data: function () {
         data: function () {
             return {
             return {
                 dialogVisible: false,
                 dialogVisible: false,
+                reqPtah: 'http://172.16.99.105:8082',
                 form: {
                 form: {
                     unitName: '',
                     unitName: '',
                     projectCoding: '',
                     projectCoding: '',
@@ -458,6 +462,7 @@
                 if (!validateSinglePhone('chargePhone', '负责人')) {
                 if (!validateSinglePhone('chargePhone', '负责人')) {
                     return
                     return
                 }
                 }
+                return true;
             },
             },
 
 
             submitForm(formName) {
             submitForm(formName) {
@@ -470,17 +475,18 @@
                         this.form.imgKey = sessionStorage.getItem("registerImageCodeKey");
                         this.form.imgKey = sessionStorage.getItem("registerImageCodeKey");
                         let formData = this.form; // 获取表单数据
                         let formData = this.form; // 获取表单数据
                         $.ajax({
                         $.ajax({
-                            url: 'http://localhost:8082/proxyDemand',
+                            url: this.reqPtah + '/proxyDemand',
                             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),
                             }.bind(this),
                             error: function (error) {
                             error: function (error) {
@@ -515,7 +521,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) {

+ 10 - 8
nngkxxdp/src/main/resources/static/naxsb/wyyy.html

@@ -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) {

+ 14 - 8
nngkxxdp/src/main/resources/static/naxsb/zwfwtyy.html

@@ -92,8 +92,8 @@
         }
         }
 
 
         .el-dialog__body {
         .el-dialog__body {
-            height: 60vh;
-            overflow: scroll;
+            height: 65vh;
+            /*overflow: auto;*/
             /* 你想要的高度 */
             /* 你想要的高度 */
         }
         }
 
 
@@ -102,6 +102,10 @@
             height: 0px;
             height: 0px;
         }
         }
 
 
+        .el-dialog {
+            margin-top: 10vh!important;
+        }
+
         .el-image {
         .el-image {
             min-width: 90px;
             min-width: 90px;
             margin-left: 10px;
             margin-left: 10px;
@@ -138,7 +142,7 @@
         </div>
         </div>
         <div class="topButton" style="background-image: url(images/button-ljbm.png);width: 586px;"
         <div class="topButton" style="background-image: url(images/button-ljbm.png);width: 586px;"
             @click="dialogVisible = true">立即报名</div>
             @click="dialogVisible = true">立即报名</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">
@@ -164,7 +168,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">
@@ -190,6 +194,7 @@
         data: function () {
         data: function () {
             return {
             return {
                 dialogVisible: false,
                 dialogVisible: false,
+                reqPtah: 'http://172.16.99.105:8082',
                 form: {
                 form: {
                     experienceName: '',
                     experienceName: '',
                     experienceAge: '',
                     experienceAge: '',
@@ -247,17 +252,18 @@
                         const formData = this.form;
                         const formData = this.form;
                         // AJAX 请求
                         // AJAX 请求
                         $.ajax({
                         $.ajax({
-                            url: 'http://localhost:8082/experienceApply',
+                            url: this.reqPtah + '/experienceApply',
                             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 (data) {
                             error: function (data) {
@@ -291,7 +297,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) {