inl-ui 0.1.121-mtapi → 0.1.122

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.
Files changed (36) hide show
  1. package/README.md +49 -49
  2. package/dist/components/index.cjs +34 -36
  3. package/dist/components/index.js +34 -36
  4. package/dist/hooks/index.cjs +2 -2
  5. package/dist/hooks/index.js +2 -2
  6. package/dist/index.cjs +44 -46
  7. package/dist/index.d.ts +1 -1
  8. package/dist/index.js +44 -46
  9. package/dist/theme/index.js +70 -70
  10. package/dist/theme/scripts/dark-vars.js +21 -21
  11. package/dist/theme/scripts/default-vars.js +25 -25
  12. package/dist/theme/scripts/light-vars.js +22 -22
  13. package/dist/theme/style/color/bezierEasing.less +110 -110
  14. package/dist/theme/style/color/colorPalette.less +81 -81
  15. package/dist/theme/style/color/colors.less +162 -162
  16. package/dist/theme/style/color/tinyColor.less +1184 -1184
  17. package/dist/theme/style/compact.less +4 -4
  18. package/dist/theme/style/dark.less +4 -4
  19. package/dist/theme/style/default.less +4 -4
  20. package/dist/theme/style/index.less +2 -2
  21. package/dist/theme/style/index.tsx +2 -2
  22. package/dist/theme/style/themes/compact.less +295 -295
  23. package/dist/theme/style/themes/dark.less +790 -790
  24. package/dist/theme/style/themes/default.less +1067 -1067
  25. package/dist/theme/style/themes/index.less +7 -7
  26. package/dist/theme/style/themes/var-dark.less +343 -343
  27. package/dist/theme/style/themes/var-default.less +184 -184
  28. package/dist/theme/style/themes/variable.less +1122 -1122
  29. package/dist/theme/style/variable.less +4 -4
  30. package/dist/tplib/index.cjs +9 -9
  31. package/dist/tplib/index.js +9 -9
  32. package/dist/utils/index.cjs +2 -2
  33. package/dist/utils/index.js +2 -2
  34. package/dist/video/index.cjs +12 -12
  35. package/dist/video/index.js +12 -12
  36. package/package.json +1 -1
package/README.md CHANGED
@@ -1,49 +1,49 @@
1
- # 工业PC ui库
2
-
3
- 前端通用库,包括组件、hooks、utils等。
4
-
5
- ### 运行
6
-
7
- + 开发模式 yarn dev
8
- + 生产打包 yarn build
9
- + 生成文档 yarn build:docs
10
- + 打包图扑工具 yarn buildtp
11
-
12
- ### 使用方法
13
-
14
- ```javascript
15
- import inl from 'inl-ui';
16
- import 'inl-ui/dist/style.css';
17
-
18
- vue.use(inl)
19
- ```
20
-
21
-
22
-
23
- ### 激活主题
24
-
25
- **vite.config.ts**
26
-
27
- ```javascript
28
- const additionalData = require("inl-ui/dist/theme").default;
29
-
30
- ...
31
-
32
- css: {
33
- preprocessorOptions: {
34
- less: {
35
- javascriptEnabled: true,
36
- additionalData,
37
- },
38
- },
39
- },
40
- ```
41
-
42
- ### 文档链接
43
-
44
- ##### [组件文档](./src/components/README.md)
45
-
46
- ##### [hooks文档](./src/hooks/README.md)
47
-
48
- ##### [Utils文档](./src/utils/README.md)
49
-
1
+ # 工业PC ui库
2
+
3
+ 前端通用库,包括组件、hooks、utils等。
4
+
5
+ ### 运行
6
+
7
+ + 开发模式 yarn dev
8
+ + 生产打包 yarn build
9
+ + 生成文档 yarn build:docs
10
+ + 打包图扑工具 yarn buildtp
11
+
12
+ ### 使用方法
13
+
14
+ ```javascript
15
+ import inl from 'inl-ui';
16
+ import 'inl-ui/dist/style.css';
17
+
18
+ vue.use(inl)
19
+ ```
20
+
21
+
22
+
23
+ ### 激活主题
24
+
25
+ **vite.config.ts**
26
+
27
+ ```javascript
28
+ const additionalData = require("inl-ui/dist/theme").default;
29
+
30
+ ...
31
+
32
+ css: {
33
+ preprocessorOptions: {
34
+ less: {
35
+ javascriptEnabled: true,
36
+ additionalData,
37
+ },
38
+ },
39
+ },
40
+ ```
41
+
42
+ ### 文档链接
43
+
44
+ ##### [组件文档](./src/components/README.md)
45
+
46
+ ##### [hooks文档](./src/hooks/README.md)
47
+
48
+ ##### [Utils文档](./src/utils/README.md)
49
+
@@ -106,7 +106,7 @@ const getCommonHeaders = () => {
106
106
  };
