|
@@ -13,6 +13,7 @@ import { ElMessageBox, ElMessage } from "element-plus";
|
|
|
import { postAddRelationList, postUpdateDept } from "@/api/dimension";
|
|
|
import { useAppStoreHook } from "@/store/modules/app";
|
|
|
import { addQuota } from "@/api/indexDefine";
|
|
|
+import { postUpdateTemplateIn } from "@/api/templateInfo";
|
|
|
import {
|
|
|
postAddDimension,
|
|
|
getDimensionRemove,
|
|
@@ -112,7 +113,6 @@ const getAddListByApi = async id => {
|
|
|
};
|
|
|
const { code, data, msg } = await getListBy(obj);
|
|
|
if (code === 200) {
|
|
|
- titleShow.value = true;
|
|
|
eaxmCard.value = data;
|
|
|
eaxmCard.value.forEach(item => {
|
|
|
initializeTableData(item);
|
|
@@ -179,10 +179,21 @@ const backChange = () => {
|
|
|
useAppStoreHook().toggleSideBar(true, "打开");
|
|
|
router.back();
|
|
|
};
|
|
|
+// 更新模板
|
|
|
+const postUpdateTemplateInApi = async () => {
|
|
|
+ const { code, msg } = await postUpdateTemplateIn({
|
|
|
+ tpName: tepNameForm.tpName,
|
|
|
+ id: tepNameForm.id
|
|
|
+ });
|
|
|
+ if (code == 200) {
|
|
|
+ titleShow.value = true;
|
|
|
+ } else {
|
|
|
+ ElMessage.error(msg);
|
|
|
+ }
|
|
|
+};
|
|
|
+// 保存
|
|
|
const save = () => {
|
|
|
if (titleShow.value) {
|
|
|
- console.log("触发");
|
|
|
-
|
|
|
router.back();
|
|
|
useAppStoreHook().toggleSideBar(true, "打开");
|
|
|
} else {
|
|
@@ -190,6 +201,9 @@ const save = () => {
|
|
|
if (valid) {
|
|
|
if (tepNameForm.id) {
|
|
|
getAddListByApi(tepNameForm.id);
|
|
|
+ postUpdateTemplateInApi();
|
|
|
+ if (router.query) {
|
|
|
+ }
|
|
|
} else {
|
|
|
postAddTemplateApi();
|
|
|
}
|
|
@@ -273,8 +287,8 @@ const importIndexOne = async row => {
|
|
|
let formula = JSON.stringify({
|
|
|
noConditionFormula: ""
|
|
|
});
|
|
|
- const { code, data, msg } = await postAddDisposableQuota();
|
|
|
- if ((code = 200)) {
|
|
|
+ const { code, data, msg } = await postAddDisposableQuota({ name: "" });
|
|
|
+ if (code == 200) {
|
|
|
const res = await postAddRelationList([
|
|
|
{
|
|
|
dimId: row.id,
|