Commit 7ebcef20 authored by yanzhongrong's avatar yanzhongrong

Merge branch 'dev_yzr' into dev

parents e6f3c517 0bcda9e7
......@@ -77,13 +77,14 @@ export default {
},
],
data: [],
isOpen: false,
isOpen: true,
openOrNot: true,
defaultProps: {
children: "children",
label: "label",
},
loading: false,
treeClickCount: 0
};
},
name: "org-tree",
......@@ -101,8 +102,22 @@ export default {
this.openOrNot = true;
}, 10);
},
handleClick(data) {
this.$emit("selectItem", data);
handleClick(data, node) {
this.treeClickCount++;
if (this.treeClickCount >= 2) {
return
}
this.timer = window.setTimeout(() => {
if (this.treeClickCount == 1) {
this.treeClickCount = 0;
this.$emit("selectItem", data);
} else if (this.treeClickCount > 1) {
//把次数归零
this.treeClickCount = 0;
this.$emit('dblClick', data, node)
}
}, 300)
},
getInit() {
this.loading = true;
......
......@@ -105,5 +105,5 @@
.el-scrollbar__wrap {
overflow: scroll;
width: 110%;
height: 100%;
height: 98%;
}
\ No newline at end of file
......@@ -4,6 +4,7 @@ import store from '@/store'
import { getToken } from '@/utils/auth'
import socket from "@/utils/websocket";
import Vue from 'vue'
import EventBus from '@/utils/bus'
// create an axios instance
const service = axios.create({
......
......@@ -51,23 +51,29 @@
prop="alarmInfo"
label="告警信息"
align="center"
width="160"
>
<template slot-scope="scope">
<div v-for="(item, index) in scope.row.alarmInfo" :key="index">
<span>距离:{{ item.distance }}</span>
<span>驻波比:{{ item.value }}</span>
</div>
<div>漏缆百米损耗: {{ scope.row.lossValue }}</div>
</template>
</el-table-column>
<el-table-column
prop="lateUploadTime"
label="最新上传时间"
align="center"
width="105"
width="200"
/>
<el-table-column
prop="statusTimeChange"
label="状态变化时间"
align="center"
width="105"
width="200"
/>
<el-table-column prop="confirmPerson" label="确认人" align="center" width="100" />
<el-table-column prop="confirmTime" label="确认时间" align="center" />
<el-table-column prop="confirmPerson" label="确认人" width="100" align="center" />
<el-table-column prop="confirmTime" label="确认时间" width="180" align="center" />
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button
......@@ -181,7 +187,7 @@ import { successAlert, warningAlert } from "@/utils/alert";
export default {
data() {
return {
confirmStatus: 2,
confirmStatus: 1,
dialogInfo: [],
centerDialogVisible: false,
params: {
......@@ -191,11 +197,6 @@ export default {
total: 10,
tableData: [],
tabs: [
// 1:已确认,0:未确认
{
label: "全部",
key: 2,
},
{
label: "已确认",
key: 1,
......@@ -244,14 +245,19 @@ export default {
this.getTableData();
},
getTableData() {
let type = this.confirmStatus == 2 ? "" : this.confirmStatus;
let param = {
confirmStatus: type,
confirmStatus: this.confirmStatus,
...this.params,
...this.searchOption,
};
cableTimeList(param).then((res) => {
let list = res.records || [];
list.forEach(item => {
if(item.alarmInfo != '') {
item.alarmInfo = JSON.parse(item.alarmInfo)
item.lossValue = eval(item.alarmInfo.map(k => k.lossValue).join('+'))
}
});
this.tableData = list;
this.total = res.total;
this.exids = list.map((i) => i.id);
......@@ -296,12 +302,6 @@ export default {
},
exportList() {
let type = this.confirmStatus == 2 ? "" : this.confirmStatus;
let param = {
confirmStatus: type,
...this.params,
...this.searchOption,
};
if (this.exids.length == 0) {
this.$message.warning("暂无数据");
return false;
......
......@@ -146,7 +146,7 @@ export default {
alarmInfo: "",
dialogInfo: [],
centerDialogVisible: false,
confirmStatus: 2,
confirmStatus: 1,
params: {
current: 1,
size: 10,
......@@ -154,10 +154,6 @@ export default {
total: 10,
tableData: [],
tabs: [
{
label: "全部",
key: 2,
},
{
label: "已确认",
key: 1,
......@@ -210,9 +206,8 @@ export default {
this.getTableData();
},
getTableData() {
let type = this.confirmStatus == 2 ? "" : this.confirmStatus;
let param = {
confirmStatus: type,
confirmStatus: this.confirmStatus,
...this.params,
...this.searchOption,
};
......@@ -263,12 +258,6 @@ export default {
},
exportList() {
let type = this.confirmStatus == 2 ? "" : this.confirmStatus;
let param = {
confirmStatus: type,
...this.params,
...this.searchOption,
};
if (this.exids.length == 0) {
this.$message.warning("暂无数据");
return false;
......
......@@ -12,7 +12,7 @@
</div>
<div>
<el-row class="text" :gutter="24">
<el-col :span="10">
<el-col :span="7">
<div class="item_name">历史记录</div>
</el-col>
<el-col :span="8">
......@@ -23,12 +23,14 @@
</el-col>
</el-row>
<el-row class="text" :gutter="24">
<el-col :span="10">
<el-col :span="7">
<div class="item_name">维修记录</div>
</el-col>
<el-col :span="10">
<el-col :span="7">
<div class="item_data">{{ form.log.monitor }}</div>
</el-col>
<el-col :span="7">
</el-col>
</el-row>
</div>
</el-card>
......
......@@ -2,7 +2,7 @@
<div class="dashboard-container">
<!-- 首页 -->
<div>
<orgTree style="float:left" @selectItem="selectItem" @defaultSite="defaultSite"/>
<orgTree ref="tree" style="float:left" @selectItem="selectItem" @defaultSite="defaultSite" @dblClick="dblClick"/>
<div class="ml300">
<type :type="type" :curInfo="curInfo" />
</div>
......@@ -31,17 +31,29 @@ export default {
computed: {
},
mounted() {
// this.defaultSite()
// this.getDetailNode(30)
},
methods: {
defaultSite(data){
this.getDetailNode(data)
this.getDetailNode(data)
},
selectItem(data) {
this.type = data.type
this.getDetailNode(data.id)
},
dblClick(data, node) {
this.changeTreeNodeStatus(node)
},
changeTreeNodeStatus (node) {
node.expanded = true
for (let i = 0; i < node.childNodes.length; i++) {
// 改变节点的自身expanded状态
node.childNodes[i].expanded = true
// 遍历子节点
if (node.childNodes[i].childNodes.length > 0) {
this.changeTreeNodeStatus(node.childNodes[i])
}
}
},
getDetailNode(data) {
let param = {
type: this.type,
......@@ -55,7 +67,6 @@ export default {
})
}
this.curInfo = res
console.log(res);
})
},
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment