合并代码

master
fanluyan 2 years ago
commit 20016dd74a

11980
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -15,7 +15,6 @@
"moment": "^2.29.4", "moment": "^2.29.4",
"update-element-ui-theme": "^1.0.0", "update-element-ui-theme": "^1.0.0",
"vue": "^2.6.14", "vue": "^2.6.14",
"vue-awesome-swiper": "^3.1.3",
"vue-router": "^3.5.1", "vue-router": "^3.5.1",
"vuex": "^3.6.2" "vuex": "^3.6.2"
}, },
@ -33,6 +32,7 @@
"less": "^4.1.3", "less": "^4.1.3",
"less-loader": "^11.1.0", "less-loader": "^11.1.0",
"style-resources-loader": "^1.5.0", "style-resources-loader": "^1.5.0",
"vue-awesome-swiper": "^3.1.3",
"vue-cli-plugin-style-resources-loader": "^0.1.5", "vue-cli-plugin-style-resources-loader": "^0.1.5",
"vue-template-compiler": "^2.6.14" "vue-template-compiler": "^2.6.14"
}, },

@ -0,0 +1,35 @@
//表格样式
.el-table {
td.el-table__cell,
th.el-table__cell.is-leaf {
border-bottom: 1px solid #ebeef5;
}
.el-table__header-wrapper,
.el-table__fixed-header-wrapper {
border-top: 1px solid #ebeef5;
}
th.el-table__cell {
background: #f8f8f8 !important;
}
.el-button--text {
padding: 0px;
}
.el-button + .el-button,
.el-checkbox.is-bordered + .el-checkbox.is-bordered {
margin-left: 16px;
}
.deleteText {
color: #f56c6c;
}
}
.el-table::before,
.el-table__fixed-right::before,
.el-table__fixed::before {
height: 0px !important;
}
//分页
.pageNation {
margin-top: 8px;
display: flex;
justify-content: flex-end;
}

@ -25,3 +25,10 @@
//阴影 //阴影
@box-shadow-basic: 0 2px 12px 0 rgba(0, 0, 0, 0.1); @box-shadow-basic: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
//网站主题颜色
//欣影橙色色
@orange-color: #f08200;
//电网绿色
@green-color: #00a096;

@ -35,7 +35,7 @@ a {
/* 滚动条上的滚动滑块 */ /* 滚动条上的滚动滑块 */
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
background-color: #49b1f5; background-color: #ccc;
/* 关键代码 */ /* 关键代码 */
border-radius: 32px; border-radius: 32px;
} }

