master
parent
ff7024ad3e
commit
b89b423247
@ -1,76 +0,0 @@
|
||||
<template>
|
||||
<div class="towerSide">
|
||||
<el-tree
|
||||
:data="data"
|
||||
:expand-on-click-node="false"
|
||||
:props="defaultProps"
|
||||
@node-click="handleNodeClick"
|
||||
default-expand-all
|
||||
highlight-current
|
||||
node-key="id"
|
||||
:default-expanded-keys="expandDefault"
|
||||
></el-tree>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import bus from "../../../../../components/common/bus";
|
||||
//import { getListCompany } from '@/utils/api/index';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
expandDefault: [], //默认选中第一项
|
||||
data: [],
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "text",
|
||||
},
|
||||
};
|
||||
},
|
||||
// 为了选中第一层级下的第一个节点
|
||||
watch: {
|
||||
expandDefault(newVal, oldVal) {
|
||||
if (newVal) {
|
||||
this.$nextTick(() => {
|
||||
document.querySelector(".el-tree-node__content").click();
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
created() {
|
||||
// getListCompany({
|
||||
// companyId: 'f7d966d1-f3d1-4802-946d-ad93e1ee1b9b',
|
||||
// lineName: ''
|
||||
// }).then((res) => {
|
||||
// //console.log(res.data);
|
||||
// this.expandDefault.push(res.data.$treeNodeId);
|
||||
// this.data = res.data;
|
||||
// });
|
||||
},
|
||||
methods: {
|
||||
handleNodeClick(data) {
|
||||
//console.log(data);
|
||||
bus.$emit("nodeData", data);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="less">
|
||||
.towerSide {
|
||||
width: 234px;
|
||||
height: 100%;
|
||||
border-right: 1px solid @border-color-base;
|
||||
// 修改选中的样式
|
||||
.el-tree {
|
||||
.el-tree-node__content {
|
||||
height: 32px;
|
||||
}
|
||||
}
|
||||
.el-tree--highlight-current
|
||||
.el-tree-node.is-current
|
||||
> .el-tree-node__content {
|
||||
background-color: @color-primary;
|
||||
color: @color-white;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,232 +0,0 @@
|
||||
<template>
|
||||
<div class="towerTableMian">
|
||||
<div class="towerBtnGroup">
|
||||
<el-button type="primary">新增</el-button>
|
||||
<el-button type="primary">批量添加</el-button>
|
||||
<el-button type="primary">同T添加</el-button>
|
||||
<el-button type="primary">修改</el-button>
|
||||
<el-button type="primary">修改XL</el-button>
|
||||
<el-button type="primary">批量修改属地化</el-button>
|
||||
|
||||
<el-button type="primary">批量修改班组</el-button>
|
||||
<el-button type="primary">删除</el-button>
|
||||
<el-button type="primary">查询</el-button>
|
||||
<el-button type="primary">导入</el-button>
|
||||
<el-button type="primary">导入模板下载</el-button>
|
||||
<el-button type="primary">导出</el-button>
|
||||
<el-button type="primary">导入监拍点</el-button>
|
||||
<el-button type="primary">监拍点导入模板</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>
|
||||
<el-table
|
||||
class="towerTable"
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
height="calc(100% - 154px)"
|
||||
v-loading="loading"
|
||||
>
|
||||
<el-table-column prop="company.organName" label="单位"> </el-table-column>
|
||||
<el-table-column prop="line.lineName" label="XL名称"> </el-table-column>
|
||||
<el-table-column prop="towerName" label="GT名称"> </el-table-column>
|
||||
<el-table-column prop="date" label="排序"> </el-table-column>
|
||||
<el-table-column prop="voltageLevelDict.name" label="DY等级">
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="address" label="GT性质"> </el-table-column>
|
||||
<el-table-column prop="date" label="GT状态"> </el-table-column>
|
||||
<el-table-column prop="name" label="GT材质"> </el-table-column>
|
||||
<el-table-column prop="address" label="位置描述"> </el-table-column>
|
||||
<el-table-column prop="date" label="同T数量"> </el-table-column>
|
||||
<el-table-column prop="name" label="责任人"> </el-table-column>
|
||||
<el-table-column prop="address" label="运维班组"> </el-table-column>
|
||||
<el-table-column prop="date" label="属地单位"> </el-table-column>
|
||||
<el-table-column prop="name" label="PMS逻辑GT编码"> </el-table-column>
|
||||
<el-table-column prop="address" label="PMS物理GT编码"> </el-table-column> -->
|
||||
<!-- <el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
|
||||
<el-button type="text" size="small">编辑</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"
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import bus from "../../../../../components/common/bus";
|
||||
//import { getTowerList } from '@/utils/api/index';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
formInline: {
|
||||
user: "",
|
||||
region: "",
|
||||
},
|
||||
loading: true,
|
||||
companyId: "",
|
||||
page: 1, // 当前页数
|
||||
pageSize: 20, // 每页数量
|
||||
total: 0, //总条数
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// this.loading = true;
|
||||
// getTowerList({
|
||||
// organId: 'f7d966d1-f3d1-4802-946d-ad93e1ee1b9b',
|
||||
// towerName: '',
|
||||
// towerNature: '',
|
||||
// towerTexture: '',
|
||||
// status: '',
|
||||
// cConfig: '',
|
||||
// page: this.page,
|
||||
// rows: this.pageSize
|
||||
// }).then((res) => {
|
||||
// console.log(res);
|
||||
// this.tableData = res.data.rows;
|
||||
// this.total = res.data.total;
|
||||
// this.loading = false;
|
||||
// });
|
||||
},
|
||||
mounted() {
|
||||
bus.$on("nodeData", (data) => {
|
||||
// console.log(data);
|
||||
this.loading = true;
|
||||
if (data.dataType == "company") {
|
||||
this.getLevelOne(data);
|
||||
} else if (data.dataType == "dict") {
|
||||
this.getLevelTwo(data);
|
||||
} else if (data.dataType == "line") {
|
||||
this.getLevelThree(data);
|
||||
}
|
||||
//this.getTable(data);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
//一级菜单
|
||||
getLevelOne(data) {
|
||||
getTowerList({
|
||||
organId: data.id,
|
||||
towerName: "",
|
||||
towerNature: "",
|
||||
towerTexture: "",
|
||||
status: "",
|
||||
cConfig: "",
|
||||
page: this.page,
|
||||
rows: this.pageSize,
|
||||
}).then((res) => {
|
||||
//console.log(res);
|
||||
this.tableData = res.data.rows;
|
||||
this.total = res.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
//二级菜单
|
||||
getLevelTwo(data) {
|
||||
getTowerList({
|
||||
voltageLevel: data.id,
|
||||
companyId: "f7d966d1-f3d1-4802-946d-ad93e1ee1b9b",
|
||||
towerName: "",
|
||||
towerNature: "",
|
||||
towerTexture: "",
|
||||
status: "",
|
||||
cConfig: "",
|
||||
page: this.page,
|
||||
rows: this.pageSize,
|
||||
}).then((res) => {
|
||||
// console.log(res);
|
||||
this.tableData = res.data.rows;
|
||||
this.total = res.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
//三级菜单
|
||||
getLevelThree(data) {
|
||||
getTowerList({
|
||||
lineId: data.id,
|
||||
towerName: "",
|
||||
towerNature: "",
|
||||
towerTexture: "",
|
||||
status: "",
|
||||
cConfig: "",
|
||||
page: this.page,
|
||||
rows: this.pageSize,
|
||||
}).then((res) => {
|
||||
//console.log(res);
|
||||
this.tableData = res.data.rows;
|
||||
this.total = res.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
console.log(`当前页: ${val}`);
|
||||
this.page = val;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="less">
|
||||
.towerTableMian {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
.towerBtnGroup {
|
||||
padding: 16px 8px;
|
||||
}
|
||||
.searchForm {
|
||||
padding: 0px 8px;
|
||||
.el-form {
|
||||
.el-form-item {
|
||||
margin-bottom: 0px;
|
||||
.el-select,
|
||||
.el-input {
|
||||
width: 100px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.towerTable {
|
||||
margin-top: 12px;
|
||||
//padding: 16px 8px 0 8px;
|
||||
}
|
||||
.pageNation {
|
||||
margin-top: 8px;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,21 +1,109 @@
|
||||
<template>
|
||||
<div class="towerInformation">
|
||||
<tower-side></tower-side>
|
||||
<tower-table></tower-table>
|
||||
<div class="towerInformation">
|
||||
<div class="towerBox">
|
||||
<div class="towerBtnGroup">
|
||||
<el-button type="primary" icon="el-icon-plus">新增</el-button>
|
||||
</div>
|
||||
<div class="towerTable">
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
:data="towerTableData"
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%"
|
||||
height="calc(100% - 40px)"
|
||||
@selection-change="handleSelectionChange"
|
||||
@row-click="handleRowClick"
|
||||
>
|
||||
<el-table-column label="线路名称" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row.lineName }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="lineId"
|
||||
label="线路编号"
|
||||
show-overflow-tooltip
|
||||
min-width="120"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="id"
|
||||
label="id"
|
||||
show-overflow-tooltip
|
||||
min-width="120"
|
||||
>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column fixed="right" label="操作" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@click.native.stop="handleResive(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>
|
||||
</template>
|
||||
<script>
|
||||
import towerSide from './components/towerSide.vue';
|
||||
import towerTable from './components/towerTable.vue';
|
||||
export default {
|
||||
components: { towerSide, towerTable }
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
towerTableData: [
|
||||
{
|
||||
id: 3,
|
||||
name: null,
|
||||
lineId: 108,
|
||||
lineName: "线路",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
//获取线路列表数据
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="less">
|
||||
.towerInformation {
|
||||
width: calc(100% - 32px);
|
||||
height: calc(100% - 32px);
|
||||
padding: 16px 16px;
|
||||
background: @color-white;
|
||||
.towerBox {
|
||||
border: 1px solid #dddddd;
|
||||
height: calc(100% - 32px);
|
||||
padding: 16px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.towerBtnGroup {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background: @color-white;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.towerTable {
|
||||
margin-top: 16px;
|
||||
height: calc(100% - 48px);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue