chenxudong123456 2 years ago
parent a8fa8789c8
commit c7812ebf9e

@ -59,22 +59,25 @@
<!-- </el-form-item>--> <!-- </el-form-item>-->
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="站名:" :label-width="formLabelWidth" prop="sta"> <el-form-item label="站名:" :label-width="formLabelWidth" prop="stanos">
<el-select <el-select
class="tags-select-input"
style="margin-left: 0px; width: 180px" style="margin-left: 0px; width: 180px"
v-model="inPortDTO.sta" collapse-tags
collapse-tags-tooltip
v-model="inPortDTO.stanos"
filterable filterable
clearable
allow-create allow-create
multiple
default-first-option default-first-option
:reserve-keyword="false" :reserve-keyword="false"
placeholder="" placeholder=""
> >
<el-option <el-option
v-for="item in nameTypeForm" v-for="item in nameTypeForm"
:key="item.staname" :key="item.stano"
:label="item.staname" :label="item.staname"
:value="item.staname" :value="item.stano"
> >
</el-option> </el-option>
</el-select> </el-select>
@ -566,9 +569,7 @@ export default {
inPortDTO: { inPortDTO: {
road: '', // road: '', //
// road: '', // // road: '', //
sta: '', // stanos: '', //
// sta: '', //
// sta: '', //
portno: '', // portno: '', //
classDateTBegin: '', //() classDateTBegin: '', //()
classDateTEnd: '', //() classDateTEnd: '', //()
@ -690,7 +691,7 @@ export default {
this.inPortDTO.road = this.roadTypeForm[0] this.inPortDTO.road = this.roadTypeForm[0]
}else if(res.data.roadNO != null && res.data.userStaNO != null){ }else if(res.data.roadNO != null && res.data.userStaNO != null){
this.inPortDTO.road = this.roadTypeForm[0] this.inPortDTO.road = this.roadTypeForm[0]
this.inPortDTO.sta = this.nameTypeForm[0] this.inPortDTO.stanos = this.nameTypeForm[0]
} }
} }
}).catch(()=>{ }).catch(()=>{
@ -713,21 +714,40 @@ export default {
this.nameTypeGet() this.nameTypeGet()
}, },
nameTypeGet(){ // nameTypeGet(){ //
this.$http.get("/nameType/nameTypeAllSelected",{ this.$http.get("/userType/getMessageByManNO",{
params: { params: {
roadname: this.inPortDTO.road, manNO: localStorage.getItem("manno"),
} }
}).then(res=>{ }).then(res=>{
if(res.statusCode == '200'){ if(res.statusCode == '200'){
this.nameTypeForm = res.data this.nameTypeForm = res.data.nameTableSelectedVOList
if(this.nameTypeForm.length == 1){ localStorage.setItem("stanosIP", JSON.stringify(res.data.stanos))
this.inPortDTO.sta = this.nameTypeForm[0].staname this.inPortDTO.stanos = res.data.stanos
} // if(this.nameTypeForm.length == 1){
// this.inPortDTO.stanos = this.nameTypeForm[0].staname
// }
// console.log(this.nameTypeForm)
} }
}).catch(()=>{ }).catch(()=>{
console.log('所属路段站名类型加载失败!') console.log('所属路段站名类型加载失败!')
}) })
}, },
// nameTypeGet(){ //
// this.$http.get("/nameType/nameTypeAllSelected",{
// params: {
// roadname: this.inPortDTO.road,
// }
// }).then(res=>{
// if(res.statusCode == '200'){
// this.nameTypeForm = res.data
// if(this.nameTypeForm.length == 1){
// this.inPortDTO.stanos = this.nameTypeForm[0].staname
// }
// }
// }).catch(()=>{
// console.log('')
// })
// },
setupTypeGet(){ // setupTypeGet(){ //
this.$http.get("/setupType/setupTypeAll").then(res=>{ this.$http.get("/setupType/setupTypeAll").then(res=>{
if(res.statusCode == '200'){ if(res.statusCode == '200'){
@ -818,32 +838,32 @@ export default {
}) })
}, },
clearSelect() { clearSelect() {
this.inPortDTO.portno = '' this.inPortDTO.portno = []
this.inPortDTO.classno = '' this.inPortDTO.classno = []
this.inPortDTO.classDateCBegin = '' this.inPortDTO.classDateCBegin = ''
this.inPortDTO.classDateCEnd = '' this.inPortDTO.classDateCEnd = ''
this.inPortDTO.manNO = '' this.inPortDTO.manNO = ''
this.inPortDTO.man = '' this.inPortDTO.man = []
this.inPortDTO.cardNO = '' this.inPortDTO.cardNO = ''
this.inPortDTO.typeText = '' this.inPortDTO.typeText = []
this.inPortDTO.kindText = '' this.inPortDTO.kindText = []
this.inPortDTO.carNO = '' this.inPortDTO.carNO = ''
this.inPortDTO.flagText = '' this.inPortDTO.flagText = []
this.inPortDTO.listNO = '' this.inPortDTO.listNO = ''
this.inPortDTO.axisCount = '' this.inPortDTO.axisCount = ''
this.inPortDTO.backup2 = '' this.inPortDTO.backup2 = ''
this.inPortDTO.backup3 = '' this.inPortDTO.backup3 = ''
this.inPortDTO.porttypegbText = '' this.inPortDTO.porttypegbText = ''
this.inPortDTO.participant = '' this.inPortDTO.participant = []
this.inPortDTO.cardtpText = '' this.inPortDTO.cardtpText = []
}, },
getInPortQueryCriteria() { getInPortQueryCriteria() {
this.queryCriteriaData = '' this.queryCriteriaData = ''
if(this.inPortDTO.road != ""){ if(this.inPortDTO.road != ""){
this.queryCriteriaData = " 路段="+this.inPortDTO.road this.queryCriteriaData = " 路段="+this.inPortDTO.road
}if(this.inPortDTO.sta != ""){ }if(this.inPortDTO.stanos != ""){
this.queryCriteriaData = this.queryCriteriaData + ",站名="+this.inPortDTO.sta this.queryCriteriaData = this.queryCriteriaData + ",站名="+this.inPortDTO.stanos
}if(this.inPortDTO.portno != ""){ }if(this.inPortDTO.portno != ""){
this.queryCriteriaData = this.queryCriteriaData + ",车道="+this.inPortDTO.portno this.queryCriteriaData = this.queryCriteriaData + ",车道="+this.inPortDTO.portno
}if(this.inPortDTO.classDateTBegin != ""){ }if(this.inPortDTO.classDateTBegin != ""){
@ -892,6 +912,9 @@ export default {
this.loading = true this.loading = true
this.inPortDTO.pageNum = this.pageNum this.inPortDTO.pageNum = this.pageNum
this.inPortDTO.pageSize = this.pageSize this.inPortDTO.pageSize = this.pageSize
if( this.inPortDTO.stanos.length == 0 ){
this.inPortDTO.stanos = JSON.parse(localStorage.getItem("stanosIP"))
}
if(this.inPortDTO.classDateCBegin != null && this.inPortDTO.classDateCBegin != ""){ if(this.inPortDTO.classDateCBegin != null && this.inPortDTO.classDateCBegin != ""){
this.inPortDTO.classDateCBegin = moment(this.inPortDTO.classDateCBegin).format('YYYY-MM-DD HH:mm:ss'); this.inPortDTO.classDateCBegin = moment(this.inPortDTO.classDateCBegin).format('YYYY-MM-DD HH:mm:ss');
} }

Loading…
Cancel
Save