Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 39 additions & 44 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@abi-software/map-side-bar",
"version": "2.13.0",
"version": "2.13.0-acupoint.0",
"license": "Apache-2.0",
"repository": {
"type": "git",
Expand Down
29 changes: 28 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<el-button @click="keywordSearch">keyword search</el-button>
<el-button @click="getFacets">Get facets</el-button>
<el-button @click="toggleCreateData">Create Data/Annotation</el-button>
<el-button @click="searchAcupoints">Search Acupoints</el-button>
<el-button @click="openConnectivitySearch()">Connectivity Search</el-button>
</div>
<SideBar
Expand All @@ -26,14 +27,19 @@
ref="sideBar"
:visible="sideBarVisibility"
:annotationEntry="annotationEntry"
:acupointsInfoList="acupoints"
:createData="createData"
:connectivityEntry="connectivityEntry"
:connectivityKnowledge="connectivityKnowledge"
:showVisibilityFilter="true"
:tabs="tabArray"
@search-changed="searchChanged($event)"
@hover-changed="hoverChanged($event)"
@connectivity-hovered="onConnectivityHovered"
@actionClick="action"
@acupoints-clicked="onAcupointsClicked"
@acupoints-hovered="onAcupointsHovered"
@acupoints-result="onAcupointsResult"
@connectivity-collapse-change="onConnectivityCollapseChange"
/>
</div>
Expand All @@ -42,6 +48,7 @@
<script>
/* eslint-disable no-alert, no-console */
// optionally import default styles
import { acupointEntries } from './acupoints.js'
import SideBar from './components/SideBar.vue'
import EventBus from './components/EventBus.js'
import exampleConnectivityInput from './exampleConnectivityInput.js'
Expand Down Expand Up @@ -121,6 +128,14 @@ export default {
},
data: function () {
return {
acupoints: acupointEntries,
contextArray: [null, null],
tabArray: [
{ title: 'Dataset Explorer', id: 1, type: 'datasetExplorer', closable: false },
{ title: 'Connectivity Explorer', id: 2, type: 'connectivityExplorer', closable: false },
{ title: 'Annotation', id: 3, type: 'annotation', closable: true },
{title: 'Acupoints', id: 4, type: 'acupoints' },
],
annotationEntry: [{
featureId: "epicardium",
resourceId: "https://mapcore-bucket1.s3-us-west-2.amazonaws.com/others/29_Jan_2020/heartICN_metadata.json",
Expand Down Expand Up @@ -155,6 +170,15 @@ export default {
}
},
methods: {
onAcupointsClicked: function (data) {
console.log("acupoints-clicked", data)
},
onAcupointsHovered: function (data) {
console.log("acupoints-hovered", data)
},
onAcupointsResult: function (data) {
console.log("acupoints-result", data)
},
loadConnectivityKnowledge: async function () {
const sql = `select knowledge from knowledge
where source="${this.sckanVersion}"
Expand Down Expand Up @@ -231,6 +255,9 @@ export default {
'http://purl.obolibrary.org/obo/UBERON_0001103'
)
},
searchAcupoints: function() {
this.$refs.sideBar.openAcupointsSearch("LU 1")
},
singleFacets: function () {
this.$refs.sideBar.addFilter({
facet: 'Cardiovascular system',
Expand Down Expand Up @@ -405,4 +432,4 @@ body {
align-items: center;
gap: 0.5rem;
}
</style>
</style>./acupoints.js
78 changes: 78 additions & 0 deletions src/acupoints.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
export const acupointEntries = {
"LU 1": {
"Acupoint": "LU 1",
"Label": "LU 1",
"Synonym": "Test data",
"UMLS CUI": "",
"Meridian": "LTest data",
"Chinese Name": "Zhongfu",
"English Name": "Central Treasury",
"Location": " z zxczc.",
"Reference": "Test data",
"Indications": "Test data",
"Acupuncture Method": "Test data",
"Vasculature": "Test data",
"Innervation": "Test data",
"Curated": false,
"onMRI": true,
"Meridian Point": true,
"Link": "https://tara-repository.mgb.org/term_resolution/tara.html"
},
"LU 2": {
"Acupoint": "LU 2",
"Label": "LU 2",
"Synonym": "Test data",
"UMLS CUI": "",
"Meridian": "LTest data",
"Chinese Name": "Yunmen",
"English Name": "Cloud Gate",
"Location": " z zxczc.",
"Reference": "Test data",
"Indications": "Test data",
"Acupuncture Method": "Test data",
"Vasculature": "Test data",
"Innervation": "Test data",
"Curated": true,
"onMRI": true,
"Meridian Point": false,
"Link": "https://tara-repository.mgb.org/term_resolution/tara.html"
},
"ST 3": {
"Acupoint": "ST 3",
"Label": "ST 3",
"Synonym": "Test data",
"UMLS CUI": "",
"Meridian": "STest data",
"Chinese Name": "Cheng Qi",
"English Name": "Not Available",
"Location": " z zxcxadadadzc.",
"Reference": "Test data",
"Indications": "Test data",
"Acupuncture Method": "Test data",
"Vasculature": "Test data",
"Innervation": "Test data",
"Curated": true,
"onMRI": false,
"Meridian Point": false,
"Link": "https://tara-repository.mgb.org/term_resolution/tara.html"
},
"LR 4": {
"Acupoint": "LR 4",
"Label": "LR 4",
"Synonym": "Test data",
"UMLS CUI": "",
"Meridian": "STest data",
"Chinese Name": "Zhongfeng",
"English Name": "Not Available",
"Location": " z zxcxadadadzc.",
"Reference": "Test data",
"Indications": "Test data",
"Acupuncture Method": "Test data",
"Vasculature": "Test data",
"Innervation": "Test data",
"Curated": false,
"onMRI": false,
"Meridian Point": true,
"Link": "https://tara-repository.mgb.org/term_resolution/tara.html"
}
}
4 changes: 4 additions & 0 deletions src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ export {}

declare module 'vue' {
export interface GlobalComponents {
AcupointsCard: typeof import('./components/AcupointsCard.vue')['default']
AcupointsInfoSearch: typeof import('./components/AcupointsInfoSearch.vue')['default']
AnnotationTool: typeof import('./components/AnnotationTool.vue')['default']
BadgesGroup: typeof import('./components/BadgesGroup.vue')['default']
ConnectivityCard: typeof import('./components/ConnectivityCard.vue')['default']
Expand All @@ -19,6 +21,8 @@ declare module 'vue' {
ElCascader: typeof import('element-plus/es')['ElCascader']
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
ElCol: typeof import('element-plus/es')['ElCol']
ElCollapse: typeof import('element-plus/es')['ElCollapse']
ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
ElDrawer: typeof import('element-plus/es')['ElDrawer']
ElDropdown: typeof import('element-plus/es')['ElDropdown']
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
Expand Down
Loading