Commit e25871a2 authored by yanzhongrong's avatar yanzhongrong

Merge branch 'dev' into dev_yzr

parents 28f8fc6c 3ade77ab
......@@ -5,6 +5,10 @@ import app from './modules/app'
import settings from './modules/settings'
import user from './modules/user'
import depart from './modules/depart'
import railWay from './modules/railWay'
import station from './modules/station'
import FSU from './modules/FSU'
import monitor from './modules/monitor'
Vue.use(Vuex)
......@@ -13,7 +17,11 @@ const store = new Vuex.Store({
app,
settings,
user,
depart
depart,
railWay,
station,
FSU,
monitor
},
getters
})
......
import { fsulist } from "../../views/setting/api"
const state = {
list: [],
pageNum:1,
pageSize:10,
}
const mutations = {
changeList(state, arr) {
state.list = arr
},
}
const actions = {
asyncList(context) {
fsulist( {
current: context.state.pageNum,
size: context.state.pageSize,
}).then(res => {
let arr = res.records?res.records:[]
context.commit("changeList", arr)
})
}
}
const getters = {
list(state) {
return state.list
}
}
export default {
state,
mutations,
actions,
getters,
namespaced: true
}
\ No newline at end of file
import { monitorEquiplist } from "../../views/setting/api"
const state = {
list: [],
pageNum:1,
pageSize:10,
}
const mutations = {
changeList(state, arr) {
state.list = arr
},
}
const actions = {
asyncList(context) {
monitorEquiplist( {
current: context.state.pageNum,
size: context.state.pageSize,
}).then(res => {
let arr = res.records?res.records:[]
context.commit("changeList", arr)
})
}
}
const getters = {
list(state) {
return state.list
}
}
export default {
state,
mutations,
actions,
getters,
namespaced: true
}
\ No newline at end of file
import { railWaylist } from "../../views/setting/api"
const state = {
list: []
list: [],
pageNum:1,
pageSize:10,
}
const mutations = {
changeList(state, arr) {
......@@ -9,13 +11,17 @@ const mutations = {
}
const actions = {
asyncList(context) {
railWaylist().then(res => {
// let arr =res.data.list?res.data.list:[]
let arr = res.records?res.records:[]
railWaylist( {
current: context.state.pageNum,
size: context.state.pageSize,
}).then(res => {
let arr = res.records?res.records:[]
context.commit("changeList", arr)
})
}
}
const getters = {
list(state) {
......
import { sitelist } from "../../views/setting/api"
const state = {
list: [],
pageNum:1,
pageSize:10,
}
const mutations = {
changeList(state, arr) {
state.list = arr
},
}
const actions = {
asyncList(context) {
sitelist( {
current: context.state.pageNum,
size: context.state.pageSize,
}).then(res => {
let arr = res.records?res.records:[]
context.commit("changeList", arr)
})
}
}
const getters = {
list(state) {
return state.list
}
}
export default {
state,
mutations,
actions,
getters,
namespaced: true
}
\ No newline at end of file
......@@ -32,3 +32,15 @@
height: 613px;
overflow-y: scroll;
}
.el-dialog__header{
text-align: center;
}
.device-detail-tb td{
text-align: right;
background: #fff;
color:#333333;
padding-left: 25px;
}
.form .el-form-item .el-select{
width: 100%;
}
\ No newline at end of file
import Vue from "vue"
const vue = new Vue()
export const successAlert = (msg)=>{
vue.$message({
showClose: true,
message: msg,
type: 'success'
});
}
export const warningAlert = (msg)=>{
vue.$message({
showClose: true,
message: msg,
type: 'warning'
});
}
......@@ -7,26 +7,30 @@
label-width="200px"
class="form"
>
<el-form-item label="所在铁路线:" prop="parentId">
<el-select v-model="FSUForm.parentId" placeholder="请选择铁路线">
<el-form-item label="所在铁路线:" prop="wayId">
<el-select
v-model="FSUForm.wayId"
placeholder="请选择铁路线"
@change="changerailWay()"
>
<el-option
v-for="item in parentIdSelect"
:key="item.key"
:label="item.label"
:value="item.key"
v-for="item in railWaySelect"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="所在站点:" prop="station">
<el-select v-model="FSUForm.station" placeholder="请选择站点">
<el-form-item label="所在站点:" prop="siteId">
<el-select v-model="FSUForm.siteId" placeholder="请选择站点">
<el-option
v-for="item in stationSelect"
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in stationSelect2"
:key="item.id"
:label="item.siteName"
:value="item.id"
></el-option>
</el-select>
</el-form-item> -->
</el-form-item>
<el-form-item label="FSU身份编号:" prop="fsuCode">
<el-input v-model="FSUForm.fsuCode" placeholder="请输入FSU身份编号" />
</el-form-item>
......@@ -115,32 +119,17 @@
</div>
</template>
<script>
import { fsusave } from "../../api";
import { fsusave, selectForSite } from "../../api";
import { mapGetters, mapActions } from "vuex";
import { successAlert, warningAlert } from "@/utils/alert";
export default {
props: [],
components: {},
data() {
return {
parentIdSelect: [
{
key: 2,
label: "张呼客运专线",
},
{
key: 3,
label: "南昆客运专线",
},
],
stationSelect: [
{
value: 0,
label: "NiGeLong",
},
{
value: 1,
label: "STATION2",
},
],
railWaySelect: [],
stationSelect: [],
stationSelect2: [],
backupModeSelect: [
{
key: 0,
......@@ -198,26 +187,26 @@ export default {
},
],
FSUForm: {
parentId: 2,
fsuCode: "21",
fsuPort: "0",
equipName: "阿达",
ip: "15151",
equipFactory: "打发点", //设备厂商
backupMode: 2,
connectMode: 1, //通信方式
equipType: 0,
equipSubType: 2,
softVersion: "845",
equipSerialNumber: "465",
kmSign: "4651",
backupMode: 2,
connectMode: 1,
equipFactory: "打发点",
equipName: "阿达21",
equipSerialNumber: "4651",
equipSubType: 2,
equipType: 0,
fsuCode: "212",
fsuPort: 10,
ip: "151511",
kmSign: "46511",
parentId: 17,
siteId: 11,
siteName:"asd",
softVersion: "8451",
wayId: 17
},
rules: {
parentId: [
{ required: true, message: "请选择铁路线", trigger: "blur" },
],
station: [{ required: true, message: "请选择站点", trigger: "blur" }],
wayId: [{ required: true, message: "请选择铁路线", trigger: "blur" }],
siteId: [{ required: true, message: "请选择站点", trigger: "blur" }],
fsuCode: [
{ required: true, message: "请输入FSU身份编号", trigger: "blur" },
],
......@@ -259,19 +248,54 @@ export default {
},
};
},
computed: {},
computed: {
...mapGetters({
railWaylist: "railWay/list",
stationlist: "station/list",
}),
},
methods: {
...mapActions({
asyncrailWayList: "railWay/asyncList",
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) {
arrarea.push({ id: item.id, siteName: item.name });
if (item.children) {
this.readNodes(item.children, arrarea);
}
}
return arrarea;
},
reset() {
this.$refs.FSUForm.resetFields();
},
submit() {
this.$refs.FSUForm.validate((valid) => {
if (valid) {
fsusave(this.FSUform).then((res) => {});
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("添加失败");
}
});
}
this.FSUForm = {
parentId: "",
wayId: "",
fsuCode: "",
fsuPort: "",
equipName: "",
......@@ -288,7 +312,13 @@ export default {
});
},
},
mounted() {},
mounted() {
this.asyncrailWayList();
this.asyncstationList();
this.railWaySelect = this.railWaylist;
this.stationSelect = this.stationlist;
},
};
</script>
<style lang="scss" scoped>
......
......@@ -7,17 +7,50 @@
label-width="200px"
class="form"
>
<el-form-item label="所在铁路线:" prop="parentId">
<el-select v-model="leakyCableForm.parentId" placeholder="请选择铁路线">
<el-form-item label="所在铁路线:" prop="wayId">
<el-select
v-model="leakyCableForm.wayId"
placeholder="请选择铁路线"
@change="changerailWay()"
>
<el-option
v-for="item in FSUrailway"
:key="item.key"
:label="item.label"
:value="item.key"
v-for="item in railWaySelect"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="所在站点:" prop="siteId">
<el-select v-model="leakyCableForm.siteId" placeholder="请选择站点" @change="changesite()">
<el-option
v-for="item in stationSelect2"
:key="item.id"
:label="item.siteName"
:value="item.id"
></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-option
v-for="item in fsuSelect2"
:key="item.id"
:label="item.equipName"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="所在监测设备:" prop="monitor">
<el-select v-model="leakyCableForm.monitor" placeholder="请选择监测设备" >
<el-option
v-for="item in monitor2"
:key="item.id"
:label="item.equipName"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="漏缆编号:" prop="leakyCableCode">
<el-input
v-model="leakyCableForm.leakyCableCode"
......@@ -88,11 +121,20 @@
</template>
<script>
import { leakyCablesave } from "../../api";
import { mapGetters, mapActions } from "vuex";
import { successAlert,warningAlert } from "@/utils/alert";
export default {
props: [],
components: {},
data() {
return {
railWaySelect: [],
stationSelect: [],
stationSelect2: [],
fsuSelect: [],
fsuSelect2: [],
monitorSelect: [],
monitor2: [],
FSUrailway: [
{
key: 6,
......@@ -104,6 +146,10 @@ export default {
},
],
leakyCableForm: {
wayId:"",
siteId:"",
fsuId:"",
monitor:"",
antennaFeederLength: 0,
hundredMetersLoss: 0,
inserterLength: 0,
......@@ -120,6 +166,7 @@ export default {
parentId: [
{ required: true, message: "请选择铁路线", trigger: "blur" },
],
antennaFeederLength: [
{ required: true, message: "请输入天馈线长度", trigger: "blur" },
],
......@@ -161,17 +208,63 @@ export default {
},
};
},
computed: {},
computed: {
...mapGetters({
railWaylist: "railWay/list",
stationlist: "station/list",
fsulist: "FSU/list",
monitorEquiplist:"monitor/list"
}),
},
methods: {
...mapActions({
asyncrailWayList: "railWay/asyncList",
asyncstationList: "station/asyncList",
asyncfsuList: "FSU/asyncList",
asyncmonitorList: "monitor/asyncList",
}),
changerailWay() {
this.stationSelect2 = this.stationlist.filter(
(item) => item.parentId === this.leakyCableForm.wayId
);
},
changesite() {
this.fsuSelect2 = this.fsuSelect.filter(
(item) => item.parentId === this.leakyCableForm.siteId
);
},
changefsu() {
console.log(this.leakyCableForm.fsuId);
this.monitor2 = this.monitorSelect.filter(
(item) => item.parentId === this.leakyCableForm.fsuId
);
console.log(this.monitorSelect);
},
reset() {
this.$refs.leakyCableForm.resetFields();
},
submit() {
this.$refs.leakyCableForm.validate((valid) => {
if (valid) {
leakyCablesave(this.leakyCableForm).then((res) => {});
leakyCablesave(this.leakyCableForm).then((res) => {
if (res.code==200) {
successAlert("添加成功")
console.log(res);
}else{
warning("添加失败")
}
});
}
this.leakyCableForm = {
parentId:"",
siteId:"",
fsuId:"",
monitor:"",
antennaFeederLength: 0,
hundredMetersLoss: 0,
inserterLength: 0,
......@@ -187,7 +280,17 @@ export default {
});
},
},
mounted() {},
mounted() {
this.asyncrailWayList();
this.asyncstationList();
this.asyncfsuList();
this.asyncmonitorList();
this.railWaySelect = this.railWaylist;
this.stationSelect = this.stationlist;
this.fsuSelect = this.fsulist;
this.monitorSelect = this.monitorEquiplist;
},
};
</script>
<style lang="scss" scoped>
......
......@@ -7,13 +7,37 @@
label-width="200px"
class="form"
>
<el-form-item label="站点所属铁路线:" prop="parentId">
<el-select v-model="monitorForm.parentId" placeholder="请选择铁路线">
<el-form-item label="所在铁路线:" prop="wayId">
<el-select
v-model="monitorForm.wayId"
placeholder="请选择铁路线"
@change="changerailWay()"
>
<el-option
v-for="item in FSUrailway"
:key="item.key"
:label="item.label"
:value="item.key"
v-for="item in railWaySelect"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="所在站点:" prop="siteId">
<el-select v-model="monitorForm.siteId" placeholder="请选择站点" @change="changesite()">
<el-option
v-for="item in stationSelect2"
:key="item.id"
:label="item.siteName"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="所在FSU:" prop="fsuId">
<el-select v-model="monitorForm.fsuId" placeholder="请选择FSU">
<el-option
v-for="item in fsuSelect2"
:key="item.id"
:label="item.equipName"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
......@@ -22,32 +46,53 @@
v-model="monitorForm.equipCode"
placeholder="请输入设备身份编号"
/>
</el-form-item>
<el-form-item label="设备名称:" prop="equipName">
<el-input v-model="monitorForm.equipName" placeholder="请输入设备名称" />
</el-form-item>
<el-form-item label="设备厂商:" prop="equipFactory">
<el-input
v-model="monitorForm.equipFactory"
placeholder="请输入设备厂商"
/>
</el-form-item>
<el-form-item label="设备类别:" prop="equipType">
<el-select
v-model="monitorForm.equipType"
placeholder="请输入设备类别"
>
<el-option
v-for="item in equipTypeSelect"
:key="item.key"
:label="item.label"
:value="item.key"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="设备型号:" prop="equipMode">
<el-input
<el-select
v-model="monitorForm.equipMode"
placeholder="请输入设备型号"
/>
</el-form-item>
<el-form-item label="设备名:" prop="equipName">
<el-input v-model="monitorForm.equipName" placeholder="请输入设备名" />
>
<el-option
v-for="item in equipModeSelect"
:key="item.key"
:label="item.label"
:value="item.key"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="设备生产序列号:" prop="equipSerialNumber">
<el-input
v-model="monitorForm.equipSerialNumber"
placeholder="请输入设备生产序列号"
/>
</el-form-item>
<el-form-item label="设备类别:" prop="equipType">
<el-form-item label="设备所在铁路公里标:" prop="kmSign">
<el-input
v-model="monitorForm.equipType"
placeholder="请输入设备类别"
v-model="monitorForm.kmSign"
placeholder="请输入设备所在铁路公里标"
/>
</el-form-item>
<el-form-item label="安装日期:" prop="installDate">
......@@ -56,12 +101,7 @@
placeholder="请输入安装日期"
/>
</el-form-item>
<el-form-item label="设备所在铁路公里标:" prop="kmSign">
<el-input
v-model="monitorForm.kmSign"
placeholder="请输入设备所在铁路公里标"
/>
</el-form-item>
<el-form-item label=" 维护日期:" prop="repairDate">
<el-input
v-model="monitorForm.repairDate"
......@@ -77,11 +117,18 @@
</template>
<script>
import { monitorEquipsave } from "../../api";
import { mapGetters, mapActions } from "vuex";
import { successAlert,warningAlert } from "@/utils/alert";
export default {
props: [],
components: {},
data() {
return {
railWaySelect: [],
stationSelect: [],
stationSelect2: [],
fsuSelect: [],
fsuSelect2: [],
FSUrailway: [
{
key: 6,
......@@ -91,8 +138,40 @@ export default {
key: 12,
label: "南昆客运专线",
},
],
equipTypeSelect: [
{
key: 0,
label: "漏缆监控单元",
},
{
key: 1,
label: "漏缆监控单元2",
},
{
key: 2,
label: "漏缆监控单元3",
},
],
equipModeSelect: [
{
key: 0,
label: "型号",
},
{
key: 1,
label: "型号2",
},
{
key: 2,
label: "型号3",
},
],
monitorForm: {
wayId:"",
parentId:"",
siteId:"",
fsuId:"",
equipCode: "",
equipFactory: "",
equipMode: 0,
......@@ -101,7 +180,7 @@ export default {
equipType: 0,
installDate: "2022-02-24 12:24:84",
kmSign: "",
parentId: 0,
repairDate: "2022-02-24 12:24:84",
},
rules: {
......@@ -142,17 +221,54 @@ export default {
},
};
},
computed: {},
computed: {
...mapGetters({
railWaylist: "railWay/list",
stationlist: "station/list",
fsulist: "FSU/list",
}),
},
methods: {
...mapActions({
asyncrailWayList: "railWay/asyncList",
asyncstationList: "station/asyncList",
asyncfsuList: "FSU/asyncList",
}),
changerailWay() {
this.stationSelect2 = this.stationlist.filter(
(item) => item.parentId === this.monitorForm.wayId
);
},
changesite() {
this.fsuSelect2 = this.fsuSelect.filter(
(item) => item.parentId === this.monitorForm.siteId
);
},
reset() {
this.$refs.monitorForm.resetFields();
},
submit() {
this.$refs.monitorForm.validate((valid) => {
if (valid) {
monitorEquipsave(this.monitorForm).then((res) => {});
this.monitorForm.parentId=this.monitorForm.fsuId
monitorEquipsave(this.monitorForm).then((res) => {
if (res.code==200) {
successAlert("添加成功")
console.log(res);
}else{
warning("添加失败")
}
});
}
this.monitorForm = {
wayId:"",
parentId:"",
siteId:"",
fsuId:"",
equipCode: "",
equipFactory: "",
equipMode: 0,
......@@ -161,13 +277,21 @@ export default {
equipType: 0,
installDate: "2022-02-22 12:24:84",
kmSign: "",
parentId: 0,
repairDate: "2022-02-24 12:24:84",
};
});
},
},
mounted() {},
mounted() {
this.asyncrailWayList();
this.asyncstationList();
this.asyncfsuList();
this.railWaySelect = this.railWaylist;
this.stationSelect = this.stationlist;
this.fsuSelect = this.fsulist;
},
};
</script>
<style lang="scss" scoped>
......
......@@ -37,6 +37,7 @@
</template>
<script>
import { railWaysave } from "../../api";
import { successAlert,warningAlert } from "@/utils/alert";
export default {
props: [],
components: {},
......@@ -77,7 +78,14 @@ export default {
submit() {
this.$refs.form.validate((valid) => {
if (valid) {
railWaysave(this.formData).then((res) => {});
railWaysave(this.formData).then((res) => {
if (res.code==200) {
successAlert("添加成功")
console.log(res);
}else{
warning("添加失败")
}
});
}
this.formData = {
endPointName: "",
......
......@@ -7,13 +7,13 @@
label-width="200px"
class="form"
>
<el-form-item label="站点所属铁路线:" prop="parentId">
<el-select v-model="stationForm.parentId" placeholder="请选择铁路线">
<el-form-item label="站点所属铁路线:" prop="wayId">
<el-select v-model="stationForm.wayId" placeholder="请选择铁路线">
<el-option
v-for="item in FSUrailway"
:key="item.key"
:label="item.label"
:value="item.key"
v-for="item in railWaySelect"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
......@@ -75,12 +75,13 @@
<script>
import { sitesave } from "../../api";
import { mapGetters, mapActions } from "vuex";
import { successAlert,warningAlert } from "@/utils/alert";
export default {
props: [],
components: {},
data() {
return {
FSUrailway: [
railWaySelect: [
{
key: 6,
label: "张呼客运专线",
......@@ -91,7 +92,8 @@ export default {
},
],
stationForm: {
parentId: 6,
parentId: "",
wayId:'',
siteCode: "",
siteName: "",
siteAddress: "",
......@@ -105,7 +107,11 @@ export default {
rules: {
parentId: [
{ required: true, message: "请选择铁路线", trigger: "blur" },
// { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
],
wayId: [
{ required: true, message: "请选择铁路线", trigger: "blur" },
],
siteCode: [
{ required: true, message: "请输入站点编号", trigger: "blur" },
......@@ -135,21 +141,47 @@ export default {
},
};
},
computed: {},
computed: {
...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)
}
}
return arrarea
},
reset() {
this.$refs.stationform.resetFields();
},
submit() {
this.$refs.stationform.validate((valid) => {
if (valid) {
sitesave(this.stationForm).then((res) => {});
}
this.stationForm.parentId=this.stationForm.wayId
console.log(this.stationForm);
sitesave(this.stationForm).then((res) => {
if (res.code==200) {
successAlert("添加成功")
console.log(res);
}else{
warning("添加失败")
}
});
}
this.stationForm = {
parentId: 0,
parentId: '',
wayId:'',
siteCode: "",
siteName: "",
siteAddress: "",
......@@ -164,7 +196,10 @@ export default {
},
},
mounted() {
// this.asyncrailWayList()
this.asyncrailWayList()
this.railWaySelect= this.railWaylist;
},
};
</script>
......
......@@ -12,6 +12,7 @@ const path = {
sitesave: 'site/save',
sitebatchDelete: 'site/batchDelete',
siteselectList: 'site/selectList',
selectForSite:'site/selectForSite',//铁路查站点
fsuList: 'fsu/selectPage',
fsudetail: 'fsu/detail',
......@@ -51,6 +52,11 @@ export function railWayselectList() {
}
//站点
// export function selectForSite() {
// return request.post(path.selectForSite, ...arguments)
// }
export function sitelist() {
return request.post(path.sitelist, ...arguments)
}
......
......@@ -32,14 +32,14 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column prop="name" label="铁路名称" align="center" />
<el-table-column prop="equipName" label="设备名称" align="center" />
<el-table-column
prop="parentId"
prop="wayId"
label="所在铁路线"
align="center"
/>
<el-table-column
prop="station"
prop="siteId"
label="所在站点"
show-overflow-tooltip
align="center"
......@@ -114,6 +114,148 @@
</template>
</el-table-column>
</el-table>
<el-dialog
:showClose="false"
title="FSU详情"
:visible.sync="visible"
width="500px">
<table style="margin: auto" class="device-detail-tb">
<tr style="line-height: 50px">
<td style="width: 170px">
<label >铁路名称:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="Info.name"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 170px">
<label >所在铁路线:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="Info.parentId"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 170px">
<label >所在站点:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="Info.station"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 170px">
<label >FSU身份编号:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="Info.fsuCode"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 170px">
<label >FSU端口数:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="Info.fsuPort"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 170px">
<label >IP地址:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="Info.ip"></label>
</td>
</tr> <tr style="line-height: 50px">
<td style="width: 170px">
<label >设备厂商:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="Info.equipFactory"></label>
</td>
</tr> <tr style="line-height: 50px">
<td style="width: 170px">
<label >设备备用方式:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="Info.backupMode"></label>
</td>
</tr> <tr style="line-height: 50px">
<td style="width: 170px">
<label >通信方式:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="Info.connectMode"></label>
</td>
</tr> <tr style="line-height: 50px">
<td style="width: 170px">
<label >设备类型:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="Info.equipType"></label>
</td>
</tr> <tr style="line-height: 50px">
<td style="width: 170px">
<label >设备子类型:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="Info.equipSubType"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 170px">
<label >软件版本号:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="Info.softVersion"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 170px">
<label >设备生产序列号:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="Info.equipSerialNumber"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 170px">
<label >设备所在铁路公里标:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="Info.kmSign"></label>
</td>
</tr>
</table>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="visible=false"
>关闭</el-button
></span>
</el-dialog>
<pagination
:limit="params.pageSize"
:page="params.pageNum"
......@@ -126,11 +268,14 @@
<script>
import Pagination from "@/components/Pagination";
import { fsulist, fsubatchDelete, fsudetail } from "../../api";
import { successAlert,warningAlert } from "@/utils/alert";
export default {
props: [],
components: { Pagination },
data() {
return {
Info:[],
visible:false,
tableData: [],
params: {
pageNum: 1,
......@@ -151,8 +296,15 @@ export default {
},
delData() {
let ids = this.ids;
fsubatchDelete({ ids }).then((res) => {});
this.getTableData();
fsubatchDelete({ ids }).then((res) => {
if (res.code==200) {
successAlert("删除成功");
this.getTableData();
}else{
warningAlert("删除失败")
}
});
},
refresh() {
this.getTableData();
......@@ -170,7 +322,8 @@ export default {
let id = row.id;
fsudetail({ id }).then((res) => {
this.Info=res
this.visible=true
});
},
handlePageChange(pageData) {
......@@ -179,16 +332,13 @@ 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,
};
fsulist(params).then((res) => {
console.log(res.records);
let list = res.records || [];
this.tableData = list;
this.total = res.total;
......@@ -201,6 +351,7 @@ export default {
};
</script>
<style lang="scss" scoped>
.leakage-cable {
.leakage-top {
margin-bottom: 20px;
......
......@@ -34,7 +34,7 @@
<el-table-column type="selection" width="55" align="center" />
<el-table-column
prop="parentId"
prop="wayId"
label="所在铁路线"
align="center"
/>
......@@ -114,6 +114,7 @@
<script>
import Pagination from "@/components/Pagination";
import { leakyCablelist, leakyCablebatchDelete, leakyCabledetail } from "../../api";
import { successAlert,warningAlert } from "@/utils/alert";
export default {
props: [],
components: { Pagination },
......@@ -139,10 +140,20 @@ export default {
},
delData() {
let ids = this.ids;
leakyCablebatchDelete({ ids }).then((res) => {});
leakyCablebatchDelete({ ids }).then((res) => {
if (res.code==200) {
successAlert("删除成功");
this.getTableData();
}else{
warningAlert("删除失败")
}
});
},
refresh() {
this.getTableData();
},
refresh() {},
query() {},
exportData() {},
handleSelectionChange(val) {
......
......@@ -33,7 +33,7 @@
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column prop="parentId" label="站点所属铁路线" align="center" />
<el-table-column prop="wayId" label="站点所属铁路线" align="center" />
<el-table-column prop="equipCode" label="设备身份编号" align="center" />
<el-table-column
prop="equipFactory"
......@@ -112,6 +112,7 @@ import {
monitorEquipbatchDelete,
monitorEquipdetail,
} from "../../api";
import { successAlert,warningAlert } from "@/utils/alert";
export default {
props: [],
components: { Pagination },
......@@ -137,8 +138,15 @@ export default {
},
delData() {
let ids = this.ids;
monitorEquipbatchDelete({ ids }).then((res) => {});
this.getTableData();
monitorEquipbatchDelete({ ids }).then((res) => {
if (res.code==200) {
successAlert("删除成功");
this.getTableData();
}else{
warningAlert("删除失败")
}
});
},
refresh() {
this.getTableData();
......@@ -174,7 +182,7 @@ export default {
size: this.params.pageSize,
};
monitorEquiplist(params).then((res) => {
console.log(res.records);
let list = res.records || [];
this.tableData = list;
this.total = res.total;
......
......@@ -63,6 +63,62 @@
</template>
</el-table-column>
</el-table>
<el-dialog
:showClose="false"
title="铁路线详情"
:visible.sync="visible"
width="500px">
<table style="margin: auto" class="device-detail-tb">
<tr style="line-height: 50px">
<td style="width: 145px">
<label >铁路名:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="Info.name"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 145px">
<label >铁路线起点站名:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="Info.startPointName"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 145px">
<label >铁路线终点站名:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="Info.endPointName"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 145px">
<label >铁路全长(公里):</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="Info.totalLong"></label>
</td>
</tr>
</table>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="visible=false"
>关闭</el-button
></span>
</el-dialog>
<pagination
:limit="params.pageSize"
:page="params.pageNum"
......@@ -75,11 +131,14 @@
<script>
import Pagination from "@/components/Pagination";
import { railWaylist, railWaybatchDelete, railWaydetail } from "../../api";
import { successAlert,warningAlert } from "@/utils/alert";
export default {
props: [],
components: { Pagination },
data() {
return {
visible: false,
Info:[],
tableData: [],
params: {
pageNum: 1,
......@@ -92,6 +151,7 @@ export default {
},
computed: {},
methods: {
tableRowClassName({ row, rowIndex }) {
return rowIndex % 2 === 0 ? "" : "single-row";
},
......@@ -100,8 +160,15 @@ export default {
},
delData() {
let ids = this.ids;
railWaybatchDelete({ ids }).then((res) => {});
this.getTableData();
railWaybatchDelete({ ids }).then((res) => {
if (res.code==200) {
successAlert("删除成功");
this.getTableData();
}else{
warningAlert("删除失败")
}
});
},
refresh() {
this.getTableData();
......@@ -116,7 +183,13 @@ export default {
handleView(row) {
let id = row.id;
railWaydetail({ id }).then((res) => {});
railWaydetail({ id }).then((res) => {
console.log(res);
// this.$router.push('/')
// this.visible=true
this.Info=res
console.log(this.Info);
});
},
handlePageChange(pageData) {
this.params.pageSize = pageData.size;
......
......@@ -32,7 +32,7 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column prop="parentId" label="站点所属铁路线" align="center" />
<el-table-column prop="wayId" label="站点所属铁路线" align="center" />
<el-table-column prop="siteCode" label="站点编号" align="center" />
<el-table-column
prop="siteName"
......@@ -68,7 +68,7 @@
align="center"
/> <el-table-column
prop="siteLongitude"
label="站点度"
label="站点度"
show-overflow-tooltip
align="center"
/> <el-table-column
......@@ -90,6 +90,112 @@
</template>
</el-table-column>
</el-table>
<el-dialog
:showClose="false"
title="站点详情"
:visible.sync="visible"
width="500px">
<table style="margin: auto" class="device-detail-tb">
<tr style="line-height: 50px">
<td style="width: 145px">
<label >站点所属铁路线:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="Info.wayId"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 145px">
<label >站点编号:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="Info.siteCode"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 145px">
<label >站名:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="Info.siteName"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 145px">
<label >站点地址:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="Info.siteAddress"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 145px">
<label >站点所在局:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="Info.siteArea"></label>
</td>
</tr> <tr style="line-height: 50px">
<td style="width: 145px">
<label >站点所在段号:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="Info.siteSectionCode"></label>
</td>
</tr> <tr style="line-height: 50px">
<td style="width: 145px">
<label >站点所在公里标:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="Info.siteKmSign"></label>
</td>
</tr> <tr style="line-height: 50px">
<td style="width: 145px">
<label >站点经度:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="Info.siteLatitude"></label>
</td>
</tr> <tr style="line-height: 50px">
<td style="width: 145px">
<label >站点纬度:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="Info.siteLongitude"></label>
</td>
</tr> <tr style="line-height: 50px">
<td style="width: 145px">
<label >站点其他信息:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="Info.siteOtherMessage"></label>
</td>
</tr>
</table>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="visible=false"
>关闭</el-button
></span>
</el-dialog>
<pagination
:limit="params.pageSize"
:page="params.pageNum"
......@@ -102,12 +208,14 @@
<script>
import Pagination from "@/components/Pagination";
import { sitelist,sitebatchDelete,sitedetail } from "../../api";
import { successAlert,warningAlert } from "@/utils/alert";
export default {
props: [],
components: { Pagination },
data() {
return {
visible:false,
Info:[],
tableData:[],
params: {
pageNum: 1,
......@@ -129,8 +237,15 @@ export default {
},
delData() {
let ids = this.ids;
sitebatchDelete({ ids }).then((res) => {});
this.getTableData();
sitebatchDelete({ ids }).then((res) => {
if (res.code==200) {
successAlert("删除成功");
this.getTableData();
}else{
warningAlert("删除失败")
}
});
},
refresh() {
this.getTableData();
......@@ -148,7 +263,9 @@ export default {
let id = row.id;
sitedetail({ id }).then((res) => {
this.Info=res
this.visible=true
console.log(this.Info);
});
},
handlePageChange(pageData) {
......@@ -166,6 +283,7 @@ export default {
size: this.params.pageSize,
};
sitelist(params).then((res) => {
console.log(res.records);
let list = res.records || [];
this.tableData = list;
this.total = res.total;
......
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