杆塔信息和线路信息

master
fanluyan 2 years ago
parent 2a79105436
commit 9c1152b86c

@ -1,43 +1,47 @@
* {
margin: 0;
padding: 0;
margin: 0;
padding: 0;
}
html,
body,
#app,
.wrapper {
width: 100%;
height: 100%;
overflow: hidden;
width: 100%;
height: 100%;
overflow: hidden;
}
body {
font-family: 'PingFang SC', "Helvetica Neue", Helvetica, "microsoft yahei", arial, STHeiTi, sans-serif;
font-family: "PingFang SC", "Helvetica Neue", Helvetica, "microsoft yahei",
arial, STHeiTi, sans-serif;
}
a {
text-decoration: none
text-decoration: none;
}
/* 表格样式*/
.el-table-column--selection .cell {
padding-left: 14px !important;
}
/*滚动条样式*/
/* 整个滚动条 */
::-webkit-scrollbar {
width: 8px;
height: 8px;
width: 8px;
height: 8px;
}
/* 滚动条上的滚动滑块 */
::-webkit-scrollbar-thumb {
background-color: #49b1f5;
/* 关键代码 */
border-radius: 32px;
background-color: #49b1f5;
/* 关键代码 */
border-radius: 32px;
}
/* 滚动条轨道 */
::-webkit-scrollbar-track {
background-color: #f0f0f0;
border-radius: 32px;
}
background-color: #f0f0f0;
border-radius: 32px;
}

