| | |
| | | class="flex items-center text-blue-400 py-2 px-4 rounded-md" |
| | | :style="{ borderBottom: index !== queryForm.conditions.length - 1 ? '1px solid #e0e0e0' : 'none' }" |
| | | > |
| | | <span>{{ condition.field }}</span> |
| | | <span>{{ condition.operator }}</span> |
| | | <span>{{ propertyMapRow[condition.field]?.title }}</span> |
| | | <span>{{ operatorMap[condition.operator]?.label }}</span> |
| | | <span>{{ condition.value }}</span> |
| | | <el-button type="danger" link @click="removeCondition(index)" class="!flex !items-center ml-auto"> |
| | | <span class="ywifont ywicon-shanchu"></span> |
| | |
| | | }); |
| | | }); |
| | | |
| | | const propertyMapRow = ref(null); |
| | | const propertyGroupProps = { |
| | | label: 'title', |
| | | children: 'prop_list', |
| | |
| | | value: null, |
| | | }; |
| | | } |
| | | return { |
| | | const row = { |
| | | id: `${item.type}_${item.vprop}`, |
| | | ...item, |
| | | info, |
| | | title: info.title ?? '-', |
| | | }; |
| | | if (!propertyMapRow.value) { |
| | | propertyMapRow.value = {}; |
| | | } |
| | | propertyMapRow.value[row.id] = row; |
| | | return row; |
| | | }); |
| | | return group; |
| | | }); |
| | |
| | | { label: '小于等于', value: 'lte' }, |
| | | { label: '包含', value: 'contains' }, |
| | | ]; |
| | | |
| | | const getOperatorMap = () => { |
| | | const operatorMap = operators.reduce((map, item) => { |
| | | map[item.value] = item; |
| | | return map; |
| | | }, {}); |
| | | return operatorMap; |
| | | }; |
| | | |
| | | const operatorMap = getOperatorMap(); |
| | | |
| | | |
| | | |
| | | |
| | | const tmpConditionFormRef = ref(); |
| | | |
| | |
| | | const handleLocate = () => { |
| | | // 实现高亮定位逻辑 |
| | | props.olMap.clearObjectSearch(); |
| | | const features = tableData.value.filter((item) => item.WKT).map((item) => { |
| | | return props.olMap.readWKT(item.WKT); |
| | | }); |
| | | const features = tableData.value |
| | | .filter((item) => item.WKT) |
| | | .map((item) => { |
| | | return props.olMap.readWKT(item.WKT); |
| | | }); |
| | | props.olMap.highlightSearch(features); |
| | | // props.olMap.zoomToFeatures(features); |
| | | }; |