@tmesoft/data-screen-show 1.0.0 → 1.0.2

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/README.md CHANGED
@@ -1,3 +1,12 @@
1
+ 项目使用npm下载,npm i
2
+ 运行环境 node:18.17.1,npm:9.6.7 。其他版本未尝试
3
+ 发布步骤:
4
+ 1. 打包npm: run build
5
+ 2. 切换到npmjs源:npm config set registry https://registry.npmjs.org/
6
+ 3. 登录npm: npm login
7
+ 4. 发布到npm: npm run publish
8
+
9
+
1
10
  # data-screen-show
2
11
  ## 如何使用
3
12
  目前用于ilim、rlim、hps-102d数据大屏项目,用于大屏显示
@@ -5,6 +14,7 @@
5
14
 
6
15
  ## demo
7
16
  ```vue
17
+ <!--src/view/index.vue文件-->
8
18
  <!--ts-->
9
19
  // 传入标题信息
10
20
  // 大屏主标题
@@ -232,57 +242,102 @@ target.style.top = `${top}rem`
232
242
  // 获取师资队伍、科研成果、设备资产数据
233
243
  getAllApiData()
234
244
  })
245
+ const renderPart = (id: number) => {
246
+ const isContainId = (id: number) => {
247
+ if (dataCardIdListIds.value?.length === 0) return false
248
+ return dataCardIdListIds.value?.some(item => item === id)
249
+ }
250
+ return isContainId(id)
251
+ }
252
+ const EscreenDataCardAllId = ref<any>({
253
+ 师资队伍: 1,
254
+ 科研成果: 2,
255
+ 设备资产: 3,
256
+ 预约开放: 4,
257
+ 空间可视化: 5,
258
+ 安全数据: 6,
259
+ 实验人次: 7,
260
+ 实验报告: 8,
261
+ 实验成绩: 9,
262
+ 实验交流: 10
263
+ })
235
264
 
236
265
  <!--template-->
237
- <DataScreenShow ref="dataScreenShowRef" :page-title="pageTitle" :sub-title="subTitle" :dataCardIdListIds="dataCardIdListIds" :customCardList="customCardList" >
238
- <template #main-floor>
239
- <div>3d楼层</div>
240
- </template>
241
- <!-- 预约开放 -->
242
- <template #reservation-info>
243
-
244
- <div>预约开放</div>
245
- </template>
246
- <!-- 安全模块-->
247
- <template #safe-module>
248
- <div>安全模块</div>
249
- </template>
250
-
251
-
252
- <!-- 实验人次 -->
253
- <template #person-time-info>
254
- <div>实验人次</div>
255
- </template>
256
-
257
- <!-- 实验报告 -->
258
- <template #report-info>
259
- <div>实验报告</div>
260
- </template>
261
-
262
- <!-- 实验成绩 -->
263
- <template #experimental-results-info>
264
- <div>实验成绩</div>
265
- </template>
266
+ <DataScreenShow ref="dataScreenShowRef" :page-title="pageTitle" :sub-title="subTitle" :dataCardIdListIds="dataCardIdListIds" :customCardList="customCardList" >
267
+ <!-- 预约开放 -->
268
+ <div
269
+ ref="reservationInfoRef"
270
+ class="info-item"
271
+ :class="`data-target${EscreenDataCardAllId?.预约开放}`"
272
+ v-if="renderPart(EscreenDataCardAllId?.预约开放)"
273
+ >
274
+ <!-- 3d 2d楼层模块 -->
275
+ <div
276
+ class="main-floor-container info-item"
277
+ v-if="renderPart(EscreenDataCardAllId?.空间可视化)"
278
+ :class="`data-target${EscreenDataCardAllId?.空间可视化}`"
279
+ >
280
+ 3d 2d楼层模块
281
+ </div>
282
+ <!-- 安全模块-->
283
+ <div class="info-item"
284
+ :class="`data-target${EscreenDataCardAllId?.安全数据}`"
285
+ v-if="renderPart(EscreenDataCardAllId?.安全数据)"
286
+ ref="safeRef" >
287
+ 安全模块
288
+ </div>
289
+ <!-- 实验人次 -->
290
+ <div
291
+ class="info-item"
292
+ :class="`data-target${EscreenDataCardAllId?.实验人次}`"
293
+ v-if="renderPart(EscreenDataCardAllId?.实验人次)"
294
+ >
295
+ 实验人次
266
296
 
267
- <!-- 实验交流 -->
268
- <template #experimental-communication>
269
- <div>实验交流</div>
270
- </template>
271
- </DataScreenShow>
297
+ </div>
298
+ <!-- 实验报告 -->
299
+ <div
300
+ ref="reportInfoRef"
301
+ :class="`data-target${EscreenDataCardAllId?.实验报告}`"
302
+ class="info-item"
303
+ v-if="renderPart(EscreenDataCardAllId?.实验报告)"
304
+ >
305
+ 实验报告
306
+ </div>
307
+ <!-- 实验成绩 -->
308
+ <div
309
+ ref="experimentalResultsInfoRef"
310
+ class="info-item"
311
+ :class="`data-target${EscreenDataCardAllId?.实验成绩}`"
312
+ v-if="renderPart(EscreenDataCardAllId?.实验成绩)"
313
+ >
314
+ 实验成绩
315
+ </div>
316
+ <!-- 实验交流 -->
317
+ <div
318
+ ref="experimentalCommunicationRef"
319
+ class="info-item"
320
+ :class="`data-target${EscreenDataCardAllId?.实验交流}`"
321
+ v-if="renderPart(EscreenDataCardAllId?.实验交流)"
322
+ >
323
+ 实验交流
324
+ </div>
325
+ </div>
326
+ </DataScreenShow>
272
327
 
273
328
 
274
329
  ```
