| | |
| | | </el-input> |
| | | </div> |
| | | <el-table :data="filteredParamList" |
| | | height="360" |
| | | height="300" |
| | | border |
| | | highlight-current-row |
| | | @current-change="handleParamSelect"> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <!-- 分页控件 --> |
| | | <div class="pagination-container" |
| | | style="margin-top: 10px;"> |
| | | <el-pagination v-model:current-page="paramPage.current" |
| | | v-model:page-size="paramPage.size" |
| | | :page-sizes="[10, 20, 50, 100]" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="paramPage.total" |
| | | @size-change="handleParamSizeChange" |
| | | @current-change="handleParamCurrentChange" |
| | | size="small" /> |
| | | </div> |
| | | </div> |
| | | <!-- 右侧参数详情 --> |
| | | <div class="param-detail-area"> |
| | |
| | | // 参数列表数据 |
| | | const paramList = ref([]); |
| | | const paramLoading = ref(false); |
| | | const paramPage = reactive({ |
| | | current: 1, |
| | | size: 10, |
| | | total: 0, |
| | | }); |
| | | |
| | | // 数据字典 |
| | | const dictTypes = ref([]); |
| | |
| | | const filteredParamList = ref([]); |
| | | const selectedParam = ref(null); |
| | | const paramSearchKeyword = ref(""); |
| | | |
| | | // 可选参数分页 |
| | | const paramPage = reactive({ |
| | | current: 1, |
| | | size: 10, |
| | | total: 0, |
| | | }); |
| | | |
| | | // 编辑参数对话框 |
| | | const editParamDialogVisible = ref(false); |
| | |
| | | return; |
| | | } |
| | | // 获取可选参数列表 |
| | | getBaseParamList({ paramName: paramSearchKeyword.value }).then(res => { |
| | | getBaseParamList({ |
| | | paramName: paramSearchKeyword.value, |
| | | current: paramPage.current, |
| | | size: paramPage.size, |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | filteredParamList.value = res.data || []; |
| | | page.total = res.data?.length || 0; |
| | | filteredParamList.value = res.data?.records || []; |
| | | paramPage.total = res.data?.total || 0; |
| | | } else { |
| | | ElMessage.error(res.msg || "查询失败"); |
| | | } |
| | |
| | | }; |
| | | |
| | | const handleParamSearch = () => { |
| | | const keyword = paramSearchKeyword.value.trim().toLowerCase(); |
| | | if (!keyword) { |
| | | filteredParamList.value = availableParamList.value; |
| | | } else { |
| | | filteredParamList.value = availableParamList.value.filter(item => |
| | | item.paramName.toLowerCase().includes(keyword) |
| | | ); |
| | | } |
| | | // 重置分页 |
| | | paramPage.current = 1; |
| | | // 重新加载数据 |
| | | handleSelectParam(); |
| | | }; |
| | | |
| | | // 处理分页大小变化 |
| | | const handleParamSizeChange = size => { |
| | | paramPage.size = size; |
| | | handleSelectParam(); |
| | | }; |
| | | |
| | | // 处理当前页码变化 |
| | | const handleParamCurrentChange = current => { |
| | | paramPage.current = current; |
| | | handleSelectParam(); |
| | | }; |
| | | const getParamTypeText = type => { |
| | | const typeMap = { |
| | |
| | | th { |
| | | background: transparent; |
| | | font-weight: 600; |
| | | color: #ffffff; |
| | | // color: #ffffff; |
| | | border-bottom: none; |
| | | padding: 16px 0; |
| | | } |