From 0761d9e95393d7f0301a49613c095db363d79e75 Mon Sep 17 00:00:00 2001
From: yupan <yupanx@163.com>
Date: Thu, 27 Oct 2022 09:50:21 +0800
Subject: [PATCH] 1、新增站点数据页面 2、修改监测因子趋势显示bug 3、修改监测因子趋势和监测因子对比页面的时间控件

---
 src/main.js |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/src/main.js b/src/main.js
index 2457020..01a4bb2 100644
--- a/src/main.js
+++ b/src/main.js
@@ -45,6 +45,7 @@
 
 Vue.prototype.$request = request.service
 Vue.prototype.$axiosRequest = request.reqServe
+// Vue.prototype.$postRequest=request.reqServe1
 /**
  * If you don't want to use mock-server
  * you want to use MockJs for mock api
@@ -71,6 +72,9 @@
 Vue.config.productionTip = false
 Vue.prototype.$axios = axios
 Vue.prototype.$Bus = Bus
+
+import JsonExcel from 'vue-json-excel'
+Vue.component('downloadExcel', JsonExcel)
 
 function getServerConfig() {
   return new Promise((resolve, reject) => {
@@ -101,4 +105,25 @@
   }).$mount('#app')
 }
 
+Vue.prototype.dateTypeFormat = function (fmt, date) {
+  let ret
+  const opt = {
+    'Y+': date.getFullYear().toString(), // ���
+    'm+': (date.getMonth() + 1).toString(), // ���
+    'd+': date.getDate().toString(), // ���
+    'H+': date.getHours().toString(), // ���
+    'M+': date.getMinutes().toString(), // ���
+    'S+': date.getSeconds().toString() // ���
+    // ���������������������������������������������������������������������������
+  }
+  for (const k in opt) {
+    ret = new RegExp('(' + k + ')').exec(fmt)
+    if (ret) {
+      fmt = fmt.replace(ret[1], (ret[1].length === 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, '0')))
+    }
+  }
+  return fmt
+}
+
+
 init()

--
Gitblit v1.8.0