@ -129,11 +129,11 @@
//绿色主题 //绿色主题
.greenStyle { .greenStyle {
.header { .header {
background: #00a096; background: @green-color;
} }
.el-menu { .el-menu {
background: #00a096; background: @green-color;
i { i {
color: @color-white !important; color: @color-white !important;
@ -153,23 +153,23 @@
.el-menu-item:not(.is-disabled):focus, .el-menu-item:not(.is-disabled):focus,
.el-menu-item:not(.is-disabled):hover { .el-menu-item:not(.is-disabled):hover {
color: #00a096; color: @green-color;
background-color: @color-white; background-color: @color-white;
border-bottom: 2px solid @color-white; border-bottom: 2px solid @color-white;
i { i {
color: #00a096 !important; color: @green-color !important;
} }
} }
.el-submenu:focus .el-submenu__title, .el-submenu:focus .el-submenu__title,
.el-submenu:hover .el-submenu__title { .el-submenu:hover .el-submenu__title {
color: #00a096 !important; color: @green-color !important;
background-color: @color-white; background-color: @color-white;
border-bottom: 2px solid @color-white; border-bottom: 2px solid @color-white;
i { i {
color: #00a096 !important; color: @green-color !important;
} }
} }
@ -179,7 +179,7 @@
} }
.sidebar .el-menu--horizontal .el-menu-item.is-active i { .sidebar .el-menu--horizontal .el-menu-item.is-active i {
color: #00a096; color: @green-color;
} }
.sidebar .sidebar
@ -187,124 +187,103 @@
.el-submenu.is-active .el-submenu.is-active
.el-submenu__title .el-submenu__title
> i:first-child { > i:first-child {
color: #00a096; color: @green-color;
} }
.tags-li.active { .tags-li.active {
border: 1px solid #00a096; border: 1px solid @green-color;
background-color: #00a096; background-color: @green-color;
} }
} }
//橙色主题 //橙色主题
.orangeStyle { .orangeStyle {
.header { .header {
background: #f08200; background: @orange-color;
} }
.el-menu { .sidebar {
background: #f08200; .el-menu {
background: @orange-color;
i {
color: @color-white !important;
}
.el-menu-item { i {
color: @color-white; color: @color-white !important;
} }
.el-menu-item.is-active {
color: @color-white;
}
.el-submenu .el-submenu__title { .el-menu-item {
color: @color-white; color: @color-white;
} }
.el-menu-item:not(.is-disabled):focus, .el-menu-item.is-active {
.el-menu-item:not(.is-disabled):hover { color: @color-white;
color: #f08200; }
background-color: @color-white;
border-bottom: 2px solid @color-white;
i { .el-submenu .el-submenu__title {
color: #f08200 !important; color: @color-white;
} }
}
.el-submenu:focus .el-submenu__title, .el-menu-item:not(.is-disabled):focus,
.el-submenu:hover .el-submenu__title { .el-menu-item:not(.is-disabled):hover {
color: #f08200 !important; color: @color-white;
background-color: @color-white; background-color: #f39b33;
border-bottom: 2px solid @color-white; border-bottom: 2px solid #f39b33;
i {
color: @color-white !important;
}
}
.el-submenu:focus .el-submenu__title,
.el-submenu:hover .el-submenu__title {
color: @color-white !important;
background-color: #f39b33;
border-bottom: 2px solid #f39b33;
i {
color: @color-white !important;
}
}
i { .el-submenu.is-active .el-submenu__title {
color: #f08200 !important; color: @color-white;
} }
} }
.el-menu--horizontal > .el-submenu.is-active .el-submenu__title {
.el-submenu.is-active .el-submenu__title { background-color: #f39b33;
color: @color-white; border-bottom: 2px solid #f39b33;
}
.el-menu--horizontal > .el-menu-item.is-active {
background-color: #f39b33;
border-bottom: 2px solid #f39b33;
} }
}
.sidebar .el-menu--horizontal .el-menu-item.is-active i {
color: #f08200;
}
.sidebar
.el-menu--horizontal .el-menu--horizontal
.el-submenu.is-active .el-submenu.is-active
.el-submenu__title .el-submenu__title
> i:first-child { > i:first-child {
color: #f08200; color: @orange-color;
} }
.sideBar {
.el-tree--highlight-current .el-tree--highlight-current
.el-tree-node.is-current .el-tree-node.is-current
> .el-tree-node__content { > .el-tree-node__content {
// 设置颜色 // 设置颜色
color: #fff; color: #fff;
background: #f08200 !important; background: @orange-color !important;
}
.el-menu--horizontal .el-menu-item.is-active i {
color: @orange-color;
} }
} }
.gallery-thumbs .swiper-slide-active { .monitor-container
border: 3px solid #f08200 !important; .sideBar
} .el-tree--highlight-current
.tags-li.active { .el-tree-node.is-current
border: 1px solid #f08200; > .el-tree-node__content {
background-color: #f08200; color: #fff;
background: @orange-color;
} }
}
.el-table { .gallery-thumbs .swiper-slide-active {
.el-table td.el-table__cell, border: 3px solid @orange-color !important;
.el-table th.el-table__cell.is-leaf {
border-bottom: 1px solid #ebeef5;
}
.el-table__header-wrapper,
.el-table__fixed-header-wrapper {
border-top: 1px solid #ebeef5;
}
th.el-table__cell {
background: #f8f8f8;
}
.el-button--text {
padding: 0px;
}
.el-button + .el-button,
.el-checkbox.is-bordered + .el-checkbox.is-bordered {
margin-left: 16px;
} }
.deleteText { .tags-li.active {
color: #f56c6c; border: 1px solid @orange-color;
background-color: @orange-color;
} }
} }
.el-table::before,
.el-table__fixed-right::before,
.el-table__fixed::before {
height: 0px !important;
}
.pageNation {
margin-top: 8px;
display: flex;
justify-content: flex-end;
}

@ -0,0 +1,21 @@
@font-face {
font-family: "iconfont"; /* Project id */
src: url('iconfont.ttf?t=1681806954677') format('truetype');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-dianli:before {
content: "\e649";
}
.icon-dianlihangye:before {
content: "\e791";
}

Binary file not shown.

@ -18,16 +18,7 @@
:value="item.value" :value="item.value"
></el-option> ></el-option>
</el-select> </el-select>
<!-- 全屏显示 -->
<!-- <div class="btn-fullscreen" @click="handleFullScreen">
<el-tooltip
effect="dark"
:content="fullscreen ? `取消全屏` : `全屏`"
placement="bottom"
>
<i class="el-icon-rank"></i>
</el-tooltip>
</div> -->
<!-- 用户头像 --> <!-- 用户头像 -->
<div class="user-avator"> <div class="user-avator">
<img src="../../assets/img/user.jpeg" /> <img src="../../assets/img/user.jpeg" />
@ -39,8 +30,8 @@
<i class="el-icon-caret-bottom"></i> <i class="el-icon-caret-bottom"></i>
</span> </span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="noticeShow">公告</el-dropdown-item> <!-- <el-dropdown-item command="noticeShow">公告</el-dropdown-item>
<el-dropdown-item command="changePwd"> 修改密码</el-dropdown-item> <el-dropdown-item command="changePwd"> 修改密码</el-dropdown-item> -->
<el-dropdown-item command="loginout">退出登录</el-dropdown-item> <el-dropdown-item command="loginout">退出登录</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>

@ -22,6 +22,8 @@ Vue.use(VueAwesomeSwiper /* { 全局组件的默认选项 } */);
import "./assets/css/reset.css"; //默认样式 import "./assets/css/reset.css"; //默认样式
import "./assets/css/theme.less"; //修改主题颜色 import "./assets/css/theme.less"; //修改主题颜色
import "./assets/css/global.less"; //全局定义颜色 import "./assets/css/global.less"; //全局定义颜色
import "./assets/css/element.less"; //全局定义颜色
import "./assets/font/iconfont.css"; //按钮
//引入md5加密 //引入md5加密
import md5 from "js-md5"; import md5 from "js-md5";
@ -30,7 +32,6 @@ Vue.prototype.$md5 = md5;
import moment from "moment"; // 导入文件 import moment from "moment"; // 导入文件
// 注册全局 moment // 注册全局 moment
Vue.prototype.$moment = moment; Vue.prototype.$moment = moment;
Vue.config.productionTip = false; Vue.config.productionTip = false;
new Vue({ new Vue({

@ -115,9 +115,9 @@ export function getTowerList(params) {
//实时监控页面 //实时监控页面
//获取线路树状结构 //获取线路树状结构
export function getLineTreeListJoggle(data) { export function getdyTreeListJoggle(data) {
return request({ return request({
url: "/test/getLineTreeList", url: "/test/getdyTreeList",
method: "post", method: "post",
data, data,
}); });
@ -149,8 +149,40 @@ export function getScheduleRulelListJoggle(data) {
data, data,
}); });
} }
//2.新增任务规则
export function addScheduleRulel(data) {
return request({
url: "/test/addSchelduleRuleList",
method: "post",
data,
});
}
//3.删除任务规则
export function deleteScheduleRulel(data) {
return request({
url: "/test/deleteSchelduleRule",
method: "post",
data,
});
}
//4.修改任务规则
export function updateScheduleRulel(data) {
return request({
url: "/test/updateSchelduleRule",
method: "post",
data,
});
}
//线路信息管理接口数据 //线路信息管理接口数据
//获取电压等级列表
export function getdyListJoggle(data) {
return request({
url: "/test/getdyList",
method: "post",
data,
});
}
//1.线路列表信息 //1.线路列表信息
export function getLineListJoggle(data) { export function getLineListJoggle(data) {
return request({ return request({

@ -38,7 +38,7 @@ const service = axios.create({
// baseURL: '', // baseURL: '',
// timeout: 5000 // timeout: 5000
baseURL: "api", //把原来的项目地址改成api解决跨域问题 baseURL: "api", //把原来的项目地址改成api解决跨域问题
timeout: 3000, timeout: 30000,
}); });
service.interceptors.request.use( service.interceptors.request.use(

@ -6,8 +6,12 @@
:options="swiperOptionTop" :options="swiperOptionTop"
ref="swiperTop" ref="swiperTop"
> >
<swiper-slide class="slide-1" v-for="item in bigImg" :key="item.id"> <swiper-slide
<img :src="item.path" style="width: 100%; height: 100%" alt="" /> class="slide-1"
v-for="item in terminalPhoto"
:key="item.id"
>
<img :src="item.path" style="width: 100%" alt="" />
</swiper-slide> </swiper-slide>
<div <div
class="swiper-button-next swiper-button-white" class="swiper-button-next swiper-button-white"
@ -26,22 +30,22 @@
> >
<swiper-slide <swiper-slide
class="slide" class="slide"
v-for="(item, index) in bigImg" v-for="(item, index) in terminalPhoto"
:key="item.id" :key="item.id"
> >
<img style="width: 100%; height: 100%" :src="item.path" alt="" /> <img style="width: 100%" :src="item.path" alt="" />
<p class="timeInfo"> <p class="timeInfo">
{{ $moment(item.photoTime).format("YYYY-MM-DD HH:mm:ss") }} {{ $moment(item.photoTime).format("YYYY-MM-DD HH:mm:ss") }}
</p> </p>
</swiper-slide> </swiper-slide>
<!-- <div <div
class="swiper-button-next swiper-button-white" class="swiper-button-next swiper-button-white"
slot="button-next" slot="button-next"
></div> ></div>
<div <div
class="swiper-button-prev swiper-button-white" class="swiper-button-prev swiper-button-white"
slot="button-prev" slot="button-prev"
></div> --> ></div>
</swiper> </swiper>
</div> </div>
</template> </template>
@ -65,40 +69,13 @@ export default {
}, },
data() { data() {
return { return {
//
bigImg: [
{
path: "http://180.166.218.222:8104/media/local/XYIGQ10C221000080/210509/XYIGQ10C221000080_21050918190300_1_255.jpg",
id: 0,
},
{
path: "http://180.166.218.222:8104/media/local/XYIGQ10C221000080/202303/XYIGQ10C221000080_20230323100012_1_255_res.jpg",
id: 1,
},
{
path: "http://180.166.218.222:8104/media/local/XYIGQ10C221000080/202303/XYIGQ10C221000080_20230323090012_1_255_res.jpg",
id: 2,
},
{
path: "http://180.166.218.222:8104/media/local/XYIGQ10C221000080/202303/XYIGQ10C221000080_20230323080011_1_255_res.jpg",
id: 3,
},
{
path: "http://180.166.218.222:8104/media/local/XYIGQ10C221000080/202303/XYIGQ10C221000080_20230323070012_1_255_res.jpg",
id: 4,
},
{
path: "http://180.166.218.222:8104/media/local/XYIGQ10C221000080/202303/XYIGQ10C221000080_20230323060012_1_255_res.jpg",
id: 5,
},
],
swiperOptionTop: { swiperOptionTop: {
zoom: true, //zoom: true,//
loop: true, loop: true,
loopedSlides: 5, // looped slides should be the same loopedSlides: 5, // looped slides should be the same
spaceBetween: 10, //spaceBetween: 10,
observer: true, //swiperswiper //observer: true, //swiperswiper
observeParents: true, //swiperswiper //observeParents: true, //swiperswiper
// autoplay: { // autoplay: {
// // // //
// delay: 2000, // delay: 2000,
@ -115,7 +92,7 @@ export default {
spaceBetween: 10, spaceBetween: 10,
centeredSlides: true, centeredSlides: true,
slidesPerView: "auto", slidesPerView: "auto",
touchRatio: 0.2, // touchRatio: 0.2,
slideToClickedSlide: true, slideToClickedSlide: true,
navigation: { navigation: {
nextEl: ".swiper-button-next", nextEl: ".swiper-button-next",
@ -164,6 +141,7 @@ export default {
padding: 4px 0px; padding: 4px 0px;
font-size: 14px; font-size: 14px;
text-align: center; text-align: center;
color: @color-text-primary;
} }
} }
.swiper-slide { .swiper-slide {

@ -1,31 +1,130 @@
<template> <template>
<el-dialog <el-dialog
class="adddeviceDialog" class="addLineDialog"
:title="deviceDialogTitle" :title="title"
:visible.sync="deviceDialog" :visible.sync="isShow"
width="420px" :close-on-click-modal="false"
width="40%"
> >
<p>内容</p> <el-form
label-position="left"
ref="formInfo"
label-width="100px"
:rules="rules"
:model="formdata"
>
<el-form-item label="名称:" prop="name">
<el-input
v-model="formdata.name"
autocomplete="off"
></el-input>
</el-form-item>
<el-form-item label="时间:" prop="time">
<el-time-picker
is-range
v-model="formdata.time"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
value-format="HH:mm:ss">
</el-time-picker>
</el-form-item>
<el-form-item label="间隔:" prop="span">
<!-- <el-input v-model="formdata.span" autocomplete="off" type="number"></el-input> -->
<el-input-number v-model="formdata.span" :min="1" ></el-input-number>
</el-form-item>
<el-form-item label="备注:" prop="remark">
<el-input v-model="formdata.remark" autocomplete="off"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="closeDialog()"> </el-button> <el-button @click="isShow = false"> </el-button>
<el-button type="primary" @click="submitForm()"> </el-button> <el-button type="primary" @click="submitForm()"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { addScheduleRulel, updateScheduleRulel } from "@/utils/api/index";
export default { export default {
props: {}, props: {
title:String
},
data() { data() {
return {}; return {
isShow: false,
formdata: {},
rules: {
name: [
{ required: true, message: "请输入名称", trigger: "blur" },
],
time: [
{ required: true, message: "请选择时间", trigger: "blur" },
],
span: [
{ required: true, message: "请输入间隔", trigger: "blur", },
],
remark: [
{ required: true, message: "请输入备注", trigger: "blur", },
],
}
};
}, },
methods: { methods: {
//
getdataform(val){
console.log(val)
if (val==null) {
return this.formdata = {}
}
this.formdata = val
this.$set(this.formdata,'time',[val.startTime, val.endTime])
},
// //
submitForm() {}, submitForm() {
// this.$refs.formInfo.validate((valid) => {
closeDialog(flag) {}, if (valid) {
this.formdata.startTime=this.formdata.time[0]
this.formdata.endTime=this.formdata.time[1]
delete this.formdata.time
if (this.title == "新增") {
let formArr=[]
formArr.push(this.formdata)
addScheduleRulel({ list: formArr })
.then((res) => {
this.isShow = false
this.$message.success("添加成功");
this.$parent.deviceList()
})
.catch((err) => {
this.$message.error("添加失败");
});
} else {
updateScheduleRulel(this.formdata)
.then((res) => {
this.isShow = false
this.$message.success("修改成功");
this.$parent.deviceList()
})
.catch((err) => {
this.$message.error("修改失败");
});
}
} else {
console.log("error submit!!");
return false;
}
});
},
display() {
this.isShow = true
},
hide() {
this.isShow = false
}
},
mounted() {
}, },
mounted() {},
watch: {},
}; };
</script> </script>

@ -2,7 +2,7 @@
<div class="deviceInformation"> <div class="deviceInformation">
<div class="deviceBox"> <div class="deviceBox">
<div class="deviceBtnGroup"> <div class="deviceBtnGroup">
<el-button type="primary" icon="el-icon-plus" @click="handleAdddevice()" <el-button type="primary" icon="el-icon-plus" @click.native.stop="handleAdddevice()"
>新增</el-button >新增</el-button
> >
</div> </div>
@ -71,38 +71,42 @@
</div> </div>
</div> </div>
<!-- 新增线路 --> <!-- 新增线路 -->
<adddeviceDialog :title="title" ref="adddeviceDialogref" ></adddeviceDialog>
</div> </div>
</template> </template>
<script> <script>
import { getScheduleRulelListJoggle } from "@/utils/api/index"; import { getScheduleRulelListJoggle,deleteScheduleRulel } from "@/utils/api/index";
import adddeviceDialog from "./components/adddeviceDialog.vue";
export default { export default {
components: {}, components: {
adddeviceDialog
},
data() { data() {
return { return {
deviceDialogTitle: "", // title: "", //
deviceDialog: false,
formdeviceInfo: {}, //
deviceTableData: [], deviceTableData: [],
//multipleSelection: [], // //multipleSelection: [], //
//
deleteArr: [],
page: 1, // page: 1, //
pageSize: 20, // pageSize: 10, //
total: 0, // total: 0, //
}; };
}, },
created() {
this.deviceList();
},
methods: { methods: {
//线 //线
deviceList() { deviceList() {
getScheduleRulelListJoggle() getScheduleRulelListJoggle({
pageindex: this.page,
pagesize: this.pageSize
})
.then((res) => { .then((res) => {
console.log(res);
this.deviceTableData = res.data.list; this.deviceTableData = res.data.list;
this.total = res.data.total
}) })
.catch((err) => { .catch((err) => {});
console.log(err); //
});
}, },
// //
handleRowClick(row, column, event) { handleRowClick(row, column, event) {
@ -115,25 +119,45 @@ export default {
// //
handleAdddevice() { handleAdddevice() {
this.deviceDialog = true; this.title = "新增";
this.deviceDialogTitle = "新增"; this.$refs.adddeviceDialogref.display()
this.$refs.adddeviceDialogref.getdataform(null)
}, },
//handleResive 线 //handleResive 线
handleResive(data) {}, handleResive(data) {
this.title = "修改";
this.$refs.adddeviceDialogref.display()
this.$refs.adddeviceDialogref.getdataform(data)
},
// //
handleDelete() {}, handleDelete(data) {
let deleteArr=[]
deleteArr.push({
id: data.id,
});
this.$confirm("确定要删除记录吗,同时删除关联关系?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
deleteScheduleRulel({ list: deleteArr }).then((res) => {
this.deviceList(); //
});
this.$message({ type: "success", message: "删除成功!" });
})
.catch(() => {
this.$message({ type: "info", message: "已取消删除" });
});
},
// //
handleCurrentChange(val) { handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.page = val; this.page = val;
//this.getTableList(); this.deviceList();
}, },
}, }
created() {
this.deviceList();
},
}; };
</script> </script>
<style lang="less"> <style lang="less">

@ -88,7 +88,44 @@ export default {
data() { data() {
return { return {
formInfo: {}, formInfo: {},
rules: {}, rules: {
bsIdentifier: [
{ required: true, message: "请输入公司名称", trigger: "blur" },
],
bsManufacturer: [
{ required: true, message: "请输入公司名称", trigger: "blur" },
],
bsProductionDate: [
{ required: true, message: "请输入公司名称", trigger: "blur" },
],
cmdid: [{ required: true, message: "请输入公司名称", trigger: "blur" }],
displayName: [
{ required: true, message: "请输入公司名称", trigger: "blur" },
],
equipName: [
{ required: true, message: "请输入公司名称", trigger: "blur" },
],
essentialInfoVersion: [
{ required: true, message: "请输入公司名称", trigger: "blur" },
],
hasPan: [
{ required: true, message: "请输入公司名称", trigger: "blur" },
],
latitude: [
{ required: true, message: "请输入公司名称", trigger: "blur" },
],
lineid: [
{ required: true, message: "请输入公司名称", trigger: "blur" },
],
longitude: [
{ required: true, message: "请输入公司名称", trigger: "blur" },
],
model: [{ required: true, message: "请输入公司名称", trigger: "blur" }],
orgId: [{ required: true, message: "请输入公司名称", trigger: "blur" }],
towerid: [
{ required: true, message: "请输入公司名称", trigger: "blur" },
],
},
// //
formArr: [], formArr: [],
}; };
@ -116,15 +153,14 @@ export default {
}; };
this.formArr.push(formObj); this.formArr.push(formObj);
console.log(this.formArr); console.log(this.formArr);
// //
if (this.photoDialogTitle == "新增") { if (this.photoDialogTitle == "新增") {
addTerminalJoggle({ list: this.formArr }) addTerminalJoggle({ list: this.formArr })
.then((res) => { .then((res) => {
console.log(res); console.log(res);
this.$emit("photoDialogClose", 1); // this.$emit("photoDialogClose", 1); //
this.formArr = [];
this.$message.success("添加成功"); this.$message.success("添加成功");
this.$refs.formPhotoInfo.resetFields();
}) })
.catch((err) => { .catch((err) => {
console.log(err); // console.log(err); //

@ -1,156 +1,110 @@
<template> <template>
<div class="photoGraphicDevice"> <div class="photoGraphicDevice">
<div class="photoGraphicBtnGroup"> <div class="photoBox">
<el-button type="primary" @click="handleAddPhoto()"></el-button> <div class="photoGraphicBtnGroup">
<el-button type="primary" @click="handleRevisePhoto()"></el-button> <el-button type="primary" icon="el-icon-plus" @click="handleAddPhoto()"
<el-button type="primary" @click="handleDelete()"></el-button> >新增</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-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="GT名称:">
<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="质保到期日:">
<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="装置类型:">
<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="状态:">
<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="设备编号:">
<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="单位:">
<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="网络类型:">
<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="状态:">
<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="电话号码:">
<el-input v-model="formInline.user" placeholder="审批人"></el-input>
</el-form-item>
</el-form>
</div> -->
<div class="photoGraphicTable">
<el-table
ref="multipleTable"
:data="terminalTableData"
tooltip-effect="dark"
style="width: 100%"
height="calc(100% - 40px)"
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.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> </div>
<el-table-column <div class="photoGraphicTable">
prop="createTime" <el-table
label="创建时间" ref="multipleTable"
:show-overflow-tooltip="true" :data="terminalTableData"
:formatter="dateFormat" tooltip-effect="dark"
style="width: 100%"
height="calc(100% - 40px)"
@selection-change="handleSelectionChange"
@row-click="handleRowClick"
> >
</el-table-column> <!-- <el-table-column type="index" width="55"> </el-table-column>
<el-table-column prop="displayName" label="显示名"> </el-table-column> <el-table-column type="selection" width="55"> </el-table-column> -->
<el-table-column prop="equipName" label="装置名称"> </el-table-column> <el-table-column prop="displayName" label="显示名"> </el-table-column>
<el-table-column prop="essentialInfoVersion" label="装置基本信息版本号"> <el-table-column prop="equipName" label="装置名称"> </el-table-column>
</el-table-column> <el-table-column
<el-table-column prop="hasPan" label="是否带云台"> prop="cmdid"
<template slot-scope="scope"> label="图像监测装置ID"
<span v-if="scope.row.hasPan == 0"></span> show-overflow-tooltip
<span v-if="scope.row.hasPan == 1"></span> width="120px"
</template> >
</el-table-column> </el-table-column>
<el-table-column prop="latitude" label="维度"> </el-table-column> <el-table-column
<el-table-column prop="lineid" label="线路编号"> </el-table-column> prop="essentialInfoVersion"
<el-table-column prop="longitude" label="经度"> </el-table-column> label="装置基本信息版本号"
<el-table-column prop="model" label="装置型号"> </el-table-column> width="140px"
<el-table-column prop="orgId" label="原始ID"> </el-table-column> >
<el-table-column prop="towerid" label="杆塔编号"> </el-table-column> </el-table-column>
<el-table-column <el-table-column prop="lineid" label="线路编号"> </el-table-column>
prop="updateTime" <el-table-column prop="model" label="装置型号"> </el-table-column>
label="修改时间" <el-table-column prop="orgId" label="原始ID"> </el-table-column>
:show-overflow-tooltip="true" <el-table-column prop="towerid" label="杆塔编号"> </el-table-column>
:formatter="dateFormat" <el-table-column label="出厂编号">
> <template slot-scope="scope">{{ scope.row.bsIdentifier }}</template>
</el-table-column> </el-table-column>
<el-table-column fixed="right" label="操作" width="200"> <el-table-column prop="bsManufacturer" label="生产厂家">
<template slot-scope="scope"> </el-table-column>
<el-button @click="handleClick(scope.row)" type="text" <el-table-column
>修改</el-button prop="bsProductionDate"
> label="生产日期"
<el-button type="text">删除</el-button> :show-overflow-tooltip="true"
</template> :formatter="dateFormat"
</el-table-column> width="140px"
</el-table> >
</el-table-column>
<el-table-column
prop="createTime"
label="创建时间"
:show-overflow-tooltip="true"
:formatter="dateFormat"
width="140px"
>
</el-table-column>
<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="longitude" label="经度"> </el-table-column> -->
<el-table-column
prop="updateTime"
label="修改时间"
:show-overflow-tooltip="true"
:formatter="dateFormat"
width="140px"
>
</el-table-column>
<el-table-column fixed="right" label="操作" width="200">
<template slot-scope="scope">
<el-button
@click.native.stop="handleRevisePhoto(scope.row)"
type="text"
>修改</el-button
>
<el-button
type="text"
class="deleteText"
@click.native.stop="handleDelete(scope.row)"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<div class="pageNation">
<el-pagination
@current-change="handleCurrentChange"
:current-page="page"
:page-size="pageSize"
layout=" prev, pager, next, jumper,total"
:total="total"
background
>
</el-pagination>
</div>
</div>
</div> </div>
<addPhotoDialog <addPhotoDialog
:photoDialog="photoDialog" :photoDialog="photoDialog"
@ -176,15 +130,22 @@ export default {
deleteArr: [], // deleteArr: [], //
multipleSelection: [], // multipleSelection: [], //
formphotoInfo: {}, // formphotoInfo: {}, //
page: 1, //
pageSize: 20, //
total: 0, //
}; };
}, },
methods: { methods: {
//// ////
terminalList() { terminalList(page, pageSize) {
getTerminalJoggle() getTerminalJoggle({
pageindex: page,
pagesize: pageSize,
})
.then((res) => { .then((res) => {
console.log(res); console.log(res);
this.terminalTableData = res.data.list; this.terminalTableData = res.data.list;
this.total = res.data.total;
}) })
.catch((err) => { .catch((err) => {
console.log(err); // console.log(err); //
@ -193,7 +154,6 @@ export default {
// //
handleRowClick(row, column, event) { handleRowClick(row, column, event) {
this.$refs.multipleTable.toggleRowSelection(row); this.$refs.multipleTable.toggleRowSelection(row);
// console.log(column, row, event);
}, },
// //
handleSelectionChange(val) { handleSelectionChange(val) {
@ -214,72 +174,60 @@ export default {
this.photoDialogTitle = "新增"; this.photoDialogTitle = "新增";
}, },
//handleRevisePhoto //handleRevisePhoto
handleRevisePhoto() { handleRevisePhoto(data) {
if (this.multipleSelection.length !== 1) { this.photoDialog = true;
this.$message({ this.photoDialogTitle = "修改";
showClose: true, this.formphotoInfo = Object.assign({}, data);
message: "请选择要操作的记录最多只能选择一条!",
type: "warning",
});
} else {
this.photoDialog = true;
this.photoDialogTitle = "修改";
console.log(this.multipleSelection);
this.formphotoInfo = Object.assign({}, this.multipleSelection[0]);
}
}, },
// //
photoDialogClose(flag) { photoDialogClose(flag) {
if (flag) { if (flag) {
// //
this.terminalList(); this.terminalList(this.page, this.pageSize);
} }
this.photoDialog = false; this.photoDialog = false;
this.formphotoInfo = {};
}, },
// //
handleDelete() { handleDelete(data) {
if (this.multipleSelection.length == 0) { console.log(data);
this.$message({ this.deleteArr.push({
showClose: true, termid: data.id,
message: "请选择要操作的记录!", });
type: "warning", console.log(this.deleteArr);
}); this.$confirm("确定要删除记录吗,同时删除关联关系?", "提示", {
} else { confirmButtonText: "确定",
console.log(this.multipleSelection); cancelButtonText: "取消",
for (let i in this.multipleSelection) { type: "warning",
console.log(i); })
this.deleteArr.push({ .then(() => {
id: this.multipleSelection[i].id, //
deleteTerminalJoggle({ list: this.deleteArr }).then((res) => {
console.log(res);
this.terminalList(this.page, this.pageSize); //
});
this.$message({
type: "success",
message: "删除成功!",
}); });
}
console.log(this.deleteArr);
this.$confirm("确定要删除记录吗,同时删除关联关系?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}) })
.then(() => { .catch(() => {
// this.$message({
deleteTerminalJoggle({ list: this.deleteArr }).then((res) => { type: "info",
console.log(res); message: "已取消删除",
this.terminalList(); //
});
this.$message({
type: "success",
message: "删除成功!",
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
}); });
} });
},
//
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.page = val;
this.terminalList(val, this.pageSize); //
//this.getTableList();
}, },
}, },
created() { created() {
this.terminalList(); this.terminalList(this.page, this.pageSize);
}, },
}; };
</script> </script>
@ -288,20 +236,24 @@ export default {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: @color-white; background: @color-white;
.photoGraphicBtnGroup { width: calc(100% - 16px);
padding: 16px 8px; height: calc(100% - 32px);
padding: 16px 8px;
background: @color-white;
.photoBox {
border: 1px solid #dddddd;
height: calc(100% - 32px);
padding: 16px;
border-radius: 4px;
} }
.searchForm { .photoGraphicBtnGroup {
padding: 0px 8px; display: flex;
.el-form { justify-content: flex-end;
.el-form-item {
margin-bottom: 0px;
}
}
} }
.photoGraphicTable { .photoGraphicTable {
padding: 16px 8px 0 8px; margin-top: 16px;
height: calc(100% - 80px); height: calc(100% - 48px);
} }
} }
</style> </style>

@ -19,10 +19,14 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="DY等级" prop="dyLevel"> <el-form-item label="DY等级" prop="dyLevel">
<el-input <el-select v-model="lineForm.dyLevelid" placeholder="请选择电压等级">
v-model.number="lineForm.dyLevel" <el-option
autocomplete="off" v-for="items in dyOptions"
></el-input> :key="items.id"
:label="items.name"
:value="items.id"
></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="线路名称:" prop="name"> <el-form-item label="线路名称:" prop="name">
<el-input v-model="lineForm.name" autocomplete="off"></el-input> <el-input v-model="lineForm.name" autocomplete="off"></el-input>
@ -35,7 +39,12 @@
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { addLineJoggle, updateLineJoggle } from "@/utils/api/index"; import {
addLineJoggle,
updateLineJoggle,
getdyListJoggle,
} from "@/utils/api/index";
export default { export default {
props: { props: {
lineDialog: { lineDialog: {
@ -56,11 +65,12 @@ export default {
data() { data() {
return { return {
lineForm: {}, lineForm: {},
dyOptions: "",
rules: { rules: {
bsManufacturer: [ bsManufacturer: [
{ required: true, message: "请输入公司名称", trigger: "blur" }, { required: true, message: "请输入公司名称", trigger: "blur" },
], ],
dyLevel: [ dyLevelid: [
{ required: true, message: "请选择DY等级", trigger: "blur" }, { required: true, message: "请选择DY等级", trigger: "blur" },
{ type: "number", message: "DY等级数字值" }, { type: "number", message: "DY等级数字值" },
], ],
@ -81,9 +91,10 @@ export default {
submitForm() { submitForm() {
this.$refs.formLineInfo.validate((valid) => { this.$refs.formLineInfo.validate((valid) => {
if (valid) { if (valid) {
console.log(this.lineForm);
let formObj = { let formObj = {
bsManufacturer: this.lineForm.bsManufacturer, bsManufacturer: this.lineForm.bsManufacturer,
dyLevel: this.lineForm.dyLevel, dyLevelid: this.lineForm.dyLevelid,
name: this.lineForm.name, name: this.lineForm.name,
}; };
this.formArr.push(formObj); this.formArr.push(formObj);
@ -95,6 +106,7 @@ export default {
.then((res) => { .then((res) => {
console.log(res); console.log(res);
this.$emit("lineDialogClose", 1); // this.$emit("lineDialogClose", 1); //
this.formArr = [];
this.$message.success("添加成功"); this.$message.success("添加成功");
}) })
.catch((err) => { .catch((err) => {
@ -104,7 +116,7 @@ export default {
} else if (this.lineDialogTitle == "修改") { } else if (this.lineDialogTitle == "修改") {
let changeformObj = { let changeformObj = {
bsManufacturer: this.lineForm.bsManufacturer, bsManufacturer: this.lineForm.bsManufacturer,
dyLevel: this.lineForm.dyLevel, dyLevelid: this.lineForm.dyLevelid,
name: this.lineForm.name, name: this.lineForm.name,
id: this.lineForm.id, id: this.lineForm.id,
}; };
@ -133,7 +145,7 @@ export default {
}, },
mounted() { mounted() {
console.log("打印传过来的对象", this.formItem); console.log("打印传过来的对象", this.formItem);
console.log("打印传过来的对象", this.formItem.bsIdentifier); console.log("打印传过来的对象", this.formItem.bsManufacturer);
this.lineForm = JSON.parse(JSON.stringify(this.formItem)); this.lineForm = JSON.parse(JSON.stringify(this.formItem));
}, },
watch: { watch: {
@ -148,5 +160,19 @@ export default {
deep: true, deep: true,
}, },
}, },
created() {
getdyListJoggle().then((res) => {
console.log(res);
this.dyOptions = res.data.list;
console.log(this.dyOptions);
});
},
}; };
</script> </script>
<style lang="less">
.addLineDialog {
.el-select {
width: 100%;
}
}
</style>

@ -27,25 +27,33 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="id" prop="id"
label="线路id" label="线路编号"
show-overflow-tooltip show-overflow-tooltip
min-width="120" min-width="120"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="name" prop="name"
label="XL名称" label="线路名称"
min-width="120" min-width="120"
show-overflow-tooltip show-overflow-tooltip
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="dyLevel" prop="status"
label="DY等级" label="线路状态"
min-width="120"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop="dyLevelname"
label="电压等级名称"
show-overflow-tooltip show-overflow-tooltip
min-width="120" min-width="120"
> >
</el-table-column> </el-table-column>
<el-table-column fixed="right" label="操作" width="200"> <el-table-column fixed="right" label="操作" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -102,17 +110,21 @@ export default {
// //
deleteArr: [], deleteArr: [],
page: 1, // page: 1, //
pageSize: 20, // pageSize: 10, //
total: 0, // total: 0, //
}; };
}, },
methods: { methods: {
//线 //线
lineList() { lineList(page, pageSize) {
getLineListJoggle() getLineListJoggle({
pageindex: page,
pagesize: pageSize,
})
.then((res) => { .then((res) => {
console.log(res); console.log(res);
this.lineTableData = res.data.list; this.lineTableData = res.data.list;
this.total = res.data.total;
}) })
.catch((err) => { .catch((err) => {
console.log(err); // console.log(err); //
@ -145,7 +157,7 @@ export default {
lineDialogClose(flag) { lineDialogClose(flag) {
if (flag) { if (flag) {
// //
this.lineList(); this.lineList(this.page, this.pageSize);
} }
this.lineDialog = false; this.lineDialog = false;
this.formLineInfo = {}; this.formLineInfo = {};
@ -166,7 +178,7 @@ export default {
// //
deleteLineJoggle({ list: this.deleteArr }).then((res) => { deleteLineJoggle({ list: this.deleteArr }).then((res) => {
console.log(res); console.log(res);
this.lineList(); // this.lineList(this.page, this.pageSize);
}); });
this.$message({ this.$message({
type: "success", type: "success",
@ -184,11 +196,11 @@ export default {
handleCurrentChange(val) { handleCurrentChange(val) {
console.log(`当前页: ${val}`); console.log(`当前页: ${val}`);
this.page = val; this.page = val;
//this.getTableList(); this.lineList(val, this.pageSize);
}, },
}, },
created() { created() {
this.lineList(); this.lineList(this.page, this.pageSize);
}, },
}; };
</script> </script>

@ -4,7 +4,6 @@
<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 <el-tree
:data="lineTreeData" :data="lineTreeData"
:props="defaultProps" :props="defaultProps"
@ -16,13 +15,12 @@
:current-node-key="currentNodekey" :current-node-key="currentNodekey"
> >
<span class="custom-tree-node" slot-scope="{ node, data }"> <span class="custom-tree-node" slot-scope="{ node, data }">
<span v-if="data.list" class="el-icon-folder"> </span> <span v-if="data.list" class="iconfont icon-dianli"> </span>
<span <span
v-else v-else
class="el-icon-document" class="iconfont icon-dianlihangye"
style="margin-right: 3px" style="margin-right: 3px"
></span> ></span>
<span>{{ node.label }}</span> <span>{{ node.label }}</span>
</span> </span>
</el-tree> </el-tree>
@ -43,11 +41,13 @@
v-model="dateValue" v-model="dateValue"
type="date" type="date"
placeholder="选择日期" placeholder="选择日期"
value-format="timestamp"
@change="changedate"
> >
</el-date-picker> </el-date-picker>
</div> </div>
<div class="monitorItemBox"> <div class="monitorItemBox">
<h3>检测项 通道</h3> <h3>通道</h3>
<el-select <el-select
v-model="channelValue" v-model="channelValue"
placeholder="请选择" placeholder="请选择"
@ -70,7 +70,7 @@
<script> <script>
import { import {
getLineTreeListJoggle, getdyTreeListJoggle,
getChannelListJoggle, getChannelListJoggle,
getTerminalPhotoListJoggle, getTerminalPhotoListJoggle,
} from "@/utils/api/index"; } from "@/utils/api/index";
@ -110,39 +110,70 @@ export default {
mounted() {}, mounted() {},
created() { created() {
this.getLineTreeList(); this.getLineTreeList();
this.getDateTime();
console.log(this.dateValue);
}, },
methods: { methods: {
//
getDateTime() {
this.dateValue = new Date().getTime();
},
//
changedate() {
console.log(this.dateValue);
console.log(this.channelList);
this.getTerminalPhotoList(
this.channelList[0].id,
this.dateValue,
this.channelList[0].termId
);
},
// //
getLineTreeList() { getLineTreeList() {
getLineTreeListJoggle() getdyTreeListJoggle()
.then((res) => { .then((res) => {
console.log(res); console.log(res);
this.lineTreeData = res.data.list; this.lineTreeData = res.data.list;
console.log(this.lineTreeData); console.log(this.lineTreeData[0].list[0].list);
if (this.lineTreeData.length > 0) { if (this.lineTreeData[0].list[0].list.length > 0) {
this.currentNodekey = this.lineTreeData[0].id; // this.currentNodekey = this.lineTreeData[0].list[0].list[0].id; //
console.log(this.currentNodekey);
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.currentNodekey); // this.$refs.tree.setCurrentKey(this.currentNodekey); //
console.log(this.currentNodekey); console.log(this.currentNodekey);
this.channelId = this.currentNodekey; this.channelId = this.currentNodekey;
this.getChannelList(this.channelId); console.log(this.channelId);
}); });
} }
}) })
.catch((err) => { .catch((err) => {
console.log(err); // console.log(err); //
}); });
this.getChannelList(this.channelId); //id
}, },
//tree
handleNodeClick(data, node) {
console.log(data, node);
if (data.list) {
this.$refs.tree.setCurrentKey(data.list[0].id);
}
this.channelId = data.id; //id
this.getChannelList(this.channelId); //id
},
// //
getChannelList(id) { getChannelList(id) {
getChannelListJoggle({ termid: id }) getChannelListJoggle({ termid: id })
.then((res) => { .then((res) => {
console.log(res); console.log(res);
this.channelList = res.data.list; this.channelList = res.data.list;
console.log(this.channelList);
this.getTerminalPhotoList( this.getTerminalPhotoList(
this.channelList[0].id, this.channelList[0].id,
this.dateValue,
this.channelList[0].termId this.channelList[0].termId
); // id termid ); // id termid
this.channelOption = [];
this.channelList.forEach((item) => { this.channelList.forEach((item) => {
this.channelOption.push({ this.channelOption.push({
label: item.channelName, label: item.channelName,
@ -158,11 +189,11 @@ export default {
}); });
}, },
// //
getTerminalPhotoList(id, termId) { getTerminalPhotoList(id, date, termId) {
console.log(id, date, termId);
getTerminalPhotoListJoggle({ getTerminalPhotoListJoggle({
channelid: id, channelid: id,
pageindex: 1, time: date,
pagesize: 100,
terminalid: termId, terminalid: termId,
}) })
.then((res) => { .then((res) => {
@ -182,16 +213,7 @@ export default {
return i.value === val; return i.value === val;
}); });
console.log(channelObj); console.log(channelObj);
this.getTerminalPhotoList(val, channelObj.termid); this.getTerminalPhotoList(val, this.dateValue, channelObj.termid);
},
//tree
handleNodeClick(data, node) {
console.log(data, node);
if (data.list) {
this.$refs.tree.setCurrentKey(data.list[0].id);
}
this.channelId = data.id; //id
this.getChannelList(this.channelId);
}, },
}, },
}; };

@ -1,95 +1,96 @@
<template> <template>
<div id="container"></div> <div id="container"></div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
// map 使 this.map // map 使 this.map
//map:null, //map:null,
adcode: '310000', adcode: "310000",
dep: 2 dep: 2,
}; };
},
methods: {
initMap() {
AMapLoader.load({
key: "9a18085d520884e61312cba93787a8f2", // WebKey load
version: "2.0", // JSAPI 1.4.15
plugins: ["AMap.MapType"], // 使'AMap.Scale'
})
.then((AMap) => {
this.map = new AMap.Map("container", {
//id
center: [121.43333, 31.2],
layers: [
AMap.createDefaultLayer(), //
],
zoom: 9.5,
});
this.map.addControl(new AMap.MapType()); //
//console.log(AMap.DistrictLayer.Province);
var disProvince = new AMap.DistrictLayer.Province({
zIndex: 12,
adcode: ["310000"],
depth: 2,
styles: {
fill: "rgba(161,207,251,0.5)",
"province-stroke": "blue",
"city-stroke": "white", //
"county-stroke": "blue", //
},
});
disProvince.setMap(this.map);
//this.map.addControl(new AMap.DistrictSearch()); //citycodeadcode
this.map.on("click", function (ev) {
var px = ev.pixel;
var props = disProvince.getDistrictByContainerPos(px); //
//console.log(props);
//disProvince.setDistricts(props.adcode + ''); //
var NAME_CHN = props.NAME_CHN;
disProvince.setStyles({
// 线
//nation-stroke': nationStroke,
// 线
//'coastline-stroke': '',
"province-stroke": "blue",
"city-stroke": "white", //
"county-stroke": "blue", //
fill: function (props) {
return props.NAME_CHN == NAME_CHN
? "rgba(161,207,251,0.8)"
: "rgba(161,207,251,0.5)";
},
});
});
})
.catch((e) => {
console.log(e);
});
}, },
methods: { },
initMap() { mounted() {
AMapLoader.load({ //DOM
key: '9a18085d520884e61312cba93787a8f2', // WebKey load this.initMap();
version: '2.0', // JSAPI 1.4.15 },
plugins: ['AMap.MapType'] // 使'AMap.Scale'
})
.then((AMap) => {
this.map = new AMap.Map('container', {
//id
center: [121.43333, 31.2],
layers: [
AMap.createDefaultLayer() //
],
zoom: 9.5
});
this.map.addControl(new AMap.MapType()); //
//console.log(AMap.DistrictLayer.Province);
var disProvince = new AMap.DistrictLayer.Province({
zIndex: 12,
adcode: ['310000'],
depth: 2,
styles: {
fill: 'rgba(161,207,251,0.5)',
'province-stroke': 'blue',
'city-stroke': 'white', //
'county-stroke': 'blue' //
}
});
disProvince.setMap(this.map);
//this.map.addControl(new AMap.DistrictSearch()); //citycodeadcode
this.map.on('click', function (ev) {
var px = ev.pixel;
var props = disProvince.getDistrictByContainerPos(px); //
//console.log(props);
//disProvince.setDistricts(props.adcode + ''); //
var NAME_CHN = props.NAME_CHN;
disProvince.setStyles({
// 线
//nation-stroke': nationStroke,
// 线
//'coastline-stroke': '',
'province-stroke': 'blue',
'city-stroke': 'white', //
'county-stroke': 'blue', //
fill: function (props) {
return props.NAME_CHN == NAME_CHN ? 'rgba(161,207,251,0.8)' : 'rgba(161,207,251,0.5)';
}
});
});
})
.catch((e) => {
console.log(e);
});
}
},
mounted() {
//DOM
this.initMap();
}
}; };
</script> </script>
<style lang="less"> <style lang="less">
#container { #container {
padding: 0px; padding: 0px;
margin: 0px; margin: 0px;
width: 100%; width: 100%;
height: 100%; height: 100%;
.amap-logo { .amap-logo {
display: none; display: none;
opacity: 0 !important; opacity: 0 !important;
} }
.amap-copyright { .amap-copyright {
opacity: 0; opacity: 0;
display: none; display: none;
} }
.amap-ctrl-overlay-layer { .amap-ctrl-overlay-layer {
display: none; display: none;
} }
} }
</style> </style>

@ -3,6 +3,7 @@ const path = require("path");
module.exports = defineConfig({ module.exports = defineConfig({
productionSourceMap: false, // 生产环境是否要生成 sourceMap productionSourceMap: false, // 生产环境是否要生成 sourceMap
publicPath: process.env.PUBLIC_PATH ? process.env.PUBLIC_PATH : "./", // 部署应用包时的基本 URL publicPath: process.env.PUBLIC_PATH ? process.env.PUBLIC_PATH : "./", // 部署应用包时的基本 URL
//assetsPublicPath: process.env.NODE_ENV === "production" ? "" : "/",
outputDir: "dist", // 打包时输出的文件目录 outputDir: "dist", // 打包时输出的文件目录
assetsDir: "static", // 放置静态文件夹目录 assetsDir: "static", // 放置静态文件夹目录
transpileDependencies: true, transpileDependencies: true,
@ -18,16 +19,17 @@ module.exports = defineConfig({
}, },
devServer: { devServer: {
proxy: { proxy: {
'/api': {//表示拦截以/api开头的请求路径 "/api": {
//表示拦截以/api开头的请求路径
//表示拦截以/api开头的请求路径 //表示拦截以/api开头的请求路径
//target: 'http://localhost:1234', //本地nodejs服务器 //target: 'http://localhost:1234', //本地nodejs服务器
target: "http://47.96.238.157:8093", //公司项目服务器环境 target: "http://47.96.238.157:8093", //公司项目服务器环境
//target: 'http://180.166.218.222:7200', //target: 'http://180.166.218.222:7200',
changOrigin: true, //是否开启跨域 changOrigin: true, //是否开启跨域
pathRewrite: { pathRewrite: {
'^/api': '' //重写api把api变成空字符因为我们真正请求的路径是没有api的 "^/api": "", //重写api把api变成空字符因为我们真正请求的路径是没有api的
} },
} },
// [process.env.VUE_APP_BASE_API]: { // [process.env.VUE_APP_BASE_API]: {
// //表示拦截以/api开头的请求路径 // //表示拦截以/api开头的请求路径
// //target: 'http://localhost:1234', //本地nodejs服务器 // //target: 'http://localhost:1234', //本地nodejs服务器

Loading…
Cancel
Save