275
330
 
276
331
  ## 方法
277
332
 
278
- | Name | Description | type | default |
279
- |--------------|-------------|-------------------------------|---------|
280
- | setJSON | 设置所有数据卡 | | {'师资队伍': 1,} |
333
+ | Name | Description | type | default |
334
+ |--------------|--------------|-------------------------------|---------|
335
+ | setJSON | 设置所有可能显示的数据卡 | | {'师资队伍': 1,} |
281
336
  ## 传值
282
337
 
283
- | Name | Description | type | default |
284
- |-----------|--------------|--------|---------|
285
- | pageTitle | 标题 | string | ‘’ |
286
- | subTitle | 副标题标题 | string | ‘’ |
287
- | dataCardIdListIds | 需要显示的数据卡id集合 | string | ‘’ |
288
- | customCardList | 自定义卡数据 | CustomListPage[] | [] |
338
+ | Name | Description | type | default |
339
+ |-----------|-----------------|--------|---------|
340
+ | pageTitle | 标题 | string | ‘’ |
341
+ | subTitle | 副标题标题 | string | ‘’ |
342
+ | dataCardIdListIds | 需要显示在页面的数据卡id集合 | string | ‘’ |
343
+ | customCardList | 自定义卡数据列表 | CustomListPage[] | [] |
@@ -22,7 +22,6 @@ type: PropType_2<CustomListPage[]>;
22
22
  default: () => never[];
23
23
  };
24
24
  }>, {
25
- chartResize: () => void;
26
25
  setDataCardJson: (_dataCardJson: any) => void;
27
26
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<globalThis.ExtractPropTypes<{
28
27
  subTitle: {
@@ -49,13 +48,7 @@ customCardList: CustomListPage[];
49
48
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
50
49
 
51
50
  declare function __VLS_template(): {
52
- "reservation-info"?(_: {}): any;
53
- "main-floor"?(_: {}): any;
54
- "safe-module"?(_: {}): any;
55
- "person-time-info"?(_: {}): any;
56
- "report-info"?(_: {}): any;
57
- "experimental-results-info"?(_: {}): any;
58
- "experimental-communication"?(_: {}): any;
51
+ default?(_: {}): any;
59
52
  };
60
53
 
61
54
  declare type __VLS_WithTemplateSlots<T, S> = T & {