From dc7ef35a8d972bdd853c8324703087ac4b6b9063 Mon Sep 17 00:00:00 2001 From: zhangxiaoxu123 <819527061@qq.com> Date: 星期五, 31 三月 2023 16:52:46 +0800 Subject: [PATCH] 细节修改 --- src/components/page/orderRecord/index.vue | 26 ++++++++++++++++++++++++-- 1 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/components/page/orderRecord/index.vue b/src/components/page/orderRecord/index.vue index 1681d02..666e134 100644 --- a/src/components/page/orderRecord/index.vue +++ b/src/components/page/orderRecord/index.vue @@ -16,11 +16,12 @@ </el-form-item> <el-form-item> <el-button type="primary" size="small" @click="onSearch" icon="el-icon-search">鏌ヨ</el-button> + <el-button type="primary" size="small" @click="onSearch2" icon="el-icon-search">鏌ヨ</el-button> </el-form-item> </el-form> </div> - <el-table :data="table2" border style="width:55%;border:1px solid #bcbec2;"> + <el-table :data="table2" border style="width:55%;border:1px solid #bcbec2;" show-summary> <el-table-column type="index" width="50" label="搴忓彿" align="center"> </el-table-column> <el-table-column prop="parkName" label="鍋滆溅鍦�" align="center" ></el-table-column> <el-table-column prop="orderNum" label="鏈夋晥璁㈠崟鏁�" align="center" ></el-table-column> @@ -53,7 +54,7 @@ } }, mounted() { - this.loadData(); + this.defaultDate(); this.$byutil.postData(this, this.$systemconfig.basePath+'/park/findAll', this.formData, res => { this.table1 = res.data; }) @@ -74,6 +75,27 @@ onSearch() { this.loadData(); }, + onSearch2() { + this.$byutil.postData(this, this.urlPath+'getById/1000', null,res => { + console.log(res.data) + }); + }, + //璁剧疆榛樿鏃ユ湡 + 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> -- Gitblit v1.9.1