feat: 添加脑图
This commit is contained in:
parent
e3bb866969
commit
dc0cc7425a
|
@ -49,7 +49,8 @@
|
||||||
"vuex": "^3.1.2",
|
"vuex": "^3.1.2",
|
||||||
"xml-js": "^1.6.11",
|
"xml-js": "^1.6.11",
|
||||||
"yan-progress": "^1.0.3",
|
"yan-progress": "^1.0.3",
|
||||||
"jsonpath": "^1.1.0"
|
"jsonpath": "^1.1.0",
|
||||||
|
"vue-minder-editor-plus": "^1.0.13"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vue/cli-plugin-babel": "^4.1.0",
|
"@vue/cli-plugin-babel": "^4.1.0",
|
||||||
|
|
|
@ -24,9 +24,8 @@
|
||||||
:label="item.title"
|
:label="item.title"
|
||||||
:closable="item.closable"
|
:closable="item.closable"
|
||||||
:name="item.name">
|
:name="item.name">
|
||||||
<api-list-container-with-doc
|
<ms-tab-button
|
||||||
v-if="item.type === 'list'"
|
v-if="item.type === 'list'"
|
||||||
:is-api-list-enable="isApiListEnable"
|
|
||||||
:active-dom.sync="activeDom"
|
:active-dom.sync="activeDom"
|
||||||
:left-tip="$t('api_test.definition.api_title')"
|
:left-tip="$t('api_test.definition.api_title')"
|
||||||
:right-tip="$t('api_test.definition.doc_title')"
|
:right-tip="$t('api_test.definition.doc_title')"
|
||||||
|
@ -45,7 +44,6 @@
|
||||||
:currentRow="currentRow"
|
:currentRow="currentRow"
|
||||||
:select-node-ids="selectNodeIds"
|
:select-node-ids="selectNodeIds"
|
||||||
:trash-enable="trashEnable"
|
:trash-enable="trashEnable"
|
||||||
:is-api-list-enable="isApiListEnable"
|
|
||||||
:queryDataType="queryDataType"
|
:queryDataType="queryDataType"
|
||||||
:selectDataRange="selectDataRange"
|
:selectDataRange="selectDataRange"
|
||||||
@changeSelectDataRangeAll="changeSelectDataRangeAll"
|
@changeSelectDataRangeAll="changeSelectDataRangeAll"
|
||||||
|
@ -70,7 +68,7 @@
|
||||||
v-if="activeDom==='right'"
|
v-if="activeDom==='right'"
|
||||||
:project-id="projectId"
|
:project-id="projectId"
|
||||||
:module-ids="selectNodeIds"/>
|
:module-ids="selectNodeIds"/>
|
||||||
</api-list-container-with-doc>
|
</ms-tab-button>
|
||||||
<!-- 添加/编辑测试窗口-->
|
<!-- 添加/编辑测试窗口-->
|
||||||
<div v-if="item.type=== 'ADD'" class="ms-api-div">
|
<div v-if="item.type=== 'ADD'" class="ms-api-div">
|
||||||
<ms-api-config :syncTabs="syncTabs" @runTest="runTest" @saveApi="saveApi" @createRootModel="createRootModel" ref="apiConfig"
|
<ms-api-config :syncTabs="syncTabs" @runTest="runTest" @saveApi="saveApi" @createRootModel="createRootModel" ref="apiConfig"
|
||||||
|
@ -146,7 +144,7 @@ import ApiCaseSimpleList from "./components/list/ApiCaseSimpleList";
|
||||||
|
|
||||||
import ApiDocumentsPage from "@/business/components/api/definition/components/list/ApiDocumentsPage";
|
import ApiDocumentsPage from "@/business/components/api/definition/components/list/ApiDocumentsPage";
|
||||||
import MsTableButton from "@/business/components/common/components/MsTableButton";
|
import MsTableButton from "@/business/components/common/components/MsTableButton";
|
||||||
import ApiListContainerWithDoc from "@/business/components/common/components/MsTabButton";
|
import MsTabButton from "@/business/components/common/components/MsTabButton";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ApiDefinition",
|
name: "ApiDefinition",
|
||||||
|
@ -159,7 +157,7 @@ import ApiListContainerWithDoc from "@/business/components/common/components/MsT
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
ApiListContainerWithDoc,
|
MsTabButton,
|
||||||
MsTableButton,
|
MsTableButton,
|
||||||
ApiCaseSimpleList,
|
ApiCaseSimpleList,
|
||||||
MsApiModule,
|
MsApiModule,
|
||||||
|
@ -206,7 +204,6 @@ import ApiListContainerWithDoc from "@/business/components/common/components/MsT
|
||||||
type: "list",
|
type: "list",
|
||||||
closable: false
|
closable: false
|
||||||
}],
|
}],
|
||||||
isApiListEnable: true,
|
|
||||||
activeDom: "left",
|
activeDom: "left",
|
||||||
syncTabs: [],
|
syncTabs: [],
|
||||||
projectId: "",
|
projectId: "",
|
||||||
|
|
|
@ -238,10 +238,6 @@ export default {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
isApiListEnable: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
isReadOnly: {
|
isReadOnly: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
|
|
@ -21,10 +21,6 @@ export default {
|
||||||
projectId:String,
|
projectId:String,
|
||||||
moduleIds:Array,
|
moduleIds:Array,
|
||||||
activeDom:String,
|
activeDom:String,
|
||||||
isApiListEnable: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
created: function () {
|
created: function () {
|
||||||
},
|
},
|
||||||
|
|
|
@ -222,7 +222,6 @@ import {downloadFile, getUUID} from "@/common/js/utils";
|
||||||
import {PROJECT_NAME} from '@/common/js/constants';
|
import {PROJECT_NAME} from '@/common/js/constants';
|
||||||
import {getCurrentProjectID, getCurrentUser} from "@/common/js/utils";
|
import {getCurrentProjectID, getCurrentUser} from "@/common/js/utils";
|
||||||
import {API_LIST, TEST_CASE_LIST, WORKSPACE_ID} from '@/common/js/constants';
|
import {API_LIST, TEST_CASE_LIST, WORKSPACE_ID} from '@/common/js/constants';
|
||||||
import ApiListContainer from "./ApiListContainer";
|
|
||||||
import MsTableHeaderSelectPopover from "@/business/components/common/components/table/MsTableHeaderSelectPopover";
|
import MsTableHeaderSelectPopover from "@/business/components/common/components/table/MsTableHeaderSelectPopover";
|
||||||
import ApiStatus from "@/business/components/api/definition/components/list/ApiStatus";
|
import ApiStatus from "@/business/components/api/definition/components/list/ApiStatus";
|
||||||
import MsTableAdvSearchBar from "@/business/components/common/components/search/MsTableAdvSearchBar";
|
import MsTableAdvSearchBar from "@/business/components/common/components/search/MsTableAdvSearchBar";
|
||||||
|
@ -343,7 +342,6 @@ export default {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
isApiListEnable: Boolean,
|
|
||||||
isReadOnly: {
|
isReadOnly: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "ApiListContainerWithDoc",
|
name: "MsTabButton",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isShow: true,
|
isShow: true,
|
||||||
|
|
|
@ -14,7 +14,15 @@
|
||||||
<ms-main-container>
|
<ms-main-container>
|
||||||
<el-tabs v-model="activeName" @tab-click="addTab" @tab-remove="removeTab">
|
<el-tabs v-model="activeName" @tab-click="addTab" @tab-remove="removeTab">
|
||||||
<el-tab-pane name="default" :label="$t('api_test.definition.case_title')">
|
<el-tab-pane name="default" :label="$t('api_test.definition.case_title')">
|
||||||
|
<ms-tab-button
|
||||||
|
:active-dom.sync="activeDom"
|
||||||
|
:left-tip="'用例列表'"
|
||||||
|
:left-content="'CAS'"
|
||||||
|
:right-tip="'E脑图'"
|
||||||
|
:right-content="'脑图'"
|
||||||
|
:middle-button-enable="false">
|
||||||
<test-case-list
|
<test-case-list
|
||||||
|
v-if="activeDom === 'left'"
|
||||||
:checkRedirectID="checkRedirectID"
|
:checkRedirectID="checkRedirectID"
|
||||||
:module-options="moduleOptions"
|
:module-options="moduleOptions"
|
||||||
:select-node-ids="selectNodeIds"
|
:select-node-ids="selectNodeIds"
|
||||||
|
@ -29,6 +37,10 @@
|
||||||
@setCondition="setCondition"
|
@setCondition="setCondition"
|
||||||
ref="testCaseList">
|
ref="testCaseList">
|
||||||
</test-case-list>
|
</test-case-list>
|
||||||
|
<testcase-minder
|
||||||
|
v-if="activeDom === 'right'"
|
||||||
|
ref="testCaseList"/>
|
||||||
|
</ms-tab-button>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane
|
<el-tab-pane
|
||||||
:key="item.name"
|
:key="item.name"
|
||||||
|
@ -85,10 +97,14 @@ import MsMainContainer from "../../common/components/MsMainContainer";
|
||||||
import {checkoutTestManagerOrTestUser, getCurrentProjectID, getUUID, hasRoles} from "../../../../common/js/utils";
|
import {checkoutTestManagerOrTestUser, getCurrentProjectID, getUUID, hasRoles} from "../../../../common/js/utils";
|
||||||
import TestCaseNodeTree from "../common/TestCaseNodeTree";
|
import TestCaseNodeTree from "../common/TestCaseNodeTree";
|
||||||
import {TrackEvent,LIST_CHANGE} from "@/business/components/common/head/ListEvent";
|
import {TrackEvent,LIST_CHANGE} from "@/business/components/common/head/ListEvent";
|
||||||
|
import TestcaseMinder from "@/business/components/track/case/components/minder/TestcaseMinder";
|
||||||
|
import MsTabButton from "@/business/components/common/components/MsTabButton";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestCase",
|
name: "TestCase",
|
||||||
components: {
|
components: {
|
||||||
|
MsTabButton,
|
||||||
|
TestcaseMinder,
|
||||||
TestCaseNodeTree,
|
TestCaseNodeTree,
|
||||||
MsMainContainer,
|
MsMainContainer,
|
||||||
MsAsideContainer, MsContainer, TestCaseList, NodeTree, TestCaseEdit, SelectMenu
|
MsAsideContainer, MsContainer, TestCaseList, NodeTree, TestCaseEdit, SelectMenu
|
||||||
|
@ -109,8 +125,8 @@ export default {
|
||||||
tabs: [],
|
tabs: [],
|
||||||
renderComponent:true,
|
renderComponent:true,
|
||||||
loading: false,
|
loading: false,
|
||||||
type:''
|
type:'',
|
||||||
|
activeDom: 'left'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
|
@ -1,12 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
|
|
||||||
<div class="card-container">
|
<div class="card-container" v-loading="result.loading">
|
||||||
<el-card class="card-content" v-loading="result.loading">
|
|
||||||
<template v-slot:header>
|
<ms-table-header :is-tester-permission="true" :condition.sync="condition" @search="initTableData"
|
||||||
<ms-table-header :is-tester-permission="true" :condition.sync="condition" @search="initTableData"
|
:tip="$t('commons.search_by_name_or_id')" title="" :show-create="false"/>
|
||||||
:tip="$t('commons.search_by_name_or_id')" title="" :show-create="false"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
<el-table
|
<el-table
|
||||||
border
|
border
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
|
@ -168,7 +165,6 @@
|
||||||
|
|
||||||
<ms-table-pagination :change="initTableData" :current-page.sync="currentPage" :page-size.sync="pageSize"
|
<ms-table-pagination :change="initTableData" :current-page.sync="currentPage" :page-size.sync="pageSize"
|
||||||
:total="total"/>
|
:total="total"/>
|
||||||
</el-card>
|
|
||||||
|
|
||||||
<batch-edit ref="batchEdit" @batchEdit="batchEdit"
|
<batch-edit ref="batchEdit" @batchEdit="batchEdit"
|
||||||
:typeArr="typeArr" :value-arr="valueArr" :dialog-title="$t('test_track.case.batch_edit_case')"/>
|
:typeArr="typeArr" :value-arr="valueArr" :dialog-title="$t('test_track.case.batch_edit_case')"/>
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
<template>
|
||||||
|
<div class="minder">
|
||||||
|
<!-- <testcase-minder-header/>-->
|
||||||
|
<!-- <div id="minder-container"></div>-->
|
||||||
|
<minder-editor class="minder-container" :import-json="importJson"/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "TestcaseMinder",
|
||||||
|
components: {},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
importJson: {
|
||||||
|
"root": {
|
||||||
|
"data": {
|
||||||
|
"text": "test111"
|
||||||
|
},
|
||||||
|
"children": [
|
||||||
|
{ "data": { "text": "新闻"}},
|
||||||
|
{ "data": { "text": "网页"} },
|
||||||
|
{ "data": { "text": "贴吧"} },
|
||||||
|
{ "data": { "text": "知道"} },
|
||||||
|
{ "data": { "text": "音乐" } },
|
||||||
|
{ "data": { "text": "图片"} },
|
||||||
|
{ "data": { "text": "视频"} },
|
||||||
|
{ "data": { "text": "地图" } },
|
||||||
|
{ "data": { "text": "百科","expandState":"collapse"}}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"template":"default"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.minder-container {
|
||||||
|
width: 100%;
|
||||||
|
height: 600px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.minder-container >>> .mind-editor {
|
||||||
|
position: revert;
|
||||||
|
height: 600px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.minder {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -22,6 +22,8 @@ import {left2RightDrag, bottom2TopDrag, right2LeftDrag} from "../common/js/direc
|
||||||
import JsonSchemaEditor from './components/common/json-schema/schema/index';
|
import JsonSchemaEditor from './components/common/json-schema/schema/index';
|
||||||
import JSONPathPicker from 'vue-jsonpath-picker';
|
import JSONPathPicker from 'vue-jsonpath-picker';
|
||||||
import VueClipboard from 'vue-clipboard2'
|
import VueClipboard from 'vue-clipboard2'
|
||||||
|
import vueMinderEditor from 'vue-minder-editor-plus'
|
||||||
|
Vue.use(vueMinderEditor)
|
||||||
|
|
||||||
Vue.use(JsonSchemaEditor);
|
Vue.use(JsonSchemaEditor);
|
||||||
import VuePapaParse from 'vue-papa-parse'
|
import VuePapaParse from 'vue-papa-parse'
|
||||||
|
|
Loading…
Reference in New Issue