Explorar el Código

Merge branch 'develop-rmd' of allen/elecComp into master

allen hace 1 año
padre
commit
5d4126aca1

+ 6 - 6
src/data/customData/mainCategory.json

@@ -3,20 +3,20 @@
     {
       "id": 1001,
       "name": "传感器",
-      "description": "传感器是。。。。。",
-      "details": "传感器的详情。。。。"
+      "description": "可快速响应的高精度传感器产品系列来捕获必要信息,从而在各种终端设备中实现实时控制和自主操作",
+      "details": "传感器主要分为以下几类:湿度传感器、磁传感器、毫米波雷达传感器、专用传感器、温度传感器和控制、IC"
     },
     {
       "id": 1002,
       "name": "放大器",
-      "description": "放大器是。。。。。",
-      "details": "放大器的详情。。。。"
+      "description": "满足从超高性能到成本优化等任何需求的放大器",
+      "details": "我们提供了满足所有系统需求的各种放大器,包括超高性能和业界超小的封装选项,以及低功耗和成本优化型解决方案。除了提供品类齐全的放大器产品系列(包括运算放大器、比较器、仪表放大器、可编程和可变增益放大器、电流检测放大器等)"
     },
     {
       "id": 1003,
       "name": "无线连接",
-      "description": "无线连接是。。。。。",
-      "details": "无线连接的详情。。。。"
+      "description": "经济实惠的创新型无线解决方案,适用于不断发展的互联世界",
+      "details": "我们正在改进包括 Wi-Fi®、Bluetooth®、Sub-1GHz、Zigbee® 等在内的连接协议。提供一系列经济实惠的优质低功耗无线微控制器 (MCU)、认证模块和收发器以及完整的软件产品,可满足任何射频设计需求。选择合适的协议,助力您的下一个物联网互联项目。"
     }
   ]
 }

+ 10 - 10
src/data/customData/subCategory.json

@@ -3,7 +3,7 @@
     {
       "id": "CGQ0001",
       "name": "湿度传感器",
-      "description": "湿度传感器的描述。",
+      "description": "借助湿度传感器提高效率并延长系统寿命。",
       "details": "湿度传感器的详细说明。",
       "belong": "传感器"
     },
@@ -17,29 +17,29 @@
     {
       "id": "FDQ0001",
       "name": "仪表放大器",
-      "description": "仪表放大器的描述。",
-      "details": "仪表放大器的详细说明。",
+      "description": "集成电阻器网络可实现更出色的精度和空间效率。",
+      "details": "仪表放大器能实现出色的速度、噪声和功率水平。",
       "belong": "放大器"
     },
     {
       "id": "FDQ0002",
       "name": "差分放大器",
-      "description": "差分放大器的描述。",
-      "details": "差分放大器的详细说明。",
+      "description": "采用精度匹配的电阻器网络,实现高精度和宽输入共模电压范围。",
+      "details": "新一代高性能差分放大器采用屡获殊荣的工艺和精密技术,可提供出色的直流性能。",
       "belong": "放大器"
     },
     {
       "id": "WX0001",
       "name": "蓝牙产品",
-      "description": "蓝牙产品的描述。",
-      "details": "蓝牙产品的详细说明。",
+      "description": "可轻松将 Bluetooth® 或低功耗 (LE) 蓝牙添加到汽车、工业或个人电子产品应用的成熟解决方案。",
+      "details": "适用于各种应用的低成本低功耗 Bluetooth® 或双模蓝牙器件。",
       "belong": "无线连接"
     },
     {
       "id": "WX0002",
-      "name": "螺旋产品",
-      "description": "螺旋产品的描述。",
-      "details": "螺旋产品的详细说明。",
+      "name": "Wi-Fi产品",
+      "description": "适用于 Linux® 和 RTOS 系统的高性价比、可靠且可扩展的 Wi-Fi® 产品",
+      "details": "我们的产品系列包括将全新连接标准 Wi-Fi 6 (802.11ax) 和低功耗 Bluetooth® 5.3 技术集于一身的高性价比产品",
       "belong": "无线连接"
     }
   ]

+ 16 - 0
src/router/index.js

@@ -216,6 +216,22 @@ export const constantRoutes = [
         meta: { title: '数据标注管理', icon: 'documentation', affix: true }
       }
     ]
+  },
+  {
+    path: '/AlgorithmManage',
+    component: Layout,
+    meta: {
+      title: '算法管理',
+      icon: 'lock'
+    },
+    children: [
+      {
+        path: 'AlgorithmManage',
+        component: () => import('@/views/algorithmManage/index'),
+        name: 'AlgorithmManage',
+        meta: { title: '算法管理', icon: 'documentation', affix: true }
+      }
+    ]
   }
   // {
   //   path: '/documentation',

