inl-ui 0.0.77 → 0.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.
@@ -0,0 +1,17 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ showCreate: {
3
+ type: BooleanConstructor;
4
+ default: boolean;
5
+ };
6
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("refresh" | "update:showCreate")[], "refresh" | "update:showCreate", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
7
+ showCreate: {
8
+ type: BooleanConstructor;
9
+ default: boolean;
10
+ };
11
+ }>> & {
12
+ onRefresh?: ((...args: any[]) => any) | undefined;
13
+ "onUpdate:showCreate"?: ((...args: any[]) => any) | undefined;
14
+ }, {
15
+ showCreate: boolean;
16
+ }>;
17
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inl-ui",
3
- "version": "0.0.77",
3
+ "version": "0.0.78",
4
4
  "description": "工业 pc ui库",
5
5
  "main": "dist/index.js",
6
6
  "types": "./dist/types/src/index.d.ts",
@@ -7,11 +7,12 @@ import { getAlarmTypeMap, getVideo } from "@/api/alarm/alarmRecord";
7
7
  import { getVideoBaseUrl } from "@/api/alarm/alarmRecord";
8
8
  import { IUrlObj } from "../warning-record";
9
9
  import utils from "@/utils";
10
+ import * as api from "@/api/alarm/alarmRecord";
10
11
 
11
12
  const AlarmDetail = defineComponent({
12
13
  props: {
13
- record: {
14
- type: Object,
14
+ id: {
15
+ type: String,
15
16
  },
16
17
  onClose: {
17
18
  type: Function,
@@ -28,7 +29,11 @@ const AlarmDetail = defineComponent({
28
29
  props.onClose?.();
29
30
  };
30
31
 
31
- const alarmDetail = ref<any>(cloneDeep(props.record));
32
+ const alarmDetail = ref<any>({});
33
+ const getAlarmDetail = async () => {
34
+ const { data } = await api.getAlarmDetail()(props.id);
35
+ alarmDetail.value = data;
36
+ };
32
37
 
33
38
  // 获取视频
34
39
  const videoBaseUrl = ref("");
@@ -46,7 +51,6 @@ const AlarmDetail = defineComponent({
46
51
  (item: any) => item.relatedPath
47
52
  );
48
53
  };
49
- getAlarmVideo();
50
54
 
51
55
  // 图片
52
56
  const imageUrlList = ref([]);
@@ -128,7 +132,9 @@ const AlarmDetail = defineComponent({
128
132
  chartIns.value.data(chartData.value);
129
133
  chartIns.value.render();
130
134
  };
131
- onMounted(() => {
135
+ onMounted(async () => {
136
+ await getAlarmDetail();
137
+ getAlarmVideo();
132
138
  if (
133
139
  alarmDetail.value.alarmLifecycleList &&
134
140
  alarmDetail.value.alarmLifecycleList.length
@@ -66,7 +66,7 @@ const WarningRecord = defineComponent({
66
66
  <div class="warning-record-index flex" style="overflow: hidden;">
67
67
  {isDetailShow.value ? (
68
68
  <AlarmDetail
69
- record={detailRecord.value}
69
+ id={detailRecord.value?.id}
70
70
  onClose={() => (isDetailShow.value = false)}
71
71
  />
72
72
  ) : (