瀏覽代碼

代码上传

zhangqiOMG 2 年之前
父節點
當前提交
519d3365aa

+ 2 - 2
node_modules/.vite/deps/@ant-design_icons-vue.js

@@ -57,10 +57,10 @@ import {
   svgBaseProps,
   useInsertStyles,
   warning
-} from "./chunk-5XDXAD5U.js";
+} from "./chunk-BOZTDRRV.js";
 import {
   createVNode
-} from "./chunk-IDMHQ7FM.js";
+} from "./chunk-3NMN3MUW.js";
 import "./chunk-4EOJPDL2.js";
 
 // node_modules/@ant-design/icons-svg/es/asn/AccountBookFilled.js

文件差異過大導致無法顯示
+ 0 - 0
node_modules/.vite/deps/@ant-design_icons-vue.js.map


+ 27 - 27
node_modules/.vite/deps/_metadata.json

@@ -1,104 +1,104 @@
 {
-  "hash": "18bbf35d",
-  "browserHash": "174209d7",
+  "hash": "4374df86",
+  "browserHash": "ec4c1811",
   "optimized": {
     "@ant-design/icons-vue": {
       "src": "../../@ant-design/icons-vue/es/index.js",
       "file": "@ant-design_icons-vue.js",
-      "fileHash": "5938cea3",
+      "fileHash": "f1f31ea5",
       "needsInterop": false
     },
     "ant-design-vue": {
       "src": "../../ant-design-vue/es/index.js",
       "file": "ant-design-vue.js",
-      "fileHash": "45f9b0ec",
+      "fileHash": "e958e50c",
       "needsInterop": false
     },
     "ant-design-vue/es/locale/zh_CN": {
       "src": "../../ant-design-vue/es/locale/zh_CN.js",
       "file": "ant-design-vue_es_locale_zh_CN.js",
-      "fileHash": "298e1579",
+      "fileHash": "c30f749f",
       "needsInterop": false
     },
     "axios": {
       "src": "../../axios/index.js",
       "file": "axios.js",
-      "fileHash": "eb7df329",
+      "fileHash": "3abc17ec",
       "needsInterop": false
     },
     "dayjs": {
       "src": "../../dayjs/dayjs.min.js",
       "file": "dayjs.js",
-      "fileHash": "e0c0caf7",
+      "fileHash": "b2b743af",
       "needsInterop": true
     },
     "dayjs/locale/zh-cn": {
       "src": "../../dayjs/locale/zh-cn.js",
       "file": "dayjs_locale_zh-cn.js",
-      "fileHash": "f34e927d",
+      "fileHash": "5cd59bb2",
       "needsInterop": true
     },
     "js-md5": {
       "src": "../../js-md5/src/md5.js",
       "file": "js-md5.js",
-      "fileHash": "9d8e97a5",
+      "fileHash": "bd43d209",
       "needsInterop": true
     },
     "less": {
       "src": "../../less/dist/less.js",
       "file": "less.js",
-      "fileHash": "9b1ce05e",
+      "fileHash": "966ee37d",
       "needsInterop": true
     },
     "mathjs": {
       "src": "../../mathjs/lib/esm/index.js",
       "file": "mathjs.js",
-      "fileHash": "2c610573",
+      "fileHash": "156f6ef5",
       "needsInterop": false
     },
     "pinia": {
       "src": "../../pinia/dist/pinia.mjs",
       "file": "pinia.js",
-      "fileHash": "fce44de8",
+      "fileHash": "0eb43ba2",
       "needsInterop": false
     },
     "pinia-plugin-persist": {
       "src": "../../pinia-plugin-persist/dist/pinia-persist.es.js",
       "file": "pinia-plugin-persist.js",
-      "fileHash": "02794d5a",
+      "fileHash": "6a023e4e",
       "needsInterop": false
     },
     "vue": {
       "src": "../../vue/dist/vue.runtime.esm-bundler.js",
       "file": "vue.js",
-      "fileHash": "7ad6386c",
+      "fileHash": "41933eaa",
       "needsInterop": false
     },
     "vue-router": {
       "src": "../../vue-router/dist/vue-router.mjs",
       "file": "vue-router.js",
-      "fileHash": "fe58ddc8",
+      "fileHash": "346bff36",
       "needsInterop": false
     }
   },
   "chunks": {
-    "chunk-TQOCY6B2": {
-      "file": "chunk-TQOCY6B2.js"
+    "chunk-5OBJFL24": {
+      "file": "chunk-5OBJFL24.js"
     },
-    "chunk-VCGGRANA": {
-      "file": "chunk-VCGGRANA.js"
+    "chunk-KBUAZBQ3": {
+      "file": "chunk-KBUAZBQ3.js"
     },
-    "chunk-5XDXAD5U": {
-      "file": "chunk-5XDXAD5U.js"
+    "chunk-BOZTDRRV": {
+      "file": "chunk-BOZTDRRV.js"
     },
-    "chunk-IDMHQ7FM": {
-      "file": "chunk-IDMHQ7FM.js"
+    "chunk-3NMN3MUW": {
+      "file": "chunk-3NMN3MUW.js"
     },
-    "chunk-UVFXKAFZ": {
-      "file": "chunk-UVFXKAFZ.js"
+    "chunk-BCNMYODF": {
+      "file": "chunk-BCNMYODF.js"
     },
-    "chunk-WT3GSKHH": {
-      "file": "chunk-WT3GSKHH.js"
+    "chunk-WNF2IDJY": {
+      "file": "chunk-WNF2IDJY.js"
     },
     "chunk-XMOLR7NX": {
       "file": "chunk-XMOLR7NX.js"

+ 5 - 5
node_modules/.vite/deps/ant-design-vue.js

@@ -1,6 +1,6 @@
 import {
   _extends
-} from "./chunk-VCGGRANA.js";
+} from "./chunk-KBUAZBQ3.js";
 import {
   ArrowLeftOutlined_default,
   ArrowRightOutlined_default,
@@ -57,7 +57,7 @@ import {
   ZoomOutOutlined_default,
   generate,
   presetPrimaryColors
-} from "./chunk-5XDXAD5U.js";
+} from "./chunk-BOZTDRRV.js";
 import {
   Comment,
   Fragment,
@@ -104,16 +104,16 @@ import {
   watchEffect,
   withDirectives,
   withModifiers
-} from "./chunk-IDMHQ7FM.js";
+} from "./chunk-3NMN3MUW.js";
 import {
   _objectSpread2,
   zh_CN_default
-} from "./chunk-UVFXKAFZ.js";
+} from "./chunk-BCNMYODF.js";
 import {
   _defineProperty,
   _toPropertyKey,
   _typeof
-} from "./chunk-WT3GSKHH.js";
+} from "./chunk-WNF2IDJY.js";
 import {
   require_dayjs_min
 } from "./chunk-XMOLR7NX.js";

文件差異過大導致無法顯示
+ 0 - 0
node_modules/.vite/deps/ant-design-vue.js.map


+ 2 - 2
node_modules/.vite/deps/ant-design-vue_es_locale_zh_CN.js

@@ -1,8 +1,8 @@
 import {
   _objectSpread2,
   zh_CN_default
-} from "./chunk-UVFXKAFZ.js";
-import "./chunk-WT3GSKHH.js";
+} from "./chunk-BCNMYODF.js";
+import "./chunk-WNF2IDJY.js";
 import "./chunk-4EOJPDL2.js";
 
 // node_modules/ant-design-vue/es/vc-picker/locale/zh_CN.js

文件差異過大導致無法顯示
+ 0 - 0
node_modules/.vite/deps/ant-design-vue_es_locale_zh_CN.js.map


文件差異過大導致無法顯示
+ 0 - 0
node_modules/.vite/deps/axios.js.map


文件差異過大導致無法顯示
+ 0 - 0
node_modules/.vite/deps/js-md5.js.map


+ 2 - 2
node_modules/.vite/deps/mathjs.js

@@ -1,9 +1,9 @@
 import {
   _extends
-} from "./chunk-VCGGRANA.js";
+} from "./chunk-KBUAZBQ3.js";
 import {
   _defineProperty
-} from "./chunk-WT3GSKHH.js";
+} from "./chunk-WNF2IDJY.js";
 import {
   __commonJS,
   __export,

文件差異過大導致無法顯示
+ 0 - 0
node_modules/.vite/deps/mathjs.js.map


+ 1 - 1
node_modules/.vite/deps/pinia-plugin-persist.js.map

@@ -1,7 +1,7 @@
 {
   "version": 3,
   "sources": ["../../pinia-plugin-persist/dist/pinia-persist.es.js"],
-  "sourcesContent": ["const updateStorage = (strategy, store) => {\r\n  const storage = strategy.storage || sessionStorage;\r\n  const storeKey = strategy.key || store.$id;\r\n  if (strategy.paths) {\r\n    const partialState = strategy.paths.reduce((finalObj, key) => {\r\n      finalObj[key] = store.$state[key];\r\n      return finalObj;\r\n    }, {});\r\n    storage.setItem(storeKey, JSON.stringify(partialState));\r\n  } else {\r\n    storage.setItem(storeKey, JSON.stringify(store.$state));\r\n  }\r\n};\r\nvar index = ({ options, store }) => {\r\n  var _a, _b, _c, _d;\r\n  if ((_a = options.persist) == null ? void 0 : _a.enabled) {\r\n    const defaultStrat = [{\r\n      key: store.$id,\r\n      storage: sessionStorage\r\n    }];\r\n    const strategies = ((_c = (_b = options.persist) == null ? void 0 : _b.strategies) == null ? void 0 : _c.length) ? (_d = options.persist) == null ? void 0 : _d.strategies : defaultStrat;\r\n    strategies.forEach((strategy) => {\r\n      const storage = strategy.storage || sessionStorage;\r\n      const storeKey = strategy.key || store.$id;\r\n      const storageResult = storage.getItem(storeKey);\r\n      if (storageResult) {\r\n        store.$patch(JSON.parse(storageResult));\r\n        updateStorage(strategy, store);\r\n      }\r\n    });\r\n    store.$subscribe(() => {\r\n      strategies.forEach((strategy) => {\r\n        updateStorage(strategy, store);\r\n      });\r\n    });\r\n  }\r\n};\r\nexport { index as default, updateStorage };\r\n"],
+  "sourcesContent": ["const updateStorage = (strategy, store) => {\n  const storage = strategy.storage || sessionStorage;\n  const storeKey = strategy.key || store.$id;\n  if (strategy.paths) {\n    const partialState = strategy.paths.reduce((finalObj, key) => {\n      finalObj[key] = store.$state[key];\n      return finalObj;\n    }, {});\n    storage.setItem(storeKey, JSON.stringify(partialState));\n  } else {\n    storage.setItem(storeKey, JSON.stringify(store.$state));\n  }\n};\nvar index = ({ options, store }) => {\n  var _a, _b, _c, _d;\n  if ((_a = options.persist) == null ? void 0 : _a.enabled) {\n    const defaultStrat = [{\n      key: store.$id,\n      storage: sessionStorage\n    }];\n    const strategies = ((_c = (_b = options.persist) == null ? void 0 : _b.strategies) == null ? void 0 : _c.length) ? (_d = options.persist) == null ? void 0 : _d.strategies : defaultStrat;\n    strategies.forEach((strategy) => {\n      const storage = strategy.storage || sessionStorage;\n      const storeKey = strategy.key || store.$id;\n      const storageResult = storage.getItem(storeKey);\n      if (storageResult) {\n        store.$patch(JSON.parse(storageResult));\n        updateStorage(strategy, store);\n      }\n    });\n    store.$subscribe(() => {\n      strategies.forEach((strategy) => {\n        updateStorage(strategy, store);\n      });\n    });\n  }\n};\nexport { index as default, updateStorage };\n"],
   "mappings": ";;;AAAA,IAAM,gBAAgB,CAAC,UAAU,UAAU;AACzC,QAAM,UAAU,SAAS,WAAW;AACpC,QAAM,WAAW,SAAS,OAAO,MAAM;AACvC,MAAI,SAAS,OAAO;AAClB,UAAM,eAAe,SAAS,MAAM,OAAO,CAAC,UAAU,QAAQ;AAC5D,eAAS,GAAG,IAAI,MAAM,OAAO,GAAG;AAChC,aAAO;AAAA,IACT,GAAG,CAAC,CAAC;AACL,YAAQ,QAAQ,UAAU,KAAK,UAAU,YAAY,CAAC;AAAA,EACxD,OAAO;AACL,YAAQ,QAAQ,UAAU,KAAK,UAAU,MAAM,MAAM,CAAC;AAAA,EACxD;AACF;AACA,IAAI,QAAQ,CAAC,EAAE,SAAS,MAAM,MAAM;AAClC,MAAI,IAAI,IAAI,IAAI;AAChB,OAAK,KAAK,QAAQ,YAAY,OAAO,SAAS,GAAG,SAAS;AACxD,UAAM,eAAe,CAAC;AAAA,MACpB,KAAK,MAAM;AAAA,MACX,SAAS;AAAA,IACX,CAAC;AACD,UAAM,eAAe,MAAM,KAAK,QAAQ,YAAY,OAAO,SAAS,GAAG,eAAe,OAAO,SAAS,GAAG,WAAW,KAAK,QAAQ,YAAY,OAAO,SAAS,GAAG,aAAa;AAC7K,eAAW,QAAQ,CAAC,aAAa;AAC/B,YAAM,UAAU,SAAS,WAAW;AACpC,YAAM,WAAW,SAAS,OAAO,MAAM;AACvC,YAAM,gBAAgB,QAAQ,QAAQ,QAAQ;AAC9C,UAAI,eAAe;AACjB,cAAM,OAAO,KAAK,MAAM,aAAa,CAAC;AACtC,sBAAc,UAAU,KAAK;AAAA,MAC/B;AAAA,IACF,CAAC;AACD,UAAM,WAAW,MAAM;AACrB,iBAAW,QAAQ,CAAC,aAAa;AAC/B,sBAAc,UAAU,KAAK;AAAA,MAC/B,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AACF;",
   "names": []
 }

+ 2 - 2
node_modules/.vite/deps/pinia.js

@@ -1,6 +1,6 @@
 import {
   setupDevtoolsPlugin
-} from "./chunk-TQOCY6B2.js";
+} from "./chunk-5OBJFL24.js";
 import {
   computed,
   effectScope,
@@ -19,7 +19,7 @@ import {
   toRefs,
   unref,
   watch
-} from "./chunk-IDMHQ7FM.js";
+} from "./chunk-3NMN3MUW.js";
 import "./chunk-4EOJPDL2.js";
 
 // node_modules/pinia/node_modules/vue-demi/lib/index.mjs

+ 2 - 2
node_modules/.vite/deps/vue-router.js

@@ -1,6 +1,6 @@
 import {
   setupDevtoolsPlugin
-} from "./chunk-TQOCY6B2.js";
+} from "./chunk-5OBJFL24.js";
 import {
   computed,
   defineComponent,
@@ -18,7 +18,7 @@ import {
   unref,
   watch,
   watchEffect
-} from "./chunk-IDMHQ7FM.js";
+} from "./chunk-3NMN3MUW.js";
 import "./chunk-4EOJPDL2.js";
 
 // node_modules/vue-router/dist/vue-router.mjs

+ 1 - 1
node_modules/.vite/deps/vue.js

@@ -145,7 +145,7 @@ import {
   withMemo,
   withModifiers,
   withScopeId
-} from "./chunk-IDMHQ7FM.js";
+} from "./chunk-3NMN3MUW.js";
 import "./chunk-4EOJPDL2.js";
 export {
   BaseTransition,

+ 4 - 1
src/api/api.js

@@ -1,5 +1,5 @@
 import http from './http'
-
+import axios from 'axios'
 /**
  *  @parms resquest 请求地址 例如:http://197.82.15.15:8088/request/...
  *  @param '/testIp'代表vue-cil中config,index.js中配置的代理
@@ -30,6 +30,9 @@ export default {
     delete (params) {
         return http.post(`${resquest}/waserver/rest/index`, params,'get')
     },
+    weather (params) {
+        return http.get(`${resquest}/waserver/rest/index/getforward?url=http://www.nmc.cn/rest/position`)
+    },
     optionstype (name) {
         return http.post(`${resquest}/waserver/rest/index`, {
             "classname": "sysmanage.develop.optiontype.optiontype",

+ 5 - 3
src/api/request.js

@@ -54,12 +54,14 @@ const service = axios.create({
 // 2.请求拦截器
 service.interceptors.request.use(config => {
     methods = config.type
-   
     const token = sessionStorage.getItem('token')?sessionStorage.getItem('token'):''
     const appid = sessionStorage.getItem('app')?JSON.parse(sessionStorage.getItem('app')).systemappid:''
     //发请求前做的一些处理,数据转化,配置请求头,设置token,设置loading等,根据需求去添加
-    config.data['accesstoken'] = token
-    config.data['systemappid'] = appid
+    if (config.data) {
+        config.data['accesstoken'] = token
+        config.data['systemappid'] = appid
+    }
+   
     
     config.data = JSON.stringify(config.data); //数据转化,也可以使用qs转换
     if (!config.headers) {

+ 7 - 1
src/components/layout/modules/header.vue

@@ -1,6 +1,11 @@
 <template>
   <div class="sw-header">
-    <img height="30" src="@/assets/logo_slices/logo@2x.png" alt="">
+    <a-space>
+      <div style="width:216px">
+        <img height="30" src="@/assets/logo_slices/logo@2x.png" alt="">
+      </div>
+      <weather/>
+    </a-space>
     <div>
       <a-space>
         <QuestionCircleOutlined :style="{marginRight:'16px',color:'#fff',fontSize:'16px',cursor: 'pointer'}"/>
@@ -38,6 +43,7 @@ import { useAuthStore } from '@/stores/modules/auth'
 import { useRouteTabsStore } from '@/stores/modules/Htabs'
 import { storeToRefs } from 'pinia'
 import { Modal } from 'ant-design-vue';
+import weather from '@/components/weather/index.vue'
 import { useRouter } from "vue-router";
 const router = useRouter()
 import Api from '@/api/api'

+ 60 - 0
src/components/weather/index.vue

@@ -0,0 +1,60 @@
+<template>
+  <div class="weather-panel" v-if="hide">
+    <a-space>
+      <div>
+        {{position.province}}&nbsp;·&nbsp;{{position.city}}
+      </div>
+      <a-divider type="vertical" style="border-color: #1761A2"/>
+      <div>
+        <div>
+          <span class="tag white">今天</span>&nbsp;
+          <small>{{weatherData.publish_time.split(' ')[0]}}</small>
+        </div>
+        <div>
+          <span class="tag">{{weatherData.weather.info}}</span>&nbsp;
+          <span>{{weatherData.weather.temperature}}℃</span>
+        </div>
+      </div>
+    </a-space>
+  </div>
+</template>
+
+<script setup>
+import Api from '@/api/api'
+import {ref,onMounted} from 'vue'
+
+const position = ref({})
+const getPosition = async ()=>{
+  const res = await Api.weather()
+  position.value = res
+  getWeather(res.code)
+}
+const weatherData = ref({})
+const hide = ref(false)
+const getWeather = async (code)=>{
+  const res = await Api.requested({
+    "id": 20230608120901,
+    "content": {
+      "citycode": code
+    }
+  })
+  weatherData.value = res.data.real
+  hide.value = true
+}
+onMounted(()=>{
+  getPosition()
+})
+</script>
+<style scoped>
+.weather-panel{
+  color:#fff;
+  font-size: 12px;
+}
+.tag{
+  padding: 2px 4px;
+  border-radius:2px;
+}
+.white{
+  background: rgba(255, 255, 255, .2);
+}
+</style>

部分文件因文件數量過多而無法顯示