720734cf by lihua

修复新增编辑删除表未刷新树形

1 parent eae96494
...@@ -452,7 +452,7 @@ const tableInfo = ref({ ...@@ -452,7 +452,7 @@ const tableInfo = ref({
452 { label: "字段类型", field: "fieldTypeName", width: 120 }, 452 { label: "字段类型", field: "fieldTypeName", width: 120 },
453 { 453 {
454 label: "分类", field: "classifyDetailNameRoutes", width: 120, getName: (scope) => { 454 label: "分类", field: "classifyDetailNameRoutes", width: 120, getName: (scope) => {
455 return scope.row.classifyDetailNameRoutes.join('/'); 455 return !scope.row.classifyDetailNameRoutes?.length ? '--' : scope.row.classifyDetailNameRoutes?.join('/');
456 } 456 }
457 }, 457 },
458 { label: "分级", field: "gradeDetailName", width: 80 }, 458 { label: "分级", field: "gradeDetailName", width: 80 },
...@@ -749,6 +749,7 @@ const dataBaseTableInfo = ref({ ...@@ -749,6 +749,7 @@ const dataBaseTableInfo = ref({
749 if (res.code == proxy.$passCode) { 749 if (res.code == proxy.$passCode) {
750 proxy.$ElMessage.success('删除成功'); 750 proxy.$ElMessage.success('删除成功');
751 dataBaseTableInfo.value.loading = true; 751 dataBaseTableInfo.value.loading = true;
752 getDataBaseTreeData();
752 await getDataBaseTableData({ 753 await getDataBaseTableData({
753 pageIndex: dataBasePage.value.curr, 754 pageIndex: dataBasePage.value.curr,
754 pageSize: dataBasePage.value.limit 755 pageSize: dataBasePage.value.limit
...@@ -1906,7 +1907,7 @@ const selectChange = (val, row, info) => { ...@@ -1906,7 +1907,7 @@ const selectChange = (val, row, info) => {
1906 // 这里应该是onActivated 钩子,路由从configure-路由从configure-rules跳转过来要重新请求数据、 1907 // 这里应该是onActivated 钩子,路由从configure-路由从configure-rules跳转过来要重新请求数据、
1907 onActivated(async () => { 1908 onActivated(async () => {
1908 if (localStorage.getItem('shouldReloadData') === 'true') { 1909 if (localStorage.getItem('shouldReloadData') === 'true') {
1909 if (activeName.value == '数据库目录') { 1910 if (activeName.value == 'second') {
1910 getDataBaseTreeData(); 1911 getDataBaseTreeData();
1911 } 1912 }
1912 await getDataBaseTableData({ 1913 await getDataBaseTableData({
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!