liling 1 week ago
parent
commit
2d0dfb6723
2 changed files with 19 additions and 7 deletions
  1. 17 3
      package.json
  2. 2 4
      src/views/biz/algo/index.vue

+ 17 - 3
package.json

@@ -16,20 +16,34 @@
     "url": "https://gitee.com/y_project/RuoYi-Vue.git"
   },
   "dependencies": {
+    "@codemirror/commands": "^6.9.0",
+    "@codemirror/lang-css": "^6.3.1",
+    "@codemirror/lang-html": "^6.4.11",
+    "@codemirror/lang-javascript": "^6.2.4",
+    "@codemirror/lang-json": "^6.0.2",
+    "@codemirror/language": "^6.11.3",
+    "@codemirror/search": "^6.5.11",
+    "@codemirror/state": "^6.5.2",
+    "@codemirror/theme-one-dark": "^6.1.3",
+    "@codemirror/view": "^6.38.6",
     "@element-plus/icons-vue": "2.3.1",
     "@vueup/vue-quill": "1.2.0",
     "@vueuse/core": "10.6.1",
     "axios": "0.27.2",
     "echarts": "5.4.3",
-    "moment": "^2.30.1",
     "element-plus": "2.4.3",
     "file-saver": "2.0.5",
     "fuse.js": "6.6.2",
     "js-cookie": "3.0.5",
     "jsencrypt": "3.3.2",
+    "jshint": "^2.13.6",
+    "jsonlint": "^1.6.3",
+    "moment": "^2.30.1",
     "nprogress": "0.2.0",
     "pinia": "2.1.7",
+    "script-loader": "^0.7.2",
     "vue": "3.3.9",
+    "vue-codemirror": "^6.1.1",
     "vue-cropper": "1.1.1",
     "vue-router": "4.2.5"
   },
@@ -38,9 +52,9 @@
     "@vue/compiler-sfc": "3.3.9",
     "sass": "1.69.5",
     "unplugin-auto-import": "0.17.1",
+    "unplugin-vue-setup-extend-plus": "1.0.0",
     "vite": "5.0.4",
     "vite-plugin-compression": "0.5.1",
-    "vite-plugin-svg-icons": "2.0.1",
-    "unplugin-vue-setup-extend-plus": "1.0.0"
+    "vite-plugin-svg-icons": "2.0.1"
   }
 }

+ 2 - 4
src/views/biz/algo/index.vue

@@ -201,7 +201,6 @@ import { javascript } from '@codemirror/lang-javascript'
 import { oneDark } from '@codemirror/theme-one-dark'
 const { proxy } = getCurrentInstance();
 const { sys_common_status, algo_type, algo_para } = proxy.useDict('sys_common_status', 'algo_type', 'algo_para');
-
 const algoList = ref([]);
 const open = ref(false);
 const loading = ref(true);
@@ -227,7 +226,7 @@ const data = reactive({
     algoName: null,
     algoDesc: null,
     algoType: null,
-    algoPara: "1",
+    algoPara: null,
   },
   rules: {
   }
@@ -267,11 +266,10 @@ const checkJS=()=>{
     if(currweek_value.value.substring(0,1)!='[')
       paramsStr += ",'"+currweek_value.value+"'";
     else
-    paramsStr += ","+currweek_value.value;
+      paramsStr += ","+currweek_value.value;
   }
   try{
     scriptStr = "const nonefun = "+scriptStr+"; nonefun("+paramsStr+")";
-    console.log(scriptStr)
     var result = eval(scriptStr);
     jsCheckResult.value=result
     form.value.algoOk="0";