Commit 84d019c37a6a2f55954f2819417afa2bd205fab3

Authored by xp.Huang
2 parents b5f1369a eb0992b5

Merge branch 'd-ww' into 'main'

fix: device list not found device image will throw error && add git commit hook

See merge request huang/yun-teng-iot-front!339
  1 +module.exports = {
  2 + '*.{js,jsx,ts,tsx}': ['eslint --fix', 'prettier --write'],
  3 + '{!(package)*.json,*.code-snippets,.!(browserslist)*rc}': ['prettier --write--parser json'],
  4 + 'package.json': ['prettier --write'],
  5 + '*.vue': ['eslint --fix', 'prettier --write', 'stylelint --fix'],
  6 + '*.{scss,less,styl,html}': ['stylelint --fix', 'prettier --write'],
  7 + '*.md': ['prettier --write'],
  8 +};
... ...
  1 +#!/usr/bin/env sh
  2 +. "$(dirname -- "$0")/_/husky.sh"
  3 +
  4 +npm run lint:lint-staged
... ...
... ... @@ -28,9 +28,9 @@
28 28 :showBadge="false"
29 29 :simpleShow="true"
30 30 :imgList="
31   - typeof record.deviceInfo.avatar !== 'undefined' &&
32   - record.deviceInfo.avatar !== '' &&
33   - record.deviceInfo.avatar != null
  31 + typeof record?.deviceInfo?.avatar !== 'undefined' &&
  32 + record?.deviceInfo?.avatar !== '' &&
  33 + record?.deviceInfo?.avatar != null
34 34 ? [record.deviceInfo.avatar]
35 35 : null
36 36 "
... ...
... ... @@ -44,7 +44,7 @@
44 44 </div>
45 45 </div>
46 46 <div v-else style="display: flex; justify-content: center; align-items: center">
47   - <div style="position: relative; left: 0rem; top: 3rem">暂无数据</div>
  47 + <div style="position: relative; left: 0; top: 3rem">暂无数据</div>
48 48 </div>
49 49 </Spin>
50 50 </div>
... ... @@ -78,7 +78,7 @@
78 78 defineEmits(['register']);
79 79 const heightNum = ref(800);
80 80
81   - let currentRecord: ExecuteReportRecord = {};
  81 + let currentRecord: ExecuteReportRecord = {} as unknown as ExecuteReportRecord;
82 82
83 83 const chartInstance = ref<
84 84 { device: string; name: string; attributes: string[]; active?: string }[]
... ... @@ -265,6 +265,7 @@
265 265 </script>
266 266 <style lang="less" scoped>
267 267 @import url('./ReportPreviewModal.less');
  268 +
268 269 .chart-style {
269 270 display: flex;
270 271 flex-wrap: wrap;
... ...
... ... @@ -3,7 +3,7 @@
3 3 import { DropMenu } from '/@/components/Dropdown';
4 4 import Dropdown from '/@/components/Dropdown/src/Dropdown.vue';
5 5 import { Tooltip } from 'ant-design-vue';
6   - import SvgIcon from '/@/components/Icon/src/SvgIcon.vue';
  6 + // import SvgIcon from '/@/components/Icon/src/SvgIcon.vue';
7 7 import { isBataBoardSharePage, MoreActionEvent } from '../../config/config';
8 8 import { computed } from '@vue/reactivity';
9 9 import { usePermission } from '/@/hooks/web/usePermission';
... ... @@ -14,7 +14,7 @@
14 14 const props = defineProps<{
15 15 id: string;
16 16 record: DataSource[];
17   - panelName: string;
  17 + panelName?: string;
18 18 }>();
19 19 const { hasPermission } = usePermission();
20 20 const dropMenuList = computed<DropMenu[]>(() => {
... ...