+ 133 - 0
src/views/algorithmManage/index.vue

@@ -0,0 +1,133 @@
+<template>
+  <div class="algorithmManage">
+    <el-popover placement="top-start" width="300" trigger="hover" content="可以选择算法任务及标注结果或者评分结果,进行有监督训练">
+      <i slot="reference" class="el-icon-question" />
+    </el-popover>
+    <div>
+      <span>选择算法:</span>
+      <el-select v-model="algorithmValue" placeholder="请选择算法" @change="selectAlgorithm">
+        <el-option v-for="item in algorithmOptions" :key="item.value" :label="item.label" :value="item.value" />
+      </el-select>
+    </div>
+    <div class="result">
+      <span>选择要训练的数据:</span>
+      <el-select v-model="resultValue" placeholder="请选择数据" @change="selectResult">
+        <el-option v-for="item in resultOptions" :key="item.value" :label="item.label" :value="item.value" />
+      </el-select>
+    </div>
+    <div>
+      <el-button type="primary" :disabled="algorithmValue===''&&resultValue===''" @click="begin">开始训练</el-button>
+    </div>
+    <el-dialog title="数据训练" :visible.sync="dialog" width="400px" :close-on-click-modal="false" :show-close="false">
+      <div class="ProgressBar">
+        <el-progress type="circle" :percentage="percentage" :color="colors" />
+        <p>{{ tipText }}</p>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'AlgorithmManage',
+  data() {
+    return {
+      algorithmOptions: [{
+        value: 'one',
+        label: '算法1'
+      }, {
+        value: 'two',
+        label: '算法2'
+      }, {
+        value: 'three',
+        label: '算法3'
+      }, {
+        value: 'four',
+        label: '算法4'
+      }],
+      resultOptions: [{
+        value: 'score',
+        label: '评分结果数据'
+      }, {
+        value: 'annotations',
+        label: '标注结果数据'
+      }],
+      algorithmValue: '',
+      resultValue: '',
+      // 进度条
+      percentage: 0,
+      colors: [
+        { color: '#f56c6c', percentage: 20 },
+        { color: '#e6a23c', percentage: 40 },
+        { color: '#5cb87a', percentage: 60 },
+        { color: '#1989fa', percentage: 80 },
+        { color: '#6f7ad3', percentage: 100 }
+      ],
+      // 进度条弹出框
+      dialog: false,
+      // 进度条显示
+      isShow: false,
+      // 进度条提示信息
+      tipText: '算法准备中...',
+      // 定时器
+      timer: null
+    }
+  },
+  methods: {
+    selectAlgorithm(val) {
+      console.log(val)
+    },
+    selectResult(val) {
+      console.log(val)
+    },
+    begin() {
+      this.dialog = true
+      if (!this.timer) {
+        this.timer = setInterval(() => {
+          this.percentage += 1
+          if (this.percentage === 25) {
+            this.tipText = '数据准备中...'
+          } else if (this.percentage === 45) {
+            this.tipText = '数据训练中...'
+          } else if (this.percentage === 100) {
+            this.tipText = '处理完成'
+            clearInterval(this.timer)
+            this.timer = null
+            setTimeout(() => {
+              this.dialog = false
+              this.percentage = 0
+              this.tipText = '算法准备中...'
+              this.algorithmValue = ''
+              this.resultValue = ''
+              this.$message.success('数据处理成功')
+            }, 1500)
+          }
+        }, 50)
+      }
+    }
+  }
+}
+</script>
+
+<style scoped>
+.algorithmManage{
+  padding: 50px 0px 0px 70px;
+}
+.result{
+  margin: 30px 0px;
+}
+.ProgressBar {
+  width: 350px;
+  height: 200px;
+  margin-top: 40px;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
+.el-icon-question{
+  font-size: 24px;
+  color: #5cb6ff;
+  position: absolute;
+  right: 50px;
+}
+</style>

+ 8 - 0
src/views/compDetail/index.vue

@@ -1,6 +1,9 @@
 <template>
   <div>
     <div class="search">
+      <el-popover placement="top-start" width="300" trigger="hover" content="具体元器件型号所对应的元器件参数的具体值">
+        <i slot="reference" class="el-icon-question" />
+      </el-popover>
       <el-input v-model="search" placeholder="请输入内容" class="input-with-select" style="width: 400px">
         <el-button slot="append" icon="el-icon-search" />
       </el-input>
@@ -93,4 +96,9 @@ export default {
   top: 20px;
   right: 20px;
 }
+.el-icon-question{
+  margin: 20px;
+  font-size: 24px;
+  color: #5cb6ff;
+}
 </style>

+ 8 - 0
src/views/componentManage/index.vue

@@ -1,6 +1,9 @@
 <template>
   <div>
     <div class="search">
+      <el-popover placement="top-start" width="300" trigger="hover" content="具体元器件的管理在大类->小类下,有元器件型号、厂家、是否优选、是否GCTD">
+        <i slot="reference" class="el-icon-question" />
+      </el-popover>
       <el-input v-model="search" placeholder="请输入内容" class="input-with-select" style="width: 400px">
         <el-button slot="append" icon="el-icon-search" />
       </el-input>
@@ -90,4 +93,9 @@ export default {
   top: 20px;
   right: 20px;
 }
+.el-icon-question{
+  margin: 20px;
+  font-size: 24px;
+  color: #5cb6ff;
+}
 </style>

+ 8 - 0
src/views/dataAnnotationsManage/index.vue

@@ -1,6 +1,9 @@
 <template>
   <div>
     <div class="search">
+      <el-popover placement="top-start" width="300" trigger="hover" content="设计师和专家能对元器件数据进行标注,并把标注结果进行管理">
+        <i slot="reference" class="el-icon-question" />
+      </el-popover>
       <el-input v-model="search" placeholder="请输入内容" class="input-with-select" style="width: 400px">
         <el-button slot="append" icon="el-icon-search" />
       </el-input>
@@ -72,4 +75,9 @@ export default {
   top: 20px;
   right: 20px;
 }
+.el-icon-question{
+  margin: 20px;
+  font-size: 24px;
+  color: #5cb6ff;
+}
 </style>

+ 8 - 0
src/views/evaluateManage/index.vue

@@ -1,6 +1,9 @@
 <template>
   <div>
     <div class="search">
+      <el-popover placement="top-start" width="300" trigger="hover" content="记录每次用户对推荐结果的行为记录">
+        <i slot="reference" class="el-icon-question" />
+      </el-popover>
       <el-input v-model="search" placeholder="请输入内容" class="input-with-select" style="width: 400px">
         <el-button slot="append" icon="el-icon-search" />
       </el-input>
@@ -74,4 +77,9 @@ export default {
   top: 20px;
   right: 20px;
 }
+.el-icon-question{
+  margin: 20px;
+  font-size: 24px;
+  color: #5cb6ff;
+}
 </style>

+ 8 - 0
src/views/history/index.vue

@@ -1,6 +1,9 @@
 <template>
   <div>
     <div class="search">
+      <el-popover placement="top-start" width="300" trigger="hover" content="记录每个厂家每种元器件的历史质量信息">
+        <i slot="reference" class="el-icon-question" />
+      </el-popover>
       <el-input v-model="search" placeholder="请输入内容" class="input-with-select" style="width: 400px">
         <el-button slot="append" icon="el-icon-search" />
       </el-input>
@@ -72,4 +75,9 @@ export default {
   top: 20px;
   right: 20px;
 }
+.el-icon-question{
+  margin: 20px;
+  font-size: 24px;
+  color: #5cb6ff;
+}
 </style>

+ 55 - 0
src/views/mainCategory/index.vue

@@ -1,6 +1,10 @@
 <template>
   <div class="mainCategory">
     <div class="search">
+      <el-popover placement="top-start" width="300" trigger="hover" content="用于维护元器件的大类信息,例如<传感器>、<放大器>、<射频与微波>等">
+        <i slot="reference" class="el-icon-question" />
+      </el-popover>
+      <!-- <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button> -->
       <el-input v-model="search" placeholder="请输入内容" class="input-with-select" style="width: 400px">
         <el-button slot="append" icon="el-icon-search" />
       </el-input>
@@ -21,6 +25,27 @@
         </template>
       </el-table-column>
     </el-table>
+    <!-- 添加或修改指令信息对话框 -->
+    <el-dialog :title="title" :visible.sync="open" :close-on-click-modal="false" width="500px">
+      <el-form ref="form" :model="form" :rules="rules" label-width="68px">
+        <el-form-item label="id" prop="id">
+          <el-input v-model="form.id" placeholder="请输入id" />
+        </el-form-item>
+        <el-form-item label="名称" prop="name">
+          <el-input v-model="form.name" placeholder="请输入名称" />
+        </el-form-item>
+        <el-form-item label="介绍" prop="description">
+          <el-input v-model="form.description" placeholder="请输入相关介绍" />
+        </el-form-item>
+        <el-form-item label="说明" prop="details">
+          <el-input v-model="form.details" placeholder="请输入相关说明" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -78,6 +103,31 @@ export default {
     resetQuery() {
       // this.resetForm('queryForm')
       // this.handleQuery()
+    },
+    // 新增按钮
+    handleAdd() {
+      this.open = true
+      this.title = '添加主类'
+    },
+    // 提交
+    submitForm() {
+      this.$refs['form'].validate(valid => {
+        if (valid) {
+          console.log(this.form)
+          if (this.form.id != null) {
+            this.$message.success('修改成功')
+            this.open = false
+          } else {
+            console.log(this.form)
+            this.$message.success('新增成功')
+            this.open = false
+          }
+        }
+      })
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false
     }
   }
 }
