liling 2 年 前
コミット
34148e51d4

+ 1 - 1
public/config.js

@@ -4,7 +4,7 @@ STATIC_CONFIG.lowpowerUrl = 'http://192.168.1.224:9910/#/detection'
 STATIC_CONFIG.golang = 'http://127.0.0.1:8006'
 // 后台服务接口地址
 //STATIC_CONFIG.proxyUrl = 'http://192.168.1.236:8080'
-STATIC_CONFIG.proxyUrl = 'http://192.168.1.236:7070'
+STATIC_CONFIG.proxyUrl = 'http://192.168.1.51:8080'
 // 添加配置代理ip
 // 首页资源
 // STATIC_CONFIG.logo = ''

+ 1 - 0
src/components/Pagination/index.vue

@@ -82,6 +82,7 @@ export default {
       // console.log('limit =', this.limit)
     },
     handleSizeChange(val) {
+      this.pageSize = val
       this.$emit('pagination', { page: 0, limit: val })
       if (this.autoScroll) {
         scrollTo(0, 800)

+ 7 - 0
src/utils/request.js

@@ -105,6 +105,13 @@ service.interceptors.response.use(
       errmsg = '网络请求失败'
     } else if (error.toString().indexOf('timeout') > -1) {
       errmsg = '网络请求超时'
+    } else {
+      const errors = error.response.data.errors
+      if (errors != null) {
+        for (const k in errors) {
+          if (errors[k] !== '') errmsg = errors[k]
+        }
+      }
     }
     error.response.data.message = errmsg
     Message({

+ 14 - 10
src/views/dashboard/components/CheckStatusChart.vue

@@ -1,5 +1,5 @@
 <template>
-  <div :class="className" :style="{height:height,width:width}" />
+  <div ref="myel" :class="className" :style="{height:height,width:width,margin:topPx}" />
 </template>
 
 <script>
@@ -23,7 +23,7 @@ export default {
     },
     height: {
       type: String,
-      default: '280px'
+      default: '350px'
     },
     showData: {
       type: Object,
@@ -36,7 +36,8 @@ export default {
     return {
       chart: null,
       sum: '',
-      chartData: { }
+      chartData: { },
+      topPx: '0 0 0 0'
     }
   },
   mounted() {
@@ -66,6 +67,8 @@ export default {
       // console.log('new', this.chartData.NEW / this.sum * 100)
     },
     initChart() {
+      const top = (this.$refs.myel.parentNode.parentNode.offsetHeight * 1 - 350 - 40) / 2
+      this.topPx = top + 'px 0 0 0'
       this.chart = echarts.init(this.$el)
       // this.setOptions()
       // 获取数据,暂时不需要
@@ -75,7 +78,7 @@ export default {
       this.chart.setOption({
         grid: {
           left: 0,
-          top: 0,
+          top: '25%',
           right: 0,
           bottom: 0
         },
@@ -102,12 +105,12 @@ export default {
             type: 'pie',
             selectedMode: 'single',
             label: {
-              position: 'inner',
+              // position: 'inner',
               fontSize: 14,
               formatter: '{d}%'
             },
             labelLine: {
-              show: false
+              show: true
             },
             data: [
               {
@@ -132,9 +135,9 @@ export default {
               normal: {
                 color: function(colors) {
                   var colorList = [
-                    '#000',
-                    '#d6e8e7',
-                    '#549688',
+                    'rgb(255, 190, 14)',
+                    'rgb(97, 221, 169)',
+                    'rgb(91, 144, 250)',
                     '#3eede7',
                     '#1685a9',
                     '#177cb0',
@@ -153,7 +156,7 @@ export default {
                 }
               }
             },
-            radius: ['40%', '85%']
+            radius: ['60%', '85%']
           }
         ],
         animationDuration
@@ -180,5 +183,6 @@ export default {
 <style lang="scss" scoped>
 .chart {
   // border: 1px #F00 solid;
+  float: left;
 }
 </style>

+ 104 - 31
src/views/dashboard/index.vue

@@ -1,7 +1,7 @@
 <template>
-  <div class="dashboard-editor-container">
-    <el-row :gutter="20" type="flex" justify="space-between">
-      <el-col :xs="7" :sm="7" :lg="7" class="left">
+  <div class="dashboard-editor-container" :style="{ height: bodyHeightPx }">
+    <el-row :gutter="20" type="flex" justify="space-between" style="height: 100%;">
+      <el-col :xs="9" :sm="9" :lg="9" class="left">
         <div class="left-row-1">
           <!-- 点击创建新检测 -->
           <div ref="btn_crate_testdevice" data-controlCode="btn_index_newtest" class="creat-new-check item">
@@ -10,8 +10,8 @@
                 <el-image :src="require('@/assets/index/creatnewcheck.png')" fit="contain" />
               </el-link>
             </div>
-            <div class="title">
-              <el-link href="#/device/save" target="_self" :underline="false"><span>点击</span> 创建新检测</el-link>
+            <div style="margin-top: 20px;">
+              <el-link href="#/device/save" target="_self" :underline="false" style="font-size: 18px;"><span>点击</span> 创建新检测</el-link>
             </div>
           </div>
         </div>
@@ -46,14 +46,74 @@
           </div>
         </div>
       </el-col>
-      <el-col :xs="17" :sm="17" :lg="17" class="right">
+      <el-col :xs="15" :sm="15" :lg="15" class="right">
         <!-- 检测流程指南 -->
         <div class="flow-chart item">
           <div class="title">
             检测流程指南
           </div>
-          <div class="flow-img" style="margin-top: 8%;">
-            <img src="/static/index_flow.jpg" fit="contain" style="width: 100%;">
+          <div class="flow-img" style="margin-top: 0;">
+            <img ref="flow_pic" src="/static/index_flow.jpg" fit="contain" :style="{width: flow_pic_w,height:flow_pic_h}">
+          </div>
+        </div>
+        <div class="left-row-2" style="margin-top: 20px;background-color:#fff;height: 57%;">
+          <!-- 最近检测 -->
+          <div class="recently item">
+            <div class="title">
+              最近检测
+              <span class="more" style="float: right;">
+                <router-link to="/device">更多 ></router-link>
+              </span>
+            </div>
+            <div class="content" style="padding: 20px;">
+              <el-table
+                :data="tableData"
+                stripe
+                :height="bodyHeight*0.57-120"
+              >
+                <el-table-column
+                  prop="serialNumber"
+                  label="设备编号"
+                  :show-overflow-tooltip="true"
+                />
+                <el-table-column
+                  prop="plans"
+                  label="检测方案"
+                  tooltip-effect="dark"
+                  :show-overflow-tooltip="true"
+                >
+                  <template slot-scope="scope">
+                    <!-- <el-link type="primary" @click="toBegin(scope.row)">{{ scope.row.deviceCheckProductType }}</el-link> -->
+                    <div v-for="item in scope.row.plans" :key="item.id">
+                      <el-link v-if="has_btn_devicetest_run" type="primary" style="color:#6e6eea" @click="toBegin(item)">{{ item.name }}</el-link>
+                      <div v-else>{{ item.name }}</div>
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column
+                  prop="stateName"
+                  label="检测状态"
+                >
+                  <template slot-scope="scope">
+                    <el-tag :type="scope.row.state | formatState">{{ scope.row.stateName || '未知' }}</el-tag>
+                    <!-- <el-tag v-if="scope.row.deviceCheckStatus == null ||scope.row.deviceCheckStatus == 'NEW'" type="danger">未检测</el-tag>
+              <el-tag v-if="scope.row.deviceCheckStatus == 'RUNNING'">检测中</el-tag>
+              <el-tag v-if="scope.row.deviceCheckStatus == 'TERMINATED'" type="info">已结束</el-tag> -->
+                  </template>
+                </el-table-column>
+                <el-table-column
+                  prop="createdDate"
+                  label="创建日期"
+                />
+                <!-- 隐藏 列 这里不用显示,但是在编辑的时候需要获取此数据 -->
+                <el-table-column
+                  v-if="false"
+                  prop="id"
+                  label="序号"
+                />
+                <!-- 隐藏 列 -->
+              </el-table>
+            </div>
           </div>
         </div>
       </el-col>
@@ -92,7 +152,12 @@ export default {
       // 是否有设备检测权限
       has_btn_devicetest_run: false,
       tableData: [],
-      echartData: {}
+      echartData: {},
+      flow_pic_w: '0px',
+      flow_pic_h: '0px',
+      // 视窗显示区高度
+      bodyHeight: (window.innerHeight * 0.92),
+      bodyHeightPx: (window.innerHeight * 0.92) + 'px'
     }
   },
   computed: {
@@ -110,7 +175,7 @@ export default {
       this.common.ApplyElementPurviewByRef(this.$refs)
       // 读取最近检测完设备
       // /test/project/search?page=0&size=4&state=TERMINATED
-      const getUrl = `/test/project/search?page=0&size=4&state=TERMINATED`
+      const getUrl = `/test/project/search?page=0&size=6`
       await httpGet(getUrl).then(res => {
         if (res == null || res.content == null) return
         this.tableData = res.content
@@ -124,6 +189,8 @@ export default {
       // console.log('11sum', sum)
       this.$refs.pie.initData(this.echartData.NEW, this.echartData.RUNNING, this.echartData.TERMINATED)
     })
+    this.flow_pic_w = this.$refs.flow_pic.parentNode.offsetWidth + 'px'
+    this.flow_pic_h = this.$refs.flow_pic.parentNode.offsetHeight + 'px'
   },
   methods: {
     // 报告查看
@@ -204,25 +271,31 @@ export default {
   }
 }
 </script>
+<style>
+  body{
+    background-color: rgb(241, 242, 246) !important;
+  }
+</style>
 <style lang="scss" scoped>
 .dashboard-editor-container {
-
   // border: 1px #CCC solid;
-  padding: 100px 30px;
-  background-color: #fff;
+  padding: 20px 20px;
+  background-color: rgb(241, 242, 246);
   position: relative;
   font-size: 18px;
-
   .item {
-    border: 1px #CCC solid;
+    border: 0px #CCC solid;
     background-color: #FFF;
   }
 
   .left {
-    // border: 1px red solid;
+    .title {
+      padding: 15px;
+      border-bottom: 1px solid #ededed;
+    }
     .left-row-1 {
       width: 100%;
-      // margin-bottom: 20px;
+      height: 40%;
       display: flex;
       justify-content: space-between ;
       .item {
@@ -232,7 +305,7 @@ export default {
         margin-right:20px;
       }
       .creat-new-check {
-        height: 280px;
+        height: 100%;
         display: flex;
         flex-direction: column;
         justify-content: center;
@@ -260,6 +333,7 @@ export default {
     }
     .left-row-2 {
       margin: 20px 0;
+      height: 57%;
       .recently {
         // border: 1px #CCC solid;
         padding: 20px;
@@ -278,13 +352,11 @@ export default {
       width: 100%;
       display: flex;
       margin-top: 20px;
+      height: 57%;
       justify-content: space-between;
       .checkStatusChart {
         width: 100%;
-        padding: 20px;
-        .title {
-          font-weight: bolder;
-        }
+        padding: 0px;
         .left {
           // border: 1px solid #f00;
           float: left;
@@ -319,16 +391,16 @@ export default {
                 margin-top: 6px;
               }
               .status-0 {
-                border: 1px solid #111;
-                background-color: #111;
+                border: 1px solid rgb(255, 190, 14);
+                background-color: rgb(255, 190, 14);
               }
               .status-1 {
-                border: 1px solid #00706B;
-                background-color: #00706B;
+                border: 1px solid rgb(91, 144, 250);
+                background-color: rgb(91, 144, 250);
               }
               .status-2 {
-                border: 1px solid #0093a7;
-                background-color: #0093a7;
+                border: 1px solid rgb(97, 221, 169);
+                background-color: rgb(97, 221, 169);
               }
             }
           }
@@ -347,13 +419,14 @@ export default {
   .right {
     // border: 1px blue solid;
     .flow-chart {
-      padding: 20px;
-      height: 100%;
+      padding: 0px;
+      height: 40%;
       display: flex;
       flex-flow: column;
     }
     .title {
-      margin-bottom: 40px;
+      padding: 15px;
+      border-bottom: 1px solid #ededed;
     }
     .flow-img {
       flex: 1;

+ 4 - 2
src/views/device/check.vue

@@ -141,6 +141,7 @@
                   'isDisable':isDisable
                 }"
               />
+              <!--
               <ModelReportMaster104
                 v-if="isMaster104"
                 :report-parames="{
@@ -149,6 +150,7 @@
                 }"
                 @toggleModel="closeModel"
               />
+              -->
             </div>
           </el-col>
         </el-row>
@@ -175,7 +177,7 @@ import Sample from './tables/Sample'
 // 采样表格(仅主站104检测才显示)
 import SampleMaster104 from './tables/Sample_master104'
 // 报文列表(仅主站104检测才显示)
-import ModelReportMaster104 from './components/ModelReport_master104'
+// import ModelReportMaster104 from './components/ModelReport_master104'
 // 导入总线
 import { EventBus } from '@/main.js'
 
@@ -189,7 +191,7 @@ export default {
     Sample,
     CheckSteps,
     PowerCentent,
-    ModelReportMaster104,
+    // ModelReportMaster104,
     SampleMaster104
   },
   filters: {

+ 1 - 1
src/views/device/components/DeviceConfig.vue

@@ -443,7 +443,7 @@ export default {
       } else {
         this.loadPictures = 3
         if (this.options.deviceProtocolOptions.length > 0) {
-          this.requestData.productType = this.options.deviceProtocolOptions[1].id
+          // this.requestData.productType = this.options.deviceProtocolOptions[1].id
           this.requestData.ipAddr = '127.0.0.1'
           this.requestData.ipPort = '12701'
         }

+ 3 - 2
src/views/device/components/DeviceList.vue

@@ -437,8 +437,8 @@ export default {
         // 通信协议 productType
         productType: this.protocolValue,
         // 建立日期 this.dateValue: start end
-        start: this.searchData.createdDate ? this.searchData.createdDate[0] : null,
-        end: this.searchData.createdDate ? this.searchData.createdDate[1] : null,
+        start: this.searchData.createdDate ? this.searchData.createdDate[0] + ' 00:00:00' : null,
+        end: this.searchData.createdDate ? this.searchData.createdDate[1] + ' 23:59:59' : null,
         // 检测状态
         state: this.searchData.state,
         // 设备名称
@@ -494,6 +494,7 @@ export default {
           })
         }
       }
+      this.search()
     },
     // 设备检测 列表导出
     exportContentList() {

+ 59 - 43
src/views/device/components/ModelFormCommandOpt104.vue

@@ -93,11 +93,11 @@
             type="primary"
             class="dark-button"
             size="big"
-            :disabled="yaoTiaoCommnad.result!==-1"
+            :disabled="yaoTiaoCommnad.selectState==-1"
             @click="commitYaoTiaoSelect"
           >发送选择命令</el-button>
         </div>
-        <div style=" font-weight: bold;margin: 1rem 0;">操作结果:<span :class="`yaokong_pre_result${yaoTiaoCommnad.result}`">{{ yaoTiaoCommnad.resultText }}</span></div>
+        <div style=" font-weight: bold;margin: 1rem 0;">操作结果:<span :class="`yaokong_pre_result${yaoTiaoCommnad.selectState}`">{{ yaoTiaoCommnad.selectHintText }}</span></div>
         <div style="border: 1px solid #ccc;padding: 3rem 5rem;">
           <div style="margin: 2rem 0;">
             <el-button
@@ -105,7 +105,7 @@
               type="primary"
               class="dark-button"
               size="big"
-              :disabled="yaoTiaoCommnad.result!==-1"
+              :disabled="yaoTiaoCommnad.executeState==-1"
               @click="commitYaoTiaoExecute"
             >遥调执行</el-button>
           </div>
@@ -113,11 +113,11 @@
             <el-button
               style="padding: 1rem 5rem;"
               size="big"
-              :disabled="yaoTiaoCommnad.result!==1"
+              :disabled="yaoTiaoCommnad.cancelState==-1"
               @click="commitYaoTiaoCancel"
             >撤消</el-button>
           </div>
-          <div style=" font-weight: bold;margin: 1rem 0;">操作结果:<span :class="`yaokong_pre_result${yaoTiaoCommnad.result2}`">{{ yaoTiaoCommnad.result2Text }}</span></div>
+          <div style=" font-weight: bold;margin: 1rem 0;">操作结果:<span :class="`yaokong_pre_result${yaoTiaoCommnad.executeState}`">{{ yaoTiaoCommnad.executeHintText }}</span></div>
         </div>
       </div>
       <div class="buttons" style="margin-top:20px">
@@ -131,6 +131,7 @@
 <script>
 import { mapGetters } from 'vuex'
 import { Message } from 'element-ui'
+import { EventBus } from '@/main.js'
 import {
   postData,
   putData
@@ -178,10 +179,11 @@ export default {
         result3Text: '未执行' // 直控状态描述
       },
       yaoTiaoCommnad: {
-        result: -1,
-        resultText: '未执行',
-        result2: -1,
-        result2Text: '未执行'
+        selectState: 1,
+        selectHintText: '未执行',
+        executeState: 1,
+        executeHintText: '未执行',
+        cancelState: -1
       },
       // 下拉框单独定义 避免错位
       valueTypeOptions: [],
@@ -238,6 +240,7 @@ export default {
         this.yaoKongCommand.result3 = 1
         this.yaoKongCommand.result3Text = '执行成功'
         this.inputvalueFlag = false
+        EventBus.$emit('refreshManualSample', false)
       }).catch((_err) => {
         this.inputvalueFlag = false
         this.yaoKongCommand.result3 = 2
@@ -290,6 +293,7 @@ export default {
         this.yaoKongCommand.resultText = '未执行'
         this.yaoKongCommand.result2 = 1
         this.yaoKongCommand.result2Text = '执行成功!'
+        EventBus.$emit('refreshManualSample', false)
       }).catch((_err) => {
         this.inputvalueFlag = false
         this.yaoKongCommand.result2 = 2 // 恢复本身
@@ -342,9 +346,10 @@ export default {
         return
       }
       // 遥调选择
-      this.yaoTiaoCommnad.result = -1 // 禁用本身
-      this.yaoTiaoCommnad.resultText = '进行中...'
-      this.yaoTiaoCommnad.result2 = -1 // 禁用遥控
+      this.yaoTiaoCommnad.selectState = -1 // 禁用本身
+      this.yaoTiaoCommnad.selectHintText = '进行中...'
+      this.yaoTiaoCommnad.executeState = -1 // 禁用遥控
+      this.yaoTiaoCommnad.cancelState = -1
       this.inputvalueFlag = true
       var urlencoded = new URLSearchParams()
       urlencoded.append('stage', 'select')
@@ -353,31 +358,34 @@ export default {
       postData(`/iec104/master/${this.modelParames.curPlanId}/normalized`, urlencoded).then((res) => {
         // 操作成功
         // this.inputvalueFlag = false
-        this.yaoTiaoCommnad.result2 = -1
-        this.yaoTiaoCommnad.result2Text = '未执行'
-        this.yaoTiaoCommnad.result = 1
-        this.yaoTiaoCommnad.resultText = '执行成功!'
+        this.yaoTiaoCommnad.selectState = 1
+        this.yaoTiaoCommnad.executeState = 1
+        this.yaoTiaoCommnad.executeHintText = ''
+        this.yaoTiaoCommnad.cancelState = 1
+        this.yaoTiaoCommnad.selectHintText = '执行成功!'
       }).catch((_err) => {
         this.inputvalueFlag = false
         // 禁用 选择 按钮
-        this.yaoTiaoCommnad.result = 2
-        this.yaoTiaoCommnad.resultText = '执行失败!'
+        this.yaoTiaoCommnad.selectState = 2
+        this.yaoTiaoCommnad.selectHintText = '执行失败!'
         // 禁用 执行 按钮
-        this.yaoTiaoCommnad.result2 = -1
-        this.yaoTiaoCommnad.result2Text = '未执行'
+        this.yaoTiaoCommnad.executeState = -1
+        this.yaoTiaoCommnad.executeHintText = ''
         const that = this
         setTimeout(function() {
           // 打开 选择 按钮
-          that.yaoTiaoCommnad.result = -1
-          that.yaoTiaoCommnad.resultText = '未执行'
+          that.yaoTiaoCommnad.selectState = 1
+          that.yaoTiaoCommnad.selectHintText = ''
         }, 3000)
       })
     },
     commitYaoTiaoCancel() {
       // 遥调撤消
       const v = this.modelYaoTiaoOpt.value.replace(/ /gi, '')
-      this.yaoTiaoCommnad.result2 = 0
-      this.yaoTiaoCommnad.result2Text = '进行中...'
+      this.yaoTiaoCommnad.selectState = -1
+      this.yaoTiaoCommnad.executeState = -1
+      this.yaoTiaoCommnad.cancelState = -1
+      this.yaoTiaoCommnad.executeHintText = '进行中...'
       var urlencoded = new URLSearchParams()
       urlencoded.append('stage', 'cancel')
       urlencoded.append('tag', this.modelParames.modelFormData.iec104)
@@ -385,16 +393,19 @@ export default {
       postData(`/iec104/master/${this.modelParames.curPlanId}/normalized`, urlencoded).then((res) => {
         // 操作成功
         this.inputvalueFlag = false
-        this.yaoTiaoCommnad.result = -1
-        this.yaoTiaoCommnad.resultText = '未执行'
-        this.yaoTiaoCommnad.result2 = -1
-        this.yaoTiaoCommnad.result2Text = '需先进行选择'
+        this.yaoTiaoCommnad.executeState = 1
+        this.yaoTiaoCommnad.executeHintText = '执行成功'
+        const that = this
+        setTimeout(() => {
+          that.yaoTiaoCommnad.selectState = 1
+          that.yaoTiaoCommnad.selectHintText = '未执行'
+          that.yaoTiaoCommnad.executeHintText = ''
+        }, 3000)
       }).catch((_err) => {
         this.inputvalueFlag = false
-        this.yaoTiaoCommnad.result2 = 2 // 恢复本身
-        this.yaoTiaoCommnad.result2Text = '执行失败!'
-        this.yaoTiaoCommnad.result = -1 // 恢复预控
-        this.yaoTiaoCommnad.resultText = '未执行'
+        this.yaoTiaoCommnad.cancelState = 1 // 恢复本身
+        this.yaoTiaoCommnad.executeState = 2
+        this.yaoTiaoCommnad.executeHintText = '执行失败!'
       })
     },
     commitYaoTiaoExecute() {
@@ -418,30 +429,35 @@ export default {
         })
         return
       }
-      this.yaoTiaoCommnad.result2 = 0
-      this.yaoTiaoCommnad.result2Text = '执行中'
-      this.yaoTiaoCommnad.result = 0
-      // this.inputvalueFlag = true
+      this.yaoTiaoCommnad.selectState = -1
+      this.yaoTiaoCommnad.executeState = -1
+      this.yaoTiaoCommnad.cancelState = -1
+      this.yaoTiaoCommnad.executeHintText = '进行中...'
+      this.inputvalueFlag = true
       var urlencoded = new URLSearchParams()
       urlencoded.append('stage', 'execute')
       urlencoded.append('tag', this.modelParames.modelFormData.iec104)
       urlencoded.append('value', v)
       postData(`/iec104/master/${this.modelParames.curPlanId}/normalized`, urlencoded).then((res) => {
         // 操作成功
-        this.yaoTiaoCommnad.result = -1
+        this.yaoTiaoCommnad.selectState = 1
         this.inputvalueFlag = false
-        this.yaoTiaoCommnad.result2 = 1
-        this.yaoTiaoCommnad.result2Text = '执行成功!'
+        this.yaoTiaoCommnad.executeState = 1
+        this.yaoTiaoCommnad.executeHintText = '执行成功!'
+        EventBus.$emit('refreshManualSample', false)
       }).catch((_err) => {
         this.inputvalueFlag = false
         // 禁用 执行 按钮
-        this.yaoTiaoCommnad.result2 = 2
-        this.yaoTiaoCommnad.result2Text = '执行失败!'
+        this.yaoTiaoCommnad.executeState = 2
+        this.yaoTiaoCommnad.executeHintText = '执行失败!'
         const that = this
         setTimeout(function() {
           // 打开 选择 按钮
-          that.yaoTiaoCommnad.result = -1
-          that.yaoTiaoCommnad.resultText = '未执行'
+          that.yaoTiaoCommnad.selectState = 1
+          that.yaoTiaoCommnad.selectHintText = '未执行'
+          this.yaoTiaoCommnad.executeState = 1
+          this.yaoTiaoCommnad.executeHintText = ''
+          this.yaoTiaoCommnad.cancelState = 1
         }, 3000)
       })
     },

+ 3 - 3
src/views/device/components/ModelFormFileTransferOpt104.vue

@@ -59,7 +59,7 @@
                     <el-table-column property="name" label="文件名" width="260px" />
                     <el-table-column property="size" label="大小(B)" width="100px" />
                     <el-table-column property="updateRc" label="状态" width="150px" />
-                    <el-table-column property="percent" label="进度" width="80px" />
+                    <el-table-column property="percent" label="边代文件传输进度" width="80px" />
                     <el-table-column property="updateTime" label="最后更新时间" width="160px" />
                     <el-table-column
                       label="操作"
@@ -99,7 +99,7 @@
             </el-row>
           </el-tab-pane>
         </el-tabs>
-        <el-tabs v-model="fileSendTabname" type="border-card" style="margin-top: 20px;">
+        <el-tabs v-if="false" v-model="fileSendTabname" type="border-card" style="margin-top: 20px;">
           <el-tab-pane label="文件直接下发" name="tab3" style="text-align: center;">
             <el-row>
               <el-col>
@@ -138,7 +138,7 @@
 
             <el-row v-show="isSelectedFile" style="margin-top: 20px;">
               <el-col>
-                <span class="sendFileName">文件名称:{{ selectFileName }}</span><span class="sendFileProcess"><span ref="sendFileProcess2" class="sendFileProcess2" /></span><span class="sendFileProcessNumber">{{ sendFileProcessNumber }}</span>
+                <span class="sendFileName">选择的文件名称:{{ selectFileName }}</span><span v-if="false" class="sendFileProcess"><span v-if="false" ref="sendFileProcess2" class="sendFileProcess2" /></span><span v-if="false" class="sendFileProcessNumber">{{ sendFileProcessNumber }}</span>
               </el-col>
             </el-row>
           </el-tab-pane>

+ 4 - 2
src/views/device/components/ModelReport.vue

@@ -31,7 +31,7 @@
       </div>
       <div class="right">
         <div class="export">
-          <a target="_blank" :href="`${APP_BASE_API}/test/execute/${reportParames.curPlanId}/message.xls`"><el-button icon="el-icon-download" class="light-button" size="small">导出</el-button></a>
+          <a target="_blank" :href="`/test/execute/${reportParames.curPlanId}/message.xls`"><el-button icon="el-icon-download" class="light-button" size="small">导出</el-button></a>
         </div>
         <div class="refresh">
           <el-button class="light-button" icon="el-icon-refresh-left" size="small" @click="refreshReport({page:paginationNumber-1,limit:pageLimit},true)">刷新</el-button>
@@ -183,7 +183,7 @@ export default {
     this.refreshReport()
   },
   mounted() {
-    this.comonentVar.deviceReportTitle = `[${this.reportParames.deviceName}]报文详情`
+    this.comonentVar.deviceReportTitle = `报文详情`
   },
   methods: {
     // 关闭model
@@ -217,10 +217,12 @@ export default {
     },
     // 刷新
     refreshReport(pageObj, isRe) {
+      console.log(pageObj)
       pageObj = pageObj || {
         page: 0,
         limit: this.pageLimit
       }
+      this.pageLimit = pageObj.limit
 
       // 报文查询 接口 /test/execute/:runner/message
       // #TODO: 这里要使用新标准,需要添加绝对时间参数的判断

+ 8 - 2
src/views/device/components/StepsBar.vue

@@ -44,6 +44,12 @@ export default {
       // console.log('stepsData.length=', this.stepsData.length)
     })
   },
+  updated() {
+    this.$nextTick(() => {
+      // 网页更新完成后执行
+      this.initSteps()
+    })
+  },
   methods: {
     // 初始化步骤
     initSteps() {
@@ -62,8 +68,8 @@ export default {
     },
     // 跳转到指定步骤
     changeStep(stepIndex) {
-      // console.log(`stepIndex=${currentStep}`)
-      // let currentStep = stepIndex
+      console.log(`stepIndex=${stepIndex}`)
+      this.currentStep = stepIndex
       this.$emit('changeStep', stepIndex)
     },
     // 后退步骤

+ 1 - 1
src/views/device/save.vue

@@ -61,7 +61,7 @@ export default {
   methods: {
     //
     getStep(param) {
-      // console.log('getStep param===========', param)
+      console.log('getStep param===========', param)
       this.currentStep = param
     },
     getDeviceId(param) {

+ 7 - 5
src/views/device/tables/Sample_master104.vue

@@ -92,7 +92,7 @@
             :value="item.id"
           />
         </el-select>
-        <span class="title" style="margin-left: 2rem;">测点:</span>
+        <span class="title" style="margin-left: 2rem;">测点名称或点号:</span>
         <el-input
           v-model="querydata.point"
           class=""
@@ -385,19 +385,21 @@ export default {
     },
     query() {
       // 采样值查询
+      console.log(this.querydata)
       for (const item in this.carddata) {
         this.carddata[item].forEach(element => {
           if (this.querydata.point === '' && this.querydata.pointtype.length === 0) {
             element.isshow = true
           } else {
             let isshowflag = false
-            if (this.querydata.pointtype !== '' && this.querydata.pointtype.indexOf(element.range) > -1) {
+            let nameHas = false
+            if (this.querydata.pointtype.length > 0 && this.querydata.pointtype.indexOf(element.range) > -1) {
               isshowflag = true
             }
-            if (this.querydata.point !== '' && (element.name.toLocaleUpperCase().indexOf(this.querydata.point.toLocaleUpperCase()) > -1) || (element.offset + '') === this.querydata.point) {
-              isshowflag = isshowflag || true
+            if (this.querydata.point !== '' && ((element.name != null && element.name.toLocaleUpperCase().indexOf(this.querydata.point.toLocaleUpperCase()) > -1) || (element.offset + '') === this.querydata.point)) {
+              nameHas = true
             }
-            element.isshow = isshowflag
+            element.isshow = (this.querydata.pointtype.length > 0 && this.querydata.point !== '') ? (isshowflag && nameHas) : (isshowflag || nameHas)
           }
         })
       }

+ 11 - 8
src/views/plan/components/PlanCheckPoint_master104.vue

@@ -426,9 +426,7 @@ export default {
       this.tableData.unshift(newTable)
       // 保存到临时表格数据中
       this.tmpTableData.push(newTable)
-      this.tmpTableData.forEach((element) => {
-        // console.log(`this.tmpTableData element=${element.tmpCheckPointId}`)
-      })
+      this.paginationTotalElements++
     },
     // 导入
     submitUpload() {
@@ -557,7 +555,8 @@ export default {
       }
       const names = {}
       for (let i = 0; i < this.tableData.length; i++) {
-        const v = this.tableData[i].name
+        const v = this.tableData[i].name.replace(/ /gi, '')
+        if (this.tableData[i].id === null && v === '') continue
         if (names[v] != null) {
           isNotPassMesage = '测点名称' + v + '已经存在'
           break
@@ -580,6 +579,7 @@ export default {
         } else {
           const offsets = {}
           for (let i = 0; i < this.tableData.length; i++) {
+            if (this.tableData[i].id === null && this.tableData[i].name.replace(/ /gi, '') === '') continue
             const v = this.tableData[i].range + ':' + this.tableData[i].offset
             if (offsets[v] != null) {
               isNotPassMesage = '点号' + v + '已经存在'
@@ -611,12 +611,13 @@ export default {
           message: `${res.name} 保存成功.`,
           offset: window.screen.height / 3
         })
+        // this.getPlanCheckPoint()
       }
       return res.id
     },
     delClick(row) {
-      // return
-      this.$confirm('此操作将永久删除该记录, 是否继续?', `删除:${row.name}`, {
+      const desc = row.id > 0 ? '此操作将永久删除该记录, 并且未保存的数据将被清除, 是否继续?' : '此操作将永久删除该记录, 是否继续?'
+      this.$confirm(desc, `删除:${row.name}`, {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
@@ -642,6 +643,7 @@ export default {
           const newData = this.tableData.filter(item => item.tmpCheckPointId !== row.tmpCheckPointId)
           // console.log('newData=', newData)
           this.tableData = [...newData]
+          this.paginationTotalElements--
         }
       }).catch(() => {
         this.$message({
@@ -757,7 +759,7 @@ export default {
     async multDelete() {
       // 后端执行完成后,开始前端操作
       // 遍历 `tableData` 数组
-      let isDelCount = false
+      let isDelCount = 0
       for (let i = 0; i < this.tableData.length; i++) {
         const item = this.tableData[i]
         // 判断当前行数据是否被选中
@@ -777,10 +779,11 @@ export default {
             // 如果是新增未保存过的数据,直接删除
             this.tableData.splice(i, 1)
             i-- // 因为 `splice` 方法会修改数组长度,所以需要将 `i` 减去 1,避免漏删下一个元素
+            this.paginationTotalElements--
           }
         }
       }
-      if (isDelCount) this.getPlanCheckPoint()
+      if (isDelCount > 0) this.getPlanCheckPoint()
       // this.showDel = false
     },
     // 多选按钮状态改变 handleSelectionChange

+ 12 - 18
src/views/plan/components/PlanExample.vue

@@ -339,7 +339,7 @@ export default {
       // console.log('addExample 添加用例 this.tableData=', this.tableData)
       // 保存到临时表格数据中
       this.tmpTableData.push(newTable)
-      // console.log('da', this.tableData)
+      this.paginationTotalElements++
     },
     // 获取用例表格数据
     getPlanExamples(pageObj) {
@@ -393,17 +393,7 @@ export default {
     },
     // 批量删除
     async multDelete() {
-      /* const delUrl = `/product/model/${this.currentPlanData.product}/${item.id}`
-      delRecord(delUrl).then((response) => {
-        console.log('delRecord rs=', response)
-        // 后端成功执行后,前端再删除选中行
-        // this.tableData.splice(index, 1)
-        // this.tableData = this.tableData.filter(item => item.id !== row.id)
-        const newData = this.tableData.filter(par => par.id !== item.id)
-        this.tableData = [...newData]
-      }).catch((err) => {
-        console.log('delRecord err rs=', err)
-      }) */
+      let isDelCount = 0
       // 后端执行完成后,开始前端操作
       // 遍历 `tableData` 数组
       for (let i = 0; i < this.tableData.length; i++) {
@@ -418,16 +408,19 @@ export default {
             await delRecord(delUrl).then((response) => {
               // console.log('delRecord rs=', response)
               // 后端成功执行后,前端再删除选中行
-              this.tableData.splice(i, 1)
-              i-- // 因为 `splice` 方法会修改数组长度,所以需要将 `i` 减去 1,避免漏删下一个元素
+              isDelCount++
+              // this.tableData.splice(i, 1)
+              // i-- // 因为 `splice` 方法会修改数组长度,所以需要将 `i` 减去 1,避免漏删下一个元素
             })
           } else {
             // 如果是新增未保存过的数据,直接删除
             this.tableData.splice(i, 1)
             i-- // 因为 `splice` 方法会修改数组长度,所以需要将 `i` 减去 1,避免漏删下一个元素
+            this.paginationTotalElements--
           }
         }
       }
+      if (isDelCount > 0) this.getPlanExamples()
     },
     // 修改json
     editJson(jsonData, index) {
@@ -573,8 +566,8 @@ export default {
     },
     // 删除步骤 http://1.14.75.75:8080/test/step/:step
     delClick(row, index) {
-      // console.log('delClick row=', row)
-      this.$confirm('此操作将永久删除该记录, 是否继续?', `删除:${row.exampleName}`, {
+      const desc = row.exampleId > 0 ? '此操作将永久删除该记录, 并且未保存的数据将被清除, 是否继续?' : '此操作将永久删除该记录, 是否继续?'
+      this.$confirm(desc, `删除:${row.exampleName}`, {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
@@ -584,13 +577,14 @@ export default {
           delRecord(`/test/unit/${row.exampleId}`).then(response => {
             // console.log('delRecord rs=', response)
             // 后端成功执行后,前端再删除选中行
-            this.tableData.splice(index, 1)
+            this.getPlanExamples()
           }).catch(err => {
             console.log('delRecord err rs=', err)
           })
         } else {
-        // 如果是新增的临时行,直接删除选中行
+          // 如果是新增的临时行,直接删除选中行
           this.tableData.splice(index, 1)
+          this.paginationTotalElements--
         }
       }).catch(() => {
         this.$message({

+ 12 - 5
src/views/plan/components/PlanSteps.vue

@@ -310,6 +310,7 @@ export default {
       this.tableData.unshift(newTable)
       // 保存到临时表格数据中
       this.tmpTableData.push(newTable)
+      this.paginationTotalElements++
     },
     // 获取测点表格数据
     async getPlanSteps(pageObj) {
@@ -391,6 +392,7 @@ export default {
     },
     // 批量删除
     async multDelete() {
+      let isDelCount = 0
       for (let i = 0; i < this.tableData.length; i++) {
         const item = this.tableData[i]
         // 判断当前行数据是否被选中
@@ -403,8 +405,9 @@ export default {
             await delRecord(delUrl).then((response) => {
               // console.log('delRecord rs=', response)
               // 后端成功执行后,前端再删除选中行
-              this.tableData.splice(i, 1)
-              i-- // 因为 `splice` 方法会修改数组长度,所以需要将 `i` 减去 1,避免漏删下一个元素
+              isDelCount++
+              // this.tableData.splice(i, 1)
+              // i-- // 因为 `splice` 方法会修改数组长度,所以需要将 `i` 减去 1,避免漏删下一个元素
             }).catch((err) => {
               console.log('delRecord err rs=', err)
             })
@@ -412,9 +415,11 @@ export default {
             // 如果是新增未保存过的数据,直接删除
             this.tableData.splice(i, 1)
             i-- // 因为 `splice` 方法会修改数组长度,所以需要将 `i` 减去 1,避免漏删下一个元素
+            this.paginationTotalElements--
           }
         }
       }
+      if (isDelCount > 0) this.getPlanSteps()
     },
     // 切换下拉框
     selectChange(selectData, index) {
@@ -507,14 +512,15 @@ export default {
           message: `${res.id},保存成功`,
           offset: window.screen.height / 3
         })
+        // this.getPlanSteps()
       } catch (error) {
         console.error('saveClick error:', error)
       }
     },
     // 删除步骤 http://1.14.75.75:8080/test/step/:step
     delClick(row, index) {
-      // console.log('delClick row=', row)
-      this.$confirm('此操作将永久删除该记录, 是否继续?', `删除:${row.id}`, {
+      const desc = row.id > 0 ? '此操作将永久删除该记录, 并且未保存的数据将被清除, 是否继续?' : '此操作将永久删除该记录, 是否继续?'
+      this.$confirm(desc, `删除:${row.id}`, {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
@@ -525,7 +531,7 @@ export default {
             .then((response) => {
               // console.log('delRecord rs=', response)
               // 后端成功执行后,前端再删除选中行
-              this.tableData.splice(index, 1)
+              this.getPlanSteps()
               this.$message({
                 type: 'success',
                 message: '删除成功!',
@@ -539,6 +545,7 @@ export default {
           // 如果是新增的临时行,直接删除选中行
           this.tableData.splice(index, 1)
           this.tmpTableData.splice(index, 1)
+          this.paginationTotalElements--
         }
       }).catch(() => {
         this.$message({

+ 3 - 4
src/views/plan/save.vue

@@ -7,8 +7,8 @@
     <!-- 1-检测方案配置表单 -->
     <plan-config v-if="mountedFinished" class-name="plan-config" :current-step="currentStep" :current-plan-data="currentPlanData" @updataPlanData="updataCurrentPlanData" @changeStep="getStep" />
     <!-- 2-测点导入 -->
-    <plan-check-point v-if="currentPlanData.id>0 && isMaster104===false" ref="planCheckPoint" class-name="plan-check-point" :current-step="currentStep" :current-plan-data="currentPlanData" @changeStep="getStep" />
-    <plan-check-point-master104 v-if="currentPlanData.id>0 && isMaster104===true" ref="planCheckPointMaster104" class-name="plan-check-point" :current-step="currentStep" :current-plan-data="currentPlanData" @changeStep="getStep" />
+    <!--<plan-check-point v-if="currentPlanData.id>0 && isMaster104===false" ref="planCheckPoint" class-name="plan-check-point" :current-step="currentStep" :current-plan-data="currentPlanData" @changeStep="getStep" />-->
+    <plan-check-point-master104 v-if="currentPlanData.id>0" ref="planCheckPointMaster104" class-name="plan-check-point" :current-step="currentStep" :current-plan-data="currentPlanData" @changeStep="getStep" />
     <!-- 3-步骤设置 -->
     <plan-steps v-if="currentPlanData.id>0" ref="planSteps" class-name="plan-steps" :current-step="currentStep" :current-plan-data="currentPlanData" @changeStep="getStep" />
     <!-- 4-用例设置 -->
@@ -23,7 +23,7 @@ import StepsBar from './components/StepsBar'
 // 检测方案配置
 import PlanConfig from './components/PlanConfig'
 // 测点导入
-import PlanCheckPoint from './components/PlanCheckPoint'
+// import PlanCheckPoint from './components/PlanCheckPoint'
 // 主站104检测方案-测点导入
 import PlanCheckPointMaster104 from './components/PlanCheckPoint_master104'
 // 步骤设置
@@ -37,7 +37,6 @@ export default {
   components: {
     StepsBar,
     PlanConfig,
-    PlanCheckPoint,
     PlanCheckPointMaster104, // 主站104检测时的测点导入组件
     PlanSteps,
     PlanExample