| | |
| | | */ |
| | | /** 搜索按钮操作 */ |
| | | function handleQuery() { |
| | | getList({keywords: searchParams.value.keywords}) |
| | | getList(searchParams.value) |
| | | } |
| | | |
| | | /** 重置按钮操作 */ |
| | |
| | | async function getList(val) { |
| | | loading.value = true; |
| | | let postParam = setPostParams(val) |
| | | await pointApi().search({...postParam, ...searchParams.value}).then((res) => { |
| | | await pointApi().search(postParam).then((res) => { |
| | | tableData.value = res.data.list |
| | | pageParam.value.total = res.data.total |
| | | pageParam.value.limit = res.data.limit |
| | |
| | | |
| | | //上传文件,添加图片地址信息 |
| | | const uploadData = (data) => { |
| | | form.value.imageUrl = imgBaseUrl + data.toString(); |
| | | form.value.imageUrl = data.toString(); |
| | | } |
| | | |
| | | /** 提交按钮 */ |
| | |
| | | <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.keywords" |
| | | placeholder="请输入搜索信息" |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <!--表格及分页--> |
| | | <el-table v-loading="loading" :data="tableData"> |
| | | <el-table v-loading="loading" :data="tableData" class="table"> |
| | | <el-table-column |
| | | v-for="(item, key, index) of tableHeader" |
| | | :prop="key.toString()" |
| | |
| | | > |
| | | <template #default="scope"> |
| | | <div v-if="key === 'imageUrl'"> |
| | | <img :src="imgBaseUrl + scope.row.headImg" class="table-headImg" alt="" /> |
| | | <img :src="imgBaseUrl + scope.row.imageUrl" class="table-headImg" alt="" /> |
| | | </div> |
| | | <div v-else-if="key === 'pointType'"> |
| | | {{ scope.row.pointType === 1 ? '水温监测点' : '生态流量监测点' }} |
| | |
| | | flex-grow: 1; |
| | | } |
| | | } |
| | | .table{ |
| | | .table-headImg{ |
| | | height: 50px; |
| | | margin: 0 auto; |
| | | } |
| | | } |
| | | </style> |