update:项目组件优化
This commit is contained in:
@@ -83,8 +83,8 @@ const props = defineProps<{
|
||||
modelValue: boolean;
|
||||
dialogType: string;
|
||||
nodeLevel1List: Array<any>;
|
||||
exeStatus: string;
|
||||
currentRow: any;
|
||||
exeStatus?: string;
|
||||
currentRow?: any;
|
||||
}>();
|
||||
|
||||
const tableFormRef = ref();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
v-model="visible"
|
||||
resizable
|
||||
:close-on-click-modal="false"
|
||||
title="配置管理"
|
||||
title="维度配置"
|
||||
@close="closeFun"
|
||||
>
|
||||
<el-tabs
|
||||
@@ -62,6 +62,11 @@
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<AddConfigurationDia
|
||||
v-model="addDiaVisible"
|
||||
@close="closeAddFun"
|
||||
@confirm="addConfigurationFun"
|
||||
/>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
@@ -69,6 +74,7 @@
|
||||
import { ref, watch } from 'vue';
|
||||
import { saveTemplateWithHierarchiesApi, getTemplateWithHierarchiesApi, deleteTemplateWithHierarchiesApi, getAllTemplateApi } from '@/api/data/dimensionTemplate';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
import AddConfigurationDia from './addConfigurationDia.vue';
|
||||
import type { TabPaneName } from 'element-plus';
|
||||
import { NODE_TYPE } from '@/utils/enum/node';
|
||||
|
||||
@@ -256,6 +262,31 @@ const editTabsFun = (targetName: TabPaneName | undefined, action: 'remove' | 'ad
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const closeAddFun = () => {
|
||||
addDiaVisible.value = false;
|
||||
};
|
||||
|
||||
const addConfigurationFun = (addFormData: any) => {
|
||||
saveTemplateWithHierarchiesApi({
|
||||
template: {
|
||||
templateName: addFormData.name,
|
||||
},
|
||||
}).then((res: any) => {
|
||||
if (res.code === 200) {
|
||||
const tabName = res.data.dimensionTemplate.id;
|
||||
editableTabs.value.push({
|
||||
title: addFormData.name,
|
||||
name: tabName,
|
||||
});
|
||||
currentEditableTab.value = tabName;
|
||||
selectLevelFormData.value.selectLevelList = [];
|
||||
} else {
|
||||
ElMessage.error(res.message);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const closeFun = () => {
|
||||
emit('update:modelValue', false);
|
||||
};
|
||||
|
||||
@@ -74,10 +74,8 @@
|
||||
<FileSearch v-model="searchShow" />
|
||||
<FileInfo v-model="infoShow" />
|
||||
<projectInfoDialog
|
||||
ref="basePageFormRef"
|
||||
v-if="showProjectInfoDialog"
|
||||
v-model:showProjectInfoDialog="showProjectInfoDialog"
|
||||
dialogType="edit"
|
||||
v-model="showProjectInfoDialog"
|
||||
dialogType="create"
|
||||
:nodeLevel1List="[]"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user