|
@@ -30,9 +30,8 @@
|
|
|
<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="下载"/>-->
|
|
|
-
|
|
|
+ <!-- <a class="el-icon-download" style="cursor: pointer" href="/pointconfig/datasource/pointdetail-download"-->
|
|
|
+ <!-- download="检测详情"title="下载"/>-->
|
|
|
</span>
|
|
|
</div>
|
|
|
<!-- 数据表格 -->
|
|
@@ -71,58 +70,40 @@
|
|
|
|
|
|
</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
|
|
|
+ @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>
|
|
|
- <!-- 对话框和抽屉统一放在drawers中 -->
|
|
|
- <!-- 对话框 -->
|
|
|
- <el-dialog :title="'< ' + drawers[0].objId + ' > 的历史数据'" :visible.sync="drawers[0].drawer">
|
|
|
- <historyChart :tabFunNum='drawers[0].objId'></historyChart>
|
|
|
- </el-dialog>
|
|
|
- <!-- 抽屉 -->
|
|
|
- <el-drawer :title="'< ' + drawers[1].objId + ' > 的子系统点位'" :visible.sync="drawers[1].drawer"
|
|
|
- :direction="drawers[1].direction" size="35%">
|
|
|
- <dataSource :tabFunNum='drawers[1].objId'></dataSource>
|
|
|
- </el-drawer>
|
|
|
- <el-drawer :title="'< ' + drawers[2].objId + ' > 的对象实例'" :visible.sync="drawers[2].drawer"
|
|
|
- :direction="drawers[2].direction" size="35%">
|
|
|
- <objectInstance :tabFunNum='drawers[2].objId' :reValue='drawers[2].value'></objectInstance>
|
|
|
- </el-drawer>
|
|
|
- <el-dialog title="新增表号功能号" :visible.sync="drawers[3].drawer">
|
|
|
- <addTabFunNum @closeDrawer="closeDrawer()" @reloadData="reloadData()"></addTabFunNum>
|
|
|
- </el-dialog>
|
|
|
+ <curve ref="curve"/>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {testDetail} from '@/api/scan/request'
|
|
|
-import historyChart from './historyChart'
|
|
|
-import dataSource from './dataSource'
|
|
|
-import objectInstance from './objectInstance'
|
|
|
-import addTabFunNum from './addTabFunNum'
|
|
|
+import {testDetail, originalHistory} from '@/api/scan/request'
|
|
|
import lStorage from '@/utils/localStorage'
|
|
|
import {mapGetters} from "vuex";
|
|
|
+import curve from './curve'
|
|
|
+import axios from "axios";
|
|
|
+import moment from 'moment'
|
|
|
|
|
|
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 {
|
|
|
//表格头样式
|
|
@@ -160,14 +141,15 @@ export default {
|
|
|
{value: '1', label: '订阅'},
|
|
|
{value: '2', label: '查询'},
|
|
|
{value: '3', label: '其他'}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ seven: ''
|
|
|
}
|
|
|
},
|
|
|
props: ['selectAggregate'],
|
|
|
methods: {
|
|
|
//查看曲线
|
|
|
handleDrawer(row, index) {
|
|
|
-
|
|
|
+ this.$refs.curve.open(row, 0)
|
|
|
},
|
|
|
//控制测试
|
|
|
handleControl() {
|
|
@@ -177,27 +159,38 @@ export default {
|
|
|
},
|
|
|
//点击下载
|
|
|
downloads() {
|
|
|
- let a = document.createElement('a')
|
|
|
- a.href = '/pointconfig/datasource/pointdetail-download'
|
|
|
- a.download = '检测详情.xls'
|
|
|
- a.click()
|
|
|
- document.body.removeChild(a)
|
|
|
+ let param = {
|
|
|
+ method: 'post',
|
|
|
+ url: `/pointconfig/datasource/pointdetail-download`,
|
|
|
+ responseType: 'blob',
|
|
|
+ headers: {
|
|
|
+ ProjectId: this.projectId
|
|
|
+ },
|
|
|
+ data: {},
|
|
|
+ }
|
|
|
+
|
|
|
+ axios(param).then(function (res) {
|
|
|
+ var blob = new Blob([res.data], {
|
|
|
+ type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
|
|
|
+ });
|
|
|
+ var fileName = res.headers['content-disposition'];
|
|
|
+ if (fileName)
|
|
|
+ fileName = fileName.substring(fileName.indexOf('=') + 1);
|
|
|
+ if ('download' in document.createElement('a')) { // 非IE下载
|
|
|
+ const elink = document.createElement('a')
|
|
|
+ elink.download = fileName
|
|
|
+ elink.style.display = 'none'
|
|
|
+ elink.href = URL.createObjectURL(blob)
|
|
|
+ document.body.appendChild(elink)
|
|
|
+ elink.click()
|
|
|
+ URL.revokeObjectURL(elink.href) // 释放URL 对象
|
|
|
+ document.body.removeChild(elink)
|
|
|
+ } else { // IE10+下载
|
|
|
+ navigator.msSaveBlob(blob, fileName)
|
|
|
+ }
|
|
|
+ }).catch(function (err) {
|
|
|
+ })
|
|
|
},
|
|
|
- //抽屉处理
|
|
|
- // 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,
|
|
@@ -205,8 +198,8 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
//筛选
|
|
|
-
|
|
|
changeHandleSelect() {
|
|
|
+ this.currentPage = 1
|
|
|
this.getOverViewList()
|
|
|
},
|
|
|
//获取统计数据
|
|
@@ -295,12 +288,7 @@ export default {
|
|
|
// (this.currentPage * this.pageSize < this.allTableData.length) ? this.currentPage * this.pageSize : this.allTableData.length);
|
|
|
// }
|
|
|
},
|
|
|
- components: {
|
|
|
- historyChart,
|
|
|
- dataSource,
|
|
|
- objectInstance,
|
|
|
- addTabFunNum
|
|
|
- }
|
|
|
+ components: {curve}
|
|
|
}
|
|
|
</script>
|
|
|
|