修改标题

dev
夜笙歌 1 year ago
parent e8d410193c
commit 8c4d7aba74

@ -14,11 +14,14 @@
{{ name }} <i class="el-icon-arrow-down el-icon--right"></i> {{ name }} <i class="el-icon-arrow-down el-icon--right"></i>
</span> </span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<div style="height: 300px;overflow: auto"> <div class="topNavScroll" style="height: 300px;overflow: auto;background-color: #053563;padding: 0;border: none;">
<el-dropdown-item v-for="i in selectSecnesList" :key="i.sceneId" <el-dropdown-item v-for="i in selectSecnesList" :key="i.sceneId"
:command="{router:i.router,name:i.sceneName,sceneId:i.sceneId}">{{ :command="{router:i.router,name:i.sceneName,sceneId:i.sceneId}">
i.sceneName <span style="color: #f8fefd">
}} {{
i.sceneName
}}
</span>
</el-dropdown-item> </el-dropdown-item>
</div> </div>
</el-dropdown-menu> </el-dropdown-menu>
@ -72,6 +75,9 @@ export default {
// }, // },
async mounted() { async mounted() {
if (!this.$store.getters.sceneId) {
this.$router.replace({path: "/board/index"})
}
if (this.$route.name === 'SmartScene' || this.$route.name === 'GPS' || this.$route.name === 'index' || this.$store.getters.sceneId) { if (this.$route.name === 'SmartScene' || this.$route.name === 'GPS' || this.$route.name === 'index' || this.$store.getters.sceneId) {
} else { } else {
if (this.$store.state.user.permissions.includes('business:monitor:index') || this.$store.state.user.permissions.includes('*:*:*')) { if (this.$store.state.user.permissions.includes('business:monitor:index') || this.$store.state.user.permissions.includes('*:*:*')) {
@ -192,4 +198,16 @@ export default {
color: #d4d4d4; color: #d4d4d4;
text-align: center; text-align: center;
} }
.el-dropdown-menu {
padding: 0 !important;
border: none !important;
}
.topNavScroll::-webkit-scrollbar {
width: 0px;
height: 0px;
}
.el-dropdown-menu__item:not(.is-disabled):hover span {
color: #053563 !important;
}
</style> </style>

@ -84,8 +84,8 @@ export default {
Chart, Chart,
vueSeamlessScroll, vueSeamlessScroll,
}, },
watch:{ watch: {
async $route(to,from){ async $route(to, from) {
await this.getData() await this.getData()
} }
}, },
@ -145,7 +145,7 @@ export default {
}, },
methods: { methods: {
async getData() { async getData() {
if(this.$store.getters.sceneId === null) return if (this.$store.getters.sceneId === null) return
await this.createMap() await this.createMap()
await this.getAlarmStats() await this.getAlarmStats()
await this.getAubDevice() await this.getAubDevice()
@ -198,12 +198,17 @@ export default {
position = [e.centerPoint.longitude, e.centerPoint.latitude] position = [e.centerPoint.longitude, e.centerPoint.latitude]
} }
let text = new AMap.Text({ let text = new AMap.Text({
text: '总数:' + e.deviceCount + (e.abnormalCount ? ('/异常数量:' + e.abnormalCount) : ''), text: '<div style="color:#fff;width: 100%;height: 100%;">' + '总数:' + e.deviceCount + (e.abnormalCount ? ('/异常数量:' + e.abnormalCount) : '') + '</div>',
anchor: 'center', anchor: 'center',
draggable: true, draggable: true,
cursor: 'pointer', cursor: 'pointer',
position: position position: position
}); });
text.setStyle({
'background-color': e.abnormalCount? '#fe0000':'#0055fe',
padding:'4px 12px',
'font-size':'1vw'
})
map.add(text) map.add(text)
}, },
setPolygon(position, val) { setPolygon(position, val) {
@ -233,7 +238,7 @@ export default {
map.setFitView() map.setFitView()
}, },
async getAlarmStats() { async getAlarmStats() {
if(this.$store.getters.sceneId === null) return if (this.$store.getters.sceneId === null) return
const {data} = await alarmStats(this.$store.getters.sceneId) const {data} = await alarmStats(this.$store.getters.sceneId)
let option1 = { let option1 = {
...this.chart1Option, ...this.chart1Option,

@ -9,7 +9,7 @@ const CompressionPlugin = require('compression-webpack-plugin')
const name = process.env.VUE_APP_TITLE || '智慧物联监控平台' // 网页标题 const name = process.env.VUE_APP_TITLE || '智慧物联监控平台' // 网页标题
const port = process.env.port || process.env.npm_config_port || 8018 // 端口 const port = process.env.port || process.env.npm_config_port || 80 // 端口
// vue.config.js 配置说明 // vue.config.js 配置说明
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions //官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
@ -35,7 +35,8 @@ module.exports = {
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
target: `http://127.0.0.1:9080`, target: `http://175.27.215.92:9080`,
// target: `http://10.11.40.120:9080`,
// target: `http://10.11.43.111:8080`, // target: `http://10.11.43.111:8080`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {

Loading…
Cancel
Save