Commit 5337e20f authored by xxx's avatar xxx

大屏配置完成

parent 53422a8a
...@@ -57,7 +57,7 @@ export default { ...@@ -57,7 +57,7 @@ export default {
this.recentNoticeData = res.data.content; this.recentNoticeData = res.data.content;
}; };
}) })
},10000) },5000)
}, },
//播放语音 //播放语音
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<div @click="lookFn1()" :class="videoSelectStyle == 1 ? 'videoSelectStyle1' : ''">矿山视频监控</div> <div @click="lookFn1()" :class="videoSelectStyle == 1 ? 'videoSelectStyle1' : ''">矿山视频监控</div>
</div> </div>
<!-- 内容 --> <!-- 内容 -->
<div class="content_view"> <div class="content_view" v-if="content_view_Show">
<div class="content_view_left"> <div class="content_view_left">
<components :is="item.componentName" v-for="(item,index) in allComponents.left" :key="index"></components> <components :is="item.componentName" v-for="(item,index) in allComponents.left" :key="index"></components>
</div> </div>
...@@ -145,6 +145,15 @@ export default { ...@@ -145,6 +145,15 @@ export default {
center:[], center:[],
right:[], right:[],
}, },
//各模块展示
isShow:{
dataScreening:false,
carManagement:false,
intelligentSchedul:false,
dataAnalysis:false,
},
//内容区域展示
content_view_Show:false,
} }
}, },
mounted() { mounted() {
...@@ -186,9 +195,9 @@ export default { ...@@ -186,9 +195,9 @@ export default {
changeOver(item){ changeOver(item){
this.selectModule = item.componentName; this.selectModule = item.componentName;
if(item.componentName == 'dataScreening'){ if(item.componentName == 'dataScreening'){
this.videoSelect1 = false; if(this.isShow.dataScreening == false){
this.kaungEZUIKitJsShow = false; this.isShow.dataScreening = true;
this.carsEZUIKitJsShow = false; this.content_view_Show = true;
HttpReq.truckDispatching.screenTitleMenuQuery({status:1,pid:item.children,sort:'dsort'}).then((res) => { HttpReq.truckDispatching.screenTitleMenuQuery({status:1,pid:item.children,sort:'dsort'}).then((res) => {
if(res.code == 200){ if(res.code == 200){
let left1 = []; let left1 = [];
...@@ -208,11 +217,24 @@ export default { ...@@ -208,11 +217,24 @@ export default {
this.allComponents.right = right1; this.allComponents.right = right1;
} }
}) })
}else{
this.isShow.dataScreening = false;
this.content_view_Show = false;
this.allComponents.left = [];
this.allComponents.center = [];
this.allComponents.right = [];
} }
if(item.componentName == 'carManagement'){ this.isShow.carManagement = false;
this.isShow.intelligentSchedul = false;
this.isShow.dataAnalysis = false;
this.videoSelect1 = false; this.videoSelect1 = false;
this.kaungEZUIKitJsShow = false; this.kaungEZUIKitJsShow = false;
this.carsEZUIKitJsShow = false; this.carsEZUIKitJsShow = false;
}
if(item.componentName == 'carManagement'){
if(this.isShow.carManagement == false){
this.isShow.carManagement = true;
this.content_view_Show = true;
HttpReq.truckDispatching.screenTitleMenuQuery({status:1,pid:item.children,sort:'dsort'}).then((res) => { HttpReq.truckDispatching.screenTitleMenuQuery({status:1,pid:item.children,sort:'dsort'}).then((res) => {
if(res.code == 200){ if(res.code == 200){
let left1 = []; let left1 = [];
...@@ -232,11 +254,24 @@ export default { ...@@ -232,11 +254,24 @@ export default {
this.allComponents.right = right1; this.allComponents.right = right1;
} }
}) })
}else{
this.isShow.carManagement = false;
this.content_view_Show = false;
this.allComponents.left = [];
this.allComponents.center = [];
this.allComponents.right = [];
} }
if(item.componentName == 'intelligentSchedul'){ this.isShow.dataScreening = false;
this.isShow.intelligentSchedul = false;
this.isShow.dataAnalysis = false;
this.videoSelect1 = false; this.videoSelect1 = false;
this.kaungEZUIKitJsShow = false; this.kaungEZUIKitJsShow = false;
this.carsEZUIKitJsShow = false; this.carsEZUIKitJsShow = false;
}
if(item.componentName == 'intelligentSchedul'){
if(this.isShow.intelligentSchedul == false){
this.isShow.intelligentSchedul = true;
this.content_view_Show = true;
HttpReq.truckDispatching.screenTitleMenuQuery({status:1,pid:item.children,sort:'dsort'}).then((res) => { HttpReq.truckDispatching.screenTitleMenuQuery({status:1,pid:item.children,sort:'dsort'}).then((res) => {
if(res.code == 200){ if(res.code == 200){
let left1 = []; let left1 = [];
...@@ -256,11 +291,24 @@ export default { ...@@ -256,11 +291,24 @@ export default {
this.allComponents.right = right1; this.allComponents.right = right1;
} }
}) })
}else{
this.isShow.intelligentSchedul = false;
this.content_view_Show = false;
this.allComponents.left = [];
this.allComponents.center = [];
this.allComponents.right = [];
} }
if(item.componentName == 'dataAnalysis'){ this.isShow.dataScreening = false;
this.isShow.carManagement = false;
this.isShow.dataAnalysis = false;
this.videoSelect1 = false; this.videoSelect1 = false;
this.kaungEZUIKitJsShow = false; this.kaungEZUIKitJsShow = false;
this.carsEZUIKitJsShow = false; this.carsEZUIKitJsShow = false;
}
if(item.componentName == 'dataAnalysis'){
if(this.isShow.dataAnalysis == false){
this.isShow.dataAnalysis = true;
this.content_view_Show = true;
HttpReq.truckDispatching.screenTitleMenuQuery({status:1,pid:item.children,sort:'dsort'}).then((res) => { HttpReq.truckDispatching.screenTitleMenuQuery({status:1,pid:item.children,sort:'dsort'}).then((res) => {
if(res.code == 200){ if(res.code == 200){
let left1 = []; let left1 = [];
...@@ -280,11 +328,29 @@ export default { ...@@ -280,11 +328,29 @@ export default {
this.allComponents.right = right1; this.allComponents.right = right1;
} }
}) })
}else{
this.isShow.dataAnalysis = false;
this.content_view_Show = false;
this.allComponents.left = [];
this.allComponents.center = [];
this.allComponents.right = [];
}
this.isShow.dataScreening = false;
this.isShow.carManagement = false;
this.isShow.intelligentSchedul = false;
this.videoSelect1 = false;
this.kaungEZUIKitJsShow = false;
this.carsEZUIKitJsShow = false;
} }
if(item.componentName == 'backstage'){ if(item.componentName == 'backstage'){
this.isShow.dataScreening = false;
this.isShow.carManagement = false;
this.isShow.intelligentSchedul = false;
this.isShow.dataAnalysis = false;
this.allComponents.left = []; this.allComponents.left = [];
this.allComponents.center = []; this.allComponents.center = [];
this.allComponents.right = []; this.allComponents.right = [];
this.content_view_Show = false;
this.$nextTick(()=>{ this.$nextTick(()=>{
let routeUrl = this.$router.resolve({ let routeUrl = this.$router.resolve({
path: "/dashboard", path: "/dashboard",
...@@ -296,9 +362,14 @@ export default { ...@@ -296,9 +362,14 @@ export default {
this.carsEZUIKitJsShow = false; this.carsEZUIKitJsShow = false;
} }
if(item.componentName == 'toVideoSurveillance'){ if(item.componentName == 'toVideoSurveillance'){
this.isShow.dataScreening = false;
this.isShow.carManagement = false;
this.isShow.intelligentSchedul = false;
this.isShow.dataAnalysis = false;
this.allComponents.left = []; this.allComponents.left = [];
this.allComponents.center = []; this.allComponents.center = [];
this.allComponents.right = []; this.allComponents.right = [];
this.content_view_Show = false;
if(this.videoSelect1 == false){ if(this.videoSelect1 == false){
this.videoSelect1 = true; this.videoSelect1 = true;
this.lookFn2(); this.lookFn2();
...@@ -452,7 +523,7 @@ export default { ...@@ -452,7 +523,7 @@ export default {
} }
.content_view{ .content_view{
width: 100vw; width: 100vw;
height: 94vh; height: 96vh;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
bottom: 0px; bottom: 0px;
...@@ -461,7 +532,7 @@ export default { ...@@ -461,7 +532,7 @@ export default {
} }
.content_view_left{ .content_view_left{
width: 20vw; width: 20vw;
height: 94vh; height: 96vh;
overflow-y: scroll; overflow-y: scroll;
z-index: 3; z-index: 3;
} }
...@@ -474,12 +545,12 @@ export default { ...@@ -474,12 +545,12 @@ export default {
overflow: hidden; overflow: hidden;
position: absolute; position: absolute;
left: 20vw; left: 20vw;
bottom: 0px; bottom: 2vh;
z-index: 3; z-index: 3;
} }
.content_view_right{ .content_view_right{
width: 20vw; width: 20vw;
height: 94vh; height: 96vh;
overflow-y: scroll; overflow-y: scroll;
z-index: 3; z-index: 3;
} }
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<el-table :data="tableData" v-loading="loading" border :row-class-name="tableRowClassName" height="75vh" row-key="id" :tree-props="{children: 'children', hasChildren: 'hasChildren'}"> <el-table :data="tableData" v-loading="loading" border :row-class-name="tableRowClassName" height="75vh" row-key="id" :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
<el-table-column prop="title" label="标题" align="center"></el-table-column> <el-table-column prop="title" label="标题" align="center"></el-table-column>
<el-table-column prop="componentName" label="组件名称" align="center"></el-table-column> <el-table-column prop="componentName" label="组件名称" align="center"></el-table-column>
<el-table-column prop="pos" label="位置" align="center" :formatter="posChange"></el-table-column>
<el-table-column prop="dsort" label="排序" align="center"></el-table-column> <el-table-column prop="dsort" label="排序" align="center"></el-table-column>
<el-table-column prop="status" label="状态" align="center" :formatter="statusChange"></el-table-column> <el-table-column prop="status" label="状态" align="center" :formatter="statusChange"></el-table-column>
<el-table-column label="操作" align="center" fixed="right" width="200"> <el-table-column label="操作" align="center" fixed="right" width="200">
...@@ -28,6 +29,23 @@ ...@@ -28,6 +29,23 @@
<!-- 表单渲染 --> <!-- 表单渲染 -->
<el-dialog append-to-body :close-on-click-modal="true" :before-close="cancelForm" :visible.sync="form.visible" :title="form.title" width="700px"> <el-dialog append-to-body :close-on-click-modal="true" :before-close="cancelForm" :visible.sync="form.visible" :title="form.title" width="700px">
<el-form :model="form.item" ref="form1" :inline="true" size="small" label-width="150px"> <el-form :model="form.item" ref="form1" :inline="true" size="small" label-width="150px">
<el-form-item label="所属模块" prop="pid" v-if="form.item.pid != 0">
<el-select v-model="form.item.pid" placeholder="请选择所属模块" style="width:280px;">
<el-option label="数据总览" value="1"></el-option>
<el-option label="车辆管理" value="2"></el-option>
<el-option label="智能调度" value="3"></el-option>
<el-option label="数据分析" value="4"></el-option>
</el-select>
</el-form-item>
<el-form-item label="位置" prop="pos" v-if="form.item.pid != 0 && form.item.pos != 'center'">
<el-select v-model="form.item.pos" placeholder="请选择位置" style="width:280px;">
<el-option label="左侧" value="left"></el-option>
<el-option label="右侧" value="right"></el-option>
</el-select>
</el-form-item>
<el-form-item label="排序" prop="dsort">
<el-input-number v-model="form.item.dsort"></el-input-number>
</el-form-item>
<el-form-item label="状态" prop="status"> <el-form-item label="状态" prop="status">
<el-select v-model="form.item.status" placeholder="请选择状态" style="width:280px;"> <el-select v-model="form.item.status" placeholder="请选择状态" style="width:280px;">
<el-option label="显示" value="1"></el-option> <el-option label="显示" value="1"></el-option>
...@@ -69,10 +87,30 @@ export default { ...@@ -69,10 +87,30 @@ export default {
}, },
methods: { methods: {
loadData() { loadData() {
//获取大屏顶部标题 //获取大屏顶部标题
HttpReq.truckDispatching.screenTitleMenuQuery({size:9999,pid:0,sort:'dsort'}).then((res1) => { HttpReq.truckDispatching.screenTitleMenuQuery({size:9999,pid:0,sort:'dsort'}).then((res1) => {
if(res1.code == 200){ if(res1.code == 200){
this.tableData = res1.data.content; let alltableData = [];
res1.data.content.forEach((item,index)=>{
if(item.children){
let sonData = {...item};
sonData.children = [];
//获取对应子标题
HttpReq.truckDispatching.screenTitleMenuQuery({size:9999,pid:item.children,sort:'dsort'}).then((res2) => {
if(res2.code == 200){
sonData.children = res2.data.content;
alltableData.push(sonData);
this.tableData = alltableData;
}else{
return
}
})
}else{
alltableData.push(item);
this.tableData = alltableData;
}
})
} }
}) })
...@@ -114,11 +152,14 @@ export default { ...@@ -114,11 +152,14 @@ export default {
reqUpdateItem(form, item){ reqUpdateItem(form, item){
let lastData = {...item}; let lastData = {...item};
lastData.id = this.alarmTimeId; lastData.id = this.alarmTimeId;
if(lastData.children){
delete lastData.children;
}
HttpReq.truckDispatching.screenTitleMenuUpdate(lastData).then((res) => { HttpReq.truckDispatching.screenTitleMenuUpdate(lastData).then((res) => {
form.visible = false; form.visible = false;
if(res.code == 200){ if(res.code == 200){
this.$notify({ this.$notify({
title: '菜单配置修改成功!', title: '大屏配置修改成功!',
type: 'success', type: 'success',
duration: 2500 duration: 2500
}); });
...@@ -137,6 +178,10 @@ export default { ...@@ -137,6 +178,10 @@ export default {
//组件状态展示修改 //组件状态展示修改
statusChange(row){ statusChange(row){
return row.status == '1' ? '显示' : '隐藏'; return row.status == '1' ? '显示' : '隐藏';
},
//组件位置展示
posChange(row){
return row.pos == 'left' ? '左侧' : row.pos == 'right' ? '右侧' : row.pos == 'center' ? '中间' : '';
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment