Browse Source

Merge branch 'system-integration' of http://39.106.8.246:3003/web/ibms into system-integration

zhulizhen1111 4 years ago
parent
commit
599f2d7b31

+ 60 - 1
src/api/scan/request.js

@@ -1906,16 +1906,75 @@ export function getIntegrateStatisticsToLoop(param, success) {
   let url = `/pointconfig/report/meterfunc-statis`
   http.postJson(url, param, success)
 }
+
 //表号功能号总览
 export function getTabFunNumOverview(param, success) {
   let url = `/pointconfig/report/meterfunc-overview`
   http.postJson(url, param, success)
 }
+
+/*********************************************************************************/
+
+// 通讯状态
+export function communicationStatus(param, success) {
+  let url = `/pointconfig/datasource/connection`
+  http.postJson(url, param, success)
+}
+
+// 点位数量
+export function numberOfPoints(param, success) {
+  let url = `/pointconfig/datasource/pointstatis`
+  http.postJson(url, param, success)
+}
+
+//数据源启动
+export function originOpen(param, success) {
+  let url = `/pointconfig/datasource/start`
+  http.postJson(url, param, success)
+}
+
+//数据源停止
+export function originBin(param, success) {
+  let url = `/pointconfig/datasource/stop`
+  http.postJson(url, param, success)
+}
+
+//数据源测试
+export function originTest(param, success) {
+  let url = `/pointconfig/datasource/check`
+  http.postJson(url, param, success)
+}
+
+//监测详情
+export function testDetail(param, success) {
+  let url = `/pointconfig/datasource/pointdetail`
+  http.postJson(url, param, success)
+}
+
+//当前设置值
+export function settingValue(param, success) {
+  let url = `/pointconfig/datasource/pointset-present`
+  http.postJson(url, param, success)
+}
+
+//点位测试
+export function pointTest(param, success) {
+  let url = `/pointconfig/datasource/pointTest`
+  http.postJson(url, param, success)
+}
+
+/*********************************************************************************/
+
 //表号功能号对应历史数据
 export function getHistoryData(query, param, success) {
   let url = `/data-platform-3/hisdata/batch_query_period_data_by_metfun`
   url += `?projectId=${query.projectId}&secret=${query.secret}`
-  fetch({ url: url, method: 'post', data: param, headers: { 'ProjectId': query.projectId, 'Comming': 'adm', 'Account': query.userInfo.username } }).then((response) => {
+  fetch({
+    url: url,
+    method: 'post',
+    data: param,
+    headers: {'ProjectId': query.projectId, 'Comming': 'adm', 'Account': query.userInfo.username}
+  }).then((response) => {
     success(response.data);
   }).catch(error => {
     console.error(error);

+ 13 - 12
src/components/ledger/handsontables/device.vue

@@ -1,15 +1,16 @@
 <template>
-    <div style='height: calc(100% - 44.5px);padding: 0px 10px 10px;box-sizing: border-box;' v-loading='loading'>
-        <div class='hanson-bar'>
-            <div style='float:right;overflow:hidden;'>
-                <!-- <span style="width:20px;float:left;display:block;height:20px;cursor: pointer;" @click="changeAssetsFalg">
-          <i v-show="!onlyRead" class="el-icon-fa  el-icon-fa-compass"></i>
-                </span>-->
-                <span>当前筛选条件下共{{page.total || '--'}}设备</span>
-            </div>
-            <el-select v-model='onlyRead' @change='getHeaderData(mess)' style='width:100px;margin-right:20px;vertical-align:bottom;'>
-                <el-option v-for='item in options' :key='item.value' :label='item.label' :value='item.value'></el-option>
-            </el-select>
+  <div style='height: calc(100% - 44.5px);padding: 0px 10px 10px;box-sizing: border-box;' v-loading='loading'>
+    <div class='hanson-bar'>
+      <div style='float:right;overflow:hidden;'>
+        <!-- <span style="width:20px;float:left;display:block;height:20px;cursor: pointer;" @click="changeAssetsFalg">
+  <i v-show="!onlyRead" class="el-icon-fa  el-icon-fa-compass"></i>
+        </span>-->
+        <span>当前筛选条件下共{{page.total || '--'}}设备</span>
+      </div>
+      <el-select v-model='onlyRead' @change='getHeaderData(mess)'
+                 style='width:100px;margin-right:20px;vertical-align:bottom;'>
+        <el-option v-for='item in options' :key='item.value' :label='item.label' :value='item.value'></el-option>
+      </el-select>
             <el-select v-model='showType' @change='initTable' style='width:100px;margin-right:10px;vertical-align:bottom;'>
                 <el-option v-for='item in showTypes' :key='item.value' :label='item.label' :value='item.value'></el-option>
             </el-select>
@@ -71,7 +72,7 @@
             </p>
         </div>
 
-        <div class='center middle_sty' style='height: 91%' v-show='mess.deviceId && (!tableData || !tableData.length)'>
+        <div class='center middle_sty' style='height: 91%;' v-show='mess.deviceId && (!tableData || !tableData.length)' >
             <p>
                 <i class='icon-wushuju iconfont'></i>
                 暂无数据

+ 121 - 121
src/components/point/report/integrateStatistics.vue

@@ -11,43 +11,39 @@
     </div>
     <!--    通讯状态-->
     <div class="statistics-chart" v-if="type" style="border-top:5px solid #eee;">
-        <span class="contain-title-leftblock">
+      <span class="contain-title-leftblock">
          <i class="iconfont icon-juxing"/>
         通讯状态
-          <i class="el-icon-refresh" style="cursor: pointer"/>
+          <i class="el-icon-refresh" style="cursor: pointer" @click="getStatus"/>
         </span>
-      <el-table
-        :data="tableData"
-        height="250"
-        border
-        style="width: 100%">
-        <el-table-column
-          prop="date"
-          label="数据源名称"
-        >
-        </el-table-column>
-        <el-table-column
-          prop="name"
-          label="协议类型"
-        >
-        </el-table-column>
-        <el-table-column
-          prop="address"
-          label="状态">
-        </el-table-column>
-        <el-table-column
-          prop="date"
-          label="CPU"
-        >
-        </el-table-column>
-        <el-table-column
-          prop="name"
-          label="内存"
-        >
-        </el-table-column>
-        <el-table-column
-          prop="address"
-          label="操作">
+      <el-table :data="statusList" height="250" border style="width: 100%">
+        <el-table-column prop="Name" label="数据源名称" show-overflow-tooltip align='center'/>
+        <el-table-column prop="ProtocolType" label="协议类型" show-overflow-tooltip align='center'/>
+        <el-table-column prop="Status" label="状态" show-overflow-tooltip align='center' width="65"/>
+        <el-table-column prop="Cpu" label="CPU" width="55" show-overflow-tooltip align='center'/>
+        <el-table-column prop="Memory" label="内存" width="55" show-overflow-tooltip align='center'/>
+        <el-table-column prop="" label="操作">
+          <template slot-scope="scope">
+            <el-button @click="handleOpen(scope.row)" type="text" size="small" :disabled="scope.row.StartState == 1">
+              启动
+            </el-button>
+            <el-button @click="handleBin(scope.row)" type="text" size="small" :disabled="scope.row.StartState == 0">停止
+            </el-button>
+            <el-popover
+              placement="right"
+              width="300"
+              trigger="click"
+              @hide="removeTestValue"
+            >
+              <div>测试报文</div>
+              <el-input type="textarea" :rows="3" v-model="test"/>
+              <div style=" margin: 10px auto">
+                <el-button type="primary" size="mini" @click="handleTest(scope.row)">测试</el-button>
+              </div>
+              <el-input type="textarea" :rows="3" v-model="testLog" disabled/>
+              <el-button slot="reference" type="text">测试</el-button>
+            </el-popover>
+          </template>
         </el-table-column>
       </el-table>
     </div>
@@ -56,34 +52,14 @@
         <span class="contain-title-leftblock">
          <i class="iconfont icon-juxing"/>
         点位数量
-          <i class="el-icon-refresh" style="cursor: pointer"/>
+          <i class="el-icon-refresh" style="cursor: pointer" @click="getNumberPoints"/>
         </span>
-      <el-table
-        :data="tableData"
-        height="250"
-        border
-        style="width: 100%">
-        <el-table-column
-          prop="date"
-          label="数据源名称">
-        </el-table-column>
-        <el-table-column
-          prop="name"
-          label="总点位数量">
-        </el-table-column>
-        <el-table-column
-          prop="address"
-          label="已获取">
-        </el-table-column>
-        <el-table-column
-          prop="name"
-          label="未获取"
-        >
-        </el-table-column>
-        <el-table-column
-          prop="address"
-          label="上数率">
-        </el-table-column>
+      <el-table :data="pointList" height="250" border style="width: 100%">
+        <el-table-column prop="Name" label="数据源名称"/>
+        <el-table-column prop="Sum" label="总点位数量"/>
+        <el-table-column prop="Obtained" label="已获取"/>
+        <el-table-column prop="NotObtained" label="未获取"/>
+        <el-table-column prop="ObtainedRate" label="上数率"/>
       </el-table>
     </div>
     <!-- 图形图 -->
@@ -136,13 +112,25 @@
   import "echarts/lib/chart/bar";
   import "echarts/lib/component/tooltip";
   import "echarts/lib/component/title";
-
-  import {getIntegrateStatisticsToBar, getIntegrateStatisticsToLoop} from "@/api/scan/request";
+  import {
+    communicationStatus,
+    getIntegrateStatisticsToBar,
+    getIntegrateStatisticsToLoop,
+    numberOfPoints,
+    originBin,
+    originOpen,
+    originTest
+  } from "@/api/scan/request";
   import pointTabOverview from "./pointTabOverview";
 
   export default {
     data() {
       return {
+
+        test: '',
+        testLog: '',
+        pointList: [],//点位数量集合
+        statusList: [],//通讯状态集合
         //环形图
         loopChart: null,
         loopchartLoading: false,
@@ -159,39 +147,45 @@
         originalPoint: null,
         pointInSum: 0, //左侧柱形图已接入
         pointOutSum: 0, //左侧柱形图未接入
-        tableData: [{
-          date: '2016-05-03',
-          name: '王小虎',
-          address: '上海市普陀区金沙江路 1518 弄'
-        }, {
-          date: '2016-05-02',
-          name: '王小虎',
-          address: '上海市普陀区金沙江路 1518 弄'
-        }, {
-          date: '2016-05-04',
-          name: '王小虎',
-          address: '上海市普陀区金沙江路 1518 弄'
-        }, {
-          date: '2016-05-01',
-          name: '王小虎',
-          address: '上海市普陀区金沙江路 1518 弄'
-        }, {
-          date: '2016-05-08',
-          name: '王小虎',
-          address: '上海市普陀区金沙江路 1518 弄'
-        }, {
-          date: '2016-05-06',
-          name: '王小虎',
-          address: '上海市普陀区金沙江路 1518 弄'
-        }, {
-          date: '2016-05-07',
-          name: '王小虎',
-          address: '上海市普陀区金沙江路 1518 弄'
-        }]
       };
     },
     props: ['type'],
     methods: {
+      removeTestValue() {
+        this.test = ''
+      },
+      //启动
+      handleOpen(row) {
+        originOpen(row, res => {
+          this.getStatus()
+        })
+      },
+      //暂停
+      handleBin(row) {
+        originBin(row, res => {
+          this.getStatus()
+        })
+      },
+      //测试
+      handleTest(row) {
+        row.Content = this.test
+        originTest(row, res => {
+          // this.getStatus()
+
+        })
+      },
+      //点位数量
+      getNumberPoints() {
+        numberOfPoints({}, res => {
+          this.pointList = res.Content
+        })
+      },
+      //通讯状态
+      getStatus() {
+        communicationStatus({}, res => {
+          this.statusList = res.Content
+        })
+      },
       //加载图表数据
       loadChart() {
         let that = this;
@@ -200,16 +194,18 @@
         getIntegrateStatisticsToLoop({}, res => {
           //设置点位-表号功能号数据
           const tempData = res.Content[0];
-          that.tabFuncNumSum = tempData.Sum
-          that.oneToM = tempData.OToM
-          that.mToOne = tempData.MToO
-          that.disConn = tempData.Disconn
-          //设置环形表数据
-          that.loopChartData = [
-            {value: tempData.RelatedCount, name: "已对实例数量"},
-            {value: tempData.Sum - tempData.RelatedCount, name: "未对应实例数量"}
-          ];
+          if (tempData) {
+            that.tabFuncNumSum = tempData.Sum
+            that.oneToM = tempData.OToM
+            that.mToOne = tempData.MToO
+            that.disConn = tempData.Disconn
+            //设置环形表数据
+            that.loopChartData = [
+              {value: tempData.RelatedCount, name: "已对实例数量"},
+              {value: tempData.Sum - tempData.RelatedCount, name: "未对应实例数量"}
+            ];
 
+          }
           //环形图参数
           let loopOption = {
             tooltip: {
@@ -324,28 +320,32 @@
           return sum;
         })();
       });
+      },
+      //点位/表号
+      showOverview() {
+        this.$refs.overviewDialog.loadOverviewData();
+      },
+      init() {
+        this.loadChart();
+      }
     },
-    //点位/表号
-    showOverview() {
-      this.$refs.overviewDialog.loadOverviewData();
+    mounted() {
+      this.init();
+      this.getStatus()
+      this.getNumberPoints()
+      //图表随窗口变化
+      let that = this;
+      window.onresize = () => {
+        if (that.loopChart != null)
+          that.loopChart.resize();
+      };
+
     },
-    init() {
-      this.loadChart();
-    }
-  },
-  mounted() {
-    this.init();
-    //图表随窗口变化
-    let that = this;
-    window.onresize = () => {
-      if (that.loopChart != null)
-        that.loopChart.resize();
-    };
-  },
-  components: {
-    pointTabOverview
-  }
-};
+    components: {
+      pointTabOverview
+    },
+
+  };
 </script>
 
 <style lang="less" scoped>

+ 214 - 0
src/components/point/report/tabControlTest.vue

@@ -0,0 +1,214 @@
+<template>
+  <div id="controlTest">
+    <div class="query-area" style="padding:10px;">
+      <el-select v-model="originName" placeholder="请选择数据源" clearable @change="changeHandleSelect">
+        <el-option
+          v-for="(item,index) in selectAggregate.originList"
+          :key="index"
+          :label="item"
+          :value="item">
+        </el-option>
+      </el-select>
+      <el-select v-model="statusName" placeholder="请选择读写" clearable @change="changeHandleSelect">
+        <el-option
+          v-for="(item,index) in statusList"
+          :key="index"
+          :label="item"
+          :value="index">
+        </el-option>
+      </el-select>
+      <span style="float: right">
+    <el-popover
+      placement="bottom"
+      style="padding: 0 20px 10px 20px;right: 10px"
+      width="200"
+      v-model="visible">
+      <div>输入控制指令</div>
+  <el-input type="textarea" :rows="2" v-model="instructions"/>
+  <div style="text-align: right; margin-top: 10px">
+    <el-button size="mini" type="text" @click="visible = false">取消</el-button>
+    <el-button type="primary" size="mini" @click="implement">确定</el-button>
+  </div>
+  <el-button slot="reference">执行</el-button>
+</el-popover>
+        <i class="el-icon-download" style="cursor: pointer" @click="downloads" title="下载"/>
+      </span>
+    </div>
+    <!-- 数据表格 -->
+    <div class="table-area">
+      <el-table
+        :data="tableDate"
+        style="width: 100%"
+        height="calc(100% - 32px)"
+        v-loading="loading"
+        :header-cell-style="headerStyle"
+        @selection-change="handleSelectionChange"
+      >
+        <el-table-column type="selection"/>
+        <el-table-column label="序号" type="index" align='center' width="55">
+          <template slot-scope="scope">
+            {{ scope.$index + (currentPage - 1) * pageSize + 1 }}
+          </template>
+        </el-table-column>
+        <el-table-column prop='DatasourceName' label='数据源名称' show-overflow-tooltip align='center'/>
+        <el-table-column prop='ReadWrite' label='读写' show-overflow-tooltip align='center'/>
+        <el-table-column prop='Meterfunc' label='整合ID' show-overflow-tooltip align='center'/>
+        <el-table-column prop='Description' label='点位描述' show-overflow-tooltip align='center'/>
+        <el-table-column prop='Status' label='状态' show-overflow-tooltip align='center'/>
+        <el-table-column prop='Data' label='反馈值' show-overflow-tooltip align='center'/>
+      </el-table>
+      <!-- 分页 -->
+      <el-pagination
+        @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        :page-sizes="pageSizes"
+        :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"
+        style="float:right;margin-top:10px;padding:2px 5px;">
+      </el-pagination>
+    </div>
+
+  </div>
+</template>
+
+<script>
+import {pointTest, settingValue} from '@/api/scan/request'
+
+export default {
+  name: "tabControlTest",
+  props: ['selectAggregate'],
+  data() {
+    return {
+      pageSizes: [10, 20, 50, 100],
+      pageSize: 50,
+      currentPage: 1,
+      total: 0,
+      tableDate: [],
+      visible: false,
+      //表格头样式
+      headerStyle: {
+        backgroundColor: '#e1e4e5',
+        color: '#2b2b2b',
+        lineHeight: '30px'
+      },
+      instructions: '',
+      originName: "",
+      statusName: '',//读写
+      statusList: ['读', '写', '读写'],  // 0:读 1:写 2:读写
+      loading: false,//加载
+    }
+  },
+  created() {
+    this.getSettingValue()
+  },
+  methods: {
+    //执行
+    implement() {
+      let list = this.multipleSelection.map(i => ({Data:this.instructions,...i}))
+      this.visible = false
+      this.getPointTest(list)
+    },
+    //当前设定值
+    getSettingValue() {
+      let _this = this
+      _this.loading = true;
+
+      let param = {
+        PageNumber: this.currentPage,
+        PageSize: this.pageSize
+      }, Filters = ''
+      if (_this.originName) {
+        Filters += `DatasourceName='${_this.originName}';`
+      }
+      if (_this.statusName) {
+        Filters += `ReadWrite='${_this.statusName}';`
+      }
+      let index = Filters.lastIndexOf(';')
+      Filters = Filters.substring(0, index)
+      param.Filters = Filters !== '' ? Filters : undefined
+      settingValue(param, res => {
+        this.tableDate = res.Content
+        _this.total = res.Total
+        _this.loading = false;
+      })
+    },
+
+    //点位测试
+    getPointTest(list) {
+      pointTest(list, res => {
+        this.tableDate = res.Content
+
+      })
+    },
+    changeHandleSelect() {
+      this.getSettingValue()
+    },
+
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    //分页更换size
+    handleSizeChange(val) {
+      this.currentPage = 1;
+      this.pageSize = val;
+      this.getSettingValue()
+    },
+    //分页更换页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getSettingValue()
+    },
+    //点击下载
+    downloads() {
+      let a = document.createElement('a')
+      a.href = '/pointconfig/datasource/pointset-present-download'
+      a.download = '控制测试'
+      a.click()
+      document.body.removeChild(a)
+    },
+  }
+}
+</script>
+
+<style lang="less" scoped>
+#controlTest {
+  border-top: 5px solid #eee;
+  height: calc(100% - 5px);
+  width: 100%;
+  overflow: hidden;
+}
+
+.table-area {
+  height: calc(100% - 72px);
+  padding: 0px 10px 10px 10px;
+}
+
+.table-area i {
+  text-align: right;
+  font-size: 12px;
+  cursor: pointer;
+  float: right;
+}
+
+.dialog-btn {
+  display: none;
+  height: 29px;
+}
+
+/deep/ .el-drawer__body {
+  height: 90%;
+  overflow-y: auto;
+}
+
+/deep/ .el-table__body-wrapper tr:hover {
+  .dialog-btn {
+    display: inline;
+  }
+}
+
+/deep/ .el-dialog__body {
+  padding-bottom: 20px;
+}
+
+/deep/ .el-drawer__header > :first-child:focus {
+  outline: none;
+}
+</style>

+ 286 - 217
src/components/point/report/tabFunDetail.vue

@@ -1,94 +1,74 @@
 <template>
-  <div id="tabFunNumOverview">
+  <div id="tabFunDetail">
     <!-- 查询 新增 -->
     <div class="query-area" style="padding:10px;">
-      <!--      <el-input :placeholder="`请输入表号功能号`" v-model="tabFunNum" @keyup.enter.native="handleCurrentChange(1)" style="width:240px;">-->
-      <!--        <i slot="suffix" class="el-input__icon el-icon-search" @click="handleCurrentChange(1)"></i>-->
-      <!--      </el-input>-->
-      <!--      <p style="overflow: hidden;float:right;">-->
-      <!--        <el-button style="height:32px" @click='handleDrawer({},3)'>新增自定义</el-button>-->
-      <!--      </p>-->
-      <el-select v-model="value" placeholder="请选择数据源">
+      <el-select v-model="originName" placeholder="请选择数据源" clearable @change="changeHandleSelect">
         <el-option
-          v-for="item in options"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value">
+          v-for="(item,index) in selectAggregate.originList"
+          :key="index"
+          :label="item"
+          :value="item">
         </el-option>
       </el-select>
-      <el-select v-model="value" placeholder="请选择状态">
+      <el-select v-model="statusName" placeholder="请选择状态" clearable @change="changeHandleSelect">
         <el-option
-          v-for="item in options"
+          v-for="item in statusList"
           :key="item.value"
           :label="item.label"
           :value="item.value">
         </el-option>
       </el-select>
-      <el-select v-model="value" placeholder="请选择获取方式">
+      <el-select v-model="accessList" placeholder="请选择获取方式" clearable @change="changeHandleSelect">
         <el-option
-          v-for="item in options"
+          v-for="item in getAccessMethods"
           :key="item.value"
           :label="item.label"
           :value="item.value">
         </el-option>
       </el-select>
+      <span style="float: right">
+      <el-button @click="handleControl">控制测试</el-button>
+        <i class="el-icon-refresh" style="cursor: pointer;padding: 0 15px" title="刷新" @click="getOverViewList"/>
+        <i class="el-icon-download" style="cursor: pointer" @click="downloads" title="下载"/>
+<!--        <a class="el-icon-download" style="cursor: pointer"   href="/pointconfig/datasource/pointdetail-download"-->
+<!--           download="检测详情"title="下载"/>-->
+
+      </span>
     </div>
     <!-- 数据表格 -->
     <div class="table-area">
-      <el-table :data="tableData" style="width: 100%" height="calc(100% - 32px)" v-loading="loading"
-                :header-cell-style="headerStyle"
-                @row-click="handleClickRow">
-        <el-table-column
-          label="序号"
-          type="index"
-        >
-        </el-table-column>
-                <el-table-column prop='' label='状态' show-overflow-tooltip width="35" header-align='center'>
-                  <template slot-scope="scope">
-                      <i class="el-icon-warning-outline" style="float:left;margin: 0 5px;color: red;font-size:18px;"></i>
-                  </template>
-                </el-table-column>
-        <el-table-column prop='MeterFunc' label='表号-功能号' show-overflow-tooltip align='center'></el-table-column>
-        <el-table-column prop='Data.Data' label='查看分精度' show-overflow-tooltip align='center'>
+      <el-table
+        :data="tableData" style="width: 100%" height="calc(100% - 32px)" v-loading="loading"
+        :header-cell-style="headerStyle"
+        @row-click="handleClickRow"
+      >
+        <el-table-column label="序号" type="index" align='center' width="55">
           <template slot-scope="scope">
-            <el-button style="padding:7px 15px;font-size:15px;" @click="handleDrawer(scope.row, 0)">
-              <i class="el-icon-s-data"/></el-button>
+            {{ scope.$index + (currentPage - 1) * pageSize + 1 }}
           </template>
         </el-table-column>
-        <el-table-column prop='Data.Time' label='对应值 - 获取时间' show-overflow-tooltip min-width="270" header-align='center'
-                         align='center'
-                         style="position:relative;">
+        <el-table-column prop='Status' label='状态' show-overflow-tooltip align='center' width="45">
           <template slot-scope="scope">
-            <div style="width:175px;display:inline-block;">
-              <span style="line-height:29px;">{{ scope.row.Data? (scope.row.Data.Data  || '--'): '--' }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-              <span style="line-height:29px;">{{ scope.row.Data? scope.row.Data.Time : '' }}</span>
-            </div>
-            <span style="width:55.33px;display:inline-block;padding-left:10px;">
-              <el-button class="dialog-btn" @click="refreshThisRow(scope.row)"><i
-                class="el-icon-refresh"></i></el-button>
-            </span>
+            <div v-if="scope.row.Status ==0" class="circular green"></div>
+            <div v-if="scope.row.Status ==1" class="circular yellow"></div>
+            <div v-else class="circular red"></div>
           </template>
         </el-table-column>
-        <el-table-column prop='RelatedPoint' label='涉及子系统点位(数据来源)' show-overflow-tooltip min-width="150" align='center'>
+        <el-table-column prop='Meterfunc' label='整合ID' show-overflow-tooltip align='center'/>
+        <el-table-column prop='Description' label='点位描述' show-overflow-tooltip align='center'/>
+        <el-table-column prop='Data.Data' label='data' show-overflow-tooltip align='center' style="position:relative;"/>
+        <el-table-column prop='Data.Time' label='data.Time' show-overflow-tooltip align='center'/>
+        <el-table-column prop='Data.Delay' label='延迟(s)' show-overflow-tooltip align='center'/>
+        <el-table-column prop='DatasourceName' label='数据源' show-overflow-tooltip align='center'/>
+        <el-table-column prop='Method' label='获取方式' show-overflow-tooltip align='center'/>
+        <el-table-column prop='MeterFunc' label='查看曲线' show-overflow-tooltip align='center'>
           <template slot-scope="scope">
-            <span style="display:inline-block;width:16px;line-height:29px;">{{ scope.row.RelatedPoint }}</span>
-            <span style="width:55.33px;display:inline-block;padding-left:10px;">
-              <el-button class="dialog-btn" v-if="scope.row.RelatedPoint" @click="handleDrawer(scope.row, 1)"><i
-                class="el-icon-coin"></i></el-button>
-            </span>
-          </template>
-        </el-table-column>
-        <el-table-column prop='RelatedInstance' label='涉及的对象实例(应用到)' show-overflow-tooltip min-width="150"
-                         align='center'>
-          <template slot-scope="scope">
-            <span style="display:inline-block;width:16px;line-height:29px;">{{ scope.row.RelatedInstance }}</span>
-            <span style="width:55.33px;display:inline-block;padding-left:10px;">
-              <el-button class="dialog-btn" v-if="scope.row.RelatedInstance" @click="handleDrawer(scope.row, 2)"><i
-                class="el-icon-coin"></i>
-              </el-button>
-            </span>
+            <el-button style="padding:7px 15px;font-size:15px;" @click="handleDrawer(scope.row, 0)">
+              <i class="el-icon-s-data"/></el-button>
           </template>
         </el-table-column>
+        <el-table-column prop='Quality' label='质量评价' show-overflow-tooltip align='center'/>
+
       </el-table>
       <!-- 分页 -->
       <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
@@ -118,183 +98,272 @@
 </template>
 
 <script>
-  import {Message} from 'element-ui';
-  import {getTabFunNumOverview} from '@/api/scan/request'
-  import historyChart from './historyChart'
-  import dataSource from './dataSource'
-  import objectInstance from './objectInstance'
-  import addTabFunNum from './addTabFunNum'
-  import lStorage from '@/utils/localStorage'
+import {testDetail} from '@/api/scan/request'
+import historyChart from './historyChart'
+import dataSource from './dataSource'
+import objectInstance from './objectInstance'
+import addTabFunNum from './addTabFunNum'
+import lStorage from '@/utils/localStorage'
+import {mapGetters} from "vuex";
 
-  export default {
-    data() {
-      return {
-        //表格头样式
-        headerStyle: {
-          backgroundColor: '#e1e4e5',
-          color: '#2b2b2b',
-          lineHeight: '30px'
-        },
-        // allTableData: [],//所有表格数据
-        tableData: [],
-        pageSizes: [10, 20, 50, 100],
-        pageSize: 50,
-        currentPage: 1,
-        total: 0,
-        loading: false,//加载
-        tabFunNum: null,//表号功能号
-        //抽屉
-        drawers: [
-          {drawer: false, direction: 'rtl', objId: ''},
-          {drawer: false, direction: 'rtl', objId: ''},
-          {drawer: false, direction: 'rtl', objId: '', value: ''},
-          {drawer: false, direction: 'rtl', objId: ''}
-        ]
-      }
-    },
-    methods: {
-      //抽屉处理
-      handleDrawer(row, index) {
-        if (index == 2 || index == 1) {
-          //实例数量大于0才能打开
-          if ((row.RelatedInstance > 0 && index == 2) || (row.RelatedPoint > 0 && index == 1)) {
-            this.drawers[index].value = row.Data ? row.Data.Data : '';
-            this.drawers[index].objId = row.MeterFunc;
-            this.drawers[index].drawer = true;
-          }
-        } else {
-          if (index != 3)
-            this.drawers[index].objId = row.MeterFunc;
-          this.drawers[index].drawer = true;
-        }
-      },
-      handleClickRow(row, column, event) {//点击表格行
-        lStorage.set('screen_data', {
-          path: this.$route.path,
-          data: {MeterFunc: row.MeterFunc, RelatedInstance: row.RelatedInstance}
-        })
-      },
-      //获取统计数据
-      getOverViewList() {
-        this.loading = true;
-        let pa = {
-          MeterFunc: this.tabFunNum,
-          PageSize: this.pageSize,
-          PageNumber: this.currentPage
-        }
-        getTabFunNumOverview(pa, res => {
-          // this.allTableData = res.Content;
-          this.tableData = res.Content;
-          this.total = res.Total
-          this.loading = false;
-        });
-      },
-      //刷新当前行数据
-      refreshThisRow(row) {
-        let index = this.tableData.indexOf(row);
-        let pa = {
-          MeterFunc: row.MeterFunc
-        }
-        getTabFunNumOverview(pa, res => {
-          res.Content.forEach(t => {
-            if (t.MeterFunc == row.MeterFunc) {
-              if (t.Data) {
-                this.tableData[index].Data.Data = t.Data.Data || '';
-                this.tableData[index].Data.Time = t.Data.Time || '';
-              }
-              this.tableData[index].DataQuality = t.DataQuality;
-              this.tableData[index].RelatedInstance = t.RelatedInstance;
-              this.tableData[index].RelatedPoint = t.RelatedPoint;
-            }
-          })
-          Message.success('已刷新');
-        });
-      },
-      //分页更换size
-      handleSizeChange(val) {
-        this.currentPage = 1;
-        this.pageSize = val;
-        this.getOverViewList()
-      },
-      //分页更换页
-      handleCurrentChange(val) {
-        this.currentPage = val;
-        this.getOverViewList()
-      },
-      //子组件关闭抽屉
-      closeDrawer() {
-        this.drawers[3].drawer = false;
-      },
-      //新建自定义后重载页面
-      reloadData() {
-        this.$emit('reloadData');
+export default {
+  /** 运行状态 */
+  // 0:正常 1:异常 2:停用 3:间接
+
+  /** 启动状态 */
+  // 0:未启动 1:已启动
+
+  /** 状态 */
+  // 0:延迟<30min 1:延迟>30min 2:无数据
+
+  /** method */
+  // 0:订阅 1:推送 2:查询 3:其他
+  //   @ApiModelProperty(value = "获取方式")
+
+  /** read-write */
+  // 0:读 1:写 2:读写
+  //   @ApiModelProperty(value = "读写模式"
+  data() {
+    return {
+      //表格头样式
+      headerStyle: {
+        backgroundColor: '#e1e4e5',
+        color: '#2b2b2b',
+        lineHeight: '30px'
       },
-      init() {
-        this.getOverViewList();
-      }
+      // allTableData: [],//所有表格数据
+      tableData: [],
+      pageSizes: [10, 20, 50, 100],
+      pageSize: 50,
+      currentPage: 1,
+      total: 0,
+      loading: false,//加载
+      tabFunNum: null,//表号功能号
+      //抽屉
+      drawers: [
+        {drawer: false, direction: 'rtl', objId: ''},
+        {drawer: false, direction: 'rtl', objId: ''},
+        {drawer: false, direction: 'rtl', objId: '', value: ''},
+        {drawer: false, direction: 'rtl', objId: ''}
+      ],
+      originName: '',
+      statusName: '',
+      accessList: '',
+      statusList: [
+        {value: '0', label: '正常'},
+        {value: '1', label: '异常'},
+        {value: '2', label: '停用'},
+        {value: '3', label: '间接'}
+      ],
+      getAccessMethods: [
+        {value: '0', label: '推送'},
+        {value: '1', label: '订阅'},
+        {value: '2', label: '查询'},
+        {value: '3', label: '其他'}
+      ]
+    }
+  },
+  props: ['selectAggregate'],
+  methods: {
+    //查看曲线
+    handleDrawer(row, index) {
+
+    },
+    //控制测试
+    handleControl() {
+      this.$router.push({
+        path: "control"
+      })
+    },
+    //点击下载
+    downloads() {
+      let a = document.createElement('a')
+      a.href = '/pointconfig/datasource/pointdetail-download'
+      a.download = '检测详情.xls'
+      a.click()
+      document.body.removeChild(a)
     },
-    mounted() {
-      this.init();
+    //抽屉处理
+    // handleDrawer(row, index) {
+    //   if (index == 2 || index == 1) {
+    //     //实例数量大于0才能打开
+    //     if ((row.RelatedInstance > 0 && index == 2) || (row.RelatedPoint > 0 && index == 1)) {
+    //       this.drawers[index].value = row.Data ? row.Data.Data : '';
+    //       this.drawers[index].objId = row.MeterFunc;
+    //       this.drawers[index].drawer = true;
+    //     }
+    //   } else {
+    //     if (index != 3)
+    //       this.drawers[index].objId = row.MeterFunc;
+    //     this.drawers[index].drawer = true;
+    //   }
+    // },
+    handleClickRow(row, column, event) {//点击表格行
+      lStorage.set('screen_data', {
+        path: this.$route.path,
+        data: {MeterFunc: row.MeterFunc, RelatedInstance: row.RelatedInstance}
+      })
     },
-    computed: {
-      //根据分页,获取要展示的tableData
-      // tableData: function () {
-      //   return this.allTableData.slice(
-      //     (this.currentPage - 1) * this.pageSize,
-      //     (this.currentPage * this.pageSize < this.allTableData.length) ? this.currentPage * this.pageSize : this.allTableData.length);
+    //筛选
 
-      // }
+    changeHandleSelect() {
+      this.getOverViewList()
+    },
+    //获取统计数据
+    getOverViewList() {
+      let _this = this
+      _this.loading = true;
+      let param = {
+        PageNumber: this.currentPage,
+        PageSize: this.pageSize
+      }, Filters = ''
+      if (_this.originName) {
+        Filters += `DatasourceName='${_this.originName}';`
+      }
+      if (_this.statusName) {
+        Filters += `Status='${_this.statusName}';`
+      }
+      if (_this.accessList) {
+        Filters += `Method='${_this.accessList}';`
+      }
+      let index = Filters.lastIndexOf(';')
+      Filters = Filters.substring(0, index)
+      param.Filters = Filters !== '' ? Filters : undefined
+      testDetail(param, res => {
+        _this.tableData = res.Content
+        _this.total = res.Total
+        _this.loading = false;
+      })
+
+    },
+    //刷新当前行数据
+    // refreshThisRow(row) {
+    //   let index = this.tableData.indexOf(row);
+    //   let pa = {
+    //     MeterFunc: row.MeterFunc
+    //   }
+    //   getTabFunNumOverview(pa, res => {
+    //     res.Content.forEach(t => {
+    //       if (t.MeterFunc == row.MeterFunc) {
+    //         if (t.Data) {
+    //           this.tableData[index].Data.Data = t.Data.Data || '';
+    //           this.tableData[index].Data.Time = t.Data.Time || '';
+    //         }
+    //         this.tableData[index].DataQuality = t.DataQuality;
+    //         this.tableData[index].RelatedInstance = t.RelatedInstance;
+    //         this.tableData[index].RelatedPoint = t.RelatedPoint;
+    //       }
+    //     })
+    //     Message.success('已刷新');
+    //   });
+    // },
+    //分页更换size
+    handleSizeChange(val) {
+      this.currentPage = 1;
+      this.pageSize = val;
+      this.getOverViewList()
     },
-    components: {
-      historyChart,
-      dataSource,
-      objectInstance,
-      addTabFunNum
+    //分页更换页
+    handleCurrentChange(val) {
+      console.log(val, 'val')
+      this.currentPage = val;
+      this.getOverViewList()
+    },
+    //子组件关闭抽屉
+    // closeDrawer() {
+    //   this.drawers[3].drawer = false;
+    // },
+    //新建自定义后重载页面
+    reloadData() {
+      this.$emit('reloadData');
+    },
+    init() {
+      this.getOverViewList();
     }
+  },
+  mounted() {
+    this.init();
+  },
+  computed: {
+    ...mapGetters("layout", [
+      "projectId"
+    ])
+    //根据分页,获取要展示的tableData
+    // tableData: function () {
+    //   return this.allTableData.slice(
+    //     (this.currentPage - 1) * this.pageSize,
+    //     (this.currentPage * this.pageSize < this.allTableData.length) ? this.currentPage * this.pageSize : this.allTableData.length);
+    // }
+  },
+  components: {
+    historyChart,
+    dataSource,
+    objectInstance,
+    addTabFunNum
   }
+}
 </script>
 
 <style lang="less" scoped>
-  #tabFunNumOverview {
-    border-top: 5px solid #eee;
-    height: calc(100% - 5px);
-    width: 100%;
-    overflow: hidden;
-  }
+#tabFunDetail {
+  border-top: 5px solid #eee;
+  height: calc(100% - 5px);
+  width: 100%;
+  overflow: hidden;
+}
 
-  .table-area {
-    height: calc(100% - 72px);
-    padding: 0px 10px 10px 10px;
-  }
+.table-area {
+  height: calc(100% - 72px);
+  padding: 0px 10px 10px 10px;
 
-  .table-area i {
-    text-align: right;
-    font-size: 12px;
-    cursor: pointer;
-    float: right;
+  .circular {
+    width: 20px;
+    height: 20px;
+    border-radius: 50%;
+    //margin: 0 auto;
   }
 
-  .dialog-btn {
-    display: none;
-    height: 29px;
+  .green {
+    background: #1abc9c;
   }
 
-  /deep/ .el-drawer__body {
-    height: 90%;
-    overflow-y: auto;
+  .yellow {
+    background: yellow;
   }
 
-  /deep/ .el-table__body-wrapper tr:hover {
-    .dialog-btn {
-      display: inline;
-    }
+  .red {
+    background: red;
   }
+}
 
-  /deep/ .el-dialog__body {
-    padding-bottom: 20px;
-  }
+.table-area i {
+  text-align: right;
+  font-size: 12px;
+  cursor: pointer;
+  float: right;
+}
+
+.dialog-btn {
+  display: none;
+  height: 29px;
+}
+
+/deep/ .el-drawer__body {
+  height: 90%;
+  overflow-y: auto;
+}
 
-  /deep/ .el-drawer__header > :first-child:focus {
-    outline: none;
+/deep/ .el-table__body-wrapper tr:hover {
+  .dialog-btn {
+    display: inline;
   }
+}
+
+/deep/ .el-dialog__body {
+  padding-bottom: 20px;
+}
+
+/deep/ .el-drawer__header > :first-child:focus {
+  outline: none;
+}
 </style>

+ 12 - 0
src/router/system.js

@@ -23,6 +23,7 @@ import pointSteps from '@/views/point/config_point/steps'
 import objectData from '@/views/point/objectData'
 import integrateReport from '@/views/point/report'
 import integratedDetection from '@/views/point/testing'
+import controlTest from '@/views/point/control'
 import toolLibrary from '@/views/point/toolLibrary'
 import dynamicdata from '@/views/point/dynamicdata'
 import equipRela from '@/views/point/dynamicdata/addRelation/equipRela'
@@ -355,6 +356,17 @@ export default [{
         name: 'integratedDetection',
         component: integratedDetection,
         meta: {keepAlive: false, breadcrumbs: [{label: '系统集成', path: '/point/pointsetting'}, {label: '系统集成监测'}]}
+      }, {
+        path: 'control',
+        name: 'controlTest',
+        component: controlTest,
+        meta: {
+          keepAlive: false,
+          breadcrumbs: [{label: '系统集成', path: '/point/pointsetting'}, {
+            label: '系统集成监测',
+            path: '/point/testing'
+          }, {label: '控制测试'}]
+        }
       },
       {
         path: 'tool',

+ 73 - 0
src/views/point/control/index.vue

@@ -0,0 +1,73 @@
+<template>
+
+  <div class="contain-block meterFunc">
+      <span class="contain-title-leftblock">
+         <i class="iconfont icon-juxing"/>控制测试</span>
+    <div class="contain-data">
+      <tabControlTest :selectAggregate="selectAggregate"/>
+    </div>
+  </div>
+
+</template>
+
+<script>
+  import tabControlTest from "@/components/point/report/tabControlTest";
+  import {queryDataSourceCount} from "@/fetch/point_http"
+  import {pointTest, settingValue} from '@/api/scan/request'
+
+  export default {
+    name: "index",
+    components: {tabControlTest},
+    data() {
+      return {
+        selectAggregate: {
+          originList: [], //数据源
+          settingList: [],//控制测试列表
+        }
+      }
+    },
+    created() {
+      this.getOriginList()
+    },
+    methods: {
+      //查询数据源
+      getOriginList() {
+        queryDataSourceCount({}, res => {
+          this.selectAggregate.originList = res.Content.map(i => i.Name).filter(t => t)
+        })
+      },
+
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+  .contain-block {
+    height: 100%;
+    background: white;
+    width: 100%;
+
+  }
+
+  .contain-title-leftblock {
+    height: 30px;
+    line-height: 30px;
+    /*border-left: 8px solid black;*/
+    display: inline-block;
+    margin: 8px 0;
+    font-weight: 600;
+    padding-left: 8px;
+    cursor: default;
+  }
+
+  .contain-data {
+    /*overflow: auto;*/
+    height: calc(100% - 46px);
+  }
+
+  @media screen and (max-width: 1600px) {
+    .meterFunc {
+      width: calc(100% - 400px);
+    }
+  }
+</style>

+ 75 - 60
src/views/point/testing/index.vue

@@ -6,90 +6,105 @@
          <i class="iconfont icon-juxing"/>
         对应实例数量</span>
       <div class="contain-data">
-        <integrateStatistics ref="chart" style="height: calc(100% - 5px);" :key="refresh" type="testing"></integrateStatistics>
+        <integrateStatistics ref="chart" style="height: calc(100% - 5px);" :key="refresh"
+                             type="testing"></integrateStatistics>
       </div>
     </div>
     <!-- 表号功能号总览页面 -->
     <div class="contain-block meterFunc">
       <span class="contain-title-leftblock">
-         <span class="iconfont icon-juxing"></span>
-        监测详情</span>
+         <i class="iconfont icon-juxing"/>监测详情</span>
       <div class="contain-data">
-        <tabFunDetail ref="table" :key="refresh" @reloadData="reloadData()"/>
+        <tabFunDetail ref="table" :key="refresh" :selectAggregate="selectAggregate" @reloadData="reloadData()"/>
       </div>
     </div>
   </div>
 </template>
 
 <script>
-  import {mapGetters} from 'vuex'
-  import integrateStatistics from '@/components/point/report/integrateStatistics'
-  import tabFunDetail from '@/components/point/report/tabFunDetail'
+import {mapGetters} from 'vuex'
+import integrateStatistics from '@/components/point/report/integrateStatistics'
+import tabFunDetail from '@/components/point/report/tabFunDetail'
+import {queryDataSourceCount} from "@/fetch/point_http"
 
-  export default {
-    components: {
-      integrateStatistics,
-      tabFunDetail
-    },
-    computed: {
-      ...mapGetters('layout', ['projectId']),
-    },
-    data() {
-      return {
-        refresh: ''//刷新组件
-      }
-    },
-    methods: {
-      //子组件中的新建完成后刷新
-      reloadData() {
-        this.refresh = new Date().getTime();
+export default {
+  components: {
+    integrateStatistics,
+    tabFunDetail
+  },
+  computed: {
+    ...mapGetters('layout', ['projectId']),
+  },
+  data() {
+    return {
+      refresh: '',//刷新组件
+      selectAggregate: {
+        originList: [], //数据源
       }
+    }
+  },
+  created() {
+    this.getOriginList()
+  },
+  methods: {
+    //子组件中的新建完成后刷新
+    reloadData() {
+      this.refresh = new Date().getTime();
     },
-    watch: {
-      //监听项目变化
-      projectId() {
-        this.refresh = new Date().getTime();
-      }
+    //查询数据源
+    getOriginList() {
+      queryDataSourceCount({}, res => {
+        this.selectAggregate.originList = res.Content.map(i => i.Name).filter(t => t)
+        console.log(this.selectAggregate.originList, ' this.selectAggregate.originList')
+      })
+    }
+
+  },
+  watch: {
+    //监听项目变化
+    projectId() {
+      this.refresh = new Date().getTime();
     }
   }
+}
 </script>
 
 <style lang="less" scoped>
-  .contain-blocks {
-    float: left;
-    height: 100%;
-    background: white;
-    width: 34%;
-    margin-right: 5px;
-  }
+.contain-blocks {
+  float: left;
+  height: 100%;
+  background: white;
+  width: 34%;
+  margin-right: 5px;
+}
 
-  .contain-block {
-    float: left;
-    height: 100%;
-    background: white;
-    width: 65%;
+.contain-block {
+  float: left;
+  height: 100%;
+  background: white;
+  width: 65%;
 
-  }
+}
 
-  .contain-title-leftblock {
-    height: 30px;
-    line-height: 30px;
-    /*border-left: 8px solid black;*/
-    display: inline-block;
-    margin: 8px 0;
-    font-weight: 600;
-    padding-left: 8px;
-    cursor: default;
-  }
+.contain-title-leftblock {
+  height: 30px;
+  line-height: 30px;
+  /*border-left: 8px solid black;*/
+  display: inline-block;
+  margin: 8px 0;
+  font-weight: 600;
+  padding-left: 8px;
+  cursor: default;
+}
 
-  .contain-data {
-    /*overflow: auto;*/
-    height: calc(100% - 46px);
-  }
+.contain-data {
+  /*overflow: auto;*/
+  height: calc(100% - 46px);
+}
 
-  @media screen and (max-width: 1600px) {
-    .meterFunc {
-      width: calc(100% - 400px);
-    }
+@media screen and (max-width: 1600px) {
+  .meterFunc {
+    width: calc(100% - 400px);
   }
+}
 </style>