ZaiZai 9 luni în urmă
părinte
comite
b6dc6e018a
1 a modificat fișierele cu 17 adăugiri și 1 ștergeri
  1. 17 1
      src/views/project/list/edit-formula.vue

+ 17 - 1
src/views/project/list/edit-formula.vue

@@ -218,7 +218,23 @@ const getTypeMapApi = async () => {
 
 //菜单被选择
 const handleFormulaMenu = (index, path) => {
-    console.log(index, path)
+    if (isResetFun.value) {
+        //重置函数
+        if (path[0] !== '基础运算') {
+            window?.$message.warning('当前只能使用基础运算')
+            return
+        }
+        try {
+            let index = Number(path[1].split('-')[1]) - 1
+            const item = formulaMenuList.value[path[0]][index]
+            const val = symbolReg.exec(item.name)[1]
+            resetFunOperator(val)
+        } catch (e) {
+            console.error(e)
+        }
+    } else {
+        console.log(index, path)
+    }
 }
 
 //获取数据