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