@@ -94,4 +144,9 @@ export default {
   top: 20px;
   right: 20px;
 }
+.el-icon-question{
+  margin: 20px;
+  font-size: 24px;
+  color: #5cb6ff;
+}
 </style>

+ 8 - 0
src/views/parameter/index.vue

@@ -1,6 +1,9 @@
 <template>
   <div class="parameter">
     <div class="search">
+      <el-popover placement="top-start" width="300" trigger="hover" content="子信息,例如<传感器>中的<温度传感器>、<湿度传感器>分别有哪些参数属性等">
+        <i slot="reference" class="el-icon-question" />
+      </el-popover>
       <el-input v-model="search" placeholder="请输入内容" class="input-with-select" style="width: 400px">
         <el-button slot="append" icon="el-icon-search" />
       </el-input>
@@ -134,4 +137,9 @@ export default {
   top: 20px;
   right: 50px;
 }
+.el-icon-question{
+  margin: 20px;
+  font-size: 24px;
+  color: #5cb6ff;
+}
 </style>

+ 1 - 1
src/views/purchase/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="purchase">
+  <div ref="refDome" class="purchase">
     <p class="title">按类别浏览</p>
     <div>
       <el-row :gutter="20">

+ 8 - 0
src/views/score/index.vue

@@ -1,6 +1,9 @@
 <template>
   <div>
     <div class="search">
