|
@@ -36,13 +36,17 @@ const formLabelAlign = reactive({
|
|
|
showFinalValue: 0,
|
|
|
showChallengeValue: 0,
|
|
|
showStartValue: 0,
|
|
|
- remark: ""
|
|
|
+ remark: "",
|
|
|
+ tpId: ""
|
|
|
});
|
|
|
const newAddItem = ref();
|
|
|
const handleClose = (done: () => void) => {
|
|
|
+ done();
|
|
|
drawer.value = false;
|
|
|
};
|
|
|
-function cancelClick() {}
|
|
|
+function cancelClick() {
|
|
|
+ drawer.value = false;
|
|
|
+}
|
|
|
function confirmClick() {
|
|
|
ruleFormRef.value.validate((valid: boolean) => {
|
|
|
if (valid) {
|
|
@@ -58,7 +62,7 @@ const open = (row: any, title: string, order: number) => {
|
|
|
dalongTitle.value = title;
|
|
|
if (title == "新建") {
|
|
|
Object.assign(formLabelAlign, {
|
|
|
- id: row.id ? row.id : $route.query.id,
|
|
|
+ tpId: row.id ? row.id : $route.query.id,
|
|
|
list: [],
|
|
|
dimName: "",
|
|
|
dimWeight: 0,
|
|
@@ -133,18 +137,13 @@ const showStartValueValue = computed({
|
|
|
// 分割————————————————————————————————————————————
|
|
|
// 新建维度
|
|
|
const postAddDimensionApi = async () => {
|
|
|
- let tpId = formLabelAlign.id;
|
|
|
- let dataList = formLabelAlign;
|
|
|
- delete dataList.id;
|
|
|
- let list = { tpId: tpId, ...dataList };
|
|
|
- console.log("dsafasfafwaw", list);
|
|
|
- const { code, msg } = await postAddDimension(list);
|
|
|
+ const { code, msg } = await postAddDimension(formLabelAlign);
|
|
|
if (code === 200) {
|
|
|
ElMessage({
|
|
|
message: "添加成功",
|
|
|
type: "success"
|
|
|
});
|
|
|
- $emit("handClick");
|
|
|
+ $emit("handClick", formLabelAlign.tpId);
|
|
|
drawer.value = false;
|
|
|
} else {
|
|
|
ElMessage({
|
|
@@ -161,7 +160,7 @@ const postUpdateDeptApi = async () => {
|
|
|
message: "更新成功",
|
|
|
type: "success"
|
|
|
});
|
|
|
- $emit("handClick");
|
|
|
+ $emit("handClick", formLabelAlign.tpId);
|
|
|
drawer.value = false;
|
|
|
} else {
|
|
|
ElMessage({
|