@yxhl/specter-pui-vtk 1.0.76 → 1.0.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yxhl/specter-pui-vtk",
3
- "version": "1.0.76",
3
+ "version": "1.0.78",
4
4
  "description": "雅心互联 Vue 3 + Vuetify3 组件库",
5
5
  "type": "module",
6
6
  "main": "./dist/specter-pui.umd.js",
@@ -0,0 +1 @@
1
+ <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1749629552703" class="icon" viewBox="0 0 1396 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="13768" xmlns:xlink="http://www.w3.org/1999/xlink" width="272.65625" height="200"><path d="M1264.425891 814.340655c-6.050909-42.7008-33.233455-84.433455-74.202764-97.540655a199.028364 199.028364 0 0 1 2.373818 136.443345c-5.9392 17.072873-14.373236 35.439709-8.154763 52.410182a44.274036 44.274036 0 0 0 23.021382 23.514764 132.096 132.096 0 0 0 32.423563 9.309091l2.169018 1.7408c16.5888-39.880145 28.429964-83.232582 22.369746-125.877527z" fill="#F4F4F4" p-id="13769"></path><path d="M1191.666036 718.773527c25.488291 26.242327 41.630255 59.466473 46.145164 94.952728 1.089164 7.633455 0.893673 15.378618-0.577164 22.956218a41.648873 41.648873 0 0 1-10.593745 19.642182 88.175709 88.175709 0 0 0-13.898473 16.27229 24.669091 24.669091 0 0 0-0.902982 21.00131c3.723636 8.192 9.141527 15.5648 15.946473 21.69949a66.187636 66.187636 0 0 1 17.7152 24.315346c0.335127 1.135709 2.215564 0.539927 1.880436-0.651636-5.697164-16.821527-22.788655-26.158545-31.390254-41.239273a24.920436 24.920436 0 0 1-2.215564-22.788655 67.323345 67.323345 0 0 1 13.7216-16.877382 43.976145 43.976145 0 0 0 11.394328-18.878836 65.619782 65.619782 0 0 0 1.42429-22.844509 157.947345 157.947345 0 0 0-13.6192-49.915345 171.4176 171.4176 0 0 0-33.540654-49.319564c-0.856436-0.930909-2.169018 0.539927-1.312582 1.461527l-0.176873 0.214109z" fill="#FFFFFF" p-id="13770"></path><path d="M1228.418327 845.460945c-8.033745-5.678545-14.038109-14.838691-16.821527-25.674472-0.279273-1.098473-1.629091-0.502691-1.387055 0.549236 2.913745 11.282618 9.197382 20.815127 17.594182 26.679855 0.8192 0.539927 1.424291-1.005382 0.6144-1.554619z" fill="#FFFFFF" p-id="13771"></path><path d="M1070.545455 804.770909l1.954909 1.135709c8.759855 4.980364 17.035636 10.630982 24.734254 16.886691 0.642327 0.437527 1.238109 0.912291 1.796655 1.4336a184.813382 184.813382 0 0 1 44.776727 53.573818c4.421818 8.043055 8.154764 16.384 11.170909 24.939055 4.189091 11.803927 7.68 24.687709 15.685818 34.564654 0.837818 1.014691 1.722182 1.992145 2.671709 2.913746l70.814255-1.135709H1247.418182a12.241455 12.241455 0 0 0-0.381673-1.3312 3.351273 3.351273 0 0 0 0-0.791273 1.926982 1.926982 0 0 1 0-0.539927 1.303273 1.303273 0 0 1 0-0.446837c-0.763345-2.615855-1.582545-5.231709-2.345891-7.801018a246.225455 246.225455 0 0 0-26.959127-58.963782 166.288291 166.288291 0 0 0-17.221818-22.760727 137.746618 137.746618 0 0 0-45.921746-33.978182c-25.013527-12.269382-54.346473-15.173818-81.696582-8.098909l-2.34589 0.400291z" fill="#F4F4F4" p-id="13772"></path><path d="M1071.904582 802.425018c35.169745 6.022982 67.444364 22.341818 92.243782 46.685091a69.678545 69.678545 0 0 1 13.451636 17.594182c3.165091 6.395345 4.468364 13.479564 3.742255 20.517236a78.941091 78.941091 0 0 0-0.651637 19.893528c1.303273 6.823564 5.659927 12.790691 11.943564 16.365381 7.7824 4.189091 16.384 6.8608 25.283491 7.847564a67.397818 67.397818 0 0 1 28.048291 8.722618c0.977455 0.670255 2.066618-0.8192 1.033309-1.536-14.270836-9.746618-33.093818-7.335564-48.835491-14.112582-7.493818-2.774109-13.2096-8.685382-15.453091-16.002327a60.229818 60.229818 0 0 1 0-20.200727 40.001164 40.001164 0 0 0-2.885818-20.265891 64.260655 64.260655 0 0 0-12.6976-17.957236 164.9664 164.9664 0 0 0-40.364218-30.366255A180.140218 180.140218 0 0 0 1071.522909 800.581818c-1.247418 0-1.359127 1.582545 0 1.796655l0.372364 0.046545z" fill="#FFFFFF" p-id="13773"></path><path d="M1148.220509 837.520291c8.620218-8.145455 8.052364-19.725964-1.3312-27.387346-0.912291-0.7168-2.541382 0.316509-1.582545 1.03331 8.8064 7.121455 9.271855 17.938618 1.098472 25.451054-0.847127 0.809891 0.968145 1.675636 1.815273 0.902982z" fill="#FFFFFF" p-id="13774"></path><path d="M269.963636 102.4m20.107637 0l248.366545 0q20.107636 0 20.107637 20.107636l0 80.802909q0 20.107636-20.107637 20.107637l-248.366545 0q-20.107636 0-20.107637-20.107637l0-80.802909q0-20.107636 20.107637-20.107636Z" fill="#F4F4F4" p-id="13775"></path><path d="M339.781818 162.909091m-23.272727 0a23.272727 23.272727 0 1 0 46.545454 0 23.272727 23.272727 0 1 0-46.545454 0Z" fill="#FFFFFF" p-id="13776"></path><path d="M513.889745 158.217309H387.872582C384.372364 157.789091 381.672727 153.767564 381.672727 148.945455s2.690327-8.843636 6.199855-9.271855h126.017163c2.569309-0.316509 5.045527 1.377745 6.404655 4.375273 1.349818 3.006836 1.349818 6.795636 0 9.793163-1.359127 2.997527-3.835345 4.691782-6.404655 4.375273zM477.435345 195.490909h-89.125236c-3.667782 0-6.637382-4.170473-6.637382-9.309091s2.978909-9.309091 6.637382-9.309091h89.125236c3.667782 0 6.637382 4.170473 6.637382 9.309091s-2.978909 9.309091-6.637382 9.309091z" fill="#FFFFFF" p-id="13777"></path><path d="M111.709091 605.090909m20.107636 0l183.202909 0q20.107636 0 20.107637 20.107636l0 90.112q0 20.107636-20.107637 20.107637l-183.202909 0q-20.107636 0-20.107636-20.107637l0-90.112q0-20.107636 20.107636-20.107636Z" fill="#E1EDFF" p-id="13778"></path><path d="M162.909091 665.6m-23.272727 0a23.272727 23.272727 0 1 0 46.545454 0 23.272727 23.272727 0 1 0-46.545454 0Z" fill="#FFFFFF" p-id="13779"></path><path d="M251.997091 660.908218h-30.608291C217.264873 660.489309 214.109091 656.477091 214.109091 651.636364s3.165091-8.852945 7.279709-9.271855h30.608291c2.997527-0.3072 5.892655 1.396364 7.4752 4.384582 1.582545 2.997527 1.582545 6.777018 0 9.774545-1.582545 2.997527-4.477673 4.691782-7.4752 4.384582zM282.0096 698.181818h-61.328291c-3.723636-0.418909-6.572218-4.468364-6.572218-9.309091s2.848582-8.890182 6.572218-9.309091h61.328291c3.723636 0.418909 6.572218 4.468364 6.572218 9.309091s-2.848582 8.890182-6.572218 9.309091z" fill="#FFFFFF" p-id="13780"></path><path d="M269.963636 944.872727h1014.690909" fill="#66676D" p-id="13781"></path><path d="M269.963636 940.218182h1014.690909v9.309091H269.963636z" fill="#E1EDFF" p-id="13782"></path><path d="M996.072727 232.727273m-27.927272 0a27.927273 27.927273 0 1 0 55.854545 0 27.927273 27.927273 0 1 0-55.854545 0Z" fill="#F4F4F4" p-id="13783"></path><path d="M1181.305018 866.117818c-1.508073 3.956364-4.431127 6.656-7.7824 7.177309-0.893673 0-0.633018 1.8432 0 1.759418 3.695709-0.6144 6.925964-3.584 8.610909-7.940654a1.098473 1.098473 0 0 0 0.055855-0.865746c-0.093091-0.279273-0.297891-0.465455-0.539927-0.50269-0.232727-0.027927-0.465455 0.111709-0.605091 0.372363h0.260654z" fill="#FFFFFF" p-id="13784"></path><path d="M1196.218182 358.4m-32.581818 0a32.581818 32.581818 0 1 0 65.163636 0 32.581818 32.581818 0 1 0-65.163636 0Z" fill="#FEDAC2" p-id="13785"></path><path d="M1027.537455 679.563636H846.196364a26.437818 26.437818 0 0 0-26.372655 26.5216v11.347782c0 10.426182-8.406109 18.878836-18.776436 18.878837H642.234182a18.832291 18.832291 0 0 1-18.776437-18.822982v-11.403637A26.437818 26.437818 0 0 0 597.085091 679.563636H415.529891c-8.415418 0-15.238982 6.8608-15.238982 15.332073v239.299491A15.341382 15.341382 0 0 0 415.529891 949.527273h611.849309a15.341382 15.341382 0 0 0 15.238982-15.332073V694.895709c0-8.406109-6.730473-15.248291-15.080727-15.332073z m7.382109 254.585019c0 4.105309-3.295418 7.447273-7.382109 7.4752H415.688145a7.456582 7.456582 0 0 1-7.382109-7.4752V694.895709a7.186618 7.186618 0 0 1 2.169019-5.306182 7.316945 7.316945 0 0 1 5.268945-2.178327h181.341091a18.832291 18.832291 0 0 1 18.720582 18.888145v11.347782a26.763636 26.763636 0 0 0 26.633309 26.512291H801.047273a26.763636 26.763636 0 0 0 26.633309-26.512291v-11.357091c0-10.398255 8.378182-18.850909 18.729891-18.878836h181.341091a7.456582 7.456582 0 0 1 7.3728 7.484509l-0.2048 239.243636z" fill="#D3D3D3" p-id="13786"></path><path d="M527.145891 260.654545H934.632727c13.833309 0.977455 24.417745 13.163055 24.203637 27.368728l-0.046546 1.163636L958.836364 684.218182h-6.460509l-0.046546-395.226764c0.6144-10.835782-6.944582-20.200727-16.905309-21.466763l-1.005382-0.093091-407.058618-0.009309c-10.333091 0.726109-18.255127 9.755927-18.208582 20.666181l0.037237 1.098473 0.046545 395.031273h-6.460509l-0.037236-394.835782c-0.791273-14.522182 9.4208-27.052218 23.272727-28.625455l1.135709-0.1024z" fill="#CACACC" p-id="13787"></path><path d="M823.975564 381.672727H712.024436c-7.7824-0.446836-13.842618-6.572218-13.842618-13.963636s6.060218-13.5168 13.842618-13.963636h111.951128c7.7824 0.446836 13.842618 6.572218 13.842618 13.963636s-6.060218 13.5168-13.842618 13.963636zM878.964364 381.672727h-17.128728c-8.266473-0.446836-14.708364-6.572218-14.708363-13.963636s6.441891-13.5168 14.708363-13.963636h17.128728c8.266473 0.446836 14.708364 6.572218 14.708363 13.963636s-6.441891 13.5168-14.708363 13.963636z" fill="#F4F4F4" p-id="13788"></path><path d="M650.724073 357.338764h-30.72V326.190545A10.333091 10.333091 0 0 0 609.745455 316.509091a10.333091 10.333091 0 0 0-10.24931 9.681454v31.148219h-30.72c-5.650618 0-10.230691 4.645236-10.23069 10.370327 0 5.725091 4.580073 10.370327 10.221381 10.370327h30.72v31.157527A10.333091 10.333091 0 0 0 609.745455 418.909091a10.333091 10.333091 0 0 0 10.249309-9.681455v-31.148218h30.72c5.650618 0 10.230691-4.645236 10.230691-10.370327 0-5.725091-4.580073-10.370327-10.221382-10.370327z" fill="#1E73F7" p-id="13789"></path><path d="M558.545455 474.763636m20.107636 0l304.221091 0q20.107636 0 20.107636 20.107637l0 24.948363q0 20.107636-20.107636 20.107637l-304.221091 0q-20.107636 0-20.107636-20.107637l0-24.948363q0-20.107636 20.107636-20.107637Z" fill="#E1EDFF" p-id="13790"></path><path d="M558.545455 549.236364m20.107636 0l118.039273 0q20.107636 0 20.107636 20.107636l0 24.948364q0 20.107636-20.107636 20.107636l-118.039273 0q-20.107636 0-20.107636-20.107636l0-24.948364q0-20.107636 20.107636-20.107636Z" fill="#E1EDFF" p-id="13791"></path><path d="M251.345455 437.527273m-18.618182 0a18.618182 18.618182 0 1 0 37.236363 0 18.618182 18.618182 0 1 0-37.236363 0Z" fill="#E1EDFF" p-id="13792"></path><path d="M1079.854545 539.927273m-9.30909 0a9.309091 9.309091 0 1 0 18.618181 0 9.309091 9.309091 0 1 0-18.618181 0Z" fill="#E1EDFF" p-id="13793"></path><path d="M558.545455 810.942836v53.750691h5.920581V820.503273h0.214109l29.29571 44.190254h6.060218v-53.750691h-5.911273v43.734109h-0.223418l-29.146764-43.734109zM632.943709 809.890909c-7.791709 0-13.851927 2.708945-18.3296 8.126836-4.254255 5.12-6.3488 11.748073-6.3488 19.87491 0 8.052364 2.094545 14.680436 6.3488 19.800436 4.468364 5.343418 10.537891 8.052364 18.255127 8.052364 7.726545 0 13.861236-2.708945 18.338909-8.052364 4.189091-5.12 6.3488-11.6736 6.3488-19.800436 0-8.201309-2.169018-14.829382-6.358109-19.949382-4.468364-5.417891-10.603055-8.052364-18.245818-8.052364z m0 5.492364c5.920582 0 10.537891 2.038691 13.861236 6.171927 3.165091 4.068073 4.831418 9.495273 4.831419 16.337455 0 6.777018-1.657018 12.120436-4.840728 16.188509-3.314036 4.058764-8.005818 6.171927-13.9264 6.171927-5.911273 0-10.603055-2.113164-13.9264-6.330182-3.165091-4.058764-4.756945-9.402182-4.756945-16.030254 0-6.702545 1.582545-12.045964 4.756945-16.104728 3.397818-4.291491 8.0896-6.404655 14.000873-6.404654zM689.803636 810.942836v53.750691h17.901382c8.080291 0 14.289455-2.485527 18.618182-7.382109 4.114618-4.663855 6.209164-11.217455 6.209164-19.493236 0-8.434036-1.954909-14.987636-5.771637-19.493237-4.189091-4.971055-10.323782-7.382109-18.478545-7.382109h-18.469237z m5.920582 5.343419h11.617746c6.795636 0 11.692218 1.805964 14.866618 5.492363 2.960291 3.472291 4.477673 8.815709 4.477673 16.039564 0 7.000436-1.657018 12.343855-4.840728 15.955782-3.388509 3.695709-8.434036 5.576145-15.145891 5.576145h-10.975418v-43.063854zM755.842327 810.942836l-20.2752 53.750691h6.3488l5.483055-15.0528h23.663709l5.492364 15.0528h6.423272l-20.284509-53.750691h-6.851491z m-6.572218 33.503419l9.886255-26.875346h0.288581l9.746619 26.875346h-19.921455zM784.197818 810.942836v5.343419h18.189964v48.407272h5.846109v-48.407272h18.180654v-5.343419zM847.918545 810.942836l-20.2752 53.750691h6.3488l5.492364-15.0528h23.663709l5.492364 15.0528H875.054545l-20.2752-53.750691h-6.8608z m-6.562909 33.503419l9.886255-26.875346h0.279273l9.746618 26.875346h-19.921455z" fill="#E1EDFF" p-id="13794"></path><path d="M959.860364 543.222691l-0.791273 1.954909-4.635927 4.244945 77.367854 123.233746c1.973527 3.146473 3.025455 6.814255 3.006837 10.556509v251.308218a7.354182 7.354182 0 0 1-2.048 5.110691 6.907345 6.907345 0 0 1-4.961746 2.122473H415.371636a7.391418 7.391418 0 0 1-7.2704-7.512437V683.2128c0-3.751564 1.061236-7.419345 3.053382-10.556509L507.345455 535.272727l-2.532073-10.873018-100.258909 143.741673c-2.792727 4.440436-4.282182 9.616291-4.263564 14.903854V922.344727c0 15.015564 11.803927 27.191855 26.372655 27.191855h589.321309c14.605964 0 26.484364-12.129745 26.624-27.191855V683.045236c0-5.213091-1.4336-10.333091-4.161164-14.736291l-78.587345-125.086254z" fill="#D3D3D3" p-id="13795"></path></svg>
@@ -1,20 +1,20 @@
1
- import request from "./request.js";
2
- import storage from "./storage.js";
3
- import * as location from "./location.js";
4
- import message from "../components/message/index.js";
5
- import * as filters from "./filters/dictionary.js";
6
- import * as masks from "./filters/mask.js";
7
- import Validation from "./validation.js";
8
-
9
- const vtk = {
10
- request,
11
- storage,
12
- message,
13
- Validation,
14
- env: import.meta.env,
15
- ...location,
16
- ...filters,
17
- ...masks
18
- };
19
-
20
- export default vtk;
1
+ import request from "./request.js";
2
+ import storage from "./storage.js";
3
+ import * as location from "./location.js";
4
+ import message from "../components/message/index.js";
5
+ import * as filters from "./filters/dictionary.js";
6
+ import * as masks from "./filters/mask.js";
7
+ import Validation from "./validation.js";
8
+
9
+ const vtk = {
10
+ request,
11
+ storage,
12
+ message,
13
+ Validation,
14
+ env: import.meta.env,
15
+ ...location,
16
+ ...filters,
17
+ ...masks
18
+ };
19
+
20
+ export default vtk;
@@ -1,128 +1,128 @@
1
- import Request from "./request.js";
2
- import Storage from "./storage.js";
3
- import Message from "../components/message/index.js";
4
-
5
- function isAid(value) {
6
- const str = String(value || "");
7
- return !!str && !/^(https?:)?\/\//i.test(str) && !str.includes("/") && !str.includes("?");
8
-
9
-
10
- }
11
-
12
- function getLinkFromResponse(data) {
13
- if (!data) {
14
- return "";
15
- }
16
-
17
- if (typeof data === "string") {
18
- return data;
19
- }
20
-
21
- return data.puri || "";
22
- }
23
-
24
- function buildUrlWithParams(target, appendParams) {
25
- const queryString = target.includes("?") ? target.split("?")[1] : "";
26
- const queryParams = new URLSearchParams(queryString);
27
- const newParams = [];
28
-
29
- Object.entries(appendParams).forEach(([key, value]) => {
30
- if (!key || value === undefined || value === null || value === "") {
31
- return;
32
- }
33
-
34
- if (!queryParams.has(key)) {
35
- newParams.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`);
36
- }
37
- });
38
-
39
- if (!newParams.length) {
40
- return target;
41
- }
42
-
43
- const joinSymbol = target.includes("?") ? "&" : "?";
44
- return `${target}${joinSymbol}${newParams.join("&")}`;
45
- }
46
-
47
- function appendParamsToUrl(targetUrl, appendParams) {
48
- const hashIndex = targetUrl.indexOf("#");
49
-
50
- if (hashIndex === -1) {
51
- return buildUrlWithParams(targetUrl, appendParams);
52
- }
53
-
54
- const baseUrl = targetUrl.slice(0, hashIndex);
55
- const hashRoute = targetUrl.slice(hashIndex + 1);
56
- const newHashRoute = buildUrlWithParams(hashRoute, appendParams);
57
- return `${baseUrl}#${newHashRoute}`;
58
- }
59
-
60
- async function resolveAidUrl(aid) {
61
- if (!aid) {
62
- return aid;
63
- }
64
-
65
- try {
66
- const res = await Request.postForm("/kudas/xfwez/apps", { aid });
67
- const realUrl = res?.meta?.success ? getLinkFromResponse(res.data) : "";
68
- return realUrl || aid;
69
- } catch (error) {
70
- return aid;
71
- }
72
- }
73
-
74
- function buildAppendParams(sobject, sroute, stokenKey) {
75
- const appendParams = {};
76
- const storageKey = stokenKey || "_mis_acis_token";
77
- const stoken = Storage.get(storageKey);
78
-
79
- if (stoken !== undefined && stoken !== null && stoken !== "") {
80
- appendParams.stoken = stoken;
81
- }
82
-
83
- if (sroute) {
84
- appendParams.sroute = sroute;
85
- }
86
-
87
- if (sobject && typeof sobject === "object" && Object.keys(sobject).length) {
88
- appendParams.sobject = btoa(encodeURIComponent(JSON.stringify(sobject)));
89
- }
90
-
91
- return appendParams;
92
- }
93
-
94
- /**
95
- * 解析地址中的指定参数值。
96
- * @param {string} name 参数名。
97
- * @param {string} url 要解析的地址,不传时默认使用当前地址。
98
- * @return {string} 参数值;未找到时返回空字符串。
99
- */
100
- export function GetQueryString(name, url = window.location.href) {
101
- const reg = new RegExp(`[?&]${name}=([^&^#^/]*)`, "i");
102
- const res = String(url || "").match(reg);
103
- return res ? decodeURIComponent(res[1]) : "";
104
- }
105
-
106
- /**
107
- * 追加应用访问参数。
108
- * @param {string} url 链接地址或应用 aid;不传时默认取当前地址。
109
- * @param {Object} sobject 参数对象;会按 `btoa(encodeURIComponent(JSON.stringify(sobject)))` 编码后追加为 `sobject` 参数。
110
- * @param {string} sroute 页面路由标识;传值后会在最终地址中追加 `sroute=xxx`。
111
- * @param {string} stokenKey 取 `stoken` 的存储键名,默认 `_mis_acis_token`。
112
- * @return {Promise<string>} 拼接后的链接地址。
113
- */
114
- export async function appendAppParams(url, sobject = {}, sroute = "", stokenKey = "_mis_acis_token") {
115
- if (url === undefined || url === null || url === "" || url === 0 || url === "0") {
116
- Message.toast("应用标识错误", { color: "error" });
117
- return "";
118
- }
119
-
120
- const source = url || window.location.href;
121
-
122
- if (!source) {
123
- return "";
124
- }
125
-
126
- const targetUrl = isAid(source) ? await resolveAidUrl(source) : source;
127
- return appendParamsToUrl(targetUrl, buildAppendParams(sobject, sroute, stokenKey));
128
- }
1
+ import Request from "./request.js";
2
+ import Storage from "./storage.js";
3
+ import Message from "../components/message/index.js";
4
+
5
+ function isAid(value) {
6
+ const str = String(value || "");
7
+ return !!str && !/^(https?:)?\/\//i.test(str) && !str.includes("/") && !str.includes("?");
8
+
9
+
10
+ }
11
+
12
+ function getLinkFromResponse(data) {
13
+ if (!data) {
14
+ return "";
15
+ }
16
+
17
+ if (typeof data === "string") {
18
+ return data;
19
+ }
20
+
21
+ return data.puri || "";
22
+ }
23
+
24
+ function buildUrlWithParams(target, appendParams) {
25
+ const queryString = target.includes("?") ? target.split("?")[1] : "";
26
+ const queryParams = new URLSearchParams(queryString);
27
+ const newParams = [];
28
+
29
+ Object.entries(appendParams).forEach(([key, value]) => {
30
+ if (!key || value === undefined || value === null || value === "") {
31
+ return;
32
+ }
33
+
34
+ if (!queryParams.has(key)) {
35
+ newParams.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`);
36
+ }
37
+ });
38
+
39
+ if (!newParams.length) {
40
+ return target;
41
+ }
42
+
43
+ const joinSymbol = target.includes("?") ? "&" : "?";
44
+ return `${target}${joinSymbol}${newParams.join("&")}`;
45
+ }
46
+
47
+ function appendParamsToUrl(targetUrl, appendParams) {
48
+ const hashIndex = targetUrl.indexOf("#");
49
+
50
+ if (hashIndex === -1) {
51
+ return buildUrlWithParams(targetUrl, appendParams);
52
+ }
53
+
54
+ const baseUrl = targetUrl.slice(0, hashIndex);
55
+ const hashRoute = targetUrl.slice(hashIndex + 1);
56
+ const newHashRoute = buildUrlWithParams(hashRoute, appendParams);
57
+ return `${baseUrl}#${newHashRoute}`;
58
+ }
59
+
60
+ async function resolveAidUrl(aid) {
61
+ if (!aid) {
62
+ return aid;
63
+ }
64
+
65
+ try {
66
+ const res = await Request.postForm("/kudas/xfwez/apps", { aid });
67
+ const realUrl = res?.meta?.success ? getLinkFromResponse(res.data) : "";
68
+ return realUrl || aid;
69
+ } catch (error) {
70
+ return aid;
71
+ }
72
+ }
73
+
74
+ function buildAppendParams(sobject, sroute, stokenKey) {
75
+ const appendParams = {};
76
+ const storageKey = stokenKey || "_mis_acis_token";
77
+ const stoken = Storage.get(storageKey);
78
+
79
+ if (stoken !== undefined && stoken !== null && stoken !== "") {
80
+ appendParams.stoken = stoken;
81
+ }
82
+
83
+ if (sroute) {
84
+ appendParams.sroute = sroute;
85
+ }
86
+
87
+ if (sobject && typeof sobject === "object" && Object.keys(sobject).length) {
88
+ appendParams.sobject = btoa(encodeURIComponent(JSON.stringify(sobject)));
89
+ }
90
+
91
+ return appendParams;
92
+ }
93
+
94
+ /**
95
+ * 解析地址中的指定参数值。
96
+ * @param {string} name 参数名。
97
+ * @param {string} url 要解析的地址,不传时默认使用当前地址。
98
+ * @return {string} 参数值;未找到时返回空字符串。
99
+ */
100
+ export function GetQueryString(name, url = window.location.href) {
101
+ const reg = new RegExp(`[?&]${name}=([^&^#^/]*)`, "i");
102
+ const res = String(url || "").match(reg);
103
+ return res ? decodeURIComponent(res[1]) : "";
104
+ }
105
+
106
+ /**
107
+ * 追加应用访问参数。
108
+ * @param {string} url 链接地址或应用 aid;不传时默认取当前地址。
109
+ * @param {Object} sobject 参数对象;会按 `btoa(encodeURIComponent(JSON.stringify(sobject)))` 编码后追加为 `sobject` 参数。
110
+ * @param {string} sroute 页面路由标识;传值后会在最终地址中追加 `sroute=xxx`。
111
+ * @param {string} stokenKey 取 `stoken` 的存储键名,默认 `_mis_acis_token`。
112
+ * @return {Promise<string>} 拼接后的链接地址。
113
+ */
114
+ export async function appendAppParams(url, sobject = {}, sroute = "", stokenKey = "_mis_acis_token") {
115
+ if (url === undefined || url === null || url === "" || url === 0 || url === "0") {
116
+ Message.toast("应用标识错误", { color: "error" });
117
+ return "";
118
+ }
119
+
120
+ const source = url || window.location.href;
121
+
122
+ if (!source) {
123
+ return "";
124
+ }
125
+
126
+ const targetUrl = isAid(source) ? await resolveAidUrl(source) : source;
127
+ return appendParamsToUrl(targetUrl, buildAppendParams(sobject, sroute, stokenKey));
128
+ }
@@ -1,14 +1,14 @@
1
1
  <template>
2
- <div class="vtk-date-selector">
3
- <VMenu
4
- v-if="!inline"
5
- v-model="showPicker"
6
- :attach="menuAttach"
7
- :location="menuLocation"
8
- :origin="menuOrigin"
9
- offset="4"
10
- :close-on-content-click="false"
11
- >
2
+ <div class="vtk-date-selector">
3
+ <VMenu
4
+ v-if="!inline"
5
+ v-model="showPicker"
6
+ :attach="menuAttach"
7
+ :location="menuLocation"
8
+ :origin="menuOrigin"
9
+ offset="4"
10
+ :close-on-content-click="false"
11
+ >
12
12
  <template #activator="{ props: menuProps }">
13
13
  <div class="date-input">
14
14
  <VTextField :model-value="displayValue" :placeholder="placeholder" :disabled="disabled" density="compact"
@@ -26,7 +26,7 @@
26
26
  </VTextField>
27
27
  </div>
28
28
  </template>
29
- <div class="date-picker-dropdown" @click.stop @mousedown.stop>
29
+ <div class="date-picker-dropdown" @click.stop @mousedown.stop>
30
30
  <!-- 头部控制区(非日期/月份范围选择模式时显示) -->
31
31
  <div v-if="!(mode === 'range' && (displayMode === 'day' || displayMode === 'month'))" class="picker-header">
32
32
  <button class="nav-btn" @click="prevPeriod">‹</button>
@@ -493,11 +493,11 @@ const props = defineProps({
493
493
  type: Function,
494
494
  default: null
495
495
  },
496
- // 禁用 Teleport 时,弹层保留在当前 DOM 树内
497
- noTeleport: {
498
- type: Boolean,
499
- default: false
500
- },
496
+ // 禁用 Teleport 时,弹层保留在当前 DOM 树内
497
+ noTeleport: {
498
+ type: Boolean,
499
+ default: false
500
+ },
501
501
  // 下拉框对齐方式: 'left' | 'right'
502
502
  placement: {
503
503
  type: String,
@@ -510,14 +510,14 @@ const props = defineProps({
510
510
  const emit = defineEmits(['update:modelValue', 'change', 'cancel', 'confirm']);
511
511
 
512
512
  // 响应式数据
513
- const showPicker = ref(false);
514
- const viewMode = ref(props.displayMode);
515
- const currentYear = ref(new Date().getFullYear());
516
- const currentMonth = ref(new Date().getMonth());
517
- const rightYear = ref(new Date().getFullYear());
518
- const rightMonth = ref(new Date().getMonth() + 1);
519
- const selectedValue = ref(null);
520
- const tempValue = ref(null);
513
+ const showPicker = ref(false);
514
+ const viewMode = ref(props.displayMode);
515
+ const currentYear = ref(new Date().getFullYear());
516
+ const currentMonth = ref(new Date().getMonth());
517
+ const rightYear = ref(new Date().getFullYear());
518
+ const rightMonth = ref(new Date().getMonth() + 1);
519
+ const selectedValue = ref(null);
520
+ const tempValue = ref(null);
521
521
 
522
522
  // 当前日期(用于判断未来日期)
523
523
  const today = new Date();
@@ -533,10 +533,10 @@ const YEAR_PANEL_CENTER_OFFSET = 4;
533
533
  const weekDays = ['日', '一', '二', '三', '四', '五', '六'];
534
534
  const monthList = ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'];
535
535
 
536
- // 显示值
537
- const menuAttach = computed(() => (props.noTeleport ? true : false));
538
-
539
- const menuLocation = computed(() => props.placement === 'right' ? 'bottom end' : 'bottom start');
536
+ // 显示值
537
+ const menuAttach = computed(() => (props.noTeleport ? true : false));
538
+
539
+ const menuLocation = computed(() => props.placement === 'right' ? 'bottom end' : 'bottom start');
540
540
 
541
541
  const menuOrigin = computed(() => props.placement === 'right' ? 'top end' : 'top start');
542
542
 
@@ -1206,18 +1206,18 @@ watch(() => props.modelValue, (newValue) => {
1206
1206
  color: rgb(var(--v-theme-on-surface), 0.87);
1207
1207
  }
1208
1208
 
1209
- .date-picker-dropdown {
1210
- background: rgb(var(--v-theme-surface));
1211
- border-radius: 8px;
1212
- box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
1213
- border: 1px solid rgb(var(--v-theme-on-surface), 0.12);
1214
- }
1209
+ .date-picker-dropdown {
1210
+ background: rgb(var(--v-theme-surface));
1211
+ border-radius: 8px;
1212
+ box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
1213
+ border: 1px solid rgb(var(--v-theme-on-surface), 0.12);
1214
+ }
1215
1215
 
1216
- .date-picker-dropdown.inline-mode {
1217
- box-shadow: none;
1218
- width: fit-content;
1219
- border: none;
1220
- }
1216
+ .date-picker-dropdown.inline-mode {
1217
+ box-shadow: none;
1218
+ width: fit-content;
1219
+ border: none;
1220
+ }
1221
1221
 
1222
1222
  .picker-header {
1223
1223
  display: flex;
@@ -1533,4 +1533,4 @@ watch(() => props.modelValue, (newValue) => {
1533
1533
  .btn-primary:hover {
1534
1534
  opacity: 0.9;
1535
1535
  }
1536
- </style>
1536
+ </style>