浏览代码

制作静态信息维护的计算公式

yangdr 4 月之前
父节点
当前提交
5237c8fceb

+ 33 - 8
package-lock.json

@@ -10,6 +10,7 @@
       "dependencies": {
         "babel-plugin-component": "^1.1.1",
         "js-md5": "^0.7.3",
+        "nanoid": "^5.1.3",
         "quill-image-extend-module": "^1.1.2",
         "umy-ui": "^1.1.6",
         "vue": "^2.5.17",
@@ -1601,6 +1602,24 @@
         "prettier": "^1.18.2 || ^2.0.0"
       }
     },
+    "node_modules/@vue/compiler-sfc/node_modules/nanoid": {
+      "version": "3.3.9",
+      "resolved": "https://mirrors.huaweicloud.com/repository/npm/nanoid/-/nanoid-3.3.9.tgz",
+      "integrity": "sha512-SppoicMGpZvbF1l3z4x7No3OlIjP7QJvC9XR7AhZr1kL133KHnKPztkKDc+Ir4aJ/1VhTySrtKhrsycmrMQfvg==",
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/ai"
+        }
+      ],
+      "license": "MIT",
+      "bin": {
+        "nanoid": "bin/nanoid.cjs"
+      },
+      "engines": {
+        "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
+      }
+    },
     "node_modules/@vue/compiler-sfc/node_modules/postcss": {
       "version": "8.4.40",
       "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.40.tgz",
@@ -10429,20 +10448,21 @@
       "optional": true
     },
     "node_modules/nanoid": {
-      "version": "3.3.7",
-      "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.7.tgz",
-      "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==",
+      "version": "5.1.3",
+      "resolved": "https://mirrors.huaweicloud.com/repository/npm/nanoid/-/nanoid-5.1.3.tgz",
+      "integrity": "sha512-zAbEOEr7u2CbxwoMRlz/pNSpRP0FdAU4pRaYunCdEezWohXFs+a0Xw7RfkKaezMsmSM1vttcLthJtwRnVtOfHQ==",
       "funding": [
         {
           "type": "github",
           "url": "https://github.com/sponsors/ai"
         }
       ],
+      "license": "MIT",
       "bin": {
-        "nanoid": "bin/nanoid.cjs"
+        "nanoid": "bin/nanoid.js"
       },
       "engines": {
-        "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
+        "node": "^18 || >=20"
       }
     },
     "node_modules/nanomatch": {
@@ -17236,6 +17256,11 @@
         "source-map": "^0.6.1"
       },
       "dependencies": {
+        "nanoid": {
+          "version": "3.3.9",
+          "resolved": "https://mirrors.huaweicloud.com/repository/npm/nanoid/-/nanoid-3.3.9.tgz",
+          "integrity": "sha512-SppoicMGpZvbF1l3z4x7No3OlIjP7QJvC9XR7AhZr1kL133KHnKPztkKDc+Ir4aJ/1VhTySrtKhrsycmrMQfvg=="
+        },
         "postcss": {
           "version": "8.4.40",
           "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.40.tgz",
@@ -24479,9 +24504,9 @@
       "optional": true
     },
     "nanoid": {
-      "version": "3.3.7",
-      "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.7.tgz",
-      "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g=="
+      "version": "5.1.3",
+      "resolved": "https://mirrors.huaweicloud.com/repository/npm/nanoid/-/nanoid-5.1.3.tgz",
+      "integrity": "sha512-zAbEOEr7u2CbxwoMRlz/pNSpRP0FdAU4pRaYunCdEezWohXFs+a0Xw7RfkKaezMsmSM1vttcLthJtwRnVtOfHQ=="
     },
     "nanomatch": {
       "version": "1.2.13",

+ 1 - 0
package.json

@@ -10,6 +10,7 @@
   "dependencies": {
     "babel-plugin-component": "^1.1.1",
     "js-md5": "^0.7.3",
+    "nanoid": "^5.1.3",
     "quill-image-extend-module": "^1.1.2",
     "umy-ui": "^1.1.6",
     "vue": "^2.5.17",

文件差异内容过多而无法显示
+ 1218 - 0
src/components/knowledgeExtra/AddAssess/CalculationFormula.vue


+ 167 - 161
src/components/knowledgeExtra/AddAssess/index.vue

@@ -1,163 +1,3 @@
-
-<style lang="less" scoped>
-.add_assess {
-  h5 {
-    padding: 20px 35px 0 35px;
-    // margin-bottom: 20px;
-    font-size: 14px;
-    span {
-      color: #ff545b;
-      margin-right: 3px;
-    }
-  }
-  .table_map {
-    border-bottom: 1px solid rgba(203, 207, 212, 0.3);
-    padding-bottom: 10px;
-    margin-top: 20px;
-    .table_top_box {
-      position: relative;
-      display: flex;
-      // align-items: center;
-      justify-content: space-between;
-      padding: 0 37px;
-      .table_top_box_left {
-        display: flex;
-        flex-wrap: wrap;
-        /deep/.el-input--mini .el-input__inner {
-          width: 200px;
-        }
-        .num_box {
-          // margin-left: 50px;
-          /deep/ .el-input__inner {
-            width: 40px;
-            text-align: center;
-          }
-          .num {
-            display: flex;
-            /deep/.el-form-item__error {
-              width: 100px;
-              margin-left: -20px;
-            }
-          }
-        }
-      }
-    }
-    .move_btn {
-      font-size: 14px;
-      margin-left: 10px;
-      margin-top: 5px;
-      display: flex;
-      div {
-        width: 12px;
-        height: 16px;
-        margin-right: 8px;
-        img {
-          width: 100%;
-          height: 100%;
-          cursor: pointer;
-        }
-      }
-    }
-    .right_hint_msg {
-      position: absolute;
-      right: 35px;
-      bottom: 0;
-      font-size: 12px;
-      color: #999;
-      margin-top: 14px;
-    }
-    &:nth-last-child(1) {
-      border: none;
-    }
-  }
-  /deep/ .el-form-item--mini.el-form-item,
-  .el-form-item--small.el-form-item {
-    margin-bottom: 0;
-  }
-  .hint_msg {
-    font-size: 12px;
-    color: red;
-    margin-top: 14px;
-  }
-  .change_table_btns {
-    // width: 100%;
-    margin-top: 20px;
-    display: flex;
-    justify-content: center;
-    padding: 8px;
-    border: 1px dashed #cbcfd4;
-    margin: 2px 35px;
-    box-sizing: border-box;
-    div {
-      width: 80px;
-      height: 30px;
-      line-height: 30px;
-      border-radius: 2px;
-      border: 1px solid #21cbc7;
-      color: #21cbc7;
-      font-size: 14px;
-      padding: 0 5px;
-      margin: 0 30px;
-      cursor: pointer;
-      &:nth-child(1) {
-        &:hover {
-          background: rgba(97, 218, 215, 0.1);
-        }
-      }
-      &:nth-child(2) {
-        border-color: #ff5b5b;
-        color: #ff5b5b;
-        &:hover {
-          background: rgba(255, 91, 91, 0.1);
-        }
-      }
-    }
-  }
-  .rich_text {
-    padding: 10px 37px;
-  }
-}
-.rich_text {
-}
-.quill-editor.ql-editor {
-  padding-left: 0 !important;
-}
-/**富文本编辑器样式修改***/
-.ql-snow .ql-picker.ql-size .ql-picker-label::before,
-.ql-snow .ql-picker.ql-size .ql-picker-item::before,
-.ql-snow .ql-picker.ql-header .ql-picker-label::before,
-it .ql-editor,
-.quill-editor {
-  padding-top: 0px !important;
-  margin-top: -8px;
-  min-height: 48px;
-  p {
-    padding-top: 8px;
-  }
-}
-.ql-editor.ql-blank::before {
-  padding-top: 0px;
-}
-.btns {
-  margin-top: 20px;
-}
-/deep/ .el-input--mini {
-  font-size: 14px;
-}
-/deep/ .el-form-item.is-success .el-input__inner,
-.el-form-item.is-success .el-textarea__inner {
-  border-color: #c9c9c9 !important;
-}
-/deep/ .el-form-item.is-success .el-textarea__inner {
-  border-color: #c9c9c9 !important;
-}
-/deep/ .el-form-item.is-success .el-textarea__inner {
-  border-color: #c9c9c9 !important;
-}
-/deep/.el-form-item__label {
-  padding-right: 0;
-}
-</style>  
 <template>
   <div class="add_assess">
     <el-form
@@ -1226,7 +1066,11 @@ export default {
               // 计算结果
               scoreresults.scoreresultsdatas = table.subMenuList[0].subMenuList;
               scoreresults.scoreresultsdatas.forEach((item) => {
-                item.content = JSON.parse(item.content);
+                try {
+                  item.content = JSON.parse(item.content);
+                } catch (e) {
+                  console.log("e", e);
+                }
               });
             } else if (table.textType === 11) {
               // 选项
@@ -1348,9 +1192,171 @@ export default {
       this.toolbars[this.toolbarMode];
   },
   mounted() {
+    console.log("childScaleData", this.childScaleData);
     setTimeout(() => {
       this.initText();
     }, 500);
   },
 };
 </script>
+
+
+<style lang="less" scoped>
+.add_assess {
+  h5 {
+    padding: 20px 35px 0 35px;
+    // margin-bottom: 20px;
+    font-size: 14px;
+    span {
+      color: #ff545b;
+      margin-right: 3px;
+    }
+  }
+  .table_map {
+    border-bottom: 1px solid rgba(203, 207, 212, 0.3);
+    padding-bottom: 10px;
+    margin-top: 20px;
+    .table_top_box {
+      position: relative;
+      display: flex;
+      // align-items: center;
+      justify-content: space-between;
+      padding: 0 37px;
+      .table_top_box_left {
+        display: flex;
+        flex-wrap: wrap;
+        /deep/.el-input--mini .el-input__inner {
+          width: 200px;
+        }
+        .num_box {
+          // margin-left: 50px;
+          /deep/ .el-input__inner {
+            width: 40px;
+            text-align: center;
+          }
+          .num {
+            display: flex;
+            /deep/.el-form-item__error {
+              width: 100px;
+              margin-left: -20px;
+            }
+          }
+        }
+      }
+    }
+    .move_btn {
+      font-size: 14px;
+      margin-left: 10px;
+      margin-top: 5px;
+      display: flex;
+      div {
+        width: 12px;
+        height: 16px;
+        margin-right: 8px;
+        img {
+          width: 100%;
+          height: 100%;
+          cursor: pointer;
+        }
+      }
+    }
+    .right_hint_msg {
+      position: absolute;
+      right: 35px;
+      bottom: 0;
+      font-size: 12px;
+      color: #999;
+      margin-top: 14px;
+    }
+    &:nth-last-child(1) {
+      border: none;
+    }
+  }
+  /deep/ .el-form-item--mini.el-form-item,
+  .el-form-item--small.el-form-item {
+    margin-bottom: 0;
+  }
+  .hint_msg {
+    font-size: 12px;
+    color: red;
+    margin-top: 14px;
+  }
+  .change_table_btns {
+    // width: 100%;
+    margin-top: 20px;
+    display: flex;
+    justify-content: center;
+    padding: 8px;
+    border: 1px dashed #cbcfd4;
+    margin: 2px 35px;
+    box-sizing: border-box;
+    div {
+      width: 80px;
+      height: 30px;
+      line-height: 30px;
+      border-radius: 2px;
+      border: 1px solid #21cbc7;
+      color: #21cbc7;
+      font-size: 14px;
+      padding: 0 5px;
+      margin: 0 30px;
+      cursor: pointer;
+      &:nth-child(1) {
+        &:hover {
+          background: rgba(97, 218, 215, 0.1);
+        }
+      }
+      &:nth-child(2) {
+        border-color: #ff5b5b;
+        color: #ff5b5b;
+        &:hover {
+          background: rgba(255, 91, 91, 0.1);
+        }
+      }
+    }
+  }
+  .rich_text {
+    padding: 10px 37px;
+  }
+}
+.rich_text {
+}
+.quill-editor.ql-editor {
+  padding-left: 0 !important;
+}
+/**富文本编辑器样式修改***/
+.ql-snow .ql-picker.ql-size .ql-picker-label::before,
+.ql-snow .ql-picker.ql-size .ql-picker-item::before,
+.ql-snow .ql-picker.ql-header .ql-picker-label::before,
+it .ql-editor,
+.quill-editor {
+  padding-top: 0px !important;
+  margin-top: -8px;
+  min-height: 48px;
+  p {
+    padding-top: 8px;
+  }
+}
+.ql-editor.ql-blank::before {
+  padding-top: 0px;
+}
+.btns {
+  margin-top: 20px;
+}
+/deep/ .el-input--mini {
+  font-size: 14px;
+}
+/deep/ .el-form-item.is-success .el-input__inner,
+.el-form-item.is-success .el-textarea__inner {
+  border-color: #c9c9c9 !important;
+}
+/deep/ .el-form-item.is-success .el-textarea__inner {
+  border-color: #c9c9c9 !important;
+}
+/deep/ .el-form-item.is-success .el-textarea__inner {
+  border-color: #c9c9c9 !important;
+}
+/deep/.el-form-item__label {
+  padding-right: 0;
+}
+</style>  

+ 7 - 1
src/components/knowledgeExtra/AddAssess/rules.js

@@ -2,6 +2,12 @@ export default {
   title: [
     { required: true, message: "请输入标题", trigger: ["blur"] },
   ],
+  notes: [
+    { required: true, message: "请输入注释", trigger: ["blur"] },
+  ],
+  conditionName: [
+    { required: true, message: "请输入条件名称", trigger: ["blur", "change"] },
+  ],
   tableFactor: [
     { required: true, message: "请输入系数", trigger: ["blur"] },
   ],
@@ -24,7 +30,7 @@ export default {
   score: [
     { required: true, message: "请输入分值", trigger: ["blur"] },
   ],
-  ruleCode:[
+  ruleCode: [
     { required: true, message: "请输入编码", trigger: ["change"] },
   ],
   result: [

文件差异内容过多而无法显示
+ 397 - 235
src/components/knowledgeExtra/AddDevKnow.vue


+ 3 - 2
src/main.js

@@ -3,7 +3,7 @@ import Vue from 'vue'
 import App from './App.vue'
 import ElementUI from 'element-ui';
 import 'element-ui/lib/theme-chalk/index.css';
-import { UTable, UTableColumn,UxGrid,UxTableColumn} from 'umy-ui';
+import { UTable, UTableColumn, UxGrid, UxTableColumn } from 'umy-ui';
 import VueRouter from 'vue-router';
 import routes from './routes.js';
 import axios from 'axios'
@@ -23,7 +23,8 @@ Vue.use(UxGrid);
 Vue.use(UxTableColumn);
 
 const router = new VueRouter({
-  routes
+  routes: routes,
+  mode: "hash"
 });
 
 //全局注册组件

+ 34 - 0
src/views/NewPage.vue

@@ -0,0 +1,34 @@
+
+<template>
+  <div class="new-page">
+    <div class="table"></div>
+  </div>
+</template>
+<script>
+export default {
+  data: {
+    tableData: [
+      {
+        genus: {
+          type: "G-",
+          genusName: "耐瑟球菌属 Neisseria",
+          relativeAbundance: "19.1%",
+          sequenceNumber: "1324",
+        },
+        species: {
+          speciesName: "微黄耐瑟球菌 Neisseria sunflava",
+          appraisalConfidenceLevel: "99%",
+          sequenceNumber: "137",
+        },
+      },
+    ],
+  },
+  methods: {},
+  computed: {},
+  watch: {},
+  created: function () {},
+  mounted: function () {},
+};
+</script>
+
+<style lang="less" scoped></style>

+ 1 - 1
vue.config.js

@@ -3,7 +3,7 @@ const path = require('path');
 
 // const proxy_path = 'http://172.16.8.64:5050';
 //const proxy_path = 'http://173.18.12.192:5050';
-const proxy_path = 'http://173.18.12.192:5050';
+const proxy_path = 'http://173.18.12.195:5050';
 
 // const proxy_path = 'http://192.168.3.117:5050';//周铁刚
 // const proxy_path = 'http://192.168.3.113:5050'; //王峰

+ 8 - 3
yarn.lock

@@ -5830,9 +5830,14 @@
   "version" "0.0.7"
 
 "nanoid@^3.3.7":
-  "integrity" "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g=="
-  "resolved" "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.7.tgz"
-  "version" "3.3.7"
+  "integrity" "sha512-SppoicMGpZvbF1l3z4x7No3OlIjP7QJvC9XR7AhZr1kL133KHnKPztkKDc+Ir4aJ/1VhTySrtKhrsycmrMQfvg=="
+  "resolved" "https://mirrors.huaweicloud.com/repository/npm/nanoid/-/nanoid-3.3.9.tgz"
+  "version" "3.3.9"
+
+"nanoid@^5.1.3":
+  "integrity" "sha512-zAbEOEr7u2CbxwoMRlz/pNSpRP0FdAU4pRaYunCdEezWohXFs+a0Xw7RfkKaezMsmSM1vttcLthJtwRnVtOfHQ=="
+  "resolved" "https://mirrors.huaweicloud.com/repository/npm/nanoid/-/nanoid-5.1.3.tgz"
+  "version" "5.1.3"
 
 "nanomatch@^1.2.9":
   "integrity" "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA=="