update:应用参数修改

This commit is contained in:
2026-04-15 09:08:31 +08:00
parent a7a51ea0c3
commit 38c96014d9

View File

@@ -118,7 +118,7 @@ const submitFun = async () => {
if (valid) {
const fromData = tableFormRef.value.getFormDataFun();
const appImage: any = fromData.appImage;
fromData.commandConfigs = appformData.commandConfigs;
fromData.commandConfigs = paramsList.value.concat(appformData.commandConfigs);
// 判断是否上传了图片
if (!appImage) {
appName.value = fromData.appName;
@@ -220,6 +220,7 @@ const getCommandConfigsFun = (str: any) => {
for (let i = 0; i < list.length; i++) {
if (!appParams.includes(list[i])) {
if (!['coreNum', 'masterFileName'].includes(list[i])) {
appformData.commandConfigs.push({
defaultValue: 'default',
featchType: 'param',
@@ -231,19 +232,29 @@ const getCommandConfigsFun = (str: any) => {
});
}
}
}
console.log(list);
console.log(appformData.commandConfigs);
baseTableRef.value.setDataFun(appformData.commandConfigs);
};
const paramsList = ref<any>([]);
watch(
() => props.currentAppInfo,
(newVal) => {
if (newVal) {
currentRow.value = cloneDeep(newVal);
appformData.appImage = currentRow.value?.appImage;
appformData.commandConfigs = currentRow.value?.commandConfigs || [];
paramsList.value =
currentRow.value?.commandConfigs?.filter((item: any) => {
return ['coreNum', 'masterFileName'].includes(item.keyEnName);
}) || [];
appformData.commandConfigs =
currentRow.value?.commandConfigs?.filter((item: any) => {
return !['coreNum', 'masterFileName'].includes(item.keyEnName);
}) || [];
setTimeout(() => {
if (currentRow.value?.id) {
tableFormRef.value.setFormDataFun(currentRow.value);