| | |
| | | <script setup> |
| | | import {ref, onMounted} from "vue"; |
| | | import {ref, onMounted, watch} from "vue"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import { |
| | | allDrivesModule, changeDriveInfoModule, |
| | |
| | | // 关闭等待框 |
| | | loading.value = false; |
| | | } |
| | | |
| | | watch(carName, ()=>{ |
| | | searchDriveList(); |
| | | }); |
| | | |
| | | /** |
| | | * 每页查询个数变更 |
| | |
| | | }).catch(()=>{}); |
| | | } |
| | | |
| | | import useBoxListSearch from "@/views/user/hooks/useBoxListSearch"; |
| | | |
| | | // 模糊查询模块 |
| | | const {loading: boxSearchLoading, selectBox, boxList, boxListSearch} = useBoxListSearch(); |
| | | watch(selectBox, (name)=>{ |
| | | carName.value = name; |
| | | console.log(carName.value); |
| | | }) |
| | | |
| | | onMounted(()=>{ |
| | | searchDriveList(); |
| | | searchAllDrives(); |
| | | boxListSearch(); |
| | | }); |
| | | </script> |
| | | |
| | |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="input-item"> |
| | | <el-select |
| | | v-model="selectBox" |
| | | clearable |
| | | filterable |
| | | remote |
| | | reserve-keyword |
| | | placeholder="请输入车辆名称" |
| | | remote-show-suffix |
| | | :remote-method="boxListSearch" |
| | | :loading="boxSearchLoading"> |
| | | <el-option |
| | | v-for="(item, key) in boxList" |
| | | :key="'key'+key" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | <span class="w16-block"></span> |
| | | <el-button type="success" icon="Plus" @click="addVisible=true">添加</el-button> |
| | | <el-button type="primary" icon="Search" @click="searchDriveList">查询</el-button> |
| | | </div> |
| | |
| | | margin-right: 8px; |
| | | } |
| | | } |
| | | span.w16-block { |
| | | display: inline-block; |
| | | width: 16px; |
| | | } |
| | | </style> |