杆塔信息和线路信息

master
fanluyan 2 years ago
parent 2a79105436
commit 9c1152b86c

@ -1,43 +1,47 @@
* { * {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
html, html,
body, body,
#app, #app,
.wrapper { .wrapper {
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
} }
body { 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 { a {
text-decoration: none text-decoration: none;
} }
/* 表格样式*/
.el-table-column--selection .cell {
padding-left: 14px !important;
}
/*滚动条样式*/ /*滚动条样式*/
/* 整个滚动条 */ /* 整个滚动条 */
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 8px; width: 8px;
height: 8px; height: 8px;
} }
/* 滚动条上的滚动滑块 */ /* 滚动条上的滚动滑块 */
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
background-color: #49b1f5; background-color: #49b1f5;
/* 关键代码 */ /* 关键代码 */
border-radius: 32px; border-radius: 32px;
} }
/* 滚动条轨道 */ /* 滚动条轨道 */
::-webkit-scrollbar-track { ::-webkit-scrollbar-track {
background-color: #f0f0f0; background-color: #f0f0f0;
border-radius: 32px; border-radius: 32px;
} }

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

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

File diff suppressed because it is too large Load Diff

@ -80,7 +80,6 @@ export function get2(params) {
}); });
} }
//图片轮巡 Post请求 //图片轮巡 Post请求
export function picLoop(data) { export function picLoop(data) {
return request({ return request({
url: "/stritl/realData/listCompanyScan", 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() { // export function get1() {
// return request({ // return request({

@ -1,34 +1,36 @@
import axios from "axios"; import axios from "axios";
// import { Loading } from 'element-ui'; //项目已经全局引入element的话可以不单独引入 import { Loading } from "element-ui"; //项目已经全局引入element的话可以不单独引入
// let loading //定义loading变量 let loading; //定义loading变量
// function startLoading() { //使用Element loading-start 方法 function startLoading() {
// loading = Loading.service({ //使用Element loading-start 方法
// lock: true, loading = Loading.service({
// text: '加载中……', lock: true,
// background: 'rgba(255, 255, 255, 0.7)' text: "加载中……",
// }) background: "rgba(255, 255, 255, 0.7)",
// } });
// function endLoading() { //使用Element loading-close 方法 }
// loading.close() function endLoading() {
// } //使用Element loading-close 方法
// //那么 showFullScreenLoading() tryHideFullScreenLoading() 要干的事儿就是将同一时刻的请求合并。 loading.close();
// //声明一个变量 needLoadingRequestCount每次调用showFullScreenLoading方法 needLoadingRequestCount + 1。 }
// //调用tryHideFullScreenLoading()方法needLoadingRequestCount - 1。needLoadingRequestCount为 0 时,结束 loading。 //那么 showFullScreenLoading() tryHideFullScreenLoading() 要干的事儿就是将同一时刻的请求合并。
// let needLoadingRequestCount = 0 //声明一个变量 needLoadingRequestCount每次调用showFullScreenLoading方法 needLoadingRequestCount + 1。
// export function showFullScreenLoading() { //调用tryHideFullScreenLoading()方法needLoadingRequestCount - 1。needLoadingRequestCount为 0 时,结束 loading。
// if (needLoadingRequestCount === 0) { let needLoadingRequestCount = 0;
// startLoading() export function showFullScreenLoading() {
// } if (needLoadingRequestCount === 0) {
// needLoadingRequestCount++ startLoading();
// } }
needLoadingRequestCount++;
}
// export function tryHideFullScreenLoading() { export function tryHideFullScreenLoading() {
// if (needLoadingRequestCount <= 0) return if (needLoadingRequestCount <= 0) return;
// needLoadingRequestCount-- needLoadingRequestCount--;
// if (needLoadingRequestCount === 0) { if (needLoadingRequestCount === 0) {
// endLoading() endLoading();
// } }
// } }
const service = axios.create({ const service = axios.create({
// process.env.NODE_ENV === 'development' 来判断是否开发环境 // process.env.NODE_ENV === 'development' 来判断是否开发环境
@ -41,7 +43,7 @@ const service = axios.create({
service.interceptors.request.use( service.interceptors.request.use(
(config) => { (config) => {
// showFullScreenLoading() showFullScreenLoading();
return config; return config;
}, },
(error) => { (error) => {
@ -53,7 +55,7 @@ service.interceptors.request.use(
service.interceptors.response.use( service.interceptors.response.use(
(response) => { (response) => {
if (response.status === 200) { if (response.status === 200) {
// tryHideFullScreenLoading() tryHideFullScreenLoading();
return response.data; return response.data;
} else { } else {
Promise.reject(); 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> <template>
<div class="photoGraphicDevice"> <div class="photoGraphicDevice">
<div class="photoGraphicBtnGroup"> <div class="photoGraphicBtnGroup">
<el-button type="primary">新增</el-button> <el-button type="primary" @click="handleAddPhoto()"></el-button>
<el-button type="primary">修改</el-button> <el-button type="primary" @click="handleRevisePhoto()"></el-button>
<el-button type="primary">删除</el-button> <el-button type="primary" @click="handleDelete()"></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>
</div> </div>
<div class="searchForm"> <!-- <div class="searchForm">
<el-form :inline="true" :model="formInline" class="demo-form-inline"> <el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="单位:"> <el-form-item label="单位:">
<el-select v-model="formInline.region" placeholder="活动区域"> <el-select v-model="formInline.region" placeholder="活动区域">
@ -91,97 +80,198 @@
<el-input v-model="formInline.user" placeholder="审批人"></el-input> <el-input v-model="formInline.user" placeholder="审批人"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div> -->
<div class="photoGraphicTable"> <div class="photoGraphicTable">
<el-table <el-table
ref="multipleTable" ref="multipleTable"
:data="tableData" :data="terminalTableData"
tooltip-effect="dark" tooltip-effect="dark"
style="width: 100%" style="width: 100%"
border
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
@row-click="handleRowClick"
> >
<el-table-column type="index" width="55"> </el-table-column> <el-table-column type="index" width="55"> </el-table-column>
<el-table-column type="selection" width="55"> </el-table-column> <el-table-column type="selection" width="55"> </el-table-column>
<el-table-column label="单位"> <el-table-column label="出厂编号">
<template slot-scope="scope">{{ scope.row.date }}</template> <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>
<el-table-column prop="name" label="电话号码"> </el-table-column> <el-table-column prop="hasPan" label="是否带云台">
<el-table-column prop="address" label="网络类型" show-overflow-tooltip> <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>
<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> </el-table>
</div> </div>
<addPhotoDialog
:photoDialog="photoDialog"
:photoDialogTitle="photoDialogTitle"
@photoDialogClose="photoDialogClose"
:formItem="formphotoInfo"
></addPhotoDialog>
</div> </div>
</template> </template>
<script> <script>
import { getTerminalJoggle, deleteTerminalJoggle } from "@/utils/api/index";
import moment from "moment";
import addPhotoDialog from "./components/addPhotoDialog.vue";
export default { export default {
components: {
addPhotoDialog,
},
data() { data() {
return { return {
formInline: { terminalTableData: [], //
user: "", photoDialog: false, //
region: "", photoDialogTitle: "", //
}, deleteArr: [], //
tableData: [ multipleSelection: [], //
{ formphotoInfo: {}, //
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: [],
}; };
}, },
methods: { 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) { //handleAddPhoto
if (rows) { handleAddPhoto() {
rows.forEach((row) => { this.photoDialog = true;
this.$refs.multipleTable.toggleRowSelection(row); this.photoDialogTitle = "新增";
},
//handleRevisePhoto
handleRevisePhoto() {
if (this.multipleSelection.length !== 1) {
this.$message({
showClose: true,
message: "请选择要操作的记录最多只能选择一条!",
type: "warning",
}); });
} else { } 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> </script>
<style lang="less"> <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> <template>
<div class="lineInformation"> <div class="lineInformation">
<div class="lineBtnGroup"> <div class="lineBtnGroup">
<el-button type="primary">新增</el-button> <el-button type="primary" @click="handleAddLine()"></el-button>
<el-button type="primary">批量添加</el-button> <el-button type="primary" @click="handleResive()"></el-button>
<el-button type="primary">修改</el-button> <!-- <el-button type="primary">批量添加</el-button> -->
<el-button type="primary">修改公司</el-button> <el-button type="primary" @click="handleDelete()"></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> </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> </template>
<script> <script>
import { getLineListJoggle, deleteLineJoggle } from "@/utils/api/index";
import addLineDialog from "./components/addLineDialog.vue";
export default { export default {
data() { components: {
return { addLineDialog,
formInline: { },
user: '', data() {
region: '' return {
}, formInline: {
tableData: [ user: "",
{ region: "",
date: '2016-05-03', },
name: '王小虎', lineDialogTitle: "", //
address: '上海市普陀区金沙江路 1518 弄' lineDialog: false,
}, formLineInfo: {}, //
{ lineTableData: [],
date: '2016-05-02', multipleSelection: [], //
name: '王小虎', //
address: '上海市普陀区金沙江路 1518 弄' deleteArr: [],
}, };
{ },
date: '2016-05-04', methods: {
name: '王小虎', //线
address: '上海市普陀区金沙江路 1518 弄' lineList() {
}, getLineListJoggle()
{ .then((res) => {
date: '2016-05-01', console.log(res);
name: '王小虎', this.lineTableData = res.data.list;
address: '上海市普陀区金沙江路 1518 弄' })
}, .catch((err) => {
{ console.log(err); //
date: '2016-05-08', });
name: '王小虎', },
address: '上海市普陀区金沙江路 1518 弄' //
}, handleRowClick(row, column, event) {
{ this.$refs.multipleTable.toggleRowSelection(row);
date: '2016-05-06', // console.log(column, row, event);
name: '王小虎', },
address: '上海市普陀区金沙江路 1518 弄' //
}, handleSelectionChange(val) {
{ this.multipleSelection = val;
date: '2016-05-07', },
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄' //
} handleAddLine() {
], this.lineDialog = true;
multipleSelection: [] 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() { handleDelete() {
console.log('submit!'); if (this.multipleSelection.length == 0) {
}, this.$message({
toggleSelection(rows) { showClose: true,
if (rows) { message: "请选择要操作的记录!",
rows.forEach((row) => { type: "warning",
this.$refs.multipleTable.toggleRowSelection(row); });
}); } else {
} else { console.log(this.multipleSelection);
this.$refs.multipleTable.clearSelection(); for (let i in this.multipleSelection) {
} console.log(i);
}, this.deleteArr.push({
handleSelectionChange(val) { id: this.multipleSelection[i].id,
this.multipleSelection = val; });
} }
} 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> </script>
<style lang="less"> <style lang="less">
.lineInformation { .lineInformation {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: @color-white; background: @color-white;
.lineBtnGroup { .lineBtnGroup {
padding: 16px 8px; padding: 16px 8px;
} }
.searchForm { .searchForm {
padding: 0px 8px; padding: 0px 8px;
.el-form { .el-form {
.el-form-item { .el-form-item {
margin-bottom: 0px; margin-bottom: 0px;
} }
}
}
.lineTable {
padding: 16px 8px 0 8px;
} }
}
.lineTable {
padding: 16px 8px 0 8px;
}
} }
</style> </style>

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

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

Loading…
Cancel
Save