flyzto před 6 měsíci
rodič
revize
c97543c035

+ 5 - 0
server/routes/pstery.js

@@ -76,4 +76,9 @@ router.get('/get_solutions', (req, res) => {
   });
 });
 
+// 获取综合利润方案
+router.post('/calc_total_profit', (req, res) => {
+  res.sendSuccess({ value: 'hello world' })
+});
+
 module.exports = router;

+ 27 - 0
server/triangle/iorKeys.js

@@ -78,4 +78,31 @@ module.exports = {
     ['ior_rh_225', 'ior_rac_175', 'ior_wmh_2', 'lh_lh_wa'],
     ['ior_rc_225', 'ior_rah_175', 'ior_wmc_2', 'lh_lh_wa'],
   ],
+  D: [
+    ['ior_ouc_225', 'ior_ouh_2', 'ior_ot_2', 'lh_dr_wa'],
+
+    ['ior_ouc_25', 'ior_ouh_225', 'ior_ot_2', 'la_wh_wa'],
+
+    ['ior_ouc_25', 'ior_ouh_2', 'ior_ot_2', 'la_dr_wa'],
+
+    ['ior_ouh_25', 'ior_ouc_275', 'ior_ot_3', 'la_wh_wa'],
+
+    ['ior_ouh_275', 'ior_ouc_3', 'ior_ot_3', 'lh_dr_wa'],
+
+    ['ior_ouc_325', 'ior_ouh_3', 'ior_ot_3', 'lh_dr_wa'],
+
+    ['ior_ouc_35', 'ior_ouh_325', 'ior_ot_3', 'la_wh_wa'],
+
+    ['ior_ouh_25', 'ior_ouc_3', 'ior_ot_3', 'la_dr_wa'],
+
+    ['ior_ouc_325', 'ior_ouh_275', 'ior_ot_3', 'lh_lh_wa'],
+
+    ['ior_ouc_35', 'ior_ouh_3', 'ior_ot_3', 'la_dr_wa'],
+
+    ['ior_ouh_25', 'ior_ouc_325', 'ior_ot_3', 'la_lh_wa'],
+
+    ['ior_ouh_25', 'ior_ouc_325', 'ior_ot_3', 'la_lh_wa'],
+
+    ['ior_ouc_35', 'ior_ouh_25', 'ior_ot_3', 'la_la_wa'],
+  ],
 }

+ 4 - 4
web/apps/web-antd/src/views/match/solutions/index.vue

@@ -150,7 +150,7 @@ const calcTotalProfit = async () => {
 }
 
 const parseIorKey = (iorKey) => {
-  const [, type, accept, side, , ratioString] = iorKey.match(/^ior_(r|ou|m|wm|t)(a?)(h|c|n)?(_(\d+))?$/);
+  const [, type, accept, side, , ratioString] = iorKey.match(/^ior_(r|ou|m|wm|ot)(a?)(h|c|n)?(_(\d+))?$/);
   const ratio = ratioString ? `${ratioString[0]}.${ratioString.slice(1)}` * (accept ? 1 : -1) : 0;
   return { type, side, ratio };
 }
@@ -292,7 +292,7 @@ const formatEvents = (events, cprKeys) => {
     const value = events[key] ?? 0;
     eventsMap[ratioKey][index] = { key, value };
   });
-  console.log('eventsMap', eventsMap);
+
   return Object.keys(eventsMap).sort((a, b) => a.localeCompare(b)).map(key => {
     return [key, ...eventsMap[key]];
   });
@@ -420,7 +420,7 @@ onUnmounted(() => {
     </div>
     <div class="list-empty" v-if="!solutionsList.length">暂无数据</div>
 
-    <Drawer
+    <!-- <Drawer
       title="综合利润方案"
       placement="bottom"
       height="600"
@@ -475,7 +475,7 @@ onUnmounted(() => {
           </tr>
         </table>
       </div>
-    </Drawer>
+    </Drawer> -->
 
   </div>
 </template>