|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<div class="title">{{ tenantData.tenantBoardTopic || '智慧物联监控平台' }}</div>
|
|
|
|
|
<div class="title">{{ tenantData.tenantBoardTopic || '智慧物联监控平台' }}</div>
|
|
|
|
|
<div>
|
|
|
|
|
<div v-if="isIndex" :class="`menu ${nowMenu==='1'? 'menuClick' :''}`" style="left: 2%"
|
|
|
|
|
@click="toLink('index','1')">
|
|
|
|
@ -49,18 +49,52 @@
|
|
|
|
|
|
|
|
|
|
<div class="rightImg" @click="toIndex">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="equipmentRecord">
|
|
|
|
|
<span>
|
|
|
|
|
台 账
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="equipmentRecordImg" @click="toEquipmentRecord">
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<el-dialog title="台账管理" :visible.sync="dialogTableVisible">
|
|
|
|
|
<el-button type="primary" @click="importf">导入</el-button>
|
|
|
|
|
<el-table :data="tableData">
|
|
|
|
|
<el-table-column :property="i" :label="i" width="200px" v-for="i in tableTh"></el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<el-dialog title="上传" :visible.sync="uploadDialog">
|
|
|
|
|
<el-upload
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
class="upload-demo"
|
|
|
|
|
drag
|
|
|
|
|
:action="api+'/business/monitorPlatform/import/'"
|
|
|
|
|
:data="{tenantId:$store.getters.tenantId}"
|
|
|
|
|
:headers="{Authorization:'Bearer ' + token}"
|
|
|
|
|
:on-success="uploadSuccess"
|
|
|
|
|
multiple>
|
|
|
|
|
<i class="el-icon-upload"></i>
|
|
|
|
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
|
|
import {getToken} from '@/utils/auth'
|
|
|
|
|
import {
|
|
|
|
|
selectSecnes
|
|
|
|
|
} from '@/api/board/nav'
|
|
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
getTenantData
|
|
|
|
|
getTenantData,
|
|
|
|
|
getRedisFile,
|
|
|
|
|
importAccount
|
|
|
|
|
} from '@/api/board/index'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: 'BoardTopNav',
|
|
|
|
|
data() {
|
|
|
|
@ -70,7 +104,13 @@ export default {
|
|
|
|
|
isIndex: true,
|
|
|
|
|
sceneId: this.$store.getters.sceneId,
|
|
|
|
|
nowMenu: '1',
|
|
|
|
|
tenantData:{},
|
|
|
|
|
tenantData: {},
|
|
|
|
|
dialogTableVisible: false,
|
|
|
|
|
uploadDialog: false,
|
|
|
|
|
tableData: [],
|
|
|
|
|
tableTh:[],
|
|
|
|
|
api: process.env.VUE_APP_BASE_API,
|
|
|
|
|
token: getToken()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// props: {
|
|
|
|
@ -81,7 +121,7 @@ export default {
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
|
|
async mounted() {
|
|
|
|
|
getTenantData(this.$store.getters.tenantId).then(e=>{
|
|
|
|
|
getTenantData(this.$store.getters.tenantId).then(e => {
|
|
|
|
|
this.tenantData = e.data
|
|
|
|
|
})
|
|
|
|
|
if (!this.$store.getters.sceneId) {
|
|
|
|
@ -146,6 +186,21 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
toIndex() {
|
|
|
|
|
this.$router.replace({path: "/index"});
|
|
|
|
|
},
|
|
|
|
|
async toEquipmentRecord() {
|
|
|
|
|
this.dialogTableVisible = true
|
|
|
|
|
const data = await getRedisFile(this.$store.getters.tenantId)
|
|
|
|
|
this.tableData = JSON.parse(data.content)
|
|
|
|
|
this.tableTh = Object.keys(data.Header).map(e=>data.Header[e])
|
|
|
|
|
},
|
|
|
|
|
importf() {
|
|
|
|
|
this.uploadDialog = true
|
|
|
|
|
},
|
|
|
|
|
async uploadSuccess(e){
|
|
|
|
|
this.uploadDialog = false
|
|
|
|
|
const data = await getRedisFile(this.$store.getters.tenantId)
|
|
|
|
|
this.tableData = JSON.parse(data.content)
|
|
|
|
|
this.tableTh = Object.keys(data.Header).map(e=>data.Header[e])
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
@ -210,6 +265,30 @@ export default {
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.equipmentRecord {
|
|
|
|
|
position: absolute;
|
|
|
|
|
width: 8vw;
|
|
|
|
|
height: 1.66vw;
|
|
|
|
|
top: 3.8%;
|
|
|
|
|
left: 79%;
|
|
|
|
|
line-height: 1.66vw;
|
|
|
|
|
font-size: 0.8vw;
|
|
|
|
|
color: #d4d4d4;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.equipmentRecordImg {
|
|
|
|
|
transform: rotateX(180deg);
|
|
|
|
|
background-image: url('~@/assets/board/common/subheadClick1.png');
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
position: absolute;
|
|
|
|
|
width: 8vw;
|
|
|
|
|
height: 1.66vw;
|
|
|
|
|
top: 3.8%;
|
|
|
|
|
left: 79%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.el-dropdown-menu {
|
|
|
|
|
padding: 0 !important;
|
|
|
|
|
border: none !important;
|
|
|
|
@ -223,4 +302,12 @@ export default {
|
|
|
|
|
.el-dropdown-menu__item:not(.is-disabled):hover span {
|
|
|
|
|
color: #053563 !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/deep/ .el-upload-dragger {
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/deep/ .el-upload {
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|