Commit a9490791c5fe3c9d4b32e9a5da0d8b0d9668afde

Authored by xp.Huang
2 parents ecacbce6 1da5a8e6

Merge branch 'ft' into 'main_dev'

fix: 修改Teambition上的问题

See merge request yunteng/thingskit-front!630
... ... @@ -83,12 +83,11 @@
83 83 chartsInstance[key!] = echarts.init(
84 84 document.getElementById(`chartPie${key}`) as HTMLElement
85 85 );
86   - console.log('11', skinName.value);
87 86 const option = {
88 87 backgroundColor: skinName.value,
89 88 tooltip: {
90 89 trigger: 'item',
91   - formatter: `${legendKey}设备${((value! / total!) * 100).toFixed(2)}%`,
  90 + formatter: `${legendKey}设备${((!value ? 0 : value! / total!) * 100).toFixed(2)}%`,
92 91 },
93 92 graphic: [
94 93 {
... ... @@ -113,7 +112,7 @@
113 112 normal: {
114 113 show: true,
115 114 position: 'outer',
116   - formatter: `${legendKey}${((value! / total!) * 100).toFixed(2)}%`,
  115 + formatter: `${legendKey}${((!value ? 0 : value! / total!) * 100).toFixed(2)}%`,
117 116 borderWidth: 5,
118 117 borderRadius: 0,
119 118 padding: [90, -30],
... ... @@ -124,9 +123,6 @@
124 123 ],
125 124 };
126 125 chartsInstance[key!].setOption(option);
127   - // chartsInstance[key!].setOption({
128   - // backgroundColor: skinName,
129   - // });
130 126 }
131 127 });
132 128
... ...
... ... @@ -44,7 +44,7 @@
44 44 },
45 45 });
46 46
47   - const [registerModal, { openModal }] = useModal();
  47 + const [registerModal, { openModal, closeModal }] = useModal();
48 48
49 49 const handleViewDetail = (record: Record<'eventValue', Recordable>) => {
50 50 outputData.value = JSON.stringify(record.eventValue, null, 2);
... ... @@ -61,7 +61,7 @@
61 61 </span>
62 62 </template>
63 63 </BasicTable>
64   - <BasicModal title="输出参数" @register="registerModal">
  64 + <BasicModal title="输出参数" @register="registerModal" @ok="closeModal">
65 65 <Input.TextArea v-model:value="outputData" :autosize="true" />
66 66 </BasicModal>
67 67 </template>
... ...