Merge branch 'main' into ff0000

This commit is contained in:
zhbaor 2024-09-08 08:54:27 +08:00
commit 0ad4e179b2
49 changed files with 266 additions and 340 deletions

View file

@ -1,16 +1,13 @@
import platform
import sys
from pathlib import Path
__version__ = "ng"
if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS"):
__rootdir__ = Path(sys._MEIPASS).joinpath("arknights_mower").resolve()
else:
__rootdir__ = Path(__file__).parent.resolve()
from arknights_mower.utils.git_rev import revision_info
__rootdir__ = Path(__file__).parent.resolve()
__version__ += "+" + revision_info()[:7]
from arknights_mower.utils.git_rev import revision_info
__version__ += "+" + revision_info()[:7]
__system__ = platform.system().lower()

View file

@ -330,9 +330,7 @@ def simulate():
if config.conf.RA:
config.recog.update()
base_scheduler.back_to_index()
ra_solver = ReclamationAlgorithm(
config.device, config.recog
)
ra_solver = ReclamationAlgorithm()
ra_solver.run(base_scheduler.tasks[0].time - datetime.now())
remaining_time = (
base_scheduler.tasks[0].time - datetime.now()
@ -340,7 +338,7 @@ def simulate():
elif config.conf.SF:
config.recog.update()
base_scheduler.back_to_index()
sf_solver = SecretFront(config.device, config.recog)
sf_solver = SecretFront()
sf_solver.run(base_scheduler.tasks[0].time - datetime.now())
remaining_time = (
base_scheduler.tasks[0].time - datetime.now()

View file

@ -23,8 +23,7 @@ class BaseMixin:
name_list = ["工作状态", "技能", "心情", "信赖值"]
x_list = (1196, 1320, 1445, 1572)
y = 70
hsv = cv2.cvtColor(config.recog.img, cv2.COLOR_RGB2HSV)
mask = cv2.inRange(hsv, (99, 200, 0), (100, 255, 255))
mask = cv2.inRange(config.recog.hsv, (99, 200, 0), (100, 255, 255))
for idx, x in enumerate(x_list):
if np.count_nonzero(mask[y : y + 3, x : x + 5]):
return (name_list[idx], True)

View file

@ -1845,7 +1845,7 @@ class BaseSchedulerSolver(SceneGraphSolver, BaseMixin):
if is_orange(self.get_color(main_dots[i])):
clue_status[i] = "available"
elif clue_cls(i):
hsv = cv2.cvtColor(config.recog.img, cv2.COLOR_RGB2HSV)
hsv = config.recog.hsv
if 160 < hsv[main_time[i][1]][main_time[i][0]][0] < 180:
clue_status[i] = "friend"
else:
@ -1941,8 +1941,7 @@ class BaseSchedulerSolver(SceneGraphSolver, BaseMixin):
if name:
name = name.strip()
time_scope = (va(cp, (45, 222)), va(cp, (168, 255)))
time_hsv = cropimg(config.recog.img, time_scope)
time_hsv = cv2.cvtColor(time_hsv, cv2.COLOR_RGB2HSV)
time_hsv = cropimg(config.recog.hsv, time_scope)
if 165 < time_hsv[0][0][0] < 175:
time_img = thres2(
cropimg(config.recog.gray, time_scope), 180

View file

@ -37,8 +37,7 @@ class CreditSolver(SceneGraphSolver):
elif scene == Scene.FRIEND_VISITING:
if clue_next := self.find("clue_next"):
x, y = self.get_pos(clue_next, x_rate=0.5, y_rate=0.85)
hsv = cv2.cvtColor(config.recog.img, cv2.COLOR_RGB2HSV)
if abs(hsv[y][x][0] - 12) < 3:
if abs(config.recog.hsv[y][x][0] - 12) < 3:
self.wait_times = 5
self.tap(clue_next)
else:

View file

@ -40,10 +40,9 @@ class CreditFight(SceneGraphSolver):
def current_squad(self):
count = []
for i in range(4):
img = cropimg(
config.recog.img, ((153 + i * 411, 990), (550 + i * 411, (1080)))
hsv = cropimg(
config.recog.hsv, ((153 + i * 411, 990), (550 + i * 411, (1080)))
)
hsv = cv2.cvtColor(img, cv2.COLOR_RGB2HSV)
mask = cv2.inRange(hsv, (97, 0, 0), (101, 255, 255))
count.append(cv2.countNonZero(mask))
return count.index(max(count)) + 1

View file

@ -63,7 +63,10 @@ class ActivityNavigation(SceneGraphSolver):
elif scene == Scene.ACTIVITY_CHOOSE_LEVEL:
current_level = self.current_level()
target_level = int(self.name[-1])
if current_level < target_level:
if current_level is None:
self.sleep()
elif current_level < target_level:
self.tap((1840, 563))
elif current_level > target_level:
self.tap((78, 562))

View file

@ -139,8 +139,7 @@ class SecretFront(SceneGraphSolver):
name = list(self.target)[score.index(min(score))]
x, y = va(pos, (350, 460))
hsv = cv2.cvtColor(config.recog.img, cv2.COLOR_RGB2HSV)
hue = hsv[y][x][0]
hue = config.recog.hsv[y][x][0]
logger.debug(f"{name=} {hue=}")
return name, hue > 18

View file

@ -4,8 +4,8 @@ from arknights_mower.utils import path
from arknights_mower.utils.image import res2path
from arknights_mower.utils.path import get_path
internal_dir = get_path("@internal")
install_dir = get_path("@internal")
internal_dir = get_path("@install")
install_dir = get_path("@install")
class TestLogicExpression(unittest.TestCase):

View file

@ -4,6 +4,7 @@ from functools import partial
import cv2
from arknights_mower.models import avatar, portrait
from arknights_mower.utils import config
from arknights_mower.utils import typealias as tp
from arknights_mower.utils.image import cropimg, thres2
from arknights_mower.utils.log import logger
@ -104,7 +105,7 @@ def match_operator(
match = partial(flann.knnMatch, trainDescriptors=des, k=2)
with ThreadPoolExecutor() as executor:
with ThreadPoolExecutor(max_workers=config.conf.max_workers) as executor:
result = executor.map(match, d_list)
for i, img_list in model.items():

View file

@ -107,6 +107,8 @@ class ExtraPart(ConfModel):
"截图保留时长(小时)"
waiting_scene_v2: WaitingSceneConf
"等待时间"
max_workers: int = 4
"头像、半身像识别线程数"
class LongTaskPart(ConfModel):

View file

@ -229,7 +229,6 @@ class Device:
img = bytes2img(r.content)
if config.conf.droidcast.rotate:
img = cv2.rotate(img, cv2.ROTATE_180)
gray = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)
break
except Exception as e:
logger.exception(e)
@ -259,7 +258,6 @@ class Device:
if config.conf.touch_method == "scrcpy":
self.control.scrcpy = Scrcpy(self.client)
img = bytes2img(data)
gray = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)
else:
command = "screencap 2>/dev/null | gzip -1"
while True:
@ -278,7 +276,6 @@ class Device:
1080, 1920, 4
)
img = cv2.cvtColor(array, cv2.COLOR_RGBA2RGB)
gray = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)
screencap = img2bytes(img)
save_screenshot(screencap)
@ -298,7 +295,7 @@ class Device:
else:
config.screenshot_count += 1
return screencap, img, gray
return img
def current_focus(self) -> str:
"""detect current focus app"""

View file

@ -14,7 +14,7 @@ from arknights_mower.utils.image import img2bytes
from arknights_mower.utils.log import logger
from arknights_mower.utils.path import get_path
template_dir = get_path("@internal/arknights_mower/templates")
template_dir = get_path("@install/arknights_mower/templates")
env = Environment(loader=FileSystemLoader(template_dir), autoescape=select_autoescape())
task_template = env.get_template("task.html")

View file

@ -33,7 +33,7 @@ def img2bytes(img: tp.Image) -> bytes:
def res2path(res: tp.Res) -> Path:
if not res.startswith("@"):
res = f"@internal/arknights_mower/resources/{res}"
res = f"@install/arknights_mower/resources/{res}"
if not res.endswith(".jpg"):
res += ".png"
return get_path(res)

View file

@ -1,76 +1,24 @@
import os
import sys
from pathlib import Path
appname = "arknights_mower"
appauthor = "ArkMower"
# global_space多开时global_space为多开数据目录
global_space = None
# install_dir源码目录
def find_git_root(directory: Path) -> Path:
if (directory / ".git").is_dir():
return directory
elif directory == directory.parent:
return None
else:
return find_git_root(directory.parent)
_install_dir = Path(os.getcwd()).resolve()
# define _app_dir
if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS"):
_internal_dir = Path(sys._MEIPASS).resolve()
_install_dir = _internal_dir.parent.resolve()
_app_dir = _internal_dir.parent
else:
_app_dir = find_git_root(Path(os.getcwd()).resolve())
if not _app_dir:
_app_dir = Path(os.getcwd()).resolve()
_internal_dir = _app_dir
_install_dir = _internal_dir
_hot_update_dir = _install_dir / "tmp" / "hot_update"
def _get_path(base_path, path, space) -> Path:
if space:
return Path(base_path) / space / path
else:
return Path(base_path) / path
def get_app_path(path, space=None) -> Path:
global global_space
if space is None: # 不用 not space 是因为 not '' == True
space = global_space
return _get_path(_app_dir, path, space)
def get_internal_path(path) -> Path:
return _get_path(_internal_dir, path, None)
def get_install_path(path) -> Path:
return _get_path(_install_dir, path, None)
def get_hot_update_path(path) -> Path:
return _get_path(_hot_update_dir, path, None)
def get_path(path: str, space=None) -> Path:
def get_path(path: str) -> Path:
"""
使用 '@xxx/' 来表示一些特别的目录
@app: mower数据文件夹, 例如 get_path('@app/logs/runtime.log')
@internal: mower内部文件夹, 在开发时为 .git 所在目录, 打包时为 @app/_internal
@install: mower 安装文件夹在开发时与 @internal 相同打包时为 mower 的安装目录
@hot: 热更新文件夹@install/tmp/hot_update
指定space来区分配置文件空间如space为None(默认值)则使用global_space
特别的如果要覆盖global_space并指定默认目录使用space=''
@app: 多开数据目录, 例如 get_path('@app/log/runtime.log')
@install: 源码目录
"""
global global_space
if space is None:
space = global_space
path = path.replace("\\", "/")
if isinstance(path, str) and path.startswith("@"):
@ -79,13 +27,13 @@ def get_path(path: str, space=None) -> Path:
special_dir_name = path[1:index]
relative_path = path[index:].strip("/")
if special_dir_name == "app":
return get_app_path(relative_path, space)
elif special_dir_name == "internal":
return get_internal_path(relative_path)
return (
Path(_install_dir) / relative_path
if global_space is None
else Path(global_space) / relative_path
)
elif special_dir_name == "install":
return get_install_path(relative_path)
elif special_dir_name == "hot":
return get_hot_update_path(relative_path)
return Path(_install_dir) / relative_path
else:
raise ValueError(
"{}: {} 不是一个有效的特殊目录别名".format(path, special_dir_name)
@ -93,18 +41,3 @@ def get_path(path: str, space=None) -> Path:
else:
return Path(path)
# raise ValueError("{} 路径必须以 '@xxx' 开头".format(path))
class SpecialDir:
def __init__(self, method):
self.method = method
def __truediv__(self, path) -> Path:
return self.method(path, None)
def __str__(self):
return str(self.method("", None))
app_dir = SpecialDir(get_app_path)
internal_dir = SpecialDir(get_internal_path)

View file

@ -9,9 +9,8 @@ from arknights_mower import __rootdir__ as __rootdir__
from arknights_mower.utils import config
from arknights_mower.utils import typealias as tp
from arknights_mower.utils.csleep import MowerExit
from arknights_mower.utils.deprecated import deprecated
from arknights_mower.utils.image import bytes2img, cmatch, cropimg, loadres, thres2
from arknights_mower.utils.log import logger, save_screenshot
from arknights_mower.utils.log import logger
from arknights_mower.utils.matcher import Matcher
from arknights_mower.utils.scene import Scene, SceneComment
from arknights_mower.utils.vector import va
@ -33,18 +32,12 @@ class Recognizer:
self.LOADING_TIME_LIMIT = 5
def clear(self):
self._screencap = None
self._img = None
self._gray = None
self._hsv = None
self._matcher = None
self.scene = Scene.UNDEFINED
@property
def screencap(self):
if self._screencap is None:
self.start()
return self._screencap
@property
def img(self):
if self._img is None:
@ -54,9 +47,15 @@ class Recognizer:
@property
def gray(self):
if self._gray is None:
self.start()
self._gray = cv2.cvtColor(self.img, cv2.COLOR_RGB2GRAY)
return self._gray
@property
def hsv(self):
if self._hsv is None:
self._hsv = cv2.cvtColor(self.img, cv2.COLOR_RGB2HSV)
return self._hsv
@property
def matcher(self):
if self._matcher is None:
@ -69,11 +68,9 @@ class Recognizer:
while retry_times > 0:
try:
if screencap is not None:
self._screencap = screencap
self._img = bytes2img(screencap)
self._gray = bytes2img(screencap, True)
else:
self._screencap, self._img, self._gray = config.device.screencap()
self._img = config.device.screencap()
return
except cv2.error as e:
logger.warning(e)
@ -91,11 +88,6 @@ class Recognizer:
"""get the color of the pixel"""
return self.img[y][x]
@deprecated
def save_screencap(self, folder):
del folder # 兼容2024.05旧版接口
save_screenshot(self.screencap)
def detect_index_scene(self) -> bool:
res = loadres("index_nav", True)
h, w = res.shape
@ -185,8 +177,7 @@ class Recognizer:
elif self.find("recruiting_instructions"):
self.scene = Scene.RECRUIT_TAGS
elif self.find("credit_shop_countdown"):
hsv = cv2.cvtColor(self.img, cv2.COLOR_RGB2HSV)
if 9 < hsv[870][1530][0] < 19:
if 9 < config.recog.hsv[870][1530][0] < 19:
self.scene = Scene.UNKNOWN
else:
self.scene = Scene.SHOP_CREDIT

View file

@ -46,9 +46,13 @@ class Api:
def start(self, idx):
import sys
from pathlib import Path
from subprocess import Popen
Popen([sys.executable, "webview_ui.py", self.instances[idx]["path"]])
Popen(
[sys.executable, "webview_ui.py", self.instances[idx]["path"]],
cwd=Path(__file__).parent,
)
def jump_to_index(window):

View file

@ -1,3 +1,6 @@
# 各种自动生成的json
src/pages/basement_skill/*.json
src/pages/stage_data/event_data.json
src/pages/stage_data/event_data.json
# dist
dist/

View file

@ -1 +1 @@
.link-container[data-v-4abe2846]{width:100%;padding:6px 12px 0;box-sizing:border-box}
.link-container[data-v-434bc35b]{width:100%;padding:6px 12px 0;box-sizing:border-box}

View file

@ -1 +1 @@
import{br as a,bs as r,bC as n,bx as t,k as o,bv as c,bu as i,F as _,bF as l,bG as p}from"./_plugin-vue_export-helper.js";import{_ as d}from"./a.js";import"./main.js";const h={},m=e=>(l("data-v-4abe2846"),e=e(),p(),e),b={class:"link-container"},u=m(()=>t("iframe",{src:"/docs/index.html",sandbox:"allow-popups allow-scripts allow-same-origin allow-forms",style:{width:"100%",height:"100vh",border:"none"}},null,-1));function f(e,w){const s=d;return r(),n(_,null,[t("div",b,[o(" 在线文档地址: "),c(s,{href:"https://arkmowers.github.io/arknights-mower/",target:"_blank"},{default:i(()=>[o(" https://arkmowers.github.io/arknights-mower/ ")]),_:1})]),u],64)}const v=a(h,[["render",f],["__scopeId","data-v-4abe2846"]]);export{v as default};
import{br as a,bs as r,bC as c,bx as t,k as e,bv as n,bu as i,F as _,bF as l,bG as p}from"./_plugin-vue_export-helper.js";import{_ as d}from"./a.js";import"./main.js";const h={},m=o=>(l("data-v-434bc35b"),o=o(),p(),o),b={class:"link-container"},u=m(()=>t("iframe",{src:"/docs/index.html",sandbox:"allow-popups allow-scripts allow-same-origin allow-forms",style:{width:"100%",height:"100vh",border:"none"}},null,-1));function f(o,w){const s=d;return r(),c(_,null,[t("div",b,[e(" 在线文档地址: "),n(s,{href:"https://arkmowers.github.io/arknights-mower/",target:"_blank"},{default:i(()=>[e(" https://arkmowers.github.io/arknights-mower/ ")]),_:1})]),u],64)}const v=a(h,[["render",f],["__scopeId","data-v-434bc35b"]]);export{v as default};

View file

@ -1 +1 @@
.button_row[data-v-0b959ed7]{margin-top:8px}.task_row[data-v-0b959ed7]{display:flex;align-items:center;gap:8px;width:100%}.task_row .n-input[data-v-0b959ed7]{width:140px}.outer[data-v-0b959ed7]{display:flex;flex-direction:row;align-items:center;gap:18px}.inner[data-v-0b959ed7]{display:flex;flex-direction:column;gap:8px}.task-col[data-v-0b959ed7]{display:flex;flex-direction:row;gap:8px;align-items:center}.n-dynamic-tags[data-v-0b959ed7]{align-items:center}.ml[data-v-0b959ed7]{margin-left:16px}.dropdown[data-v-751873a1]{padding-left:var(--3750a4ee);padding-right:var(--3750a4ee)}
.button_row[data-v-fa1cd4c9]{margin-top:8px}.task_row[data-v-fa1cd4c9]{display:flex;align-items:center;gap:8px;width:100%}.task_row .n-input[data-v-fa1cd4c9]{width:140px}.outer[data-v-fa1cd4c9]{display:flex;flex-direction:row;align-items:center;gap:18px}.inner[data-v-fa1cd4c9]{display:flex;flex-direction:column;gap:8px}.task-col[data-v-fa1cd4c9]{display:flex;flex-direction:row;gap:8px;align-items:center}.n-dynamic-tags[data-v-fa1cd4c9]{align-items:center}.ml[data-v-fa1cd4c9]{margin-left:16px}.dropdown[data-v-3256832f]{padding-left:var(--5fec12ab);padding-right:var(--5fec12ab)}

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
.help[data-v-a623cdce]{z-index:100}
.help[data-v-5868d4d1]{z-index:100}

View file

@ -1 +1 @@
import{br as _,bs as a,bt as i,bu as t,bv as n,K as l,aX as p,b3 as d,bF as u,bG as m,bx as e}from"./_plugin-vue_export-helper.js";import{N as f}from"./main.js";const w={},g=o=>(u("data-v-a623cdce"),o=o(),m(),o),h=g(()=>e("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},[e("path",{d:"M160 164s1.44-33 33.54-59.46C212.6 88.83 235.49 84.28 256 84c18.73-.23 35.47 2.94 45.48 7.82C318.59 100.2 352 120.6 352 164c0 45.67-29.18 66.37-62.35 89.18S248 298.36 248 324",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"40"}),e("circle",{cx:"248",cy:"399.99",r:"32",fill:"currentColor"})],-1));function b(o,x){const c=p,s=d,r=f;return a(),i(r,{trigger:"hover"},{trigger:t(()=>[n(s,{tertiary:"",circle:"",class:"help",size:"tiny"},{icon:t(()=>[n(c,null,{default:t(()=>[h]),_:1})]),_:1})]),default:t(()=>[l(o.$slots,"default",{},void 0,!0)]),_:3})}const C=_(w,[["render",b],["__scopeId","data-v-a623cdce"]]);export{C as _};
import{br as _,bs as a,bt as i,bu as t,bv as n,K as l,aX as p,b3 as d,bF as u,bG as m,bx as e}from"./_plugin-vue_export-helper.js";import{N as f}from"./main.js";const w={},g=o=>(u("data-v-5868d4d1"),o=o(),m(),o),h=g(()=>e("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},[e("path",{d:"M160 164s1.44-33 33.54-59.46C212.6 88.83 235.49 84.28 256 84c18.73-.23 35.47 2.94 45.48 7.82C318.59 100.2 352 120.6 352 164c0 45.67-29.18 66.37-62.35 89.18S248 298.36 248 324",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"40"}),e("circle",{cx:"248",cy:"399.99",r:"32",fill:"currentColor"})],-1));function b(o,x){const s=p,c=d,r=f;return a(),i(r,{trigger:"hover"},{trigger:t(()=>[n(c,{tertiary:"",circle:"",class:"help",size:"tiny"},{icon:t(()=>[n(s,null,{default:t(()=>[h]),_:1})]),_:1})]),default:t(()=>[l(o.$slots,"default",{},void 0,!0)]),_:3})}const C=_(w,[["render",b],["__scopeId","data-v-5868d4d1"]]);export{C as _};

View file

@ -1 +1 @@
.log[data-v-9d004220]{overflow:hidden;flex:1}.task-table[data-v-9d004220]{max-width:600px}.task-table th[data-v-9d004220]{padding:2px 16px}.task-table td[data-v-9d004220]{height:24px;padding:2px 8px}.task-table td[data-v-9d004220]:last-child{width:100%}.action-container[data-v-9d004220]{display:flex;align-items:center;gap:12px}.scroll-container[data-v-9d004220]{display:flex;align-items:center;gap:4px}.expand[data-v-9d004220]{flex-grow:1}.toggle-table-collapse-btn[data-v-9d004220]{position:absolute;top:12px;right:12px}.log-bg[data-v-9d004220]{content:"";width:100%;height:100%;position:absolute;top:0;left:0;opacity:var(--3d2cf20e);background-image:url(/bg.webp);background-repeat:no-repeat;background-size:cover;background-position:65% 50%;pointer-events:none}.hljs-date{color:#f0a020!important;font-weight:700}.hljs-time{color:#2080f0!important;font-weight:700}.hljs-room{color:#18a058!important;font-weight:700}.hljs-operator{color:#d03050!important}.hljs-info{font-weight:700}.hljs-warning{color:#f0a020!important;font-weight:700}.hljs-error{color:#d03050!important;font-weight:700}.hljs-scene{font-style:italic}
.log[data-v-97f6834c]{overflow:hidden;flex:1}.task-table[data-v-97f6834c]{max-width:600px}.task-table th[data-v-97f6834c]{padding:2px 16px}.task-table td[data-v-97f6834c]{height:24px;padding:2px 8px}.task-table td[data-v-97f6834c]:last-child{width:100%}.action-container[data-v-97f6834c]{display:flex;align-items:center;gap:12px}.scroll-container[data-v-97f6834c]{display:flex;align-items:center;gap:4px}.expand[data-v-97f6834c]{flex-grow:1}.toggle-table-collapse-btn[data-v-97f6834c]{position:absolute;top:12px;right:12px}.log-bg[data-v-97f6834c]{content:"";width:100%;height:100%;position:absolute;top:0;left:0;opacity:var(--23b16ac2);background-image:url(/bg.webp);background-repeat:no-repeat;background-size:cover;background-position:65% 50%;pointer-events:none}.hljs-date{color:#f0a020!important;font-weight:700}.hljs-time{color:#2080f0!important;font-weight:700}.hljs-room{color:#18a058!important;font-weight:700}.hljs-operator{color:#d03050!important}.hljs-info{font-weight:700}.hljs-warning{color:#f0a020!important;font-weight:700}.hljs-error{color:#d03050!important;font-weight:700}.hljs-scene{font-style:italic}

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
.select-label[data-v-78258008]{width:44px}.type-select[data-v-78258008]{width:100px;margin-right:8px}.product-select[data-v-78258008]{width:180px;margin-right:8px}.operator-select[data-v-78258008]{width:220px}.replacement-select[data-v-78258008]{min-width:400px}.plan-container[data-v-78258008]{width:980px;min-width:980px;display:flex;flex-direction:column;gap:12px}.group[data-v-78258008]{width:160px}.facility-2[data-v-78258008]{width:124px;height:76px;margin:2px 3px}.facility-3[data-v-78258008]{width:175px;height:76px;margin:2px 3px}.facility-5[data-v-78258008]{width:277px;height:76px;margin:2px 3px}.avatars[data-v-78258008]{display:flex;gap:6px;z-index:5}.avatars img[data-v-78258008]{box-sizing:content-box;border-radius:2px;background:var(--3a9b0e51)}.facility-name[data-v-78258008]{margin-bottom:4px;text-align:center;line-height:1;display:flex;justify-content:space-around;z-index:5}.outer[data-v-78258008]{display:flex;margin:0 auto}.left_box[data-v-78258008]{display:flex;flex-direction:column;gap:4px;padding-top:82px;padding-right:2px}.left_box .left_contain[data-v-78258008]{display:grid;grid-template-columns:1fr 1fr 1fr;gap:4px}.left_box .left_contain>div[data-v-78258008]{box-sizing:border-box;width:175px;height:76px;cursor:pointer}.left_box .left_contain .info[data-v-78258008]{background-color:#2080f029;border-radius:3px;border:1px solid transparent;transition:all .3s;position:relative}.left_box .left_contain .info[data-v-78258008]:hover{background-color:#2080f038}.left_box .left_contain .info.true[data-v-78258008]{background-color:var(--n-color);border:1px solid rgb(32,128,240)}.left_box .left_contain .info .facility-name[data-v-78258008]{color:#2080f0}.left_box .left_contain .warning[data-v-78258008]{background-color:#f0a02029;border-radius:3px;border:1px solid transparent;transition:all .3s;position:relative}.left_box .left_contain .warning[data-v-78258008]:hover{background-color:#f0a02038}.left_box .left_contain .warning.true[data-v-78258008]{background-color:var(--n-color);border:1px solid rgb(240,160,32)}.left_box .left_contain .warning .facility-name[data-v-78258008]{color:#f0a020}.left_box .left_contain .primary[data-v-78258008]{background-color:#18a05829;border-radius:3px;border:1px solid transparent;transition:all .3s}.left_box .left_contain .primary[data-v-78258008]:hover{background-color:#18a05838}.left_box .left_contain .primary.true[data-v-78258008]{background-color:var(--n-color);border:1px solid rgb(24,160,88)}.left_box .left_contain .primary .facility-name[data-v-78258008]{color:#18a058}.mid_box[data-v-78258008]{display:flex;flex-direction:column}.waiting[data-v-78258008]{width:100%;height:100%;display:flex;align-items:center;justify-content:center;border:1px dashed rgb(51,54,57);opacity:.6;transition:all .3s;cursor:pointer;border-radius:3px}.waiting[data-v-78258008]:hover{opacity:1;border:1px dashed rgb(54,173,106);color:#36ad6a}.waiting div[data-v-78258008]{text-align:center}.draggable[data-v-78258008]{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}.product-bg[data-v-78258008]{content:"";position:absolute;top:0;left:0;width:173px;height:74px;opacity:var(--7f05acbb);background-repeat:no-repeat;background-size:100%;background-position:110px -20px;z-index:3;pointer-events:none}.avatar-wrapper[data-v-78258008]{position:relative}.workaholic[data-v-78258008]{position:absolute;content:"";top:0;left:0;width:45px;height:45px;opacity:.35;background-color:red;pointer-events:none}.n-base-selection-placeholder .n-avatar{display:none}.n-table[data-v-d70a169d]{min-width:100%}.n-table th[data-v-d70a169d]{width:124px;box-sizing:border-box}.label[data-v-d70a169d]{display:flex;flex-direction:row;align-items:center;gap:6px}.dropdown-container{display:flex;align-items:center;margin-top:5px}.dropdown-label{flex:0 0 40%;max-width:125px}.dropdown-select{flex:1}.w-980[data-v-53621c35]{width:100%;max-width:980px}.mx-auto[data-v-53621c35]{margin:0 auto}.mt-12[data-v-53621c35]{margin-top:12px}.mb-12[data-v-53621c35]{margin-bottom:12px}.px-12[data-v-53621c35]{padding:0 12px}.mw-980[data-v-53621c35]{min-width:980px}.plan-bar[data-v-53621c35]{display:flex;flex-direction:row;flex-grow:0;gap:6px;padding:0 12px}
.select-label[data-v-61f3d7ff]{width:44px}.type-select[data-v-61f3d7ff]{width:100px;margin-right:8px}.product-select[data-v-61f3d7ff]{width:180px;margin-right:8px}.operator-select[data-v-61f3d7ff]{width:220px}.replacement-select[data-v-61f3d7ff]{min-width:400px}.plan-container[data-v-61f3d7ff]{width:980px;min-width:980px;display:flex;flex-direction:column;gap:12px}.group[data-v-61f3d7ff]{width:160px}.facility-2[data-v-61f3d7ff]{width:124px;height:76px;margin:2px 3px}.facility-3[data-v-61f3d7ff]{width:175px;height:76px;margin:2px 3px}.facility-5[data-v-61f3d7ff]{width:277px;height:76px;margin:2px 3px}.avatars[data-v-61f3d7ff]{display:flex;gap:6px;z-index:5}.avatars img[data-v-61f3d7ff]{box-sizing:content-box;border-radius:2px;background:var(--84ca658c)}.facility-name[data-v-61f3d7ff]{margin-bottom:4px;text-align:center;line-height:1;display:flex;justify-content:space-around;z-index:5}.outer[data-v-61f3d7ff]{display:flex;margin:0 auto}.left_box[data-v-61f3d7ff]{display:flex;flex-direction:column;gap:4px;padding-top:82px;padding-right:2px}.left_box .left_contain[data-v-61f3d7ff]{display:grid;grid-template-columns:1fr 1fr 1fr;gap:4px}.left_box .left_contain>div[data-v-61f3d7ff]{box-sizing:border-box;width:175px;height:76px;cursor:pointer}.left_box .left_contain .info[data-v-61f3d7ff]{background-color:#2080f029;border-radius:3px;border:1px solid transparent;transition:all .3s;position:relative}.left_box .left_contain .info[data-v-61f3d7ff]:hover{background-color:#2080f038}.left_box .left_contain .info.true[data-v-61f3d7ff]{background-color:var(--n-color);border:1px solid rgb(32,128,240)}.left_box .left_contain .info .facility-name[data-v-61f3d7ff]{color:#2080f0}.left_box .left_contain .warning[data-v-61f3d7ff]{background-color:#f0a02029;border-radius:3px;border:1px solid transparent;transition:all .3s;position:relative}.left_box .left_contain .warning[data-v-61f3d7ff]:hover{background-color:#f0a02038}.left_box .left_contain .warning.true[data-v-61f3d7ff]{background-color:var(--n-color);border:1px solid rgb(240,160,32)}.left_box .left_contain .warning .facility-name[data-v-61f3d7ff]{color:#f0a020}.left_box .left_contain .primary[data-v-61f3d7ff]{background-color:#18a05829;border-radius:3px;border:1px solid transparent;transition:all .3s}.left_box .left_contain .primary[data-v-61f3d7ff]:hover{background-color:#18a05838}.left_box .left_contain .primary.true[data-v-61f3d7ff]{background-color:var(--n-color);border:1px solid rgb(24,160,88)}.left_box .left_contain .primary .facility-name[data-v-61f3d7ff]{color:#18a058}.mid_box[data-v-61f3d7ff]{display:flex;flex-direction:column}.waiting[data-v-61f3d7ff]{width:100%;height:100%;display:flex;align-items:center;justify-content:center;border:1px dashed rgb(51,54,57);opacity:.6;transition:all .3s;cursor:pointer;border-radius:3px}.waiting[data-v-61f3d7ff]:hover{opacity:1;border:1px dashed rgb(54,173,106);color:#36ad6a}.waiting div[data-v-61f3d7ff]{text-align:center}.draggable[data-v-61f3d7ff]{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}.product-bg[data-v-61f3d7ff]{content:"";position:absolute;top:0;left:0;width:173px;height:74px;opacity:var(--7898b81c);background-repeat:no-repeat;background-size:100%;background-position:110px -20px;z-index:3;pointer-events:none}.avatar-wrapper[data-v-61f3d7ff]{position:relative}.workaholic[data-v-61f3d7ff]{position:absolute;content:"";top:0;left:0;width:45px;height:45px;opacity:.35;background-color:red;pointer-events:none}.n-base-selection-placeholder .n-avatar{display:none}.n-table[data-v-37669413]{min-width:100%}.n-table th[data-v-37669413]{width:124px;box-sizing:border-box}.label[data-v-37669413]{display:flex;flex-direction:row;align-items:center;gap:6px}.dropdown-container{display:flex;align-items:center;margin-top:5px}.dropdown-label{flex:0 0 40%;max-width:125px}.dropdown-select{flex:1}.w-980[data-v-d6372713]{width:100%;max-width:980px}.mx-auto[data-v-d6372713]{margin:0 auto}.mt-12[data-v-d6372713]{margin-top:12px}.mb-12[data-v-d6372713]{margin-bottom:12px}.px-12[data-v-d6372713]{padding:0 12px}.mw-980[data-v-d6372713]{min-width:980px}.plan-bar[data-v-d6372713]{display:flex;flex-direction:row;flex-grow:0;gap:6px;padding:0 12px}

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
h2[data-v-a94ff07f]{margin:0;font-size:1.2rem;text-align:center}.page-title[data-v-a94ff07f]{text-align:center;font-size:24px;margin-bottom:20px}.report-card[data-v-a94ff07f]{position:relative;background-color:var(--n-color);padding:10px 20px 16px;height:300px;box-sizing:border-box;border-radius:8px}.report-card-expand[data-v-a94ff07f]{position:absolute;width:calc(100% - 24px);height:calc(100% - 24px);top:12px;left:12px;box-sizing:border-box;z-index:9}.toggle[data-v-a94ff07f]{position:absolute;top:10px}.toggle-size[data-v-a94ff07f]{right:10px}.toggle-width[data-v-a94ff07f]{left:10px}.line-outer-container[data-v-a94ff07f]{width:100%;overflow-x:scroll;flex:1}.line-inner-container[data-v-a94ff07f]{padding:0 12px 16px;height:100%;box-sizing:border-box}
h2[data-v-25048cec]{margin:0;font-size:1.2rem;text-align:center}.page-title[data-v-25048cec]{text-align:center;font-size:24px;margin-bottom:20px}.report-card[data-v-25048cec]{position:relative;background-color:var(--n-color);padding:10px 20px 16px;height:300px;box-sizing:border-box;border-radius:8px}.report-card-expand[data-v-25048cec]{position:absolute;width:calc(100% - 24px);height:calc(100% - 24px);top:12px;left:12px;box-sizing:border-box;z-index:9}.toggle[data-v-25048cec]{position:absolute;top:10px}.toggle-size[data-v-25048cec]{right:10px}.toggle-width[data-v-25048cec]{left:10px}.line-outer-container[data-v-25048cec]{width:100%;overflow-x:scroll;flex:1}.line-inner-container[data-v-25048cec]{padding:0 12px 16px;height:100%;box-sizing:border-box}

View file

@ -1 +1 @@
import{u as z,C as N,a as V,L,T as j,b as D,P as I,c as P,p as R,d as O,e as F,f as H,A as T,g as q,h as G}from"./record.js";import{bm as f,br as K,r as u,s as X,bs as r,bC as x,bv as o,bu as l,F as Z,bD as J,bF as Q,bG as U,bx as _,bt as v,bK as W,bE as Y,bL as ee,bo as d,aX as te,b3 as oe}from"./_plugin-vue_export-helper.js";import{b as ae,_ as ne}from"./Grid.js";import"./main.js";import"./get-slot.js";var M={};Object.defineProperty(M,"__esModule",{value:!0});const h=f,se={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},le=(0,h.createStaticVNode)('<g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 4h4v4"></path><path d="M14 10l6-6"></path><path d="M8 20H4v-4"></path><path d="M4 20l6-6"></path></g>',1),re=[le];var ce=M.default=(0,h.defineComponent)({name:"ArrowsDiagonal",render:function(c,i){return(0,h.openBlock)(),(0,h.createElementBlock)("svg",se,re)}}),y={};Object.defineProperty(y,"__esModule",{value:!0});const m=f,ie={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},pe=(0,m.createStaticVNode)('<g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 10h-4V6"></path><path d="M20 4l-6 6"></path><path d="M6 14h4v4"></path><path d="M10 14l-6 6"></path></g>',1),ue=[pe];var de=y.default=(0,m.defineComponent)({name:"ArrowsDiagonalMinimize2",render:function(c,i){return(0,m.openBlock)(),(0,m.createElementBlock)("svg",ie,ue)}}),C={};Object.defineProperty(C,"__esModule",{value:!0});const a=f,_e={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},he=(0,a.createElementVNode)("g",{fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[(0,a.createElementVNode)("path",{d:"M7 8l-4 4l4 4"}),(0,a.createElementVNode)("path",{d:"M17 8l4 4l-4 4"}),(0,a.createElementVNode)("path",{d:"M3 12h18"})],-1),me=[he];var ge=C.default=(0,a.defineComponent)({name:"ArrowsHorizontal",render:function(c,i){return(0,a.openBlock)(),(0,a.createElementBlock)("svg",_e,me)}});const ve=e=>(Q("data-v-a94ff07f"),e=e(),U(),e),fe=ve(()=>_("h1",{class:"page-title"},"干员心情折线表",-1)),we={class:"line-outer-container"},ke={__name:"RecordLine",setup(e){const c=z(),{getMoodRatios:i}=c;N.register(V,L,j,D,I,P,R,O,F,H,T,q);const p=u(-1),t=u([]),g=u([]);X(async()=>{g.value=await i(),t.value=new Array(g.value.length).fill(100)});const S=u({responsive:!0,maintainAspectRatio:!1,scales:{x:{autoSkip:!0,type:"time",time:{unit:"day"}},y:{beginAtZero:!0,ticks:{min:0,max:24,stepSize:4}}},plugins:{datalabels:{display:!1}}});function $(n){t.value[n]==100?t.value[n]=300:t.value[n]==300?t.value[n]=700:t.value[n]=100}return(n,be)=>{const w=te,k=oe,B=ne,E=ae;return r(),x("div",null,[fe,o(E,{"x-gap":12,"y-gap":8,collapsed:!1,cols:"1 s:1 m:2 l:3 xl:4 2xl:5",responsive:"screen"},{default:l(()=>[(r(!0),x(Z,null,J(g.value,(b,s)=>(r(),v(B,{key:s,class:W(["report-card",{"report-card-expand":p.value==s}])},{default:l(()=>[_("h2",null,Y(b.groupName),1),_("div",we,[_("div",{class:"line-inner-container",style:ee({width:t.value[s]+"%"})},[o(d(G),{data:b.moodData,options:S.value},null,8,["data","options"])],4)]),o(k,{class:"toggle toggle-size",size:"small",onClick:A=>p.value=p.value==-1?s:-1,focusable:!1},{icon:l(()=>[o(w,null,{default:l(()=>[p.value==s?(r(),v(d(de),{key:0})):(r(),v(d(ce),{key:1}))]),_:2},1024)]),_:2},1032,["onClick"]),o(k,{class:"toggle toggle-width",size:"small",onClick:A=>$(s),focusable:!1},{icon:l(()=>[o(w,null,{default:l(()=>[o(d(ge))]),_:1})]),_:2},1032,["onClick"])]),_:2},1032,["class"]))),128))]),_:1})])}}},$e=K(ke,[["__scopeId","data-v-a94ff07f"]]);export{$e as default};
import{u as z,C as N,a as V,L,T as j,b as D,P as I,c as P,p as R,d as O,e as F,f as H,A as T,g as q,h as G}from"./record.js";import{bm as w,br as K,r as u,s as X,bs as r,bC as x,bv as o,bu as l,F as Z,bD as J,bF as Q,bG as U,bx as _,bt as v,bK as W,bE as Y,bL as ee,bo as d,aX as te,b3 as oe}from"./_plugin-vue_export-helper.js";import{b as ne,_ as ae}from"./Grid.js";import"./main.js";import"./get-slot.js";var M={};Object.defineProperty(M,"__esModule",{value:!0});const h=w,se={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},le=(0,h.createStaticVNode)('<g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 4h4v4"></path><path d="M14 10l6-6"></path><path d="M8 20H4v-4"></path><path d="M4 20l6-6"></path></g>',1),re=[le];var ce=M.default=(0,h.defineComponent)({name:"ArrowsDiagonal",render:function(c,i){return(0,h.openBlock)(),(0,h.createElementBlock)("svg",se,re)}}),y={};Object.defineProperty(y,"__esModule",{value:!0});const m=w,ie={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},pe=(0,m.createStaticVNode)('<g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 10h-4V6"></path><path d="M20 4l-6 6"></path><path d="M6 14h4v4"></path><path d="M10 14l-6 6"></path></g>',1),ue=[pe];var de=y.default=(0,m.defineComponent)({name:"ArrowsDiagonalMinimize2",render:function(c,i){return(0,m.openBlock)(),(0,m.createElementBlock)("svg",ie,ue)}}),C={};Object.defineProperty(C,"__esModule",{value:!0});const n=w,_e={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},he=(0,n.createElementVNode)("g",{fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[(0,n.createElementVNode)("path",{d:"M7 8l-4 4l4 4"}),(0,n.createElementVNode)("path",{d:"M17 8l4 4l-4 4"}),(0,n.createElementVNode)("path",{d:"M3 12h18"})],-1),me=[he];var ge=C.default=(0,n.defineComponent)({name:"ArrowsHorizontal",render:function(c,i){return(0,n.openBlock)(),(0,n.createElementBlock)("svg",_e,me)}});const ve=e=>(Q("data-v-25048cec"),e=e(),U(),e),we=ve(()=>_("h1",{class:"page-title"},"干员心情折线表",-1)),fe={class:"line-outer-container"},ke={__name:"RecordLine",setup(e){const c=z(),{getMoodRatios:i}=c;N.register(V,L,j,D,I,P,R,O,F,H,T,q);const p=u(-1),t=u([]),g=u([]);X(async()=>{g.value=await i(),t.value=new Array(g.value.length).fill(100)});const S=u({responsive:!0,maintainAspectRatio:!1,scales:{x:{autoSkip:!0,type:"time",time:{unit:"day"}},y:{beginAtZero:!0,ticks:{min:0,max:24,stepSize:4}}},plugins:{datalabels:{display:!1}}});function $(a){t.value[a]==100?t.value[a]=300:t.value[a]==300?t.value[a]=700:t.value[a]=100}return(a,be)=>{const f=te,k=oe,B=ae,E=ne;return r(),x("div",null,[we,o(E,{"x-gap":12,"y-gap":8,collapsed:!1,cols:"1 s:1 m:2 l:3 xl:4 2xl:5",responsive:"screen"},{default:l(()=>[(r(!0),x(Z,null,J(g.value,(b,s)=>(r(),v(B,{key:s,class:W(["report-card",{"report-card-expand":p.value==s}])},{default:l(()=>[_("h2",null,Y(b.groupName),1),_("div",fe,[_("div",{class:"line-inner-container",style:ee({width:t.value[s]+"%"})},[o(d(G),{data:b.moodData,options:S.value},null,8,["data","options"])],4)]),o(k,{class:"toggle toggle-size",size:"small",onClick:A=>p.value=p.value==-1?s:-1,focusable:!1},{icon:l(()=>[o(f,null,{default:l(()=>[p.value==s?(r(),v(d(de),{key:0})):(r(),v(d(ce),{key:1}))]),_:2},1024)]),_:2},1032,["onClick"]),o(k,{class:"toggle toggle-width",size:"small",onClick:A=>$(s),focusable:!1},{icon:l(()=>[o(f,null,{default:l(()=>[o(d(ge))]),_:1})]),_:2},1032,["onClick"])]),_:2},1032,["class"]))),128))]),_:1})])}}},$e=K(ke,[["__scopeId","data-v-25048cec"]]);export{$e as default};

View file

@ -1 +1 @@
h2[data-v-2cc4b433]{margin-bottom:10px;font-size:1.2rem;text-align:center}.page-title[data-v-2cc4b433]{text-align:center;font-size:24px;margin-bottom:20px}
h2[data-v-f7ea91b8]{margin-bottom:10px;font-size:1.2rem;text-align:center}.page-title[data-v-f7ea91b8]{text-align:center;font-size:24px;margin-bottom:20px}

View file

@ -1 +1 @@
import{u as f,C as S,a as h,L as x,T as k,b as v,P as y,c as C,p as E,d as P,e as R,f as w,A as B,g as I,i as L}from"./record.js";import{br as D,r as l,s as F,bs as n,bC as i,bv as p,bu as _,F as M,bD as N,bF as T,bG as A,bx as d,bt as V,bE as G,bo as O}from"./_plugin-vue_export-helper.js";import{b as j,_ as q}from"./Grid.js";import"./main.js";import"./get-slot.js";const z=a=>(T("data-v-2cc4b433"),a=a(),A(),a),H=z(()=>d("h1",{class:"page-title"},"工作休息比例报表",-1)),J={__name:"RecordPie",setup(a){const u=f(),{getMoodRatios:m}=u;S.register(h,x,k,v,y,C,E,P,R,w,B,I);const r=l([]);F(async()=>{r.value=await m()});const g=l({plugins:{datalabels:{color:"black",formatter:function(t,c){let e=c.dataset.data.reduce((o,s)=>o+s,0);return console.log(t,e,t/e),Math.round(t/e*100)+"%"}},legend:{display:!1}}});return(t,c)=>{const e=q,o=j;return n(),i("div",null,[H,p(o,{"x-gap":12,"y-gap":8,collapsed:!1,cols:"1 s:1 m:2 l:3 xl:4 2xl:5",responsive:"screen"},{default:_(()=>[(n(!0),i(M,null,N(r.value,(s,b)=>(n(),V(e,{key:b,class:"report-card"},{default:_(()=>[d("h2",null,G(s.groupName),1),p(O(L),{data:s.workRestData,options:g.value},null,8,["data","options"])]),_:2},1024))),128))]),_:1})])}}},Y=D(J,[["__scopeId","data-v-2cc4b433"]]);export{Y as default};
import{u as f,C as S,a as h,L as x,T as k,b as v,P as y,c as C,p as E,d as P,e as R,f as w,A as B,g as I,i as L}from"./record.js";import{br as D,r as c,s as F,bs as n,bC as i,bv as p,bu as _,F as M,bD as N,bF as T,bG as A,bx as d,bt as V,bE as G,bo as O}from"./_plugin-vue_export-helper.js";import{b as j,_ as q}from"./Grid.js";import"./main.js";import"./get-slot.js";const z=a=>(T("data-v-f7ea91b8"),a=a(),A(),a),H=z(()=>d("h1",{class:"page-title"},"工作休息比例报表",-1)),J={__name:"RecordPie",setup(a){const u=f(),{getMoodRatios:m}=u;S.register(h,x,k,v,y,C,E,P,R,w,B,I);const r=c([]);F(async()=>{r.value=await m()});const g=c({plugins:{datalabels:{color:"black",formatter:function(t,l){let e=l.dataset.data.reduce((o,s)=>o+s,0);return console.log(t,e,t/e),Math.round(t/e*100)+"%"}},legend:{display:!1}}});return(t,l)=>{const e=q,o=j;return n(),i("div",null,[H,p(o,{"x-gap":12,"y-gap":8,collapsed:!1,cols:"1 s:1 m:2 l:3 xl:4 2xl:5",responsive:"screen"},{default:_(()=>[(n(!0),i(M,null,N(r.value,(s,b)=>(n(),V(e,{key:b,class:"report-card"},{default:_(()=>[d("h2",null,G(s.groupName),1),p(O(L),{data:s.workRestData,options:g.value},null,8,["data","options"])]),_:2},1024))),128))]),_:1})])}}},Y=D(J,[["__scopeId","data-v-f7ea91b8"]]);export{Y as default};

View file

@ -1 +1 @@
@charset "UTF-8";.sss-container[data-v-19f9e9b9]{display:flex;width:100%;gap:8px}.wrapper[data-v-19f9e9b9]{white-space:pre-wrap;-webkit-user-select:text;user-select:text}.title[data-v-19f9e9b9]{font-size:18px;font-weight:500;margin-bottom:6px}p[data-v-666d3ffa]{margin:0 0 10px}.misc-container[data-v-666d3ffa]{margin-top:12px;display:flex;align-items:center;gap:12px}@media screen and (max-width: 1399px){.tasktable[data-v-10266f44]{height:300px;overflow-y:auto}.tasktable table[data-v-10266f44]{border-collapse:collapse}.tasktable td[data-v-10266f44]:first-child{width:10%}.tasktable td[data-v-10266f44]:nth-child(2){width:18%}.tasktable td[data-v-10266f44]:not(:first-child):not(:nth-child(2)){width:10.2857142857%}.tasktable thead[data-v-10266f44]{position:sticky;top:0;background-color:#7ea5b4;z-index:1}}@media screen and (min-width: 1400px){.tasktable[data-v-10266f44]{height:auto}.tasktable table[data-v-10266f44]{border-collapse:collapse}.tasktable td[data-v-10266f44]:first-child{width:10%}.tasktable td[data-v-10266f44]:nth-child(2){width:18%}.tasktable td[data-v-10266f44]:not(:first-child):not(:nth-child(2)){width:10.2857142857%}.tasktable thead[data-v-10266f44]{background-color:#7ea5b4}}.class1[data-v-10266f44]{background-color:#efe9e1;text-align:center;vertical-align:middle}.class2[data-v-10266f44]{background-color:#55c1f6;text-align:center;vertical-align:middle}table[data-v-0c5dc699]{width:100%}table td[data-v-0c5dc699]:nth-child(1){width:40px;text-align:left}table td[data-v-0c5dc699]:nth-child(3){width:80px}.tag-mr[data-v-0c5dc699]{margin-right:4px}.prts-wiki-link[data-v-0c5dc699]{margin:8px 0;flex-shrink:1;min-width:0}.prts-wiki-link-text[data-v-0c5dc699]{overflow:hidden;text-overflow:ellipsis}p[data-v-c062d730]{margin:0 0 8px}h4[data-v-c062d730]{margin:12px 0 10px}.big-table[data-v-c062d730]{margin-top:10px;max-width:320px}.big-table th[data-v-c062d730]{text-align:center}.big-table tr[data-v-c062d730]{width:70px}.big-table td[data-v-c062d730]{height:24px}.big-table td[data-v-c062d730]:nth-child(1){width:70px;text-align:center}.big-table td[data-v-c062d730]:nth-child(2){width:420px}.final[data-v-c062d730]{margin:16px 0 0}p[data-v-72c0637f]{margin:2px 0}h4[data-v-72c0637f]{margin:12px 0 8px}table[data-v-72c0637f]{width:100%}td[data-v-72c0637f]:nth-child(1){width:80px}.ignore-blacklist[data-v-72c0637f]{margin-bottom:10px;display:flex;gap:12px}.h4[data-v-72c0637f]{font-size:16px;font-weight:500}.maa-shop[data-v-72c0637f]{margin:8px 0}.item[data-v-72c0637f]{font-weight:500;font-size:16px}.email-title[data-v-9528d27c]{width:100%}.expand[data-v-9528d27c]{flex-grow:1}.email-table[data-v-9528d27c]{width:100%;margin-bottom:12px}.email-test[data-v-9528d27c]{display:flex;align-items:center;gap:16px}.email-mode[data-v-9528d27c]{margin-left:20px}.email-label[data-v-9528d27c]{width:68px}p[data-v-9528d27c]{margin:0 0 10px}.mt-16[data-v-9528d27c]{margin-top:16px}.item[data-v-65920527]{font-weight:500;font-size:16px}.n-divider[data-v-65920527]:not(.n-divider--vertical){margin:6px 0}.misc-container{margin-top:12px;display:flex;align-items:center;gap:12px}.threshold[data-v-7b9369bc]{display:flex;align-items:center;gap:14px;width:100%}.mower-basic[data-v-7b9369bc]{width:100%}.mower-basic td[data-v-7b9369bc]:nth-child(1){width:120px}.mower-basic td[data-v-7b9369bc]:nth-child(3){padding-left:6px;width:40px}.riic-conf[data-v-7b9369bc]{width:100%}.riic-conf td[data-v-7b9369bc]:nth-child(1){width:130px}.riic-conf td[data-v-7b9369bc]:nth-child(3){padding-left:12px;width:120px}.coord td[data-v-7b9369bc]{width:120px}.coord td[data-v-7b9369bc]:nth-child(1),.coord td[data-v-7b9369bc]:nth-child(3){width:30px}.coord td[data-v-7b9369bc]:nth-child(2){padding-right:30px}.coord-label[data-v-7b9369bc]{width:40px;padding-left:8px}p[data-v-7b9369bc]{margin:0 0 8px}h4[data-v-7b9369bc]{margin:12px 0 10px}.time-table[data-v-7b9369bc]{width:100%;margin-bottom:12px}.time-table td[data-v-7b9369bc]:nth-child(1){width:40px}.scale[data-v-7b9369bc]{width:60px;text-align:right}.scale-apply[data-v-7b9369bc]{margin-left:24px}.waiting-table th[data-v-7b9369bc],.waiting-table td[data-v-7b9369bc]{padding:4px;min-width:70px;width:100px}.waiting-table th[data-v-7b9369bc]:first-child,.waiting-table td[data-v-7b9369bc]:first-child{width:auto;padding:4px 8px}@media (max-width: 1399px){.grid-two{margin:0 0 -10px;width:100%;max-width:600px}.grid-left{display:grid;row-gap:10px;grid-template-columns:100%}.grid-right{display:grid;row-gap:10px;grid-template-columns:100%;margin-top:10px}}@media (min-width: 1400px){.grid-two{display:grid;grid-template-columns:minmax(0px,1fr) minmax(0px,1fr);align-items:flex-start;gap:5px}.grid-left,.grid-right{display:grid;gap:5px;grid-template-columns:100%;max-width:600px}}.n-divider:not(.n-divider--vertical){margin:14px 0 8px}
@charset "UTF-8";.sss-container[data-v-ad4ed9f8]{display:flex;width:100%;gap:8px}.wrapper[data-v-ad4ed9f8]{white-space:pre-wrap;-webkit-user-select:text;user-select:text}.title[data-v-ad4ed9f8]{font-size:18px;font-weight:500;margin-bottom:6px}p[data-v-0f90c467]{margin:0 0 10px}.misc-container[data-v-0f90c467]{margin-top:12px;display:flex;align-items:center;gap:12px}@media screen and (max-width: 1399px){.tasktable[data-v-df8db2f0]{height:300px;overflow-y:auto}.tasktable table[data-v-df8db2f0]{border-collapse:collapse}.tasktable td[data-v-df8db2f0]:first-child{width:10%}.tasktable td[data-v-df8db2f0]:nth-child(2){width:18%}.tasktable td[data-v-df8db2f0]:not(:first-child):not(:nth-child(2)){width:10.2857142857%}.tasktable thead[data-v-df8db2f0]{position:sticky;top:0;background-color:#7ea5b4;z-index:1}}@media screen and (min-width: 1400px){.tasktable[data-v-df8db2f0]{height:auto}.tasktable table[data-v-df8db2f0]{border-collapse:collapse}.tasktable td[data-v-df8db2f0]:first-child{width:10%}.tasktable td[data-v-df8db2f0]:nth-child(2){width:18%}.tasktable td[data-v-df8db2f0]:not(:first-child):not(:nth-child(2)){width:10.2857142857%}.tasktable thead[data-v-df8db2f0]{background-color:#7ea5b4}}.class1[data-v-df8db2f0]{background-color:#efe9e1;text-align:center;vertical-align:middle}.class2[data-v-df8db2f0]{background-color:#55c1f6;text-align:center;vertical-align:middle}table[data-v-466b757b]{width:100%}table td[data-v-466b757b]:nth-child(1){width:40px;text-align:left}table td[data-v-466b757b]:nth-child(3){width:80px}.tag-mr[data-v-466b757b]{margin-right:4px}.prts-wiki-link[data-v-466b757b]{margin:8px 0;flex-shrink:1;min-width:0}.prts-wiki-link-text[data-v-466b757b]{overflow:hidden;text-overflow:ellipsis}p[data-v-7e510649]{margin:0 0 8px}h4[data-v-7e510649]{margin:12px 0 10px}.big-table[data-v-7e510649]{margin-top:10px;max-width:320px}.big-table th[data-v-7e510649]{text-align:center}.big-table tr[data-v-7e510649]{width:70px}.big-table td[data-v-7e510649]{height:24px}.big-table td[data-v-7e510649]:nth-child(1){width:70px;text-align:center}.big-table td[data-v-7e510649]:nth-child(2){width:420px}.final[data-v-7e510649]{margin:16px 0 0}p[data-v-8fd7d6cc]{margin:2px 0}h4[data-v-8fd7d6cc]{margin:12px 0 8px}table[data-v-8fd7d6cc]{width:100%}td[data-v-8fd7d6cc]:nth-child(1){width:80px}.ignore-blacklist[data-v-8fd7d6cc]{margin-bottom:10px;display:flex;gap:12px}.h4[data-v-8fd7d6cc]{font-size:16px;font-weight:500}.maa-shop[data-v-8fd7d6cc]{margin:8px 0}.item[data-v-8fd7d6cc]{font-weight:500;font-size:16px}.email-title[data-v-c5308ada]{width:100%}.expand[data-v-c5308ada]{flex-grow:1}.email-table[data-v-c5308ada]{width:100%;margin-bottom:12px}.email-test[data-v-c5308ada]{display:flex;align-items:center;gap:16px}.email-mode[data-v-c5308ada]{margin-left:20px}.email-label[data-v-c5308ada]{width:68px}p[data-v-c5308ada]{margin:0 0 10px}.mt-16[data-v-c5308ada]{margin-top:16px}.item[data-v-90373ea0]{font-weight:500;font-size:16px}.n-divider[data-v-90373ea0]:not(.n-divider--vertical){margin:6px 0}.misc-container{margin-top:12px;display:flex;align-items:center;gap:12px}.threshold[data-v-2b2557b0]{display:flex;align-items:center;gap:14px;width:100%}.mower-basic[data-v-2b2557b0]{width:100%}.mower-basic td[data-v-2b2557b0]:nth-child(1){width:120px}.mower-basic td[data-v-2b2557b0]:nth-child(3){padding-left:6px;width:40px}.riic-conf[data-v-2b2557b0]{width:100%}.riic-conf td[data-v-2b2557b0]:nth-child(1){width:130px}.riic-conf td[data-v-2b2557b0]:nth-child(3){padding-left:12px;width:120px}.coord td[data-v-2b2557b0]{width:120px}.coord td[data-v-2b2557b0]:nth-child(1),.coord td[data-v-2b2557b0]:nth-child(3){width:30px}.coord td[data-v-2b2557b0]:nth-child(2){padding-right:30px}.coord-label[data-v-2b2557b0]{width:40px;padding-left:8px}p[data-v-2b2557b0]{margin:0 0 8px}h4[data-v-2b2557b0]{margin:12px 0 10px}.time-table[data-v-2b2557b0]{width:100%;margin-bottom:12px}.time-table td[data-v-2b2557b0]:nth-child(1){width:40px}.scale[data-v-2b2557b0]{width:60px;text-align:right}.scale-apply[data-v-2b2557b0]{margin-left:24px}.waiting-table th[data-v-2b2557b0],.waiting-table td[data-v-2b2557b0]{padding:4px;min-width:70px;width:100px}.waiting-table th[data-v-2b2557b0]:first-child,.waiting-table td[data-v-2b2557b0]:first-child{width:auto;padding:4px 8px}@media (max-width: 1399px){.grid-two{margin:0 0 -10px;width:100%;max-width:600px}.grid-left{display:grid;row-gap:10px;grid-template-columns:100%}.grid-right{display:grid;row-gap:10px;grid-template-columns:100%;margin-top:10px}}@media (min-width: 1400px){.grid-two{display:grid;grid-template-columns:minmax(0px,1fr) minmax(0px,1fr);align-items:flex-start;gap:5px}.grid-left,.grid-right{display:grid;gap:5px;grid-template-columns:100%;max-width:600px}}.n-divider:not(.n-divider--vertical){margin:14px 0 8px}

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
.width100[data-v-b1322d95]{width:100%}
.width100[data-v-49c0eae3]{width:100%}

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
@charset "UTF-8";.n-avatar,.img{pointer-events:none!important}.tabs[data-v-a37af22d],.provider[data-v-a37af22d],.layout-container[data-v-a37af22d]{height:100%}#app{height:var(--app-height, 100vh);width:var(--app-width, 100vw);transform-origin:0 0}.n-tab-pane{flex-grow:1;display:flex;flex-direction:column;overflow:auto}.n-card-header__main{display:flex;align-items:center;gap:6px}td{height:34px}.table-space{padding-right:20px}.external-container{max-width:600px;margin:0 auto}.n-checkbox{align-items:center}.n-form-item{margin-top:12px}.n-form-item:first-child{margin-top:0}.dialog-btn{margin-left:4px}.report-card{display:flex;flex-direction:column;align-items:center;justify-content:center;width:300px;height:200px;padding:20px 20px 80px;border:1px solid #ccc;box-shadow:0 2px 4px #0000001a}.n-checkbox .n-checkbox__label{flex-grow:1;display:flex;align-items:center;padding-right:0}.outer-layout{height:100%}.outer-layout>.n-layout-scroll-container{display:flex;flex-direction:column;height:100%;overflow:hidden}.layout-content-container>.n-layout-scroll-container{width:100%;height:100%;display:flex;flex-direction:column;overflow:auto;gap:8px;align-items:center}.home-container{padding:12px;flex-grow:1;display:flex;flex-direction:column;gap:8px;width:calc(100% - 24px);height:calc(100% - 24px);position:relative}pre{word-break:break-all!important;font-family:Cascadia Mono,Consolas,Microsoft YaHei,SF Mono,Menlo,PingFang SC,monospace!important}.n-dynamic-input-item__action{align-self:center!important}ul,ol{padding-left:18px;margin:0}.card-title{font-weight:500;font-size:18px;white-space:nowrap}
@charset "UTF-8";.n-avatar,.img{pointer-events:none!important}.tabs[data-v-46334205],.provider[data-v-46334205],.layout-container[data-v-46334205]{height:100%}#app{height:var(--app-height, 100vh);width:var(--app-width, 100vw);transform-origin:0 0}.n-tab-pane{flex-grow:1;display:flex;flex-direction:column;overflow:auto}.n-card-header__main{display:flex;align-items:center;gap:6px}td{height:34px}.table-space{padding-right:20px}.external-container{max-width:600px;margin:0 auto}.n-checkbox{align-items:center}.n-form-item{margin-top:12px}.n-form-item:first-child{margin-top:0}.dialog-btn{margin-left:4px}.report-card{display:flex;flex-direction:column;align-items:center;justify-content:center;width:300px;height:200px;padding:20px 20px 80px;border:1px solid #ccc;box-shadow:0 2px 4px #0000001a}.n-checkbox .n-checkbox__label{flex-grow:1;display:flex;align-items:center;padding-right:0}.outer-layout{height:100%}.outer-layout>.n-layout-scroll-container{display:flex;flex-direction:column;height:100%;overflow:hidden}.layout-content-container>.n-layout-scroll-container{width:100%;height:100%;display:flex;flex-direction:column;overflow:auto;gap:8px;align-items:center}.home-container{padding:12px;flex-grow:1;display:flex;flex-direction:column;gap:8px;width:calc(100% - 24px);height:calc(100% - 24px);position:relative}pre{word-break:break-all!important;font-family:Cascadia Mono,Consolas,Microsoft YaHei,SF Mono,Menlo,PingFang SC,monospace!important}.n-dynamic-input-item__action{align-self:center!important}ul,ol{padding-left:18px;margin:0}.card-title{font-weight:500;font-size:18px;white-space:nowrap}

196
ui/dist/assets/main.js vendored

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
.mower-list[data-v-50f5626a]{box-sizing:border-box;width:100vw;padding:12px;display:flex;flex-direction:column;gap:8px}.header[data-v-50f5626a]{display:flex;gap:6px;align-items:center;height:28px}.expand[data-v-50f5626a]{flex-grow:1}.folder[data-v-50f5626a]{display:flex;gap:6px;align-items:center}.folder-content[data-v-50f5626a]{word-break:break-all}
.mower-list[data-v-4602b0dd]{box-sizing:border-box;width:100vw;padding:12px;display:flex;flex-direction:column;gap:8px}.header[data-v-4602b0dd]{display:flex;gap:6px;align-items:center;height:28px}.expand[data-v-4602b0dd]{flex-grow:1}.folder[data-v-4602b0dd]{display:flex;gap:6px;align-items:center}.folder-content[data-v-4602b0dd]{word-break:break-all}

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
.readme[data-v-25ca14dd]{word-break:break-all;max-width:800px}
.readme[data-v-dae6ad05]{word-break:break-all;max-width:800px}

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
.chart[data-v-1e64842f]{height:400px}.report-card_1[data-v-1e64842f]{display:gird;flex-direction:column;align-items:center;justify-content:center;width:800px;height:400px;padding:20px 20px 80px;border:1px solid #ccc}
.chart[data-v-c00d84c9]{height:400px}.report-card_1[data-v-c00d84c9]{display:gird;flex-direction:column;align-items:center;justify-content:center;width:800px;height:400px;padding:20px 20px 80px;border:1px solid #ccc}

File diff suppressed because one or more lines are too long

24
ui/dist/index.html vendored
View file

@ -1,15 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Mower WebUI in Browser</title>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Mower WebUI in Browser</title>
<script type="module" crossorigin src="/assets/main.js"></script>
<link rel="modulepreload" crossorigin href="/assets/_plugin-vue_export-helper.js">
<link rel="stylesheet" crossorigin href="/assets/main.css">
</head>
<body>
<div id="app"></div>
</body>
</html>
</head>
<body>
<div id="app"></div>
</body>
</html>

View file

@ -1,18 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Mower Manager</title>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Mower Manager</title>
<script type="module" crossorigin src="/assets/manager.js"></script>
<link rel="modulepreload" crossorigin href="/assets/_plugin-vue_export-helper.js">
<link rel="modulepreload" crossorigin href="/assets/Play.js">
<link rel="modulepreload" crossorigin href="/assets/TrashOutline.js">
<link rel="modulepreload" crossorigin href="/assets/Input.js">
<link rel="stylesheet" crossorigin href="/assets/manager.css">
</head>
<body>
<div id="app"></div>
</body>
</html>
</head>
<body>
<div id="app"></div>
</body>
</html>

View file

@ -40,7 +40,8 @@ const {
maa_adb_path,
maa_gap,
custom_screenshot,
waiting_scene_v2
waiting_scene_v2,
max_workers
} = storeToRefs(config_store)
const { operators } = storeToRefs(plan_store)
@ -238,10 +239,7 @@ const scene_name = {
</div>
</help-text>
</template>
<n-input
v-model:value="simulator.hotkey"
placeholder="输入模拟器的老板键,组合键用分号隔开,或留空以停用"
/>
<n-input v-model:value="simulator.hotkey" placeholder="留空停用;组合键用加号分隔" />
</n-form-item>
<n-form-item label="启动游戏">
<n-select v-model:value="tap_to_launch_game.enable" :options="launch_options" />
@ -331,6 +329,9 @@ const scene_name = {
<template #suffix>小时</template>
</n-input-number>
</n-form-item>
<n-form-item label="识别线程数">
<n-input-number v-model:value="max_workers" :min="1" />
</n-form-item>
<n-form-item label="等待时间">
<n-table size="small" class="waiting-table">
<thead>

View file

@ -76,6 +76,7 @@ export const useConfigStore = defineStore('config', () => {
const notification_level = ref('INFO')
const waiting_scene_v2 = ref({})
const exipring_medicine_on_weekend = ref(false)
const max_workers = ref(4)
async function load_shop() {
const response = await axios.get(`${import.meta.env.VITE_HTTP_URL}/shop`)
@ -167,6 +168,7 @@ export const useConfigStore = defineStore('config', () => {
notification_level.value = response.data.notification_level
waiting_scene_v2.value = response.data.waiting_scene_v2
exipring_medicine_on_weekend.value = response.data.exipring_medicine_on_weekend
max_workers.value = response.data.max_workers
}
function build_config() {
@ -250,7 +252,8 @@ export const useConfigStore = defineStore('config', () => {
custom_screenshot: custom_screenshot.value,
notification_level: notification_level.value,
waiting_scene_v2: waiting_scene_v2.value,
exipring_medicine_on_weekend: exipring_medicine_on_weekend.value
exipring_medicine_on_weekend: exipring_medicine_on_weekend.value,
max_workers: max_workers.value
}
}
@ -337,6 +340,7 @@ export const useConfigStore = defineStore('config', () => {
custom_screenshot,
notification_level,
waiting_scene_v2,
exipring_medicine_on_weekend
exipring_medicine_on_weekend,
max_workers
}
})

View file

@ -13,7 +13,7 @@ def splash_screen(queue: mp.Queue):
root = tk.Tk()
container = tk.Frame(root)
logo_path = get_path("@internal/logo.png")
logo_path = get_path("@install/logo.png")
img = Image.open(logo_path)
img = ImageTk.PhotoImage(img)
canvas = tk.Canvas(container, width=256, height=256)
@ -67,7 +67,7 @@ def start_tray(queue: mp.Queue, global_space, port, url):
from arknights_mower.utils.path import get_path
logo_path = get_path("@internal/logo.png")
logo_path = get_path("@install/logo.png")
img = Image.open(logo_path)
title = f"mower@{port}({global_space})" if global_space else f"mower@{port}"
@ -184,8 +184,6 @@ def webview_window(child_conn, global_space, host, port, url, tray):
if __name__ == "__main__":
mp.freeze_support()
splash_queue = mp.Queue()
splash_process = mp.Process(target=splash_screen, args=(splash_queue,), daemon=True)
splash_process.start()
@ -208,6 +206,8 @@ if __name__ == "__main__":
splash_queue.put({"type": "text", "data": "检测端口占用"})
import time
from arknights_mower.utils.network import get_new_port, is_port_in_use
if token:
@ -217,6 +217,7 @@ if __name__ == "__main__":
splash_queue.put(
{"type": "dialog", "data": f"端口{port}已被占用,无法启动!"}
)
time.sleep(5)
sys.exit()
else:
port = get_new_port()
@ -246,10 +247,6 @@ if __name__ == "__main__":
while not is_port_in_use(port):
sleep(0.1)
url = f"http://127.0.0.1:{port}"
if token:
url += f"?token={token}"
if tray:
splash_queue.put({"type": "text", "data": "加载托盘图标"})
tray_queue = mp.Queue()