@ -1,278 +1,295 @@
<template>
<div class="sidebar">
<el-menu :default-active="onRoutes" class="sidebar-el-menu" mode="horizontal" router>
<template v-for="item in items">
<template v-if="item.subs">
<el-submenu :index="item.index" :key="item.index">
<template slot="title">
<i :class="item.icon"></i>
<span slot="title">{{ item.title }}</span>
</template>
<template v-for="subItem in item.subs">
<el-submenu v-if="subItem.subs" :index="subItem.index" :key="subItem.index">
<template slot="title">{{ subItem.title }}</template>
<el-menu-item v-for="(threeItem, i) in subItem.subs" :key="i" :index="threeItem.index">{{
threeItem.title
}}</el-menu-item>
</el-submenu>
<el-menu-item v-else :index="subItem.index" :key="subItem.index">{{ subItem.title }}</el-menu-item>
</template>
</el-submenu>
</template>
<template v-else>
<el-menu-item :index="item.index" :key="item.index">
<i :class="item.icon"></i>
<span slot="title">{{ item.title }}</span>
</el-menu-item>
</template>
<div class="sidebar">
<el-menu
:default-active="onRoutes"
class="sidebar-el-menu"
mode="horizontal"
router
>
<template v-for="item in items">
<template v-if="item.subs">
<el-submenu :index="item.index" :key="item.index">
<template slot="title">
<i :class="item.icon"></i>
<span slot="title">{{ item.title }}</span>
</template>
</el-menu>
</div>
<template v-for="subItem in item.subs">
<el-submenu
v-if="subItem.subs"
:index="subItem.index"
:key="subItem.index"
>
<template slot="title">{{ subItem.title }}</template>
<el-menu-item
v-for="(threeItem, i) in subItem.subs"
:key="i"
:index="threeItem.index"
>{{ threeItem.title }}</el-menu-item
>
</el-submenu>
<el-menu-item
v-else
:index="subItem.index"
:key="subItem.index"
>{{ subItem.title }}</el-menu-item
>
</template>
</el-submenu>
</template>
<template v-else>
<el-menu-item :index="item.index" :key="item.index">
<i :class="item.icon"></i>
<span slot="title">{{ item.title }}</span>
</el-menu-item>
</template>
</template>
</el-menu>
</div>
</template>
<script>
import bus from '../common/bus';
import bus from "../common/bus";
export default {
data() {
return {
//collapse: false,
data() {
return {
//collapse: false,
items: [
{
icon: 'el-icon-s-home',
index: 'stritl',
title: '系统首页'
},
items: [
// {
// icon: 'el-icon-s-home',
// index: 'stritl',
// title: ''
// },
{
icon: "el-icon-camera",
index: "realTimeMonitor",
title: "实时监控",
},
// {
// icon: 'el-icon-film',
// index: 'pictureRotation',
// title: ''
// },
// {
// icon: 'el-icon-video-camera',
// index: '3',
// title: '',
// subs: [
// {
// index: 'videoMonitor',
// title: ''
// },
// {
// index: 'videoHistory',
// title: ''
// }
// ]
// }
// {
// icon: 'el-icon-warning-outline',
// index: 'dashboard',
// title: ''
// },
// {
// icon: 'el-icon-bell',
// index: 'photoAlarm',
// title: ''
// },
// {
// icon: 'el-icon-setting',
// index: '6',
// title: '',
// subs: [
// {
// index: '6-1',
// title: '',
// subs: [
// {
// index: 'form',
// title: ''
// },
// {
// index: 'form',
// title: ''
// },
// {
// index: 'form',
// title: ''
// }
// ]
// },
// {
// index: '6-2',
// title: '',
// subs: [
// {
// index: 'form',
// title: ''
// }
// ]
// },
// {
// index: '6-3',
// title: 'I1',
// subs: [
// {
// index: 'form',
// title: ''
// },
// {
// index: 'form',
// title: 'OSD'
// }
// ]
// }
// ]
// },
{
icon: "el-icon-files",
index: "7",
title: "资产管理",
subs: [
{
index: "7-1",
title: "用户设备",
subs: [
{
icon: 'el-icon-camera',
index: 'realTimeMonitor',
title: '实时监控'
index: "lineInformation",
title: "线路信息管理",
},
{
icon: 'el-icon-film',
index: 'pictureRotation',
title: '图片轮巡'
index: "towerInformation",
title: "杆塔信息管理",
},
// {
// icon: 'el-icon-video-camera',
// index: '3',
// title: '',
// subs: [
// {
// index: 'videoMonitor',
// title: ''
// },
// {
// index: 'videoHistory',
// title: ''
// }
// ]
// }
// index: 'towerTeam',
// title: ''
// },
// {
// icon: 'el-icon-warning-outline',
// index: 'dashboard',
// title: ''
// index: 'groupInformation',
// title: ''
// },
// {
// index: 'form',
// title: '线'
// },
{
icon: 'el-icon-bell',
index: 'photoAlarm',
title: '告警处理'
},
// {
// icon: 'el-icon-setting',
// index: '6',
// title: '',
// subs: [
// {
// index: '6-1',
// title: '',
// subs: [
// {
// index: 'form',
// title: ''
// },
// {
// index: 'form',
// title: ''
// },
// {
// index: 'form',
// title: ''
// }
// ]
// },
// {
// index: '6-2',
// title: '',
// subs: [
// {
// index: 'form',
// title: ''
// }
// ]
// },
// {
// index: '6-3',
// title: 'I1',
// subs: [
// {
// index: 'form',
// title: ''
// },
// {
// index: 'form',
// title: 'OSD'
// }
// ]
// }
// ]
// index: 'form',
// title: ''
// },
// {
// index: 'form',
// title: ''
// }
],
},
{
index: "7-2",
title: "监测设备",
subs: [
// {
// index: 'SIMCard',
// title: 'SIM'
// },
{
icon: 'el-icon-files',
index: '7',
title: '资产管理',
subs: [
{
index: '7-1',
title: '用户设备',
subs: [
{
index: 'lineInformation',
title: '线路信息管理'
},
{
index: 'towerInformation',
title: '杆塔信息管理'
},
{
index: 'towerTeam',
title: '杆塔班组用户'
},
{
index: 'groupInformation',
title: '分组信息管理'
},
{
index: 'form',
title: '线路属性分组'
},
{
index: 'form',
title: '隐患类型管理'
},
{
index: 'form',
title: '装置型号信息'
}
]
},
{
index: '7-2',
title: '监测设备',
subs: [
{
index: 'SIMCard',
title: 'SIM卡管理'
},
{
index: 'photographicDevice',
title: '拍照装置管理'
},
{
index: 'deviceVisualization',
title: '装置分布可视化'
}
]
}
]
}
index: "photographicDevice",
title: "拍照装置管理",
},
// {
// icon: 'el-icon-monitor',
// index: '8',
// title: '',
// subs: [
// {
// index: '8-1',
// title: '',
// subs: [
// {
// index: 'form',
// title: ''
// },
// {
// index: 'form',
// title: ''
// },
// {
// index: 'form',
// title: ''
// }
// ]
// },
// {
// index: '8-2',
// title: '',
// subs: [
// {
// index: 'form',
// title: ''
// },
// {
// index: 'form',
// title: ''
// }
// ]
// }
// ]
// index: 'deviceVisualization',
// title: ''
// }
]
};
],
},
],
},
// {
// icon: 'el-icon-monitor',
// index: '8',
// title: '',
// subs: [
// {
// index: '8-1',
// title: '',
// subs: [
// {
// index: 'form',
// title: ''
// },
// {
// index: 'form',
// title: ''
// },
// {
// index: 'form',
// title: ''
// }
// ]
// },
// {
// index: '8-2',
// title: '',
// subs: [
// {
// index: 'form',
// title: ''
// },
// {
// index: 'form',
// title: ''
// }
// ]
// }
// ]
// }
],
};
},
computed: {
onRoutes() {
return this.$route.path.replace("/", "");
},
computed: {
onRoutes() {
return this.$route.path.replace('/', '');
}
},
created() {
// Event Bus
// bus.$on('collapse', (msg) => {
// this.collapse = msg;
// bus.$emit('collapse-content', msg);
// });
}
},
created() {
// Event Bus
// bus.$on('collapse', (msg) => {
// this.collapse = msg;
// bus.$emit('collapse-content', msg);
// });
},
};
</script>
<style lang="less">
.sidebar {
float: left;
.el-menu--horizontal {
.el-menu-item {
height: 70px;
line-height: 70px;
}
.el-submenu .el-submenu__title {
height: 70px;
line-height: 70px;
}
.el-dropdown-menu__item,
.el-menu-item,
.el-submenu__title {
font-size: 16px;
}
.el-menu-item i {
color: @color-text-secondary;
}
.el-menu-item.is-active {
i {
color: @color-primary;
}
}
.el-submenu.is-active .el-submenu__title > i {
&:first-child {
color: @color-primary;
}
}
float: left;
.el-menu--horizontal {
.el-menu-item {
height: 70px;
line-height: 70px;
}
.el-submenu .el-submenu__title {
height: 70px;
line-height: 70px;
}
.el-dropdown-menu__item,
.el-menu-item,
.el-submenu__title {
font-size: 16px;
}
.el-menu-item i {
color: @color-text-secondary;
}
.el-menu-item.is-active {
i {
color: @color-primary;
}
}
.el-submenu.is-active .el-submenu__title > i {
&:first-child {
color: @color-primary;
}
}
}
}
</style>

@ -6,7 +6,7 @@ Vue.use(VueRouter);
const routes = [
{
path: "/",
redirect: "/stritl",
redirect: "/lineInformation",
},
{
path: "/",

File diff suppressed because it is too large Load Diff

@ -80,7 +80,6 @@ export function get2(params) {
});
}
//图片轮巡 Post请求
export function picLoop(data) {
return request({
url: "/stritl/realData/listCompanyScan",
@ -114,6 +113,95 @@ export function getTowerList(params) {
});
}
//实时监控页面
//获取线路树状结构
export function getLineTreeListJoggle(data) {
return request({
url: "/test/getLineTreeList",
method: "post",
data,
});
}
//获取图片接口
export function getTerminalPhotoListJoggle(data) {
return request({
url: "/test/getTerminalPhotoList",
method: "post",
data,
});
}
//线路信息管理接口数据
//1.线路列表信息
export function getLineListJoggle(data) {
return request({
url: "/test/getLineList",
method: "post",
data,
});
}
//2.添加单个或者多个线路信息
export function addLineJoggle(data) {
return request({
url: "/test/addLine",
method: "post",
data,
});
}
//3.删除新路信息
export function deleteLineJoggle(data) {
return request({
url: "/test/deleteLine",
method: "post",
data,
});
}
//4.修改信息
export function updateLineJoggle(data) {
return request({
url: "/test/updateLine",
method: "post",
data,
});
}
//拍照装置管理 接口增删改查
//获取列表
export function getTerminalJoggle(data) {
return request({
url: "/test/getTerminalList",
method: "post",
data,
});
}
//添加设备信息
export function addTerminalJoggle(data) {
return request({
url: "/test/addTerminal",
method: "post",
data,
});
}
//修改设备信息
export function updateTerminalJoggle(data) {
return request({
url: "/test/updateTerminal",
method: "post",
data,
});
}
//删除设备信息
export function deleteTerminalJoggle(data) {
return request({
url: "/test/deleteTerminal",
method: "post",
data,
});
}
//公司服务器地址接口
// export function get1() {
// return request({

@ -1,34 +1,36 @@
import axios from "axios";
// import { Loading } from 'element-ui'; //项目已经全局引入element的话可以不单独引入
// let loading //定义loading变量
// function startLoading() { //使用Element loading-start 方法
// loading = Loading.service({
// lock: true,
// text: '加载中……',
// background: 'rgba(255, 255, 255, 0.7)'
// })
// }
// function endLoading() { //使用Element loading-close 方法
// loading.close()
// }
// //那么 showFullScreenLoading() tryHideFullScreenLoading() 要干的事儿就是将同一时刻的请求合并。
// //声明一个变量 needLoadingRequestCount每次调用showFullScreenLoading方法 needLoadingRequestCount + 1。
// //调用tryHideFullScreenLoading()方法needLoadingRequestCount - 1。needLoadingRequestCount为 0 时,结束 loading。
// let needLoadingRequestCount = 0
// export function showFullScreenLoading() {
// if (needLoadingRequestCount === 0) {
// startLoading()
// }
// needLoadingRequestCount++
// }
import { Loading } from "element-ui"; //项目已经全局引入element的话可以不单独引入
let loading; //定义loading变量
function startLoading() {
//使用Element loading-start 方法
loading = Loading.service({
lock: true,
text: "加载中……",
background: "rgba(255, 255, 255, 0.7)",
});
}
function endLoading() {
//使用Element loading-close 方法
loading.close();
}
//那么 showFullScreenLoading() tryHideFullScreenLoading() 要干的事儿就是将同一时刻的请求合并。
//声明一个变量 needLoadingRequestCount每次调用showFullScreenLoading方法 needLoadingRequestCount + 1。
//调用tryHideFullScreenLoading()方法needLoadingRequestCount - 1。needLoadingRequestCount为 0 时,结束 loading。
let needLoadingRequestCount = 0;
export function showFullScreenLoading() {
if (needLoadingRequestCount === 0) {
startLoading();
}
needLoadingRequestCount++;
}
// export function tryHideFullScreenLoading() {
// if (needLoadingRequestCount <= 0) return
// needLoadingRequestCount--
// if (needLoadingRequestCount === 0) {
// endLoading()
// }
// }
export function tryHideFullScreenLoading() {
if (needLoadingRequestCount <= 0) return;
needLoadingRequestCount--;
if (needLoadingRequestCount === 0) {
endLoading();
}
}
const service = axios.create({
// process.env.NODE_ENV === 'development' 来判断是否开发环境
@ -41,7 +43,7 @@ const service = axios.create({
service.interceptors.request.use(
(config) => {
// showFullScreenLoading()
showFullScreenLoading();
return config;
},
(error) => {
@ -53,7 +55,7 @@ service.interceptors.request.use(
service.interceptors.response.use(
(response) => {
if (response.status === 200) {
// tryHideFullScreenLoading()
tryHideFullScreenLoading();
return response.data;
} else {
Promise.reject();

@ -0,0 +1,203 @@
<template>
<el-dialog
class="addPhotoDialog"
:title="photoDialogTitle"
:visible.sync="photoDialog"
width="654px"
>
<el-form
label-position="left"
label-width="92px"
ref="formPhotoInfo"
:rules="rules"
:model="formInfo"
>
<el-form-item label="出厂编号" prop="bsIdentifier" required>
<el-input v-model="formInfo.bsIdentifier"></el-input>
</el-form-item>
<el-form-item label="生产厂家" prop="bsManufacturer" required>
<el-input v-model="formInfo.bsManufacturer"></el-input>
</el-form-item>
<el-form-item label="生产日期" prop="bsProductionDate" required>
<el-input v-model="formInfo.bsProductionDate"></el-input>
</el-form-item>
<el-form-item label=" 图像监测装置 ID" prop="cmdid" required>
<el-input v-model="formInfo.cmdid"></el-input>
</el-form-item>
<el-form-item label="显示名" prop="displayName" required>
<el-input v-model="formInfo.displayName"></el-input>
</el-form-item>
<el-form-item label="装置名称" prop="equipName" required>
<el-input v-model="formInfo.equipName"></el-input>
</el-form-item>
<el-form-item
label="装置基本信息版本号"
prop="essentialInfoVersion"
required
>
<el-input v-model="formInfo.essentialInfoVersion"></el-input>
</el-form-item>
<el-form-item label="是否带云台" prop="hasPan" required>
<el-input v-model="formInfo.hasPan"></el-input>
</el-form-item>
<el-form-item label="纬度" prop="latitude" required>
<el-input v-model.number="formInfo.latitude"></el-input>
</el-form-item>
<el-form-item label="线路编号" prop="lineid" required>
<el-input v-model="formInfo.lineid"></el-input>
</el-form-item>
<el-form-item label="经度" prop="longitude" required>
<el-input v-model.number="formInfo.longitude"></el-input>
</el-form-item>
<el-form-item label="装置型号" prop="model" required>
<el-input v-model="formInfo.model"></el-input>
</el-form-item>
<el-form-item label="原始 ID" prop="orgId" required>
<el-input v-model="formInfo.orgId"></el-input>
</el-form-item>
<el-form-item label="杆塔编号" prop="towerid" required>
<el-input v-model="formInfo.towerid"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="closeDialog(0)"> </el-button>
<el-button type="primary" @click="submitForm()"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { addTerminalJoggle, updateTerminalJoggle } from "@/utils/api/index";
export default {
props: {
photoDialog: {
type: Boolean,
},
photoDialogTitle: {
type: String,
default: "新增",
},
formItem: {
type: Object,
default: function () {
return {};
},
},
},
data() {
return {
formInfo: {},
rules: {},
//
formArr: [],
};
},
methods: {
//
submitForm() {
this.$refs.formPhotoInfo.validate((valid) => {
if (valid) {
let formObj = {
bsIdentifier: this.formInfo.bsIdentifier,
bsManufacturer: this.formInfo.bsManufacturer,
bsProductionDate: this.formInfo.bsProductionDate,
cmdid: this.formInfo.cmdid,
displayName: this.formInfo.displayName,
equipName: this.formInfo.equipName,
essentialInfoVersion: this.formInfo.essentialInfoVersion,
hasPan: this.formInfo.hasPan,
latitude: this.formInfo.latitude,
lineid: this.formInfo.lineid,
longitude: this.formInfo.longitude,
model: this.formInfo.model,
orgId: this.formInfo.orgId,
towerid: this.formInfo.towerid,
};
this.formArr.push(formObj);
console.log(this.formArr);
//
if (this.photoDialogTitle == "新增") {
addTerminalJoggle({ list: this.formArr })
.then((res) => {
console.log(res);
this.$emit("photoDialogClose", 1); //
this.$message.success("添加成功");
this.$refs.formPhotoInfo.resetFields();
})
.catch((err) => {
console.log(err); //
this.$message.error("添加失败");
});
} else if (this.photoDialogTitle == "修改") {
let changeformObj = {
bsIdentifier: this.formInfo.bsIdentifier,
bsManufacturer: this.formInfo.bsManufacturer,
bsProductionDate: this.formInfo.bsProductionDate,
cmdid: this.formInfo.cmdid,
displayName: this.formInfo.displayName,
equipName: this.formInfo.equipName,
essentialInfoVersion: this.formInfo.essentialInfoVersion,
hasPan: this.formInfo.hasPan,
latitude: this.formInfo.latitude,
lineid: this.formInfo.lineid,
longitude: this.formInfo.longitude,
model: this.formInfo.model,
orgId: this.formInfo.orgId,
towerid: this.formInfo.towerid,
id: this.formInfo.id,
};
updateTerminalJoggle(changeformObj)
.then((res) => {
console.log(res);
this.$emit("photoDialogClose", 1); //
this.$message.success("修改成功");
})
.catch((err) => {
console.log(err); //
this.$message.error("修改失败");
});
}
} else {
console.log("error submit!!");
return false;
}
});
},
//
closeDialog(flag) {
this.$refs.formPhotoInfo.resetFields();
this.$emit("photoDialogClose", flag);
},
},
mounted() {
console.log("打印传过来的对象", this.formItem);
console.log("打印传过来的对象", this.formItem.bsIdentifier);
this.formInfo = JSON.parse(JSON.stringify(this.formItem));
},
watch: {
formItem: {
handler(newVal, oldVal) {
//
this.$nextTick(() => {
this.formInfo = JSON.parse(JSON.stringify(this.formItem));
});
},
immediate: true,
deep: true,
},
},
};
</script>
<style lang="less">
.addPhotoDialog {
.el-dialog {
.el-form {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
}
}
</style>

@ -1,22 +1,11 @@
<template>
<div class="photoGraphicDevice">
<div class="photoGraphicBtnGroup">
<el-button type="primary">新增</el-button>
<el-button type="primary">修改</el-button>
<el-button type="primary">删除</el-button>
<el-button type="primary">查询</el-button>
<el-button type="primary">质保延期</el-button>
<el-button type="primary">导入</el-button>
<el-button type="primary">模板</el-button>
<el-button type="primary">导出</el-button>
<el-button type="primary">前端分析报告</el-button>
<el-button type="primary">G开关</el-button>
<el-button type="primary">更新ZB</el-button>
<el-button type="primary">I1图像分析</el-button>
<el-button type="primary">主动拍照</el-button>
<el-button type="primary">传感器数量下发</el-button>
<el-button type="primary" @click="handleAddPhoto()"></el-button>
<el-button type="primary" @click="handleRevisePhoto()"></el-button>
<el-button type="primary" @click="handleDelete()"></el-button>
</div>
<div class="searchForm">
<!-- <div class="searchForm">
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="单位:">
<el-select v-model="formInline.region" placeholder="活动区域">
@ -91,97 +80,198 @@
<el-input v-model="formInline.user" placeholder="审批人"></el-input>
</el-form-item>
</el-form>
</div>
</div> -->
<div class="photoGraphicTable">
<el-table
ref="multipleTable"
:data="tableData"
:data="terminalTableData"
tooltip-effect="dark"
style="width: 100%"
border
@selection-change="handleSelectionChange"
@row-click="handleRowClick"
>
<el-table-column type="index" width="55"> </el-table-column>
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column label="单位">
<template slot-scope="scope">{{ scope.row.date }}</template>
<el-table-column label="出厂编号">
<template slot-scope="scope">{{ scope.row.bsIdentifier }}</template>
</el-table-column>
<el-table-column prop="bsManufacturer" label="生产厂家">
</el-table-column>
<el-table-column
prop="bsProductionDate"
label="生产日期"
:show-overflow-tooltip="true"
:formatter="dateFormat"
>
</el-table-column>
<el-table-column
prop="cmdid"
label="图像监测装置ID"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop="createTime"
label="创建时间"
:show-overflow-tooltip="true"
:formatter="dateFormat"
>
</el-table-column>
<el-table-column prop="displayName" label="显示名"> </el-table-column>
<el-table-column prop="equipName" label="装置名称"> </el-table-column>
<el-table-column prop="essentialInfoVersion" label="装置基本信息版本号">
</el-table-column>
<el-table-column prop="name" label="电话号码"> </el-table-column>
<el-table-column prop="address" label="网络类型" show-overflow-tooltip>
<el-table-column prop="hasPan" label="是否带云台">
<template slot-scope="scope">
<span v-if="scope.row.hasPan == 0"></span>
<span v-if="scope.row.hasPan == 1"></span>
</template>
</el-table-column>
<el-table-column prop="latitude" label="维度"> </el-table-column>
<el-table-column prop="lineid" label="线路编号"> </el-table-column>
<el-table-column prop="longitude" label="经度"> </el-table-column>
<el-table-column prop="model" label="装置型号"> </el-table-column>
<el-table-column prop="orgId" label="原始ID"> </el-table-column>
<el-table-column prop="towerid" label="杆塔编号"> </el-table-column>
<el-table-column
prop="updateTime"
label="修改时间"
:show-overflow-tooltip="true"
:formatter="dateFormat"
>
</el-table-column>
<el-table-column prop="name" label="质保到期日"> </el-table-column>
<el-table-column prop="name" label="流量包(M)"> </el-table-column>
<el-table-column prop="name" label="告警阀值(%)"> </el-table-column>
<el-table-column prop="name" label="状态"> </el-table-column>
<el-table-column prop="name" label="是否已使用"> </el-table-column>
</el-table>
</div>
<addPhotoDialog
:photoDialog="photoDialog"
:photoDialogTitle="photoDialogTitle"
@photoDialogClose="photoDialogClose"
:formItem="formphotoInfo"
></addPhotoDialog>
</div>
</template>
<script>
import { getTerminalJoggle, deleteTerminalJoggle } from "@/utils/api/index";
import moment from "moment";
import addPhotoDialog from "./components/addPhotoDialog.vue";
export default {
components: {
addPhotoDialog,
},
data() {
return {
formInline: {
user: "",
region: "",
},
tableData: [
{
date: "2016-05-03",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
},
{
date: "2016-05-02",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
},
{
date: "2016-05-04",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
},
{
date: "2016-05-01",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
},
{
date: "2016-05-08",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
},
{
date: "2016-05-06",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
},
{
date: "2016-05-07",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
},
],
multipleSelection: [],
terminalTableData: [], //
photoDialog: false, //
photoDialogTitle: "", //
deleteArr: [], //
multipleSelection: [], //
formphotoInfo: {}, //
};
},
methods: {
onSubmit() {
console.log("submit!");
////
terminalList() {
getTerminalJoggle()
.then((res) => {
console.log(res);
this.terminalTableData = res.data.list;
})
.catch((err) => {
console.log(err); //
});
},
//
handleRowClick(row, column, event) {
this.$refs.multipleTable.toggleRowSelection(row);
// console.log(column, row, event);
},
//
handleSelectionChange(val) {
this.multipleSelection = val;
console.log(this.multipleSelection);
},
//
dateFormat(row, column) {
var date = row[column.property];
if (date == undefined) {
return "";
}
return moment(date).format("YYYY-MM-DD HH:mm:ss");
},
toggleSelection(rows) {
if (rows) {
rows.forEach((row) => {
this.$refs.multipleTable.toggleRowSelection(row);
//handleAddPhoto
handleAddPhoto() {
this.photoDialog = true;
this.photoDialogTitle = "新增";
},
//handleRevisePhoto
handleRevisePhoto() {
if (this.multipleSelection.length !== 1) {
this.$message({
showClose: true,
message: "请选择要操作的记录最多只能选择一条!",
type: "warning",
});
} else {
this.$refs.multipleTable.clearSelection();
this.photoDialog = true;
this.photoDialogTitle = "修改";
console.log(this.multipleSelection);
this.formphotoInfo = Object.assign({}, this.multipleSelection[0]);
}
},
handleSelectionChange(val) {
this.multipleSelection = val;
//
photoDialogClose(flag) {
if (flag) {
//
this.terminalList();
}
this.photoDialog = false;
},
//
handleDelete() {
if (this.multipleSelection.length == 0) {
this.$message({
showClose: true,
message: "请选择要操作的记录!",
type: "warning",
});
} else {
console.log(this.multipleSelection);
for (let i in this.multipleSelection) {
console.log(i);
this.deleteArr.push({
id: this.multipleSelection[i].id,
});
}
console.log(this.deleteArr);
this.$confirm("确定要删除记录吗,同时删除关联关系?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
//
deleteTerminalJoggle({ list: this.deleteArr }).then((res) => {
console.log(res);
this.terminalList(); //
});
this.$message({
type: "success",
message: "删除成功!",
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
}
},
},
created() {
this.terminalList();
},
};
</script>
<style lang="less">

@ -0,0 +1,152 @@
<template>
<el-dialog
class="addLineDialog"
:title="lineDialogTitle"
:visible.sync="lineDialog"
width="420px"
>
<el-form
label-position="left"
label-width="92px"
ref="formLineInfo"
:rules="rules"
:model="lineForm"
>
<el-form-item label="单位:" prop="bsManufacturer">
<el-input
v-model="lineForm.bsManufacturer"
autocomplete="off"
></el-input>
</el-form-item>
<el-form-item label="DY等级" prop="dyLevel">
<el-input
v-model.number="lineForm.dyLevel"
autocomplete="off"
></el-input>
</el-form-item>
<el-form-item label="线路名称:" prop="name">
<el-input v-model="lineForm.name" autocomplete="off"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="closeDialog(0)"> </el-button>
<el-button type="primary" @click="submitForm()"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { addLineJoggle, updateLineJoggle } from "@/utils/api/index";
export default {
props: {
lineDialog: {
type: Boolean,
},
lineDialogTitle: {
type: String,
default: "新增",
},
formItem: {
type: Object,
default: function () {
return {};
},
},
},
data() {
return {
lineForm: {},
rules: {
bsManufacturer: [
{ required: true, message: "请输入公司名称", trigger: "blur" },
],
dyLevel: [
{ required: true, message: "请选择DY等级", trigger: "blur" },
{ type: "number", message: "DY等级数字值" },
],
name: [
{
required: true,
message: "请输入线路名称",
trigger: "blur",
},
],
},
//
formArr: [],
};
},
methods: {
//
submitForm() {
this.$refs.formLineInfo.validate((valid) => {
if (valid) {
let formObj = {
bsManufacturer: this.lineForm.bsManufacturer,
dyLevel: this.lineForm.dyLevel,
name: this.lineForm.name,
};
this.formArr.push(formObj);
console.log(this.formArr);
//
if (this.lineDialogTitle == "新增") {
addLineJoggle({ list: this.formArr })
.then((res) => {
console.log(res);
this.$emit("lineDialogClose", 1); //
this.$message.success("添加成功");
})
.catch((err) => {
console.log(err); //
this.$message.error("添加失败");
});
} else if (this.lineDialogTitle == "修改") {
let changeformObj = {
bsManufacturer: this.lineForm.bsManufacturer,
dyLevel: this.lineForm.dyLevel,
name: this.lineForm.name,
id: this.lineForm.id,
};
updateLineJoggle(changeformObj)
.then((res) => {
console.log(res);
this.$emit("lineDialogClose", 1); //
this.$message.success("修改成功");
})
.catch((err) => {
console.log(err); //
this.$message.error("修改失败");
});
}
} else {
console.log("error submit!!");
return false;
}
});
},
//
closeDialog(flag) {
this.$refs.formLineInfo.resetFields();
this.$emit("lineDialogClose", flag);
},
},
mounted() {
console.log("打印传过来的对象", this.formItem);
console.log("打印传过来的对象", this.formItem.bsIdentifier);
this.lineForm = JSON.parse(JSON.stringify(this.formItem));
},
watch: {
formItem: {
handler(newVal, oldVal) {
//
this.$nextTick(() => {
this.lineForm = JSON.parse(JSON.stringify(this.formItem));
});
},
immediate: true,
deep: true,
},
},
};
</script>

@ -1,153 +1,217 @@
<template>
<div class="lineInformation">
<div class="lineBtnGroup">
<el-button type="primary">新增</el-button>
<el-button type="primary">批量添加</el-button>
<el-button type="primary">修改</el-button>
<el-button type="primary">修改公司</el-button>
<el-button type="primary">删除</el-button>
<el-button type="primary">查询</el-button>
<el-button type="primary">导入</el-button>
<el-button type="primary">导入模板下载</el-button>
<el-button type="primary">导出</el-button>
</div>
<div class="searchForm">
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="单位:">
<el-select v-model="formInline.region" placeholder="活动区域">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select>
</el-form-item>
<el-form-item label="DY等级:">
<el-select v-model="formInline.region" placeholder="活动区域">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select>
</el-form-item>
<el-form-item label="XL名称:">
<el-input v-model="formInline.user" placeholder="审批人"></el-input>
</el-form-item>
<el-form-item label="是否为采集">
<el-select v-model="formInline.region" placeholder="活动区域">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select>
</el-form-item>
<el-form-item label="PMS编号:">
<el-input v-model="formInline.user" placeholder="审批人"></el-input>
</el-form-item>
</el-form>
</div>
<div class="lineTable">
<el-table
ref="multipleTable"
:data="tableData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange"
>
<el-table-column type="index" width="55"> </el-table-column>
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column label="单位">
<template slot-scope="scope">{{ scope.row.date }}</template>
</el-table-column>
<el-table-column prop="name" label="XL名称"> </el-table-column>
<el-table-column prop="address" label="DY等级" show-overflow-tooltip> </el-table-column>
<el-table-column prop="name" label="起始GT"> </el-table-column>
<el-table-column prop="name" label="终止GT"> </el-table-column>
<el-table-column prop="name" label="PMS编号"> </el-table-column>
<el-table-column prop="name" label="备注"> </el-table-column>
<el-table-column prop="name" label="排序号"> </el-table-column>
</el-table>
</div>
<div class="lineInformation">
<div class="lineBtnGroup">
<el-button type="primary" @click="handleAddLine()"></el-button>
<el-button type="primary" @click="handleResive()"></el-button>
<!-- <el-button type="primary">批量添加</el-button> -->
<el-button type="primary" @click="handleDelete()"></el-button>
<!-- <el-button type="primary">查询</el-button> -->
</div>
<!-- <div class="searchForm">
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="单位:">
<el-select v-model="formInline.region" placeholder="活动区域">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select>
</el-form-item>
<el-form-item label="DY等级:">
<el-select v-model="formInline.region" placeholder="活动区域">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select>
</el-form-item>
<el-form-item label="XL名称:">
<el-input v-model="formInline.user" placeholder="审批人"></el-input>
</el-form-item>
<el-form-item label="是否为采集">
<el-select v-model="formInline.region" placeholder="活动区域">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select>
</el-form-item>
<el-form-item label="PMS编号:">
<el-input v-model="formInline.user" placeholder="审批人"></el-input>
</el-form-item>
</el-form>
</div> -->
<div class="lineTable">
<el-table
ref="multipleTable"
:data="lineTableData"
tooltip-effect="dark"
style="width: 100%"
border
@selection-change="handleSelectionChange"
@row-click="handleRowClick"
>
<el-table-column type="index" width="55"> </el-table-column>
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column label="单位" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.bsManufacturer }}</template>
</el-table-column>
<el-table-column prop="id" label="线路id" show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="name"
label="XL名称"
min-width="95"
show-overflow-tooltip
>
</el-table-column>
<el-table-column prop="dyLevel" label="DY等级" show-overflow-tooltip>
</el-table-column>
</el-table>
</div>
<!-- 新增线路 -->
<add-lineDialog
:lineDialog="lineDialog"
:lineDialogTitle="lineDialogTitle"
:formItem="formLineInfo"
@lineDialogClose="lineDialogClose"
></add-lineDialog>
</div>
</template>
<script>
import { getLineListJoggle, deleteLineJoggle } from "@/utils/api/index";
import addLineDialog from "./components/addLineDialog.vue";
export default {
data() {
return {
formInline: {
user: '',
region: ''
},
tableData: [
{
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-08',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-06',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-07',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}
],
multipleSelection: []
};
components: {
addLineDialog,
},
data() {
return {
formInline: {
user: "",
region: "",
},
lineDialogTitle: "", //
lineDialog: false,
formLineInfo: {}, //
lineTableData: [],
multipleSelection: [], //
//
deleteArr: [],
};
},
methods: {
//线
lineList() {
getLineListJoggle()
.then((res) => {
console.log(res);
this.lineTableData = res.data.list;
})
.catch((err) => {
console.log(err); //
});
},
//
handleRowClick(row, column, event) {
this.$refs.multipleTable.toggleRowSelection(row);
// console.log(column, row, event);
},
//
handleSelectionChange(val) {
this.multipleSelection = val;
},
//
handleAddLine() {
this.lineDialog = true;
this.lineDialogTitle = "新增";
},
//handleResive 线
handleResive() {
if (this.multipleSelection.length !== 1) {
this.$message({
showClose: true,
message: "请选择要操作的记录最多只能选择一条!",
type: "warning",
});
} else {
console.log(this.multipleSelection);
this.lineDialogTitle = "修改";
this.formLineInfo = Object.assign({}, this.multipleSelection[0]);
this.lineDialog = true;
}
},
//
lineDialogClose(flag) {
if (flag) {
//
this.lineList();
}
this.lineDialog = false;
},
methods: {
onSubmit() {
console.log('submit!');
},
toggleSelection(rows) {
if (rows) {
rows.forEach((row) => {
this.$refs.multipleTable.toggleRowSelection(row);
});
} else {
this.$refs.multipleTable.clearSelection();
}
},
handleSelectionChange(val) {
this.multipleSelection = val;
//
handleDelete() {
if (this.multipleSelection.length == 0) {
this.$message({
showClose: true,
message: "请选择要操作的记录!",
type: "warning",
});
} else {
console.log(this.multipleSelection);
for (let i in this.multipleSelection) {
console.log(i);
this.deleteArr.push({
id: this.multipleSelection[i].id,
});
}
}
console.log(this.deleteArr);
this.$confirm("确定要删除记录吗,同时删除关联关系?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
//
deleteLineJoggle({ list: this.deleteArr }).then((res) => {
console.log(res);
this.lineList(); //
});
this.$message({
type: "success",
message: "删除成功!",
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
}
},
},
created() {
this.lineList();
},
};
</script>
<style lang="less">
.lineInformation {
width: 100%;
height: 100%;
background: @color-white;
.lineBtnGroup {
padding: 16px 8px;
}
.searchForm {
padding: 0px 8px;
.el-form {
.el-form-item {
margin-bottom: 0px;
}
}
}
.lineTable {
padding: 16px 8px 0 8px;
width: 100%;
height: 100%;
background: @color-white;
.lineBtnGroup {
padding: 16px 8px;
}
.searchForm {
padding: 0px 8px;
.el-form {
.el-form-item {
margin-bottom: 0px;
}
}
}
.lineTable {
padding: 16px 8px 0 8px;
}
}
</style>
</style>

@ -1,138 +1,149 @@
<template>
<div class="monitor-container">
<!-- 左侧数据列表树 -->
<div class="sideBar">
<!-- <treeSide></treeSide> -->
<!-- <el-tree ref="tree" :data="barData" @node-click="handleNodeClick" :props="defaultProps"></el-tree> -->
<el-tree
:data="barData"
:props="defaultProps"
:current-node-key="current_node_key"
ref="tree"
node-key="id"
highlight-current
:default-expanded-keys="defaultKey"
check-on-click-node
@node-click="handleNodeClick"
>
</el-tree>
</div>
<!-- <router-view></router-view> -->
<!-- 中心内容 -->
<div class="monitor-container">
<!-- 左侧数据列表树 -->
<div class="sideBar">
<!-- <treeSide></treeSide> -->
<!-- <el-tree ref="tree" :data="barData" @node-click="handleNodeClick" :props="defaultProps"></el-tree> -->
<picturemain :photoData="photoData" v-if="showBigPic"></picturemain>
<!-- 带参数的中心内容右侧参数区 -->
<div class="picSetBox" v-else>
<div class="swiperBox">
<carouselChart></carouselChart>
</div>
<paramArea></paramArea>
</div>
<el-tree
:data="lineTreeData"
:props="defaultProps"
:expand-on-click-node="false"
ref="tree"
node-key="id"
highlight-current
@node-click="handleNodeClick"
:current-node-key="currentNodekey"
>
</el-tree>
</div>
<!-- <router-view></router-view> -->
<!-- 中心内容 -->
<picturemain :photoData="photoData" v-if="showBigPic"></picturemain>
<!-- 带参数的中心内容右侧参数区 -->
<div class="picSetBox" v-else>
<div class="swiperBox">
<carouselChart></carouselChart>
</div>
<paramArea></paramArea>
</div>
</div>
</template>
<script>
// import { getHostDeviceDataByVoltage } from '@/utils/api/index';
import carouselChart from '../components/carouselChart.vue';
import treeSide from './components/treeSide.vue';
import picturemain from './picturemain.vue'; //
import paramArea from './paramArea.vue'; //
import testjson from '../../testjson';
import {
getLineTreeListJoggle,
getTerminalPhotoListJoggle,
} from "@/utils/api/index";
import carouselChart from "../components/carouselChart.vue";
import treeSide from "./components/treeSide.vue";
import picturemain from "./picturemain.vue"; //
import paramArea from "./paramArea.vue"; //
export default {
components: {
treeSide,
picturemain,
paramArea,
carouselChart
},
data() {
return {
photoData: '',
childData: '',
currentNodekey: '',
showBigPic: true,
defaultKey: '',
barData: [],
defaultProps: {
//
children: 'children',
label: 'text'
},
current_node_key: '2e24a182-b1a5-4135-b473-b8eee2c5193e'
};
},
watch: {},
components: {
treeSide,
picturemain,
paramArea,
carouselChart,
},
data() {
return {
photoData: "",
childData: "",
currentNodekey: "",
showBigPic: true,
defaultKey: "",
lineTreeData: [],
defaultProps: {
//
children: "list",
label: "name",
},
currentNodekey: "", //,
};
},
watch: {},
mounted() {
this.$nextTick(() => {
var currentData = testjson.data[0].children[0].children[0];
this.handleNodeClick(currentData);
this.defaultKey = [currentData.id];
mounted() {},
created() {
this.getLineTreeList();
},
methods: {
//
getLineTreeList() {
getLineTreeListJoggle()
.then((res) => {
console.log(res);
this.lineTreeData = res.data.list;
console.log(this.lineTreeData);
if (this.lineTreeData.length > 0) {
this.currentNodekey = this.lineTreeData[0].id;
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.currentNodekey); //
});
}
})
.catch((err) => {
console.log(err); //
});
},
created() {
this.getTree();
//
// getHostDeviceDataByVoltage().then((res) => {
// console.log(res);
// });
//
getTerminalPhotoList() {},
//tree
handleNodeClick(data, node) {
console.log(data, node);
if (data.list) {
this.$refs.tree.setCurrentKey(data.list[0].id);
}
},
methods: {
handleNodeClick(data) {
console.log(data);
if (data.children.length === 0 && data.dataType === 'tower') {
// this.photoData = data;
this.showBigPic = false;
this.childData = data.text;
} else if (data.children.length && data.dataType === 'line') {
this.showBigPic = true;
this.photoData = data;
}
},
getTree() {
this.barData = testjson.data;
console.log(this.barData);
}
}
},
};
</script>
<style lang="less">
.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
//
color: #fff;
background: #2d8cf0 !important;
}
.el-tree-node > .el-tree-node__content:hover {
background-color: #c1ddf0;
}
.monitor-container {
display: flex;
height: 100%;
border: 1px solid @border-color-base;
box-sizing: border-box;
background: @color-white;
.sideBar {
width: 300px;
border-right: 1px solid @border-color-base;
overflow: auto;
.el-tree {
.el-tree-node__content {
height: 40px;
}
}
}
.picSetBox {
display: flex;
width: 100%;
height: 100%;
border: 1px solid @border-color-base;
box-sizing: border-box;
background: @color-white;
.sideBar {
width: 300px;
border-right: 1px solid @border-color-base;
overflow: auto;
.el-tree {
.el-tree-node__content {
height: 40px;
}
}
}
.picSetBox {
display: flex;
width: 100%;
height: 100%;
//background: #fcc;
flex: 1;
overflow: hidden;
.swiperBox {
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
width: auto;
overflow: hidden;
}
//background: #fcc;
flex: 1;
overflow: hidden;
.swiperBox {
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
width: auto;
overflow: hidden;
}
}
}
</style>
</style>

@ -1,32 +1,32 @@
const { defineConfig } = require('@vue/cli-service')
const { defineConfig } = require("@vue/cli-service");
const path = require("path");
module.exports = defineConfig({
publicPath: '/',
assetsDir: 'static',
publicPath: "/",
assetsDir: "static",
transpileDependencies: true,
lintOnSave:false,
lintOnSave: false,
pluginOptions: {
'style-resources-loader': {
preProcessor: 'less',
"style-resources-loader": {
preProcessor: "less",
patterns: [
// 这个是加上自己的路径
path.resolve(__dirname, './src/assets/css/global.less')
]
}
path.resolve(__dirname, "./src/assets/css/global.less"),
],
},
},
devServer: {
proxy: {
'/api': {//表示拦截以/api开头的请求路径
//target: 'http://localhost:1234', //本地nodejs服务器
//target: 'http://47.96.238.157:8093', //公司项目服务器环境
target: 'http://180.166.218.222:7200',
changOrigin: true,//是否开启跨域
pathRewrite: {
'^/api': '' //重写api把api变成空字符因为我们真正请求的路径是没有api的
}
}
}
}
})
"/api": {
//表示拦截以/api开头的请求路径
//target: 'http://localhost:1234', //本地nodejs服务器
target: "http://47.96.238.157:8093", //公司项目服务器环境
//target: 'http://180.166.218.222:7200',
changOrigin: true, //是否开启跨域
pathRewrite: {
"^/api": "", //重写api把api变成空字符因为我们真正请求的路径是没有api的
},
},
},
},
});

Loading…
Cancel
Save