Commit 1fd694d9 authored by neogcg's avatar neogcg

3/7

parent f43c95f6
...@@ -5,11 +5,7 @@ import app from './modules/app' ...@@ -5,11 +5,7 @@ import app from './modules/app'
import settings from './modules/settings' import settings from './modules/settings'
import user from './modules/user' import user from './modules/user'
import depart from './modules/depart' 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'
import leaky from './modules/leaky'
Vue.use(Vuex) Vue.use(Vuex)
...@@ -19,11 +15,7 @@ const store = new Vuex.Store({ ...@@ -19,11 +15,7 @@ const store = new Vuex.Store({
settings, settings,
user, user,
depart, depart,
railWay,
station,
FSU,
monitor,
leaky
}, },
getters getters
}) })
......
import { fsulist } from "../../views/setting/api"
const state = {
list: [],
pageNum:1,
pageSize:10,
}
const mutations = {
changeList(state, arr) {
state.list = arr
},
changePagesize(state,total){
state.pageSize=total
}
}
const actions = {
asyncList(context) {
fsulist( {
current: context.state.pageNum,
size: context.state.pageSize,
}).then(res => {
let total=res.total
if (res.total>state.pageSize) {
context.commit("changePagesize", total)
context.dispatch("asyncList")
}
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 { leakyCablelist } from "../../views/setting/api"
const state = {
list: [],
pageNum: 1,
pageSize: 10,
}
const mutations = {
changeList(state, arr) {
state.list = arr
},
changePagesize(state, total) {
state.pageSize = total
}
}
const actions = {
asyncList(context) {
leakyCablelist({
current: context.state.pageNum,
size: context.state.pageSize,
}).then(res => {
let total = res.total
if (res.total > state.pageSize) {
context.commit("changePagesize", total)
context.dispatch("asyncList")
}
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
},
changePagesize(state,total){
state.pageSize=total
}
}
const actions = {
asyncList(context) {
monitorEquiplist( {
current: context.state.pageNum,
size: context.state.pageSize,
}).then(res => {
let total=res.total
if (res.total>state.pageSize) {
context.commit("changePagesize", total)
context.dispatch("asyncList")
}
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: [],
pageNum:1,
pageSize:10,
}
const mutations = {
changeList(state, arr) {
state.list = arr
},
changePagesize(state,total){
state.pageSize=total
}
}
const actions = {
asyncList(context) {
railWaylist( {
current: context.state.pageNum,
size: context.state.pageSize,
}).then(res => {
let total=res.total
if (res.total>state.pageSize) {
context.commit("changePagesize", total)
context.dispatch("asyncList")
}
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 { sitelist } from "../../views/setting/api"
const state = {
list: [],
pageNum:1,
pageSize:10,
}
const mutations = {
changeList(state, arr) {
state.list = arr
},
changePagesize(state,total){
state.pageSize=total
}
}
const actions = {
asyncList(context) {
sitelist( {
current: context.state.pageNum,
size: context.state.pageSize,
}).then(res => {
let total=res.total
if (res.total>state.pageSize) {
context.commit("changePagesize", total)
context.dispatch("asyncList")
}
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
...@@ -119,18 +119,13 @@ ...@@ -119,18 +119,13 @@
</div> </div>
</template> </template>
<script> <script>
import { fsusave, selectFsuItem, selectForSite } from "../../api"; import { fsusave, selectFsuItem, selectForSite, railWaylist } from "../../api";
import { mapGetters, mapActions } from "vuex";
import { successAlert, warningAlert } from "@/utils/alert"; import { successAlert, warningAlert } from "@/utils/alert";
export default { export default {
props: [], props: [],
components: {}, components: {},
data() { data() {
return { return {
asd: {
"01": [{ ss: "dasda", fsa: "dasd" }],
"02": [{ ss2: "dasda", fsasdasd: "dasd" }],
},
type: 1, type: 1,
railWaySelect: [], railWaySelect: [],
stationSelect: [], stationSelect: [],
...@@ -139,24 +134,10 @@ export default { ...@@ -139,24 +134,10 @@ export default {
connectModeSelect: [], connectModeSelect: [],
equipTypeSelect: [], equipTypeSelect: [],
equipSubTypeSelect: [], equipSubTypeSelect: [],
FSUForm: { FSUForm: formInit(),
backupMode: '', params: {
connectMode: '', current: 1,
equipFactory: "设备厂商1", size: 10,
equipName: "设备名称1",
equipSerialNumber: "4651",
equipSubType: '',
equipType: '',
fsuCode: "212",
fsuPort: 10,
ip: "192.168.2.1",
kmSign: "46511",
parentId: '',
siteId: '',
wayId: '',
siteName: "站点1",
softVersion: "6.0.2",
}, },
rules: { rules: {
wayId: [{ required: true, message: "请选择铁路线", trigger: "blur" }], wayId: [{ required: true, message: "请选择铁路线", trigger: "blur" }],
...@@ -202,24 +183,12 @@ export default { ...@@ -202,24 +183,12 @@ export default {
}, },
}; };
}, },
computed: { computed: {},
...mapGetters({
railWaylist: "railWay/list",
stationlist: "station/list",
}),
},
methods: { methods: {
...mapActions({
asyncrailWayList: "railWay/asyncList",
asyncstationList: "station/asyncList",
}),
changerailWay() { changerailWay() {
selectForSite({ wayId: this.FSUForm.wayId }).then((res) => {
this.stationSelect2 = res;
this.stationSelect2 = this.stationlist.filter( });
(item) => item.parentId === this.FSUForm.wayId
);
}, },
readNodes(aaa = [], arrarea = []) { readNodes(aaa = [], arrarea = []) {
for (let item of aaa) { for (let item of aaa) {
...@@ -238,32 +207,25 @@ export default { ...@@ -238,32 +207,25 @@ export default {
if (valid) { if (valid) {
this.FSUForm.parentId = this.FSUForm.siteId; this.FSUForm.parentId = this.FSUForm.siteId;
this.FSUForm.fsuPort = Number(this.FSUForm.fsuPort); this.FSUForm.fsuPort = Number(this.FSUForm.fsuPort);
fsusave(this.FSUForm).then((res) => { fsusave(this.FSUForm).then((res) => {
if (res.code == 200) { if (res.code == 200) {
successAlert("添加成功"); successAlert("添加成功");
} else { } else {
warning("添加失败"); warningAlert("添加失败");
} }
}); });
} }
this.FSUForm = { this.FSUForm = formInit();
parentId: "", });
wayId: "", },
fsuCode: "", getAllWay() {
fsuPort: "", railWaylist(this.params).then((res) => {
equipName: "", this.railWaySelect = res.records;
ip: "", if (res.total > this.params.size) {
equipFactory: "", this.params.size = res.total;
backupMode: "", this.getAllWay();
connectMode: "", }
equipType: "",
equipSubType: "",
softVersion: "",
equipSerialNumber: "",
kmSign: "",
};
}); });
}, },
}, },
...@@ -273,18 +235,31 @@ export default { ...@@ -273,18 +235,31 @@ export default {
this.connectModeSelect = res["02"]; this.connectModeSelect = res["02"];
this.equipTypeSelect = res["03"]; this.equipTypeSelect = res["03"];
this.equipSubTypeSelect = res["04"]; this.equipSubTypeSelect = res["04"];
}); });
}, },
mounted() { mounted() {
this.asyncrailWayList(); this.getAllWay();
this.asyncstationList();
this.railWaySelect = this.railWaylist;
this.stationSelect = this.stationlist;
}, },
}; };
function formInit(data = {}) {
return {
parentId: "",
wayId: "",
fsuCode: "",
fsuPort: "",
equipName: "",
ip: "",
equipFactory: "",
backupMode: "",
connectMode: "",
equipType: "",
equipSubType: "",
softVersion: "",
equipSerialNumber: "",
kmSign: "",
...data,
};
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.form { .form {
......
...@@ -131,8 +131,12 @@ ...@@ -131,8 +131,12 @@
</div> </div>
</template> </template>
<script> <script>
import { leakyCablesave } from "../../api"; import {
import { mapGetters, mapActions } from "vuex"; leakyCablesave,
selectForSite,
selectForFsu,
selectForEquip,
} from "../../api";
import { successAlert, warningAlert } from "@/utils/alert"; import { successAlert, warningAlert } from "@/utils/alert";
export default { export default {
props: [], props: [],
...@@ -143,32 +147,11 @@ export default { ...@@ -143,32 +147,11 @@ export default {
stationSelect2: [], stationSelect2: [],
fsuSelect2: [], fsuSelect2: [],
monitor2: [], monitor2: [],
FSUrailway: [ FSUrailway: [],
{ leakyCableForm: formInit(),
key: 6, params: {
label: "张呼客运专线", current: 1,
}, size: 10,
{
key: 12,
label: "南昆客运专线",
},
],
leakyCableForm: {
wayId: "",
siteId: "",
fsuId: "",
monitor: "",
antennaFeederLength: 0,
hundredMetersLoss: 0,
inserterLength: 0,
jumperLength: 0,
leakyCableCode: "22",
leakyCableDescribe: "打打",
leakyCableLength: 0,
leakyCableMode: "打打",
parentId: 0,
reductRatio: 0,
sendPower: 0,
}, },
rules: { rules: {
parentId: [ parentId: [
...@@ -220,35 +203,22 @@ export default { ...@@ -220,35 +203,22 @@ export default {
}, },
}; };
}, },
computed: { computed: {},
...mapGetters({
railWaylist: "railWay/list",
stationlist: "station/list",
fsulist: "FSU/list",
monitorEquiplist: "monitor/list",
}),
},
methods: { methods: {
...mapActions({
asyncrailWayList: "railWay/asyncList",
asyncstationList: "station/asyncList",
asyncfsuList: "FSU/asyncList",
asyncmonitorList: "monitor/asyncList",
}),
changerailWay() { changerailWay() {
this.stationSelect2 = this.stationlist.filter( selectForSite({ wayId: this.leakyCableForm.wayId }).then((res) => {
(item) => item.parentId === this.leakyCableForm.wayId this.stationSelect2 = res;
); });
}, },
changesite() { changesite() {
this.fsuSelect2 = this.fsulist.filter( selectForFsu({ siteId: this.leakyCableForm.siteId }).then((res) => {
(item) => item.parentId === this.leakyCableForm.siteId this.fsuSelect2 = res;
); });
}, },
changefsu() { changefsu() {
this.monitor2 = this.monitorEquiplist.filter( selectForEquip({ fsuId: this.leakyCableForm.fsuId }).then((res) => {
(item) => item.parentId === this.leakyCableForm.fsuId this.monitor2 = res;
); });
}, },
reset() { reset() {
this.$refs.leakyCableForm.resetFields(); this.$refs.leakyCableForm.resetFields();
...@@ -260,39 +230,47 @@ export default { ...@@ -260,39 +230,47 @@ export default {
if (res.code == 200) { if (res.code == 200) {
successAlert("添加成功"); successAlert("添加成功");
} else { } else {
warning("添加失败"); warningAlert("添加失败");
} }
}); });
} }
this.leakyCableForm = { this.leakyCableForm = formInit();
parentId: "", });
siteId: "", },
fsuId: "", getAllWay() {
monitor: "", railWaylist(this.params).then((res) => {
antennaFeederLength: 0, this.railWaySelect = res.records;
hundredMetersLoss: 0, if (res.total > this.params.size) {
inserterLength: 0, this.params.size = res.total;
jumperLength: 0, this.getAllWay();
leakyCableCode: "22", }
leakyCableDescribe: "打打",
leakyCableLength: 0,
leakyCableMode: "打打",
parentId: 0,
reductRatio: 0,
sendPower: 0,
};
}); });
}, },
}, },
mounted() { mounted() {
this.asyncrailWayList(); this.getAllWay();
this.asyncstationList();
this.asyncfsuList();
this.asyncmonitorList();
this.railWaySelect = this.railWaylist;
}, },
}; };
function formInit(data = {}) {
return {
parentId: "",
siteId: "",
fsuId: "",
monitor: "",
antennaFeederLength: 0,
hundredMetersLoss: 0,
inserterLength: 0,
jumperLength: 0,
leakyCableCode: "",
leakyCableDescribe: "",
leakyCableLength: 0,
leakyCableMode: "",
parentId: 0,
reductRatio: 0,
sendPower: 0,
...data,
};
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.form { .form {
......
...@@ -64,10 +64,7 @@ ...@@ -64,10 +64,7 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="IP:" prop="ip"> <el-form-item label="IP:" prop="ip">
<el-input <el-input v-model="monitorForm.ip" placeholder="请输入设备厂商" />
v-model="monitorForm.ip"
placeholder="请输入设备厂商"
/>
</el-form-item> </el-form-item>
<el-form-item label="设备类别:" prop="equipType"> <el-form-item label="设备类别:" prop="equipType">
<el-select v-model="monitorForm.equipType" placeholder="请输入设备类别"> <el-select v-model="monitorForm.equipType" placeholder="请输入设备类别">
...@@ -103,26 +100,27 @@ ...@@ -103,26 +100,27 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="安装日期:" prop="installDate"> <el-form-item label="安装日期:" prop="installDate">
<el-date-picker
<el-date-picker v-model="monitorForm.installDate"
v-model="monitorForm.installDate" type="datetime"
type="datetime" placeholder="请选择安装日期"
placeholder="请选择安装日期" format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd HH:mm:ss" style="width: 400px"
style="width:400px" value-format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label=" 维护日期:" prop="repairDate"> <el-form-item label=" 维护日期:" prop="repairDate">
<el-date-picker <el-date-picker
v-model="monitorForm.repairDate" v-model="monitorForm.repairDate"
type="datetime" type="datetime"
placeholder="请选择维护日期" placeholder="请选择维护日期"
format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss"
style="width:400px" style="width: 400px"
value-format="yyyy-MM-dd HH:mm:ss"> value-format="yyyy-MM-dd HH:mm:ss"
</el-date-picker> >
</el-date-picker>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="btn"> <div class="btn">
...@@ -132,8 +130,14 @@ ...@@ -132,8 +130,14 @@
</div> </div>
</template> </template>
<script> <script>
import { monitorEquipsave, selectMonitorItem } from "../../api"; import {
import { mapGetters, mapActions } from "vuex"; railWaylist,
monitorEquipsave,
selectMonitorItem,
selectForSite,
selectForFsu,
} from "../../api";
import { successAlert, warningAlert } from "@/utils/alert"; import { successAlert, warningAlert } from "@/utils/alert";
export default { export default {
props: [], props: [],
...@@ -141,38 +145,14 @@ export default { ...@@ -141,38 +145,14 @@ export default {
data() { data() {
return { return {
railWaySelect: [], railWaySelect: [],
stationSelect: [],
stationSelect2: [], stationSelect2: [],
fsuSelect: [],
fsuSelect2: [], fsuSelect2: [],
FSUrailway: [
{
key: 6,
label: "张呼客运专线",
},
{
key: 12,
label: "南昆客运专线",
},
],
equipTypeSelect: [], equipTypeSelect: [],
equipModeSelect: [], equipModeSelect: [],
monitorForm: { monitorForm: formInit(),
wayId: "", params: {
parentId: "", current: 1,
siteId: "", size: 10,
fsuId: "",
ip:"",
equipCode: "",
equipFactory: "",
equipMode: "",
equipName: "",
equipSerialNumber: "",
equipType: "",
installDate: "",
kmSign: "",
repairDate: "",
}, },
rules: { rules: {
parentId: [ parentId: [
...@@ -184,9 +164,7 @@ export default { ...@@ -184,9 +164,7 @@ export default {
equipFactory: [ equipFactory: [
{ required: true, message: "请输入设备厂商", trigger: "blur" }, { required: true, message: "请输入设备厂商", trigger: "blur" },
], ],
ip: [ ip: [{ required: true, message: "请输入IP", trigger: "blur" }],
{ required: true, message: "请输入IP", trigger: "blur" },
],
equipMode: [ equipMode: [
{ required: true, message: "请选择设备型号", trigger: "blur" }, { required: true, message: "请选择设备型号", trigger: "blur" },
], ],
...@@ -215,68 +193,48 @@ export default { ...@@ -215,68 +193,48 @@ export default {
}, },
}; };
}, },
computed: { computed: {},
...mapGetters({
railWaylist: "railWay/list",
stationlist: "station/list",
fsulist: "FSU/list",
}),
},
methods: { methods: {
...mapActions({
asyncrailWayList: "railWay/asyncList",
asyncstationList: "station/asyncList",
asyncfsuList: "FSU/asyncList",
}),
changerailWay() { changerailWay() {
selectForSite({ wayId: this.monitorForm.wayId }).then((res) => {
this.stationSelect2 = this.stationlist.filter( this.stationSelect2 = res;
(item) => item.parentId === this.monitorForm.wayId });
);
}, },
changesite() { changesite() {
this.fsuSelect2 = this.fsulist.filter( selectForFsu({ siteId: this.monitorForm.siteId }).then((res) => {
(item) => item.parentId === this.monitorForm.siteId this.fsuSelect2 = res;
); console.log(this.fsuSelect2);
});
}, },
reset() { reset() {
this.$refs.monitorForm.resetFields(); this.$refs.monitorForm.resetFields();
}, },
submit() { submit() {
this.$refs.monitorForm.validate((valid) => { this.$refs.monitorForm.validate((valid) => {
if (valid) { if (valid) {
this.monitorForm.parentId = this.monitorForm.fsuId; this.monitorForm.parentId = this.monitorForm.fsuId;
monitorEquipsave(this.monitorForm).then((res) => { monitorEquipsave(this.monitorForm).then((res) => {
if (res.code == 200) { if (res.code == 200) {
successAlert("添加成功"); successAlert("添加成功");
} else { } else {
warning("添加失败"); warningAlert("添加失败");
} }
}); });
} }
this.monitorForm = { this.monitorForm = formInit();
wayId: "", });
parentId: "", },
siteId: "",
fsuId: "",
equipCode: "",
ip:"",
equipFactory: "",
equipMode: "",
equipName: "",
equipSerialNumber: "",
equipType: "",
installDate: "",
kmSign: "",
repairDate: "", getAllWay() {
}; railWaylist(this.params).then((res) => {
this.railWaySelect = res.records;
if (res.total > this.params.size) {
this.params.size = res.total;
this.getAllWay();
}
}); });
}, },
}, },
created() { created() {
selectMonitorItem().then((res) => { selectMonitorItem().then((res) => {
...@@ -285,14 +243,29 @@ export default { ...@@ -285,14 +243,29 @@ export default {
}); });
}, },
mounted() { mounted() {
this.asyncrailWayList(); this.getAllWay();
this.asyncstationList();
this.asyncfsuList();
this.railWaySelect = this.railWaylist;
this.stationSelect = this.stationlist;
this.fsuSelect = this.fsulist;
}, },
}; };
function formInit(data = {}) {
return {
wayId: "",
parentId: "",
siteId: "",
fsuId: "",
equipCode: "",
ip: "",
equipFactory: "",
equipMode: "",
equipName: "",
equipSerialNumber: "",
equipType: "",
installDate: "",
kmSign: "",
repairDate: "",
...data,
};
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.form { .form {
......
...@@ -44,17 +44,11 @@ export default { ...@@ -44,17 +44,11 @@ export default {
components: {}, components: {},
data() { data() {
return { return {
formData: { formData:formInit(),
endPointName: "", rules: {
name: "",
startPointName: "",
totalLong: "",
},
rules: {
name: [ name: [
{ required: true, message: "请输入铁路名", trigger: "blur" }, { required: true, message: "请输入铁路名", trigger: "blur" },
// { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
], ],
startPointName: [ startPointName: [
{ required: true, message: "请输入铁路线起点站名", trigger: "blur" }, { required: true, message: "请输入铁路线起点站名", trigger: "blur" },
...@@ -91,17 +85,21 @@ export default { ...@@ -91,17 +85,21 @@ export default {
} }
}); });
} }
this.formData = { this.formData = formInit();
endPointName: "",
name: "",
startPointName: "",
totalLong: "",
};
}); });
}, },
}, },
mounted() {}, mounted() {},
}; };
function formInit(data = {}) {
return {
endPointName: "",
name: "",
startPointName: "",
totalLong: "",
...data,
};
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.form { .form {
......
...@@ -73,36 +73,18 @@ ...@@ -73,36 +73,18 @@
</div> </div>
</template> </template>
<script> <script>
import { sitesave } from "../../api"; import { sitesave, railWaylist } from "../../api";
import { mapGetters, mapActions } from "vuex";
import { successAlert, warningAlert } from "@/utils/alert"; import { successAlert, warningAlert } from "@/utils/alert";
export default { export default {
props: [], props: [],
components: {}, components: {},
data() { data() {
return { return {
railWaySelect: [ railWaySelect: [],
{ stationForm: formInit(),
key: 6, params: {
label: "张呼客运专线", current: 1,
}, size: 10,
{
key: 12,
label: "南昆客运专线",
},
],
stationForm: {
parentId: "",
wayId: "",
siteCode: "",
siteName: "",
siteAddress: "",
siteArea: "",
siteSectionCode: "",
siteKmSign: "",
siteLatitude: "",
siteLongitude: "",
siteOtherMessage: "",
}, },
rules: { rules: {
parentId: [ parentId: [
...@@ -137,15 +119,8 @@ export default { ...@@ -137,15 +119,8 @@ export default {
}, },
}; };
}, },
computed: { computed: {},
...mapGetters({
railWaylist: "railWay/list",
}),
},
methods: { methods: {
...mapActions({
asyncrailWayList: "railWay/asyncList",
}),
readNodes(aaa = [], arrarea = []) { readNodes(aaa = [], arrarea = []) {
for (let item of aaa) { for (let item of aaa) {
arrarea.push({ id: item.id, name: item.name }); arrarea.push({ id: item.id, name: item.name });
...@@ -167,32 +142,43 @@ export default { ...@@ -167,32 +142,43 @@ export default {
if (res.code == 200) { if (res.code == 200) {
successAlert("添加成功"); successAlert("添加成功");
} else { } else {
warning("添加失败"); warningAlert("添加失败");
} }
}); });
} }
this.stationForm = { this.stationForm = formInit();
parentId: "", });
wayId: "", },
siteCode: "", getAllWay() {
siteName: "", railWaylist(this.params).then((res) => {
siteAddress: "", this.railWaySelect = res.records;
siteArea: "", if (res.total > this.params.size) {
siteSectionCode: "", this.params.size = res.total;
siteKmSign: "", this.getAllWay();
siteLatitude: "", }
siteLongitude: "",
siteOtherMessage: "",
};
}); });
}, },
}, },
mounted() { mounted() {
this.asyncrailWayList(); this.getAllWay();
this.railWaySelect = this.railWaylist;
}, },
}; };
function formInit(data = {}) {
return {
parentId: "",
wayId: "",
siteCode: "",
siteName: "",
siteAddress: "",
siteArea: "",
siteSectionCode: "",
siteKmSign: "",
siteLatitude: "",
siteLongitude: "",
siteOtherMessage: "",
...data,
};
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.form { .form {
......
...@@ -19,6 +19,8 @@ const path = { ...@@ -19,6 +19,8 @@ const path = {
fsusave: 'fsu/save', fsusave: 'fsu/save',
fsubatchDelete: 'fsu/batchDeleteFsu', fsubatchDelete: 'fsu/batchDeleteFsu',
fsuselectList: 'fsu/selectList', fsuselectList: 'fsu/selectList',
selectForFsu: 'fsu/selectForFsu',
selectFsuItem:'dict/selectFsuItem',//fsu数据字典 selectFsuItem:'dict/selectFsuItem',//fsu数据字典
monitorEquipList: 'monitorEquip/selectPage', monitorEquipList: 'monitorEquip/selectPage',
...@@ -26,7 +28,7 @@ const path = { ...@@ -26,7 +28,7 @@ const path = {
monitorEquipsave: 'monitorEquip/save', monitorEquipsave: 'monitorEquip/save',
monitorEquipbatchDelete: 'monitorEquip/batchDeleteEquip', monitorEquipbatchDelete: 'monitorEquip/batchDeleteEquip',
monitorEquipselectList: 'monitorEquip/selectList', monitorEquipselectList: 'monitorEquip/selectList',
selectForEquip: 'monitorEquip/selectForEquip',
selectMonitorItem:'dict/selectMonitorItem',//监测设备字典 selectMonitorItem:'dict/selectMonitorItem',//监测设备字典
leakyCableList: 'leakyCable/selectPage', leakyCableList: 'leakyCable/selectPage',
...@@ -34,15 +36,14 @@ const path = { ...@@ -34,15 +36,14 @@ const path = {
leakyCablesave: 'leakyCable/save', leakyCablesave: 'leakyCable/save',
leakyCablebatchDelete: 'leakyCable/batchDeleteEquip', leakyCablebatchDelete: 'leakyCable/batchDeleteEquip',
leakyCableselectList: 'leakyCable/selectList', leakyCableselectList: 'leakyCable/selectList',
selectForCable: 'leakyCable/selectForCable',
} }
// 铁路线 // 铁路线
export function railWaylist() { export function railWaylist() {
return request.post(path.railWaylist, ...arguments) 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() { export function railWaydetail() {
return request.post(path.railWaydetail, ...arguments) return request.post(path.railWaydetail, ...arguments)
} }
...@@ -60,9 +61,9 @@ export function railWayselectList() { ...@@ -60,9 +61,9 @@ export function railWayselectList() {
//站点 //站点
// export function selectForSite() { export function selectForSite() {
// return request.post(path.selectForSite, ...arguments) return request.post(path.selectForSite, ...arguments)
// } }
export function sitelist() { export function sitelist() {
...@@ -83,6 +84,9 @@ export function railWayselectList() { ...@@ -83,6 +84,9 @@ export function railWayselectList() {
} }
//fsu //fsu
export function selectForFsu() {
return request.post(path.selectForFsu, ...arguments)
}
export function selectFsuItem() {//fsu字典 export function selectFsuItem() {//fsu字典
return request.post(path.selectFsuItem, ...arguments) return request.post(path.selectFsuItem, ...arguments)
} }
...@@ -125,6 +129,9 @@ export function monitorEquipbatchDelete() { ...@@ -125,6 +129,9 @@ export function monitorEquipbatchDelete() {
export function monitorEquipselectList() { export function monitorEquipselectList() {
return request.post(path.monitorEquipselectList, ...arguments) return request.post(path.monitorEquipselectList, ...arguments)
} }
export function selectForEquip() {
return request.post(path.selectForEquip, ...arguments)
}
//漏缆 //漏缆
export function leakyCablelist() { export function leakyCablelist() {
return request.post(path.leakyCableList, ...arguments) return request.post(path.leakyCableList, ...arguments)
...@@ -143,4 +150,7 @@ export function leakyCablebatchDelete() { ...@@ -143,4 +150,7 @@ export function leakyCablebatchDelete() {
export function leakyCableselectList() { export function leakyCableselectList() {
return request.post(path.leakyCableselectList, ...arguments) return request.post(path.leakyCableselectList, ...arguments)
} }
export function selectForCable() {
return request.post(path.selectForCable, ...arguments)
}
...@@ -91,76 +91,22 @@ ...@@ -91,76 +91,22 @@
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column prop="equipName" label="设备名称" align="center" /> <el-table-column prop="equipName" label="设备名称" align="center" />
<el-table-column prop="railWayName" label="所在铁路线" align="center" />
<el-table-column
prop="siteId"
label="所在站点"
show-overflow-tooltip
align="center"
/>
<el-table-column <el-table-column
prop="fsuCode" prop="fsuCode"
label="FSU身份编号" label="FSU身份编号"
show-overflow-tooltip show-overflow-tooltip
align="center" align="center"
/> />
<el-table-column
prop="fsuPort"
label="FSU端口数"
show-overflow-tooltip
align="center"
/>
<el-table-column <el-table-column
prop="ip" prop="ip"
label="IP地址" label="IP地址"
show-overflow-tooltip show-overflow-tooltip
align="center" align="center"
/> />
<el-table-column prop="railWayName" label="所在铁路线" align="center" />
<el-table-column <el-table-column
prop="equipFactory" prop="siteId"
label="设备厂商" label="所在站点"
show-overflow-tooltip
align="center"
/>
<el-table-column
prop="backupMode"
label="设备备用方式"
show-overflow-tooltip
align="center"
/>
<el-table-column
prop="connectMode"
label="通信方式"
show-overflow-tooltip
align="center"
/>
<el-table-column
prop="equipType"
label="设备类型"
show-overflow-tooltip
align="center"
/>
<el-table-column
prop="equipSubType"
label="设备子类型"
show-overflow-tooltip
align="center"
/>
<el-table-column
prop="softVersion"
label="软件版本号"
show-overflow-tooltip
align="center"
/>
<el-table-column
prop="equipSerialNumber"
label="设备生产序列号"
show-overflow-tooltip
align="center"
/>
<el-table-column
prop="kmSign"
label="设备所在铁路公里标"
show-overflow-tooltip show-overflow-tooltip
align="center" align="center"
/> />
...@@ -188,10 +134,14 @@ ...@@ -188,10 +134,14 @@
</div> </div>
</template> </template>
<script> <script>
import {
import { fsulist, fsubatchDelete, fsudetail } from "../../api"; fsulist,
fsubatchDelete,
fsudetail,
railWaylist,
selectForSite,
} from "../../api";
import { successAlert, warningAlert } from "@/utils/alert"; import { successAlert, warningAlert } from "@/utils/alert";
import { mapGetters, mapActions } from "vuex";
export default { export default {
props: [], props: [],
components: {}, components: {},
...@@ -200,49 +150,27 @@ export default { ...@@ -200,49 +150,27 @@ export default {
railWaySelect: [], railWaySelect: [],
stationSelect: [], stationSelect: [],
stationSelect2: [], stationSelect2: [],
FSUForm: { FSUForm: formInit(),
fsuCode: "",
equipName: "",
equipSerialNumber: "",
ip: "",
parentId: "",
siteId: "",
siteName: "",
wayId: "",
current: 1,
size: 10,
},
Info: [],
visible: false, visible: false,
tableData: [], tableData: [],
params: { params: {
pageNum: 1, current: 1,
pageSize: 10, size: 10,
}, },
total: 10, total: 10,
multipleSelection: [], multipleSelection: [],
ids: [], ids: [],
block: 0, block: 0,
istrue: 0 istrue: 0,
}; };
}, },
computed: { computed: {},
...mapGetters({
railWaylist: "railWay/list",
stationlist: "station/list",
}),
},
methods: { methods: {
...mapActions({
asyncrailWayList: "railWay/asyncList",
asyncstationList: "station/asyncList",
asyncfsuList: "FSU/asyncList",
}),
changerailWay() { changerailWay() {
this.stationSelect2 = this.stationlist.filter( selectForSite({ wayId: this.FSUForm.wayId }).then((res) => {
(item) => item.wayId === this.FSUForm.wayId this.stationSelect2 = res;
); });
}, },
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
return rowIndex % 2 === 0 ? "" : "single-row"; return rowIndex % 2 === 0 ? "" : "single-row";
...@@ -267,26 +195,14 @@ export default { ...@@ -267,26 +195,14 @@ export default {
this.getTableData(); this.getTableData();
}, },
searchQuery() { searchQuery() {
this.istrue = 1 this.istrue = 1;
this.getTableData(); this.getTableData();
}, },
reset() { reset() {
this.FSUForm = { this.FSUForm = formInit();
fsuCode: "",
equipName: "",
equipSerialNumber: "",
ip: "",
parentId: "",
siteId: "",
siteName: "",
wayId: "",
current: 1,
size: 10,
};
}, },
exportData() { }, exportData() {},
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
...@@ -323,6 +239,15 @@ export default { ...@@ -323,6 +239,15 @@ export default {
} }
}); });
}, },
getAllWay() {
railWaylist(this.params).then((res) => {
this.railWaySelect = res.records;
if (res.total > this.params.size) {
this.params.size = res.total;
this.getAllWay();
}
});
},
}, },
created() { created() {
var that = this; var that = this;
...@@ -335,12 +260,24 @@ export default { ...@@ -335,12 +260,24 @@ export default {
}, },
mounted() { mounted() {
this.getTableData(); this.getTableData();
this.asyncrailWayList(); this.getAllWay();
this.asyncstationList();
this.railWaySelect = this.railWaylist;
// this.stationSelect = this.stationlist;
}, },
}; };
function formInit(data = {}) {
return {
fsuCode: "",
equipName: "",
equipSerialNumber: "",
ip: "",
parentId: "",
siteId: "",
siteName: "",
wayId: "",
current: 1,
size: 10,
...data,
};
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.leakage-cable { .leakage-cable {
......
...@@ -4,8 +4,9 @@ ...@@ -4,8 +4,9 @@
<div style="color: #666666"></div> <div style="color: #666666"></div>
<div class="operate-btn"> <div class="operate-btn">
<delids :multipleSelection2="multipleSelection" @del="del()" <delids :multipleSelection2="multipleSelection" @del="del()"
>删除</delids> >删除</delids
>
<el-button type="primary" @click="refresh">刷新</el-button> <el-button type="primary" @click="refresh">刷新</el-button>
<el-button type="primary" @click="block = !block">查询</el-button> <el-button type="primary" @click="block = !block">查询</el-button>
<el-button type="primary" @click="exportData">导出</el-button> <el-button type="primary" @click="exportData">导出</el-button>
...@@ -130,11 +131,12 @@ ...@@ -130,11 +131,12 @@
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column prop="railWayName" label="所在铁路线" align="center" />
<el-table-column <el-table-column
prop="hundredMetersLoss" prop="leakyCableDescribe"
label="漏缆百米损耗" label="漏缆描述"
show-overflow-tooltip show-overflow-tooltip
align="center" align="center"
/> />
...@@ -144,53 +146,16 @@ ...@@ -144,53 +146,16 @@
show-overflow-tooltip show-overflow-tooltip
align="center" align="center"
/> />
<el-table-column <el-table-column
prop="leakyCableDescribe"
label="描述"
show-overflow-tooltip
align="center"
/>
<el-table-column
prop="leakyCableLength"
label="漏缆长度"
show-overflow-tooltip
align="center"
/>
<el-table-column
prop="leakyCableMode" prop="leakyCableMode"
label="漏缆型号" label="漏缆型号"
show-overflow-tooltip show-overflow-tooltip
align="center" align="center"
/> />
<el-table-column
prop="reductRatio" <el-table-column prop="railWayName" label="所在铁路线" align="center" />
label="漏缆速度衰减系数:"
show-overflow-tooltip
align="center"
/>
<el-table-column
prop="sendPower"
label="发射功率"
show-overflow-tooltip
align="center"
/>
<el-table-column
prop="jumperLength"
label="跳线长度"
show-overflow-tooltip
align="center"
/>
<el-table-column
prop="inserterLength"
label="插入器长度"
show-overflow-tooltip
align="center"
/>
<el-table-column
prop="antennaFeederLength"
label="天馈线长度:"
align="center"
/>
<el-table-column <el-table-column
prop="action" prop="action"
label="详细信息" label="详细信息"
...@@ -214,80 +179,56 @@ ...@@ -214,80 +179,56 @@
</div> </div>
</template> </template>
<script> <script>
import { import {
leakyCablelist, leakyCablelist,
leakyCablebatchDelete, leakyCablebatchDelete,
leakyCabledetail, leakyCabledetail,
railWaylist,
selectForSite,
selectForFsu,
selectForEquip,
} from "../../api"; } from "../../api";
import { cableTypeEnum } from "../../../maintain/api"; import { cableTypeEnum } from "../../../maintain/api";
import { successAlert, warningAlert } from "@/utils/alert"; import { successAlert, warningAlert } from "@/utils/alert";
import { mapGetters, mapActions } from "vuex";
export default { export default {
props: [], props: [],
components: { }, components: {},
data() { data() {
return { return {
railWaySelect: [], railWaySelect: [],
stationSelect2: [], stationSelect2: [],
fsuSelect2: [], fsuSelect2: [],
equipTypeList:[], equipTypeList: [],
monitor2: [], monitor2: [],
leakyCableForm: { leakyCableForm: formInit(),
wayId: "",
parentId: "",
siteId: "",
fsuId: "",
monitor: "",
leakyCableCode: "",
leakyCableDescribe: "",
leakyCableMode: "",
current: 1,
size: 10,
},
tableData: [], tableData: [],
params: { params: {
pageNum: 1, current: 1,
pageSize: 10, size: 10,
}, },
total: 10, total: 10,
multipleSelection: [], multipleSelection: [],
ids: [], ids: [],
block: 0, block: 0,
istrue:0 istrue: 0,
}; };
}, },
computed: { computed: {},
...mapGetters({
railWaylist: "railWay/list",
stationlist: "station/list",
fsulist: "FSU/list",
monitorEquiplist: "monitor/list",
}),
},
methods: { methods: {
...mapActions({
asyncrailWayList: "railWay/asyncList",
asyncstationList: "station/asyncList",
asyncfsuList: "FSU/asyncList",
asyncmonitorList: "monitor/asyncList",
asyncleakyList: "leaky/asyncList",
}),
changerailWay() { changerailWay() {
this.stationSelect2 = this.stationlist.filter( selectForSite({ wayId: this.leakyCableForm.wayId }).then((res) => {
(item) => item.parentId === this.leakyCableForm.wayId this.stationSelect2 = res;
); });
}, },
changesite() { changesite() {
this.fsuSelect2 = this.fsulist.filter( selectForFsu({ siteId: this.leakyCableForm.siteId }).then((res) => {
(item) => item.parentId === this.leakyCableForm.siteId this.fsuSelect2 = res;
); });
}, },
changefsu() { changefsu() {
this.monitor2 = this.monitorEquiplist.filter( selectForEquip({ fsuId: this.leakyCableForm.fsuId }).then((res) => {
(item) => item.parentId === this.leakyCableForm.fsuId this.monitor2 = res;
); });
}, },
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
return rowIndex % 2 === 0 ? "" : "single-row"; return rowIndex % 2 === 0 ? "" : "single-row";
...@@ -312,24 +253,11 @@ export default { ...@@ -312,24 +253,11 @@ export default {
this.getTableData(); this.getTableData();
}, },
searchQuery() { searchQuery() {
this.istrue=1 this.istrue = 1;
this.getTableData(); this.getTableData();
}, },
reset() { reset() {
this.leakyCableForm = { this.leakyCableForm = formInit();
wayId: "",
parentId: "",
siteId: "",
fsuId: "",
monitor: "",
leakyCableCode: "",
leakyCableDescribe: "",
leakyCableMode: "",
current: 1,
size: 10,
};
}, },
exportData() {}, exportData() {},
...@@ -347,24 +275,19 @@ export default { ...@@ -347,24 +275,19 @@ export default {
type: 5, type: 5,
}, },
}); });
let id = row.id;
leakyCabledetail({ id }).then((res) => {});
}, },
handlePageChange(pageData) { handlePageChange(pageData) {
this.leakyCableForm.size = pageData.size; this.leakyCableForm.size = pageData.size;
this.leakyCableForm.current = pageData.page; this.leakyCableForm.current = pageData.page;
this.getTableData(); this.getTableData();
}, },
getTableData() { getTableData() {
let params = {
current: this.params.pageNum,
size: this.params.pageSize,
};
leakyCablelist(this.leakyCableForm).then((res) => { leakyCablelist(this.leakyCableForm).then((res) => {
let list = res.records || []; let list = res.records || [];
this.tableData = list; this.tableData = list;
this.total = res.total; this.total = res.total;
if (this.istrue == 1) { console.log(this.tableData );
if (this.istrue == 1) {
if (this.tableData.length) { if (this.tableData.length) {
successAlert("查询成功"); successAlert("查询成功");
} else { } else {
...@@ -374,6 +297,15 @@ export default { ...@@ -374,6 +297,15 @@ export default {
} }
}); });
}, },
getAllWay() {
railWaylist(this.params).then((res) => {
this.railWaySelect = res.records;
if (res.total > this.params.size) {
this.params.size = res.total;
this.getAllWay();
}
});
},
getLeakyCablel() { getLeakyCablel() {
cableTypeEnum().then((res) => { cableTypeEnum().then((res) => {
let list = res || []; let list = res || [];
...@@ -381,7 +313,7 @@ export default { ...@@ -381,7 +313,7 @@ export default {
}); });
}, },
}, },
created() { created() {
var that = this; var that = this;
document.onkeydown = function (e) { document.onkeydown = function (e) {
var key = window.event.keyCode; var key = window.event.keyCode;
...@@ -392,15 +324,26 @@ export default { ...@@ -392,15 +324,26 @@ export default {
}, },
mounted() { mounted() {
this.getTableData(); this.getTableData();
this.asyncrailWayList();
this.asyncstationList();
this.asyncfsuList();
this.asyncmonitorList();
this.getLeakyCablel(); this.getLeakyCablel();
this.railWaySelect = this.railWaylist; this.getAllWay();
this.monitorSelect = this.monitorEquiplist;
}, },
}; };
function formInit(data = {}) {
return {
wayId: "",
parentId: "",
siteId: "",
fsuId: "",
monitor: "",
leakyCableCode: "",
leakyCableDescribe: "",
leakyCableMode: "",
current: 1,
size: 10,
...data,
};
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.leakage-cable { .leakage-cable {
......
...@@ -4,8 +4,9 @@ ...@@ -4,8 +4,9 @@
<div style="color: #666666"></div> <div style="color: #666666"></div>
<div class="operate-btn"> <div class="operate-btn">
<delids :multipleSelection2="multipleSelection" @del="del()" <delids :multipleSelection2="multipleSelection" @del="del()"
>删除</delids> >删除</delids
>
<el-button type="primary" @click="refresh">刷新</el-button> <el-button type="primary" @click="refresh">刷新</el-button>
<el-button type="primary" @click="block = !block">查询</el-button> <el-button type="primary" @click="block = !block">查询</el-button>
<el-button type="primary" @click="exportData">导出</el-button> <el-button type="primary" @click="exportData">导出</el-button>
...@@ -69,7 +70,6 @@ ...@@ -69,7 +70,6 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="所在FSU:"> <el-form-item label="所在FSU:">
<el-select <el-select
placeholder="请选择所在FSU" placeholder="请选择所在FSU"
v-model="monitorForm.fsuId" v-model="monitorForm.fsuId"
...@@ -106,57 +106,15 @@ ...@@ -106,57 +106,15 @@
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column prop="railWayName" label="站点所属铁路线" align="center" />
<el-table-column prop="equipCode" label="设备身份编号" align="center" />
<el-table-column prop="ip" label="IP" align="center" />
<el-table-column
prop="equipFactory"
label="设备厂商"
show-overflow-tooltip
align="center"
/>
<el-table-column
prop="equipMode"
label="设备型号"
show-overflow-tooltip
align="center"
/>
<el-table-column <el-table-column
prop="equipName" prop="equipName"
label="设备名" label="设备名"
show-overflow-tooltip show-overflow-tooltip
align="center" align="center"
/> />
<el-table-column <el-table-column prop="equipCode" label="设备身份编号" align="center" />
prop="equipSerialNumber" <el-table-column prop="ip" label="IP" align="center" />
label="设备生产序列号" <el-table-column prop="railWayName" label="所在铁路线" align="center" />
show-overflow-tooltip
align="center"
/>
<el-table-column
prop="equipType"
label="设备类别"
show-overflow-tooltip
align="center"
/>
<el-table-column
prop="installDate"
label="安装日期"
show-overflow-tooltip
align="center"
/>
<el-table-column
prop="kmSign"
label="设备所在铁路公里标"
show-overflow-tooltip
align="center"
/>
<el-table-column
prop="repairDate"
label="维护日期"
show-overflow-tooltip
align="center"
/>
<el-table-column <el-table-column
prop="action" prop="action"
label="详细信息" label="详细信息"
...@@ -180,70 +138,49 @@ ...@@ -180,70 +138,49 @@
</div> </div>
</template> </template>
<script> <script>
import { import {
monitorEquiplist, monitorEquiplist,
monitorEquipbatchDelete, monitorEquipbatchDelete,
monitorEquipdetail, monitorEquipdetail,
railWaylist,
selectForSite,
selectForFsu,
} from "../../api"; } from "../../api";
import { successAlert, warningAlert } from "@/utils/alert"; import { successAlert, warningAlert } from "@/utils/alert";
import { mapGetters, mapActions } from "vuex";
export default { export default {
props: [], props: [],
components: { }, components: {},
data() { data() {
return { return {
railWaySelect: [], railWaySelect: [],
stationSelect2: [], stationSelect2: [],
fsuSelect2: [], fsuSelect2: [],
monitorForm: { monitorForm: formInit(),
wayId: "",
parentId: "",
ip: "",
siteId: "",
fsuId: "",
equipCode: "",
equipName: "",
current: 1,
size: 10,
},
tableData: [], tableData: [],
params: { params: {
pageNum: 1, current: 1,
pageSize: 10, size: 10,
}, },
total: 10, total: 10,
multipleSelection: [], multipleSelection: [],
ids: [], ids: [],
block: 0, block: 0,
istrue:0 istrue: 0,
}; };
}, },
computed: { computed: {},
...mapGetters({
railWaylist: "railWay/list",
stationlist: "station/list",
fsulist: "FSU/list",
}),
},
methods: { methods: {
...mapActions({
asyncrailWayList: "railWay/asyncList",
asyncstationList: "station/asyncList",
asyncfsuList: "FSU/asyncList",
asyncmonitorList: "monitor/asyncList",
}),
changerailWay() { changerailWay() {
this.stationSelect2 = this.stationlist.filter( selectForSite({ wayId: this.monitorForm.wayId }).then((res) => {
(item) => item.parentId === this.monitorForm.wayId this.stationSelect2 = res;
); });
}, },
changesite() { changesite() {
this.fsuSelect2 = this.fsuSelect.filter( selectForFsu({ siteId: this.monitorForm.siteId }).then((res) => {
(item) => item.parentId === this.monitorForm.siteId this.fsuSelect2 = res;
); console.log(this.fsuSelect2);
});
}, },
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
return rowIndex % 2 === 0 ? "" : "single-row"; return rowIndex % 2 === 0 ? "" : "single-row";
...@@ -264,25 +201,15 @@ export default { ...@@ -264,25 +201,15 @@ export default {
}); });
}, },
refresh() { refresh() {
this.reset() this.reset();
this.getTableData(); this.getTableData();
}, },
searchQuery() { searchQuery() {
this.istrue=1 this.istrue = 1;
this.getTableData(); this.getTableData();
}, },
reset() { reset() {
this.monitorForm= { this.monitorForm = formInit();
wayId: "",
parentId: "",
ip: "",
siteId: "",
fsuId: "",
equipCode: "",
equipName: "",
current: 1,
size: 10,
}
}, },
exportData() {}, exportData() {},
...@@ -300,8 +227,6 @@ export default { ...@@ -300,8 +227,6 @@ export default {
type: 4, type: 4,
}, },
}); });
let id = row.id;
monitorEquipdetail({ id }).then((res) => {});
}, },
handlePageChange(pageData) { handlePageChange(pageData) {
this.monitorForm.size = pageData.size; this.monitorForm.size = pageData.size;
...@@ -309,15 +234,12 @@ export default { ...@@ -309,15 +234,12 @@ export default {
this.getTableData(); this.getTableData();
}, },
getTableData() { getTableData() {
let params = {
current: this.params.pageNum,
size: this.params.pageSize,
};
monitorEquiplist(this.monitorForm).then((res) => { monitorEquiplist(this.monitorForm).then((res) => {
let list = res.records || []; let list = res.records || [];
this.tableData = list; this.tableData = list;
this.total = res.total; this.total = res.total;
if (this.istrue == 1) {
if (this.istrue == 1) {
if (this.tableData.length) { if (this.tableData.length) {
successAlert("查询成功"); successAlert("查询成功");
} else { } else {
...@@ -327,8 +249,17 @@ export default { ...@@ -327,8 +249,17 @@ export default {
} }
}); });
}, },
getAllWay() {
railWaylist(this.params).then((res) => {
this.railWaySelect = res.records;
if (res.total > this.params.size) {
this.params.size = res.total;
this.getAllWay();
}
});
},
}, },
created() { created() {
var that = this; var that = this;
document.onkeydown = function (e) { document.onkeydown = function (e) {
var key = window.event.keyCode; var key = window.event.keyCode;
...@@ -339,13 +270,24 @@ export default { ...@@ -339,13 +270,24 @@ export default {
}, },
mounted() { mounted() {
this.getTableData(); this.getTableData();
this.asyncrailWayList(); this.getAllWay();
this.asyncstationList();
this.asyncfsuList();
this.railWaySelect = this.railWaylist;
this.fsuSelect = this.fsulist;
}, },
}; };
function formInit(data = {}) {
return {
wayId: "",
wayId: "",
parentId: "",
ip: "",
siteId: "",
fsuId: "",
equipCode: "",
equipName: "",
current: 1,
size: 10,
...data,
};
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.leakage-cable { .leakage-cable {
......
...@@ -113,31 +113,19 @@ ...@@ -113,31 +113,19 @@
</div> </div>
</template> </template>
<script> <script>
import { import { railWaylist, railWaydetail, railWaybatchDelete } from "../../api";
railWaylist,
railWaydetail,
railWaybatchDelete,
roleAdd,
} from "../../api";
import { mapGetters, mapActions } from "vuex";
import { successAlert, warningAlert } from "@/utils/alert"; import { successAlert, warningAlert } from "@/utils/alert";
export default { export default {
props: [], props: [],
components: {}, components: {},
data() { data() {
return { return {
railData: { railData: formInit(),
endPointName: "",
name: "",
startPointName: "",
current: 1,
size: 10,
},
visible: false, visible: false,
tableData: [], tableData: [],
params: { params: {
pageNum: 1, current: 1,
pageSize: 10, size: 10,
}, },
total: 10, total: 10,
multipleSelection: [], multipleSelection: [],
...@@ -148,9 +136,6 @@ export default { ...@@ -148,9 +136,6 @@ export default {
}, },
computed: {}, computed: {},
methods: { methods: {
...mapActions({
asyncrailWayList: "railWay/asyncList",
}),
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
return rowIndex % 2 === 0 ? "" : "single-row"; return rowIndex % 2 === 0 ? "" : "single-row";
}, },
...@@ -178,13 +163,7 @@ export default { ...@@ -178,13 +163,7 @@ export default {
this.getTableData(); this.getTableData();
}, },
reset() { reset() {
this.railData = { this.railData = formInit();
endPointName: "",
name: "",
startPointName: "",
current: 1,
size: 10,
};
}, },
exportData() {}, exportData() {},
...@@ -202,9 +181,6 @@ export default { ...@@ -202,9 +181,6 @@ export default {
type: 1, type: 1,
}, },
}); });
let id = row.id;
railWaydetail({ id }).then((res) => {});
}, },
handlePageChange(pageData) { handlePageChange(pageData) {
this.railData.size = pageData.size; this.railData.size = pageData.size;
...@@ -212,10 +188,6 @@ export default { ...@@ -212,10 +188,6 @@ export default {
this.getTableData(); this.getTableData();
}, },
getTableData() { getTableData() {
let params = {
current: this.params.pageNum,
size: this.params.pageSize,
};
railWaylist(this.railData).then((res) => { railWaylist(this.railData).then((res) => {
let list = res.records || []; let list = res.records || [];
this.tableData = list; this.tableData = list;
...@@ -244,6 +216,16 @@ export default { ...@@ -244,6 +216,16 @@ export default {
this.getTableData(); this.getTableData();
}, },
}; };
function formInit(data = {}) {
return {
endPointName: "",
name: "",
startPointName: "",
current: 1,
size: 10,
...data,
};
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.leakage-cable { .leakage-cable {
......
...@@ -78,55 +78,24 @@ ...@@ -78,55 +78,24 @@
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column
prop="railWayName"
label="站点所属铁路线"
align="center"
/>
<el-table-column prop="siteCode" label="站点编号" align="center" />
<el-table-column prop="siteName" label="站名" align="center" /> <el-table-column prop="siteName" label="站名" align="center" />
<el-table-column prop="siteCode" label="站点编号" align="center" />
<el-table-column <el-table-column
prop="siteAddress" prop="siteAddress"
label="站点地址" label="站点地址"
show-overflow-tooltip show-overflow-tooltip
align="center" align="center"
/> />
<el-table-column <el-table-column
prop="siteArea" prop="railWayName"
label="站点所在局" label="所在铁路线"
show-overflow-tooltip
align="center"
/>
<el-table-column
prop="siteSectionCode"
label="站点所在段号"
show-overflow-tooltip
align="center"
/>
<el-table-column
prop="siteKmSign"
label="站点所在公里标"
show-overflow-tooltip
align="center"
/>
<el-table-column
prop="siteLatitude"
label="站点经度"
show-overflow-tooltip
align="center"
/>
<el-table-column
prop="siteLongitude"
label="站点纬度"
show-overflow-tooltip
align="center"
/>
<el-table-column
prop="siteOtherMessage"
label="站点其他信息"
show-overflow-tooltip
align="center" align="center"
/> />
<el-table-column <el-table-column
prop="action" prop="action"
label="详细信息" label="详细信息"
...@@ -151,30 +120,22 @@ ...@@ -151,30 +120,22 @@
</div> </div>
</template> </template>
<script> <script>
import { sitelist, sitebatchDelete, sitedetail } from "../../api"; import { sitelist, sitebatchDelete, sitedetail, railWaylist } from "../../api";
import { successAlert, warningAlert } from "@/utils/alert"; import { successAlert, warningAlert } from "@/utils/alert";
import { mapGetters, mapActions } from "vuex";
export default { export default {
props: [], props: [],
components: {}, components: {},
data() { data() {
return { return {
siteForm: { siteForm: formInit(),
wayId: "",
siteCode: "",
siteName: "",
siteAddress: "",
siteId: "",
current: 1,
size: 10,
},
railWaySelect: [], railWaySelect: [],
visible: false, visible: false,
Info: [], Info: [],
tableData: [], tableData: [],
params: { params: {
pageNum: 1, current: 1,
pageSize: 10, size: 10,
}, },
total: 10, total: 10,
multipleSelection: [], multipleSelection: [],
...@@ -183,16 +144,8 @@ export default { ...@@ -183,16 +144,8 @@ export default {
istrue: 0, istrue: 0,
}; };
}, },
computed: { computed: {},
...mapGetters({
railWaylist: "railWay/list",
}),
},
methods: { methods: {
...mapActions({
asyncrailWayList: "railWay/asyncList",
asyncstationList: "station/asyncList",
}),
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
return rowIndex % 2 === 0 ? "" : "single-row"; return rowIndex % 2 === 0 ? "" : "single-row";
}, },
...@@ -220,7 +173,7 @@ export default { ...@@ -220,7 +173,7 @@ export default {
this.getTableData(); this.getTableData();
}, },
reset() { reset() {
this.siteForm = formInit() this.siteForm = formInit();
}, },
exportData() {}, exportData() {},
handleSelectionChange(val) { handleSelectionChange(val) {
...@@ -235,8 +188,6 @@ export default { ...@@ -235,8 +188,6 @@ export default {
type: 2, type: 2,
}, },
}); });
let id = row.id;
sitedetail({ id }).then((res) => {});
}, },
handlePageChange(pageData) { handlePageChange(pageData) {
this.siteForm.size = pageData.size; this.siteForm.size = pageData.size;
...@@ -244,10 +195,6 @@ export default { ...@@ -244,10 +195,6 @@ export default {
this.getTableData(); this.getTableData();
}, },
getTableData() { getTableData() {
let params = {
current: this.params.pageNum,
size: this.params.pageSize,
};
sitelist(this.siteForm).then((res) => { sitelist(this.siteForm).then((res) => {
let list = res.records || []; let list = res.records || [];
this.tableData = list; this.tableData = list;
...@@ -262,6 +209,15 @@ export default { ...@@ -262,6 +209,15 @@ export default {
} }
}); });
}, },
getAllWay() {
railWaylist(this.params).then((res) => {
this.railWaySelect = res.records;
if (res.total > this.params.size) {
this.params.size = res.total;
this.getAllWay();
}
});
},
}, },
created() { created() {
var that = this; var that = this;
...@@ -274,20 +230,18 @@ export default { ...@@ -274,20 +230,18 @@ export default {
}, },
mounted() { mounted() {
this.getTableData(); this.getTableData();
this.asyncrailWayList(); this.getAllWay();
this.railWaySelect = this.railWaylist;
}, },
}; };
function formInit(data = {}) { function formInit(data = {}) {
return { return {
wayId: "", wayId: "",
siteCode: "", siteCode: "",
siteName: "", siteName: "",
siteAddress: "", siteAddress: "",
siteId: "", siteId: "",
current: 1, current: 1,
size: 10, size: 10,
...data, ...data,
}; };
} }
......
...@@ -27,12 +27,7 @@ import fsuTable from "./comp/fsuTable.vue"; ...@@ -27,12 +27,7 @@ import fsuTable from "./comp/fsuTable.vue";
import monitorTable from "./comp/monitorTable.vue"; import monitorTable from "./comp/monitorTable.vue";
import leakyTable from "./comp/leakyTable.vue"; import leakyTable from "./comp/leakyTable.vue";
import Pagination from "@/components/Pagination"; import Pagination from "@/components/Pagination";
import {
railWaylist,
railWaybatchDelete,
railWaydetail,
sitelist,
} from "../api";
export default { export default {
components: { components: {
Pagination, Pagination,
......
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