Commit 703295f2 authored by WuFeiyang's avatar WuFeiyang

Navigation

parent d8d94a3d
...@@ -13636,6 +13636,11 @@ ...@@ -13636,6 +13636,11 @@
"vue-class-component": "^7.0.1" "vue-class-component": "^7.0.1"
} }
}, },
"vue-router": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.1.3.tgz",
"integrity": "sha512-8iSa4mGNXBjyuSZFCCO4fiKfvzqk+mhL0lnKuGcQtO1eoj8nq3CmbEG8FwK5QqoqwDgsjsf1GDuisDX4cdb/aQ=="
},
"vue-style-loader": { "vue-style-loader": {
"version": "4.1.2", "version": "4.1.2",
"resolved": "https://registry.npm.taobao.org/vue-style-loader/download/vue-style-loader-4.1.2.tgz", "resolved": "https://registry.npm.taobao.org/vue-style-loader/download/vue-style-loader-4.1.2.tgz",
......
This diff is collapsed.
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<div> <div>
<span>parent and children link</span> <span>parent and children link</span>
<b-button variant="primary" @click="getPath">show</b-button> <b-button variant="primary" @click="getPath">show</b-button>
<div> <div style="margin-top:10px;height:80px;overflow:scroll" v-show="isShow">
<a :href="parentPath">{{ parentPath }}</a> <a :href="parentPath" style="float:left">parentPath:{{ parentPath }}</a>
<div v-for="(path,index) in childrenPath" :key="index"> <div v-for="(path,index) in childrenPath" :key="index">
<a :href= "path" >{{path}}</a><br> <a :href= "path" style="float:left">childrenPath:{{path}}</a><br>
</div> </div>
</div> </div>
</div> </div>
...@@ -29,10 +29,11 @@ import WidgetParams from "@/components/Common/WidgetParams.vue"; ...@@ -29,10 +29,11 @@ import WidgetParams from "@/components/Common/WidgetParams.vue";
WidgetParams WidgetParams
} }
}) })
export default class FamilyLink extends Vue { export default class Navigation extends Vue {
@Prop() url!:string; @Prop() url!:string;
parentPath!:string; parentPath!:string;
childrenPath!:string[]; childrenPath!:string[];
isShow:boolean = false;
async getPath(){ async getPath(){
var apiLoad = this.url; var apiLoad = this.url;
...@@ -41,6 +42,7 @@ export default class FamilyLink extends Vue { ...@@ -41,6 +42,7 @@ export default class FamilyLink extends Vue {
this.parentPath = response.data.ParentPath as string; this.parentPath = response.data.ParentPath as string;
this.childrenPath = response.data.ChildrenPath as string[]; this.childrenPath = response.data.ChildrenPath as string[];
}) })
this.isShow = true;
this.$forceUpdate(); this.$forceUpdate();
} }
......
...@@ -17,11 +17,12 @@ ...@@ -17,11 +17,12 @@
<b-form-input v-model="config.data.url"></b-form-input> <b-form-input v-model="config.data.url"></b-form-input>
<b-input-group-append> <b-input-group-append>
<b-button @click="updateUI" size="sm" text="Button" variant="primary">OK</b-button> <b-button @click="updateUI" size="sm" text="Button" variant="primary">OK</b-button>
<b-button variant="info" @click="pathPoke">poke</b-button>
</b-input-group-append> </b-input-group-append>
</b-input-group> </b-input-group>
<hr/> <hr/>
<WidgetParams ref="WidgetParams" v-show="isShowParams&&isShowPath" action="get" @updataVariables="viewLoad" ></WidgetParams> <WidgetParams ref="WidgetParams" v-show="isShowParams&&isShowPath" action="get" @updataVariables="viewLoad" ></WidgetParams>
<FamilyLink ref="FamilyLink" :url="config.data.url"></FamilyLink> <Navigation ref="FamilyLink" :url="config.data.url"></Navigation>
</b-container> </b-container>
</template> </template>
...@@ -41,12 +42,12 @@ import PathProcessor from "@/models/PathProcessor"; ...@@ -41,12 +42,12 @@ import PathProcessor from "@/models/PathProcessor";
import StrMapObjChange from "@/models/StrMapObjChange"; import StrMapObjChange from "@/models/StrMapObjChange";
import { forEach } from "typescript-collections/dist/lib/arrays"; import { forEach } from "typescript-collections/dist/lib/arrays";
import { map } from "d3"; import { map } from "d3";
import FamilyLink from '@/components/Common/FamilyLink.vue'; import Navigation from '@/components/Common/Navigation.vue';
@Component({ @Component({
components: { components: {
WidgetParams, WidgetParams,
FamilyLink Navigation
} }
}) })
export default class Status extends Widget { export default class Status extends Widget {
...@@ -151,7 +152,11 @@ export default class Status extends Widget { ...@@ -151,7 +152,11 @@ export default class Status extends Widget {
pathPoke() pathPoke()
{ {
axios.get(this.config.data.url).then(response => { axios.get(this.config.data.url).then(response => {
console.log(this.config.data.url);
console.log(response);
console.log(response.data);
var resourcetype = response.data.ResourceType; var resourcetype = response.data.ResourceType;
console.log(resourcetype);
var samplePath = response.data.CFET2CORE_SAMPLE_PATH; var samplePath = response.data.CFET2CORE_SAMPLE_PATH;
var sample: ResourceInfo[] = []; var sample: ResourceInfo[] = [];
sample[0] = response.data.Actions.get as ResourceInfo; sample[0] = response.data.Actions.get as ResourceInfo;
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
</div> </div>
<setBasicParams ref="setBasicParams" @getPathId="getPathId" @updateConfig="updateConfig" :wave="wave" :setConfig='config'></setBasicParams> <setBasicParams ref="setBasicParams" @getPathId="getPathId" @updateConfig="updateConfig" :wave="wave" :setConfig='config'></setBasicParams>
<Navigation ref="FamilyLink" :url="config.data.url"></Navigation>
</div> </div>
</template> </template>
...@@ -12,6 +13,7 @@ ...@@ -12,6 +13,7 @@
import Vue from 'vue' import Vue from 'vue'
import setBasicParams from './setBasicParams.vue'; import setBasicParams from './setBasicParams.vue';
import showViewInfo from './showViewInfo.vue'; import showViewInfo from './showViewInfo.vue';
import Navigation from '@/components/Common/Navigation.vue';
import Component from 'vue-class-component'; import Component from 'vue-class-component';
import { Prop, Watch } from 'vue-property-decorator'; import { Prop, Watch } from 'vue-property-decorator';
import { WidgetConfig } from '@/models/WidgetConfig'; import { WidgetConfig } from '@/models/WidgetConfig';
...@@ -25,7 +27,8 @@ import axios from "axios"; ...@@ -25,7 +27,8 @@ import axios from "axios";
@Component({ @Component({
components:{ components:{
setBasicParams, setBasicParams,
showViewInfo showViewInfo,
Navigation
} }
}) })
export default class waveView extends Widget { export default class waveView extends Widget {
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<b-input v-model="config.data.url" ></b-input> <b-input v-model="config.data.url" ></b-input>
<b-input-group-addon> <b-input-group-addon>
<b-button variant="primary" @click="getPathIdParams">OK<span class="glyphicon glyphicon-save"></span></b-button> <b-button variant="primary" @click="getPathIdParams">OK<span class="glyphicon glyphicon-save"></span></b-button>
<!-- <b-button variant="info" @click="">poke</b-button> -->
</b-input-group-addon> </b-input-group-addon>
</b-input-group> </b-input-group>
</div> </div>
...@@ -222,7 +223,7 @@ export default class setBasicParams extends Vue { ...@@ -222,7 +223,7 @@ export default class setBasicParams extends Vue {
displaylogo: false displaylogo: false
}; };
Plotly.newPlot(myPlot, data_update, data_layout, config); // Plotly.newPlot(myPlot, data_update, data_layout, config);
} }
async getData(url: string) { async getData(url: string) {
var apiLoad = "/dataserver" + "/DataByTimeFuzzy/" + url;//改 var apiLoad = "/dataserver" + "/DataByTimeFuzzy/" + url;//改
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment