Commit 8abcca40 authored by neogcg's avatar neogcg

配置详情

parent 18d6d570
......@@ -91,25 +91,40 @@ export const constantRoutes = [
{
path: 'statistics',
name: 'settingAtatistics',
component: () => import('@/views/setting/statistics/index'),
meta: { title: '配置信息统计' },
children: [
]
},
{
path: "/detail",
{
path: "/detail/",
name: "detail",
beforeEnter: (to, from, next) => {
if (to.query.type==1) {
to.meta.title = '铁路线详情'
}
else if (to.query.type==2) {
to.meta.title = '站点详情'
}
else if (to.query.type==3) {
to.meta.title = 'FSU详情'
}
else if (to.query.type==4) {
to.meta.title = '监测设备详情'
}
else if (to.query.type==5) {
to.meta.title = '漏缆详情'
}
else if (to.query.type==6) {
to.meta.title = '天馈线详情'
} else{
to.meta.title = '详情'
}
next()
},
component: () => import('@/views/setting/statistics/detail'),
meta: { title: "详情" },
hidden: true,
},
{
path: "/sitedetail",
name: "sitedetail",
component: () => import('@/views/setting/statistics/sitedetail'),
meta: { title: "站点详情" },
hidden: true,
},
......@@ -234,5 +249,8 @@ export function resetRouter() {
const newRouter = createRouter()
router.matcher = newRouter.matcher // reset router
}
router.beforeResolve((to, from, next) => {
window.document.title = to.meta.title
next()
})
export default router
......@@ -59,5 +59,18 @@
margin-bottom: 20px;
.label{
font-weight: 400px;
font-size: 14px;
}
}
.search-div{
background: #EAF1FE;
padding-top: 16px;
margin-bottom: 20px;
}
.none{
display: none;
}
.seabtn{
color: #fff;
background:rgba(122, 164, 251, 0.55);
}
......@@ -214,11 +214,11 @@ export default {
asyncstationList: "station/asyncList",
}),
changerailWay() {
console.log(this.FSUForm.parentId);
this.stationSelect2 = this.stationlist.filter(
(item) => item.wayId === this.FSUForm.wayId
);
console.log(this.stationSelect2);
},
readNodes(aaa = [], arrarea = []) {
for (let item of aaa) {
......@@ -237,11 +237,11 @@ export default {
if (valid) {
this.FSUForm.parentId = this.FSUForm.siteId;
this.FSUForm.fsuPort = Number(this.FSUForm.fsuPort);
console.log(this.FSUForm);
fsusave(this.FSUform).then((res) => {
if (res.code == 200) {
successAlert("添加成功");
console.log(res);
} else {
warning("添加失败");
}
......@@ -281,7 +281,7 @@ export default {
this.asyncstationList();
this.railWaySelect = this.railWaylist;
this.stationSelect = this.stationlist;
console.log(this.asd);
},
};
</script>
......
......@@ -7,7 +7,7 @@
label-width="200px"
class="form"
>
<el-form-item label="所在铁路线:" prop="wayId">
<el-form-item label="所在铁路线:" prop="wayId">
<el-select
v-model="leakyCableForm.wayId"
placeholder="请选择铁路线"
......@@ -22,7 +22,11 @@
</el-select>
</el-form-item>
<el-form-item label="所在站点:" prop="siteId">
<el-select v-model="leakyCableForm.siteId" placeholder="请选择站点" @change="changesite()">
<el-select
v-model="leakyCableForm.siteId"
placeholder="请选择站点"
@change="changesite()"
>
<el-option
v-for="item in stationSelect2"
:key="item.id"
......@@ -31,8 +35,12 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="所在FSU:" prop="fsuId">
<el-select v-model="leakyCableForm.fsuId" placeholder="请选择FSU" @change="changefsu()">
<el-form-item label="所在FSU:" prop="fsuId">
<el-select
v-model="leakyCableForm.fsuId"
placeholder="请选择FSU"
@change="changefsu()"
>
<el-option
v-for="item in fsuSelect2"
:key="item.id"
......@@ -41,8 +49,11 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="所在监测设备:" prop="monitor">
<el-select v-model="leakyCableForm.monitor" placeholder="请选择监测设备" >
<el-form-item label="所在监测设备:" prop="monitor">
<el-select
v-model="leakyCableForm.monitor"
placeholder="请选择监测设备"
>
<el-option
v-for="item in monitor2"
:key="item.id"
......@@ -122,14 +133,14 @@
<script>
import { leakyCablesave } from "../../api";
import { mapGetters, mapActions } from "vuex";
import { successAlert,warningAlert } from "@/utils/alert";
import { successAlert, warningAlert } from "@/utils/alert";
export default {
props: [],
components: {},
data() {
return {
railWaySelect: [],
stationSelect2: [],
railWaySelect: [],
stationSelect2: [],
fsuSelect2: [],
monitor2: [],
FSUrailway: [
......@@ -143,10 +154,10 @@ export default {
},
],
leakyCableForm: {
wayId:"",
siteId:"",
fsuId:"",
monitor:"",
wayId: "",
siteId: "",
fsuId: "",
monitor: "",
antennaFeederLength: 0,
hundredMetersLoss: 0,
inserterLength: 0,
......@@ -163,7 +174,7 @@ export default {
parentId: [
{ required: true, message: "请选择铁路线", trigger: "blur" },
],
antennaFeederLength: [
{ required: true, message: "请输入天馈线长度", trigger: "blur" },
],
......@@ -200,47 +211,44 @@ export default {
},
],
sendPower: [
{ required: true, message: "请输入漏缆测试信号发射功率", trigger: "blur" },
{
required: true,
message: "请输入漏缆测试信号发射功率",
trigger: "blur",
},
],
},
};
},
computed: {
computed: {
...mapGetters({
railWaylist: "railWay/list",
stationlist: "station/list",
fsulist: "FSU/list",
monitorEquiplist:"monitor/list"
monitorEquiplist: "monitor/list",
}),
},
methods: {
...mapActions({
...mapActions({
asyncrailWayList: "railWay/asyncList",
asyncstationList: "station/asyncList",
asyncfsuList: "FSU/asyncList",
asyncmonitorList: "monitor/asyncList",
}),
changerailWay() {
changerailWay() {
this.stationSelect2 = this.stationlist.filter(
(item) => item.parentId === this.leakyCableForm.wayId
);
},
changesite() {
changesite() {
this.fsuSelect2 = this.fsulist.filter(
(item) => item.parentId === this.leakyCableForm.siteId
);
},
changefsu() {
changefsu() {
this.monitor2 = this.monitorEquiplist.filter(
(item) => item.parentId === this.leakyCableForm.fsuId
);
},
reset() {
this.$refs.leakyCableForm.resetFields();
......@@ -249,19 +257,18 @@ export default {
this.$refs.leakyCableForm.validate((valid) => {
if (valid) {
leakyCablesave(this.leakyCableForm).then((res) => {
if (res.code==200) {
successAlert("添加成功")
console.log(res);
}else{
warning("添加失败")
if (res.code == 200) {
successAlert("添加成功");
} else {
warning("添加失败");
}
});
}
this.leakyCableForm = {
parentId:"",
siteId:"",
fsuId:"",
monitor:"",
parentId: "",
siteId: "",
fsuId: "",
monitor: "",
antennaFeederLength: 0,
hundredMetersLoss: 0,
inserterLength: 0,
......@@ -278,13 +285,12 @@ export default {
},
},
mounted() {
this.asyncrailWayList();
this.asyncrailWayList();
this.asyncstationList();
this.asyncfsuList();
this.asyncmonitorList();
this.railWaySelect = this.railWaylist;
},
};
</script>
......
......@@ -149,10 +149,10 @@ export default {
fsuId: "",
equipCode: "",
equipFactory: "",
equipMode: '',
equipMode: "",
equipName: "",
equipSerialNumber: "",
equipType: '',
equipType: "",
installDate: "2022-02-24 12:24:84",
kmSign: "",
......@@ -241,10 +241,10 @@ export default {
fsuId: "",
equipCode: "",
equipFactory: "",
equipMode: '',
equipMode: "",
equipName: "",
equipSerialNumber: "",
equipType: '',
equipType: "",
installDate: "2022-02-22 12:24:84",
kmSign: "",
......@@ -255,8 +255,8 @@ export default {
},
created() {
selectMonitorItem().then((res) => {
this.equipTypeSelect=res["03"]
this.equipModeSelect=res["09"]
this.equipTypeSelect = res["03"];
this.equipModeSelect = res["09"];
});
},
mounted() {
......
......@@ -37,7 +37,7 @@
</template>
<script>
import { railWaysave } from "../../api";
import { successAlert,warningAlert } from "@/utils/alert";
import { successAlert, warningAlert } from "@/utils/alert";
import { mapGetters, mapActions } from "vuex";
export default {
props: [],
......@@ -73,7 +73,7 @@ export default {
},
computed: {},
methods: {
...mapActions({
...mapActions({
asyncrailWayList: "railWay/asyncList",
}),
reset() {
......@@ -83,11 +83,11 @@ export default {
this.$refs.form.validate((valid) => {
if (valid) {
railWaysave(this.formData).then((res) => {
if (res.code==200) {
successAlert("添加成功")
this.asyncrailWayList()
}else{
warning("添加失败")
if (res.code == 200) {
successAlert("添加成功");
this.asyncrailWayList();
} else {
warning("添加失败");
}
});
}
......
......@@ -75,7 +75,7 @@
<script>
import { sitesave } from "../../api";
import { mapGetters, mapActions } from "vuex";
import { successAlert,warningAlert } from "@/utils/alert";
import { successAlert, warningAlert } from "@/utils/alert";
export default {
props: [],
components: {},
......@@ -93,7 +93,7 @@ export default {
],
stationForm: {
parentId: "",
wayId:'',
wayId: "",
siteCode: "",
siteName: "",
siteAddress: "",
......@@ -107,12 +107,8 @@ export default {
rules: {
parentId: [
{ required: true, message: "请选择铁路线", trigger: "blur" },
],
wayId: [
{ required: true, message: "请选择铁路线", trigger: "blur" },
],
wayId: [{ required: true, message: "请选择铁路线", trigger: "blur" }],
siteCode: [
{ required: true, message: "请输入站点编号", trigger: "blur" },
],
......@@ -142,23 +138,22 @@ export default {
};
},
computed: {
...mapGetters({
railWaylist:"railWay/list",
...mapGetters({
railWaylist: "railWay/list",
}),
},
methods: {
...mapActions({
asyncrailWayList: "railWay/asyncList",
}),
readNodes (aaa=[], arrarea=[]) {
for (let item of aaa) {
arrarea.push({"id":item.id,"name":item.name})
if (item.children) {
this.readNodes(item.children,arrarea)
readNodes(aaa = [], arrarea = []) {
for (let item of aaa) {
arrarea.push({ id: item.id, name: item.name });
if (item.children) {
this.readNodes(item.children, arrarea);
}
}
return arrarea
return arrarea;
},
reset() {
this.$refs.stationform.resetFields();
......@@ -166,22 +161,19 @@ export default {
submit() {
this.$refs.stationform.validate((valid) => {
if (valid) {
this.stationForm.parentId=this.stationForm.wayId
console.log(this.stationForm);
this.stationForm.parentId = this.stationForm.wayId;
sitesave(this.stationForm).then((res) => {
if (res.code==200) {
successAlert("添加成功")
console.log(res);
}else{
warning("添加失败")
if (res.code == 200) {
successAlert("添加成功");
} else {
warning("添加失败");
}
});
}
}
this.stationForm = {
parentId: '',
wayId:'',
parentId: "",
wayId: "",
siteCode: "",
siteName: "",
siteAddress: "",
......@@ -196,10 +188,9 @@ export default {
},
},
mounted() {
this.asyncrailWayList();
this.asyncrailWayList()
this.railWaySelect= this.railWaylist;
this.railWaySelect = this.railWaylist;
},
};
</script>
......
......@@ -4,18 +4,15 @@
<el-tabs v-model="activeName" :stretc="true" @tab-click="handleClick">
<el-tab-pane label="铁路线" name="0">
<div class="content" v-if="activeName === '0'">
<div class="content-title">添加铁路线</div>
<div class="content-title">添加铁路线</div>
<railWay></railWay>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="站点" name="1">
<div class="content" v-if="activeName === '1'">
<div class="content-title">添加站点</div>
<station></station>
</div>
</el-tab-pane>
<el-tab-pane label="FSU" name="2">
......@@ -27,7 +24,7 @@
<el-tab-pane label="监测设备" name="3">
<div class="content" v-if="activeName === '3'">
<div class="content-title">添加监测设备</div>
<monitorEquip></monitorEquip>
<monitorEquip></monitorEquip>
</div>
</el-tab-pane>
<el-tab-pane label="漏缆" name="4">
......@@ -43,28 +40,26 @@
</el-tab-pane>
</el-tabs>
</div>
<!-- <div class="btn">
<el-button type="primary" @click="reset">重置</el-button>
<el-button type="primary" @click="submit">确认提交</el-button>
</div> -->
</div>
</template>
<script>
import { railWaysave,sitesave } from "../api"
import railWay from "./comp/railWay.vue"
import monitorEquip from "./comp/monitorEquip.vue"
import station from "./comp/station.vue"
import FSU from "./comp/FSU.vue"
import leakyCable from "./comp/leakyCable.vue"
import { railWaysave, sitesave } from "../api";
import railWay from "./comp/railWay.vue";
import monitorEquip from "./comp/monitorEquip.vue";
import station from "./comp/station.vue";
import FSU from "./comp/FSU.vue";
import leakyCable from "./comp/leakyCable.vue";
export default {
components: {
monitorEquip,station,railWay,FSU,leakyCable
components: {
monitorEquip,
station,
railWay,
FSU,
leakyCable,
},
data() {
return {
activeName: "0",
tabs: [
{
......@@ -92,18 +87,10 @@ export default {
key: "5",
},
],
};
},
methods: {
handleClick(tab, event) {
},
handleClick(tab, event) {},
},
};
</script>
......
......@@ -39,7 +39,10 @@ const path = {
export function railWaylist() {
return request.post(path.railWaylist, ...arguments)
}
export function roleAdd() {
return request.post("http://localhost/api/railWay/selectPage", ...arguments)
}
// export const roleAdd = (params)=> post("http://172.16.0.242:8886/api/railWay/selectPage",params)
export function railWaydetail() {
return request.post(path.railWaydetail, ...arguments)
}
......@@ -60,10 +63,11 @@ export function railWayselectList() {
// export function selectForSite() {
// return request.post(path.selectForSite, ...arguments)
// }
export function sitelist() {
export function sitelist() {
return request.post(path.sitelist, ...arguments)
}
export function sitedetail() {
return request.post(path.sitedetail, ...arguments)
}
......
......@@ -15,7 +15,7 @@
<el-button type="primary" @click="exportData">导出</el-button>
</div>
</div>
<div>
<div>
<div class="search-input-box">
<label>设备名称:</label>
<el-input
......@@ -49,17 +49,17 @@
>
</el-input>
</div>
<div class="search-input-box">
<div class="search-input-box">
<label>所在铁路线:</label>
<el-select
size="small"
placeholder="请选择所在铁路线"
style="width: 180px"
v-model="FSUForm.wayId"
v-model="FSUForm.wayId"
clearable
@change="changerailWay()"
>
<el-option
<el-option
v-for="item in railWaySelect"
:key="item.id"
:label="item.name"
......@@ -67,7 +67,7 @@
></el-option>
</el-select>
</div>
<div class="search-input-box">
<div class="search-input-box">
<label>所在站点:</label>
<el-select
size="small"
......@@ -76,7 +76,7 @@
v-model="FSUForm.siteId"
clearable
>
<el-option
<el-option
v-for="item in stationSelect2"
:key="item.id"
:label="item.siteName"
......@@ -103,11 +103,7 @@
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column prop="equipName" label="设备名称" align="center" />
<el-table-column
prop="wayId"
label="所在铁路线"
align="center"
/>
<el-table-column prop="wayId" label="所在铁路线" align="center" />
<el-table-column
prop="siteId"
label="所在站点"
......@@ -120,52 +116,61 @@
show-overflow-tooltip
align="center"
/>
<el-table-column
<el-table-column
prop="fsuPort"
label="FSU端口数"
show-overflow-tooltip
align="center"
/> <el-table-column
/>
<el-table-column
prop="ip"
label="IP地址"
show-overflow-tooltip
align="center"
/> <el-table-column
/>
<el-table-column
prop="equipFactory"
label="设备厂商"
show-overflow-tooltip
align="center"
/> <el-table-column
/>
<el-table-column
prop="backupMode"
label="设备备用方式"
show-overflow-tooltip
align="center"
/> <el-table-column
/>
<el-table-column
prop="connectMode"
label="通信方式"
show-overflow-tooltip
align="center"
/> <el-table-column
/>
<el-table-column
prop="equipType"
label="设备类型"
show-overflow-tooltip
align="center"
/> <el-table-column
/>
<el-table-column
prop="equipSubType"
label="设备子类型"
show-overflow-tooltip
align="center"
/> <el-table-column
/>
<el-table-column
prop="softVersion"
label="软件版本号"
show-overflow-tooltip
align="center"
/> <el-table-column
/>
<el-table-column
prop="equipSerialNumber"
label="设备生产序列号"
show-overflow-tooltip
align="center"
/> <el-table-column
/>
<el-table-column
prop="kmSign"
label="设备所在铁路公里标"
show-overflow-tooltip
......@@ -184,7 +189,7 @@
</template>
</el-table-column>
</el-table>
<pagination
:limit="params.pageSize"
:page="params.pageNum"
......@@ -197,28 +202,28 @@
<script>
import Pagination from "@/components/Pagination";
import { fsulist, fsubatchDelete, fsudetail } from "../../api";
import { successAlert,warningAlert } from "@/utils/alert";
import { successAlert, warningAlert } from "@/utils/alert";
import { mapGetters, mapActions } from "vuex";
export default {
props: [],
components: { Pagination },
data() {
return {
railWaySelect: [],
railWaySelect: [],
stationSelect: [],
stationSelect2: [],
FSUForm: {
fsuCode:"",
FSUForm: {
fsuCode: "",
equipName: "阿达21",
equipSerialNumber: "4651",
ip: "151511",
ip: "192.168.0.3",
parentId: "",
siteId: "",
siteName: "asd",
wayId: "",
},
Info:[],
visible:false,
Info: [],
visible: false,
tableData: [],
params: {
pageNum: 1,
......@@ -230,23 +235,21 @@ export default {
};
},
computed: {
...mapGetters({
...mapGetters({
railWaylist: "railWay/list",
stationlist: "station/list",
}),
},
methods: {
...mapActions({
...mapActions({
asyncrailWayList: "railWay/asyncList",
asyncstationList: "station/asyncList",
asyncfsuList: "FSU/asyncList",
}),
changerailWay() {
this.stationSelect2 = this.stationlist.filter(
(item) => item.wayId === this.FSUForm.wayId
);
},
tableRowClassName({ row, rowIndex }) {
return rowIndex % 2 === 0 ? "" : "single-row";
......@@ -257,15 +260,14 @@ export default {
delData() {
let ids = this.ids;
fsubatchDelete({ ids }).then((res) => {
if (res.code==200) {
if (res.code == 200) {
successAlert("删除成功");
this.asyncfsuList();
this.asyncfsuList();
this.getTableData();
}else{
warningAlert("删除失败")
} else {
warningAlert("删除失败");
}
});
},
refresh() {
this.getTableData();
......@@ -276,16 +278,16 @@ export default {
this.multipleSelection = val;
this.ids = this.multipleSelection.map((i) => i.id);
},
handleView(row) {
// this.$router.push({
// path:'/detail',
// query:{
// id:row.id
// },
// })
this.$router.push({
path: "/detail",
query: {
id: row.id,
type: 3,
},
});
},
handlePageChange(pageData) {
this.params.pageSize = pageData.size;
......@@ -293,13 +295,11 @@ export default {
this.getTableData();
},
getTableData() {
let params = {
current: this.params.pageNum,
size: this.params.pageSize,
};
fsulist(params).then((res) => {
console.log(res.records);
let list = res.records || [];
this.tableData = list;
this.total = res.total;
......@@ -308,7 +308,7 @@ export default {
},
mounted() {
this.getTableData();
this.asyncrailWayList();
this.asyncrailWayList();
this.asyncstationList();
this.railWaySelect = this.railWaylist;
// this.stationSelect = this.stationlist;
......@@ -316,7 +316,6 @@ export default {
};
</script>
<style lang="scss" scoped>
.leakage-cable {
.leakage-top {
margin-bottom: 20px;
......
......@@ -11,11 +11,11 @@
>删除</el-button
>
<el-button type="primary" @click="refresh">刷新</el-button>
<el-button type="primary" @click="query">查询</el-button>
<el-button type="primary" @click="query()">查询</el-button>
<el-button type="primary" @click="exportData">导出</el-button>
</div>
</div>
<div>
<div :class="block==0?'search-div' : 'none'">
<div class="search-input-box">
<label>漏缆描述:</label>
<el-input
......@@ -36,18 +36,26 @@
v-model="leakyCableForm.leakyCableCode"
clearable
>
</el-input>
</div>
<div class="search-input-box">
<label>漏缆型号:</label>
<el-input
<el-select
size="small"
placeholder="请输入漏缆型号"
style="width: 180px"
v-model="leakyCableForm.leakyCableMode"
clearable
>
</el-input>
<el-option
v-for="item in leakySelect"
:key="item.id"
:label="item.leakyName"
:value="item.id"
></el-option>
</el-select>
</div>
<div class="search-input-box">
<label>所在铁路线:</label>
......@@ -103,14 +111,13 @@
></el-option>
</el-select>
</div>
<div class="search-input-box">
<div class="search-input-box">
<label>所在监测设备:</label>
<el-select
size="small"
placeholder="请选择所在监测设备"
style="width: 180px"
v-model="leakyCableForm.monitor"
clearable
>
<el-option
......@@ -121,6 +128,10 @@
></el-option>
</el-select>
</div>
<div class="search-input-box">
<el-button class="seabtn" @click="searchQuery()">查询</el-button>
<el-button class="seabtn" @click="reset()">重置</el-button>
</div>
</div>
<el-table
ref="multipleTable"
......@@ -237,6 +248,7 @@ export default {
components: { Pagination },
data() {
return {
leakySelect:[],
railWaySelect: [],
stationSelect2: [],
fsuSelect2: [],
......@@ -246,10 +258,10 @@ export default {
parentId: "",
siteId: "",
fsuId: "",
monitor:"",
leakyCableCode: "22",
monitor: "",
leakyCableCode: "22",
leakyCableDescribe: "打打",
leakyCableMode: "打打",
},
tableData: [],
......@@ -260,6 +272,7 @@ export default {
total: 10,
multipleSelection: [],
ids: [],
block:1,
};
},
computed: {
......@@ -277,7 +290,6 @@ export default {
asyncfsuList: "FSU/asyncList",
asyncmonitorList: "monitor/asyncList",
asyncleakyList: "leaky/asyncList",
}),
changerailWay() {
this.stationSelect2 = this.stationlist.filter(
......@@ -305,7 +317,7 @@ export default {
leakyCablebatchDelete({ ids }).then((res) => {
if (res.code == 200) {
successAlert("删除成功");
this.asyncleakyList()
this.asyncleakyList();
this.getTableData();
} else {
warningAlert("删除失败");
......@@ -315,7 +327,28 @@ export default {
refresh() {
this.getTableData();
},
query() {},
searchQuery(){},
reset(){
this.leakyCableForm= {
wayId: "",
parentId: "",
siteId: "",
fsuId: "",
monitor: "",
leakyCableCode: "",
leakyCableDescribe: "",
leakyCableMode: "",
}
},
query() {
if (this.block==1) {
this.block=0
} else {
this.block=1
}
},
exportData() {},
handleSelectionChange(val) {
this.multipleSelection = val;
......@@ -328,6 +361,7 @@ export default {
path: "/detail",
query: {
id: row.id,
type: 5,
},
});
let id = row.id;
......@@ -339,10 +373,6 @@ export default {
this.getTableData();
},
getTableData() {
// this.tableData2 = this.tableData.slice(( this.params.pageNum - 1) * this.params.pageSize,
// this.params.pageNum * this.params.pageSize
// );
// this.total = this.tableData.length
let params = {
current: this.params.pageNum,
size: this.params.pageSize,
......@@ -407,4 +437,5 @@ export default {
padding: 5px !important;
}
}
</style>
\ No newline at end of file
......@@ -15,7 +15,7 @@
<el-button type="primary" @click="exportData">导出</el-button>
</div>
</div>
<div>
<div>
<div class="search-input-box">
<label>设备名称:</label>
<el-input
......@@ -49,17 +49,17 @@
>
</el-input>
</div>
<div class="search-input-box">
<div class="search-input-box">
<label>所在铁路线:</label>
<el-select
size="small"
placeholder="请选择所在铁路线"
style="width: 180px"
v-model="monitorForm.wayId"
v-model="monitorForm.wayId"
clearable
@change="changerailWay()"
>
<el-option
<el-option
v-for="item in railWaySelect"
:key="item.id"
:label="item.name"
......@@ -67,17 +67,17 @@
></el-option>
</el-select>
</div>
<div class="search-input-box">
<div class="search-input-box">
<label>所在站点:</label>
<el-select
size="small"
placeholder="请选择所在站点"
style="width: 180px"
v-model="monitorForm.siteId"
@change="changesite()"
@change="changesite()"
clearable
>
<el-option
<el-option
v-for="item in stationSelect2"
:key="item.id"
:label="item.siteName"
......@@ -85,7 +85,7 @@
></el-option>
</el-select>
</div>
<div class="search-input-box">
<div class="search-input-box">
<label>所在FSU:</label>
<el-select
size="small"
......@@ -94,7 +94,7 @@
v-model="monitorForm.fsuId"
clearable
>
<el-option
<el-option
v-for="item in fsuSelect2"
:key="item.id"
:label="item.equipName"
......@@ -200,23 +200,24 @@ import {
monitorEquipbatchDelete,
monitorEquipdetail,
} from "../../api";
import { successAlert,warningAlert } from "@/utils/alert";
import { successAlert, warningAlert } from "@/utils/alert";
import { mapGetters, mapActions } from "vuex";
export default {
props: [],
components: { Pagination },
data() {
return {
railWaySelect: [],
railWaySelect: [],
stationSelect2: [],
fsuSelect2: [],
monitorForm: {
wayId:"",
parentId:"",
siteId:"",
fsuId:"",
monitorForm: {
wayId: "",
parentId: "",
ip: "",
siteId: "",
fsuId: "",
equipCode: "",
equipName: "",
},
......@@ -231,32 +232,28 @@ export default {
};
},
computed: {
...mapGetters({
...mapGetters({
railWaylist: "railWay/list",
stationlist: "station/list",
fsulist: "FSU/list",
}),
},
methods: {
...mapActions({
...mapActions({
asyncrailWayList: "railWay/asyncList",
asyncstationList: "station/asyncList",
asyncfsuList: "FSU/asyncList",
asyncmonitorList: "monitor/asyncList",
asyncmonitorList: "monitor/asyncList",
}),
changerailWay() {
this.stationSelect2 = this.stationlist.filter(
(item) => item.parentId === this.monitorForm.wayId
);
},
changesite() {
changesite() {
this.fsuSelect2 = this.fsuSelect.filter(
(item) => item.parentId === this.monitorForm.siteId
);
},
tableRowClassName({ row, rowIndex }) {
return rowIndex % 2 === 0 ? "" : "single-row";
......@@ -267,15 +264,14 @@ export default {
delData() {
let ids = this.ids;
monitorEquipbatchDelete({ ids }).then((res) => {
if (res.code==200) {
if (res.code == 200) {
successAlert("删除成功");
this.asyncmonitorList();
this.getTableData();
}else{
warningAlert("删除失败")
} else {
warningAlert("删除失败");
}
});
},
refresh() {
this.getTableData();
......@@ -286,22 +282,18 @@ export default {
this.multipleSelection = val;
this.ids = this.multipleSelection.map((i) => i.id);
},
handleView(row) {
this.$router.push({
path:'/detail',
query:{
id:row.id
},
})
let id = row.id;
monitorEquipdetail({ id }).then((res) => {
this.$router.push({
path: "/detail",
query: {
id: row.id,
type: 4,
},
});
let id = row.id;
monitorEquipdetail({ id }).then((res) => {});
},
handlePageChange(pageData) {
this.params.pageSize = pageData.size;
......@@ -309,16 +301,11 @@ export default {
this.getTableData();
},
getTableData() {
// this.tableData2 = this.tableData.slice(( this.params.pageNum - 1) * this.params.pageSize,
// this.params.pageNum * this.params.pageSize
// );
// this.total = this.tableData.length
let params = {
current: this.params.pageNum,
size: this.params.pageSize,
};
monitorEquiplist(params).then((res) => {
console.log(res.records);
let list = res.records || [];
this.tableData = list;
this.total = res.total;
......@@ -327,7 +314,7 @@ export default {
},
mounted() {
this.getTableData();
this.asyncrailWayList();
this.asyncrailWayList();
this.asyncstationList();
this.asyncfsuList();
this.railWaySelect = this.railWaylist;
......
......@@ -11,17 +11,18 @@
>删除</el-button
>
<el-button type="primary" @click="refresh">刷新</el-button>
<el-button type="primary" @click="query">查询</el-button>
<el-button type="primary" @click="query()">查询</el-button>
<el-button type="primary" @click="exportData">导出</el-button>
</div>
</div>
<div>
<div :class="block==0?'search-div' : 'none'">
<div class="search-input-box">
<label>铁路名称:</label>
<el-input
size="small"
placeholder="请输入铁路名称"
style="width: 180px"
v-model="railData.name"
clearable
>
</el-input>
......@@ -31,6 +32,7 @@
<el-input
size="small"
placeholder="请输入起点站名"
v-model="railData.startPointName"
style="width: 180px"
clearable
>
......@@ -41,6 +43,7 @@
<el-input
size="small"
placeholder="请输入终点站名"
v-model="railData.endPointName"
style="width: 180px"
clearable
>
......@@ -95,7 +98,7 @@
</template>
</el-table-column>
</el-table>
<pagination
:limit="params.pageSize"
:page="params.pageNum"
......@@ -107,7 +110,7 @@
</template>
<script>
import Pagination from "@/components/Pagination";
import { railWaylist,railWaydetail, railWaybatchDelete } from "../../api";
import { railWaylist, railWaydetail, railWaybatchDelete,roleAdd } from "../../api";
import { mapGetters, mapActions } from "vuex";
import { successAlert, warningAlert } from "@/utils/alert";
export default {
......@@ -115,6 +118,13 @@ export default {
components: { Pagination },
data() {
return {
railData: {
endPointName: "",
name: "ccc",
startPointName: "",
current: 1,
size:10
},
visible: false,
Info: [],
tableData: [],
......@@ -129,7 +139,7 @@ export default {
},
computed: {},
methods: {
...mapActions({
...mapActions({
asyncrailWayList: "railWay/asyncList",
}),
tableRowClassName({ row, rowIndex }) {
......@@ -143,7 +153,7 @@ export default {
railWaybatchDelete({ ids }).then((res) => {
if (res.code == 200) {
successAlert("删除成功");
this.asyncrailWayList()
this.asyncrailWayList();
this.getTableData();
} else {
warningAlert("删除失败");
......@@ -153,7 +163,11 @@ export default {
refresh() {
this.getTableData();
},
query() {},
query() {
this.getTableData();
},
exportData() {},
handleSelectionChange(val) {
this.multipleSelection = val;
......@@ -166,6 +180,7 @@ export default {
path: "/detail",
query: {
id: row.id,
type: 1,
},
});
......@@ -181,11 +196,13 @@ export default {
this.getTableData();
},
getTableData() {
let params = {
current: this.params.pageNum,
size: this.params.pageSize,
};
railWaylist(params).then((res) => {
railWaylist(this.railData).then((res) => {
let list = res.records || [];
this.tableData = list;
this.total = res.total;
......
......@@ -11,7 +11,7 @@
>删除</el-button
>
<el-button type="primary" @click="refresh">刷新</el-button>
<el-button type="primary" @click="query">查询</el-button>
<el-button type="primary" @click="query()">查询</el-button>
<el-button type="primary" @click="exportData">导出</el-button>
</div>
</div>
......@@ -22,6 +22,7 @@
size="small"
placeholder="请输入站名"
style="width: 180px"
v-model="siteForm.siteName"
clearable
>
</el-input>
......@@ -32,6 +33,7 @@
size="small"
placeholder="请输入起点编号"
style="width: 180px"
v-model="siteForm.siteCode"
clearable
>
</el-input>
......@@ -42,6 +44,7 @@
size="small"
placeholder="请输入站点地址"
style="width: 180px"
v-model="siteForm.siteAddress"
clearable
>
</el-input>
......@@ -52,6 +55,7 @@
size="small"
placeholder="请选择所在铁路线"
style="width: 180px"
v-model="siteForm.wayId"
clearable
>
<el-option
......@@ -138,7 +142,7 @@
</template>
</el-table-column>
</el-table>
<pagination
:limit="params.pageSize"
:page="params.pageNum"
......@@ -158,6 +162,15 @@ export default {
components: { Pagination },
data() {
return {
siteForm: {
wayId: "",
siteCode: "",
siteName: "委屈",
siteAddress: "",
siteId:'',
current: 1,
size:10,
},
railWaySelect: [],
visible: false,
Info: [],
......@@ -202,7 +215,16 @@ export default {
refresh() {
this.getTableData();
},
query() {},
query() {
// sitelist(this.siteForm).then((res) => {
// console.log(this.siteForm);
// console.log(res.records);
// let list = res.records || [];
// this.tableData = list;
// this.total = res.total;
// });
this.getTableData();
},
exportData() {},
handleSelectionChange(val) {
this.multipleSelection = val;
......@@ -212,16 +234,14 @@ export default {
handleView(row) {
this.$router.push({
path: "/sitedetail",
path: "/detail",
query: {
id: row.id,
type: 2,
},
});
// let id = row.id;
// sitedetail({ id }).then((res) => {
// this.Info = res;
// this.visible = true;
// });
let id = row.id;
sitedetail({ id }).then((res) => {});
},
handlePageChange(pageData) {
this.params.pageSize = pageData.size;
......@@ -229,10 +249,9 @@ export default {
this.getTableData();
},
getTableData() {
let params = {
current: this.params.pageNum,
size: this.params.pageSize,
};
console.log(123);
let params = this.siteForm
sitelist(params).then((res) => {
let list = res.records || [];
this.tableData = list;
......
<template>
<div class="dashboard-container">
<!-- 首页 -->
<header class="header_title">{{titleinfo}}</header>
<el-row :gutter="24">
<el-col :span="12" v-for="item in listData" class="mb20">
<el-card shadow="never">
<div slot="header" class="clearfix posa">
<span>{{ item.title }}</span>
<el-button v-if="item.option" style="float: right; padding: 3px 0;margin-right:20px" type="text" class="savebtn">保存</el-button>
</div>
<div v-for="k in item.list" :key="k.name" :class="item.list.length<=2? 'text2' : 'text'">
<el-row :gutter="24">
<el-col :span="10">
<div class="item_name">{{ k.name }}</div>
</el-col>
<el-col :span="10">
<div v-if="item.option">
<el-input v-model="k.value" clearable placeholder="请输入内容">{{ k.value }}</el-input>
</div>
<el-row :gutter="20" v-else-if="k.handle">
<el-col :span="10" class="value_handle">{{ k.value }}</el-col>
<el-col :span="10"><el-button class="alarmbtn" type="primary" size="mini">处理告警</el-button></el-col>
</el-row>
<div class="item_data" v-else>{{ k.value }}</div>
</el-col>
</el-row>
</div>
</el-card>
</el-col>
</el-row>
<div>
</div>
<div>
<type :type="type" :curInfo="curInfo" />
</div>
</template>
<script>
import { mapGetters, mapActions } from "vuex";
import { railWaydetail,sitedetail,fsudetail,monitorEquipdetail } from "../api";
import { treeBaseInfo } from "../../dashboard/api";
import Type from "../../dashboard/components/index.vue";
export default {
props: [],
components: {},
components: { Type },
data() {
return {
titleinfo:'',
listData2: [],
listData : [
{
title: '服务器信息',
list: [
{
name: '服务器IP',
value: '192.168.1.110',
},
{
name: '操作系统',
value: 'Red Hat EnterpiseLin...',
},
{
name: '系统软件版本',
value: '192.168.1.110',
},
]
},
{
title: '当前状态',
list: [
{
handle: true,
name: '设备状态',
value: '告警',
},
{
handle: true,
name: '漏缆状态',
value: '紧急告警',
}
]
},
{
title: '管理员(admin)管理范围',
list: [
{
name: '基站',
value: '20个',
},
{
name: 'FSU',
value: '20台',
},
{
name: '监测设备',
value: '81台',
},
{
name: '混缆',
value: '142根',
},
]
},
{
title: '基本信息',
option: true,
list: [
{
name: '铁路名称',
value: '张呼铁路客运专线',
},
{
name: '铁路起点站名',
value: '张家口',
},
{
name: '铁路终点站名',
value: '呼和浩特',
},
{
name: '铁路总长度(公里)',
value: '286.8',
},
]
},
titleinfo: "",
],
id: "",
type: 1,
curInfo: {},
listData: [],
};
},
computed: {
...mapGetters({}),
},
methods: {
...mapActions({}),
},
computed: {},
methods: {
getParams() {
this.id = this.$route.query.id;
// console.log(this.id);
railWaydetail({ id: this.id }).then((res) => {
this.titleinfo=res.name + '信息'
this.listData[3].list[0].value=res.name
this.listData[3].list[1].value=res.startPointName
this.listData[3].list[2].value=res.endPointName
this.listData[3].list[3].value=res.totalLong
this.type = this.$route.query.type;
let params = {
id: this.$route.query.id,
type: this.type,
};
treeBaseInfo(params).then((res) => {
let controlLimit = res.controlLimit;
controlLimit.map((item) => {
res[`type${item.type}`] = item.sum;
});
this.curInfo = res;
});
},
},
......@@ -153,116 +42,3 @@ export default {
mounted() {},
};
</script>
<style lang="scss" scoped>
.header_title {
font-size: 23px;
font-family: Source Han Sans CN;
font-weight: 500;
line-height: 40px;
text-align: center;
color: #0058ff;
letter-spacing: 10px;
opacity: 1;
margin-bottom: 20px;
}
::v-deep.el-card {
border: 1px solid #e3e3e3;
border-radius: 8px;
min-height: 243px;
.el-card__header {
font-size: 18px;
color: #333333;
font-weight: 500;
text-align: center;
background: rgba(226, 235, 255, 0.39);
opacity: 1;
}
.el-card__body {
padding: 0px;
}
}
.posa {
position: relative;
}
.savebtn {
position: absolute;
right: 2%;
}
// .el-col {
// margin-bottom: 20px;
// }
.text {
// display: flex;
padding: 10px 20px 10px 20px;
border-bottom: 1px solid #e3e3e3;
&:last-child {
border-bottom: none;
}
.item_name,
.item_data,
.value_handle {
height: 16px;
line-height: 16px;
margin-top: 12px;
margin-bottom: 12px;
}
.item_name {
width: 262px;
height: 16px;
line-height: 16px;
color: #7e7e7e;
margin-top: 12px;
margin-bottom: 12px;
}
.item_data {
}
.value_handle {
color: red;
margin-right: 10px;
}
.alarmbtn {
margin-top: 6px;
margin-bottom: 6px;
}
.el-card:last-child .text {
border-bottom: none !important;
}
}
.text2 {
// display: flex;
padding: 10px 20px 10px 20px;
border-bottom: 1px solid #e3e3e3;
.item_name,
.item_data,
.value_handle {
height: 16px;
line-height: 16px;
margin-top: 12px;
margin-bottom: 12px;
}
.item_name {
width: 262px;
height: 16px;
line-height: 16px;
color: #7e7e7e;
margin-top: 12px;
margin-bottom: 12px;
}
.item_data {
}
.value_handle {
color: red;
margin-right: 10px;
min-width: 52px;
}
.alarmbtn {
margin-top: 6px;
margin-bottom: 6px;
}
.el-card:last-child .text {
border-bottom: none !important;
}
}
</style>
......@@ -32,7 +32,14 @@ import {
sitelist,
} from "../api";
export default {
components: { Pagination, railWayTable, stationTable,fsuTable,monitorTable,leakyTable },
components: {
Pagination,
railWayTable,
stationTable,
fsuTable,
monitorTable,
leakyTable,
},
data() {
return {
params: {
......@@ -68,9 +75,7 @@ export default {
},
],
tableData2: [],
tableData: [
],
tableData: [],
multipleSelection: [],
ids: [],
};
......@@ -82,18 +87,12 @@ export default {
changeType(item) {
this.activeName = item.key;
},
refresh() {},
query() {},
exportData() {},
},
mounted() {
},
mounted() {},
};
</script>
......
<template>
<div class="dashboard-container">
<!-- 首页 -->
<header class="header_title">{{titleinfo}}</header>
<el-row :gutter="24">
<el-col :span="12" v-for="item in listData" class="mb20">
<el-card shadow="never">
<div slot="header" class="clearfix posa">
<span>{{ item.title }}</span>
<el-button v-if="item.option" style="float: right; padding: 3px 0;margin-right:20px" type="text" class="savebtn">保存</el-button>
</div>
<div v-for="k in item.list" :key="k.name" :class="item.list.length<=2? 'text2' : 'text'">
<el-row :gutter="24">
<el-col :span="10">
<div class="item_name">{{ k.name }}</div>
</el-col>
<el-col :span="10">
<div v-if="item.option">
<el-input v-model="k.value" clearable placeholder="请输入内容">{{ k.value }}</el-input>
</div>
<el-row :gutter="20" v-else-if="k.handle">
<el-col :span="10" class="value_handle">{{ k.value }}</el-col>
<el-col :span="10"><el-button class="alarmbtn" type="primary" size="mini">处理告警</el-button></el-col>
</el-row>
<div class="item_data" v-else>{{ k.value }}</div>
</el-col>
</el-row>
</div>
</el-card>
</el-col>
</el-row>
<div>
</div>
</div>
</template>
<script>
import {mapGetters,mapActions} from 'vuex';
import { sitedetail } from "../api";
export default {
props: [],
components: {},
data() {
return {
titleinfo:'',
id: "",
listData : [
{
title: '管理范围',
list: [
{
name: 'FSU',
value: '1台',
},
{
name: '监测设备',
value: '1台',
},
{
name: '漏缆',
value: '2根',
},
]
},
{
title: '基本信息',
option: true,
list: [
{
name: '站点编号',
value: '',
},
{
name: '站名',
value: '',
}, {
name: '站点地址',
value: '',
}, {
name: '所在铁路线',
value: '',
}, {
name: '站点所在局',
value: '',
},
{
name: '站点所在段号',
value: '',
}, {
name: '站点所在铁路公里标',
value: '',
}, {
name: '站点经度',
value: '',
}, {
name: '站点纬度',
value: '',
}, {
name:'站点监控时间',
value: '',
},
{
name:'站点其他信息',
value: '',
},
]
},
{
title: '当前状态',
list: [
{
handle: true,
name: '设备状态',
value: '正常',
},
{
handle: true,
name: '漏缆状态',
value: '正常',
}
]
},
],
};
},
computed: {
...mapGetters({}),
},
methods: {
...mapActions({}),
getParams() {
this.id = this.$route.query.id;
sitedetail({ id: this.id }).then((res) => {
this.titleinfo='站点(' + res.siteName + ")"
this.listData[1].list[0].value=res.siteCode
this.listData[1].list[1].value=res.siteName
this.listData[1].list[2].value=res.siteAddress
this.listData[1].list[3].value=res.siteArea
this.listData[1].list[4].value=res.wayId
this.listData[1].list[5].value=res.siteSectionCode
this.listData[1].list[6].value=res.siteKmSign
this.listData[1].list[7].value=res.siteLatitude
this.listData[1].list[8].value=res.siteLongitude
this.listData[1].list[10].value=res.siteOtherMessage
});
},
},
created() {
this.getParams();
},
mounted() {},
};
</script>
<style lang="scss" scoped>
.header_title {
font-size: 23px;
font-family: Source Han Sans CN;
font-weight: 500;
line-height: 40px;
text-align: center;
color: #0058ff;
letter-spacing: 10px;
opacity: 1;
margin-bottom: 20px;
}
::v-deep.el-card {
border: 1px solid #e3e3e3;
border-radius: 8px;
min-height: 243px;
.el-card__header {
font-size: 18px;
color: #333333;
font-weight: 500;
text-align: center;
background: rgba(226, 235, 255, 0.39);
opacity: 1;
}
.el-card__body {
padding: 0px;
}
}
.posa {
position: relative;
}
.savebtn {
position: absolute;
right: 2%;
}
// .el-col {
// margin-bottom: 20px;
// }
.text {
// display: flex;
padding: 10px 20px 10px 20px;
border-bottom: 1px solid #e3e3e3;
&:last-child {
border-bottom: none;
}
.item_name,
.item_data,
.value_handle {
height: 16px;
line-height: 16px;
margin-top: 12px;
margin-bottom: 12px;
}
.item_name {
width: 262px;
height: 16px;
line-height: 16px;
color: #7e7e7e;
margin-top: 12px;
margin-bottom: 12px;
}
.item_data {
}
.value_handle {
color: red;
margin-right: 10px;
}
.alarmbtn {
margin-top: 6px;
margin-bottom: 6px;
}
.el-card:last-child .text {
border-bottom: none !important;
}
}
.text2 {
// display: flex;
padding: 10px 20px 10px 20px;
border-bottom: 1px solid #e3e3e3;
.item_name,
.item_data,
.value_handle {
height: 16px;
line-height: 16px;
margin-top: 12px;
margin-bottom: 12px;
}
.item_name {
width: 262px;
height: 16px;
line-height: 16px;
color: #7e7e7e;
margin-top: 12px;
margin-bottom: 12px;
}
.item_data {
}
.value_handle {
color: red;
margin-right: 10px;
min-width: 52px;
}
.alarmbtn {
margin-top: 6px;
margin-bottom: 6px;
}
.el-card:last-child .text {
border-bottom: none !important;
}
}
</style>
\ No newline at end of file
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