单点监控面板完成

This commit is contained in:
2024-06-27 22:39:41 +08:00
parent f76e14a974
commit fa3aca72e1
5 changed files with 53 additions and 76 deletions

View File

@@ -1,14 +1,14 @@
const fse = require("fs-extra")
const dicts = {
品类:[
{label:"西点",value:"104"},
{label:"现烤",value:"108"},
{label:"裱花蛋糕",value:"109"},
// const fse = require("fs-extra")
export const dicts = {
品类: [
{label: "西点", value: "104"},
{label: "现烤", value: "108"},
{label: "裱花蛋糕", value: "109"},
],
类型:[
{label:"同比",value:"1"},
{label:"环比",value:"2"},
{label:"特定日期",value:"3"},
类型: [
{label: "同比", value: "1"},
{label: "环比", value: "2"},
{label: "特定日期", value: "3"},
]
}
fse.outputJSONSync("./dicts.json", dicts)
// fse.outputJSONSync("./dicts.json", dicts)

View File

@@ -20,18 +20,6 @@ const init = () => new Promise(resolve => {
config.headers['h-token'] = $glob.token
return config
}
window.$waitFor = (target, t = 500) => new Promise(resolve => {
const interval = setInterval(() => {
if (target) {
clearInterval(interval)
resolve(target)
}
}, t)
if (target) {
clearInterval(interval)
resolve(target)
}
})
http.interceptors.request.use(async config => {
await $waitFor(!getAuthing)
if (!$glob.token && !getAuthing) {

View File

@@ -1,7 +1,24 @@
import {dicts} from "@/utils/dicts";
import axios from 'axios'
window.axios = axios
const KENGEE_CDN_BASE = "http://10.0.97.209/presource/datascreen/"
const libs = [`${KENGEE_CDN_BASE}/js/pinyin.min.js`]
Promise.all([
window.$glob = {}
window.$dicts = dicts
window.$waitFor = (target, t = 500) => new Promise(resolve => {
const interval = setInterval(() => {
if (target) {
clearInterval(interval)
resolve(target)
}
}, t)
if (target) {
clearInterval(interval)
resolve(target)
}
})
export default Promise.all([
import("./fetch"),
...libs.map(url => new Promise(resolve => {
const script = document.createElement("script")