d7f62632 by lihua

解决产品新增编辑问题

1 parent c001699e
1 const useDataRegisterCatalogStore = defineStore(
2 'isRefresh',
3 () => {
4 const isRefresh = ref<boolean>(false)
5
6 function set(v: boolean) {
7 isRefresh.value = v;
8 }
9
10 return {
11 isRefresh,
12 set,
13 }
14 },
15 )
16
17 export default useDataRegisterCatalogStore
...\ No newline at end of file ...\ No newline at end of file
...@@ -30,7 +30,7 @@ import { ...@@ -30,7 +30,7 @@ import {
30 import { ContentWrap } from '@/components/ContentWrap'; 30 import { ContentWrap } from '@/components/ContentWrap';
31 import importTableField from "./importTableField.vue"; 31 import importTableField from "./importTableField.vue";
32 import { useValidator } from '@/hooks/useValidator'; 32 import { useValidator } from '@/hooks/useValidator';
33 import useDataAssetStore from "@/store/modules/dataAsset"; 33 import useDataRegisterCatalogStore from "@/store/modules/dataRegisterCatalog";
34 import { handleContentWrapView, scrollLastRowToView, changeNum } from '@/utils/common'; 34 import { handleContentWrapView, scrollLastRowToView, changeNum } from '@/utils/common';
35 import { TableColumnWidth } from '@/utils/enum'; 35 import { TableColumnWidth } from '@/utils/enum';
36 import { CirclePlus } from '@element-plus/icons-vue'; 36 import { CirclePlus } from '@element-plus/icons-vue';
...@@ -38,7 +38,7 @@ import { CirclePlus } from '@element-plus/icons-vue'; ...@@ -38,7 +38,7 @@ import { CirclePlus } from '@element-plus/icons-vue';
38 const { proxy } = getCurrentInstance() as any; 38 const { proxy } = getCurrentInstance() as any;
39 const { required, checkExistName } = useValidator(); 39 const { required, checkExistName } = useValidator();
40 const userStore = useUserStore(); 40 const userStore = useUserStore();
41 const assetStore = useDataAssetStore(); 41 const registerStore = useDataRegisterCatalogStore();
42 const router = useRouter(); 42 const router = useRouter();
43 const route = useRoute(); 43 const route = useRoute();
44 const fullPath = route.fullPath; 44 const fullPath = route.fullPath;
...@@ -1090,8 +1090,8 @@ const save = () => { ...@@ -1090,8 +1090,8 @@ const save = () => {
1090 // name: 'registerCatalogManagement' 1090 // name: 'registerCatalogManagement'
1091 path: route.query.dataSources == '1' ? '/data-asset/authordata-catalog' : '/data-asset/register-catalog' 1091 path: route.query.dataSources == '1' ? '/data-asset/authordata-catalog' : '/data-asset/register-catalog'
1092 }); 1092 });
1093 assetStore.setDamCatalogRefresh(true);
1094 userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); 1093 userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
1094 registerStore.set(true);
1095 } else { 1095 } else {
1096 proxy.$ElMessage.error(res.msg); 1096 proxy.$ElMessage.error(res.msg);
1097 } 1097 }
...@@ -1117,8 +1117,8 @@ const save = () => { ...@@ -1117,8 +1117,8 @@ const save = () => {
1117 // name: 'registerCatalogManagement' 1117 // name: 'registerCatalogManagement'
1118 path: route.query.dataSources == '1' ? '/data-asset/authordata-catalog' : '/data-asset/register-catalog' 1118 path: route.query.dataSources == '1' ? '/data-asset/authordata-catalog' : '/data-asset/register-catalog'
1119 }); 1119 });
1120 assetStore.setDamCatalogRefresh(true);
1121 userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); 1120 userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
1121 registerStore.set(true);
1122 } else { 1122 } else {
1123 proxy.$ElMessage.error(res.msg); 1123 proxy.$ElMessage.error(res.msg);
1124 } 1124 }
......
...@@ -27,7 +27,7 @@ import { ElMessage, ElMessageBox } from "element-plus"; ...@@ -27,7 +27,7 @@ import { ElMessage, ElMessageBox } from "element-plus";
27 import { passFlowData, rejectFlowData, revokeFlowData, isMyFirstNode } from "@/api/modules/workFlowService"; 27 import { passFlowData, rejectFlowData, revokeFlowData, isMyFirstNode } from "@/api/modules/workFlowService";
28 import { onUploadFilePreview, onUploadFileDownload } from '@/api/modules/common'; 28 import { onUploadFilePreview, onUploadFileDownload } from '@/api/modules/common';
29 import { CircleCloseFilled } from '@element-plus/icons-vue' 29 import { CircleCloseFilled } from '@element-plus/icons-vue'
30 import useDataAssetStore from "@/store/modules/dataAsset"; 30 import useDataRegisterCatalogStore from "@/store/modules/dataRegisterCatalog";
31 import { TableColumnWidth } from '@/utils/enum'; 31 import { TableColumnWidth } from '@/utils/enum';
32 import { 32 import {
33 downloadTableData, 33 downloadTableData,
...@@ -40,7 +40,7 @@ const router = useRouter(); ...@@ -40,7 +40,7 @@ const router = useRouter();
40 const route = useRoute(); 40 const route = useRoute();
41 const userStore = useUserStore(); 41 const userStore = useUserStore();
42 const userData = JSON.parse(userStore.userData) 42 const userData = JSON.parse(userStore.userData)
43 const assetStore = useDataAssetStore(); 43 const registerStore = useDataRegisterCatalogStore();
44 const fullPath = route.fullPath; 44 const fullPath = route.fullPath;
45 const catalogGuid = route.query.guid; 45 const catalogGuid = route.query.guid;
46 const evaGuid = route.query.evaGuid; 46 const evaGuid = route.query.evaGuid;
...@@ -378,7 +378,7 @@ const strategyDetail = ref([]); ...@@ -378,7 +378,7 @@ const strategyDetail = ref([]);
378 const strategyContentLoading = ref(false); 378 const strategyContentLoading = ref(false);
379 379
380 onBeforeMount(() => { 380 onBeforeMount(() => {
381 if (!assetStore.isRefreshDamCatalog) { 381 if (!registerStore.isRefresh) {
382 getDetailInfo(); 382 getDetailInfo();
383 } 383 }
384 if (route.query.useGuid) { 384 if (route.query.useGuid) {
...@@ -403,9 +403,9 @@ onActivated(() => { ...@@ -403,9 +403,9 @@ onActivated(() => {
403 tab.meta.title = foundMode.value == 'download' ? `下载详情-${route.query.name}` : ((foundMode.value == 'read' || foundMode.value == 'readAndDown') ? `查看详情-${route.query.name}` : `详情-${route.query.name}`); 403 tab.meta.title = foundMode.value == 'download' ? `下载详情-${route.query.name}` : ((foundMode.value == 'read' || foundMode.value == 'readAndDown') ? `查看详情-${route.query.name}` : `详情-${route.query.name}`);
404 } 404 }
405 } 405 }
406 if (assetStore.isRefreshDamCatalog) { 406 if (registerStore.isRefresh) {
407 getDetailInfo(); 407 getDetailInfo();
408 assetStore.setDamCatalogRefresh(false); 408 registerStore.set(false);
409 } 409 }
410 }); 410 });
411 411
......
...@@ -14,14 +14,14 @@ import { ...@@ -14,14 +14,14 @@ import {
14 getDataReceiveContract 14 getDataReceiveContract
15 } from "@/api/modules/dataAsset"; 15 } from "@/api/modules/dataAsset";
16 import { commonPageConfig } from "@/utils/enum"; 16 import { commonPageConfig } from "@/utils/enum";
17 import useDataAssetStore from "@/store/modules/dataAsset"; 17 import useDataRegisterCatalogStore from "@/store/modules/dataRegisterCatalog";
18 import useUserStore from "@/store/modules/user"; 18 import useUserStore from "@/store/modules/user";
19 import deliverUploadDialog from "./components/deliverUploadDialog.vue"; 19 import deliverUploadDialog from "./components/deliverUploadDialog.vue";
20 20
21 const userStore = useUserStore(); 21 const userStore = useUserStore();
22 const userData = JSON.parse(userStore.userData); 22 const userData = JSON.parse(userStore.userData);
23 23
24 const assetStore = useDataAssetStore(); 24 const registerStore = useDataRegisterCatalogStore();
25 25
26 const props = defineProps({ 26 const props = defineProps({
27 dataSources: { 27 dataSources: {
...@@ -271,11 +271,11 @@ const pageChange = (info) => { ...@@ -271,11 +271,11 @@ const pageChange = (info) => {
271 }; 271 };
272 272
273 onActivated(() => { 273 onActivated(() => {
274 if (assetStore.isRefreshDamCatalog) { 274 if (registerStore.isRefresh) {
275 //如果是首次加载,则不需要调用 275 //如果是首次加载,则不需要调用
276 pageInfo.value.curr = 1; 276 pageInfo.value.curr = 1;
277 getTableData(); 277 getTableData();
278 assetStore.setDamCatalogRefresh(false); 278 registerStore.set(false);
279 } 279 }
280 }); 280 });
281 281
...@@ -376,7 +376,7 @@ const handleClickUploadBtn = (item) => { ...@@ -376,7 +376,7 @@ const handleClickUploadBtn = (item) => {
376 const handleUploadClose = (itemGuid) => { 376 const handleUploadClose = (itemGuid) => {
377 deliverUploadVisible.value = false 377 deliverUploadVisible.value = false
378 if (itemGuid) { 378 if (itemGuid) {
379 assetStore.setDamCatalogRefresh(true); 379 registerStore.set(true);
380 router.push({ 380 router.push({
381 path: props.dataSources == 1 ? '/data-asset/authordata-catalog/register-catalog-detail' : '/data-asset/register-catalog/register-catalog-detail', 381 path: props.dataSources == 1 ? '/data-asset/authordata-catalog/register-catalog-detail' : '/data-asset/register-catalog/register-catalog-detail',
382 //name: "registerCatalogDetail", 382 //name: "registerCatalogDetail",
......
...@@ -67,7 +67,7 @@ const processTableInfo = ref({ ...@@ -67,7 +67,7 @@ const processTableInfo = ref({
67 { label: "操作时间", field: "operatingTime", width: 170 }, 67 { label: "操作时间", field: "operatingTime", width: 170 },
68 { label: "操作类型", field: "operatingType", width: 110, getName: (scope) => { 68 { label: "操作类型", field: "operatingType", width: 110, getName: (scope) => {
69 let typeMap = { 69 let typeMap = {
70 1: '新增', 70 1: '提交',
71 2: '修改', 71 2: '修改',
72 3: '删除' 72 3: '删除'
73 } 73 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!