97c1847f by lihua

解决产品新增编辑问题

1 parent faac39aa
const useDataRegisterCatalogStore = defineStore(
'isRefresh',
() => {
const isRefresh = ref<boolean>(false)
function set(v: boolean) {
isRefresh.value = v;
}
return {
isRefresh,
set,
}
},
)
export default useDataRegisterCatalogStore
\ No newline at end of file
......@@ -30,7 +30,7 @@ import {
import { ContentWrap } from '@/components/ContentWrap';
import importTableField from "./importTableField.vue";
import { useValidator } from '@/hooks/useValidator';
import useDataAssetStore from "@/store/modules/dataAsset";
import useDataRegisterCatalogStore from "@/store/modules/dataRegisterCatalog";
import { handleContentWrapView, scrollLastRowToView, changeNum } from '@/utils/common';
import { TableColumnWidth } from '@/utils/enum';
import { CirclePlus } from '@element-plus/icons-vue';
......@@ -38,7 +38,7 @@ import { CirclePlus } from '@element-plus/icons-vue';
const { proxy } = getCurrentInstance() as any;
const { required, checkExistName } = useValidator();
const userStore = useUserStore();
const assetStore = useDataAssetStore();
const registerStore = useDataRegisterCatalogStore();
const router = useRouter();
const route = useRoute();
const fullPath = route.fullPath;
......@@ -1088,8 +1088,8 @@ const save = () => {
// name: 'registerCatalogManagement'
path: route.query.dataSources == '1' ? '/data-asset/authordata-catalog' : '/data-asset/register-catalog'
});
assetStore.setDamCatalogRefresh(true);
userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
registerStore.set(true);
} else {
proxy.$ElMessage.error(res.msg);
}
......@@ -1114,8 +1114,8 @@ const save = () => {
// name: 'registerCatalogManagement'
path: route.query.dataSources == '1' ? '/data-asset/authordata-catalog' : '/data-asset/register-catalog'
});
assetStore.setDamCatalogRefresh(true);
userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
registerStore.set(true);
} else {
proxy.$ElMessage.error(res.msg);
}
......
......@@ -27,7 +27,7 @@ import { ElMessage, ElMessageBox } from "element-plus";
import { passFlowData, rejectFlowData, revokeFlowData, isMyFirstNode } from "@/api/modules/workFlowService";
import { onUploadFilePreview, onUploadFileDownload } from '@/api/modules/common';
import { CircleCloseFilled } from '@element-plus/icons-vue'
import useDataAssetStore from "@/store/modules/dataAsset";
import useDataRegisterCatalogStore from "@/store/modules/dataRegisterCatalog";
import { TableColumnWidth } from '@/utils/enum';
import {
downloadTableData,
......@@ -40,7 +40,7 @@ const router = useRouter();
const route = useRoute();
const userStore = useUserStore();
const userData = JSON.parse(userStore.userData)
const assetStore = useDataAssetStore();
const registerStore = useDataRegisterCatalogStore();
const fullPath = route.fullPath;
const catalogGuid = route.query.guid;
const evaGuid = route.query.evaGuid;
......@@ -380,7 +380,7 @@ const strategyDetail = ref([]);
const strategyContentLoading = ref(false);
onBeforeMount(() => {
if (!assetStore.isRefreshDamCatalog) {
if (!registerStore.isRefresh) {
getDetailInfo();
}
if (route.query.useGuid) {
......@@ -405,9 +405,9 @@ onActivated(() => {
tab.meta.title = foundMode.value == 'download' ? `下载详情-${route.query.name}` : ((foundMode.value == 'read' || foundMode.value == 'readAndDown') ? `查看详情-${route.query.name}` : `详情-${route.query.name}`);
}
}
if (assetStore.isRefreshDamCatalog) {
if (registerStore.isRefresh) {
getDetailInfo();
assetStore.setDamCatalogRefresh(false);
registerStore.set(false);
}
});
......
......@@ -14,14 +14,14 @@ import {
getDataReceiveContract
} from "@/api/modules/dataAsset";
import { commonPageConfig } from "@/utils/enum";
import useDataAssetStore from "@/store/modules/dataAsset";
import useDataRegisterCatalogStore from "@/store/modules/dataRegisterCatalog";
import useUserStore from "@/store/modules/user";
import deliverUploadDialog from "./components/deliverUploadDialog.vue";
const userStore = useUserStore();
const userData = JSON.parse(userStore.userData);
const assetStore = useDataAssetStore();
const registerStore = useDataRegisterCatalogStore();
const props = defineProps({
dataSources: {
......@@ -271,11 +271,11 @@ const pageChange = (info) => {
};
onActivated(() => {
if (assetStore.isRefreshDamCatalog) {
if (registerStore.isRefresh) {
//如果是首次加载,则不需要调用
pageInfo.value.curr = 1;
getTableData();
assetStore.setDamCatalogRefresh(false);
registerStore.set(false);
}
});
......@@ -376,7 +376,7 @@ const handleClickUploadBtn = (item) => {
const handleUploadClose = (itemGuid) => {
deliverUploadVisible.value = false
if (itemGuid) {
assetStore.setDamCatalogRefresh(true);
registerStore.set(true);
router.push({
path: props.dataSources == 1 ? '/data-asset/authordata-catalog/register-catalog-detail' : '/data-asset/register-catalog/register-catalog-detail',
//name: "registerCatalogDetail",
......
......@@ -67,7 +67,7 @@ const processTableInfo = ref({
{ label: "操作时间", field: "operatingTime", width: 170 },
{ label: "操作类型", field: "operatingType", width: 110, getName: (scope) => {
let typeMap = {
1: '新增',
1: '提交',
2: '修改',
3: '删除'
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!