| | |
| | | pointName: '监控点名称', |
| | | pointCode: '监控点编号', |
| | | pointType: '监控点类型', |
| | | parentId: '父级监控点', |
| | | address: '详细地址', |
| | | imageUrl: '图片', |
| | | remark: '备注' |
| | |
| | | pointName: '', |
| | | pointCode: '', |
| | | pointType: '', |
| | | parentId: '', |
| | | 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() { |
| | |
| | | /** 删除按钮操作 */ |
| | | function handleDelete(row) { |
| | | proxy.$modal.confirm('是否确认删除名称为"' + row.contact + '"的数据项?').then(function () { |
| | | // return pointApi().remove(row.id); |
| | | }).then(() => { |
| | | getList(); |
| | | proxy.$modal.msgSuccess("删除成功"); |
| | | }).catch(() => { |
| | | }); |
| | | } |
| | | |
| | | |
| | | // 获取监控点列表 |
| | | const getMonitryList = () => { |
| | | pointApi().getParentPoint().then(res => { |
| | | monityList.value = res.data; |
| | | }) |
| | | } |
| | | |
| | | /** |
| | |
| | | /** 表单重置 */ |
| | | function reset() { |
| | | form.value = { |
| | | parentId: '', |
| | | pointName: '', |
| | | pointCode: '', |
| | | pointType: '', |
| | |
| | | |
| | | 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 :label="formLabel.remark" prop="address"> |
| | | <el-input v-model="form.remark" :placeholder="'请输入'+formLabel.remark"/> |
| | | </el-form-item> |
| | | <!-- <el-form-item></el-form-item>--> |
| | | <el-form-item></el-form-item> |
| | | <el-form-item label="图片" prop="imageUrl" style="flex: 1"> |
| | | <upload-icons @uploadData="uploadData" :imageList="form.imageUrl" :limit="1"></upload-icons> |
| | | <span style="display: block;">(请上传1张设备图片)</span> |