|
@@ -1,42 +1,84 @@
|
|
<template>
|
|
<template>
|
|
- <a-tabs type="card">
|
|
|
|
- <a-tab-pane key="historyData">
|
|
|
|
- <span slot="tab">
|
|
|
|
- <a-icon type="file-text" />
|
|
|
|
- 历史数据
|
|
|
|
- </span>
|
|
|
|
- <interlock-history-index></interlock-history-index>
|
|
|
|
- </a-tab-pane>
|
|
|
|
- <a-tab-pane key="timedReport">
|
|
|
|
- <span slot="tab">
|
|
|
|
- <a-icon type="file-text" />
|
|
|
|
- 定时报表
|
|
|
|
- </span>
|
|
|
|
- <interlock-timedReport></interlock-timedReport>
|
|
|
|
- </a-tab-pane>
|
|
|
|
- </a-tabs>
|
|
|
|
|
|
+ <div>
|
|
|
|
+ <template v-if="showPage === 'summary'">
|
|
|
|
+ <a-tabs type="card">
|
|
|
|
+ <a-tab-pane key="historyData">
|
|
|
|
+ <span slot="tab">
|
|
|
|
+ <a-icon type="file-text" />
|
|
|
|
+ 历史数据
|
|
|
|
+ </span>
|
|
|
|
+ <!-- <interlock-history-index></interlock-history-index> -->
|
|
|
|
+ <div class="iotmenu-content">
|
|
|
|
+ <u-equipment-tree-drag @select="selectEquipment" :treeData="treeData">
|
|
|
|
+ <interlock-history-list ref="summaryList" :selectData="selectData" @click="historyListClick"></interlock-history-list>
|
|
|
|
+ </u-equipment-tree-drag>
|
|
|
|
+ </div>
|
|
|
|
+ </a-tab-pane>
|
|
|
|
+ <a-tab-pane key="timedReport">
|
|
|
|
+ <span slot="tab">
|
|
|
|
+ <a-icon type="file-text" />
|
|
|
|
+ 定时报表
|
|
|
|
+ </span>
|
|
|
|
+ <interlock-timed-report></interlock-timed-report>
|
|
|
|
+ </a-tab-pane>
|
|
|
|
+ </a-tabs>
|
|
|
|
+ </template>
|
|
|
|
+ <!-- 详情 -->
|
|
|
|
+ <interlock-detail-list v-if="showPage === 'detail'" @click="showPage='summary'" ref="summaryDetailRef" :currentData="currentData"></interlock-detail-list>
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import InterlockHistoryIndex from './InterlockHistoryIndex.vue';
|
|
|
|
-import InterlockTimedReport from './InterlockTimedReport.vue';
|
|
|
|
-export default {
|
|
|
|
- name: '',
|
|
|
|
- components: {
|
|
|
|
- InterlockTimedReport,
|
|
|
|
- InterlockHistoryIndex,
|
|
|
|
- },
|
|
|
|
- data () {
|
|
|
|
- return {
|
|
|
|
|
|
+ // import InterlockHistoryIndex from './InterlockHistoryIndex.vue';
|
|
|
|
+ import InterlockHistoryList from './InterlockHistory/InterlockHistoryList.vue'
|
|
|
|
+ import InterlockTimedReport from '../interlockTimedReport/InterlockTimedReportList.vue';
|
|
|
|
+ import InterlockDetailList from '../InterlockDetail/InterlockDetailList.vue';
|
|
|
|
+ export default {
|
|
|
|
+ name: '',
|
|
|
|
+ components: {
|
|
|
|
+ // InterlockHistoryIndex,
|
|
|
|
+ InterlockHistoryList,
|
|
|
|
+ InterlockTimedReport,
|
|
|
|
+ InterlockDetailList,
|
|
|
|
+ },
|
|
|
|
+ data () {
|
|
|
|
+ return {
|
|
|
|
+ showPage: 'summary',
|
|
|
|
+ treeData: {
|
|
|
|
+ type: 'history',
|
|
|
|
+ },
|
|
|
|
+ selectData: {}
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ created () {
|
|
|
|
+ },
|
|
|
|
+ mounted () {
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ selectEquipment(selectedKeys,e){
|
|
|
|
+ // console.log(99,selectedKeys,e)
|
|
|
|
+ if (selectedKeys.length == 0) {
|
|
|
|
+ this.$nextTick(()=>{
|
|
|
|
+ this.$refs.summaryList.searchReset();
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ let interlockType = e.selectedNodes[0].data.props.interlockType
|
|
|
|
+ let pid = e.selectedNodes[0].data.props.pid
|
|
|
|
+ // console.log(88,interlockType)
|
|
|
|
+ this.selectData.interlockType = interlockType
|
|
|
|
+ this.selectData.pid = pid
|
|
|
|
+ this.selectData.id = e.selectedNodes[0].data.props.id
|
|
|
|
+ this.$nextTick(()=>{
|
|
|
|
+ this.$refs.summaryList.getDataList();
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ historyListClick(data){
|
|
|
|
+ this.showPage = 'detail'
|
|
|
|
+ this.currentData = data
|
|
|
|
+ },
|
|
}
|
|
}
|
|
- },
|
|
|
|
- created () {
|
|
|
|
- },
|
|
|
|
- mounted () {
|
|
|
|
- },
|
|
|
|
- methods: {
|
|
|
|
}
|
|
}
|
|
-}
|
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|