| | |
| | | import {ref, onMounted} from "vue"; |
| | | import {getUserType} from '@/utils/auth.js' |
| | | import facilityApi from "@/api/facility/index"; |
| | | import { getFlowMenu } from '@/api/screen/shebei/index.js' |
| | | import setPostParams from "@/utils/searchParams.js"; |
| | | import { getFlowMenu, getFlowShebeiList } from '@/api/screen/shebei/index.js' |
| | | import { useRouter } from "vue-router"; |
| | | const router = useRouter(); |
| | | const imgBaseUrl = import.meta.env.VITE_APP_IMG_BASEURL; //图片前缀 |
| | |
| | | |
| | | // 获取设备 |
| | | const getDataList = () => { |
| | | let postParam = setPostParams() |
| | | facilityApi().search({ ...postParam, keywords: searchVal.value }).then(res => { |
| | | deviceList.value = res.data.list |
| | | getFlowShebeiList({ facilityName: searchVal.value }).then(res => { |
| | | deviceList.value = res.data |
| | | }) |
| | | } |
| | | |
| | |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | <el-input v-model="searchVal" style="width: 20rem" placeholder="请输入设备名称" /> |
| | | <el-input v-model="searchVal" style="width: 20rem" placeholder="请输入设备名称" clearable /> |
| | | <el-button @click="getDataList"><el-icon><Search /></el-icon>搜索</el-button> |
| | | <el-button style="margin-left: 0" v-if="userType === '1'" @click="router.push('/facilityList')"><el-icon><Plus /></el-icon>新增</el-button> |
| | | </div> |