web
10 天以前 a8dd05927a7ca3b34f7729604744a24375f3549f
src/views/screen/flow/shebei/index.vue
@@ -2,8 +2,7 @@
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; //图片前缀
@@ -29,9 +28,8 @@
// 获取设备
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
    })
}
@@ -90,7 +88,7 @@
                            :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>