| | |
| | | <!-- |
| | | * @Author: hqs elkers@163.com |
| | | * @Date: 2024-08-06 14:47:41 |
| | | * @LastEditors: hqs elkers@163.com |
| | | * @LastEditTime: 2024-08-14 16:50:56 |
| | | * @FilePath: \water-qinghe-web\src\views\facilit\index.vue |
| | | * @Description: 监控点 |
| | | --> |
| | | <script setup> |
| | | import pointApi from "@/api/facility/point"; |
| | | import {ref, onMounted} from "vue"; |
| | |
| | | pointName: '监控点名称', |
| | | pointCode: '监控点编号', |
| | | pointType: '监控类型', |
| | | waterWidth: '水面宽度', |
| | | address: '详细地址', |
| | | createTimeView: '创建时间', |
| | | imageUrl: '图片', |
| | |
| | | pointCode: '监控点编号', |
| | | pointType: '监控点类型', |
| | | parentId: '父级监控点', |
| | | waterWidth: '水面宽度', |
| | | address: '详细地址', |
| | | imageUrl: '图片', |
| | | remark: '备注' |
| | |
| | | pointCode: '', |
| | | pointType: '', |
| | | parentId: '', |
| | | waterWidth: '', |
| | | address: '', |
| | | imageUrl: '', |
| | | remark: '' |
| | |
| | | const searchParams = ref({ |
| | | keywords: '', |
| | | }); |
| | | // 监控点列表 |
| | | const monityList = ref([]); |
| | | |
| | | // 监控点类型 |
| | | const monityTypeList = [ |
| | | {id: 1, name: '水温监测点'}, |
| | | {id: 2, name: '生态流量监测点'} |
| | | ]; |
| | | const cascaderOption = { label: 'pointName', value: 'id', children: 'childrenList', checkStrictly: true, expandTrigger: 'hover', emitPath: false }; //级联选择器配置 |
| | | |
| | | /** 新增按钮操作 */ |
| | | async function handleAdd() { |
| | |
| | | proxy.$modal.msgSuccess("删除成功"); |
| | | }).catch(() => { |
| | | }); |
| | | } |
| | | |
| | | |
| | | // 获取监控点列表 |
| | | const getMonitryList = () => { |
| | | pointApi().getParentPoint().then(res => { |
| | | monityList.value = res.data; |
| | | }) |
| | | } |
| | | |
| | | /** |
| | |
| | | pointName: '', |
| | | pointCode: '', |
| | | pointType: '', |
| | | waterWidth: '', |
| | | address: '', |
| | | imageUrl: '', |
| | | remark: '' |
| | |
| | | |
| | | onMounted(() => { |
| | | getList(); |
| | | getMonitryList(); |
| | | }) |
| | | </script> |
| | | <template> |
| | |
| | | <!-- 添加/修改表单 --> |
| | | <el-dialog :title="title" v-model="open" append-to-body center> |
| | | <el-form class="form-box" ref="formRef" :model="form" :rules="rules" label-width='auto'> |
| | | <el-form-item :label="formLabel.parentId" prop="parentId"> |
| | | <el-cascader v-model="form.parentId" :options="monityList" :show-all-levels="false" :props="cascaderOption" /> |
| | | </el-form-item> |
| | | <el-form-item :label="formLabel.pointType" prop="pointType"> |
| | | <el-select v-model="form.pointType" :placeholder="'请输入'+formLabel.pointType"> |
| | | <el-option |
| | |
| | | </el-form-item> |
| | | <el-form-item :label="formLabel.remark" prop="address"> |
| | | <el-input v-model="form.remark" :placeholder="'请输入'+formLabel.remark"/> |
| | | </el-form-item> |
| | | <el-form-item :label="formLabel.waterWidth" prop="waterWidth"> |
| | | <el-input v-model="form.waterWidth" :placeholder="'请输入'+formLabel.waterWidth"/> |
| | | </el-form-item> |
| | | <el-form-item></el-form-item> |
| | | <el-form-item label="图片" prop="imageUrl" style="flex: 1"> |