web
2 天以前 55373c6b400d879ba4a4cdae752fe5140c7b11f6
src/views/facility/facilityList/index.vue
@@ -6,6 +6,7 @@
import waterFacilityParameter from "@/api/facility/parameter.js";
import setPostParams from "@/utils/searchParams.js";
import {onMounted} from "vue";
const route = useRoute();
const {proxy} = getCurrentInstance();
const imgBaseUrl = import.meta.env.VITE_APP_IMG_BASEURL //图片前缀
@@ -15,7 +16,7 @@
 */
/** 搜索按钮操作 */
function handleQuery() {
    getList({keywords: searchParams.value.facilityCode})
    getList(searchParams.value)
}
/** 重置按钮操作 */
@@ -79,7 +80,14 @@
});
//查询监控点
const pointList = ref();
const cascaderOption = { label: 'pointName', value: 'id', children: 'childrenList', checkStrictly: true, expandTrigger: 'hover', emitPath: false }; //级联选择器配置
const cascaderOption = {
    label: 'pointName',
    value: 'id',
    children: 'childrenList',
    checkStrictly: true,
    expandTrigger: 'hover',
    emitPath: false
}; //级联选择器配置
const getPoint = async () => {
    await pointApi().getParentPoint().then((res) => {
        pointList.value = res.data
@@ -118,6 +126,7 @@
        }
    })
}
/** 新增按钮操作 */
async function handleAdd() {
    reset();
@@ -208,7 +217,7 @@
}
//上传文件,添加图片地址信息
const uploadData = (data) => {
    form.value.facilityUrl = imgBaseUrl + data.toString();
    form.value.facilityUrl = data.toString();
}
/** 提交按钮 */
@@ -247,6 +256,7 @@
    openParamForm.value = false;
    reset();
}
/** 绑定按钮操作 */
const handleband = async(row) =>{
    facilityData.value.facilityId = row.id
@@ -254,6 +264,7 @@
    getSelectParamList(row.id)
    openParamForm.value = true
}
/** 表单重置 */
function reset() {
    form.value = {
@@ -278,9 +289,9 @@
<template>
    <div class="app-container">
        <el-form :model="searchParams" ref="queryRef" :inline="true">
            <el-form-item label="" prop="">
            <el-form-item label="" prop="keywords">
                <el-input
                        v-model="searchParams.facilityCode"
                    v-model="searchParams.keywords"
                        placeholder="请输入搜索信息"
                        clearable
                        style="width: 200px"
@@ -358,7 +369,8 @@
                    </el-select>
                </el-form-item>
                <el-form-item label="选择监控点" prop="pointId">
                    <el-cascader v-model="form.pointId" :options="pointList" :show-all-levels="false" :props="cascaderOption" />
                    <el-cascader v-model="form.pointId" :options="pointList" :show-all-levels="false"
                                 :props="cascaderOption"/>
                </el-form-item>
                <el-form-item label="安装日期" prop="installDate">
                    <el-date-picker
@@ -413,8 +425,10 @@
    max-width: 100px;
    height: 50px;
}
.form-box{
    justify-content: normal;
    :deep(.el-cascader){
        flex-grow: 1;
    }