parent
e18ac963c8
commit
a4e3e68a44
@ -0,0 +1,81 @@
|
||||
<template>
|
||||
<vxe-pulldown ref="xDown4" transfer>
|
||||
<template #default>
|
||||
<vxe-input
|
||||
v-model="dcCh"
|
||||
placeholder="船号"
|
||||
style="height: 28px;
|
||||
line-height: 28px; width: 150px;"
|
||||
suffix-icon="vxe-icon--search"
|
||||
@keyup="keyupEvent4"
|
||||
@focus="focusEvent4"
|
||||
/>
|
||||
</template>
|
||||
<template #dropdown>
|
||||
<div class="my-dropdown mytable " style="width: 250px">
|
||||
<vxe-grid
|
||||
highlight-hover-row
|
||||
height="250"
|
||||
:data="projectData"
|
||||
:columns="projectColumns"
|
||||
@cell-click="cellClickEvent"
|
||||
show-overflow
|
||||
>
|
||||
<template #wgbsEdit="{ row}">
|
||||
<vxe-checkbox v-model="row.wgbs" checked-value="Y" unchecked-value="N" disabled ></vxe-checkbox>
|
||||
</template>
|
||||
</vxe-grid>
|
||||
</div>
|
||||
</template>
|
||||
</vxe-pulldown>
|
||||
</template>
|
||||
<script>
|
||||
import {getCzplBase} from "@/api/sjzx/jcsj";
|
||||
|
||||
export default {
|
||||
name:'ProjectSelect',
|
||||
data(){
|
||||
return {
|
||||
dcCh:'',
|
||||
projectData:[],
|
||||
projectData1:[],
|
||||
projectColumns:[
|
||||
{field: 'cbbm', title: '船号',width: 110},
|
||||
{ field: 'wgbs', title: '完工标识', width: 80,
|
||||
slots:{
|
||||
default: 'wgbsEdit'
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.initProject()
|
||||
},
|
||||
methods:{
|
||||
getDcch(){
|
||||
return this.dcch
|
||||
},
|
||||
initProject(){
|
||||
getCzplBase({}).then(res=>{
|
||||
this.projectData=res.data.cbbm
|
||||
this.projectData1=res.data.cbbm
|
||||
})
|
||||
},
|
||||
cellClickEvent({row}){
|
||||
this.dcCh = row.cbbm
|
||||
this.$refs.xDown4.hidePanel()
|
||||
},
|
||||
focusEvent4(){
|
||||
this.$refs.xDown4.showPanel()
|
||||
},
|
||||
keyupEvent4(){
|
||||
if (this.dcCh) {
|
||||
this.projectData = this.projectData1.filter(row => row.cbbm.indexOf(this.dcCh.toUpperCase()) > -1)
|
||||
} else {
|
||||
this.projectData = this.projectData1.slice(0)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Reference in new issue