+      <el-popover placement="top-start" width="300" trigger="hover" content="记录每次用户对推荐结果的评价">
+        <i slot="reference" class="el-icon-question" />
+      </el-popover>
       <el-input v-model="search" placeholder="请输入内容" class="input-with-select" style="width: 400px">
         <el-button slot="append" icon="el-icon-search" />
       </el-input>
@@ -65,4 +68,9 @@ export default {
   top: 20px;
   right: 20px;
 }
+.el-icon-question{
+  margin: 20px;
+  font-size: 24px;
+  color: #5cb6ff;
+}
 </style>

+ 12 - 4
src/views/subCategory/index.vue

@@ -1,16 +1,19 @@
 <template>
   <div class="subCategory">
     <div class="search">
+      <el-popover placement="top-start" width="300" trigger="hover" content="用于维护元器件的大类的下一级类别信息,例如<传感器>中的<温度传感器>、<湿度传感器>等">
+        <i slot="reference" class="el-icon-question" />
+      </el-popover>
       <el-input v-model="search" placeholder="请输入内容" class="input-with-select" style="width: 400px">
         <el-button slot="append" icon="el-icon-search" />
       </el-input>
     </div>
     <el-table :data="subCategory" stripe style="width: 100%">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column prop="id" label="分类id" width="180" />
-      <el-table-column prop="name" label="名称" width="180" />
-      <el-table-column prop="description" label="介绍" />
-      <el-table-column prop="details" label="说明" />
+      <el-table-column prop="id" label="分类id" width="100" />
+      <el-table-column prop="name" label="名称" width="100" />
+      <el-table-column prop="description" label="介绍" width="300" />
+      <el-table-column prop="details" label="说明" width="300" />
       <el-table-column prop="belong" label="所属分类" />
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
@@ -95,4 +98,9 @@ export default {
   top: 20px;
   right: 20px;
 }
+.el-icon-question{
+  margin: 20px;
+  font-size: 24px;
+  color: #5cb6ff;
+}
 </style>

+ 8 - 0
src/views/userBehavior/index.vue

@@ -1,6 +1,9 @@
 <template>
   <div>
     <div class="search">
+      <el-popover placement="top-start" width="300" trigger="hover" content="记录每次用户对推荐结果的行为记录">
+        <i slot="reference" class="el-icon-question" />
+      </el-popover>
       <el-input v-model="search" placeholder="请输入内容" class="input-with-select" style="width: 400px">
         <el-button slot="append" icon="el-icon-search" />
       </el-input>
@@ -66,4 +69,9 @@ export default {
   top: 20px;
   right: 20px;
 }
+.el-icon-question{
+  margin: 20px;
+  font-size: 24px;
+  color: #5cb6ff;
+}
 </style>