107
107
  const defaultConfig = {
108
108
  timeout: 1e3 * 10,
109
- baseURL: "/mtapi/"
109
+ baseURL: "/api/"
110
110
  };
111
111
  class ApiInstance {
112
112
  instance;
@@ -212,7 +212,7 @@ async function checkIframeUrl(url) {
212
212
  const iframeUrl = getIframeUrl(url);
213
213
  let code = 200;
214
214
  try {
215
- const res = await fetch(`/mtapi/common/v1/sysconfig/curlForResponseCode?requestMethod=get&url=${encodeURIComponent(iframeUrl)}`, {
215
+ const res = await fetch(`/api/common/v1/sysconfig/curlForResponseCode?requestMethod=get&url=${encodeURIComponent(iframeUrl)}`, {
216
216
  headers: getCommonHeaders()
217
217
  });
218
218
  if (res.status !== 404) {
@@ -7583,7 +7583,7 @@ class Login$1 {
7583
7583
  constructor() {
7584
7584
  this.getQueryInfo();
7585
7585
  this.config.axios = new ApiInstance({
7586
- baseURL: "/mtapi/common/v1/"
7586
+ baseURL: "/api/common/v1/"
7587
7587
  }).instance;
7588
7588
  }
7589
7589
  checkSystemInfo() {
@@ -7803,7 +7803,7 @@ var loginBox = vue.defineComponent({
7803
7803
  });
7804
7804
  const isClould = vue.inject("isClould");
7805
7805
  const instance = new ApiInstance({
7806
- baseURL: "/mtapi/common/v1/"
7806
+ baseURL: "/api/common/v1/"
7807
7807
  }).instance;
7808
7808
  const systemTitle = vue.inject("systemTitle");
7809
7809
  const platformLogo = vue.inject("platformLogo");
@@ -8467,26 +8467,26 @@ const isIndependentApp = query => !!query.token && !!query.onlyPage;
8467
8467
  const loginFun = new Login$1();
8468
8468
  const httpUtil = {
8469
8469
  requestLogo: async () => {
8470
- const res = await fetch("/mtapi/common/v1/sysconfig/searchImage?imgType=4&editImg=1&clientType=web");
8470
+ const res = await fetch("/api/common/v1/sysconfig/searchImage?imgType=4&editImg=1&clientType=web");
8471
8471
  const blob = await res.blob();
8472
8472
  return URL.createObjectURL(blob);
8473
8473
  },
8474
8474
  requestUserTree: async () => {
8475
8475
  const headers = getCommonHeaders();
8476
- const res = await fetch("/mtapi/common/v1/menu/tree", {
8476
+ const res = await fetch("/api/common/v1/menu/tree", {
8477
8477
  headers
8478
8478
  });
8479
8479
  const treeData = await res.json();
8480
8480
  return treeData.data;
8481
8481
  },
8482
8482
  requestCopyright: async () => {
8483
- const res = await fetch("/mtapi/common/v1/sysconfig/getSysConfig?clientType=web");
8483
+ const res = await fetch("/api/common/v1/sysconfig/getSysConfig?clientType=web");
8484
8484
  const data = await res.json();
8485
8485
  return data.data.homepageCopyright;
8486
8486
  },
8487
8487
  postLogout: async () => {
8488
8488
  const headers = getCommonHeaders();
8489
- await fetch("/mtapi/common/v1/log/insert", {
8489
+ await fetch("/api/common/v1/log/insert", {
8490
8490
  method: "POST",
8491
8491
  headers: {
8492
8492
  ...headers,
@@ -8737,7 +8737,6 @@ const getDetailContainer = () => vue.defineComponent({
8737
8737
  if (newTab) {
8738
8738
  dataId.value = newTab;
8739
8739
  }
8740
- dataId.value = props.name + dataId.value;
8741
8740
  const tab = {
8742
8741
  name,
8743
8742
  url: route.fullPath,
@@ -8745,10 +8744,9 @@ const getDetailContainer = () => vue.defineComponent({
8745
8744
  uniqueKey: dataId.value,
8746
8745
  icon: props.icon,
8747
8746
  isExtraTab: true,
8748
- params: ___default["default"].omit(route.query, "name"),
8749
- ogiginId: newRoute.params.id || newRoute.query.id
8747
+ params: ___default["default"].omit(route.query, "name")
8750
8748
  };
8751
- const detail = detailList.value.find(item => item.uniqueKey === tab.uniqueKey);
8749
+ const detail = detailList.value.find(item => item.key + item.uniqueKey === tab.key + tab.uniqueKey);
8752
8750
  if (detail) {
8753
8751
  detail.url = newRoute.fullPath;
8754
8752
  if (Array.isArray(qiankunState.value.extraTabs)) {
@@ -8777,7 +8775,7 @@ const getDetailContainer = () => vue.defineComponent({
8777
8775
  }
8778
8776
  });
8779
8777
  }
8780
- const activeTabKey = tab.uniqueKey;
8778
+ const activeTabKey = props.name + tab.uniqueKey;
8781
8779
  qiankunState.value = {
8782
8780
  ...(qiankunState.value ?? {}),
8783
8781
  activeTabKey
@@ -8840,7 +8838,7 @@ const getDetailContainer = () => vue.defineComponent({
8840
8838
  }
8841
8839
  }, [vue.createVNode(props.cpn, {
8842
8840
  "key": item.id,
8843
- "id": item.ogiginId,
8841
+ "id": item.id,
8844
8842
  "isActive": isActive.value && isDetailActive,
8845
8843
  "onClose": () => handleClose(item),
8846
8844
  "onRefresh": () => handleRefresh(item)
@@ -9139,7 +9137,7 @@ const VideoBox = vue.defineComponent({
9139
9137
  }]];
9140
9138
  const infos = vue.ref([]);
9141
9139
  const videoMove = async direction => {
9142
- await axios__default["default"].get("/mtapi/vms/v1/control/hik/control", {
9140
+ await axios__default["default"].get("/api/vms/v1/control/hik/control", {
9143
9141
  params: {
9144
9142
  cameraUuid: _prop.camera,
9145
9143
  command: direction
@@ -9154,7 +9152,7 @@ const VideoBox = vue.defineComponent({
9154
9152
  const arr = infos.value.map(info => {
9155
9153
  return {};
9156
9154
  });
9157
- const res = await axios__default["default"].get("/mtapi/vms/v1/camera/getThingDevice", {
9155
+ const res = await axios__default["default"].get("/api/vms/v1/camera/getThingDevice", {
9158
9156
  params: {
9159
9157
  cameraUuid: uuid
9160
9158
  },
@@ -9170,7 +9168,7 @@ const VideoBox = vue.defineComponent({
9170
9168
  };
9171
9169
  const camera = vue.ref({});
9172
9170
  const getVideoDetail = async val => {
9173
- const res = await axios__default["default"].get(`/mtapi/vms/v1/camera/getByUuid?uuid=${val}`, {
9171
+ const res = await axios__default["default"].get(`/api/vms/v1/camera/getByUuid?uuid=${val}`, {
9174
9172
  headers: {
9175
9173
  token: sessionStorage.getItem("token") || ""
9176
9174
  }
@@ -9201,7 +9199,7 @@ const VideoBox = vue.defineComponent({
9201
9199
  immediate: true
9202
9200
  });
9203
9201
  const changeStream = async code => {
9204
- const res = await axios__default["default"].get(`/mtapi/vms/v1/camera/getWebrtcUrls`, {
9202
+ const res = await axios__default["default"].get(`/api/vms/v1/camera/getWebrtcUrls`, {
9205
9203
  headers: {
9206
9204
  token: sessionStorage.getItem("token") || ""
9207
9205
  },
@@ -9424,7 +9422,7 @@ var Tree = vue.defineComponent({
9424
9422
  });
9425
9423
  const getQueryGroup = async params => {
9426
9424
  return new Promise(async resolve => {
9427
- const res = await axios__default["default"].get("/mtapi/vms/v1/cameraGroup/tree", {
9425
+ const res = await axios__default["default"].get("/api/vms/v1/cameraGroup/tree", {
9428
9426
  headers: {
9429
9427
  token: sessionStorage.getItem("token") || ""
9430
9428
  },
@@ -9442,7 +9440,7 @@ var Tree = vue.defineComponent({
9442
9440
  };
9443
9441
  const getGroup = async () => {
9444
9442
  return new Promise(async resolve => {
9445
- const res = await axios__default["default"].get("/mtapi/vms/v1/cameraGroupType/findAll", {
9443
+ const res = await axios__default["default"].get("/api/vms/v1/cameraGroupType/findAll", {
9446
9444
  headers: {
9447
9445
  token: sessionStorage.getItem("token") || ""
9448
9446
  }
@@ -9718,7 +9716,7 @@ const VideoBoxV2 = vue.defineComponent({
9718
9716
  showInfo.value = _prop.showInfo;
9719
9717
  });
9720
9718
  const videoMove = async direction => {
9721
- await axios__default["default"].get("/mtapi/vms/v1/control/hik/control", {
9719
+ await axios__default["default"].get("/api/vms/v1/control/hik/control", {
9722
9720
  params: {
9723
9721
  cameraUuid: _prop.camera,
9724
9722
  command: direction
@@ -9743,7 +9741,7 @@ const VideoBoxV2 = vue.defineComponent({
9743
9741
  if (tcpcArr.length === 0) {
9744
9742
  return;
9745
9743
  }
9746
- const res = await axios__default["default"].post("/mtapi/mtip/thing/v2/thingClient/getPropertiesValueById", tcpcArr, {
9744
+ const res = await axios__default["default"].post("/api/mtip/thing/v2/thingClient/getPropertiesValueById", tcpcArr, {
9747
9745
  headers: {
9748
9746
  token: sessionStorage.getItem("token")
9749
9747
  }
@@ -9764,7 +9762,7 @@ const VideoBoxV2 = vue.defineComponent({
9764
9762
  const arr = infos.value.map(info => {
9765
9763
  return {};
9766
9764
  });
9767
- const res = await axios__default["default"].post("/mtapi/vms/v1/cameraRelThing/getByParam", {
9765
+ const res = await axios__default["default"].post("/api/vms/v1/cameraRelThing/getByParam", {
9768
9766
  cameraUuid: uuid2
9769
9767
  }, {
9770
9768
  headers: {
@@ -9784,7 +9782,7 @@ const VideoBoxV2 = vue.defineComponent({
9784
9782
  };
9785
9783
  const camera = vue.ref({});
9786
9784
  const getVideoDetail = async val => {
9787
- const res = await axios__default["default"].get(`/mtapi/vms/v1/camera/getByUuid?uuid=${val}`, {
9785
+ const res = await axios__default["default"].get(`/api/vms/v1/camera/getByUuid?uuid=${val}`, {
9788
9786
  headers: {
9789
9787
  token: sessionStorage.getItem("token") || ""
9790
9788
  }
@@ -9901,7 +9899,7 @@ const VideoBoxV2 = vue.defineComponent({
9901
9899
  immediate: true
9902
9900
  });
9903
9901
  const changeStream = async code => {
9904
- const res = await axios__default["default"].get(`/mtapi/vms/v1/camera/getWebrtcUrls`, {
9902
+ const res = await axios__default["default"].get(`/api/vms/v1/camera/getWebrtcUrls`, {
9905
9903
  headers: {
9906
9904
  token: sessionStorage.getItem("token") || ""
9907
9905
  },
@@ -10887,7 +10885,7 @@ const VideoPlayerV1 = vue.defineComponent({
10887
10885
  videoInfo2.value = camera;
10888
10886
  init();
10889
10887
  } else if (camera && typeof camera === "string") {
10890
- const res = await axios__default["default"].post(`/mtapi/sfvideo/v1/camera/getCameraByCameraId`, {
10888
+ const res = await axios__default["default"].post(`/api/sfvideo/v1/camera/getCameraByCameraId`, {
10891
10889
  id: camera
10892
10890
  }, {
10893
10891
  headers: {
@@ -11687,7 +11685,7 @@ var index$3 = installComponent(PeopleSelect, "people-select");
11687
11685
 
11688
11686
  const getParamList$1 = async data => {
11689
11687
  const headers = getCommonHeaders();
11690
- const res = await fetch("/mtapi/common/v1/param/group/list", {
11688
+ const res = await fetch("/api/common/v1/param/group/list", {
11691
11689
  method: "POST",
11692
11690
  body: JSON.stringify(data),
11693
11691
  headers
@@ -11696,7 +11694,7 @@ const getParamList$1 = async data => {
11696
11694
  };
11697
11695
  const getParamDefineList$1 = async groupId => {
11698
11696
  const headers = getCommonHeaders();
11699
- const res = await fetch(`/mtapi/common/v1/param/group/getDefineAndValueListByGroupId?groupId=${groupId}`, {
11697
+ const res = await fetch(`/api/common/v1/param/group/getDefineAndValueListByGroupId?groupId=${groupId}`, {
11700
11698
  method: "GET",
11701
11699
  headers
11702
11700
  });
@@ -11704,7 +11702,7 @@ const getParamDefineList$1 = async groupId => {
11704
11702
  };
11705
11703
  const batchSaveParamsValue$1 = async form => {
11706
11704
  const headers = getCommonHeaders();
11707
- const res = await fetch("/mtapi/common/v1/param/value/updateBatch", {
11705
+ const res = await fetch("/api/common/v1/param/value/updateBatch", {
11708
11706
  method: "POST",
11709
11707
  headers,
11710
11708
  body: JSON.stringify(form)
@@ -12496,7 +12494,7 @@ const ParamItem = vue.defineComponent({
12496
12494
 
12497
12495
  const getParamList = async data => {
12498
12496
  const headers = getCommonHeaders();
12499
- const res = await fetch("/mtapi/common/v1/param/group/list", {
12497
+ const res = await fetch("/api/common/v1/param/group/list", {
12500
12498
  method: "POST",
12501
12499
  body: JSON.stringify(data),
12502
12500
  headers
@@ -12505,7 +12503,7 @@ const getParamList = async data => {
12505
12503
  };
12506
12504
  const getParamDefineList = async groupId => {
12507
12505
  const headers = getCommonHeaders();
12508
- const res = await fetch(`/mtapi/common/v1/param/group/getDefineAndValueListByGroupId?groupId=${groupId}`, {
12506
+ const res = await fetch(`/api/common/v1/param/group/getDefineAndValueListByGroupId?groupId=${groupId}`, {
12509
12507
  method: "GET",
12510
12508
  headers
12511
12509
  });
@@ -12513,7 +12511,7 @@ const getParamDefineList = async groupId => {
12513
12511
  };
12514
12512
  const batchSaveParamsValue = async form => {
12515
12513
  const headers = getCommonHeaders();
12516
- const res = await fetch("/mtapi/common/v1/param/value/updateBatch", {
12514
+ const res = await fetch("/api/common/v1/param/value/updateBatch", {
12517
12515
  method: "POST",
12518
12516
  headers,
12519
12517
  body: JSON.stringify(form)
@@ -13168,7 +13166,7 @@ const SszComment = vue.defineComponent({
13168
13166
  // 评论api的前缀
13169
13167
  baseUrl: {
13170
13168
  type: String,
13171
- default: "/mtapi/taskcoordinationcenter/v2/tri/"
13169
+ default: "/api/taskcoordinationcenter/v2/tri/"
13172
13170
  },
13173
13171
  // 传给commentBlock的参数 api: http://192.168.5.46:36000/comment
13174
13172
  commentProps: {
@@ -13280,7 +13278,7 @@ function formatDataString(str) {
13280
13278
  function request(question, streamCallback, doneCallback) {
13281
13279
  const controller = new AbortController();
13282
13280
  const signal = controller.signal;
13283
- fetch("/mtapi/chat/v1/chat/chat", {
13281
+ fetch("/api/chat/v1/chat/chat", {
13284
13282
  signal,
13285
13283
  method: "POST",
13286
13284
  headers: {
@@ -13397,7 +13395,7 @@ async function audioToText(file) {
13397
13395
  const formData = new FormData();
13398
13396
  formData.append("file", file);
13399
13397
  formData.append("upload_id", "1");
13400
- const [path] = await fetch("/mtapi/chat/v1/upload", {
13398
+ const [path] = await fetch("/api/chat/v1/upload", {
13401
13399
  // headers,
13402
13400
  method: "POST",
13403
13401
  body: formData
@@ -13408,7 +13406,7 @@ async function audioToText(file) {
13408
13406
  }
13409
13407
  const {
13410
13408
  result
13411
- } = await fetch(`/mtapi/chat/v1/translate?path=${path}&session_hash=1`, {
13409
+ } = await fetch(`/api/chat/v1/translate?path=${path}&session_hash=1`, {
13412
13410
  headers,
13413
13411
  method: "POST"
13414
13412
  }).then(res => res.json());