feat(eims-ui-mobile): 为多个页面添加搜索功能
- 在 equ-list、insp-st、maint-st、req-list 和 res-list 页面中添加设备名称和资产编号的模糊搜索
| | |
| | | custom-style="background: #4D80F0;" |
| | | safeAreaInsetTop |
| | | ></wd-navbar> |
| | | <wd-search v-model="searchValue" placeholder="请输入关键字" @search="handleSearch" /> |
| | | <wd-drop-menu> |
| | | <wd-drop-menu-item |
| | | v-model="equTypeId" |
| | |
| | | const equTypeId = ref<number>(-1) |
| | | // 设备状态 |
| | | const status = ref<number>(-1) |
| | | |
| | | const searchValue = ref<string>('') |
| | | const isSelectEqu = ref(false) |
| | | |
| | | const typeList = ref<Record<string, any>[]>([{ dictLabel: '设备类型', dictValue: -1 }]) |
| | |
| | | pageSize, |
| | | equTypeId: equTypeId.value, |
| | | status: status.value, |
| | | params: { |
| | | searchValue: searchValue.value, |
| | | }, |
| | | } |
| | | if (equTypeId.value === -1) { |
| | | delete parmams.equTypeId |
| | |
| | | } |
| | | } |
| | | |
| | | function handleSearch() { |
| | | console.log('handleSearch') |
| | | paging.value.reload() |
| | | } |
| | | |
| | | /** |
| | | * 选择设备回调 |
| | | * @param equ |
| | |
| | | import { useUserStore } from '@/store' |
| | | import { tabbarStore } from '@/components/fg-tabbar/tabbar' |
| | | import { getEquList } from '@/service/equ' |
| | | import { getRepairResList } from '@/service/repair' |
| | | import { getRepairResList, getRepairResUnfinished } from "@/service/repair"; |
| | | import { getFixtureList } from '@/service/fixture' |
| | | import { receiveOrderRepair } from '@/service/mobile' |
| | | import { useToast, useMessage } from 'wot-design-uni' |
| | |
| | | getEquList({ pageNum, pageSize }) |
| | | .then((res: any) => { |
| | | equTotal.value = res?.total || 0 |
| | | queryRepairResList() |
| | | // queryRepairResList() |
| | | queryUnFinishedRepairResList() |
| | | queryFixtureList() |
| | | paging.value.complete(true) |
| | | }) |
| | |
| | | onLoad(() => { |
| | | // getAllMenus() |
| | | queryEquList() |
| | | queryRepairResList() |
| | | queryUnFinishedRepairResList() |
| | | queryFixtureList() |
| | | }) |
| | | |
| | |
| | | .catch((res) => {}) |
| | | } |
| | | |
| | | function queryUnFinishedRepairResList() { |
| | | getRepairResUnfinished('0,1,2') |
| | | .then((res: any) => { |
| | | console.log("res", res) |
| | | faultTotal.value = res || 0 |
| | | }) |
| | | .catch((res) => {}) |
| | | } |
| | | |
| | | function queryFixtureList() { |
| | | getFixtureList({ |
| | | page: 1, |
| | |
| | | <template> |
| | | <z-paging ref="paging" v-model="dataList" @query="queryList" show-refresher-update-time> |
| | | <template #top> |
| | | <!-- 增加一个搜索栏 --> |
| | | <wd-search v-model="searchValue" @search="handleSearch"> |
| | | </wd-search> |
| | | <wd-tabs v-model="activeTab" @change="handleTabChange"> |
| | | <wd-tab title="待点检"></wd-tab> |
| | | <wd-tab title="待确认"></wd-tab> |
| | |
| | | const equName = ref<string>('所有设备') |
| | | const filterDate = ref<string>('1') |
| | | const status = ref<string>('0') // 默认为待点检状态 |
| | | const searchValue = ref<string>('') |
| | | |
| | | const viewModeList = ref<Record<string, any>[]>([ |
| | | { label: '日视图', value: 'Day' }, |
| | |
| | | pageSize, |
| | | viewMode: viewMode.value, |
| | | status: status.value, // 添加状态筛选 |
| | | params: { |
| | | searchValue: searchValue.value, |
| | | }, |
| | | } |
| | | if (filterDate.value === '1') { |
| | | params.planTime = dayjs().format('YYYY-MM-DD') |
| | |
| | | }) |
| | | } |
| | | |
| | | function handleSearch() { |
| | | console.log('handleSearch') |
| | | paging.value.reload() |
| | | } |
| | | |
| | | function reloadData() { |
| | | paging.value.reload() |
| | | } |
| | |
| | | <template> |
| | | <z-paging ref="paging" v-model="dataList" @query="queryList" show-refresher-update-time> |
| | | <template #top> |
| | | <!-- 增加一个搜索栏 --> |
| | | <wd-search v-model="searchValue" @search="handleSearch"> |
| | | <template #right-icon> |
| | | <wd-icon name="scan" size="34rpx"></wd-icon> |
| | | </template> |
| | | </wd-search> |
| | | <wd-tabs v-model="activeTab" @change="handleTabChange"> |
| | | <wd-tab title="待保养"></wd-tab> |
| | | <wd-tab title="待确认"></wd-tab> |
| | |
| | | import { ref, computed } from 'vue' |
| | | import { getMaintStList } from '@/service/maint' |
| | | import dayjs from 'dayjs' |
| | | |
| | | const searchValue = ref<string>('') |
| | | /** |
| | | * 其他页面传过来的数据 |
| | | * assetNo: 资产编号 |
| | |
| | | pageSize, |
| | | equName: equName.value, |
| | | status: status.value, |
| | | params: {}, |
| | | } |
| | | if (filterDate.value === '1') { |
| | | // 获取当前日期 |
| | |
| | | endPlanTime: now.endOf('month').format('YYYY-MM-DD 23:59:59'), |
| | | } |
| | | } else { |
| | | delete queryParams.params |
| | | queryParams.params = {} |
| | | } |
| | | |
| | | if (equName.value === '-1') { |
| | |
| | | if (option?.from === 'scan') { |
| | | queryParams.assetNo = option.assetNo |
| | | } |
| | | |
| | | queryParams.params.searchValue = searchValue.value |
| | | getMaintStList(queryParams) |
| | | .then((res: any) => { |
| | | // 请勿在网络请求回调中给dataList赋值!!只需要调用complete就可以了 |
| | |
| | | }) |
| | | } |
| | | |
| | | function handleSearch () { |
| | | console.log('handleSearch') |
| | | paging.value.reload() |
| | | } |
| | | |
| | | function reloadData() { |
| | | paging.value.reload() |
| | | } |
| | |
| | | custom-style="background: #4D80F0;" |
| | | safeAreaInsetTop |
| | | ></wd-navbar> |
| | | <!-- 增加一个搜索栏 --> |
| | | <wd-search v-model="searchValue" @search="handleSearch"></wd-search> |
| | | <!-- <wd-drop-menu v-if="!isSelectReq">--> |
| | | <!-- <wd-drop-menu-item--> |
| | | <!-- v-model="reqTypeId"--> |
| | |
| | | const reqTypeId = ref<number>(-1) |
| | | // 报修单处理状态 |
| | | const status = ref<number>(-1) |
| | | |
| | | const searchValue = ref<string>('') |
| | | const isSelectReq = ref(false) |
| | | |
| | | const filterDate = ref<string>('2') |
| | |
| | | const queryParams: any = { |
| | | pageNum, |
| | | pageSize, |
| | | params: {}, |
| | | params: { |
| | | searchValue: searchValue.value, |
| | | }, |
| | | } |
| | | // if (reqTypeId.value === -1) { |
| | | // delete queryParams.reqType |
| | |
| | | }) |
| | | } |
| | | |
| | | function handleSearch() { |
| | | console.log('handleSearch') |
| | | paging.value.reload() |
| | | } |
| | | |
| | | /** |
| | | * 条目点击事件 |
| | | * @param item |
| | |
| | | <!-- <text v-if="isLineOrRepair()" class="text-white">接单</text>--> |
| | | <!-- </template>--> |
| | | </wd-navbar> |
| | | <!-- 增加一个搜索栏 --> |
| | | <wd-search v-model="searchValue" @search="handleSearch"> |
| | | </wd-search> |
| | | <!-- <wd-drop-menu>--> |
| | | <!-- <wd-drop-menu-item--> |
| | | <!-- v-model="resTypeId"--> |
| | |
| | | |
| | | const message = useMessage() |
| | | const toast = useToast() |
| | | const searchValue = ref<string>('') |
| | | |
| | | /** |
| | | * 其他页面传过来的数据 |
| | |
| | | const queryParams: any = { |
| | | pageNum, |
| | | pageSize, |
| | | params: {}, |
| | | params: { |
| | | searchValue: searchValue.value, |
| | | }, |
| | | // reqType: resTypeId.value, |
| | | // status: status.value, |
| | | } |
| | |
| | | queryParams.params.status = '0,1,2,3' |
| | | queryParams.reqUser = userStore?.userInfo?.userId |
| | | if (isRepair()) { |
| | | queryParams.params.status = null |
| | | queryParams.params.status = undefined |
| | | queryParams.resUser = userStore?.userInfo?.userId |
| | | delete queryParams.reqUser |
| | | delete queryParams.params |
| | | } |
| | | getRepairResList(queryParams) |
| | | .then((res: any) => { |
| | |
| | | export const getRepairResList = (params: any) => { |
| | | return http.get<RepairResVO[]>('/eims/repairRes/list', params) |
| | | } |
| | | |
| | | /** |
| | | * 查询未完成的维修单 |
| | | * @param id |
| | | */ |
| | | export const getRepairResUnfinished = (status: string) => { |
| | | return http.get<int>(`/eims/repairRes/list/unfinished?status=${status}`) |
| | | } |
| | | /** |
| | | * 查询维修单 |
| | | * @param data |