From ab9f0498e44d35fe821f643112560536bb83dce1 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期二, 12 九月 2023 18:40:28 +0800
Subject: [PATCH] 集成系统-时间转换插件以及时间格式转换

---
 Source/UBCS-WEB/package.json                                      |    1 +
 Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue |    3 ++-
 Source/UBCS-WEB/src/main.js                                       |    3 +++
 3 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/Source/UBCS-WEB/package.json b/Source/UBCS-WEB/package.json
index 7a6cde9..9c10428 100644
--- a/Source/UBCS-WEB/package.json
+++ b/Source/UBCS-WEB/package.json
@@ -23,6 +23,7 @@
     "js-md5": "^0.7.3",
     "js-pinyin": "^0.2.4",
     "mockjs": "^1.0.1-beta3",
+    "moment": "^2.29.4",
     "node-gyp": "^5.0.6",
     "nprogress": "^0.2.0",
     "portfinder": "^1.0.23",
diff --git a/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue b/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue
index a990a32..9fe3956 100644
--- a/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue
+++ b/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue
@@ -122,7 +122,8 @@
       });
     },
     handleSearch(){
-      console.log(this.formInline.Date)
+      let formattedDate = this.$moment(this.formInline.Date).format('YYYY-M-D');
+      console.log('formattedDate',formattedDate);
     }
   }
 }
diff --git a/Source/UBCS-WEB/src/main.js b/Source/UBCS-WEB/src/main.js
index ab379e4..eecd5c0 100644
--- a/Source/UBCS-WEB/src/main.js
+++ b/Source/UBCS-WEB/src/main.js
@@ -78,6 +78,9 @@
 //澶嶅埗鎻掍欢
 import VueClipboard from 'vue-clipboard2'
 Vue.use( VueClipboard )
+//鏃堕棿鎻掍欢
+import moment from 'moment';
+Vue.prototype.$moment = moment;
 // 娉ㄥ唽鍏ㄥ眬瀹瑰櫒
 Vue.component('basicContainer', basicContainer);
 Vue.component('basicBlock', basicBlock);

--
Gitblit v1.9.3