From 0d846fafce55573aacba349935c1f10c6dfc638d Mon Sep 17 00:00:00 2001
From: kongdeqiang <123456>
Date: 星期一, 16 一月 2023 14:33:49 +0800
Subject: [PATCH] 修改前端页面

---
 src/components/page/orderRecord/index.vue |   18 +++++++++++++++++-
 src/components/page/whiteList/index.vue   |   20 ++++++++++++++------
 2 files changed, 31 insertions(+), 7 deletions(-)

diff --git a/src/components/page/orderRecord/index.vue b/src/components/page/orderRecord/index.vue
index 3de0df0..94f0034 100644
--- a/src/components/page/orderRecord/index.vue
+++ b/src/components/page/orderRecord/index.vue
@@ -53,7 +53,7 @@
             }
         },
         mounted() {
-            this.loadData();
+            this.defaultDate();
             this.$byutil.postData(this, this.$systemconfig.basePath+'/park/findAll', this.formData, res => {
                 this.table1 = res.data;
             })
@@ -74,6 +74,22 @@
             onSearch() {
                 this.loadData();
             },
+          //璁剧疆榛樿鏃ユ湡
+          defaultDate(){
+            //鑾峰彇鏂扮殑鏃堕棿
+            let date = new Date()
+            //鑾峰彇褰撳墠鏃堕棿鐨勫勾浠借浆涓哄瓧绗︿覆
+            let year = date.getFullYear().toString()
+            //鑾峰彇鏈堜唤锛岀敱浜庢湀浠戒粠0寮�濮嬶紝姝ゅ瑕佸姞1锛屽垽鏂槸鍚﹀皬浜�10锛屽鏋滄槸鍦ㄥ瓧绗︿覆鍓嶉潰鎷兼帴'0'
+            let month = date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1).toString():(date.getMonth()+1).toString()
+            //鑾峰彇澶╋紝鍒ゆ柇鏄惁灏忎簬10锛屽鏋滄槸鍦ㄥ瓧绗︿覆鍓嶉潰鎷兼帴'0'
+            let da = date.getDate() < 10 ? '0'+date.getDate().toString():date.getDate().toString()
+            //瀛楃涓叉嫾鎺ワ紝寮�濮嬫椂闂达紝缁撴潫鏃堕棿
+            let end = year + '-' + month + '-' + da  //褰撳ぉ'2019-04-12'
+            let beg = year + '-' + month + '-' + da    //褰撴湀绗竴澶�'2019-04-01'
+            this.searchForm.date = [beg,end] //灏嗗�艰缃粰鎻掍欢缁戝畾鐨勬暟鎹�
+            this.loadData();
+          },
         }
     }
 </script>
diff --git a/src/components/page/whiteList/index.vue b/src/components/page/whiteList/index.vue
index b108f5e..65aa2d7 100644
--- a/src/components/page/whiteList/index.vue
+++ b/src/components/page/whiteList/index.vue
@@ -50,8 +50,8 @@
                 <el-form-item label="鏈堢エ缁撴潫鏃ユ湡" prop="endTime" v-if="flag2">
                     <el-date-picker placeholder="閫夋嫨鏃堕棿" v-model="formData.endTime"></el-date-picker>
                 </el-form-item>
-                <el-form-item label="鍋滆溅鍦�" prop="parkId" v-if="flag2">
-                    <el-select v-model="formData.parkId">
+                <el-form-item label="鍋滆溅鍦�" prop="parkIds" v-if="flag2">
+                    <el-select v-model="ids" multiple clearable>
                         <el-option v-for="item in table1" :key="item.id" :label="item.name" :value="item.id"></el-option>
                     </el-select>
                 </el-form-item>
@@ -80,8 +80,10 @@
                     type: 0,
                     endTime: '',
                     startTime: '',
-                    parkId:null
+                    parkIds: '',
+                    name: ''
                 },
+                ids:[],
                 urlPath:this.$systemconfig.basePath + '/whiteList/',
                 table1:[],
             }
@@ -103,6 +105,7 @@
             onSave(){
                 this.$refs['formData'].validate((valid) => {
                     if (valid) {
+                      this.formData.parkIds = this.ids.join(",")
                         this.$byutil.postData(this, this.urlPath+'save', this.formData, res => {
                             this.$refs['formData'].resetFields();
                             this.flag=false;
@@ -115,7 +118,7 @@
                 });
             },
             loadData() {
-                this.$byutil.loadPageData(this, this.urlPath+'findPage', this.searchForm);
+                this.$byutil.loadPageData(this, this.urlPath+'findPageNew', this.searchForm);
             },
             onSearch() {
                 this.pageData = this.$byutil.defaultPageData();
@@ -130,14 +133,19 @@
                     type: 0,
                     endTime: '',
                     startTime: '',
-                    parkId:null
+                    parkIds: null
                 }
             },
             onEdit(row) {
                 this.flag=true;
+                this.ids = []
                 this.formData  = row;
                 if(row.type==1){
-                    this.flag2=true;
+                  this.ids = this.formData.parkIds.split(",")
+                  this.ids = this.ids.map(function(data){
+                    return +data;
+                  });
+                  this.flag2=true;
                 }
             },
             onDelete(row) {

--
Gitblit v1.9.1