update:补充参数的新增和编辑功能
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
>
|
||||
</parameterArchive>
|
||||
|
||||
<Dialog
|
||||
<!-- <Dialog
|
||||
v-model="visible"
|
||||
diaTitle="参数设置"
|
||||
:width="'60%'"
|
||||
@@ -45,7 +45,14 @@
|
||||
:data="formData"
|
||||
>
|
||||
</TableForm>
|
||||
</Dialog>
|
||||
</Dialog> -->
|
||||
|
||||
<ParamDetail
|
||||
v-model="visible"
|
||||
:data="formData"
|
||||
@add="addParamFun"
|
||||
@edit="editParamFun"
|
||||
></ParamDetail>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -60,6 +67,7 @@ import { saveNodeParamsApi } from '@/api/project/run';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import Dialog from '@/components/common/dialog/index.vue';
|
||||
import TableForm from '@/components/common/table/tableForm.vue';
|
||||
import ParamDetail from '@/views/simulation/parameter/components/addParam.vue';
|
||||
|
||||
const props = defineProps({
|
||||
flowNodeParamData: {
|
||||
@@ -181,6 +189,18 @@ const handleCloseFun = () => {
|
||||
visible.value = false;
|
||||
};
|
||||
|
||||
const addParamFun = (data: any) => {
|
||||
tableData.value.push(data);
|
||||
};
|
||||
|
||||
const editParamFun = (data: any) => {
|
||||
for (let i = 0; i < tableData.value.length; i++) {
|
||||
if (tableData.value[i].parameterName === data.parameterName) {
|
||||
tableData.value[i] = data;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
watch(
|
||||
() => props.flowNodeData,
|
||||
async (newVal) => {
|
||||
|
||||
Reference in New Issue
Block a user