Merge remote-tracking branch 'origin/release' into release

# Conflicts:
#	frontend/src/views/machine/controlSource/index.vue
This commit is contained in:
caozehui
2025-03-08 16:05:56 +08:00
4 changed files with 62 additions and 41 deletions

View File

@@ -6,7 +6,7 @@
size='large'
>
<el-form-item prop='username'>
<el-input v-model='loginForm.username' placeholder='用户名' disabled>
<el-input v-model='loginForm.username' placeholder='用户名'>
<template #prefix>
<el-icon class='el-input__icon'>
<user />
@@ -21,7 +21,6 @@
placeholder='密码'
show-password
autocomplete='new-password'
disabled
>
<template #prefix>
<el-icon class='el-input__icon'>
@@ -88,8 +87,8 @@ const loginRules = reactive({
const loading = ref(false)
const loginForm = reactive<Login.ReqLoginForm>({
username: 'user',
password: 'user12345.',
username: '',
password: '',
})
// login

View File

@@ -6,9 +6,9 @@
:pagination="false"
:toolButton="false"
:data="tableData"
:row-key="id"
row-key="id"
:style="{ height: '250px',maxHeight: '400px',overflow:'hidden'}"
:expand-row-keys="['0']"
>
<!-- 表格 header 按钮 -->
<template #tableHeader='scope'>
@@ -70,6 +70,28 @@ watch(() => props.parameterStr, (newData) => {
}
})
const defaultExpandRowKeys =computed(() => {
return '548c00d2e4744c38aee938cb08e2ff3b'
})
const getDefaultKey = (data: any[]) => {
if (!data || data.length === 0) {
return [];
}
const firstElement = data[0];
return findFirstLeafNode(firstElement);
}
const findFirstLeafNode = (node: any): any => {
if (!node.children || node.children.length === 0) {
return node.id;
}
return findFirstLeafNode(node.children[0]);
}
const getTableList = () => {
if (props.parameterStr) {
originalParameterArr = JSON.parse(props.parameterStr)