fix(测试跟踪): 用例评审选中模块后页面不刷新

This commit is contained in:
chenjianxing 2023-03-10 14:15:59 +08:00 committed by jianxing
parent 04f4499f9d
commit 854a19f1ee
5 changed files with 11 additions and 6 deletions

View File

@ -46,7 +46,6 @@ export default {
},
inject: [
'reload',
'reloadTopMenus'
],
data() {
return {
@ -113,7 +112,6 @@ export default {
copyRedirectUrl = getDefaultSecondLevelMenu(copyRedirectUrl);
if (copyRedirectUrl !== '/') {
this.$router.push(copyRedirectUrl);
this.reloadTopMenus();
this.reload();
return;
}
@ -139,7 +137,6 @@ export default {
this.$router.push("/");
}
}
this.reloadTopMenus();
this.reload();
},
change(projectId) {

View File

@ -393,7 +393,7 @@ import CaseEditInfoComponent from "./case/CaseEditInfoComponent";
import CaseBaseInfo from "./case/CaseBaseInfo";
import PriorityTableItem from "../../common/tableItems/planview/PriorityTableItem";
import MxVersionHistory from "./common/CaseVersionHistory"
import {getProject, versionEnableByProjectId} from "@/api/project";
import {versionEnableByProjectId} from "@/api/project";
import {openCaseEdit} from "@/business/case/test-case";
import ListItemDeleteConfirm from "metersphere-frontend/src/components/ListItemDeleteConfirm";
import CaseDiffSideViewer from "./case/diff/CaseDiffSideViewer";
@ -1602,6 +1602,8 @@ export default {
setLatestVersionById(param).then(() => {
this.$success(this.$t("commons.modify_success"));
this.checkoutByVersionId(version.id);
}).catch(() => {
this.$refs.versionHistory.loading = false;
});
},
hasOtherInfo() {

View File

@ -370,7 +370,7 @@ export default {
},
...mapState(useStore, {
selectNodeIds: 'testCasePublicSelectNodeIds',
selectNode: 'testCaseSelectNode',
selectNode: 'testCasePublicSelectNode',
moduleOptions: 'testCaseModuleOptions',
customNum: 'currentProjectIsCustomNum'
}),

View File

@ -21,6 +21,7 @@ import MsNodeTree from "metersphere-frontend/src/components/new-ui/MsNodeTree";
import {getTestCasePublicNodes} from "@/api/testCase";
import {useStore} from "@/store";
const store = useStore();
export default {
name: "TestCasePublicNodeTree",
components: {MsNodeTree, MsSearchBar},
@ -42,13 +43,17 @@ export default {
this.filter();
},
},
mounted() {
store.testCasePublicSelectNode = {};
store.testCasePublicSelectNodeIds = [];
},
methods: {
filter() {
this.$refs.publicNodeTree.filter(this.condition.filterText);
},
publicNodeChange(node, nodeIds, pNodes) {
let store = useStore();
store.testCasePublicSelectNodeIds = nodeIds;
store.testCasePublicSelectNode = node;
this.$emit("nodeSelectEvent", node, node.data.id === 'root' ? [] : nodeIds, pNodes);
},
list() {

View File

@ -8,6 +8,7 @@ export default {
isReadOnly: true,
theme: undefined,
testCaseSelectNode: {},
testCasePublicSelectNode: {},
testCaseSelectNodeIds: [],
testCaseModuleOptions: [],
testReviewSelectNode: {},